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
TextProcessorlives in this file (it is the framework reference); the heavierImageProcessor(EXIF time/place → the timeline/map facets) andWavProcessor(STFT spectral summary) live inprocessorsas 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§
- Analytics
Ref - An analytics result about an asset — the derived data bound back to the geometry it concerns.
- Asset
Ref - 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.
- Hypermedia
Container - A hypermedia container: a primary asset bundled with its related assets and its analytics, as one addressable semantic unit.
- Ingest
Result - 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).
- Processor
Output - What a processor derives from an ingested asset — the searchable representations + facets + flags.
- Text
Processor - 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§
- Asset
Role - The role a bundled asset plays relative to the container’s primary asset.
- Flag
Severity - 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_CONTEXTnamed 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 theiru64bit 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.rsuses — so a container’s reference to a mesh asset resolves to the identical subject that asset’s ownmesh_to_nquinsmanifest 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.
digestis 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.