@claudexor/schema 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +16 -0
  3. package/dist/agent-capabilities.d.ts +366 -0
  4. package/dist/agent-capabilities.d.ts.map +1 -0
  5. package/dist/agent-capabilities.js +125 -0
  6. package/dist/agent-capabilities.js.map +1 -0
  7. package/dist/apply-eligibility.d.ts +76 -0
  8. package/dist/apply-eligibility.d.ts.map +1 -0
  9. package/dist/apply-eligibility.js +37 -0
  10. package/dist/apply-eligibility.js.map +1 -0
  11. package/dist/attachment.d.ts +69 -0
  12. package/dist/attachment.d.ts.map +1 -0
  13. package/dist/attachment.js +54 -0
  14. package/dist/attachment.js.map +1 -0
  15. package/dist/budget.d.ts +75 -0
  16. package/dist/budget.d.ts.map +1 -0
  17. package/dist/budget.js +54 -0
  18. package/dist/budget.js.map +1 -0
  19. package/dist/config.d.ts +743 -0
  20. package/dist/config.d.ts.map +1 -0
  21. package/dist/config.js +194 -0
  22. package/dist/config.js.map +1 -0
  23. package/dist/context.d.ts +222 -0
  24. package/dist/context.d.ts.map +1 -0
  25. package/dist/context.js +70 -0
  26. package/dist/context.js.map +1 -0
  27. package/dist/control-run-detail.d.ts +1686 -0
  28. package/dist/control-run-detail.d.ts.map +1 -0
  29. package/dist/control-run-detail.js +107 -0
  30. package/dist/control-run-detail.js.map +1 -0
  31. package/dist/control-trust.d.ts +79 -0
  32. package/dist/control-trust.d.ts.map +1 -0
  33. package/dist/control-trust.js +39 -0
  34. package/dist/control-trust.js.map +1 -0
  35. package/dist/control.d.ts +4226 -0
  36. package/dist/control.d.ts.map +1 -0
  37. package/dist/control.js +1022 -0
  38. package/dist/control.js.map +1 -0
  39. package/dist/decision.d.ts +208 -0
  40. package/dist/decision.d.ts.map +1 -0
  41. package/dist/decision.js +98 -0
  42. package/dist/decision.js.map +1 -0
  43. package/dist/events.d.ts +70 -0
  44. package/dist/events.d.ts.map +1 -0
  45. package/dist/events.js +105 -0
  46. package/dist/events.js.map +1 -0
  47. package/dist/gate.d.ts +37 -0
  48. package/dist/gate.d.ts.map +1 -0
  49. package/dist/gate.js +20 -0
  50. package/dist/gate.js.map +1 -0
  51. package/dist/harness.d.ts +1418 -0
  52. package/dist/harness.d.ts.map +1 -0
  53. package/dist/harness.js +552 -0
  54. package/dist/harness.js.map +1 -0
  55. package/dist/index.d.ts +32 -0
  56. package/dist/index.d.ts.map +1 -0
  57. package/dist/index.js +32 -0
  58. package/dist/index.js.map +1 -0
  59. package/dist/orchestrate.d.ts +428 -0
  60. package/dist/orchestrate.d.ts.map +1 -0
  61. package/dist/orchestrate.js +246 -0
  62. package/dist/orchestrate.js.map +1 -0
  63. package/dist/primitives.d.ts +71 -0
  64. package/dist/primitives.d.ts.map +1 -0
  65. package/dist/primitives.js +114 -0
  66. package/dist/primitives.js.map +1 -0
  67. package/dist/review.d.ts +220 -0
  68. package/dist/review.d.ts.map +1 -0
  69. package/dist/review.js +91 -0
  70. package/dist/review.js.map +1 -0
  71. package/dist/route.d.ts +67 -0
  72. package/dist/route.d.ts.map +1 -0
  73. package/dist/route.js +33 -0
  74. package/dist/route.js.map +1 -0
  75. package/dist/spec.d.ts +561 -0
  76. package/dist/spec.d.ts.map +1 -0
  77. package/dist/spec.js +133 -0
  78. package/dist/spec.js.map +1 -0
  79. package/dist/surface-run-controls.d.ts +14 -0
  80. package/dist/surface-run-controls.d.ts.map +1 -0
  81. package/dist/surface-run-controls.js +142 -0
  82. package/dist/surface-run-controls.js.map +1 -0
  83. package/dist/task.d.ts +565 -0
  84. package/dist/task.d.ts.map +1 -0
  85. package/dist/task.js +186 -0
  86. package/dist/task.js.map +1 -0
  87. package/dist/telemetry.d.ts +660 -0
  88. package/dist/telemetry.d.ts.map +1 -0
  89. package/dist/telemetry.js +140 -0
  90. package/dist/telemetry.js.map +1 -0
  91. package/dist/thread.d.ts +348 -0
  92. package/dist/thread.d.ts.map +1 -0
  93. package/dist/thread.js +194 -0
  94. package/dist/thread.js.map +1 -0
  95. package/dist/workproduct.d.ts +31 -0
  96. package/dist/workproduct.d.ts.map +1 -0
  97. package/dist/workproduct.js +25 -0
  98. package/dist/workproduct.js.map +1 -0
  99. package/dist/workspace.d.ts +53 -0
  100. package/dist/workspace.d.ts.map +1 -0
  101. package/dist/workspace.js +30 -0
  102. package/dist/workspace.js.map +1 -0
  103. package/generated/AgentCapabilityCatalog.schema.json +389 -0
  104. package/generated/ApplyEligibility.schema.json +44 -0
  105. package/generated/BudgetLease.schema.json +95 -0
  106. package/generated/BudgetObservation.schema.json +76 -0
  107. package/generated/ConformanceReport.schema.json +107 -0
  108. package/generated/ContextPack.schema.json +186 -0
  109. package/generated/ControlApplyCheckRequest.schema.json +54 -0
  110. package/generated/ControlApplyRequest.schema.json +74 -0
  111. package/generated/ControlHarnessListResponse.schema.json +498 -0
  112. package/generated/ControlHarnessModelsResponse.schema.json +78 -0
  113. package/generated/ControlHarnessSettingsPatch.schema.json +130 -0
  114. package/generated/ControlInteractionAnswerRequest.schema.json +48 -0
  115. package/generated/ControlInteractionAnswerResponse.schema.json +35 -0
  116. package/generated/ControlPendingInteraction.schema.json +129 -0
  117. package/generated/ControlQueuedRunInfo.schema.json +44 -0
  118. package/generated/ControlRunControlRequest.schema.json +61 -0
  119. package/generated/ControlRunControlResponse.schema.json +40 -0
  120. package/generated/ControlRunDecisionRequest.schema.json +98 -0
  121. package/generated/ControlRunDecisionResponse.schema.json +40 -0
  122. package/generated/ControlRunDetail.schema.json +1925 -0
  123. package/generated/ControlRunStartInfo.schema.json +33 -0
  124. package/generated/ControlRunStartRequest.schema.json +429 -0
  125. package/generated/ControlRunSummary.schema.json +666 -0
  126. package/generated/ControlSecretListResponse.schema.json +57 -0
  127. package/generated/ControlSettingsSnapshot.schema.json +281 -0
  128. package/generated/ControlSettingsUpdateRequest.schema.json +212 -0
  129. package/generated/ControlSetupJob.schema.json +148 -0
  130. package/generated/ControlSetupJobConfirmRequest.schema.json +18 -0
  131. package/generated/ControlSetupJobCreateRequest.schema.json +38 -0
  132. package/generated/ControlSetupJobEvent.schema.json +58 -0
  133. package/generated/ControlSetupJobListResponse.schema.json +162 -0
  134. package/generated/ControlSpecFreezeRequest.schema.json +83 -0
  135. package/generated/ControlSpecQuestionsRequest.schema.json +80 -0
  136. package/generated/ControlThread.schema.json +129 -0
  137. package/generated/ControlThreadApplyRequest.schema.json +32 -0
  138. package/generated/ControlThreadApplyResponse.schema.json +47 -0
  139. package/generated/ControlThreadCreateRequest.schema.json +107 -0
  140. package/generated/ControlThreadDetail.schema.json +515 -0
  141. package/generated/ControlThreadListResponse.schema.json +141 -0
  142. package/generated/ControlThreadUpdateRequest.schema.json +46 -0
  143. package/generated/ControlTrustListResponse.schema.json +59 -0
  144. package/generated/ControlTrustState.schema.json +45 -0
  145. package/generated/ControlTrustUpdateRequest.schema.json +26 -0
  146. package/generated/DecisionRecord.schema.json +232 -0
  147. package/generated/GateResult.schema.json +81 -0
  148. package/generated/GlobalConfig.schema.json +313 -0
  149. package/generated/HarnessEvent.schema.json +360 -0
  150. package/generated/HarnessManifest.schema.json +350 -0
  151. package/generated/HarnessModel.schema.json +41 -0
  152. package/generated/HarnessStatusDto.schema.json +486 -0
  153. package/generated/McpRunToolResult.schema.json +91 -0
  154. package/generated/OrchestrateContract.schema.json +93 -0
  155. package/generated/OrchestratePlan.schema.json +244 -0
  156. package/generated/OrchestratePlanProgress.schema.json +103 -0
  157. package/generated/ProjectConfig.schema.json +95 -0
  158. package/generated/ReviewFinding.schema.json +226 -0
  159. package/generated/RouteFallbackPayload.schema.json +79 -0
  160. package/generated/RouteProof.schema.json +111 -0
  161. package/generated/RunControl.schema.json +51 -0
  162. package/generated/RunEvent.schema.json +103 -0
  163. package/generated/RunFailure.schema.json +98 -0
  164. package/generated/RunTelemetry.schema.json +433 -0
  165. package/generated/SecretMetadata.schema.json +34 -0
  166. package/generated/Session.schema.json +80 -0
  167. package/generated/SessionReboundLineage.schema.json +73 -0
  168. package/generated/SpecPack.schema.json +372 -0
  169. package/generated/TaskContract.schema.json +501 -0
  170. package/generated/Thread.schema.json +176 -0
  171. package/generated/ThreadTurn.schema.json +172 -0
  172. package/generated/TrustConfig.schema.json +44 -0
  173. package/generated/WorkProduct.schema.json +60 -0
  174. package/generated/WorkspaceEnvelope.schema.json +94 -0
  175. package/package.json +43 -0
