@claudexor/schema 3.0.3 → 3.1.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 (134) hide show
  1. package/LICENSE +1 -1
  2. package/dist/agent-capabilities.d.ts +37 -0
  3. package/dist/agent-capabilities.d.ts.map +1 -1
  4. package/dist/agent-capabilities.js +14 -0
  5. package/dist/agent-capabilities.js.map +1 -1
  6. package/dist/apply-eligibility.d.ts +384 -18
  7. package/dist/apply-eligibility.d.ts.map +1 -1
  8. package/dist/apply-eligibility.js +20 -1
  9. package/dist/apply-eligibility.js.map +1 -1
  10. package/dist/budget.d.ts +75 -0
  11. package/dist/budget.d.ts.map +1 -1
  12. package/dist/budget.js +46 -0
  13. package/dist/budget.js.map +1 -1
  14. package/dist/config.d.ts +41 -41
  15. package/dist/control-operation-responses.d.ts +287 -65
  16. package/dist/control-operation-responses.d.ts.map +1 -1
  17. package/dist/control-operation-responses.js +33 -3
  18. package/dist/control-operation-responses.js.map +1 -1
  19. package/dist/control-run-detail.d.ts +600 -150
  20. package/dist/control-run-detail.d.ts.map +1 -1
  21. package/dist/control-run-detail.js +28 -2
  22. package/dist/control-run-detail.js.map +1 -1
  23. package/dist/control-run-retry.d.ts +1 -1
  24. package/dist/control-run-scope.d.ts +1 -1
  25. package/dist/control-thread-apply.d.ts +10 -0
  26. package/dist/control-thread-apply.d.ts.map +1 -1
  27. package/dist/control.d.ts +664 -156
  28. package/dist/control.d.ts.map +1 -1
  29. package/dist/control.js +76 -2
  30. package/dist/control.js.map +1 -1
  31. package/dist/decision.d.ts +205 -9
  32. package/dist/decision.d.ts.map +1 -1
  33. package/dist/decision.js +69 -1
  34. package/dist/decision.js.map +1 -1
  35. package/dist/deep-scan.d.ts +27 -0
  36. package/dist/deep-scan.d.ts.map +1 -0
  37. package/dist/deep-scan.js +27 -0
  38. package/dist/deep-scan.js.map +1 -0
  39. package/dist/delivery.d.ts +13 -0
  40. package/dist/delivery.d.ts.map +1 -1
  41. package/dist/delivery.js +15 -0
  42. package/dist/delivery.js.map +1 -1
  43. package/dist/events.d.ts +59 -4
  44. package/dist/events.d.ts.map +1 -1
  45. package/dist/events.js +85 -0
  46. package/dist/events.js.map +1 -1
  47. package/dist/harness.d.ts +111 -3
  48. package/dist/harness.d.ts.map +1 -1
  49. package/dist/harness.js +77 -1
  50. package/dist/harness.js.map +1 -1
  51. package/dist/index.d.ts +3 -0
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +3 -0
  54. package/dist/index.js.map +1 -1
  55. package/dist/operation.d.ts +193 -10
  56. package/dist/operation.d.ts.map +1 -1
  57. package/dist/operation.js +45 -0
  58. package/dist/operation.js.map +1 -1
  59. package/dist/output-schema-dialect.d.ts +22 -0
  60. package/dist/output-schema-dialect.d.ts.map +1 -0
  61. package/dist/output-schema-dialect.js +37 -0
  62. package/dist/output-schema-dialect.js.map +1 -0
  63. package/dist/output-schema.d.ts +26 -2
  64. package/dist/output-schema.d.ts.map +1 -1
  65. package/dist/output-schema.js +313 -16
  66. package/dist/output-schema.js.map +1 -1
  67. package/dist/plan.d.ts +2 -2
  68. package/dist/problem.d.ts +3 -3
  69. package/dist/project.d.ts +47 -12
  70. package/dist/project.d.ts.map +1 -1
  71. package/dist/project.js +32 -0
  72. package/dist/project.js.map +1 -1
  73. package/dist/readiness.d.ts +14 -0
  74. package/dist/readiness.d.ts.map +1 -1
  75. package/dist/recovery.d.ts +14 -14
  76. package/dist/review.d.ts +7 -7
  77. package/dist/route.d.ts +2 -2
  78. package/dist/setup.d.ts +288 -94
  79. package/dist/setup.d.ts.map +1 -1
  80. package/dist/setup.js +90 -6
  81. package/dist/setup.js.map +1 -1
  82. package/dist/status-projection.d.ts +79 -4
  83. package/dist/status-projection.d.ts.map +1 -1
  84. package/dist/status-projection.js +161 -4
  85. package/dist/status-projection.js.map +1 -1
  86. package/dist/task.d.ts +14 -0
  87. package/dist/task.d.ts.map +1 -1
  88. package/dist/task.js +9 -0
  89. package/dist/task.js.map +1 -1
  90. package/dist/telemetry.d.ts +779 -16
  91. package/dist/telemetry.d.ts.map +1 -1
  92. package/dist/telemetry.js +177 -4
  93. package/dist/telemetry.js.map +1 -1
  94. package/dist/tool-ref.d.ts +14 -0
  95. package/dist/tool-ref.d.ts.map +1 -1
  96. package/dist/tool-ref.js +15 -0
  97. package/dist/tool-ref.js.map +1 -1
  98. package/dist/work-report.d.ts +131 -0
  99. package/dist/work-report.d.ts.map +1 -0
  100. package/dist/work-report.js +124 -0
  101. package/dist/work-report.js.map +1 -0
  102. package/dist/workspace.d.ts +2 -2
  103. package/generated/AgentCapabilityCatalog.schema.json +35 -0
  104. package/generated/ControlApplyCheckResponse.schema.json +5 -0
  105. package/generated/ControlDeliveryResponse.schema.json +14 -0
  106. package/generated/ControlHarnessListResponse.schema.json +19 -0
  107. package/generated/ControlOperationCatalog.schema.json +74 -0
  108. package/generated/ControlOperationDescriptor.schema.json +74 -0
  109. package/generated/ControlOperationParameter.schema.json +75 -0
  110. package/generated/ControlProjectRemoveReceipt.schema.json +58 -0
  111. package/generated/ControlRunAgainDraft.schema.json +11 -0
  112. package/generated/ControlRunDetail.schema.json +403 -9
  113. package/generated/ControlRunListResponse.schema.json +229 -3
  114. package/generated/ControlRunStartRequest.schema.json +11 -0
  115. package/generated/ControlRunSummary.schema.json +215 -2
  116. package/generated/ControlSetupJobCreateRequest.schema.json +2 -1
  117. package/generated/ControlSetupJobEvent.schema.json +28 -0
  118. package/generated/ControlSetupJobSnapshot.schema.json +28 -0
  119. package/generated/ControlThreadApplyResponse.schema.json +14 -0
  120. package/generated/ControlThreadDetail.schema.json +94 -1
  121. package/generated/ControlThreadTurnRequest.schema.json +11 -0
  122. package/generated/DecisionRecord.schema.json +178 -2
  123. package/generated/HarnessEvent.schema.json +79 -1
  124. package/generated/HarnessManifest.schema.json +19 -0
  125. package/generated/HarnessStatusDto.schema.json +19 -0
  126. package/generated/McpRunHandleResult.schema.json +286 -1
  127. package/generated/McpRunToolResult.schema.json +171 -1
  128. package/generated/RoutePoolDegradedPayload.schema.json +79 -0
  129. package/generated/RunEvent.schema.json +7 -1
  130. package/generated/RunFailure.schema.json +23 -1
  131. package/generated/RunTelemetry.schema.json +376 -1
  132. package/generated/StructuredOutputConformance.schema.json +83 -0
  133. package/generated/TaskContract.schema.json +16 -0
  134. package/package.json +2 -2
