@claudexor/schema 3.1.1 → 3.2.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 (282) hide show
  1. package/dist/agent-capabilities.d.ts +232 -116
  2. package/dist/agent-capabilities.d.ts.map +1 -1
  3. package/dist/agent-capabilities.js +8 -1
  4. package/dist/agent-capabilities.js.map +1 -1
  5. package/dist/apply-eligibility.d.ts +513 -222
  6. package/dist/apply-eligibility.d.ts.map +1 -1
  7. package/dist/apply-eligibility.js +42 -2
  8. package/dist/apply-eligibility.js.map +1 -1
  9. package/dist/attachment.d.ts +17 -17
  10. package/dist/attachment.d.ts.map +1 -1
  11. package/dist/attachment.js +1 -1
  12. package/dist/attachment.js.map +1 -1
  13. package/dist/auth.d.ts +475 -475
  14. package/dist/auth.d.ts.map +1 -1
  15. package/dist/auth.js +1 -1
  16. package/dist/auth.js.map +1 -1
  17. package/dist/budget.d.ts +61 -61
  18. package/dist/budget.d.ts.map +1 -1
  19. package/dist/budget.js +3 -1
  20. package/dist/budget.js.map +1 -1
  21. package/dist/config.d.ts +320 -316
  22. package/dist/config.d.ts.map +1 -1
  23. package/dist/config.js +26 -19
  24. package/dist/config.js.map +1 -1
  25. package/dist/context.d.ts +38 -38
  26. package/dist/context.d.ts.map +1 -1
  27. package/dist/context.js +1 -1
  28. package/dist/context.js.map +1 -1
  29. package/dist/control-auth-route.d.ts +46 -0
  30. package/dist/control-auth-route.d.ts.map +1 -0
  31. package/dist/control-auth-route.js +24 -0
  32. package/dist/control-auth-route.js.map +1 -0
  33. package/dist/control-gc.d.ts +15 -15
  34. package/dist/control-gc.d.ts.map +1 -1
  35. package/dist/control-gc.js +1 -1
  36. package/dist/control-gc.js.map +1 -1
  37. package/dist/control-harness-list.d.ts +896 -0
  38. package/dist/control-harness-list.d.ts.map +1 -0
  39. package/dist/control-harness-list.js +13 -0
  40. package/dist/control-harness-list.js.map +1 -0
  41. package/dist/control-operation-responses.d.ts +691 -590
  42. package/dist/control-operation-responses.d.ts.map +1 -1
  43. package/dist/control-operation-responses.js +27 -1
  44. package/dist/control-operation-responses.js.map +1 -1
  45. package/dist/control-run-detail.d.ts +2663 -920
  46. package/dist/control-run-detail.d.ts.map +1 -1
  47. package/dist/control-run-detail.js +13 -1
  48. package/dist/control-run-detail.js.map +1 -1
  49. package/dist/control-run-retry.d.ts +18 -18
  50. package/dist/control-run-retry.d.ts.map +1 -1
  51. package/dist/control-run-retry.js +1 -1
  52. package/dist/control-run-retry.js.map +1 -1
  53. package/dist/control-run-scope.d.ts +2 -2
  54. package/dist/control-run-scope.d.ts.map +1 -1
  55. package/dist/control-run-scope.js +1 -1
  56. package/dist/control-run-scope.js.map +1 -1
  57. package/dist/control-secret.d.ts +7 -7
  58. package/dist/control-secret.d.ts.map +1 -1
  59. package/dist/control-secret.js +1 -1
  60. package/dist/control-secret.js.map +1 -1
  61. package/dist/control-thread-apply.d.ts +65 -65
  62. package/dist/control-thread-apply.d.ts.map +1 -1
  63. package/dist/control-thread-apply.js +1 -1
  64. package/dist/control-thread-apply.js.map +1 -1
  65. package/dist/control-trust.d.ts +23 -23
  66. package/dist/control-trust.d.ts.map +1 -1
  67. package/dist/control-trust.js +1 -1
  68. package/dist/control-trust.js.map +1 -1
  69. package/dist/control.d.ts +1658 -2225
  70. package/dist/control.d.ts.map +1 -1
  71. package/dist/control.js +43 -73
  72. package/dist/control.js.map +1 -1
  73. package/dist/credential-profile-snapshot.d.ts +3185 -0
  74. package/dist/credential-profile-snapshot.d.ts.map +1 -0
  75. package/dist/credential-profile-snapshot.js +28 -0
  76. package/dist/credential-profile-snapshot.js.map +1 -0
  77. package/dist/credential-profile.d.ts +122 -107
  78. package/dist/credential-profile.d.ts.map +1 -1
  79. package/dist/credential-profile.js +12 -6
  80. package/dist/credential-profile.js.map +1 -1
  81. package/dist/decision.d.ts +122 -117
  82. package/dist/decision.d.ts.map +1 -1
  83. package/dist/decision.js +9 -4
  84. package/dist/decision.js.map +1 -1
  85. package/dist/deep-scan.d.ts +5 -5
  86. package/dist/deep-scan.d.ts.map +1 -1
  87. package/dist/deep-scan.js +1 -1
  88. package/dist/deep-scan.js.map +1 -1
  89. package/dist/delegation.d.ts +73 -0
  90. package/dist/delegation.d.ts.map +1 -0
  91. package/dist/delegation.js +120 -0
  92. package/dist/delegation.js.map +1 -0
  93. package/dist/delivery.d.ts +32 -32
  94. package/dist/delivery.d.ts.map +1 -1
  95. package/dist/delivery.js +1 -1
  96. package/dist/delivery.js.map +1 -1
  97. package/dist/effort.d.ts +1 -1
  98. package/dist/effort.d.ts.map +1 -1
  99. package/dist/effort.js +1 -1
  100. package/dist/effort.js.map +1 -1
  101. package/dist/events.d.ts +57 -37
  102. package/dist/events.d.ts.map +1 -1
  103. package/dist/events.js +23 -1
  104. package/dist/events.js.map +1 -1
  105. package/dist/gate.d.ts +7 -7
  106. package/dist/gate.d.ts.map +1 -1
  107. package/dist/gate.js +1 -1
  108. package/dist/gate.js.map +1 -1
  109. package/dist/git-capability.d.ts +23 -0
  110. package/dist/git-capability.d.ts.map +1 -0
  111. package/dist/git-capability.js +15 -0
  112. package/dist/git-capability.js.map +1 -0
  113. package/dist/harness.d.ts +409 -409
  114. package/dist/harness.d.ts.map +1 -1
  115. package/dist/harness.js +19 -22
  116. package/dist/harness.js.map +1 -1
  117. package/dist/index.d.ts +7 -0
  118. package/dist/index.d.ts.map +1 -1
  119. package/dist/index.js +7 -0
  120. package/dist/index.js.map +1 -1
  121. package/dist/interaction.d.ts +10 -0
  122. package/dist/interaction.d.ts.map +1 -0
  123. package/dist/interaction.js +2 -0
  124. package/dist/interaction.js.map +1 -0
  125. package/dist/operation.d.ts +113 -113
  126. package/dist/operation.d.ts.map +1 -1
  127. package/dist/operation.js +1 -1
  128. package/dist/operation.js.map +1 -1
  129. package/dist/output-schema-dialect.d.ts +1 -1
  130. package/dist/output-schema-dialect.d.ts.map +1 -1
  131. package/dist/output-schema-dialect.js +1 -1
  132. package/dist/output-schema-dialect.js.map +1 -1
  133. package/dist/output-schema.d.ts +2 -2
  134. package/dist/output-schema.js +2 -2
  135. package/dist/plan.d.ts +29 -29
  136. package/dist/plan.d.ts.map +1 -1
  137. package/dist/plan.js +1 -1
  138. package/dist/plan.js.map +1 -1
  139. package/dist/primitives.d.ts +1 -1
  140. package/dist/primitives.d.ts.map +1 -1
  141. package/dist/primitives.js +1 -1
  142. package/dist/primitives.js.map +1 -1
  143. package/dist/problem.d.ts +6 -6
  144. package/dist/problem.d.ts.map +1 -1
  145. package/dist/problem.js +1 -1
  146. package/dist/problem.js.map +1 -1
  147. package/dist/project.d.ts +87 -25
  148. package/dist/project.d.ts.map +1 -1
  149. package/dist/project.js +21 -1
  150. package/dist/project.js.map +1 -1
  151. package/dist/quota.d.ts +48 -48
  152. package/dist/quota.d.ts.map +1 -1
  153. package/dist/quota.js +1 -1
  154. package/dist/quota.js.map +1 -1
  155. package/dist/raw.d.ts +16 -16
  156. package/dist/raw.d.ts.map +1 -1
  157. package/dist/raw.js +1 -1
  158. package/dist/raw.js.map +1 -1
  159. package/dist/readiness.d.ts +264 -226
  160. package/dist/readiness.d.ts.map +1 -1
  161. package/dist/readiness.js +5 -1
  162. package/dist/readiness.js.map +1 -1
  163. package/dist/recovery.d.ts +106 -106
  164. package/dist/recovery.d.ts.map +1 -1
  165. package/dist/recovery.js +1 -1
  166. package/dist/recovery.js.map +1 -1
  167. package/dist/request-requirements.d.ts +12 -12
  168. package/dist/request-requirements.d.ts.map +1 -1
  169. package/dist/request-requirements.js +3 -2
  170. package/dist/request-requirements.js.map +1 -1
  171. package/dist/review.d.ts +29 -29
  172. package/dist/review.d.ts.map +1 -1
  173. package/dist/review.js +1 -1
  174. package/dist/review.js.map +1 -1
  175. package/dist/route.d.ts +11 -11
  176. package/dist/route.d.ts.map +1 -1
  177. package/dist/route.js +1 -1
  178. package/dist/route.js.map +1 -1
  179. package/dist/run-applicability.d.ts +764 -0
  180. package/dist/run-applicability.d.ts.map +1 -0
  181. package/dist/run-applicability.js +56 -0
  182. package/dist/run-applicability.js.map +1 -0
  183. package/dist/run-facts.d.ts +628 -0
  184. package/dist/run-facts.d.ts.map +1 -0
  185. package/dist/run-facts.js +429 -0
  186. package/dist/run-facts.js.map +1 -0
  187. package/dist/run-strategy.d.ts +40 -0
  188. package/dist/run-strategy.d.ts.map +1 -1
  189. package/dist/run-strategy.js +68 -1
  190. package/dist/run-strategy.js.map +1 -1
  191. package/dist/setup-device-code-envelope.d.ts +67 -0
  192. package/dist/setup-device-code-envelope.d.ts.map +1 -0
  193. package/dist/setup-device-code-envelope.js +25 -0
  194. package/dist/setup-device-code-envelope.js.map +1 -0
  195. package/dist/setup-login-protocol.d.ts +6 -0
  196. package/dist/setup-login-protocol.d.ts.map +1 -0
  197. package/dist/setup-login-protocol.js +12 -0
  198. package/dist/setup-login-protocol.js.map +1 -0
  199. package/dist/setup-transport.d.ts +12 -0
  200. package/dist/setup-transport.d.ts.map +1 -0
  201. package/dist/setup-transport.js +22 -0
  202. package/dist/setup-transport.js.map +1 -0
  203. package/dist/setup.d.ts +12572 -3749
  204. package/dist/setup.d.ts.map +1 -1
  205. package/dist/setup.js +34 -38
  206. package/dist/setup.js.map +1 -1
  207. package/dist/status-projection.d.ts +7 -5
  208. package/dist/status-projection.d.ts.map +1 -1
  209. package/dist/status-projection.js +11 -6
  210. package/dist/status-projection.js.map +1 -1
  211. package/dist/surface-run-controls.d.ts.map +1 -1
  212. package/dist/surface-run-controls.js +10 -1
  213. package/dist/surface-run-controls.js.map +1 -1
  214. package/dist/task.d.ts +331 -289
  215. package/dist/task.d.ts.map +1 -1
  216. package/dist/task.js +12 -1
  217. package/dist/task.js.map +1 -1
  218. package/dist/telemetry.d.ts +1189 -627
  219. package/dist/telemetry.d.ts.map +1 -1
  220. package/dist/telemetry.js +13 -13
  221. package/dist/telemetry.js.map +1 -1
  222. package/dist/thread.d.ts +128 -84
  223. package/dist/thread.d.ts.map +1 -1
  224. package/dist/thread.js +16 -2
  225. package/dist/thread.js.map +1 -1
  226. package/dist/tool-ref.d.ts +7 -7
  227. package/dist/tool-ref.d.ts.map +1 -1
  228. package/dist/tool-ref.js +1 -1
  229. package/dist/tool-ref.js.map +1 -1
  230. package/dist/work-report.d.ts +28 -28
  231. package/dist/work-report.d.ts.map +1 -1
  232. package/dist/work-report.js +3 -3
  233. package/dist/work-report.js.map +1 -1
  234. package/dist/workproduct.d.ts +6 -9
  235. package/dist/workproduct.d.ts.map +1 -1
  236. package/dist/workproduct.js +1 -2
  237. package/dist/workproduct.js.map +1 -1
  238. package/dist/workspace.d.ts +14 -14
  239. package/dist/workspace.d.ts.map +1 -1
  240. package/dist/workspace.js +8 -8
  241. package/dist/workspace.js.map +1 -1
  242. package/generated/AgentCapabilityCatalog.schema.json +80 -1
  243. package/generated/ControlCredentialProfilesQueryResponse.schema.json +1333 -0
  244. package/generated/ControlCredentialProfilesResponse.schema.json +10 -2
  245. package/generated/ControlCredentialProfilesSnapshotResponse.schema.json +1312 -0
  246. package/generated/ControlDirectoryEntry.schema.json +36 -0
  247. package/generated/ControlDirectoryListing.schema.json +77 -0
  248. package/generated/ControlHarnessListResponse.schema.json +89 -3
  249. package/generated/ControlRunAgainDraft.schema.json +7 -3
  250. package/generated/ControlRunApplicabilityResponse.schema.json +217 -0
  251. package/generated/ControlRunControlResponse.schema.json +8 -0
  252. package/generated/ControlRunDetail.schema.json +543 -80
  253. package/generated/ControlRunListResponse.schema.json +104 -11
  254. package/generated/ControlRunStartRequest.schema.json +7 -3
  255. package/generated/ControlRunSummary.schema.json +104 -11
  256. package/generated/ControlSettingsSnapshot.schema.json +12 -3
  257. package/generated/ControlSettingsUpdateRequest.schema.json +12 -3
  258. package/generated/ControlSetupJob.schema.json +9 -0
  259. package/generated/ControlSetupJobCreateRequest.schema.json +9 -0
  260. package/generated/ControlSetupJobEvent.schema.json +858 -758
  261. package/generated/ControlSetupJobListResponse.schema.json +9 -0
  262. package/generated/ControlSetupJobSnapshot.schema.json +811 -736
  263. package/generated/ControlThreadDetail.schema.json +83 -1
  264. package/generated/ControlThreadTurnRequest.schema.json +2 -25
  265. package/generated/DecisionRecord.schema.json +12 -2
  266. package/generated/GitCapability.schema.json +46 -0
  267. package/generated/GlobalConfig.schema.json +13 -4
  268. package/generated/HarnessEvent.schema.json +2 -1
  269. package/generated/HarnessManifest.schema.json +3 -3
  270. package/generated/HarnessStatusDto.schema.json +49 -3
  271. package/generated/McpRunHandleResult.schema.json +237 -2
  272. package/generated/McpRunToolResult.schema.json +234 -1
  273. package/generated/OutputReadyPayload.schema.json +44 -0
  274. package/generated/RunEvent.schema.json +1 -0
  275. package/generated/RunFacts.schema.json +569 -0
  276. package/generated/RunFailure.schema.json +4 -3
  277. package/generated/RunTelemetry.schema.json +553 -4
  278. package/generated/TaskContract.schema.json +43 -3
  279. package/generated/ThreadTurn.schema.json +17 -0
  280. package/generated/WorkProduct.schema.json +0 -4
  281. package/generated/WorkspaceEnvelope.schema.json +6 -6
  282. package/package.json +3 -3