@@ -0,0 +1,666 @@
1
+ {
2
+ "$ref": "#/definitions/ControlRunSummary",
3
+ "definitions": {
4
+ "ControlRunSummary": {
5
+ "type": "object",
6
+ "properties": {
7
+ "jobId": {
8
+ "type": "string",
9
+ "description": "Daemon job id backing the run."
10
+ },
11
+ "runId": {
12
+ "type": "string",
13
+ "description": "Run id."
14
+ },
15
+ "taskId": {
16
+ "type": "string",
17
+ "description": "Task id, when allocated."
18
+ },
19
+ "state": {
20
+ "type": "string",
21
+ "enum": [
22
+ "queued",
23
+ "running",
24
+ "blocked",
25
+ "succeeded",
26
+ "no_op",
27
+ "ungated",
28
+ "review_not_run",
29
+ "failed",
30
+ "cancelled",
31
+ "interrupted",
32
+ "exhausted",
33
+ "not_converged",
34
+ "stuck_no_progress"
35
+ ],
36
+ "description": "Control-plane run state: queued/running while live; blocked awaiting a human; then a terminal outcome (succeeded, no_op, ungated, review_not_run, failed, cancelled, interrupted, exhausted, not_converged, stuck_no_progress)."
37
+ },
38
+ "runDir": {
39
+ "type": "string",
40
+ "description": "On-disk run artifact directory."
41
+ },
42
+ "error": {
43
+ "type": "string",
44
+ "description": "Error message, when the run failed."
45
+ },
46
+ "failure": {
47
+ "anyOf": [
48
+ {
49
+ "type": "object",
50
+ "properties": {
51
+ "phase": {
52
+ "type": "string",
53
+ "default": "unknown",
54
+ "description": "Pipeline phase where the failure happened."
55
+ },
56
+ "category": {
57
+ "type": "string",
58
+ "enum": [
59
+ "validation",
60
+ "project",
61
+ "auth",
62
+ "harness_unavailable",
63
+ "harness_error",
64
+ "budget",
65
+ "policy",
66
+ "cancelled",
67
+ "internal",
68
+ "unknown"
69
+ ],
70
+ "default": "unknown",
71
+ "description": "Typed failure category (validation, project, auth, harness, budget, policy, cancelled, internal, unknown)."
72
+ },
73
+ "harnessId": {
74
+ "type": [
75
+ "string",
76
+ "null"
77
+ ],
78
+ "default": null,
79
+ "description": "Harness involved in the failure, when known."
80
+ },
81
+ "attemptId": {
82
+ "type": [
83
+ "string",
84
+ "null"
85
+ ],
86
+ "default": null,
87
+ "description": "Attempt involved in the failure, when known."
88
+ },
89
+ "safeMessage": {
90
+ "type": "string",
91
+ "description": "Redacted human-readable failure message."
92
+ },
93
+ "rawDetailRef": {
94
+ "type": [
95
+ "string",
96
+ "null"
97
+ ],
98
+ "default": null,
99
+ "description": "Artifact path holding the raw (redacted) failure detail."
100
+ },
101
+ "logRefs": {
102
+ "type": "array",
103
+ "items": {
104
+ "type": "string"
105
+ },
106
+ "default": [],
107
+ "description": "Log artifact paths relevant to the failure."
108
+ },
109
+ "eventRefs": {
110
+ "type": "array",
111
+ "items": {
112
+ "type": "string"
113
+ },
114
+ "default": [],
115
+ "description": "Event references relevant to the failure."
116
+ },
117
+ "runDir": {
118
+ "type": [
119
+ "string",
120
+ "null"
121
+ ],
122
+ "default": null,
123
+ "description": "Run artifact directory."
124
+ },
125
+ "nextActions": {
126
+ "type": "array",
127
+ "items": {
128
+ "type": "string"
129
+ },
130
+ "default": [],
131
+ "description": "Suggested operator next actions."
132
+ }
133
+ },
134
+ "required": [
135
+ "safeMessage"
136
+ ],
137
+ "additionalProperties": false,
138
+ "description": "Typed failure record for a run: phase, category, evidence references, and suggested next actions."
139
+ },
140
+ {
141
+ "type": "null"
142
+ }
143
+ ],
144
+ "description": "Typed failure record; null unless the run failed.",
145
+ "default": null
146
+ },
147
+ "project": {
148
+ "type": "object",
149
+ "properties": {
150
+ "kind": {
151
+ "type": "string",
152
+ "enum": [
153
+ "project",
154
+ "none"
155
+ ],
156
+ "default": "none",
157
+ "description": "Whether the run was anchored to a project."
158
+ },
159
+ "root": {
160
+ "type": [
161
+ "string",
162
+ "null"
163
+ ],
164
+ "default": null,
165
+ "description": "Project root, when anchored."
166
+ },
167
+ "projectName": {
168
+ "type": [
169
+ "string",
170
+ "null"
171
+ ],
172
+ "default": null,
173
+ "description": "Project display name, when anchored."
174
+ },
175
+ "context": {
176
+ "type": "string",
177
+ "enum": [
178
+ "off",
179
+ "auto"
180
+ ],
181
+ "default": "off",
182
+ "description": "Project context depth used for the run."
183
+ }
184
+ },
185
+ "additionalProperties": false,
186
+ "description": "Project metadata projected onto a run summary.",
187
+ "default": {}
188
+ },
189
+ "mode": {
190
+ "type": "string",
191
+ "enum": [
192
+ "ask",
193
+ "plan",
194
+ "audit",
195
+ "agent",
196
+ "orchestrate"
197
+ ],
198
+ "description": "Canonical run mode: ask, plan, and audit are read-only; agent writes; orchestrate is the autonomous coordinator intent. Engine strategies (race, attempts, swarm, create) are flags on a mode, not modes."
199
+ },
200
+ "strategy": {
201
+ "anyOf": [
202
+ {
203
+ "type": "string",
204
+ "enum": [
205
+ "race",
206
+ "attempts",
207
+ "until_clean",
208
+ "swarm",
209
+ "create"
210
+ ]
211
+ },
212
+ {
213
+ "type": "null"
214
+ }
215
+ ],
216
+ "description": "Engine strategy flag on the mode (race width / attempt caps / until-clean / swarm / create); flags, not modes."
217
+ },
218
+ "prompt": {
219
+ "type": "string",
220
+ "description": "The user's prompt for the run."
221
+ },
222
+ "harnesses": {
223
+ "type": "array",
224
+ "items": {
225
+ "type": "string"
226
+ },
227
+ "description": "Harness pool the run used."
228
+ },
229
+ "primaryHarness": {
230
+ "type": "string",
231
+ "description": "Primary harness the run preferred."
232
+ },
233
+ "portfolio": {
234
+ "type": "string",
235
+ "enum": [
236
+ "daily-rich",
237
+ "balanced",
238
+ "cheapest",
239
+ "strongest",
240
+ "burn",
241
+ "subscription-first",
242
+ "api-overflow",
243
+ "conserve-claude",
244
+ "conserve-codex"
245
+ ],
246
+ "description": "Budget portfolio weighting the harness router's quality/cost/latency and subscription-vs-API preferences (e.g. cheapest minimizes spend, burn maximizes quality, conserve-* deprioritizes one vendor)."
247
+ },
248
+ "model": {
249
+ "type": "string",
250
+ "description": "Scalar model requested for the run."
251
+ },
252
+ "reviewerPanel": {
253
+ "type": "array",
254
+ "items": {
255
+ "type": "object",
256
+ "properties": {
257
+ "harness": {
258
+ "type": "string",
259
+ "minLength": 1,
260
+ "pattern": "\\S",
261
+ "description": "Explicit reviewer harness id; repeated harness ids are allowed so one provider can review through multiple requested models."
262
+ },
263
+ "model": {
264
+ "type": "string",
265
+ "minLength": 1,
266
+ "pattern": "\\S",
267
+ "description": "Per-reviewer model hint, passed to that harness only."
268
+ },
269
+ "effort": {
270
+ "type": "string",
271
+ "enum": [
272
+ "low",
273
+ "medium",
274
+ "high",
275
+ "xhigh",
276
+ "max"
277
+ ],
278
+ "description": "Per-reviewer effort hint, passed to that harness only."
279
+ }
280
+ },
281
+ "required": [
282
+ "harness"
283
+ ],
284
+ "additionalProperties": false,
285
+ "description": "One reviewer of an explicit reviewer panel."
286
+ },
287
+ "description": "Explicit reviewer panel used for the run."
288
+ },
289
+ "protectedPathApprovals": {
290
+ "type": "array",
291
+ "items": {
292
+ "type": "object",
293
+ "properties": {
294
+ "path": {
295
+ "type": "string",
296
+ "minLength": 1,
297
+ "pattern": "\\S",
298
+ "description": "Glob approved by the operator/user for this run; consumed only by the auto-protected gate/test path policy, not by built-in critical-path gates."
299
+ },
300
+ "reason": {
301
+ "$ref": "#/definitions/ControlRunSummary/properties/reviewerPanel/items/properties/model",
302
+ "description": "Optional human-readable reason for the approval."
303
+ }
304
+ },
305
+ "required": [
306
+ "path"
307
+ ],
308
+ "additionalProperties": false,
309
+ "description": "Per-run typed operator approval allowing changes under an auto-protected gate/test path."
310
+ },
311
+ "description": "Per-run protected-path approvals supplied."
312
+ },
313
+ "n": {
314
+ "type": "integer",
315
+ "description": "Race width, when the run was a race."
316
+ },
317
+ "maxUsd": {
318
+ "type": [
319
+ "number",
320
+ "null"
321
+ ],
322
+ "description": "USD cap for the run; null = no cap."
323
+ },
324
+ "spendUsd": {
325
+ "type": [
326
+ "number",
327
+ "null"
328
+ ],
329
+ "description": "Settled spend in USD; null when unknown."
330
+ },
331
+ "spendEstimated": {
332
+ "type": "boolean",
333
+ "description": "True when spend is token-derived rather than natively reported."
334
+ },
335
+ "access": {
336
+ "type": "string",
337
+ "enum": [
338
+ "readonly",
339
+ "workspace_write",
340
+ "full",
341
+ "external_sandbox_full",
342
+ "inherit_native"
343
+ ],
344
+ "description": "Access profile of the run: the effective profile when known, else the requested one (prefer requestedAccess/effectiveAccess)."
345
+ },
346
+ "requestedAccess": {
347
+ "$ref": "#/definitions/ControlRunSummary/properties/access",
348
+ "description": "Access profile the caller requested."
349
+ },
350
+ "effectiveAccess": {
351
+ "$ref": "#/definitions/ControlRunSummary/properties/access",
352
+ "description": "Access profile actually enforced by the engine."
353
+ },
354
+ "externalContextPolicy": {
355
+ "type": "string",
356
+ "enum": [
357
+ "off",
358
+ "auto",
359
+ "cached",
360
+ "live"
361
+ ],
362
+ "description": "Requested web policy for the run."
363
+ },
364
+ "webRequired": {
365
+ "type": "boolean",
366
+ "description": "Whether the run required web evidence."
367
+ },
368
+ "webMode": {
369
+ "$ref": "#/definitions/ControlRunSummary/properties/externalContextPolicy",
370
+ "description": "Web policy actually executed by the selected route."
371
+ },
372
+ "webEvidence": {
373
+ "type": "object",
374
+ "properties": {
375
+ "required": {
376
+ "type": "boolean",
377
+ "default": false,
378
+ "description": "Whether the run required web evidence."
379
+ },
380
+ "mode": {
381
+ "$ref": "#/definitions/ControlRunSummary/properties/externalContextPolicy",
382
+ "default": "auto",
383
+ "description": "Requested external-context policy for the run."
384
+ },
385
+ "effectiveMode": {
386
+ "$ref": "#/definitions/ControlRunSummary/properties/externalContextPolicy",
387
+ "default": "auto",
388
+ "description": "Policy the selected route actually executed (disclosed upgrades, e.g. cached to live)."
389
+ },
390
+ "attempted": {
391
+ "type": "boolean",
392
+ "default": false,
393
+ "description": "Whether any web activity was attempted."
394
+ },
395
+ "satisfied": {
396
+ "type": "boolean",
397
+ "default": false,
398
+ "description": "Whether the web-evidence requirement was satisfied."
399
+ },
400
+ "status": {
401
+ "type": "string",
402
+ "enum": [
403
+ "none",
404
+ "attempted",
405
+ "satisfied",
406
+ "failed",
407
+ "unverified"
408
+ ],
409
+ "default": "none",
410
+ "description": "Web-evidence verdict for the run."
411
+ },
412
+ "tool": {
413
+ "type": [
414
+ "string",
415
+ "null"
416
+ ],
417
+ "default": null,
418
+ "description": "Web tool that produced the evidence, when any."
419
+ },
420
+ "target": {
421
+ "type": [
422
+ "string",
423
+ "null"
424
+ ],
425
+ "default": null,
426
+ "description": "Redacted target (query/url) of the web activity, when any."
427
+ },
428
+ "errorSummary": {
429
+ "type": [
430
+ "string",
431
+ "null"
432
+ ],
433
+ "default": null,
434
+ "description": "Redacted error detail when web activity failed."
435
+ },
436
+ "rawDetailRef": {
437
+ "type": [
438
+ "string",
439
+ "null"
440
+ ],
441
+ "default": null,
442
+ "description": "Artifact path holding the raw (redacted) evidence detail."
443
+ },
444
+ "available": {
445
+ "type": "boolean",
446
+ "default": true,
447
+ "description": "False when the run predates the telemetry artifact; surfaces must render \"telemetry unavailable\"."
448
+ }
449
+ },
450
+ "additionalProperties": false,
451
+ "description": "Web evidence projected onto a run summary from the telemetry artifact.",
452
+ "default": {}
453
+ },
454
+ "toolPermissionPolicy": {
455
+ "type": "object",
456
+ "additionalProperties": {},
457
+ "description": "Tool allow/deny policy applied to the run."
458
+ },
459
+ "outputReadyState": {
460
+ "type": "string",
461
+ "enum": [
462
+ "pending",
463
+ "finalizing",
464
+ "ready",
465
+ "diagnostic"
466
+ ],
467
+ "description": "Whether a terminal run also has a loaded user-facing output artifact: pending (not yet), finalizing (being produced), ready (loaded), diagnostic (only diagnostic output).",
468
+ "default": "pending"
469
+ },
470
+ "toolWarningsTotal": {
471
+ "type": "integer",
472
+ "minimum": 0,
473
+ "default": 0,
474
+ "description": "Non-blocking tool warnings projected from the telemetry artifact."
475
+ },
476
+ "result": {
477
+ "type": "object",
478
+ "properties": {
479
+ "kind": {
480
+ "type": "string",
481
+ "enum": [
482
+ "patch",
483
+ "answer",
484
+ "plan",
485
+ "report",
486
+ "none"
487
+ ],
488
+ "default": "none",
489
+ "description": "What the turn actually produced: a patch, an answer, a plan (no files changed), a report, or nothing."
490
+ },
491
+ "diffStat": {
492
+ "anyOf": [
493
+ {
494
+ "type": "object",
495
+ "properties": {
496
+ "files": {
497
+ "type": "integer",
498
+ "minimum": 0,
499
+ "description": "Files changed."
500
+ },
501
+ "additions": {
502
+ "type": "integer",
503
+ "minimum": 0,
504
+ "description": "Lines added."
505
+ },
506
+ "deletions": {
507
+ "type": "integer",
508
+ "minimum": 0,
509
+ "description": "Lines deleted."
510
+ }
511
+ },
512
+ "required": [
513
+ "files",
514
+ "additions",
515
+ "deletions"
516
+ ],
517
+ "additionalProperties": false
518
+ },
519
+ {
520
+ "type": "null"
521
+ }
522
+ ],
523
+ "default": null,
524
+ "description": "Diff statistics; null unless a patch exists."
525
+ },
526
+ "blockers": {
527
+ "type": "integer",
528
+ "minimum": 0,
529
+ "default": 0,
530
+ "description": "Count of accepted blocking review findings."
531
+ },
532
+ "adopted": {
533
+ "type": [
534
+ "boolean",
535
+ "null"
536
+ ],
537
+ "default": null,
538
+ "description": "True when the live in-place tree was mutated this turn (regardless of review); null when unknown."
539
+ },
540
+ "applyState": {
541
+ "type": "string",
542
+ "enum": [
543
+ "not_applied",
544
+ "applied",
545
+ "applied_review_blocked",
546
+ "reverted"
547
+ ],
548
+ "description": "Honest application state of a run's changes: not_applied (no in-place mutation), applied (applied and review clean), applied_review_blocked (applied but review blocked/unconverged), or reverted.",
549
+ "default": "not_applied"
550
+ },
551
+ "preTurnSha": {
552
+ "type": [
553
+ "string",
554
+ "null"
555
+ ],
556
+ "default": null,
557
+ "description": "Tree SHA before this turn mutated the in-place tree (revert restore target)."
558
+ },
559
+ "postTurnSha": {
560
+ "type": [
561
+ "string",
562
+ "null"
563
+ ],
564
+ "default": null,
565
+ "description": "Tree SHA right after this turn's mutation; revert refuses if the working tree has diverged from this since."
566
+ },
567
+ "revertable": {
568
+ "type": "boolean",
569
+ "default": false,
570
+ "description": "Revert metadata is available so a Revert affordance may be offered; not a live-safe guarantee — the server re-checks tree divergence at revert time."
571
+ }
572
+ },
573
+ "additionalProperties": false,
574
+ "description": "Honest terminal outcome of a run (what the turn actually did), projected from the work product and answer artifacts.",
575
+ "default": {}
576
+ },
577
+ "waitingOnUser": {
578
+ "type": "boolean",
579
+ "default": false,
580
+ "description": "True while at least one interactive question is awaiting the user's answer."
581
+ },
582
+ "route": {
583
+ "anyOf": [
584
+ {
585
+ "type": "object",
586
+ "properties": {
587
+ "requestedModel": {
588
+ "type": [
589
+ "string",
590
+ "null"
591
+ ],
592
+ "default": null,
593
+ "description": "Model requested for the run."
594
+ },
595
+ "observedModel": {
596
+ "type": [
597
+ "string",
598
+ "null"
599
+ ],
600
+ "default": null,
601
+ "description": "Model the harness stream actually reported."
602
+ },
603
+ "harnessId": {
604
+ "type": [
605
+ "string",
606
+ "null"
607
+ ],
608
+ "default": null,
609
+ "description": "Harness that ran the final attempt."
610
+ },
611
+ "verified": {
612
+ "type": "boolean",
613
+ "default": false,
614
+ "description": "True only when an observed model was actually reported by the harness stream — never inferred from the request."
615
+ }
616
+ },
617
+ "additionalProperties": false,
618
+ "description": "Run-level route evidence projected from telemetry (requested vs observed model)."
619
+ },
620
+ {
621
+ "type": "null"
622
+ }
623
+ ],
624
+ "description": "Route evidence from telemetry; null when no telemetry exists (legacy runs).",
625
+ "default": null
626
+ },
627
+ "tests": {
628
+ "type": "array",
629
+ "items": {
630
+ "type": "string"
631
+ },
632
+ "description": "Test commands configured as gates."
633
+ },
634
+ "specId": {
635
+ "type": "string",
636
+ "description": "SpecPack id the run was held to."
637
+ },
638
+ "specHash": {
639
+ "type": "string",
640
+ "minLength": 1,
641
+ "description": "Content hash of the SpecPack the run was held to."
642
+ },
643
+ "createdAt": {
644
+ "type": "string",
645
+ "description": "When the run was created."
646
+ },
647
+ "startedAt": {
648
+ "type": "string",
649
+ "description": "When the run started."
650
+ },
651
+ "finishedAt": {
652
+ "type": "string",
653
+ "description": "When the run finished."
654
+ }
655
+ },
656
+ "required": [
657
+ "jobId",
658
+ "runId",
659
+ "state"
660
+ ],
661
+ "additionalProperties": false,
662
+ "description": "Run summary row served by GET /runs and embedded in run detail: state, routing, budget, policies, and honest outcome."
663
+ }
664
+ },
665
+ "$schema": "http://json-schema.org/draft-07/schema#"
666
+ }