@@ -296,6 +296,19 @@
296
296
  "description": "Set when this turn implements an approved plan from an earlier run.",
297
297
  "default": null
298
298
  },
299
+ "planHash": {
300
+ "type": [
301
+ "string",
302
+ "null"
303
+ ],
304
+ "default": null,
305
+ "description": "SHA-256 of the frozen plan bytes this Implement turn materialized (INV-081); null on non-Implement/legacy turns (QA-046)."
306
+ },
307
+ "planReadinessOverridden": {
308
+ "type": "boolean",
309
+ "default": false,
310
+ "description": "True when the operator implemented a not-ready plan over open questions (INV-081); recorded for provenance, rendered on the card (QA-046)."
311
+ },
299
312
  "kind": {
300
313
  "type": "string",
301
314
  "enum": [
@@ -519,7 +532,11 @@
519
532
  "stuck_no_progress",
520
533
  "wall_clock_exceeded",
521
534
  "user_cancelled",
522
- "crash_interrupted"
535
+ "crash_interrupted",
536
+ "input_required",
537
+ "work_incomplete",
538
+ "context_capacity_exhausted",
539
+ "work_report_contract"
523
540
  ],
524
541
  "description": "Typed reason qualifying a non-clean terminal; null on a clean success."
525
542
  },
