@claudexor/schema 1.0.1 → 2.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 (248) hide show
  1. package/dist/agent-capabilities.d.ts +88 -16
  2. package/dist/agent-capabilities.d.ts.map +1 -1
  3. package/dist/agent-capabilities.js +49 -18
  4. package/dist/agent-capabilities.js.map +1 -1
  5. package/dist/apply-eligibility.d.ts.map +1 -1
  6. package/dist/apply-eligibility.js +22 -6
  7. package/dist/apply-eligibility.js.map +1 -1
  8. package/dist/attachment.d.ts +113 -48
  9. package/dist/attachment.d.ts.map +1 -1
  10. package/dist/attachment.js +60 -45
  11. package/dist/attachment.js.map +1 -1
  12. package/dist/auth.d.ts +1423 -0
  13. package/dist/auth.d.ts.map +1 -0
  14. package/dist/auth.js +317 -0
  15. package/dist/auth.js.map +1 -0
  16. package/dist/budget.d.ts +133 -16
  17. package/dist/budget.d.ts.map +1 -1
  18. package/dist/budget.js +65 -22
  19. package/dist/budget.js.map +1 -1
  20. package/dist/config.d.ts +449 -115
  21. package/dist/config.d.ts.map +1 -1
  22. package/dist/config.js +114 -41
  23. package/dist/config.js.map +1 -1
  24. package/dist/context.d.ts +6 -6
  25. package/dist/context.d.ts.map +1 -1
  26. package/dist/context.js +31 -7
  27. package/dist/context.js.map +1 -1
  28. package/dist/control-operation-responses.d.ts +1172 -0
  29. package/dist/control-operation-responses.d.ts.map +1 -0
  30. package/dist/control-operation-responses.js +35 -0
  31. package/dist/control-operation-responses.js.map +1 -0
  32. package/dist/control-run-detail.d.ts +443 -242
  33. package/dist/control-run-detail.d.ts.map +1 -1
  34. package/dist/control-run-detail.js +72 -17
  35. package/dist/control-run-detail.js.map +1 -1
  36. package/dist/control-run-retry.d.ts +88 -0
  37. package/dist/control-run-retry.d.ts.map +1 -0
  38. package/dist/control-run-retry.js +40 -0
  39. package/dist/control-run-retry.js.map +1 -0
  40. package/dist/control-run-scope.d.ts +25 -0
  41. package/dist/control-run-scope.d.ts.map +1 -0
  42. package/dist/control-run-scope.js +22 -0
  43. package/dist/control-run-scope.js.map +1 -0
  44. package/dist/control-secret.d.ts +90 -0
  45. package/dist/control-secret.d.ts.map +1 -0
  46. package/dist/control-secret.js +35 -0
  47. package/dist/control-secret.js.map +1 -0
  48. package/dist/control-spec.d.ts +592 -0
  49. package/dist/control-spec.d.ts.map +1 -0
  50. package/dist/control-spec.js +85 -0
  51. package/dist/control-spec.js.map +1 -0
  52. package/dist/control-thread-apply.d.ts +175 -0
  53. package/dist/control-thread-apply.d.ts.map +1 -0
  54. package/dist/control-thread-apply.js +31 -0
  55. package/dist/control-thread-apply.js.map +1 -0
  56. package/dist/control-trust.d.ts +74 -10
  57. package/dist/control-trust.d.ts.map +1 -1
  58. package/dist/control-trust.js +31 -11
  59. package/dist/control-trust.js.map +1 -1
  60. package/dist/control.d.ts +1391 -878
  61. package/dist/control.d.ts.map +1 -1
  62. package/dist/control.js +468 -310
  63. package/dist/control.js.map +1 -1
  64. package/dist/decision.d.ts +10 -10
  65. package/dist/decision.d.ts.map +1 -1
  66. package/dist/decision.js +62 -15
  67. package/dist/decision.js.map +1 -1
  68. package/dist/delivery.d.ts +99 -0
  69. package/dist/delivery.d.ts.map +1 -0
  70. package/dist/delivery.js +19 -0
  71. package/dist/delivery.js.map +1 -0
  72. package/dist/events.d.ts +25 -2
  73. package/dist/events.d.ts.map +1 -1
  74. package/dist/events.js +25 -4
  75. package/dist/events.js.map +1 -1
  76. package/dist/gate.d.ts +2 -2
  77. package/dist/gate.d.ts.map +1 -1
  78. package/dist/gate.js +25 -5
  79. package/dist/gate.js.map +1 -1
  80. package/dist/harness.d.ts +558 -175
  81. package/dist/harness.d.ts.map +1 -1
  82. package/dist/harness.js +207 -82
  83. package/dist/harness.js.map +1 -1
  84. package/dist/index.d.ts +15 -0
  85. package/dist/index.d.ts.map +1 -1
  86. package/dist/index.js +15 -0
  87. package/dist/index.js.map +1 -1
  88. package/dist/operation.d.ts +185 -0
  89. package/dist/operation.d.ts.map +1 -0
  90. package/dist/operation.js +50 -0
  91. package/dist/operation.js.map +1 -0
  92. package/dist/orchestrate.d.ts +127 -22
  93. package/dist/orchestrate.d.ts.map +1 -1
  94. package/dist/orchestrate.js +61 -7
  95. package/dist/orchestrate.js.map +1 -1
  96. package/dist/primitives.d.ts.map +1 -1
  97. package/dist/primitives.js +4 -1
  98. package/dist/primitives.js.map +1 -1
  99. package/dist/problem.d.ts +29 -0
  100. package/dist/problem.d.ts.map +1 -0
  101. package/dist/problem.js +17 -0
  102. package/dist/problem.js.map +1 -0
  103. package/dist/project.d.ts +97 -0
  104. package/dist/project.d.ts.map +1 -0
  105. package/dist/project.js +27 -0
  106. package/dist/project.js.map +1 -0
  107. package/dist/quota.d.ts +251 -0
  108. package/dist/quota.d.ts.map +1 -0
  109. package/dist/quota.js +46 -0
  110. package/dist/quota.js.map +1 -0
  111. package/dist/raw.d.ts +195 -0
  112. package/dist/raw.d.ts.map +1 -0
  113. package/dist/raw.js +58 -0
  114. package/dist/raw.js.map +1 -0
  115. package/dist/recovery.d.ts +515 -0
  116. package/dist/recovery.d.ts.map +1 -0
  117. package/dist/recovery.js +93 -0
  118. package/dist/recovery.js.map +1 -0
  119. package/dist/request-requirements.d.ts +36 -0
  120. package/dist/request-requirements.d.ts.map +1 -0
  121. package/dist/request-requirements.js +26 -0
  122. package/dist/request-requirements.js.map +1 -0
  123. package/dist/review.d.ts +26 -26
  124. package/dist/review.d.ts.map +1 -1
  125. package/dist/review.js +50 -10
  126. package/dist/review.js.map +1 -1
  127. package/dist/route.d.ts +10 -10
  128. package/dist/route.d.ts.map +1 -1
  129. package/dist/route.js +19 -4
  130. package/dist/route.js.map +1 -1
  131. package/dist/setup.d.ts +9766 -0
  132. package/dist/setup.d.ts.map +1 -0
  133. package/dist/setup.js +450 -0
  134. package/dist/setup.js.map +1 -0
  135. package/dist/spec.d.ts +174 -57
  136. package/dist/spec.d.ts.map +1 -1
  137. package/dist/spec.js +69 -16
  138. package/dist/spec.js.map +1 -1
  139. package/dist/surface-run-controls.d.ts.map +1 -1
  140. package/dist/surface-run-controls.js +25 -21
  141. package/dist/surface-run-controls.js.map +1 -1
  142. package/dist/task.d.ts +1560 -58
  143. package/dist/task.d.ts.map +1 -1
  144. package/dist/task.js +97 -18
  145. package/dist/task.js.map +1 -1
  146. package/dist/telemetry.d.ts +233 -60
  147. package/dist/telemetry.d.ts.map +1 -1
  148. package/dist/telemetry.js +97 -15
  149. package/dist/telemetry.js.map +1 -1
  150. package/dist/thread.d.ts +68 -41
  151. package/dist/thread.d.ts.map +1 -1
  152. package/dist/thread.js +45 -11
  153. package/dist/thread.js.map +1 -1
  154. package/dist/workproduct.d.ts +3 -3
  155. package/dist/workproduct.d.ts.map +1 -1
  156. package/dist/workproduct.js.map +1 -1
  157. package/dist/workspace.d.ts +1 -1
  158. package/dist/workspace.d.ts.map +1 -1
  159. package/dist/workspace.js +12 -3
  160. package/dist/workspace.js.map +1 -1
  161. package/generated/AgentCapabilityCatalog.schema.json +53 -11
  162. package/generated/BudgetLease.schema.json +55 -6
  163. package/generated/BudgetObservation.schema.json +28 -7
  164. package/generated/ConformanceReport.schema.json +49 -0
  165. package/generated/ControlApplyCheckResponse.schema.json +34 -0
  166. package/generated/ControlArtifactListResponse.schema.json +57 -0
  167. package/generated/ControlAuthReadinessRefreshRequest.schema.json +38 -0
  168. package/generated/ControlAuthReadinessRefreshResponse.schema.json +85 -0
  169. package/generated/ControlDeliveryResponse.schema.json +136 -0
  170. package/generated/ControlHandshakeRequest.schema.json +26 -0
  171. package/generated/ControlHandshakeResponse.schema.json +30 -0
  172. package/generated/ControlHarnessListResponse.schema.json +103 -12
  173. package/generated/ControlHarnessSettingsPatch.schema.json +0 -12
  174. package/generated/ControlJournalEvent.schema.json +42 -0
  175. package/generated/ControlJournalExportReceipt.schema.json +49 -0
  176. package/generated/ControlJournalInspection.schema.json +149 -0
  177. package/generated/ControlJournalQuarantineReceipt.schema.json +55 -0
  178. package/generated/ControlJournalQuarantineRequest.schema.json +24 -0
  179. package/generated/ControlJournalValidation.schema.json +181 -0
  180. package/generated/ControlOperationCatalog.schema.json +128 -0
  181. package/generated/ControlOperationDescriptor.schema.json +110 -0
  182. package/generated/ControlProblem.schema.json +59 -0
  183. package/generated/ControlProject.schema.json +42 -0
  184. package/generated/ControlProjectListResponse.schema.json +54 -0
  185. package/generated/ControlProjectRegisterRequest.schema.json +19 -0
  186. package/generated/ControlProjectRelinkRequest.schema.json +19 -0
  187. package/generated/ControlQueuedRunInfo.schema.json +4 -2
  188. package/generated/ControlQuotaResponse.schema.json +176 -0
  189. package/generated/ControlResource.schema.json +59 -0
  190. package/generated/ControlRunAgainDraft.schema.json +499 -0
  191. package/generated/ControlRunDetail.schema.json +197 -30
  192. package/generated/ControlRunListResponse.schema.json +797 -0
  193. package/generated/ControlRunRetryResponse.schema.json +54 -0
  194. package/generated/ControlRunStartRequest.schema.json +83 -55
  195. package/generated/ControlRunStartResponse.schema.json +78 -0
  196. package/generated/ControlRunSummary.schema.json +140 -20
  197. package/generated/ControlSecretListResponse.schema.json +8 -14
  198. package/generated/ControlSecretMutationResponse.schema.json +32 -0
  199. package/generated/ControlSecretSetRequest.schema.json +27 -0
  200. package/generated/ControlSettingsSnapshot.schema.json +118 -44
  201. package/generated/ControlSettingsUpdateRequest.schema.json +110 -40
  202. package/generated/ControlSetupJob.schema.json +763 -65
  203. package/generated/ControlSetupJobCreateRequest.schema.json +11 -13
  204. package/generated/ControlSetupJobEvent.schema.json +861 -5
  205. package/generated/ControlSetupJobListFilter.schema.json +35 -0
  206. package/generated/ControlSetupJobListResponse.schema.json +763 -65
  207. package/generated/ControlSetupJobSnapshot.schema.json +870 -0
  208. package/generated/ControlSpecAnswersRequest.schema.json +74 -0
  209. package/generated/ControlSpecQuestionsRequest.schema.json +128 -2
  210. package/generated/ControlSpecSession.schema.json +249 -0
  211. package/generated/ControlSpecSessionListResponse.schema.json +261 -0
  212. package/generated/ControlThread.schema.json +20 -2
  213. package/generated/ControlThreadApplyResponse.schema.json +139 -0
  214. package/generated/ControlThreadDetail.schema.json +32 -4
  215. package/generated/ControlThreadListResponse.schema.json +20 -2
  216. package/generated/ControlThreadTurnRequest.schema.json +373 -0
  217. package/generated/ControlThreadTurnResponse.schema.json +73 -0
  218. package/generated/ControlThreadUpdateRequest.schema.json +1 -1
  219. package/generated/ControlTrustListResponse.schema.json +6 -0
  220. package/generated/ControlTrustState.schema.json +6 -0
  221. package/generated/ControlTrustUpdateRequest.schema.json +65 -3
  222. package/generated/ControlUploadCreateRequest.schema.json +37 -0
  223. package/generated/ControlUploadFinalizeRequest.schema.json +17 -0
  224. package/generated/ControlUploadStatus.schema.json +40 -0
  225. package/generated/DecisionRecord.schema.json +6 -3
  226. package/generated/GlobalConfig.schema.json +105 -58
  227. package/generated/HarnessEvent.schema.json +201 -10
  228. package/generated/HarnessManifest.schema.json +63 -12
  229. package/generated/HarnessStatusDto.schema.json +103 -12
  230. package/generated/OrchestrateContract.schema.json +32 -6
  231. package/generated/OrchestratePlan.schema.json +20 -0
  232. package/generated/OrchestratePlanProgress.schema.json +61 -0
  233. package/generated/PaidBudget.schema.json +42 -0
  234. package/generated/Project.schema.json +45 -0
  235. package/generated/ProjectConfig.schema.json +45 -18
  236. package/generated/RawContextPacket.schema.json +184 -0
  237. package/generated/RawGitPatchEnvelope.schema.json +70 -0
  238. package/generated/RunTelemetry.schema.json +80 -0
  239. package/generated/SecretMetadata.schema.json +4 -7
  240. package/generated/SpecPack.schema.json +118 -7
  241. package/generated/TaskContract.schema.json +159 -26
  242. package/generated/TestCommandInvocation.schema.json +45 -0
  243. package/generated/Thread.schema.json +62 -6
  244. package/generated/ThreadTurn.schema.json +24 -11
  245. package/generated/TrustConfig.schema.json +77 -0
  246. package/package.json +1 -1
  247. package/generated/ControlSetupJobConfirmRequest.schema.json +0 -18
  248. package/generated/ControlSpecFreezeRequest.schema.json +0 -83
