@piagent/platform 1.3.0 → 1.4.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.
Files changed (304) hide show
  1. package/CHANGELOG.md +56 -3
  2. package/README.md +3 -3
  3. package/architecture/layers.json +96 -1
  4. package/docs/README.md +1 -0
  5. package/docs/architecture.md +1 -0
  6. package/docs/authority-manifest.md +1 -0
  7. package/docs/auto-delegation-policy.md +1 -0
  8. package/docs/capability-packs.md +10 -2
  9. package/docs/command-reference-vietnamese.md +5 -4
  10. package/docs/context-engine.md +1 -0
  11. package/docs/context-window-policy.md +1 -0
  12. package/docs/distribution-standard.md +8 -7
  13. package/docs/herdr-workflow.md +1 -0
  14. package/docs/mcp-and-tools.md +14 -9
  15. package/docs/memory-policy.md +1 -0
  16. package/docs/model-options.md +1 -0
  17. package/docs/oauth-providers.md +1 -0
  18. package/docs/operator-manual-vietnamese.md +15 -12
  19. package/docs/package-architecture-notes.md +1 -0
  20. package/docs/project-adapters.md +1 -0
  21. package/docs/project-onboarding.md +1 -0
  22. package/docs/publishing-for-teams.md +1 -0
  23. package/docs/quality-benchmark.md +1 -0
  24. package/docs/quickstart-vietnamese.md +3 -2
  25. package/docs/release-install-policy.md +11 -7
  26. package/docs/runtime-harness-standard.md +1 -0
  27. package/docs/runtime-policy-design.md +1 -0
  28. package/docs/runtime-quality-baseline.md +1 -0
  29. package/docs/security-redaction-benchmark.md +1 -0
  30. package/docs/security-threat-model.md +2 -1
  31. package/docs/subagent-orchestration-capabilities.md +1 -0
  32. package/docs/subagents-and-multiagent.md +1 -0
  33. package/docs/task-implementation-contract.md +1 -0
  34. package/docs/task-lifecycle-vietnamese.md +1 -0
  35. package/docs/team-onboarding.md +3 -2
  36. package/docs/third-party-neutrality.md +26 -0
  37. package/docs/usage-observability.md +1 -0
  38. package/docs/vercel-docs-site.md +1 -0
  39. package/docs/workflow-recipes.md +1 -0
  40. package/docs-site/architecture.html +1 -1
  41. package/docs-site/benchmark.html +1 -1
  42. package/docs-site/commands.html +1 -1
  43. package/docs-site/context-engine.html +1 -1
  44. package/docs-site/en/architecture.html +1 -1
  45. package/docs-site/en/benchmark.html +1 -1
  46. package/docs-site/en/commands.html +1 -1
  47. package/docs-site/en/context-engine.html +1 -1
  48. package/docs-site/en/index.html +1 -1
  49. package/docs-site/en/mcp-approval.html +1 -1
  50. package/docs-site/en/mcp-auth.html +1 -1
  51. package/docs-site/en/mcp-servers.html +1 -1
  52. package/docs-site/en/mcp.html +1 -1
  53. package/docs-site/en/permissions.html +1 -1
  54. package/docs-site/en/profiles.html +1 -1
  55. package/docs-site/en/quickstart.html +1 -1
  56. package/docs-site/en/runtime.html +1 -1
  57. package/docs-site/en/scope.html +1 -1
  58. package/docs-site/en/security.html +1 -1
  59. package/docs-site/en/team.html +1 -1
  60. package/docs-site/en/whats-new.html +1 -1
  61. package/docs-site/en/workflows.html +1 -1
  62. package/docs-site/index.html +1 -1
  63. package/docs-site/mcp-approval.html +1 -1
  64. package/docs-site/mcp-auth.html +1 -1
  65. package/docs-site/mcp-servers.html +1 -1
  66. package/docs-site/mcp.html +1 -1
  67. package/docs-site/permissions.html +1 -1
  68. package/docs-site/profiles.html +1 -1
  69. package/docs-site/quickstart.html +1 -1
  70. package/docs-site/runtime.html +1 -1
  71. package/docs-site/scope.html +1 -1
  72. package/docs-site/security.html +1 -1
  73. package/docs-site/team.html +1 -1
  74. package/docs-site/whats-new.html +1 -1
  75. package/docs-site/workflows.html +1 -1
  76. package/evals/fixtures/mutation-provenance-record.invalid.json +17 -0
  77. package/evals/fixtures/mutation-provenance-record.valid.json +27 -0
  78. package/evals/fixtures/piagent-webui/approval-v1.invalid.json +54 -0
  79. package/evals/fixtures/piagent-webui/approval-v1.valid.json +58 -0
  80. package/evals/fixtures/piagent-webui/attachment-v1.invalid.json +25 -0
  81. package/evals/fixtures/piagent-webui/attachment-v1.valid.json +25 -0
  82. package/evals/fixtures/piagent-webui/capabilities-v1.invalid.json +51 -0
  83. package/evals/fixtures/piagent-webui/capabilities-v1.valid.json +122 -0
  84. package/evals/fixtures/piagent-webui/commit-summary-v1.invalid.json +10 -0
  85. package/evals/fixtures/piagent-webui/commit-summary-v1.valid.json +25 -0
  86. package/evals/fixtures/piagent-webui/control-command-v1.invalid.json +37 -0
  87. package/evals/fixtures/piagent-webui/control-command-v1.valid.json +35 -0
  88. package/evals/fixtures/piagent-webui/diff-v1.invalid.json +13 -0
  89. package/evals/fixtures/piagent-webui/diff-v1.valid.json +141 -0
  90. package/evals/fixtures/piagent-webui/gateway-capabilities-v1.invalid.json +35 -0
  91. package/evals/fixtures/piagent-webui/gateway-capabilities-v1.valid.json +35 -0
  92. package/evals/fixtures/piagent-webui/gateway-protocol-v1.invalid.json +14 -0
  93. package/evals/fixtures/piagent-webui/gateway-protocol-v1.valid.json +14 -0
  94. package/evals/fixtures/piagent-webui/handoff-history-v1.invalid.json +16 -0
  95. package/evals/fixtures/piagent-webui/handoff-history-v1.valid.json +16 -0
  96. package/evals/fixtures/piagent-webui/model-catalog-v1.invalid.json +31 -0
  97. package/evals/fixtures/piagent-webui/model-catalog-v1.valid.json +43 -0
  98. package/evals/fixtures/piagent-webui/queue-v1.invalid.json +29 -0
  99. package/evals/fixtures/piagent-webui/queue-v1.valid.json +44 -0
  100. package/evals/fixtures/piagent-webui/recovery-history-v1.invalid.json +17 -0
  101. package/evals/fixtures/piagent-webui/recovery-history-v1.valid.json +20 -0
  102. package/evals/fixtures/piagent-webui/release-monitor-v1.invalid.json +12 -0
  103. package/evals/fixtures/piagent-webui/release-monitor-v1.valid.json +29 -0
  104. package/evals/fixtures/piagent-webui/review-state-v1.invalid.json +25 -0
  105. package/evals/fixtures/piagent-webui/review-state-v1.valid.json +38 -0
  106. package/evals/fixtures/piagent-webui/runtime-event-v2.invalid.json +49 -0
  107. package/evals/fixtures/piagent-webui/runtime-event-v2.valid.json +49 -0
  108. package/evals/fixtures/piagent-webui/session-catalog-v1.invalid.json +17 -0
  109. package/evals/fixtures/piagent-webui/session-catalog-v1.valid.json +58 -0
  110. package/evals/fixtures/piagent-webui/session-command-v1.invalid.json +19 -0
  111. package/evals/fixtures/piagent-webui/session-command-v1.valid.json +19 -0
  112. package/evals/fixtures/piagent-webui/snapshot-v1.invalid.json +5 -0
  113. package/evals/fixtures/piagent-webui/snapshot-v1.valid.json +191 -0
  114. package/evals/fixtures/piagent-webui/source-change-v1.invalid.json +57 -0
  115. package/evals/fixtures/piagent-webui/source-change-v1.valid.json +98 -0
  116. package/evals/fixtures/piagent-webui/source-mutation-v1.invalid.json +19 -0
  117. package/evals/fixtures/piagent-webui/source-mutation-v1.valid.json +38 -0
  118. package/evals/fixtures/piagent-webui/source-revert-v1.invalid.json +20 -0
  119. package/evals/fixtures/piagent-webui/source-revert-v1.valid.json +62 -0
  120. package/evals/fixtures/piagent-webui/subagent-tree-v1.invalid.json +26 -0
  121. package/evals/fixtures/piagent-webui/subagent-tree-v1.valid.json +39 -0
  122. package/evals/fixtures/piagent-webui/task-index-v1.invalid.json +15 -0
  123. package/evals/fixtures/piagent-webui/task-index-v1.valid.json +15 -0
  124. package/evals/fixtures/piagent-webui/task-timeline-v1.invalid.json +14 -0
  125. package/evals/fixtures/piagent-webui/task-timeline-v1.valid.json +16 -0
  126. package/evals/fixtures/piagent-webui/transcript-v1.invalid.json +35 -0
  127. package/evals/fixtures/piagent-webui/transcript-v1.valid.json +55 -0
  128. package/evals/fixtures/task-baseline-manifest.invalid.json +16 -0
  129. package/evals/fixtures/task-baseline-manifest.valid.json +41 -0
  130. package/evals/fixtures/verifier-file-snapshot.invalid.json +21 -0
  131. package/evals/fixtures/verifier-file-snapshot.valid.json +21 -0
  132. package/package.json +30 -3
  133. package/packages/piagent-core/benchmark/benchmark-candidate.d.ts +1 -0
  134. package/packages/piagent-core/benchmark/benchmark-forensics.d.ts +1 -0
  135. package/packages/piagent-core/benchmark/benchmark-ledger.d.ts +4 -0
  136. package/packages/piagent-core/benchmark/benchmark-record-validation.d.ts +1 -0
  137. package/packages/piagent-core/benchmark/benchmark-runtime.d.ts +1 -0
  138. package/packages/piagent-core/capabilities/capability-core.js +2 -2
  139. package/packages/piagent-core/capabilities/capability-verification-cache.js +280 -0
  140. package/packages/piagent-core/capabilities/runtime-integrity.js +153 -1
  141. package/packages/piagent-core/extensions/document-intake.ts +24 -10
  142. package/packages/piagent-core/extensions/piagent-guard.ts +90 -73
  143. package/packages/piagent-core/extensions/redaction-core.d.ts +2 -0
  144. package/packages/piagent-core/extensions/state-retention.js +77 -44
  145. package/packages/piagent-core/extensions/task-journal.js +30 -1
  146. package/packages/piagent-core/extensions/task-state.js +33 -36
  147. package/packages/piagent-core/mcp/mcp-server-catalog.js +5 -5
  148. package/packages/piagent-core/package.json +1 -1
  149. package/packages/piagent-core/runtime/hooks/session-start-hook.ts +2 -2
  150. package/packages/piagent-core/runtime/hooks/tool-call-hook.ts +5 -2
  151. package/packages/piagent-core/runtime/hooks/tool-result-hook.ts +20 -19
  152. package/packages/piagent-core/runtime/hooks/tool-result-metadata.ts +13 -0
  153. package/packages/piagent-core/runtime/input/chat-images.ts +2 -2
  154. package/packages/piagent-core/runtime/inspection/activity-event-adapter.ts +94 -0
  155. package/packages/piagent-core/runtime/inspection/approval-broker.ts +318 -0
  156. package/packages/piagent-core/runtime/inspection/commit-summary-projection.ts +59 -0
  157. package/packages/piagent-core/runtime/inspection/context-telemetry-inspection.ts +37 -0
  158. package/packages/piagent-core/runtime/inspection/criteria-links.ts +295 -0
  159. package/packages/piagent-core/runtime/inspection/diff-projection.ts +499 -0
  160. package/packages/piagent-core/runtime/inspection/git-filter-safety.ts +38 -0
  161. package/packages/piagent-core/runtime/inspection/git-numstat-adapter.ts +71 -0
  162. package/packages/piagent-core/runtime/inspection/git-status-adapter.ts +493 -0
  163. package/packages/piagent-core/runtime/inspection/git-tree-adapter.ts +108 -0
  164. package/packages/piagent-core/runtime/inspection/mcp-control.ts +10 -0
  165. package/packages/piagent-core/runtime/inspection/mutation-provenance-contract.ts +131 -0
  166. package/packages/piagent-core/runtime/inspection/mutation-provenance-recorder.ts +48 -0
  167. package/packages/piagent-core/runtime/inspection/mutation-provenance-store.ts +161 -0
  168. package/packages/piagent-core/runtime/inspection/project-runtime-inspection.ts +36 -0
  169. package/packages/piagent-core/runtime/inspection/review-state-contract.ts +108 -0
  170. package/packages/piagent-core/runtime/inspection/review-state-projection.ts +93 -0
  171. package/packages/piagent-core/runtime/inspection/review-state-store.ts +112 -0
  172. package/packages/piagent-core/runtime/inspection/runtime-event-store.ts +262 -0
  173. package/packages/piagent-core/runtime/inspection/same-process-bridge-proof.ts +103 -0
  174. package/packages/piagent-core/runtime/inspection/source-change-projection.ts +471 -0
  175. package/packages/piagent-core/runtime/inspection/source-evidence-contract.ts +139 -0
  176. package/packages/piagent-core/runtime/inspection/source-evidence-store.ts +315 -0
  177. package/packages/piagent-core/runtime/inspection/source-handoff-store.ts +70 -0
  178. package/packages/piagent-core/runtime/inspection/source-inspection-plan.ts +34 -0
  179. package/packages/piagent-core/runtime/inspection/source-mutation-projection.ts +164 -0
  180. package/packages/piagent-core/runtime/inspection/source-mutation-store.ts +168 -0
  181. package/packages/piagent-core/runtime/inspection/source-open-target.ts +38 -0
  182. package/packages/piagent-core/runtime/inspection/source-revert-projection.ts +147 -0
  183. package/packages/piagent-core/runtime/inspection/task-baseline-start-capture.ts +22 -0
  184. package/packages/piagent-core/runtime/inspection/task-compaction-history.ts +160 -0
  185. package/packages/piagent-core/runtime/inspection/task-control-journal.ts +131 -0
  186. package/packages/piagent-core/runtime/inspection/task-handoff-history.ts +95 -0
  187. package/packages/piagent-core/runtime/inspection/task-provenance-projection.ts +60 -0
  188. package/packages/piagent-core/runtime/inspection/task-recovery-timeline.ts +88 -0
  189. package/packages/piagent-core/runtime/inspection/task-run-index.ts +87 -0
  190. package/packages/piagent-core/runtime/inspection/task-source-projection.ts +401 -0
  191. package/packages/piagent-core/runtime/inspection/task-subagent-tree.ts +101 -0
  192. package/packages/piagent-core/runtime/inspection/text-diff.ts +60 -0
  193. package/packages/piagent-core/runtime/inspection/verifier-snapshot-contract.ts +114 -0
  194. package/packages/piagent-core/runtime/inspection/verifier-snapshot-store.ts +189 -0
  195. package/packages/piagent-core/runtime/inspection/webui-snapshot.ts +320 -0
  196. package/packages/piagent-core/runtime/inspection/workspace-file-reader.ts +132 -0
  197. package/packages/piagent-core/runtime/inspection/workspace-source-projection.ts +96 -0
  198. package/packages/piagent-core/runtime/inspection/zero-turn-conformance.ts +175 -0
  199. package/packages/piagent-core/runtime/orchestration/owned-work-budget.ts +68 -4
  200. package/packages/piagent-core/runtime/policy/source-index-transaction.ts +173 -0
  201. package/packages/piagent-core/runtime/policy/source-mutation-guard-binding.ts +42 -0
  202. package/packages/piagent-core/runtime/policy/source-mutation-guard.ts +184 -0
  203. package/packages/piagent-core/runtime/policy/source-worktree-transaction.ts +105 -0
  204. package/packages/piagent-core/runtime/product/activity-inspector-footer.ts +5 -3
  205. package/packages/piagent-core/runtime/product/activity-inspector.ts +85 -343
  206. package/packages/piagent-core/runtime/recovery/resume-state.ts +38 -1
  207. package/packages/piagent-core/runtime/registration/activity-inspector-command.ts +68 -14
  208. package/packages/piagent-core/runtime/registration/task-start-tool.ts +13 -14
  209. package/packages/piagent-core/runtime/session/model-authorship-state.ts +31 -3
  210. package/packages/piagent-core/runtime/session/runtime-state.ts +11 -1
  211. package/packages/piagent-webui/dist/client/assets/index-DjMntaK5.js +172 -0
  212. package/packages/piagent-webui/dist/client/assets/index-DwKCWbwd.css +1 -0
  213. package/packages/piagent-webui/dist/client/index.html +16 -0
  214. package/packages/piagent-webui/extension/attachment-store.ts +323 -0
  215. package/packages/piagent-webui/extension/held-message-queue.ts +311 -0
  216. package/packages/piagent-webui/extension/lifecycle-controller.ts +408 -0
  217. package/packages/piagent-webui/extension/lifecycle-event-adapter.ts +23 -0
  218. package/packages/piagent-webui/extension/piagent-webui.ts +470 -0
  219. package/packages/piagent-webui/extension/review-controller.ts +160 -0
  220. package/packages/piagent-webui/extension/same-session-bridge.ts +500 -0
  221. package/packages/piagent-webui/extension/session-options-controller.ts +281 -0
  222. package/packages/piagent-webui/extension/session-stream-adapter.ts +249 -0
  223. package/packages/piagent-webui/extension/source-mutation-controller.ts +215 -0
  224. package/packages/piagent-webui/extension/source-open-controller.ts +136 -0
  225. package/packages/piagent-webui/extension/source-revert-controller.ts +189 -0
  226. package/packages/piagent-webui/extension/terminal-session-adapter.ts +73 -0
  227. package/packages/piagent-webui/extension/vscode-handoff.ts +51 -0
  228. package/packages/piagent-webui/gateway/control-socket.ts +92 -0
  229. package/packages/piagent-webui/gateway/gateway-events.ts +60 -0
  230. package/packages/piagent-webui/gateway/gateway-protocol-service.ts +64 -0
  231. package/packages/piagent-webui/gateway/gateway-service.ts +215 -0
  232. package/packages/piagent-webui/gateway/gateway-session-stream.ts +110 -0
  233. package/packages/piagent-webui/gateway/mcp-auth-broker.ts +158 -0
  234. package/packages/piagent-webui/gateway/native-project-picker.ts +29 -0
  235. package/packages/piagent-webui/gateway/pi-host.ts +41 -0
  236. package/packages/piagent-webui/gateway/profile-state.ts +1 -0
  237. package/packages/piagent-webui/gateway/project-registry.ts +108 -0
  238. package/packages/piagent-webui/gateway/provider-auth-broker.ts +172 -0
  239. package/packages/piagent-webui/gateway/session-catalog.ts +128 -0
  240. package/packages/piagent-webui/gateway/session-command-controller.ts +237 -0
  241. package/packages/piagent-webui/gateway/session-command-store.ts +224 -0
  242. package/packages/piagent-webui/gateway/session-inspection-registry.ts +204 -0
  243. package/packages/piagent-webui/gateway/session-lease-store.ts +1 -0
  244. package/packages/piagent-webui/gateway/session-metadata-store.ts +152 -0
  245. package/packages/piagent-webui/gateway/session-runtime-supervisor.ts +485 -0
  246. package/packages/piagent-webui/ownership/gateway-runtime-context.ts +8 -0
  247. package/packages/piagent-webui/ownership/profile-state.ts +117 -0
  248. package/packages/piagent-webui/ownership/session-lease-store.ts +329 -0
  249. package/packages/piagent-webui/ownership/session-refs.ts +8 -0
  250. package/packages/piagent-webui/package.json +33 -0
  251. package/packages/piagent-webui/server/README.md +4 -0
  252. package/packages/piagent-webui/server/benchmark-release-monitor.ts +230 -0
  253. package/packages/piagent-webui/server/core-inspection-provider.ts +403 -0
  254. package/packages/piagent-webui/server/gateway-websocket.ts +143 -0
  255. package/packages/piagent-webui/server/http-security.ts +27 -0
  256. package/packages/piagent-webui/server/ipc-read-model-client.ts +89 -0
  257. package/packages/piagent-webui/server/loopback-server.ts +368 -0
  258. package/packages/piagent-webui/server/read-model-provider.ts +37 -0
  259. package/packages/piagent-webui/server/read-only-router.ts +105 -0
  260. package/packages/piagent-webui/server/session-auth.ts +88 -0
  261. package/packages/piagent-webui/server/sidecar-main.ts +86 -0
  262. package/packages/piagent-webui/server/sse-hub.ts +76 -0
  263. package/packages/piagent-webui/server/static-bundle.ts +40 -0
  264. package/packages/piagent-webui/server/transcript-projection.ts +110 -0
  265. package/schemas/mutation-provenance-record.schema.json +100 -0
  266. package/schemas/piagent-webui/approval-v1.schema.json +654 -0
  267. package/schemas/piagent-webui/attachment-v1.schema.json +267 -0
  268. package/schemas/piagent-webui/capabilities-v1.schema.json +729 -0
  269. package/schemas/piagent-webui/catalog-v1.json +240 -0
  270. package/schemas/piagent-webui/commit-summary-v1.schema.json +63 -0
  271. package/schemas/piagent-webui/common-v1.schema.json +479 -0
  272. package/schemas/piagent-webui/control-command-v1.schema.json +1780 -0
  273. package/schemas/piagent-webui/diff-v1.schema.json +826 -0
  274. package/schemas/piagent-webui/gateway-capabilities-v1.schema.json +136 -0
  275. package/schemas/piagent-webui/gateway-protocol-v1.schema.json +456 -0
  276. package/schemas/piagent-webui/handoff-history-v1.schema.json +92 -0
  277. package/schemas/piagent-webui/model-catalog-v1.schema.json +95 -0
  278. package/schemas/piagent-webui/queue-v1.schema.json +99 -0
  279. package/schemas/piagent-webui/recovery-history-v1.schema.json +144 -0
  280. package/schemas/piagent-webui/release-monitor-v1.schema.json +173 -0
  281. package/schemas/piagent-webui/review-state-v1.schema.json +206 -0
  282. package/schemas/piagent-webui/runtime-event-v2.schema.json +5206 -0
  283. package/schemas/piagent-webui/session-catalog-v1.schema.json +222 -0
  284. package/schemas/piagent-webui/session-command-v1.schema.json +390 -0
  285. package/schemas/piagent-webui/snapshot-v1.schema.json +2622 -0
  286. package/schemas/piagent-webui/source-change-v1.schema.json +763 -0
  287. package/schemas/piagent-webui/source-mutation-v1.schema.json +96 -0
  288. package/schemas/piagent-webui/source-revert-v1.schema.json +130 -0
  289. package/schemas/piagent-webui/subagent-tree-v1.schema.json +88 -0
  290. package/schemas/piagent-webui/task-index-v1.schema.json +74 -0
  291. package/schemas/piagent-webui/task-timeline-v1.schema.json +49 -0
  292. package/schemas/piagent-webui/transcript-v1.schema.json +243 -0
  293. package/schemas/task-baseline-manifest.schema.json +122 -0
  294. package/schemas/verifier-file-snapshot.schema.json +81 -0
  295. package/scripts/check-architecture.mjs +1 -0
  296. package/scripts/check-doc-languages.mjs +19 -2
  297. package/scripts/check-third-party-neutrality.mjs +43 -0
  298. package/scripts/install-global.sh +1 -1
  299. package/scripts/piagent-cli.mjs +17 -3
  300. package/scripts/piagent-dashboard.mjs +208 -0
  301. package/scripts/piagent-webui-launcher.mjs +121 -0
  302. package/scripts/typescript-loader.mjs +26 -1
  303. package/scripts/verify-local.sh +253 -0
  304. package/scripts/verify-release-identity.mjs +4 -1
