@aiwg/cli 2026.9.19 → 2026.9.21

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.
Files changed (272) hide show
  1. package/agentic/code/providers/capability-matrix.yaml +58 -6
  2. package/agentic/code/providers/model-capabilities.v1.json +34 -0
  3. package/agentic/code/providers/model-catalog.v1.json +55 -13
  4. package/bin/aiwg.mjs +2 -0
  5. package/dist/src/api/index.d.ts +1 -0
  6. package/dist/src/api/index.js +1 -0
  7. package/dist/src/artifacts/enrichment/cli.js +1 -1
  8. package/dist/src/artifacts/views/cli.js +1 -1
  9. package/dist/src/audit/operator-decision.js +10 -0
  10. package/dist/src/auth/credential-store.js +127 -27
  11. package/dist/src/catalog/builtin-models.json +272 -40
  12. package/dist/src/catalog/cli.js +1 -1
  13. package/dist/src/catalog/cli.mjs +1 -1
  14. package/dist/src/cli/handlers/effect.js +872 -0
  15. package/dist/src/cli/handlers/help.js +2 -0
  16. package/dist/src/cli/handlers/index.js +4 -2
  17. package/dist/src/cli/handlers/models.js +41 -10
  18. package/dist/src/cli/handlers/ralph.js +1 -1
  19. package/dist/src/cli/handlers/sessions.js +113 -37
  20. package/dist/src/cli/handlers/subcommands.js +31 -0
  21. package/dist/src/cli/handlers/use.js +46 -9
  22. package/dist/src/cli/handlers/utilities.js +10 -0
  23. package/dist/src/cli/handlers/workspace.js +3 -1
  24. package/dist/src/cli/scope-resolver.js +112 -9
  25. package/dist/src/cli/services/deployment-verification.js +5 -0
  26. package/dist/src/config/aiwg-config.js +3 -0
  27. package/dist/src/decision/acceptance-rollout.js +93 -0
  28. package/dist/src/decision/acceptance.js +175 -0
  29. package/dist/src/decision/adapters/jev.js +234 -13
  30. package/dist/src/decision/adapters/llm-subagent.js +60 -12
  31. package/dist/src/decision/admission.js +550 -0
  32. package/dist/src/decision/batch-benchmark.js +47 -0
  33. package/dist/src/decision/batch-receipts/accounting.js +75 -0
  34. package/dist/src/decision/batch-receipts/export.js +40 -0
  35. package/dist/src/decision/batch-receipts/index.js +9 -0
  36. package/dist/src/decision/batch-receipts/protection.js +40 -0
  37. package/dist/src/decision/batch-receipts/receipt.js +44 -0
  38. package/dist/src/decision/batch-receipts/result-store.js +341 -0
  39. package/dist/src/decision/batch-receipts/store.js +362 -0
  40. package/dist/src/decision/batch-receipts/types.js +2 -0
  41. package/dist/src/decision/batch-receipts/validate.js +127 -0
  42. package/dist/src/decision/batch.js +68 -0
  43. package/dist/src/decision/calibration/index.js +4 -0
  44. package/dist/src/decision/calibration/receipts.js +130 -0
  45. package/dist/src/decision/calibration/registry.js +258 -0
  46. package/dist/src/decision/calibration/types.js +2 -0
  47. package/dist/src/decision/compile-cache/benchmark.js +62 -0
  48. package/dist/src/decision/compile-cache/compatibility.js +65 -0
  49. package/dist/src/decision/compile-cache/file-store.js +280 -0
  50. package/dist/src/decision/compile-cache/identity.js +26 -0
  51. package/dist/src/decision/compile-cache/index.js +9 -0
  52. package/dist/src/decision/compile-cache/prefix.js +21 -0
  53. package/dist/src/decision/compile-cache/records.js +86 -0
  54. package/dist/src/decision/compile-cache/runtime.js +68 -0
  55. package/dist/src/decision/compile-cache/store.js +108 -0
  56. package/dist/src/decision/compile-cache/types.js +2 -0
  57. package/dist/src/decision/context-plan.js +234 -0
  58. package/dist/src/decision/context-qualification.js +60 -0
  59. package/dist/src/decision/ensemble/aggregate.js +215 -0
  60. package/dist/src/decision/ensemble/contract.js +316 -0
  61. package/dist/src/decision/ensemble/drift.js +51 -0
  62. package/dist/src/decision/ensemble/index.js +6 -0
  63. package/dist/src/decision/ensemble/report.js +71 -0
  64. package/dist/src/decision/ensemble/types.js +2 -0
  65. package/dist/src/decision/evaluate.js +1024 -78
  66. package/dist/src/decision/file-lifecycle-store.js +168 -0
  67. package/dist/src/decision/graph-beam.js +40 -0
  68. package/dist/src/decision/graph-budget.js +110 -0
  69. package/dist/src/decision/graph-decision-bridge.js +93 -0
  70. package/dist/src/decision/graph-evidence.js +123 -0
  71. package/dist/src/decision/graph-flow-adapter.js +56 -0
  72. package/dist/src/decision/graph-flow.js +105 -0
  73. package/dist/src/decision/graph-parallel.js +79 -0
  74. package/dist/src/decision/graph-patterns.js +20 -0
  75. package/dist/src/decision/graph-run-store.js +66 -0
  76. package/dist/src/decision/graph-run.js +166 -0
  77. package/dist/src/decision/graph-skill-bridge.js +91 -0
  78. package/dist/src/decision/graph-templates.js +56 -0
  79. package/dist/src/decision/graph.js +115 -0
  80. package/dist/src/decision/index.js +35 -0
  81. package/dist/src/decision/job-accounting.js +93 -0
  82. package/dist/src/decision/job-contract.js +186 -0
  83. package/dist/src/decision/job-effects.js +95 -0
  84. package/dist/src/decision/job-evaluate.js +80 -0
  85. package/dist/src/decision/job-gateway.js +121 -0
  86. package/dist/src/decision/job-http.js +194 -0
  87. package/dist/src/decision/job-payload-store.js +258 -0
  88. package/dist/src/decision/job-poll-limiter.js +92 -0
  89. package/dist/src/decision/job-quota.js +158 -0
  90. package/dist/src/decision/job-runtime.js +240 -0
  91. package/dist/src/decision/job-scheduler.js +26 -0
  92. package/dist/src/decision/job-service.js +117 -0
  93. package/dist/src/decision/job-store.js +264 -0
  94. package/dist/src/decision/job-worker.js +141 -0
  95. package/dist/src/decision/lifecycle.js +148 -0
  96. package/dist/src/decision/patterns/artifacts.js +173 -0
  97. package/dist/src/decision/patterns/catalog.js +108 -0
  98. package/dist/src/decision/patterns/durable-review.js +237 -0
  99. package/dist/src/decision/patterns/index.js +8 -0
  100. package/dist/src/decision/patterns/playground.js +401 -0
  101. package/dist/src/decision/patterns/recorded.js +43 -0
  102. package/dist/src/decision/patterns/specs.js +174 -0
  103. package/dist/src/decision/patterns/types.js +2 -0
  104. package/dist/src/decision/portable-secrets.js +53 -0
  105. package/dist/src/decision/projection.js +210 -0
  106. package/dist/src/decision/qualification/capture.js +67 -0
  107. package/dist/src/decision/qualification/drift.js +68 -0
  108. package/dist/src/decision/qualification/gate-evidence.js +172 -0
  109. package/dist/src/decision/qualification/gates.js +83 -0
  110. package/dist/src/decision/qualification/index.js +12 -0
  111. package/dist/src/decision/qualification/load.js +275 -0
  112. package/dist/src/decision/qualification/manifest.js +37 -0
  113. package/dist/src/decision/qualification/privacy.js +41 -0
  114. package/dist/src/decision/qualification/quality.js +213 -0
  115. package/dist/src/decision/qualification/release.js +116 -0
  116. package/dist/src/decision/qualification/runner.js +408 -0
  117. package/dist/src/decision/qualification/types.js +2 -0
  118. package/dist/src/decision/receipts.js +30 -7
  119. package/dist/src/decision/result-cache/index.js +6 -0
  120. package/dist/src/decision/result-cache/integrity.js +28 -0
  121. package/dist/src/decision/result-cache/key.js +28 -0
  122. package/dist/src/decision/result-cache/service.js +92 -0
  123. package/dist/src/decision/result-cache/store.js +327 -0
  124. package/dist/src/decision/result-cache/types.js +3 -0
  125. package/dist/src/decision/review/authorization.js +110 -0
  126. package/dist/src/decision/review/effect-ledger-adapter.js +321 -0
  127. package/dist/src/decision/review/index.js +12 -0
  128. package/dist/src/decision/review/migrate.js +34 -0
  129. package/dist/src/decision/review/operator-audit.js +59 -0
  130. package/dist/src/decision/review/recovery-adapters.js +252 -0
  131. package/dist/src/decision/review/recovery.js +33 -0
  132. package/dist/src/decision/review/service.js +498 -0
  133. package/dist/src/decision/review/store.js +219 -0
  134. package/dist/src/decision/review/types.js +2 -0
  135. package/dist/src/decision/review/validate.js +205 -0
  136. package/dist/src/decision/scheduler.js +115 -0
  137. package/dist/src/decision/telemetry/context.js +42 -0
  138. package/dist/src/decision/telemetry/debug-sidecar.js +152 -0
  139. package/dist/src/decision/telemetry/exporter.js +77 -0
  140. package/dist/src/decision/telemetry/file-debug-backend.js +112 -0
  141. package/dist/src/decision/telemetry/index.js +13 -0
  142. package/dist/src/decision/telemetry/mapping.js +146 -0
  143. package/dist/src/decision/telemetry/metrics.js +164 -0
  144. package/dist/src/decision/telemetry/otlp-http.js +183 -0
  145. package/dist/src/decision/telemetry/redaction.js +93 -0
  146. package/dist/src/decision/telemetry/retention.js +109 -0
  147. package/dist/src/decision/telemetry/runtime.js +310 -0
  148. package/dist/src/decision/telemetry/trace.js +158 -0
  149. package/dist/src/decision/telemetry/types.js +3 -0
  150. package/dist/src/decision/validate.js +135 -5
  151. package/dist/src/effects/checkpoint-sinks.js +94 -0
  152. package/dist/src/effects/checkpoint.js +76 -0
  153. package/dist/src/effects/decision-links.js +54 -0
  154. package/dist/src/effects/errors.js +48 -0
  155. package/dist/src/effects/identity.js +178 -0
  156. package/dist/src/effects/index.js +25 -0
  157. package/dist/src/effects/keyring.js +160 -0
  158. package/dist/src/effects/keys.js +130 -0
  159. package/dist/src/effects/ledger.js +435 -0
  160. package/dist/src/effects/lifecycle.js +110 -0
  161. package/dist/src/effects/lock-recovery.js +269 -0
  162. package/dist/src/effects/reader.js +103 -0
  163. package/dist/src/effects/records.js +114 -0
  164. package/dist/src/effects/redaction.js +51 -0
  165. package/dist/src/effects/schema.js +73 -0
  166. package/dist/src/effects/store.js +239 -0
  167. package/dist/src/effects/types.js +49 -0
  168. package/dist/src/effects/verifiers/decision.js +168 -0
  169. package/dist/src/effects/verifiers/file.js +106 -0
  170. package/dist/src/effects/verifiers/git.js +206 -0
  171. package/dist/src/effects/verifiers/index.js +90 -0
  172. package/dist/src/effects/verifiers/registry.js +148 -0
  173. package/dist/src/effects/verifiers/review.js +123 -0
  174. package/dist/src/effects/verifiers/tracker.js +299 -0
  175. package/dist/src/effects/verifiers/types.js +21 -0
  176. package/dist/src/effects/verify.js +295 -0
  177. package/dist/src/evidence/bundle.js +2 -0
  178. package/dist/src/extensions/commands/definitions.js +28 -0
  179. package/dist/src/extensions/manifest.js +1 -0
  180. package/dist/src/marketplace/provenance.js +25 -27
  181. package/dist/src/mcp/cli.mjs +11 -1
  182. package/dist/src/mcp/grok-build-config.mjs +189 -0
  183. package/dist/src/mcp/registry.js +21 -1
  184. package/dist/src/mcp/registry.mjs +20 -1
  185. package/dist/src/models/grok-build-models.js +356 -0
  186. package/dist/src/models/index.js +1 -0
  187. package/dist/src/models/model-capabilities.v1.json +34 -0
  188. package/dist/src/models/model-catalog.v1.json +55 -13
  189. package/dist/src/models/model-discovery.js +41 -5
  190. package/dist/src/models/provider-policy.js +3 -2
  191. package/dist/src/plugin/skill-command-translator.js +1 -0
  192. package/dist/src/providers/capability-matrix.yaml +58 -6
  193. package/dist/src/providers/grok-build-acp.js +192 -0
  194. package/dist/src/providers/grok-build-dispatch.js +251 -0
  195. package/dist/src/providers/grok-build-headless.js +170 -0
  196. package/dist/src/providers/muse-paths.js +105 -0
  197. package/dist/src/providers/provider-definitions.js +93 -7
  198. package/dist/src/providers/provider-definitions.mjs +21 -1
  199. package/dist/src/providers/provider-inventory.js +3 -0
  200. package/dist/src/security/artifact-attestation.js +4 -8
  201. package/dist/src/security/signing.js +119 -0
  202. package/dist/src/sessions/adapters/grok-build.js +187 -0
  203. package/dist/src/sessions/adapters/muse.js +412 -0
  204. package/dist/src/sessions/contracts.js +1 -1
  205. package/dist/src/sessions/grok-build-cli.js +196 -0
  206. package/dist/src/sessions/index.js +3 -0
  207. package/dist/src/sessions/workspace-discovery.js +9 -5
  208. package/dist/src/skills/deployer.js +33 -5
  209. package/dist/src/smiths/context-pipeline/claude-hook.js +2 -0
  210. package/dist/src/smiths/context-pipeline/context-file-safety.js +18 -0
  211. package/dist/src/smiths/context-pipeline/finalization.js +1 -32
  212. package/dist/src/smiths/context-pipeline/generator.js +12 -0
  213. package/dist/src/smiths/context-pipeline/index.js +1 -1
  214. package/dist/src/smiths/context-pipeline/managed-hook.js +2 -0
  215. package/dist/src/smiths/context-pipeline/muse-bridge.js +50 -0
  216. package/dist/src/smiths/context-pipeline/provider-policy.js +5 -0
  217. package/dist/src/smiths/context-pipeline/workspace-context.js +22 -16
  218. package/dist/src/smiths/hook-bridge/grok-build-translator.js +64 -0
  219. package/dist/src/smiths/hook-bridge/index.js +3 -0
  220. package/dist/src/smiths/hook-bridge/shim.js +2 -0
  221. package/dist/src/smiths/hook-bridge/types.js +5 -0
  222. package/dist/src/smiths/skillsmith/collision-detector.js +1 -0
  223. package/dist/src/storage/protected-files.js +102 -0
  224. package/dist/src/tracker/forge-http.js +371 -0
  225. package/dist/src/tracker/project-inputs.js +41 -0
  226. package/package.json +2 -1
  227. package/schemas/decision/BatchReceipt.v1.schema.json +50 -0
  228. package/schemas/decision/CalibrationArtifact.v1.schema.json +76 -0
  229. package/schemas/decision/CalibrationCompatibility.v1.schema.json +18 -0
  230. package/schemas/decision/CalibrationGovernanceReceipt.v1.schema.json +44 -0
  231. package/schemas/decision/DecisionAdmissionEvidence.v1.schema.json +43 -0
  232. package/schemas/decision/DecisionBinding.schema.json +309 -0
  233. package/schemas/decision/DecisionBinding.v1alpha2.schema.json +369 -0
  234. package/schemas/decision/DecisionCacheTelemetry.v1.schema.json +20 -0
  235. package/schemas/decision/DecisionChampionChallenger.v1.schema.json +100 -0
  236. package/schemas/decision/DecisionCompileCacheEntry.v1.schema.json +35 -0
  237. package/schemas/decision/DecisionCompileCacheIdentity.v1.schema.json +26 -0
  238. package/schemas/decision/DecisionCompileCacheTombstone.v1.schema.json +31 -0
  239. package/schemas/decision/DecisionContextEvidence.v1.schema.json +136 -0
  240. package/schemas/decision/DecisionDefinition.schema.json +159 -0
  241. package/schemas/decision/DecisionDefinition.v1alpha2.schema.json +203 -0
  242. package/schemas/decision/DecisionDriftResponse.v1.schema.json +55 -0
  243. package/schemas/decision/DecisionEnsembleAggregate.v1.schema.json +86 -0
  244. package/schemas/decision/DecisionEnsembleIntegrityReport.v1.schema.json +64 -0
  245. package/schemas/decision/DecisionEnsemblePolicy.v1.schema.json +130 -0
  246. package/schemas/decision/DecisionGraph.v1.schema.json +77 -0
  247. package/schemas/decision/DecisionJob.v1.schema.json +71 -0
  248. package/schemas/decision/DecisionLifecyclePolicy.v1.schema.json +52 -0
  249. package/schemas/decision/DecisionProjectionPolicy.v1.schema.json +65 -0
  250. package/schemas/decision/DecisionProviderPrefixCompatibility.v1.schema.json +45 -0
  251. package/schemas/decision/DecisionProviderPrefixEvidence.v1.schema.json +17 -0
  252. package/schemas/decision/DecisionProviderPrefixIdentity.v1.schema.json +36 -0
  253. package/schemas/decision/DecisionResult.schema.json +524 -0
  254. package/schemas/decision/DecisionResult.v1alpha2.schema.json +619 -0
  255. package/schemas/decision/DecisionResultCacheEntry.v1.schema.json +53 -0
  256. package/schemas/decision/DecisionReview.schema.json +29 -0
  257. package/schemas/decision/DecisionRuleset.schema.json +313 -0
  258. package/schemas/decision/DecisionRuleset.v1alpha2.schema.json +313 -0
  259. package/schemas/decision/DecisionTelemetryTrace.v1.schema.json +95 -0
  260. package/schemas/decision/RulesetResult.schema.json +721 -0
  261. package/schemas/decision/RulesetResult.v1alpha2.schema.json +891 -0
  262. package/schemas/security/pr-evidence-receipt.v1.schema.json +77 -0
  263. package/schemas/security/threat-assessment-report.v1.schema.json +71 -1
  264. package/tools/agents/deploy-agents.mjs +21 -6
  265. package/tools/agents/providers/base.mjs +7 -4
  266. package/tools/agents/providers/codex.mjs +1 -1
  267. package/tools/agents/providers/grok-build.d.mts +7 -0
  268. package/tools/agents/providers/grok-build.mjs +249 -9
  269. package/tools/agents/providers/model-role.mjs +6 -3
  270. package/tools/agents/providers/muse-hooks.mjs +785 -0
  271. package/tools/agents/providers/muse-paths.mjs +112 -0
  272. package/tools/agents/providers/muse.mjs +336 -0
