diff --git a/packages/cultnet-ts/contracts/cultmesh.session-accepted.schema.json b/contracts/cultnet/cultmesh.session-accepted.schema.json similarity index 89% rename from packages/cultnet-ts/contracts/cultmesh.session-accepted.schema.json rename to contracts/cultnet/cultmesh.session-accepted.schema.json index aca1ff2b..8e5f64e4 100644 --- a/packages/cultnet-ts/contracts/cultmesh.session-accepted.schema.json +++ b/contracts/cultnet/cultmesh.session-accepted.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultmesh.session-accepted.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultmesh.session-accepted.schema.json", "title": "CultMesh Session Accepted", "type": "object", "required": ["schemaVersion", "messageId", "accepted", "verseId", "authorityRuntimeId", "protocolId", "routeGeneration", "clientNonce", "providerKeyId", "providerSignature"], diff --git a/packages/cultnet-ts/contracts/cultmesh.session-open.schema.json b/contracts/cultnet/cultmesh.session-open.schema.json similarity index 88% rename from packages/cultnet-ts/contracts/cultmesh.session-open.schema.json rename to contracts/cultnet/cultmesh.session-open.schema.json index 937f3e28..a24bc1c1 100644 --- a/packages/cultnet-ts/contracts/cultmesh.session-open.schema.json +++ b/contracts/cultnet/cultmesh.session-open.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultmesh.session-open.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultmesh.session-open.schema.json", "title": "CultMesh Session Open", "type": "object", "required": ["schemaVersion", "messageId", "sourceRuntimeId", "verseId", "authorityRuntimeId", "protocolId", "routeGeneration", "clientNonce"], diff --git a/packages/cultnet-ts/contracts/cultmesh.verse-catalog-request.schema.json b/contracts/cultnet/cultmesh.verse-catalog-request.schema.json similarity index 82% rename from packages/cultnet-ts/contracts/cultmesh.verse-catalog-request.schema.json rename to contracts/cultnet/cultmesh.verse-catalog-request.schema.json index e99b9dea..26763d1a 100644 --- a/packages/cultnet-ts/contracts/cultmesh.verse-catalog-request.schema.json +++ b/contracts/cultnet/cultmesh.verse-catalog-request.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultmesh.verse-catalog-request.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultmesh.verse-catalog-request.schema.json", "title": "CultMesh Verse Catalog Request", "type": "object", "required": ["schemaVersion", "messageId"], diff --git a/packages/cultnet-ts/contracts/cultmesh.verse-catalog-response.schema.json b/contracts/cultnet/cultmesh.verse-catalog-response.schema.json similarity index 96% rename from packages/cultnet-ts/contracts/cultmesh.verse-catalog-response.schema.json rename to contracts/cultnet/cultmesh.verse-catalog-response.schema.json index 464908ad..1583051e 100644 --- a/packages/cultnet-ts/contracts/cultmesh.verse-catalog-response.schema.json +++ b/contracts/cultnet/cultmesh.verse-catalog-response.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultmesh.verse-catalog-response.schema.json", + "$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"], diff --git a/src/GameCult.Networking/Contracts/cultnet-distributed-database.md b/contracts/cultnet/cultnet-distributed-database.md similarity index 100% rename from src/GameCult.Networking/Contracts/cultnet-distributed-database.md rename to contracts/cultnet/cultnet-distributed-database.md diff --git a/packages/cultnet-ts/contracts/cultnet.database-change-raw.schema.json b/contracts/cultnet/cultnet.database-change-raw.schema.json similarity index 89% rename from packages/cultnet-ts/contracts/cultnet.database-change-raw.schema.json rename to contracts/cultnet/cultnet.database-change-raw.schema.json index dd650fa0..2725a5af 100644 --- a/packages/cultnet-ts/contracts/cultnet.database-change-raw.schema.json +++ b/contracts/cultnet/cultnet.database-change-raw.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.database-change-raw.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.database-change-raw.schema.json", "title": "CultNet Raw Database Change Message", "type": "object", "required": ["schemaVersion", "messageId", "subscriptionId", "changeKind"], diff --git a/packages/cultnet-ts/contracts/cultnet.database-subscribe.schema.json b/contracts/cultnet/cultnet.database-subscribe.schema.json similarity index 89% rename from packages/cultnet-ts/contracts/cultnet.database-subscribe.schema.json rename to contracts/cultnet/cultnet.database-subscribe.schema.json index 08304199..5d9c2b5f 100644 --- a/packages/cultnet-ts/contracts/cultnet.database-subscribe.schema.json +++ b/contracts/cultnet/cultnet.database-subscribe.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.database-subscribe.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.database-subscribe.schema.json", "title": "CultNet Database Subscribe Message", "type": "object", "required": ["schemaVersion", "messageId", "subscriptionId", "includeSnapshot"], diff --git a/packages/cultnet-ts/contracts/cultnet.database-unsubscribe.schema.json b/contracts/cultnet/cultnet.database-unsubscribe.schema.json similarity index 80% rename from packages/cultnet-ts/contracts/cultnet.database-unsubscribe.schema.json rename to contracts/cultnet/cultnet.database-unsubscribe.schema.json index 7d4b0855..a5ea02d1 100644 --- a/packages/cultnet-ts/contracts/cultnet.database-unsubscribe.schema.json +++ b/contracts/cultnet/cultnet.database-unsubscribe.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.database-unsubscribe.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.database-unsubscribe.schema.json", "title": "CultNet Database Unsubscribe Message", "type": "object", "required": ["schemaVersion", "messageId", "subscriptionId"], diff --git a/packages/cultnet-rs/contracts/cultnet.document-delete.schema.json b/contracts/cultnet/cultnet.document-delete.schema.json similarity index 83% rename from packages/cultnet-rs/contracts/cultnet.document-delete.schema.json rename to contracts/cultnet/cultnet.document-delete.schema.json index 265bcaf2..3ba5b3fc 100644 --- a/packages/cultnet-rs/contracts/cultnet.document-delete.schema.json +++ b/contracts/cultnet/cultnet.document-delete.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.document-delete.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.document-delete.schema.json", "title": "CultNet Document Delete Message", "type": "object", "required": [ diff --git a/src/GameCult.Networking/Contracts/cultnet.document-mutation-contract.schema.json b/contracts/cultnet/cultnet.document-mutation-contract.schema.json similarity index 90% rename from src/GameCult.Networking/Contracts/cultnet.document-mutation-contract.schema.json rename to contracts/cultnet/cultnet.document-mutation-contract.schema.json index e444fef0..4f8c9b78 100644 --- a/src/GameCult.Networking/Contracts/cultnet.document-mutation-contract.schema.json +++ b/contracts/cultnet/cultnet.document-mutation-contract.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.document-mutation-contract.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.document-mutation-contract.schema.json", "title": "CultNet Document Mutation Contract", "type": "object", "required": [ diff --git a/packages/cultnet-ts/contracts/cultnet.document-put-raw.schema.json b/contracts/cultnet/cultnet.document-put-raw.schema.json similarity index 81% rename from packages/cultnet-ts/contracts/cultnet.document-put-raw.schema.json rename to contracts/cultnet/cultnet.document-put-raw.schema.json index 3c178d03..c2c98030 100644 --- a/packages/cultnet-ts/contracts/cultnet.document-put-raw.schema.json +++ b/contracts/cultnet/cultnet.document-put-raw.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.document-put-raw.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.document-put-raw.schema.json", "title": "CultNet Raw Document Put Message", "type": "object", "required": [ diff --git a/src/GameCult.Networking/Contracts/cultnet.document-put.schema.json b/contracts/cultnet/cultnet.document-put.schema.json similarity index 82% rename from src/GameCult.Networking/Contracts/cultnet.document-put.schema.json rename to contracts/cultnet/cultnet.document-put.schema.json index a04f5fca..2b92051a 100644 --- a/src/GameCult.Networking/Contracts/cultnet.document-put.schema.json +++ b/contracts/cultnet/cultnet.document-put.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.document-put.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.document-put.schema.json", "title": "CultNet Document Put Message", "type": "object", "required": [ diff --git a/src/GameCult.Networking/Contracts/cultnet.document-record.schema.json b/contracts/cultnet/cultnet.document-record.schema.json similarity index 87% rename from src/GameCult.Networking/Contracts/cultnet.document-record.schema.json rename to contracts/cultnet/cultnet.document-record.schema.json index 94301dc5..5512c789 100644 --- a/src/GameCult.Networking/Contracts/cultnet.document-record.schema.json +++ b/contracts/cultnet/cultnet.document-record.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.document-record.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.document-record.schema.json", "title": "CultNet Document Record", "type": "object", "required": [ diff --git a/packages/cultnet-ts/contracts/cultnet.error.schema.json b/contracts/cultnet/cultnet.error.schema.json similarity index 78% rename from packages/cultnet-ts/contracts/cultnet.error.schema.json rename to contracts/cultnet/cultnet.error.schema.json index af6da9cf..08dc1e45 100644 --- a/packages/cultnet-ts/contracts/cultnet.error.schema.json +++ b/contracts/cultnet/cultnet.error.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.error.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.error.schema.json", "title": "CultNet Error Message", "type": "object", "required": [ diff --git a/src/GameCult.Networking/Contracts/cultnet.hello.schema.json b/contracts/cultnet/cultnet.hello.schema.json similarity index 92% rename from src/GameCult.Networking/Contracts/cultnet.hello.schema.json rename to contracts/cultnet/cultnet.hello.schema.json index a557dc3f..36f9e8cf 100644 --- a/src/GameCult.Networking/Contracts/cultnet.hello.schema.json +++ b/contracts/cultnet/cultnet.hello.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.hello.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.hello.schema.json", "title": "CultNet Hello Message", "type": "object", "required": [ diff --git a/packages/cultnet-rs/contracts/cultnet.login-success.schema.json b/contracts/cultnet/cultnet.login-success.schema.json similarity index 80% rename from packages/cultnet-rs/contracts/cultnet.login-success.schema.json rename to contracts/cultnet/cultnet.login-success.schema.json index 3d8a4591..fbe41690 100644 --- a/packages/cultnet-rs/contracts/cultnet.login-success.schema.json +++ b/contracts/cultnet/cultnet.login-success.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.login-success.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.login-success.schema.json", "title": "CultNet Login Success Message", "type": "object", "required": [ diff --git a/packages/cultnet-ts/contracts/cultnet.login.schema.json b/contracts/cultnet/cultnet.login.schema.json similarity index 83% rename from packages/cultnet-ts/contracts/cultnet.login.schema.json rename to contracts/cultnet/cultnet.login.schema.json index 62f49599..86154717 100644 --- a/packages/cultnet-ts/contracts/cultnet.login.schema.json +++ b/contracts/cultnet/cultnet.login.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.login.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.login.schema.json", "title": "CultNet Login Message", "type": "object", "required": [ diff --git a/src/GameCult.Networking/Contracts/cultnet.operation-request.schema.json b/contracts/cultnet/cultnet.operation-request.schema.json similarity index 88% rename from src/GameCult.Networking/Contracts/cultnet.operation-request.schema.json rename to contracts/cultnet/cultnet.operation-request.schema.json index 07cd9d8d..6008e339 100644 --- a/src/GameCult.Networking/Contracts/cultnet.operation-request.schema.json +++ b/contracts/cultnet/cultnet.operation-request.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.operation-request.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.operation-request.schema.json", "title": "CultNet Operation Request", "type": "object", "required": ["schemaVersion", "messageId", "serviceId", "operation", "payloadSchema", "payload"], diff --git a/packages/cultnet-ts/contracts/cultnet.operation-response.schema.json b/contracts/cultnet/cultnet.operation-response.schema.json similarity index 89% rename from packages/cultnet-ts/contracts/cultnet.operation-response.schema.json rename to contracts/cultnet/cultnet.operation-response.schema.json index c3be917d..21f2675c 100644 --- a/packages/cultnet-ts/contracts/cultnet.operation-response.schema.json +++ b/contracts/cultnet/cultnet.operation-response.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.operation-response.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.operation-response.schema.json", "title": "CultNet Operation Response", "type": "object", "required": ["schemaVersion", "messageId", "serviceId", "operation", "status", "payloadSchema", "payload"], diff --git a/src/GameCult.Networking/Contracts/cultnet.raw-document-record.schema.json b/contracts/cultnet/cultnet.raw-document-record.schema.json similarity index 89% rename from src/GameCult.Networking/Contracts/cultnet.raw-document-record.schema.json rename to contracts/cultnet/cultnet.raw-document-record.schema.json index 3348a5fa..2892a717 100644 --- a/src/GameCult.Networking/Contracts/cultnet.raw-document-record.schema.json +++ b/contracts/cultnet/cultnet.raw-document-record.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.raw-document-record.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.raw-document-record.schema.json", "title": "CultNet Raw Document Record", "type": "object", "required": [ diff --git a/packages/cultnet-ts/contracts/cultnet.register.schema.json b/contracts/cultnet/cultnet.register.schema.json similarity index 84% rename from packages/cultnet-ts/contracts/cultnet.register.schema.json rename to contracts/cultnet/cultnet.register.schema.json index 77286f3e..c5f5ce42 100644 --- a/packages/cultnet-ts/contracts/cultnet.register.schema.json +++ b/contracts/cultnet/cultnet.register.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.register.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.register.schema.json", "title": "CultNet Register Message", "type": "object", "required": [ diff --git a/packages/cultnet-ts/contracts/cultnet.sample-change-name.schema.json b/contracts/cultnet/cultnet.sample-change-name.schema.json similarity index 77% rename from packages/cultnet-ts/contracts/cultnet.sample-change-name.schema.json rename to contracts/cultnet/cultnet.sample-change-name.schema.json index fc3fe057..2408a449 100644 --- a/packages/cultnet-ts/contracts/cultnet.sample-change-name.schema.json +++ b/contracts/cultnet/cultnet.sample-change-name.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.sample-change-name.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.sample-change-name.schema.json", "title": "CultNet Sample Change Name Message", "type": "object", "required": [ diff --git a/src/GameCult.Networking/Contracts/cultnet.sample-chat.schema.json b/contracts/cultnet/cultnet.sample-chat.schema.json similarity index 77% rename from src/GameCult.Networking/Contracts/cultnet.sample-chat.schema.json rename to contracts/cultnet/cultnet.sample-chat.schema.json index 8426fb57..e9bf544c 100644 --- a/src/GameCult.Networking/Contracts/cultnet.sample-chat.schema.json +++ b/contracts/cultnet/cultnet.sample-chat.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.sample-chat.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.sample-chat.schema.json", "title": "CultNet Sample Chat Message", "type": "object", "required": [ diff --git a/packages/cultnet-rs/contracts/cultnet.schema-catalog-request.schema.json b/contracts/cultnet/cultnet.schema-catalog-request.schema.json similarity index 87% rename from packages/cultnet-rs/contracts/cultnet.schema-catalog-request.schema.json rename to contracts/cultnet/cultnet.schema-catalog-request.schema.json index 611733d2..5459129b 100644 --- a/packages/cultnet-rs/contracts/cultnet.schema-catalog-request.schema.json +++ b/contracts/cultnet/cultnet.schema-catalog-request.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.schema-catalog-request.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.schema-catalog-request.schema.json", "title": "CultNet Schema Catalog Request Message", "type": "object", "required": [ diff --git a/src/GameCult.Networking/Contracts/cultnet.schema-catalog-response.schema.json b/contracts/cultnet/cultnet.schema-catalog-response.schema.json similarity index 82% rename from src/GameCult.Networking/Contracts/cultnet.schema-catalog-response.schema.json rename to contracts/cultnet/cultnet.schema-catalog-response.schema.json index fa371e48..dbda847e 100644 --- a/src/GameCult.Networking/Contracts/cultnet.schema-catalog-response.schema.json +++ b/contracts/cultnet/cultnet.schema-catalog-response.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.schema-catalog-response.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.schema-catalog-response.schema.json", "title": "CultNet Schema Catalog Response Message", "type": "object", "required": [ diff --git a/src/GameCult.Networking/Contracts/cultnet.schema-descriptor.schema.json b/contracts/cultnet/cultnet.schema-descriptor.schema.json similarity index 90% rename from src/GameCult.Networking/Contracts/cultnet.schema-descriptor.schema.json rename to contracts/cultnet/cultnet.schema-descriptor.schema.json index 23796857..77b6648c 100644 --- a/src/GameCult.Networking/Contracts/cultnet.schema-descriptor.schema.json +++ b/contracts/cultnet/cultnet.schema-descriptor.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.schema-descriptor.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.schema-descriptor.schema.json", "title": "CultNet Schema Descriptor", "type": "object", "required": [ diff --git a/packages/cultnet-ts/contracts/cultnet.shard-catalog-request.schema.json b/contracts/cultnet/cultnet.shard-catalog-request.schema.json similarity index 82% rename from packages/cultnet-ts/contracts/cultnet.shard-catalog-request.schema.json rename to contracts/cultnet/cultnet.shard-catalog-request.schema.json index c91ee09b..7e443e60 100644 --- a/packages/cultnet-ts/contracts/cultnet.shard-catalog-request.schema.json +++ b/contracts/cultnet/cultnet.shard-catalog-request.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "cultnet.shard_catalog_request.v0", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.shard-catalog-request.schema.json", "type": "object", "required": ["schemaVersion", "messageId"], "additionalProperties": false, diff --git a/packages/cultnet-rs/contracts/cultnet.shard-catalog-response.schema.json b/contracts/cultnet/cultnet.shard-catalog-response.schema.json similarity index 93% rename from packages/cultnet-rs/contracts/cultnet.shard-catalog-response.schema.json rename to contracts/cultnet/cultnet.shard-catalog-response.schema.json index b2661786..f0b846ac 100644 --- a/packages/cultnet-rs/contracts/cultnet.shard-catalog-response.schema.json +++ b/contracts/cultnet/cultnet.shard-catalog-response.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "cultnet.shard_catalog_response.v0", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.shard-catalog-response.schema.json", "type": "object", "required": ["schemaVersion", "messageId", "shards"], "additionalProperties": false, diff --git a/packages/cultnet-ts/contracts/cultnet.snapshot-request.schema.json b/contracts/cultnet/cultnet.snapshot-request.schema.json similarity index 86% rename from packages/cultnet-ts/contracts/cultnet.snapshot-request.schema.json rename to contracts/cultnet/cultnet.snapshot-request.schema.json index 76666e3c..9571669c 100644 --- a/packages/cultnet-ts/contracts/cultnet.snapshot-request.schema.json +++ b/contracts/cultnet/cultnet.snapshot-request.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.snapshot-request.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.snapshot-request.schema.json", "title": "CultNet Snapshot Request Message", "type": "object", "required": [ diff --git a/packages/cultnet-rs/contracts/cultnet.snapshot-response-raw.schema.json b/contracts/cultnet/cultnet.snapshot-response-raw.schema.json similarity index 82% rename from packages/cultnet-rs/contracts/cultnet.snapshot-response-raw.schema.json rename to contracts/cultnet/cultnet.snapshot-response-raw.schema.json index a84bc50d..538f48de 100644 --- a/packages/cultnet-rs/contracts/cultnet.snapshot-response-raw.schema.json +++ b/contracts/cultnet/cultnet.snapshot-response-raw.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.snapshot-response-raw.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.snapshot-response-raw.schema.json", "title": "CultNet Raw Snapshot Response Message", "type": "object", "required": [ diff --git a/src/GameCult.Networking/Contracts/cultnet.snapshot-response.schema.json b/contracts/cultnet/cultnet.snapshot-response.schema.json similarity index 83% rename from src/GameCult.Networking/Contracts/cultnet.snapshot-response.schema.json rename to contracts/cultnet/cultnet.snapshot-response.schema.json index 940822ce..87daf147 100644 --- a/src/GameCult.Networking/Contracts/cultnet.snapshot-response.schema.json +++ b/contracts/cultnet/cultnet.snapshot-response.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.snapshot-response.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.snapshot-response.schema.json", "title": "CultNet Snapshot Response Message", "type": "object", "required": [ diff --git a/packages/cultnet-rs/contracts/cultnet.transport-profile.schema.json b/contracts/cultnet/cultnet.transport-profile.schema.json similarity index 96% rename from packages/cultnet-rs/contracts/cultnet.transport-profile.schema.json rename to contracts/cultnet/cultnet.transport-profile.schema.json index 90261c79..dff458f1 100644 --- a/packages/cultnet-rs/contracts/cultnet.transport-profile.schema.json +++ b/contracts/cultnet/cultnet.transport-profile.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.transport-profile.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.transport-profile.schema.json", "title": "CultNet Transport Profile", "type": "object", "required": [ diff --git a/src/GameCult.Networking/Contracts/cultnet.verify.schema.json b/contracts/cultnet/cultnet.verify.schema.json similarity index 81% rename from src/GameCult.Networking/Contracts/cultnet.verify.schema.json rename to contracts/cultnet/cultnet.verify.schema.json index 1f992aa8..301ae338 100644 --- a/src/GameCult.Networking/Contracts/cultnet.verify.schema.json +++ b/contracts/cultnet/cultnet.verify.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.verify.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.verify.schema.json", "title": "CultNet Verify Message", "type": "object", "required": [ diff --git a/src/GameCult.Networking/Contracts/cultnet.witness-artifact-bundle.schema.json b/contracts/cultnet/cultnet.witness-artifact-bundle.schema.json similarity index 96% rename from src/GameCult.Networking/Contracts/cultnet.witness-artifact-bundle.schema.json rename to contracts/cultnet/cultnet.witness-artifact-bundle.schema.json index a9cfbcef..6dd6971d 100644 --- a/src/GameCult.Networking/Contracts/cultnet.witness-artifact-bundle.schema.json +++ b/contracts/cultnet/cultnet.witness-artifact-bundle.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.witness-artifact-bundle.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.witness-artifact-bundle.schema.json", "title": "CultNet Witness Artifact Bundle", "type": "object", "required": [ diff --git a/packages/cultnet-rs/contracts/ghostlight.agent-state.schema.json b/contracts/cultnet/ghostlight.agent-state.schema.json similarity index 100% rename from packages/cultnet-rs/contracts/ghostlight.agent-state.schema.json rename to contracts/cultnet/ghostlight.agent-state.schema.json diff --git a/packages/cultnet-ts/integration/contracts/cultnet.interop-note.schema.json b/contracts/cultnet/interop/cultnet.interop-note.schema.json similarity index 86% rename from packages/cultnet-ts/integration/contracts/cultnet.interop-note.schema.json rename to contracts/cultnet/interop/cultnet.interop-note.schema.json index 8f5d7058..631eec72 100644 --- a/packages/cultnet-ts/integration/contracts/cultnet.interop-note.schema.json +++ b/contracts/cultnet/interop/cultnet.interop-note.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.interop-note.schema.json", + "$id": "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.interop-note.schema.json", "title": "CultNet Interop Note", "type": "object", "required": [ diff --git a/packages/cultmesh-kotlin/src/main/kotlin/org/gamecult/cultmesh/CultMesh.kt b/packages/cultmesh-kotlin/src/main/kotlin/org/gamecult/cultmesh/CultMesh.kt index 104bd1b9..2117c2d8 100644 --- a/packages/cultmesh-kotlin/src/main/kotlin/org/gamecult/cultmesh/CultMesh.kt +++ b/packages/cultmesh-kotlin/src/main/kotlin/org/gamecult/cultmesh/CultMesh.kt @@ -1359,7 +1359,7 @@ fun defineCultNetSchemaDescriptor( schemaJson = schemaJson, ) -private const val cultNetSchemaBase = "https://github.com/GameCult/cultnet-ts/contracts" +private const val cultNetSchemaBase = "https://github.com/GameCult/CultLib/contracts/cultnet" private data class CultNetBuiltInSchemaSpec( val schemaVersion: String, @@ -1377,58 +1377,58 @@ private val cultNetBuiltInSchemaSpecs = listOf( title = "CultNet Hello Message", schemaId = "$cultNetSchemaBase/cultnet.hello.schema.json", requiredFields = listOf("schemaVersion", "runtimeId", "runtimeKind"), - contentHash = "1d2114bf0c92a2dd5e07dd735778ceeb939402c6424550d6d281d9db423f56b3", + contentHash = "f660ef803f293e2882650b3981c6eed835bd8e595c9b880d6c6271e0dcbd79e4", ), CultNetBuiltInSchemaSpec( schemaVersion = "cultnet.document_delete.v0", title = "CultNet Document Delete Message", schemaId = "$cultNetSchemaBase/cultnet.document-delete.schema.json", requiredFields = listOf("schemaVersion", "messageId", "schemaId", "recordKey"), - contentHash = "037f7cf1b30756904e0bfada6bcff486269378997afbe3c4b6fc5c573fc8a4df", + contentHash = "ed7dc202e4f1ebe0d88c5d60c81c53005b44a2557698d3d3c5d2126c01b40f08", ), CultNetBuiltInSchemaSpec( schemaVersion = "cultnet.document_put_raw.v0", title = "CultNet Raw Document Put Message", schemaId = "$cultNetSchemaBase/cultnet.document-put-raw.schema.json", - contentHash = "b61e7e6cce8508653fbeccc4d956ef211c853a174d67c7e1903ce294e15985a2", + contentHash = "34b61b14b49cfc887728673f08aa0f33df7ccd401e79c77d3bc324c72e547177", ), CultNetBuiltInSchemaSpec( schemaVersion = "cultnet.snapshot_request.v0", title = "CultNet Snapshot Request Message", schemaId = "$cultNetSchemaBase/cultnet.snapshot-request.schema.json", - contentHash = "9f6546f51a1aab85978554e6908d7a59e96b3329feff7b35022be210495dd721", + contentHash = "05267d9b5eb450d4aa8979179f74ba3aec2f3a82fead7ba4a16ab5462c7750fa", ), CultNetBuiltInSchemaSpec( schemaVersion = "cultnet.snapshot_response_raw.v0", title = "CultNet Raw Snapshot Response Message", schemaId = "$cultNetSchemaBase/cultnet.snapshot-response-raw.schema.json", - contentHash = "0dbca3338a3ae5d4011aed2c973c75b9b47b6b9dfc0874459ac56da01fef4582", + contentHash = "fdefbdf5d6b0844dd0eabe2c7430d054295d78e41289f96b227dc39f4aab78b9", ), CultNetBuiltInSchemaSpec( schemaVersion = "cultnet.schema_catalog_request.v0", title = "CultNet Schema Catalog Request Message", schemaId = "$cultNetSchemaBase/cultnet.schema-catalog-request.schema.json", wireContracts = listOf("cultnet.schema.v0", "gamecult.networking.v0"), - contentHash = "bdd49b44428daf24b514c521e53027ec944aecfebb39ca0d10967661c303e096", + contentHash = "ed6d63e29de2d492bb831f030b26ff49ba6883cd2be791ec4936c385f765c76a", ), CultNetBuiltInSchemaSpec( schemaVersion = "cultnet.schema_catalog_response.v0", title = "CultNet Schema Catalog Response Message", schemaId = "$cultNetSchemaBase/cultnet.schema-catalog-response.schema.json", wireContracts = listOf("cultnet.schema.v0", "gamecult.networking.v0"), - contentHash = "b158de53d1ca614eacf2e05767122fb4b9e06504c037ad76c649cffdf71dd648", + contentHash = "10b4835d33181fe4b93a33e39b63886c5514899e93682de786e298f7e4a213e9", ), CultNetBuiltInSchemaSpec( schemaVersion = "cultnet.shard_catalog_request.v0", title = "CultNet Shard Catalog Request Message", - schemaId = "cultnet.shard_catalog_request.v0", - contentHash = "0abd131a1db12f6731010333b86e104d550160bd58f539b18413a2b61198fa38", + schemaId = "$cultNetSchemaBase/cultnet.shard-catalog-request.schema.json", + contentHash = "b4edecd8a24f68ebccf0aca9b429d234618ff7e8858a10123d0b328aeae7eb3f", ), CultNetBuiltInSchemaSpec( schemaVersion = "cultnet.shard_catalog_response.v0", title = "CultNet Shard Catalog Response Message", - schemaId = "cultnet.shard_catalog_response.v0", - contentHash = "93a0e90ac81bc6ab21b68925ad25e381edfac8773232333679d3275141cff37b", + schemaId = "$cultNetSchemaBase/cultnet.shard-catalog-response.schema.json", + contentHash = "d86a94c57d7820483912b8b5cef6214ac951d34cb2641d2d21dcb1f1bc0263c0", ), CultNetBuiltInSchemaSpec( schemaVersion = "cultnet.shard_log_request.v0", @@ -1468,7 +1468,7 @@ private val cultNetBuiltInSchemaSpecs = listOf( schemaId = "$cultNetSchemaBase/cultnet.transport-profile.schema.json", kind = "shared_contract", requiredFields = listOf("schemaVersion", "runtimeId", "transports"), - contentHash = "84473264f543ca3443267999e43d72b7993b61b7b2ac53c642c9cbe8b6de0217", + contentHash = "63dfd484e1fd332c167caadf52cb5b4fe12d5ffea4415206c3ef111c196507aa", ), ) @@ -3717,16 +3717,16 @@ private fun cultNetReconnectControllerSchedulesAttemptsAndReset() { private const val interopDocumentType = "cultnet.interop-note" private const val interopSchemaVersion = "cultnet.interop_note.v0" private const val interopMutationIntentType = "cultnet.interop-note-mutation-intent" -private const val interopMutationIntentSchemaId = "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.interop-note-mutation-intent.schema.json" +private const val interopMutationIntentSchemaId = "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.interop-note-mutation-intent.schema.json" private const val interopMutationIntentSchemaVersion = "cultnet.interop_note_mutation_intent.v0" private const val interopMutationReceiptType = "cultnet.interop-note-mutation-receipt" -private const val interopMutationReceiptSchemaId = "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.interop-note-mutation-receipt.schema.json" +private const val interopMutationReceiptSchemaId = "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.interop-note-mutation-receipt.schema.json" private const val interopMutationReceiptSchemaVersion = "cultnet.interop_note_mutation_receipt.v0" private const val interopFireCommandType = "cultnet.interop-fire-weapon-command" -private const val interopFireCommandSchemaId = "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.interop-fire-weapon-command.schema.json" +private const val interopFireCommandSchemaId = "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.interop-fire-weapon-command.schema.json" private const val interopFireCommandSchemaVersion = "cultnet.interop_fire_weapon_command.v0" private const val interopFireReceiptType = "cultnet.interop-fire-weapon-receipt" -private const val interopFireReceiptSchemaId = "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.interop-fire-weapon-receipt.schema.json" +private const val interopFireReceiptSchemaId = "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.interop-fire-weapon-receipt.schema.json" private const val interopFireReceiptSchemaVersion = "cultnet.interop_fire_weapon_receipt.v0" private const val rudpInteropConnectionId = 0x43554c54L private const val rudpInteropMaxFragmentBytes = 1024 @@ -4627,11 +4627,11 @@ private fun cultNetBuiltInSchemaCatalogAdvertisesWireContracts() { check(schemaCatalogRequest["wireContracts"] == listOf("cultnet.schema.v0", "gamecult.networking.v0")) check(!schemaCatalogRequest.containsKey("schemaJson")) val shardCatalogRequest = schemas.single { it["schemaVersion"] == "cultnet.shard_catalog_request.v0" } - check(shardCatalogRequest["schemaId"] == "cultnet.shard_catalog_request.v0") + check(shardCatalogRequest["schemaId"] == "$cultNetSchemaBase/cultnet.shard-catalog-request.schema.json") check(shardCatalogRequest["wireContracts"] == listOf("cultnet.schema.v0")) - check(shardCatalogRequest["contentHash"] == "0abd131a1db12f6731010333b86e104d550160bd58f539b18413a2b61198fa38") + check(shardCatalogRequest["contentHash"] == "b4edecd8a24f68ebccf0aca9b429d234618ff7e8858a10123d0b328aeae7eb3f") val shardCatalogResponse = schemas.single { it["schemaVersion"] == "cultnet.shard_catalog_response.v0" } - check(shardCatalogResponse["schemaId"] == "cultnet.shard_catalog_response.v0") + check(shardCatalogResponse["schemaId"] == "$cultNetSchemaBase/cultnet.shard-catalog-response.schema.json") check(shardCatalogResponse["wireContracts"] == listOf("cultnet.schema.v0")) val inlineCatalog = cultNetBuiltInSchemaCatalog(includeSchemaJson = true) @@ -4644,7 +4644,7 @@ private fun cultNetBuiltInSchemaCatalogAdvertisesWireContracts() { ) val transportProfile = mapList(transportResponse.body["schemas"]).single() check(transportProfile["kind"] == "shared_contract") - check(transportProfile["contentHash"] == "84473264f543ca3443267999e43d72b7993b61b7b2ac53c642c9cbe8b6de0217") + check(transportProfile["contentHash"] == "63dfd484e1fd332c167caadf52cb5b4fe12d5ffea4415206c3ef111c196507aa") check(!transportProfile.containsKey("schemaJson")) val filteredTransportCatalog = CultMesh.createBuiltInSchemaCatalog( diff --git a/packages/cultmesh-py/tests/test_cultmesh.py b/packages/cultmesh-py/tests/test_cultmesh.py index b6a21bb8..8cb2801f 100644 --- a/packages/cultmesh-py/tests/test_cultmesh.py +++ b/packages/cultmesh-py/tests/test_cultmesh.py @@ -1759,11 +1759,11 @@ class CultMeshTests(unittest.TestCase): ) self.assertEqual( builtins.list()[0].schema_id, - "https://github.com/GameCult/cultnet-ts/contracts/cultnet.transport-profile.schema.json", + "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.transport-profile.schema.json", ) self.assertIsNone(builtins.list()[0].schema_json) peer_exchange_schema_id = ( - "https://github.com/GameCult/cultnet-ts/contracts/cultmesh.peer-exchange-request.schema.json" + "https://github.com/GameCult/CultLib/contracts/cultnet/cultmesh.peer-exchange-request.schema.json" ) filtered_builtin = CultMesh.create_builtin_schema_catalog( include_schema_json=True, @@ -4033,7 +4033,7 @@ class CultMeshTests(unittest.TestCase): self.assertIn("cultmesh.peer_exchange_response.v0", wire_descriptors) self.assertIn("cultnet.error.v0", {descriptor.schema_version for descriptor in synced_wire_descriptors}) self.assertIn("cultnet.document_put_raw.v0", {descriptor.schema_version for descriptor in synced_wire_descriptors}) - self.assertIsNotNone(synced_schema_catalog.get("https://github.com/GameCult/cultnet-ts/contracts/cultnet.document-put-raw.schema.json")) + self.assertIsNotNone(synced_schema_catalog.get("https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.document-put-raw.schema.json")) self.assertEqual(snapshot_response["documents"][0]["recordKey"], "note:1") self.assertEqual(typed_snapshot_response.documents[0].record_key, "note:1") self.assertEqual(typed_snapshot_response.documents[0].schema_id, "mesh.server_note.v1") diff --git a/packages/cultmesh-ts/test/cultmesh.test.ts b/packages/cultmesh-ts/test/cultmesh.test.ts index 16d51e1e..77bd635c 100644 --- a/packages/cultmesh-ts/test/cultmesh.test.ts +++ b/packages/cultmesh-ts/test/cultmesh.test.ts @@ -2509,7 +2509,7 @@ test("CultMesh TS branded facade exposes schema and shard catalogs", () => { ); assert.equal( builtIns.get( - "https://github.com/GameCult/cultnet-ts/contracts/cultnet.transport-profile.schema.json", + "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.transport-profile.schema.json", )?.schemaVersion, "cultnet.transport_profile.v0", ); diff --git a/packages/cultnet-py/src/cultnet_py/interop_peer.py b/packages/cultnet-py/src/cultnet_py/interop_peer.py index ca3c692d..2eaaf0ac 100644 --- a/packages/cultnet-py/src/cultnet_py/interop_peer.py +++ b/packages/cultnet-py/src/cultnet_py/interop_peer.py @@ -55,19 +55,19 @@ from .transport import ( INTEROP_DOCUMENT_TYPE = "cultnet.interop-note" INTEROP_SCHEMA_VERSION = "cultnet.interop_note.v0" INTEROP_MUTATION_INTENT_DOCUMENT_TYPE = "cultnet.interop-note-mutation-intent" -INTEROP_MUTATION_INTENT_SCHEMA_ID = "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.interop-note-mutation-intent.schema.json" +INTEROP_MUTATION_INTENT_SCHEMA_ID = "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.interop-note-mutation-intent.schema.json" INTEROP_MUTATION_INTENT_SCHEMA_VERSION = "cultnet.interop_note_mutation_intent.v0" INTEROP_MUTATION_RECEIPT_DOCUMENT_TYPE = "cultnet.interop-note-mutation-receipt" -INTEROP_MUTATION_RECEIPT_SCHEMA_ID = "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.interop-note-mutation-receipt.schema.json" +INTEROP_MUTATION_RECEIPT_SCHEMA_ID = "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.interop-note-mutation-receipt.schema.json" INTEROP_MUTATION_RECEIPT_SCHEMA_VERSION = "cultnet.interop_note_mutation_receipt.v0" INTEROP_FIRE_COMMAND_DOCUMENT_TYPE = "cultnet.interop-fire-weapon-command" -INTEROP_FIRE_COMMAND_SCHEMA_ID = "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.interop-fire-weapon-command.schema.json" +INTEROP_FIRE_COMMAND_SCHEMA_ID = "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.interop-fire-weapon-command.schema.json" INTEROP_FIRE_COMMAND_SCHEMA_VERSION = "cultnet.interop_fire_weapon_command.v0" INTEROP_FIRE_RECEIPT_DOCUMENT_TYPE = "cultnet.interop-fire-weapon-receipt" -INTEROP_FIRE_RECEIPT_SCHEMA_ID = "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.interop-fire-weapon-receipt.schema.json" +INTEROP_FIRE_RECEIPT_SCHEMA_ID = "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.interop-fire-weapon-receipt.schema.json" INTEROP_FIRE_RECEIPT_SCHEMA_VERSION = "cultnet.interop_fire_weapon_receipt.v0" WITNESS_ARTIFACT_BUNDLE_DOCUMENT_TYPE = "cultnet.witness_artifact_bundle" -WITNESS_ARTIFACT_BUNDLE_SCHEMA_ID = "https://github.com/GameCult/cultnet-ts/contracts/cultnet.witness-artifact-bundle.schema.json" +WITNESS_ARTIFACT_BUNDLE_SCHEMA_ID = "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.witness-artifact-bundle.schema.json" WITNESS_ARTIFACT_BUNDLE_SCHEMA_VERSION = "cultnet.witness_artifact_bundle.v0" SIMULATION_FACT_SCHEMA_ID = simulation_fact_document.catalog_entry().schema_id DISCOVERY_PROBE_SCHEMA_VERSION = "cultnet.discovery_probe.v0" diff --git a/packages/cultnet-py/src/cultnet_py/schema_catalog.py b/packages/cultnet-py/src/cultnet_py/schema_catalog.py index 1471ef4e..6d71b3cd 100644 --- a/packages/cultnet-py/src/cultnet_py/schema_catalog.py +++ b/packages/cultnet-py/src/cultnet_py/schema_catalog.py @@ -6,7 +6,7 @@ from dataclasses import dataclass, field from typing import Any INTEROP_WIRE_CONTRACT = "cultnet.schema.v0" -CULTNET_SCHEMA_BASE = "https://github.com/GameCult/cultnet-ts/contracts" +CULTNET_SCHEMA_BASE = "https://github.com/GameCult/CultLib/contracts/cultnet" VERSE_CATALOG_REQUEST = "cultmesh.verse_catalog_request.v0" PEER_EXCHANGE_REQUEST = "cultmesh.peer_exchange_request.v0" TRANSPORT_PROFILE_SCHEMA_VERSION = "cultnet.transport_profile.v0" diff --git a/packages/cultnet-py/tests/test_cultnet.py b/packages/cultnet-py/tests/test_cultnet.py index 171a34b9..4c57f42b 100644 --- a/packages/cultnet-py/tests/test_cultnet.py +++ b/packages/cultnet-py/tests/test_cultnet.py @@ -1677,7 +1677,7 @@ class CultNetTests(unittest.TestCase): self.assertIn("operations", mutation_contract["properties"]) self.assertEqual( hello_schema["properties"]["transportProfiles"]["items"]["$ref"], - "https://github.com/GameCult/cultnet-ts/contracts/cultnet.transport-profile.schema.json", + "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.transport-profile.schema.json", ) consensus_schema = json.loads(by_version["cultnet.simulation_consensus_candidate.v0"]["schemaJson"]) @@ -1686,7 +1686,7 @@ class CultNetTests(unittest.TestCase): def test_cultnet_schema_catalog_applies_filters_and_responses(self) -> None: catalog = wire_message_schema_catalog(include_schema_json=True) - descriptor = catalog.get("https://github.com/GameCult/cultnet-ts/contracts/cultnet.document-put-raw.schema.json") + descriptor = catalog.get("https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.document-put-raw.schema.json") self.assertIsNotNone(descriptor) assert descriptor is not None self.assertEqual(descriptor.kind, "wire_message") @@ -1902,7 +1902,7 @@ class CultNetTests(unittest.TestCase): runtime_kind="python", display_name="Python Interop Test", agent_id="python-interop-test-agent", - schema_path=str(Path("packages/cultnet-ts/integration/contracts/cultnet.interop-note.schema.json")), + schema_path=str(Path("contracts/cultnet/interop/cultnet.interop-note.schema.json")), ) binding = state.bindings["note"] logged_value = { diff --git a/packages/cultnet-rs/contracts/cultnet.document-mutation-contract.schema.json b/packages/cultnet-rs/contracts/cultnet.document-mutation-contract.schema.json deleted file mode 100644 index e444fef0..00000000 --- a/packages/cultnet-rs/contracts/cultnet.document-mutation-contract.schema.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.document-mutation-contract.schema.json", - "title": "CultNet Document Mutation Contract", - "type": "object", - "required": [ - "documentType", - "operations", - "authority" - ], - "additionalProperties": false, - "properties": { - "documentType": { "type": "string", "minLength": 1 }, - "payloadSchemaVersion": { "type": "string", "minLength": 1 }, - "operations": { - "type": "array", - "minItems": 1, - "items": { - "type": "string", - "enum": ["snapshot", "documentPut", "documentDelete", "intentSubmit", "receiptWatch"] - } - }, - "authority": { - "type": "string", - "enum": ["readOnly", "localUser", "coordinator", "runtime", "denied"] - }, - "intentDocumentTypes": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - }, - "receiptDocumentTypes": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - }, - "notes": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - } - } -} diff --git a/packages/cultnet-rs/contracts/cultnet.document-put-raw.schema.json b/packages/cultnet-rs/contracts/cultnet.document-put-raw.schema.json deleted file mode 100644 index 3c178d03..00000000 --- a/packages/cultnet-rs/contracts/cultnet.document-put-raw.schema.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.document-put-raw.schema.json", - "title": "CultNet Raw Document Put Message", - "type": "object", - "required": [ - "schemaVersion", - "messageId", - "document" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.document_put_raw.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "document": { - "$ref": "./cultnet.raw-document-record.schema.json" - } - } -} diff --git a/packages/cultnet-rs/contracts/cultnet.document-put.schema.json b/packages/cultnet-rs/contracts/cultnet.document-put.schema.json deleted file mode 100644 index a04f5fca..00000000 --- a/packages/cultnet-rs/contracts/cultnet.document-put.schema.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.document-put.schema.json", - "title": "CultNet Document Put Message", - "type": "object", - "required": [ - "schemaVersion", - "messageId", - "document" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.document_put.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "document": { - "$ref": "./cultnet.document-record.schema.json" - } - } -} diff --git a/packages/cultnet-rs/contracts/cultnet.document-record.schema.json b/packages/cultnet-rs/contracts/cultnet.document-record.schema.json deleted file mode 100644 index 94301dc5..00000000 --- a/packages/cultnet-rs/contracts/cultnet.document-record.schema.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.document-record.schema.json", - "title": "CultNet Document Record", - "type": "object", - "required": [ - "schemaId", - "recordKey", - "storedAt", - "payload" - ], - "additionalProperties": false, - "properties": { - "schemaId": { "type": "string", "minLength": 1 }, - "recordKey": { "type": "string", "minLength": 1 }, - "storedAt": { "type": "string", "minLength": 1 }, - "payload": {}, - "sourceRuntimeId": { "type": "string", "minLength": 1 }, - "sourceAgentId": { "type": "string", "minLength": 1 }, - "sourceRole": { "type": "string", "minLength": 1 }, - "tags": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - } - } -} diff --git a/packages/cultnet-rs/contracts/cultnet.error.schema.json b/packages/cultnet-rs/contracts/cultnet.error.schema.json deleted file mode 100644 index af6da9cf..00000000 --- a/packages/cultnet-rs/contracts/cultnet.error.schema.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.error.schema.json", - "title": "CultNet Error Message", - "type": "object", - "required": [ - "schemaVersion", - "error" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.error.v0" }, - "error": { "type": "string", "minLength": 1 } - } -} diff --git a/packages/cultnet-rs/contracts/cultnet.hello.schema.json b/packages/cultnet-rs/contracts/cultnet.hello.schema.json deleted file mode 100644 index a557dc3f..00000000 --- a/packages/cultnet-rs/contracts/cultnet.hello.schema.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.hello.schema.json", - "title": "CultNet Hello Message", - "type": "object", - "required": [ - "schemaVersion", - "runtimeId", - "runtimeKind" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.hello.v0" }, - "runtimeId": { "type": "string", "minLength": 1 }, - "runtimeKind": { "type": "string", "minLength": 1 }, - "agentId": { "type": "string", "minLength": 1 }, - "role": { "type": "string", "minLength": 1 }, - "displayName": { "type": "string", "minLength": 1 }, - "supportedDocumentTypes": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - }, - "supportedMutationContracts": { - "type": "array", - "items": { - "$ref": "./cultnet.document-mutation-contract.schema.json" - } - }, - "supportedMessageVersions": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - }, - "transportProfiles": { - "type": "array", - "items": { - "$ref": "./cultnet.transport-profile.schema.json" - } - }, - "supportsSchemaCatalog": { "type": "boolean" } - } -} diff --git a/packages/cultnet-rs/contracts/cultnet.login.schema.json b/packages/cultnet-rs/contracts/cultnet.login.schema.json deleted file mode 100644 index 62f49599..00000000 --- a/packages/cultnet-rs/contracts/cultnet.login.schema.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.login.schema.json", - "title": "CultNet Login Message", - "type": "object", - "required": [ - "schemaVersion", - "nonce", - "auth", - "password" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.login.v0" }, - "nonce": { "type": "string", "minLength": 1 }, - "auth": { "type": "string", "minLength": 1 }, - "password": { "type": "string", "minLength": 1 } - } -} diff --git a/packages/cultnet-rs/contracts/cultnet.raw-document-record.schema.json b/packages/cultnet-rs/contracts/cultnet.raw-document-record.schema.json deleted file mode 100644 index 3348a5fa..00000000 --- a/packages/cultnet-rs/contracts/cultnet.raw-document-record.schema.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.raw-document-record.schema.json", - "title": "CultNet Raw Document Record", - "type": "object", - "required": [ - "schemaId", - "recordKey", - "storedAt", - "payloadEncoding", - "payload" - ], - "additionalProperties": false, - "properties": { - "schemaId": { "type": "string", "minLength": 1 }, - "recordKey": { "type": "string", "minLength": 1 }, - "storedAt": { "type": "string", "minLength": 1 }, - "payloadEncoding": { "const": "messagepack" }, - "payload": { - "type": "string", - "contentEncoding": "base64", - "x-cult-runtime-type": "bytes" - }, - "sourceRuntimeId": { "type": "string", "minLength": 1 }, - "sourceAgentId": { "type": "string", "minLength": 1 }, - "sourceRole": { "type": "string", "minLength": 1 }, - "tags": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - } - } -} diff --git a/packages/cultnet-rs/contracts/cultnet.register.schema.json b/packages/cultnet-rs/contracts/cultnet.register.schema.json deleted file mode 100644 index 77286f3e..00000000 --- a/packages/cultnet-rs/contracts/cultnet.register.schema.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.register.schema.json", - "title": "CultNet Register Message", - "type": "object", - "required": [ - "schemaVersion", - "nonce", - "email", - "password", - "name" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.register.v0" }, - "nonce": { "type": "string", "minLength": 1 }, - "email": { "type": "string", "minLength": 1 }, - "password": { "type": "string", "minLength": 1 }, - "name": { "type": "string", "minLength": 1 } - } -} diff --git a/packages/cultnet-rs/contracts/cultnet.sample-change-name.schema.json b/packages/cultnet-rs/contracts/cultnet.sample-change-name.schema.json deleted file mode 100644 index fc3fe057..00000000 --- a/packages/cultnet-rs/contracts/cultnet.sample-change-name.schema.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.sample-change-name.schema.json", - "title": "CultNet Sample Change Name Message", - "type": "object", - "required": [ - "schemaVersion", - "name" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.sample.change_name.v0" }, - "name": { "type": "string", "minLength": 1 } - } -} diff --git a/packages/cultnet-rs/contracts/cultnet.sample-chat.schema.json b/packages/cultnet-rs/contracts/cultnet.sample-chat.schema.json deleted file mode 100644 index 8426fb57..00000000 --- a/packages/cultnet-rs/contracts/cultnet.sample-chat.schema.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.sample-chat.schema.json", - "title": "CultNet Sample Chat Message", - "type": "object", - "required": [ - "schemaVersion", - "text" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.sample.chat.v0" }, - "text": { "type": "string", "minLength": 1 } - } -} diff --git a/packages/cultnet-rs/contracts/cultnet.schema-catalog-response.schema.json b/packages/cultnet-rs/contracts/cultnet.schema-catalog-response.schema.json deleted file mode 100644 index fa371e48..00000000 --- a/packages/cultnet-rs/contracts/cultnet.schema-catalog-response.schema.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.schema-catalog-response.schema.json", - "title": "CultNet Schema Catalog Response Message", - "type": "object", - "required": [ - "schemaVersion", - "messageId", - "schemas" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.schema_catalog_response.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "schemas": { - "type": "array", - "items": { - "$ref": "./cultnet.schema-descriptor.schema.json" - } - } - } -} diff --git a/packages/cultnet-rs/contracts/cultnet.schema-descriptor.schema.json b/packages/cultnet-rs/contracts/cultnet.schema-descriptor.schema.json deleted file mode 100644 index 23796857..00000000 --- a/packages/cultnet-rs/contracts/cultnet.schema-descriptor.schema.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.schema-descriptor.schema.json", - "title": "CultNet Schema Descriptor", - "type": "object", - "required": [ - "schemaId", - "kind", - "wireContracts", - "contentHash" - ], - "additionalProperties": false, - "properties": { - "schemaId": { "type": "string", "minLength": 1 }, - "kind": { - "type": "string", - "enum": [ - "wire_message", - "document_payload", - "shared_contract" - ] - }, - "schemaVersion": { "type": "string", "minLength": 1 }, - "documentType": { "type": "string", "minLength": 1 }, - "title": { "type": "string", "minLength": 1 }, - "wireContracts": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "cultnet.schema.v0", - "gamecult.networking.v0" - ] - } - }, - "contentHash": { "type": "string", "minLength": 1 }, - "schemaJson": { "type": "string", "minLength": 1 } - } -} diff --git a/packages/cultnet-rs/contracts/cultnet.shard-catalog-request.schema.json b/packages/cultnet-rs/contracts/cultnet.shard-catalog-request.schema.json deleted file mode 100644 index c91ee09b..00000000 --- a/packages/cultnet-rs/contracts/cultnet.shard-catalog-request.schema.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "cultnet.shard_catalog_request.v0", - "type": "object", - "required": ["schemaVersion", "messageId"], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.shard_catalog_request.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "schemaIds": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - }, - "recordKeys": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - } - } -} diff --git a/packages/cultnet-rs/contracts/cultnet.snapshot-request.schema.json b/packages/cultnet-rs/contracts/cultnet.snapshot-request.schema.json deleted file mode 100644 index 712d7059..00000000 --- a/packages/cultnet-rs/contracts/cultnet.snapshot-request.schema.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.snapshot-request.schema.json", - "title": "CultNet Snapshot Request Message", - "type": "object", - "required": [ - "schemaVersion", - "messageId" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.snapshot_request.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "schemaIds": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - }, - "recordKeys": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - } - } -} diff --git a/packages/cultnet-rs/contracts/cultnet.snapshot-response.schema.json b/packages/cultnet-rs/contracts/cultnet.snapshot-response.schema.json deleted file mode 100644 index 940822ce..00000000 --- a/packages/cultnet-rs/contracts/cultnet.snapshot-response.schema.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.snapshot-response.schema.json", - "title": "CultNet Snapshot Response Message", - "type": "object", - "required": [ - "schemaVersion", - "messageId", - "documents" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.snapshot_response.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "documents": { - "type": "array", - "items": { - "$ref": "./cultnet.document-record.schema.json" - } - } - } -} diff --git a/packages/cultnet-rs/contracts/cultnet.verify.schema.json b/packages/cultnet-rs/contracts/cultnet.verify.schema.json deleted file mode 100644 index 1f992aa8..00000000 --- a/packages/cultnet-rs/contracts/cultnet.verify.schema.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.verify.schema.json", - "title": "CultNet Verify Message", - "type": "object", - "required": [ - "schemaVersion", - "nonce", - "session" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.verify.v0" }, - "nonce": { "type": "string", "minLength": 1 }, - "session": { "type": "string", "minLength": 1 } - } -} diff --git a/packages/cultnet-rs/examples/cultnet_interop_peer.rs b/packages/cultnet-rs/examples/cultnet_interop_peer.rs index 562756b8..ad8d6fb9 100644 --- a/packages/cultnet-rs/examples/cultnet_interop_peer.rs +++ b/packages/cultnet-rs/examples/cultnet_interop_peer.rs @@ -55,16 +55,16 @@ use std::time::Instant; const INTEROP_DOCUMENT_TYPE: &str = "cultnet.interop-note"; const INTEROP_SCHEMA_VERSION: &str = "cultnet.interop_note.v0"; const MUTATION_INTENT_TYPE: &str = "cultnet.interop-note-mutation-intent"; -const MUTATION_INTENT_SCHEMA_ID: &str = "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.interop-note-mutation-intent.schema.json"; +const MUTATION_INTENT_SCHEMA_ID: &str = "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.interop-note-mutation-intent.schema.json"; const MUTATION_INTENT_SCHEMA_VERSION: &str = "cultnet.interop_note_mutation_intent.v0"; const MUTATION_RECEIPT_TYPE: &str = "cultnet.interop-note-mutation-receipt"; -const MUTATION_RECEIPT_SCHEMA_ID: &str = "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.interop-note-mutation-receipt.schema.json"; +const MUTATION_RECEIPT_SCHEMA_ID: &str = "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.interop-note-mutation-receipt.schema.json"; const MUTATION_RECEIPT_SCHEMA_VERSION: &str = "cultnet.interop_note_mutation_receipt.v0"; const FIRE_COMMAND_TYPE: &str = "cultnet.interop-fire-weapon-command"; -const FIRE_COMMAND_SCHEMA_ID: &str = "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.interop-fire-weapon-command.schema.json"; +const FIRE_COMMAND_SCHEMA_ID: &str = "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.interop-fire-weapon-command.schema.json"; const FIRE_COMMAND_SCHEMA_VERSION: &str = "cultnet.interop_fire_weapon_command.v0"; const FIRE_RECEIPT_TYPE: &str = "cultnet.interop-fire-weapon-receipt"; -const FIRE_RECEIPT_SCHEMA_ID: &str = "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.interop-fire-weapon-receipt.schema.json"; +const FIRE_RECEIPT_SCHEMA_ID: &str = "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.interop-fire-weapon-receipt.schema.json"; const FIRE_RECEIPT_SCHEMA_VERSION: &str = "cultnet.interop_fire_weapon_receipt.v0"; const DISCOVERY_ANNOUNCE_SCHEMA_VERSION: &str = "cultnet.discovery_announce.v0"; const RUDP_INTEROP_CONNECTION_ID: u32 = 0x43554C54; diff --git a/packages/cultnet-rs/src/schema_discovery.rs b/packages/cultnet-rs/src/schema_discovery.rs index 272323ba..a32bc7cb 100644 --- a/packages/cultnet-rs/src/schema_discovery.rs +++ b/packages/cultnet-rs/src/schema_discovery.rs @@ -194,28 +194,28 @@ pub fn builtin_schema_registry() -> Result { for registration in [ schema_registration( - include_str!("../contracts/cultnet.hello.schema.json"), + include_str!("../../../contracts/cultnet/cultnet.hello.schema.json"), CultNetSchemaKind::WireMessage, vec![CultNetWireContract::CultNetSchemaV0], Some("cultnet.hello.v0"), None, )?, schema_registration( - include_str!("../contracts/cultnet.document-mutation-contract.schema.json"), + include_str!("../../../contracts/cultnet/cultnet.document-mutation-contract.schema.json"), CultNetSchemaKind::SharedContract, vec![CultNetWireContract::CultNetSchemaV0], None, None, )?, schema_registration( - include_str!("../contracts/cultnet.transport-profile.schema.json"), + include_str!("../../../contracts/cultnet/cultnet.transport-profile.schema.json"), CultNetSchemaKind::SharedContract, vec![CultNetWireContract::CultNetSchemaV0], Some("cultnet.transport_profile.v0"), None, )?, schema_registration( - include_str!("../contracts/cultnet.login.schema.json"), + include_str!("../../../contracts/cultnet/cultnet.login.schema.json"), CultNetSchemaKind::WireMessage, vec![ CultNetWireContract::CultNetSchemaV0, @@ -225,7 +225,7 @@ pub fn builtin_schema_registry() -> Result { None, )?, schema_registration( - include_str!("../contracts/cultnet.register.schema.json"), + include_str!("../../../contracts/cultnet/cultnet.register.schema.json"), CultNetSchemaKind::WireMessage, vec![ CultNetWireContract::CultNetSchemaV0, @@ -235,7 +235,7 @@ pub fn builtin_schema_registry() -> Result { None, )?, schema_registration( - include_str!("../contracts/cultnet.verify.schema.json"), + include_str!("../../../contracts/cultnet/cultnet.verify.schema.json"), CultNetSchemaKind::WireMessage, vec![ CultNetWireContract::CultNetSchemaV0, @@ -245,7 +245,7 @@ pub fn builtin_schema_registry() -> Result { None, )?, schema_registration( - include_str!("../contracts/cultnet.login-success.schema.json"), + include_str!("../../../contracts/cultnet/cultnet.login-success.schema.json"), CultNetSchemaKind::WireMessage, vec![ CultNetWireContract::CultNetSchemaV0, @@ -255,7 +255,7 @@ pub fn builtin_schema_registry() -> Result { None, )?, schema_registration( - include_str!("../contracts/cultnet.error.schema.json"), + include_str!("../../../contracts/cultnet/cultnet.error.schema.json"), CultNetSchemaKind::WireMessage, vec![ CultNetWireContract::CultNetSchemaV0, @@ -265,7 +265,7 @@ pub fn builtin_schema_registry() -> Result { None, )?, schema_registration( - include_str!("../contracts/cultnet.sample-change-name.schema.json"), + include_str!("../../../contracts/cultnet/cultnet.sample-change-name.schema.json"), CultNetSchemaKind::WireMessage, vec![ CultNetWireContract::CultNetSchemaV0, @@ -275,7 +275,7 @@ pub fn builtin_schema_registry() -> Result { None, )?, schema_registration( - include_str!("../contracts/cultnet.sample-chat.schema.json"), + include_str!("../../../contracts/cultnet/cultnet.sample-chat.schema.json"), CultNetSchemaKind::WireMessage, vec![ CultNetWireContract::CultNetSchemaV0, @@ -285,56 +285,56 @@ pub fn builtin_schema_registry() -> Result { None, )?, schema_registration( - include_str!("../contracts/cultnet.document-put.schema.json"), + include_str!("../../../contracts/cultnet/cultnet.document-put.schema.json"), CultNetSchemaKind::WireMessage, vec![CultNetWireContract::CultNetSchemaV0], Some("cultnet.document_put.v0"), None, )?, schema_registration( - include_str!("../contracts/cultnet.document-delete.schema.json"), + include_str!("../../../contracts/cultnet/cultnet.document-delete.schema.json"), CultNetSchemaKind::WireMessage, vec![CultNetWireContract::CultNetSchemaV0], Some("cultnet.document_delete.v0"), None, )?, schema_registration( - include_str!("../contracts/cultnet.raw-document-record.schema.json"), + include_str!("../../../contracts/cultnet/cultnet.raw-document-record.schema.json"), CultNetSchemaKind::SharedContract, vec![CultNetWireContract::CultNetSchemaV0], None, None, )?, schema_registration( - include_str!("../contracts/cultnet.document-put-raw.schema.json"), + include_str!("../../../contracts/cultnet/cultnet.document-put-raw.schema.json"), CultNetSchemaKind::WireMessage, vec![CultNetWireContract::CultNetSchemaV0], Some("cultnet.document_put_raw.v0"), None, )?, schema_registration( - include_str!("../contracts/cultnet.snapshot-request.schema.json"), + include_str!("../../../contracts/cultnet/cultnet.snapshot-request.schema.json"), CultNetSchemaKind::WireMessage, vec![CultNetWireContract::CultNetSchemaV0], Some("cultnet.snapshot_request.v0"), None, )?, schema_registration( - include_str!("../contracts/cultnet.snapshot-response.schema.json"), + include_str!("../../../contracts/cultnet/cultnet.snapshot-response.schema.json"), CultNetSchemaKind::WireMessage, vec![CultNetWireContract::CultNetSchemaV0], Some("cultnet.snapshot_response.v0"), None, )?, schema_registration( - include_str!("../contracts/cultnet.snapshot-response-raw.schema.json"), + include_str!("../../../contracts/cultnet/cultnet.snapshot-response-raw.schema.json"), CultNetSchemaKind::WireMessage, vec![CultNetWireContract::CultNetSchemaV0], Some("cultnet.snapshot_response_raw.v0"), None, )?, schema_registration( - include_str!("../contracts/cultnet.schema-catalog-request.schema.json"), + include_str!("../../../contracts/cultnet/cultnet.schema-catalog-request.schema.json"), CultNetSchemaKind::WireMessage, vec![ CultNetWireContract::CultNetSchemaV0, @@ -344,7 +344,7 @@ pub fn builtin_schema_registry() -> Result { None, )?, schema_registration( - include_str!("../contracts/cultnet.schema-catalog-response.schema.json"), + include_str!("../../../contracts/cultnet/cultnet.schema-catalog-response.schema.json"), CultNetSchemaKind::WireMessage, vec![ CultNetWireContract::CultNetSchemaV0, @@ -354,21 +354,21 @@ pub fn builtin_schema_registry() -> Result { None, )?, schema_registration( - include_str!("../contracts/cultnet.shard-catalog-request.schema.json"), + include_str!("../../../contracts/cultnet/cultnet.shard-catalog-request.schema.json"), CultNetSchemaKind::WireMessage, vec![CultNetWireContract::CultNetSchemaV0], Some("cultnet.shard_catalog_request.v0"), None, )?, schema_registration( - include_str!("../contracts/cultnet.shard-catalog-response.schema.json"), + include_str!("../../../contracts/cultnet/cultnet.shard-catalog-response.schema.json"), CultNetSchemaKind::WireMessage, vec![CultNetWireContract::CultNetSchemaV0], Some("cultnet.shard_catalog_response.v0"), None, )?, schema_registration( - include_str!("../contracts/ghostlight.agent-state.schema.json"), + include_str!("../../../contracts/cultnet/ghostlight.agent-state.schema.json"), CultNetSchemaKind::DocumentPayload, vec![CultNetWireContract::CultNetSchemaV0], Some("ghostlight.agent_state.v0"), diff --git a/packages/cultnet-rs/tests/cultnet.rs b/packages/cultnet-rs/tests/cultnet.rs index b3adc7f4..678fb71d 100644 --- a/packages/cultnet-rs/tests/cultnet.rs +++ b/packages/cultnet-rs/tests/cultnet.rs @@ -1759,7 +1759,7 @@ fn cultmesh_facade_exposes_schema_registry_and_shard_catalog_owners() -> Result< }); assert!(shared_contracts.iter().any(|schema| { schema.schema_id - == "https://github.com/GameCult/cultnet-ts/contracts/cultnet.transport-profile.schema.json" + == "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.transport-profile.schema.json" && schema.schema_version.as_deref() == Some("cultnet.transport_profile.v0") })); @@ -2285,7 +2285,7 @@ fn builtin_schema_registry_advertises_canonical_ghostlight_schema_without_inline assert_eq!(transport_profile.kind, CultNetSchemaKind::SharedContract); assert_eq!( transport_profile.schema_id, - "https://github.com/GameCult/cultnet-ts/contracts/cultnet.transport-profile.schema.json" + "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.transport-profile.schema.json" ); assert_eq!( transport_profile.wire_contracts, diff --git a/packages/cultnet-ts/contracts/cultnet.document-delete.schema.json b/packages/cultnet-ts/contracts/cultnet.document-delete.schema.json deleted file mode 100644 index 265bcaf2..00000000 --- a/packages/cultnet-ts/contracts/cultnet.document-delete.schema.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.document-delete.schema.json", - "title": "CultNet Document Delete Message", - "type": "object", - "required": [ - "schemaVersion", - "messageId", - "schemaId", - "recordKey" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.document_delete.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "schemaId": { "type": "string", "minLength": 1 }, - "recordKey": { "type": "string", "minLength": 1 } - } -} diff --git a/packages/cultnet-ts/contracts/cultnet.document-mutation-contract.schema.json b/packages/cultnet-ts/contracts/cultnet.document-mutation-contract.schema.json deleted file mode 100644 index e444fef0..00000000 --- a/packages/cultnet-ts/contracts/cultnet.document-mutation-contract.schema.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.document-mutation-contract.schema.json", - "title": "CultNet Document Mutation Contract", - "type": "object", - "required": [ - "documentType", - "operations", - "authority" - ], - "additionalProperties": false, - "properties": { - "documentType": { "type": "string", "minLength": 1 }, - "payloadSchemaVersion": { "type": "string", "minLength": 1 }, - "operations": { - "type": "array", - "minItems": 1, - "items": { - "type": "string", - "enum": ["snapshot", "documentPut", "documentDelete", "intentSubmit", "receiptWatch"] - } - }, - "authority": { - "type": "string", - "enum": ["readOnly", "localUser", "coordinator", "runtime", "denied"] - }, - "intentDocumentTypes": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - }, - "receiptDocumentTypes": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - }, - "notes": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - } - } -} diff --git a/packages/cultnet-ts/contracts/cultnet.document-put.schema.json b/packages/cultnet-ts/contracts/cultnet.document-put.schema.json deleted file mode 100644 index a04f5fca..00000000 --- a/packages/cultnet-ts/contracts/cultnet.document-put.schema.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.document-put.schema.json", - "title": "CultNet Document Put Message", - "type": "object", - "required": [ - "schemaVersion", - "messageId", - "document" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.document_put.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "document": { - "$ref": "./cultnet.document-record.schema.json" - } - } -} diff --git a/packages/cultnet-ts/contracts/cultnet.document-record.schema.json b/packages/cultnet-ts/contracts/cultnet.document-record.schema.json deleted file mode 100644 index 94301dc5..00000000 --- a/packages/cultnet-ts/contracts/cultnet.document-record.schema.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.document-record.schema.json", - "title": "CultNet Document Record", - "type": "object", - "required": [ - "schemaId", - "recordKey", - "storedAt", - "payload" - ], - "additionalProperties": false, - "properties": { - "schemaId": { "type": "string", "minLength": 1 }, - "recordKey": { "type": "string", "minLength": 1 }, - "storedAt": { "type": "string", "minLength": 1 }, - "payload": {}, - "sourceRuntimeId": { "type": "string", "minLength": 1 }, - "sourceAgentId": { "type": "string", "minLength": 1 }, - "sourceRole": { "type": "string", "minLength": 1 }, - "tags": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - } - } -} diff --git a/packages/cultnet-ts/contracts/cultnet.hello.schema.json b/packages/cultnet-ts/contracts/cultnet.hello.schema.json deleted file mode 100644 index a557dc3f..00000000 --- a/packages/cultnet-ts/contracts/cultnet.hello.schema.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.hello.schema.json", - "title": "CultNet Hello Message", - "type": "object", - "required": [ - "schemaVersion", - "runtimeId", - "runtimeKind" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.hello.v0" }, - "runtimeId": { "type": "string", "minLength": 1 }, - "runtimeKind": { "type": "string", "minLength": 1 }, - "agentId": { "type": "string", "minLength": 1 }, - "role": { "type": "string", "minLength": 1 }, - "displayName": { "type": "string", "minLength": 1 }, - "supportedDocumentTypes": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - }, - "supportedMutationContracts": { - "type": "array", - "items": { - "$ref": "./cultnet.document-mutation-contract.schema.json" - } - }, - "supportedMessageVersions": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - }, - "transportProfiles": { - "type": "array", - "items": { - "$ref": "./cultnet.transport-profile.schema.json" - } - }, - "supportsSchemaCatalog": { "type": "boolean" } - } -} diff --git a/packages/cultnet-ts/contracts/cultnet.login-success.schema.json b/packages/cultnet-ts/contracts/cultnet.login-success.schema.json deleted file mode 100644 index 3d8a4591..00000000 --- a/packages/cultnet-ts/contracts/cultnet.login-success.schema.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.login-success.schema.json", - "title": "CultNet Login Success Message", - "type": "object", - "required": [ - "schemaVersion", - "nonce", - "session" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.login_success.v0" }, - "nonce": { "type": "string", "minLength": 1 }, - "session": { "type": "string", "minLength": 1 } - } -} diff --git a/packages/cultnet-ts/contracts/cultnet.operation-request.schema.json b/packages/cultnet-ts/contracts/cultnet.operation-request.schema.json deleted file mode 100644 index 07cd9d8d..00000000 --- a/packages/cultnet-ts/contracts/cultnet.operation-request.schema.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.operation-request.schema.json", - "title": "CultNet Operation Request", - "type": "object", - "required": ["schemaVersion", "messageId", "serviceId", "operation", "payloadSchema", "payload"], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.operation_request.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "serviceId": { "type": "string", "minLength": 1 }, - "operation": { "type": "string", "minLength": 1 }, - "payloadSchema": { "type": "string", "minLength": 1 }, - "payloadEncoding": { "const": "messagepack-base64" }, - "payload": { "type": "string", "minLength": 1, "contentEncoding": "base64" }, - "sourceRuntimeId": { "type": "string", "minLength": 1 }, - "targetRuntimeId": { "type": "string", "minLength": 1 } - } -} diff --git a/packages/cultnet-ts/contracts/cultnet.raw-document-record.schema.json b/packages/cultnet-ts/contracts/cultnet.raw-document-record.schema.json deleted file mode 100644 index 3348a5fa..00000000 --- a/packages/cultnet-ts/contracts/cultnet.raw-document-record.schema.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.raw-document-record.schema.json", - "title": "CultNet Raw Document Record", - "type": "object", - "required": [ - "schemaId", - "recordKey", - "storedAt", - "payloadEncoding", - "payload" - ], - "additionalProperties": false, - "properties": { - "schemaId": { "type": "string", "minLength": 1 }, - "recordKey": { "type": "string", "minLength": 1 }, - "storedAt": { "type": "string", "minLength": 1 }, - "payloadEncoding": { "const": "messagepack" }, - "payload": { - "type": "string", - "contentEncoding": "base64", - "x-cult-runtime-type": "bytes" - }, - "sourceRuntimeId": { "type": "string", "minLength": 1 }, - "sourceAgentId": { "type": "string", "minLength": 1 }, - "sourceRole": { "type": "string", "minLength": 1 }, - "tags": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - } - } -} diff --git a/packages/cultnet-ts/contracts/cultnet.sample-chat.schema.json b/packages/cultnet-ts/contracts/cultnet.sample-chat.schema.json deleted file mode 100644 index 8426fb57..00000000 --- a/packages/cultnet-ts/contracts/cultnet.sample-chat.schema.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.sample-chat.schema.json", - "title": "CultNet Sample Chat Message", - "type": "object", - "required": [ - "schemaVersion", - "text" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.sample.chat.v0" }, - "text": { "type": "string", "minLength": 1 } - } -} diff --git a/packages/cultnet-ts/contracts/cultnet.schema-catalog-request.schema.json b/packages/cultnet-ts/contracts/cultnet.schema-catalog-request.schema.json deleted file mode 100644 index 611733d2..00000000 --- a/packages/cultnet-ts/contracts/cultnet.schema-catalog-request.schema.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.schema-catalog-request.schema.json", - "title": "CultNet Schema Catalog Request Message", - "type": "object", - "required": [ - "schemaVersion", - "messageId" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.schema_catalog_request.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "includeSchemaJson": { "type": "boolean" }, - "schemaIds": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - }, - "kinds": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "wire_message", - "document_payload", - "shared_contract" - ] - } - } - } -} diff --git a/packages/cultnet-ts/contracts/cultnet.schema-catalog-response.schema.json b/packages/cultnet-ts/contracts/cultnet.schema-catalog-response.schema.json deleted file mode 100644 index fa371e48..00000000 --- a/packages/cultnet-ts/contracts/cultnet.schema-catalog-response.schema.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.schema-catalog-response.schema.json", - "title": "CultNet Schema Catalog Response Message", - "type": "object", - "required": [ - "schemaVersion", - "messageId", - "schemas" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.schema_catalog_response.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "schemas": { - "type": "array", - "items": { - "$ref": "./cultnet.schema-descriptor.schema.json" - } - } - } -} diff --git a/packages/cultnet-ts/contracts/cultnet.schema-descriptor.schema.json b/packages/cultnet-ts/contracts/cultnet.schema-descriptor.schema.json deleted file mode 100644 index 23796857..00000000 --- a/packages/cultnet-ts/contracts/cultnet.schema-descriptor.schema.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.schema-descriptor.schema.json", - "title": "CultNet Schema Descriptor", - "type": "object", - "required": [ - "schemaId", - "kind", - "wireContracts", - "contentHash" - ], - "additionalProperties": false, - "properties": { - "schemaId": { "type": "string", "minLength": 1 }, - "kind": { - "type": "string", - "enum": [ - "wire_message", - "document_payload", - "shared_contract" - ] - }, - "schemaVersion": { "type": "string", "minLength": 1 }, - "documentType": { "type": "string", "minLength": 1 }, - "title": { "type": "string", "minLength": 1 }, - "wireContracts": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "cultnet.schema.v0", - "gamecult.networking.v0" - ] - } - }, - "contentHash": { "type": "string", "minLength": 1 }, - "schemaJson": { "type": "string", "minLength": 1 } - } -} diff --git a/packages/cultnet-ts/contracts/cultnet.shard-catalog-response.schema.json b/packages/cultnet-ts/contracts/cultnet.shard-catalog-response.schema.json deleted file mode 100644 index b2661786..00000000 --- a/packages/cultnet-ts/contracts/cultnet.shard-catalog-response.schema.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "cultnet.shard_catalog_response.v0", - "type": "object", - "required": ["schemaVersion", "messageId", "shards"], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.shard_catalog_response.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "shards": { - "type": "array", - "items": { "$ref": "#/$defs/shardDescriptor" } - } - }, - "$defs": { - "shardDescriptor": { - "type": "object", - "required": ["shardId", "ownerRuntimeId", "epoch"], - "additionalProperties": false, - "properties": { - "shardId": { "type": "string", "minLength": 1 }, - "ownerRuntimeId": { "type": "string", "minLength": 1 }, - "epoch": { "type": "integer", "minimum": 0 }, - "isPrimary": { "type": "boolean" }, - "schemaIds": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - }, - "keyPrefix": { "type": "string", "minLength": 1 }, - "primaryEndpoints": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - }, - "replicaEndpoints": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - }, - "readReplicaEndpoints": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - }, - "region": { "type": "string", "minLength": 1 }, - "authorityLeaseId": { "type": "string", "minLength": 1 } - } - } - } -} diff --git a/packages/cultnet-ts/contracts/cultnet.snapshot-response-raw.schema.json b/packages/cultnet-ts/contracts/cultnet.snapshot-response-raw.schema.json deleted file mode 100644 index a84bc50d..00000000 --- a/packages/cultnet-ts/contracts/cultnet.snapshot-response-raw.schema.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.snapshot-response-raw.schema.json", - "title": "CultNet Raw Snapshot Response Message", - "type": "object", - "required": [ - "schemaVersion", - "messageId", - "documents" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.snapshot_response_raw.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "documents": { - "type": "array", - "items": { - "$ref": "./cultnet.raw-document-record.schema.json" - } - } - } -} diff --git a/packages/cultnet-ts/contracts/cultnet.snapshot-response.schema.json b/packages/cultnet-ts/contracts/cultnet.snapshot-response.schema.json deleted file mode 100644 index 940822ce..00000000 --- a/packages/cultnet-ts/contracts/cultnet.snapshot-response.schema.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.snapshot-response.schema.json", - "title": "CultNet Snapshot Response Message", - "type": "object", - "required": [ - "schemaVersion", - "messageId", - "documents" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.snapshot_response.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "documents": { - "type": "array", - "items": { - "$ref": "./cultnet.document-record.schema.json" - } - } - } -} diff --git a/packages/cultnet-ts/contracts/cultnet.transport-profile.schema.json b/packages/cultnet-ts/contracts/cultnet.transport-profile.schema.json deleted file mode 100644 index 90261c79..00000000 --- a/packages/cultnet-ts/contracts/cultnet.transport-profile.schema.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.transport-profile.schema.json", - "title": "CultNet Transport Profile", - "type": "object", - "required": [ - "schemaVersion", - "runtimeId", - "transports" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.transport_profile.v0" }, - "runtimeId": { "type": "string", "minLength": 1 }, - "transports": { - "type": "array", - "items": { - "type": "object", - "required": [ - "transportId", - "protocol", - "channels" - ], - "additionalProperties": false, - "properties": { - "transportId": { "type": "string", "minLength": 1 }, - "protocol": { - "type": "string", - "enum": [ - "tcp_framed", - "litenetlib", - "websocket", - "rudp" - ] - }, - "host": { "type": "string", "minLength": 1 }, - "port": { "type": "integer", "minimum": 1, "maximum": 65535 }, - "path": { "type": "string", "minLength": 1 }, - "discoveryGroup": { "type": "string", "minLength": 1 }, - "wireContracts": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - }, - "reconnectPolicy": { - "type": "object", - "required": [ - "schemaVersion", - "policyId", - "baseDelayMs", - "maxDelayMs", - "maxJitterMs" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.reconnect_policy.v0" }, - "policyId": { "type": "string", "minLength": 1 }, - "baseDelayMs": { "type": "integer", "minimum": 0 }, - "maxDelayMs": { "type": "integer", "minimum": 0 }, - "maxJitterMs": { "type": "integer", "minimum": 0 }, - "maxAttempts": { "type": "integer", "minimum": 1 } - } - }, - "channels": { - "type": "array", - "items": { - "type": "object", - "required": [ - "channelId", - "delivery", - "ordering" - ], - "additionalProperties": false, - "properties": { - "channelId": { "type": "string", "minLength": 1 }, - "delivery": { - "type": "string", - "enum": [ - "reliable", - "unreliable" - ] - }, - "ordering": { - "type": "string", - "enum": [ - "ordered", - "unordered", - "sequenced" - ] - }, - "maxPayloadBytes": { "type": "integer", "minimum": 1 }, - "maxFragmentBytes": { "type": "integer", "minimum": 1 }, - "maxPendingReliablePackets": { "type": "integer", "minimum": 1 } - } - } - } - } - } - } - } -} diff --git a/packages/cultnet-ts/contracts/cultnet.verify.schema.json b/packages/cultnet-ts/contracts/cultnet.verify.schema.json deleted file mode 100644 index 1f992aa8..00000000 --- a/packages/cultnet-ts/contracts/cultnet.verify.schema.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.verify.schema.json", - "title": "CultNet Verify Message", - "type": "object", - "required": [ - "schemaVersion", - "nonce", - "session" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.verify.v0" }, - "nonce": { "type": "string", "minLength": 1 }, - "session": { "type": "string", "minLength": 1 } - } -} diff --git a/packages/cultnet-ts/contracts/ghostlight.agent-state.schema.json b/packages/cultnet-ts/contracts/ghostlight.agent-state.schema.json deleted file mode 100644 index 6437cd01..00000000 --- a/packages/cultnet-ts/contracts/ghostlight.agent-state.schema.json +++ /dev/null @@ -1,845 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/Ghostlight/schemas/agent-state.schema.json", - "title": "Ghostlight Agent State Schema", - "description": "First canonical contract for Ghostlight agent, perception, relationship, event, scene, and dialogue-context state.", - "type": "object", - "required": [ - "schema_version", - "world", - "agents", - "relationships", - "events", - "scenes" - ], - "additionalProperties": false, - "properties": { - "schema_version": { - "const": "ghostlight.agent_state.v0" - }, - "world": { - "$ref": "#/$defs/world_state" - }, - "agents": { - "type": "array", - "items": { - "$ref": "#/$defs/agent" - } - }, - "relationships": { - "type": "array", - "items": { - "$ref": "#/$defs/relationship" - } - }, - "events": { - "type": "array", - "items": { - "$ref": "#/$defs/event" - } - }, - "scenes": { - "type": "array", - "items": { - "$ref": "#/$defs/scene" - } - } - }, - "$defs": { - "world_state": { - "type": "object", - "required": [ - "world_id", - "setting", - "time", - "canon_context" - ], - "additionalProperties": false, - "properties": { - "world_id": { - "type": "string" - }, - "setting": { - "type": "string" - }, - "time": { - "type": "object", - "required": [ - "label" - ], - "additionalProperties": true, - "properties": { - "label": { - "type": "string" - } - } - }, - "canon_context": { - "type": "array", - "items": { - "type": "string" - } - }, - "ambient_pressures": { - "type": "array", - "items": { - "$ref": "#/$defs/pressure" - } - } - } - }, - "agent": { - "type": "object", - "required": [ - "agent_id", - "identity", - "canonical_state", - "goals", - "memories", - "perceived_state_overlays" - ], - "additionalProperties": false, - "properties": { - "agent_id": { - "type": "string" - }, - "identity": { - "$ref": "#/$defs/identity" - }, - "canonical_state": { - "$ref": "#/$defs/canonical_state" - }, - "goals": { - "type": "array", - "items": { - "$ref": "#/$defs/goal" - } - }, - "memories": { - "$ref": "#/$defs/memory_bundle" - }, - "perceived_state_overlays": { - "type": "array", - "items": { - "$ref": "#/$defs/perceived_state_overlay" - } - } - } - }, - "identity": { - "type": "object", - "required": [ - "name", - "roles", - "origin", - "public_description" - ], - "additionalProperties": false, - "properties": { - "name": { - "type": "string" - }, - "roles": { - "type": "array", - "items": { - "type": "string" - } - }, - "origin": { - "type": "string" - }, - "public_description": { - "type": "string" - }, - "private_notes": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "canonical_state": { - "type": "object", - "required": [ - "underlying_organization", - "stable_dispositions", - "behavioral_dimensions", - "presentation_strategy", - "voice_style", - "situational_state", - "values" - ], - "additionalProperties": false, - "properties": { - "underlying_organization": { - "$ref": "#/$defs/variable_map" - }, - "stable_dispositions": { - "$ref": "#/$defs/variable_map" - }, - "behavioral_dimensions": { - "$ref": "#/$defs/variable_map" - }, - "presentation_strategy": { - "$ref": "#/$defs/variable_map" - }, - "situational_state": { - "$ref": "#/$defs/variable_map" - }, - "values": { - "type": "array", - "items": { - "$ref": "#/$defs/value_commitment" - } - }, - "voice_style": { - "$ref": "#/$defs/variable_map" - } - } - }, - "variable_map": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/state_variable" - } - }, - "state_variable": { - "type": "object", - "required": [ - "mean", - "plasticity", - "current_activation" - ], - "additionalProperties": false, - "properties": { - "mean": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "plasticity": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "current_activation": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "evidence": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "value_commitment": { - "type": "object", - "required": [ - "value_id", - "label", - "priority", - "unforgivable_if_betrayed" - ], - "additionalProperties": false, - "properties": { - "value_id": { - "type": "string" - }, - "label": { - "type": "string" - }, - "priority": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "unforgivable_if_betrayed": { - "type": "boolean" - } - } - }, - "goal": { - "type": "object", - "required": [ - "goal_id", - "description", - "scope", - "priority", - "emotional_stake", - "status" - ], - "additionalProperties": false, - "properties": { - "goal_id": { - "type": "string" - }, - "description": { - "type": "string" - }, - "scope": { - "enum": [ - "immediate", - "scene", - "case", - "arc", - "life" - ] - }, - "priority": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "emotional_stake": { - "type": "string" - }, - "blockers": { - "type": "array", - "items": { - "type": "string" - } - }, - "status": { - "enum": [ - "active", - "blocked", - "dormant", - "resolved", - "abandoned" - ] - } - } - }, - "memory_bundle": { - "type": "object", - "required": [ - "episodic", - "semantic", - "relationship_summaries" - ], - "additionalProperties": false, - "properties": { - "episodic": { - "type": "array", - "items": { - "$ref": "#/$defs/memory" - } - }, - "semantic": { - "type": "array", - "items": { - "$ref": "#/$defs/memory" - } - }, - "relationship_summaries": { - "type": "array", - "items": { - "$ref": "#/$defs/memory" - } - } - } - }, - "memory": { - "type": "object", - "required": [ - "memory_id", - "summary", - "salience", - "confidence" - ], - "additionalProperties": false, - "properties": { - "memory_id": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "salience": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "confidence": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "linked_event_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "linked_relationship_id": { - "type": "string" - } - } - }, - "perceived_state_overlay": { - "type": "object", - "required": [ - "observer_agent_id", - "target_agent_id", - "perceived_dimensions", - "beliefs", - "distortions" - ], - "additionalProperties": false, - "properties": { - "observer_agent_id": { - "type": "string" - }, - "target_agent_id": { - "type": "string" - }, - "perceived_dimensions": { - "$ref": "#/$defs/inferred_variable_map" - }, - "beliefs": { - "type": "array", - "items": { - "$ref": "#/$defs/belief" - } - }, - "distortions": { - "type": "array", - "items": { - "enum": [ - "hostile_attribution", - "false_reassurance", - "overread_warmth", - "underread_threat", - "false_mask_detection", - "missed_mask_detection", - "status_injury", - "threat_amplification", - "institutional_suspicion_transfer", - "care_underread", - "mask_overfocus" - ] - } - } - } - }, - "belief": { - "type": "object", - "required": [ - "belief_id", - "claim", - "confidence" - ], - "additionalProperties": false, - "properties": { - "belief_id": { - "type": "string" - }, - "claim": { - "type": "string" - }, - "confidence": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "subject_id": { - "type": "string" - }, - "claim_type": { - "enum": [ - "fact", - "identity_inference", - "motive_inference", - "prediction", - "norm", - "value_read", - "relationship_read" - ] - }, - "evidence_event_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "visibility": { - "enum": [ - "private", - "shared", - "public", - "rumor" - ] - }, - "emotional_charge": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - } - }, - "relationship": { - "type": "object", - "required": [ - "relationship_id", - "source_id", - "target_id", - "stance", - "summary" - ], - "additionalProperties": false, - "properties": { - "relationship_id": { - "type": "string" - }, - "source_id": { - "type": "string" - }, - "target_id": { - "type": "string" - }, - "stance": { - "$ref": "#/$defs/variable_map" - }, - "summary": { - "type": "string" - }, - "unresolved_incident_ids": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "event": { - "type": "object", - "required": [ - "event_id", - "kind", - "summary", - "participants", - "pressure_tags" - ], - "additionalProperties": false, - "properties": { - "event_id": { - "type": "string" - }, - "kind": { - "enum": [ - "dialogue", - "action", - "memory", - "relationship_shift", - "scene_outcome", - "author_note" - ] - }, - "summary": { - "type": "string" - }, - "participants": { - "type": "array", - "items": { - "type": "string" - } - }, - "pressure_tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "observed_exchange": { - "type": "array", - "items": { - "$ref": "#/$defs/event_exchange_turn" - } - }, - "private_interpretations": { - "type": "array", - "items": { - "$ref": "#/$defs/event_private_interpretation" - } - }, - "event_effects": { - "type": "array", - "items": { - "$ref": "#/$defs/event_effect" - } - } - } - }, - "scene": { - "type": "object", - "required": [ - "scene_id", - "location", - "participants", - "public_stakes", - "hidden_stakes", - "dialogue_context_packs" - ], - "additionalProperties": false, - "properties": { - "scene_id": { - "type": "string" - }, - "location": { - "type": "string" - }, - "participants": { - "type": "array", - "items": { - "type": "string" - } - }, - "public_stakes": { - "type": "array", - "items": { - "type": "string" - } - }, - "hidden_stakes": { - "type": "array", - "items": { - "type": "string" - } - }, - "dialogue_context_packs": { - "type": "array", - "items": { - "$ref": "#/$defs/dialogue_context_pack" - } - } - } - }, - "dialogue_context_pack": { - "type": "object", - "required": [ - "speaker_agent_id", - "listener_ids", - "speaker_local_truth", - "speaker_beliefs", - "active_memories", - "active_goals", - "presentation_constraints" - ], - "additionalProperties": false, - "properties": { - "speaker_agent_id": { - "type": "string" - }, - "listener_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "speaker_local_truth": { - "type": "array", - "items": { - "type": "string" - } - }, - "speaker_beliefs": { - "type": "array", - "items": { - "type": "string" - } - }, - "active_memories": { - "type": "array", - "items": { - "type": "string" - } - }, - "active_goals": { - "type": "array", - "items": { - "type": "string" - } - }, - "presentation_constraints": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "pressure": { - "type": "object", - "required": [ - "pressure_id", - "label", - "intensity" - ], - "additionalProperties": false, - "properties": { - "pressure_id": { - "type": "string" - }, - "label": { - "type": "string" - }, - "intensity": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - } - }, - "inferred_variable_map": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/inferred_state_variable" - } - }, - "inferred_state_variable": { - "type": "object", - "required": [ - "observed_activation", - "attributed_disposition", - "confidence" - ], - "additionalProperties": false, - "properties": { - "observed_activation": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "attributed_disposition": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "confidence": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "evidence": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "event_exchange_turn": { - "type": "object", - "required": [ - "speaker_id", - "utterance_summary", - "dialogue_function" - ], - "additionalProperties": false, - "properties": { - "speaker_id": { - "type": "string" - }, - "utterance_summary": { - "type": "string" - }, - "dialogue_function": { - "type": "string" - }, - "observable_cues": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "event_private_interpretation": { - "type": "object", - "required": [ - "agent_id", - "interpretation", - "confidence" - ], - "additionalProperties": false, - "properties": { - "agent_id": { - "type": "string" - }, - "interpretation": { - "type": "string" - }, - "attributed_motive": { - "type": "string" - }, - "appraisal_tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "confidence": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - } - }, - "event_effect": { - "type": "object", - "required": [ - "agent_id", - "summary" - ], - "additionalProperties": false, - "properties": { - "agent_id": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "state_deltas": { - "type": "array", - "items": { - "$ref": "#/$defs/state_delta" - } - }, - "new_belief_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "memory_update_ids": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "state_delta": { - "type": "object", - "required": [ - "path", - "delta" - ], - "additionalProperties": false, - "properties": { - "path": { - "type": "string" - }, - "delta": { - "type": "number", - "minimum": -1, - "maximum": 1 - } - } - } - } -} diff --git a/packages/cultnet-ts/integration/contracts/cultnet.discovery-announce.schema.json b/packages/cultnet-ts/integration/contracts/cultnet.discovery-announce.schema.json deleted file mode 100644 index b6cb3abc..00000000 --- a/packages/cultnet-ts/integration/contracts/cultnet.discovery-announce.schema.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.discovery-announce.schema.json", - "title": "CultNet Discovery Announce", - "type": "object", - "required": [ - "schemaVersion", - "messageId", - "runtimeId", - "runtimeKind", - "displayName", - "tcpHost", - "tcpPort", - "wireContract", - "supportedDocumentTypes", - "supportsSchemaCatalog" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.discovery_announce.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "runtimeId": { "type": "string", "minLength": 1 }, - "runtimeKind": { "type": "string", "minLength": 1 }, - "displayName": { "type": "string", "minLength": 1 }, - "agentId": { "type": "string", "minLength": 1 }, - "tcpHost": { "type": "string", "minLength": 1 }, - "tcpPort": { "type": "integer", "minimum": 1, "maximum": 65535 }, - "wireContract": { "const": "cultnet.schema.v0" }, - "supportedDocumentTypes": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - }, - "supportsSchemaCatalog": { "type": "boolean" } - } -} diff --git a/packages/cultnet-ts/integration/contracts/cultnet.discovery-probe.schema.json b/packages/cultnet-ts/integration/contracts/cultnet.discovery-probe.schema.json deleted file mode 100644 index b4784bbc..00000000 --- a/packages/cultnet-ts/integration/contracts/cultnet.discovery-probe.schema.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.discovery-probe.schema.json", - "title": "CultNet Discovery Probe", - "type": "object", - "required": [ - "schemaVersion", - "messageId", - "requesterRuntimeId" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.discovery_probe.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "requesterRuntimeId": { "type": "string", "minLength": 1 } - } -} diff --git a/packages/cultnet-ts/package.json b/packages/cultnet-ts/package.json index f94f0bfa..82baeba0 100644 --- a/packages/cultnet-ts/package.json +++ b/packages/cultnet-ts/package.json @@ -17,13 +17,11 @@ } }, "files": [ - "dist", - "contracts" + "dist" ], "scripts": { "contracts:generate": "node tools/generate-swarm-contracts.mjs", "build": "node tools/generate-swarm-contracts.mjs && node ../../node_modules/typescript/bin/tsc -p tsconfig.json", - "prepack": "node tools/generate-swarm-contracts.mjs && node ../../node_modules/typescript/bin/tsc -p tsconfig.json", "typecheck": "node tools/generate-swarm-contracts.mjs && node ../../node_modules/typescript/bin/tsc -p tsconfig.json --pretty false", "test": "node tools/generate-swarm-contracts.mjs && node ../../node_modules/typescript/bin/tsc -p tsconfig.json && node ../../node_modules/typescript/bin/tsc -p tsconfig.test.json && node --test dist-test/test/*.test.js", "test:interop": "node tools/generate-swarm-contracts.mjs && node ../../node_modules/typescript/bin/tsc -p tsconfig.json && node ../../node_modules/typescript/bin/tsc -p tsconfig.test.json && node --test --test-force-exit dist-test/test/interop/*.test.js" diff --git a/packages/cultnet-ts/src/contracts.ts b/packages/cultnet-ts/src/contracts.ts index c71cdcc1..d44f391f 100644 --- a/packages/cultnet-ts/src/contracts.ts +++ b/packages/cultnet-ts/src/contracts.ts @@ -1,38 +1,38 @@ import Ajv2020, { type ValidateFunction } from "ajv/dist/2020"; -import documentRecordSchema from "../contracts/cultnet.document-record.schema.json"; -import helloSchema from "../contracts/cultnet.hello.schema.json"; -import loginSchema from "../contracts/cultnet.login.schema.json"; -import registerSchema from "../contracts/cultnet.register.schema.json"; -import verifySchema from "../contracts/cultnet.verify.schema.json"; -import loginSuccessSchema from "../contracts/cultnet.login-success.schema.json"; -import errorSchema from "../contracts/cultnet.error.schema.json"; -import sampleChangeNameSchema from "../contracts/cultnet.sample-change-name.schema.json"; -import sampleChatSchema from "../contracts/cultnet.sample-chat.schema.json"; -import documentPutSchema from "../contracts/cultnet.document-put.schema.json"; -import documentDeleteSchema from "../contracts/cultnet.document-delete.schema.json"; -import rawDocumentRecordSchema from "../contracts/cultnet.raw-document-record.schema.json"; -import documentPutRawSchema from "../contracts/cultnet.document-put-raw.schema.json"; -import documentMutationContractSchema from "../contracts/cultnet.document-mutation-contract.schema.json"; -import transportProfileSchema from "../contracts/cultnet.transport-profile.schema.json"; -import snapshotRequestSchema from "../contracts/cultnet.snapshot-request.schema.json"; -import snapshotResponseSchema from "../contracts/cultnet.snapshot-response.schema.json"; -import snapshotResponseRawSchema from "../contracts/cultnet.snapshot-response-raw.schema.json"; -import databaseSubscribeSchema from "../contracts/cultnet.database-subscribe.schema.json"; -import databaseUnsubscribeSchema from "../contracts/cultnet.database-unsubscribe.schema.json"; -import databaseChangeRawSchema from "../contracts/cultnet.database-change-raw.schema.json"; -import schemaDescriptorSchema from "../contracts/cultnet.schema-descriptor.schema.json"; -import schemaCatalogRequestSchema from "../contracts/cultnet.schema-catalog-request.schema.json"; -import schemaCatalogResponseSchema from "../contracts/cultnet.schema-catalog-response.schema.json"; -import shardCatalogRequestSchema from "../contracts/cultnet.shard-catalog-request.schema.json"; -import shardCatalogResponseSchema from "../contracts/cultnet.shard-catalog-response.schema.json"; -import operationRequestSchema from "../contracts/cultnet.operation-request.schema.json"; -import operationResponseSchema from "../contracts/cultnet.operation-response.schema.json"; -import verseCatalogRequestSchema from "../contracts/cultmesh.verse-catalog-request.schema.json"; -import verseCatalogResponseSchema from "../contracts/cultmesh.verse-catalog-response.schema.json"; -import sessionOpenSchema from "../contracts/cultmesh.session-open.schema.json"; -import sessionAcceptedSchema from "../contracts/cultmesh.session-accepted.schema.json"; -import ghostlightAgentStateSchema from "../contracts/ghostlight.agent-state.schema.json"; +import documentRecordSchema from "../../../contracts/cultnet/cultnet.document-record.schema.json"; +import helloSchema from "../../../contracts/cultnet/cultnet.hello.schema.json"; +import loginSchema from "../../../contracts/cultnet/cultnet.login.schema.json"; +import registerSchema from "../../../contracts/cultnet/cultnet.register.schema.json"; +import verifySchema from "../../../contracts/cultnet/cultnet.verify.schema.json"; +import loginSuccessSchema from "../../../contracts/cultnet/cultnet.login-success.schema.json"; +import errorSchema from "../../../contracts/cultnet/cultnet.error.schema.json"; +import sampleChangeNameSchema from "../../../contracts/cultnet/cultnet.sample-change-name.schema.json"; +import sampleChatSchema from "../../../contracts/cultnet/cultnet.sample-chat.schema.json"; +import documentPutSchema from "../../../contracts/cultnet/cultnet.document-put.schema.json"; +import documentDeleteSchema from "../../../contracts/cultnet/cultnet.document-delete.schema.json"; +import rawDocumentRecordSchema from "../../../contracts/cultnet/cultnet.raw-document-record.schema.json"; +import documentPutRawSchema from "../../../contracts/cultnet/cultnet.document-put-raw.schema.json"; +import documentMutationContractSchema from "../../../contracts/cultnet/cultnet.document-mutation-contract.schema.json"; +import transportProfileSchema from "../../../contracts/cultnet/cultnet.transport-profile.schema.json"; +import snapshotRequestSchema from "../../../contracts/cultnet/cultnet.snapshot-request.schema.json"; +import snapshotResponseSchema from "../../../contracts/cultnet/cultnet.snapshot-response.schema.json"; +import snapshotResponseRawSchema from "../../../contracts/cultnet/cultnet.snapshot-response-raw.schema.json"; +import databaseSubscribeSchema from "../../../contracts/cultnet/cultnet.database-subscribe.schema.json"; +import databaseUnsubscribeSchema from "../../../contracts/cultnet/cultnet.database-unsubscribe.schema.json"; +import databaseChangeRawSchema from "../../../contracts/cultnet/cultnet.database-change-raw.schema.json"; +import schemaDescriptorSchema from "../../../contracts/cultnet/cultnet.schema-descriptor.schema.json"; +import schemaCatalogRequestSchema from "../../../contracts/cultnet/cultnet.schema-catalog-request.schema.json"; +import schemaCatalogResponseSchema from "../../../contracts/cultnet/cultnet.schema-catalog-response.schema.json"; +import shardCatalogRequestSchema from "../../../contracts/cultnet/cultnet.shard-catalog-request.schema.json"; +import shardCatalogResponseSchema from "../../../contracts/cultnet/cultnet.shard-catalog-response.schema.json"; +import operationRequestSchema from "../../../contracts/cultnet/cultnet.operation-request.schema.json"; +import operationResponseSchema from "../../../contracts/cultnet/cultnet.operation-response.schema.json"; +import verseCatalogRequestSchema from "../../../contracts/cultnet/cultmesh.verse-catalog-request.schema.json"; +import verseCatalogResponseSchema from "../../../contracts/cultnet/cultmesh.verse-catalog-response.schema.json"; +import sessionOpenSchema from "../../../contracts/cultnet/cultmesh.session-open.schema.json"; +import sessionAcceptedSchema from "../../../contracts/cultnet/cultmesh.session-accepted.schema.json"; +import ghostlightAgentStateSchema from "../../../contracts/cultnet/ghostlight.agent-state.schema.json"; export type CultNetWireContract = "cultnet.schema.v0" | "gamecult.networking.v0"; diff --git a/packages/cultnet-ts/src/generated/swarm-contracts.generated.ts b/packages/cultnet-ts/src/generated/swarm-contracts.generated.ts index f6f673a3..84bb09b0 100644 --- a/packages/cultnet-ts/src/generated/swarm-contracts.generated.ts +++ b/packages/cultnet-ts/src/generated/swarm-contracts.generated.ts @@ -1,5 +1,5 @@ import { defineJsonSchemaContract } from "../json-schema-contract"; -import ghostlightAgentStateGeneratedContractSchema from "../../contracts/ghostlight.agent-state.schema.json"; +import ghostlightAgentStateGeneratedContractSchema from "../../../../contracts/cultnet/ghostlight.agent-state.schema.json"; // Generated by tools/generate-swarm-contracts.mjs. Do not hand-edit this file unless you enjoy losing arguments with a machine. diff --git a/packages/cultnet-ts/test/interop/cultnet-interop-shared.ts b/packages/cultnet-ts/test/interop/cultnet-interop-shared.ts index e810ecbd..a7ae54e1 100644 --- a/packages/cultnet-ts/test/interop/cultnet-interop-shared.ts +++ b/packages/cultnet-ts/test/interop/cultnet-interop-shared.ts @@ -7,16 +7,16 @@ import { z } from "zod"; export const INTEROP_DOCUMENT_TYPE = "cultnet.interop-note"; export const INTEROP_SCHEMA_VERSION = "cultnet.interop_note.v0"; export const INTEROP_MUTATION_INTENT_DOCUMENT_TYPE = "cultnet.interop-note-mutation-intent"; -export const INTEROP_MUTATION_INTENT_SCHEMA_ID = "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.interop-note-mutation-intent.schema.json"; +export const INTEROP_MUTATION_INTENT_SCHEMA_ID = "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.interop-note-mutation-intent.schema.json"; export const INTEROP_MUTATION_INTENT_SCHEMA_VERSION = "cultnet.interop_note_mutation_intent.v0"; export const INTEROP_MUTATION_RECEIPT_DOCUMENT_TYPE = "cultnet.interop-note-mutation-receipt"; -export const INTEROP_MUTATION_RECEIPT_SCHEMA_ID = "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.interop-note-mutation-receipt.schema.json"; +export const INTEROP_MUTATION_RECEIPT_SCHEMA_ID = "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.interop-note-mutation-receipt.schema.json"; export const INTEROP_MUTATION_RECEIPT_SCHEMA_VERSION = "cultnet.interop_note_mutation_receipt.v0"; export const INTEROP_FIRE_COMMAND_DOCUMENT_TYPE = "cultnet.interop-fire-weapon-command"; -export const INTEROP_FIRE_COMMAND_SCHEMA_ID = "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.interop-fire-weapon-command.schema.json"; +export const INTEROP_FIRE_COMMAND_SCHEMA_ID = "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.interop-fire-weapon-command.schema.json"; export const INTEROP_FIRE_COMMAND_SCHEMA_VERSION = "cultnet.interop_fire_weapon_command.v0"; export const INTEROP_FIRE_RECEIPT_DOCUMENT_TYPE = "cultnet.interop-fire-weapon-receipt"; -export const INTEROP_FIRE_RECEIPT_SCHEMA_ID = "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.interop-fire-weapon-receipt.schema.json"; +export const INTEROP_FIRE_RECEIPT_SCHEMA_ID = "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.interop-fire-weapon-receipt.schema.json"; export const INTEROP_FIRE_RECEIPT_SCHEMA_VERSION = "cultnet.interop_fire_weapon_receipt.v0"; export const INTEROP_WIRE_CONTRACT = "cultnet.schema.v0" as const; export const DISCOVERY_PROBE_SCHEMA_VERSION = "cultnet.discovery_probe.v0"; diff --git a/packages/cultnet-ts/test/interop/cultnet-interop.test.ts b/packages/cultnet-ts/test/interop/cultnet-interop.test.ts index 00fff83d..51bea1ff 100644 --- a/packages/cultnet-ts/test/interop/cultnet-interop.test.ts +++ b/packages/cultnet-ts/test/interop/cultnet-interop.test.ts @@ -39,9 +39,9 @@ const cultnetRsRoot = existsSync(resolve(cultLibRoot, "packages", "cultnet-rs")) : resolve(cultNetTsRoot, "..", "cultnet-rs"); const tsPeerScript = resolve(cultNetTsRoot, "dist-test", "test", "interop", "cultnet-interop-peer.js"); -const interopSchemaPath = resolve(cultNetTsRoot, "integration", "contracts", "cultnet.interop-note.schema.json"); -const interopNoteSchemaId = "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.interop-note.schema.json"; -const witnessArtifactBundleSchemaId = "https://github.com/GameCult/cultnet-ts/contracts/cultnet.witness-artifact-bundle.schema.json"; +const interopSchemaPath = resolve(cultNetTsRoot, "..", "..", "contracts", "cultnet", "interop", "cultnet.interop-note.schema.json"); +const interopNoteSchemaId = "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.interop-note.schema.json"; +const witnessArtifactBundleSchemaId = "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.witness-artifact-bundle.schema.json"; const simulationFactSchemaId = "gamecult.mesh.simulation_fact"; const csharpProjectPath = resolve( cultLibRoot, diff --git a/packages/cultnet-ts/tools/generate-swarm-contracts.mjs b/packages/cultnet-ts/tools/generate-swarm-contracts.mjs index f74aff98..53ad1e18 100644 --- a/packages/cultnet-ts/tools/generate-swarm-contracts.mjs +++ b/packages/cultnet-ts/tools/generate-swarm-contracts.mjs @@ -7,7 +7,7 @@ import { compile } from "json-schema-to-typescript"; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const repoRoot = path.resolve(__dirname, ".."); -const manifestPath = path.join(repoRoot, "contracts", "swarm-contracts.manifest.json"); +const manifestPath = path.join(repoRoot, "tools", "swarm-contracts.manifest.json"); const outputPath = path.join(repoRoot, "src", "generated", "swarm-contracts.generated.ts"); /** diff --git a/packages/cultnet-ts/contracts/swarm-contracts.manifest.json b/packages/cultnet-ts/tools/swarm-contracts.manifest.json similarity index 76% rename from packages/cultnet-ts/contracts/swarm-contracts.manifest.json rename to packages/cultnet-ts/tools/swarm-contracts.manifest.json index 1c08e8fa..49b5073d 100644 --- a/packages/cultnet-ts/contracts/swarm-contracts.manifest.json +++ b/packages/cultnet-ts/tools/swarm-contracts.manifest.json @@ -1,7 +1,7 @@ { "contracts": [ { - "schemaPath": "./ghostlight.agent-state.schema.json", + "schemaPath": "../../../contracts/cultnet/ghostlight.agent-state.schema.json", "typeName": "GhostlightAgentStateShape", "contractExportName": "ghostlightAgentStateGeneratedContract", "validateExportName": "validateGhostlightAgentStateGenerated", diff --git a/src/GameCult.Networking/Contracts/cultnet.database-change-raw.schema.json b/src/GameCult.Networking/Contracts/cultnet.database-change-raw.schema.json deleted file mode 100644 index dd650fa0..00000000 --- a/src/GameCult.Networking/Contracts/cultnet.database-change-raw.schema.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.database-change-raw.schema.json", - "title": "CultNet Raw Database Change Message", - "type": "object", - "required": ["schemaVersion", "messageId", "subscriptionId", "changeKind"], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.database_change_raw.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "subscriptionId": { "type": "string", "minLength": 1 }, - "changeKind": { "enum": ["added", "updated", "removed"] }, - "document": { "$ref": "./cultnet.raw-document-record.schema.json" }, - "recordKey": { "type": "string", "minLength": 1 }, - "schemaId": { "type": "string", "minLength": 1 } - }, - "allOf": [ - { - "if": { "properties": { "changeKind": { "const": "removed" } } }, - "then": { "required": ["recordKey", "schemaId"] }, - "else": { "required": ["document"] } - } - ] -} diff --git a/src/GameCult.Networking/Contracts/cultnet.database-subscribe.schema.json b/src/GameCult.Networking/Contracts/cultnet.database-subscribe.schema.json deleted file mode 100644 index 08304199..00000000 --- a/src/GameCult.Networking/Contracts/cultnet.database-subscribe.schema.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.database-subscribe.schema.json", - "title": "CultNet Database Subscribe Message", - "type": "object", - "required": ["schemaVersion", "messageId", "subscriptionId", "includeSnapshot"], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.database_subscribe.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "subscriptionId": { "type": "string", "minLength": 1 }, - "schemaIds": { "type": "array", "items": { "type": "string", "minLength": 1 } }, - "recordKeys": { "type": "array", "items": { "type": "string", "minLength": 1 } }, - "includeSnapshot": { "type": "boolean" }, - "consumerRuntimeId": { "type": "string", "minLength": 1 }, - "bodyIds": { "type": "array", "items": { "type": "string", "minLength": 1 } }, - "supportedBodyTransports": { "type": "array", "items": { "type": "string", "minLength": 1 } } - } -} diff --git a/src/GameCult.Networking/Contracts/cultnet.database-unsubscribe.schema.json b/src/GameCult.Networking/Contracts/cultnet.database-unsubscribe.schema.json deleted file mode 100644 index 7d4b0855..00000000 --- a/src/GameCult.Networking/Contracts/cultnet.database-unsubscribe.schema.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.database-unsubscribe.schema.json", - "title": "CultNet Database Unsubscribe Message", - "type": "object", - "required": ["schemaVersion", "messageId", "subscriptionId"], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.database_unsubscribe.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "subscriptionId": { "type": "string", "minLength": 1 } - } -} diff --git a/src/GameCult.Networking/Contracts/cultnet.document-delete.schema.json b/src/GameCult.Networking/Contracts/cultnet.document-delete.schema.json deleted file mode 100644 index 265bcaf2..00000000 --- a/src/GameCult.Networking/Contracts/cultnet.document-delete.schema.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.document-delete.schema.json", - "title": "CultNet Document Delete Message", - "type": "object", - "required": [ - "schemaVersion", - "messageId", - "schemaId", - "recordKey" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.document_delete.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "schemaId": { "type": "string", "minLength": 1 }, - "recordKey": { "type": "string", "minLength": 1 } - } -} diff --git a/src/GameCult.Networking/Contracts/cultnet.document-put-raw.schema.json b/src/GameCult.Networking/Contracts/cultnet.document-put-raw.schema.json deleted file mode 100644 index 3c178d03..00000000 --- a/src/GameCult.Networking/Contracts/cultnet.document-put-raw.schema.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.document-put-raw.schema.json", - "title": "CultNet Raw Document Put Message", - "type": "object", - "required": [ - "schemaVersion", - "messageId", - "document" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.document_put_raw.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "document": { - "$ref": "./cultnet.raw-document-record.schema.json" - } - } -} diff --git a/src/GameCult.Networking/Contracts/cultnet.error.schema.json b/src/GameCult.Networking/Contracts/cultnet.error.schema.json deleted file mode 100644 index af6da9cf..00000000 --- a/src/GameCult.Networking/Contracts/cultnet.error.schema.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.error.schema.json", - "title": "CultNet Error Message", - "type": "object", - "required": [ - "schemaVersion", - "error" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.error.v0" }, - "error": { "type": "string", "minLength": 1 } - } -} diff --git a/src/GameCult.Networking/Contracts/cultnet.login-success.schema.json b/src/GameCult.Networking/Contracts/cultnet.login-success.schema.json deleted file mode 100644 index 3d8a4591..00000000 --- a/src/GameCult.Networking/Contracts/cultnet.login-success.schema.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.login-success.schema.json", - "title": "CultNet Login Success Message", - "type": "object", - "required": [ - "schemaVersion", - "nonce", - "session" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.login_success.v0" }, - "nonce": { "type": "string", "minLength": 1 }, - "session": { "type": "string", "minLength": 1 } - } -} diff --git a/src/GameCult.Networking/Contracts/cultnet.login.schema.json b/src/GameCult.Networking/Contracts/cultnet.login.schema.json deleted file mode 100644 index 62f49599..00000000 --- a/src/GameCult.Networking/Contracts/cultnet.login.schema.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.login.schema.json", - "title": "CultNet Login Message", - "type": "object", - "required": [ - "schemaVersion", - "nonce", - "auth", - "password" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.login.v0" }, - "nonce": { "type": "string", "minLength": 1 }, - "auth": { "type": "string", "minLength": 1 }, - "password": { "type": "string", "minLength": 1 } - } -} diff --git a/src/GameCult.Networking/Contracts/cultnet.operation-response.schema.json b/src/GameCult.Networking/Contracts/cultnet.operation-response.schema.json deleted file mode 100644 index c3be917d..00000000 --- a/src/GameCult.Networking/Contracts/cultnet.operation-response.schema.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.operation-response.schema.json", - "title": "CultNet Operation Response", - "type": "object", - "required": ["schemaVersion", "messageId", "serviceId", "operation", "status", "payloadSchema", "payload"], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.operation_response.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "serviceId": { "type": "string", "minLength": 1 }, - "operation": { "type": "string", "minLength": 1 }, - "status": { "type": "string", "minLength": 1 }, - "payloadSchema": { "type": "string", "minLength": 1 }, - "payloadEncoding": { "const": "messagepack-base64" }, - "payload": { "type": "string", "minLength": 1, "contentEncoding": "base64" }, - "diagnostics": { "type": "array", "items": { "type": "string" } }, - "sourceRuntimeId": { "type": "string", "minLength": 1 } - } -} diff --git a/src/GameCult.Networking/Contracts/cultnet.register.schema.json b/src/GameCult.Networking/Contracts/cultnet.register.schema.json deleted file mode 100644 index 77286f3e..00000000 --- a/src/GameCult.Networking/Contracts/cultnet.register.schema.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.register.schema.json", - "title": "CultNet Register Message", - "type": "object", - "required": [ - "schemaVersion", - "nonce", - "email", - "password", - "name" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.register.v0" }, - "nonce": { "type": "string", "minLength": 1 }, - "email": { "type": "string", "minLength": 1 }, - "password": { "type": "string", "minLength": 1 }, - "name": { "type": "string", "minLength": 1 } - } -} diff --git a/src/GameCult.Networking/Contracts/cultnet.sample-change-name.schema.json b/src/GameCult.Networking/Contracts/cultnet.sample-change-name.schema.json deleted file mode 100644 index fc3fe057..00000000 --- a/src/GameCult.Networking/Contracts/cultnet.sample-change-name.schema.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.sample-change-name.schema.json", - "title": "CultNet Sample Change Name Message", - "type": "object", - "required": [ - "schemaVersion", - "name" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.sample.change_name.v0" }, - "name": { "type": "string", "minLength": 1 } - } -} diff --git a/src/GameCult.Networking/Contracts/cultnet.schema-catalog-request.schema.json b/src/GameCult.Networking/Contracts/cultnet.schema-catalog-request.schema.json deleted file mode 100644 index 611733d2..00000000 --- a/src/GameCult.Networking/Contracts/cultnet.schema-catalog-request.schema.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.schema-catalog-request.schema.json", - "title": "CultNet Schema Catalog Request Message", - "type": "object", - "required": [ - "schemaVersion", - "messageId" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.schema_catalog_request.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "includeSchemaJson": { "type": "boolean" }, - "schemaIds": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - }, - "kinds": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "wire_message", - "document_payload", - "shared_contract" - ] - } - } - } -} diff --git a/src/GameCult.Networking/Contracts/cultnet.snapshot-request.schema.json b/src/GameCult.Networking/Contracts/cultnet.snapshot-request.schema.json deleted file mode 100644 index 712d7059..00000000 --- a/src/GameCult.Networking/Contracts/cultnet.snapshot-request.schema.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.snapshot-request.schema.json", - "title": "CultNet Snapshot Request Message", - "type": "object", - "required": [ - "schemaVersion", - "messageId" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.snapshot_request.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "schemaIds": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - }, - "recordKeys": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - } - } -} diff --git a/src/GameCult.Networking/Contracts/cultnet.snapshot-response-raw.schema.json b/src/GameCult.Networking/Contracts/cultnet.snapshot-response-raw.schema.json deleted file mode 100644 index a84bc50d..00000000 --- a/src/GameCult.Networking/Contracts/cultnet.snapshot-response-raw.schema.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.snapshot-response-raw.schema.json", - "title": "CultNet Raw Snapshot Response Message", - "type": "object", - "required": [ - "schemaVersion", - "messageId", - "documents" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.snapshot_response_raw.v0" }, - "messageId": { "type": "string", "minLength": 1 }, - "documents": { - "type": "array", - "items": { - "$ref": "./cultnet.raw-document-record.schema.json" - } - } - } -} diff --git a/src/GameCult.Networking/Contracts/cultnet.transport-profile.schema.json b/src/GameCult.Networking/Contracts/cultnet.transport-profile.schema.json deleted file mode 100644 index 90261c79..00000000 --- a/src/GameCult.Networking/Contracts/cultnet.transport-profile.schema.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/cultnet-ts/contracts/cultnet.transport-profile.schema.json", - "title": "CultNet Transport Profile", - "type": "object", - "required": [ - "schemaVersion", - "runtimeId", - "transports" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.transport_profile.v0" }, - "runtimeId": { "type": "string", "minLength": 1 }, - "transports": { - "type": "array", - "items": { - "type": "object", - "required": [ - "transportId", - "protocol", - "channels" - ], - "additionalProperties": false, - "properties": { - "transportId": { "type": "string", "minLength": 1 }, - "protocol": { - "type": "string", - "enum": [ - "tcp_framed", - "litenetlib", - "websocket", - "rudp" - ] - }, - "host": { "type": "string", "minLength": 1 }, - "port": { "type": "integer", "minimum": 1, "maximum": 65535 }, - "path": { "type": "string", "minLength": 1 }, - "discoveryGroup": { "type": "string", "minLength": 1 }, - "wireContracts": { - "type": "array", - "items": { "type": "string", "minLength": 1 } - }, - "reconnectPolicy": { - "type": "object", - "required": [ - "schemaVersion", - "policyId", - "baseDelayMs", - "maxDelayMs", - "maxJitterMs" - ], - "additionalProperties": false, - "properties": { - "schemaVersion": { "const": "cultnet.reconnect_policy.v0" }, - "policyId": { "type": "string", "minLength": 1 }, - "baseDelayMs": { "type": "integer", "minimum": 0 }, - "maxDelayMs": { "type": "integer", "minimum": 0 }, - "maxJitterMs": { "type": "integer", "minimum": 0 }, - "maxAttempts": { "type": "integer", "minimum": 1 } - } - }, - "channels": { - "type": "array", - "items": { - "type": "object", - "required": [ - "channelId", - "delivery", - "ordering" - ], - "additionalProperties": false, - "properties": { - "channelId": { "type": "string", "minLength": 1 }, - "delivery": { - "type": "string", - "enum": [ - "reliable", - "unreliable" - ] - }, - "ordering": { - "type": "string", - "enum": [ - "ordered", - "unordered", - "sequenced" - ] - }, - "maxPayloadBytes": { "type": "integer", "minimum": 1 }, - "maxFragmentBytes": { "type": "integer", "minimum": 1 }, - "maxPendingReliablePackets": { "type": "integer", "minimum": 1 } - } - } - } - } - } - } - } -} diff --git a/src/GameCult.Networking/Contracts/ghostlight.agent-state.schema.json b/src/GameCult.Networking/Contracts/ghostlight.agent-state.schema.json deleted file mode 100644 index 6437cd01..00000000 --- a/src/GameCult.Networking/Contracts/ghostlight.agent-state.schema.json +++ /dev/null @@ -1,845 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/GameCult/Ghostlight/schemas/agent-state.schema.json", - "title": "Ghostlight Agent State Schema", - "description": "First canonical contract for Ghostlight agent, perception, relationship, event, scene, and dialogue-context state.", - "type": "object", - "required": [ - "schema_version", - "world", - "agents", - "relationships", - "events", - "scenes" - ], - "additionalProperties": false, - "properties": { - "schema_version": { - "const": "ghostlight.agent_state.v0" - }, - "world": { - "$ref": "#/$defs/world_state" - }, - "agents": { - "type": "array", - "items": { - "$ref": "#/$defs/agent" - } - }, - "relationships": { - "type": "array", - "items": { - "$ref": "#/$defs/relationship" - } - }, - "events": { - "type": "array", - "items": { - "$ref": "#/$defs/event" - } - }, - "scenes": { - "type": "array", - "items": { - "$ref": "#/$defs/scene" - } - } - }, - "$defs": { - "world_state": { - "type": "object", - "required": [ - "world_id", - "setting", - "time", - "canon_context" - ], - "additionalProperties": false, - "properties": { - "world_id": { - "type": "string" - }, - "setting": { - "type": "string" - }, - "time": { - "type": "object", - "required": [ - "label" - ], - "additionalProperties": true, - "properties": { - "label": { - "type": "string" - } - } - }, - "canon_context": { - "type": "array", - "items": { - "type": "string" - } - }, - "ambient_pressures": { - "type": "array", - "items": { - "$ref": "#/$defs/pressure" - } - } - } - }, - "agent": { - "type": "object", - "required": [ - "agent_id", - "identity", - "canonical_state", - "goals", - "memories", - "perceived_state_overlays" - ], - "additionalProperties": false, - "properties": { - "agent_id": { - "type": "string" - }, - "identity": { - "$ref": "#/$defs/identity" - }, - "canonical_state": { - "$ref": "#/$defs/canonical_state" - }, - "goals": { - "type": "array", - "items": { - "$ref": "#/$defs/goal" - } - }, - "memories": { - "$ref": "#/$defs/memory_bundle" - }, - "perceived_state_overlays": { - "type": "array", - "items": { - "$ref": "#/$defs/perceived_state_overlay" - } - } - } - }, - "identity": { - "type": "object", - "required": [ - "name", - "roles", - "origin", - "public_description" - ], - "additionalProperties": false, - "properties": { - "name": { - "type": "string" - }, - "roles": { - "type": "array", - "items": { - "type": "string" - } - }, - "origin": { - "type": "string" - }, - "public_description": { - "type": "string" - }, - "private_notes": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "canonical_state": { - "type": "object", - "required": [ - "underlying_organization", - "stable_dispositions", - "behavioral_dimensions", - "presentation_strategy", - "voice_style", - "situational_state", - "values" - ], - "additionalProperties": false, - "properties": { - "underlying_organization": { - "$ref": "#/$defs/variable_map" - }, - "stable_dispositions": { - "$ref": "#/$defs/variable_map" - }, - "behavioral_dimensions": { - "$ref": "#/$defs/variable_map" - }, - "presentation_strategy": { - "$ref": "#/$defs/variable_map" - }, - "situational_state": { - "$ref": "#/$defs/variable_map" - }, - "values": { - "type": "array", - "items": { - "$ref": "#/$defs/value_commitment" - } - }, - "voice_style": { - "$ref": "#/$defs/variable_map" - } - } - }, - "variable_map": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/state_variable" - } - }, - "state_variable": { - "type": "object", - "required": [ - "mean", - "plasticity", - "current_activation" - ], - "additionalProperties": false, - "properties": { - "mean": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "plasticity": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "current_activation": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "evidence": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "value_commitment": { - "type": "object", - "required": [ - "value_id", - "label", - "priority", - "unforgivable_if_betrayed" - ], - "additionalProperties": false, - "properties": { - "value_id": { - "type": "string" - }, - "label": { - "type": "string" - }, - "priority": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "unforgivable_if_betrayed": { - "type": "boolean" - } - } - }, - "goal": { - "type": "object", - "required": [ - "goal_id", - "description", - "scope", - "priority", - "emotional_stake", - "status" - ], - "additionalProperties": false, - "properties": { - "goal_id": { - "type": "string" - }, - "description": { - "type": "string" - }, - "scope": { - "enum": [ - "immediate", - "scene", - "case", - "arc", - "life" - ] - }, - "priority": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "emotional_stake": { - "type": "string" - }, - "blockers": { - "type": "array", - "items": { - "type": "string" - } - }, - "status": { - "enum": [ - "active", - "blocked", - "dormant", - "resolved", - "abandoned" - ] - } - } - }, - "memory_bundle": { - "type": "object", - "required": [ - "episodic", - "semantic", - "relationship_summaries" - ], - "additionalProperties": false, - "properties": { - "episodic": { - "type": "array", - "items": { - "$ref": "#/$defs/memory" - } - }, - "semantic": { - "type": "array", - "items": { - "$ref": "#/$defs/memory" - } - }, - "relationship_summaries": { - "type": "array", - "items": { - "$ref": "#/$defs/memory" - } - } - } - }, - "memory": { - "type": "object", - "required": [ - "memory_id", - "summary", - "salience", - "confidence" - ], - "additionalProperties": false, - "properties": { - "memory_id": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "salience": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "confidence": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "linked_event_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "linked_relationship_id": { - "type": "string" - } - } - }, - "perceived_state_overlay": { - "type": "object", - "required": [ - "observer_agent_id", - "target_agent_id", - "perceived_dimensions", - "beliefs", - "distortions" - ], - "additionalProperties": false, - "properties": { - "observer_agent_id": { - "type": "string" - }, - "target_agent_id": { - "type": "string" - }, - "perceived_dimensions": { - "$ref": "#/$defs/inferred_variable_map" - }, - "beliefs": { - "type": "array", - "items": { - "$ref": "#/$defs/belief" - } - }, - "distortions": { - "type": "array", - "items": { - "enum": [ - "hostile_attribution", - "false_reassurance", - "overread_warmth", - "underread_threat", - "false_mask_detection", - "missed_mask_detection", - "status_injury", - "threat_amplification", - "institutional_suspicion_transfer", - "care_underread", - "mask_overfocus" - ] - } - } - } - }, - "belief": { - "type": "object", - "required": [ - "belief_id", - "claim", - "confidence" - ], - "additionalProperties": false, - "properties": { - "belief_id": { - "type": "string" - }, - "claim": { - "type": "string" - }, - "confidence": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "subject_id": { - "type": "string" - }, - "claim_type": { - "enum": [ - "fact", - "identity_inference", - "motive_inference", - "prediction", - "norm", - "value_read", - "relationship_read" - ] - }, - "evidence_event_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "visibility": { - "enum": [ - "private", - "shared", - "public", - "rumor" - ] - }, - "emotional_charge": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - } - }, - "relationship": { - "type": "object", - "required": [ - "relationship_id", - "source_id", - "target_id", - "stance", - "summary" - ], - "additionalProperties": false, - "properties": { - "relationship_id": { - "type": "string" - }, - "source_id": { - "type": "string" - }, - "target_id": { - "type": "string" - }, - "stance": { - "$ref": "#/$defs/variable_map" - }, - "summary": { - "type": "string" - }, - "unresolved_incident_ids": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "event": { - "type": "object", - "required": [ - "event_id", - "kind", - "summary", - "participants", - "pressure_tags" - ], - "additionalProperties": false, - "properties": { - "event_id": { - "type": "string" - }, - "kind": { - "enum": [ - "dialogue", - "action", - "memory", - "relationship_shift", - "scene_outcome", - "author_note" - ] - }, - "summary": { - "type": "string" - }, - "participants": { - "type": "array", - "items": { - "type": "string" - } - }, - "pressure_tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "observed_exchange": { - "type": "array", - "items": { - "$ref": "#/$defs/event_exchange_turn" - } - }, - "private_interpretations": { - "type": "array", - "items": { - "$ref": "#/$defs/event_private_interpretation" - } - }, - "event_effects": { - "type": "array", - "items": { - "$ref": "#/$defs/event_effect" - } - } - } - }, - "scene": { - "type": "object", - "required": [ - "scene_id", - "location", - "participants", - "public_stakes", - "hidden_stakes", - "dialogue_context_packs" - ], - "additionalProperties": false, - "properties": { - "scene_id": { - "type": "string" - }, - "location": { - "type": "string" - }, - "participants": { - "type": "array", - "items": { - "type": "string" - } - }, - "public_stakes": { - "type": "array", - "items": { - "type": "string" - } - }, - "hidden_stakes": { - "type": "array", - "items": { - "type": "string" - } - }, - "dialogue_context_packs": { - "type": "array", - "items": { - "$ref": "#/$defs/dialogue_context_pack" - } - } - } - }, - "dialogue_context_pack": { - "type": "object", - "required": [ - "speaker_agent_id", - "listener_ids", - "speaker_local_truth", - "speaker_beliefs", - "active_memories", - "active_goals", - "presentation_constraints" - ], - "additionalProperties": false, - "properties": { - "speaker_agent_id": { - "type": "string" - }, - "listener_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "speaker_local_truth": { - "type": "array", - "items": { - "type": "string" - } - }, - "speaker_beliefs": { - "type": "array", - "items": { - "type": "string" - } - }, - "active_memories": { - "type": "array", - "items": { - "type": "string" - } - }, - "active_goals": { - "type": "array", - "items": { - "type": "string" - } - }, - "presentation_constraints": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "pressure": { - "type": "object", - "required": [ - "pressure_id", - "label", - "intensity" - ], - "additionalProperties": false, - "properties": { - "pressure_id": { - "type": "string" - }, - "label": { - "type": "string" - }, - "intensity": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - } - }, - "inferred_variable_map": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/inferred_state_variable" - } - }, - "inferred_state_variable": { - "type": "object", - "required": [ - "observed_activation", - "attributed_disposition", - "confidence" - ], - "additionalProperties": false, - "properties": { - "observed_activation": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "attributed_disposition": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "confidence": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "evidence": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "event_exchange_turn": { - "type": "object", - "required": [ - "speaker_id", - "utterance_summary", - "dialogue_function" - ], - "additionalProperties": false, - "properties": { - "speaker_id": { - "type": "string" - }, - "utterance_summary": { - "type": "string" - }, - "dialogue_function": { - "type": "string" - }, - "observable_cues": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "event_private_interpretation": { - "type": "object", - "required": [ - "agent_id", - "interpretation", - "confidence" - ], - "additionalProperties": false, - "properties": { - "agent_id": { - "type": "string" - }, - "interpretation": { - "type": "string" - }, - "attributed_motive": { - "type": "string" - }, - "appraisal_tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "confidence": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - } - }, - "event_effect": { - "type": "object", - "required": [ - "agent_id", - "summary" - ], - "additionalProperties": false, - "properties": { - "agent_id": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "state_deltas": { - "type": "array", - "items": { - "$ref": "#/$defs/state_delta" - } - }, - "new_belief_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "memory_update_ids": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "state_delta": { - "type": "object", - "required": [ - "path", - "delta" - ], - "additionalProperties": false, - "properties": { - "path": { - "type": "string" - }, - "delta": { - "type": "number", - "minimum": -1, - "maximum": 1 - } - } - } - } -} diff --git a/src/GameCult.Networking/GameCult.Networking.csproj b/src/GameCult.Networking/GameCult.Networking.csproj index f275484f..7f9024eb 100644 --- a/src/GameCult.Networking/GameCult.Networking.csproj +++ b/src/GameCult.Networking/GameCult.Networking.csproj @@ -18,6 +18,6 @@ - + diff --git a/tests/GameCult.Networking.InteropPeer/Program.cs b/tests/GameCult.Networking.InteropPeer/Program.cs index 953ee097..2c0f51ce 100644 --- a/tests/GameCult.Networking.InteropPeer/Program.cs +++ b/tests/GameCult.Networking.InteropPeer/Program.cs @@ -1452,16 +1452,16 @@ static class InteropPeerShared public const string InteropDocumentType = "cultnet.interop-note"; public const string InteropSchemaVersion = "cultnet.interop_note.v0"; public const string MutationIntentDocumentType = "cultnet.interop-note-mutation-intent"; - public const string MutationIntentSchemaId = "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.interop-note-mutation-intent.schema.json"; + public const string MutationIntentSchemaId = "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.interop-note-mutation-intent.schema.json"; public const string MutationIntentSchemaVersion = "cultnet.interop_note_mutation_intent.v0"; public const string MutationReceiptDocumentType = "cultnet.interop-note-mutation-receipt"; - public const string MutationReceiptSchemaId = "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.interop-note-mutation-receipt.schema.json"; + public const string MutationReceiptSchemaId = "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.interop-note-mutation-receipt.schema.json"; public const string MutationReceiptSchemaVersion = "cultnet.interop_note_mutation_receipt.v0"; public const string FireCommandDocumentType = "cultnet.interop-fire-weapon-command"; - public const string FireCommandSchemaId = "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.interop-fire-weapon-command.schema.json"; + public const string FireCommandSchemaId = "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.interop-fire-weapon-command.schema.json"; public const string FireCommandSchemaVersion = "cultnet.interop_fire_weapon_command.v0"; public const string FireReceiptDocumentType = "cultnet.interop-fire-weapon-receipt"; - public const string FireReceiptSchemaId = "https://github.com/GameCult/cultnet-ts/integration/contracts/cultnet.interop-fire-weapon-receipt.schema.json"; + public const string FireReceiptSchemaId = "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.interop-fire-weapon-receipt.schema.json"; public const string FireReceiptSchemaVersion = "cultnet.interop_fire_weapon_receipt.v0"; public const string DiscoveryProbeSchemaVersion = "cultnet.discovery_probe.v0"; public const string DiscoveryAnnounceSchemaVersion = "cultnet.discovery_announce.v0";