CultLib/contracts/cultnet/cultmesh.verse-catalog-response.schema.json
Meta Vens fcc49cffa0 Consolidate CultNet schema contracts into CultLib/contracts/cultnet
REC-032 commit 1: move the canonical 33 TS + witness-artifact-bundle
schema files (34 total) into runtime-neutral CultLib/contracts/cultnet,
move the interop-note schema (and delete the zero-consumer discovery-*
schemas per D3, tagged parked/cultnet-discovery-contracts) into
contracts/cultnet/interop, and delete the 27 C# and 24 Rust duplicate
copies after confirming byte-for-byte equivalence (only
cultnet.snapshot-request differs: TS carries shardId/shardEpoch, a
known drift already resolved in favor of the TS shape).

Rewrite every $id from https://github.com/GameCult/cultnet-ts/contracts/
and .../cultnet-ts/integration/contracts/ to
https://github.com/GameCult/CultLib/contracts/cultnet/(interop/); give
the two shard-catalog schemas URL ids per D1, replacing the bare
cultnet.shard_catalog_*.v0 identifiers; leave ghostlight.agent-state's
Ghostlight-owned $id untouched per D5.

Repoint every runtime's load path and id literal at the new location:
C# csproj EmbeddedResource + LogicalName, Rust include_str! paths,
TS contracts.ts imports + swarm-contracts manifest/tooling + package.json
files/prepack, and the id/path literals in the C#, Rust, Python and
Kotlin interop tests and peers. Python and Kotlin still build their own
schema JSON in-process (D2); only their base constants, id literals,
and (for Kotlin) contentHash literals were swapped. Every Kotlin
contentHash was recomputed from the final canonical files using the
runtime's own stable-stringify + SHA-256 function; all matched the
planner's precomputed values except cultnet.schema-catalog-response,
where the planner's proposed value did not match recomputation and the
freshly computed value was used instead.

REC-032, decisions D1/D2/D3/D5.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-13 17:27:41 +02:00

72 lines
3.6 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultmesh.verse-catalog-response.schema.json",
"title": "CultMesh Verse Catalog Response",
"type": "object",
"required": ["schemaVersion", "messageId", "verses"],
"additionalProperties": false,
"$defs": {
"compatibility": {
"type": "object",
"required": ["transportVersion", "rulesHash", "compatibleVerseIds", "requiredPluginIds", "optionalPluginIds"],
"additionalProperties": false,
"properties": {
"transportVersion": { "type": "string", "minLength": 1 },
"rulesHash": { "type": "string", "minLength": 1 },
"compatibleVerseIds": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
"requiredPluginIds": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
"optionalPluginIds": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true }
}
},
"authorityRoute": {
"type": "object",
"required": ["authorityRuntimeId", "endpoint", "protocolIds", "priority", "generation"],
"additionalProperties": false,
"properties": {
"authorityRuntimeId": { "type": "string", "minLength": 1 },
"endpoint": { "type": "string", "minLength": 1 },
"protocolIds": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
"priority": { "type": "integer", "minimum": 0 },
"generation": { "type": "string", "minLength": 1 },
"certificate": {
"anyOf": [{ "$ref": "#/$defs/routeCertificate" }, { "type": "null" }]
}
}
},
"routeCertificate": {
"type": "object",
"required": ["providerKeyId", "providerPublicKeyX", "providerPublicKeyY", "odinKeyId", "issuedAtUnixMilliseconds", "expiresAtUnixMilliseconds", "signature"],
"additionalProperties": false,
"properties": {
"providerKeyId": { "type": "string", "minLength": 1 },
"providerPublicKeyX": { "type": "string", "minLength": 1 },
"providerPublicKeyY": { "type": "string", "minLength": 1 },
"odinKeyId": { "type": "string", "minLength": 1 },
"issuedAtUnixMilliseconds": { "type": "integer", "minimum": 0 },
"expiresAtUnixMilliseconds": { "type": "integer", "minimum": 1 },
"signature": { "type": "string", "minLength": 1 }
}
},
"verse": {
"type": "object",
"required": ["verseId", "displayName", "authorityModel", "compatibility", "discoveryEndpoints", "authorityRuntimeIds"],
"additionalProperties": false,
"properties": {
"verseId": { "type": "string", "minLength": 1 },
"displayName": { "type": "string", "minLength": 1 },
"authorityModel": { "type": "string", "minLength": 1 },
"compatibility": { "$ref": "#/$defs/compatibility" },
"discoveryEndpoints": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
"authorityRuntimeIds": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
"authorityRoutes": { "type": "array", "items": { "$ref": "#/$defs/authorityRoute" } },
"parentVerseId": { "type": "string", "minLength": 1 },
"description": { "type": "string" }
}
}
},
"properties": {
"schemaVersion": { "const": "cultmesh.verse_catalog_response.v0" },
"messageId": { "type": "string", "minLength": 1 },
"verses": { "type": "array", "items": { "$ref": "#/$defs/verse" } }
}
}