@@ -529,6 +546,82 @@
529
546
  ],
530
547
  "description": "Typed reason qualifying a non-clean terminal; null on a clean success.",
531
548
  "default": null
549
+ },
550
+ "work_state": {
551
+ "type": "object",
552
+ "properties": {
553
+ "state": {
554
+ "type": "string",
555
+ "enum": [
556
+ "completed",
557
+ "needs_input",
558
+ "incomplete",
559
+ "unverified"
560
+ ],
561
+ "description": "Folded work state: the WorkReport state, or unverified when no report was obtainable (transport unsupported / lane gated)."
562
+ },
563
+ "source": {
564
+ "type": "string",
565
+ "enum": [
566
+ "constrained",
567
+ "validated",
568
+ "absent"
569
+ ],
570
+ "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)."
571
+ },
572
+ "required_inputs": {
573
+ "type": "array",
574
+ "items": {
575
+ "type": "object",
576
+ "properties": {
577
+ "kind": {
578
+ "type": "string",
579
+ "enum": [
580
+ "file",
581
+ "context",
582
+ "credential",
583
+ "permission",
584
+ "decision",
585
+ "external_dependency"
586
+ ],
587
+ "description": "Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency."
588
+ },
589
+ "locator": {
590
+ "anyOf": [
591
+ {
592
+ "type": "string",
593
+ "maxLength": 512
594
+ },
595
+ {
596
+ "type": "null"
597
+ }
598
+ ],
599
+ "default": null,
600
+ "description": "Concrete pointer to the missing thing (path/url/name); null when unnameable."
601
+ },
602
+ "description": {
603
+ "type": "string",
604
+ "maxLength": 1024,
605
+ "description": "Human-readable description of what is needed and why."
606
+ }
607
+ },
608
+ "required": [
609
+ "kind",
610
+ "description"
611
+ ],
612
+ "additionalProperties": false,
613
+ "description": "One blocking input a needs_input/incomplete WorkReport lists."
614
+ },
615
+ "maxItems": 16,
616
+ "description": "Carried through from a needs_input/incomplete WorkReport for honest disclosure."
617
+ }
618
+ },
619
+ "required": [
620
+ "state",
621
+ "source"
622
+ ],
623
+ "additionalProperties": false,
624
+ "description": "D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport."
532
625
  }
533
626
  },
534
627
  "required": [
@@ -91,6 +91,17 @@
91
91
  ],
92
92
  "description": "Requested reasoning effort."
93
93
  },