@@ -110,6 +110,7 @@
110
110
  "wall_clock_exceeded",
111
111
  "user_cancelled",
112
112
  "crash_interrupted",
113
+ "workspace_unavailable",
113
114
  "input_required",
114
115
  "work_incomplete",
115
116
  "context_capacity_exhausted",
@@ -144,7 +145,7 @@
144
145
  "validated",
145
146
  "absent"
146
147
  ],
147
- "description": "Provenance of a WorkReport: constrained (native schema transport), validated (whole-answer JSON), or absent (no transport could carry one — a disclosed absence, not a failure)."
148
+ "description": "Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure)."
148
149
  },
149
150
  "required_inputs": {
150
151
  "type": "array",
@@ -214,6 +215,130 @@
214
215
  "description": "The D8 terminal outcome axes (checks/review/reason/noChanges), when terminal.",
215
216
  "default": null
216
217
  },
218
+ "failure": {
219
+ "anyOf": [
220
+ {
221
+ "type": "object",
222
+ "properties": {
223
+ "phase": {
224
+ "type": "string",
225
+ "default": "unknown",
226
+ "description": "Pipeline phase where the failure happened."
227
+ },
228
+ "category": {
229
+ "type": "string",
230
+ "enum": [
231
+ "validation",
232
+ "project",
233
+ "auth",
234
+ "harness_unavailable",
235
+ "harness_error",
236
+ "config_error",
237
+ "budget",
238
+ "policy",
239
+ "cancelled",
240
+ "internal",
241
+ "unknown"
242
+ ],
243
+ "default": "unknown",
244
+ "description": "Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness."
245
+ },
246
+ "code": {
247
+ "anyOf": [
248
+ {
249
+ "type": "string",
250
+ "enum": [
251
+ "finite_zero",
252
+ "hard_cap",
253
+ "estimate_headroom",
254
+ "unknown_paid_in_flight",
255
+ "budget_overshoot",
256
+ "cost_unverifiable",
257
+ "delegation_child_drain_timeout"
258
+ ],
259
+ "description": "Machine-readable failure sub-code within a RunFailure category (budget-denial reasons and Delegate child-drain timeout)."
260
+ },
261
+ {
262
+ "type": "null"
263
+ }
264
+ ],
265
+ "description": "Machine-readable failure sub-code within the category; null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage.",
266
+ "default": null
267
+ },
268
+ "harnessId": {
269
+ "type": [
270
+ "string",
271
+ "null"
272
+ ],
273
+ "default": null,
274
+ "description": "Harness involved in the failure, when known."
275
+ },
276
+ "attemptId": {
277
+ "type": [
278
+ "string",
279
+ "null"
280
+ ],
281
+ "default": null,
282
+ "description": "Attempt involved in the failure, when known."
283
+ },
284
+ "safeMessage": {
285
+ "type": "string",
286
+ "description": "Redacted human-readable failure message."
287
+ },
288
+ "rawDetailRef": {
289
+ "type": [
290
+ "string",
291
+ "null"
292
+ ],
293
+ "default": null,
294
+ "description": "Artifact path holding the raw (redacted) failure detail."
295
+ },
296
+ "logRefs": {
297
+ "type": "array",
298
+ "items": {
299
+ "type": "string"
300
+ },
301
+ "default": [],
302
+ "description": "Log artifact paths relevant to the failure."
303
+ },
304
+ "eventRefs": {
305
+ "type": "array",
306
+ "items": {
307
+ "type": "string"
308
+ },
309
+ "default": [],
310
+ "description": "Event references relevant to the failure."
311
+ },
312
+ "runDir": {
313
+ "type": [
314
+ "string",
315
+ "null"
316
+ ],
317
+ "default": null,
318
+ "description": "Run artifact directory."
319
+ },
320
+ "nextActions": {
321
+ "type": "array",
322
+ "items": {
323
+ "type": "string"
324
+ },
325
+ "default": [],
326
+ "description": "Suggested operator next actions."
327
+ }
328
+ },
329
+ "required": [
330
+ "safeMessage"
331
+ ],
332
+ "additionalProperties": false,
333
+ "description": "Typed failure record for a run: phase, category, evidence references, and suggested next actions."
334
+ },
335
+ {
336
+ "type": "null"
337
+ }
338
+ ],
339
+ "description": "Typed terminal failure detail and recovery actions; null for non-failed runs.",
340
+ "default": null
341
+ },
217
342
  "outcomeBanner": {
218
343
  "type": [
219
344
  "string",
@@ -473,7 +598,7 @@
473
598
  "estimated": {
474
599
  "type": "boolean",
475
600
  "default": false,
476
- "description": "True when spend is token-derived rather than natively reported."
601
+ "description": "True when settled cash is estimated rather than exact; subscription valuation confidence is reported separately."
477
602
  },
478
603
  "source": {
479
604
  "type": "string",
@@ -506,6 +631,116 @@
506
631
  ],
507
632
  "description": "Run budget snapshot (cash + subscription valuation, QA-023c); null when unavailable.",
508
633
  "default": null
634
+ },
635
+ "parentRunId": {
636
+ "type": [
637
+ "string",
638
+ "null"
639
+ ],
640
+ "default": null,
641
+ "description": "Server-owned ordinary parent/follow-up run id, when present."
642
+ },
643
+ "delegatedFromRunId": {
644
+ "type": [
645
+ "string",
646
+ "null"
647
+ ],
648
+ "default": null,
649
+ "description": "Claudexor Delegate parent id; null for ordinary runs and native subagents."
650
+ },
651
+ "delegation": {
652
+ "anyOf": [
653
+ {
654
+ "type": "object",
655
+ "properties": {
656
+ "requested": {
657
+ "type": "boolean",
658
+ "default": false
659
+ },
660
+ "effective": {
661
+ "type": "boolean",
662
+ "default": false
663
+ },
664
+ "used": {
665
+ "type": "boolean",
666
+ "default": false
667
+ },
668
+ "reason": {
669
+ "type": "string",
670
+ "enum": [
671
+ "pending",
672
+ "not_requested",
673
+ "injected_unused",
674
+ "used",
675
+ "runtime_unavailable",
676
+ "manifest_unsupported",
677
+ "access_profile_incompatible",
678
+ "partially_degraded",
679
+ "startup_failed"
680
+ ],
681
+ "default": "not_requested"
682
+ },
683
+ "remediation": {
684
+ "anyOf": [
685
+ {
686
+ "type": "string",
687
+ "minLength": 1
688
+ },
689
+ {
690
+ "type": "null"
691
+ }
692
+ ],
693
+ "default": null
694
+ }
695
+ },
696
+ "additionalProperties": false,
697
+ "description": "Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output."
698
+ },
699
+ {
700
+ "type": "null"
701
+ }
702
+ ],
703
+ "description": "Typed Delegate receipt; null when unavailable or legacy.",
704
+ "default": null
705
+ },
706
+ "detailProblem": {
707
+ "anyOf": [
708
+ {
709
+ "type": "object",
710
+ "properties": {
711
+ "code": {
712
+ "type": [
713
+ "string",
714
+ "null"
715
+ ],
716
+ "description": "Stable machine code of the detail problem, if any."
717
+ },
718
+ "message": {
719
+ "type": "string",
720
+ "description": "Human-readable description of the detail problem."
721
+ },
722
+ "retryable": {
723
+ "type": [
724
+ "boolean",
725
+ "null"
726
+ ],
727
+ "description": "Whether retrying the detail read may help."
728
+ }
729
+ },
730
+ "required": [
731
+ "code",
732
+ "message",
733
+ "retryable"
734
+ ],
735
+ "additionalProperties": false,
736
+ "description": "Typed failure of a post-run detail read whose durable run result still survives."
737
+ },
738
+ {
739
+ "type": "null"
740
+ }
741
+ ],
742
+ "description": "Typed post-terminal detail-read problem (the durable run handle survives); null when the detail read succeeded.",
743
+ "default": null
509
744
  }
510
745
  },
