open-standards/wai/vocab/v1.ttl
Transaction Science 22928147f3 wai: the parameter-set pin, component identity, pin-aware selection
SPEC §3.1 defines the pin a manifest carries (conditioning.prior, and a
WAI2 rendition's prior): id, sha256, determinism, and the optional form,
tier and supersedes. The digest covers the whole parameter set. A set of
several files is pinned through its listing, the new registered prior
form wai.prior.set. A sink verifies the pin before it decodes, reports a
refusal with one of an ordered set of snake_case reasons, and decodes
only from the set it verified. Tier is a closed vocabulary; supersedes is
informative.

A pin that does not resolve makes its capability unsupported for that
envelope: SPEC §4 dispatch continues at the fallback, §7.1 selection at
the next rendition, and an inert envelope's error names the reasons. A
rendition entry may carry id, sha256 and, on a companion,
companion_of_id. SPEC §7 gains a Digests subsection, and §8 says how a
MINOR revision adds an optional member.

In wai-rs: the manifest types are #[non_exhaustive] with builders; a new
pin module verifies pins in memory and on disk; Wai::dispatch_verified,
WaiMulti::pick and primary check pins and component digests; every
neural decoder reads through ParamSource; a codec-free `ffi` feature
carries the C envelope surface with wai_envelope_select and
wai_neural_decode_ex. wai-web wraps wai::container. New vectors: the
int_mlicpp set-form twin and the pin-conformance corpus with an
independent Python verifier, plus sha256.json sidecars for the vectors
of capabilities that decode against a parameter set.

Squashed from wai/stream-a-parameter-set-identity onto link 12. Conflicts
are resolved to keep both sides; the integration commits that follow
make the two streams agree.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 05:51:50 -04:00

85 lines
7 KiB
Turtle

@prefix wai: <https://wai.transaction.science/vocab/v1#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dc: <http://purl.org/dc/terms/> .
<https://wai.transaction.science/vocab/v1> a owl:Ontology ;
dc:title "WAI vocabulary (v1)" ;
dc:description "Stable IRIs for the Web AI Media Transport & Execution open standard: Manifest, Capability, Codec, the two paths (neural shared-prior + zeroth registered-codec floor), and the modality / codec enumerations." ;
dc:license <https://www.apache.org/licenses/LICENSE-2.0> ;
owl:versionInfo "1" .
# ─── Top-level classes ───────────────────────────────────────────────
wai:Manifest a owl:Class ; rdfs:label "WAI manifest" ;
rdfs:comment "The envelope around a WAI media object — names the modality, the codec, the path, and the capabilities the file requires." .
wai:Capability a owl:Class ; rdfs:label "Required capability" ;
rdfs:comment "A capability the consumer must possess to open the file (e.g. shared-prior decoder, AV1 hardware decoder)." .
wai:Codec a owl:Class ; rdfs:label "Registered codec" .
wai:NeuralPrior a owl:Class ; rdfs:label "Shared ambient neural prior" .
wai:Stream a owl:Class ; rdfs:label "Media stream" .
wai:Envelope a owl:Class ; rdfs:label "Signed envelope" .
# ─── Modality ────────────────────────────────────────────────────────
wai:Modality a owl:Class ; rdfs:label "Media modality" .
wai:Image a wai:Modality ; rdfs:label "Image" .
wai:Audio a wai:Modality ; rdfs:label "Audio" .
wai:Video a wai:Modality ; rdfs:label "Video" .
wai:Volume a wai:Modality ; rdfs:label "Volumetric (3D)" .
wai:Mesh a wai:Modality ; rdfs:label "Mesh / polygonal" .
wai:Compressed a wai:Modality ; rdfs:label "Generic compressed payload" .
# ─── Paths (neural vs zeroth) ────────────────────────────────────────
wai:Path a owl:Class ; rdfs:label "Decode path" .
wai:NeuralPath a wai:Path ; rdfs:label "Neural shared-prior path" ;
rdfs:comment "Sink regenerates the media from a shared ambient prior referenced by URI + hash." .
wai:ZerothPath a wai:Path ; rdfs:label "Zeroth-condition path" ;
rdfs:comment "Registered codec menu — PNG/FLAC/zstd mandatory floor + the recommended modern set." .
# ─── Registered codecs ───────────────────────────────────────────────
wai:PNG a wai:Codec ; rdfs:label "PNG (image, lossless)" .
wai:JPEG a wai:Codec ; rdfs:label "JPEG (image, lossy)" .
wai:AVIF a wai:Codec ; rdfs:label "AVIF (image)" .
wai:JPEGXL a wai:Codec ; rdfs:label "JPEG XL (image)" .
wai:FLAC a wai:Codec ; rdfs:label "FLAC (audio, lossless)" .
wai:Opus a wai:Codec ; rdfs:label "Opus (audio)" .
wai:AV1 a wai:Codec ; rdfs:label "AV1 (video)" .
wai:zstd a wai:Codec ; rdfs:label "zstd (generic compression)" .
wai:XZ a wai:Codec ; rdfs:label "XZ (generic compression)" .
# ─── Properties ──────────────────────────────────────────────────────
wai:modality a owl:ObjectProperty ; rdfs:domain wai:Manifest ; rdfs:range wai:Modality ; rdfs:label "Media modality" .
wai:codec a owl:ObjectProperty ; rdfs:domain wai:Manifest ; rdfs:range wai:Codec ; rdfs:label "Selected codec" .
wai:path a owl:ObjectProperty ; rdfs:domain wai:Manifest ; rdfs:range wai:Path ; rdfs:label "Decode path" .
wai:capabilitiesRequired a owl:ObjectProperty ; rdfs:domain wai:Manifest ; rdfs:range wai:Capability ; rdfs:label "Required capabilities" .
wai:sharedPriorUri a owl:ObjectProperty ; rdfs:domain wai:NeuralPrior ; rdfs:label "Shared-prior URI" ;
rdfs:comment "Describes a located prior with a BLAKE3 hash; not the manifest's pin (SPEC §3.1), which is a SHA-256 over the whole parameter set and carries no location." .
wai:sharedPriorHash a owl:DatatypeProperty ; rdfs:domain wai:NeuralPrior ; rdfs:range xsd:string ; rdfs:label "Shared-prior content hash (BLAKE3 hex)" ;
rdfs:comment "Describes a located prior with a BLAKE3 hash; not the manifest's pin (SPEC §3.1), which is a SHA-256 over the whole parameter set and carries no location." .
# ─── The parameter-set pin (SPEC §3.1) ───────────────────────────────
wai:ParameterSetPin a owl:Class ; rdfs:label "Parameter-set pin" ;
rdfs:comment "The identity of the parameter set a payload was coded against: the SHA-256 of the whole set in its declared form, and how the decode is made reproducible (SPEC §3.1)." .
wai:prior a owl:ObjectProperty ; rdfs:range wai:ParameterSetPin ; rdfs:label "Parameter-set pin" .
wai:pinId a owl:DatatypeProperty ; rdfs:domain wai:ParameterSetPin ; rdfs:range xsd:string ; rdfs:label "Pin name (informative)" .
wai:pinSha256 a owl:DatatypeProperty ; rdfs:range xsd:string ; rdfs:label "SHA-256 of the parameter set in its form (64 lowercase hex)" ;
rdfs:comment "A member of a pin and of its supersedes object." .
wai:pinDeterminism a owl:DatatypeProperty ; rdfs:domain wai:ParameterSetPin ; rdfs:range xsd:string ; rdfs:label "How the decode is made reproducible" .
wai:pinForm a owl:DatatypeProperty ; rdfs:range xsd:string ; rdfs:label "Registered prior form" ;
rdfs:comment "A member of a pin and of its supersedes object." .
wai:pinTier a owl:DatatypeProperty ; rdfs:domain wai:ParameterSetPin ; rdfs:range xsd:string ; rdfs:label "Declared reproducibility tier" .
wai:pinSupersedes a owl:ObjectProperty ; rdfs:domain wai:ParameterSetPin ; rdfs:label "The parameter set this one replaces (informative)" ;
rdfs:comment "Names that set by pinSha256 and, if it is pinned in a declared form, pinForm; it is not itself a pin." .
wai:contentHash a owl:DatatypeProperty ; rdfs:range xsd:string ; rdfs:label "Content hash (BLAKE3 hex)" .
wai:size a owl:DatatypeProperty ; rdfs:range xsd:nonNegativeInteger ; rdfs:label "Byte size" .
wai:mediaType a owl:DatatypeProperty ; rdfs:range xsd:string ; rdfs:label "IANA media type" .
wai:encodedAt a owl:DatatypeProperty ; rdfs:range xsd:dateTime ; rdfs:label "Encoded at (RFC 3339)" .
wai:decodedAt a owl:DatatypeProperty ; rdfs:range xsd:dateTime ; rdfs:label "Decoded at (RFC 3339)" .
wai:schemaId a owl:DatatypeProperty ; rdfs:range xsd:string ; rdfs:label "Schema id (e.g. \"manifest/1\")" .