@@ -0,0 +1,2622 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://piagent.io.vn/schemas/piagent-webui/snapshot-v1.schema.json",
4
+ "title": "Piagent WebUI canonical snapshot v1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "version",
10
+ "generatedAt",
11
+ "identity",
12
+ "revision",
13
+ "capabilities",
14
+ "session",
15
+ "task",
16
+ "sourceChanges",
17
+ "activity",
18
+ "approvals",
19
+ "verification",
20
+ "usage",
21
+ "continuation",
22
+ "handoff",
23
+ "health"
24
+ ],
25
+ "properties": {
26
+ "schemaVersion": {
27
+ "const": 1
28
+ },
29
+ "version": {
30
+ "const": "piagent-webui-snapshot-v1"
31
+ },
32
+ "generatedAt": {
33
+ "$ref": "common-v1.schema.json#/$defs/timestamp"
34
+ },
35
+ "identity": {
36
+ "$ref": "common-v1.schema.json#/$defs/identity"
37
+ },
38
+ "revision": {
39
+ "$ref": "common-v1.schema.json#/$defs/snapshotRevision"
40
+ },
41
+ "capabilities": {
42
+ "$ref": "capabilities-v1.schema.json"
43
+ },
44
+ "session": {
45
+ "$ref": "#/$defs/session"
46
+ },
47
+ "task": {
48
+ "anyOf": [
49
+ {
50
+ "$ref": "#/$defs/task"
51
+ },
52
+ {
53
+ "type": "null"
54
+ }
55
+ ]
56
+ },
57
+ "sourceChanges": {
58
+ "$ref": "#/$defs/sourceChanges"
59
+ },
60
+ "activity": {
61
+ "$ref": "#/$defs/activitySummary"
62
+ },
63
+ "approvals": {
64
+ "$ref": "#/$defs/approvalSummary"
65
+ },
66
+ "verification": {
67
+ "$ref": "#/$defs/verification"
68
+ },
69
+ "usage": {
70
+ "$ref": "#/$defs/usage"
71
+ },
72
+ "continuation": {
73
+ "$ref": "#/$defs/continuation"
74
+ },
75
+ "handoff": {
76
+ "anyOf": [
77
+ {
78
+ "$ref": "#/$defs/handoff"
79
+ },
80
+ {
81
+ "type": "null"
82
+ }
83
+ ]
84
+ },
85
+ "health": {
86
+ "$ref": "#/$defs/aggregateHealth"
87
+ }
88
+ },
89
+ "allOf": [
90
+ {
91
+ "if": {
92
+ "properties": {
93
+ "identity": {
94
+ "properties": {
95
+ "toolCallId": {
96
+ "type": "string"
97
+ }
98
+ },
99
+ "type": "object"
100
+ }
101
+ },
102
+ "type": "object"
103
+ },
104
+ "then": {
105
+ "properties": {
106
+ "identity": {
107
+ "properties": {
108
+ "agentOperationId": {
109
+ "$ref": "common-v1.schema.json#/$defs/opaqueRef"
110
+ }
111
+ },
112
+ "type": "object"
113
+ }
114
+ },
115
+ "type": "object"
116
+ }
117
+ },
118
+ {
119
+ "if": {
120
+ "properties": {
121
+ "identity": {
122
+ "properties": {
123
+ "taskRunId": {
124
+ "type": "string"
125
+ }
126
+ },
127
+ "type": "object"
128
+ }
129
+ },
130
+ "type": "object"
131
+ },
132
+ "then": {
133
+ "properties": {
134
+ "identity": {
135
+ "properties": {
136
+ "taskId": {
137
+ "$ref": "common-v1.schema.json#/$defs/publicId"
138
+ }
139
+ },
140
+ "type": "object"
141
+ }
142
+ },
143
+ "type": "object"
144
+ }
145
+ },
146
+ {
147
+ "if": {
148
+ "properties": {
149
+ "task": {
150
+ "type": "null"
151
+ }
152
+ },
153
+ "type": "object"
154
+ },
155
+ "then": {
156
+ "properties": {
157
+ "identity": {
158
+ "properties": {
159
+ "taskId": {
160
+ "type": "null"
161
+ },
162
+ "taskRunId": {
163
+ "type": "null"
164
+ }
165
+ },
166
+ "type": "object"
167
+ },
168
+ "revision": {
169
+ "properties": {
170
+ "taskRevision": {
171
+ "type": "null"
172
+ },
173
+ "controlRevision": {
174
+ "type": "null"
175
+ }
176
+ },
177
+ "type": "object"
178
+ }
179
+ },
180
+ "type": "object"
181
+ },
182
+ "else": {
183
+ "properties": {
184
+ "identity": {
185
+ "properties": {
186
+ "taskId": {
187
+ "$ref": "common-v1.schema.json#/$defs/publicId"
188
+ },
189
+ "taskRunId": {
190
+ "$ref": "common-v1.schema.json#/$defs/publicId"
191
+ }
192
+ },
193
+ "type": "object"
194
+ },
195
+ "revision": {
196
+ "properties": {
197
+ "taskRevision": {
198
+ "$ref": "common-v1.schema.json#/$defs/revisionToken"
199
+ },
200
+ "controlRevision": {
201
+ "$ref": "common-v1.schema.json#/$defs/revisionToken"
202
+ }
203
+ },
204
+ "type": "object"
205
+ }
206
+ },
207
+ "type": "object"
208
+ }
209
+ },
210
+ {
211
+ "oneOf": [
212
+ {
213
+ "type": "object",
214
+ "properties": {
215
+ "session": { "type": "object", "properties": { "verificationState": { "const": "not-run" } } },
216
+ "verification": { "type": "object", "properties": { "state": { "const": "not-run" } } }
217
+ }
218
+ },
219
+ {
220
+ "type": "object",
221
+ "properties": {
222
+ "session": { "type": "object", "properties": { "verificationState": { "const": "running" } } },
223
+ "verification": { "type": "object", "properties": { "state": { "const": "running" } } }
224
+ }
225
+ },
226
+ {
227
+ "type": "object",
228
+ "properties": {
229
+ "session": { "type": "object", "properties": { "verificationState": { "const": "current" } } },
230
+ "verification": { "type": "object", "properties": { "state": { "const": "current" } } }
231
+ }
232
+ },
233
+ {
234
+ "type": "object",
235
+ "properties": {
236
+ "session": { "type": "object", "properties": { "verificationState": { "const": "failed" } } },
237
+ "verification": { "type": "object", "properties": { "state": { "const": "failed" } } }
238
+ }
239
+ },
240
+ {
241
+ "type": "object",
242
+ "properties": {
243
+ "session": { "type": "object", "properties": { "verificationState": { "const": "stale" } } },
244
+ "verification": { "type": "object", "properties": { "state": { "const": "stale" } } }
245
+ }
246
+ },
247
+ {
248
+ "type": "object",
249
+ "properties": {
250
+ "session": { "type": "object", "properties": { "verificationState": { "const": "unavailable" } } },
251
+ "verification": { "type": "object", "properties": { "state": { "const": "unavailable" } } }
252
+ }
253
+ }
254
+ ]
255
+ },
256
+ {
257
+ "if": {
258
+ "type": "object",
259
+ "properties": { "task": { "type": "null" } },
260
+ "required": ["task"]
261
+ },
262
+ "then": {
263
+ "type": "object",
264
+ "properties": {
265
+ "session": { "type": "object", "properties": { "taskOutcome": { "type": "null" } } }
266
+ }
267
+ },
268
+ "else": {
269
+ "oneOf": [
270
+ {
271
+ "type": "object",
272
+ "properties": {
273
+ "task": { "type": "object", "properties": { "outcome": { "const": "pending" } } },
274
+ "session": { "type": "object", "properties": { "taskOutcome": { "const": "pending" } } }
275
+ }
276
+ },
277
+ {
278
+ "type": "object",
279
+ "properties": {
280
+ "task": { "type": "object", "properties": { "outcome": { "const": "completed" } } },
281
+ "session": { "type": "object", "properties": { "taskOutcome": { "const": "completed" } } }
282
+ }
283
+ },
284
+ {
285
+ "type": "object",
286
+ "properties": {
287
+ "task": { "type": "object", "properties": { "outcome": { "const": "blocked" } } },
288
+ "session": { "type": "object", "properties": { "taskOutcome": { "const": "blocked" } } }
289
+ }
290
+ },
291
+ {
292
+ "type": "object",
293
+ "properties": {
294
+ "task": { "type": "object", "properties": { "outcome": { "const": "partial" } } },
295
+ "session": { "type": "object", "properties": { "taskOutcome": { "const": "partial" } } }
296
+ }
297
+ },
298
+ {
299
+ "type": "object",
300
+ "properties": {
301
+ "task": { "type": "object", "properties": { "outcome": { "const": "failed" } } },
302
+ "session": { "type": "object", "properties": { "taskOutcome": { "const": "failed" } } }
303
+ }
304
+ }
305
+ ]
306
+ }
307
+ },
308
+ {
309
+ "if": {
310
+ "type": "object",
311
+ "properties": {
312
+ "task": { "type": "object", "properties": { "outcome": { "const": "pending" } }, "required": ["outcome"] }
313
+ },
314
+ "required": ["task"]
315
+ },
316
+ "then": {
317
+ "oneOf": [
318
+ {
319
+ "type": "object",
320
+ "properties": {
321
+ "task": { "type": "object", "properties": { "controlState": { "const": "active" } } },
322
+ "session": { "type": "object", "properties": { "controlState": { "const": "active" } } }
323
+ }
324
+ },
325
+ {
326
+ "type": "object",
327
+ "properties": {
328
+ "task": { "type": "object", "properties": { "controlState": { "const": "pause-requested" } } },
329
+ "session": { "type": "object", "properties": { "controlState": { "const": "pause-requested" } } }
330
+ }
331
+ },
332
+ {
333
+ "type": "object",
334
+ "properties": {
335
+ "task": { "type": "object", "properties": { "controlState": { "const": "paused" } } },
336
+ "session": { "type": "object", "properties": { "controlState": { "const": "paused" } } }
337
+ }
338
+ },
339
+ {
340
+ "type": "object",
341
+ "properties": {
342
+ "task": { "type": "object", "properties": { "controlState": { "const": "unknown" } } },
343
+ "session": { "type": "object", "properties": { "controlState": { "const": "unknown" } } }
344
+ }
345
+ }
346
+ ]
347
+ },
348
+ "else": {
349
+ "if": {
350
+ "type": "object",
351
+ "properties": { "task": { "type": "object" } },
352
+ "required": ["task"]
353
+ },
354
+ "then": {
355
+ "type": "object",
356
+ "properties": {
357
+ "task": { "type": "object", "properties": { "controlState": { "const": "terminal" } } },
358
+ "session": { "type": "object", "properties": { "controlState": { "const": "terminal" } } }
359
+ }
360
+ }
361
+ }
362
+ },
363
+ {
364
+ "oneOf": [
365
+ {
366
+ "type": "object",
367
+ "properties": {
368
+ "session": { "type": "object", "properties": { "approvalState": { "const": "none" } } },
369
+ "approvals": { "type": "object", "properties": { "state": { "const": "none" } } }
370
+ }
371
+ },
372
+ {
373
+ "type": "object",
374
+ "properties": {
375
+ "session": { "type": "object", "properties": { "approvalState": { "const": "waiting" } } },
376
+ "approvals": { "type": "object", "properties": { "state": { "const": "waiting" } } }
377
+ }
378
+ },
379
+ {
380
+ "type": "object",
381
+ "properties": {
382
+ "session": { "type": "object", "properties": { "approvalState": { "const": "resolved" } } },
383
+ "approvals": { "type": "object", "properties": { "state": { "const": "resolved" } } }
384
+ }
385
+ },
386
+ {
387
+ "type": "object",
388
+ "properties": {
389
+ "session": { "type": "object", "properties": { "approvalState": { "const": "expired" } } },
390
+ "approvals": { "type": "object", "properties": { "state": { "const": "expired" } } }
391
+ }
392
+ },
393
+ {
394
+ "type": "object",
395
+ "properties": {
396
+ "session": { "type": "object", "properties": { "approvalState": { "const": "unknown" } } },
397
+ "approvals": { "type": "object", "properties": { "state": { "const": "unknown" } } }
398
+ }
399
+ }
400
+ ]
401
+ },
402
+ {
403
+ "if": {
404
+ "type": "object",
405
+ "properties": { "task": { "type": "null" } },
406
+ "required": ["task"]
407
+ },
408
+ "then": {
409
+ "type": "object",
410
+ "properties": {
411
+ "sourceChanges": {
412
+ "type": "object",
413
+ "properties": {
414
+ "task": {
415
+ "type": "object",
416
+ "properties": { "state": { "const": "unavailable" } }
417
+ }
418
+ }
419
+ }
420
+ }
421
+ }
422
+ }
423
+ ],
424
+ "$defs": {
425
+ "knownFactState": {
426
+ "enum": [
427
+ "known",
428
+ "unknown",
429
+ "unavailable",
430
+ "disconnected",
431
+ "resync-required"
432
+ ]
433
+ },
434
+ "factMetadata": {
435
+ "type": "object",
436
+ "additionalProperties": false,
437
+ "required": [
438
+ "state",
439
+ "evidence",
440
+ "reasonCode"
441
+ ],
442
+ "properties": {
443
+ "state": {
444
+ "$ref": "#/$defs/knownFactState"
445
+ },
446
+ "evidence": {
447
+ "anyOf": [
448
+ {
449
+ "enum": [
450
+ "observed",
451
+ "derived"
452
+ ]
453
+ },
454
+ {
455
+ "type": "null"
456
+ }
457
+ ]
458
+ },
459
+ "reasonCode": {
460
+ "$ref": "common-v1.schema.json#/$defs/nullableReasonCode"
461
+ }
462
+ },
463
+ "allOf": [
464
+ {
465
+ "if": {
466
+ "properties": {
467
+ "state": {
468
+ "const": "known"
469
+ }
470
+ },
471
+ "type": "object"
472
+ },
473
+ "then": {
474
+ "properties": {
475
+ "evidence": {
476
+ "enum": [
477
+ "observed",
478
+ "derived"
479
+ ]
480
+ },
481
+ "reasonCode": {
482
+ "type": "null"
483
+ }
484
+ },
485
+ "type": "object"
486
+ },
487
+ "else": {
488
+ "properties": {
489
+ "evidence": {
490
+ "type": "null"
491
+ },
492
+ "reasonCode": {
493
+ "$ref": "common-v1.schema.json#/$defs/reasonCode"
494
+ }
495
+ },
496
+ "type": "object"
497
+ }
498
+ }
499
+ ]
500
+ },
501
+ "model": {
502
+ "type": "object",
503
+ "additionalProperties": false,
504
+ "required": [
505
+ "modelRef",
506
+ "provider",
507
+ "modelId",
508
+ "displayName",
509
+ "reasoning",
510
+ "inputCapabilities",
511
+ "supportedThinkingLevels",
512
+ "contextWindow",
513
+ "maxOutputTokens"
514
+ ],
515
+ "properties": {
516
+ "modelRef": {
517
+ "$ref": "common-v1.schema.json#/$defs/opaqueRef"
518
+ },
519
+ "provider": {
520
+ "$ref": "common-v1.schema.json#/$defs/publicId"
521
+ },
522
+ "modelId": {
523
+ "$ref": "common-v1.schema.json#/$defs/publicId"
524
+ },
525
+ "displayName": {
526
+ "$ref": "common-v1.schema.json#/$defs/nonEmptyDisplayText"
527
+ },
528
+ "reasoning": {
529
+ "type": "boolean"
530
+ },
531
+ "inputCapabilities": {
532
+ "type": "array",
533
+ "maxItems": 8,
534
+ "uniqueItems": true,
535
+ "items": {
536
+ "enum": [
537
+ "text",
538
+ "image",
539
+ "audio",
540
+ "document"
541
+ ]
542
+ }
543
+ },
544
+ "supportedThinkingLevels": {
545
+ "type": "array",
546
+ "maxItems": 7,
547
+ "uniqueItems": true,
548
+ "items": {
549
+ "enum": [
550
+ "off",
551
+ "minimal",
552
+ "low",
553
+ "medium",
554
+ "high",
555
+ "xhigh",
556
+ "max"
557
+ ]
558
+ }
559
+ },
560
+ "contextWindow": {
561
+ "type": "integer",
562
+ "minimum": 1,
563
+ "maximum": 100000000
564
+ },
565
+ "maxOutputTokens": {
566
+ "type": "integer",
567
+ "minimum": 1,
568
+ "maximum": 100000000
569
+ }
570
+ }
571
+ },
572
+ "modelFact": {
573
+ "type": "object",
574
+ "additionalProperties": false,
575
+ "required": [
576
+ "state",
577
+ "value",
578
+ "evidence",
579
+ "reasonCode"
580
+ ],
581
+ "properties": {
582
+ "state": {
583
+ "$ref": "#/$defs/knownFactState"
584
+ },
585
+ "value": {
586
+ "anyOf": [
587
+ {
588
+ "$ref": "#/$defs/model"
589
+ },
590
+ {
591
+ "type": "null"
592
+ }
593
+ ]
594
+ },
595
+ "evidence": {
596
+ "type": [
597
+ "string",
598
+ "null"
599
+ ],
600
+ "enum": [
601
+ "observed",
602
+ "derived",
603
+ null
604
+ ]
605
+ },
606
+ "reasonCode": {
607
+ "$ref": "common-v1.schema.json#/$defs/nullableReasonCode"
608
+ }
609
+ },
610
+ "allOf": [
611
+ {
612
+ "if": {
613
+ "properties": {
614
+ "state": {
615
+ "const": "known"
616
+ }
617
+ },
618
+ "type": "object"
619
+ },
620
+ "then": {
621
+ "properties": {
622
+ "value": {
623
+ "$ref": "#/$defs/model"
624
+ },
625
+ "evidence": {
626
+ "enum": [
627
+ "observed",
628
+ "derived"
629
+ ]
630
+ },
631
+ "reasonCode": {
632
+ "type": "null"
633
+ }
634
+ },
635
+ "type": "object"
636
+ },
637
+ "else": {
638
+ "properties": {
639
+ "value": {
640
+ "type": "null"
641
+ },
642
+ "evidence": {
643
+ "type": "null"
644
+ },
645
+ "reasonCode": {
646
+ "$ref": "common-v1.schema.json#/$defs/reasonCode"
647
+ }
648
+ },
649
+ "type": "object"
650
+ }
651
+ }
652
+ ]
653
+ },
654
+ "thinkingFact": {
655
+ "type": "object",
656
+ "additionalProperties": false,
657
+ "required": [
658
+ "state",
659
+ "value",
660
+ "evidence",
661
+ "reasonCode"
662
+ ],
663
+ "properties": {
664
+ "state": {
665
+ "$ref": "#/$defs/knownFactState"
666
+ },
667
+ "value": {
668
+ "type": [
669
+ "string",
670
+ "null"
671
+ ],
672
+ "enum": [
673
+ "off",
674
+ "minimal",
675
+ "low",
676
+ "medium",
677
+ "high",
678
+ "xhigh",
679
+ "max",
680
+ null
681
+ ]
682
+ },
683
+ "evidence": {
684
+ "type": [
685
+ "string",
686
+ "null"
687
+ ],
688
+ "enum": [
689
+ "observed",
690
+ "derived",
691
+ null
692
+ ]
693
+ },
694
+ "reasonCode": {
695
+ "$ref": "common-v1.schema.json#/$defs/nullableReasonCode"
696
+ }
697
+ },
698
+ "allOf": [
699
+ {
700
+ "if": {
701
+ "properties": {
702
+ "state": {
703
+ "const": "known"
704
+ }
705
+ },
706
+ "type": "object"
707
+ },
708
+ "then": {
709
+ "properties": {
710
+ "value": {
711
+ "enum": [
712
+ "off",
713
+ "minimal",
714
+ "low",
715
+ "medium",
716
+ "high",
717
+ "xhigh",
718
+ "max"
719
+ ]
720
+ },
721
+ "evidence": {
722
+ "enum": [
723
+ "observed",
724
+ "derived"
725
+ ]
726
+ },
727
+ "reasonCode": {
728
+ "type": "null"
729
+ }
730
+ },
731
+ "type": "object"
732
+ },
733
+ "else": {
734
+ "properties": {
735
+ "value": {
736
+ "type": "null"
737
+ },
738
+ "evidence": {
739
+ "type": "null"
740
+ },
741
+ "reasonCode": {
742
+ "$ref": "common-v1.schema.json#/$defs/reasonCode"
743
+ }
744
+ },
745
+ "type": "object"
746
+ }
747
+ }
748
+ ]
749
+ },
750
+ "hostPhaseFact": {
751
+ "type": "object",
752
+ "additionalProperties": false,
753
+ "required": [
754
+ "state",
755
+ "value",
756
+ "evidence",
757
+ "reasonCode"
758
+ ],
759
+ "properties": {
760
+ "state": {
761
+ "$ref": "#/$defs/knownFactState"
762
+ },
763
+ "value": {
764
+ "anyOf": [
765
+ {
766
+ "$ref": "common-v1.schema.json#/$defs/operationPhase"
767
+ },
768
+ {
769
+ "type": "null"
770
+ }
771
+ ]
772
+ },
773
+ "evidence": {
774
+ "type": [
775
+ "string",
776
+ "null"
777
+ ],
778
+ "enum": [
779
+ "observed",
780
+ "derived",
781
+ null
782
+ ]
783
+ },
784
+ "reasonCode": {
785
+ "$ref": "common-v1.schema.json#/$defs/nullableReasonCode"
786
+ }
787
+ },
788
+ "allOf": [
789
+ {
790
+ "if": {
791
+ "properties": {
792
+ "state": {
793
+ "const": "known"
794
+ }
795
+ },
796
+ "type": "object"
797
+ },
798
+ "then": {
799
+ "properties": {
800
+ "value": {
801
+ "enum": [
802
+ "idle",
803
+ "input-preflight",
804
+ "model",
805
+ "tool-preflight",
806
+ "waiting-approval",
807
+ "tool",
808
+ "retry",
809
+ "compaction",
810
+ "branch-summary",
811
+ "direct-bash",
812
+ "settling",
813
+ "other"
814
+ ]
815
+ },
816
+ "evidence": {
817
+ "enum": [
818
+ "observed",
819
+ "derived"
820
+ ]
821
+ },
822
+ "reasonCode": {
823
+ "type": "null"
824
+ }
825
+ },
826
+ "type": "object"
827
+ },
828
+ "else": {
829
+ "properties": {
830
+ "value": {
831
+ "type": "null"
832
+ },
833
+ "evidence": {
834
+ "type": "null"
835
+ },
836
+ "reasonCode": {
837
+ "$ref": "common-v1.schema.json#/$defs/reasonCode"
838
+ }
839
+ },
840
+ "type": "object"
841
+ }
842
+ }
843
+ ]
844
+ },
845
+ "session": {
846
+ "type": "object",
847
+ "additionalProperties": false,
848
+ "required": [
849
+ "connectionState",
850
+ "connectionReason",
851
+ "displayName",
852
+ "operation",
853
+ "controlState",
854
+ "taskOutcome",
855
+ "approvalState",
856
+ "verificationState",
857
+ "permissionProfile",
858
+ "model",
859
+ "thinking",
860
+ "queue",
861
+ "context"
862
+ ],
863
+ "properties": {
864
+ "connectionState": {
865
+ "enum": [
866
+ "connected",
867
+ "disconnected",
868
+ "reconnecting",
869
+ "resync-required",
870
+ "unknown"
871
+ ]
872
+ },
873
+ "connectionReason": {
874
+ "$ref": "common-v1.schema.json#/$defs/nullableReasonCode"
875
+ },
876
+ "displayName": {
877
+ "$ref": "common-v1.schema.json#/$defs/nullableDisplayText"
878
+ },
879
+ "operation": {
880
+ "$ref": "#/$defs/operation"
881
+ },
882
+ "controlState": {
883
+ "enum": [
884
+ "active",
885
+ "pause-requested",
886
+ "paused",
887
+ "terminal",
888
+ "unknown"
889
+ ]
890
+ },
891
+ "taskOutcome": {
892
+ "type": [
893
+ "string",
894
+ "null"
895
+ ],
896
+ "enum": [
897
+ "pending",
898
+ "completed",
899
+ "blocked",
900
+ "partial",
901
+ "failed",
902
+ null
903
+ ]
904
+ },
905
+ "approvalState": {
906
+ "enum": [
907
+ "none",
908
+ "waiting",
909
+ "resolved",
910
+ "expired",
911
+ "unknown"
912
+ ]
913
+ },
914
+ "verificationState": {
915
+ "enum": [
916
+ "not-run",
917
+ "running",
918
+ "current",
919
+ "failed",
920
+ "stale",
921
+ "unavailable"
922
+ ]
923
+ },
924
+ "permissionProfile": {
925
+ "type": "object",
926
+ "additionalProperties": false,
927
+ "required": [
928
+ "state",
929
+ "value",
930
+ "evidence",
931
+ "reasonCode"
932
+ ],
933
+ "properties": {
934
+ "state": {
935
+ "$ref": "#/$defs/knownFactState"
936
+ },
937
+ "value": {
938
+ "type": [
939
+ "string",
940
+ "null"
941
+ ],
942
+ "enum": [
943
+ "read-only",
944
+ "workspace-write",
945
+ "trusted-full-access",
946
+ null
947
+ ]
948
+ },
949
+ "evidence": {
950
+ "type": [
951
+ "string",
952
+ "null"
953
+ ],
954
+ "enum": [
955
+ "observed",
956
+ "derived",
957
+ null
958
+ ]
959
+ },
960
+ "reasonCode": {
961
+ "$ref": "common-v1.schema.json#/$defs/nullableReasonCode"
962
+ }
963
+ },
964
+ "allOf": [
965
+ {
966
+ "if": {
967
+ "type": "object",
968
+ "properties": { "state": { "const": "known" } },
969
+ "required": ["state"]
970
+ },
971
+ "then": {
972
+ "type": "object",
973
+ "properties": {
974
+ "value": { "enum": ["read-only", "workspace-write", "trusted-full-access"] },
975
+ "evidence": { "enum": ["observed", "derived"] },
976
+ "reasonCode": { "type": "null" }
977
+ }
978
+ },
979
+ "else": {
980
+ "type": "object",
981
+ "properties": {
982
+ "value": { "type": "null" },
983
+ "evidence": { "type": "null" },
984
+ "reasonCode": { "$ref": "common-v1.schema.json#/$defs/reasonCode" }
985
+ }
986
+ }
987
+ }
988
+ ]
989
+ },
990
+ "model": {
991
+ "$ref": "#/$defs/modelFact"
992
+ },
993
+ "thinking": {
994
+ "$ref": "#/$defs/thinkingFact"
995
+ },
996
+ "queue": {
997
+ "$ref": "#/$defs/queue"
998
+ },
999
+ "context": {
1000
+ "$ref": "#/$defs/contextUsage"
1001
+ }
1002
+ }
1003
+ },
1004
+ "operation": {
1005
+ "type": "object",
1006
+ "additionalProperties": false,
1007
+ "required": [
1008
+ "liveness",
1009
+ "operationRef",
1010
+ "hostPhase",
1011
+ "startedAt",
1012
+ "settledAt",
1013
+ "reasonCode"
1014
+ ],
1015
+ "properties": {
1016
+ "liveness": {
1017
+ "enum": [
1018
+ "idle",
1019
+ "running",
1020
+ "stopping",
1021
+ "settled",
1022
+ "unknown"
1023
+ ]
1024
+ },
1025
+ "operationRef": {
1026
+ "$ref": "common-v1.schema.json#/$defs/nullableOpaqueRef"
1027
+ },
1028
+ "hostPhase": {
1029
+ "$ref": "#/$defs/hostPhaseFact"
1030
+ },
1031
+ "startedAt": {
1032
+ "anyOf": [
1033
+ {
1034
+ "$ref": "common-v1.schema.json#/$defs/timestamp"
1035
+ },
1036
+ {
1037
+ "type": "null"
1038
+ }
1039
+ ]
1040
+ },
1041
+ "settledAt": {
1042
+ "anyOf": [
1043
+ {
1044
+ "$ref": "common-v1.schema.json#/$defs/timestamp"
1045
+ },
1046
+ {
1047
+ "type": "null"
1048
+ }
1049
+ ]
1050
+ },
1051
+ "reasonCode": {
1052
+ "$ref": "common-v1.schema.json#/$defs/nullableReasonCode"
1053
+ }
1054
+ }
1055
+ },
1056
+ "queue": {
1057
+ "type": "object",
1058
+ "additionalProperties": false,
1059
+ "required": [
1060
+ "state",
1061
+ "hasPending",
1062
+ "heldCount",
1063
+ "revision",
1064
+ "reasonCode"
1065
+ ],
1066
+ "properties": {
1067
+ "state": {
1068
+ "enum": [
1069
+ "known",
1070
+ "unknown",
1071
+ "unavailable",
1072
+ "disconnected",
1073
+ "resync-required"
1074
+ ]
1075
+ },
1076
+ "hasPending": {
1077
+ "type": [
1078
+ "boolean",
1079
+ "null"
1080
+ ]
1081
+ },
1082
+ "heldCount": {
1083
+ "type": [
1084
+ "integer",
1085
+ "null"
1086
+ ],
1087
+ "minimum": 0,
1088
+ "maximum": 1000
1089
+ },
1090
+ "revision": {
1091
+ "$ref": "common-v1.schema.json#/$defs/nullableRevisionToken"
1092
+ },
1093
+ "reasonCode": {
1094
+ "$ref": "common-v1.schema.json#/$defs/nullableReasonCode"
1095
+ }
1096
+ },
1097
+ "allOf": [
1098
+ {
1099
+ "if": { "type": "object", "properties": { "state": { "const": "known" } }, "required": ["state"] },
1100
+ "then": {
1101
+ "type": "object",
1102
+ "properties": {
1103
+ "hasPending": { "type": "boolean" },
1104
+ "heldCount": { "type": "integer", "minimum": 0, "maximum": 1000 },
1105
+ "revision": { "$ref": "common-v1.schema.json#/$defs/revisionToken" },
1106
+ "reasonCode": { "type": "null" }
1107
+ }
1108
+ },
1109
+ "else": {
1110
+ "type": "object",
1111
+ "properties": {
1112
+ "hasPending": { "type": "null" },
1113
+ "heldCount": { "type": "null" },
1114
+ "revision": { "type": "null" },
1115
+ "reasonCode": { "$ref": "common-v1.schema.json#/$defs/reasonCode" }
1116
+ }
1117
+ }
1118
+ }
1119
+ ]
1120
+ },
1121
+ "contextUsage": {
1122
+ "type": "object",
1123
+ "additionalProperties": false,
1124
+ "required": [
1125
+ "state",
1126
+ "tokens",
1127
+ "contextWindow",
1128
+ "percent",
1129
+ "capturedAt",
1130
+ "reasonCode"
1131
+ ],
1132
+ "properties": {
1133
+ "state": {
1134
+ "enum": [
1135
+ "known",
1136
+ "unknown",
1137
+ "unavailable",
1138
+ "disconnected"
1139
+ ]
1140
+ },
1141
+ "tokens": {
1142
+ "type": [
1143
+ "integer",
1144
+ "null"
1145
+ ],
1146
+ "minimum": 0,
1147
+ "maximum": 1000000000
1148
+ },
1149
+ "contextWindow": {
1150
+ "type": [
1151
+ "integer",
1152
+ "null"
1153
+ ],
1154
+ "minimum": 1,
1155
+ "maximum": 1000000000
1156
+ },
1157
+ "percent": {
1158
+ "type": [
1159
+ "number",
1160
+ "null"
1161
+ ],
1162
+ "minimum": 0,
1163
+ "maximum": 100
1164
+ },
1165
+ "capturedAt": {
1166
+ "anyOf": [
1167
+ {
1168
+ "$ref": "common-v1.schema.json#/$defs/timestamp"
1169
+ },
1170
+ {
1171
+ "type": "null"
1172
+ }
1173
+ ]
1174
+ },
1175
+ "reasonCode": {
1176
+ "$ref": "common-v1.schema.json#/$defs/nullableReasonCode"
1177
+ }
1178
+ },
1179
+ "allOf": [
1180
+ {
1181
+ "if": { "type": "object", "properties": { "state": { "const": "known" } }, "required": ["state"] },
1182
+ "then": {
1183
+ "type": "object",
1184
+ "properties": {
1185
+ "tokens": { "type": "integer", "minimum": 0, "maximum": 1000000000 },
1186
+ "contextWindow": { "type": "integer", "minimum": 1, "maximum": 1000000000 },
1187
+ "percent": { "type": "number", "minimum": 0, "maximum": 100 },
1188
+ "capturedAt": { "$ref": "common-v1.schema.json#/$defs/timestamp" },
1189
+ "reasonCode": { "type": "null" }
1190
+ }
1191
+ },
1192
+ "else": {
1193
+ "type": "object",
1194
+ "properties": {
1195
+ "tokens": { "type": "null" },
1196
+ "contextWindow": { "type": "null" },
1197
+ "percent": { "type": "null" },
1198
+ "capturedAt": { "type": "null" },
1199
+ "reasonCode": { "$ref": "common-v1.schema.json#/$defs/reasonCode" }
1200
+ }
1201
+ }
1202
+ }
1203
+ ]
1204
+ },
1205
+ "criterion": {
1206
+ "type": "object",
1207
+ "additionalProperties": false,
1208
+ "required": [
1209
+ "criterionId",
1210
+ "obligation",
1211
+ "priority",
1212
+ "state",
1213
+ "evidence",
1214
+ "relatedFileRefs",
1215
+ "verifierAttemptRefs",
1216
+ "reasonCode"
1217
+ ],
1218
+ "properties": {
1219
+ "criterionId": {
1220
+ "$ref": "common-v1.schema.json#/$defs/publicId"
1221
+ },
1222
+ "obligation": {
1223
+ "$ref": "common-v1.schema.json#/$defs/nonEmptyDisplayText"
1224
+ },
1225
+ "priority": {
1226
+ "enum": [
1227
+ "normal",
1228
+ "critical"
1229
+ ]
1230
+ },
1231
+ "state": {
1232
+ "enum": [
1233
+ "pending",
1234
+ "satisfied",
1235
+ "blocked",
1236
+ "unknown"
1237
+ ]
1238
+ },
1239
+ "evidence": {
1240
+ "enum": [
1241
+ "observed",
1242
+ "derived",
1243
+ "unavailable"
1244
+ ]
1245
+ },
1246
+ "relatedFileRefs": {
1247
+ "type": "array",
1248
+ "maxItems": 300,
1249
+ "uniqueItems": true,
1250
+ "items": {
1251
+ "$ref": "common-v1.schema.json#/$defs/opaqueRef"
1252
+ }
1253
+ },
1254
+ "verifierAttemptRefs": {
1255
+ "type": "array",
1256
+ "maxItems": 64,
1257
+ "uniqueItems": true,
1258
+ "items": {
1259
+ "$ref": "common-v1.schema.json#/$defs/opaqueRef"
1260
+ }
1261
+ },
1262
+ "reasonCode": {
1263
+ "$ref": "common-v1.schema.json#/$defs/nullableReasonCode"
1264
+ }
1265
+ }
1266
+ },
1267
+ "workPlanStep": {
1268
+ "type": "object",
1269
+ "additionalProperties": false,
1270
+ "required": [
1271
+ "stepId",
1272
+ "summary",
1273
+ "status",
1274
+ "criterionIds"
1275
+ ],
1276
+ "properties": {
1277
+ "stepId": {
1278
+ "$ref": "common-v1.schema.json#/$defs/publicId"
1279
+ },
1280
+ "summary": {
1281
+ "$ref": "common-v1.schema.json#/$defs/nonEmptyDisplayText"
1282
+ },
1283
+ "status": {
1284
+ "enum": [
1285
+ "pending",
1286
+ "in-progress",
1287
+ "done",
1288
+ "skipped",
1289
+ "failed"
1290
+ ]
1291
+ },
1292
+ "criterionIds": {
1293
+ "type": "array",
1294
+ "maxItems": 12,
1295
+ "uniqueItems": true,
1296
+ "items": {
1297
+ "$ref": "common-v1.schema.json#/$defs/publicId"
1298
+ }
1299
+ }
1300
+ }
1301
+ },
1302
+ "task": {
1303
+ "type": "object",
1304
+ "additionalProperties": false,
1305
+ "required": [
1306
+ "taskId",
1307
+ "taskRunId",
1308
+ "summary",
1309
+ "changeMode",
1310
+ "riskLane",
1311
+ "outcome",
1312
+ "controlState",
1313
+ "criteria",
1314
+ "workPlan",
1315
+ "scope",
1316
+ "outOfScope",
1317
+ "progress",
1318
+ "blocker",
1319
+ "reasonCode"
1320
+ ],
1321
+ "properties": {
1322
+ "taskId": {
1323
+ "$ref": "common-v1.schema.json#/$defs/publicId"
1324
+ },
1325
+ "taskRunId": {
1326
+ "$ref": "common-v1.schema.json#/$defs/publicId"
1327
+ },
1328
+ "summary": {
1329
+ "$ref": "common-v1.schema.json#/$defs/nonEmptyDisplayText"
1330
+ },
1331
+ "changeMode": {
1332
+ "enum": [
1333
+ "source-change",
1334
+ "read-only"
1335
+ ]
1336
+ },
1337
+ "riskLane": {
1338
+ "enum": [
1339
+ "low-risk",
1340
+ "high-risk"
1341
+ ]
1342
+ },
1343
+ "outcome": {
1344
+ "enum": [
1345
+ "pending",
1346
+ "completed",
1347
+ "blocked",
1348
+ "partial",
1349
+ "failed"
1350
+ ]
1351
+ },
1352
+ "controlState": {
1353
+ "enum": [
1354
+ "active",
1355
+ "pause-requested",
1356
+ "paused",
1357
+ "terminal",
1358
+ "unknown"
1359
+ ]
1360
+ },
1361
+ "criteria": {
1362
+ "type": "array",
1363
+ "maxItems": 64,
1364
+ "items": {
1365
+ "$ref": "#/$defs/criterion"
1366
+ }
1367
+ },
1368
+ "workPlan": {
1369
+ "type": "array",
1370
+ "maxItems": 64,
1371
+ "items": {
1372
+ "$ref": "#/$defs/workPlanStep"
1373
+ }
1374
+ },
1375
+ "scope": {
1376
+ "type": "array",
1377
+ "maxItems": 256,
1378
+ "uniqueItems": true,
1379
+ "items": {
1380
+ "$ref": "common-v1.schema.json#/$defs/nonEmptyDisplayText"
1381
+ }
1382
+ },
1383
+ "outOfScope": {
1384
+ "type": "array",
1385
+ "maxItems": 256,
1386
+ "uniqueItems": true,
1387
+ "items": {
1388
+ "$ref": "common-v1.schema.json#/$defs/nonEmptyDisplayText"
1389
+ }
1390
+ },
1391
+ "progress": {
1392
+ "type": "object",
1393
+ "additionalProperties": false,
1394
+ "required": [
1395
+ "completed",
1396
+ "total",
1397
+ "percent"
1398
+ ],
1399
+ "properties": {
1400
+ "completed": {
1401
+ "type": "integer",
1402
+ "minimum": 0,
1403
+ "maximum": 10000
1404
+ },
1405
+ "total": {
1406
+ "type": "integer",
1407
+ "minimum": 0,
1408
+ "maximum": 10000
1409
+ },
1410
+ "percent": {
1411
+ "type": "number",
1412
+ "minimum": 0,
1413
+ "maximum": 100
1414
+ }
1415
+ }
1416
+ },
1417
+ "blocker": {
1418
+ "$ref": "common-v1.schema.json#/$defs/nullableDisplayText"
1419
+ },
1420
+ "reasonCode": {
1421
+ "$ref": "common-v1.schema.json#/$defs/nullableReasonCode"
1422
+ }
1423
+ }
1424
+ },
1425
+ "sourceViewSummary": {
1426
+ "type": "object",
1427
+ "additionalProperties": false,
1428
+ "required": [
1429
+ "view",
1430
+ "base",
1431
+ "state",
1432
+ "revision",
1433
+ "counts",
1434
+ "health"
1435
+ ],
1436
+ "properties": {
1437
+ "view": {
1438
+ "enum": [
1439
+ "task",
1440
+ "working-tree",
1441
+ "staged"
1442
+ ]
1443
+ },
1444
+ "base": {
1445
+ "enum": [
1446
+ "task-baseline",
1447
+ "HEAD",
1448
+ "index"
1449
+ ]
1450
+ },
1451
+ "state": {
1452
+ "enum": [
1453
+ "ready",
1454
+ "loading",
1455
+ "stale",
1456
+ "unavailable",
1457
+ "unknown"
1458
+ ]
1459
+ },
1460
+ "revision": {
1461
+ "$ref": "common-v1.schema.json#/$defs/nullableRevisionToken"
1462
+ },
1463
+ "counts": {
1464
+ "type": "object",
1465
+ "additionalProperties": false,
1466
+ "required": [
1467
+ "files",
1468
+ "added",
1469
+ "modified",
1470
+ "deleted",
1471
+ "renamed",
1472
+ "untracked",
1473
+ "conflicted",
1474
+ "additions",
1475
+ "deletions"
1476
+ ],
1477
+ "properties": {
1478
+ "files": {
1479
+ "type": "integer",
1480
+ "minimum": 0,
1481
+ "maximum": 1000000
1482
+ },
1483
+ "added": {
1484
+ "type": "integer",
1485
+ "minimum": 0,
1486
+ "maximum": 1000000
1487
+ },
1488
+ "modified": {
1489
+ "type": "integer",
1490
+ "minimum": 0,
1491
+ "maximum": 1000000
1492
+ },
1493
+ "deleted": {
1494
+ "type": "integer",
1495
+ "minimum": 0,
1496
+ "maximum": 1000000
1497
+ },
1498
+ "renamed": {
1499
+ "type": "integer",
1500
+ "minimum": 0,
1501
+ "maximum": 1000000
1502
+ },
1503
+ "untracked": {
1504
+ "type": "integer",
1505
+ "minimum": 0,
1506
+ "maximum": 1000000
1507
+ },
1508
+ "conflicted": {
1509
+ "type": "integer",
1510
+ "minimum": 0,
1511
+ "maximum": 1000000
1512
+ },
1513
+ "additions": {
1514
+ "type": [
1515
+ "integer",
1516
+ "null"
1517
+ ],
1518
+ "minimum": 0,
1519
+ "maximum": 1000000000
1520
+ },
1521
+ "deletions": {
1522
+ "type": [
1523
+ "integer",
1524
+ "null"
1525
+ ],
1526
+ "minimum": 0,
1527
+ "maximum": 1000000000
1528
+ }
1529
+ }
1530
+ },
1531
+ "health": {
1532
+ "$ref": "common-v1.schema.json#/$defs/health"
1533
+ }
1534
+ },
1535
+ "allOf": [
1536
+ {
1537
+ "if": {
1538
+ "type": "object",
1539
+ "properties": { "state": { "const": "ready" } },
1540
+ "required": ["state"]
1541
+ },
1542
+ "then": {
1543
+ "type": "object",
1544
+ "properties": {
1545
+ "revision": { "$ref": "common-v1.schema.json#/$defs/revisionToken" },
1546
+ "health": {
1547
+ "type": "object",
1548
+ "properties": { "state": { "const": "ok" } }
1549
+ }
1550
+ }
1551
+ },
1552
+ "else": {
1553
+ "type": "object",
1554
+ "properties": {
1555
+ "health": {
1556
+ "type": "object",
1557
+ "properties": { "state": { "enum": ["degraded", "error", "unavailable", "unknown"] } }
1558
+ }
1559
+ }
1560
+ }
1561
+ },
1562
+ {
1563
+ "if": {
1564
+ "type": "object",
1565
+ "properties": { "state": { "enum": ["unavailable", "unknown"] } },
1566
+ "required": ["state"]
1567
+ },
1568
+ "then": {
1569
+ "type": "object",
1570
+ "properties": {
1571
+ "revision": { "type": "null" },
1572
+ "counts": {
1573
+ "type": "object",
1574
+ "properties": {
1575
+ "files": { "const": 0 },
1576
+ "added": { "const": 0 },
1577
+ "modified": { "const": 0 },
1578
+ "deleted": { "const": 0 },
1579
+ "renamed": { "const": 0 },
1580
+ "untracked": { "const": 0 },
1581
+ "conflicted": { "const": 0 },
1582
+ "additions": { "type": "null" },
1583
+ "deletions": { "type": "null" }
1584
+ }
1585
+ }
1586
+ }
1587
+ }
1588
+ },
1589
+ {
1590
+ "if": {
1591
+ "properties": {
1592
+ "view": {
1593
+ "const": "task"
1594
+ }
1595
+ },
1596
+ "type": "object"
1597
+ },
1598
+ "then": {
1599
+ "properties": {
1600
+ "base": {
1601
+ "const": "task-baseline"
1602
+ }
1603
+ },
1604
+ "type": "object"
1605
+ }
1606
+ },
1607
+ {
1608
+ "if": {
1609
+ "properties": {
1610
+ "view": {
1611
+ "const": "working-tree"
1612
+ }
1613
+ },
1614
+ "type": "object"
1615
+ },
1616
+ "then": {
1617
+ "properties": {
1618
+ "base": {
1619
+ "const": "HEAD"
1620
+ }
1621
+ },
1622
+ "type": "object"
1623
+ }
1624
+ },
1625
+ {
1626
+ "if": {
1627
+ "properties": {
1628
+ "view": {
1629
+ "const": "staged"
1630
+ }
1631
+ },
1632
+ "type": "object"
1633
+ },
1634
+ "then": {
1635
+ "properties": {
1636
+ "base": {
1637
+ "const": "HEAD"
1638
+ }
1639
+ },
1640
+ "type": "object"
1641
+ }
1642
+ }
1643
+ ]
1644
+ },
1645
+ "sourceChanges": {
1646
+ "type": "object",
1647
+ "additionalProperties": false,
1648
+ "required": [
1649
+ "task",
1650
+ "workingTree",
1651
+ "staged"
1652
+ ],
1653
+ "properties": {
1654
+ "task": {
1655
+ "allOf": [
1656
+ { "$ref": "#/$defs/sourceViewSummary" },
1657
+ {
1658
+ "type": "object",
1659
+ "properties": { "view": { "const": "task" } }
1660
+ }
1661
+ ]
1662
+ },
1663
+ "workingTree": {
1664
+ "allOf": [
1665
+ { "$ref": "#/$defs/sourceViewSummary" },
1666
+ {
1667
+ "type": "object",
1668
+ "properties": { "view": { "const": "working-tree" } }
1669
+ }
1670
+ ]
1671
+ },
1672
+ "staged": {
1673
+ "allOf": [
1674
+ { "$ref": "#/$defs/sourceViewSummary" },
1675
+ {
1676
+ "type": "object",
1677
+ "properties": { "view": { "const": "staged" } }
1678
+ }
1679
+ ]
1680
+ }
1681
+ }
1682
+ },
1683
+ "activity": {
1684
+ "type": "object",
1685
+ "additionalProperties": false,
1686
+ "required": [
1687
+ "activityRef",
1688
+ "kind",
1689
+ "state",
1690
+ "label",
1691
+ "preview",
1692
+ "toolCallId",
1693
+ "toolName",
1694
+ "commandDigest",
1695
+ "logRef",
1696
+ "exitCode",
1697
+ "exitCodeExact",
1698
+ "startedAt",
1699
+ "finishedAt"
1700
+ ],
1701
+ "properties": {
1702
+ "activityRef": {
1703
+ "$ref": "common-v1.schema.json#/$defs/opaqueRef"
1704
+ },
1705
+ "kind": {
1706
+ "enum": [
1707
+ "tool",
1708
+ "command",
1709
+ "verifier",
1710
+ "approval",
1711
+ "system"
1712
+ ]
1713
+ },
1714
+ "state": {
1715
+ "enum": [
1716
+ "requested",
1717
+ "running",
1718
+ "passed",
1719
+ "failed",
1720
+ "blocked",
1721
+ "aborted",
1722
+ "unknown"
1723
+ ]
1724
+ },
1725
+ "label": {
1726
+ "$ref": "common-v1.schema.json#/$defs/nonEmptyDisplayText"
1727
+ },
1728
+ "preview": {
1729
+ "type": "string",
1730
+ "maxLength": 65536,
1731
+ "pattern": "^[^\\u0000]*$"
1732
+ },
1733
+ "toolCallId": {
1734
+ "$ref": "common-v1.schema.json#/$defs/nullableOpaqueRef"
1735
+ },
1736
+ "toolName": {
1737
+ "$ref": "common-v1.schema.json#/$defs/nullablePublicId"
1738
+ },
1739
+ "commandDigest": {
1740
+ "anyOf": [
1741
+ {
1742
+ "$ref": "common-v1.schema.json#/$defs/digest"
1743
+ },
1744
+ {
1745
+ "type": "null"
1746
+ }
1747
+ ]
1748
+ },
1749
+ "logRef": {
1750
+ "$ref": "common-v1.schema.json#/$defs/nullableOpaqueRef"
1751
+ },
1752
+ "exitCode": {
1753
+ "type": [
1754
+ "integer",
1755
+ "null"
1756
+ ],
1757
+ "minimum": -2147483648,
1758
+ "maximum": 2147483647
1759
+ },
1760
+ "exitCodeExact": {
1761
+ "type": "boolean"
1762
+ },
1763
+ "startedAt": {
1764
+ "$ref": "common-v1.schema.json#/$defs/timestamp"
1765
+ },
1766
+ "finishedAt": {
1767
+ "anyOf": [
1768
+ {
1769
+ "$ref": "common-v1.schema.json#/$defs/timestamp"
1770
+ },
1771
+ {
1772
+ "type": "null"
1773
+ }
1774
+ ]
1775
+ }
1776
+ }
1777
+ },
1778
+ "activitySummary": {
1779
+ "type": "object",
1780
+ "additionalProperties": false,
1781
+ "required": [
1782
+ "running",
1783
+ "recent",
1784
+ "page",
1785
+ "health"
1786
+ ],
1787
+ "properties": {
1788
+ "running": {
1789
+ "type": "array",
1790
+ "maxItems": 32,
1791
+ "items": {
1792
+ "$ref": "#/$defs/activity"
1793
+ }
1794
+ },
1795
+ "recent": {
1796
+ "type": "array",
1797
+ "maxItems": 200,
1798
+ "items": {
1799
+ "$ref": "#/$defs/activity"
1800
+ }
1801
+ },
1802
+ "page": {
1803
+ "$ref": "common-v1.schema.json#/$defs/page"
1804
+ },
1805
+ "health": {
1806
+ "$ref": "common-v1.schema.json#/$defs/health"
1807
+ }
1808
+ }
1809
+ },
1810
+ "approvalSummaryItem": {
1811
+ "type": "object",
1812
+ "additionalProperties": false,
1813
+ "required": [
1814
+ "approvalRef",
1815
+ "state",
1816
+ "resolution",
1817
+ "actionSummary",
1818
+ "toolCallId",
1819
+ "expiresAt",
1820
+ "reasonCode"
1821
+ ],
1822
+ "properties": {
1823
+ "approvalRef": {
1824
+ "$ref": "common-v1.schema.json#/$defs/opaqueRef"
1825
+ },
1826
+ "state": {
1827
+ "enum": [
1828
+ "waiting",
1829
+ "resolved",
1830
+ "expired",
1831
+ "unknown"
1832
+ ]
1833
+ },
1834
+ "resolution": {
1835
+ "type": [
1836
+ "string",
1837
+ "null"
1838
+ ],
1839
+ "enum": [
1840
+ "allow",
1841
+ "deny",
1842
+ "cancelled",
1843
+ "expired",
1844
+ null
1845
+ ]
1846
+ },
1847
+ "actionSummary": {
1848
+ "$ref": "common-v1.schema.json#/$defs/nonEmptyDisplayText"
1849
+ },
1850
+ "toolCallId": {
1851
+ "$ref": "common-v1.schema.json#/$defs/nullableOpaqueRef"
1852
+ },
1853
+ "expiresAt": {
1854
+ "anyOf": [
1855
+ {
1856
+ "$ref": "common-v1.schema.json#/$defs/timestamp"
1857
+ },
1858
+ {
1859
+ "type": "null"
1860
+ }
1861
+ ]
1862
+ },
1863
+ "reasonCode": {
1864
+ "$ref": "common-v1.schema.json#/$defs/nullableReasonCode"
1865
+ }
1866
+ },
1867
+ "allOf": [
1868
+ {
1869
+ "if": {
1870
+ "type": "object",
1871
+ "properties": { "state": { "const": "waiting" } },
1872
+ "required": ["state"]
1873
+ },
1874
+ "then": {
1875
+ "type": "object",
1876
+ "properties": {
1877
+ "resolution": { "type": "null" },
1878
+ "toolCallId": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" },
1879
+ "expiresAt": { "$ref": "common-v1.schema.json#/$defs/timestamp" },
1880
+ "reasonCode": { "type": "null" }
1881
+ }
1882
+ }
1883
+ },
1884
+ {
1885
+ "if": {
1886
+ "type": "object",
1887
+ "properties": { "state": { "const": "resolved" } },
1888
+ "required": ["state"]
1889
+ },
1890
+ "then": {
1891
+ "type": "object",
1892
+ "properties": {
1893
+ "resolution": { "enum": ["allow", "deny", "cancelled"] },
1894
+ "reasonCode": { "type": "null" }
1895
+ }
1896
+ }
1897
+ },
1898
+ {
1899
+ "if": {
1900
+ "type": "object",
1901
+ "properties": { "state": { "const": "expired" } },
1902
+ "required": ["state"]
1903
+ },
1904
+ "then": {
1905
+ "type": "object",
1906
+ "properties": {
1907
+ "resolution": { "const": "expired" },
1908
+ "reasonCode": { "$ref": "common-v1.schema.json#/$defs/reasonCode" }
1909
+ }
1910
+ }
1911
+ },
1912
+ {
1913
+ "if": {
1914
+ "type": "object",
1915
+ "properties": { "state": { "const": "unknown" } },
1916
+ "required": ["state"]
1917
+ },
1918
+ "then": {
1919
+ "type": "object",
1920
+ "properties": {
1921
+ "resolution": { "type": "null" },
1922
+ "toolCallId": { "type": "null" },
1923
+ "expiresAt": { "type": "null" },
1924
+ "reasonCode": { "$ref": "common-v1.schema.json#/$defs/reasonCode" }
1925
+ }
1926
+ }
1927
+ }
1928
+ ]
1929
+ },
1930
+ "approvalSummary": {
1931
+ "type": "object",
1932
+ "additionalProperties": false,
1933
+ "required": [
1934
+ "state",
1935
+ "pending",
1936
+ "recent",
1937
+ "health"
1938
+ ],
1939
+ "properties": {
1940
+ "state": {
1941
+ "enum": [
1942
+ "none",
1943
+ "waiting",
1944
+ "resolved",
1945
+ "expired",
1946
+ "unknown"
1947
+ ]
1948
+ },
1949
+ "pending": {
1950
+ "type": "array",
1951
+ "maxItems": 32,
1952
+ "items": {
1953
+ "$ref": "#/$defs/approvalSummaryItem"
1954
+ }
1955
+ },
1956
+ "recent": {
1957
+ "type": "array",
1958
+ "maxItems": 64,
1959
+ "items": {
1960
+ "$ref": "#/$defs/approvalSummaryItem"
1961
+ }
1962
+ },
1963
+ "health": {
1964
+ "$ref": "common-v1.schema.json#/$defs/health"
1965
+ }
1966
+ },
1967
+ "allOf": [
1968
+ {
1969
+ "if": {
1970
+ "type": "object",
1971
+ "properties": { "state": { "const": "waiting" } },
1972
+ "required": ["state"]
1973
+ },
1974
+ "then": {
1975
+ "type": "object",
1976
+ "properties": {
1977
+ "pending": {
1978
+ "type": "array",
1979
+ "minItems": 1,
1980
+ "items": {
1981
+ "allOf": [
1982
+ { "$ref": "#/$defs/approvalSummaryItem" },
1983
+ { "type": "object", "properties": { "state": { "const": "waiting" } } }
1984
+ ]
1985
+ }
1986
+ }
1987
+ }
1988
+ },
1989
+ "else": {
1990
+ "type": "object",
1991
+ "properties": { "pending": { "type": "array", "maxItems": 0 } }
1992
+ }
1993
+ },
1994
+ {
1995
+ "if": {
1996
+ "type": "object",
1997
+ "properties": { "state": { "const": "none" } },
1998
+ "required": ["state"]
1999
+ },
2000
+ "then": {
2001
+ "type": "object",
2002
+ "properties": { "recent": { "type": "array", "maxItems": 0 } }
2003
+ }
2004
+ },
2005
+ {
2006
+ "if": {
2007
+ "type": "object",
2008
+ "properties": { "state": { "const": "resolved" } },
2009
+ "required": ["state"]
2010
+ },
2011
+ "then": {
2012
+ "type": "object",
2013
+ "properties": {
2014
+ "recent": {
2015
+ "type": "array",
2016
+ "minItems": 1,
2017
+ "items": {
2018
+ "allOf": [
2019
+ { "$ref": "#/$defs/approvalSummaryItem" },
2020
+ { "type": "object", "properties": { "state": { "const": "resolved" } } }
2021
+ ]
2022
+ }
2023
+ }
2024
+ }
2025
+ }
2026
+ },
2027
+ {
2028
+ "if": {
2029
+ "type": "object",
2030
+ "properties": { "state": { "const": "expired" } },
2031
+ "required": ["state"]
2032
+ },
2033
+ "then": {
2034
+ "type": "object",
2035
+ "properties": {
2036
+ "recent": {
2037
+ "type": "array",
2038
+ "minItems": 1,
2039
+ "items": {
2040
+ "allOf": [
2041
+ { "$ref": "#/$defs/approvalSummaryItem" },
2042
+ { "type": "object", "properties": { "state": { "const": "expired" } } }
2043
+ ]
2044
+ }
2045
+ }
2046
+ }
2047
+ }
2048
+ }
2049
+ ]
2050
+ },
2051
+ "verifierAttempt": {
2052
+ "type": "object",
2053
+ "additionalProperties": false,
2054
+ "required": [
2055
+ "attemptRef",
2056
+ "command",
2057
+ "commandDigest",
2058
+ "exact",
2059
+ "state",
2060
+ "exitCode",
2061
+ "exitCodeExact",
2062
+ "treeDigest",
2063
+ "startedAt",
2064
+ "finishedAt",
2065
+ "staleByFileRefs",
2066
+ "staleByPaths",
2067
+ "staleFilesKnown"
2068
+ ],
2069
+ "properties": {
2070
+ "attemptRef": {
2071
+ "$ref": "common-v1.schema.json#/$defs/opaqueRef"
2072
+ },
2073
+ "command": {
2074
+ "type": "string",
2075
+ "minLength": 1,
2076
+ "maxLength": 4000,
2077
+ "pattern": "^[^\\u0000]*$"
2078
+ },
2079
+ "commandDigest": {
2080
+ "$ref": "common-v1.schema.json#/$defs/digest"
2081
+ },
2082
+ "exact": {
2083
+ "type": "boolean"
2084
+ },
2085
+ "state": {
2086
+ "enum": [
2087
+ "running",
2088
+ "passed",
2089
+ "failed",
2090
+ "blocked",
2091
+ "aborted",
2092
+ "stale",
2093
+ "unknown"
2094
+ ]
2095
+ },
2096
+ "exitCode": {
2097
+ "type": [
2098
+ "integer",
2099
+ "null"
2100
+ ],
2101
+ "minimum": -2147483648,
2102
+ "maximum": 2147483647
2103
+ },
2104
+ "exitCodeExact": {
2105
+ "type": "boolean"
2106
+ },
2107
+ "treeDigest": {
2108
+ "$ref": "common-v1.schema.json#/$defs/nullableWorkingTreeDigest"
2109
+ },
2110
+ "startedAt": {
2111
+ "$ref": "common-v1.schema.json#/$defs/timestamp"
2112
+ },
2113
+ "finishedAt": {
2114
+ "anyOf": [
2115
+ {
2116
+ "$ref": "common-v1.schema.json#/$defs/timestamp"
2117
+ },
2118
+ {
2119
+ "type": "null"
2120
+ }
2121
+ ]
2122
+ },
2123
+ "staleByFileRefs": {
2124
+ "type": "array",
2125
+ "maxItems": 300,
2126
+ "uniqueItems": true,
2127
+ "items": {
2128
+ "$ref": "common-v1.schema.json#/$defs/opaqueRef"
2129
+ }
2130
+ },
2131
+ "staleByPaths": {
2132
+ "type": "array",
2133
+ "maxItems": 300,
2134
+ "uniqueItems": true,
2135
+ "items": {
2136
+ "$ref": "common-v1.schema.json#/$defs/safeDisplayPath"
2137
+ }
2138
+ },
2139
+ "staleFilesKnown": {
2140
+ "type": "boolean"
2141
+ }
2142
+ }
2143
+ },
2144
+ "verification": {
2145
+ "type": "object",
2146
+ "additionalProperties": false,
2147
+ "required": [
2148
+ "state",
2149
+ "latest",
2150
+ "requiredCommands",
2151
+ "reasonCode",
2152
+ "health"
2153
+ ],
2154
+ "properties": {
2155
+ "state": {
2156
+ "enum": [
2157
+ "not-run",
2158
+ "running",
2159
+ "current",
2160
+ "failed",
2161
+ "stale",
2162
+ "unavailable"
2163
+ ]
2164
+ },
2165
+ "latest": {
2166
+ "anyOf": [
2167
+ {
2168
+ "$ref": "#/$defs/verifierAttempt"
2169
+ },
2170
+ {
2171
+ "type": "null"
2172
+ }
2173
+ ]
2174
+ },
2175
+ "requiredCommands": {
2176
+ "type": "array",
2177
+ "maxItems": 64,
2178
+ "uniqueItems": true,
2179
+ "items": {
2180
+ "type": "string",
2181
+ "minLength": 1,
2182
+ "maxLength": 4000,
2183
+ "pattern": "^[^\\u0000]*$"
2184
+ }
2185
+ },
2186
+ "reasonCode": {
2187
+ "$ref": "common-v1.schema.json#/$defs/nullableReasonCode"
2188
+ },
2189
+ "health": {
2190
+ "$ref": "common-v1.schema.json#/$defs/health"
2191
+ }
2192
+ },
2193
+ "allOf": [
2194
+ {
2195
+ "if": {
2196
+ "type": "object",
2197
+ "properties": { "state": { "enum": ["not-run", "unavailable"] } },
2198
+ "required": ["state"]
2199
+ },
2200
+ "then": {
2201
+ "type": "object",
2202
+ "properties": { "latest": { "type": "null" } }
2203
+ }
2204
+ },
2205
+ {
2206
+ "if": {
2207
+ "type": "object",
2208
+ "properties": { "state": { "const": "not-run" } },
2209
+ "required": ["state"]
2210
+ },
2211
+ "then": {
2212
+ "type": "object",
2213
+ "properties": { "reasonCode": { "type": "null" } }
2214
+ }
2215
+ },
2216
+ {
2217
+ "if": {
2218
+ "type": "object",
2219
+ "properties": { "state": { "const": "unavailable" } },
2220
+ "required": ["state"]
2221
+ },
2222
+ "then": {
2223
+ "type": "object",
2224
+ "properties": { "reasonCode": { "$ref": "common-v1.schema.json#/$defs/reasonCode" } }
2225
+ }
2226
+ },
2227
+ {
2228
+ "if": {
2229
+ "type": "object",
2230
+ "properties": { "state": { "const": "running" } },
2231
+ "required": ["state"]
2232
+ },
2233
+ "then": {
2234
+ "type": "object",
2235
+ "properties": {
2236
+ "latest": {
2237
+ "allOf": [
2238
+ { "$ref": "#/$defs/verifierAttempt" },
2239
+ {
2240
+ "type": "object",
2241
+ "properties": { "state": { "const": "running" }, "finishedAt": { "type": "null" } }
2242
+ }
2243
+ ]
2244
+ },
2245
+ "reasonCode": { "type": "null" }
2246
+ }
2247
+ }
2248
+ },
2249
+ {
2250
+ "if": {
2251
+ "type": "object",
2252
+ "properties": { "state": { "const": "current" } },
2253
+ "required": ["state"]
2254
+ },
2255
+ "then": {
2256
+ "type": "object",
2257
+ "properties": {
2258
+ "latest": {
2259
+ "allOf": [
2260
+ { "$ref": "#/$defs/verifierAttempt" },
2261
+ {
2262
+ "type": "object",
2263
+ "properties": {
2264
+ "state": { "const": "passed" },
2265
+ "exact": { "const": true },
2266
+ "treeDigest": { "$ref": "common-v1.schema.json#/$defs/workingTreeDigest" },
2267
+ "finishedAt": { "$ref": "common-v1.schema.json#/$defs/timestamp" },
2268
+ "staleByFileRefs": { "type": "array", "maxItems": 0 },
2269
+ "staleByPaths": { "type": "array", "maxItems": 0 }
2270
+ }
2271
+ }
2272
+ ]
2273
+ },
2274
+ "reasonCode": { "type": "null" }
2275
+ }
2276
+ }
2277
+ },
2278
+ {
2279
+ "if": {
2280
+ "type": "object",
2281
+ "properties": { "state": { "const": "failed" } },
2282
+ "required": ["state"]
2283
+ },
2284
+ "then": {
2285
+ "type": "object",
2286
+ "properties": {
2287
+ "latest": {
2288
+ "allOf": [
2289
+ { "$ref": "#/$defs/verifierAttempt" },
2290
+ { "type": "object", "properties": { "state": { "enum": ["failed", "blocked", "aborted"] } } }
2291
+ ]
2292
+ },
2293
+ "reasonCode": { "$ref": "common-v1.schema.json#/$defs/reasonCode" }
2294
+ }
2295
+ }
2296
+ },
2297
+ {
2298
+ "if": {
2299
+ "type": "object",
2300
+ "properties": { "state": { "const": "stale" } },
2301
+ "required": ["state"]
2302
+ },
2303
+ "then": {
2304
+ "type": "object",
2305
+ "properties": {
2306
+ "latest": {
2307
+ "allOf": [
2308
+ { "$ref": "#/$defs/verifierAttempt" },
2309
+ { "type": "object", "properties": { "state": { "const": "stale" } } }
2310
+ ]
2311
+ },
2312
+ "reasonCode": { "$ref": "common-v1.schema.json#/$defs/reasonCode" }
2313
+ }
2314
+ }
2315
+ }
2316
+ ]
2317
+ },
2318
+ "usageCounter": {
2319
+ "type": "object",
2320
+ "additionalProperties": false,
2321
+ "required": [
2322
+ "state",
2323
+ "input",
2324
+ "output",
2325
+ "cacheRead",
2326
+ "cacheWrite",
2327
+ "cost",
2328
+ "currency",
2329
+ "reasonCode"
2330
+ ],
2331
+ "properties": {
2332
+ "state": {
2333
+ "enum": [
2334
+ "known",
2335
+ "unknown",
2336
+ "unavailable"
2337
+ ]
2338
+ },
2339
+ "input": {
2340
+ "type": [
2341
+ "integer",
2342
+ "null"
2343
+ ],
2344
+ "minimum": 0,
2345
+ "maximum": 1000000000000
2346
+ },
2347
+ "output": {
2348
+ "type": [
2349
+ "integer",
2350
+ "null"
2351
+ ],
2352
+ "minimum": 0,
2353
+ "maximum": 1000000000000
2354
+ },
2355
+ "cacheRead": {
2356
+ "type": [
2357
+ "integer",
2358
+ "null"
2359
+ ],
2360
+ "minimum": 0,
2361
+ "maximum": 1000000000000
2362
+ },
2363
+ "cacheWrite": {
2364
+ "type": [
2365
+ "integer",
2366
+ "null"
2367
+ ],
2368
+ "minimum": 0,
2369
+ "maximum": 1000000000000
2370
+ },
2371
+ "cost": {
2372
+ "type": [
2373
+ "number",
2374
+ "null"
2375
+ ],
2376
+ "minimum": 0,
2377
+ "maximum": 1000000000
2378
+ },
2379
+ "currency": {
2380
+ "type": [
2381
+ "string",
2382
+ "null"
2383
+ ],
2384
+ "enum": [
2385
+ "USD",
2386
+ null
2387
+ ]
2388
+ },
2389
+ "reasonCode": {
2390
+ "$ref": "common-v1.schema.json#/$defs/nullableReasonCode"
2391
+ }
2392
+ },
2393
+ "allOf": [
2394
+ {
2395
+ "if": { "type": "object", "properties": { "state": { "const": "known" } }, "required": ["state"] },
2396
+ "then": {
2397
+ "type": "object",
2398
+ "properties": {
2399
+ "input": { "type": "integer", "minimum": 0, "maximum": 1000000000000 },
2400
+ "output": { "type": "integer", "minimum": 0, "maximum": 1000000000000 },
2401
+ "cacheRead": { "type": "integer", "minimum": 0, "maximum": 1000000000000 },
2402
+ "cacheWrite": { "type": "integer", "minimum": 0, "maximum": 1000000000000 },
2403
+ "cost": { "type": "number", "minimum": 0, "maximum": 1000000000 },
2404
+ "currency": { "const": "USD" },
2405
+ "reasonCode": { "type": "null" }
2406
+ }
2407
+ },
2408
+ "else": {
2409
+ "type": "object",
2410
+ "properties": {
2411
+ "input": { "type": "null" },
2412
+ "output": { "type": "null" },
2413
+ "cacheRead": { "type": "null" },
2414
+ "cacheWrite": { "type": "null" },
2415
+ "cost": { "type": "null" },
2416
+ "currency": { "type": "null" },
2417
+ "reasonCode": { "$ref": "common-v1.schema.json#/$defs/reasonCode" }
2418
+ }
2419
+ }
2420
+ }
2421
+ ]
2422
+ },
2423
+ "usage": {
2424
+ "type": "object",
2425
+ "additionalProperties": false,
2426
+ "required": [
2427
+ "context",
2428
+ "latestTurn",
2429
+ "sessionTotal",
2430
+ "taskTotal",
2431
+ "capturedAt",
2432
+ "health"
2433
+ ],
2434
+ "properties": {
2435
+ "context": {
2436
+ "$ref": "#/$defs/contextUsage"
2437
+ },
2438
+ "latestTurn": {
2439
+ "$ref": "#/$defs/usageCounter"
2440
+ },
2441
+ "sessionTotal": {
2442
+ "$ref": "#/$defs/usageCounter"
2443
+ },
2444
+ "taskTotal": {
2445
+ "$ref": "#/$defs/usageCounter"
2446
+ },
2447
+ "capturedAt": {
2448
+ "$ref": "common-v1.schema.json#/$defs/timestamp"
2449
+ },
2450
+ "health": {
2451
+ "$ref": "common-v1.schema.json#/$defs/health"
2452
+ }
2453
+ }
2454
+ },
2455
+ "continuation": {
2456
+ "type": "object",
2457
+ "additionalProperties": false,
2458
+ "required": [
2459
+ "state",
2460
+ "consumed",
2461
+ "maximum",
2462
+ "remaining",
2463
+ "reservationRef",
2464
+ "reasonCode"
2465
+ ],
2466
+ "properties": {
2467
+ "state": {
2468
+ "enum": [
2469
+ "available",
2470
+ "reserved",
2471
+ "exhausted",
2472
+ "not-applicable",
2473
+ "unknown"
2474
+ ]
2475
+ },
2476
+ "consumed": {
2477
+ "type": [
2478
+ "integer",
2479
+ "null"
2480
+ ],
2481
+ "minimum": 0,
2482
+ "maximum": 1000000
2483
+ },
2484
+ "maximum": {
2485
+ "type": [
2486
+ "integer",
2487
+ "null"
2488
+ ],
2489
+ "minimum": 0,
2490
+ "maximum": 1000000
2491
+ },
2492
+ "remaining": {
2493
+ "type": [
2494
+ "integer",
2495
+ "null"
2496
+ ],
2497
+ "minimum": 0,
2498
+ "maximum": 1000000
2499
+ },
2500
+ "reservationRef": {
2501
+ "$ref": "common-v1.schema.json#/$defs/nullableOpaqueRef"
2502
+ },
2503
+ "reasonCode": {
2504
+ "$ref": "common-v1.schema.json#/$defs/nullableReasonCode"
2505
+ }
2506
+ },
2507
+ "allOf": [
2508
+ {
2509
+ "if": { "type": "object", "properties": { "state": { "enum": ["available", "reserved", "exhausted"] } }, "required": ["state"] },
2510
+ "then": {
2511
+ "type": "object",
2512
+ "properties": {
2513
+ "consumed": { "type": "integer", "minimum": 0, "maximum": 1000000 },
2514
+ "maximum": { "type": "integer", "minimum": 0, "maximum": 1000000 },
2515
+ "remaining": { "type": "integer", "minimum": 0, "maximum": 1000000 },
2516
+ "reasonCode": { "type": "null" }
2517
+ }
2518
+ },
2519
+ "else": {
2520
+ "type": "object",
2521
+ "properties": {
2522
+ "consumed": { "type": "null" },
2523
+ "maximum": { "type": "null" },
2524
+ "remaining": { "type": "null" },
2525
+ "reservationRef": { "type": "null" },
2526
+ "reasonCode": { "$ref": "common-v1.schema.json#/$defs/reasonCode" }
2527
+ }
2528
+ }
2529
+ },
2530
+ {
2531
+ "if": { "type": "object", "properties": { "state": { "const": "reserved" } }, "required": ["state"] },
2532
+ "then": { "type": "object", "properties": { "reservationRef": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" } } },
2533
+ "else": { "type": "object", "properties": { "reservationRef": { "type": "null" } } }
2534
+ }
2535
+ ]
2536
+ },
2537
+ "handoff": {
2538
+ "type": "object",
2539
+ "additionalProperties": false,
2540
+ "required": [
2541
+ "handoffRef",
2542
+ "state",
2543
+ "summary",
2544
+ "blocker",
2545
+ "nextSafeAction",
2546
+ "evidenceRefs",
2547
+ "generatedAt",
2548
+ "reasonCode"
2549
+ ],
2550
+ "properties": {
2551
+ "handoffRef": {
2552
+ "$ref": "common-v1.schema.json#/$defs/opaqueRef"
2553
+ },
2554
+ "state": {
2555
+ "enum": [
2556
+ "ready",
2557
+ "stale",
2558
+ "unavailable",
2559
+ "unknown"
2560
+ ]
2561
+ },
2562
+ "summary": {
2563
+ "$ref": "common-v1.schema.json#/$defs/nonEmptyDisplayText"
2564
+ },
2565
+ "blocker": {
2566
+ "$ref": "common-v1.schema.json#/$defs/nullableDisplayText"
2567
+ },
2568
+ "nextSafeAction": {
2569
+ "$ref": "common-v1.schema.json#/$defs/nullableDisplayText"
2570
+ },
2571
+ "evidenceRefs": {
2572
+ "type": "array",
2573
+ "maxItems": 64,
2574
+ "uniqueItems": true,
2575
+ "items": {
2576
+ "$ref": "common-v1.schema.json#/$defs/opaqueRef"
2577
+ }
2578
+ },
2579
+ "generatedAt": {
2580
+ "$ref": "common-v1.schema.json#/$defs/timestamp"
2581
+ },
2582
+ "reasonCode": {
2583
+ "$ref": "common-v1.schema.json#/$defs/nullableReasonCode"
2584
+ }
2585
+ }
2586
+ },
2587
+ "aggregateHealth": {
2588
+ "type": "object",
2589
+ "additionalProperties": false,
2590
+ "required": [
2591
+ "state",
2592
+ "issues",
2593
+ "resyncRequired",
2594
+ "generatedFromRevision"
2595
+ ],
2596
+ "properties": {
2597
+ "state": {
2598
+ "enum": [
2599
+ "ok",
2600
+ "degraded",
2601
+ "error",
2602
+ "unavailable",
2603
+ "unknown"
2604
+ ]
2605
+ },
2606
+ "issues": {
2607
+ "type": "array",
2608
+ "maxItems": 128,
2609
+ "items": {
2610
+ "$ref": "common-v1.schema.json#/$defs/issue"
2611
+ }
2612
+ },
2613
+ "resyncRequired": {
2614
+ "type": "boolean"
2615
+ },
2616
+ "generatedFromRevision": {
2617
+ "$ref": "common-v1.schema.json#/$defs/revisionToken"
2618
+ }
2619
+ }
2620
+ }
2621
+ }
2622
+ }