94
+ "efforts": {
95
+ "type": "object",
96
+ "additionalProperties": {
97
+ "$ref": "#/definitions/ControlThreadTurnRequest/properties/effort"
98
+ },
99
+ "propertyNames": {
100
+ "minLength": 1,
101
+ "pattern": "\\S"
102
+ },
103
+ "description": "Harness-scoped effort map (harness id to effort); an entry here wins over the scalar effort and the per-harness settings default."
104
+ },
94
105
  "reviewerModels": {
95
106
  "type": "object",
96
107
  "additionalProperties": {
@@ -71,7 +71,11 @@
71
71
  "stuck_no_progress",
72
72
  "wall_clock_exceeded",
73
73
  "user_cancelled",
74
- "crash_interrupted"
74
+ "crash_interrupted",
75
+ "input_required",
76
+ "work_incomplete",
77
+ "context_capacity_exhausted",
78
+ "work_report_contract"
75
79
  ],
76
80
  "description": "Typed reason qualifying a non-clean terminal; null on a clean success."
77
81
  },
@@ -81,6 +85,82 @@
81
85
  ],
82
86
  "description": "Typed reason qualifying a non-clean terminal; null on a clean success.",
83
87
  "default": null
88
+ },
89
+ "work_state": {
90
+ "type": "object",
91
+ "properties": {
92
+ "state": {
93
+ "type": "string",
94
+ "enum": [
95
+ "completed",
96
+ "needs_input",
97
+ "incomplete",
98
+ "unverified"
99
+ ],
100
+ "description": "Folded work state: the WorkReport state, or unverified when no report was obtainable (transport unsupported / lane gated)."
101
+ },
102
+ "source": {
103
+ "type": "string",
104
+ "enum": [
105
+ "constrained",
106
+ "validated",
107
+ "absent"
108
+ ],
109
+ "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)."
110
+ },
111
+ "required_inputs": {
112
+ "type": "array",
113
+ "items": {
114
+ "type": "object",
115
+ "properties": {
116
+ "kind": {
117
+ "type": "string",
118
+ "enum": [
119
+ "file",
120
+ "context",
121
+ "credential",
122
+ "permission",
123
+ "decision",
124
+ "external_dependency"
125
+ ],
126
+ "description": "Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency."
127
+ },
128
+ "locator": {
129
+ "anyOf": [
130
+ {
131
+ "type": "string",
132
+ "maxLength": 512
133
+ },
134
+ {
135
+ "type": "null"
136
+ }
137
+ ],
138
+ "default": null,
139
+ "description": "Concrete pointer to the missing thing (path/url/name); null when unnameable."
140
+ },
141
+ "description": {
142
+ "type": "string",
143
+ "maxLength": 1024,
144
+ "description": "Human-readable description of what is needed and why."
145
+ }
146
+ },
147
+ "required": [
148
+ "kind",
149
+ "description"
150
+ ],
151
+ "additionalProperties": false,
152
+ "description": "One blocking input a needs_input/incomplete WorkReport lists."
153
+ },
154
+ "maxItems": 16,
155
+ "description": "Carried through from a needs_input/incomplete WorkReport for honest disclosure."
156
+ }
157
+ },
158
+ "required": [
159
+ "state",
160
+ "source"
161
+ ],
162
+ "additionalProperties": false,
163
+ "description": "D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport."
84
164
  }
85
165
  },
86
166
  "required": [
@@ -102,6 +182,84 @@
102
182
  "default": {},
103
183
  "description": "Per-candidate reasons the others lost, keyed by candidate id."
104
184
  },