511
746
  "required": [
@@ -86,6 +86,7 @@
86
86
  "wall_clock_exceeded",
87
87
  "user_cancelled",
88
88
  "crash_interrupted",
89
+ "workspace_unavailable",
89
90
  "input_required",
90
91
  "work_incomplete",
91
92
  "context_capacity_exhausted",
@@ -120,7 +121,7 @@
120
121
  "validated",
121
122
  "absent"
122
123
  ],
123
- "description": "Provenance of a WorkReport: constrained (native schema transport), validated (whole-answer JSON), or absent (no transport could carry one — a disclosed absence, not a failure)."
124
+ "description": "Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure)."
124
125
  },
125
126
  "required_inputs": {
126
127
  "type": "array",
@@ -190,6 +191,130 @@
190
191
  "description": "The D8 terminal outcome axes (checks/review/reason/noChanges); null for non-terminal or read-only routes.",
191
192
  "default": null
192
193
  },
194
+ "failure": {
195
+ "anyOf": [
196
+ {
197
+ "type": "object",
198
+ "properties": {
199
+ "phase": {
200
+ "type": "string",
201
+ "default": "unknown",
202
+ "description": "Pipeline phase where the failure happened."
203
+ },
204
+ "category": {
205
+ "type": "string",
206
+ "enum": [
207
+ "validation",
208
+ "project",
209
+ "auth",
210
+ "harness_unavailable",
211
+ "harness_error",
212
+ "config_error",
213
+ "budget",
214
+ "policy",
215
+ "cancelled",
216
+ "internal",
217
+ "unknown"
218
+ ],
219
+ "default": "unknown",
220
+ "description": "Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness."
221
+ },
222
+ "code": {
223
+ "anyOf": [
224
+ {
225
+ "type": "string",
226
+ "enum": [
227
+ "finite_zero",
228
+ "hard_cap",
229
+ "estimate_headroom",
230
+ "unknown_paid_in_flight",
231
+ "budget_overshoot",
232
+ "cost_unverifiable",
233
+ "delegation_child_drain_timeout"
234
+ ],
235
+ "description": "Machine-readable failure sub-code within a RunFailure category (budget-denial reasons and Delegate child-drain timeout)."
236
+ },
237
+ {
238
+ "type": "null"
239
+ }
240
+ ],
241
+ "description": "Machine-readable failure sub-code within the category; null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage.",
242
+ "default": null
243
+ },
244
+ "harnessId": {
245
+ "type": [
246
+ "string",
247
+ "null"
248
+ ],
249
+ "default": null,
250
+ "description": "Harness involved in the failure, when known."
251
+ },
252
+ "attemptId": {
253
+ "type": [
254
+ "string",
255
+ "null"
256
+ ],
257
+ "default": null,
258
+ "description": "Attempt involved in the failure, when known."
259
+ },
260
+ "safeMessage": {
261
+ "type": "string",
262
+ "description": "Redacted human-readable failure message."
263
+ },
264
+ "rawDetailRef": {
265
+ "type": [
266
+ "string",
267
+ "null"
268
+ ],
269
+ "default": null,
270
+ "description": "Artifact path holding the raw (redacted) failure detail."
271
+ },
272
+ "logRefs": {
273
+ "type": "array",
274
+ "items": {
275
+ "type": "string"
276
+ },
277
+ "default": [],
278
+ "description": "Log artifact paths relevant to the failure."
279
+ },
280
+ "eventRefs": {
281
+ "type": "array",
282
+ "items": {
283
+ "type": "string"
284
+ },
285
+ "default": [],
286
+ "description": "Event references relevant to the failure."
287
+ },
288
+ "runDir": {
289
+ "type": [
290
+ "string",
291
+ "null"
292
+ ],
293
+ "default": null,
294
+ "description": "Run artifact directory."
295
+ },
296
+ "nextActions": {
297
+ "type": "array",
298
+ "items": {
299
+ "type": "string"
300
+ },
301
+ "default": [],
302
+ "description": "Suggested operator next actions."
303
+ }
304
+ },
305
+ "required": [
306
+ "safeMessage"
307
+ ],
308
+ "additionalProperties": false,
309
+ "description": "Typed failure record for a run: phase, category, evidence references, and suggested next actions."
310
+ },
311
+ {
312
+ "type": "null"
313
+ }
314
+ ],
315
+ "description": "Typed terminal failure detail and recovery actions; null for non-failed runs.",
316
+ "default": null
317
+ },
193
318
  "applyEligibility": {
194
319
  "anyOf": [
195
320
  {
@@ -277,6 +402,45 @@
277
402
  "description": "Derived plan readiness for plan tools (D17); null for non-plan tools.",
278
403
  "default": null
279
404
  },
405
+ "detailProblem": {
406
+ "anyOf": [
407
+ {
408
+ "type": "object",
409
+ "properties": {
410
+ "code": {
411
+ "type": [
412
+ "string",
413
+ "null"
414
+ ],
415
+ "description": "Stable machine code of the detail problem, if any."
416
+ },
417
+ "message": {
418
+ "type": "string",
419
+ "description": "Human-readable description of the detail problem."
420
+ },
421
+ "retryable": {
422
+ "type": [
423
+ "boolean",
424
+ "null"
425
+ ],
426
+ "description": "Whether retrying the detail read may help."
427
+ }
428
+ },
429
+ "required": [
430
+ "code",
431
+ "message",
432
+ "retryable"
433
+ ],
434
+ "additionalProperties": false,
435
+ "description": "Typed failure of a post-run detail read whose durable run result still survives."
436
+ },
437
+ {
438
+ "type": "null"
439
+ }
440
+ ],
441
+ "description": "Typed post-terminal detail-read problem (the run result survives; its detail projections are absent for this reason); null when the detail read succeeded.",
442
+ "default": null
443
+ },
280
444
  "council": {
281
445
  "anyOf": [
282
446
  {
@@ -366,6 +530,75 @@
366
530
  ],
367
531
  "description": "Council membership + merge disclosure (QA-023b); null for solo/non-plan tools or deferred handles.",
368
532
  "default": null
533
+ },
534
+ "parentRunId": {
535
+ "type": [
536
+ "string",
537
+ "null"
538
+ ],
539
+ "default": null
540
+ },
541
+ "delegatedFromRunId": {
542
+ "type": [
543
+ "string",
544
+ "null"
545
+ ],
546
+ "default": null
547
+ },
548
+ "delegation": {
549
+ "anyOf": [
550
+ {
551
+ "type": "object",
552
+ "properties": {
553
+ "requested": {
554
+ "type": "boolean",
555
+ "default": false
556
+ },
557
+ "effective": {
558
+ "type": "boolean",
559
+ "default": false
560
+ },
561
+ "used": {
562
+ "type": "boolean",
563
+ "default": false
564
+ },
565
+ "reason": {
566
+ "type": "string",
567
+ "enum": [
568
+ "pending",
569
+ "not_requested",
570
+ "injected_unused",
571
+ "used",
572
+ "runtime_unavailable",
573
+ "manifest_unsupported",
574
+ "access_profile_incompatible",
575
+ "partially_degraded",
576
+ "startup_failed"
577
+ ],
578
+ "default": "not_requested"
579
+ },
580
+ "remediation": {
581
+ "anyOf": [
582
+ {
583
+ "type": "string",
584
+ "minLength": 1
585
+ },
586
+ {
587
+ "type": "null"
588
+ }
589
+ ],
590
+ "default": null
591
+ }
592
+ },
593
+ "additionalProperties": false,
594
+ "description": "Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output."
595
+ },
596
+ {
597
+ "type": "null"
598
+ }
599
+ ],
600
+ "description": "Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.",
601
+ "default": null
369
602
  }
370
603
  },
371
604
  "required": [
@@ -0,0 +1,44 @@
1
+ {
2
+ "$ref": "#/definitions/OutputReadyPayload",
3
+ "definitions": {
4
+ "OutputReadyPayload": {
5
+ "type": "object",
6
+ "properties": {
7
+ "kind": {
8
+ "type": "string",
9
+ "enum": [
10
+ "answer",
11
+ "report",
12
+ "plan",
13
+ "summary",
14
+ "patch",
15
+ "structured_output",
16
+ "artifact"
17
+ ],
18
+ "description": "Kind of materialized output announced by this receipt."
19
+ },
20
+ "path": {
21
+ "type": "string",
22
+ "minLength": 1,
23
+ "description": "Run-relative path of the materialized output artifact."
24
+ },
25
+ "state": {
26
+ "type": "string",
27
+ "enum": [
28
+ "ready",
29
+ "diagnostic"
30
+ ],
31
+ "default": "ready",
32
+ "description": "Whether the announced artifact is normal output or diagnostic output."
33
+ }
34
+ },
35
+ "required": [
36
+ "kind",
37
+ "path"
38
+ ],
39
+ "additionalProperties": false,
40
+ "description": "Validated payload of an output.ready run event."
41
+ }
42
+ },
43
+ "$schema": "http://json-schema.org/draft-07/schema#"
44
+ }
@@ -69,6 +69,7 @@
69
69
  "council.merged",
70
70
  "budget.quota_pressure",
71
71
  "delegation.belt.unavailable",
72
+ "delegation.belt.degraded",
72
73
  "output.ready",
73
74
  "gate.started",
74
75
  "gate.completed",