@@ -0,0 +1,64 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://aiwg.io/schemas/decision/DecisionEnsembleIntegrityReport.v1.schema.json",
4
+ "title": "Decision Ensemble Integrity Report",
5
+ "description": "D17 extension of the #2037/#2048 eval-integrity report. It carries the upstream integrity fields unchanged and may only keep or tighten the upstream PROMOTE/HOLD/ROLLBACK decision.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schemaVersion", "subject", "integrity", "pairedDeltas", "findings", "upstreamDecision", "decision", "digest"],
9
+ "properties": {
10
+ "schemaVersion": { "const": "decision-ensemble-integrity-report/v1" },
11
+ "subject": {
12
+ "type": "object", "additionalProperties": false, "required": ["kind", "id", "digest", "eligibilityId"],
13
+ "properties": {
14
+ "kind": { "const": "champion-challenger" },
15
+ "id": { "type": "string", "minLength": 1 },
16
+ "digest": { "$ref": "#/$defs/digest" },
17
+ "eligibilityId": { "type": "string", "minLength": 1 }
18
+ }
19
+ },
20
+ "integrity": {
21
+ "type": "object", "additionalProperties": false,
22
+ "required": ["sample_n", "uncertainty", "paired_baseline", "integrity_mode", "fresh_workspace_required", "fresh_workspace_verified", "integrity_state", "trusted_score_source", "compromise_labels", "weak_signal_reason", "release_gate"],
23
+ "properties": {
24
+ "sample_n": { "type": "integer", "minimum": 0 },
25
+ "uncertainty": {},
26
+ "paired_baseline": {},
27
+ "integrity_mode": { "type": "string", "minLength": 1 },
28
+ "fresh_workspace_required": { "type": "boolean" },
29
+ "fresh_workspace_verified": { "type": "boolean" },
30
+ "integrity_state": { "type": "string", "minLength": 1 },
31
+ "trusted_score_source": { "type": "string", "minLength": 1 },
32
+ "compromise_labels": { "type": "array", "items": { "type": "string" } },
33
+ "weak_signal_reason": { "type": ["string", "null"] },
34
+ "release_gate": {
35
+ "type": "object", "additionalProperties": false, "required": ["decision", "reasons"],
36
+ "properties": { "decision": { "$ref": "#/$defs/gateDecision" }, "reasons": { "type": "array", "items": { "type": "string" } } }
37
+ }
38
+ }
39
+ },
40
+ "pairedDeltas": {
41
+ "type": "array",
42
+ "items": {
43
+ "type": "object", "additionalProperties": false, "required": ["metric", "delta", "pairs", "comparison", "bound", "minimumPairs", "passed"],
44
+ "properties": {
45
+ "metric": { "enum": ["quality", "calibration", "risk-coverage", "abstention", "latency", "tokens", "cost", "slice"] },
46
+ "delta": { "type": ["number", "null"] },
47
+ "pairs": { "type": "integer", "minimum": 0 },
48
+ "comparison": { "enum": ["delta-at-least", "delta-at-most"] },
49
+ "bound": { "type": "number" },
50
+ "minimumPairs": { "type": "integer", "minimum": 1 },
51
+ "passed": { "type": "boolean" }
52
+ }
53
+ }
54
+ },
55
+ "findings": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
56
+ "upstreamDecision": { "$ref": "#/$defs/gateDecision" },
57
+ "decision": { "$ref": "#/$defs/gateDecision" },
58
+ "digest": { "$ref": "#/$defs/digest" }
59
+ },
60
+ "$defs": {
61
+ "digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
62
+ "gateDecision": { "enum": ["PROMOTE", "HOLD", "ROLLBACK"] }
63
+ }
64
+ }
@@ -0,0 +1,130 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://aiwg.io/schemas/decision/DecisionEnsemblePolicy.v1.schema.json",
4
+ "title": "Decision Ensemble Policy",
5
+ "description": "D17 contract for a bounded, versioned ensemble over pinned decision members. Contract only: this schema does not enable ensemble dispatch.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schemaVersion", "id", "version", "mode", "riskTiers", "definition", "primitive", "compatibleUncertaintyProfiles", "requiredCapabilities", "members", "aggregation", "disagreement", "acceptance", "calibration", "ceilings"],
9
+ "properties": {
10
+ "schemaVersion": { "const": "decision-ensemble-policy/v1" },
11
+ "id": { "$ref": "#/$defs/name" },
12
+ "version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
13
+ "mode": { "enum": ["disabled", "offline-shadow", "advisory"] },
14
+ "riskTiers": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/name" } },
15
+ "definition": { "$ref": "#/$defs/pin" },
16
+ "primitive": { "$ref": "#/$defs/primitive" },
17
+ "options": { "type": "array", "minItems": 2, "uniqueItems": true, "items": { "$ref": "#/$defs/name" } },
18
+ "levels": { "type": "integer", "minimum": 2, "maximum": 100 },
19
+ "compatibleUncertaintyProfiles": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/name" } },
20
+ "requiredCapabilities": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/name" } },
21
+ "members": { "type": "array", "minItems": 1, "maxItems": 16, "items": { "$ref": "#/$defs/member" } },
22
+ "aggregation": {
23
+ "type": "object", "additionalProperties": false, "required": ["algorithm", "tieRule"],
24
+ "properties": {
25
+ "algorithm": { "enum": ["majority-v1", "mean-probability-v1", "score-distribution-mean-v1", "score-median-v1"] },
26
+ "tieRule": { "enum": ["lowest-canonical-value", "defer", "review"] }
27
+ }
28
+ },
29
+ "disagreement": {
30
+ "type": "object", "additionalProperties": false, "required": ["metric", "thresholdBps", "onExceeded"],
31
+ "properties": {
32
+ "metric": { "enum": ["vote-share-v1", "normalized-entropy-v1", "jensen-shannon-v1", "score-dispersion-v1"] },
33
+ "thresholdBps": { "$ref": "#/$defs/bps" },
34
+ "onExceeded": { "$ref": "#/$defs/deferRoute" }
35
+ }
36
+ },
37
+ "acceptance": {
38
+ "type": "object", "additionalProperties": false, "required": ["minimumSuccessfulMembers", "onInsufficientMembers", "highAgreementWarningBps"],
39
+ "properties": {
40
+ "minimumSuccessfulMembers": { "type": "integer", "minimum": 1 },
41
+ "onInsufficientMembers": { "$ref": "#/$defs/deferRoute" },
42
+ "highAgreementWarningBps": { "$ref": "#/$defs/bps" }
43
+ }
44
+ },
45
+ "calibration": {
46
+ "type": "object", "additionalProperties": false, "required": ["requirement"],
47
+ "properties": { "requirement": { "enum": ["advisory", "required"] } }
48
+ },
49
+ "ceilings": {
50
+ "type": "object", "additionalProperties": false,
51
+ "required": ["members", "attempts", "deadlineMs", "tokens", "costMicros", "unknownCost", "concurrency", "fallbackDepth"],
52
+ "properties": {
53
+ "members": { "type": "integer", "minimum": 1, "maximum": 16 },
54
+ "attempts": { "type": "integer", "minimum": 1, "maximum": 256 },
55
+ "deadlineMs": { "type": "integer", "minimum": 1, "maximum": 3600000 },
56
+ "tokens": { "type": "integer", "minimum": 1 },
57
+ "costMicros": { "type": "integer", "minimum": 1 },
58
+ "unknownCost": {
59
+ "oneOf": [
60
+ { "type": "object", "additionalProperties": false, "required": ["rule"], "properties": { "rule": { "const": "reject" } } },
61
+ { "type": "object", "additionalProperties": false, "required": ["rule", "boundMicrosPerAttempt"],
62
+ "properties": { "rule": { "const": "reserve-bound" }, "boundMicrosPerAttempt": { "type": "integer", "minimum": 1 } } }
63
+ ]
64
+ },
65
+ "concurrency": { "type": "integer", "minimum": 1, "maximum": 16 },
66
+ "fallbackDepth": { "type": "integer", "minimum": 0, "maximum": 3 }
67
+ }
68
+ }
69
+ },
70
+ "allOf": [
71
+ { "if": { "properties": { "primitive": { "const": "choice" } } }, "then": { "required": ["options"], "properties": { "options": true, "levels": false } } },
72
+ { "if": { "properties": { "primitive": { "const": "ordinal-score" } } }, "then": { "required": ["levels"], "properties": { "levels": true, "options": false } } },
73
+ { "if": { "properties": { "primitive": { "const": "truth-probability" } } }, "then": { "properties": { "options": false, "levels": false } } }
74
+ ],
75
+ "$defs": {
76
+ "name": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$" },
77
+ "digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
78
+ "bps": { "type": "integer", "minimum": 0, "maximum": 10000 },
79
+ "primitive": { "enum": ["choice", "truth-probability", "ordinal-score"] },
80
+ "deferRoute": { "enum": ["defer", "review"] },
81
+ "pin": {
82
+ "type": "object", "additionalProperties": false, "required": ["id", "version", "digest"],
83
+ "properties": { "id": { "$ref": "#/$defs/name" }, "version": { "type": "string", "minLength": 1 }, "digest": { "$ref": "#/$defs/digest" } }
84
+ },
85
+ "member": {
86
+ "type": "object", "additionalProperties": false,
87
+ "required": ["id", "memberType", "definition", "binding", "adapter", "model", "primitive", "uncertaintyProfile", "requiredCapabilities", "capabilities", "calibration", "samples", "fallbackDepth", "estimate", "approvalReference"],
88
+ "properties": {
89
+ "id": { "$ref": "#/$defs/name" },
90
+ "memberType": { "enum": ["model-version", "provider-backend", "repeated-sample", "prompt-adapter"] },
91
+ "definition": { "$ref": "#/$defs/pin" },
92
+ "binding": { "$ref": "#/$defs/pin" },
93
+ "adapter": {
94
+ "type": "object", "additionalProperties": false, "required": ["id", "version"],
95
+ "properties": { "id": { "$ref": "#/$defs/name" }, "version": { "type": "string", "minLength": 1 } }
96
+ },
97
+ "model": {
98
+ "type": "object", "additionalProperties": false, "required": ["provider", "backend", "requested", "pinnedVersion"],
99
+ "properties": {
100
+ "provider": { "$ref": "#/$defs/name" }, "backend": { "$ref": "#/$defs/name" },
101
+ "requested": { "$ref": "#/$defs/name" }, "pinnedVersion": { "$ref": "#/$defs/name" }
102
+ }
103
+ },
104
+ "primitive": { "$ref": "#/$defs/primitive" },
105
+ "uncertaintyProfile": { "$ref": "#/$defs/name" },
106
+ "requiredCapabilities": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/name" } },
107
+ "capabilities": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/name" } },
108
+ "calibration": {
109
+ "anyOf": [
110
+ { "type": "null" },
111
+ { "type": "object", "additionalProperties": false, "required": ["artifactId", "artifactDigest"],
112
+ "properties": { "artifactId": { "$ref": "#/$defs/name" }, "artifactDigest": { "$ref": "#/$defs/digest" } } }
113
+ ]
114
+ },
115
+ "samples": { "type": "integer", "minimum": 1, "maximum": 32 },
116
+ "fallbackDepth": { "type": "integer", "minimum": 0, "maximum": 3 },
117
+ "estimate": {
118
+ "type": "object", "additionalProperties": false, "required": ["attemptsPerSample", "tokensPerAttempt", "costMicrosPerAttempt", "deadlineMsPerAttempt"],
119
+ "properties": {
120
+ "attemptsPerSample": { "type": "integer", "minimum": 1 },
121
+ "tokensPerAttempt": { "type": "integer", "minimum": 0 },
122
+ "costMicrosPerAttempt": { "type": ["integer", "null"], "minimum": 0 },
123
+ "deadlineMsPerAttempt": { "type": "integer", "minimum": 1 }
124
+ }
125
+ },
126
+ "approvalReference": { "type": ["string", "null"], "minLength": 1 }
127
+ }
128
+ }
129
+ }
130
+ }
@@ -0,0 +1,77 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://aiwg.io/schemas/decision/DecisionGraph.v1.schema.json",
4
+ "title": "Decision Graph v1 (offline contract; runtime disabled)",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "id", "entry", "terminals", "nodes", "edges", "budget"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "schemaVersion": { "const": "decision-graph/v1" },
10
+ "id": { "$ref": "#/$defs/name" },
11
+ "entry": { "$ref": "#/$defs/name" },
12
+ "terminals": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/name" } },
13
+ "pattern": { "enum": ["custom", "shortlist-rerank", "taxonomy-beam", "extractor-verifier-fallback"] },
14
+ "nodes": { "type": "array", "minItems": 1, "maxItems": 128, "items": { "$ref": "#/$defs/node" } },
15
+ "edges": { "type": "array", "maxItems": 512, "items": { "$ref": "#/$defs/edge" } },
16
+ "budget": { "$ref": "#/$defs/budget" },
17
+ "stageBudgets": {
18
+ "type": "array", "maxItems": 128,
19
+ "items": {
20
+ "type": "object", "additionalProperties": false, "required": ["stage", "limits"],
21
+ "properties": {
22
+ "stage": { "type": "integer", "minimum": 0, "maximum": 127 },
23
+ "limits": { "$ref": "#/$defs/budget" }
24
+ }
25
+ }
26
+ }
27
+ },
28
+ "$defs": {
29
+ "name": { "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,63}$" },
30
+ "digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
31
+ "pin": {
32
+ "type": "object", "additionalProperties": false,
33
+ "required": ["id", "version", "digest"],
34
+ "properties": { "id": { "$ref": "#/$defs/name" }, "version": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,63}$" }, "digest": { "$ref": "#/$defs/digest" } }
35
+ },
36
+ "node": {
37
+ "type": "object", "additionalProperties": false,
38
+ "required": ["id", "stage", "subject", "target", "model", "egress", "stateDigest", "definition", "binding", "input", "output"],
39
+ "properties": {
40
+ "id": { "$ref": "#/$defs/name" }, "stage": { "type": "integer", "minimum": 0, "maximum": 127 },
41
+ "subject": { "$ref": "#/$defs/name" }, "target": { "$ref": "#/$defs/name" },
42
+ "model": { "$ref": "#/$defs/name" }, "egress": { "$ref": "#/$defs/name" },
43
+ "stateDigest": { "$ref": "#/$defs/digest" },
44
+ "definition": { "$ref": "#/$defs/pin" }, "binding": { "$ref": "#/$defs/pin" },
45
+ "input": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/name" } },
46
+ "output": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/name" } }
47
+ }
48
+ },
49
+ "edge": {
50
+ "type": "object", "additionalProperties": false,
51
+ "required": ["from", "to", "source", "destination"],
52
+ "properties": {
53
+ "from": { "$ref": "#/$defs/name" }, "to": { "$ref": "#/$defs/name" },
54
+ "source": { "$ref": "#/$defs/name" }, "destination": { "$ref": "#/$defs/name" },
55
+ "when": {
56
+ "type": "object", "additionalProperties": false,
57
+ "required": ["source", "equals"],
58
+ "properties": { "source": { "$ref": "#/$defs/name" }, "equals": { "type": "boolean" } }
59
+ }
60
+ }
61
+ },
62
+ "budget": {
63
+ "type": "object", "additionalProperties": false,
64
+ "required": ["attempts", "deadlineMs", "tokens", "costMicros", "fanOut", "beamWidth", "depth", "concurrency"],
65
+ "properties": {
66
+ "attempts": { "type": "integer", "minimum": 1, "maximum": 1000 },
67
+ "deadlineMs": { "type": "integer", "minimum": 1, "maximum": 86400000 },
68
+ "tokens": { "type": "integer", "minimum": 1, "maximum": 10000000 },
69
+ "costMicros": { "type": "integer", "minimum": 1, "maximum": 1000000000 },
70
+ "fanOut": { "type": "integer", "minimum": 1, "maximum": 128 },
71
+ "beamWidth": { "type": "integer", "minimum": 1, "maximum": 128 },
72
+ "depth": { "type": "integer", "minimum": 1, "maximum": 128 },
73
+ "concurrency": { "type": "integer", "minimum": 1, "maximum": 128 }
74
+ }
75
+ }
76
+ }
77
+ }
@@ -0,0 +1,71 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://aiwg.io/schemas/decision/DecisionJob.v1.schema.json",
4
+ "title": "AIWG Decision Job v1 (contract only; dispatch disabled)",
5
+ "type": "object", "additionalProperties": false,
6
+ "required": ["schemaVersion", "id", "scope", "fingerprint", "state", "items", "summary", "createdAtEpochMs", "expiresAtEpochMs", "budget"],
7
+ "properties": {
8
+ "schemaVersion": { "const": "decision-job/v1" },
9
+ "id": { "$ref": "#/$defs/id" },
10
+ "scope": {
11
+ "type": "object", "additionalProperties": false,
12
+ "required": ["tenantId", "projectId", "workspaceId", "principalId"],
13
+ "properties": { "tenantId": { "$ref": "#/$defs/id" }, "projectId": { "$ref": "#/$defs/id" }, "workspaceId": { "$ref": "#/$defs/id" }, "principalId": { "$ref": "#/$defs/id" } }
14
+ },
15
+ "fingerprint": { "$ref": "#/$defs/digest" },
16
+ "state": { "enum": ["validating", "queued", "running", "partially-completed", "completed", "cancel-requested", "canceled", "expired", "failed"] },
17
+ "items": { "type": "array", "minItems": 1, "maxItems": 1000, "items": { "$ref": "#/$defs/item" } },
18
+ "summary": { "type": "object", "additionalProperties": { "type": "integer", "minimum": 0 }, "minProperties": 1 },
19
+ "createdAtEpochMs": { "type": "integer", "minimum": 0 },
20
+ "expiresAtEpochMs": { "type": "integer", "minimum": 1 },
21
+ "budget": {
22
+ "type": "object", "additionalProperties": false,
23
+ "required": ["maxAttempts", "maxTokens", "maxCostMicros", "maxConcurrency"],
24
+ "properties": {
25
+ "maxAttempts": { "type": "integer", "minimum": 1, "maximum": 1000 },
26
+ "maxTokens": { "type": "integer", "minimum": 1, "maximum": 10000000 },
27
+ "maxCostMicros": { "type": "integer", "minimum": 1, "maximum": 1000000000 },
28
+ "maxConcurrency": { "type": "integer", "minimum": 1, "maximum": 128 }
29
+ }
30
+ }
31
+ },
32
+ "$defs": {
33
+ "id": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,127}$" },
34
+ "digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
35
+ "item": {
36
+ "type": "object", "additionalProperties": false,
37
+ "required": ["id", "fingerprint", "subjectDigest", "definitionDigest", "bindingDigest", "state", "attempts"],
38
+ "properties": {
39
+ "id": { "$ref": "#/$defs/id" }, "fingerprint": { "$ref": "#/$defs/digest" },
40
+ "subjectDigest": { "$ref": "#/$defs/digest" },
41
+ "definitionDigest": { "$ref": "#/$defs/digest" }, "bindingDigest": { "$ref": "#/$defs/digest" },
42
+ "rulesetDigest": { "$ref": "#/$defs/digest" },
43
+ "state": { "enum": ["queued", "running", "succeeded", "abstained", "review", "unsupported", "retryable-failed", "permanent-failed", "canceled", "expired", "execution-unknown"] },
44
+ "attempts": { "type": "array", "maxItems": 1000, "items": {
45
+ "type": "object", "additionalProperties": false,
46
+ "required": ["id", "requestDigest", "outcome"],
47
+ "properties": {
48
+ "id": { "$ref": "#/$defs/id" }, "requestDigest": { "$ref": "#/$defs/digest" },
49
+ "receiptDigest": { "$ref": "#/$defs/digest" },
50
+ "reservedTokens": { "type": "integer", "minimum": 0, "maximum": 10000000 },
51
+ "reservedCostMicros": { "type": "integer", "minimum": 0, "maximum": 1000000000 },
52
+ "outcome": { "enum": ["dispatched", "succeeded", "failed", "execution-unknown"] },
53
+ "resolution": {
54
+ "description": "D16 opt-in resolution of an execution-unknown attempt through a verified effect (digest-match only).",
55
+ "type": "object", "additionalProperties": false,
56
+ "required": ["method", "effectId", "reason", "receiptDigest"],
57
+ "properties": {
58
+ "method": { "const": "effect-ledger" },
59
+ "effectId": { "type": "string", "pattern": "^eff1_[a-z2-7]{51}[aq]$" },
60
+ "reason": { "const": "digest-match" },
61
+ "receiptDigest": { "$ref": "#/$defs/digest" }
62
+ }
63
+ }
64
+ }
65
+ } },
66
+ "resultDigest": { "$ref": "#/$defs/digest" },
67
+ "errorCode": { "$ref": "#/$defs/id" }
68
+ }
69
+ }
70
+ }
71
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://aiwg.io/schemas/decision/DecisionLifecyclePolicy.v1.schema.json",
4
+ "title": "AIWG Decision Lifecycle Policy v1",
5
+ "description": "Trusted host lifecycle controls (decision-lifecycle/v1). Every surface must declare classification, access scope, retention, export, deletion and backup handling; omissions are rejected rather than defaulted. Mirrors validateDecisionLifecyclePolicy.",
6
+ "type": "object",
7
+ "required": ["version", "surfaces"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "version": { "const": "decision-lifecycle/v1" },
11
+ "surfaces": {
12
+ "type": "object",
13
+ "required": [
14
+ "state", "receipt", "trace", "debug-sidecar", "cache", "job", "review",
15
+ "calibration", "evaluation", "export", "preprocessing-lineage"
16
+ ],
17
+ "additionalProperties": false,
18
+ "properties": {
19
+ "state": { "$ref": "#/$defs/rule" },
20
+ "receipt": { "$ref": "#/$defs/rule" },
21
+ "trace": { "$ref": "#/$defs/rule" },
22
+ "debug-sidecar": { "$ref": "#/$defs/rule" },
23
+ "cache": { "$ref": "#/$defs/rule" },
24
+ "job": { "$ref": "#/$defs/rule" },
25
+ "review": { "$ref": "#/$defs/rule" },
26
+ "calibration": { "$ref": "#/$defs/rule" },
27
+ "evaluation": { "$ref": "#/$defs/rule" },
28
+ "export": { "$ref": "#/$defs/rule" },
29
+ "preprocessing-lineage": { "$ref": "#/$defs/rule" }
30
+ }
31
+ }
32
+ },
33
+ "$defs": {
34
+ "rule": {
35
+ "type": "object",
36
+ "required": ["classification", "accessScopes", "retentionMs", "export", "deletion", "backup"],
37
+ "additionalProperties": false,
38
+ "properties": {
39
+ "classification": { "enum": ["public", "internal", "confidential", "restricted"] },
40
+ "accessScopes": {
41
+ "type": "array",
42
+ "minItems": 1,
43
+ "items": { "type": "string", "minLength": 1 }
44
+ },
45
+ "retentionMs": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 },
46
+ "export": { "enum": ["denied", "sanitized"] },
47
+ "deletion": { "enum": ["erase", "tombstone"] },
48
+ "backup": { "enum": ["not-persisted", "expire-with-primary"] }
49
+ }
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://aiwg.io/schemas/decision/DecisionProjectionPolicy.v1.schema.json",
4
+ "title": "AIWG Decision Projection Policy v1",
5
+ "description": "Trusted host control data selecting the only state fields an adapter may receive. Runtime validation (validateProjectionPolicy) additionally enforces destination authorization, one stable subject, unique outputs and secret-material rejection.",
6
+ "type": "object",
7
+ "required": ["version", "provider", "model", "origin", "region", "purpose", "allowIncompleteContext", "fields"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "version": { "$ref": "#/$defs/nonEmpty" },
11
+ "provider": { "$ref": "#/$defs/nonEmpty" },
12
+ "model": { "$ref": "#/$defs/nonEmpty" },
13
+ "origin": { "$ref": "#/$defs/httpsUri" },
14
+ "region": { "$ref": "#/$defs/nonEmpty" },
15
+ "purpose": { "$ref": "#/$defs/nonEmpty" },
16
+ "allowIncompleteContext": { "type": "boolean" },
17
+ "maxSensitivity": { "$ref": "#/$defs/sensitivity" },
18
+ "fields": {
19
+ "type": "array",
20
+ "minItems": 1,
21
+ "items": { "$ref": "#/$defs/field" }
22
+ }
23
+ },
24
+ "$defs": {
25
+ "nonEmpty": { "type": "string", "minLength": 1, "pattern": "\\S" },
26
+ "httpsUri": { "type": "string", "format": "uri", "pattern": "^https://[^/@\\s]+(?:/.*)?$" },
27
+ "nonEmptyList": {
28
+ "type": "array",
29
+ "minItems": 1,
30
+ "items": { "$ref": "#/$defs/nonEmpty" }
31
+ },
32
+ "sensitivity": { "enum": ["public", "internal", "confidential", "restricted"] },
33
+ "field": {
34
+ "type": "object",
35
+ "required": [
36
+ "pointer", "output", "source", "subject", "trust", "sensitivity", "purpose", "retentionClass",
37
+ "accessScopes", "exportPolicy", "deletionPolicy", "backupPolicy", "allowedProviders",
38
+ "allowedModels", "allowedOrigins", "allowedRegions"
39
+ ],
40
+ "additionalProperties": false,
41
+ "properties": {
42
+ "pointer": { "type": "string", "pattern": "^/" },
43
+ "output": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_.-]*$" },
44
+ "source": { "$ref": "#/$defs/nonEmpty" },
45
+ "subject": { "$ref": "#/$defs/nonEmpty" },
46
+ "trust": { "enum": ["verified", "untrusted"] },
47
+ "sensitivity": { "$ref": "#/$defs/sensitivity" },
48
+ "purpose": { "$ref": "#/$defs/nonEmpty" },
49
+ "retentionClass": { "$ref": "#/$defs/nonEmpty" },
50
+ "accessScopes": { "$ref": "#/$defs/nonEmptyList" },
51
+ "exportPolicy": { "enum": ["denied", "sanitized"] },
52
+ "deletionPolicy": { "enum": ["erase", "tombstone"] },
53
+ "backupPolicy": { "enum": ["expire-with-primary", "not-persisted"] },
54
+ "allowedProviders": { "$ref": "#/$defs/nonEmptyList" },
55
+ "allowedModels": { "$ref": "#/$defs/nonEmptyList" },
56
+ "allowedOrigins": {
57
+ "type": "array",
58
+ "minItems": 1,
59
+ "items": { "$ref": "#/$defs/httpsUri" }
60
+ },
61
+ "allowedRegions": { "$ref": "#/$defs/nonEmptyList" }
62
+ }
63
+ }
64
+ }
65
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://aiwg.io/schemas/decision/DecisionProviderPrefixCompatibility.v1.schema.json",
4
+ "title": "AIWG Decision Provider Prefix Compatibility Record v1",
5
+ "description": "Pinned permission to reuse a provider prefix across one exact identity change. Scope, data class, region, egress, provider and prefix bytes can never be permitted to change.",
6
+ "type": "object",
7
+ "required": ["schemaVersion", "fromIdentityDigest", "toIdentityDigest", "permits", "aliasSnapshot", "approvedBy", "expiresAtEpochMs"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "schemaVersion": { "const": "decision-provider-prefix-compatibility/v1" },
11
+ "fromIdentityDigest": { "$ref": "#/$defs/digest" },
12
+ "toIdentityDigest": { "$ref": "#/$defs/digest" },
13
+ "permits": {
14
+ "type": "array", "minItems": 1, "uniqueItems": true,
15
+ "items": { "enum": ["requestedModel", "actualModel", "apiRevision", "backend", "policy"] }
16
+ },
17
+ "aliasSnapshot": {
18
+ "oneOf": [
19
+ { "type": "null" },
20
+ {
21
+ "type": "object",
22
+ "required": ["alias", "snapshotId", "approvedActualModels", "validUntilEpochMs"],
23
+ "additionalProperties": false,
24
+ "properties": {
25
+ "alias": { "type": "string", "minLength": 1 },
26
+ "snapshotId": { "type": "string", "minLength": 1 },
27
+ "approvedActualModels": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
28
+ "validUntilEpochMs": { "type": "integer", "minimum": 0 }
29
+ }
30
+ }
31
+ ]
32
+ },
33
+ "approvedBy": { "type": "string", "minLength": 1 },
34
+ "expiresAtEpochMs": { "type": "integer", "minimum": 0 }
35
+ },
36
+ "allOf": [
37
+ {
38
+ "if": { "properties": { "permits": { "type": "array", "contains": { "enum": ["requestedModel", "actualModel"] } } } },
39
+ "then": { "properties": { "aliasSnapshot": { "type": "object" } } }
40
+ }
41
+ ],
42
+ "$defs": {
43
+ "digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }
44
+ }
45
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://aiwg.io/schemas/decision/DecisionProviderPrefixEvidence.v1.schema.json",
4
+ "title": "AIWG Decision Provider Prefix Evidence v1",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "identityDigest", "status", "source", "cacheVersion", "savedInputTokens", "expiresAtEpochMs"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "schemaVersion": { "const": "decision-provider-prefix-evidence/v1" },
10
+ "identityDigest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
11
+ "status": { "enum": ["hit", "miss", "bypass", "unsupported", "unknown"] },
12
+ "source": { "enum": ["provider-report", "documented-unsupported", "policy-bypass", "unreported"] },
13
+ "cacheVersion": { "oneOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }] },
14
+ "savedInputTokens": { "oneOf": [{ "type": "integer", "minimum": 0 }, { "type": "null" }] },
15
+ "expiresAtEpochMs": { "oneOf": [{ "type": "number" }, { "type": "null" }] }
16
+ }
17
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://aiwg.io/schemas/decision/DecisionProviderPrefixIdentity.v1.schema.json",
4
+ "title": "AIWG Decision Provider Prefix Identity v1",
5
+ "description": "Protected semantic identity of a provider prompt prefix. Only its digest appears in evidence and telemetry.",
6
+ "type": "object",
7
+ "required": ["schemaVersion", "orderedPrefixDigest", "provider", "backend", "requestedModel", "actualModel", "apiRevision", "policy", "tenantId", "workspaceId", "dataClass", "region", "egressPolicyDigest"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "schemaVersion": { "const": "decision-provider-prefix-identity/v1" },
11
+ "orderedPrefixDigest": { "$ref": "#/$defs/digest" },
12
+ "provider": { "type": "string", "minLength": 1 },
13
+ "backend": { "type": "string", "minLength": 1 },
14
+ "requestedModel": { "type": "string", "minLength": 1 },
15
+ "actualModel": { "oneOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }] },
16
+ "apiRevision": { "type": "string", "minLength": 1 },
17
+ "policy": {
18
+ "type": "object",
19
+ "required": ["id", "version", "ttlMs"],
20
+ "additionalProperties": false,
21
+ "properties": {
22
+ "id": { "type": "string", "minLength": 1 },
23
+ "version": { "type": "string", "minLength": 1 },
24
+ "ttlMs": { "type": "integer", "minimum": 1 }
25
+ }
26
+ },
27
+ "tenantId": { "type": "string", "minLength": 1 },
28
+ "workspaceId": { "type": "string", "minLength": 1 },
29
+ "dataClass": { "type": "string", "minLength": 1 },
30
+ "region": { "type": "string", "minLength": 1 },
31
+ "egressPolicyDigest": { "$ref": "#/$defs/digest" }
32
+ },
33
+ "$defs": {
34
+ "digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }
35
+ }
36
+ }