diff --git a/AGENTS.md b/AGENTS.md index 0f0ee58..221893f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -14,6 +14,7 @@ This repository contains the normative MASA Sound Matter Aware protocol and its - Preserve source, representation, claim, operation, policy, and lineage as distinct objects. - Keep claim kind, actor, confidence, source health, freshness, and disclosure separate. +- Keep observation epistemic status, temporal character, signal kind, value availability, source health, freshness, and disclosure separate. - Keep unknown, withheld, unavailable, deleted, and not-applicable states distinct. - Never mutate or replace an imported representation under the same identifier after consequential transformation. - Every descendant has a parent relation and an operation receipt. @@ -31,4 +32,4 @@ Use Node.js 22.20 or newer and pnpm 10.32.1. Run `pnpm check` before calling the Do not add an application-specific term to the `masa:` namespace until at least two implementations justify the promotion and a versioned decision records it. Concrete applications keep their own extension namespaces in their own repositories. ## Git commit conventions -- Never add "Co-Authored-By" lines or any AI attribution trailers to commit messages. \ No newline at end of file +- Never add "Co-Authored-By" lines or any AI attribution trailers to commit messages. diff --git a/CHANGELOG.md b/CHANGELOG.md index e82d62a..8917d33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ All material protocol and reference-tooling changes are recorded here. MASA uses semantic versioning; a tooling patch may advance without changing the normative protocol version when its record contracts remain compatible. +## 0.2.0 - 2026-08-11 + +Minor protocol and reference-tooling release. + +- Added the optional Observation profile, promoting `epistemicStatus`, `temporalCharacter`, and `signalKind` after independent use in Cosmoaudition System and GERM. +- Kept value availability, source health, freshness, confidence, method, disclosure, and observation metadata as separate axes; a declared Observation profile requires all three new axes on every Observation. +- Added RFC 0002, versioned 0.2.0 specification/schema/ontology/context/example/conformance resources, and an invalid fixture proving incomplete Observation metadata is refused. +- Preserved every 0.1.0 normative resource and evidence snapshot unchanged. Migration creates a new attributable revision; it does not rewrite an earlier record in place. +- Corrected conformance migration reporting for the second protocol line: 0.2.0 evidence says `not_tested` rather than claiming migration is not applicable. +- Updated the TypeScript reference packages, CLI, MCP resources, capability catalog, and package artifacts to 0.2.0. + ## 0.1.1 - 2026-08-09 Patch release of the TypeScript reference implementation. The normative MASA protocol, schemas, capability-set format, profile directories, and record/request version fields remain `0.1.0`. diff --git a/README.md b/README.md index 454b904..fffed82 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ **MASA** is a project-agnostic Sound Matter Aware protocol. It provides a local-first, language-neutral contract for systems that need to describe, listen to, measure, transform, granulate, dissect, generate, map, relate, govern, and exchange sound as matter without confusing an audio file, a physical event, a perceptual account, or a computational claim. Conformance never depends on any other repository. -Protocol version `0.1.0` is the first public specification, MIT-licensed and open to any project. Its normative sources are the specification, JSON Schemas, ontology registries, and conformance fixtures in this repository. The current TypeScript reference-tooling release is `0.1.1`; tooling patches do not rename or silently revise the normative `0.1.0` resources. +Protocol version `0.2.0` is the current public specification, MIT-licensed and open to any project. It adds a shared Observation profile while preserving the versioned `0.1.0` resources unchanged. Its normative sources are the specification, JSON Schemas, ontology registries, and conformance fixtures in this repository. The current TypeScript reference-tooling release is `0.2.0`. ## What is included -- a compact Core plus Audio, Listening, Analysis, Transformation, Generation, Processing, Mapping, Agent, and Publication profiles; +- a compact Core plus Audio, Listening, Analysis, Transformation, Generation, Processing, Observation, Mapping, Agent, and Publication profiles; - JSON Schema 2020-12 contracts with stable versioned identifiers; - an engine-neutral processing-request contract for granular, spectral, and time-pitch operations, with the granular lexicon carried as attributed vocabulary; - provenance-aware terminology and relation registries; @@ -29,11 +29,11 @@ Requirements: Node.js 22.20 or newer and pnpm 10.32.1. ```bash pnpm install pnpm check -pnpm masa -- validate examples/0.1.0/valid/minimal-record.masa.json -pnpm masa -- inspect examples/0.1.0/bundles/transformation.masa -pnpm masa -- lineage examples/0.1.0/valid/processing.masa.json urn:uuid:00000000-0000-4000-8000-000000000d02 +pnpm masa -- validate examples/0.2.0/valid/minimal-record.masa.json +pnpm masa -- inspect examples/0.2.0/bundles/transformation.masa +pnpm masa -- lineage examples/0.2.0/valid/processing.masa.json urn:uuid:00000000-0000-4000-8000-000000000d02 pnpm masa -- process template granulate -pnpm masa -- conformance reader examples/0.1.0/valid/minimal-record.masa.json +pnpm masa -- conformance reader examples/0.2.0/valid/minimal-record.masa.json ``` Start the local MCP server over stdio: @@ -49,7 +49,7 @@ See [`docs/project-agnostic-integration.md`](docs/project-agnostic-integration.m ## Local conformance evidence -The reference implementation records separate evidence for the `reader`, `writer`, `transformer`, `agent-host`, and `publisher` classes in [`conformance/0.1.0/evidence`](conformance/0.1.0/evidence). The current local run reports all five classes conformant on Node.js 22.22.3 for macOS arm64 against fixture-manifest digest `7f57b4870c2414936114ce906258e1d4816be340d1c3c591cb95eec80bc9cdea`. The digest is refreshed from the examples, specification, capability catalog, schemas, ontology registries, JSON-LD context, and executable conformance runner whenever evidence is intentionally recorded. +The reference implementation records separate evidence for the `reader`, `writer`, `transformer`, `agent-host`, and `publisher` classes in [`conformance/0.2.0/evidence`](conformance/0.2.0/evidence). The current local run reports all five classes conformant on Node.js 22.22.3 for macOS arm64 against fixture-manifest digest `456f1fd3c5c9b4905dca5456ef3179ac651282a2885eeb6aac2b5997cc254da4`. The digest is refreshed from the examples, specification, capability catalog, schemas, ontology registries, JSON-LD context, and executable conformance runner whenever evidence is intentionally recorded. Run `pnpm check` to regenerate derived code and verify conformance on the current machine. Run `pnpm conformance:evidence` only when intentionally recording a new local evidence snapshot. Conformance is always specific to an implementation version, MASA version, profile, class, platform, and exact fixture set; it is not a universal certification. diff --git a/capabilities/0.2.0/reference.json b/capabilities/0.2.0/reference.json new file mode 100644 index 0000000..00d9663 --- /dev/null +++ b/capabilities/0.2.0/reference.json @@ -0,0 +1,331 @@ +{ + "capabilitySetType": "masa-capability-set", + "capabilitySetVersion": "0.2.0", + "masaVersion": "0.2.0", + "id": "https://masa.sonicfield.org/capabilities/0.2.0/reference", + "implementation": { + "id": "https://masa.sonicfield.org/implementations/typescript-reference/0.2.0", + "name": "MASA local TypeScript reference", + "version": "0.2.0" + }, + "generatedAt": "2026-08-11T00:00:00.000Z", + "capabilities": [ + { + "id": "https://masa.sonicfield.org/capabilities/0.2.0/matter.validate", + "type": "masa:Capability", + "name": "matter.validate", + "purpose": "Validate one local MASA record or bundle inside a configured root without remote dereferencing.", + "supportedMasaVersions": [ + "0.2.0" + ], + "profiles": [ + "core" + ], + "inputSchema": { + "state": "known", + "uri": "https://masa.sonicfield.org/schemas/0.2.0/tools/validate-input.schema.json" + }, + "outputSchema": { + "state": "known", + "uri": "https://masa.sonicfield.org/schemas/0.2.0/tools/tool-result.schema.json" + }, + "resources": { + "local": [ + "configured-roots" + ], + "network": [], + "providers": [], + "hardware": [] + }, + "sideEffects": [ + "local-read" + ], + "authority": { + "required": true, + "source": "trusted-host", + "scopes": [ + "local-read" + ] + }, + "confirmation": "host-policy", + "riskFlags": { + "expose": false, + "publish": false, + "delete": false, + "overwrite": false, + "paidProvider": false, + "externalSystem": false, + "preciseLocation": false + }, + "receiptType": "masa:OperationReceipt", + "determinism": [ + "deterministic" + ], + "outcomes": [ + "completed", + "failed", + "refused", + "not_performed" + ], + "limits": { + "maxRecordBytes": 16777216, + "network": false + }, + "extensions": {} + }, + { + "id": "https://masa.sonicfield.org/capabilities/0.2.0/matter.inspect", + "type": "masa:Capability", + "name": "matter.inspect", + "purpose": "Return a bounded structural summary and diagnostics for one local MASA artifact.", + "supportedMasaVersions": [ + "0.2.0" + ], + "profiles": [ + "core" + ], + "inputSchema": { + "state": "known", + "uri": "https://masa.sonicfield.org/schemas/0.2.0/tools/inspect-input.schema.json" + }, + "outputSchema": { + "state": "known", + "uri": "https://masa.sonicfield.org/schemas/0.2.0/tools/tool-result.schema.json" + }, + "resources": { + "local": [ + "configured-roots" + ], + "network": [], + "providers": [], + "hardware": [] + }, + "sideEffects": [ + "local-read" + ], + "authority": { + "required": true, + "source": "trusted-host", + "scopes": [ + "local-read" + ] + }, + "confirmation": "host-policy", + "riskFlags": { + "expose": false, + "publish": false, + "delete": false, + "overwrite": false, + "paidProvider": false, + "externalSystem": false, + "preciseLocation": false + }, + "receiptType": "masa:OperationReceipt", + "determinism": [ + "deterministic" + ], + "outcomes": [ + "completed", + "failed", + "refused", + "not_performed" + ], + "limits": { + "maxRecordBytes": 16777216, + "network": false + }, + "extensions": {} + }, + { + "id": "https://masa.sonicfield.org/capabilities/0.2.0/matter.trace_lineage", + "type": "masa:Capability", + "name": "matter.trace_lineage", + "purpose": "Return a bounded, direction-aware causal lineage subgraph for one entity in a validated local record.", + "supportedMasaVersions": [ + "0.2.0" + ], + "profiles": [ + "core" + ], + "inputSchema": { + "state": "known", + "uri": "https://masa.sonicfield.org/schemas/0.2.0/tools/trace-lineage-input.schema.json" + }, + "outputSchema": { + "state": "known", + "uri": "https://masa.sonicfield.org/schemas/0.2.0/tools/tool-result.schema.json" + }, + "resources": { + "local": [ + "configured-roots" + ], + "network": [], + "providers": [], + "hardware": [] + }, + "sideEffects": [ + "local-read" + ], + "authority": { + "required": true, + "source": "trusted-host", + "scopes": [ + "local-read" + ] + }, + "confirmation": "host-policy", + "riskFlags": { + "expose": false, + "publish": false, + "delete": false, + "overwrite": false, + "paidProvider": false, + "externalSystem": false, + "preciseLocation": false + }, + "receiptType": "masa:OperationReceipt", + "determinism": [ + "deterministic" + ], + "outcomes": [ + "completed", + "failed", + "refused", + "not_performed" + ], + "limits": { + "maxRecordBytes": 16777216, + "network": false + }, + "extensions": {} + }, + { + "id": "https://masa.sonicfield.org/capabilities/0.2.0/matter.audit_public_export", + "type": "masa:Capability", + "name": "matter.audit_public_export", + "purpose": "Audit a proposed public projection for protocol, policy, path, secret, and disclosure failures.", + "supportedMasaVersions": [ + "0.2.0" + ], + "profiles": [ + "core" + ], + "inputSchema": { + "state": "known", + "uri": "https://masa.sonicfield.org/schemas/0.2.0/tools/audit-public-input.schema.json" + }, + "outputSchema": { + "state": "known", + "uri": "https://masa.sonicfield.org/schemas/0.2.0/tools/tool-result.schema.json" + }, + "resources": { + "local": [ + "configured-roots" + ], + "network": [], + "providers": [], + "hardware": [] + }, + "sideEffects": [ + "local-read" + ], + "authority": { + "required": true, + "source": "trusted-host", + "scopes": [ + "local-read" + ] + }, + "confirmation": "host-policy", + "riskFlags": { + "expose": false, + "publish": false, + "delete": false, + "overwrite": false, + "paidProvider": false, + "externalSystem": false, + "preciseLocation": false + }, + "receiptType": "masa:OperationReceipt", + "determinism": [ + "deterministic" + ], + "outcomes": [ + "completed", + "failed", + "refused", + "not_performed" + ], + "limits": { + "maxRecordBytes": 16777216, + "network": false + }, + "extensions": {} + }, + { + "id": "https://masa.sonicfield.org/capabilities/0.2.0/matter.plan_processing", + "type": "masa:Capability", + "name": "matter.plan_processing", + "purpose": "Compose and validate one engine-neutral sound-matter processing request without performing any signal processing.", + "supportedMasaVersions": [ + "0.2.0" + ], + "profiles": [ + "core", + "processing" + ], + "inputSchema": { + "state": "known", + "uri": "https://masa.sonicfield.org/schemas/0.2.0/tools/plan-processing-input.schema.json" + }, + "outputSchema": { + "state": "known", + "uri": "https://masa.sonicfield.org/schemas/0.2.0/tools/tool-result.schema.json" + }, + "resources": { + "local": [ + "configured-roots" + ], + "network": [], + "providers": [], + "hardware": [] + }, + "sideEffects": [ + "local-read" + ], + "authority": { + "required": true, + "source": "trusted-host", + "scopes": [ + "local-read" + ] + }, + "confirmation": "host-policy", + "riskFlags": { + "expose": false, + "publish": false, + "delete": false, + "overwrite": false, + "paidProvider": false, + "externalSystem": false, + "preciseLocation": false + }, + "receiptType": "masa:OperationReceipt", + "determinism": [ + "nondeterministic" + ], + "outcomes": [ + "completed", + "failed", + "refused", + "not_performed" + ], + "limits": { + "maxRecordBytes": 16777216, + "network": false + }, + "extensions": {} + } + ], + "extensions": {} +} diff --git a/cli/package.json b/cli/package.json index b8ab488..a7da6b5 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@sonicfield/masa-cli", - "version": "0.1.1", + "version": "0.2.0", "private": true, "license": "MIT", "description": "Local command-line reference implementation for MASA", diff --git a/cli/src/index.test.ts b/cli/src/index.test.ts index 26f7042..f8d774b 100644 --- a/cli/src/index.test.ts +++ b/cli/src/index.test.ts @@ -56,7 +56,7 @@ describe("MASA CLI", () => { it("applies the public-safety audit to publisher conformance", async () => { const recordPath = join( import.meta.dirname, - "../../examples/0.1.0/invalid/public-local-path.masa.json", + "../../examples/0.2.0/invalid/public-local-path.masa.json", ); const result = capture(); diff --git a/conformance/0.2.0/evidence/agent-host.json b/conformance/0.2.0/evidence/agent-host.json new file mode 100644 index 0000000..15df7f7 --- /dev/null +++ b/conformance/0.2.0/evidence/agent-host.json @@ -0,0 +1,45 @@ +{ + "class": "agent-host", + "diagnostics": [], + "extensions": {}, + "fixtureManifestDigest": { + "algorithm": "sha-256", + "byteLength": 368867, + "digest": "456f1fd3c5c9b4905dca5456ef3179ac651282a2885eeb6aac2b5997cc254da4", + "status": "verified", + "verifiedAt": "2026-08-12T00:36:14.673Z" + }, + "id": "urn:uuid:10000000-0000-4000-8000-000000000004", + "implementation": { + "name": "MASA local TypeScript reference", + "version": "0.2.0" + }, + "masaVersion": "0.2.0", + "migrationStatus": "not_tested", + "platform": { + "architecture": "arm64", + "os": "darwin", + "runtime": "node v22.22.3" + }, + "profile": "agent", + "runAt": "2026-08-12T00:36:14.673Z", + "status": "conformant", + "subject": "@sonicfield/masa workspace", + "suite": { + "name": "masa-typescript-reference-conformance", + "version": "0.2.0" + }, + "tests": [ + { + "diagnostics": [], + "id": "agent-host.capabilities-and-record", + "status": "conformant" + }, + { + "diagnostics": [], + "id": "agent-host.mcp-stdio", + "status": "conformant" + } + ], + "type": "masa:ConformanceResult" +} diff --git a/conformance/0.2.0/evidence/publisher.json b/conformance/0.2.0/evidence/publisher.json new file mode 100644 index 0000000..ecad2c6 --- /dev/null +++ b/conformance/0.2.0/evidence/publisher.json @@ -0,0 +1,40 @@ +{ + "class": "publisher", + "diagnostics": [], + "extensions": {}, + "fixtureManifestDigest": { + "algorithm": "sha-256", + "byteLength": 368867, + "digest": "456f1fd3c5c9b4905dca5456ef3179ac651282a2885eeb6aac2b5997cc254da4", + "status": "verified", + "verifiedAt": "2026-08-12T00:36:14.673Z" + }, + "id": "urn:uuid:10000000-0000-4000-8000-000000000005", + "implementation": { + "name": "MASA local TypeScript reference", + "version": "0.2.0" + }, + "masaVersion": "0.2.0", + "migrationStatus": "not_tested", + "platform": { + "architecture": "arm64", + "os": "darwin", + "runtime": "node v22.22.3" + }, + "profile": "publication", + "runAt": "2026-08-12T00:36:14.673Z", + "status": "conformant", + "subject": "@sonicfield/masa workspace", + "suite": { + "name": "masa-typescript-reference-conformance", + "version": "0.2.0" + }, + "tests": [ + { + "diagnostics": [], + "id": "publisher.public-projection-audit", + "status": "conformant" + } + ], + "type": "masa:ConformanceResult" +} diff --git a/conformance/0.2.0/evidence/reader.json b/conformance/0.2.0/evidence/reader.json new file mode 100644 index 0000000..61fb033 --- /dev/null +++ b/conformance/0.2.0/evidence/reader.json @@ -0,0 +1,60 @@ +{ + "class": "reader", + "diagnostics": [], + "extensions": {}, + "fixtureManifestDigest": { + "algorithm": "sha-256", + "byteLength": 368867, + "digest": "456f1fd3c5c9b4905dca5456ef3179ac651282a2885eeb6aac2b5997cc254da4", + "status": "verified", + "verifiedAt": "2026-08-12T00:36:14.673Z" + }, + "id": "urn:uuid:10000000-0000-4000-8000-000000000001", + "implementation": { + "name": "MASA local TypeScript reference", + "version": "0.2.0" + }, + "masaVersion": "0.2.0", + "migrationStatus": "not_tested", + "platform": { + "architecture": "arm64", + "os": "darwin", + "runtime": "node v22.22.3" + }, + "profile": "core", + "runAt": "2026-08-12T00:36:14.673Z", + "status": "conformant", + "subject": "@sonicfield/masa workspace", + "suite": { + "name": "masa-typescript-reference-conformance", + "version": "0.2.0" + }, + "tests": [ + { + "diagnostics": [], + "id": "reader.valid-profile-matrix", + "status": "conformant" + }, + { + "diagnostics": [], + "id": "reader.invalid-profile-matrix", + "status": "conformant" + }, + { + "diagnostics": [], + "id": "reader.strict-json-and-extension-roundtrip", + "status": "conformant" + }, + { + "diagnostics": [], + "id": "reader.directory-bundle", + "status": "conformant" + }, + { + "diagnostics": [], + "id": "reader.deterministic-zip-roundtrip", + "status": "conformant" + } + ], + "type": "masa:ConformanceResult" +} diff --git a/conformance/0.2.0/evidence/transformer.json b/conformance/0.2.0/evidence/transformer.json new file mode 100644 index 0000000..53a96be --- /dev/null +++ b/conformance/0.2.0/evidence/transformer.json @@ -0,0 +1,55 @@ +{ + "class": "transformer", + "diagnostics": [], + "extensions": {}, + "fixtureManifestDigest": { + "algorithm": "sha-256", + "byteLength": 368867, + "digest": "456f1fd3c5c9b4905dca5456ef3179ac651282a2885eeb6aac2b5997cc254da4", + "status": "verified", + "verifiedAt": "2026-08-12T00:36:14.673Z" + }, + "id": "urn:uuid:10000000-0000-4000-8000-000000000003", + "implementation": { + "name": "MASA local TypeScript reference", + "version": "0.2.0" + }, + "masaVersion": "0.2.0", + "migrationStatus": "not_tested", + "platform": { + "architecture": "arm64", + "os": "darwin", + "runtime": "node v22.22.3" + }, + "profile": "transformation", + "runAt": "2026-08-12T00:36:14.673Z", + "status": "conformant", + "subject": "@sonicfield/masa workspace", + "suite": { + "name": "masa-typescript-reference-conformance", + "version": "0.2.0" + }, + "tests": [ + { + "diagnostics": [], + "id": "reader.directory-bundle", + "status": "conformant" + }, + { + "diagnostics": [], + "id": "reader.deterministic-zip-roundtrip", + "status": "conformant" + }, + { + "diagnostics": [], + "id": "transformer.processing-lineage", + "status": "conformant" + }, + { + "diagnostics": [], + "id": "transformer.lineage-and-failure", + "status": "conformant" + } + ], + "type": "masa:ConformanceResult" +} diff --git a/conformance/0.2.0/evidence/writer.json b/conformance/0.2.0/evidence/writer.json new file mode 100644 index 0000000..f29b9c1 --- /dev/null +++ b/conformance/0.2.0/evidence/writer.json @@ -0,0 +1,45 @@ +{ + "class": "writer", + "diagnostics": [], + "extensions": {}, + "fixtureManifestDigest": { + "algorithm": "sha-256", + "byteLength": 368867, + "digest": "456f1fd3c5c9b4905dca5456ef3179ac651282a2885eeb6aac2b5997cc254da4", + "status": "verified", + "verifiedAt": "2026-08-12T00:36:14.673Z" + }, + "id": "urn:uuid:10000000-0000-4000-8000-000000000002", + "implementation": { + "name": "MASA local TypeScript reference", + "version": "0.2.0" + }, + "masaVersion": "0.2.0", + "migrationStatus": "not_tested", + "platform": { + "architecture": "arm64", + "os": "darwin", + "runtime": "node v22.22.3" + }, + "profile": "core", + "runAt": "2026-08-12T00:36:14.673Z", + "status": "conformant", + "subject": "@sonicfield/masa workspace", + "suite": { + "name": "masa-typescript-reference-conformance", + "version": "0.2.0" + }, + "tests": [ + { + "diagnostics": [], + "id": "reader.valid-profile-matrix", + "status": "conformant" + }, + { + "diagnostics": [], + "id": "writer.identities-profiles-and-receipts", + "status": "conformant" + } + ], + "type": "masa:ConformanceResult" +} diff --git a/conformance/run.ts b/conformance/run.ts index 66471a9..16ecaae 100644 --- a/conformance/run.ts +++ b/conformance/run.ts @@ -132,7 +132,7 @@ tests.push(await test("reader.valid-profile-matrix", async () => { tests.push(await test("reader.invalid-profile-matrix", async () => { const files = await masaRecordFiles(invalidDirectory); - assert(files.length === 10, "Invalid fixture matrix does not match the expected count of 10."); + assert(files.length === 11, "Invalid fixture matrix does not match the expected count of 11."); for (const path of files) { let valid = false; try { @@ -378,7 +378,7 @@ const evidence = classes.map((className, index) => { profile: classProfiles[className], class: className, status: failed.length === 0 ? "conformant" : "failed", - migrationStatus: "not_applicable", + migrationStatus: "not_tested", runAt, tests: selected, fixtureManifestDigest: { diff --git a/contexts/0.2.0/masa.jsonld b/contexts/0.2.0/masa.jsonld new file mode 100644 index 0000000..0eb65ce --- /dev/null +++ b/contexts/0.2.0/masa.jsonld @@ -0,0 +1,56 @@ +{ + "@context": { + "@version": 1.1, + "masa": "https://masa.sonicfield.org/vocab/0.2.0#", + "prov": "http://www.w3.org/ns/prov#", + "odrl": "http://www.w3.org/ns/odrl/2/", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "id": "@id", + "type": "@type", + "MatterRecord": "masa:MatterRecord", + "Actor": "masa:Actor", + "Source": "masa:Source", + "Representation": "masa:Representation", + "Encounter": "masa:Encounter", + "Aperture": "masa:Aperture", + "ListeningPass": "masa:ListeningPass", + "Claim": "masa:Claim", + "Measurement": "masa:Measurement", + "Region": "masa:Region", + "Observation": "masa:Observation", + "Mapping": "masa:Mapping", + "OperationReceipt": "masa:OperationReceipt", + "Relation": "masa:Relation", + "Policy": "masa:Policy", + "Context": "masa:Context", + "AgentRun": "masa:AgentRun", + "Capability": "masa:Capability", + "createdAt": { "@id": "prov:generatedAtTime", "@type": "xsd:dateTime" }, + "createdBy": { "@id": "prov:wasAttributedTo", "@type": "@id" }, + "actors": { "@id": "masa:actors", "@container": "@set" }, + "sources": { "@id": "masa:sources", "@container": "@set" }, + "representations": { "@id": "masa:representations", "@container": "@set" }, + "encounters": { "@id": "masa:encounters", "@container": "@set" }, + "apertures": { "@id": "masa:apertures", "@container": "@set" }, + "listeningPasses": { "@id": "masa:listeningPasses", "@container": "@set" }, + "claims": { "@id": "masa:claims", "@container": "@set" }, + "measurements": { "@id": "masa:measurements", "@container": "@set" }, + "regions": { "@id": "masa:regions", "@container": "@set" }, + "observations": { "@id": "masa:observations", "@container": "@set" }, + "mappings": { "@id": "masa:mappings", "@container": "@set" }, + "relations": { "@id": "masa:relations", "@container": "@set" }, + "policies": { "@id": "masa:policies", "@container": "@set" }, + "contexts": { "@id": "masa:contexts", "@container": "@set" }, + "agentRuns": { "@id": "masa:agentRuns", "@container": "@set" }, + "capabilities": { "@id": "masa:capabilities", "@container": "@set" }, + "inputs": { "@id": "prov:used", "@type": "@id", "@container": "@set" }, + "outputs": { "@id": "prov:generated", "@type": "@id", "@container": "@set" }, + "subject": { "@id": "masa:subject", "@type": "@id" }, + "predicate": { "@id": "masa:predicate", "@type": "@id" }, + "object": { "@id": "masa:object", "@type": "@id" }, + "epistemicStatus": "masa:epistemicStatus", + "temporalCharacter": "masa:temporalCharacter", + "signalKind": "masa:signalKind", + "governedBy": { "@id": "odrl:hasPolicy", "@type": "@id" } + } +} diff --git a/docs/processing.md b/docs/processing.md index 7716f9c..c48243f 100644 --- a/docs/processing.md +++ b/docs/processing.md @@ -1,6 +1,6 @@ # Sound matter processing -MASA 0.1.0 carries a Processing profile so that agentic and conventional workflows can command granular, spectral, and time-pitch work on sound matter — granulation, extraction of bands, strata, or partials, reduction, fragmentation, time-stretching, and pitch-shifting — while every operation stays contracted, authorized, and accounted. The reference implementation performs no digital signal processing; engines are external and named per receipt. +MASA 0.2.0 carries a Processing profile so that agentic and conventional workflows can command granular, spectral, and time-pitch work on sound matter — granulation, extraction of bands, strata, or partials, reduction, fragmentation, time-stretching, and pitch-shifting — while every operation stays contracted, authorized, and accounted. The reference implementation performs no digital signal processing; engines are external and named per receipt. ## The flow diff --git a/docs/project-agnostic-integration.md b/docs/project-agnostic-integration.md index deb38c8..9fd5661 100644 --- a/docs/project-agnostic-integration.md +++ b/docs/project-agnostic-integration.md @@ -1,10 +1,10 @@ # Project-agnostic MASA integration -MASA 0.1.0 defines a protocol boundary, not an application object model. An implementation may use any language, storage system, audio engine, interface, or deployment model when its emitted artifacts satisfy the exact versioned schemas and semantic invariants. +MASA 0.2.0 defines a protocol boundary, not an application object model. An implementation may use any language, storage system, audio engine, interface, or deployment model when its emitted artifacts satisfy the exact versioned schemas and semantic invariants. ## What an implementation adopts -An implementation adopts only the profiles it can evidence. Every record adopts Core; audio, listening, analysis, transformation, generation, mapping, agent, and publication remain independent capability declarations. A conventional non-agentic script can therefore be a conforming Reader or Writer without implementing an agent host, audio engine, or public service. +An implementation adopts only the profiles it can evidence. Every record adopts Core; audio, listening, analysis, transformation, generation, processing, observation, mapping, agent, and publication remain independent capability declarations. A conventional non-agentic script can therefore be a conforming Reader or Writer without implementing an agent host, audio engine, observation gateway, or public service. Core identifiers, qualified states, claims, receipts, policies, and lineage relations carry interoperable meaning. Namespaced register and scale values let another field or community add classifications without changing the Core vocabulary. Unknown extension payloads survive local Reader and Writer round trips, while public projection excludes them unless the exact namespace and shape have been reviewed. diff --git a/docs/reference-architecture.md b/docs/reference-architecture.md index e5e6262..3ea02a6 100644 --- a/docs/reference-architecture.md +++ b/docs/reference-architecture.md @@ -19,7 +19,7 @@ spec + ontology + schemas ## Authority boundaries -- `spec/`, `schemas/`, `ontology/`, and `contexts/` define protocol 0.1.0. +- `spec/`, `schemas/`, `ontology/`, and `contexts/` define the current protocol 0.2.0 while retaining prior versioned resources. - `packages/core` contains pure types, identity helpers, indexing, deterministic JSON, and projection helpers. It performs no filesystem or network access. - `packages/validator` registers all schemas locally in Ajv 2020 and adds reference, lineage, profile, policy, and disclosure invariants. It never dereferences a URI. - `packages/bundle` is the only package that reads or writes bundle paths. It streams ZIP entries, imposes limits, verifies the manifest, and promotes outputs only after complete verification. diff --git a/examples/0.2.0/bundles/transformation.masa/events.ndjson b/examples/0.2.0/bundles/transformation.masa/events.ndjson new file mode 100644 index 0000000..9fd85bb --- /dev/null +++ b/examples/0.2.0/bundles/transformation.masa/events.ndjson @@ -0,0 +1 @@ +{"id":"urn:uuid:00000000-0000-4000-8000-000000000603","type":"masa:OperationReceipt","recordId":"urn:uuid:00000000-0000-4000-8000-000000000003","sequence":0,"operationType":"matter.transform","effectClass":"transform","finalStatus":"completed","startedAt":"2026-07-27T12:01:00Z","endedAt":"2026-07-27T12:01:01Z","actors":["urn:uuid:00000000-0000-4000-8000-000000000101"],"inputs":["urn:uuid:00000000-0000-4000-8000-000000000601"],"outputs":["urn:uuid:00000000-0000-4000-8000-000000000602"],"tool":{"state":"known","value":{"id":"urn:uuid:00000000-0000-4000-8000-000000000604","name":"MASA fixture transform","version":{"state":"known","value":"0.1.0"},"kind":"script"}},"parameters":{"operation":"gain","gainDb":-3,"preservationIntent":{"properties":["duration","channel-layout"],"verification":{"state":"unknown","reason":"Derivative bytes are omitted from this structural fixture.","reasonCode":"not_bundled"}}},"policyEvaluation":{"action":"transform","targets":["urn:uuid:00000000-0000-4000-8000-000000000602"],"policyRefs":["urn:uuid:00000000-0000-4000-8000-000000000301"],"result":"permitted","evaluatedAt":"2026-07-27T12:01:00Z","evaluator":"urn:uuid:00000000-0000-4000-8000-000000000101","authorityRefs":["urn:uuid:00000000-0000-4000-8000-000000000302"],"reasons":["The active local fixture policy explicitly permits this bounded operation."]},"reversibility":"compensatable","determinism":{"state":"deterministic"},"warnings":[],"errors":[],"claimRefs":[],"extensions":{}} diff --git a/examples/0.2.0/bundles/transformation.masa/manifest.json b/examples/0.2.0/bundles/transformation.masa/manifest.json new file mode 100644 index 0000000..2bc420a --- /dev/null +++ b/examples/0.2.0/bundles/transformation.masa/manifest.json @@ -0,0 +1,47 @@ +{ + "manifestType": "masa-bundle", + "manifestVersion": "0.2.0", + "masaVersion": "0.2.0", + "id": "urn:uuid:00000000-0000-4000-8000-000000000b01", + "createdAt": "2026-07-27T12:11:00Z", + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "disclosure": "private", + "profiles": [ + "core", + "audio", + "transformation" + ], + "records": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000003", + "path": "records/transformation.masa.json" + } + ], + "files": [ + { + "path": "events.ndjson", + "role": "event-log", + "mediaType": "application/x-ndjson", + "byteLength": 1482, + "sha256": "a83cb23722f25be0723a45f317e59b478d245e5e3da5f912c69e35d80842eb96", + "disclosure": "private" + }, + { + "path": "records/transformation.masa.json", + "role": "record", + "mediaType": "application/vnd.sonicfield.masa.record+json", + "byteLength": 6971, + "sha256": "3791c8835b4775b43ce010ebaf535a273b64ed6cf9ef9d060182865f9b72dbbc", + "disclosure": "private", + "recordRef": "urn:uuid:00000000-0000-4000-8000-000000000003" + } + ], + "externalReferences": [], + "omissions": [ + { + "category": "media", + "reason": "No audio bytes are required for this structural lineage fixture." + } + ], + "extensions": {} +} diff --git a/examples/0.2.0/bundles/transformation.masa/records/transformation.masa.json b/examples/0.2.0/bundles/transformation.masa/records/transformation.masa.json new file mode 100644 index 0000000..649323e --- /dev/null +++ b/examples/0.2.0/bundles/transformation.masa/records/transformation.masa.json @@ -0,0 +1,258 @@ +{ + "$schema": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "masaVersion": "0.2.0", + "id": "urn:uuid:00000000-0000-4000-8000-000000000003", + "type": "masa:MatterRecord", + "revision": 1, + "profiles": [ + "core", + "audio", + "transformation" + ], + "createdAt": "2026-07-27T12:00:00Z", + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "title": "Lineage-preserving transformation", + "description": "A representation is registered without claiming that it is identical to a physical event or perceptual object.", + "actors": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000101", + "type": "masa:Actor", + "actorKind": "human", + "roles": [ + "record-creator" + ], + "name": { + "state": "known", + "value": "Local example author" + }, + "disclosure": "private", + "extensions": {} + } + ], + "sources": [], + "representations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000601", + "type": "masa:Representation", + "role": "source-representation", + "mediaType": "audio/wav", + "format": { + "state": "unknown", + "reason": "The example does not include source bytes.", + "reasonCode": "not_bundled" + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {}, + "audio": { + "durationSeconds": { + "state": "known", + "value": 1 + }, + "channels": { + "state": "known", + "value": 1 + }, + "sampleRateHz": { + "state": "known", + "value": 48000 + }, + "bitDepth": { + "state": "known", + "value": 24 + }, + "encoding": { + "state": "known", + "value": "PCM signed integer little-endian" + }, + "spatialFormat": { + "state": "known", + "value": "mono" + }, + "levelContext": { + "state": "unknown", + "reason": "No calibrated playback or capture level is attached to this fixture.", + "reasonCode": "not_calibrated" + } + } + }, + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000602", + "type": "masa:Representation", + "role": "derivative", + "mediaType": "audio/wav", + "format": { + "state": "known", + "value": "WAVE PCM derivative; bytes omitted from fixture" + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {}, + "audio": { + "durationSeconds": { + "state": "known", + "value": 1 + }, + "channels": { + "state": "known", + "value": 1 + }, + "sampleRateHz": { + "state": "known", + "value": 48000 + }, + "bitDepth": { + "state": "known", + "value": 24 + }, + "encoding": { + "state": "known", + "value": "PCM signed integer little-endian" + }, + "spatialFormat": { + "state": "known", + "value": "mono" + }, + "levelContext": { + "state": "unknown", + "reason": "No calibrated playback or capture level is attached to this fixture.", + "reasonCode": "not_calibrated" + } + } + } + ], + "encounters": [], + "apertures": [], + "listeningPasses": [], + "claims": [], + "regions": [], + "measurements": [], + "observations": [], + "mappings": [], + "relations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000605", + "type": "masa:Relation", + "subject": "urn:uuid:00000000-0000-4000-8000-000000000602", + "predicate": "masa:derived-from", + "object": "urn:uuid:00000000-0000-4000-8000-000000000601", + "assertedBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "createdAt": "2026-07-27T12:01:01Z", + "basis": [ + { + "ref": "urn:uuid:00000000-0000-4000-8000-000000000603", + "role": "operation" + } + ], + "operationRef": "urn:uuid:00000000-0000-4000-8000-000000000603", + "extensions": {} + } + ], + "policies": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000301", + "type": "masa:Policy", + "policyKind": "composite", + "issuer": "urn:uuid:00000000-0000-4000-8000-000000000101", + "status": "active", + "disclosure": "private", + "rules": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000302", + "effect": "permission", + "actions": [ + "read", + "validate", + "transform" + ], + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000003" + ], + "subjects": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "authorityBasis": { + "state": "known", + "value": "Local creator declaration for this private example" + }, + "constraints": { + "network": "prohibited" + }, + "duties": [ + "Preserve provenance and unknown states" + ] + } + ], + "review": { + "contact": { + "state": "unknown", + "reason": "No external contact exists for a local fixture.", + "reasonCode": "local_fixture" + }, + "route": { + "state": "known", + "value": "Review the record with the local MASA CLI" + } + }, + "extensions": {} + } + ], + "contexts": [], + "agentRuns": [], + "capabilities": [], + "integrity": { + "state": "unknown", + "reason": "The standalone example is an account rather than a bundled byte artifact.", + "reasonCode": "not_bundled" + }, + "history": { + "mode": "external", + "href": "events.ndjson", + "eventIds": [ + "urn:uuid:00000000-0000-4000-8000-000000000603" + ] + }, + "disclosure": "private", + "registers": [ + "digital-technical" + ], + "scales": [ + "object-event" + ], + "extensions": { + "example:roundtrip": { + "deep": { + "values": [ + "preserve", + "without-interpretation" + ] + } + } + } +} diff --git a/examples/0.2.0/invalid/dangling-reference.masa.json b/examples/0.2.0/invalid/dangling-reference.masa.json new file mode 100644 index 0000000..1ac46b0 --- /dev/null +++ b/examples/0.2.0/invalid/dangling-reference.masa.json @@ -0,0 +1,146 @@ +{ + "$schema": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "masaVersion": "0.2.0", + "id": "urn:uuid:00000000-0000-4000-8000-000000000001", + "type": "masa:MatterRecord", + "revision": 1, + "profiles": [ + "core" + ], + "createdAt": "2026-07-27T12:00:00Z", + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "title": "Minimal local matter account", + "description": "A representation is registered without claiming that it is identical to a physical event or perceptual object.", + "actors": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000101", + "type": "masa:Actor", + "actorKind": "human", + "roles": [ + "record-creator" + ], + "name": { + "state": "known", + "value": "Local example author" + }, + "disclosure": "private", + "extensions": {} + } + ], + "sources": [], + "representations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000201", + "type": "masa:Representation", + "role": "source-representation", + "mediaType": "application/octet-stream", + "format": { + "state": "unknown", + "reason": "The example does not include source bytes.", + "reasonCode": "not_bundled" + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:ffffffff-ffff-4fff-8fff-ffffffffffff" + ], + "disclosure": "private", + "extensions": {} + } + ], + "encounters": [], + "apertures": [], + "listeningPasses": [], + "claims": [], + "regions": [], + "measurements": [], + "observations": [], + "mappings": [], + "relations": [], + "policies": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000301", + "type": "masa:Policy", + "policyKind": "composite", + "issuer": "urn:uuid:00000000-0000-4000-8000-000000000101", + "status": "active", + "disclosure": "private", + "rules": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000302", + "effect": "permission", + "actions": [ + "read", + "validate" + ], + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000001" + ], + "subjects": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "authorityBasis": { + "state": "known", + "value": "Local creator declaration for this private example" + }, + "constraints": { + "network": "prohibited" + }, + "duties": [ + "Preserve provenance and unknown states" + ] + } + ], + "review": { + "contact": { + "state": "unknown", + "reason": "No external contact exists for a local fixture.", + "reasonCode": "local_fixture" + }, + "route": { + "state": "known", + "value": "Review the record with the local MASA CLI" + } + }, + "extensions": {} + } + ], + "contexts": [], + "agentRuns": [], + "capabilities": [], + "integrity": { + "state": "unknown", + "reason": "The standalone example is an account rather than a bundled byte artifact.", + "reasonCode": "not_bundled" + }, + "history": { + "mode": "embedded", + "events": [] + }, + "disclosure": "private", + "registers": [ + "digital-technical" + ], + "scales": [ + "object-event" + ], + "extensions": { + "example:roundtrip": { + "deep": { + "values": [ + "preserve", + "without-interpretation" + ] + } + } + } +} diff --git a/examples/0.2.0/invalid/derivation-cycle.masa.json b/examples/0.2.0/invalid/derivation-cycle.masa.json new file mode 100644 index 0000000..84b1339 --- /dev/null +++ b/examples/0.2.0/invalid/derivation-cycle.masa.json @@ -0,0 +1,346 @@ +{ + "$schema": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "masaVersion": "0.2.0", + "id": "urn:uuid:00000000-0000-4000-8000-000000000003", + "type": "masa:MatterRecord", + "revision": 1, + "profiles": [ + "core", + "audio", + "transformation" + ], + "createdAt": "2026-07-27T12:00:00Z", + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "title": "Lineage-preserving transformation", + "description": "A representation is registered without claiming that it is identical to a physical event or perceptual object.", + "actors": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000101", + "type": "masa:Actor", + "actorKind": "human", + "roles": [ + "record-creator" + ], + "name": { + "state": "known", + "value": "Local example author" + }, + "disclosure": "private", + "extensions": {} + } + ], + "sources": [], + "representations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000601", + "type": "masa:Representation", + "role": "source-representation", + "mediaType": "audio/wav", + "format": { + "state": "unknown", + "reason": "The example does not include source bytes.", + "reasonCode": "not_bundled" + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {}, + "audio": { + "durationSeconds": { + "state": "known", + "value": 1 + }, + "channels": { + "state": "known", + "value": 1 + }, + "sampleRateHz": { + "state": "known", + "value": 48000 + }, + "bitDepth": { + "state": "known", + "value": 24 + }, + "encoding": { + "state": "known", + "value": "PCM signed integer little-endian" + }, + "spatialFormat": { + "state": "known", + "value": "mono" + }, + "levelContext": { + "state": "unknown", + "reason": "No calibrated playback or capture level is attached to this fixture.", + "reasonCode": "not_calibrated" + } + } + }, + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000602", + "type": "masa:Representation", + "role": "derivative", + "mediaType": "audio/wav", + "format": { + "state": "known", + "value": "WAVE PCM derivative; bytes omitted from fixture" + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {}, + "audio": { + "durationSeconds": { + "state": "known", + "value": 1 + }, + "channels": { + "state": "known", + "value": 1 + }, + "sampleRateHz": { + "state": "known", + "value": 48000 + }, + "bitDepth": { + "state": "known", + "value": 24 + }, + "encoding": { + "state": "known", + "value": "PCM signed integer little-endian" + }, + "spatialFormat": { + "state": "known", + "value": "mono" + }, + "levelContext": { + "state": "unknown", + "reason": "No calibrated playback or capture level is attached to this fixture.", + "reasonCode": "not_calibrated" + } + } + } + ], + "encounters": [], + "apertures": [], + "listeningPasses": [], + "claims": [], + "regions": [], + "measurements": [], + "observations": [], + "mappings": [], + "relations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000605", + "type": "masa:Relation", + "subject": "urn:uuid:00000000-0000-4000-8000-000000000602", + "predicate": "masa:derived-from", + "object": "urn:uuid:00000000-0000-4000-8000-000000000601", + "assertedBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "createdAt": "2026-07-27T12:01:01Z", + "basis": [ + { + "ref": "urn:uuid:00000000-0000-4000-8000-000000000603", + "role": "operation" + } + ], + "operationRef": "urn:uuid:00000000-0000-4000-8000-000000000603", + "extensions": {} + }, + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000606", + "type": "masa:Relation", + "subject": "urn:uuid:00000000-0000-4000-8000-000000000601", + "predicate": "masa:derived-from", + "object": "urn:uuid:00000000-0000-4000-8000-000000000602", + "assertedBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "createdAt": "2026-07-27T12:01:01Z", + "basis": [ + { + "ref": "urn:uuid:00000000-0000-4000-8000-000000000603", + "role": "operation" + } + ], + "operationRef": "urn:uuid:00000000-0000-4000-8000-000000000603", + "extensions": {} + } + ], + "policies": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000301", + "type": "masa:Policy", + "policyKind": "composite", + "issuer": "urn:uuid:00000000-0000-4000-8000-000000000101", + "status": "active", + "disclosure": "private", + "rules": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000302", + "effect": "permission", + "actions": [ + "read", + "validate", + "transform" + ], + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000003" + ], + "subjects": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "authorityBasis": { + "state": "known", + "value": "Local creator declaration for this private example" + }, + "constraints": { + "network": "prohibited" + }, + "duties": [ + "Preserve provenance and unknown states" + ] + } + ], + "review": { + "contact": { + "state": "unknown", + "reason": "No external contact exists for a local fixture.", + "reasonCode": "local_fixture" + }, + "route": { + "state": "known", + "value": "Review the record with the local MASA CLI" + } + }, + "extensions": {} + } + ], + "contexts": [], + "agentRuns": [], + "capabilities": [], + "integrity": { + "state": "unknown", + "reason": "The standalone example is an account rather than a bundled byte artifact.", + "reasonCode": "not_bundled" + }, + "history": { + "mode": "embedded", + "events": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000603", + "type": "masa:OperationReceipt", + "recordId": "urn:uuid:00000000-0000-4000-8000-000000000003", + "sequence": 0, + "operationType": "matter.transform", + "effectClass": "transform", + "finalStatus": "completed", + "startedAt": "2026-07-27T12:01:00Z", + "endedAt": "2026-07-27T12:01:01Z", + "actors": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "inputs": [ + "urn:uuid:00000000-0000-4000-8000-000000000601" + ], + "outputs": [ + "urn:uuid:00000000-0000-4000-8000-000000000602" + ], + "tool": { + "state": "known", + "value": { + "id": "urn:uuid:00000000-0000-4000-8000-000000000604", + "name": "MASA fixture transform", + "version": { + "state": "known", + "value": "0.1.0" + }, + "kind": "script" + } + }, + "parameters": { + "operation": "gain", + "gainDb": -3, + "preservationIntent": { + "properties": [ + "duration", + "channel-layout" + ], + "verification": { + "state": "unknown", + "reason": "Derivative bytes are omitted from this structural fixture.", + "reasonCode": "not_bundled" + } + } + }, + "policyEvaluation": { + "action": "transform", + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000602" + ], + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "result": "permitted", + "evaluatedAt": "2026-07-27T12:01:00Z", + "evaluator": "urn:uuid:00000000-0000-4000-8000-000000000101", + "authorityRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000302" + ], + "reasons": [ + "The active local fixture policy explicitly permits this bounded operation." + ] + }, + "reversibility": "compensatable", + "determinism": { + "state": "deterministic" + }, + "warnings": [], + "errors": [], + "claimRefs": [], + "extensions": {} + } + ] + }, + "disclosure": "private", + "registers": [ + "digital-technical" + ], + "scales": [ + "object-event" + ], + "extensions": { + "example:roundtrip": { + "deep": { + "values": [ + "preserve", + "without-interpretation" + ] + } + } + } +} diff --git a/examples/0.2.0/invalid/duplicate-id.masa.json b/examples/0.2.0/invalid/duplicate-id.masa.json new file mode 100644 index 0000000..063b8e8 --- /dev/null +++ b/examples/0.2.0/invalid/duplicate-id.masa.json @@ -0,0 +1,146 @@ +{ + "$schema": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "masaVersion": "0.2.0", + "id": "urn:uuid:00000000-0000-4000-8000-000000000001", + "type": "masa:MatterRecord", + "revision": 1, + "profiles": [ + "core" + ], + "createdAt": "2026-07-27T12:00:00Z", + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "title": "Minimal local matter account", + "description": "A representation is registered without claiming that it is identical to a physical event or perceptual object.", + "actors": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000101", + "type": "masa:Actor", + "actorKind": "human", + "roles": [ + "record-creator" + ], + "name": { + "state": "known", + "value": "Local example author" + }, + "disclosure": "private", + "extensions": {} + } + ], + "sources": [], + "representations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000101", + "type": "masa:Representation", + "role": "source-representation", + "mediaType": "application/octet-stream", + "format": { + "state": "unknown", + "reason": "The example does not include source bytes.", + "reasonCode": "not_bundled" + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {} + } + ], + "encounters": [], + "apertures": [], + "listeningPasses": [], + "claims": [], + "regions": [], + "measurements": [], + "observations": [], + "mappings": [], + "relations": [], + "policies": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000301", + "type": "masa:Policy", + "policyKind": "composite", + "issuer": "urn:uuid:00000000-0000-4000-8000-000000000101", + "status": "active", + "disclosure": "private", + "rules": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000302", + "effect": "permission", + "actions": [ + "read", + "validate" + ], + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000001" + ], + "subjects": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "authorityBasis": { + "state": "known", + "value": "Local creator declaration for this private example" + }, + "constraints": { + "network": "prohibited" + }, + "duties": [ + "Preserve provenance and unknown states" + ] + } + ], + "review": { + "contact": { + "state": "unknown", + "reason": "No external contact exists for a local fixture.", + "reasonCode": "local_fixture" + }, + "route": { + "state": "known", + "value": "Review the record with the local MASA CLI" + } + }, + "extensions": {} + } + ], + "contexts": [], + "agentRuns": [], + "capabilities": [], + "integrity": { + "state": "unknown", + "reason": "The standalone example is an account rather than a bundled byte artifact.", + "reasonCode": "not_bundled" + }, + "history": { + "mode": "embedded", + "events": [] + }, + "disclosure": "private", + "registers": [ + "digital-technical" + ], + "scales": [ + "object-event" + ], + "extensions": { + "example:roundtrip": { + "deep": { + "values": [ + "preserve", + "without-interpretation" + ] + } + } + } +} diff --git a/examples/0.2.0/invalid/failed-operation-with-output.masa.json b/examples/0.2.0/invalid/failed-operation-with-output.masa.json new file mode 100644 index 0000000..5cf2b88 --- /dev/null +++ b/examples/0.2.0/invalid/failed-operation-with-output.masa.json @@ -0,0 +1,331 @@ +{ + "$schema": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "masaVersion": "0.2.0", + "id": "urn:uuid:00000000-0000-4000-8000-000000000003", + "type": "masa:MatterRecord", + "revision": 1, + "profiles": [ + "core", + "audio", + "transformation" + ], + "createdAt": "2026-07-27T12:00:00Z", + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "title": "Lineage-preserving transformation", + "description": "A representation is registered without claiming that it is identical to a physical event or perceptual object.", + "actors": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000101", + "type": "masa:Actor", + "actorKind": "human", + "roles": [ + "record-creator" + ], + "name": { + "state": "known", + "value": "Local example author" + }, + "disclosure": "private", + "extensions": {} + } + ], + "sources": [], + "representations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000601", + "type": "masa:Representation", + "role": "source-representation", + "mediaType": "audio/wav", + "format": { + "state": "unknown", + "reason": "The example does not include source bytes.", + "reasonCode": "not_bundled" + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {}, + "audio": { + "durationSeconds": { + "state": "known", + "value": 1 + }, + "channels": { + "state": "known", + "value": 1 + }, + "sampleRateHz": { + "state": "known", + "value": 48000 + }, + "bitDepth": { + "state": "known", + "value": 24 + }, + "encoding": { + "state": "known", + "value": "PCM signed integer little-endian" + }, + "spatialFormat": { + "state": "known", + "value": "mono" + }, + "levelContext": { + "state": "unknown", + "reason": "No calibrated playback or capture level is attached to this fixture.", + "reasonCode": "not_calibrated" + } + } + }, + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000602", + "type": "masa:Representation", + "role": "derivative", + "mediaType": "audio/wav", + "format": { + "state": "known", + "value": "WAVE PCM derivative; bytes omitted from fixture" + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {}, + "audio": { + "durationSeconds": { + "state": "known", + "value": 1 + }, + "channels": { + "state": "known", + "value": 1 + }, + "sampleRateHz": { + "state": "known", + "value": 48000 + }, + "bitDepth": { + "state": "known", + "value": 24 + }, + "encoding": { + "state": "known", + "value": "PCM signed integer little-endian" + }, + "spatialFormat": { + "state": "known", + "value": "mono" + }, + "levelContext": { + "state": "unknown", + "reason": "No calibrated playback or capture level is attached to this fixture.", + "reasonCode": "not_calibrated" + } + } + } + ], + "encounters": [], + "apertures": [], + "listeningPasses": [], + "claims": [], + "regions": [], + "measurements": [], + "observations": [], + "mappings": [], + "relations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000605", + "type": "masa:Relation", + "subject": "urn:uuid:00000000-0000-4000-8000-000000000602", + "predicate": "masa:derived-from", + "object": "urn:uuid:00000000-0000-4000-8000-000000000601", + "assertedBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "createdAt": "2026-07-27T12:01:01Z", + "basis": [ + { + "ref": "urn:uuid:00000000-0000-4000-8000-000000000603", + "role": "operation" + } + ], + "operationRef": "urn:uuid:00000000-0000-4000-8000-000000000603", + "extensions": {} + } + ], + "policies": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000301", + "type": "masa:Policy", + "policyKind": "composite", + "issuer": "urn:uuid:00000000-0000-4000-8000-000000000101", + "status": "active", + "disclosure": "private", + "rules": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000302", + "effect": "permission", + "actions": [ + "read", + "validate", + "transform" + ], + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000003" + ], + "subjects": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "authorityBasis": { + "state": "known", + "value": "Local creator declaration for this private example" + }, + "constraints": { + "network": "prohibited" + }, + "duties": [ + "Preserve provenance and unknown states" + ] + } + ], + "review": { + "contact": { + "state": "unknown", + "reason": "No external contact exists for a local fixture.", + "reasonCode": "local_fixture" + }, + "route": { + "state": "known", + "value": "Review the record with the local MASA CLI" + } + }, + "extensions": {} + } + ], + "contexts": [], + "agentRuns": [], + "capabilities": [], + "integrity": { + "state": "unknown", + "reason": "The standalone example is an account rather than a bundled byte artifact.", + "reasonCode": "not_bundled" + }, + "history": { + "mode": "embedded", + "events": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000603", + "type": "masa:OperationReceipt", + "recordId": "urn:uuid:00000000-0000-4000-8000-000000000003", + "sequence": 0, + "operationType": "matter.transform", + "effectClass": "transform", + "finalStatus": "failed", + "startedAt": "2026-07-27T12:01:00Z", + "endedAt": "2026-07-27T12:01:01Z", + "actors": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "inputs": [ + "urn:uuid:00000000-0000-4000-8000-000000000601" + ], + "outputs": [ + "urn:uuid:00000000-0000-4000-8000-000000000602" + ], + "tool": { + "state": "known", + "value": { + "id": "urn:uuid:00000000-0000-4000-8000-000000000604", + "name": "MASA fixture transform", + "version": { + "state": "known", + "value": "0.1.0" + }, + "kind": "script" + } + }, + "parameters": { + "operation": "gain", + "gainDb": -3, + "preservationIntent": { + "properties": [ + "duration", + "channel-layout" + ], + "verification": { + "state": "unknown", + "reason": "Derivative bytes are omitted from this structural fixture.", + "reasonCode": "not_bundled" + } + } + }, + "policyEvaluation": { + "action": "transform", + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000602" + ], + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "result": "permitted", + "evaluatedAt": "2026-07-27T12:01:00Z", + "evaluator": "urn:uuid:00000000-0000-4000-8000-000000000101", + "authorityRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000302" + ], + "reasons": [ + "The active local fixture policy explicitly permits this bounded operation." + ] + }, + "reversibility": "compensatable", + "determinism": { + "state": "deterministic" + }, + "warnings": [], + "errors": [ + "Fixture failure" + ], + "claimRefs": [], + "extensions": {} + } + ] + }, + "disclosure": "private", + "registers": [ + "digital-technical" + ], + "scales": [ + "object-event" + ], + "extensions": { + "example:roundtrip": { + "deep": { + "values": [ + "preserve", + "without-interpretation" + ] + } + } + } +} diff --git a/examples/0.2.0/invalid/known-null-qualified-value.masa.json b/examples/0.2.0/invalid/known-null-qualified-value.masa.json new file mode 100644 index 0000000..0801229 --- /dev/null +++ b/examples/0.2.0/invalid/known-null-qualified-value.masa.json @@ -0,0 +1,145 @@ +{ + "$schema": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "masaVersion": "0.2.0", + "id": "urn:uuid:00000000-0000-4000-8000-000000000001", + "type": "masa:MatterRecord", + "revision": 1, + "profiles": [ + "core" + ], + "createdAt": "2026-07-27T12:00:00Z", + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "title": "Minimal local matter account", + "description": "A representation is registered without claiming that it is identical to a physical event or perceptual object.", + "actors": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000101", + "type": "masa:Actor", + "actorKind": "human", + "roles": [ + "record-creator" + ], + "name": { + "state": "known", + "value": "Local example author" + }, + "disclosure": "private", + "extensions": {} + } + ], + "sources": [], + "representations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000201", + "type": "masa:Representation", + "role": "source-representation", + "mediaType": "application/octet-stream", + "format": { + "state": "known", + "value": null + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {} + } + ], + "encounters": [], + "apertures": [], + "listeningPasses": [], + "claims": [], + "regions": [], + "measurements": [], + "observations": [], + "mappings": [], + "relations": [], + "policies": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000301", + "type": "masa:Policy", + "policyKind": "composite", + "issuer": "urn:uuid:00000000-0000-4000-8000-000000000101", + "status": "active", + "disclosure": "private", + "rules": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000302", + "effect": "permission", + "actions": [ + "read", + "validate" + ], + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000001" + ], + "subjects": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "authorityBasis": { + "state": "known", + "value": "Local creator declaration for this private example" + }, + "constraints": { + "network": "prohibited" + }, + "duties": [ + "Preserve provenance and unknown states" + ] + } + ], + "review": { + "contact": { + "state": "unknown", + "reason": "No external contact exists for a local fixture.", + "reasonCode": "local_fixture" + }, + "route": { + "state": "known", + "value": "Review the record with the local MASA CLI" + } + }, + "extensions": {} + } + ], + "contexts": [], + "agentRuns": [], + "capabilities": [], + "integrity": { + "state": "unknown", + "reason": "The standalone example is an account rather than a bundled byte artifact.", + "reasonCode": "not_bundled" + }, + "history": { + "mode": "embedded", + "events": [] + }, + "disclosure": "private", + "registers": [ + "digital-technical" + ], + "scales": [ + "object-event" + ], + "extensions": { + "example:roundtrip": { + "deep": { + "values": [ + "preserve", + "without-interpretation" + ] + } + } + } +} diff --git a/examples/0.2.0/invalid/measurement-missing-unit.masa.json b/examples/0.2.0/invalid/measurement-missing-unit.masa.json new file mode 100644 index 0000000..36bdf18 --- /dev/null +++ b/examples/0.2.0/invalid/measurement-missing-unit.masa.json @@ -0,0 +1,407 @@ +{ + "$schema": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "masaVersion": "0.2.0", + "id": "urn:uuid:00000000-0000-4000-8000-000000000002", + "type": "masa:MatterRecord", + "revision": 1, + "profiles": [ + "core", + "audio", + "listening", + "analysis" + ], + "createdAt": "2026-07-27T12:00:00Z", + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "title": "Plural listening and situated analysis", + "description": "A representation is registered without claiming that it is identical to a physical event or perceptual object.", + "actors": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000101", + "type": "masa:Actor", + "actorKind": "human", + "roles": [ + "record-creator" + ], + "name": { + "state": "known", + "value": "Local example author" + }, + "disclosure": "private", + "extensions": {} + } + ], + "sources": [], + "representations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000201", + "type": "masa:Representation", + "role": "source-representation", + "mediaType": "audio/wav", + "format": { + "state": "unknown", + "reason": "The example does not include source bytes.", + "reasonCode": "not_bundled" + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {}, + "audio": { + "durationSeconds": { + "state": "known", + "value": 1 + }, + "channels": { + "state": "known", + "value": 1 + }, + "sampleRateHz": { + "state": "known", + "value": 48000 + }, + "bitDepth": { + "state": "known", + "value": 24 + }, + "encoding": { + "state": "known", + "value": "PCM signed integer little-endian" + }, + "spatialFormat": { + "state": "known", + "value": "mono" + }, + "levelContext": { + "state": "unknown", + "reason": "No calibrated playback or capture level is attached to this fixture.", + "reasonCode": "not_calibrated" + } + } + } + ], + "encounters": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000501", + "type": "masa:Encounter", + "occurredAt": "2026-07-27T12:02:00Z", + "actors": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "question": "How does the short event hold together across focal and global attention?", + "position": { + "state": "known", + "value": "Headphones, seated, local studio; playback level not calibrated" + }, + "accessConditions": [ + "One-channel unavailable source is represented by fixture metadata only" + ], + "contextRefs": [], + "extensions": {} + } + ], + "apertures": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000502", + "type": "masa:Aperture", + "description": "Full-band one-second aperture without preprocessing", + "channels": [ + "mono" + ], + "ranges": [ + { + "kind": "spectral", + "unit": "Hz", + "start": 20, + "end": 20000 + } + ], + "windows": [ + { + "kind": "temporal", + "unit": "s", + "start": 0, + "end": 1 + } + ], + "thresholds": [], + "preprocessing": [], + "exclusions": [], + "blindSpots": [ + "Unavailable source bytes prevent independent replay" + ], + "extensions": {} + } + ], + "listeningPasses": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000505", + "type": "masa:ListeningPass", + "actors": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "representations": [ + "urn:uuid:00000000-0000-4000-8000-000000000201" + ], + "encounterRef": "urn:uuid:00000000-0000-4000-8000-000000000501", + "apertureRef": "urn:uuid:00000000-0000-4000-8000-000000000502", + "modes": [ + "focal", + "material" + ], + "createdAt": "2026-07-27T12:03:00Z", + "outcome": "claims", + "claimRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000503" + ], + "disclosure": "private", + "extensions": {} + }, + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000506", + "type": "masa:ListeningPass", + "actors": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "representations": [ + "urn:uuid:00000000-0000-4000-8000-000000000201" + ], + "encounterRef": "urn:uuid:00000000-0000-4000-8000-000000000501", + "apertureRef": "urn:uuid:00000000-0000-4000-8000-000000000502", + "modes": [ + "global", + "material" + ], + "createdAt": "2026-07-27T12:04:00Z", + "outcome": "claims", + "claimRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000504" + ], + "disclosure": "private", + "extensions": {} + } + ], + "claims": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000503", + "type": "masa:Claim", + "kind": "heard", + "about": [ + "urn:uuid:00000000-0000-4000-8000-000000000201" + ], + "basis": [ + { + "ref": "urn:uuid:00000000-0000-4000-8000-000000000201", + "role": "representation" + } + ], + "actor": "urn:uuid:00000000-0000-4000-8000-000000000101", + "createdAt": "2026-07-27T12:03:00Z", + "content": "The event was registered as one compact gesture.", + "method": { + "name": "focal listening pass", + "version": { + "state": "known", + "value": "1.0.0" + }, + "parameters": {} + }, + "listeningPassRef": "urn:uuid:00000000-0000-4000-8000-000000000505", + "confidence": { + "status": "not_assessed" + }, + "uncertainty": [ + "Playback level was not calibrated" + ], + "alternativeClaimRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000504" + ], + "disclosure": "private", + "extensions": {} + }, + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000504", + "type": "masa:Claim", + "kind": "heard", + "about": [ + "urn:uuid:00000000-0000-4000-8000-000000000201" + ], + "basis": [ + { + "ref": "urn:uuid:00000000-0000-4000-8000-000000000201", + "role": "representation" + } + ], + "actor": "urn:uuid:00000000-0000-4000-8000-000000000101", + "createdAt": "2026-07-27T12:04:00Z", + "content": "A second pass registered two successive material articulations rather than one gesture.", + "method": { + "name": "global re-listening pass", + "version": { + "state": "known", + "value": "1.0.0" + }, + "parameters": {} + }, + "listeningPassRef": "urn:uuid:00000000-0000-4000-8000-000000000506", + "confidence": { + "status": "not_assessed" + }, + "uncertainty": [ + "The two accounts remain intentionally unresolved" + ], + "alternativeClaimRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000503" + ], + "disclosure": "private", + "extensions": {} + } + ], + "regions": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000507", + "type": "masa:Region", + "representationRef": "urn:uuid:00000000-0000-4000-8000-000000000201", + "basis": "temporal", + "bounds": { + "unit": "s", + "start": 0, + "end": 1 + }, + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "createdAt": "2026-07-27T12:05:00Z", + "method": { + "name": "fixture interval declaration", + "version": { + "state": "known", + "value": "1.0.0" + }, + "parameters": {} + }, + "uncertainty": [ + "Region follows metadata duration because bytes are unavailable" + ], + "extensions": {} + } + ], + "measurements": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000508", + "type": "masa:Measurement", + "about": "urn:uuid:00000000-0000-4000-8000-000000000201", + "metric": "declared duration", + "value": 1, + "method": { + "name": "metadata declaration", + "version": { + "state": "known", + "value": "1.0.0" + }, + "parameters": {} + }, + "window": { + "kind": "temporal", + "unit": "s", + "start": 0, + "end": 1 + }, + "actor": "urn:uuid:00000000-0000-4000-8000-000000000101", + "createdAt": "2026-07-27T12:05:00Z", + "uncertainty": [ + "Not remeasured from bytes" + ], + "extensions": {} + } + ], + "observations": [], + "mappings": [], + "relations": [], + "policies": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000301", + "type": "masa:Policy", + "policyKind": "composite", + "issuer": "urn:uuid:00000000-0000-4000-8000-000000000101", + "status": "active", + "disclosure": "private", + "rules": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000302", + "effect": "permission", + "actions": [ + "read", + "validate" + ], + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000002" + ], + "subjects": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "authorityBasis": { + "state": "known", + "value": "Local creator declaration for this private example" + }, + "constraints": { + "network": "prohibited" + }, + "duties": [ + "Preserve provenance and unknown states" + ] + } + ], + "review": { + "contact": { + "state": "unknown", + "reason": "No external contact exists for a local fixture.", + "reasonCode": "local_fixture" + }, + "route": { + "state": "known", + "value": "Review the record with the local MASA CLI" + } + }, + "extensions": {} + } + ], + "contexts": [], + "agentRuns": [], + "capabilities": [], + "integrity": { + "state": "unknown", + "reason": "The standalone example is an account rather than a bundled byte artifact.", + "reasonCode": "not_bundled" + }, + "history": { + "mode": "embedded", + "events": [] + }, + "disclosure": "private", + "registers": [ + "digital-technical" + ], + "scales": [ + "object-event" + ], + "extensions": { + "example:roundtrip": { + "deep": { + "values": [ + "preserve", + "without-interpretation" + ] + } + } + } +} diff --git a/examples/0.2.0/invalid/observation-profile-missing-metadata.masa.json b/examples/0.2.0/invalid/observation-profile-missing-metadata.masa.json new file mode 100644 index 0000000..85490ed --- /dev/null +++ b/examples/0.2.0/invalid/observation-profile-missing-metadata.masa.json @@ -0,0 +1,337 @@ +{ + "$schema": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "masaVersion": "0.2.0", + "id": "urn:uuid:00000000-0000-4000-8000-000000000005", + "type": "masa:MatterRecord", + "revision": 1, + "profiles": [ + "core", + "observation", + "mapping" + ], + "createdAt": "2026-07-27T12:00:00Z", + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "title": "Stale observation skipped explicitly", + "description": "A representation is registered without claiming that it is identical to a physical event or perceptual object.", + "actors": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000101", + "type": "masa:Actor", + "actorKind": "human", + "roles": [ + "record-creator" + ], + "name": { + "state": "known", + "value": "Local example author" + }, + "disclosure": "private", + "extensions": {} + } + ], + "sources": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000801", + "type": "masa:Source", + "sourceKind": "astronomical-api-field", + "identification": { + "state": "known", + "value": "Example solar activity index" + }, + "locator": { + "state": "known", + "value": "https://example.invalid/observations/solar-index" + }, + "authority": { + "state": "unknown", + "reason": "Fixture does not assert institutional authority.", + "reasonCode": "fixture_only" + }, + "rights": { + "state": "unknown", + "reason": "Provider terms were not retrieved for this offline fixture.", + "reasonCode": "not_retrieved" + }, + "coverage": { + "state": "known", + "value": { + "scope": "demonstration only" + } + }, + "health": { + "status": "degraded", + "checkedAt": "2026-07-27T11:00:00Z", + "reason": "Fixture marks the feed stale" + }, + "freshness": { + "status": "stale", + "observedAt": "2026-07-26T11:00:00Z", + "ageSeconds": 90000 + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {} + } + ], + "representations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000201", + "type": "masa:Representation", + "role": "source-representation", + "mediaType": "application/octet-stream", + "format": { + "state": "unknown", + "reason": "The example does not include source bytes.", + "reasonCode": "not_bundled" + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {} + } + ], + "encounters": [], + "apertures": [], + "listeningPasses": [], + "claims": [], + "regions": [], + "measurements": [], + "observations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000802", + "type": "masa:Observation", + "sourceRef": "urn:uuid:00000000-0000-4000-8000-000000000801", + "field": "solar_activity_index", + "observedAt": "2026-07-26T11:00:00Z", + "scope": { + "state": "known", + "value": "Example interval" + }, + "value": { + "state": "known", + "value": 72.4 + }, + "unit": { + "state": "known", + "value": "index-point" + }, + "method": { + "name": "offline fixture observation", + "version": { + "state": "known", + "value": "1.0.0" + }, + "parameters": {} + }, + "health": { + "status": "degraded", + "checkedAt": "2026-07-27T11:00:00Z", + "reason": "Fixture marks the feed stale" + }, + "freshness": { + "status": "stale", + "observedAt": "2026-07-26T11:00:00Z", + "ageSeconds": 90000 + }, + "temporalCharacter": "aggregate", + "signalKind": "observation", + "disclosure": "private", + "extensions": {} + } + ], + "mappings": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000803", + "type": "masa:Mapping", + "sourceObservationRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000802" + ], + "sourceField": "solar_activity_index", + "sourceUnit": "index-point", + "inputRange": [ + 0, + 100 + ], + "normalization": { + "method": "linear", + "clipping": "clamp", + "parameters": {} + }, + "target": "synth.filter.cutoff", + "outputRange": [ + 120, + 7200 + ], + "curve": "exponential", + "smoothingMs": 200, + "cadence": "once per accepted observation", + "missingData": "skip", + "epistemicNote": "This authored mapping does not make the synthesized result the source's voice.", + "actors": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "createdAt": "2026-07-27T12:06:00Z", + "extensions": { + "example:control": { + "parameter": "filter.cutoff" + } + } + } + ], + "relations": [], + "policies": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000301", + "type": "masa:Policy", + "policyKind": "composite", + "issuer": "urn:uuid:00000000-0000-4000-8000-000000000101", + "status": "active", + "disclosure": "private", + "rules": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000302", + "effect": "permission", + "actions": [ + "read", + "validate", + "map" + ], + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000005" + ], + "subjects": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "authorityBasis": { + "state": "known", + "value": "Local creator declaration for this private example" + }, + "constraints": { + "network": "prohibited" + }, + "duties": [ + "Preserve provenance and unknown states" + ] + } + ], + "review": { + "contact": { + "state": "unknown", + "reason": "No external contact exists for a local fixture.", + "reasonCode": "local_fixture" + }, + "route": { + "state": "known", + "value": "Review the record with the local MASA CLI" + } + }, + "extensions": {} + } + ], + "contexts": [], + "agentRuns": [], + "capabilities": [], + "integrity": { + "state": "unknown", + "reason": "The standalone example is an account rather than a bundled byte artifact.", + "reasonCode": "not_bundled" + }, + "history": { + "mode": "embedded", + "events": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000804", + "type": "masa:OperationReceipt", + "recordId": "urn:uuid:00000000-0000-4000-8000-000000000005", + "sequence": 0, + "operationType": "matter.map", + "effectClass": "map", + "finalStatus": "not_performed", + "startedAt": "2026-07-27T12:01:00Z", + "endedAt": "2026-07-27T12:01:01Z", + "actors": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "inputs": [ + "urn:uuid:00000000-0000-4000-8000-000000000802" + ], + "outputs": [], + "tool": { + "state": "known", + "value": { + "id": "urn:uuid:00000000-0000-4000-8000-000000000805", + "name": "Generic mapping adapter fixture", + "version": { + "state": "known", + "value": "0.1.0" + }, + "kind": "software" + } + }, + "parameters": { + "reason": "stale input", + "missingData": "skip" + }, + "policyEvaluation": { + "action": "map", + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000803" + ], + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "result": "permitted", + "evaluatedAt": "2026-07-27T12:01:00Z", + "evaluator": "urn:uuid:00000000-0000-4000-8000-000000000101", + "authorityRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000302" + ], + "reasons": [ + "The active local fixture policy explicitly permits this bounded operation." + ] + }, + "reversibility": "undetermined", + "determinism": { + "state": "deterministic" + }, + "warnings": [ + "Stale observation was not converted into a control value" + ], + "errors": [], + "claimRefs": [], + "extensions": {} + } + ] + }, + "disclosure": "private", + "registers": [ + "digital-technical" + ], + "scales": [ + "object-event" + ], + "extensions": { + "example:roundtrip": { + "deep": { + "values": [ + "preserve", + "without-interpretation" + ] + } + } + } +} diff --git a/examples/0.2.0/invalid/processing-missing-parent-relation.masa.json b/examples/0.2.0/invalid/processing-missing-parent-relation.masa.json new file mode 100644 index 0000000..19cae35 --- /dev/null +++ b/examples/0.2.0/invalid/processing-missing-parent-relation.masa.json @@ -0,0 +1,347 @@ +{ + "$schema": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "masaVersion": "0.2.0", + "id": "urn:uuid:00000000-0000-4000-8000-000000000009", + "type": "masa:MatterRecord", + "revision": 1, + "profiles": [ + "core", + "audio", + "processing" + ], + "createdAt": "2026-07-27T12:00:00Z", + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "title": "Granulated texture with an accounted grain scheme", + "description": "A representation is registered without claiming that it is identical to a physical event or perceptual object.", + "actors": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000101", + "type": "masa:Actor", + "actorKind": "human", + "roles": [ + "record-creator" + ], + "name": { + "state": "known", + "value": "Local example author" + }, + "disclosure": "private", + "extensions": {} + } + ], + "sources": [], + "representations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000d01", + "type": "masa:Representation", + "role": "source-representation", + "mediaType": "audio/wav", + "format": { + "state": "unknown", + "reason": "The example does not include source bytes.", + "reasonCode": "not_bundled" + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {}, + "audio": { + "durationSeconds": { + "state": "known", + "value": 1 + }, + "channels": { + "state": "known", + "value": 1 + }, + "sampleRateHz": { + "state": "known", + "value": 48000 + }, + "bitDepth": { + "state": "known", + "value": 24 + }, + "encoding": { + "state": "known", + "value": "PCM signed integer little-endian" + }, + "spatialFormat": { + "state": "known", + "value": "mono" + }, + "levelContext": { + "state": "unknown", + "reason": "No calibrated playback or capture level is attached to this fixture.", + "reasonCode": "not_calibrated" + } + } + }, + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000d02", + "type": "masa:Representation", + "role": "render", + "mediaType": "audio/wav", + "format": { + "state": "known", + "value": "WAVE PCM granular texture; bytes omitted from fixture" + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {}, + "audio": { + "durationSeconds": { + "state": "known", + "value": 1 + }, + "channels": { + "state": "known", + "value": 1 + }, + "sampleRateHz": { + "state": "known", + "value": 48000 + }, + "bitDepth": { + "state": "known", + "value": 24 + }, + "encoding": { + "state": "known", + "value": "PCM signed integer little-endian" + }, + "spatialFormat": { + "state": "known", + "value": "mono" + }, + "levelContext": { + "state": "unknown", + "reason": "No calibrated playback or capture level is attached to this fixture.", + "reasonCode": "not_calibrated" + } + } + } + ], + "encounters": [], + "apertures": [], + "listeningPasses": [], + "claims": [], + "regions": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000d05", + "type": "masa:Region", + "representationRef": "urn:uuid:00000000-0000-4000-8000-000000000d01", + "basis": "temporal", + "bounds": { + "unit": "s", + "start": 0.25, + "end": 0.75 + }, + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "createdAt": "2026-08-07T12:00:00Z", + "method": { + "name": "fixture interval declaration", + "version": { + "state": "known", + "value": "1.0.0" + }, + "parameters": {} + }, + "uncertainty": [ + "Selection interval follows metadata duration because bytes are unavailable" + ], + "extensions": {} + } + ], + "measurements": [], + "observations": [], + "mappings": [], + "relations": [], + "policies": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000301", + "type": "masa:Policy", + "policyKind": "composite", + "issuer": "urn:uuid:00000000-0000-4000-8000-000000000101", + "status": "active", + "disclosure": "private", + "rules": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000302", + "effect": "permission", + "actions": [ + "read", + "validate", + "granulate" + ], + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000009" + ], + "subjects": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "authorityBasis": { + "state": "known", + "value": "Local creator declaration for this private example" + }, + "constraints": { + "network": "prohibited" + }, + "duties": [ + "Preserve provenance and unknown states" + ] + } + ], + "review": { + "contact": { + "state": "unknown", + "reason": "No external contact exists for a local fixture.", + "reasonCode": "local_fixture" + }, + "route": { + "state": "known", + "value": "Review the record with the local MASA CLI" + } + }, + "extensions": {} + } + ], + "contexts": [], + "agentRuns": [], + "capabilities": [], + "integrity": { + "state": "unknown", + "reason": "The standalone example is an account rather than a bundled byte artifact.", + "reasonCode": "not_bundled" + }, + "history": { + "mode": "embedded", + "events": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000d03", + "type": "masa:OperationReceipt", + "recordId": "urn:uuid:00000000-0000-4000-8000-000000000009", + "sequence": 0, + "operationType": "matter.granulate", + "effectClass": "derive", + "finalStatus": "completed", + "startedAt": "2026-07-27T12:01:00Z", + "endedAt": "2026-07-27T12:01:01Z", + "actors": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "inputs": [ + "urn:uuid:00000000-0000-4000-8000-000000000d01" + ], + "outputs": [ + "urn:uuid:00000000-0000-4000-8000-000000000d02" + ], + "tool": { + "state": "known", + "value": { + "id": "urn:uuid:00000000-0000-4000-8000-000000000d04", + "name": "Granular engine fixture", + "version": { + "state": "known", + "value": "0.1.0" + }, + "kind": "software" + } + }, + "parameters": { + "grain": { + "durationMs": { + "min": 5, + "max": 80 + }, + "envelope": "expodec", + "pitchScatterCents": 35 + }, + "emission": { + "mode": "asynchronous", + "grainsPerSecond": 240, + "totalGrains": 4800 + }, + "selection": { + "order": "statistical", + "regionRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000d05" + ] + }, + "output": { + "kind": "texture" + } + }, + "policyEvaluation": { + "action": "granulate", + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000d02" + ], + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "result": "permitted", + "evaluatedAt": "2026-07-27T12:01:00Z", + "evaluator": "urn:uuid:00000000-0000-4000-8000-000000000101", + "authorityRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000302" + ], + "reasons": [ + "The active local fixture policy explicitly permits this bounded operation." + ] + }, + "reversibility": "irreversible", + "determinism": { + "state": "seeded", + "seed": 20260807 + }, + "warnings": [], + "errors": [], + "claimRefs": [], + "extensions": {} + } + ] + }, + "disclosure": "private", + "registers": [ + "digital-technical" + ], + "scales": [ + "object-event" + ], + "extensions": { + "example:roundtrip": { + "deep": { + "values": [ + "preserve", + "without-interpretation" + ] + } + } + } +} diff --git a/examples/0.2.0/invalid/profile-mismatch.masa.json b/examples/0.2.0/invalid/profile-mismatch.masa.json new file mode 100644 index 0000000..89531fe --- /dev/null +++ b/examples/0.2.0/invalid/profile-mismatch.masa.json @@ -0,0 +1,147 @@ +{ + "$schema": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "masaVersion": "0.2.0", + "id": "urn:uuid:00000000-0000-4000-8000-000000000001", + "type": "masa:MatterRecord", + "revision": 1, + "profiles": [ + "core", + "audio" + ], + "createdAt": "2026-07-27T12:00:00Z", + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "title": "Minimal local matter account", + "description": "A representation is registered without claiming that it is identical to a physical event or perceptual object.", + "actors": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000101", + "type": "masa:Actor", + "actorKind": "human", + "roles": [ + "record-creator" + ], + "name": { + "state": "known", + "value": "Local example author" + }, + "disclosure": "private", + "extensions": {} + } + ], + "sources": [], + "representations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000201", + "type": "masa:Representation", + "role": "source-representation", + "mediaType": "application/octet-stream", + "format": { + "state": "unknown", + "reason": "The example does not include source bytes.", + "reasonCode": "not_bundled" + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {} + } + ], + "encounters": [], + "apertures": [], + "listeningPasses": [], + "claims": [], + "regions": [], + "measurements": [], + "observations": [], + "mappings": [], + "relations": [], + "policies": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000301", + "type": "masa:Policy", + "policyKind": "composite", + "issuer": "urn:uuid:00000000-0000-4000-8000-000000000101", + "status": "active", + "disclosure": "private", + "rules": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000302", + "effect": "permission", + "actions": [ + "read", + "validate" + ], + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000001" + ], + "subjects": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "authorityBasis": { + "state": "known", + "value": "Local creator declaration for this private example" + }, + "constraints": { + "network": "prohibited" + }, + "duties": [ + "Preserve provenance and unknown states" + ] + } + ], + "review": { + "contact": { + "state": "unknown", + "reason": "No external contact exists for a local fixture.", + "reasonCode": "local_fixture" + }, + "route": { + "state": "known", + "value": "Review the record with the local MASA CLI" + } + }, + "extensions": {} + } + ], + "contexts": [], + "agentRuns": [], + "capabilities": [], + "integrity": { + "state": "unknown", + "reason": "The standalone example is an account rather than a bundled byte artifact.", + "reasonCode": "not_bundled" + }, + "history": { + "mode": "embedded", + "events": [] + }, + "disclosure": "private", + "registers": [ + "digital-technical" + ], + "scales": [ + "object-event" + ], + "extensions": { + "example:roundtrip": { + "deep": { + "values": [ + "preserve", + "without-interpretation" + ] + } + } + } +} diff --git a/examples/0.2.0/invalid/public-local-path.masa.json b/examples/0.2.0/invalid/public-local-path.masa.json new file mode 100644 index 0000000..65dd6e2 --- /dev/null +++ b/examples/0.2.0/invalid/public-local-path.masa.json @@ -0,0 +1,248 @@ +{ + "$schema": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "masaVersion": "0.2.0", + "id": "urn:uuid:00000000-0000-4000-8000-000000000007", + "type": "masa:MatterRecord", + "revision": 1, + "profiles": [ + "core", + "publication" + ], + "createdAt": "2026-07-27T12:00:00Z", + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "title": "Public-safe MASA projection", + "description": "A deliberately minimal public derivative with no private media, local paths, or unknown extensions.", + "actors": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000101", + "type": "masa:Actor", + "actorKind": "human", + "roles": [ + "record-creator" + ], + "name": { + "state": "known", + "value": "MASA example author" + }, + "disclosure": "public", + "extensions": {} + } + ], + "sources": [], + "representations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000201", + "type": "masa:Representation", + "role": "preview", + "mediaType": "application/json", + "format": { + "state": "unknown", + "reason": "The example does not include source bytes.", + "reasonCode": "not_bundled" + }, + "availability": "available", + "locator": { + "state": "known", + "value": "/Users/example/private/audio.wav" + }, + "integrity": { + "state": "known", + "value": { + "algorithm": "sha-256", + "digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "byteLength": 0, + "status": "unverified" + } + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "public", + "extensions": {} + } + ], + "encounters": [], + "apertures": [], + "listeningPasses": [], + "claims": [], + "regions": [], + "measurements": [], + "observations": [], + "mappings": [], + "relations": [], + "policies": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000301", + "type": "masa:Policy", + "policyKind": "publication", + "issuer": "urn:uuid:00000000-0000-4000-8000-000000000101", + "status": "active", + "disclosure": "public", + "rules": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000302", + "effect": "permission", + "actions": [ + "read", + "publish" + ], + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000007" + ], + "subjects": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "authorityBasis": { + "state": "known", + "value": "Fixture author approval for this exact public projection" + }, + "constraints": { + "network": "prohibited" + }, + "duties": [ + "Preserve provenance and unknown states" + ] + } + ], + "review": { + "contact": { + "state": "unknown", + "reason": "No external contact exists for a local fixture.", + "reasonCode": "local_fixture" + }, + "route": { + "state": "known", + "value": "Review the record with the local MASA CLI" + } + }, + "extensions": {} + } + ], + "contexts": [], + "agentRuns": [], + "capabilities": [], + "integrity": { + "state": "unknown", + "reason": "The standalone example is an account rather than a bundled byte artifact.", + "reasonCode": "not_bundled" + }, + "history": { + "mode": "embedded", + "events": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000a01", + "type": "masa:OperationReceipt", + "recordId": "urn:uuid:00000000-0000-4000-8000-000000000007", + "sequence": 0, + "operationType": "matter.publish", + "effectClass": "publish", + "finalStatus": "completed", + "startedAt": "2026-07-27T12:01:00Z", + "endedAt": "2026-07-27T12:01:01Z", + "actors": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "inputs": [], + "outputs": [ + "urn:uuid:00000000-0000-4000-8000-000000000007" + ], + "tool": { + "state": "known", + "value": { + "id": "urn:uuid:00000000-0000-4000-8000-000000000a02", + "name": "Human-reviewed public fixture", + "version": { + "state": "known", + "value": "0.1.0" + }, + "kind": "human-procedure" + } + }, + "parameters": { + "projection": "allowlist", + "assetsIncluded": false + }, + "policyEvaluation": { + "action": "publish", + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000007" + ], + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "result": "permitted", + "evaluatedAt": "2026-07-27T12:01:00Z", + "evaluator": "urn:uuid:00000000-0000-4000-8000-000000000101", + "authorityRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000302" + ], + "reasons": [ + "The active local fixture policy explicitly permits this bounded operation." + ] + }, + "reversibility": "irreversible", + "determinism": { + "state": "deterministic" + }, + "warnings": [], + "errors": [], + "claimRefs": [], + "extensions": {} + } + ] + }, + "disclosure": "public", + "registers": [ + "digital-technical" + ], + "scales": [ + "object-event" + ], + "extensions": {}, + "publication": { + "publicRecordId": "urn:uuid:00000000-0000-4000-8000-000000000007", + "approvedAt": "2026-07-27T12:10:00Z", + "approvedBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "policyEvaluation": { + "action": "publish", + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000007" + ], + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "result": "permitted", + "evaluatedAt": "2026-07-27T12:01:00Z", + "evaluator": "urn:uuid:00000000-0000-4000-8000-000000000101", + "authorityRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000302" + ], + "reasons": [ + "The active local fixture policy explicitly permits this bounded operation." + ] + }, + "omissions": [ + { + "pointer": "/extensions/example:roundtrip", + "category": "unknown-extension", + "reason": "Not approved for public export" + } + ], + "redactions": [], + "attribution": { + "state": "known", + "value": "MASA protocol example" + }, + "license": { + "state": "known", + "value": "MIT for protocol fixture metadata; no media is included" + }, + "retention": { + "state": "known", + "value": "Retain while protocol 0.2.0 remains supported" + }, + "correctionUrl": "https://masa.sonicfield.org/corrections", + "revocationUrl": "https://masa.sonicfield.org/revocations", + "approvedExtensionNamespaces": [] + } +} diff --git a/examples/0.2.0/invalid/public-private-actor.masa.json b/examples/0.2.0/invalid/public-private-actor.masa.json new file mode 100644 index 0000000..4060663 --- /dev/null +++ b/examples/0.2.0/invalid/public-private-actor.masa.json @@ -0,0 +1,248 @@ +{ + "$schema": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "masaVersion": "0.2.0", + "id": "urn:uuid:00000000-0000-4000-8000-000000000007", + "type": "masa:MatterRecord", + "revision": 1, + "profiles": [ + "core", + "publication" + ], + "createdAt": "2026-07-27T12:00:00Z", + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "title": "Public-safe MASA projection", + "description": "A deliberately minimal public derivative with no private media, local paths, or unknown extensions.", + "actors": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000101", + "type": "masa:Actor", + "actorKind": "human", + "roles": [ + "record-creator" + ], + "name": { + "state": "known", + "value": "MASA example author" + }, + "disclosure": "private", + "extensions": {} + } + ], + "sources": [], + "representations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000201", + "type": "masa:Representation", + "role": "preview", + "mediaType": "application/json", + "format": { + "state": "unknown", + "reason": "The example does not include source bytes.", + "reasonCode": "not_bundled" + }, + "availability": "available", + "locator": { + "state": "known", + "value": "https://masa.sonicfield.org/examples/public-safe.json" + }, + "integrity": { + "state": "known", + "value": { + "algorithm": "sha-256", + "digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "byteLength": 0, + "status": "unverified" + } + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "public", + "extensions": {} + } + ], + "encounters": [], + "apertures": [], + "listeningPasses": [], + "claims": [], + "regions": [], + "measurements": [], + "observations": [], + "mappings": [], + "relations": [], + "policies": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000301", + "type": "masa:Policy", + "policyKind": "publication", + "issuer": "urn:uuid:00000000-0000-4000-8000-000000000101", + "status": "active", + "disclosure": "public", + "rules": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000302", + "effect": "permission", + "actions": [ + "read", + "publish" + ], + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000007" + ], + "subjects": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "authorityBasis": { + "state": "known", + "value": "Fixture author approval for this exact public projection" + }, + "constraints": { + "network": "prohibited" + }, + "duties": [ + "Preserve provenance and unknown states" + ] + } + ], + "review": { + "contact": { + "state": "unknown", + "reason": "No external contact exists for a local fixture.", + "reasonCode": "local_fixture" + }, + "route": { + "state": "known", + "value": "Review the record with the local MASA CLI" + } + }, + "extensions": {} + } + ], + "contexts": [], + "agentRuns": [], + "capabilities": [], + "integrity": { + "state": "unknown", + "reason": "The standalone example is an account rather than a bundled byte artifact.", + "reasonCode": "not_bundled" + }, + "history": { + "mode": "embedded", + "events": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000a01", + "type": "masa:OperationReceipt", + "recordId": "urn:uuid:00000000-0000-4000-8000-000000000007", + "sequence": 0, + "operationType": "matter.publish", + "effectClass": "publish", + "finalStatus": "completed", + "startedAt": "2026-07-27T12:01:00Z", + "endedAt": "2026-07-27T12:01:01Z", + "actors": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "inputs": [], + "outputs": [ + "urn:uuid:00000000-0000-4000-8000-000000000007" + ], + "tool": { + "state": "known", + "value": { + "id": "urn:uuid:00000000-0000-4000-8000-000000000a02", + "name": "Human-reviewed public fixture", + "version": { + "state": "known", + "value": "0.1.0" + }, + "kind": "human-procedure" + } + }, + "parameters": { + "projection": "allowlist", + "assetsIncluded": false + }, + "policyEvaluation": { + "action": "publish", + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000007" + ], + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "result": "permitted", + "evaluatedAt": "2026-07-27T12:01:00Z", + "evaluator": "urn:uuid:00000000-0000-4000-8000-000000000101", + "authorityRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000302" + ], + "reasons": [ + "The active local fixture policy explicitly permits this bounded operation." + ] + }, + "reversibility": "irreversible", + "determinism": { + "state": "deterministic" + }, + "warnings": [], + "errors": [], + "claimRefs": [], + "extensions": {} + } + ] + }, + "disclosure": "public", + "registers": [ + "digital-technical" + ], + "scales": [ + "object-event" + ], + "extensions": {}, + "publication": { + "publicRecordId": "urn:uuid:00000000-0000-4000-8000-000000000007", + "approvedAt": "2026-07-27T12:10:00Z", + "approvedBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "policyEvaluation": { + "action": "publish", + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000007" + ], + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "result": "permitted", + "evaluatedAt": "2026-07-27T12:01:00Z", + "evaluator": "urn:uuid:00000000-0000-4000-8000-000000000101", + "authorityRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000302" + ], + "reasons": [ + "The active local fixture policy explicitly permits this bounded operation." + ] + }, + "omissions": [ + { + "pointer": "/extensions/example:roundtrip", + "category": "unknown-extension", + "reason": "Not approved for public export" + } + ], + "redactions": [], + "attribution": { + "state": "known", + "value": "MASA protocol example" + }, + "license": { + "state": "known", + "value": "MIT for protocol fixture metadata; no media is included" + }, + "retention": { + "state": "known", + "value": "Retain while protocol 0.2.0 remains supported" + }, + "correctionUrl": "https://masa.sonicfield.org/corrections", + "revocationUrl": "https://masa.sonicfield.org/revocations", + "approvedExtensionNamespaces": [] + } +} diff --git a/examples/0.2.0/valid/agent.masa.json b/examples/0.2.0/valid/agent.masa.json new file mode 100644 index 0000000..b471553 --- /dev/null +++ b/examples/0.2.0/valid/agent.masa.json @@ -0,0 +1,324 @@ +{ + "$schema": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "masaVersion": "0.2.0", + "id": "urn:uuid:00000000-0000-4000-8000-000000000006", + "type": "masa:MatterRecord", + "revision": 1, + "profiles": [ + "core", + "agent" + ], + "createdAt": "2026-07-27T12:00:00Z", + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "title": "Bounded local agent inspection", + "description": "A representation is registered without claiming that it is identical to a physical event or perceptual object.", + "actors": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000101", + "type": "masa:Actor", + "actorKind": "human", + "roles": [ + "record-creator" + ], + "name": { + "state": "known", + "value": "Local example author" + }, + "disclosure": "private", + "extensions": {} + }, + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000901", + "type": "masa:Actor", + "actorKind": "agent", + "roles": [ + "validator" + ], + "name": { + "state": "known", + "value": "Local MASA fixture agent" + }, + "authorityRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000302" + ], + "disclosure": "private", + "extensions": {} + } + ], + "sources": [], + "representations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000201", + "type": "masa:Representation", + "role": "source-representation", + "mediaType": "application/octet-stream", + "format": { + "state": "unknown", + "reason": "The example does not include source bytes.", + "reasonCode": "not_bundled" + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {} + } + ], + "encounters": [], + "apertures": [], + "listeningPasses": [], + "claims": [], + "regions": [], + "measurements": [], + "observations": [], + "mappings": [], + "relations": [], + "policies": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000301", + "type": "masa:Policy", + "policyKind": "composite", + "issuer": "urn:uuid:00000000-0000-4000-8000-000000000101", + "status": "active", + "disclosure": "private", + "rules": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000302", + "effect": "permission", + "actions": [ + "read", + "validate" + ], + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000006" + ], + "subjects": [ + "urn:uuid:00000000-0000-4000-8000-000000000101", + "urn:uuid:00000000-0000-4000-8000-000000000901" + ], + "authorityBasis": { + "state": "known", + "value": "Local creator declaration for this private example" + }, + "constraints": { + "network": "prohibited" + }, + "duties": [ + "Preserve provenance and unknown states" + ] + } + ], + "review": { + "contact": { + "state": "unknown", + "reason": "No external contact exists for a local fixture.", + "reasonCode": "local_fixture" + }, + "route": { + "state": "known", + "value": "Review the record with the local MASA CLI" + } + }, + "extensions": {} + } + ], + "contexts": [], + "agentRuns": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000902", + "type": "masa:AgentRun", + "actorRef": "urn:uuid:00000000-0000-4000-8000-000000000901", + "plan": [ + "Validate the local record", + "Stop without modifying it" + ], + "capabilityRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000905" + ], + "memoryRefs": [], + "authorityRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000302" + ], + "budget": { + "maxOperations": 1, + "network": false + }, + "stopConditions": [ + "Stop after validation", + "Refuse any requested external action" + ], + "operationRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000903" + ], + "review": { + "state": "known", + "value": "Fixture reviewed by its local author" + }, + "outcome": "completed", + "extensions": {} + } + ], + "capabilities": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000905", + "type": "masa:Capability", + "name": "matter.validate", + "purpose": "Validate one record inside a host-configured local root without writing or using the network.", + "supportedMasaVersions": [ + "0.2.0" + ], + "profiles": [ + "core", + "agent" + ], + "inputSchema": { + "state": "known", + "uri": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json" + }, + "outputSchema": { + "state": "known", + "uri": "https://masa.sonicfield.org/schemas/0.2.0/conformance-result.schema.json" + }, + "resources": { + "local": [ + "configured-roots" + ], + "network": [], + "providers": [], + "hardware": [] + }, + "sideEffects": [ + "local-read" + ], + "authority": { + "required": true, + "source": "trusted-host", + "scopes": [ + "local-read" + ] + }, + "confirmation": "host-policy", + "riskFlags": { + "expose": false, + "publish": false, + "delete": false, + "overwrite": false, + "paidProvider": false, + "externalSystem": false, + "preciseLocation": false + }, + "receiptType": "masa:OperationReceipt", + "determinism": [ + "deterministic" + ], + "outcomes": [ + "completed", + "failed", + "refused", + "not_performed" + ], + "limits": { + "maxRecordBytes": 16777216 + }, + "extensions": {} + } + ], + "integrity": { + "state": "unknown", + "reason": "The standalone example is an account rather than a bundled byte artifact.", + "reasonCode": "not_bundled" + }, + "history": { + "mode": "embedded", + "events": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000903", + "type": "masa:OperationReceipt", + "recordId": "urn:uuid:00000000-0000-4000-8000-000000000006", + "sequence": 0, + "operationType": "matter.validate", + "effectClass": "read", + "finalStatus": "completed", + "startedAt": "2026-07-27T12:01:00Z", + "endedAt": "2026-07-27T12:01:01Z", + "actors": [ + "urn:uuid:00000000-0000-4000-8000-000000000901" + ], + "inputs": [ + "urn:uuid:00000000-0000-4000-8000-000000000006" + ], + "outputs": [], + "tool": { + "state": "known", + "value": { + "id": "urn:uuid:00000000-0000-4000-8000-000000000904", + "name": "MASA local validator", + "version": { + "state": "known", + "value": "0.1.0" + }, + "kind": "software" + } + }, + "parameters": { + "network": false, + "write": false + }, + "policyEvaluation": { + "action": "validate", + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000006" + ], + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "result": "permitted", + "evaluatedAt": "2026-07-27T12:01:00Z", + "evaluator": "urn:uuid:00000000-0000-4000-8000-000000000101", + "authorityRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000302" + ], + "reasons": [ + "The active local fixture policy explicitly permits this bounded operation." + ] + }, + "reversibility": "reversible", + "determinism": { + "state": "deterministic" + }, + "warnings": [], + "errors": [], + "claimRefs": [], + "extensions": {} + } + ] + }, + "disclosure": "private", + "registers": [ + "digital-technical" + ], + "scales": [ + "object-event" + ], + "extensions": { + "example:roundtrip": { + "deep": { + "values": [ + "preserve", + "without-interpretation" + ] + } + } + } +} diff --git a/examples/0.2.0/valid/deleted-state.masa.json b/examples/0.2.0/valid/deleted-state.masa.json new file mode 100644 index 0000000..b04d26f --- /dev/null +++ b/examples/0.2.0/valid/deleted-state.masa.json @@ -0,0 +1,214 @@ +{ + "$schema": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "masaVersion": "0.2.0", + "id": "urn:uuid:00000000-0000-4000-8000-000000000008", + "type": "masa:MatterRecord", + "revision": 1, + "profiles": [ + "core" + ], + "createdAt": "2026-07-27T12:00:00Z", + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "title": "Explicitly deleted representation state", + "description": "A representation is registered without claiming that it is identical to a physical event or perceptual object.", + "actors": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000101", + "type": "masa:Actor", + "actorKind": "human", + "roles": [ + "record-creator" + ], + "name": { + "state": "known", + "value": "Local example author" + }, + "disclosure": "private", + "extensions": {} + } + ], + "sources": [], + "representations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000201", + "type": "masa:Representation", + "role": "tombstone", + "mediaType": "application/octet-stream", + "format": { + "state": "deleted", + "reason": "The local fixture models an authorized deletion without retaining removed values.", + "receiptRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000c01" + ] + }, + "availability": "deleted", + "locator": { + "state": "deleted", + "reason": "The local fixture models an authorized deletion without retaining removed values.", + "receiptRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000c01" + ] + }, + "integrity": { + "state": "deleted", + "reason": "The local fixture models an authorized deletion without retaining removed values.", + "receiptRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000c01" + ] + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {} + } + ], + "encounters": [], + "apertures": [], + "listeningPasses": [], + "claims": [], + "regions": [], + "measurements": [], + "observations": [], + "mappings": [], + "relations": [], + "policies": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000301", + "type": "masa:Policy", + "policyKind": "composite", + "issuer": "urn:uuid:00000000-0000-4000-8000-000000000101", + "status": "active", + "disclosure": "private", + "rules": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000302", + "effect": "permission", + "actions": [ + "read", + "validate", + "delete" + ], + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000008", + "urn:uuid:00000000-0000-4000-8000-000000000201" + ], + "subjects": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "authorityBasis": { + "state": "known", + "value": "Local creator declaration for this private example" + }, + "constraints": { + "network": "prohibited" + }, + "duties": [ + "Preserve provenance and unknown states" + ] + } + ], + "review": { + "contact": { + "state": "unknown", + "reason": "No external contact exists for a local fixture.", + "reasonCode": "local_fixture" + }, + "route": { + "state": "known", + "value": "Review the record with the local MASA CLI" + } + }, + "extensions": {} + } + ], + "contexts": [], + "agentRuns": [], + "capabilities": [], + "integrity": { + "state": "unknown", + "reason": "The standalone example is an account rather than a bundled byte artifact.", + "reasonCode": "not_bundled" + }, + "history": { + "mode": "embedded", + "events": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000c01", + "type": "masa:OperationReceipt", + "recordId": "urn:uuid:00000000-0000-4000-8000-000000000008", + "sequence": 0, + "operationType": "matter.delete", + "effectClass": "delete", + "finalStatus": "completed", + "startedAt": "2026-07-27T12:01:00Z", + "endedAt": "2026-07-27T12:01:01Z", + "actors": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "inputs": [ + "urn:uuid:00000000-0000-4000-8000-000000000201" + ], + "outputs": [], + "tool": { + "state": "known", + "value": { + "id": "urn:uuid:00000000-0000-4000-8000-000000000c02", + "name": "Authorized deletion fixture", + "version": { + "state": "known", + "value": "0.1.0" + }, + "kind": "human-procedure" + } + }, + "parameters": { + "retained": "tombstone only" + }, + "policyEvaluation": { + "action": "delete", + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000201" + ], + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "result": "permitted", + "evaluatedAt": "2026-07-27T12:01:00Z", + "evaluator": "urn:uuid:00000000-0000-4000-8000-000000000101", + "authorityRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000302" + ], + "reasons": [ + "The active local fixture policy explicitly permits this bounded operation." + ] + }, + "reversibility": "irreversible", + "determinism": { + "state": "deterministic" + }, + "warnings": [], + "errors": [], + "claimRefs": [], + "extensions": {} + } + ] + }, + "disclosure": "private", + "registers": [ + "digital-technical" + ], + "scales": [ + "object-event" + ], + "extensions": { + "example:roundtrip": { + "deep": { + "values": [ + "preserve", + "without-interpretation" + ] + } + } + } +} diff --git a/examples/0.2.0/valid/generation.masa.json b/examples/0.2.0/valid/generation.masa.json new file mode 100644 index 0000000..0203dc2 --- /dev/null +++ b/examples/0.2.0/valid/generation.masa.json @@ -0,0 +1,361 @@ +{ + "$schema": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "masaVersion": "0.2.0", + "id": "urn:uuid:00000000-0000-4000-8000-000000000004", + "type": "masa:MatterRecord", + "revision": 1, + "profiles": [ + "core", + "audio", + "generation" + ], + "createdAt": "2026-07-27T12:00:00Z", + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "title": "Seeded generated descendant", + "description": "A representation is registered without claiming that it is identical to a physical event or perceptual object.", + "actors": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000101", + "type": "masa:Actor", + "actorKind": "human", + "roles": [ + "record-creator" + ], + "name": { + "state": "known", + "value": "Local example author" + }, + "disclosure": "private", + "extensions": {} + } + ], + "sources": [], + "representations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000601", + "type": "masa:Representation", + "role": "source-representation", + "mediaType": "audio/wav", + "format": { + "state": "unknown", + "reason": "The example does not include source bytes.", + "reasonCode": "not_bundled" + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {}, + "audio": { + "durationSeconds": { + "state": "known", + "value": 1 + }, + "channels": { + "state": "known", + "value": 1 + }, + "sampleRateHz": { + "state": "known", + "value": 48000 + }, + "bitDepth": { + "state": "known", + "value": 24 + }, + "encoding": { + "state": "known", + "value": "PCM signed integer little-endian" + }, + "spatialFormat": { + "state": "known", + "value": "mono" + }, + "levelContext": { + "state": "unknown", + "reason": "No calibrated playback or capture level is attached to this fixture.", + "reasonCode": "not_calibrated" + } + } + }, + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000702", + "type": "masa:Representation", + "role": "model-output", + "mediaType": "audio/wav", + "format": { + "state": "known", + "value": "WAVE PCM derivative; bytes omitted from fixture" + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {}, + "audio": { + "durationSeconds": { + "state": "known", + "value": 1 + }, + "channels": { + "state": "known", + "value": 1 + }, + "sampleRateHz": { + "state": "known", + "value": 48000 + }, + "bitDepth": { + "state": "known", + "value": 24 + }, + "encoding": { + "state": "known", + "value": "PCM signed integer little-endian" + }, + "spatialFormat": { + "state": "known", + "value": "mono" + }, + "levelContext": { + "state": "unknown", + "reason": "No calibrated playback or capture level is attached to this fixture.", + "reasonCode": "not_calibrated" + } + } + } + ], + "encounters": [], + "apertures": [], + "listeningPasses": [], + "claims": [], + "regions": [], + "measurements": [], + "observations": [], + "mappings": [], + "relations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000705", + "type": "masa:Relation", + "subject": "urn:uuid:00000000-0000-4000-8000-000000000702", + "predicate": "masa:derived-from", + "object": "urn:uuid:00000000-0000-4000-8000-000000000601", + "assertedBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "createdAt": "2026-07-27T12:01:01Z", + "basis": [ + { + "ref": "urn:uuid:00000000-0000-4000-8000-000000000703", + "role": "operation" + } + ], + "operationRef": "urn:uuid:00000000-0000-4000-8000-000000000703", + "extensions": {} + } + ], + "policies": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000301", + "type": "masa:Policy", + "policyKind": "composite", + "issuer": "urn:uuid:00000000-0000-4000-8000-000000000101", + "status": "active", + "disclosure": "private", + "rules": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000302", + "effect": "permission", + "actions": [ + "read", + "validate", + "transform", + "generate" + ], + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000004" + ], + "subjects": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "authorityBasis": { + "state": "known", + "value": "Local creator declaration for this private example" + }, + "constraints": { + "network": "prohibited" + }, + "duties": [ + "Preserve provenance and unknown states" + ] + } + ], + "review": { + "contact": { + "state": "unknown", + "reason": "No external contact exists for a local fixture.", + "reasonCode": "local_fixture" + }, + "route": { + "state": "known", + "value": "Review the record with the local MASA CLI" + } + }, + "extensions": {} + } + ], + "contexts": [], + "agentRuns": [], + "capabilities": [], + "integrity": { + "state": "unknown", + "reason": "The standalone example is an account rather than a bundled byte artifact.", + "reasonCode": "not_bundled" + }, + "history": { + "mode": "embedded", + "events": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000703", + "type": "masa:OperationReceipt", + "recordId": "urn:uuid:00000000-0000-4000-8000-000000000004", + "sequence": 0, + "operationType": "matter.generate", + "effectClass": "generate", + "finalStatus": "completed", + "startedAt": "2026-07-27T12:01:00Z", + "endedAt": "2026-07-27T12:01:01Z", + "actors": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "inputs": [ + "urn:uuid:00000000-0000-4000-8000-000000000601" + ], + "outputs": [ + "urn:uuid:00000000-0000-4000-8000-000000000702" + ], + "tool": { + "state": "known", + "value": { + "id": "urn:uuid:00000000-0000-4000-8000-000000000704", + "name": "Local fixture generator", + "version": { + "state": "known", + "value": "0.1.0" + }, + "kind": "model", + "provider": { + "state": "known", + "value": "offline fixture; no provider invocation" + }, + "adapter": { + "state": "known", + "value": "reference adapter 0.1.0" + } + } + }, + "parameters": { + "generationMethod": "seeded local variation fixture", + "parentRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000601" + ], + "conditioningRefs": [], + "regionRefs": [], + "prompt": { + "state": "known", + "value": "bounded local fixture" + }, + "negativePrompt": { + "state": "not_applicable" + }, + "model": { + "state": "known", + "value": "fixture-model 0.1.0; not executed" + }, + "adapter": { + "state": "known", + "value": "reference adapter 0.1.0" + }, + "provider": { + "state": "known", + "value": "offline fixture; no provider invocation" + }, + "providerPolicyState": { + "state": "unknown", + "reason": "No external provider terms apply to this unexecuted fixture.", + "reasonCode": "not_applicable_offline" + }, + "selection": { + "state": "known", + "value": "Single supplied conformance descendant" + }, + "rejectedOutputRefs": [] + }, + "policyEvaluation": { + "action": "generate", + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000702" + ], + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "result": "permitted", + "evaluatedAt": "2026-07-27T12:01:00Z", + "evaluator": "urn:uuid:00000000-0000-4000-8000-000000000101", + "authorityRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000302" + ], + "reasons": [ + "The active local fixture policy explicitly permits this bounded operation." + ] + }, + "reversibility": "irreversible", + "determinism": { + "state": "seeded", + "seed": 27072026 + }, + "warnings": [], + "errors": [], + "claimRefs": [], + "extensions": {} + } + ] + }, + "disclosure": "private", + "registers": [ + "digital-technical" + ], + "scales": [ + "object-event" + ], + "extensions": { + "example:roundtrip": { + "deep": { + "values": [ + "preserve", + "without-interpretation" + ] + } + } + } +} diff --git a/examples/0.2.0/valid/listening-analysis-audio.masa.json b/examples/0.2.0/valid/listening-analysis-audio.masa.json new file mode 100644 index 0000000..d462d89 --- /dev/null +++ b/examples/0.2.0/valid/listening-analysis-audio.masa.json @@ -0,0 +1,408 @@ +{ + "$schema": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "masaVersion": "0.2.0", + "id": "urn:uuid:00000000-0000-4000-8000-000000000002", + "type": "masa:MatterRecord", + "revision": 1, + "profiles": [ + "core", + "audio", + "listening", + "analysis" + ], + "createdAt": "2026-07-27T12:00:00Z", + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "title": "Plural listening and situated analysis", + "description": "A representation is registered without claiming that it is identical to a physical event or perceptual object.", + "actors": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000101", + "type": "masa:Actor", + "actorKind": "human", + "roles": [ + "record-creator" + ], + "name": { + "state": "known", + "value": "Local example author" + }, + "disclosure": "private", + "extensions": {} + } + ], + "sources": [], + "representations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000201", + "type": "masa:Representation", + "role": "source-representation", + "mediaType": "audio/wav", + "format": { + "state": "unknown", + "reason": "The example does not include source bytes.", + "reasonCode": "not_bundled" + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {}, + "audio": { + "durationSeconds": { + "state": "known", + "value": 1 + }, + "channels": { + "state": "known", + "value": 1 + }, + "sampleRateHz": { + "state": "known", + "value": 48000 + }, + "bitDepth": { + "state": "known", + "value": 24 + }, + "encoding": { + "state": "known", + "value": "PCM signed integer little-endian" + }, + "spatialFormat": { + "state": "known", + "value": "mono" + }, + "levelContext": { + "state": "unknown", + "reason": "No calibrated playback or capture level is attached to this fixture.", + "reasonCode": "not_calibrated" + } + } + } + ], + "encounters": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000501", + "type": "masa:Encounter", + "occurredAt": "2026-07-27T12:02:00Z", + "actors": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "question": "How does the short event hold together across focal and global attention?", + "position": { + "state": "known", + "value": "Headphones, seated, local studio; playback level not calibrated" + }, + "accessConditions": [ + "One-channel unavailable source is represented by fixture metadata only" + ], + "contextRefs": [], + "extensions": {} + } + ], + "apertures": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000502", + "type": "masa:Aperture", + "description": "Full-band one-second aperture without preprocessing", + "channels": [ + "mono" + ], + "ranges": [ + { + "kind": "spectral", + "unit": "Hz", + "start": 20, + "end": 20000 + } + ], + "windows": [ + { + "kind": "temporal", + "unit": "s", + "start": 0, + "end": 1 + } + ], + "thresholds": [], + "preprocessing": [], + "exclusions": [], + "blindSpots": [ + "Unavailable source bytes prevent independent replay" + ], + "extensions": {} + } + ], + "listeningPasses": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000505", + "type": "masa:ListeningPass", + "actors": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "representations": [ + "urn:uuid:00000000-0000-4000-8000-000000000201" + ], + "encounterRef": "urn:uuid:00000000-0000-4000-8000-000000000501", + "apertureRef": "urn:uuid:00000000-0000-4000-8000-000000000502", + "modes": [ + "focal", + "material" + ], + "createdAt": "2026-07-27T12:03:00Z", + "outcome": "claims", + "claimRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000503" + ], + "disclosure": "private", + "extensions": {} + }, + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000506", + "type": "masa:ListeningPass", + "actors": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "representations": [ + "urn:uuid:00000000-0000-4000-8000-000000000201" + ], + "encounterRef": "urn:uuid:00000000-0000-4000-8000-000000000501", + "apertureRef": "urn:uuid:00000000-0000-4000-8000-000000000502", + "modes": [ + "global", + "material" + ], + "createdAt": "2026-07-27T12:04:00Z", + "outcome": "claims", + "claimRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000504" + ], + "disclosure": "private", + "extensions": {} + } + ], + "claims": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000503", + "type": "masa:Claim", + "kind": "heard", + "about": [ + "urn:uuid:00000000-0000-4000-8000-000000000201" + ], + "basis": [ + { + "ref": "urn:uuid:00000000-0000-4000-8000-000000000201", + "role": "representation" + } + ], + "actor": "urn:uuid:00000000-0000-4000-8000-000000000101", + "createdAt": "2026-07-27T12:03:00Z", + "content": "The event was registered as one compact gesture.", + "method": { + "name": "focal listening pass", + "version": { + "state": "known", + "value": "1.0.0" + }, + "parameters": {} + }, + "listeningPassRef": "urn:uuid:00000000-0000-4000-8000-000000000505", + "confidence": { + "status": "not_assessed" + }, + "uncertainty": [ + "Playback level was not calibrated" + ], + "alternativeClaimRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000504" + ], + "disclosure": "private", + "extensions": {} + }, + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000504", + "type": "masa:Claim", + "kind": "heard", + "about": [ + "urn:uuid:00000000-0000-4000-8000-000000000201" + ], + "basis": [ + { + "ref": "urn:uuid:00000000-0000-4000-8000-000000000201", + "role": "representation" + } + ], + "actor": "urn:uuid:00000000-0000-4000-8000-000000000101", + "createdAt": "2026-07-27T12:04:00Z", + "content": "A second pass registered two successive material articulations rather than one gesture.", + "method": { + "name": "global re-listening pass", + "version": { + "state": "known", + "value": "1.0.0" + }, + "parameters": {} + }, + "listeningPassRef": "urn:uuid:00000000-0000-4000-8000-000000000506", + "confidence": { + "status": "not_assessed" + }, + "uncertainty": [ + "The two accounts remain intentionally unresolved" + ], + "alternativeClaimRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000503" + ], + "disclosure": "private", + "extensions": {} + } + ], + "regions": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000507", + "type": "masa:Region", + "representationRef": "urn:uuid:00000000-0000-4000-8000-000000000201", + "basis": "temporal", + "bounds": { + "unit": "s", + "start": 0, + "end": 1 + }, + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "createdAt": "2026-07-27T12:05:00Z", + "method": { + "name": "fixture interval declaration", + "version": { + "state": "known", + "value": "1.0.0" + }, + "parameters": {} + }, + "uncertainty": [ + "Region follows metadata duration because bytes are unavailable" + ], + "extensions": {} + } + ], + "measurements": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000508", + "type": "masa:Measurement", + "about": "urn:uuid:00000000-0000-4000-8000-000000000201", + "metric": "declared duration", + "value": 1, + "unit": "s", + "method": { + "name": "metadata declaration", + "version": { + "state": "known", + "value": "1.0.0" + }, + "parameters": {} + }, + "window": { + "kind": "temporal", + "unit": "s", + "start": 0, + "end": 1 + }, + "actor": "urn:uuid:00000000-0000-4000-8000-000000000101", + "createdAt": "2026-07-27T12:05:00Z", + "uncertainty": [ + "Not remeasured from bytes" + ], + "extensions": {} + } + ], + "observations": [], + "mappings": [], + "relations": [], + "policies": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000301", + "type": "masa:Policy", + "policyKind": "composite", + "issuer": "urn:uuid:00000000-0000-4000-8000-000000000101", + "status": "active", + "disclosure": "private", + "rules": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000302", + "effect": "permission", + "actions": [ + "read", + "validate" + ], + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000002" + ], + "subjects": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "authorityBasis": { + "state": "known", + "value": "Local creator declaration for this private example" + }, + "constraints": { + "network": "prohibited" + }, + "duties": [ + "Preserve provenance and unknown states" + ] + } + ], + "review": { + "contact": { + "state": "unknown", + "reason": "No external contact exists for a local fixture.", + "reasonCode": "local_fixture" + }, + "route": { + "state": "known", + "value": "Review the record with the local MASA CLI" + } + }, + "extensions": {} + } + ], + "contexts": [], + "agentRuns": [], + "capabilities": [], + "integrity": { + "state": "unknown", + "reason": "The standalone example is an account rather than a bundled byte artifact.", + "reasonCode": "not_bundled" + }, + "history": { + "mode": "embedded", + "events": [] + }, + "disclosure": "private", + "registers": [ + "digital-technical" + ], + "scales": [ + "object-event" + ], + "extensions": { + "example:roundtrip": { + "deep": { + "values": [ + "preserve", + "without-interpretation" + ] + } + } + } +} diff --git a/examples/0.2.0/valid/mapping.masa.json b/examples/0.2.0/valid/mapping.masa.json new file mode 100644 index 0000000..b531654 --- /dev/null +++ b/examples/0.2.0/valid/mapping.masa.json @@ -0,0 +1,338 @@ +{ + "$schema": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "masaVersion": "0.2.0", + "id": "urn:uuid:00000000-0000-4000-8000-000000000005", + "type": "masa:MatterRecord", + "revision": 1, + "profiles": [ + "core", + "observation", + "mapping" + ], + "createdAt": "2026-07-27T12:00:00Z", + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "title": "Stale observation skipped explicitly", + "description": "A representation is registered without claiming that it is identical to a physical event or perceptual object.", + "actors": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000101", + "type": "masa:Actor", + "actorKind": "human", + "roles": [ + "record-creator" + ], + "name": { + "state": "known", + "value": "Local example author" + }, + "disclosure": "private", + "extensions": {} + } + ], + "sources": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000801", + "type": "masa:Source", + "sourceKind": "astronomical-api-field", + "identification": { + "state": "known", + "value": "Example solar activity index" + }, + "locator": { + "state": "known", + "value": "https://example.invalid/observations/solar-index" + }, + "authority": { + "state": "unknown", + "reason": "Fixture does not assert institutional authority.", + "reasonCode": "fixture_only" + }, + "rights": { + "state": "unknown", + "reason": "Provider terms were not retrieved for this offline fixture.", + "reasonCode": "not_retrieved" + }, + "coverage": { + "state": "known", + "value": { + "scope": "demonstration only" + } + }, + "health": { + "status": "degraded", + "checkedAt": "2026-07-27T11:00:00Z", + "reason": "Fixture marks the feed stale" + }, + "freshness": { + "status": "stale", + "observedAt": "2026-07-26T11:00:00Z", + "ageSeconds": 90000 + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {} + } + ], + "representations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000201", + "type": "masa:Representation", + "role": "source-representation", + "mediaType": "application/octet-stream", + "format": { + "state": "unknown", + "reason": "The example does not include source bytes.", + "reasonCode": "not_bundled" + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {} + } + ], + "encounters": [], + "apertures": [], + "listeningPasses": [], + "claims": [], + "regions": [], + "measurements": [], + "observations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000802", + "type": "masa:Observation", + "sourceRef": "urn:uuid:00000000-0000-4000-8000-000000000801", + "field": "solar_activity_index", + "observedAt": "2026-07-26T11:00:00Z", + "scope": { + "state": "known", + "value": "Example interval" + }, + "value": { + "state": "known", + "value": 72.4 + }, + "unit": { + "state": "known", + "value": "index-point" + }, + "method": { + "name": "offline fixture observation", + "version": { + "state": "known", + "value": "1.0.0" + }, + "parameters": {} + }, + "health": { + "status": "degraded", + "checkedAt": "2026-07-27T11:00:00Z", + "reason": "Fixture marks the feed stale" + }, + "freshness": { + "status": "stale", + "observedAt": "2026-07-26T11:00:00Z", + "ageSeconds": 90000 + }, + "epistemicStatus": "reported", + "temporalCharacter": "aggregate", + "signalKind": "observation", + "disclosure": "private", + "extensions": {} + } + ], + "mappings": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000803", + "type": "masa:Mapping", + "sourceObservationRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000802" + ], + "sourceField": "solar_activity_index", + "sourceUnit": "index-point", + "inputRange": [ + 0, + 100 + ], + "normalization": { + "method": "linear", + "clipping": "clamp", + "parameters": {} + }, + "target": "synth.filter.cutoff", + "outputRange": [ + 120, + 7200 + ], + "curve": "exponential", + "smoothingMs": 200, + "cadence": "once per accepted observation", + "missingData": "skip", + "epistemicNote": "This authored mapping does not make the synthesized result the source's voice.", + "actors": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "createdAt": "2026-07-27T12:06:00Z", + "extensions": { + "example:control": { + "parameter": "filter.cutoff" + } + } + } + ], + "relations": [], + "policies": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000301", + "type": "masa:Policy", + "policyKind": "composite", + "issuer": "urn:uuid:00000000-0000-4000-8000-000000000101", + "status": "active", + "disclosure": "private", + "rules": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000302", + "effect": "permission", + "actions": [ + "read", + "validate", + "map" + ], + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000005" + ], + "subjects": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "authorityBasis": { + "state": "known", + "value": "Local creator declaration for this private example" + }, + "constraints": { + "network": "prohibited" + }, + "duties": [ + "Preserve provenance and unknown states" + ] + } + ], + "review": { + "contact": { + "state": "unknown", + "reason": "No external contact exists for a local fixture.", + "reasonCode": "local_fixture" + }, + "route": { + "state": "known", + "value": "Review the record with the local MASA CLI" + } + }, + "extensions": {} + } + ], + "contexts": [], + "agentRuns": [], + "capabilities": [], + "integrity": { + "state": "unknown", + "reason": "The standalone example is an account rather than a bundled byte artifact.", + "reasonCode": "not_bundled" + }, + "history": { + "mode": "embedded", + "events": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000804", + "type": "masa:OperationReceipt", + "recordId": "urn:uuid:00000000-0000-4000-8000-000000000005", + "sequence": 0, + "operationType": "matter.map", + "effectClass": "map", + "finalStatus": "not_performed", + "startedAt": "2026-07-27T12:01:00Z", + "endedAt": "2026-07-27T12:01:01Z", + "actors": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "inputs": [ + "urn:uuid:00000000-0000-4000-8000-000000000802" + ], + "outputs": [], + "tool": { + "state": "known", + "value": { + "id": "urn:uuid:00000000-0000-4000-8000-000000000805", + "name": "Generic mapping adapter fixture", + "version": { + "state": "known", + "value": "0.1.0" + }, + "kind": "software" + } + }, + "parameters": { + "reason": "stale input", + "missingData": "skip" + }, + "policyEvaluation": { + "action": "map", + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000803" + ], + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "result": "permitted", + "evaluatedAt": "2026-07-27T12:01:00Z", + "evaluator": "urn:uuid:00000000-0000-4000-8000-000000000101", + "authorityRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000302" + ], + "reasons": [ + "The active local fixture policy explicitly permits this bounded operation." + ] + }, + "reversibility": "undetermined", + "determinism": { + "state": "deterministic" + }, + "warnings": [ + "Stale observation was not converted into a control value" + ], + "errors": [], + "claimRefs": [], + "extensions": {} + } + ] + }, + "disclosure": "private", + "registers": [ + "digital-technical" + ], + "scales": [ + "object-event" + ], + "extensions": { + "example:roundtrip": { + "deep": { + "values": [ + "preserve", + "without-interpretation" + ] + } + } + } +} diff --git a/examples/0.2.0/valid/minimal-record.masa.json b/examples/0.2.0/valid/minimal-record.masa.json new file mode 100644 index 0000000..148ed15 --- /dev/null +++ b/examples/0.2.0/valid/minimal-record.masa.json @@ -0,0 +1,146 @@ +{ + "$schema": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "masaVersion": "0.2.0", + "id": "urn:uuid:00000000-0000-4000-8000-000000000001", + "type": "masa:MatterRecord", + "revision": 1, + "profiles": [ + "core" + ], + "createdAt": "2026-07-27T12:00:00Z", + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "title": "Minimal local matter account", + "description": "A representation is registered without claiming that it is identical to a physical event or perceptual object.", + "actors": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000101", + "type": "masa:Actor", + "actorKind": "human", + "roles": [ + "record-creator" + ], + "name": { + "state": "known", + "value": "Local example author" + }, + "disclosure": "private", + "extensions": {} + } + ], + "sources": [], + "representations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000201", + "type": "masa:Representation", + "role": "source-representation", + "mediaType": "application/octet-stream", + "format": { + "state": "unknown", + "reason": "The example does not include source bytes.", + "reasonCode": "not_bundled" + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {} + } + ], + "encounters": [], + "apertures": [], + "listeningPasses": [], + "claims": [], + "regions": [], + "measurements": [], + "observations": [], + "mappings": [], + "relations": [], + "policies": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000301", + "type": "masa:Policy", + "policyKind": "composite", + "issuer": "urn:uuid:00000000-0000-4000-8000-000000000101", + "status": "active", + "disclosure": "private", + "rules": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000302", + "effect": "permission", + "actions": [ + "read", + "validate" + ], + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000001" + ], + "subjects": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "authorityBasis": { + "state": "known", + "value": "Local creator declaration for this private example" + }, + "constraints": { + "network": "prohibited" + }, + "duties": [ + "Preserve provenance and unknown states" + ] + } + ], + "review": { + "contact": { + "state": "unknown", + "reason": "No external contact exists for a local fixture.", + "reasonCode": "local_fixture" + }, + "route": { + "state": "known", + "value": "Review the record with the local MASA CLI" + } + }, + "extensions": {} + } + ], + "contexts": [], + "agentRuns": [], + "capabilities": [], + "integrity": { + "state": "unknown", + "reason": "The standalone example is an account rather than a bundled byte artifact.", + "reasonCode": "not_bundled" + }, + "history": { + "mode": "embedded", + "events": [] + }, + "disclosure": "private", + "registers": [ + "digital-technical" + ], + "scales": [ + "object-event" + ], + "extensions": { + "example:roundtrip": { + "deep": { + "values": [ + "preserve", + "without-interpretation" + ] + } + } + } +} diff --git a/examples/0.2.0/valid/processing.masa.json b/examples/0.2.0/valid/processing.masa.json new file mode 100644 index 0000000..581490a --- /dev/null +++ b/examples/0.2.0/valid/processing.masa.json @@ -0,0 +1,365 @@ +{ + "$schema": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "masaVersion": "0.2.0", + "id": "urn:uuid:00000000-0000-4000-8000-000000000009", + "type": "masa:MatterRecord", + "revision": 1, + "profiles": [ + "core", + "audio", + "processing" + ], + "createdAt": "2026-07-27T12:00:00Z", + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "title": "Granulated texture with an accounted grain scheme", + "description": "A representation is registered without claiming that it is identical to a physical event or perceptual object.", + "actors": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000101", + "type": "masa:Actor", + "actorKind": "human", + "roles": [ + "record-creator" + ], + "name": { + "state": "known", + "value": "Local example author" + }, + "disclosure": "private", + "extensions": {} + } + ], + "sources": [], + "representations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000d01", + "type": "masa:Representation", + "role": "source-representation", + "mediaType": "audio/wav", + "format": { + "state": "unknown", + "reason": "The example does not include source bytes.", + "reasonCode": "not_bundled" + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {}, + "audio": { + "durationSeconds": { + "state": "known", + "value": 1 + }, + "channels": { + "state": "known", + "value": 1 + }, + "sampleRateHz": { + "state": "known", + "value": 48000 + }, + "bitDepth": { + "state": "known", + "value": 24 + }, + "encoding": { + "state": "known", + "value": "PCM signed integer little-endian" + }, + "spatialFormat": { + "state": "known", + "value": "mono" + }, + "levelContext": { + "state": "unknown", + "reason": "No calibrated playback or capture level is attached to this fixture.", + "reasonCode": "not_calibrated" + } + } + }, + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000d02", + "type": "masa:Representation", + "role": "render", + "mediaType": "audio/wav", + "format": { + "state": "known", + "value": "WAVE PCM granular texture; bytes omitted from fixture" + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {}, + "audio": { + "durationSeconds": { + "state": "known", + "value": 1 + }, + "channels": { + "state": "known", + "value": 1 + }, + "sampleRateHz": { + "state": "known", + "value": 48000 + }, + "bitDepth": { + "state": "known", + "value": 24 + }, + "encoding": { + "state": "known", + "value": "PCM signed integer little-endian" + }, + "spatialFormat": { + "state": "known", + "value": "mono" + }, + "levelContext": { + "state": "unknown", + "reason": "No calibrated playback or capture level is attached to this fixture.", + "reasonCode": "not_calibrated" + } + } + } + ], + "encounters": [], + "apertures": [], + "listeningPasses": [], + "claims": [], + "regions": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000d05", + "type": "masa:Region", + "representationRef": "urn:uuid:00000000-0000-4000-8000-000000000d01", + "basis": "temporal", + "bounds": { + "unit": "s", + "start": 0.25, + "end": 0.75 + }, + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "createdAt": "2026-08-07T12:00:00Z", + "method": { + "name": "fixture interval declaration", + "version": { + "state": "known", + "value": "1.0.0" + }, + "parameters": {} + }, + "uncertainty": [ + "Selection interval follows metadata duration because bytes are unavailable" + ], + "extensions": {} + } + ], + "measurements": [], + "observations": [], + "mappings": [], + "relations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000d06", + "type": "masa:Relation", + "subject": "urn:uuid:00000000-0000-4000-8000-000000000d02", + "predicate": "masa:granulated-from", + "object": "urn:uuid:00000000-0000-4000-8000-000000000d01", + "assertedBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "createdAt": "2026-08-07T12:00:01Z", + "basis": [ + { + "ref": "urn:uuid:00000000-0000-4000-8000-000000000d03", + "role": "operation" + } + ], + "operationRef": "urn:uuid:00000000-0000-4000-8000-000000000d03", + "extensions": {} + } + ], + "policies": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000301", + "type": "masa:Policy", + "policyKind": "composite", + "issuer": "urn:uuid:00000000-0000-4000-8000-000000000101", + "status": "active", + "disclosure": "private", + "rules": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000302", + "effect": "permission", + "actions": [ + "read", + "validate", + "granulate" + ], + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000009" + ], + "subjects": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "authorityBasis": { + "state": "known", + "value": "Local creator declaration for this private example" + }, + "constraints": { + "network": "prohibited" + }, + "duties": [ + "Preserve provenance and unknown states" + ] + } + ], + "review": { + "contact": { + "state": "unknown", + "reason": "No external contact exists for a local fixture.", + "reasonCode": "local_fixture" + }, + "route": { + "state": "known", + "value": "Review the record with the local MASA CLI" + } + }, + "extensions": {} + } + ], + "contexts": [], + "agentRuns": [], + "capabilities": [], + "integrity": { + "state": "unknown", + "reason": "The standalone example is an account rather than a bundled byte artifact.", + "reasonCode": "not_bundled" + }, + "history": { + "mode": "embedded", + "events": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000d03", + "type": "masa:OperationReceipt", + "recordId": "urn:uuid:00000000-0000-4000-8000-000000000009", + "sequence": 0, + "operationType": "matter.granulate", + "effectClass": "derive", + "finalStatus": "completed", + "startedAt": "2026-07-27T12:01:00Z", + "endedAt": "2026-07-27T12:01:01Z", + "actors": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "inputs": [ + "urn:uuid:00000000-0000-4000-8000-000000000d01" + ], + "outputs": [ + "urn:uuid:00000000-0000-4000-8000-000000000d02" + ], + "tool": { + "state": "known", + "value": { + "id": "urn:uuid:00000000-0000-4000-8000-000000000d04", + "name": "Granular engine fixture", + "version": { + "state": "known", + "value": "0.1.0" + }, + "kind": "software" + } + }, + "parameters": { + "grain": { + "durationMs": { + "min": 5, + "max": 80 + }, + "envelope": "expodec", + "pitchScatterCents": 35 + }, + "emission": { + "mode": "asynchronous", + "grainsPerSecond": 240, + "totalGrains": 4800 + }, + "selection": { + "order": "statistical", + "regionRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000d05" + ] + }, + "output": { + "kind": "texture" + } + }, + "policyEvaluation": { + "action": "granulate", + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000d02" + ], + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "result": "permitted", + "evaluatedAt": "2026-07-27T12:01:00Z", + "evaluator": "urn:uuid:00000000-0000-4000-8000-000000000101", + "authorityRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000302" + ], + "reasons": [ + "The active local fixture policy explicitly permits this bounded operation." + ] + }, + "reversibility": "irreversible", + "determinism": { + "state": "seeded", + "seed": 20260807 + }, + "warnings": [], + "errors": [], + "claimRefs": [], + "extensions": {} + } + ] + }, + "disclosure": "private", + "registers": [ + "digital-technical" + ], + "scales": [ + "object-event" + ], + "extensions": { + "example:roundtrip": { + "deep": { + "values": [ + "preserve", + "without-interpretation" + ] + } + } + } +} diff --git a/examples/0.2.0/valid/publication.masa.json b/examples/0.2.0/valid/publication.masa.json new file mode 100644 index 0000000..605bcbd --- /dev/null +++ b/examples/0.2.0/valid/publication.masa.json @@ -0,0 +1,248 @@ +{ + "$schema": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "masaVersion": "0.2.0", + "id": "urn:uuid:00000000-0000-4000-8000-000000000007", + "type": "masa:MatterRecord", + "revision": 1, + "profiles": [ + "core", + "publication" + ], + "createdAt": "2026-07-27T12:00:00Z", + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "title": "Public-safe MASA projection", + "description": "A deliberately minimal public derivative with no private media, local paths, or unknown extensions.", + "actors": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000101", + "type": "masa:Actor", + "actorKind": "human", + "roles": [ + "record-creator" + ], + "name": { + "state": "known", + "value": "MASA example author" + }, + "disclosure": "public", + "extensions": {} + } + ], + "sources": [], + "representations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000201", + "type": "masa:Representation", + "role": "preview", + "mediaType": "application/json", + "format": { + "state": "unknown", + "reason": "The example does not include source bytes.", + "reasonCode": "not_bundled" + }, + "availability": "available", + "locator": { + "state": "known", + "value": "https://masa.sonicfield.org/examples/public-safe.json" + }, + "integrity": { + "state": "known", + "value": { + "algorithm": "sha-256", + "digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "byteLength": 0, + "status": "unverified" + } + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "public", + "extensions": {} + } + ], + "encounters": [], + "apertures": [], + "listeningPasses": [], + "claims": [], + "regions": [], + "measurements": [], + "observations": [], + "mappings": [], + "relations": [], + "policies": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000301", + "type": "masa:Policy", + "policyKind": "publication", + "issuer": "urn:uuid:00000000-0000-4000-8000-000000000101", + "status": "active", + "disclosure": "public", + "rules": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000302", + "effect": "permission", + "actions": [ + "read", + "publish" + ], + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000007" + ], + "subjects": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "authorityBasis": { + "state": "known", + "value": "Fixture author approval for this exact public projection" + }, + "constraints": { + "network": "prohibited" + }, + "duties": [ + "Preserve provenance and unknown states" + ] + } + ], + "review": { + "contact": { + "state": "unknown", + "reason": "No external contact exists for a local fixture.", + "reasonCode": "local_fixture" + }, + "route": { + "state": "known", + "value": "Review the record with the local MASA CLI" + } + }, + "extensions": {} + } + ], + "contexts": [], + "agentRuns": [], + "capabilities": [], + "integrity": { + "state": "unknown", + "reason": "The standalone example is an account rather than a bundled byte artifact.", + "reasonCode": "not_bundled" + }, + "history": { + "mode": "embedded", + "events": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000a01", + "type": "masa:OperationReceipt", + "recordId": "urn:uuid:00000000-0000-4000-8000-000000000007", + "sequence": 0, + "operationType": "matter.publish", + "effectClass": "publish", + "finalStatus": "completed", + "startedAt": "2026-07-27T12:01:00Z", + "endedAt": "2026-07-27T12:01:01Z", + "actors": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "inputs": [], + "outputs": [ + "urn:uuid:00000000-0000-4000-8000-000000000007" + ], + "tool": { + "state": "known", + "value": { + "id": "urn:uuid:00000000-0000-4000-8000-000000000a02", + "name": "Human-reviewed public fixture", + "version": { + "state": "known", + "value": "0.1.0" + }, + "kind": "human-procedure" + } + }, + "parameters": { + "projection": "allowlist", + "assetsIncluded": false + }, + "policyEvaluation": { + "action": "publish", + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000007" + ], + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "result": "permitted", + "evaluatedAt": "2026-07-27T12:01:00Z", + "evaluator": "urn:uuid:00000000-0000-4000-8000-000000000101", + "authorityRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000302" + ], + "reasons": [ + "The active local fixture policy explicitly permits this bounded operation." + ] + }, + "reversibility": "irreversible", + "determinism": { + "state": "deterministic" + }, + "warnings": [], + "errors": [], + "claimRefs": [], + "extensions": {} + } + ] + }, + "disclosure": "public", + "registers": [ + "digital-technical" + ], + "scales": [ + "object-event" + ], + "extensions": {}, + "publication": { + "publicRecordId": "urn:uuid:00000000-0000-4000-8000-000000000007", + "approvedAt": "2026-07-27T12:10:00Z", + "approvedBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "policyEvaluation": { + "action": "publish", + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000007" + ], + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "result": "permitted", + "evaluatedAt": "2026-07-27T12:01:00Z", + "evaluator": "urn:uuid:00000000-0000-4000-8000-000000000101", + "authorityRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000302" + ], + "reasons": [ + "The active local fixture policy explicitly permits this bounded operation." + ] + }, + "omissions": [ + { + "pointer": "/extensions/example:roundtrip", + "category": "unknown-extension", + "reason": "Not approved for public export" + } + ], + "redactions": [], + "attribution": { + "state": "known", + "value": "MASA protocol example" + }, + "license": { + "state": "known", + "value": "MIT for protocol fixture metadata; no media is included" + }, + "retention": { + "state": "known", + "value": "Retain while protocol 0.2.0 remains supported" + }, + "correctionUrl": "https://masa.sonicfield.org/corrections", + "revocationUrl": "https://masa.sonicfield.org/revocations", + "approvedExtensionNamespaces": [] + } +} diff --git a/examples/0.2.0/valid/transformation.masa.json b/examples/0.2.0/valid/transformation.masa.json new file mode 100644 index 0000000..936b2dd --- /dev/null +++ b/examples/0.2.0/valid/transformation.masa.json @@ -0,0 +1,329 @@ +{ + "$schema": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "masaVersion": "0.2.0", + "id": "urn:uuid:00000000-0000-4000-8000-000000000003", + "type": "masa:MatterRecord", + "revision": 1, + "profiles": [ + "core", + "audio", + "transformation" + ], + "createdAt": "2026-07-27T12:00:00Z", + "createdBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "title": "Lineage-preserving transformation", + "description": "A representation is registered without claiming that it is identical to a physical event or perceptual object.", + "actors": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000101", + "type": "masa:Actor", + "actorKind": "human", + "roles": [ + "record-creator" + ], + "name": { + "state": "known", + "value": "Local example author" + }, + "disclosure": "private", + "extensions": {} + } + ], + "sources": [], + "representations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000601", + "type": "masa:Representation", + "role": "source-representation", + "mediaType": "audio/wav", + "format": { + "state": "unknown", + "reason": "The example does not include source bytes.", + "reasonCode": "not_bundled" + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {}, + "audio": { + "durationSeconds": { + "state": "known", + "value": 1 + }, + "channels": { + "state": "known", + "value": 1 + }, + "sampleRateHz": { + "state": "known", + "value": 48000 + }, + "bitDepth": { + "state": "known", + "value": 24 + }, + "encoding": { + "state": "known", + "value": "PCM signed integer little-endian" + }, + "spatialFormat": { + "state": "known", + "value": "mono" + }, + "levelContext": { + "state": "unknown", + "reason": "No calibrated playback or capture level is attached to this fixture.", + "reasonCode": "not_calibrated" + } + } + }, + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000602", + "type": "masa:Representation", + "role": "derivative", + "mediaType": "audio/wav", + "format": { + "state": "known", + "value": "WAVE PCM derivative; bytes omitted from fixture" + }, + "availability": "unavailable", + "locator": { + "state": "unavailable", + "reason": "No asset is bundled with this minimal example.", + "reasonCode": "not_bundled" + }, + "integrity": { + "state": "unknown", + "reason": "Integrity cannot be verified without bytes.", + "reasonCode": "not_bundled" + }, + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "disclosure": "private", + "extensions": {}, + "audio": { + "durationSeconds": { + "state": "known", + "value": 1 + }, + "channels": { + "state": "known", + "value": 1 + }, + "sampleRateHz": { + "state": "known", + "value": 48000 + }, + "bitDepth": { + "state": "known", + "value": 24 + }, + "encoding": { + "state": "known", + "value": "PCM signed integer little-endian" + }, + "spatialFormat": { + "state": "known", + "value": "mono" + }, + "levelContext": { + "state": "unknown", + "reason": "No calibrated playback or capture level is attached to this fixture.", + "reasonCode": "not_calibrated" + } + } + } + ], + "encounters": [], + "apertures": [], + "listeningPasses": [], + "claims": [], + "regions": [], + "measurements": [], + "observations": [], + "mappings": [], + "relations": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000605", + "type": "masa:Relation", + "subject": "urn:uuid:00000000-0000-4000-8000-000000000602", + "predicate": "masa:derived-from", + "object": "urn:uuid:00000000-0000-4000-8000-000000000601", + "assertedBy": "urn:uuid:00000000-0000-4000-8000-000000000101", + "createdAt": "2026-07-27T12:01:01Z", + "basis": [ + { + "ref": "urn:uuid:00000000-0000-4000-8000-000000000603", + "role": "operation" + } + ], + "operationRef": "urn:uuid:00000000-0000-4000-8000-000000000603", + "extensions": {} + } + ], + "policies": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000301", + "type": "masa:Policy", + "policyKind": "composite", + "issuer": "urn:uuid:00000000-0000-4000-8000-000000000101", + "status": "active", + "disclosure": "private", + "rules": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000302", + "effect": "permission", + "actions": [ + "read", + "validate", + "transform" + ], + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000003" + ], + "subjects": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "authorityBasis": { + "state": "known", + "value": "Local creator declaration for this private example" + }, + "constraints": { + "network": "prohibited" + }, + "duties": [ + "Preserve provenance and unknown states" + ] + } + ], + "review": { + "contact": { + "state": "unknown", + "reason": "No external contact exists for a local fixture.", + "reasonCode": "local_fixture" + }, + "route": { + "state": "known", + "value": "Review the record with the local MASA CLI" + } + }, + "extensions": {} + } + ], + "contexts": [], + "agentRuns": [], + "capabilities": [], + "integrity": { + "state": "unknown", + "reason": "The standalone example is an account rather than a bundled byte artifact.", + "reasonCode": "not_bundled" + }, + "history": { + "mode": "embedded", + "events": [ + { + "id": "urn:uuid:00000000-0000-4000-8000-000000000603", + "type": "masa:OperationReceipt", + "recordId": "urn:uuid:00000000-0000-4000-8000-000000000003", + "sequence": 0, + "operationType": "matter.transform", + "effectClass": "transform", + "finalStatus": "completed", + "startedAt": "2026-07-27T12:01:00Z", + "endedAt": "2026-07-27T12:01:01Z", + "actors": [ + "urn:uuid:00000000-0000-4000-8000-000000000101" + ], + "inputs": [ + "urn:uuid:00000000-0000-4000-8000-000000000601" + ], + "outputs": [ + "urn:uuid:00000000-0000-4000-8000-000000000602" + ], + "tool": { + "state": "known", + "value": { + "id": "urn:uuid:00000000-0000-4000-8000-000000000604", + "name": "MASA fixture transform", + "version": { + "state": "known", + "value": "0.1.0" + }, + "kind": "script" + } + }, + "parameters": { + "operation": "gain", + "gainDb": -3, + "preservationIntent": { + "properties": [ + "duration", + "channel-layout" + ], + "verification": { + "state": "unknown", + "reason": "Derivative bytes are omitted from this structural fixture.", + "reasonCode": "not_bundled" + } + } + }, + "policyEvaluation": { + "action": "transform", + "targets": [ + "urn:uuid:00000000-0000-4000-8000-000000000602" + ], + "policyRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000301" + ], + "result": "permitted", + "evaluatedAt": "2026-07-27T12:01:00Z", + "evaluator": "urn:uuid:00000000-0000-4000-8000-000000000101", + "authorityRefs": [ + "urn:uuid:00000000-0000-4000-8000-000000000302" + ], + "reasons": [ + "The active local fixture policy explicitly permits this bounded operation." + ] + }, + "reversibility": "compensatable", + "determinism": { + "state": "deterministic" + }, + "warnings": [], + "errors": [], + "claimRefs": [], + "extensions": {} + } + ] + }, + "disclosure": "private", + "registers": [ + "digital-technical" + ], + "scales": [ + "object-event" + ], + "extensions": { + "example:roundtrip": { + "deep": { + "values": [ + "preserve", + "without-interpretation" + ] + } + } + } +} diff --git a/mcp/package.json b/mcp/package.json index 55cbeb6..9cc44e9 100644 --- a/mcp/package.json +++ b/mcp/package.json @@ -1,6 +1,6 @@ { "name": "@sonicfield/masa-mcp", - "version": "0.1.1", + "version": "0.2.0", "private": true, "license": "MIT", "description": "Read-oriented local MCP server for MASA", diff --git a/ontology/0.2.0/relations.json b/ontology/0.2.0/relations.json new file mode 100644 index 0000000..5e22018 --- /dev/null +++ b/ontology/0.2.0/relations.json @@ -0,0 +1,48 @@ +{ + "registryType": "masa-relation-registry", + "registryVersion": "0.2.0", + "masaVersion": "0.2.0", + "namespace": "https://masa.sonicfield.org/vocab/0.2.0#", + "relations": [ + { "id": "masa:derived-from", "category": "derivation", "acyclic": true, "inverse": "masa:derivation-of", "lineageDirection": "subject-is-descendant", "definition": "The subject was produced through an attributable operation using the object." }, + { "id": "masa:derivation-of", "category": "derivation", "acyclic": true, "inverse": "masa:derived-from", "lineageDirection": "object-is-descendant", "definition": "The subject is used as an attributable material ancestor of the object." }, + { "id": "masa:version-of", "category": "version", "acyclic": true, "lineageDirection": "subject-is-descendant", "definition": "The subject is a later version of the object." }, + { "id": "masa:revision-of", "category": "version", "acyclic": true, "lineageDirection": "subject-is-descendant", "definition": "The subject revises an account while preserving the earlier version." }, + { "id": "masa:part-of", "category": "structure", "acyclic": true, "inverse": "masa:has-part", "definition": "The subject is a bounded part of the object." }, + { "id": "masa:has-part", "category": "structure", "acyclic": true, "inverse": "masa:part-of", "definition": "The subject contains the object as an explicitly bounded part." }, + { "id": "masa:member-of", "category": "structure", "acyclic": false, "definition": "The subject participates in a collection or corpus." }, + { "id": "masa:captured-from", "category": "provenance", "acyclic": true, "lineageDirection": "subject-is-descendant", "definition": "The subject representation was captured from the object under a declared apparatus." }, + { "id": "masa:transduced-from", "category": "provenance", "acyclic": true, "lineageDirection": "subject-is-descendant", "definition": "The subject was produced through a declared transduction of the object." }, + { "id": "masa:measured-from", "category": "evidence", "acyclic": true, "definition": "The subject measurement used the object as evidence." }, + { "id": "masa:listened-as", "category": "listening", "acyclic": false, "definition": "The subject was approached as the object under a declared listening pass." }, + { "id": "masa:segmented-from", "category": "derivation", "acyclic": true, "lineageDirection": "subject-is-descendant", "definition": "The subject region or representation was segmented from the object." }, + { "id": "masa:isolated-from", "category": "derivation", "acyclic": true, "lineageDirection": "subject-is-descendant", "definition": "The subject was isolated from the object through a declared method." }, + { "id": "masa:granulated-from", "category": "derivation", "acyclic": true, "lineageDirection": "subject-is-descendant", "definition": "The subject texture or fragment set was produced by granulating the object under a declared grain scheme." }, + { "id": "masa:mixed-with", "category": "composition", "acyclic": false, "definition": "The subject and object participate in a declared mixture." }, + { "id": "masa:grafted-with", "category": "generation", "acyclic": false, "definition": "The subject combines lineage or conditioning from the object and other parents." }, + { "id": "masa:transformed-by", "category": "operation", "acyclic": false, "definition": "The subject was transformed by the object OperationReceipt." }, + { "id": "masa:generated-by", "category": "operation", "acyclic": false, "definition": "The subject was generated by the object OperationReceipt." }, + { "id": "masa:mapped-from", "category": "mapping", "acyclic": true, "lineageDirection": "subject-is-descendant", "definition": "The subject sonic control or render was mapped from the object observation or relation." }, + { "id": "masa:rendered-as", "category": "derivation", "acyclic": true, "lineageDirection": "object-is-descendant", "definition": "The subject was rendered as the object representation." }, + { "id": "masa:performed-as", "category": "performance", "acyclic": true, "lineageDirection": "object-is-descendant", "definition": "The subject process or score was performed as the object representation or event." }, + { "id": "masa:parent-of", "category": "lineage", "acyclic": true, "inverse": "masa:child-of", "lineageDirection": "object-is-descendant", "definition": "The subject is a declared causal parent of the object." }, + { "id": "masa:child-of", "category": "lineage", "acyclic": true, "inverse": "masa:parent-of", "lineageDirection": "subject-is-descendant", "definition": "The subject is a declared causal child of the object." }, + { "id": "masa:sibling-of", "category": "lineage", "acyclic": false, "symmetric": true, "definition": "The subject and object share declared parentage without implying perceptual identity." }, + { "id": "masa:variation-of", "category": "lineage", "acyclic": true, "lineageDirection": "subject-is-descendant", "definition": "The subject is an attributable variation of the object." }, + { "id": "masa:continuation-of", "category": "lineage", "acyclic": true, "lineageDirection": "subject-is-descendant", "definition": "The subject temporally continues the object from a declared boundary." }, + { "id": "masa:located-in", "category": "spatial", "acyclic": false, "definition": "The subject is situated in the object context or territory at a declared precision." }, + { "id": "masa:recorded-at", "category": "spatial", "acyclic": false, "definition": "The subject representation was recorded at the object place or context." }, + { "id": "masa:associated-with", "category": "association", "acyclic": false, "definition": "The subject has a declared non-equivalent association with the object." }, + { "id": "masa:attributed-to", "category": "responsibility", "acyclic": false, "definition": "The subject carries an attribution to the object Actor." }, + { "id": "masa:stewarded-by", "category": "responsibility", "acyclic": false, "definition": "The subject is stewarded under the responsibility of the object Actor." }, + { "id": "masa:governed-by", "category": "policy", "acyclic": false, "definition": "The subject is governed by the object Policy." }, + { "id": "masa:permitted-by", "category": "policy", "acyclic": false, "definition": "The subject operation or disclosure was permitted by the object policy evaluation." }, + { "id": "masa:withheld-by", "category": "policy", "acyclic": false, "definition": "The subject is withheld under the object Policy or Actor decision." }, + { "id": "masa:expired-by", "category": "policy", "acyclic": false, "definition": "The subject access or retention expired through the object policy event." }, + { "id": "masa:supports", "category": "epistemic", "acyclic": false, "definition": "The subject claim supplies evidence supporting the object claim." }, + { "id": "masa:contradicts", "category": "epistemic", "acyclic": false, "symmetric": true, "definition": "The subject and object make materially conflicting claims." }, + { "id": "masa:differs-from", "category": "epistemic", "acyclic": false, "symmetric": true, "definition": "The subject differs from the object without requiring contradiction." }, + { "id": "masa:incomparable-with", "category": "epistemic", "acyclic": false, "symmetric": true, "definition": "The current apparatus or terms do not authorize comparison between subject and object." }, + { "id": "masa:speculates-about", "category": "epistemic", "acyclic": false, "definition": "The subject is a declared speculative proposition about the object." } + ] +} diff --git a/ontology/0.2.0/terms.json b/ontology/0.2.0/terms.json new file mode 100644 index 0000000..5747ff2 --- /dev/null +++ b/ontology/0.2.0/terms.json @@ -0,0 +1,382 @@ +{ + "registryType": "masa-term-registry", + "registryVersion": "0.2.0", + "masaVersion": "0.2.0", + "namespace": "https://masa.sonicfield.org/vocab/0.2.0#", + "terms": [ + { + "id": "masa:MatterRecord", + "label": "MatterRecord", + "termStatus": "working-term", + "provenanceClass": "curator-directive", + "definition": "A versioned envelope relating sources, representations, encounters, listening passes, claims, operations, actors, policies, contexts, and lineage without claiming to be the sonic event itself.", + "introduced": "0.1.0", + "references": ["MASA Core 0.2.0, section 5.1"], + "nonEquivalentTo": ["physical event", "signal", "audio asset", "sound object", "auditum"] + }, + { + "id": "masa:Actor", + "label": "Actor", + "termStatus": "working-term", + "provenanceClass": "curator-directive", + "definition": "A human, community, organization, software system, agent, model, or instrument participating in a claim or operation, whose identity may be pseudonymous, opaque, or withheld.", + "introduced": "0.1.0", + "references": ["MASA Core 0.2.0, section 5.2"], + "nonEquivalentTo": ["runtime authority", "confidence", "author of record"] + }, + { + "id": "masa:Source", + "label": "Source", + "termStatus": "working-term", + "provenanceClass": "mixed", + "definition": "A typed origin or causal reference whose identification, authority, coverage, rights, health, freshness, and uncertainty remain explicit.", + "introduced": "0.1.0", + "references": ["MASA Core 0.2.0, section 5.3"], + "nonEquivalentTo": ["causal certainty", "representation"] + }, + { + "id": "masa:Representation", + "label": "Representation", + "termStatus": "working-term", + "provenanceClass": "mixed", + "definition": "A material or digital carrier available to a system, such as a file, stream, signal, buffer, dataset, prompt, image, mesh, or performance capture.", + "introduced": "0.1.0", + "references": ["MASA Core 0.2.0, section 5.4"], + "nonEquivalentTo": ["original event", "MatterRecord"] + }, + { + "id": "masa:Encounter", + "label": "Encounter", + "termStatus": "working-term", + "provenanceClass": "mixed", + "definition": "The situated moment and access conditions through which matter enters a research or operational process.", + "introduced": "0.1.0", + "references": ["MASA Core 0.2.0, section 5.5"], + "nonEquivalentTo": ["capture", "complete event"] + }, + { + "id": "masa:Aperture", + "label": "Aperture", + "termStatus": "adapted-term", + "provenanceClass": "project-corpus", + "definition": "The channels, ranges, windows, thresholds, preprocessing, exclusions, and blind spots through which observation or listening becomes possible.", + "introduced": "0.1.0", + "references": ["The Agentic Auditum", "MASA Core 0.2.0, section 5.5"], + "nonEquivalentTo": ["neutral access", "complete sensorium"] + }, + { + "id": "masa:ListeningPass", + "label": "ListeningPass", + "termStatus": "working-term", + "provenanceClass": "mixed", + "definition": "An attributable, situated human or machine-assisted listening account under declared modes and an aperture.", + "introduced": "0.1.0", + "references": ["MASA Core 0.2.0, section 5.5"], + "nonEquivalentTo": ["final truth", "audio classification"] + }, + { + "id": "masa:Claim", + "label": "Claim", + "termStatus": "working-term", + "provenanceClass": "project-corpus", + "definition": "A typed statement whose evidential basis is heard, measured, inferred, interpreted, speculative, or undetermined.", + "introduced": "0.1.0", + "references": ["MASA Core 0.2.0, section 5.6"], + "nonEquivalentTo": ["confidence", "actor", "source health", "freshness", "disclosure"] + }, + { + "id": "masa:OperationReceipt", + "label": "OperationReceipt", + "termStatus": "working-term", + "provenanceClass": "mixed", + "definition": "An immutable account of an attempted operation, its inputs, outputs, actors, method, parameters, policy evaluation, status, and reversibility.", + "introduced": "0.1.0", + "references": ["MASA Core 0.2.0, section 5.8"], + "nonEquivalentTo": ["successful output", "permission"] + }, + { + "id": "masa:Relation", + "label": "Relation", + "termStatus": "working-term", + "provenanceClass": "mixed", + "definition": "An attributable typed assertion connecting two identified objects without implying equivalence.", + "introduced": "0.1.0", + "references": ["MASA Core 0.2.0, section 5.9"], + "nonEquivalentTo": ["identity", "ownership"] + }, + { + "id": "masa:Mapping", + "label": "Mapping", + "termStatus": "working-term", + "provenanceClass": "mixed", + "definition": "An authored relation from a source observation or derived field to a target parameter, including normalization, ranges, curve, smoothing, missing-data behavior, and epistemic note.", + "introduced": "0.1.0", + "references": ["MASA Mapping profile 0.2.0"], + "nonEquivalentTo": ["source voice", "source observation", "synthesis"] + }, + { + "id": "masa:Policy", + "label": "Policy", + "termStatus": "working-term", + "provenanceClass": "mixed", + "definition": "A machine-readable account of permissions, prohibitions, duties, unknowns, validity, authority basis, and review routes.", + "introduced": "0.1.0", + "references": ["MASA Core 0.2.0, section 5.10", "MASA policy and disclosure 0.2.0"], + "nonEquivalentTo": ["consent", "jurisdiction", "ethical legitimacy", "runtime authority"] + }, + { + "id": "masa:Context", + "label": "Context", + "termStatus": "working-term", + "provenanceClass": "mixed", + "definition": "A historical, territorial, ecological, institutional, compositional, cosmological, technical, or namespaced frame with declared provenance and claim status.", + "introduced": "0.1.0", + "references": ["MASA Core 0.2.0, section 5.11"], + "nonEquivalentTo": ["universal background", "neutral metadata"] + }, + { + "id": "masa:material-transduction", + "label": "material transduction", + "termStatus": "working-term", + "provenanceClass": "curator-directive", + "definition": "An inspectable passage among material events, observations, data relations, sonic controls, renders, and renewed listening.", + "introduced": "0.1.0", + "references": ["MASA relation registry 0.2.0, masa:transduced-from"], + "nonEquivalentTo": ["literal source sound", "unmediated conversion"] + }, + { + "id": "research:acoulogy", + "label": "acoulogy", + "termStatus": "source-term", + "provenanceClass": "external-source", + "definition": "A discipline concerned with what is heard and the processes through which listening forms its objects; retained with Schaeffer and Chion lineage visible.", + "introduced": "0.1.0", + "attributedTo": ["Pierre Schaeffer", "Michel Chion"], + "sourceIds": ["src-20260718-treatise-on-musical-objects--an-essay-ac-4e795a70", "src-20260718-sound-an-acoulogical-treatise-d5cede55"], + "references": ["Pierre Schaeffer, Treatise on Musical Objects", "Michel Chion, Sound: An Acoulogical Treatise"], + "nonEquivalentTo": ["acoustics", "automatic classification"] + }, + { + "id": "research:auditum", + "label": "auditum", + "termStatus": "adapted-term", + "provenanceClass": "mixed", + "definition": "Something heard in Chion's acoulogical account; the Algoacoulogy program extends it as a wider mode-open relational field.", + "introduced": "0.1.0", + "attributedTo": ["Michel Chion", "Algoacoulogy adaptation"], + "sourceIds": ["src-20260718-sound-an-acoulogical-treatise-d5cede55", "src-20260718-the-agentic-auditum-listening-as-a-progr-423ebe1d"], + "references": ["Michel Chion, Sound: An Acoulogical Treatise", "The Agentic Auditum"], + "nonEquivalentTo": ["sound object", "physical wave", "MatterRecord"] + }, + { + "id": "research:sound-object", + "label": "sound object", + "termStatus": "source-term", + "provenanceClass": "external-source", + "definition": "A perceptual object constituted through a disciplined listening cut in the Schaefferian lineage.", + "introduced": "0.1.0", + "attributedTo": ["Pierre Schaeffer"], + "sourceIds": ["src-20260718-treatise-on-musical-objects--an-essay-ac-4e795a70"], + "references": ["Pierre Schaeffer, Treatise on Musical Objects"], + "nonEquivalentTo": ["sounding body", "auditum", "MatterRecord"] + }, + { + "id": "research:microsound", + "label": "microsound", + "termStatus": "source-term", + "provenanceClass": "external-source", + "definition": "Sonic events below the conventional note and their organization across nested temporal scales; one scale within sonic matter.", + "introduced": "0.1.0", + "attributedTo": ["Curtis Roads"], + "sourceIds": ["src-20260718-75003-pdf-0a7c9e6f"], + "references": ["Curtis Roads, Microsound"], + "nonEquivalentTo": ["sonic matter as a whole", "universal sonic atom"] + }, + { + "id": "research:grain", + "label": "grain", + "termStatus": "source-term", + "provenanceClass": "external-source", + "definition": "An elementary enveloped signal on the micro time scale, shorter than a note, whose combination by the hundreds or thousands per second generates textures, streams, and clouds.", + "introduced": "0.1.0", + "attributedTo": ["Curtis Roads"], + "sourceIds": ["src-20260718-composing-electronic-music-a-new-aesthet-924507c9", "src-20260718-75003-pdf-0a7c9e6f"], + "references": ["Curtis Roads, Composing Electronic Music: A New Aesthetic, chapter 2", "Curtis Roads, Microsound"], + "nonEquivalentTo": ["note", "sample", "sound object", "the granulated source"] + }, + { + "id": "research:granulation", + "label": "granulation", + "termStatus": "source-term", + "provenanceClass": "external-source", + "definition": "The decomposition of a representation into grains under a declared grain scheme, making duration, envelope, density, and selection order compositional parameters; coalescence and evaporation are density effects, not properties of the source.", + "introduced": "0.1.0", + "attributedTo": ["Curtis Roads"], + "sourceIds": ["src-20260718-composing-electronic-music-a-new-aesthet-924507c9", "src-20260718-75003-pdf-0a7c9e6f"], + "references": ["Curtis Roads, Composing Electronic Music: A New Aesthetic, chapter 4"], + "nonEquivalentTo": ["destruction of the source", "the source event", "time-stretching"] + }, + { + "id": "research:grain-cloud", + "label": "grain cloud", + "termStatus": "source-term", + "provenanceClass": "external-source", + "definition": "A statistical population of grains perceived as one texture, whose density controls opacity: increasing density induces coalescence and tone fusion, decreasing density induces evaporation.", + "introduced": "0.1.0", + "attributedTo": ["Curtis Roads"], + "sourceIds": ["src-20260718-composing-electronic-music-a-new-aesthet-924507c9"], + "references": ["Curtis Roads, Composing Electronic Music: A New Aesthetic, chapters 4 and 9"], + "nonEquivalentTo": ["score", "the granulated source", "a continuous tone"] + }, + { + "id": "research:stratosound", + "label": "stratosound", + "termStatus": "source-term", + "provenanceClass": "external-source", + "definition": "Osetinsky's aesthetic of emancipating sounds from their spectral contexts, complementing the temporal separations of musique concrete and microsound with separation along the frequency axis.", + "introduced": "0.1.0", + "attributedTo": ["Paul Osetinsky"], + "sourceIds": ["src-20260718-stratosound-e158718d"], + "references": ["Paul Osetinsky, Stratosound, Dartmouth College, 2010"], + "nonEquivalentTo": ["spectral filtering", "microsound", "equalization"] + }, + { + "id": "research:stratum", + "label": "stratum", + "termStatus": "source-term", + "provenanceClass": "external-source", + "definition": "A time-frequency layer separated from a sound along its frequency axis and perceivable or manipulable independently of the multilayered original.", + "introduced": "0.1.0", + "attributedTo": ["Paul Osetinsky"], + "sourceIds": ["src-20260718-stratosound-e158718d"], + "references": ["Paul Osetinsky, Stratosound, Dartmouth College, 2010"], + "nonEquivalentTo": ["frequency band", "temporal fragment", "the whole sound"] + }, + { + "id": "research:deep-listening", + "label": "Deep Listening", + "termStatus": "source-term", + "provenanceClass": "external-source", + "definition": "Pauline Oliveros's cultivated expansion of attention across acoustic and psychological dimensions.", + "introduced": "0.1.0", + "attributedTo": ["Pauline Oliveros"], + "sourceIds": ["src-20260718-deep-listening--una-practica-para-la-com-58d2020d"], + "references": ["Pauline Oliveros, Deep Listening: A Composer's Sound Practice"], + "nonEquivalentTo": ["long-window model processing"] + }, + { + "id": "research:sonic-possible-world", + "label": "sonic possible world", + "termStatus": "source-term", + "provenanceClass": "external-source", + "definition": "A contingent world produced and accessed through participation in listening.", + "introduced": "0.1.0", + "attributedTo": ["Salome Voegelin"], + "sourceIds": ["src-20260718-sonic-possible-worlds-revised-edition-add72a60"], + "references": ["Salome Voegelin, Sonic Possible Worlds, revised edition"], + "nonEquivalentTo": ["source fact"] + }, + { + "id": "research:cosmotechnics", + "label": "cosmotechnics", + "termStatus": "source-term", + "provenanceClass": "external-source", + "definition": "Plural relations among technical activity, moral order, and cosmological understanding in Yuk Hui's program.", + "introduced": "0.1.0", + "attributedTo": ["Yuk Hui"], + "sourceIds": ["src-20260718-fragmentar-el-futuro-706cb2d5"], + "references": ["Yuk Hui, Fragmentar el futuro"], + "nonEquivalentTo": ["interface theme", "one universal technology"] + }, + { + "id": "research:chixi", + "label": "ch'ixi", + "termStatus": "source-term", + "provenanceClass": "external-source", + "definition": "Conflictual coexistence of heterogeneous elements without fusion, retained with its decolonial stakes visible.", + "introduced": "0.1.0", + "attributedTo": ["Silvia Rivera Cusicanqui"], + "sourceIds": ["src-20260718-chixinakax-utxiwa-una-reflexion-sobre-pr-ec8391de"], + "references": ["Silvia Rivera Cusicanqui, Ch'ixinakax utxiwa"], + "nonEquivalentTo": ["frictionless hybridity", "harmonious synthesis"] + }, + { + "id": "research:hungry-listening", + "label": "hungry listening", + "termStatus": "source-term", + "provenanceClass": "external-source", + "definition": "Dylan Robinson's account of extractive settler-colonial listening organized by normative appetite and certainty.", + "introduced": "0.1.0", + "attributedTo": ["Dylan Robinson"], + "sourceIds": ["src-20260718-hungry-listening--resonant-theory-for-in-01290dcc"], + "references": ["Dylan Robinson, Hungry Listening"], + "nonEquivalentTo": ["curiosity", "more data"] + }, + { + "id": "project:coded-silence", + "label": "coded silence", + "termStatus": "project-term", + "provenanceClass": "project-corpus", + "definition": "Typed capacities for waiting, abstention, opacity, forgetting, refusal, and non-action.", + "introduced": "0.1.0", + "sourceIds": ["src-20260718-the-algorithmic-acoulogy-manifesto-956dc0ee"], + "references": ["The Algorithmic Acoulogy Manifesto"], + "nonEquivalentTo": ["missing data", "failure", "low signal"] + }, + { + "id": "project:listening-covenant", + "label": "listening covenant", + "termStatus": "project-term", + "provenanceClass": "project-corpus", + "definition": "A human-written agreement governing capture, processing, disclosure, retention, precision, and refusal.", + "introduced": "0.1.0", + "sourceIds": ["src-20260718-the-listening-stack-agentic-sonic-comput-93044aec"], + "references": ["The Listening Stack: Agentic Sonic Computing"], + "nonEquivalentTo": ["license", "automatic consent", "runtime authority"] + }, + { + "id": "masa:Observation", + "label": "Observation", + "termStatus": "working-term", + "provenanceClass": "mixed", + "definition": "A source-bound field account whose value or explicit absence remains separate from its epistemic status, temporal character, signal kind, health, freshness, method, and disclosure.", + "introduced": "0.2.0", + "decisionRefs": ["RFC 0002: Observation profile"], + "references": ["MASA Observation profile 0.2.0"], + "nonEquivalentTo": ["claim", "mapping", "control value", "source voice"] + }, + { + "id": "masa:epistemicStatus", + "label": "epistemic status", + "termStatus": "working-term", + "provenanceClass": "mixed", + "definition": "The declared evidential character of an observation: measured, reported, derived, inferred, interpreted, speculative, or undetermined.", + "introduced": "0.2.0", + "decisionRefs": ["RFC 0002: Observation profile"], + "references": ["MASA Observation profile 0.2.0"], + "nonEquivalentTo": ["confidence", "source health", "freshness", "disclosure"] + }, + { + "id": "masa:temporalCharacter", + "label": "temporal character", + "termStatus": "working-term", + "provenanceClass": "mixed", + "definition": "The way an observation relates to time: event, stream, forecast, aggregate, context, or local state.", + "introduced": "0.2.0", + "decisionRefs": ["RFC 0002: Observation profile"], + "references": ["MASA Observation profile 0.2.0"], + "nonEquivalentTo": ["freshness", "cadence", "timestamp", "latency"] + }, + { + "id": "masa:signalKind", + "label": "signal kind", + "termStatus": "working-term", + "provenanceClass": "mixed", + "definition": "Whether a signal-bearing observation is an acquired observation, an explicitly derived value, or an authored generator state.", + "introduced": "0.2.0", + "decisionRefs": ["RFC 0002: Observation profile"], + "references": ["MASA Observation profile 0.2.0"], + "nonEquivalentTo": ["source kind", "claim kind", "control status"] + } + ] +} diff --git a/package.json b/package.json index be3c618..189db71 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sonicfield/masa-workspace", - "version": "0.1.1", + "version": "0.2.0", "private": true, "license": "MIT", "description": "Local-first reference repository for the MASA Sound Matter Aware protocol", diff --git a/packages/bundle/package.json b/packages/bundle/package.json index 0066e05..e1d11b3 100644 --- a/packages/bundle/package.json +++ b/packages/bundle/package.json @@ -1,6 +1,6 @@ { "name": "@sonicfield/masa-bundle", - "version": "0.1.1", + "version": "0.2.0", "description": "Deterministic, bounded MASA directory and ZIP bundle tooling", "type": "module", "private": true, diff --git a/packages/bundle/src/index.test.ts b/packages/bundle/src/index.test.ts index fb0bfca..f8d66f8 100644 --- a/packages/bundle/src/index.test.ts +++ b/packages/bundle/src/index.test.ts @@ -31,11 +31,11 @@ import { const repositoryRoot = fileURLToPath(new URL("../../../", import.meta.url)); const minimalRecordPath = join( repositoryRoot, - "examples/0.1.0/valid/minimal-record.masa.json" + "examples/0.2.0/valid/minimal-record.masa.json" ); const transformationRecordPath = join( repositoryRoot, - "examples/0.1.0/valid/transformation.masa.json" + "examples/0.2.0/valid/transformation.masa.json" ); const temporaryRoots: string[] = []; @@ -321,8 +321,8 @@ async function createBundleDirectory( .sort((left, right) => (left.path < right.path ? -1 : left.path > right.path ? 1 : 0)); const manifest = { manifestType: "masa-bundle", - manifestVersion: "0.1.0", - masaVersion: "0.1.0", + manifestVersion: "0.2.0", + masaVersion: "0.2.0", id: "urn:uuid:10000000-0000-4000-8000-000000000001", createdAt: "2026-07-27T12:00:00Z", createdBy: record.createdBy, diff --git a/packages/core/package.json b/packages/core/package.json index 8005109..895401c 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,9 +1,9 @@ { "name": "@sonicfield/masa", - "version": "0.1.1", + "version": "0.2.0", "private": true, "license": "MIT", - "description": "Browser-safe types and pure utilities for MASA 0.1.0", + "description": "Browser-safe types and pure utilities for MASA 0.2.0", "type": "module", "sideEffects": false, "files": [ diff --git a/packages/core/src/generated/capability-set.ts b/packages/core/src/generated/capability-set.ts index d1a7899..b27b3c5 100644 --- a/packages/core/src/generated/capability-set.ts +++ b/packages/core/src/generated/capability-set.ts @@ -1,6 +1,6 @@ /* eslint-disable */ /** - * Generated from the normative MASA 0.1.0 JSON Schemas. + * Generated from the normative MASA 0.2.0 JSON Schemas. * Do not edit this file. Run pnpm generate after changing schemas. */ @@ -11,8 +11,8 @@ export type JsonValue = (unknown[] | boolean | number | {} | string | null) | un */ export interface CapabilitySet { capabilitySetType: "masa-capability-set"; - capabilitySetVersion: "0.1.0"; - masaVersion: "0.1.0"; + capabilitySetVersion: "0.2.0"; + masaVersion: "0.2.0"; id: string; implementation: { id: string; @@ -23,10 +23,10 @@ export interface CapabilitySet { /** * @minItems 1 */ - capabilities: [MASA010CapabilityDeclaration, ...MASA010CapabilityDeclaration[]]; + capabilities: [MASA020CapabilityDeclaration, ...MASA020CapabilityDeclaration[]]; extensions: ExtensionBag; } -export interface MASA010CapabilityDeclaration { +export interface MASA020CapabilityDeclaration { id: string; type: "masa:Capability"; name: string; diff --git a/packages/core/src/generated/capability.ts b/packages/core/src/generated/capability.ts index 6120637..13d942c 100644 --- a/packages/core/src/generated/capability.ts +++ b/packages/core/src/generated/capability.ts @@ -1,6 +1,6 @@ /* eslint-disable */ /** - * Generated from the normative MASA 0.1.0 JSON Schemas. + * Generated from the normative MASA 0.2.0 JSON Schemas. * Do not edit this file. Run pnpm generate after changing schemas. */ diff --git a/packages/core/src/generated/event.ts b/packages/core/src/generated/event.ts index 8aede19..0bec9b4 100644 --- a/packages/core/src/generated/event.ts +++ b/packages/core/src/generated/event.ts @@ -1,6 +1,6 @@ /* eslint-disable */ /** - * Generated from the normative MASA 0.1.0 JSON Schemas. + * Generated from the normative MASA 0.2.0 JSON Schemas. * Do not edit this file. Run pnpm generate after changing schemas. */ diff --git a/packages/core/src/generated/index.ts b/packages/core/src/generated/index.ts index d6f09c7..0e21593 100644 --- a/packages/core/src/generated/index.ts +++ b/packages/core/src/generated/index.ts @@ -1,6 +1,6 @@ /* eslint-disable */ /** - * Generated from the normative MASA 0.1.0 JSON Schemas. + * Generated from the normative MASA 0.2.0 JSON Schemas. * Do not edit this file. Run pnpm generate after changing schemas. */ diff --git a/packages/core/src/generated/manifest.ts b/packages/core/src/generated/manifest.ts index 025e1d1..e1755b2 100644 --- a/packages/core/src/generated/manifest.ts +++ b/packages/core/src/generated/manifest.ts @@ -1,6 +1,6 @@ /* eslint-disable */ /** - * Generated from the normative MASA 0.1.0 JSON Schemas. + * Generated from the normative MASA 0.2.0 JSON Schemas. * Do not edit this file. Run pnpm generate after changing schemas. */ @@ -9,8 +9,8 @@ export type NonNullJsonValue = unknown[] | boolean | number | {} | string; export interface BundleManifest { manifestType: "masa-bundle"; - manifestVersion: "0.1.0"; - masaVersion: "0.1.0"; + manifestVersion: "0.2.0"; + masaVersion: "0.2.0"; id: string; createdAt: string; createdBy: string; diff --git a/packages/core/src/generated/matter-record.ts b/packages/core/src/generated/matter-record.ts index 24b4592..b77aa6f 100644 --- a/packages/core/src/generated/matter-record.ts +++ b/packages/core/src/generated/matter-record.ts @@ -1,6 +1,6 @@ /* eslint-disable */ /** - * Generated from the normative MASA 0.1.0 JSON Schemas. + * Generated from the normative MASA 0.2.0 JSON Schemas. * Do not edit this file. Run pnpm generate after changing schemas. */ @@ -312,9 +312,9 @@ export type OperationReceipt = { * The normative MASA Core record envelope. Cross-reference, lineage, policy, and profile invariants require semantic validation after JSON Schema validation. */ export interface MatterRecord { - $schema: "https://masa.sonicfield.org/schemas/0.1.0/matter-record.schema.json"; - "@context"?: "https://masa.sonicfield.org/contexts/0.1.0/masa.jsonld" | [string | {}, ...(string | {})[]]; - masaVersion: "0.1.0"; + $schema: "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json"; + "@context"?: "https://masa.sonicfield.org/contexts/0.2.0/masa.jsonld" | [string | {}, ...(string | {})[]]; + masaVersion: "0.2.0"; id: string; type: "masa:MatterRecord"; revision: number; @@ -331,6 +331,7 @@ export interface MatterRecord { | "transformation" | "generation" | "processing" + | "observation" | "mapping" | "agent" | "publication" @@ -343,6 +344,7 @@ export interface MatterRecord { | "transformation" | "generation" | "processing" + | "observation" | "mapping" | "agent" | "publication" @@ -439,7 +441,7 @@ export interface MatterRecord { policies: [Policy, ...Policy[]]; contexts: Context[]; agentRuns: AgentRun[]; - capabilities: MASA010CapabilityDeclaration[]; + capabilities: MASA020CapabilityDeclaration[]; publication?: Publication; integrity: | { @@ -1427,6 +1429,9 @@ export interface Observation { method: Method; health: SourceHealth; freshness: Freshness; + epistemicStatus?: "measured" | "reported" | "derived" | "inferred" | "interpreted" | "speculative" | "undetermined"; + temporalCharacter?: "event" | "stream" | "forecast" | "aggregate" | "context" | "local"; + signalKind?: "observation" | "derived" | "generator"; claimRef?: string; disclosure: "public" | "private" | "restricted" | "withheld" | "redacted"; extensions: ExtensionBag; @@ -1685,7 +1690,7 @@ export interface AgentRun { outcome: "completed" | "partial" | "failed" | "refused" | "cancelled" | "not_performed" | "undetermined"; extensions: ExtensionBag; } -export interface MASA010CapabilityDeclaration { +export interface MASA020CapabilityDeclaration { id: string; type: "masa:Capability"; name: string; diff --git a/packages/core/src/generated/ontology.ts b/packages/core/src/generated/ontology.ts index 0f04de6..52757fc 100644 --- a/packages/core/src/generated/ontology.ts +++ b/packages/core/src/generated/ontology.ts @@ -1,14 +1,14 @@ /* eslint-disable */ /** - * Generated from the normative MASA 0.1.0 JSON Schemas. + * Generated from the normative MASA 0.2.0 JSON Schemas. * Do not edit this file. Run pnpm generate after changing schemas. */ export const relationRegistry = { "registryType": "masa-relation-registry", - "registryVersion": "0.1.0", - "masaVersion": "0.1.0", - "namespace": "https://masa.sonicfield.org/vocab/0.1.0#", + "registryVersion": "0.2.0", + "masaVersion": "0.2.0", + "namespace": "https://masa.sonicfield.org/vocab/0.2.0#", "relations": [ { "id": "masa:derived-from", diff --git a/packages/core/src/generated/protocol-resources.ts b/packages/core/src/generated/protocol-resources.ts index 73b92f4..7ad8383 100644 --- a/packages/core/src/generated/protocol-resources.ts +++ b/packages/core/src/generated/protocol-resources.ts @@ -1,54 +1,54 @@ /* eslint-disable */ /** - * Generated from the normative MASA 0.1.0 JSON Schemas. + * Generated from the normative MASA 0.2.0 JSON Schemas. * Do not edit this file. Run pnpm generate after changing schemas. */ export const protocolResources = [ { "name": "masa-core", - "uri": "masa://spec/0.1.0/core", + "uri": "masa://spec/0.2.0/core", "mimeType": "text/markdown", - "text": "# MASA Core 0.1.0\n\nStatus: normative local protocol release\n\nVersion: `0.1.0`\nCanonical schema: `https://masa.sonicfield.org/schemas/0.1.0/matter-record.schema.json`\n\nThe key words **MUST**, **MUST NOT**, **REQUIRED**, **SHOULD**, **SHOULD NOT**, and **MAY** indicate conformance requirements.\n\n## 1. Purpose\n\nMASA is a language-neutral protocol for carrying inspectable accounts of sound as matter across software, scripts, archives, instruments, and agentic workflows. It is informed by a preserved research corpus on listening and sonic matter, attributed term by term in the vocabulary registries, but it does not turn that theory into mandatory data.\n\nThe Core connects sources, representations, encounters, claims, operations, actors, policies, contexts, and lineage. A MatterRecord is an envelope around these relations. It is not the physical event, an audio asset, a sound object, an auditum, or a final description of sound.\n\n## 2. Conformance surface\n\nA conforming document MUST:\n\n1. be valid JSON without duplicate object keys or the prohibited `__proto__` member name;\n2. declare `masaVersion: \"0.1.0\"` and the `core` profile;\n3. validate against the Core JSON Schema without remote schema retrieval;\n4. pass the semantic invariants in Section 8;\n5. keep extensions inside the namespaced `extensions` object;\n6. preserve unknown extensions during ordinary Reader and Writer round trips or report an explicit incompatibility;\n7. carry an explicit policy state, including when authority is unknown;\n8. distinguish claim kind, actor, confidence, health, freshness, and disclosure.\n\nConformance is reported for an exact MASA version, profile, conformance class, implementation version, and test suite. “MASA-compatible” without that tuple is not a conformance claim.\n\n## 3. Qualified states\n\nRequired knowledge that may be missing or protected uses a qualified state rather than `null` or an empty string:\n\n| State | Meaning |\n| --- | --- |\n| `known` | A non-null value is asserted and its provenance can be named. |\n| `unknown` | The record cannot currently establish a value; a reason is required. |\n| `withheld` | A value exists or may exist but policy prevents disclosure; policy references are required. |\n| `unavailable` | An operational dependency or representation cannot be accessed; a reason is required. |\n| `deleted` | A previously held value was removed; a reason and deletion receipt reference are required. |\n| `not_applicable` | The field does not apply to this object or profile. |\n\n`known` with `null` is invalid because it collapses all qualified absence states. Omission means “not asserted by this profile.” It does not mean unknown, withheld, deleted, or empty.\n\n## 4. Identifiers and versions\n\n- Every record and stored entity MUST have a globally unique absolute identifier.\n- The reference implementation generates `urn:uuid:` identifiers. Other absolute identifiers MAY be used.\n- A content digest identifies exact bytes. It MUST NOT be used as the sole semantic identity, authorship claim, ownership claim, or consent record.\n- `masaVersion` identifies the normative protocol version. Records MUST NOT use `latest` as a stored version.\n- A revised account increments `revision` and declares `supersedes` when applicable. A transformation creates a descendant representation rather than changing the bytes behind an existing representation identifier.\n\n## 5. Core objects\n\n### 5.1 MatterRecord\n\nA MatterRecord contains the shared envelope and at least one Actor, one Representation, and one Policy. It declares its profiles, revision, creator, disclosure, registers, scales, relations, and event history. Arrays that have no current members remain empty only when the schema permits them.\n\n### 5.2 Actor\n\nAn Actor is a human, community, organization, software system, agent, model, or instrument participating in a claim or operation. Actor identity MAY be pseudonymous, opaque, or withheld. `user` is an actor origin, never a confidence value.\n\n### 5.3 Source\n\nA Source records origin or causal reference and the status of that identification. Known file origin does not prove physical, social, or represented cause. Source coverage, authority, rights, health, and freshness remain explicit.\n\n### 5.4 Representation\n\nA Representation is a carrier available to a system: file, stream, buffer, data series, prompt, image, mesh, score, model output, performance capture, or another supported medium. A representation declares availability, disclosure, location state, policy, and integrity state. `source-representation` means the preserved input to this lineage, not unmediated reality.\n\n### 5.5 Encounter, Aperture, and ListeningPass\n\nAn Encounter situates how matter entered a process. An Aperture records selection and conditioning such as channels, ranges, windows, thresholds, preprocessing, exclusions, and blind spots. A ListeningPass connects actors, representations, an aperture, listening modes, context, claims, and an outcome. Human listening and machine audition MAY be related but MUST remain non-equivalent actor and method states.\n\n### 5.6 Claim\n\nThe only Core claim kinds are:\n\n`heard | measured | inferred | interpreted | speculative | undetermined`\n\n- `heard` names a situated perceptual or operational registration and requires a listening route or method.\n- `measured` requires a value, unit, method, window or range, and uncertainty or calibration state.\n- `inferred` requires evidence inputs and a named rule, model, comparison, or method.\n- `interpreted` requires a declared position or contextual frame.\n- `speculative` requires a rationale and an explicit boundary from source observation.\n- `undetermined` requires a reason such as missing, conflicting, restricted, stale, ambiguous, out of scope, or not performed.\n\nRemembering and translation are provenance or method. Human or model authorship is actor provenance. Withholding is disclosure. None is a claim kind.\n\n### 5.7 Confidence, health, freshness, and disclosure\n\nConfidence is either `not_assessed` or an assessed expression with a method and scale. A `high`, `medium`, or `low` class is valid only when the scale and method are named.\n\nSource health records operational state such as healthy, degraded, unavailable, or error. Freshness records observation, retrieval, expiry, and current or stale status. Disclosure records public, private, restricted, withheld, or redacted state. These axes MUST NOT be merged.\n\n### 5.8 OperationReceipt and history\n\nAn OperationReceipt records one attempted operation, including completed, failed, refused, cancelled, partial, undetermined, and not-performed outcomes. It carries actors, inputs, outputs, tool and method, parameters, policy evaluation, determinism, reversibility, warnings, errors, and claims.\n\nHistory uses exactly one mode:\n\n- `embedded`, with complete receipts inside a standalone `.masa.json` record; or\n- `external`, with an `events.ndjson` reference and an ordered list of event identifiers inside a bundle.\n\nThe two modes prevent an embedded event history and an external log from silently disagreeing.\n\n### 5.9 Relation and lineage\n\nRelations are explicit assertions with subject, predicate, object, actor, time, and basis. The relation registry declares whether the subject or object is the descendant for causal-lineage traversal; inverse syntax therefore produces the same directed lineage. Derivation and version relations form an acyclic graph. Epistemic relations such as support, contradiction, difference, and incomparability MAY be cyclic.\n\nLineage records derivation and responsibility. It does not settle authorship, ownership, license, consent, or ethical legitimacy.\n\n### 5.10 Policy and evaluation\n\nA Policy states an issuer, authority basis, status, disclosure, rules, targets, actions, validity, and review route. A PolicyEvaluation applies one or more policies to one operation and target. Runtime authority and policy permission are independent; both must allow a consequential action.\n\nUnknown authority MUST NOT authorize publication, external upload, identification, precise-location disclosure, training, deletion, or another consequential external action.\n\n### 5.11 Context and integrity\n\nContext may be historical, territorial, ecological, institutional, compositional, cosmological, technical, or another namespaced frame. It declares provenance and claim status.\n\nIntegrity records algorithm, digest, byte size, verification status, and verification time. Integrity verifies referenced bytes under a method; it does not establish their meaning or legitimacy.\n\n## 6. Registers and scales\n\nCore registers are physical-event, perceptual-acoulogical, compositional-transformational, digital-technical, ecological-territorial, historical-political, and cosmological-speculative.\n\nCore scales are microtemporal, spectral-stratal, object-event, meso-form, environmental, corpus-lineage, infrastructural, planetary, and cosmic. Implementations MAY add namespaced registers and scales without changing the meaning of Core values. A scale label SHOULD include actual windows, ranges, resolution, and source coverage when known. Planetary is not universal, and microsound is one scale rather than the whole of sonic matter.\n\n## 7. Extensions\n\nAll extension data MUST appear in an `extensions` object with namespaced keys. Core schemas reject unknown top-level properties to catch misspellings. A namespace identifies its governing implementation or community; it does not imply affiliation with the MASA reference repository.\n\nReaders MUST preserve unsupported extension values semantically and report them. Publishers MUST exclude unsupported extensions unless an approved publication schema and policy apply to the exact projection.\n\n## 8. Semantic invariants\n\nAfter JSON Schema validation, an implementation MUST enforce:\n\n1. all entity identifiers are unique inside the record or bundle;\n2. all required local references resolve; explicitly external, withheld, unavailable, or deleted references remain typed as such;\n3. profile declarations match their required entities and behavior;\n4. local event identifiers and sequence numbers are unique and sequence order is monotonic;\n5. wall-clock time does not establish distributed causal order;\n6. relations that the versioned registry marks acyclic — derivation, version, structural containment, and related registered categories — form one acyclic directed graph;\n7. completed consequential operations include a policy evaluation;\n8. a transform, isolate, segment, render, or generation output never reuses its input Representation identifier;\n9. every descendant representation has a parent relation and generating operation;\n10. an immutable included representation cannot change digest under the same identifier;\n11. a refused or withheld receipt does not reconstruct protected content;\n12. publication and deletion are irreversible; interface undo is not a material inverse;\n13. a deletion tombstone retains only independently authorized fields;\n14. unknown extension data survives local Reader and Writer round trips;\n15. public projections contain no absolute local paths, credentials, private endpoints, protected precision, restricted media, or unapproved extensions.\n16. references that name a protocol role resolve to the correct entity kind, not merely to any reused identifier;\n17. temporal windows, freshness intervals, policy validity, and operation intervals preserve their declared order;\n18. a permitted public projection cites an active public rule that explicitly permits the exact publish action and target under known authority.\n\n## 9. Validation phases\n\nReference validation runs in this order:\n\n1. JSON syntax and duplicate-key safety;\n2. JSON Schema 2020-12 structure;\n3. reference closure, identity, event, and lineage semantics;\n4. declared profile invariants;\n5. policy, disclosure, public-safety, and bundle integrity checks.\n\nStructural validity does not prove a claim true, a policy legitimate, a transformation reproducible, or publication authorized.\n\n## 10. Non-equivalence register\n\nConforming systems preserve at least these distinctions:\n\n- physical event ≠ signal ≠ representation ≠ MatterRecord;\n- source origin ≠ causal attribution;\n- sounding body ≠ perceptual sound matter;\n- sound object ≠ auditum;\n- recording ≠ original event;\n- feature or measurement ≠ perceived quality;\n- claim kind ≠ confidence ≠ actor ≠ health ≠ freshness ≠ disclosure;\n- mapping ≠ source voice;\n- observation ≠ derived index ≠ mapping ≠ synthesis ≠ performance ≠ speculation;\n- copy ≠ encoding derivative ≠ continuation ≠ inpaint ≠ variation ≠ mutation ≠ graft;\n- lineage ≠ authorship, ownership, license, consent, or ethical legitimacy;\n- technical access ≠ authority;\n- interface undo ≠ verified inverse;\n- plurality ≠ fusion;\n- silence, missing data, timeout, withholding, refusal, and low signal are not interchangeable.\n" + "text": "# MASA Core 0.2.0\n\nStatus: normative local protocol release\n\nVersion: `0.2.0`\nCanonical schema: `https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json`\n\nThe key words **MUST**, **MUST NOT**, **REQUIRED**, **SHOULD**, **SHOULD NOT**, and **MAY** indicate conformance requirements.\n\n## 1. Purpose\n\nMASA is a language-neutral protocol for carrying inspectable accounts of sound as matter across software, scripts, archives, instruments, and agentic workflows. It is informed by a preserved research corpus on listening and sonic matter, attributed term by term in the vocabulary registries, but it does not turn that theory into mandatory data.\n\nThe Core connects sources, representations, encounters, claims, operations, actors, policies, contexts, and lineage. A MatterRecord is an envelope around these relations. It is not the physical event, an audio asset, a sound object, an auditum, or a final description of sound.\n\n## 2. Conformance surface\n\nA conforming document MUST:\n\n1. be valid JSON without duplicate object keys or the prohibited `__proto__` member name;\n2. declare `masaVersion: \"0.2.0\"` and the `core` profile;\n3. validate against the Core JSON Schema without remote schema retrieval;\n4. pass the semantic invariants in Section 8;\n5. keep extensions inside the namespaced `extensions` object;\n6. preserve unknown extensions during ordinary Reader and Writer round trips or report an explicit incompatibility;\n7. carry an explicit policy state, including when authority is unknown;\n8. distinguish claim kind, actor, confidence, health, freshness, and disclosure.\n\nConformance is reported for an exact MASA version, profile, conformance class, implementation version, and test suite. “MASA-compatible” without that tuple is not a conformance claim.\n\n## 3. Qualified states\n\nRequired knowledge that may be missing or protected uses a qualified state rather than `null` or an empty string:\n\n| State | Meaning |\n| --- | --- |\n| `known` | A non-null value is asserted and its provenance can be named. |\n| `unknown` | The record cannot currently establish a value; a reason is required. |\n| `withheld` | A value exists or may exist but policy prevents disclosure; policy references are required. |\n| `unavailable` | An operational dependency or representation cannot be accessed; a reason is required. |\n| `deleted` | A previously held value was removed; a reason and deletion receipt reference are required. |\n| `not_applicable` | The field does not apply to this object or profile. |\n\n`known` with `null` is invalid because it collapses all qualified absence states. Omission means “not asserted by this profile.” It does not mean unknown, withheld, deleted, or empty.\n\n## 4. Identifiers and versions\n\n- Every record and stored entity MUST have a globally unique absolute identifier.\n- The reference implementation generates `urn:uuid:` identifiers. Other absolute identifiers MAY be used.\n- A content digest identifies exact bytes. It MUST NOT be used as the sole semantic identity, authorship claim, ownership claim, or consent record.\n- `masaVersion` identifies the normative protocol version. Records MUST NOT use `latest` as a stored version.\n- A revised account increments `revision` and declares `supersedes` when applicable. A transformation creates a descendant representation rather than changing the bytes behind an existing representation identifier.\n\n## 5. Core objects\n\n### 5.1 MatterRecord\n\nA MatterRecord contains the shared envelope and at least one Actor, one Representation, and one Policy. It declares its profiles, revision, creator, disclosure, registers, scales, relations, and event history. Arrays that have no current members remain empty only when the schema permits them.\n\n### 5.2 Actor\n\nAn Actor is a human, community, organization, software system, agent, model, or instrument participating in a claim or operation. Actor identity MAY be pseudonymous, opaque, or withheld. `user` is an actor origin, never a confidence value.\n\n### 5.3 Source\n\nA Source records origin or causal reference and the status of that identification. Known file origin does not prove physical, social, or represented cause. Source coverage, authority, rights, health, and freshness remain explicit.\n\n### 5.4 Representation\n\nA Representation is a carrier available to a system: file, stream, buffer, data series, prompt, image, mesh, score, model output, performance capture, or another supported medium. A representation declares availability, disclosure, location state, policy, and integrity state. `source-representation` means the preserved input to this lineage, not unmediated reality.\n\n### 5.5 Encounter, Aperture, and ListeningPass\n\nAn Encounter situates how matter entered a process. An Aperture records selection and conditioning such as channels, ranges, windows, thresholds, preprocessing, exclusions, and blind spots. A ListeningPass connects actors, representations, an aperture, listening modes, context, claims, and an outcome. Human listening and machine audition MAY be related but MUST remain non-equivalent actor and method states.\n\n### 5.6 Claim\n\nThe only Core claim kinds are:\n\n`heard | measured | inferred | interpreted | speculative | undetermined`\n\n- `heard` names a situated perceptual or operational registration and requires a listening route or method.\n- `measured` requires a value, unit, method, window or range, and uncertainty or calibration state.\n- `inferred` requires evidence inputs and a named rule, model, comparison, or method.\n- `interpreted` requires a declared position or contextual frame.\n- `speculative` requires a rationale and an explicit boundary from source observation.\n- `undetermined` requires a reason such as missing, conflicting, restricted, stale, ambiguous, out of scope, or not performed.\n\nRemembering and translation are provenance or method. Human or model authorship is actor provenance. Withholding is disclosure. None is a claim kind.\n\n### 5.7 Confidence, health, freshness, and disclosure\n\nConfidence is either `not_assessed` or an assessed expression with a method and scale. A `high`, `medium`, or `low` class is valid only when the scale and method are named.\n\nSource health records operational state such as healthy, degraded, unavailable, or error. Freshness records observation, retrieval, expiry, and current or stale status. Disclosure records public, private, restricted, withheld, or redacted state. These axes MUST NOT be merged.\n\n#### Observation epistemics\n\nThe optional Observation profile makes three additional axes normative for every Observation: `epistemicStatus`, `temporalCharacter`, and `signalKind`. They distinguish what kind of account a field carries, how it relates to time, and whether it was acquired, derived, or locally generated. They MUST remain separate from value availability, confidence, Source health, freshness, method, and disclosure.\n\nA stale reported forecast is therefore not rewritten as a measured stream; an unavailable observation does not become numeric zero; and an authored generator cannot fill a missing provider field while retaining the provider's identity. See [`profiles/observation.md`](profiles/observation.md).\n\n### 5.8 OperationReceipt and history\n\nAn OperationReceipt records one attempted operation, including completed, failed, refused, cancelled, partial, undetermined, and not-performed outcomes. It carries actors, inputs, outputs, tool and method, parameters, policy evaluation, determinism, reversibility, warnings, errors, and claims.\n\nHistory uses exactly one mode:\n\n- `embedded`, with complete receipts inside a standalone `.masa.json` record; or\n- `external`, with an `events.ndjson` reference and an ordered list of event identifiers inside a bundle.\n\nThe two modes prevent an embedded event history and an external log from silently disagreeing.\n\n### 5.9 Relation and lineage\n\nRelations are explicit assertions with subject, predicate, object, actor, time, and basis. The relation registry declares whether the subject or object is the descendant for causal-lineage traversal; inverse syntax therefore produces the same directed lineage. Derivation and version relations form an acyclic graph. Epistemic relations such as support, contradiction, difference, and incomparability MAY be cyclic.\n\nLineage records derivation and responsibility. It does not settle authorship, ownership, license, consent, or ethical legitimacy.\n\n### 5.10 Policy and evaluation\n\nA Policy states an issuer, authority basis, status, disclosure, rules, targets, actions, validity, and review route. A PolicyEvaluation applies one or more policies to one operation and target. Runtime authority and policy permission are independent; both must allow a consequential action.\n\nUnknown authority MUST NOT authorize publication, external upload, identification, precise-location disclosure, training, deletion, or another consequential external action.\n\n### 5.11 Context and integrity\n\nContext may be historical, territorial, ecological, institutional, compositional, cosmological, technical, or another namespaced frame. It declares provenance and claim status.\n\nIntegrity records algorithm, digest, byte size, verification status, and verification time. Integrity verifies referenced bytes under a method; it does not establish their meaning or legitimacy.\n\n## 6. Registers and scales\n\nCore registers are physical-event, perceptual-acoulogical, compositional-transformational, digital-technical, ecological-territorial, historical-political, and cosmological-speculative.\n\nCore scales are microtemporal, spectral-stratal, object-event, meso-form, environmental, corpus-lineage, infrastructural, planetary, and cosmic. Implementations MAY add namespaced registers and scales without changing the meaning of Core values. A scale label SHOULD include actual windows, ranges, resolution, and source coverage when known. Planetary is not universal, and microsound is one scale rather than the whole of sonic matter.\n\n## 7. Extensions\n\nAll extension data MUST appear in an `extensions` object with namespaced keys. Core schemas reject unknown top-level properties to catch misspellings. A namespace identifies its governing implementation or community; it does not imply affiliation with the MASA reference repository.\n\nReaders MUST preserve unsupported extension values semantically and report them. Publishers MUST exclude unsupported extensions unless an approved publication schema and policy apply to the exact projection.\n\n## 8. Semantic invariants\n\nAfter JSON Schema validation, an implementation MUST enforce:\n\n1. all entity identifiers are unique inside the record or bundle;\n2. all required local references resolve; explicitly external, withheld, unavailable, or deleted references remain typed as such;\n3. profile declarations match their required entities and behavior;\n4. local event identifiers and sequence numbers are unique and sequence order is monotonic;\n5. wall-clock time does not establish distributed causal order;\n6. relations that the versioned registry marks acyclic — derivation, version, structural containment, and related registered categories — form one acyclic directed graph;\n7. completed consequential operations include a policy evaluation;\n8. a transform, isolate, segment, render, or generation output never reuses its input Representation identifier;\n9. every descendant representation has a parent relation and generating operation;\n10. an immutable included representation cannot change digest under the same identifier;\n11. a refused or withheld receipt does not reconstruct protected content;\n12. publication and deletion are irreversible; interface undo is not a material inverse;\n13. a deletion tombstone retains only independently authorized fields;\n14. unknown extension data survives local Reader and Writer round trips;\n15. public projections contain no absolute local paths, credentials, private endpoints, protected precision, restricted media, or unapproved extensions.\n16. references that name a protocol role resolve to the correct entity kind, not merely to any reused identifier;\n17. temporal windows, freshness intervals, policy validity, and operation intervals preserve their declared order;\n18. a permitted public projection cites an active public rule that explicitly permits the exact publish action and target under known authority.\n\n## 9. Validation phases\n\nReference validation runs in this order:\n\n1. JSON syntax and duplicate-key safety;\n2. JSON Schema 2020-12 structure;\n3. reference closure, identity, event, and lineage semantics;\n4. declared profile invariants;\n5. policy, disclosure, public-safety, and bundle integrity checks.\n\nStructural validity does not prove a claim true, a policy legitimate, a transformation reproducible, or publication authorized.\n\n## 10. Non-equivalence register\n\nConforming systems preserve at least these distinctions:\n\n- physical event ≠ signal ≠ representation ≠ MatterRecord;\n- source origin ≠ causal attribution;\n- sounding body ≠ perceptual sound matter;\n- sound object ≠ auditum;\n- recording ≠ original event;\n- feature or measurement ≠ perceived quality;\n- claim kind ≠ confidence ≠ actor ≠ health ≠ freshness ≠ disclosure;\n- mapping ≠ source voice;\n- observation ≠ derived index ≠ mapping ≠ synthesis ≠ performance ≠ speculation;\n- copy ≠ encoding derivative ≠ continuation ≠ inpaint ≠ variation ≠ mutation ≠ graft;\n- lineage ≠ authorship, ownership, license, consent, or ethical legitimacy;\n- technical access ≠ authority;\n- interface undo ≠ verified inverse;\n- plurality ≠ fusion;\n- silence, missing data, timeout, withholding, refusal, and low signal are not interchangeable.\n" }, { "name": "masa-vocabulary", - "uri": "masa://spec/0.1.0/vocabulary", + "uri": "masa://spec/0.2.0/vocabulary", "mimeType": "text/markdown", - "text": "# MASA vocabulary 0.1.0\n\nThe canonical machine-readable registries are [`ontology/0.1.0/terms.json`](../../ontology/0.1.0/terms.json) and [`relations.json`](../../ontology/0.1.0/relations.json). This document explains their governance.\n\n## Term status\n\n| Status | Meaning |\n| --- | --- |\n| `source-term` | Attested and attributed to external scholarship in the preserved research corpus. |\n| `adapted-term` | A source term explicitly changed by the project. |\n| `project-term` | Established in a preserved implementation or research-project source. |\n| `working-term` | Proposed by the curator, theory, or protocol and still revisable. |\n\nEvery registered term declares namespace, definition, status, attribution, introduction version, source or decision references, and non-equivalences. A wire-format mapping never makes two theoretical concepts equivalent.\n\n## Namespace policy\n\n- `masa:` contains the shared protocol vocabulary.\n- Each implementation, community, or research project chooses and governs its own namespace; `example:` is reserved for non-production examples.\n- Adapter documents in this repository are illustrative archetypes with placeholder namespaces; a concrete application names and governs its own namespace in its own repository, and no application namespace is ever required for MASA conformance.\n- A term can move into `masa:` only after a versioned RFC, source-status review, and evidence from at least two implementations.\n- Promotion never erases the prior namespace or conceptual lineage.\n\n## Relation policy\n\nRelations declare a category, whether they participate in the acyclic derivation graph, and—when applicable—which endpoint is the descendant. Domain metaphors remain implementation extensions. Tradition-specific terms such as ch'ixi, pacha, cosmotechnics, Deep Listening, sound object, and auditum retain attribution and are not generic software labels.\n" + "text": "# MASA vocabulary 0.2.0\n\nThe canonical machine-readable registries are [`ontology/0.2.0/terms.json`](../../ontology/0.2.0/terms.json) and [`relations.json`](../../ontology/0.2.0/relations.json). This document explains their governance.\n\n## Term status\n\n| Status | Meaning |\n| --- | --- |\n| `source-term` | Attested and attributed to external scholarship in the preserved research corpus. |\n| `adapted-term` | A source term explicitly changed by the project. |\n| `project-term` | Established in a preserved implementation or research-project source. |\n| `working-term` | Proposed by the curator, theory, or protocol and still revisable. |\n\nEvery registered term declares namespace, definition, status, attribution, introduction version, source or decision references, and non-equivalences. A wire-format mapping never makes two theoretical concepts equivalent.\n\n## Namespace policy\n\n- `masa:` contains the shared protocol vocabulary.\n- Each implementation, community, or research project chooses and governs its own namespace; `example:` is reserved for non-production examples.\n- Adapter documents in this repository are illustrative archetypes with placeholder namespaces; a concrete application names and governs its own namespace in its own repository, and no application namespace is ever required for MASA conformance.\n- A term can move into `masa:` only after a versioned RFC, source-status review, and evidence from at least two implementations.\n- Promotion never erases the prior namespace or conceptual lineage.\n\n## Relation policy\n\nRelations declare a category, whether they participate in the acyclic derivation graph, and—when applicable—which endpoint is the descendant. Domain metaphors remain implementation extensions. Tradition-specific terms such as ch'ixi, pacha, cosmotechnics, Deep Listening, sound object, and auditum retain attribution and are not generic software labels.\n" } ] as const; export const referenceCapabilitySet = { "capabilitySetType": "masa-capability-set", - "capabilitySetVersion": "0.1.0", - "masaVersion": "0.1.0", - "id": "https://masa.sonicfield.org/capabilities/0.1.0/reference", + "capabilitySetVersion": "0.2.0", + "masaVersion": "0.2.0", + "id": "https://masa.sonicfield.org/capabilities/0.2.0/reference", "implementation": { - "id": "https://masa.sonicfield.org/implementations/typescript-reference/0.1.1", + "id": "https://masa.sonicfield.org/implementations/typescript-reference/0.2.0", "name": "MASA local TypeScript reference", - "version": "0.1.1" + "version": "0.2.0" }, - "generatedAt": "2026-08-09T00:00:00.000Z", + "generatedAt": "2026-08-11T00:00:00.000Z", "capabilities": [ { - "id": "https://masa.sonicfield.org/capabilities/0.1.0/matter.validate", + "id": "https://masa.sonicfield.org/capabilities/0.2.0/matter.validate", "type": "masa:Capability", "name": "matter.validate", "purpose": "Validate one local MASA record or bundle inside a configured root without remote dereferencing.", "supportedMasaVersions": [ - "0.1.0" + "0.2.0" ], "profiles": [ "core" ], "inputSchema": { "state": "known", - "uri": "https://masa.sonicfield.org/schemas/0.1.0/tools/validate-input.schema.json" + "uri": "https://masa.sonicfield.org/schemas/0.2.0/tools/validate-input.schema.json" }, "outputSchema": { "state": "known", - "uri": "https://masa.sonicfield.org/schemas/0.1.0/tools/tool-result.schema.json" + "uri": "https://masa.sonicfield.org/schemas/0.2.0/tools/tool-result.schema.json" }, "resources": { "local": [ @@ -95,23 +95,23 @@ export const referenceCapabilitySet = { "extensions": {} }, { - "id": "https://masa.sonicfield.org/capabilities/0.1.0/matter.inspect", + "id": "https://masa.sonicfield.org/capabilities/0.2.0/matter.inspect", "type": "masa:Capability", "name": "matter.inspect", "purpose": "Return a bounded structural summary and diagnostics for one local MASA artifact.", "supportedMasaVersions": [ - "0.1.0" + "0.2.0" ], "profiles": [ "core" ], "inputSchema": { "state": "known", - "uri": "https://masa.sonicfield.org/schemas/0.1.0/tools/inspect-input.schema.json" + "uri": "https://masa.sonicfield.org/schemas/0.2.0/tools/inspect-input.schema.json" }, "outputSchema": { "state": "known", - "uri": "https://masa.sonicfield.org/schemas/0.1.0/tools/tool-result.schema.json" + "uri": "https://masa.sonicfield.org/schemas/0.2.0/tools/tool-result.schema.json" }, "resources": { "local": [ @@ -158,23 +158,23 @@ export const referenceCapabilitySet = { "extensions": {} }, { - "id": "https://masa.sonicfield.org/capabilities/0.1.0/matter.trace_lineage", + "id": "https://masa.sonicfield.org/capabilities/0.2.0/matter.trace_lineage", "type": "masa:Capability", "name": "matter.trace_lineage", "purpose": "Return a bounded, direction-aware causal lineage subgraph for one entity in a validated local record.", "supportedMasaVersions": [ - "0.1.0" + "0.2.0" ], "profiles": [ "core" ], "inputSchema": { "state": "known", - "uri": "https://masa.sonicfield.org/schemas/0.1.0/tools/trace-lineage-input.schema.json" + "uri": "https://masa.sonicfield.org/schemas/0.2.0/tools/trace-lineage-input.schema.json" }, "outputSchema": { "state": "known", - "uri": "https://masa.sonicfield.org/schemas/0.1.0/tools/tool-result.schema.json" + "uri": "https://masa.sonicfield.org/schemas/0.2.0/tools/tool-result.schema.json" }, "resources": { "local": [ @@ -221,23 +221,23 @@ export const referenceCapabilitySet = { "extensions": {} }, { - "id": "https://masa.sonicfield.org/capabilities/0.1.0/matter.audit_public_export", + "id": "https://masa.sonicfield.org/capabilities/0.2.0/matter.audit_public_export", "type": "masa:Capability", "name": "matter.audit_public_export", "purpose": "Audit a proposed public projection for protocol, policy, path, secret, and disclosure failures.", "supportedMasaVersions": [ - "0.1.0" + "0.2.0" ], "profiles": [ "core" ], "inputSchema": { "state": "known", - "uri": "https://masa.sonicfield.org/schemas/0.1.0/tools/audit-public-input.schema.json" + "uri": "https://masa.sonicfield.org/schemas/0.2.0/tools/audit-public-input.schema.json" }, "outputSchema": { "state": "known", - "uri": "https://masa.sonicfield.org/schemas/0.1.0/tools/tool-result.schema.json" + "uri": "https://masa.sonicfield.org/schemas/0.2.0/tools/tool-result.schema.json" }, "resources": { "local": [ @@ -284,12 +284,12 @@ export const referenceCapabilitySet = { "extensions": {} }, { - "id": "https://masa.sonicfield.org/capabilities/0.1.0/matter.plan_processing", + "id": "https://masa.sonicfield.org/capabilities/0.2.0/matter.plan_processing", "type": "masa:Capability", "name": "matter.plan_processing", "purpose": "Compose and validate one engine-neutral sound-matter processing request without performing any signal processing.", "supportedMasaVersions": [ - "0.1.0" + "0.2.0" ], "profiles": [ "core", @@ -297,11 +297,11 @@ export const referenceCapabilitySet = { ], "inputSchema": { "state": "known", - "uri": "https://masa.sonicfield.org/schemas/0.1.0/tools/plan-processing-input.schema.json" + "uri": "https://masa.sonicfield.org/schemas/0.2.0/tools/plan-processing-input.schema.json" }, "outputSchema": { "state": "known", - "uri": "https://masa.sonicfield.org/schemas/0.1.0/tools/tool-result.schema.json" + "uri": "https://masa.sonicfield.org/schemas/0.2.0/tools/tool-result.schema.json" }, "resources": { "local": [ diff --git a/packages/core/src/generated/version.ts b/packages/core/src/generated/version.ts index 805625e..d71d934 100644 --- a/packages/core/src/generated/version.ts +++ b/packages/core/src/generated/version.ts @@ -1,3 +1,3 @@ /** Generated from synchronized MASA workspace package metadata. */ -export const MASA_PROTOCOL_VERSION = "0.1.0"; -export const MASA_REFERENCE_IMPLEMENTATION_VERSION = "0.1.1"; +export const MASA_PROTOCOL_VERSION = "0.2.0"; +export const MASA_REFERENCE_IMPLEMENTATION_VERSION = "0.2.0"; diff --git a/packages/core/src/index-record.test.ts b/packages/core/src/index-record.test.ts index 0eb337d..84aa268 100644 --- a/packages/core/src/index-record.test.ts +++ b/packages/core/src/index-record.test.ts @@ -7,7 +7,7 @@ describe("indexRecord", () => { it("indexes entities, nested policy rules, events, and duplicate identities", () => { const record = { id: "urn:uuid:record", - masaVersion: "0.1.0", + masaVersion: "0.2.0", revision: 1, profiles: ["core"], disclosure: "private", diff --git a/packages/core/src/public-projection.test.ts b/packages/core/src/public-projection.test.ts index 8703b4a..2871614 100644 --- a/packages/core/src/public-projection.test.ts +++ b/packages/core/src/public-projection.test.ts @@ -15,7 +15,7 @@ const PUBLIC_ID = "urn:uuid:99999999-9999-4999-8999-999999999999"; function publicationFixture(): Record { return JSON.parse( - readFileSync(new URL("../../../examples/0.1.0/valid/publication.masa.json", import.meta.url), "utf8"), + readFileSync(new URL("../../../examples/0.2.0/valid/publication.masa.json", import.meta.url), "utf8"), ) as Record; } diff --git a/packages/validator/package.json b/packages/validator/package.json index 7e855ed..0506948 100644 --- a/packages/validator/package.json +++ b/packages/validator/package.json @@ -1,9 +1,9 @@ { "name": "@sonicfield/masa-validator", - "version": "0.1.1", + "version": "0.2.0", "private": true, "license": "MIT", - "description": "Offline structural, semantic, profile, and public-safety validation for MASA 0.1.0", + "description": "Offline structural, semantic, profile, and public-safety validation for MASA 0.2.0", "type": "module", "sideEffects": false, "files": [ diff --git a/packages/validator/src/generated/schemas.ts b/packages/validator/src/generated/schemas.ts index 74b871a..48aaac3 100644 --- a/packages/validator/src/generated/schemas.ts +++ b/packages/validator/src/generated/schemas.ts @@ -1,6 +1,6 @@ /* eslint-disable */ /** - * Generated from the normative MASA 0.1.0 JSON Schemas. + * Generated from the normative MASA 0.2.0 JSON Schemas. * Do not edit this file. Run pnpm generate after changing schemas. */ @@ -13,11 +13,11 @@ export interface EmbeddedSchema { export const embeddedSchemas: readonly EmbeddedSchema[] = [ { "fileName": "capability-set.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/capability-set.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/capability-set.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/capability-set.schema.json", - "title": "MASA 0.1.0 capability set", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/capability-set.schema.json", + "title": "MASA 0.2.0 capability set", "description": "A versioned implementation catalog for capability discovery, including the masa://capabilities MCP resource.", "type": "object", "required": [ @@ -35,10 +35,10 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ "const": "masa-capability-set" }, "capabilitySetVersion": { - "const": "0.1.0" + "const": "0.2.0" }, "masaVersion": { - "const": "0.1.0" + "const": "0.2.0" }, "id": { "$ref": "definitions.schema.json#/$defs/Id" @@ -86,11 +86,11 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "capability.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/capability.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/capability.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/capability.schema.json", - "title": "MASA 0.1.0 capability declaration", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/capability.schema.json", + "title": "MASA 0.2.0 capability declaration", "type": "object", "required": [ "id", @@ -450,11 +450,11 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "compatibility.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/compatibility.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/compatibility.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/compatibility.schema.json", - "title": "MASA 0.1.0 compatibility manifest", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/compatibility.schema.json", + "title": "MASA 0.2.0 compatibility manifest", "type": "object", "required": [ "id", @@ -596,11 +596,11 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "conformance-result.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/conformance-result.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/conformance-result.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/conformance-result.schema.json", - "title": "MASA 0.1.0 conformance suite result", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/conformance-result.schema.json", + "title": "MASA 0.2.0 conformance suite result", "type": "object", "required": [ "id", @@ -665,7 +665,7 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ "additionalProperties": false }, "masaVersion": { - "const": "0.1.0" + "const": "0.2.0" }, "profile": { "type": "string", @@ -703,7 +703,13 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ ] }, "migrationStatus": { - "const": "not_applicable" + "type": "string", + "enum": [ + "not_tested", + "compatible", + "incompatible", + "not_applicable" + ] }, "runAt": { "$ref": "definitions.schema.json#/$defs/Timestamp" @@ -853,11 +859,11 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "definitions.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/definitions.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/definitions.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/definitions.schema.json", - "title": "MASA 0.1.0 shared definitions", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/definitions.schema.json", + "title": "MASA 0.2.0 shared definitions", "$defs": { "Id": { "type": "string", @@ -2297,6 +2303,37 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ "freshness": { "$ref": "#/$defs/Freshness" }, + "epistemicStatus": { + "type": "string", + "enum": [ + "measured", + "reported", + "derived", + "inferred", + "interpreted", + "speculative", + "undetermined" + ] + }, + "temporalCharacter": { + "type": "string", + "enum": [ + "event", + "stream", + "forecast", + "aggregate", + "context", + "local" + ] + }, + "signalKind": { + "type": "string", + "enum": [ + "observation", + "derived", + "generator" + ] + }, "claimRef": { "$ref": "#/$defs/Id" }, @@ -3490,22 +3527,22 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "event.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/event.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/event.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/event.schema.json", - "title": "MASA 0.1.0 event receipt", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/event.schema.json", + "title": "MASA 0.2.0 event receipt", "description": "One complete OperationReceipt suitable for an embedded history or one events.ndjson line.", "$ref": "definitions.schema.json#/$defs/OperationReceipt" } }, { "fileName": "manifest.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/manifest.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/manifest.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/manifest.schema.json", - "title": "MASA 0.1.0 bundle manifest", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/manifest.schema.json", + "title": "MASA 0.2.0 bundle manifest", "type": "object", "required": [ "manifestType", @@ -3527,10 +3564,10 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ "const": "masa-bundle" }, "manifestVersion": { - "const": "0.1.0" + "const": "0.2.0" }, "masaVersion": { - "const": "0.1.0" + "const": "0.2.0" }, "id": { "$ref": "definitions.schema.json#/$defs/Id" @@ -3735,11 +3772,11 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "matter-record.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/matter-record.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/matter-record.schema.json", - "title": "MASA 0.1.0 MatterRecord", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "title": "MASA 0.2.0 MatterRecord", "description": "The normative MASA Core record envelope. Cross-reference, lineage, policy, and profile invariants require semantic validation after JSON Schema validation.", "type": "object", "required": [ @@ -3777,13 +3814,13 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ "properties": { "$schema": { "type": "string", - "const": "https://masa.sonicfield.org/schemas/0.1.0/matter-record.schema.json" + "const": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json" }, "@context": { "oneOf": [ { "type": "string", - "const": "https://masa.sonicfield.org/contexts/0.1.0/masa.jsonld" + "const": "https://masa.sonicfield.org/contexts/0.2.0/masa.jsonld" }, { "type": "array", @@ -3798,7 +3835,7 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ ] }, "masaVersion": { - "const": "0.1.0" + "const": "0.2.0" }, "id": { "$ref": "definitions.schema.json#/$defs/Id" @@ -3825,6 +3862,7 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ "transformation", "generation", "processing", + "observation", "mapping", "agent", "publication" @@ -4024,21 +4062,21 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "policy.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/policy.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/policy.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/policy.schema.json", - "title": "MASA 0.1.0 Policy", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/policy.schema.json", + "title": "MASA 0.2.0 Policy", "$ref": "definitions.schema.json#/$defs/Policy" } }, { "fileName": "processing-request.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/processing-request.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/processing-request.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/processing-request.schema.json", - "title": "MASA 0.1.0 processing request", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/processing-request.schema.json", + "title": "MASA 0.2.0 processing request", "description": "A validated, engine-neutral request for one sound-matter processing operation. An external engine adapter consumes the request, performs the signal processing under host authority, and returns descendants plus an OperationReceipt; MASA validates the result. A request grants no permission by itself.", "type": "object", "required": [ @@ -4060,10 +4098,10 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ "const": "masa-processing-request" }, "requestVersion": { - "const": "0.1.0" + "const": "0.2.0" }, "masaVersion": { - "const": "0.1.0" + "const": "0.2.0" }, "id": { "$ref": "definitions.schema.json#/$defs/Id" @@ -4280,11 +4318,11 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "profile-agent.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/profile-agent.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/profile-agent.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/profile-agent.schema.json", - "title": "MASA 0.1.0 Agent profile", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/profile-agent.schema.json", + "title": "MASA 0.2.0 Agent profile", "allOf": [ { "$ref": "matter-record.schema.json" @@ -4325,11 +4363,11 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "profile-analysis.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/profile-analysis.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/profile-analysis.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/profile-analysis.schema.json", - "title": "MASA 0.1.0 Analysis profile", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/profile-analysis.schema.json", + "title": "MASA 0.2.0 Analysis profile", "allOf": [ { "$ref": "matter-record.schema.json" @@ -4364,11 +4402,11 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "profile-audio.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/profile-audio.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/profile-audio.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/profile-audio.schema.json", - "title": "MASA 0.1.0 Audio profile", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/profile-audio.schema.json", + "title": "MASA 0.2.0 Audio profile", "allOf": [ { "$ref": "matter-record.schema.json" @@ -4409,11 +4447,11 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "profile-core.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/profile-core.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/profile-core.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/profile-core.schema.json", - "title": "MASA 0.1.0 Core profile", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/profile-core.schema.json", + "title": "MASA 0.2.0 Core profile", "allOf": [ { "$ref": "matter-record.schema.json" @@ -4432,11 +4470,11 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "profile-generation.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/profile-generation.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/profile-generation.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/profile-generation.schema.json", - "title": "MASA 0.1.0 Generation profile", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/profile-generation.schema.json", + "title": "MASA 0.2.0 Generation profile", "allOf": [ { "$ref": "matter-record.schema.json" @@ -4664,11 +4702,11 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "profile-listening.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/profile-listening.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/profile-listening.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/profile-listening.schema.json", - "title": "MASA 0.1.0 Listening profile", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/profile-listening.schema.json", + "title": "MASA 0.2.0 Listening profile", "allOf": [ { "$ref": "matter-record.schema.json" @@ -4696,11 +4734,11 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "profile-mapping.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/profile-mapping.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/profile-mapping.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/profile-mapping.schema.json", - "title": "MASA 0.1.0 Mapping profile", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/profile-mapping.schema.json", + "title": "MASA 0.2.0 Mapping profile", "allOf": [ { "$ref": "matter-record.schema.json" @@ -4723,13 +4761,49 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ ] } }, + { + "fileName": "profile-observation.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/profile-observation.schema.json", + "document": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/profile-observation.schema.json", + "title": "MASA 0.2.0 Observation profile", + "allOf": [ + { + "$ref": "matter-record.schema.json" + }, + { + "properties": { + "profiles": { + "contains": { + "const": "observation" + } + }, + "sources": { + "minItems": 1 + }, + "observations": { + "minItems": 1, + "items": { + "required": [ + "epistemicStatus", + "temporalCharacter", + "signalKind" + ] + } + } + } + } + ] + } + }, { "fileName": "profile-processing.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/profile-processing.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/profile-processing.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/profile-processing.schema.json", - "title": "MASA 0.1.0 Processing profile", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/profile-processing.schema.json", + "title": "MASA 0.2.0 Processing profile", "description": "Granular, spectral, and time-pitch processing operations contracted to external engines and accounted through receipts. MASA describes and verifies processing; it performs none.", "allOf": [ { @@ -5433,11 +5507,11 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "profile-publication.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/profile-publication.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/profile-publication.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/profile-publication.schema.json", - "title": "MASA 0.1.0 Publication profile", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/profile-publication.schema.json", + "title": "MASA 0.2.0 Publication profile", "allOf": [ { "$ref": "matter-record.schema.json" @@ -5563,11 +5637,11 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "profile-transformation.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/profile-transformation.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/profile-transformation.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/profile-transformation.schema.json", - "title": "MASA 0.1.0 Transformation profile", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/profile-transformation.schema.json", + "title": "MASA 0.2.0 Transformation profile", "allOf": [ { "$ref": "matter-record.schema.json" @@ -5768,11 +5842,11 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "public-record.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/public-record.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/public-record.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/public-record.schema.json", - "title": "MASA 0.1.0 public MatterRecord projection", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/public-record.schema.json", + "title": "MASA 0.2.0 public MatterRecord projection", "description": "An allowlisted public projection. Runtime publication validation must additionally check reference closure, approved extension namespaces, paths, secrets, protected precision, and policy authority.", "allOf": [ { @@ -5965,11 +6039,11 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "relation-registry.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/relation-registry.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/relation-registry.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/relation-registry.schema.json", - "title": "MASA 0.1.0 relation registry", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/relation-registry.schema.json", + "title": "MASA 0.2.0 relation registry", "type": "object", "required": [ "registryType", @@ -5983,10 +6057,10 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ "const": "masa-relation-registry" }, "registryVersion": { - "const": "0.1.0" + "const": "0.2.0" }, "masaVersion": { - "const": "0.1.0" + "const": "0.2.0" }, "namespace": { "type": "string", @@ -6099,11 +6173,11 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "term-registry.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/term-registry.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/term-registry.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/term-registry.schema.json", - "title": "MASA 0.1.0 term registry", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/term-registry.schema.json", + "title": "MASA 0.2.0 term registry", "type": "object", "required": [ "registryType", @@ -6117,10 +6191,10 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ "const": "masa-term-registry" }, "registryVersion": { - "const": "0.1.0" + "const": "0.2.0" }, "masaVersion": { - "const": "0.1.0" + "const": "0.2.0" }, "namespace": { "type": "string", @@ -6181,7 +6255,11 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ "maxLength": 8192 }, "introduced": { - "const": "0.1.0" + "type": "string", + "enum": [ + "0.1.0", + "0.2.0" + ] }, "attributedTo": { "type": "array", @@ -6291,10 +6369,10 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "tools/audit-public-input.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/tools/audit-public-input.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/tools/audit-public-input.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/tools/audit-public-input.schema.json", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/tools/audit-public-input.schema.json", "title": "matter.audit_public_export input", "type": "object", "required": [ @@ -6312,10 +6390,10 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "tools/inspect-input.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/tools/inspect-input.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/tools/inspect-input.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/tools/inspect-input.schema.json", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/tools/inspect-input.schema.json", "title": "matter.inspect input", "type": "object", "required": [ @@ -6333,10 +6411,10 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "tools/plan-processing-input.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/tools/plan-processing-input.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/tools/plan-processing-input.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/tools/plan-processing-input.schema.json", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/tools/plan-processing-input.schema.json", "title": "matter.plan_processing input", "description": "Compose and validate one processing request without performing any signal processing. When a record path is supplied, input references are resolved against it.", "type": "object", @@ -6394,10 +6472,10 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "tools/tool-result.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/tools/tool-result.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/tools/tool-result.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/tools/tool-result.schema.json", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/tools/tool-result.schema.json", "title": "MASA local tool result", "type": "object", "required": [ @@ -6471,10 +6549,10 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "tools/trace-lineage-input.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/tools/trace-lineage-input.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/tools/trace-lineage-input.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/tools/trace-lineage-input.schema.json", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/tools/trace-lineage-input.schema.json", "title": "matter.trace_lineage input", "type": "object", "required": [ @@ -6511,10 +6589,10 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ }, { "fileName": "tools/validate-input.schema.json", - "id": "https://masa.sonicfield.org/schemas/0.1.0/tools/validate-input.schema.json", + "id": "https://masa.sonicfield.org/schemas/0.2.0/tools/validate-input.schema.json", "document": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://masa.sonicfield.org/schemas/0.1.0/tools/validate-input.schema.json", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/tools/validate-input.schema.json", "title": "matter.validate input", "type": "object", "required": [ @@ -6533,35 +6611,36 @@ export const embeddedSchemas: readonly EmbeddedSchema[] = [ ]; export const SCHEMA_IDS = { - "capabilitySet": "https://masa.sonicfield.org/schemas/0.1.0/capability-set.schema.json", - "capability": "https://masa.sonicfield.org/schemas/0.1.0/capability.schema.json", - "compatibility": "https://masa.sonicfield.org/schemas/0.1.0/compatibility.schema.json", - "conformanceResult": "https://masa.sonicfield.org/schemas/0.1.0/conformance-result.schema.json", - "definitions": "https://masa.sonicfield.org/schemas/0.1.0/definitions.schema.json", - "event": "https://masa.sonicfield.org/schemas/0.1.0/event.schema.json", - "manifest": "https://masa.sonicfield.org/schemas/0.1.0/manifest.schema.json", - "matterRecord": "https://masa.sonicfield.org/schemas/0.1.0/matter-record.schema.json", - "policy": "https://masa.sonicfield.org/schemas/0.1.0/policy.schema.json", - "processingRequest": "https://masa.sonicfield.org/schemas/0.1.0/processing-request.schema.json", - "profileAgent": "https://masa.sonicfield.org/schemas/0.1.0/profile-agent.schema.json", - "profileAnalysis": "https://masa.sonicfield.org/schemas/0.1.0/profile-analysis.schema.json", - "profileAudio": "https://masa.sonicfield.org/schemas/0.1.0/profile-audio.schema.json", - "profileCore": "https://masa.sonicfield.org/schemas/0.1.0/profile-core.schema.json", - "profileGeneration": "https://masa.sonicfield.org/schemas/0.1.0/profile-generation.schema.json", - "profileListening": "https://masa.sonicfield.org/schemas/0.1.0/profile-listening.schema.json", - "profileMapping": "https://masa.sonicfield.org/schemas/0.1.0/profile-mapping.schema.json", - "profileProcessing": "https://masa.sonicfield.org/schemas/0.1.0/profile-processing.schema.json", - "profilePublication": "https://masa.sonicfield.org/schemas/0.1.0/profile-publication.schema.json", - "profileTransformation": "https://masa.sonicfield.org/schemas/0.1.0/profile-transformation.schema.json", - "publicRecord": "https://masa.sonicfield.org/schemas/0.1.0/public-record.schema.json", - "relationRegistry": "https://masa.sonicfield.org/schemas/0.1.0/relation-registry.schema.json", - "termRegistry": "https://masa.sonicfield.org/schemas/0.1.0/term-registry.schema.json", - "toolsAuditPublicInput": "https://masa.sonicfield.org/schemas/0.1.0/tools/audit-public-input.schema.json", - "toolsInspectInput": "https://masa.sonicfield.org/schemas/0.1.0/tools/inspect-input.schema.json", - "toolsPlanProcessingInput": "https://masa.sonicfield.org/schemas/0.1.0/tools/plan-processing-input.schema.json", - "toolsToolResult": "https://masa.sonicfield.org/schemas/0.1.0/tools/tool-result.schema.json", - "toolsTraceLineageInput": "https://masa.sonicfield.org/schemas/0.1.0/tools/trace-lineage-input.schema.json", - "toolsValidateInput": "https://masa.sonicfield.org/schemas/0.1.0/tools/validate-input.schema.json" + "capabilitySet": "https://masa.sonicfield.org/schemas/0.2.0/capability-set.schema.json", + "capability": "https://masa.sonicfield.org/schemas/0.2.0/capability.schema.json", + "compatibility": "https://masa.sonicfield.org/schemas/0.2.0/compatibility.schema.json", + "conformanceResult": "https://masa.sonicfield.org/schemas/0.2.0/conformance-result.schema.json", + "definitions": "https://masa.sonicfield.org/schemas/0.2.0/definitions.schema.json", + "event": "https://masa.sonicfield.org/schemas/0.2.0/event.schema.json", + "manifest": "https://masa.sonicfield.org/schemas/0.2.0/manifest.schema.json", + "matterRecord": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "policy": "https://masa.sonicfield.org/schemas/0.2.0/policy.schema.json", + "processingRequest": "https://masa.sonicfield.org/schemas/0.2.0/processing-request.schema.json", + "profileAgent": "https://masa.sonicfield.org/schemas/0.2.0/profile-agent.schema.json", + "profileAnalysis": "https://masa.sonicfield.org/schemas/0.2.0/profile-analysis.schema.json", + "profileAudio": "https://masa.sonicfield.org/schemas/0.2.0/profile-audio.schema.json", + "profileCore": "https://masa.sonicfield.org/schemas/0.2.0/profile-core.schema.json", + "profileGeneration": "https://masa.sonicfield.org/schemas/0.2.0/profile-generation.schema.json", + "profileListening": "https://masa.sonicfield.org/schemas/0.2.0/profile-listening.schema.json", + "profileMapping": "https://masa.sonicfield.org/schemas/0.2.0/profile-mapping.schema.json", + "profileObservation": "https://masa.sonicfield.org/schemas/0.2.0/profile-observation.schema.json", + "profileProcessing": "https://masa.sonicfield.org/schemas/0.2.0/profile-processing.schema.json", + "profilePublication": "https://masa.sonicfield.org/schemas/0.2.0/profile-publication.schema.json", + "profileTransformation": "https://masa.sonicfield.org/schemas/0.2.0/profile-transformation.schema.json", + "publicRecord": "https://masa.sonicfield.org/schemas/0.2.0/public-record.schema.json", + "relationRegistry": "https://masa.sonicfield.org/schemas/0.2.0/relation-registry.schema.json", + "termRegistry": "https://masa.sonicfield.org/schemas/0.2.0/term-registry.schema.json", + "toolsAuditPublicInput": "https://masa.sonicfield.org/schemas/0.2.0/tools/audit-public-input.schema.json", + "toolsInspectInput": "https://masa.sonicfield.org/schemas/0.2.0/tools/inspect-input.schema.json", + "toolsPlanProcessingInput": "https://masa.sonicfield.org/schemas/0.2.0/tools/plan-processing-input.schema.json", + "toolsToolResult": "https://masa.sonicfield.org/schemas/0.2.0/tools/tool-result.schema.json", + "toolsTraceLineageInput": "https://masa.sonicfield.org/schemas/0.2.0/tools/trace-lineage-input.schema.json", + "toolsValidateInput": "https://masa.sonicfield.org/schemas/0.2.0/tools/validate-input.schema.json" } as const; export function findEmbeddedSchema(id: string): EmbeddedSchema | undefined { diff --git a/packages/validator/src/index.test.ts b/packages/validator/src/index.test.ts index 25183f6..4f79e24 100644 --- a/packages/validator/src/index.test.ts +++ b/packages/validator/src/index.test.ts @@ -23,10 +23,10 @@ function fixture(path: string): unknown { describe("offline MASA validation", () => { it("accepts the canonical minimal and publication fixtures", () => { const minimal = validateMatterRecord( - fixture("examples/0.1.0/valid/minimal-record.masa.json"), + fixture("examples/0.2.0/valid/minimal-record.masa.json"), ); const publication = auditPublicRecord( - fixture("examples/0.1.0/valid/publication.masa.json"), + fixture("examples/0.2.0/valid/publication.masa.json"), ); expect(minimal).toMatchObject({ valid: true, diagnostics: [] }); @@ -35,23 +35,23 @@ describe("offline MASA validation", () => { it("reports stable semantic diagnostics for unresolved references and cycles", () => { const dangling = validateMatterRecord( - fixture("examples/0.1.0/invalid/dangling-reference.masa.json"), + fixture("examples/0.2.0/invalid/dangling-reference.masa.json"), ); const cyclic = validateMatterRecord( - fixture("examples/0.1.0/invalid/derivation-cycle.masa.json"), + fixture("examples/0.2.0/invalid/derivation-cycle.masa.json"), ); expect(dangling.valid).toBe(false); expect(dangling.diagnostics.map(({ code }) => code)).toContain("MASA_UNRESOLVED_REF"); expect(cyclic.valid).toBe(false); expect(cyclic.diagnostics.map(({ code }) => code)).toContain("MASA_DERIVATION_CYCLE"); - expect(validateMatterRecord(fixture("examples/0.1.0/invalid/dangling-reference.masa.json"))) + expect(validateMatterRecord(fixture("examples/0.2.0/invalid/dangling-reference.masa.json"))) .toEqual(dangling); }); it("blocks local paths from public records", () => { const result = auditPublicRecord( - fixture("examples/0.1.0/invalid/public-local-path.masa.json"), + fixture("examples/0.2.0/invalid/public-local-path.masa.json"), ); expect(result.valid).toBe(false); @@ -62,7 +62,7 @@ describe("offline MASA validation", () => { it("enforces every declared profile during public audit", () => { const record = structuredClone( - fixture("examples/0.1.0/valid/publication.masa.json"), + fixture("examples/0.2.0/valid/publication.masa.json"), ) as any; record.profiles.push("audio"); @@ -72,8 +72,21 @@ describe("offline MASA validation", () => { expect(result.diagnostics.map(({ code }) => code)).toContain("MASA_PROFILE_MISMATCH"); }); + it("requires complete epistemic axes only when the Observation profile is declared", () => { + const valid = validateMatterRecord( + fixture("examples/0.2.0/valid/mapping.masa.json"), + ); + const incomplete = validateMatterRecord( + fixture("examples/0.2.0/invalid/observation-profile-missing-metadata.masa.json"), + ); + + expect(valid.valid).toBe(true); + expect(incomplete.valid).toBe(false); + expect(incomplete.diagnostics.map(({ code }) => code)).toContain("MASA_PROFILE_MISMATCH"); + }); + it("detects public-safety bypass forms", () => { - const base = fixture("examples/0.1.0/valid/publication.masa.json"); + const base = fixture("examples/0.2.0/valid/publication.masa.json"); const cases: Array<{ mutate(record: any): void; code: string }> = [ { mutate: (record) => { @@ -226,7 +239,7 @@ describe("offline MASA validation", () => { it("distinguishes valid publication JSON Pointers from local paths", () => { const record = structuredClone( - fixture("examples/0.1.0/valid/publication.masa.json"), + fixture("examples/0.2.0/valid/publication.masa.json"), ) as any; record.publication.omissions = [{ pointer: "/representations/0/locator", @@ -250,13 +263,13 @@ describe("offline MASA validation", () => { }); it("validates the generated capability catalog and embedded schemas", () => { - const catalog = fixture("capabilities/0.1.0/reference.json") as { + const catalog = fixture("capabilities/0.2.0/reference.json") as { capabilities: unknown[]; }; expect(validateCapabilitySet(catalog).valid).toBe(true); expect(validateCapability(catalog.capabilities[0]).valid).toBe(true); - expect(validateDocument("matterRecord", fixture("examples/0.1.0/valid/minimal-record.masa.json")).valid) + expect(validateDocument("matterRecord", fixture("examples/0.2.0/valid/minimal-record.masa.json")).valid) .toBe(true); expect(validateDocument("unknown-schema", {}).diagnostics[0]?.code).toBe("MASA_SCHEMA_UNKNOWN"); expect(listEmbeddedSchemas().some(({ fileName }) => fileName === "tools/trace-lineage-input.schema.json")) @@ -266,35 +279,35 @@ describe("offline MASA validation", () => { it("keeps qualified deletion distinct and rejects the assertion-null family", () => { const deleted = validateMatterRecord( - fixture("examples/0.1.0/valid/deleted-state.masa.json"), + fixture("examples/0.2.0/valid/deleted-state.masa.json"), ); expect(deleted.valid).toBe(true); const knownNull = validateMatterRecord( - fixture("examples/0.1.0/invalid/known-null-qualified-value.masa.json"), + fixture("examples/0.2.0/invalid/known-null-qualified-value.masa.json"), ); expect(knownNull.valid).toBe(false); const nullMeasurement = structuredClone( - fixture("examples/0.1.0/valid/listening-analysis-audio.masa.json"), + fixture("examples/0.2.0/valid/listening-analysis-audio.masa.json"), ) as any; nullMeasurement.measurements[0].value = null; expect(validateMatterRecord(nullMeasurement).valid).toBe(false); const nullClaim = structuredClone( - fixture("examples/0.1.0/valid/listening-analysis-audio.masa.json"), + fixture("examples/0.2.0/valid/listening-analysis-audio.masa.json"), ) as any; nullClaim.claims[0].content = null; expect(validateMatterRecord(nullClaim).valid).toBe(false); const nullClaimValue = structuredClone( - fixture("examples/0.1.0/valid/listening-analysis-audio.masa.json"), + fixture("examples/0.2.0/valid/listening-analysis-audio.masa.json"), ) as any; nullClaimValue.claims[0].value = null; expect(validateMatterRecord(nullClaimValue).valid).toBe(false); const nullContext = structuredClone( - fixture("examples/0.1.0/valid/minimal-record.masa.json"), + fixture("examples/0.2.0/valid/minimal-record.masa.json"), ) as any; nullContext.contexts.push({ id: "urn:uuid:ffffffff-ffff-4fff-8fff-fffffffffff1", @@ -311,7 +324,7 @@ describe("offline MASA validation", () => { expect(validateMatterRecord(nullContext).valid).toBe(false); const nullThreshold = structuredClone( - fixture("examples/0.1.0/valid/listening-analysis-audio.masa.json"), + fixture("examples/0.2.0/valid/listening-analysis-audio.masa.json"), ) as any; nullThreshold.apertures[0].thresholds.push({ name: "Regression threshold", @@ -328,13 +341,13 @@ describe("offline MASA validation", () => { expect(validateMatterRecord(nullThreshold).valid).toBe(false); const nullSeed = structuredClone( - fixture("examples/0.1.0/valid/generation.masa.json"), + fixture("examples/0.2.0/valid/generation.masa.json"), ) as any; nullSeed.history.events[0].determinism.seed = null; expect(validateMatterRecord(nullSeed).valid).toBe(false); const missingReceipt = structuredClone( - fixture("examples/0.1.0/valid/deleted-state.masa.json"), + fixture("examples/0.2.0/valid/deleted-state.masa.json"), ) as any; missingReceipt.representations[0].locator.receiptRefs = ["urn:uuid:ffffffff-ffff-4fff-8fff-ffffffffffff"]; expect(validateMatterRecord(missingReceipt).diagnostics.map(({ code }) => code)) @@ -343,21 +356,21 @@ describe("offline MASA validation", () => { it("checks typed references, interval order, and namespaced classification", () => { const wrongCreator = structuredClone( - fixture("examples/0.1.0/valid/minimal-record.masa.json"), + fixture("examples/0.2.0/valid/minimal-record.masa.json"), ) as any; wrongCreator.createdBy = wrongCreator.representations[0].id; expect(validateMatterRecord(wrongCreator).diagnostics.map(({ code }) => code)) .toContain("MASA_REF_TYPE"); const reversedWindow = structuredClone( - fixture("examples/0.1.0/valid/listening-analysis-audio.masa.json"), + fixture("examples/0.2.0/valid/listening-analysis-audio.masa.json"), ) as any; reversedWindow.measurements[0].window.end = -1; expect(validateMatterRecord(reversedWindow).diagnostics.map(({ code }) => code)) .toContain("MASA_WINDOW_ORDER"); const extended = structuredClone( - fixture("examples/0.1.0/valid/minimal-record.masa.json"), + fixture("examples/0.2.0/valid/minimal-record.masa.json"), ) as any; extended.registers.push("example:field-practice"); extended.scales.push("example:installation-cycle"); @@ -366,7 +379,7 @@ describe("offline MASA validation", () => { it("audits a decorrelated projection produced by the reference pipeline", () => { const source = structuredClone( - fixture("examples/0.1.0/valid/publication.masa.json"), + fixture("examples/0.2.0/valid/publication.masa.json"), ) as any; source.publication.publicRecordId = "urn:uuid:99999999-9999-4999-8999-999999999999"; @@ -422,7 +435,7 @@ describe("offline MASA validation", () => { it("does not flag schema-valid leap-second timestamps as temporal disorder", () => { const record = structuredClone( - fixture("examples/0.1.0/valid/mapping.masa.json"), + fixture("examples/0.2.0/valid/mapping.masa.json"), ) as any; record.sources[0].freshness = { status: "stale", @@ -437,7 +450,7 @@ describe("offline MASA validation", () => { it("accepts inverse lineage syntax and verifies publication permission rules", () => { const inverse = structuredClone( - fixture("examples/0.1.0/valid/transformation.masa.json"), + fixture("examples/0.2.0/valid/transformation.masa.json"), ) as any; const relation = inverse.relations[0]; relation.predicate = "masa:derivation-of"; @@ -445,7 +458,7 @@ describe("offline MASA validation", () => { expect(validateMatterRecord(inverse).valid).toBe(true); const unsupportedPermission = structuredClone( - fixture("examples/0.1.0/valid/publication.masa.json"), + fixture("examples/0.2.0/valid/publication.masa.json"), ) as any; unsupportedPermission.policies[0].rules[0].actions = ["read"]; const audit = auditPublicRecord(unsupportedPermission); diff --git a/packages/validator/src/index.ts b/packages/validator/src/index.ts index e6a59f8..a2c02f7 100644 --- a/packages/validator/src/index.ts +++ b/packages/validator/src/index.ts @@ -35,6 +35,7 @@ const PROFILE_SCHEMA_IDS: Readonly> = { transformation: SCHEMA_IDS.profileTransformation, generation: SCHEMA_IDS.profileGeneration, processing: SCHEMA_IDS.profileProcessing, + observation: SCHEMA_IDS.profileObservation, mapping: SCHEMA_IDS.profileMapping, agent: SCHEMA_IDS.profileAgent, publication: SCHEMA_IDS.profilePublication, diff --git a/rfcs/0002-observation-profile.md b/rfcs/0002-observation-profile.md new file mode 100644 index 0000000..e6137f3 --- /dev/null +++ b/rfcs/0002-observation-profile.md @@ -0,0 +1,19 @@ +# RFC 0002: Observation profile + +Status: accepted for MASA 0.2.0 + +## Decision + +Add an optional Observation profile and promote `epistemicStatus`, `temporalCharacter`, and `signalKind` into the `masa:` vocabulary. The base Observation structure keeps the fields optional for compatible non-profile records; declaring the Observation profile makes all three required. + +## Evidence and scope + +Cosmoaudition System and GERM independently need these axes to preserve reported, measured, derived, interpreted, speculative, stale, unavailable, event, stream, forecast, aggregate, and authored-generator states across observation-to-control handoffs. This satisfies the two-implementation threshold for shared vocabulary without importing either application's module names, source catalog, or routing model into MASA. + +## Consequences + +- Missing values continue to use qualified states; the new fields never encode absence. +- Health, freshness, confidence, disclosure, and actor remain separate. +- Normalization and mapping remain attributable derivations rather than properties of a source. +- Existing implementation namespaces remain valid historical provenance. +- MASA 0.1.0 records are preserved as immutable versioned records. Adoption of 0.2.0 creates a revision or migration receipt; it never edits the only 0.1.0 copy in place. diff --git a/schemas/0.2.0/capability-set.schema.json b/schemas/0.2.0/capability-set.schema.json new file mode 100644 index 0000000..6989206 --- /dev/null +++ b/schemas/0.2.0/capability-set.schema.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/capability-set.schema.json", + "title": "MASA 0.2.0 capability set", + "description": "A versioned implementation catalog for capability discovery, including the masa://capabilities MCP resource.", + "type": "object", + "required": [ + "capabilitySetType", + "capabilitySetVersion", + "masaVersion", + "id", + "implementation", + "generatedAt", + "capabilities", + "extensions" + ], + "properties": { + "capabilitySetType": { "const": "masa-capability-set" }, + "capabilitySetVersion": { "const": "0.2.0" }, + "masaVersion": { "const": "0.2.0" }, + "id": { "$ref": "definitions.schema.json#/$defs/Id" }, + "implementation": { + "type": "object", + "required": ["id", "name", "version"], + "properties": { + "id": { "$ref": "definitions.schema.json#/$defs/Id" }, + "name": { "type": "string", "minLength": 1, "maxLength": 512 }, + "version": { "type": "string", "minLength": 1, "maxLength": 128 } + }, + "additionalProperties": false + }, + "generatedAt": { "$ref": "definitions.schema.json#/$defs/Timestamp" }, + "capabilities": { + "type": "array", + "items": { "$ref": "capability.schema.json" }, + "minItems": 1 + }, + "extensions": { "$ref": "definitions.schema.json#/$defs/ExtensionBag" } + }, + "additionalProperties": false +} diff --git a/schemas/0.2.0/capability.schema.json b/schemas/0.2.0/capability.schema.json new file mode 100644 index 0000000..2dc5283 --- /dev/null +++ b/schemas/0.2.0/capability.schema.json @@ -0,0 +1,168 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/capability.schema.json", + "title": "MASA 0.2.0 capability declaration", + "type": "object", + "required": [ + "id", + "type", + "name", + "purpose", + "supportedMasaVersions", + "profiles", + "inputSchema", + "outputSchema", + "resources", + "sideEffects", + "authority", + "confirmation", + "riskFlags", + "receiptType", + "determinism", + "outcomes", + "extensions" + ], + "properties": { + "id": { "$ref": "definitions.schema.json#/$defs/Id" }, + "type": { "const": "masa:Capability" }, + "name": { "type": "string", "pattern": "^matter\\.[a-z][a-z0-9_-]*$" }, + "purpose": { "type": "string", "minLength": 1, "maxLength": 4096 }, + "supportedMasaVersions": { + "type": "array", + "items": { "type": "string", "minLength": 1, "maxLength": 128 }, + "minItems": 1, + "uniqueItems": true + }, + "profiles": { + "type": "array", + "items": { + "type": "string", + "enum": ["core", "audio", "listening", "analysis", "transformation", "generation", "processing", "mapping", "agent", "publication"] + }, + "minItems": 1, + "uniqueItems": true, + "contains": { "const": "core" } + }, + "inputSchema": { "$ref": "#/$defs/SchemaReferenceState" }, + "outputSchema": { "$ref": "#/$defs/SchemaReferenceState" }, + "resources": { + "type": "object", + "required": ["local", "network", "providers", "hardware"], + "properties": { + "local": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 512 }, "uniqueItems": true }, + "network": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 512 }, "uniqueItems": true }, + "providers": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 512 }, "uniqueItems": true }, + "hardware": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 512 }, "uniqueItems": true } + }, + "additionalProperties": false + }, + "sideEffects": { + "type": "array", + "items": { + "type": "string", + "enum": ["none", "local-read", "local-write", "network-read", "network-write", "external-action", "destructive"] + }, + "minItems": 1, + "uniqueItems": true + }, + "authority": { + "type": "object", + "required": ["required", "source", "scopes"], + "properties": { + "required": { "type": "boolean" }, + "source": { "const": "trusted-host" }, + "scopes": { + "type": "array", + "items": { "type": "string", "minLength": 1, "maxLength": 256 }, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "confirmation": { "type": "string", "enum": ["never", "host-policy", "always"] }, + "riskFlags": { + "type": "object", + "required": ["expose", "publish", "delete", "overwrite", "paidProvider", "externalSystem", "preciseLocation"], + "properties": { + "expose": { "type": "boolean" }, + "publish": { "type": "boolean" }, + "delete": { "type": "boolean" }, + "overwrite": { "type": "boolean" }, + "paidProvider": { "type": "boolean" }, + "externalSystem": { "type": "boolean" }, + "preciseLocation": { "type": "boolean" } + }, + "additionalProperties": false + }, + "receiptType": { "const": "masa:OperationReceipt" }, + "determinism": { + "type": "array", + "items": { "type": "string", "enum": ["deterministic", "seeded", "nondeterministic", "undetermined"] }, + "minItems": 1, + "uniqueItems": true + }, + "outcomes": { + "type": "array", + "items": { "type": "string", "enum": ["completed", "partial", "failed", "refused", "cancelled", "not_performed", "undetermined"] }, + "minItems": 1, + "uniqueItems": true + }, + "limits": { "type": "object", "additionalProperties": { "$ref": "definitions.schema.json#/$defs/JsonValue" } }, + "extensions": { "$ref": "definitions.schema.json#/$defs/ExtensionBag" } + }, + "$defs": { + "SchemaReferenceState": { + "oneOf": [ + { + "type": "object", + "required": ["state", "uri"], + "properties": { + "state": { "const": "known" }, + "uri": { "$ref": "definitions.schema.json#/$defs/Id" } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": ["state", "reason"], + "properties": { + "state": { "enum": ["unknown", "unavailable"] }, + "reason": { "type": "string", "minLength": 1, "maxLength": 2048 } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": ["state", "reason", "policyRefs"], + "properties": { + "state": { "const": "withheld" }, + "reason": { "type": "string", "minLength": 1, "maxLength": 2048 }, + "policyRefs": { + "type": "array", + "items": { "$ref": "definitions.schema.json#/$defs/Id" }, + "minItems": 1, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": ["state", "reason"], + "properties": { + "state": { "const": "deleted" }, + "reason": { "type": "string", "minLength": 1, "maxLength": 2048 } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": ["state"], + "properties": { "state": { "const": "not_applicable" } }, + "additionalProperties": false + } + ] + } + }, + "additionalProperties": false +} diff --git a/schemas/0.2.0/compatibility.schema.json b/schemas/0.2.0/compatibility.schema.json new file mode 100644 index 0000000..dcace43 --- /dev/null +++ b/schemas/0.2.0/compatibility.schema.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/compatibility.schema.json", + "title": "MASA 0.2.0 compatibility manifest", + "type": "object", + "required": [ + "id", + "type", + "application", + "applicationVersion", + "generatedAt", + "platforms", + "masa", + "status", + "conformanceResultRefs", + "extensions" + ], + "properties": { + "id": { "$ref": "definitions.schema.json#/$defs/Id" }, + "type": { "const": "masa:CompatibilityManifest" }, + "application": { "type": "string", "minLength": 1, "maxLength": 256 }, + "applicationVersion": { "type": "string", "minLength": 1, "maxLength": 128 }, + "generatedAt": { "$ref": "definitions.schema.json#/$defs/Timestamp" }, + "platforms": { + "type": "array", + "items": { "type": "string", "minLength": 1, "maxLength": 512 }, + "minItems": 1, + "uniqueItems": true + }, + "masa": { + "type": "object", + "required": ["versions", "profiles", "classes", "extensions"], + "properties": { + "versions": { + "type": "array", + "items": { "type": "string", "minLength": 1, "maxLength": 128 }, + "minItems": 1, + "uniqueItems": true + }, + "profiles": { + "type": "array", + "items": { "type": "string", "enum": ["core", "audio", "listening", "analysis", "transformation", "generation", "processing", "mapping", "agent", "publication"] }, + "minItems": 1, + "uniqueItems": true, + "contains": { "const": "core" } + }, + "classes": { + "type": "array", + "items": { "type": "string", "enum": ["reader", "writer", "transformer", "agent-host", "publisher"] }, + "minItems": 1, + "uniqueItems": true + }, + "extensions": { + "type": "array", + "items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*:[0-9]+\\.[0-9]+(?:\\.[0-9]+)?(?:[-+][0-9A-Za-z.-]+)?$" }, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "status": { "type": "string", "enum": ["conformant", "partial", "not_run", "failed", "unknown"] }, + "conformanceResultRefs": { + "type": "array", + "items": { "$ref": "definitions.schema.json#/$defs/Id" }, + "uniqueItems": true + }, + "notes": { "type": "string", "maxLength": 4096 }, + "extensions": { "$ref": "definitions.schema.json#/$defs/ExtensionBag" } + }, + "additionalProperties": false +} diff --git a/schemas/0.2.0/conformance-result.schema.json b/schemas/0.2.0/conformance-result.schema.json new file mode 100644 index 0000000..7738bae --- /dev/null +++ b/schemas/0.2.0/conformance-result.schema.json @@ -0,0 +1,108 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/conformance-result.schema.json", + "title": "MASA 0.2.0 conformance suite result", + "type": "object", + "required": [ + "id", + "type", + "suite", + "implementation", + "subject", + "platform", + "masaVersion", + "profile", + "class", + "status", + "migrationStatus", + "runAt", + "tests", + "fixtureManifestDigest", + "diagnostics", + "extensions" + ], + "properties": { + "id": { "$ref": "definitions.schema.json#/$defs/Id" }, + "type": { "const": "masa:ConformanceResult" }, + "suite": { "$ref": "#/$defs/NamedVersion" }, + "implementation": { "$ref": "#/$defs/NamedVersion" }, + "subject": { "type": "string", "minLength": 1, "maxLength": 1024 }, + "platform": { + "type": "object", + "required": ["os", "architecture", "runtime"], + "properties": { + "os": { "type": "string", "minLength": 1, "maxLength": 256 }, + "architecture": { "type": "string", "minLength": 1, "maxLength": 256 }, + "runtime": { "type": "string", "minLength": 1, "maxLength": 512 } + }, + "additionalProperties": false + }, + "masaVersion": { "const": "0.2.0" }, + "profile": { "type": "string", "enum": ["core", "audio", "listening", "analysis", "transformation", "generation", "processing", "mapping", "agent", "publication"] }, + "class": { "type": "string", "enum": ["reader", "writer", "transformer", "agent-host", "publisher"] }, + "status": { "type": "string", "enum": ["conformant", "partial", "not_run", "failed", "unknown"] }, + "migrationStatus": { + "type": "string", + "enum": ["not_tested", "compatible", "incompatible", "not_applicable"] + }, + "runAt": { "$ref": "definitions.schema.json#/$defs/Timestamp" }, + "durationMs": { "type": "number", "minimum": 0 }, + "tests": { + "type": "array", + "items": { "$ref": "#/$defs/TestResult" }, + "minItems": 1 + }, + "fixtureManifestDigest": { + "allOf": [ + { "$ref": "definitions.schema.json#/$defs/Integrity" }, + { + "properties": { + "algorithm": { "const": "sha-256" }, + "status": { "const": "verified" } + } + } + ] + }, + "diagnostics": { + "type": "array", + "items": { "$ref": "#/$defs/Diagnostic" } + }, + "extensions": { "$ref": "definitions.schema.json#/$defs/ExtensionBag" } + }, + "$defs": { + "NamedVersion": { + "type": "object", + "required": ["name", "version"], + "properties": { + "name": { "type": "string", "minLength": 1, "maxLength": 512 }, + "version": { "type": "string", "minLength": 1, "maxLength": 128 } + }, + "additionalProperties": false + }, + "Diagnostic": { + "type": "object", + "required": ["code", "severity", "instancePath", "message", "remediation"], + "properties": { + "code": { "type": "string", "pattern": "^MASA_[A-Z0-9_]+$" }, + "severity": { "type": "string", "enum": ["info", "warning", "error"] }, + "instancePath": { "type": "string", "pattern": "^(?:|/)" }, + "schemaPath": { "type": "string", "minLength": 1, "maxLength": 4096 }, + "message": { "type": "string", "minLength": 1, "maxLength": 4096 }, + "remediation": { "type": "string", "minLength": 1, "maxLength": 4096 } + }, + "additionalProperties": false + }, + "TestResult": { + "type": "object", + "required": ["id", "status", "diagnostics"], + "properties": { + "id": { "type": "string", "minLength": 1, "maxLength": 512 }, + "status": { "type": "string", "enum": ["conformant", "partial", "not_run", "failed", "unknown"] }, + "durationMs": { "type": "number", "minimum": 0 }, + "diagnostics": { "type": "array", "items": { "$ref": "#/$defs/Diagnostic" } } + }, + "additionalProperties": false + } + }, + "additionalProperties": false +} diff --git a/schemas/0.2.0/definitions.schema.json b/schemas/0.2.0/definitions.schema.json new file mode 100644 index 0000000..ddf7823 --- /dev/null +++ b/schemas/0.2.0/definitions.schema.json @@ -0,0 +1,854 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/definitions.schema.json", + "title": "MASA 0.2.0 shared definitions", + "$defs": { + "Id": { + "type": "string", + "format": "uri", + "minLength": 5, + "maxLength": 2048 + }, + "Timestamp": { + "type": "string", + "format": "date-time" + }, + "JsonValue": { + "type": ["array", "boolean", "number", "object", "string", "null"] + }, + "NonNullJsonValue": { + "type": ["array", "boolean", "number", "object", "string"] + }, + "Disclosure": { + "type": "string", + "enum": ["public", "private", "restricted", "withheld", "redacted"] + }, + "QualifiedValue": { + "oneOf": [ + { + "type": "object", + "required": ["state", "value"], + "properties": { + "state": { "const": "known" }, + "value": { "$ref": "#/$defs/NonNullJsonValue" }, + "provenanceRefs": { + "type": "array", + "items": { "$ref": "#/$defs/Id" }, + "uniqueItems": true, + "default": [] + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": ["state", "reason"], + "properties": { + "state": { "const": "unknown" }, + "reason": { "type": "string", "minLength": 1, "maxLength": 2048 }, + "reasonCode": { "type": "string", "pattern": "^[a-z][a-z0-9_-]*$" } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": ["state", "reason", "receiptRefs"], + "properties": { + "state": { "const": "deleted" }, + "reason": { "type": "string", "minLength": 1, "maxLength": 2048 }, + "receiptRefs": { + "type": "array", + "items": { "$ref": "#/$defs/Id" }, + "minItems": 1, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": ["state", "reason", "policyRefs"], + "properties": { + "state": { "const": "withheld" }, + "reason": { "type": "string", "minLength": 1, "maxLength": 2048 }, + "policyRefs": { + "type": "array", + "items": { "$ref": "#/$defs/Id" }, + "minItems": 1, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": ["state", "reason"], + "properties": { + "state": { "const": "unavailable" }, + "reason": { "type": "string", "minLength": 1, "maxLength": 2048 }, + "reasonCode": { "type": "string", "pattern": "^[a-z][a-z0-9_-]*$" } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": ["state"], + "properties": { + "state": { "const": "not_applicable" } + }, + "additionalProperties": false + } + ] + }, + "ExtensionBag": { + "type": "object", + "propertyNames": { + "pattern": "^[a-z][a-z0-9-]*:[A-Za-z][A-Za-z0-9._-]*$" + }, + "additionalProperties": true + }, + "Confidence": { + "oneOf": [ + { + "type": "object", + "required": ["status"], + "properties": { + "status": { "const": "not_assessed" } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": ["status", "method", "expression", "scale"], + "properties": { + "status": { "const": "assessed" }, + "method": { "type": "string", "minLength": 1, "maxLength": 512 }, + "expression": { + "oneOf": [ + { "type": "number" }, + { "type": "string", "minLength": 1, "maxLength": 256 }, + { + "type": "array", + "prefixItems": [{ "type": "number" }, { "type": "number" }], + "items": false, + "minItems": 2, + "maxItems": 2 + } + ] + }, + "scale": { "type": "string", "minLength": 1, "maxLength": 256 }, + "calibration": { "type": "string", "minLength": 1, "maxLength": 2048 } + }, + "additionalProperties": false + } + ] + }, + "SourceHealth": { + "type": "object", + "required": ["status"], + "properties": { + "status": { "type": "string", "enum": ["healthy", "degraded", "unavailable", "error", "unknown"] }, + "checkedAt": { "$ref": "#/$defs/Timestamp" }, + "reason": { "type": "string", "minLength": 1, "maxLength": 2048 } + }, + "additionalProperties": false + }, + "Freshness": { + "type": "object", + "required": ["status"], + "properties": { + "status": { "type": "string", "enum": ["current", "stale", "expired", "unknown"] }, + "observedAt": { "$ref": "#/$defs/Timestamp" }, + "retrievedAt": { "$ref": "#/$defs/Timestamp" }, + "expiresAt": { "$ref": "#/$defs/Timestamp" }, + "ageSeconds": { "type": "number", "minimum": 0 }, + "reason": { "type": "string", "minLength": 1, "maxLength": 2048 } + }, + "additionalProperties": false + }, + "Method": { + "type": "object", + "required": ["name", "version", "parameters"], + "properties": { + "name": { "type": "string", "minLength": 1, "maxLength": 512 }, + "version": { "$ref": "#/$defs/QualifiedValue" }, + "parameters": { "type": "object", "additionalProperties": true }, + "apparatusRefs": { + "type": "array", + "items": { "$ref": "#/$defs/Id" }, + "uniqueItems": true, + "default": [] + } + }, + "additionalProperties": false + }, + "Window": { + "type": "object", + "required": ["kind", "unit", "start", "end"], + "properties": { + "kind": { "type": "string", "enum": ["temporal", "spectral", "spatial", "record", "custom"] }, + "unit": { "type": "string", "minLength": 1, "maxLength": 128 }, + "start": { "type": "number" }, + "end": { "type": "number" }, + "resolution": { "type": "number", "exclusiveMinimum": 0 }, + "description": { "type": "string", "maxLength": 2048 } + }, + "additionalProperties": false + }, + "Integrity": { + "type": "object", + "required": ["algorithm", "digest", "byteLength", "status"], + "properties": { + "algorithm": { "type": "string", "enum": ["sha-256", "sha-512", "blake3", "other"] }, + "digest": { "type": "string", "pattern": "^[A-Fa-f0-9]{32,128}$" }, + "byteLength": { "type": "integer", "minimum": 0 }, + "status": { "type": "string", "enum": ["verified", "unverified", "mismatch", "unknown", "withheld"] }, + "verifiedAt": { "$ref": "#/$defs/Timestamp" }, + "verifiedBy": { "$ref": "#/$defs/Id" } + }, + "additionalProperties": false + }, + "Actor": { + "type": "object", + "required": ["id", "type", "actorKind", "roles", "disclosure", "extensions"], + "properties": { + "id": { "$ref": "#/$defs/Id" }, + "type": { "const": "masa:Actor" }, + "actorKind": { "type": "string", "enum": ["human", "community", "organization", "software", "agent", "model", "instrument"] }, + "roles": { + "type": "array", + "items": { "type": "string", "minLength": 1, "maxLength": 256 }, + "minItems": 1, + "uniqueItems": true + }, + "name": { "$ref": "#/$defs/QualifiedValue" }, + "authorityRefs": { + "type": "array", + "items": { "$ref": "#/$defs/Id" }, + "uniqueItems": true, + "default": [] + }, + "attribution": { "type": "string", "minLength": 1, "maxLength": 2048 }, + "disclosure": { "$ref": "#/$defs/Disclosure" }, + "extensions": { "$ref": "#/$defs/ExtensionBag" } + }, + "additionalProperties": false + }, + "Source": { + "type": "object", + "required": ["id", "type", "sourceKind", "identification", "locator", "authority", "rights", "health", "freshness", "policyRefs", "disclosure", "extensions"], + "properties": { + "id": { "$ref": "#/$defs/Id" }, + "type": { "const": "masa:Source" }, + "sourceKind": { "type": "string", "minLength": 1, "maxLength": 256 }, + "identification": { "$ref": "#/$defs/QualifiedValue" }, + "locator": { "$ref": "#/$defs/QualifiedValue" }, + "authority": { "$ref": "#/$defs/QualifiedValue" }, + "rights": { "$ref": "#/$defs/QualifiedValue" }, + "coverage": { "$ref": "#/$defs/QualifiedValue" }, + "health": { "$ref": "#/$defs/SourceHealth" }, + "freshness": { "$ref": "#/$defs/Freshness" }, + "causalClaimRefs": { + "type": "array", + "items": { "$ref": "#/$defs/Id" }, + "uniqueItems": true, + "default": [] + }, + "policyRefs": { + "type": "array", + "items": { "$ref": "#/$defs/Id" }, + "minItems": 1, + "uniqueItems": true + }, + "disclosure": { "$ref": "#/$defs/Disclosure" }, + "extensions": { "$ref": "#/$defs/ExtensionBag" } + }, + "additionalProperties": false + }, + "AudioTechnical": { + "type": "object", + "required": ["durationSeconds", "channels", "sampleRateHz", "encoding", "spatialFormat", "levelContext"], + "properties": { + "durationSeconds": { "$ref": "#/$defs/QualifiedValue" }, + "channels": { "$ref": "#/$defs/QualifiedValue" }, + "sampleRateHz": { "$ref": "#/$defs/QualifiedValue" }, + "bitDepth": { "$ref": "#/$defs/QualifiedValue" }, + "encoding": { "$ref": "#/$defs/QualifiedValue" }, + "spatialFormat": { "$ref": "#/$defs/QualifiedValue" }, + "levelContext": { "$ref": "#/$defs/QualifiedValue" } + }, + "additionalProperties": false + }, + "Threshold": { + "type": "object", + "required": ["name", "comparison", "value", "unit", "method", "uncertainty"], + "properties": { + "name": { "type": "string", "minLength": 1, "maxLength": 512 }, + "comparison": { "type": "string", "enum": ["greater-than", "greater-than-or-equal", "less-than", "less-than-or-equal", "inside-range", "outside-range", "custom"] }, + "value": { "$ref": "#/$defs/NonNullJsonValue" }, + "unit": { "type": "string", "minLength": 1, "maxLength": 128 }, + "method": { "$ref": "#/$defs/Method" }, + "uncertainty": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 2048 } } + }, + "additionalProperties": false + }, + "Representation": { + "type": "object", + "required": ["id", "type", "role", "mediaType", "availability", "locator", "integrity", "policyRefs", "disclosure", "extensions"], + "properties": { + "id": { "$ref": "#/$defs/Id" }, + "type": { "const": "masa:Representation" }, + "role": { "type": "string", "enum": ["source-representation", "derivative", "preview", "render", "data", "prompt", "score", "model-output", "performance-capture", "tombstone", "other"] }, + "mediaType": { "type": "string", "pattern": "^[A-Za-z0-9!#$&^_.+-]+/[A-Za-z0-9!#$&^_.+-]+$" }, + "format": { "$ref": "#/$defs/QualifiedValue" }, + "availability": { "type": "string", "enum": ["available", "partial", "unavailable", "withheld", "deleted"] }, + "locator": { "$ref": "#/$defs/QualifiedValue" }, + "extent": { "$ref": "#/$defs/QualifiedValue" }, + "audio": { "$ref": "#/$defs/AudioTechnical" }, + "integrity": { "$ref": "#/$defs/QualifiedValue" }, + "policyRefs": { + "type": "array", + "items": { "$ref": "#/$defs/Id" }, + "minItems": 1, + "uniqueItems": true + }, + "disclosure": { "$ref": "#/$defs/Disclosure" }, + "extensions": { "$ref": "#/$defs/ExtensionBag" } + }, + "additionalProperties": false + }, + "Encounter": { + "type": "object", + "required": ["id", "type", "occurredAt", "actors", "question", "position", "accessConditions", "contextRefs", "extensions"], + "properties": { + "id": { "$ref": "#/$defs/Id" }, + "type": { "const": "masa:Encounter" }, + "occurredAt": { "$ref": "#/$defs/Timestamp" }, + "actors": { "type": "array", "items": { "$ref": "#/$defs/Id" }, "minItems": 1, "uniqueItems": true }, + "question": { "type": "string", "minLength": 1, "maxLength": 4096 }, + "position": { "$ref": "#/$defs/QualifiedValue" }, + "accessConditions": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 2048 } }, + "contextRefs": { "type": "array", "items": { "$ref": "#/$defs/Id" }, "uniqueItems": true }, + "extensions": { "$ref": "#/$defs/ExtensionBag" } + }, + "additionalProperties": false + }, + "Aperture": { + "type": "object", + "required": ["id", "type", "description", "channels", "ranges", "windows", "preprocessing", "exclusions", "blindSpots", "extensions"], + "properties": { + "id": { "$ref": "#/$defs/Id" }, + "type": { "const": "masa:Aperture" }, + "description": { "type": "string", "minLength": 1, "maxLength": 4096 }, + "channels": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 256 } }, + "ranges": { "type": "array", "items": { "$ref": "#/$defs/Window" } }, + "windows": { "type": "array", "items": { "$ref": "#/$defs/Window" } }, + "thresholds": { "type": "array", "items": { "$ref": "#/$defs/Threshold" } }, + "preprocessing": { "type": "array", "items": { "$ref": "#/$defs/Method" } }, + "exclusions": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 2048 } }, + "blindSpots": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 2048 } }, + "extensions": { "$ref": "#/$defs/ExtensionBag" } + }, + "additionalProperties": false + }, + "EvidenceReference": { + "type": "object", + "required": ["ref", "role"], + "properties": { + "ref": { "$ref": "#/$defs/Id" }, + "role": { "type": "string", "enum": ["source", "representation", "claim", "measurement", "observation", "context", "operation", "external"] }, + "locator": { "type": "string", "minLength": 1, "maxLength": 2048 } + }, + "additionalProperties": false + }, + "Claim": { + "type": "object", + "required": ["id", "type", "kind", "about", "basis", "actor", "createdAt", "method", "confidence", "uncertainty", "disclosure", "extensions"], + "properties": { + "id": { "$ref": "#/$defs/Id" }, + "type": { "const": "masa:Claim" }, + "kind": { "type": "string", "enum": ["heard", "measured", "inferred", "interpreted", "speculative", "undetermined"] }, + "about": { "type": "array", "items": { "$ref": "#/$defs/Id" }, "minItems": 1, "uniqueItems": true }, + "basis": { "type": "array", "items": { "$ref": "#/$defs/EvidenceReference" }, "minItems": 1 }, + "actor": { "$ref": "#/$defs/Id" }, + "createdAt": { "$ref": "#/$defs/Timestamp" }, + "content": { "$ref": "#/$defs/NonNullJsonValue" }, + "value": { "$ref": "#/$defs/NonNullJsonValue" }, + "unit": { "type": "string", "minLength": 1, "maxLength": 128 }, + "window": { "$ref": "#/$defs/Window" }, + "method": { "$ref": "#/$defs/Method" }, + "position": { "$ref": "#/$defs/QualifiedValue" }, + "listeningPassRef": { "$ref": "#/$defs/Id" }, + "boundary": { "type": "string", "minLength": 1, "maxLength": 4096 }, + "confidence": { "$ref": "#/$defs/Confidence" }, + "uncertainty": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 2048 } }, + "alternativeClaimRefs": { "type": "array", "items": { "$ref": "#/$defs/Id" }, "uniqueItems": true }, + "disclosure": { "$ref": "#/$defs/Disclosure" }, + "extensions": { "$ref": "#/$defs/ExtensionBag" } + }, + "allOf": [ + { + "if": { "properties": { "kind": { "const": "heard" } }, "required": ["kind"] }, + "then": { "required": ["content", "listeningPassRef"] } + }, + { + "if": { "properties": { "kind": { "const": "measured" } }, "required": ["kind"] }, + "then": { "required": ["value", "unit", "window"] } + }, + { + "if": { "properties": { "kind": { "const": "inferred" } }, "required": ["kind"] }, + "then": { + "anyOf": [ + { "required": ["content"] }, + { "required": ["value"] } + ] + } + }, + { + "if": { "properties": { "kind": { "const": "interpreted" } }, "required": ["kind"] }, + "then": { "required": ["content", "position"] } + }, + { + "if": { "properties": { "kind": { "const": "speculative" } }, "required": ["kind"] }, + "then": { "required": ["content", "boundary"] } + }, + { + "if": { "properties": { "kind": { "const": "undetermined" } }, "required": ["kind"] }, + "then": { "properties": { "uncertainty": { "minItems": 1 } } } + } + ], + "additionalProperties": false + }, + "ListeningPass": { + "type": "object", + "required": ["id", "type", "actors", "representations", "encounterRef", "apertureRef", "modes", "createdAt", "outcome", "claimRefs", "disclosure", "extensions"], + "properties": { + "id": { "$ref": "#/$defs/Id" }, + "type": { "const": "masa:ListeningPass" }, + "actors": { "type": "array", "items": { "$ref": "#/$defs/Id" }, "minItems": 1, "uniqueItems": true }, + "representations": { "type": "array", "items": { "$ref": "#/$defs/Id" }, "minItems": 1, "uniqueItems": true }, + "encounterRef": { "$ref": "#/$defs/Id" }, + "apertureRef": { "$ref": "#/$defs/Id" }, + "modes": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 256 }, "minItems": 1, "uniqueItems": true }, + "createdAt": { "$ref": "#/$defs/Timestamp" }, + "outcome": { "type": "string", "enum": ["claims", "wait", "withhold", "refuse", "undetermined"] }, + "claimRefs": { "type": "array", "items": { "$ref": "#/$defs/Id" }, "uniqueItems": true }, + "notes": { "type": "string", "maxLength": 16384 }, + "disclosure": { "$ref": "#/$defs/Disclosure" }, + "extensions": { "$ref": "#/$defs/ExtensionBag" } + }, + "allOf": [ + { + "if": { "properties": { "outcome": { "const": "claims" } }, "required": ["outcome"] }, + "then": { "properties": { "claimRefs": { "minItems": 1 } } } + } + ], + "additionalProperties": false + }, + "Region": { + "type": "object", + "required": ["id", "type", "representationRef", "basis", "bounds", "createdBy", "createdAt", "uncertainty", "extensions"], + "properties": { + "id": { "$ref": "#/$defs/Id" }, + "type": { "const": "masa:Region" }, + "representationRef": { "$ref": "#/$defs/Id" }, + "basis": { "type": "string", "enum": ["temporal", "spectral", "spatial", "semantic", "causal", "morphological", "custom"] }, + "bounds": { "type": "object", "minProperties": 1, "additionalProperties": { "$ref": "#/$defs/JsonValue" } }, + "createdBy": { "$ref": "#/$defs/Id" }, + "createdAt": { "$ref": "#/$defs/Timestamp" }, + "method": { "$ref": "#/$defs/Method" }, + "uncertainty": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 2048 } }, + "extensions": { "$ref": "#/$defs/ExtensionBag" } + }, + "additionalProperties": false + }, + "Measurement": { + "type": "object", + "required": ["id", "type", "about", "metric", "value", "unit", "method", "window", "actor", "createdAt", "uncertainty", "extensions"], + "properties": { + "id": { "$ref": "#/$defs/Id" }, + "type": { "const": "masa:Measurement" }, + "about": { "$ref": "#/$defs/Id" }, + "metric": { "type": "string", "minLength": 1, "maxLength": 512 }, + "value": { "$ref": "#/$defs/NonNullJsonValue" }, + "unit": { "type": "string", "minLength": 1, "maxLength": 128 }, + "method": { "$ref": "#/$defs/Method" }, + "window": { "$ref": "#/$defs/Window" }, + "actor": { "$ref": "#/$defs/Id" }, + "createdAt": { "$ref": "#/$defs/Timestamp" }, + "uncertainty": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 2048 } }, + "claimRef": { "$ref": "#/$defs/Id" }, + "extensions": { "$ref": "#/$defs/ExtensionBag" } + }, + "additionalProperties": false + }, + "Observation": { + "type": "object", + "required": ["id", "type", "sourceRef", "field", "observedAt", "scope", "value", "unit", "method", "health", "freshness", "disclosure", "extensions"], + "properties": { + "id": { "$ref": "#/$defs/Id" }, + "type": { "const": "masa:Observation" }, + "sourceRef": { "$ref": "#/$defs/Id" }, + "field": { "type": "string", "minLength": 1, "maxLength": 512 }, + "observedAt": { "$ref": "#/$defs/Timestamp" }, + "scope": { "$ref": "#/$defs/QualifiedValue" }, + "value": { "$ref": "#/$defs/QualifiedValue" }, + "unit": { "$ref": "#/$defs/QualifiedValue" }, + "method": { "$ref": "#/$defs/Method" }, + "health": { "$ref": "#/$defs/SourceHealth" }, + "freshness": { "$ref": "#/$defs/Freshness" }, + "epistemicStatus": { + "type": "string", + "enum": ["measured", "reported", "derived", "inferred", "interpreted", "speculative", "undetermined"] + }, + "temporalCharacter": { + "type": "string", + "enum": ["event", "stream", "forecast", "aggregate", "context", "local"] + }, + "signalKind": { + "type": "string", + "enum": ["observation", "derived", "generator"] + }, + "claimRef": { "$ref": "#/$defs/Id" }, + "disclosure": { "$ref": "#/$defs/Disclosure" }, + "extensions": { "$ref": "#/$defs/ExtensionBag" } + }, + "additionalProperties": false + }, + "Mapping": { + "type": "object", + "required": ["id", "type", "sourceObservationRefs", "sourceField", "sourceUnit", "inputRange", "normalization", "target", "outputRange", "curve", "smoothingMs", "cadence", "missingData", "epistemicNote", "actors", "createdAt", "extensions"], + "properties": { + "id": { "$ref": "#/$defs/Id" }, + "type": { "const": "masa:Mapping" }, + "sourceObservationRefs": { "type": "array", "items": { "$ref": "#/$defs/Id" }, "minItems": 1, "uniqueItems": true }, + "sourceField": { "type": "string", "minLength": 1, "maxLength": 512 }, + "sourceUnit": { "type": "string", "minLength": 1, "maxLength": 128 }, + "inputRange": { "type": "array", "prefixItems": [{ "type": "number" }, { "type": "number" }], "items": false, "minItems": 2, "maxItems": 2 }, + "normalization": { + "type": "object", + "required": ["method", "clipping", "parameters"], + "properties": { + "method": { "type": "string", "enum": ["linear", "log", "exponential", "quantized", "categorical", "custom"] }, + "clipping": { "type": "string", "enum": ["clamp", "wrap", "reject", "custom"] }, + "parameters": { "type": "object", "additionalProperties": true } + }, + "additionalProperties": false + }, + "target": { "type": "string", "minLength": 1, "maxLength": 512 }, + "outputRange": { "type": "array", "prefixItems": [{ "type": "number" }, { "type": "number" }], "items": false, "minItems": 2, "maxItems": 2 }, + "curve": { "type": "string", "enum": ["linear", "log", "exponential", "quantized", "categorical", "custom"] }, + "smoothingMs": { "type": "number", "minimum": 0 }, + "cadence": { "type": "string", "minLength": 1, "maxLength": 256 }, + "missingData": { "type": "string", "enum": ["skip", "hold-explicitly", "interpolate-explicitly", "map-uncertainty", "refuse"] }, + "epistemicNote": { "type": "string", "minLength": 1, "maxLength": 4096 }, + "actors": { "type": "array", "items": { "$ref": "#/$defs/Id" }, "minItems": 1, "uniqueItems": true }, + "createdAt": { "$ref": "#/$defs/Timestamp" }, + "extensions": { "$ref": "#/$defs/ExtensionBag" } + }, + "additionalProperties": false + }, + "PolicyRule": { + "type": "object", + "required": ["id", "effect", "actions", "targets", "subjects", "authorityBasis", "constraints", "duties"], + "properties": { + "id": { "$ref": "#/$defs/Id" }, + "effect": { "type": "string", "enum": ["permission", "prohibition", "duty", "unknown"] }, + "actions": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 256 }, "minItems": 1, "uniqueItems": true }, + "targets": { "type": "array", "items": { "$ref": "#/$defs/Id" }, "minItems": 1, "uniqueItems": true }, + "subjects": { "type": "array", "items": { "$ref": "#/$defs/Id" }, "uniqueItems": true }, + "authorityBasis": { "$ref": "#/$defs/QualifiedValue" }, + "constraints": { "type": "object", "additionalProperties": true }, + "duties": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 2048 } } + }, + "additionalProperties": false + }, + "PolicyEvaluation": { + "type": "object", + "required": ["action", "targets", "policyRefs", "result", "evaluatedAt", "evaluator", "authorityRefs", "reasons"], + "properties": { + "action": { "type": "string", "minLength": 1, "maxLength": 256 }, + "targets": { "type": "array", "items": { "$ref": "#/$defs/Id" }, "minItems": 1, "uniqueItems": true }, + "policyRefs": { "type": "array", "items": { "$ref": "#/$defs/Id" }, "minItems": 1, "uniqueItems": true }, + "result": { "type": "string", "enum": ["permitted", "prohibited", "required", "unknown", "refused", "under_review"] }, + "evaluatedAt": { "$ref": "#/$defs/Timestamp" }, + "evaluator": { "$ref": "#/$defs/Id" }, + "authorityRefs": { "type": "array", "items": { "$ref": "#/$defs/Id" }, "uniqueItems": true }, + "reasons": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 2048 }, "minItems": 1 } + }, + "additionalProperties": false + }, + "Policy": { + "type": "object", + "required": ["id", "type", "policyKind", "issuer", "status", "disclosure", "rules", "review", "extensions"], + "properties": { + "id": { "$ref": "#/$defs/Id" }, + "type": { "const": "masa:Policy" }, + "policyKind": { "type": "string", "enum": ["license", "consent", "jurisdiction", "covenant", "provider-terms", "retention", "publication", "composite"] }, + "issuer": { "$ref": "#/$defs/Id" }, + "status": { "type": "string", "enum": ["active", "expired", "revoked", "under_review", "unknown"] }, + "validFrom": { "$ref": "#/$defs/Timestamp" }, + "validUntil": { "$ref": "#/$defs/Timestamp" }, + "disclosure": { "$ref": "#/$defs/Disclosure" }, + "rules": { "type": "array", "items": { "$ref": "#/$defs/PolicyRule" }, "minItems": 1 }, + "review": { + "type": "object", + "required": ["contact", "route"], + "properties": { + "contact": { "$ref": "#/$defs/QualifiedValue" }, + "route": { "$ref": "#/$defs/QualifiedValue" } + }, + "additionalProperties": false + }, + "extensions": { "$ref": "#/$defs/ExtensionBag" } + }, + "additionalProperties": false + }, + "Tool": { + "type": "object", + "required": ["id", "name", "version", "kind"], + "properties": { + "id": { "$ref": "#/$defs/Id" }, + "name": { "type": "string", "minLength": 1, "maxLength": 512 }, + "version": { "$ref": "#/$defs/QualifiedValue" }, + "kind": { "type": "string", "enum": ["software", "script", "model", "instrument", "human-procedure", "service", "other"] }, + "provider": { "$ref": "#/$defs/QualifiedValue" }, + "adapter": { "$ref": "#/$defs/QualifiedValue" } + }, + "additionalProperties": false + }, + "ToolState": { + "oneOf": [ + { + "type": "object", + "required": ["state", "value"], + "properties": { + "state": { "const": "known" }, + "value": { "$ref": "#/$defs/Tool" } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": ["state", "reason"], + "properties": { + "state": { "enum": ["unknown", "unavailable"] }, + "reason": { "type": "string", "minLength": 1, "maxLength": 2048 } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": ["state", "reason", "policyRefs"], + "properties": { + "state": { "const": "withheld" }, + "reason": { "type": "string", "minLength": 1, "maxLength": 2048 }, + "policyRefs": { + "type": "array", + "items": { "$ref": "#/$defs/Id" }, + "minItems": 1, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": ["state", "reason", "receiptRefs"], + "properties": { + "state": { "const": "deleted" }, + "reason": { "type": "string", "minLength": 1, "maxLength": 2048 }, + "receiptRefs": { + "type": "array", + "items": { "$ref": "#/$defs/Id" }, + "minItems": 1, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": ["state"], + "properties": { "state": { "const": "not_applicable" } }, + "additionalProperties": false + } + ] + }, + "OperationReceipt": { + "type": "object", + "required": ["id", "type", "recordId", "sequence", "operationType", "effectClass", "finalStatus", "startedAt", "endedAt", "actors", "inputs", "outputs", "tool", "parameters", "policyEvaluation", "reversibility", "determinism", "warnings", "errors", "claimRefs", "extensions"], + "properties": { + "id": { "$ref": "#/$defs/Id" }, + "type": { "const": "masa:OperationReceipt" }, + "recordId": { "$ref": "#/$defs/Id" }, + "sequence": { "type": "integer", "minimum": 0 }, + "operationType": { "type": "string", "pattern": "^(matter\\.[a-z][a-z0-9_-]*|[a-z][a-z0-9-]*:[a-z][a-z0-9_-]*)$" }, + "effectClass": { "type": "string", "enum": ["read", "derive", "transform", "generate", "map", "render", "perform", "remember", "withhold", "expire", "delete", "publish", "external-action", "none"] }, + "finalStatus": { "type": "string", "enum": ["completed", "partial", "failed", "refused", "cancelled", "not_performed", "undetermined"] }, + "startedAt": { "$ref": "#/$defs/Timestamp" }, + "endedAt": { "$ref": "#/$defs/Timestamp" }, + "actors": { "type": "array", "items": { "$ref": "#/$defs/Id" }, "minItems": 1, "uniqueItems": true }, + "inputs": { "type": "array", "items": { "$ref": "#/$defs/Id" }, "uniqueItems": true }, + "outputs": { "type": "array", "items": { "$ref": "#/$defs/Id" }, "uniqueItems": true }, + "tool": { "$ref": "#/$defs/ToolState" }, + "parameters": { "type": "object", "additionalProperties": true }, + "environment": { "type": "object", "additionalProperties": true }, + "policyEvaluation": { "$ref": "#/$defs/PolicyEvaluation" }, + "reversibility": { "type": "string", "enum": ["reversible", "interface_reversible", "compensatable", "irreversible", "undetermined"] }, + "determinism": { + "type": "object", + "required": ["state"], + "properties": { + "state": { "type": "string", "enum": ["deterministic", "seeded", "nondeterministic", "undetermined"] }, + "seed": { "$ref": "#/$defs/NonNullJsonValue" }, + "note": { "type": "string", "maxLength": 2048 } + }, + "allOf": [ + { + "if": { "properties": { "state": { "const": "seeded" } }, "required": ["state"] }, + "then": { "required": ["seed"] } + } + ], + "additionalProperties": false + }, + "warnings": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 2048 } }, + "errors": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 2048 } }, + "claimRefs": { "type": "array", "items": { "$ref": "#/$defs/Id" }, "uniqueItems": true }, + "extensions": { "$ref": "#/$defs/ExtensionBag" } + }, + "allOf": [ + { + "if": { "properties": { "finalStatus": { "enum": ["failed", "refused", "cancelled", "not_performed"] } }, "required": ["finalStatus"] }, + "then": { "properties": { "outputs": { "maxItems": 0 } } } + }, + { + "if": { "properties": { "effectClass": { "enum": ["delete", "publish"] } }, "required": ["effectClass"] }, + "then": { "properties": { "reversibility": { "const": "irreversible" } } } + } + ], + "additionalProperties": false + }, + "Relation": { + "type": "object", + "required": ["id", "type", "subject", "predicate", "object", "assertedBy", "createdAt", "basis", "extensions"], + "properties": { + "id": { "$ref": "#/$defs/Id" }, + "type": { "const": "masa:Relation" }, + "subject": { "$ref": "#/$defs/Id" }, + "predicate": { "type": "string", "pattern": "^[a-z][a-z0-9-]*:[a-z][a-z0-9_-]*$" }, + "object": { "$ref": "#/$defs/Id" }, + "assertedBy": { "$ref": "#/$defs/Id" }, + "createdAt": { "$ref": "#/$defs/Timestamp" }, + "basis": { "type": "array", "items": { "$ref": "#/$defs/EvidenceReference" }, "minItems": 1 }, + "operationRef": { "$ref": "#/$defs/Id" }, + "extensions": { "$ref": "#/$defs/ExtensionBag" } + }, + "additionalProperties": false + }, + "Context": { + "type": "object", + "required": ["id", "type", "contextKind", "provenance", "applicability", "position", "claimStatus", "disclosure", "extensions"], + "properties": { + "id": { "$ref": "#/$defs/Id" }, + "type": { "const": "masa:Context" }, + "contextKind": { "type": "string", "enum": ["historical", "territorial", "ecological", "institutional", "compositional", "cosmological", "technical", "custom"] }, + "content": { "$ref": "#/$defs/NonNullJsonValue" }, + "reference": { "$ref": "#/$defs/QualifiedValue" }, + "provenance": { "$ref": "#/$defs/QualifiedValue" }, + "applicability": { "type": "string", "minLength": 1, "maxLength": 4096 }, + "position": { "$ref": "#/$defs/QualifiedValue" }, + "claimStatus": { "type": "string", "enum": ["measured", "inferred", "interpreted", "speculative", "undetermined", "not_a_claim"] }, + "disclosure": { "$ref": "#/$defs/Disclosure" }, + "extensions": { "$ref": "#/$defs/ExtensionBag" } + }, + "anyOf": [{ "required": ["content"] }, { "required": ["reference"] }], + "additionalProperties": false + }, + "AgentRun": { + "type": "object", + "required": ["id", "type", "actorRef", "plan", "capabilityRefs", "memoryRefs", "authorityRefs", "budget", "stopConditions", "operationRefs", "review", "outcome", "extensions"], + "properties": { + "id": { "$ref": "#/$defs/Id" }, + "type": { "const": "masa:AgentRun" }, + "actorRef": { "$ref": "#/$defs/Id" }, + "plan": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 4096 }, "minItems": 1 }, + "capabilityRefs": { "type": "array", "items": { "$ref": "#/$defs/Id" }, "minItems": 1, "uniqueItems": true }, + "memoryRefs": { "type": "array", "items": { "$ref": "#/$defs/Id" }, "uniqueItems": true }, + "authorityRefs": { "type": "array", "items": { "$ref": "#/$defs/Id" }, "uniqueItems": true }, + "budget": { "type": "object", "minProperties": 1, "additionalProperties": { "$ref": "#/$defs/JsonValue" } }, + "stopConditions": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 2048 }, "minItems": 1 }, + "operationRefs": { "type": "array", "items": { "$ref": "#/$defs/Id" }, "uniqueItems": true }, + "review": { "$ref": "#/$defs/QualifiedValue" }, + "outcome": { "type": "string", "enum": ["completed", "partial", "failed", "refused", "cancelled", "not_performed", "undetermined"] }, + "extensions": { "$ref": "#/$defs/ExtensionBag" } + }, + "additionalProperties": false + }, + "Publication": { + "type": "object", + "required": ["publicRecordId", "approvedAt", "approvedBy", "policyEvaluation", "omissions", "redactions", "attribution", "license", "retention", "correctionUrl", "revocationUrl", "approvedExtensionNamespaces"], + "properties": { + "publicRecordId": { "$ref": "#/$defs/Id" }, + "approvedAt": { "$ref": "#/$defs/Timestamp" }, + "approvedBy": { "$ref": "#/$defs/Id" }, + "policyEvaluation": { "$ref": "#/$defs/PolicyEvaluation" }, + "omissions": { + "type": "array", + "items": { + "type": "object", + "required": ["pointer", "category", "reason"], + "properties": { + "pointer": { "type": "string", "pattern": "^/" }, + "category": { "type": "string", "minLength": 1, "maxLength": 256 }, + "reason": { "type": "string", "minLength": 1, "maxLength": 2048 } + }, + "additionalProperties": false + } + }, + "redactions": { + "type": "array", + "items": { + "type": "object", + "required": ["pointer", "category"], + "properties": { + "pointer": { "type": "string", "pattern": "^/" }, + "category": { "type": "string", "minLength": 1, "maxLength": 256 } + }, + "additionalProperties": false + } + }, + "attribution": { "$ref": "#/$defs/QualifiedValue" }, + "license": { "$ref": "#/$defs/QualifiedValue" }, + "retention": { "$ref": "#/$defs/QualifiedValue" }, + "correctionUrl": { "type": "string", "format": "uri", "pattern": "^https://" }, + "revocationUrl": { "type": "string", "format": "uri", "pattern": "^https://" }, + "approvedExtensionNamespaces": { "type": "array", "items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*:$" }, "uniqueItems": true } + }, + "additionalProperties": false + }, + "History": { + "oneOf": [ + { + "type": "object", + "required": ["mode", "events"], + "properties": { + "mode": { "const": "embedded" }, + "events": { "type": "array", "items": { "$ref": "#/$defs/OperationReceipt" } } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": ["mode", "href", "eventIds"], + "properties": { + "mode": { "const": "external" }, + "href": { "type": "string", "pattern": "^(?!/)(?!.*\\\\)(?!.*(?:^|/)\\.\\.(?:/|$))[A-Za-z0-9._/-]+$" }, + "eventIds": { "type": "array", "items": { "$ref": "#/$defs/Id" }, "uniqueItems": true } + }, + "additionalProperties": false + } + ] + } + } +} diff --git a/schemas/0.2.0/event.schema.json b/schemas/0.2.0/event.schema.json new file mode 100644 index 0000000..704584c --- /dev/null +++ b/schemas/0.2.0/event.schema.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/event.schema.json", + "title": "MASA 0.2.0 event receipt", + "description": "One complete OperationReceipt suitable for an embedded history or one events.ndjson line.", + "$ref": "definitions.schema.json#/$defs/OperationReceipt" +} diff --git a/schemas/0.2.0/manifest.schema.json b/schemas/0.2.0/manifest.schema.json new file mode 100644 index 0000000..18e00c3 --- /dev/null +++ b/schemas/0.2.0/manifest.schema.json @@ -0,0 +1,119 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/manifest.schema.json", + "title": "MASA 0.2.0 bundle manifest", + "type": "object", + "required": [ + "manifestType", + "manifestVersion", + "masaVersion", + "id", + "createdAt", + "createdBy", + "disclosure", + "profiles", + "records", + "files", + "externalReferences", + "omissions", + "extensions" + ], + "properties": { + "manifestType": { "const": "masa-bundle" }, + "manifestVersion": { "const": "0.2.0" }, + "masaVersion": { "const": "0.2.0" }, + "id": { "$ref": "definitions.schema.json#/$defs/Id" }, + "createdAt": { "$ref": "definitions.schema.json#/$defs/Timestamp" }, + "createdBy": { "$ref": "definitions.schema.json#/$defs/Id" }, + "disclosure": { "$ref": "definitions.schema.json#/$defs/Disclosure" }, + "profiles": { + "type": "array", + "items": { + "type": "string", + "enum": ["core", "audio", "listening", "analysis", "transformation", "generation", "processing", "mapping", "agent", "publication"] + }, + "minItems": 1, + "uniqueItems": true, + "contains": { "const": "core" } + }, + "records": { + "type": "array", + "items": { + "type": "object", + "required": ["id", "path"], + "properties": { + "id": { "$ref": "definitions.schema.json#/$defs/Id" }, + "path": { "$ref": "#/$defs/RelativePath" } + }, + "additionalProperties": false + }, + "minItems": 1 + }, + "files": { + "type": "array", + "items": { "$ref": "#/$defs/FileEntry" } + }, + "externalReferences": { + "type": "array", + "items": { "$ref": "#/$defs/ExternalReference" } + }, + "omissions": { + "type": "array", + "items": { + "type": "object", + "required": ["category", "reason"], + "properties": { + "category": { "type": "string", "minLength": 1, "maxLength": 256 }, + "reason": { "type": "string", "minLength": 1, "maxLength": 2048 }, + "ref": { "$ref": "definitions.schema.json#/$defs/Id" } + }, + "additionalProperties": false + } + }, + "extensions": { "$ref": "definitions.schema.json#/$defs/ExtensionBag" } + }, + "$defs": { + "RelativePath": { + "type": "string", + "minLength": 1, + "maxLength": 4096, + "pattern": "^(?!/)(?![A-Za-z]:)(?!.*\\\\)(?!.*//)(?!.*\\/$)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\u0000-\\u001F\\u007F]+$" + }, + "FileEntry": { + "type": "object", + "required": ["path", "role", "mediaType", "byteLength", "sha256", "disclosure"], + "properties": { + "path": { "$ref": "#/$defs/RelativePath" }, + "role": { + "type": "string", + "enum": ["record", "event-log", "policy", "original", "derivative", "preview", "report", "other"] + }, + "mediaType": { "type": "string", "pattern": "^[A-Za-z0-9!#$&^_.+-]+/[A-Za-z0-9!#$&^_.+-]+$" }, + "byteLength": { "type": "integer", "minimum": 0 }, + "sha256": { "type": "string", "pattern": "^[A-Fa-f0-9]{64}$" }, + "disclosure": { "$ref": "definitions.schema.json#/$defs/Disclosure" }, + "recordRef": { "$ref": "definitions.schema.json#/$defs/Id" } + }, + "additionalProperties": false + }, + "ExternalReference": { + "type": "object", + "required": ["id", "role", "availability", "locator", "policyRefs", "disclosure"], + "properties": { + "id": { "$ref": "definitions.schema.json#/$defs/Id" }, + "role": { "type": "string", "minLength": 1, "maxLength": 256 }, + "availability": { "type": "string", "enum": ["external", "withheld", "unavailable", "deleted"] }, + "locator": { "$ref": "definitions.schema.json#/$defs/QualifiedValue" }, + "policyRefs": { + "type": "array", + "items": { "$ref": "definitions.schema.json#/$defs/Id" }, + "minItems": 1, + "uniqueItems": true + }, + "disclosure": { "$ref": "definitions.schema.json#/$defs/Disclosure" } + }, + "additionalProperties": false + } + }, + "additionalProperties": false +} diff --git a/schemas/0.2.0/matter-record.schema.json b/schemas/0.2.0/matter-record.schema.json new file mode 100644 index 0000000..830bd83 --- /dev/null +++ b/schemas/0.2.0/matter-record.schema.json @@ -0,0 +1,214 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json", + "title": "MASA 0.2.0 MatterRecord", + "description": "The normative MASA Core record envelope. Cross-reference, lineage, policy, and profile invariants require semantic validation after JSON Schema validation.", + "type": "object", + "required": [ + "$schema", + "masaVersion", + "id", + "type", + "revision", + "profiles", + "createdAt", + "createdBy", + "disclosure", + "registers", + "scales", + "actors", + "sources", + "representations", + "encounters", + "apertures", + "listeningPasses", + "claims", + "measurements", + "regions", + "observations", + "mappings", + "relations", + "policies", + "contexts", + "agentRuns", + "capabilities", + "integrity", + "history", + "extensions" + ], + "properties": { + "$schema": { + "type": "string", + "const": "https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json" + }, + "@context": { + "oneOf": [ + { + "type": "string", + "const": "https://masa.sonicfield.org/contexts/0.2.0/masa.jsonld" + }, + { + "type": "array", + "items": { "type": ["string", "object"] }, + "minItems": 1 + } + ] + }, + "masaVersion": { "const": "0.2.0" }, + "id": { "$ref": "definitions.schema.json#/$defs/Id" }, + "type": { "const": "masa:MatterRecord" }, + "revision": { "type": "integer", "minimum": 1 }, + "supersedes": { "$ref": "definitions.schema.json#/$defs/Id" }, + "profiles": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "core", + "audio", + "listening", + "analysis", + "transformation", + "generation", + "processing", + "observation", + "mapping", + "agent", + "publication" + ] + }, + "minItems": 1, + "uniqueItems": true, + "contains": { "const": "core" } + }, + "createdAt": { "$ref": "definitions.schema.json#/$defs/Timestamp" }, + "createdBy": { "$ref": "definitions.schema.json#/$defs/Id" }, + "title": { "type": "string", "minLength": 1, "maxLength": 1024 }, + "description": { "type": "string", "minLength": 1, "maxLength": 16384 }, + "disclosure": { "$ref": "definitions.schema.json#/$defs/Disclosure" }, + "registers": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "enum": [ + "physical-event", + "perceptual-acoulogical", + "compositional-transformational", + "digital-technical", + "ecological-territorial", + "historical-political", + "cosmological-speculative" + ] + }, + { + "type": "string", + "pattern": "^[a-z][a-z0-9-]*:[a-z][a-z0-9_-]*$" + } + ] + }, + "minItems": 1, + "uniqueItems": true + }, + "scales": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "enum": [ + "microtemporal", + "spectral-stratal", + "object-event", + "meso-form", + "environmental", + "corpus-lineage", + "infrastructural", + "planetary", + "cosmic" + ] + }, + { + "type": "string", + "pattern": "^[a-z][a-z0-9-]*:[a-z][a-z0-9_-]*$" + } + ] + }, + "minItems": 1, + "uniqueItems": true + }, + "actors": { + "type": "array", + "items": { "$ref": "definitions.schema.json#/$defs/Actor" }, + "minItems": 1 + }, + "sources": { + "type": "array", + "items": { "$ref": "definitions.schema.json#/$defs/Source" } + }, + "representations": { + "type": "array", + "items": { "$ref": "definitions.schema.json#/$defs/Representation" }, + "minItems": 1 + }, + "encounters": { + "type": "array", + "items": { "$ref": "definitions.schema.json#/$defs/Encounter" } + }, + "apertures": { + "type": "array", + "items": { "$ref": "definitions.schema.json#/$defs/Aperture" } + }, + "listeningPasses": { + "type": "array", + "items": { "$ref": "definitions.schema.json#/$defs/ListeningPass" } + }, + "claims": { + "type": "array", + "items": { "$ref": "definitions.schema.json#/$defs/Claim" } + }, + "measurements": { + "type": "array", + "items": { "$ref": "definitions.schema.json#/$defs/Measurement" } + }, + "regions": { + "type": "array", + "items": { "$ref": "definitions.schema.json#/$defs/Region" } + }, + "observations": { + "type": "array", + "items": { "$ref": "definitions.schema.json#/$defs/Observation" } + }, + "mappings": { + "type": "array", + "items": { "$ref": "definitions.schema.json#/$defs/Mapping" } + }, + "relations": { + "type": "array", + "items": { "$ref": "definitions.schema.json#/$defs/Relation" } + }, + "policies": { + "type": "array", + "items": { "$ref": "definitions.schema.json#/$defs/Policy" }, + "minItems": 1 + }, + "contexts": { + "type": "array", + "items": { "$ref": "definitions.schema.json#/$defs/Context" } + }, + "agentRuns": { + "type": "array", + "items": { "$ref": "definitions.schema.json#/$defs/AgentRun" } + }, + "capabilities": { + "type": "array", + "items": { "$ref": "capability.schema.json" } + }, + "publication": { "$ref": "definitions.schema.json#/$defs/Publication" }, + "integrity": { "$ref": "definitions.schema.json#/$defs/QualifiedValue" }, + "history": { "$ref": "definitions.schema.json#/$defs/History" }, + "extensions": { "$ref": "definitions.schema.json#/$defs/ExtensionBag" } + }, + "additionalProperties": false +} diff --git a/schemas/0.2.0/policy.schema.json b/schemas/0.2.0/policy.schema.json new file mode 100644 index 0000000..3c0e620 --- /dev/null +++ b/schemas/0.2.0/policy.schema.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/policy.schema.json", + "title": "MASA 0.2.0 Policy", + "$ref": "definitions.schema.json#/$defs/Policy" +} diff --git a/schemas/0.2.0/processing-request.schema.json b/schemas/0.2.0/processing-request.schema.json new file mode 100644 index 0000000..4d0604a --- /dev/null +++ b/schemas/0.2.0/processing-request.schema.json @@ -0,0 +1,109 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/processing-request.schema.json", + "title": "MASA 0.2.0 processing request", + "description": "A validated, engine-neutral request for one sound-matter processing operation. An external engine adapter consumes the request, performs the signal processing under host authority, and returns descendants plus an OperationReceipt; MASA validates the result. A request grants no permission by itself.", + "type": "object", + "required": [ + "requestType", + "requestVersion", + "masaVersion", + "id", + "createdAt", + "operationType", + "inputs", + "parameters", + "determinism", + "policyRefs", + "outputContract", + "extensions" + ], + "properties": { + "requestType": { "const": "masa-processing-request" }, + "requestVersion": { "const": "0.2.0" }, + "masaVersion": { "const": "0.2.0" }, + "id": { "$ref": "definitions.schema.json#/$defs/Id" }, + "createdAt": { "$ref": "definitions.schema.json#/$defs/Timestamp" }, + "requestedBy": { "$ref": "definitions.schema.json#/$defs/Id" }, + "recordRef": { "$ref": "definitions.schema.json#/$defs/Id" }, + "operationType": { + "type": "string", + "enum": [ + "matter.granulate", + "matter.extract", + "matter.reduce", + "matter.fragment", + "matter.timestretch", + "matter.pitchshift" + ] + }, + "inputs": { + "type": "array", + "items": { "$ref": "definitions.schema.json#/$defs/Id" }, + "minItems": 1, + "uniqueItems": true + }, + "parameters": { "type": "object" }, + "determinism": { + "type": "string", + "enum": ["require-deterministic", "require-seeded", "accept-nondeterministic"] + }, + "engine": { "$ref": "definitions.schema.json#/$defs/QualifiedValue" }, + "policyRefs": { + "type": "array", + "items": { "$ref": "definitions.schema.json#/$defs/Id" }, + "uniqueItems": true + }, + "outputContract": { + "type": "object", + "required": ["roles", "maxOutputs"], + "properties": { + "roles": { + "type": "array", + "items": { + "type": "string", + "enum": ["derivative", "render", "preview", "data", "other"] + }, + "minItems": 1, + "uniqueItems": true + }, + "maxOutputs": { "type": "integer", "minimum": 1 }, + "mediaTypes": { + "type": "array", + "items": { "type": "string", "pattern": "^[A-Za-z0-9!#$&^_.+-]+/[A-Za-z0-9!#$&^_.+-]+$" }, + "minItems": 1, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "extensions": { "$ref": "definitions.schema.json#/$defs/ExtensionBag" } + }, + "allOf": [ + { + "if": { "properties": { "operationType": { "const": "matter.granulate" } }, "required": ["operationType"] }, + "then": { "properties": { "parameters": { "$ref": "profile-processing.schema.json#/$defs/GranulationParameters" } } } + }, + { + "if": { "properties": { "operationType": { "const": "matter.extract" } }, "required": ["operationType"] }, + "then": { "properties": { "parameters": { "$ref": "profile-processing.schema.json#/$defs/ExtractionParameters" } } } + }, + { + "if": { "properties": { "operationType": { "const": "matter.reduce" } }, "required": ["operationType"] }, + "then": { "properties": { "parameters": { "$ref": "profile-processing.schema.json#/$defs/ReductionParameters" } } } + }, + { + "if": { "properties": { "operationType": { "const": "matter.fragment" } }, "required": ["operationType"] }, + "then": { "properties": { "parameters": { "$ref": "profile-processing.schema.json#/$defs/FragmentationParameters" } } } + }, + { + "if": { "properties": { "operationType": { "const": "matter.timestretch" } }, "required": ["operationType"] }, + "then": { "properties": { "parameters": { "$ref": "profile-processing.schema.json#/$defs/TimeStretchParameters" } } } + }, + { + "if": { "properties": { "operationType": { "const": "matter.pitchshift" } }, "required": ["operationType"] }, + "then": { "properties": { "parameters": { "$ref": "profile-processing.schema.json#/$defs/PitchShiftParameters" } } } + } + ], + "additionalProperties": false +} diff --git a/schemas/0.2.0/profile-agent.schema.json b/schemas/0.2.0/profile-agent.schema.json new file mode 100644 index 0000000..b6b368d --- /dev/null +++ b/schemas/0.2.0/profile-agent.schema.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/profile-agent.schema.json", + "title": "MASA 0.2.0 Agent profile", + "allOf": [ + { "$ref": "matter-record.schema.json" }, + { + "properties": { + "profiles": { "contains": { "const": "agent" } }, + "actors": { + "contains": { + "allOf": [ + { "$ref": "definitions.schema.json#/$defs/Actor" }, + { "properties": { "actorKind": { "const": "agent" } } } + ] + } + }, + "agentRuns": { "minItems": 1 }, + "capabilities": { "minItems": 1 } + } + } + ] +} diff --git a/schemas/0.2.0/profile-analysis.schema.json b/schemas/0.2.0/profile-analysis.schema.json new file mode 100644 index 0000000..b1e3a99 --- /dev/null +++ b/schemas/0.2.0/profile-analysis.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/profile-analysis.schema.json", + "title": "MASA 0.2.0 Analysis profile", + "allOf": [ + { "$ref": "matter-record.schema.json" }, + { + "properties": { + "profiles": { "contains": { "const": "analysis" } } + }, + "anyOf": [ + { "properties": { "measurements": { "minItems": 1 } } }, + { "properties": { "regions": { "minItems": 1 } } } + ] + } + ] +} diff --git a/schemas/0.2.0/profile-audio.schema.json b/schemas/0.2.0/profile-audio.schema.json new file mode 100644 index 0000000..420c0a8 --- /dev/null +++ b/schemas/0.2.0/profile-audio.schema.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/profile-audio.schema.json", + "title": "MASA 0.2.0 Audio profile", + "allOf": [ + { "$ref": "matter-record.schema.json" }, + { + "properties": { + "profiles": { "contains": { "const": "audio" } }, + "representations": { + "contains": { + "allOf": [ + { "$ref": "definitions.schema.json#/$defs/Representation" }, + { + "required": ["audio"], + "properties": { + "mediaType": { "pattern": "^audio/" }, + "audio": { "$ref": "definitions.schema.json#/$defs/AudioTechnical" } + } + } + ] + } + } + } + } + ] +} diff --git a/schemas/0.2.0/profile-core.schema.json b/schemas/0.2.0/profile-core.schema.json new file mode 100644 index 0000000..49d634f --- /dev/null +++ b/schemas/0.2.0/profile-core.schema.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/profile-core.schema.json", + "title": "MASA 0.2.0 Core profile", + "allOf": [ + { "$ref": "matter-record.schema.json" }, + { + "properties": { + "profiles": { "contains": { "const": "core" } } + } + } + ] +} diff --git a/schemas/0.2.0/profile-generation.schema.json b/schemas/0.2.0/profile-generation.schema.json new file mode 100644 index 0000000..3b1d03f --- /dev/null +++ b/schemas/0.2.0/profile-generation.schema.json @@ -0,0 +1,97 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/profile-generation.schema.json", + "title": "MASA 0.2.0 Generation profile", + "allOf": [ + { "$ref": "matter-record.schema.json" }, + { + "properties": { + "profiles": { "contains": { "const": "generation" } } + }, + "anyOf": [ + { + "properties": { + "history": { + "type": "object", + "required": ["mode", "events"], + "properties": { + "mode": { "const": "embedded" }, + "events": { "contains": { "$ref": "#/$defs/GenerationOperation" } } + } + } + } + }, + { + "properties": { + "history": { + "type": "object", + "required": ["mode", "eventIds"], + "properties": { + "mode": { "const": "external" }, + "eventIds": { "minItems": 1 } + } + } + } + } + ] + } + ], + "$defs": { + "GenerationOperation": { + "allOf": [ + { "$ref": "definitions.schema.json#/$defs/OperationReceipt" }, + { + "properties": { + "operationType": { "enum": ["matter.generate", "matter.mutate", "matter.graft", "matter.continue", "matter.inpaint"] }, + "effectClass": { "const": "generate" }, + "parameters": { "$ref": "#/$defs/GenerationParameters" } + } + }, + { + "if": { "properties": { "operationType": { "const": "matter.graft" } }, "required": ["operationType"] }, + "then": { "properties": { "parameters": { "properties": { "parentRefs": { "minItems": 2 } } } } } + }, + { + "if": { "properties": { "operationType": { "const": "matter.inpaint" } }, "required": ["operationType"] }, + "then": { "properties": { "parameters": { "properties": { "regionRefs": { "minItems": 1 } } } } } + }, + { + "if": { "properties": { "finalStatus": { "const": "completed" } }, "required": ["finalStatus"] }, + "then": { "properties": { "outputs": { "minItems": 1 } } } + } + ] + }, + "GenerationParameters": { + "type": "object", + "required": [ + "generationMethod", + "parentRefs", + "conditioningRefs", + "regionRefs", + "prompt", + "negativePrompt", + "model", + "adapter", + "provider", + "providerPolicyState", + "selection", + "rejectedOutputRefs" + ], + "properties": { + "generationMethod": { "type": "string", "minLength": 1, "maxLength": 512 }, + "parentRefs": { "type": "array", "items": { "$ref": "definitions.schema.json#/$defs/Id" }, "uniqueItems": true }, + "conditioningRefs": { "type": "array", "items": { "$ref": "definitions.schema.json#/$defs/Id" }, "uniqueItems": true }, + "regionRefs": { "type": "array", "items": { "$ref": "definitions.schema.json#/$defs/Id" }, "uniqueItems": true }, + "prompt": { "$ref": "definitions.schema.json#/$defs/QualifiedValue" }, + "negativePrompt": { "$ref": "definitions.schema.json#/$defs/QualifiedValue" }, + "model": { "$ref": "definitions.schema.json#/$defs/QualifiedValue" }, + "adapter": { "$ref": "definitions.schema.json#/$defs/QualifiedValue" }, + "provider": { "$ref": "definitions.schema.json#/$defs/QualifiedValue" }, + "providerPolicyState": { "$ref": "definitions.schema.json#/$defs/QualifiedValue" }, + "selection": { "$ref": "definitions.schema.json#/$defs/QualifiedValue" }, + "rejectedOutputRefs": { "type": "array", "items": { "$ref": "definitions.schema.json#/$defs/Id" }, "uniqueItems": true } + }, + "additionalProperties": true + } + } +} diff --git a/schemas/0.2.0/profile-listening.schema.json b/schemas/0.2.0/profile-listening.schema.json new file mode 100644 index 0000000..24aa51b --- /dev/null +++ b/schemas/0.2.0/profile-listening.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/profile-listening.schema.json", + "title": "MASA 0.2.0 Listening profile", + "allOf": [ + { "$ref": "matter-record.schema.json" }, + { + "properties": { + "profiles": { "contains": { "const": "listening" } }, + "encounters": { "minItems": 1 }, + "apertures": { "minItems": 1 }, + "listeningPasses": { "minItems": 1 } + } + } + ] +} diff --git a/schemas/0.2.0/profile-mapping.schema.json b/schemas/0.2.0/profile-mapping.schema.json new file mode 100644 index 0000000..67cf179 --- /dev/null +++ b/schemas/0.2.0/profile-mapping.schema.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/profile-mapping.schema.json", + "title": "MASA 0.2.0 Mapping profile", + "allOf": [ + { "$ref": "matter-record.schema.json" }, + { + "properties": { + "profiles": { "contains": { "const": "mapping" } }, + "observations": { "minItems": 1 }, + "mappings": { "minItems": 1 } + } + } + ] +} diff --git a/schemas/0.2.0/profile-observation.schema.json b/schemas/0.2.0/profile-observation.schema.json new file mode 100644 index 0000000..0b3e755 --- /dev/null +++ b/schemas/0.2.0/profile-observation.schema.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/profile-observation.schema.json", + "title": "MASA 0.2.0 Observation profile", + "allOf": [ + { "$ref": "matter-record.schema.json" }, + { + "properties": { + "profiles": { "contains": { "const": "observation" } }, + "sources": { "minItems": 1 }, + "observations": { + "minItems": 1, + "items": { + "required": ["epistemicStatus", "temporalCharacter", "signalKind"] + } + } + } + } + ] +} diff --git a/schemas/0.2.0/profile-processing.schema.json b/schemas/0.2.0/profile-processing.schema.json new file mode 100644 index 0000000..118caac --- /dev/null +++ b/schemas/0.2.0/profile-processing.schema.json @@ -0,0 +1,324 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/profile-processing.schema.json", + "title": "MASA 0.2.0 Processing profile", + "description": "Granular, spectral, and time-pitch processing operations contracted to external engines and accounted through receipts. MASA describes and verifies processing; it performs none.", + "allOf": [ + { "$ref": "matter-record.schema.json" }, + { + "properties": { + "profiles": { "contains": { "const": "processing" } } + }, + "anyOf": [ + { + "properties": { + "history": { + "type": "object", + "required": ["mode", "events"], + "properties": { + "mode": { "const": "embedded" }, + "events": { "contains": { "$ref": "#/$defs/ProcessingOperation" } } + } + } + } + }, + { + "properties": { + "history": { + "type": "object", + "required": ["mode", "eventIds"], + "properties": { + "mode": { "const": "external" }, + "eventIds": { "minItems": 1 } + } + } + } + } + ] + }, + { + "if": { + "properties": { + "history": { + "type": "object", + "required": ["mode", "events"], + "properties": { + "mode": { "const": "embedded" }, + "events": { "contains": { "$ref": "#/$defs/CompletedProcessing" } } + } + } + } + }, + "then": { + "properties": { + "representations": { "minItems": 2 }, + "relations": { + "contains": { + "allOf": [ + { "$ref": "definitions.schema.json#/$defs/Relation" }, + { + "required": ["operationRef"], + "properties": { + "predicate": { + "enum": [ + "masa:granulated-from", + "masa:derived-from", + "masa:derivation-of", + "masa:segmented-from", + "masa:isolated-from", + "masa:variation-of", + "masa:parent-of", + "masa:child-of" + ] + } + } + } + ] + } + } + } + } + } + ], + "$defs": { + "ProcessingOperation": { + "allOf": [ + { "$ref": "definitions.schema.json#/$defs/OperationReceipt" }, + { + "properties": { + "operationType": { + "enum": [ + "matter.granulate", + "matter.extract", + "matter.reduce", + "matter.fragment", + "matter.timestretch", + "matter.pitchshift" + ] + }, + "effectClass": { "enum": ["derive", "transform"] } + } + }, + { + "if": { "properties": { "operationType": { "const": "matter.granulate" } }, "required": ["operationType"] }, + "then": { "properties": { "parameters": { "$ref": "#/$defs/GranulationParameters" } } } + }, + { + "if": { "properties": { "operationType": { "const": "matter.extract" } }, "required": ["operationType"] }, + "then": { "properties": { "parameters": { "$ref": "#/$defs/ExtractionParameters" } } } + }, + { + "if": { "properties": { "operationType": { "const": "matter.reduce" } }, "required": ["operationType"] }, + "then": { "properties": { "parameters": { "$ref": "#/$defs/ReductionParameters" } } } + }, + { + "if": { "properties": { "operationType": { "const": "matter.fragment" } }, "required": ["operationType"] }, + "then": { "properties": { "parameters": { "$ref": "#/$defs/FragmentationParameters" } } } + }, + { + "if": { "properties": { "operationType": { "const": "matter.timestretch" } }, "required": ["operationType"] }, + "then": { "properties": { "parameters": { "$ref": "#/$defs/TimeStretchParameters" } } } + }, + { + "if": { "properties": { "operationType": { "const": "matter.pitchshift" } }, "required": ["operationType"] }, + "then": { "properties": { "parameters": { "$ref": "#/$defs/PitchShiftParameters" } } } + }, + { + "if": { "properties": { "finalStatus": { "const": "completed" } }, "required": ["finalStatus"] }, + "then": { "properties": { "outputs": { "minItems": 1 } } } + } + ] + }, + "CompletedProcessing": { + "allOf": [ + { "$ref": "#/$defs/ProcessingOperation" }, + { + "properties": { + "finalStatus": { "const": "completed" }, + "outputs": { "minItems": 1 } + } + } + ] + }, + "GranulationParameters": { + "type": "object", + "required": ["grain", "emission", "selection", "output"], + "properties": { + "grain": { + "type": "object", + "required": ["durationMs", "envelope"], + "properties": { + "durationMs": { + "type": "object", + "required": ["min", "max"], + "properties": { + "min": { "type": "number", "exclusiveMinimum": 0 }, + "max": { "type": "number", "exclusiveMinimum": 0 } + }, + "additionalProperties": false + }, + "envelope": { + "type": "string", + "enum": ["gaussian", "expodec", "rexpodec", "triangular", "trapezoidal", "custom"] + }, + "pitchScatterCents": { "type": "number", "minimum": 0 }, + "amplitudeScatter": { "type": "number", "minimum": 0, "maximum": 1 }, + "panScatter": { "type": "number", "minimum": 0, "maximum": 1 } + }, + "additionalProperties": false + }, + "emission": { + "type": "object", + "required": ["mode", "grainsPerSecond"], + "properties": { + "mode": { + "type": "string", + "enum": ["synchronous", "quasi-synchronous", "asynchronous", "custom"] + }, + "grainsPerSecond": { "type": "number", "exclusiveMinimum": 0 }, + "totalGrains": { "type": "integer", "minimum": 1 } + }, + "additionalProperties": false + }, + "selection": { + "type": "object", + "required": ["order"], + "properties": { + "order": { + "type": "string", + "enum": ["linear", "random", "statistical", "authored", "custom"] + }, + "regionRefs": { + "type": "array", + "items": { "$ref": "definitions.schema.json#/$defs/Id" }, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "output": { + "type": "object", + "required": ["kind"], + "properties": { + "kind": { "type": "string", "enum": ["texture", "fragment-set"] } + }, + "additionalProperties": false + } + }, + "additionalProperties": true + }, + "ExtractionParameters": { + "type": "object", + "required": ["domain"], + "properties": { + "domain": { + "type": "string", + "enum": ["spectral-band", "spectral-strata", "partials", "temporal-region", "custom"] + }, + "bandHz": { + "type": "object", + "required": ["lowHz", "highHz"], + "properties": { + "lowHz": { "type": "number", "minimum": 0 }, + "highHz": { "type": "number", "exclusiveMinimum": 0 } + }, + "additionalProperties": false + }, + "strata": { + "type": "object", + "required": ["count"], + "properties": { + "count": { "type": "integer", "minimum": 1 }, + "method": { "type": "string", "minLength": 1, "maxLength": 512 } + }, + "additionalProperties": false + }, + "partials": { + "type": "object", + "required": ["count", "criterion"], + "properties": { + "count": { "type": "integer", "minimum": 1 }, + "criterion": { "type": "string", "enum": ["loudest", "lowest", "harmonic-template", "custom"] } + }, + "additionalProperties": false + }, + "regionRefs": { + "type": "array", + "items": { "$ref": "definitions.schema.json#/$defs/Id" }, + "uniqueItems": true + }, + "residual": { "type": "boolean" } + }, + "allOf": [ + { + "if": { "properties": { "domain": { "const": "spectral-band" } }, "required": ["domain"] }, + "then": { "required": ["bandHz"] } + }, + { + "if": { "properties": { "domain": { "const": "spectral-strata" } }, "required": ["domain"] }, + "then": { "required": ["strata"] } + }, + { + "if": { "properties": { "domain": { "const": "partials" } }, "required": ["domain"] }, + "then": { "required": ["partials"] } + }, + { + "if": { "properties": { "domain": { "const": "temporal-region" } }, "required": ["domain"] }, + "then": { "required": ["regionRefs"], "properties": { "regionRefs": { "minItems": 1 } } } + } + ], + "additionalProperties": true + }, + "ReductionParameters": { + "type": "object", + "required": ["kind"], + "properties": { + "kind": { + "type": "string", + "enum": ["spectral-peaks", "envelope", "decimation", "mixdown", "denoise", "custom"] + }, + "factor": { "type": "number", "exclusiveMinimum": 0 }, + "keepPartials": { "type": "integer", "minimum": 1 }, + "note": { "type": "string", "minLength": 1, "maxLength": 2048 } + }, + "additionalProperties": true + }, + "FragmentationParameters": { + "type": "object", + "required": ["strategy"], + "properties": { + "strategy": { + "type": "string", + "enum": ["regions", "transients", "equal-duration", "grains", "custom"] + }, + "regionRefs": { + "type": "array", + "items": { "$ref": "definitions.schema.json#/$defs/Id" }, + "uniqueItems": true + }, + "count": { "type": "integer", "minimum": 2 }, + "fragmentDurationMs": { "type": "number", "exclusiveMinimum": 0 } + }, + "additionalProperties": true + }, + "TimeStretchParameters": { + "type": "object", + "required": ["factor"], + "properties": { + "factor": { "type": "number", "exclusiveMinimum": 0 }, + "transientMode": { "type": "string", "enum": ["preserve", "smear", "custom"] }, + "formantPreserved": { "type": "boolean" } + }, + "additionalProperties": true + }, + "PitchShiftParameters": { + "type": "object", + "required": ["cents"], + "properties": { + "cents": { "type": "number", "minimum": -14400, "maximum": 14400 }, + "formantPreserved": { "type": "boolean" } + }, + "additionalProperties": true + } + } +} diff --git a/schemas/0.2.0/profile-publication.schema.json b/schemas/0.2.0/profile-publication.schema.json new file mode 100644 index 0000000..c84665e --- /dev/null +++ b/schemas/0.2.0/profile-publication.schema.json @@ -0,0 +1,76 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/profile-publication.schema.json", + "title": "MASA 0.2.0 Publication profile", + "allOf": [ + { "$ref": "matter-record.schema.json" }, + { + "required": ["publication"], + "properties": { + "profiles": { "contains": { "const": "publication" } }, + "disclosure": { "const": "public" }, + "publication": { + "allOf": [ + { "$ref": "definitions.schema.json#/$defs/Publication" }, + { + "properties": { + "policyEvaluation": { + "allOf": [ + { "$ref": "definitions.schema.json#/$defs/PolicyEvaluation" }, + { "properties": { "result": { "const": "permitted" } } } + ] + } + } + } + ] + } + }, + "anyOf": [ + { + "properties": { + "history": { + "type": "object", + "required": ["mode", "events"], + "properties": { + "mode": { "const": "embedded" }, + "events": { + "contains": { + "allOf": [ + { "$ref": "definitions.schema.json#/$defs/OperationReceipt" }, + { + "properties": { + "operationType": { "const": "matter.publish" }, + "effectClass": { "const": "publish" }, + "finalStatus": { "const": "completed" }, + "reversibility": { "const": "irreversible" }, + "policyEvaluation": { + "allOf": [ + { "$ref": "definitions.schema.json#/$defs/PolicyEvaluation" }, + { "properties": { "result": { "const": "permitted" } } } + ] + } + } + } + ] + } + } + } + } + } + }, + { + "properties": { + "history": { + "type": "object", + "required": ["mode", "eventIds"], + "properties": { + "mode": { "const": "external" }, + "eventIds": { "minItems": 1 } + } + } + } + } + ] + } + ] +} diff --git a/schemas/0.2.0/profile-transformation.schema.json b/schemas/0.2.0/profile-transformation.schema.json new file mode 100644 index 0000000..d71f016 --- /dev/null +++ b/schemas/0.2.0/profile-transformation.schema.json @@ -0,0 +1,120 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/profile-transformation.schema.json", + "title": "MASA 0.2.0 Transformation profile", + "allOf": [ + { "$ref": "matter-record.schema.json" }, + { + "properties": { + "profiles": { "contains": { "const": "transformation" } } + }, + "anyOf": [ + { + "properties": { + "history": { + "type": "object", + "required": ["mode", "events"], + "properties": { + "mode": { "const": "embedded" }, + "events": { "contains": { "$ref": "#/$defs/TransformationOperation" } } + } + } + } + }, + { + "properties": { + "history": { + "type": "object", + "required": ["mode", "eventIds"], + "properties": { + "mode": { "const": "external" }, + "eventIds": { "minItems": 1 } + } + } + } + } + ] + }, + { + "if": { + "properties": { + "history": { + "type": "object", + "required": ["mode", "events"], + "properties": { + "mode": { "const": "embedded" }, + "events": { "contains": { "$ref": "#/$defs/CompletedTransformation" } } + } + } + } + }, + "then": { + "properties": { + "representations": { "minItems": 2 }, + "relations": { + "contains": { + "allOf": [ + { "$ref": "definitions.schema.json#/$defs/Relation" }, + { + "required": ["operationRef"], + "properties": { + "predicate": { + "enum": ["masa:derived-from", "masa:derivation-of", "masa:segmented-from", "masa:isolated-from", "masa:variation-of", "masa:rendered-as", "masa:parent-of", "masa:child-of"] + } + } + } + ] + } + } + } + } + } + ], + "$defs": { + "TransformationOperation": { + "allOf": [ + { "$ref": "definitions.schema.json#/$defs/OperationReceipt" }, + { + "properties": { + "operationType": { + "enum": ["matter.segment", "matter.isolate", "matter.transform", "matter.sculpt", "matter.recompose", "matter.render", "matter.compensate"] + }, + "effectClass": { "enum": ["derive", "transform", "render"] } + } + } + ] + }, + "CompletedTransformation": { + "allOf": [ + { "$ref": "#/$defs/TransformationOperation" }, + { + "properties": { + "finalStatus": { "const": "completed" }, + "outputs": { "minItems": 1 }, + "parameters": { + "type": "object", + "required": ["preservationIntent"], + "properties": { + "preservationIntent": { "$ref": "#/$defs/PreservationIntent" } + } + } + } + } + ] + }, + "PreservationIntent": { + "type": "object", + "required": ["properties", "verification"], + "properties": { + "properties": { + "type": "array", + "items": { "type": "string", "minLength": 1, "maxLength": 512 }, + "minItems": 1, + "uniqueItems": true + }, + "verification": { "$ref": "definitions.schema.json#/$defs/QualifiedValue" } + }, + "additionalProperties": false + } + } +} diff --git a/schemas/0.2.0/public-record.schema.json b/schemas/0.2.0/public-record.schema.json new file mode 100644 index 0000000..380cf51 --- /dev/null +++ b/schemas/0.2.0/public-record.schema.json @@ -0,0 +1,100 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/public-record.schema.json", + "title": "MASA 0.2.0 public MatterRecord projection", + "description": "An allowlisted public projection. Runtime publication validation must additionally check reference closure, approved extension namespaces, paths, secrets, protected precision, and policy authority.", + "allOf": [ + { "$ref": "profile-publication.schema.json" }, + { + "type": "object", + "properties": { + "disclosure": { "const": "public" }, + "actors": { + "items": { + "allOf": [ + { "$ref": "definitions.schema.json#/$defs/Actor" }, + { "properties": { "disclosure": { "const": "public" } } } + ] + } + }, + "sources": { + "items": { + "allOf": [ + { "$ref": "definitions.schema.json#/$defs/Source" }, + { "properties": { "disclosure": { "const": "public" } } } + ] + } + }, + "representations": { + "items": { + "allOf": [ + { "$ref": "definitions.schema.json#/$defs/Representation" }, + { + "properties": { + "disclosure": { "const": "public" }, + "role": { "enum": ["derivative", "preview", "render", "data", "prompt", "score", "model-output", "performance-capture", "tombstone", "other"] }, + "availability": { "enum": ["available", "partial", "deleted"] } + } + } + ] + } + }, + "listeningPasses": { + "items": { + "allOf": [ + { "$ref": "definitions.schema.json#/$defs/ListeningPass" }, + { "properties": { "disclosure": { "const": "public" } } } + ] + } + }, + "claims": { + "items": { + "allOf": [ + { "$ref": "definitions.schema.json#/$defs/Claim" }, + { "properties": { "disclosure": { "const": "public" } } } + ] + } + }, + "observations": { + "items": { + "allOf": [ + { "$ref": "definitions.schema.json#/$defs/Observation" }, + { "properties": { "disclosure": { "const": "public" } } } + ] + } + }, + "policies": { + "items": { + "allOf": [ + { "$ref": "definitions.schema.json#/$defs/Policy" }, + { "properties": { "disclosure": { "const": "public" } } } + ] + } + }, + "contexts": { + "items": { + "allOf": [ + { "$ref": "definitions.schema.json#/$defs/Context" }, + { "properties": { "disclosure": { "const": "public" } } } + ] + } + }, + "publication": { + "allOf": [ + { "$ref": "definitions.schema.json#/$defs/Publication" }, + { + "properties": { + "policyEvaluation": { + "allOf": [ + { "$ref": "definitions.schema.json#/$defs/PolicyEvaluation" }, + { "properties": { "result": { "const": "permitted" } } } + ] + } + } + } + ] + } + } + } + ] +} diff --git a/schemas/0.2.0/relation-registry.schema.json b/schemas/0.2.0/relation-registry.schema.json new file mode 100644 index 0000000..b32d753 --- /dev/null +++ b/schemas/0.2.0/relation-registry.schema.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/relation-registry.schema.json", + "title": "MASA 0.2.0 relation registry", + "type": "object", + "required": ["registryType", "registryVersion", "masaVersion", "namespace", "relations"], + "properties": { + "registryType": { "const": "masa-relation-registry" }, + "registryVersion": { "const": "0.2.0" }, + "masaVersion": { "const": "0.2.0" }, + "namespace": { "type": "string", "format": "uri" }, + "relations": { + "type": "array", + "items": { "$ref": "#/$defs/RegisteredRelation" }, + "minItems": 1 + } + }, + "$defs": { + "RegisteredRelation": { + "type": "object", + "required": ["id", "category", "acyclic", "definition"], + "properties": { + "id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*:[a-z][a-z0-9_-]*$" }, + "category": { + "type": "string", + "enum": ["derivation", "version", "structure", "provenance", "evidence", "listening", "composition", "generation", "operation", "mapping", "performance", "lineage", "spatial", "association", "responsibility", "policy", "epistemic"] + }, + "acyclic": { "type": "boolean" }, + "inverse": { "type": "string", "pattern": "^[a-z][a-z0-9-]*:[a-z][a-z0-9_-]*$" }, + "symmetric": { "type": "boolean" }, + "lineageDirection": { + "type": "string", + "enum": ["subject-is-descendant", "object-is-descendant"] + }, + "definition": { "type": "string", "minLength": 1, "maxLength": 4096 }, + "deprecated": { "type": "boolean", "default": false }, + "deprecatedIn": { "type": "string", "minLength": 1, "maxLength": 128 }, + "replacedBy": { "type": "string", "pattern": "^[a-z][a-z0-9-]*:[a-z][a-z0-9_-]*$" } + }, + "allOf": [ + { + "if": { "properties": { "deprecated": { "const": true } }, "required": ["deprecated"] }, + "then": { "required": ["deprecatedIn"] } + } + ], + "additionalProperties": false + } + }, + "additionalProperties": false +} diff --git a/schemas/0.2.0/term-registry.schema.json b/schemas/0.2.0/term-registry.schema.json new file mode 100644 index 0000000..229cbbe --- /dev/null +++ b/schemas/0.2.0/term-registry.schema.json @@ -0,0 +1,86 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/term-registry.schema.json", + "title": "MASA 0.2.0 term registry", + "type": "object", + "required": ["registryType", "registryVersion", "masaVersion", "namespace", "terms"], + "properties": { + "registryType": { "const": "masa-term-registry" }, + "registryVersion": { "const": "0.2.0" }, + "masaVersion": { "const": "0.2.0" }, + "namespace": { "type": "string", "format": "uri" }, + "terms": { + "type": "array", + "items": { "$ref": "#/$defs/Term" }, + "minItems": 1 + } + }, + "$defs": { + "Term": { + "type": "object", + "required": [ + "id", + "label", + "termStatus", + "provenanceClass", + "definition", + "introduced", + "references", + "nonEquivalentTo" + ], + "properties": { + "id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*:[A-Za-z][A-Za-z0-9._-]*$" }, + "label": { "type": "string", "minLength": 1, "maxLength": 512 }, + "termStatus": { "type": "string", "enum": ["source-term", "adapted-term", "project-term", "working-term"] }, + "provenanceClass": { "type": "string", "enum": ["external-source", "project-corpus", "curator-directive", "mixed"] }, + "definition": { "type": "string", "minLength": 1, "maxLength": 8192 }, + "introduced": { "type": "string", "enum": ["0.1.0", "0.2.0"] }, + "attributedTo": { + "type": "array", + "items": { "type": "string", "minLength": 1, "maxLength": 512 }, + "minItems": 1, + "uniqueItems": true + }, + "sourceIds": { + "type": "array", + "items": { "type": "string", "pattern": "^src-[a-z0-9-]+$" }, + "minItems": 1, + "uniqueItems": true + }, + "decisionRefs": { + "type": "array", + "items": { "type": "string", "minLength": 1, "maxLength": 2048 }, + "minItems": 1, + "uniqueItems": true + }, + "references": { + "type": "array", + "items": { "type": "string", "minLength": 1, "maxLength": 2048 }, + "minItems": 1, + "uniqueItems": true + }, + "nonEquivalentTo": { + "type": "array", + "items": { "type": "string", "minLength": 1, "maxLength": 512 }, + "minItems": 1, + "uniqueItems": true + }, + "deprecated": { "type": "boolean", "default": false }, + "deprecatedIn": { "type": "string", "minLength": 1, "maxLength": 128 }, + "replacedBy": { "type": "string", "pattern": "^[a-z][a-z0-9-]*:[A-Za-z][A-Za-z0-9._-]*$" } + }, + "allOf": [ + { + "if": { "properties": { "termStatus": { "const": "source-term" } }, "required": ["termStatus"] }, + "then": { "required": ["attributedTo", "sourceIds"] } + }, + { + "if": { "properties": { "deprecated": { "const": true } }, "required": ["deprecated"] }, + "then": { "required": ["deprecatedIn"] } + } + ], + "additionalProperties": false + } + }, + "additionalProperties": false +} diff --git a/schemas/0.2.0/tools/audit-public-input.schema.json b/schemas/0.2.0/tools/audit-public-input.schema.json new file mode 100644 index 0000000..4b3fdcf --- /dev/null +++ b/schemas/0.2.0/tools/audit-public-input.schema.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/tools/audit-public-input.schema.json", + "title": "matter.audit_public_export input", + "type": "object", + "required": ["path"], + "properties": { + "path": { "type": "string", "minLength": 1, "maxLength": 4096 } + }, + "additionalProperties": false +} diff --git a/schemas/0.2.0/tools/inspect-input.schema.json b/schemas/0.2.0/tools/inspect-input.schema.json new file mode 100644 index 0000000..0bdfdf1 --- /dev/null +++ b/schemas/0.2.0/tools/inspect-input.schema.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/tools/inspect-input.schema.json", + "title": "matter.inspect input", + "type": "object", + "required": ["path"], + "properties": { + "path": { "type": "string", "minLength": 1, "maxLength": 4096 } + }, + "additionalProperties": false +} diff --git a/schemas/0.2.0/tools/plan-processing-input.schema.json b/schemas/0.2.0/tools/plan-processing-input.schema.json new file mode 100644 index 0000000..bb56537 --- /dev/null +++ b/schemas/0.2.0/tools/plan-processing-input.schema.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/tools/plan-processing-input.schema.json", + "title": "matter.plan_processing input", + "description": "Compose and validate one processing request without performing any signal processing. When a record path is supplied, input references are resolved against it.", + "type": "object", + "required": ["operationType", "parameters", "inputs"], + "properties": { + "operationType": { + "type": "string", + "enum": [ + "matter.granulate", + "matter.extract", + "matter.reduce", + "matter.fragment", + "matter.timestretch", + "matter.pitchshift" + ] + }, + "parameters": { "type": "object" }, + "inputs": { + "type": "array", + "items": { "type": "string", "minLength": 5, "maxLength": 2048 }, + "minItems": 1, + "uniqueItems": true + }, + "path": { "type": "string", "minLength": 1, "maxLength": 4096 }, + "determinism": { + "type": "string", + "enum": ["require-deterministic", "require-seeded", "accept-nondeterministic"] + }, + "maxOutputs": { "type": "integer", "minimum": 1, "maximum": 10000 } + }, + "additionalProperties": false +} diff --git a/schemas/0.2.0/tools/tool-result.schema.json b/schemas/0.2.0/tools/tool-result.schema.json new file mode 100644 index 0000000..763ba2d --- /dev/null +++ b/schemas/0.2.0/tools/tool-result.schema.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/tools/tool-result.schema.json", + "title": "MASA local tool result", + "type": "object", + "required": ["status", "valid", "diagnostics"], + "properties": { + "status": { "type": "string", "enum": ["completed", "failed", "refused"] }, + "valid": { "type": "boolean" }, + "diagnostics": { + "type": "array", + "items": { + "type": "object", + "required": ["code", "severity", "instancePath", "schemaPath", "message", "remediation"], + "properties": { + "code": { "type": "string", "pattern": "^MASA_[A-Z0-9_]+$" }, + "severity": { "type": "string", "enum": ["error", "warning", "info"] }, + "instancePath": { "type": "string" }, + "schemaPath": { "type": "string" }, + "message": { "type": "string", "minLength": 1, "maxLength": 2048 }, + "remediation": { "type": "string", "minLength": 1, "maxLength": 2048 } + }, + "additionalProperties": false + } + }, + "data": { "$ref": "../definitions.schema.json#/$defs/JsonValue" } + }, + "additionalProperties": false +} diff --git a/schemas/0.2.0/tools/trace-lineage-input.schema.json b/schemas/0.2.0/tools/trace-lineage-input.schema.json new file mode 100644 index 0000000..146f256 --- /dev/null +++ b/schemas/0.2.0/tools/trace-lineage-input.schema.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/tools/trace-lineage-input.schema.json", + "title": "matter.trace_lineage input", + "type": "object", + "required": ["path", "entityId"], + "properties": { + "path": { "type": "string", "minLength": 1, "maxLength": 4096 }, + "entityId": { "$ref": "../definitions.schema.json#/$defs/Id" }, + "direction": { + "type": "string", + "enum": ["ancestors", "descendants", "both"], + "default": "both" + }, + "maxDepth": { + "type": "integer", + "minimum": 1, + "maximum": 64, + "default": 16 + } + }, + "additionalProperties": false +} diff --git a/schemas/0.2.0/tools/validate-input.schema.json b/schemas/0.2.0/tools/validate-input.schema.json new file mode 100644 index 0000000..5773c36 --- /dev/null +++ b/schemas/0.2.0/tools/validate-input.schema.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://masa.sonicfield.org/schemas/0.2.0/tools/validate-input.schema.json", + "title": "matter.validate input", + "type": "object", + "required": ["path"], + "properties": { + "path": { "type": "string", "minLength": 1, "maxLength": 4096 } + }, + "additionalProperties": false +} diff --git a/scripts/canonical.ts b/scripts/canonical.ts index c31ad4a..6d1ecc6 100644 --- a/scripts/canonical.ts +++ b/scripts/canonical.ts @@ -4,7 +4,7 @@ * verifies them, so a host migration is a one-line change here plus a * regeneration rather than a scattered manual rename. */ -export const MASA_PROTOCOL_VERSION = "0.1.0"; +export const MASA_PROTOCOL_VERSION = "0.2.0"; export const CANONICAL_ROOT = "https://masa.sonicfield.org/"; export const SCHEMA_ID_PREFIX = `${CANONICAL_ROOT}schemas/${MASA_PROTOCOL_VERSION}/`; export const CAPABILITY_ID_PREFIX = `${CANONICAL_ROOT}capabilities/${MASA_PROTOCOL_VERSION}/`; diff --git a/scripts/check-schemas.ts b/scripts/check-schemas.ts index af0c103..127a70a 100644 --- a/scripts/check-schemas.ts +++ b/scripts/check-schemas.ts @@ -7,7 +7,7 @@ import { MASA_PROTOCOL_VERSION, SCHEMA_ID_PREFIX, VOCAB_NAMESPACE } from "./cano const root = resolve(import.meta.dirname, ".."); const schemaRoot = join(root, "schemas", MASA_PROTOCOL_VERSION); -const EXPECTED_SCHEMA_COUNT = 29; +const EXPECTED_SCHEMA_COUNT = 30; async function filesBelow(directory: string): Promise { const entries = await readdir(directory, { withFileTypes: true, recursive: true }); diff --git a/scripts/generate-examples.ts b/scripts/generate-examples.ts index 8ad62c9..29f588c 100644 --- a/scripts/generate-examples.ts +++ b/scripts/generate-examples.ts @@ -344,7 +344,7 @@ generation.history.events = [ const mapping = clone(); retarget(mapping, "urn:uuid:00000000-0000-4000-8000-000000000005"); mapping.title = "Stale observation skipped explicitly"; -mapping.profiles = ["core", "mapping"]; +mapping.profiles = ["core", "observation", "mapping"]; mapping.policies[0].rules[0].actions.push("map"); mapping.sources = [ { @@ -376,6 +376,9 @@ mapping.observations = [ method: method("offline fixture observation"), health: mapping.sources[0].health, freshness: mapping.sources[0].freshness, + epistemicStatus: "reported", + temporalCharacter: "aggregate", + signalKind: "observation", disclosure: "private", extensions: {} } @@ -737,6 +740,14 @@ const profileMismatch = clone(); profileMismatch.profiles.push("audio"); await save(invalidDirectory, "profile-mismatch.masa.json", profileMismatch); +const observationProfileMissingMetadata = structuredClone(mapping) as JsonObject; +delete observationProfileMissingMetadata.observations[0].epistemicStatus; +await save( + invalidDirectory, + "observation-profile-missing-metadata.masa.json", + observationProfileMissingMetadata +); + const duplicateId = clone(); duplicateId.representations[0].id = duplicateId.actors[0].id; await save(invalidDirectory, "duplicate-id.masa.json", duplicateId); diff --git a/scripts/release-version.ts b/scripts/release-version.ts index 0df96de..35187c7 100644 --- a/scripts/release-version.ts +++ b/scripts/release-version.ts @@ -16,7 +16,7 @@ const PACKAGE_DIRECTORIES = [ * Deterministic timestamp for the current reference-tooling release. Keep it * explicit so generation never depends on the wall clock or developer locale. */ -export const REFERENCE_IMPLEMENTATION_GENERATED_AT = "2026-08-09T00:00:00.000Z"; +export const REFERENCE_IMPLEMENTATION_GENERATED_AT = "2026-08-11T00:00:00.000Z"; /** * Read the reference-tooling release from package metadata and fail generation diff --git a/scripts/validate-examples.ts b/scripts/validate-examples.ts index 61619b3..df13d1c 100644 --- a/scripts/validate-examples.ts +++ b/scripts/validate-examples.ts @@ -26,6 +26,7 @@ const EXPECTED_INVALID: Readonly> = { "failed-operation-with-output.masa.json": ["MASA_SCHEMA_INVALID"], "known-null-qualified-value.masa.json": ["MASA_SCHEMA_INVALID"], "measurement-missing-unit.masa.json": ["MASA_SCHEMA_INVALID"], + "observation-profile-missing-metadata.masa.json": ["MASA_PROFILE_MISMATCH"], "processing-missing-parent-relation.masa.json": ["MASA_DESCENDANT_RECEIPT", "MASA_PROFILE_MISMATCH"], "profile-mismatch.masa.json": ["MASA_PROFILE_MISMATCH"], "public-local-path.masa.json": ["MASA_PUBLIC_PATH"], diff --git a/spec/0.2.0/bundle.md b/spec/0.2.0/bundle.md new file mode 100644 index 0000000..ccf4174 --- /dev/null +++ b/spec/0.2.0/bundle.md @@ -0,0 +1,56 @@ +# MASA bundle 0.2.0 + +MASA supports a single-record `.masa.json`, an inspectable directory ending in `.masa`, and a compressed `.masa.zip` exchange artifact. + +## Directory form + +```text +.masa/ +├── manifest.json +├── events.ndjson +├── records/ +├── assets/ +│ ├── originals/ +│ ├── derivatives/ +│ └── previews/ +├── policies/ +└── reports/ +``` + +Only `manifest.json` and at least one record are required. The manifest lists every file except itself. It records path, role, media type, byte length, SHA-256 digest, disclosure, and associated record where applicable. “Original” means original to the bundle lineage, not unmediated reality. + +## Path and coverage rules + +- Paths are UTF-8, NFC-normalized, relative POSIX paths. +- Empty segments, `.`, `..`, backslashes, absolute paths, drive prefixes, control characters, and path collisions are forbidden. +- Symlinks, sockets, devices, encrypted entries, nested archive execution, and unmanifested payloads are forbidden. +- The actual file set MUST equal the manifest file set plus `manifest.json`. +- Every included file MUST match its declared byte length and SHA-256 digest. +- External or withheld artifacts remain explicit manifest references and are never fabricated as empty files. + +## Event log + +`events.ndjson` contains one complete OperationReceipt JSON object per line. Blank lines, malformed lines, duplicate or non-monotonic local sequence, and a partial final line are invalid. Timestamps may disagree with sequence under clock drift; sequence remains the local causal order. + +## Packing + +A conforming packer: + +1. validates the source directory and rejects non-regular files; +2. verifies every declared size and digest; +3. sorts paths lexically; +4. writes normalized file modes and a fixed timestamp; +5. writes to a temporary sibling and atomically promotes it without replacement only after completion; +6. refuses overwrite unless an explicit higher-level policy permits it. + +Deterministic ZIP bytes aid comparison but are not a signature or authenticity proof. + +## Unpacking + +A conforming unpacker preflights the central directory, path safety, encryption, entry type, collisions, count, sizes, and compression ratios before extraction. It reads and validates a bounded manifest, requires exact entry coverage, extracts into a new temporary directory with exclusive file creation, streams size and digest verification, validates records and events, and atomically moves the complete directory into place. + +Default limits are defined in `SECURITY.md`. A host MAY lower them. Raising them is a host authority decision. + +## Signatures + +The `signatures/` role is reserved. MASA 0.2.0 defines no signature or JSON canonicalization profile and makes no signature conformance claim. diff --git a/spec/0.2.0/conformance.md b/spec/0.2.0/conformance.md new file mode 100644 index 0000000..7646fe1 --- /dev/null +++ b/spec/0.2.0/conformance.md @@ -0,0 +1,62 @@ +# MASA conformance 0.2.0 + +Conformance is capability-specific evidence, not a brand label. + +## Classes + +| Class | Required behavior | +| --- | --- | +| `reader` | Parses and validates the declared version, reports unsupported extensions, and preserves unknown extensions. | +| `writer` | Produces valid identities, profile declarations, policy references, and receipts. | +| `transformer` | Preserves parents, creates distinct descendants, records operations and parameters, and reports reversibility. | +| `agent-host` | Declares capability and authority, validates tool boundaries, records actions and non-actions, and honors refusal. | +| `publisher` | Produces a new public projection, applies policy and disclosure checks, and supplies correction and revocation routes. | + +## Evidence states + +`conformant | partial | not_run | failed | unknown` + +MASA 0.2.0 follows the stable 0.1.0 release. Conformance evidence reports migration separately as `not_tested`, `compatible`, `incompatible`, or `not_applicable`; the reference suite currently reports `not_tested` because it validates exact-version artifacts and does not silently rewrite 0.1.0 records. + +## Diagnostics + +Diagnostics contain stable code, severity, JSON instance path, schema path when relevant, message, and remediation. They MUST NOT echo secret values. + +Core codes include: + +- `MASA_SCHEMA_INVALID` +- `MASA_UNSUPPORTED_VERSION` +- `MASA_PROFILE_MISMATCH` +- `MASA_DUPLICATE_ID` +- `MASA_UNRESOLVED_REF` +- `MASA_REF_TYPE` +- `MASA_DERIVATION_CYCLE` +- `MASA_DESCENDANT_RECEIPT` +- `MASA_DESCENDANT_REUSES_INPUT` +- `MASA_TEMPORAL_ORDER` +- `MASA_WINDOW_ORDER` +- `MASA_STATE_REASON_MISSING` +- `MASA_EVENT_SEQUENCE` +- `MASA_INTEGRITY_MISMATCH` +- `MASA_EXTENSION_DROPPED` +- `MASA_POLICY_DENIED` +- `MASA_PATH_ESCAPE` +- `MASA_ARCHIVE_LIMIT` +- `MASA_PUBLIC_DISCLOSURE` +- `MASA_PUBLIC_PATH` +- `MASA_PUBLIC_SECRET` +- `MASA_PUBLIC_PRECISE_LOCATION` +- `MASA_PUBLIC_PRIVATE_ENDPOINT` +- `MASA_PUBLIC_EXTENSION` +- `MASA_JSON_DUPLICATE_KEY` +- `MASA_JSON_DEPTH` + +Strict-JSON, bundle, and lineage tooling emit further `MASA_`-prefixed codes in their own families (`MASA_JSON_*`, `MASA_BUNDLE_*`, `MASA_LINEAGE_*`). A code, once released, keeps its meaning for the life of the minor line. + +## Required evidence artifact + +Every suite result declares suite and implementation versions, subject, platform, exact MASA version, profile, class, run time, individual tests, and fixture-manifest digest. Repeated runs over the same inputs SHOULD produce identical ordered diagnostics; volatile evidence fields such as `runAt` remain outside diagnostic comparison. + +## Reference release gate + +The local reference implementation is ready for application integration only when schemas meta-validate offline, generated types compile, packages build, required fixtures pass, three protocol round trips pass, bundle and public-safety limits pass, MCP stdio tests pass, documentation agrees with implemented behavior, and packaged artifacts contain no secrets, personal paths, private media, provider settings, or untested capability claims. diff --git a/spec/0.2.0/core.md b/spec/0.2.0/core.md new file mode 100644 index 0000000..e71b0d1 --- /dev/null +++ b/spec/0.2.0/core.md @@ -0,0 +1,197 @@ +# MASA Core 0.2.0 + +Status: normative local protocol release + +Version: `0.2.0` +Canonical schema: `https://masa.sonicfield.org/schemas/0.2.0/matter-record.schema.json` + +The key words **MUST**, **MUST NOT**, **REQUIRED**, **SHOULD**, **SHOULD NOT**, and **MAY** indicate conformance requirements. + +## 1. Purpose + +MASA is a language-neutral protocol for carrying inspectable accounts of sound as matter across software, scripts, archives, instruments, and agentic workflows. It is informed by a preserved research corpus on listening and sonic matter, attributed term by term in the vocabulary registries, but it does not turn that theory into mandatory data. + +The Core connects sources, representations, encounters, claims, operations, actors, policies, contexts, and lineage. A MatterRecord is an envelope around these relations. It is not the physical event, an audio asset, a sound object, an auditum, or a final description of sound. + +## 2. Conformance surface + +A conforming document MUST: + +1. be valid JSON without duplicate object keys or the prohibited `__proto__` member name; +2. declare `masaVersion: "0.2.0"` and the `core` profile; +3. validate against the Core JSON Schema without remote schema retrieval; +4. pass the semantic invariants in Section 8; +5. keep extensions inside the namespaced `extensions` object; +6. preserve unknown extensions during ordinary Reader and Writer round trips or report an explicit incompatibility; +7. carry an explicit policy state, including when authority is unknown; +8. distinguish claim kind, actor, confidence, health, freshness, and disclosure. + +Conformance is reported for an exact MASA version, profile, conformance class, implementation version, and test suite. “MASA-compatible” without that tuple is not a conformance claim. + +## 3. Qualified states + +Required knowledge that may be missing or protected uses a qualified state rather than `null` or an empty string: + +| State | Meaning | +| --- | --- | +| `known` | A non-null value is asserted and its provenance can be named. | +| `unknown` | The record cannot currently establish a value; a reason is required. | +| `withheld` | A value exists or may exist but policy prevents disclosure; policy references are required. | +| `unavailable` | An operational dependency or representation cannot be accessed; a reason is required. | +| `deleted` | A previously held value was removed; a reason and deletion receipt reference are required. | +| `not_applicable` | The field does not apply to this object or profile. | + +`known` with `null` is invalid because it collapses all qualified absence states. Omission means “not asserted by this profile.” It does not mean unknown, withheld, deleted, or empty. + +## 4. Identifiers and versions + +- Every record and stored entity MUST have a globally unique absolute identifier. +- The reference implementation generates `urn:uuid:` identifiers. Other absolute identifiers MAY be used. +- A content digest identifies exact bytes. It MUST NOT be used as the sole semantic identity, authorship claim, ownership claim, or consent record. +- `masaVersion` identifies the normative protocol version. Records MUST NOT use `latest` as a stored version. +- A revised account increments `revision` and declares `supersedes` when applicable. A transformation creates a descendant representation rather than changing the bytes behind an existing representation identifier. + +## 5. Core objects + +### 5.1 MatterRecord + +A MatterRecord contains the shared envelope and at least one Actor, one Representation, and one Policy. It declares its profiles, revision, creator, disclosure, registers, scales, relations, and event history. Arrays that have no current members remain empty only when the schema permits them. + +### 5.2 Actor + +An Actor is a human, community, organization, software system, agent, model, or instrument participating in a claim or operation. Actor identity MAY be pseudonymous, opaque, or withheld. `user` is an actor origin, never a confidence value. + +### 5.3 Source + +A Source records origin or causal reference and the status of that identification. Known file origin does not prove physical, social, or represented cause. Source coverage, authority, rights, health, and freshness remain explicit. + +### 5.4 Representation + +A Representation is a carrier available to a system: file, stream, buffer, data series, prompt, image, mesh, score, model output, performance capture, or another supported medium. A representation declares availability, disclosure, location state, policy, and integrity state. `source-representation` means the preserved input to this lineage, not unmediated reality. + +### 5.5 Encounter, Aperture, and ListeningPass + +An Encounter situates how matter entered a process. An Aperture records selection and conditioning such as channels, ranges, windows, thresholds, preprocessing, exclusions, and blind spots. A ListeningPass connects actors, representations, an aperture, listening modes, context, claims, and an outcome. Human listening and machine audition MAY be related but MUST remain non-equivalent actor and method states. + +### 5.6 Claim + +The only Core claim kinds are: + +`heard | measured | inferred | interpreted | speculative | undetermined` + +- `heard` names a situated perceptual or operational registration and requires a listening route or method. +- `measured` requires a value, unit, method, window or range, and uncertainty or calibration state. +- `inferred` requires evidence inputs and a named rule, model, comparison, or method. +- `interpreted` requires a declared position or contextual frame. +- `speculative` requires a rationale and an explicit boundary from source observation. +- `undetermined` requires a reason such as missing, conflicting, restricted, stale, ambiguous, out of scope, or not performed. + +Remembering and translation are provenance or method. Human or model authorship is actor provenance. Withholding is disclosure. None is a claim kind. + +### 5.7 Confidence, health, freshness, and disclosure + +Confidence is either `not_assessed` or an assessed expression with a method and scale. A `high`, `medium`, or `low` class is valid only when the scale and method are named. + +Source health records operational state such as healthy, degraded, unavailable, or error. Freshness records observation, retrieval, expiry, and current or stale status. Disclosure records public, private, restricted, withheld, or redacted state. These axes MUST NOT be merged. + +#### Observation epistemics + +The optional Observation profile makes three additional axes normative for every Observation: `epistemicStatus`, `temporalCharacter`, and `signalKind`. They distinguish what kind of account a field carries, how it relates to time, and whether it was acquired, derived, or locally generated. They MUST remain separate from value availability, confidence, Source health, freshness, method, and disclosure. + +A stale reported forecast is therefore not rewritten as a measured stream; an unavailable observation does not become numeric zero; and an authored generator cannot fill a missing provider field while retaining the provider's identity. See [`profiles/observation.md`](profiles/observation.md). + +### 5.8 OperationReceipt and history + +An OperationReceipt records one attempted operation, including completed, failed, refused, cancelled, partial, undetermined, and not-performed outcomes. It carries actors, inputs, outputs, tool and method, parameters, policy evaluation, determinism, reversibility, warnings, errors, and claims. + +History uses exactly one mode: + +- `embedded`, with complete receipts inside a standalone `.masa.json` record; or +- `external`, with an `events.ndjson` reference and an ordered list of event identifiers inside a bundle. + +The two modes prevent an embedded event history and an external log from silently disagreeing. + +### 5.9 Relation and lineage + +Relations are explicit assertions with subject, predicate, object, actor, time, and basis. The relation registry declares whether the subject or object is the descendant for causal-lineage traversal; inverse syntax therefore produces the same directed lineage. Derivation and version relations form an acyclic graph. Epistemic relations such as support, contradiction, difference, and incomparability MAY be cyclic. + +Lineage records derivation and responsibility. It does not settle authorship, ownership, license, consent, or ethical legitimacy. + +### 5.10 Policy and evaluation + +A Policy states an issuer, authority basis, status, disclosure, rules, targets, actions, validity, and review route. A PolicyEvaluation applies one or more policies to one operation and target. Runtime authority and policy permission are independent; both must allow a consequential action. + +Unknown authority MUST NOT authorize publication, external upload, identification, precise-location disclosure, training, deletion, or another consequential external action. + +### 5.11 Context and integrity + +Context may be historical, territorial, ecological, institutional, compositional, cosmological, technical, or another namespaced frame. It declares provenance and claim status. + +Integrity records algorithm, digest, byte size, verification status, and verification time. Integrity verifies referenced bytes under a method; it does not establish their meaning or legitimacy. + +## 6. Registers and scales + +Core registers are physical-event, perceptual-acoulogical, compositional-transformational, digital-technical, ecological-territorial, historical-political, and cosmological-speculative. + +Core scales are microtemporal, spectral-stratal, object-event, meso-form, environmental, corpus-lineage, infrastructural, planetary, and cosmic. Implementations MAY add namespaced registers and scales without changing the meaning of Core values. A scale label SHOULD include actual windows, ranges, resolution, and source coverage when known. Planetary is not universal, and microsound is one scale rather than the whole of sonic matter. + +## 7. Extensions + +All extension data MUST appear in an `extensions` object with namespaced keys. Core schemas reject unknown top-level properties to catch misspellings. A namespace identifies its governing implementation or community; it does not imply affiliation with the MASA reference repository. + +Readers MUST preserve unsupported extension values semantically and report them. Publishers MUST exclude unsupported extensions unless an approved publication schema and policy apply to the exact projection. + +## 8. Semantic invariants + +After JSON Schema validation, an implementation MUST enforce: + +1. all entity identifiers are unique inside the record or bundle; +2. all required local references resolve; explicitly external, withheld, unavailable, or deleted references remain typed as such; +3. profile declarations match their required entities and behavior; +4. local event identifiers and sequence numbers are unique and sequence order is monotonic; +5. wall-clock time does not establish distributed causal order; +6. relations that the versioned registry marks acyclic — derivation, version, structural containment, and related registered categories — form one acyclic directed graph; +7. completed consequential operations include a policy evaluation; +8. a transform, isolate, segment, render, or generation output never reuses its input Representation identifier; +9. every descendant representation has a parent relation and generating operation; +10. an immutable included representation cannot change digest under the same identifier; +11. a refused or withheld receipt does not reconstruct protected content; +12. publication and deletion are irreversible; interface undo is not a material inverse; +13. a deletion tombstone retains only independently authorized fields; +14. unknown extension data survives local Reader and Writer round trips; +15. public projections contain no absolute local paths, credentials, private endpoints, protected precision, restricted media, or unapproved extensions. +16. references that name a protocol role resolve to the correct entity kind, not merely to any reused identifier; +17. temporal windows, freshness intervals, policy validity, and operation intervals preserve their declared order; +18. a permitted public projection cites an active public rule that explicitly permits the exact publish action and target under known authority. + +## 9. Validation phases + +Reference validation runs in this order: + +1. JSON syntax and duplicate-key safety; +2. JSON Schema 2020-12 structure; +3. reference closure, identity, event, and lineage semantics; +4. declared profile invariants; +5. policy, disclosure, public-safety, and bundle integrity checks. + +Structural validity does not prove a claim true, a policy legitimate, a transformation reproducible, or publication authorized. + +## 10. Non-equivalence register + +Conforming systems preserve at least these distinctions: + +- physical event ≠ signal ≠ representation ≠ MatterRecord; +- source origin ≠ causal attribution; +- sounding body ≠ perceptual sound matter; +- sound object ≠ auditum; +- recording ≠ original event; +- feature or measurement ≠ perceived quality; +- claim kind ≠ confidence ≠ actor ≠ health ≠ freshness ≠ disclosure; +- mapping ≠ source voice; +- observation ≠ derived index ≠ mapping ≠ synthesis ≠ performance ≠ speculation; +- copy ≠ encoding derivative ≠ continuation ≠ inpaint ≠ variation ≠ mutation ≠ graft; +- lineage ≠ authorship, ownership, license, consent, or ethical legitimacy; +- technical access ≠ authority; +- interface undo ≠ verified inverse; +- plurality ≠ fusion; +- silence, missing data, timeout, withholding, refusal, and low signal are not interchangeable. diff --git a/spec/0.2.0/policy.md b/spec/0.2.0/policy.md new file mode 100644 index 0000000..73d66da --- /dev/null +++ b/spec/0.2.0/policy.md @@ -0,0 +1,39 @@ +# MASA policy and disclosure 0.2.0 + +MASA records policy state; it does not manufacture consent or jurisdiction. + +## Separate concerns + +- **License** concerns legal permissions attached to code, works, datasets, models, or outputs. +- **Consent** concerns affected people or communities and specific capture, use, transformation, storage, training, disclosure, or revocation conditions. +- **Jurisdiction** concerns who has authority over a body, voice, territory, habitat, archive, or relation. +- **Covenant** records human-written operational commitments. +- **Provider terms** record contractual conditions of an API, model, or service. +- **Runtime authority** is the host's scoped ability to perform an operation. + +These fields can be connected but MUST NOT be collapsed. + +## Effects and status + +Rules have `permission`, `prohibition`, `duty`, or `unknown` effect. Policies have `active`, `expired`, `revoked`, `under_review`, or `unknown` status. A PolicyEvaluation records `permitted`, `prohibited`, `required`, `unknown`, `refused`, or `under_review` for an exact action and target. + +Unknown or under-review authority does not authorize consequential external action. A public URL or technically readable file is not automatic permission to extract, train, transform, identify, or publish. + +## Public projection + +Publication builds a new allowlisted projection. It never edits the private record in place. A Publisher MUST: + +1. require an active, permitted publication evaluation backed by an explicit permission rule for the exact publish action and target under known authority; +2. include only explicitly public entities and approved derivative assets; +3. exclude private, restricted, withheld, revoked, expired, unknown, or unapproved material; +4. exclude unknown extensions by default; +5. remove absolute paths, secrets, private endpoints, precise protected locations, restricted voices, private digests, and provider configuration; +6. emit omission and redaction categories without protected values; +7. retain attribution, protocol version, policy status, correction route, and revocation route; +8. audit the final emitted artifact again. + +Secret scanning is defense in depth and cannot override policy. + +## Deletion and tombstones + +Deletion removes prohibited payloads from authorized storage targets. A minimal tombstone MAY remain only when separately authorized. The tombstone MUST NOT reconstruct protected content. Publication and deletion are irreversible operation classes. diff --git a/spec/0.2.0/profiles/agent.md b/spec/0.2.0/profiles/agent.md new file mode 100644 index 0000000..c9c3afa --- /dev/null +++ b/spec/0.2.0/profiles/agent.md @@ -0,0 +1,7 @@ +# Agent profile 0.2.0 + +The Agent profile requires at least one agent Actor plus declared capability, plan, memory references, authority, budget or limits, stop conditions, tool receipts, non-action states, and review. + +Policy permission and runtime authority remain independent. Authority comes from trusted host configuration, never from a prompt, record, transcript, tool argument, or model output. Agents may propose policy, publication, deletion, or consent actions; they cannot grant consent, assert community jurisdiction, waive public-safety findings, or approve their own consequential action. + +The profile does not claim machine consciousness or equivalence with human or multispecies listening. diff --git a/spec/0.2.0/profiles/analysis.md b/spec/0.2.0/profiles/analysis.md new file mode 100644 index 0000000..c89c4e7 --- /dev/null +++ b/spec/0.2.0/profiles/analysis.md @@ -0,0 +1,5 @@ +# Analysis profile 0.2.0 + +The Analysis profile requires at least one Measurement or Region. Every quantity declares a non-null result, metric, unit, method, window or range, actor, and uncertainty or calibration state. When analysis produces no result, the system records a qualified state or undetermined claim instead of fabricating a null Measurement. + +Regions may be temporal, spectral, spatial, semantic, causal, morphological, or namespaced. A region is an analytical cut, not an inventory of the sound's essence. A feature does not become a perceived quality unless an attributable interpretation makes that relation explicit. diff --git a/spec/0.2.0/profiles/audio.md b/spec/0.2.0/profiles/audio.md new file mode 100644 index 0000000..0e74d5a --- /dev/null +++ b/spec/0.2.0/profiles/audio.md @@ -0,0 +1,5 @@ +# Audio profile 0.2.0 + +The Audio profile requires at least one `audio/*` Representation and its technical extent. Known audio facts include duration, channels, sample rate, encoding or codec, bit depth when applicable, spatial format, and level context. Unknown format details use qualified states rather than invented defaults. + +Any loudness, level, spectral, temporal, or perceptual quantity remains a Measurement or Claim with method, units, window, and uncertainty. The Audio profile does not make a file identical to a physical event or an auditum. diff --git a/spec/0.2.0/profiles/core.md b/spec/0.2.0/profiles/core.md new file mode 100644 index 0000000..ca03e61 --- /dev/null +++ b/spec/0.2.0/profiles/core.md @@ -0,0 +1,7 @@ +# Core profile 0.2.0 + +The Core profile is required by every MatterRecord. It provides identity, actors, at least one representation, policy state, claims, relations, operation history, disclosure, integrity, and extensions. + +Core is deliberately small enough for a conventional script. It does not require audio decoding, human listening, signal analysis, generation, mapping, agents, or publication. + +Conformance requires the Core schema and every semantic invariant in `../core.md`. diff --git a/spec/0.2.0/profiles/generation.md b/spec/0.2.0/profiles/generation.md new file mode 100644 index 0000000..87f3b6c --- /dev/null +++ b/spec/0.2.0/profiles/generation.md @@ -0,0 +1,7 @@ +# Generation profile 0.2.0 + +The Generation profile records method, determinism, prompts or conditioning, seeds when used, model, adapter, provider, parameters, parent material, selection, rejected outputs, and provider-policy state. + +Copy, encoding derivative, continuation, inpainting, variation, mutation, graft, performance, and new generation remain distinct operation or relation types. A graft has several parents. Inpainting names a bounded region. A model-based generation names model and adapter versions. Unknown provider terms remain unknown and can block publication. + +Implementation metaphors and domain-specific taxonomies remain in their owning namespaces unless promoted through the versioned protocol governance process. diff --git a/spec/0.2.0/profiles/listening.md b/spec/0.2.0/profiles/listening.md new file mode 100644 index 0000000..0bb3db2 --- /dev/null +++ b/spec/0.2.0/profiles/listening.md @@ -0,0 +1,7 @@ +# Listening profile 0.2.0 + +The Listening profile requires at least one Encounter, Aperture, and ListeningPass. A pass names its actors, representation, listening modes, aperture, and outcome; position and context are carried through its referenced Encounter. + +Supported outcomes include claims, waiting, withholding, refusal, and undetermined. A re-listening is a new pass and does not overwrite an earlier account. Contradictory and incomparable passes remain present. + +Listening modes are attributed vocabulary rather than a closed universal enum. Implementations MAY use causal, figurative, codal or semantic, reduced or morphological, focal and global, material, microsonic, spectral-stratal, spatial, environmental, contextual, positional, machine-assisted, speculative, or namespaced routes. diff --git a/spec/0.2.0/profiles/mapping.md b/spec/0.2.0/profiles/mapping.md new file mode 100644 index 0000000..7767577 --- /dev/null +++ b/spec/0.2.0/profiles/mapping.md @@ -0,0 +1,7 @@ +# Mapping profile 0.2.0 + +The Mapping profile separates SourceObservation, normalization, derived relation, Mapping, synthesis target, render, performer intervention, and interpretation. + +A Mapping declares source field and unit, observation time and scope, input range, normalization and clipping, missing-data behavior, target parameter and range, curve, smoothing, cadence, author, and epistemic note. + +Missing, stale, unavailable, or invalid data MUST NOT silently become zero or a held value. Skipping, carrying, interpolating, sonifying uncertainty, or refusing is an explicit operation. A performer action is not source evidence. A sonification is an authored relation, not the source's literal voice. diff --git a/spec/0.2.0/profiles/observation.md b/spec/0.2.0/profiles/observation.md new file mode 100644 index 0000000..929b041 --- /dev/null +++ b/spec/0.2.0/profiles/observation.md @@ -0,0 +1,15 @@ +# Observation profile 0.2.0 + +The Observation profile provides a common boundary for source-derived fields that may later inform analysis, mapping, synthesis, performance, or publication. It does not assert that an observed field is sound or that a mapped result is the source's voice. + +A conforming Observation-profile record declares `core` and `observation`, contains at least one Source and one Observation, and supplies these independent fields on every Observation: + +- `epistemicStatus`: `measured`, `reported`, `derived`, `inferred`, `interpreted`, `speculative`, or `undetermined`; +- `temporalCharacter`: `event`, `stream`, `forecast`, `aggregate`, `context`, or `local`; +- `signalKind`: `observation`, `derived`, or `generator`. + +These fields do not replace the qualified `value`, Source `health`, `freshness`, confidence on related claims, method, or disclosure. Missing or unavailable values remain qualified absences. Staleness remains freshness. A forecast remains a forecast even after it becomes stale. A generator remains authored local state and MUST NOT be presented as external observation. + +Normalization is a derivation. When a normalized value is retained, a record SHOULD preserve the source Observation, the derived Observation, the normalization method and bounds, and an attributable operation receipt. A Mapping that consumes that value remains a separate authored relation with explicit missing-data behavior. + +This profile promotes metadata used independently by Cosmoaudition System and GERM. Their implementation namespaces remain valid and non-equivalent; promotion does not erase earlier extension provenance. diff --git a/spec/0.2.0/profiles/processing.md b/spec/0.2.0/profiles/processing.md new file mode 100644 index 0000000..a100b22 --- /dev/null +++ b/spec/0.2.0/profiles/processing.md @@ -0,0 +1,32 @@ +# Processing profile 0.2.0 + +The Processing profile carries granular, spectral, and time-pitch operations on sound matter: granulation, extraction, reduction, fragmentation, time-stretching, and pitch-shifting. MASA describes, requests, authorizes, and verifies these operations; it performs none of them. Signal processing belongs to an external engine that consumes a validated processing request and returns descendants plus an OperationReceipt naming itself through the receipt's Tool. + +## Operations + +| Operation | Meaning | Typical lineage predicate | +| --- | --- | --- | +| `matter.granulate` | Decompose a representation into grains under a declared grain scheme and emit a texture or a fragment set. | `masa:granulated-from` | +| `matter.extract` | Isolate a spectral band, spectral strata, partial set, or temporal region from a representation. | `masa:isolated-from` | +| `matter.reduce` | Produce a sparser account of a representation: spectral peaks, envelope, decimation, mixdown, or denoising. | `masa:derived-from` | +| `matter.fragment` | Cut a representation into bounded fragments by regions, transients, equal durations, or grains. | `masa:segmented-from` | +| `matter.timestretch` | Change duration under a declared factor without asserting pitch identity. | `masa:derived-from` or `masa:variation-of` | +| `matter.pitchshift` | Change pitch by a declared amount in cents without asserting duration identity. | `masa:derived-from` or `masa:variation-of` | + +A completed processing operation requires a preserved input, at least one distinct descendant Representation, an OperationReceipt with typed parameters, and a lineage relation whose `operationRef` names the receipt. Failed, refused, cancelled, or not-performed operations fabricate no descendants. Determinism is declared on the receipt; a seeded rerun is a claimable expectation, never an assumed fact. + +## Grain vocabulary + +The granular parameters carry Curtis Roads's granular lexicon as attributed vocabulary: grain duration ranges on the micro time scale, grain envelopes (`gaussian`, `expodec`, `rexpodec`, `triangular`, `trapezoidal`), emission modes (`synchronous`, `quasi-synchronous`, `asynchronous`), density in grains per second, and selection order over the source. Density is a compositional parameter: raising it induces coalescence, lowering it induces evaporation. A grain is not a note; a grain cloud is not the granulated source; granulation does not destroy or replace the preserved input. + +## Spectral vocabulary + +Spectral extraction distinguishes a fixed frequency band, a partial set, and strata. Following Osetinsky's stratosound, a stratum is a time-frequency layer separated from a sound along its frequency axis — a perceptual and analytic layer, not merely a filter band. Temporal dissection produces fragments; spectral dissection produces strata; granular dissection produces grains bounded in both dimensions. An extraction is an authored cut, not the sound's essence, and a reduction is a sparser account, not a summary of meaning. + +## Engine boundary + +Engines are external. The receipt's Tool names the engine, version, and kind; `provider` and `adapter` remain qualified values that can be unknown or withheld. A processing request (`processing-request.schema.json`) is the engine-neutral contract: operation, typed parameters, input references, determinism requirement, policy references, and an output contract. Technical ability to process a representation is not permission to process it: a completed consequential operation requires a permitting policy evaluation, and provider terms that are unknown remain unknown. + +## Listening boundary + +When the host attaches an audio-capable model or a listening service, listening passes MAY inform grain selection, strata choice, or region boundaries. Listening evidence stays typed: a heard claim requires a listening pass, a measured claim requires method and units, and neither becomes a processing parameter without an attributable authoring step. Processing outputs MAY be re-listened; a re-listening is a new pass and never overwrites the account of the source. diff --git a/spec/0.2.0/profiles/publication.md b/spec/0.2.0/profiles/publication.md new file mode 100644 index 0000000..edc150c --- /dev/null +++ b/spec/0.2.0/profiles/publication.md @@ -0,0 +1,7 @@ +# Publication profile 0.2.0 + +The Publication profile requires an explicit public identifier, approval actor and time, active publication policy evaluation, public disclosure state, omissions and redactions, attribution or license status, retention, correction route, and revocation route. + +Publication creates a new projection. It includes only independently public entities and approved derivative assets. Unknown extensions, private identifiers, private digests, absolute paths, precise protected locations, restricted voices, credentials, provider configuration, and unknown authority are excluded or block publication. + +The finished projection is validated and audited again. A clean secret scan does not prove permission. diff --git a/spec/0.2.0/profiles/transformation.md b/spec/0.2.0/profiles/transformation.md new file mode 100644 index 0000000..32a8d6b --- /dev/null +++ b/spec/0.2.0/profiles/transformation.md @@ -0,0 +1,5 @@ +# Transformation profile 0.2.0 + +A completed transformation requires a preserved input, a distinct descendant Representation, an OperationReceipt, a parent relation, a preservation intent, and a reversibility class. + +Core transformation operations include segment, isolate, transform, sculpt, recompose, render, and compensate. Interface undo is recorded separately from a verified material inverse. Failed, refused, cancelled, or not-performed transformations do not fabricate descendants. diff --git a/spec/0.2.0/versioning.md b/spec/0.2.0/versioning.md new file mode 100644 index 0000000..9132f3e --- /dev/null +++ b/spec/0.2.0/versioning.md @@ -0,0 +1,13 @@ +# MASA versioning 0.2.0 + +MASA versions normative schemas and behavior with semantic versions. + +- Patch releases repair unambiguous defects without invalidating conforming records. +- Minor releases add backward-compatible optional structure or new profiles. Before 1.0, a documented breaking change MAY occur in a minor release only when no safe alternative exists. +- Major releases may redefine required behavior and require explicit migration. + +Every record pins an exact `masaVersion`. Every application publishes a supported version range and exact profile/class evidence. `/latest` MAY exist as a documentation redirect but MUST NOT appear as a stored schema or protocol version. + +Deprecated terms and fields remain documented through at least one compatible migration window. IDs are never reused. A migration creates an attributable operation and does not silently rewrite the only copy of an earlier record. + +MASA 0.2.0 adds the optional Observation profile. The Core object families remain structurally compatible with 0.1.0 apart from their exact versioned identifiers. Re-versioning a stored 0.1.0 record is therefore still a migration: preserve the earlier record, create a new revision with 0.2.0 identifiers, and record the operation. Records that declare the Observation profile must populate its three required metadata axes. diff --git a/spec/0.2.0/vocabulary.md b/spec/0.2.0/vocabulary.md new file mode 100644 index 0000000..7b903ee --- /dev/null +++ b/spec/0.2.0/vocabulary.md @@ -0,0 +1,26 @@ +# MASA vocabulary 0.2.0 + +The canonical machine-readable registries are [`ontology/0.2.0/terms.json`](../../ontology/0.2.0/terms.json) and [`relations.json`](../../ontology/0.2.0/relations.json). This document explains their governance. + +## Term status + +| Status | Meaning | +| --- | --- | +| `source-term` | Attested and attributed to external scholarship in the preserved research corpus. | +| `adapted-term` | A source term explicitly changed by the project. | +| `project-term` | Established in a preserved implementation or research-project source. | +| `working-term` | Proposed by the curator, theory, or protocol and still revisable. | + +Every registered term declares namespace, definition, status, attribution, introduction version, source or decision references, and non-equivalences. A wire-format mapping never makes two theoretical concepts equivalent. + +## Namespace policy + +- `masa:` contains the shared protocol vocabulary. +- Each implementation, community, or research project chooses and governs its own namespace; `example:` is reserved for non-production examples. +- Adapter documents in this repository are illustrative archetypes with placeholder namespaces; a concrete application names and governs its own namespace in its own repository, and no application namespace is ever required for MASA conformance. +- A term can move into `masa:` only after a versioned RFC, source-status review, and evidence from at least two implementations. +- Promotion never erases the prior namespace or conceptual lineage. + +## Relation policy + +Relations declare a category, whether they participate in the acyclic derivation graph, and—when applicable—which endpoint is the descendant. Domain metaphors remain implementation extensions. Tradition-specific terms such as ch'ixi, pacha, cosmotechnics, Deep Listening, sound object, and auditum retain attribution and are not generic software labels.