Skip to main content

Module hypermedia

Module hypermedia 

Source
Expand description

Hypermedia semantic library — asset ⊕ analytics ⊕ related-assets bound as a semantic graph (not a directory). See docs/plans/hypermedia-semantic-library.md. Hypermedia semantic library — an asset ⊕ its analytics ⊕ its related/associated assets, bound as a semantic graph (NQuins), not a directory structure.

The Qualia line is “context is the asset”: an asset is never a bare file; it is a first-class entity that carries, inseparably, what it was derived from (prov:wasDerivedFrom), the analytics computed about it (analysisTarget/analysisResult), the related assets bound with it (bundledWith + a role), and its provenance (hasProvenance). Because the binding is a graph of edges over the one identity space (q_hash/fnv subjects, shared with crate::render::assets), you browse and query it by meaning and lineage — “what was this derived from / what analytics belong to it / what’s related” — never by folder path.

P0 (this module): the semantic model + [container_to_nquins] (emit the whole edge-graph) + the query helpers that read the relationships back out. It composes the real primitives — NQuin, q_hash, and the same 60-bit FNV subject-hashing that render/assets.rs::mesh_to_nquins uses, so a container’s reference to a mesh asset resolves to the same subject that asset’s own manifest emits. P1 adds the in-.10d provenance sidecar + a validate-before-use gate; P2 re-points the anatomy pipeline through this (an organ = mesh ⊕ systemic-burden analytics ⊕ source-GLB / provenance). See docs/plans/hypermedia-semantic-library.md.

Re-exports§

pub use processors::AudioSpectralSummary;
pub use processors::ImageProcessor;
pub use processors::WavProcessor;

Modules§

processors
Content-processor implementations that derive searchability at ingest. The model-free TextProcessor lives in this file (it is the framework reference); the heavier ImageProcessor (EXIF time/place → the timeline/map facets) and WavProcessor (STFT spectral summary) live in processors as their own units (§11: split as the library grows). Content processors — ingest derives searchability. Each processor turns an asset’s bytes into the derived, searchable representations + descriptor facets (+ flags) that fold into its container, so the original becomes findable by meaning.

Structs§

AnalyticsRef
An analytics result about an asset — the derived data bound back to the geometry it concerns.
AssetRef
A content-addressed reference to an asset (its stable subject is fnv60(uri), the same subject its own geometry manifest emits, so container edges join to the asset’s facts in the one identity space).
Descriptors
The semantic facets that make an asset findable — topic, what it depicts, when/where it happened, which project it belongs to, and its document-type / purpose (e.g. tax-support). All edges; none a folder.
Flag
A flag raised while processing an ingested asset (e.g. concerning content). The flag is a semantic descriptor on the asset; if the principal is under a guardianship relation, the ingest path (client-core / host) reads these and notifies the guardian (and records who was notified — the accountability fabric). Defining flags here keeps them queryable; the notification wiring lives where guardianship + notifications do.
HypermediaContainer
A hypermedia container: a primary asset bundled with its related assets and its analytics, as one addressable semantic unit.
IngestResult
The result of ingesting an asset through a processor: the container, its quin graph (edges + descriptors + flags), the lexicon, and the flags (which the caller checks against a guardianship relation).
Place
A place an asset is bound to — a human label plus coordinates (for the map view).
ProcessorOutput
What a processor derives from an ingested asset — the searchable representations + facets + flags.
TextProcessor
A real, model-free text / markdown processor: derives a plain-text representation, assigns topics from a keyword map (biology / engineering / policy / software / law / finance-for-tax-&-expenses), and raises a flag for any watch-word present. Proves “ingest derives searchability” with no model runtime; the semantic-content processors compose qualia-vision / qualia-audio.

Enums§

AssetRole
The role a bundled asset plays relative to the container’s primary asset.
FlagSeverity
Severity of an ingest flag. Higher = more likely to warrant a guardian notification.

Constants§

HYPERMEDIA_CONTEXT
The named graph the hypermedia relationship edges live in.

Traits§

Processor
A processor: ingest an asset (bytes + media-type) → derive its searchable representations + facets.

Functions§

analytics_for
The analytics subjects that are about a given asset — the derived data belonging to it.
bundled
Every asset subject a container bundles (primary + related).
by_depiction
Assets whose image depicts a subject (the “representation in the image”).
by_place
Assets at a place (map view).
by_topic
Assets about a topic. (biology / engineering / policy / software / law / …)
container_to_nquins
Emit the whole relationship edge-graph of a container as NQuins (+ a lexicon of the string values), in the HYPERMEDIA_CONTEXT named graph. This is the semantic library’s core: the edges are the container. Every emitted quin carries valid field parity.
content_digest
A content digest for an asset’s bytes, in the same 60-bit identity space as asset subjects — the anti-tamper / dedup anchor a caller stores as AssetRef::digest. (Public wrapper so client-core ingest can compute it.)
derived_from
The source asset subjects an asset was derived from — its lineage.
descriptors_to_nquins
Emit descriptor edges for an asset subject. Each string facet’s object is fnv60(value) (so a search for that value matches); event times are stored as their u64 bit pattern for range scans.
flag_severity
A flag’s severity level (0 Info .. 3 Urgent), if present.
flags_on
The flag subjects raised on an asset — what the guardian-notify path reads.
flags_to_nquins
Emit flag edges bound to an asset subject.
fnv60
The same 60-bit FNV-1a subject hash render/assets.rs uses — so a container’s reference to a mesh asset resolves to the identical subject that asset’s own mesh_to_nquins manifest emits (one identity space).
for_purpose
Assets serving a purpose (e.g. tax-return-2025, expenses-claim).
in_project
Assets collected under a project.
in_time_range
Assets whose event instant falls within [start, end] (unix seconds) — the timeline query.
ingest_with
Ingest an asset through a processor and fold its output into a fresh container — the original plus its derived searchable representations, its facets, and any flags, all as edges. digest is the primary asset’s content digest.
primary_of
The container’s primary asset subject.
provenance_of
The provenance-record subject bound to an asset, if any.
role_of
The role of an asset within the container.