185
+ "ranking_policy_version": {
186
+ "type": "integer",
187
+ "exclusiveMinimum": 0,
188
+ "default": 1,
189
+ "description": "Version of the ranking axis registry the scorecard was produced under."
190
+ },
191
+ "score_axes": {
192
+ "type": "array",
193
+ "items": {
194
+ "type": "string"
195
+ },
196
+ "default": [],
197
+ "description": "Every compared ranking axis key, in precedence (best-first) order."
198
+ },
199
+ "ranking_scorecard": {
200
+ "type": "array",
201
+ "items": {
202
+ "type": "object",
203
+ "properties": {
204
+ "attempt_id": {
205
+ "type": "string",
206
+ "minLength": 1,
207
+ "description": "Candidate attempt id (stable key; labels may localize)."
208
+ },
209
+ "label": {
210
+ "type": "string",
211
+ "description": "Anonymized candidate label shown to the arbiter."
212
+ },
213
+ "axes": {
214
+ "type": "object",
215
+ "additionalProperties": {
216
+ "type": "string"
217
+ },
218
+ "description": "Formatted value for every ranking axis, keyed by axis key."
219
+ }
220
+ },
221
+ "required": [
222
+ "attempt_id",
223
+ "label",
224
+ "axes"
225
+ ],
226
+ "additionalProperties": false
227
+ },
228
+ "default": [],
229
+ "description": "Per-candidate full ranking scorecard, in final ranking order."
230
+ },
231
+ "decisive_axis": {
232
+ "anyOf": [
233
+ {
234
+ "type": "object",
235
+ "properties": {
236
+ "key": {
237
+ "type": "string",
238
+ "description": "The first ranking axis that separated winner from runner-up."
239
+ },
240
+ "winner_value": {
241
+ "type": "string",
242
+ "description": "The winner's formatted value on the decisive axis."
243
+ },
244
+ "runner_up_value": {
245
+ "type": "string",
246
+ "description": "The runner-up's formatted value on the decisive axis."
247
+ }
248
+ },
249
+ "required": [
250
+ "key",
251
+ "winner_value",
252
+ "runner_up_value"
253
+ ],
254
+ "additionalProperties": false
255
+ },
256
+ {
257
+ "type": "null"
258
+ }
259
+ ],
260
+ "default": null,
261
+ "description": "The axis that actually decided the winner vs the runner-up; null on an exact tie (route order decided, disclosed in final_checks)."
262
+ },
105
263
  "accepted_risks": {
106
264
  "type": "array",
107
265
  "items": {
@@ -141,12 +299,30 @@
141
299
  "type": "boolean",
142
300
  "default": false,
143
301
  "description": "True when any of the spend is token-derived rather than natively reported."
302
+ },
303
+ "cash_usd": {
304
+ "type": [
305
+ "number",
306
+ "null"
307
+ ],
308
+ "default": null,
309
+ "description": "Settled cash spend in USD (0 on native-subscription routes); null when unknown."
310
+ },
311
+ "valuation_usd": {
312
+ "type": [
313
+ "number",
314
+ "null"
315
+ ],
316
+ "default": null,
317
+ "description": "Settled subscription-equivalent valuation in USD (includes the reviewer panel); null when unknown."
144
318
  }
145
319
  },
146
320
  "additionalProperties": false,
147
321
  "default": {
148
322
  "spend_usd": null,
149
- "estimated": false
323
+ "estimated": false,
324
+ "cash_usd": null,
325
+ "valuation_usd": null
150
326
  },
151
327
  "description": "Settled spend for the run; estimates are disclosed, never presented as exact."
152
328
  },
@@ -18,9 +18,10 @@
18
18
  "usage",
19
19
  "error",
20
20
  "status",
21
+ "context",
21
22
  "completed"
22
23
  ],
23
- "description": "Normalized event type covering session lifecycle, output, tool use, interaction, file changes, usage, transient status, and errors."
24
+ "description": "Normalized event type covering session lifecycle, output, tool use, interaction, file changes, usage, transient status, context-management signals, and errors."
24
25
  },
25
26
  "session_id": {
26
27
  "type": "string",
@@ -88,6 +89,15 @@
88
89
  "exit_code": {
89
90
  "type": "integer",
90
91
  "description": "Process exit code for command tools, when known."
92
+ },
93
+ "web_retrieval": {
94
+ "type": "string",
95
+ "enum": [
96
+ "verified",
97
+ "dispatched",
98
+ "failed"
99
+ ],
100
+ "description": "Adapter-stamped web/browser retrieval outcome (verified/dispatched/failed), distinct from the tool-call status lifecycle."
91
101
  }
92
102
  },
93
103
  "required": [
@@ -581,6 +591,74 @@
581
591
  "additionalProperties": false,
582
592
  "description": "Typed transient-failure signal set by the adapter from native CLI/API error shapes, consumed for bounded retry policy."
583
593
  },
