diff --git a/docs/cultnet-transport-parity.md b/docs/cultnet-transport-parity.md index d9f97cd7..fc416bc3 100644 --- a/docs/cultnet-transport-parity.md +++ b/docs/cultnet-transport-parity.md @@ -317,7 +317,9 @@ Current progress: request/fetch/sync helpers for `cultnet.shard_catalog_request.v0` / `cultnet.shard_catalog_response.v0`. Shard descriptors can be filtered by schema id and record key without - requiring callers to inspect raw response maps. + requiring callers to inspect raw response maps. The built-in schema registry + also advertises the shard catalog request/response wire-message schemas, so + discovery matches the helper surface. - Kotlin now mirrors the CultMesh stream catalog shape for Android-adjacent media, sensor, tensor, and byte streams: stream declaration, clock metadata, preferred body transports, consumer negotiation, copy-budget classification, diff --git a/docs/runtime-parity-scope.md b/docs/runtime-parity-scope.md index 444f2739..32a51184 100644 --- a/docs/runtime-parity-scope.md +++ b/docs/runtime-parity-scope.md @@ -32,7 +32,7 @@ CultMesh. | --- | --- | --- | --- | | C# | Reference implementation and production game/server substrate | CultCache typed documents and SoA, CultNet schema-v0, LiteNetLib production path with adapter profile, shared transport profiles, shared RUDP socket transport, RUDP reconnect policy/controller and reconnect-loop helper, LiteNetLib client reconnect-controller adoption, schema-client transport port for service request/response clients, CultMesh node/session/catalog/stream/simulation surfaces | No need to abandon LiteNetLib before the CultNet adapter fully owns production service adoption | | Python | Package runtime, local daemon endpoint, raw interop peer, typed state participant | CultCache/CultNet/CultMesh package surface, schema catalogs, shard catalogs/logs, local TCP CultMesh server, session/prediction/simulation fact helpers, authority leases, streams, RUDP codec/session/socket transport, RUDP reconnect policy/controller and reconnect-loop helper, schema-v0 MessagePack over RUDP evidence, benchmark evidence against C# cache paths | Universal C# throughput, full C# daemon/server stack, and RUDP as the only public service pipe | -| TypeScript | Node/browser-adjacent projection and interop runtime | CultCache parity tests, CultNet schema-v0 peer, schema/shard catalog request/sync helpers, transport profiles, TCP-framed transport port and peer helper, shared RUDP socket transport, RUDP reconnect policy/controller, RUDP reconnect-loop helper, local CultMesh node/catalog/authority/stream ergonomics | Full C# game session/server stack | +| TypeScript | Node/browser-adjacent projection and interop runtime | CultCache parity tests, CultNet schema-v0 peer, advertised schema/shard catalog wire contracts plus request/sync helpers, transport profiles, TCP-framed transport port and peer helper, shared RUDP socket transport, RUDP reconnect policy/controller, RUDP reconnect-loop helper, local CultMesh node/catalog/authority/stream ergonomics | Full C# game session/server stack | | Rust | Low-level cache/transport/runtime substrate | CultCache/CultNet interop lane, schema and shard catalog helpers, transport profiles, TCP-framed port, shared RUDP codec/session/socket transport, RUDP reconnect policy/controller and reconnect-loop helper, schema-v0 MessagePack over RUDP evidence, small CultMesh facade for peer cards, authority leases, RUDP endpoint parsing, and peer-card RUDP client construction | Full CultMesh game-session/server facade, stream catalog, or production game-session server | | Kotlin | JVM/Android client substrate | Typed MessagePack cache, schema/shard catalogs with shared schema-message transport fetch/sync helpers, authority leases, stream catalog, branded `CultMesh` facade, WebSocket transport profile/connection helper, RUDP client/server sugar, RUDP reconnect policy/controller and reconnect-loop helper, schema-v0 MessagePack over RUDP evidence | C# SoA store, full C# server daemon, or Unity hot-loop memory layout | diff --git a/packages/cultnet-ts/README.md b/packages/cultnet-ts/README.md index 15f2f92a..96909b93 100644 --- a/packages/cultnet-ts/README.md +++ b/packages/cultnet-ts/README.md @@ -187,7 +187,10 @@ Shard discovery follows the same split: `CultNetShardCatalog` owns imported `cultnet.shard_catalog_response.v0` descriptors, filters by schema id and record key, and can answer `cultnet.shard_catalog_request.v0`. `CultNetPeer` also exposes `requestShardCatalog(...)`, `fetchShardDescriptors(...)`, and -`syncShardCatalog(...)` for the same message-id-matched exchange. +`syncShardCatalog(...)` for the same message-id-matched exchange. The built-in +schema registry advertises the shard catalog request/response schemas as +schema-v0 wire messages, so callers can discover the contracts before using +the helper path. ## Quick Example diff --git a/packages/cultnet-ts/src/schema-discovery.ts b/packages/cultnet-ts/src/schema-discovery.ts index 782c42ee..d67ab92b 100644 --- a/packages/cultnet-ts/src/schema-discovery.ts +++ b/packages/cultnet-ts/src/schema-discovery.ts @@ -390,6 +390,22 @@ export const cultNetBuiltinSchemaRegistry = new CultNetSchemaRegistry([ title: cultNetSchemas.schemaCatalogResponseSchema.title, wireContracts: ["cultnet.schema.v0", "gamecult.networking.v0"], }, + { + schemaId: cultNetSchemas.shardCatalogRequestSchema.$id, + kind: "wire_message", + schema: cultNetSchemas.shardCatalogRequestSchema, + schemaVersion: "cultnet.shard_catalog_request.v0", + title: "CultNet Shard Catalog Request Message", + wireContracts: ["cultnet.schema.v0"], + }, + { + schemaId: cultNetSchemas.shardCatalogResponseSchema.$id, + kind: "wire_message", + schema: cultNetSchemas.shardCatalogResponseSchema, + schemaVersion: "cultnet.shard_catalog_response.v0", + title: "CultNet Shard Catalog Response Message", + wireContracts: ["cultnet.schema.v0"], + }, { schemaId: cultNetSchemas.ghostlightAgentStateSchema.$id, kind: "document_payload", diff --git a/packages/cultnet-ts/test/cultnet.test.ts b/packages/cultnet-ts/test/cultnet.test.ts index 6eba483c..c2a8a8d8 100644 --- a/packages/cultnet-ts/test/cultnet.test.ts +++ b/packages/cultnet-ts/test/cultnet.test.ts @@ -835,6 +835,14 @@ test("CultNet schema discovery catalog can advertise canonical schemas without i assert.equal(transportProfile?.kind, "shared_contract"); assert.equal(transportProfile?.schemaId, cultNetSchemas.transportProfileSchema.$id); assert.deepEqual(transportProfile?.wireContracts, ["cultnet.schema.v0"]); + const shardCatalogRequest = response.schemas.find((schema) => schema.schemaVersion === "cultnet.shard_catalog_request.v0"); + assert.ok(shardCatalogRequest); + assert.equal(shardCatalogRequest?.schemaId, cultNetSchemas.shardCatalogRequestSchema.$id); + assert.deepEqual(shardCatalogRequest?.wireContracts, ["cultnet.schema.v0"]); + const shardCatalogResponse = response.schemas.find((schema) => schema.schemaVersion === "cultnet.shard_catalog_response.v0"); + assert.ok(shardCatalogResponse); + assert.equal(shardCatalogResponse?.schemaId, cultNetSchemas.shardCatalogResponseSchema.$id); + assert.deepEqual(shardCatalogResponse?.wireContracts, ["cultnet.schema.v0"]); assert.equal( cultNetSchemas.transportProfileSchema.properties.transports.items.properties.reconnectPolicy.properties.schemaVersion.const, "cultnet.reconnect_policy.v0",