@@ -10,22 +10,6 @@
10
10
  "default": 1,
11
11
  "description": "Config format version."
12
12
  },
13
- "default_portfolio": {
14
- "type": "string",
15
- "enum": [
16
- "daily-rich",
17
- "balanced",
18
- "cheapest",
19
- "strongest",
20
- "burn",
21
- "subscription-first",
22
- "api-overflow",
23
- "conserve-claude",
24
- "conserve-codex"
25
- ],
26
- "description": "Budget portfolio used when a run does not specify one.",
27
- "default": "subscription-first"
28
- },
29
13
  "interaction_timeout_ms": {
30
14
  "type": "integer",
31
15
  "exclusiveMinimum": 0,
@@ -79,27 +63,85 @@
79
63
  "description": "Preferred auth route: subscription (native/OAuth session), api_key (a stored API key), or auto (engine picks subscription-first with policy fallback). A preference, not a secret.",
80
64
  "default": "auto"
81
65
  },
82
- "quality_priors": {
66
+ "goal": {
67
+ "type": "string",
68
+ "enum": [
69
+ "auto",
70
+ "quality",
71
+ "economy"
72
+ ],
73
+ "description": "Routing objective: pace expiring quota, choose the highest declared quality tier, or minimize incremental paid spend.",
74
+ "default": "auto"
75
+ },
76
+ "paid_fallback": {
77
+ "type": "string",
78
+ "enum": [
79
+ "never",
80
+ "when_unavailable",
81
+ "allowed_within_cap"
82
+ ],
83
+ "description": "When a route with incremental paid spend may be used.",
84
+ "default": "when_unavailable"
85
+ },
86
+ "quality_tiers": {
83
87
  "type": "object",
84
88
  "additionalProperties": {
85
- "type": "number",
86
- "minimum": 0,
87
- "maximum": 1
89
+ "type": "array",
90
+ "items": {
91
+ "type": "array",
92
+ "items": {
93
+ "type": "object",
94
+ "properties": {
95
+ "harness": {
96
+ "type": "string",
97
+ "minLength": 1,
98
+ "description": "Non-empty identifier string."
99
+ },
100
+ "model": {
101
+ "type": "string",
102
+ "minLength": 1
103
+ },
104
+ "effort": {
105
+ "type": "string",
106
+ "enum": [
107
+ "low",
108
+ "medium",
109
+ "high",
110
+ "xhigh",
111
+ "max"
112
+ ],
113
+ "description": "Cross-harness reasoning-effort level, weakest to strongest; adapters declare the subset they support and a shared normalizer clamps requests onto the nearest supported level."
114
+ }
115
+ },
116
+ "required": [
117
+ "harness",
118
+ "model",
119
+ "effort"
120
+ ],
121
+ "additionalProperties": false,
122
+ "description": "An exact harness, model, and effort route declared by the user."
123
+ },
124
+ "minItems": 1,
125
+ "description": "A group of comparable exact routes at one user-declared quality level."
126
+ }
88
127
  },
89
128
  "propertyNames": {
90
129
  "enum": [
91
- "openai",
92
- "anthropic",
93
- "google",
94
- "cursor",
95
- "opencode",
96
- "xai",
97
- "local",
98
- "unknown"
130
+ "plan",
131
+ "spec",
132
+ "implement",
133
+ "create_from_scratch",
134
+ "repair",
135
+ "review",
136
+ "verify",
137
+ "synthesize",
138
+ "explain",
139
+ "audit",
140
+ "orchestrate"
99
141
  ]
100
142
  },
101
143
  "default": {},
102
- "description": "Operator-tunable per-provider-family quality priors (0..1) feeding the router; unset families ride the neutral 0.5."
144
+ "description": "Per-intent quality tiers ordered highest to lowest; no provider or benchmark priors are inferred."
103
145
  }
104
146
  },
