@agent-teams/docs-protocol-agent-teams 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/LICENSE +201 -0
- package/README.md +24 -0
- package/assets/catalog.json +1 -0
- package/assets/docs-protocol.yml +14 -0
- package/assets/history/sha256-097df9fe1b90ab45f73389c8b69736f8a54d4199b09536d586222b5a7f0fbb09/caller.yml +13 -0
- package/assets/history/sha256-3e53262efc8a530b532380dac21d876456473d3b88aba20889a1d24823bf3a1b/caller.yml +14 -0
- package/assets/history/sha256-51d3f02a352ce2c3b0a4068a86b6899a57ab54b0a876c468e3fb3e536519caca/caller.yml +14 -0
- package/assets/history/sha256-641265ef9ecff59c16482fdae1bc8fc56002b5a4a1ee34b102438d0ca08a86a3/skill.md +29 -0
- package/assets/history/sha256-7907195753506e4b0f0e89eb3f6e495bacbd79e9b9913c9f60fc4a07dffb22e5/caller.yml +14 -0
- package/assets/history/sha256-7b31cd257532247f64c55a014dc926c601e4d742176cfb8513b6b0d8ab48213e/skill.md +28 -0
- package/assets/history/sha256-d697c5c7c9bcfccfc006fcf7e4d4cc8e7c629f9689781b9b0b50f30d82bc019e/caller.yml +14 -0
- package/assets/history/sha256-f21dc19277a4ba24bcef90a7071c9cf50adf144769f42d6f74ff4eac9ef117cf/caller.yml +14 -0
- package/assets/history/sha256-fd633c3c6337e5cfe51a9f36989bb654381634c5ab4add9e4da71fe40ab4e0dd/caller.yml +14 -0
- package/assets/transition-catalog.json +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +4 -0
- package/dist/cli.js.map +1 -0
- package/dist/composition/managed-cli-input.d.ts +11 -0
- package/dist/composition/managed-cli-input.d.ts.map +1 -0
- package/dist/composition/managed-cli-input.js +52 -0
- package/dist/composition/managed-cli-input.js.map +1 -0
- package/dist/composition/managed-cli.d.ts +2 -0
- package/dist/composition/managed-cli.d.ts.map +1 -0
- package/dist/composition/managed-cli.js +17 -0
- package/dist/composition/managed-cli.js.map +1 -0
- package/dist/composition/qualification-cli.d.ts +2 -0
- package/dist/composition/qualification-cli.d.ts.map +1 -0
- package/dist/composition/qualification-cli.js +119 -0
- package/dist/composition/qualification-cli.js.map +1 -0
- package/dist/consumer-integration/adapters/agents-route-adapter-v1.d.ts +10 -0
- package/dist/consumer-integration/adapters/agents-route-adapter-v1.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/agents-route-adapter-v1.js +99 -0
- package/dist/consumer-integration/adapters/agents-route-adapter-v1.js.map +1 -0
- package/dist/consumer-integration/adapters/bounded-repository-topology.d.ts +8 -0
- package/dist/consumer-integration/adapters/bounded-repository-topology.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/bounded-repository-topology.js +80 -0
- package/dist/consumer-integration/adapters/bounded-repository-topology.js.map +1 -0
- package/dist/consumer-integration/adapters/consumer-integration-node-error.d.ts +5 -0
- package/dist/consumer-integration/adapters/consumer-integration-node-error.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/consumer-integration-node-error.js +9 -0
- package/dist/consumer-integration/adapters/consumer-integration-node-error.js.map +1 -0
- package/dist/consumer-integration/adapters/consumer-integration-schema-validator.d.ts +4 -0
- package/dist/consumer-integration/adapters/consumer-integration-schema-validator.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/consumer-integration-schema-validator.js +51 -0
- package/dist/consumer-integration/adapters/consumer-integration-schema-validator.js.map +1 -0
- package/dist/consumer-integration/adapters/consumer-upgrade-file-projectors.d.ts +21 -0
- package/dist/consumer-integration/adapters/consumer-upgrade-file-projectors.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/consumer-upgrade-file-projectors.js +145 -0
- package/dist/consumer-integration/adapters/consumer-upgrade-file-projectors.js.map +1 -0
- package/dist/consumer-integration/adapters/foundation-known-file-transaction.d.ts +3 -0
- package/dist/consumer-integration/adapters/foundation-known-file-transaction.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/foundation-known-file-transaction.js +7 -0
- package/dist/consumer-integration/adapters/foundation-known-file-transaction.js.map +1 -0
- package/dist/consumer-integration/adapters/github-cohort-authority-reader.d.ts +21 -0
- package/dist/consumer-integration/adapters/github-cohort-authority-reader.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/github-cohort-authority-reader.js +215 -0
- package/dist/consumer-integration/adapters/github-cohort-authority-reader.js.map +1 -0
- package/dist/consumer-integration/adapters/node-consumer-integration-repository.d.ts +13 -0
- package/dist/consumer-integration/adapters/node-consumer-integration-repository.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/node-consumer-integration-repository.js +213 -0
- package/dist/consumer-integration/adapters/node-consumer-integration-repository.js.map +1 -0
- package/dist/consumer-integration/adapters/node-consumer-repository-files.d.ts +11 -0
- package/dist/consumer-integration/adapters/node-consumer-repository-files.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/node-consumer-repository-files.js +81 -0
- package/dist/consumer-integration/adapters/node-consumer-repository-files.js.map +1 -0
- package/dist/consumer-integration/adapters/node-consumer-upgrade-sandbox.d.ts +19 -0
- package/dist/consumer-integration/adapters/node-consumer-upgrade-sandbox.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/node-consumer-upgrade-sandbox.js +307 -0
- package/dist/consumer-integration/adapters/node-consumer-upgrade-sandbox.js.map +1 -0
- package/dist/consumer-integration/adapters/package-consumer-asset-catalog.d.ts +5 -0
- package/dist/consumer-integration/adapters/package-consumer-asset-catalog.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/package-consumer-asset-catalog.js +150 -0
- package/dist/consumer-integration/adapters/package-consumer-asset-catalog.js.map +1 -0
- package/dist/consumer-integration/adapters/pnpm-lockfile-policy-v1.d.ts +3 -0
- package/dist/consumer-integration/adapters/pnpm-lockfile-policy-v1.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/pnpm-lockfile-policy-v1.js +37 -0
- package/dist/consumer-integration/adapters/pnpm-lockfile-policy-v1.js.map +1 -0
- package/dist/consumer-integration/adapters/pnpm-lockfile-validator-v1.d.ts +3 -0
- package/dist/consumer-integration/adapters/pnpm-lockfile-validator-v1.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/pnpm-lockfile-validator-v1.js +120 -0
- package/dist/consumer-integration/adapters/pnpm-lockfile-validator-v1.js.map +1 -0
- package/dist/consumer-integration/adapters/pnpm-manifest-adapter-v1.d.ts +15 -0
- package/dist/consumer-integration/adapters/pnpm-manifest-adapter-v1.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/pnpm-manifest-adapter-v1.js +189 -0
- package/dist/consumer-integration/adapters/pnpm-manifest-adapter-v1.js.map +1 -0
- package/dist/consumer-integration/adapters/pnpm-runtime-closure-v1.d.ts +8 -0
- package/dist/consumer-integration/adapters/pnpm-runtime-closure-v1.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/pnpm-runtime-closure-v1.js +245 -0
- package/dist/consumer-integration/adapters/pnpm-runtime-closure-v1.js.map +1 -0
- package/dist/consumer-integration/adapters/strict-json-record.d.ts +3 -0
- package/dist/consumer-integration/adapters/strict-json-record.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/strict-json-record.js +27 -0
- package/dist/consumer-integration/adapters/strict-json-record.js.map +1 -0
- package/dist/consumer-integration/application/model/consumer-integration-execution.d.ts +11 -0
- package/dist/consumer-integration/application/model/consumer-integration-execution.d.ts.map +1 -0
- package/dist/consumer-integration/application/model/consumer-integration-execution.js +2 -0
- package/dist/consumer-integration/application/model/consumer-integration-execution.js.map +1 -0
- package/dist/consumer-integration/application/model/consumer-upgrade-execution.d.ts +18 -0
- package/dist/consumer-integration/application/model/consumer-upgrade-execution.d.ts.map +1 -0
- package/dist/consumer-integration/application/model/consumer-upgrade-execution.js +2 -0
- package/dist/consumer-integration/application/model/consumer-upgrade-execution.js.map +1 -0
- package/dist/consumer-integration/application/policies/consumer-integration-assets.d.ts +58 -0
- package/dist/consumer-integration/application/policies/consumer-integration-assets.d.ts.map +1 -0
- package/dist/consumer-integration/application/policies/consumer-integration-assets.js +154 -0
- package/dist/consumer-integration/application/policies/consumer-integration-assets.js.map +1 -0
- package/dist/consumer-integration/application/policies/consumer-integration-authority-guards.d.ts +4 -0
- package/dist/consumer-integration/application/policies/consumer-integration-authority-guards.d.ts.map +1 -0
- package/dist/consumer-integration/application/policies/consumer-integration-authority-guards.js +23 -0
- package/dist/consumer-integration/application/policies/consumer-integration-authority-guards.js.map +1 -0
- package/dist/consumer-integration/application/policies/consumer-integration-desired-state.d.ts +4 -0
- package/dist/consumer-integration/application/policies/consumer-integration-desired-state.d.ts.map +1 -0
- package/dist/consumer-integration/application/policies/consumer-integration-desired-state.js +153 -0
- package/dist/consumer-integration/application/policies/consumer-integration-desired-state.js.map +1 -0
- package/dist/consumer-integration/application/policies/consumer-integration-prior-cohort.d.ts +14 -0
- package/dist/consumer-integration/application/policies/consumer-integration-prior-cohort.d.ts.map +1 -0
- package/dist/consumer-integration/application/policies/consumer-integration-prior-cohort.js +186 -0
- package/dist/consumer-integration/application/policies/consumer-integration-prior-cohort.js.map +1 -0
- package/dist/consumer-integration/application/ports/consumer-integration-lifecycle.d.ts +31 -0
- package/dist/consumer-integration/application/ports/consumer-integration-lifecycle.d.ts.map +1 -0
- package/dist/consumer-integration/application/ports/consumer-integration-lifecycle.js +2 -0
- package/dist/consumer-integration/application/ports/consumer-integration-lifecycle.js.map +1 -0
- package/dist/consumer-integration/application/ports/consumer-integration-planners.d.ts +35 -0
- package/dist/consumer-integration/application/ports/consumer-integration-planners.d.ts.map +1 -0
- package/dist/consumer-integration/application/ports/consumer-integration-planners.js +2 -0
- package/dist/consumer-integration/application/ports/consumer-integration-planners.js.map +1 -0
- package/dist/consumer-integration/application/ports/consumer-upgrade.d.ts +28 -0
- package/dist/consumer-integration/application/ports/consumer-upgrade.d.ts.map +1 -0
- package/dist/consumer-integration/application/ports/consumer-upgrade.js +2 -0
- package/dist/consumer-integration/application/ports/consumer-upgrade.js.map +1 -0
- package/dist/consumer-integration/application/use-cases/plan-consumer-integration.d.ts +15 -0
- package/dist/consumer-integration/application/use-cases/plan-consumer-integration.d.ts.map +1 -0
- package/dist/consumer-integration/application/use-cases/plan-consumer-integration.js +350 -0
- package/dist/consumer-integration/application/use-cases/plan-consumer-integration.js.map +1 -0
- package/dist/consumer-integration/application/use-cases/run-consumer-integration.d.ts +29 -0
- package/dist/consumer-integration/application/use-cases/run-consumer-integration.d.ts.map +1 -0
- package/dist/consumer-integration/application/use-cases/run-consumer-integration.js +139 -0
- package/dist/consumer-integration/application/use-cases/run-consumer-integration.js.map +1 -0
- package/dist/consumer-integration/application/use-cases/upgrade-consumer-integration.d.ts +13 -0
- package/dist/consumer-integration/application/use-cases/upgrade-consumer-integration.d.ts.map +1 -0
- package/dist/consumer-integration/application/use-cases/upgrade-consumer-integration.js +134 -0
- package/dist/consumer-integration/application/use-cases/upgrade-consumer-integration.js.map +1 -0
- package/dist/consumer-integration/composition/consumer-integration-cli.d.ts +3 -0
- package/dist/consumer-integration/composition/consumer-integration-cli.d.ts.map +1 -0
- package/dist/consumer-integration/composition/consumer-integration-cli.js +241 -0
- package/dist/consumer-integration/composition/consumer-integration-cli.js.map +1 -0
- package/dist/consumer-integration/composition/consumer-integration-planner.d.ts +19 -0
- package/dist/consumer-integration/composition/consumer-integration-planner.d.ts.map +1 -0
- package/dist/consumer-integration/composition/consumer-integration-planner.js +14 -0
- package/dist/consumer-integration/composition/consumer-integration-planner.js.map +1 -0
- package/dist/consumer-integration/composition/node-consumer-integration.d.ts +26 -0
- package/dist/consumer-integration/composition/node-consumer-integration.d.ts.map +1 -0
- package/dist/consumer-integration/composition/node-consumer-integration.js +38 -0
- package/dist/consumer-integration/composition/node-consumer-integration.js.map +1 -0
- package/dist/consumer-integration/domain/model.d.ts +111 -0
- package/dist/consumer-integration/domain/model.d.ts.map +1 -0
- package/dist/consumer-integration/domain/model.js +2 -0
- package/dist/consumer-integration/domain/model.js.map +1 -0
- package/dist/consumer-integration/generated/canonical-assets.d.ts +5 -0
- package/dist/consumer-integration/generated/canonical-assets.d.ts.map +1 -0
- package/dist/consumer-integration/generated/canonical-assets.js +6 -0
- package/dist/consumer-integration/generated/canonical-assets.js.map +1 -0
- package/dist/consumer-integration/index.d.ts +12 -0
- package/dist/consumer-integration/index.d.ts.map +1 -0
- package/dist/consumer-integration/index.js +7 -0
- package/dist/consumer-integration/index.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/qualification/index.d.ts +3 -0
- package/dist/qualification/index.d.ts.map +1 -0
- package/dist/qualification/index.js +2 -0
- package/dist/qualification/index.js.map +1 -0
- package/dist/qualification/managed-command-envelope-validator.d.ts +14 -0
- package/dist/qualification/managed-command-envelope-validator.d.ts.map +1 -0
- package/dist/qualification/managed-command-envelope-validator.js +33 -0
- package/dist/qualification/managed-command-envelope-validator.js.map +1 -0
- package/dist/qualification/qualification-v2-runner.d.ts +4 -0
- package/dist/qualification/qualification-v2-runner.d.ts.map +1 -0
- package/dist/qualification/qualification-v2-runner.js +344 -0
- package/dist/qualification/qualification-v2-runner.js.map +1 -0
- package/dist/qualification/v2-contract.d.ts +91 -0
- package/dist/qualification/v2-contract.d.ts.map +1 -0
- package/dist/qualification/v2-contract.js +2 -0
- package/dist/qualification/v2-contract.js.map +1 -0
- package/package.json +66 -0
- package/schemas/docs-consumer-integration-execution/v1.schema.json +29 -0
- package/schemas/docs-consumer-integration-plan/v1.schema.json +63 -0
- package/schemas/docs-consumer-integration-profile/v1.schema.json +110 -0
- package/schemas/docs-consumer-integration-profile/v2.schema.json +283 -0
- package/schemas/docs-consumer-managed-state/v1.schema.json +99 -0
- package/schemas/docs-consumer-upgrade-execution/v1.schema.json +44 -0
- package/schemas/docs-protocol-command-envelope/v1.schema.json +239 -0
- package/schemas/docs-protocol-command-envelope/v2.schema.json +285 -0
- package/schemas/docs-protocol-command-envelope/v3.schema.json +529 -0
- package/schemas/docs-protocol-profile/v1.schema.json +46 -0
- package/schemas/docs-protocol-profile/v2.schema.json +46 -0
- package/schemas/docs-protocol-qualification/v2.schema.json +78 -0
- package/schemas/docs-protocol-qualification-receipt/v2.schema.json +113 -0
- package/schemas/qualified-docs-cohort/v1.schema.json +96 -0
- package/skills/docs/SKILL.md +29 -0
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agent-teams.ai/schemas/docs-protocol-command-envelope/v1",
|
|
4
|
+
"title": "Agent Teams Docs Protocol Command Envelope",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "protocol", "command", "outcome", "diagnostics", "result"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": 1 },
|
|
10
|
+
"protocol": { "$ref": "#/$defs/protocol" },
|
|
11
|
+
"command": { "enum": ["docs.info", "docs.find", "docs.new", "docs.doctor", "docs.recover", "docs.check"] },
|
|
12
|
+
"outcome": { "enum": ["success", "conflict", "violation", "authority-stale", "recovery-required", "invalid-input", "execution-failure", "cancelled"] },
|
|
13
|
+
"diagnostics": { "type": "array", "maxItems": 256, "items": { "$ref": "#/$defs/diagnostic" } },
|
|
14
|
+
"result": {
|
|
15
|
+
"oneOf": [
|
|
16
|
+
{ "$ref": "#/$defs/emptyResult" },
|
|
17
|
+
{ "$ref": "#/$defs/infoResult" },
|
|
18
|
+
{ "$ref": "#/$defs/findResult" },
|
|
19
|
+
{ "$ref": "#/$defs/newResult" },
|
|
20
|
+
{ "$ref": "#/$defs/doctorResult" },
|
|
21
|
+
{ "$ref": "#/$defs/recoverResult" },
|
|
22
|
+
{ "$ref": "#/$defs/checkResult" }
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"allOf": [
|
|
27
|
+
{ "$ref": "#/$defs/infoEnvelope" },
|
|
28
|
+
{ "$ref": "#/$defs/findEnvelope" },
|
|
29
|
+
{ "$ref": "#/$defs/newEnvelope" },
|
|
30
|
+
{ "$ref": "#/$defs/doctorEnvelope" },
|
|
31
|
+
{ "$ref": "#/$defs/recoverEnvelope" },
|
|
32
|
+
{ "$ref": "#/$defs/checkEnvelope" }
|
|
33
|
+
],
|
|
34
|
+
"$defs": {
|
|
35
|
+
"protocol": {
|
|
36
|
+
"type": "object", "additionalProperties": false, "required": ["id", "version"],
|
|
37
|
+
"properties": { "id": { "const": "agent-teams.docs-protocol" }, "version": { "const": 1 } }
|
|
38
|
+
},
|
|
39
|
+
"lowerId": { "type": "string", "minLength": 1, "maxLength": 160, "pattern": "^[a-z0-9][a-z0-9._/-]*$" },
|
|
40
|
+
"opaqueId": { "type": "string", "minLength": 1, "maxLength": 214, "pattern": "^[A-Za-z0-9@][A-Za-z0-9@._/-]*$" },
|
|
41
|
+
"repositoryPath": { "type": "string", "minLength": 1, "maxLength": 512, "pattern": "^(?!.*(?:^|/)\\.{1,2}(?:/|$))[A-Za-z0-9._@-]{1,255}(?:/[A-Za-z0-9._@-]{1,255})*$" },
|
|
42
|
+
"digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
|
|
43
|
+
"emptyResult": { "type": "object", "additionalProperties": false, "maxProperties": 0 },
|
|
44
|
+
"diagnostic": {
|
|
45
|
+
"type": "object", "additionalProperties": false,
|
|
46
|
+
"required": ["ruleId", "severity", "phase", "subject", "message"],
|
|
47
|
+
"properties": {
|
|
48
|
+
"ruleId": { "$ref": "#/$defs/opaqueId" },
|
|
49
|
+
"severity": { "enum": ["error", "info", "warning"] },
|
|
50
|
+
"phase": { "enum": ["apply", "authority", "input", "planning", "query", "recovery"] },
|
|
51
|
+
"subject": { "type": "string", "minLength": 1, "maxLength": 512 },
|
|
52
|
+
"message": { "type": "string", "minLength": 1, "maxLength": 1000 }
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"jsonValue": {
|
|
56
|
+
"oneOf": [
|
|
57
|
+
{ "type": "boolean" },
|
|
58
|
+
{ "type": "null" },
|
|
59
|
+
{ "type": "number" },
|
|
60
|
+
{ "type": "string" },
|
|
61
|
+
{ "type": "array", "maxItems": 10000, "items": { "$ref": "#/$defs/jsonValue" } },
|
|
62
|
+
{ "type": "object", "maxProperties": 10000, "additionalProperties": { "$ref": "#/$defs/jsonValue" } }
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"foundationProfile": {
|
|
66
|
+
"type": "object", "additionalProperties": false,
|
|
67
|
+
"required": ["path", "schemaVersion", "metadataSidecarPolicy"],
|
|
68
|
+
"properties": {
|
|
69
|
+
"path": { "$ref": "#/$defs/repositoryPath" },
|
|
70
|
+
"schemaVersion": { "const": 2 },
|
|
71
|
+
"metadataSidecarPolicy": { "const": "foundation-profile-v2-strict-merge" }
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"metadataSidecar": {
|
|
75
|
+
"oneOf": [
|
|
76
|
+
{ "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "const": "none" } } },
|
|
77
|
+
{ "type": "object", "additionalProperties": false, "required": ["kind", "path"], "properties": { "kind": { "const": "path-metadata-map" }, "path": { "$ref": "#/$defs/repositoryPath" } } }
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
"identity": {
|
|
81
|
+
"type": "object", "additionalProperties": false, "required": ["kind", "format"],
|
|
82
|
+
"properties": {
|
|
83
|
+
"kind": { "const": "explicit" },
|
|
84
|
+
"format": { "enum": ["adr-four-digits", "open-decision-three-digits", "qualified"] },
|
|
85
|
+
"grammar": {
|
|
86
|
+
"type": "object", "additionalProperties": false,
|
|
87
|
+
"required": ["prefixSegments", "minSuffixSegments", "maxSuffixSegments"],
|
|
88
|
+
"properties": {
|
|
89
|
+
"prefixSegments": { "type": "array", "minItems": 1, "maxItems": 8, "items": { "$ref": "#/$defs/lowerId" } },
|
|
90
|
+
"minSuffixSegments": { "type": "integer", "minimum": 1, "maximum": 16 },
|
|
91
|
+
"maxSuffixSegments": { "type": "integer", "minimum": 1, "maximum": 16 }
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"placement": {
|
|
97
|
+
"oneOf": [
|
|
98
|
+
{
|
|
99
|
+
"type": "object", "additionalProperties": false, "required": ["kind", "directory", "filename"],
|
|
100
|
+
"properties": { "kind": { "const": "collection" }, "directory": { "$ref": "#/$defs/repositoryPath" }, "filename": { "enum": ["numeric-id-slug", "id-slug", "slug", "README.md"] } }
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"type": "object", "additionalProperties": false, "required": ["kind", "root", "requiredBasename"],
|
|
104
|
+
"properties": { "kind": { "const": "qualified-leaf-index" }, "root": { "$ref": "#/$defs/repositoryPath" }, "requiredBasename": { "const": "README.md" } }
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "object", "additionalProperties": false,
|
|
108
|
+
"required": ["kind", "allowedRoots", "requiredSegmentsInOrder", "requiredBasename", "minimumSegmentsBeforeRequired", "minimumSegmentsAfterRequired"],
|
|
109
|
+
"properties": {
|
|
110
|
+
"kind": { "const": "explicit" },
|
|
111
|
+
"allowedRoots": { "type": "array", "minItems": 1, "maxItems": 32, "items": { "$ref": "#/$defs/repositoryPath" } },
|
|
112
|
+
"requiredSegmentsInOrder": { "type": "array", "minItems": 1, "maxItems": 16, "items": { "type": "string", "pattern": "^[A-Za-z0-9._@-]+$", "maxLength": 255 } },
|
|
113
|
+
"requiredBasename": { "const": "README.md" },
|
|
114
|
+
"minimumSegmentsBeforeRequired": { "type": "integer", "minimum": 0, "maximum": 16 },
|
|
115
|
+
"minimumSegmentsAfterRequired": { "type": "integer", "minimum": 0, "maximum": 16 }
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
"reachability": {
|
|
121
|
+
"oneOf": [
|
|
122
|
+
{ "type": "object", "additionalProperties": false, "required": ["kind", "indexPath"], "properties": { "kind": { "const": "manual-fixed-index" }, "indexPath": { "$ref": "#/$defs/repositoryPath" } } },
|
|
123
|
+
{ "type": "object", "additionalProperties": false, "required": ["kind", "pathPrefix", "indexBasename"], "properties": { "kind": { "const": "manual-colocated-index" }, "pathPrefix": { "const": "before-required-segments" }, "indexBasename": { "const": "README.md" } } },
|
|
124
|
+
{ "type": "object", "additionalProperties": false, "required": ["kind", "reason"], "properties": { "kind": { "const": "not-required" }, "reason": { "type": "string", "minLength": 1, "maxLength": 500 } } }
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
"typeInfo": {
|
|
128
|
+
"type": "object", "additionalProperties": false,
|
|
129
|
+
"required": ["type", "initialStatus", "allowedOwnerIds", "identity", "heading", "placement", "template", "requiredMetadata", "reachability"],
|
|
130
|
+
"properties": {
|
|
131
|
+
"type": { "$ref": "#/$defs/lowerId" },
|
|
132
|
+
"initialStatus": { "$ref": "#/$defs/lowerId" },
|
|
133
|
+
"allowedOwnerIds": { "type": "array", "minItems": 1, "maxItems": 4096, "items": { "$ref": "#/$defs/opaqueId" } },
|
|
134
|
+
"identity": { "$ref": "#/$defs/identity" },
|
|
135
|
+
"heading": { "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "enum": ["id-colon-title", "title"] } } },
|
|
136
|
+
"placement": { "$ref": "#/$defs/placement" },
|
|
137
|
+
"template": { "type": "object", "additionalProperties": false, "required": ["kind", "path"], "properties": { "kind": { "const": "fenced-markdown-body" }, "path": { "$ref": "#/$defs/repositoryPath" } } },
|
|
138
|
+
"requiredMetadata": { "type": "array", "minItems": 5, "maxItems": 128, "items": { "type": "string", "maxLength": 128 } },
|
|
139
|
+
"reachability": { "$ref": "#/$defs/reachability" }
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"infoResult": {
|
|
143
|
+
"type": "object", "additionalProperties": false,
|
|
144
|
+
"required": ["kind", "projectId", "protocol", "foundationProfile", "agentWorkflow", "metadataSchemaPath", "metadataSidecar", "ownerIds", "types", "semanticValidatorIds"],
|
|
145
|
+
"properties": {
|
|
146
|
+
"kind": { "const": "info" }, "projectId": { "$ref": "#/$defs/lowerId" }, "protocol": { "$ref": "#/$defs/protocol" },
|
|
147
|
+
"foundationProfile": { "$ref": "#/$defs/foundationProfile" },
|
|
148
|
+
"agentWorkflow": { "type": "object", "additionalProperties": false, "required": ["skillPath"], "properties": { "skillPath": { "$ref": "#/$defs/repositoryPath" } } },
|
|
149
|
+
"metadataSchemaPath": { "$ref": "#/$defs/repositoryPath" }, "metadataSidecar": { "$ref": "#/$defs/metadataSidecar" },
|
|
150
|
+
"ownerIds": { "type": "array", "maxItems": 4096, "items": { "$ref": "#/$defs/opaqueId" } },
|
|
151
|
+
"types": { "type": "array", "minItems": 1, "maxItems": 32, "items": { "$ref": "#/$defs/typeInfo" } },
|
|
152
|
+
"semanticValidatorIds": { "type": "array", "maxItems": 256, "items": { "$ref": "#/$defs/lowerId" } }
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"document": {
|
|
156
|
+
"type": "object", "additionalProperties": false,
|
|
157
|
+
"required": ["id", "type", "status", "owner", "summary", "title", "repositoryPath", "source", "metadata", "related", "blockedBy"],
|
|
158
|
+
"properties": {
|
|
159
|
+
"id": { "$ref": "#/$defs/opaqueId" }, "type": { "$ref": "#/$defs/lowerId" }, "status": { "$ref": "#/$defs/lowerId" },
|
|
160
|
+
"owner": { "$ref": "#/$defs/opaqueId" }, "summary": { "type": "string", "minLength": 1, "maxLength": 1000 },
|
|
161
|
+
"title": { "type": "string", "minLength": 1, "maxLength": 240 }, "repositoryPath": { "$ref": "#/$defs/repositoryPath" },
|
|
162
|
+
"source": { "enum": ["frontmatter-readme", "markdown-tree"] },
|
|
163
|
+
"metadata": { "type": "object", "maxProperties": 10000, "additionalProperties": { "$ref": "#/$defs/jsonValue" } },
|
|
164
|
+
"related": { "type": "array", "maxItems": 256, "items": { "$ref": "#/$defs/opaqueId" } },
|
|
165
|
+
"blockedBy": { "type": "array", "maxItems": 256, "items": { "$ref": "#/$defs/opaqueId" } }
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"findResult": { "type": "object", "additionalProperties": false, "required": ["kind", "matches", "documents"], "properties": { "kind": { "const": "find" }, "matches": { "type": "integer", "minimum": 0, "maximum": 10000 }, "documents": { "type": "array", "maxItems": 10000, "items": { "$ref": "#/$defs/document" } } } },
|
|
169
|
+
"reachabilityAction": {
|
|
170
|
+
"oneOf": [
|
|
171
|
+
{ "type": "object", "additionalProperties": false, "required": ["state", "indexPath", "markdownLink"], "properties": { "state": { "const": "manual-required" }, "indexPath": { "$ref": "#/$defs/repositoryPath" }, "markdownLink": { "type": "string", "minLength": 1, "maxLength": 1024 } } },
|
|
172
|
+
{ "type": "object", "additionalProperties": false, "required": ["state", "reason"], "properties": { "state": { "const": "not-required" }, "reason": { "type": "string", "minLength": 1, "maxLength": 500 } } }
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
"recovery": { "type": "object", "additionalProperties": false, "required": ["commandId", "args"], "properties": { "commandId": { "enum": ["detach", "docs.recover", "docs-recover", "scaffold-recover"] }, "args": { "type": "object", "maxProperties": 16, "additionalProperties": { "type": "string", "maxLength": 512 } } } },
|
|
176
|
+
"receiptEvidence": {
|
|
177
|
+
"type": "object", "additionalProperties": false, "required": ["outcome", "commit"],
|
|
178
|
+
"properties": {
|
|
179
|
+
"outcome": { "enum": ["applied", "already-applied", "authority-stale", "rejected", "recovery-required", "manual-recovery-required", "failed-before-publication", "cancelled"] },
|
|
180
|
+
"commit": { "type": "object", "additionalProperties": false, "required": ["state", "publication", "recoverability"], "properties": { "state": { "enum": ["committed", "not-published", "recovery-required", "manual-recovery-required"] }, "publication": { "enum": ["none", "preexisting-exact", "published", "unknown"] }, "recoverability": { "enum": ["not-required", "preserved-for-recovery"] } } },
|
|
181
|
+
"directoryMaterialization": { "type": "object", "additionalProperties": false, "required": ["state", "plannedDirectories", "observedCreatedDirectories"], "properties": { "state": { "enum": ["none-created", "created-and-retained", "preserved-unknown"] }, "plannedDirectories": { "type": "array", "maxItems": 128, "items": { "$ref": "#/$defs/repositoryPath" } }, "observedCreatedDirectories": { "type": "array", "maxItems": 128, "items": { "$ref": "#/$defs/repositoryPath" } } } }
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"transaction": {
|
|
185
|
+
"type": "object", "additionalProperties": false, "required": ["state"],
|
|
186
|
+
"properties": { "state": { "enum": ["idle", "recoverable", "manual-recovery-required"] }, "transactionKind": { "enum": ["corrupt", "document", "local-mode", "scaffold", "transition-residue", "unknown", "version-mismatch"] }, "reason": { "type": "string", "minLength": 1, "maxLength": 1000 }, "recovery": { "$ref": "#/$defs/recovery" } }
|
|
187
|
+
},
|
|
188
|
+
"newResult": {
|
|
189
|
+
"oneOf": [
|
|
190
|
+
{ "type": "object", "additionalProperties": false, "required": ["kind", "reservation", "writeState", "transaction"], "properties": { "kind": { "const": "new" }, "reservation": { "const": "none" }, "writeState": { "const": "blocked" }, "transaction": { "$ref": "#/$defs/transaction" } } },
|
|
191
|
+
{ "type": "object", "additionalProperties": false, "required": ["kind", "reservation", "writeState", "reason"], "properties": { "kind": { "const": "new" }, "reservation": { "const": "none" }, "writeState": { "const": "blocked" }, "reason": { "enum": ["adoption-invalid", "authority-stale"] } } },
|
|
192
|
+
{ "type": "object", "additionalProperties": false, "required": ["kind", "reservation", "writeState", "documentPath", "planDigest", "reachability"], "properties": { "kind": { "const": "new" }, "reservation": { "const": "none" }, "writeState": { "const": "preview" }, "documentPath": { "$ref": "#/$defs/repositoryPath" }, "planDigest": { "$ref": "#/$defs/digest" }, "reachability": { "$ref": "#/$defs/reachabilityAction" } } },
|
|
193
|
+
{ "type": "object", "additionalProperties": false, "required": ["kind", "reservation", "writeState", "documentPath", "planDigest", "receiptDigest", "receiptOutcome", "receipt"], "properties": { "kind": { "const": "new" }, "reservation": { "const": "none" }, "writeState": { "enum": ["applied", "already-applied", "published-recovery-required", "unchanged", "unknown"] }, "documentPath": { "$ref": "#/$defs/repositoryPath" }, "planDigest": { "$ref": "#/$defs/digest" }, "receiptDigest": { "$ref": "#/$defs/digest" }, "receiptOutcome": { "enum": ["applied", "already-applied", "authority-stale", "rejected", "recovery-required", "manual-recovery-required", "failed-before-publication", "cancelled"] }, "receipt": { "$ref": "#/$defs/receiptEvidence" }, "reachability": { "$ref": "#/$defs/reachabilityAction" } } }
|
|
194
|
+
]
|
|
195
|
+
},
|
|
196
|
+
"environment": { "type": "object", "additionalProperties": false, "required": ["installedFoundationVersion", "installedFoundationBuildIdentity", "filesystem"], "properties": { "installedFoundationVersion": { "type": "string", "minLength": 1, "maxLength": 100 }, "installedFoundationBuildIdentity": { "$ref": "#/$defs/digest" }, "filesystem": { "type": "object", "additionalProperties": false, "required": ["basis", "strictDirectoryDurability"], "properties": { "basis": { "const": "platform-contract" }, "strictDirectoryDurability": { "enum": ["platform-supported", "platform-unsupported"] } } } } },
|
|
197
|
+
"doctorResult": { "type": "object", "additionalProperties": false, "required": ["kind", "protocol", "environment", "transaction"], "properties": { "kind": { "const": "doctor" }, "protocol": { "$ref": "#/$defs/protocol" }, "projectId": { "$ref": "#/$defs/lowerId" }, "environment": { "$ref": "#/$defs/environment" }, "transaction": { "$ref": "#/$defs/transaction" } } },
|
|
198
|
+
"recoverResult": { "oneOf": [
|
|
199
|
+
{ "type": "object", "additionalProperties": false, "required": ["kind", "transactionState", "writeState"], "properties": { "kind": { "const": "recover" }, "transactionState": { "const": "no-pending-transaction" }, "writeState": { "const": "unchanged" } } },
|
|
200
|
+
{ "type": "object", "additionalProperties": false, "required": ["kind", "transactionState", "writeState", "transaction"], "properties": { "kind": { "const": "recover" }, "transactionState": { "const": "manual-required" }, "writeState": { "const": "unknown" }, "transaction": { "$ref": "#/$defs/transaction" } } },
|
|
201
|
+
{ "type": "object", "additionalProperties": false, "required": ["kind", "transactionState", "writeState", "receiptDigest", "receipt"], "properties": { "kind": { "const": "recover" }, "transactionState": { "enum": ["recovered", "recovery-required"] }, "writeState": { "enum": ["unchanged", "unknown", "committed", "published-recovery-required"] }, "receiptDigest": { "$ref": "#/$defs/digest" }, "receipt": { "$ref": "#/$defs/receiptEvidence" } } }
|
|
202
|
+
] },
|
|
203
|
+
"checkResult": { "type": "object", "additionalProperties": false, "required": ["kind", "projectId", "catalogStatus", "documents", "foundationProfile", "metadataSidecar", "semanticValidatorIds", "valid"], "properties": { "kind": { "const": "check" }, "projectId": { "$ref": "#/$defs/lowerId" }, "catalogStatus": { "enum": ["complete", "partial"] }, "documents": { "type": "integer", "minimum": 0, "maximum": 100000 }, "foundationProfile": { "$ref": "#/$defs/foundationProfile" }, "metadataSidecar": { "$ref": "#/$defs/metadataSidecar" }, "semanticValidatorIds": { "type": "array", "maxItems": 256, "items": { "$ref": "#/$defs/lowerId" } }, "valid": { "type": "boolean" } } },
|
|
204
|
+
"infoEnvelope": { "if": { "type": "object", "properties": { "command": { "const": "docs.info" } }, "required": ["command"] }, "then": { "type": "object", "properties": { "outcome": { "enum": ["success", "invalid-input", "execution-failure", "cancelled"] } }, "allOf": [{ "if": { "type": "object", "properties": { "outcome": { "const": "success" } }, "required": ["outcome"] }, "then": { "type": "object", "properties": { "result": { "$ref": "#/$defs/infoResult" } } }, "else": { "type": "object", "properties": { "result": { "$ref": "#/$defs/emptyResult" } } } }] } },
|
|
205
|
+
"findEnvelope": { "if": { "type": "object", "properties": { "command": { "const": "docs.find" } }, "required": ["command"] }, "then": { "type": "object", "properties": { "outcome": { "enum": ["success", "invalid-input", "execution-failure", "cancelled"] } }, "allOf": [{ "if": { "type": "object", "properties": { "outcome": { "const": "success" } }, "required": ["outcome"] }, "then": { "type": "object", "properties": { "result": { "$ref": "#/$defs/findResult" } } }, "else": { "type": "object", "properties": { "result": { "$ref": "#/$defs/emptyResult" } } } }] } },
|
|
206
|
+
"newEnvelope": {
|
|
207
|
+
"if": { "type": "object", "properties": { "command": { "const": "docs.new" } }, "required": ["command"] },
|
|
208
|
+
"then": {
|
|
209
|
+
"type": "object",
|
|
210
|
+
"properties": { "outcome": { "enum": ["success", "conflict", "violation", "authority-stale", "recovery-required", "invalid-input", "execution-failure", "cancelled"] } },
|
|
211
|
+
"allOf": [
|
|
212
|
+
{ "if": { "type": "object", "properties": { "outcome": { "const": "success" } }, "required": ["outcome"] }, "then": { "type": "object", "properties": { "result": { "allOf": [{ "$ref": "#/$defs/newResult" }, { "type": "object", "properties": { "writeState": { "enum": ["preview", "applied", "already-applied"] } }, "required": ["writeState"] }] } } } },
|
|
213
|
+
{ "if": { "type": "object", "properties": { "outcome": { "const": "authority-stale" } }, "required": ["outcome"] }, "then": { "type": "object", "properties": { "result": { "allOf": [{ "$ref": "#/$defs/newResult" }, { "type": "object", "properties": { "writeState": { "enum": ["blocked", "unchanged", "unknown"] } }, "required": ["writeState"] }] } } } },
|
|
214
|
+
{ "if": { "type": "object", "properties": { "outcome": { "const": "recovery-required" } }, "required": ["outcome"] }, "then": { "type": "object", "properties": { "result": { "allOf": [{ "$ref": "#/$defs/newResult" }, { "type": "object", "properties": { "writeState": { "enum": ["blocked", "published-recovery-required", "unknown", "unchanged"] } }, "required": ["writeState"] }] } } } },
|
|
215
|
+
{ "if": { "type": "object", "properties": { "outcome": { "const": "conflict" } }, "required": ["outcome"] }, "then": { "type": "object", "properties": { "result": { "allOf": [{ "$ref": "#/$defs/newResult" }, { "type": "object", "properties": { "writeState": { "enum": ["unchanged", "unknown"] }, "receipt": true }, "required": ["writeState", "receipt"] }] } } } },
|
|
216
|
+
{ "if": { "type": "object", "properties": { "outcome": { "const": "violation" } }, "required": ["outcome"] }, "then": { "type": "object", "properties": { "result": { "allOf": [{ "$ref": "#/$defs/newResult" }, { "type": "object", "properties": { "writeState": { "const": "blocked" }, "reason": { "const": "adoption-invalid" } }, "required": ["writeState", "reason"] }] } } } },
|
|
217
|
+
{ "if": { "type": "object", "properties": { "outcome": { "const": "invalid-input" } }, "required": ["outcome"] }, "then": { "type": "object", "properties": { "result": { "$ref": "#/$defs/emptyResult" } } } },
|
|
218
|
+
{ "if": { "type": "object", "properties": { "outcome": { "enum": ["execution-failure", "cancelled"] } }, "required": ["outcome"] }, "then": { "type": "object", "properties": { "result": { "oneOf": [{ "$ref": "#/$defs/emptyResult" }, { "allOf": [{ "$ref": "#/$defs/newResult" }, { "type": "object", "properties": { "writeState": { "enum": ["unchanged", "unknown", "published-recovery-required"] }, "receipt": true }, "required": ["writeState", "receipt"] }] }] } } } }
|
|
219
|
+
]
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"doctorEnvelope": { "if": { "type": "object", "properties": { "command": { "const": "docs.doctor" } }, "required": ["command"] }, "then": { "type": "object", "properties": { "outcome": { "enum": ["success", "violation", "recovery-required", "invalid-input", "execution-failure", "cancelled"] } }, "allOf": [{ "if": { "type": "object", "properties": { "outcome": { "enum": ["success", "violation", "recovery-required"] } }, "required": ["outcome"] }, "then": { "type": "object", "properties": { "result": { "$ref": "#/$defs/doctorResult" } } }, "else": { "type": "object", "properties": { "result": { "$ref": "#/$defs/emptyResult" } } } }] } },
|
|
223
|
+
"recoverEnvelope": {
|
|
224
|
+
"if": { "type": "object", "properties": { "command": { "const": "docs.recover" } }, "required": ["command"] },
|
|
225
|
+
"then": {
|
|
226
|
+
"type": "object",
|
|
227
|
+
"properties": { "outcome": { "enum": ["success", "conflict", "authority-stale", "recovery-required", "invalid-input", "execution-failure", "cancelled"] } },
|
|
228
|
+
"allOf": [
|
|
229
|
+
{ "if": { "type": "object", "properties": { "outcome": { "const": "success" } }, "required": ["outcome"] }, "then": { "type": "object", "properties": { "result": { "allOf": [{ "$ref": "#/$defs/recoverResult" }, { "type": "object", "properties": { "transactionState": { "enum": ["no-pending-transaction", "recovered"] } }, "required": ["transactionState"] }] } } } },
|
|
230
|
+
{ "if": { "type": "object", "properties": { "outcome": { "const": "recovery-required" } }, "required": ["outcome"] }, "then": { "type": "object", "properties": { "result": { "allOf": [{ "$ref": "#/$defs/recoverResult" }, { "type": "object", "properties": { "transactionState": { "enum": ["manual-required", "recovery-required"] } }, "required": ["transactionState"] }] } } } },
|
|
231
|
+
{ "if": { "type": "object", "properties": { "outcome": { "enum": ["conflict", "authority-stale"] } }, "required": ["outcome"] }, "then": { "type": "object", "properties": { "result": { "allOf": [{ "$ref": "#/$defs/recoverResult" }, { "type": "object", "properties": { "transactionState": { "const": "recovery-required" }, "receipt": true }, "required": ["transactionState", "receipt"] }] } } } },
|
|
232
|
+
{ "if": { "type": "object", "properties": { "outcome": { "const": "invalid-input" } }, "required": ["outcome"] }, "then": { "type": "object", "properties": { "result": { "$ref": "#/$defs/emptyResult" } } } },
|
|
233
|
+
{ "if": { "type": "object", "properties": { "outcome": { "enum": ["execution-failure", "cancelled"] } }, "required": ["outcome"] }, "then": { "type": "object", "properties": { "result": { "oneOf": [{ "$ref": "#/$defs/emptyResult" }, { "allOf": [{ "$ref": "#/$defs/recoverResult" }, { "type": "object", "properties": { "transactionState": { "const": "recovery-required" }, "receipt": true }, "required": ["transactionState", "receipt"] }] }] } } } }
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"checkEnvelope": { "if": { "type": "object", "properties": { "command": { "const": "docs.check" } }, "required": ["command"] }, "then": { "type": "object", "properties": { "outcome": { "enum": ["success", "violation", "invalid-input", "execution-failure", "cancelled"] } }, "allOf": [{ "if": { "type": "object", "properties": { "outcome": { "enum": ["success", "violation"] } }, "required": ["outcome"] }, "then": { "type": "object", "properties": { "result": { "$ref": "#/$defs/checkResult" } } }, "else": { "type": "object", "properties": { "result": { "$ref": "#/$defs/emptyResult" } } } }] } }
|
|
238
|
+
}
|
|
239
|
+
}
|