594
+ "context": {
595
+ "type": "object",
596
+ "properties": {
597
+ "kind": {
598
+ "type": "string",
599
+ "enum": [
600
+ "compaction_started",
601
+ "compaction_completed",
602
+ "capacity_exhausted"
603
+ ],
604
+ "description": "Kind of context signal: a compaction boundary starting/completing, or terminal capacity exhaustion."
605
+ },
606
+ "cause": {
607
+ "type": "string",
608
+ "enum": [
609
+ "prompt_too_long",
610
+ "repeated_refill",
611
+ "blocking_limit",
612
+ "window_exceeded",
613
+ "unknown"
614
+ ],
615
+ "default": "unknown",
616
+ "description": "Why the context signal fired, mapped onto a typed cause (never prose)."
617
+ },
618
+ "native_code": {
619
+ "type": [
620
+ "string",
621
+ "null"
622
+ ],
623
+ "default": null,
624
+ "description": "The vendor's own terminal/context code passed verbatim as evidence; null when none."
625
+ },
626
+ "trigger": {
627
+ "anyOf": [
628
+ {
629
+ "type": "string",
630
+ "enum": [
631
+ "manual",
632
+ "auto"
633
+ ]
634
+ },
635
+ {
636
+ "type": "null"
637
+ }
638
+ ],
639
+ "default": null,
640
+ "description": "Whether the compaction was manually or automatically triggered; null when unreported."
641
+ },
642
+ "pre_tokens": {
643
+ "anyOf": [
644
+ {
645
+ "type": "integer",
646
+ "minimum": 0
647
+ },
648
+ {
649
+ "type": "null"
650
+ }
651
+ ],
652
+ "default": null,
653
+ "description": "Token count before the compaction/exhaustion, when the vendor reports it; null otherwise."
654
+ }
655
+ },
656
+ "required": [
657
+ "kind"
658
+ ],
659
+ "additionalProperties": false,
660
+ "description": "Typed context-management signal (compaction boundary / capacity exhaustion) set by the adapter; orthogonal to the transient-retry taxonomy."
661
+ },
584
662
  "error": {
585
663
  "type": "string",
586
664
  "description": "Error text for error events."
@@ -326,6 +326,25 @@
326
326
  "default": false,
327
327
  "description": "The harness can constrain its final message to a caller-supplied JSON Schema (native structured-output flag)."
328
328
  },
329
+ "work_report_transport": {
330
+ "type": "string",
331
+ "enum": [
332
+ "constrained",
333
+ "validated",
334
+ "unsupported"
335
+ ],
336
+ "default": "unsupported",
337
+ "description": "How the harness carries the D-16 WorkReport envelope: constrained (native schema transport), validated (whole-answer JSON), or unsupported (work_state stays unverified)."
338
+ },
339
+ "structured_output_channel": {
340
+ "type": "string",
341
+ "enum": [
342
+ "side_tool",
343
+ "final_message"
344
+ ],
345
+ "default": "final_message",
346
+ "description": "Where a schema-constrained answer surfaces: side_tool (rides a tool; final message stays markdown) or final_message (constrains the final message itself)."
347
+ },
329
348
  "effort_levels": {
330
349
  "type": "array",
331
350
  "items": {
@@ -344,6 +344,25 @@
344
344
  "default": false,
345
345
  "description": "The harness can constrain its final message to a caller-supplied JSON Schema (native structured-output flag)."
346
346
  },
347
+ "work_report_transport": {
348
+ "type": "string",
349
+ "enum": [
350
+ "constrained",
351
+ "validated",
352
+ "unsupported"
353
+ ],
354
+ "default": "unsupported",
355
+ "description": "How the harness carries the D-16 WorkReport envelope: constrained (native schema transport), validated (whole-answer JSON), or unsupported (work_state stays unverified)."
356
+ },
357
+ "structured_output_channel": {
358
+ "type": "string",
359
+ "enum": [
360
+ "side_tool",
361
+ "final_message"
362
+ ],
363
+ "default": "final_message",
364
+ "description": "Where a schema-constrained answer surfaces: side_tool (rides a tool; final message stays markdown) or final_message (constrains the final message itself)."
365
+ },
347
366
  "effort_levels": {
348
367
  "type": "array",
349
368
  "items": {