105
147
  "additionalProperties": false,
@@ -109,18 +151,44 @@
109
151
  "budget": {
110
152
  "type": "object",
111
153
  "properties": {
112
- "max_usd_per_run": {
154
+ "paid_budget_per_run": {
113
155
  "anyOf": [
114
156
  {
115
- "type": "number",
116
- "minimum": 0
157
+ "type": "object",
158
+ "properties": {
159
+ "kind": {
160
+ "type": "string",
161
+ "const": "unlimited"
162
+ }
163
+ },
164
+ "required": [
165
+ "kind"
166
+ ],
167
+ "additionalProperties": false
117
168
  },
118
169
  {
119
- "type": "null"
170
+ "type": "object",
171
+ "properties": {
172
+ "kind": {
173
+ "type": "string",
174
+ "const": "finite"
175
+ },
176
+ "maxUsd": {
177
+ "type": "number",
178
+ "minimum": 0
179
+ }
180
+ },
181
+ "required": [
182
+ "kind",
183
+ "maxUsd"
184
+ ],
185
+ "additionalProperties": false
120
186
  }
121
187
  ],
122
- "default": null,
123
- "description": "Global USD cap per run; null = no cap."
188
+ "description": "Incremental-cash budget: explicitly unlimited or a finite non-negative USD cap.",
189
+ "default": {
190
+ "kind": "unlimited"
191
+ }
124
192
  },
125
193
  "estimate_usd_floor": {
126
194
  "type": "number",
@@ -201,15 +269,7 @@
201
269
  "effort": {
202
270
  "anyOf": [
203
271
  {
204
- "type": "string",
205
- "enum": [
206
- "low",
207
- "medium",
208
- "high",
209
- "xhigh",
210
- "max"
211
- ],
212
- "description": "Cross-harness reasoning-effort level, weakest to strongest; adapters declare the subset they support and a shared normalizer clamps requests onto the nearest supported level."
272
+ "$ref": "#/definitions/GlobalConfig/properties/routing/properties/quality_tiers/additionalProperties/items/items/properties/effort"
213
273
  },
214
274
  {
215
275
  "type": "null"
@@ -244,19 +304,6 @@
244
304
  "default": null,
245
305
  "description": "Default max convergence rounds; null = engine default."
246
306
  },
247
- "max_usd": {
248
- "anyOf": [
249
- {
250
- "type": "number",
251
- "minimum": 0
252
- },
253
- {
254
- "type": "null"
255
- }
256
- ],
257
- "default": null,
258
- "description": "Per-harness USD cap; null = no cap."
259
- },
260
307
  "tools_allow": {
261
308
  "type": "array",
262
309
  "items": {
@@ -306,7 +353,7 @@
306
353
  }
307
354
  },
308
355
  "additionalProperties": false,
309
- "description": "Global user config (~/.claudexor/config.yaml): portfolio, routing, budget, runtime, and per-harness settings."
356
+ "description": "Claudexor v2 global user config (~/.claudexor/v2/config.yaml): routing, budget, runtime, and per-harness settings."
310
357
  }
311
358
  },
312
359
  "$schema": "http://json-schema.org/draft-07/schema#"
@@ -14,6 +14,7 @@
14
14
  "tool_result",
15
15
  "interaction_requested",
16
16
  "file_change",
17
+ "patch_produced",
17
18
  "usage",
18
19
  "error",
19
20
  "completed"
@@ -178,6 +179,88 @@
178
179
  "additionalProperties": false,
179
180
  "description": "Set on interaction_requested events."
180
181
  },
182
+ "patch_envelope": {
183
+ "type": "object",
184
+ "properties": {
185
+ "schema_version": {
186
+ "type": "number",
187
+ "const": 1
188
+ },
189
+ "context_packet_hash": {
190
+ "type": "string",
191
+ "minLength": 1,
192
+ "description": "Content hash in algo:hex form, e.g. \"sha256:abcd...\"."
193
+ },
194
+ "base_tree_sha": {
195
+ "type": "string",
196
+ "minLength": 1
197
+ },
198
+ "patch": {
199
+ "type": "string",
200
+ "minLength": 1
201
+ },
202
+ "patch_hash": {
203
+ "$ref": "#/definitions/HarnessEvent/properties/patch_envelope/properties/context_packet_hash"
204
+ },
205
+ "touched_paths": {
206
+ "type": "array",
207
+ "items": {
208
+ "type": "object",
209
+ "properties": {
210
+ "path": {
211
+ "type": "string",
212
+ "minLength": 1
213
+ },
214
+ "expected_blob_oid": {
215
+ "anyOf": [
216
+ {
217
+ "type": "string",
218
+ "minLength": 1
219
+ },
220
+ {
221
+ "type": "null"
222
+ }
223
+ ],
224
+ "description": "Base-tree blob oid, or null only when the path is absent in the base tree."
225
+ }
226
+ },
227
+ "required": [
228
+ "path",
229
+ "expected_blob_oid"
230
+ ],
231
+ "additionalProperties": false
232
+ },
233
+ "minItems": 1
234
+ }
235
+ },
236
+ "required": [
237
+ "schema_version",
238
+ "context_packet_hash",
239
+ "base_tree_sha",
240
+ "patch",
241
+ "patch_hash",
242
+ "touched_paths"
243
+ ],
244
+ "additionalProperties": false,
245
+ "description": "Typed hash-bound patch produced by a git-patch-envelope harness."
246
+ },
247
+ "refusal_code": {
248
+ "type": "string",
249
+ "enum": [
250
+ "raw_patch_requires_isolation",
251
+ "raw_patch_missing_evidence",
252
+ "raw_patch_digest_mismatch",
253
+ "raw_patch_base_mismatch",
254
+ "raw_patch_path_traversal",
255
+ "raw_patch_outside_scope",
256
+ "raw_patch_stale_preimage",
257
+ "raw_patch_binary_unsupported",
258
+ "raw_patch_sensitive_content",
259
+ "raw_patch_truncated",
260
+ "raw_patch_apply_failed"
261
+ ],
262
+ "description": "Typed refusal code for a rejected raw patch contract."
263
+ },
181
264
  "usage": {
182
265
  "type": "object",
183
266
  "properties": {
@@ -213,29 +296,133 @@
213
296
  "type": "string",
214
297
  "description": "Model the harness actually reported using."
215
298
  },
299
+ "credential_route": {
300
+ "type": "string",
301
+ "enum": [
302
+ "vendor_native",
303
+ "managed_api_key",
304
+ "local"
305
+ ],
306
+ "description": "Concrete credential route selected before spawn; first-class route evidence, never inferred from free-form payload text."
307
+ },
308
+ "credential_source": {
309
+ "type": "string",
310
+ "enum": [
311
+ "native_session",
312
+ "oauth_token_env",
313
+ "api_key_env",
314
+ "api_key_flag",
315
+ "provider_auth_file",
316
+ "none"
317
+ ],
318
+ "description": "Concrete credential source selected before spawn; exact native subscription requires native_session, never an OAuth token or API key."
319
+ },
216
320
  "quota": {
217
321
  "type": "object",
218
322
  "properties": {
219
- "used_percent": {
220
- "type": "number",
221
- "minimum": 0,
222
- "maximum": 100,
223
- "description": "Consumed share of the binding rate window, 0-100."
323
+ "source": {
324
+ "type": "string",
325
+ "enum": [
326
+ "codex_app_server",
327
+ "codex_rollout",
328
+ "claude_statusline",
329
+ "claude_api_retry"
330
+ ],
331
+ "description": "Vendor-owned machine-readable source of a quota snapshot."
224
332
  },
225
- "resets_at": {
333
+ "plan_label": {
226
334
  "type": [
227
335
  "string",
228
336
  "null"
229
337
  ],
230
- "default": null,
231
- "description": "Native reset moment for the window, when the CLI reports one."
338
+ "default": null
339
+ },
340
+ "subject_id": {
341
+ "type": [
342
+ "string",
343
+ "null"
344
+ ],
345
+ "default": null
346
+ },
347
+ "constraints": {
348
+ "type": "array",
349
+ "items": {
350
+ "type": "object",
351
+ "properties": {
352
+ "id": {
353
+ "type": "string",
354
+ "minLength": 1,
355
+ "description": "Non-empty identifier string."
356
+ },
357
+ "label": {
358
+ "type": "string",
359
+ "minLength": 1
360
+ },
361
+ "used_ratio": {
362
+ "anyOf": [
363
+ {
364
+ "type": "number",
365
+ "minimum": 0,
366
+ "maximum": 1
367
+ },
368
+ {
369
+ "type": "null"
370
+ }
371
+ ]
372
+ },
373
+ "window_seconds": {
374
+ "anyOf": [
375
+ {
376
+ "type": "number",
377
+ "exclusiveMinimum": 0
378
+ },
379
+ {
380
+ "type": "null"
381
+ }
382
+ ]
383
+ },
384
+ "resets_at": {
385
+ "anyOf": [
386
+ {
387
+ "type": "string",
388
+ "format": "date-time"
389
+ },
390
+ {
391
+ "type": "null"
392
+ }
393
+ ]
394
+ },
395
+ "cooldown_until": {
396
+ "anyOf": [
397
+ {
398
+ "type": "string",
399
+ "format": "date-time"
400
+ },
401
+ {
402
+ "type": "null"
403
+ }
404
+ ],
405
+ "default": null
406
+ }
407
+ },
408
+ "required": [
409
+ "id",
410
+ "label",
411
+ "used_ratio",
412
+ "window_seconds",
413
+ "resets_at"
414
+ ],
415
+ "additionalProperties": false,
416
+ "description": "One independent vendor quota window; null usage stays unknown."
417
+ }
232
418
  }
233
419
  },
234
420
  "required": [
235
- "used_percent"
421
+ "source",
422
+ "constraints"
236
423
  ],
237
424
  "additionalProperties": false,
238
- "description": "Typed quota/usage-window signal from the harness CLI's own native machine-readable surface, never scraped from prose."
425
+ "description": "All quota windows from a vendor-owned machine-readable source; never scraped from prose or collapsed into a fake aggregate."
239
426
  },
240
427
  "plan_progress": {
241
428
  "type": "object",
@@ -341,6 +528,10 @@
341
528
  "type": "string",
342
529
  "description": "Error text for error events."
343
530
  },
531
+ "aborted": {
532
+ "type": "boolean",
533
+ "description": "Typed terminal cancellation marker, set on completed events when the run was aborted."
534
+ },
344
535
  "payload": {
345
536
  "type": "object",
346
537
  "additionalProperties": {},
@@ -57,12 +57,13 @@
57
57
  "type": "string",
58
58
  "enum": [
59
59
  "native_session",
60
+ "oauth_token_env",
60
61
  "api_key_env",
61
62
  "api_key_flag",
62
63
  "provider_auth_file",
63
64
  "none"
64
65
  ],
65
- "description": "Where a harness's credentials can come from: a native login session, an API key via env var or CLI flag, a provider auth file, or none."
66
+ "description": "Concrete credential source used or probed by a harness."
66
67
  },
67
68
  "default": [],
68
69
  "description": "Auth sources this harness supports."
@@ -175,21 +176,62 @@
175
176
  "default": {},
176
177
  "description": "Declared isolation containment facts for a harness."
177
178
  },
178
- "image_input": {
179
- "type": "string",
180
- "enum": [
181
- "file_path",
182
- "base64_stream",
183
- "base64_inline",
184
- "none"
185
- ],
186
- "description": "How a harness accepts image input: file_path (CLI file argument), base64_stream (base64 image block on the stream), base64_inline (data-URL in the request), or none (no vision input on this route).",
187
- "default": "none"
179
+ "attachment_inputs": {
180
+ "type": "array",
181
+ "items": {
182
+ "type": "object",
183
+ "properties": {
184
+ "kind": {
185
+ "type": "string",
186
+ "enum": [
187
+ "image",
188
+ "file"
189
+ ],
190
+ "description": "Kind of attached resource: image input or generic file bytes."
191
+ },
192
+ "mime_types": {
193
+ "type": "array",
194
+ "items": {
195
+ "type": "string",
196
+ "minLength": 1
197
+ },
198
+ "minItems": 1
199
+ },
200
+ "max_bytes": {
201
+ "type": "integer",
202
+ "exclusiveMinimum": 0
203
+ },
204
+ "max_count": {
205
+ "type": "integer",
206
+ "exclusiveMinimum": 0
207
+ },
208
+ "transport": {
209
+ "type": "string",
210
+ "enum": [
211
+ "file_path",
212
+ "base64_stream",
213
+ "base64_inline",
214
+ "text_inline"
215
+ ],
216
+ "description": "Native adapter transport used for one supported attachment class."
217
+ }
218
+ },
219
+ "required": [
220
+ "kind",
221
+ "mime_types",
222
+ "max_bytes",
223
+ "max_count",
224
+ "transport"
225
+ ],
226
+ "additionalProperties": false,
227
+ "description": "Finite MIME, size, count and transport limits declared by one adapter."
228
+ },
229
+ "default": []
188
230
  }
189
231
  },
190
232
  "additionalProperties": false,
191
233
  "default": {},
192
- "description": "Structured per-harness facts the engine consumes: auth routing, isolation containment, readonly mechanism, and vision input."
234
+ "description": "Structured per-harness facts the engine consumes: auth routing, isolation containment, readonly mechanism, and finite attachment inputs."
193
235
  },
194
236
  "capabilities": {
195
237
  "type": "object",
@@ -204,6 +246,15 @@
204
246
  "default": false,
205
247
  "description": "The harness can implement code changes (implement intent)."
206
248
  },
249
+ "implementation_transport": {
250
+ "type": "string",
251
+ "enum": [
252
+ "workspace",
253
+ "git_patch_envelope"
254
+ ],
255
+ "description": "Typed producer/consumer transport used when implement=true.",
256
+ "default": "workspace"
257
+ },
207
258
  "create_from_scratch": {
208
259
  "type": "boolean",
209
260
  "default": false,