@claudexor/schema 1.0.1 → 2.1.1

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 (278) hide show
  1. package/dist/agent-capabilities.d.ts +102 -30
  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 +117 -52
  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 +1444 -0
  13. package/dist/auth.d.ts.map +1 -0
  14. package/dist/auth.js +371 -0
  15. package/dist/auth.js.map +1 -0
  16. package/dist/budget.d.ts +147 -18
  17. package/dist/budget.d.ts.map +1 -1
  18. package/dist/budget.js +80 -22
  19. package/dist/budget.js.map +1 -1
  20. package/dist/config.d.ts +829 -135
  21. package/dist/config.d.ts.map +1 -1
  22. package/dist/config.js +195 -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-gc.d.ts +185 -0
  29. package/dist/control-gc.d.ts.map +1 -0
  30. package/dist/control-gc.js +81 -0
  31. package/dist/control-gc.js.map +1 -0
  32. package/dist/control-operation-responses.d.ts +1298 -0
  33. package/dist/control-operation-responses.d.ts.map +1 -0
  34. package/dist/control-operation-responses.js +35 -0
  35. package/dist/control-operation-responses.js.map +1 -0
  36. package/dist/control-run-detail.d.ts +556 -247
  37. package/dist/control-run-detail.d.ts.map +1 -1
  38. package/dist/control-run-detail.js +72 -17
  39. package/dist/control-run-detail.js.map +1 -1
  40. package/dist/control-run-retry.d.ts +88 -0
  41. package/dist/control-run-retry.d.ts.map +1 -0
  42. package/dist/control-run-retry.js +40 -0
  43. package/dist/control-run-retry.js.map +1 -0
  44. package/dist/control-run-scope.d.ts +25 -0
  45. package/dist/control-run-scope.d.ts.map +1 -0
  46. package/dist/control-run-scope.js +22 -0
  47. package/dist/control-run-scope.js.map +1 -0
  48. package/dist/control-secret.d.ts +90 -0
  49. package/dist/control-secret.d.ts.map +1 -0
  50. package/dist/control-secret.js +35 -0
  51. package/dist/control-secret.js.map +1 -0
  52. package/dist/control-spec.d.ts +592 -0
  53. package/dist/control-spec.d.ts.map +1 -0
  54. package/dist/control-spec.js +85 -0
  55. package/dist/control-spec.js.map +1 -0
  56. package/dist/control-thread-apply.d.ts +175 -0
  57. package/dist/control-thread-apply.d.ts.map +1 -0
  58. package/dist/control-thread-apply.js +31 -0
  59. package/dist/control-thread-apply.js.map +1 -0
  60. package/dist/control-trust.d.ts +74 -10
  61. package/dist/control-trust.d.ts.map +1 -1
  62. package/dist/control-trust.js +31 -11
  63. package/dist/control-trust.js.map +1 -1
  64. package/dist/control.d.ts +1688 -1334
  65. package/dist/control.d.ts.map +1 -1
  66. package/dist/control.js +592 -333
  67. package/dist/control.js.map +1 -1
  68. package/dist/credential-profile.d.ts +454 -0
  69. package/dist/credential-profile.d.ts.map +1 -0
  70. package/dist/credential-profile.js +140 -0
  71. package/dist/credential-profile.js.map +1 -0
  72. package/dist/decision.d.ts +10 -10
  73. package/dist/decision.d.ts.map +1 -1
  74. package/dist/decision.js +62 -15
  75. package/dist/decision.js.map +1 -1
  76. package/dist/delivery.d.ts +99 -0
  77. package/dist/delivery.d.ts.map +1 -0
  78. package/dist/delivery.js +19 -0
  79. package/dist/delivery.js.map +1 -0
  80. package/dist/events.d.ts +41 -4
  81. package/dist/events.d.ts.map +1 -1
  82. package/dist/events.js +47 -4
  83. package/dist/events.js.map +1 -1
  84. package/dist/gate.d.ts +5 -5
  85. package/dist/gate.d.ts.map +1 -1
  86. package/dist/gate.js +25 -5
  87. package/dist/gate.js.map +1 -1
  88. package/dist/harness.d.ts +775 -237
  89. package/dist/harness.d.ts.map +1 -1
  90. package/dist/harness.js +314 -111
  91. package/dist/harness.js.map +1 -1
  92. package/dist/index.d.ts +19 -0
  93. package/dist/index.d.ts.map +1 -1
  94. package/dist/index.js +19 -0
  95. package/dist/index.js.map +1 -1
  96. package/dist/operation.d.ts +185 -0
  97. package/dist/operation.d.ts.map +1 -0
  98. package/dist/operation.js +50 -0
  99. package/dist/operation.js.map +1 -0
  100. package/dist/orchestrate.d.ts +150 -22
  101. package/dist/orchestrate.d.ts.map +1 -1
  102. package/dist/orchestrate.js +117 -7
  103. package/dist/orchestrate.js.map +1 -1
  104. package/dist/primitives.d.ts.map +1 -1
  105. package/dist/primitives.js +4 -1
  106. package/dist/primitives.js.map +1 -1
  107. package/dist/problem.d.ts +29 -0
  108. package/dist/problem.d.ts.map +1 -0
  109. package/dist/problem.js +17 -0
  110. package/dist/problem.js.map +1 -0
  111. package/dist/project.d.ts +97 -0
  112. package/dist/project.d.ts.map +1 -0
  113. package/dist/project.js +27 -0
  114. package/dist/project.js.map +1 -0
  115. package/dist/quota.d.ts +269 -0
  116. package/dist/quota.d.ts.map +1 -0
  117. package/dist/quota.js +58 -0
  118. package/dist/quota.js.map +1 -0
  119. package/dist/raw.d.ts +195 -0
  120. package/dist/raw.d.ts.map +1 -0
  121. package/dist/raw.js +58 -0
  122. package/dist/raw.js.map +1 -0
  123. package/dist/readiness.d.ts +596 -0
  124. package/dist/readiness.d.ts.map +1 -0
  125. package/dist/readiness.js +87 -0
  126. package/dist/readiness.js.map +1 -0
  127. package/dist/recovery.d.ts +515 -0
  128. package/dist/recovery.d.ts.map +1 -0
  129. package/dist/recovery.js +93 -0
  130. package/dist/recovery.js.map +1 -0
  131. package/dist/request-requirements.d.ts +36 -0
  132. package/dist/request-requirements.d.ts.map +1 -0
  133. package/dist/request-requirements.js +29 -0
  134. package/dist/request-requirements.js.map +1 -0
  135. package/dist/review.d.ts +26 -26
  136. package/dist/review.d.ts.map +1 -1
  137. package/dist/review.js +50 -10
  138. package/dist/review.js.map +1 -1
  139. package/dist/route.d.ts +13 -13
  140. package/dist/route.d.ts.map +1 -1
  141. package/dist/route.js +19 -4
  142. package/dist/route.js.map +1 -1
  143. package/dist/setup.d.ts +9811 -0
  144. package/dist/setup.d.ts.map +1 -0
  145. package/dist/setup.js +475 -0
  146. package/dist/setup.js.map +1 -0
  147. package/dist/spec.d.ts +178 -61
  148. package/dist/spec.d.ts.map +1 -1
  149. package/dist/spec.js +69 -16
  150. package/dist/spec.js.map +1 -1
  151. package/dist/surface-run-controls.d.ts.map +1 -1
  152. package/dist/surface-run-controls.js +25 -21
  153. package/dist/surface-run-controls.js.map +1 -1
  154. package/dist/task.d.ts +1657 -60
  155. package/dist/task.d.ts.map +1 -1
  156. package/dist/task.js +144 -18
  157. package/dist/task.js.map +1 -1
  158. package/dist/telemetry.d.ts +487 -72
  159. package/dist/telemetry.d.ts.map +1 -1
  160. package/dist/telemetry.js +194 -16
  161. package/dist/telemetry.js.map +1 -1
  162. package/dist/thread.d.ts +89 -51
  163. package/dist/thread.d.ts.map +1 -1
  164. package/dist/thread.js +56 -11
  165. package/dist/thread.js.map +1 -1
  166. package/dist/tool-ref.d.ts +45 -0
  167. package/dist/tool-ref.d.ts.map +1 -0
  168. package/dist/tool-ref.js +45 -0
  169. package/dist/tool-ref.js.map +1 -0
  170. package/dist/workproduct.d.ts +3 -3
  171. package/dist/workproduct.d.ts.map +1 -1
  172. package/dist/workproduct.js.map +1 -1
  173. package/dist/workspace.d.ts +3 -3
  174. package/dist/workspace.d.ts.map +1 -1
  175. package/dist/workspace.js +12 -3
  176. package/dist/workspace.js.map +1 -1
  177. package/generated/AgentCapabilityCatalog.schema.json +53 -11
  178. package/generated/BudgetLease.schema.json +55 -6
  179. package/generated/BudgetObservation.schema.json +44 -7
  180. package/generated/ConformanceReport.schema.json +49 -0
  181. package/generated/ControlApplyCheckResponse.schema.json +34 -0
  182. package/generated/ControlArtifactListResponse.schema.json +57 -0
  183. package/generated/ControlAuthReadinessRefreshRequest.schema.json +38 -0
  184. package/generated/ControlAuthReadinessRefreshResponse.schema.json +85 -0
  185. package/generated/ControlCredentialProfileCreateRequest.schema.json +32 -0
  186. package/generated/ControlCredentialProfileCreateResponse.schema.json +142 -0
  187. package/generated/ControlCredentialProfileDeleteResponse.schema.json +107 -0
  188. package/generated/ControlCredentialProfilesResponse.schema.json +155 -0
  189. package/generated/ControlDeliveryResponse.schema.json +136 -0
  190. package/generated/ControlGcReceipt.schema.json +170 -0
  191. package/generated/ControlGcRequest.schema.json +18 -0
  192. package/generated/ControlHandshakeRequest.schema.json +26 -0
  193. package/generated/ControlHandshakeResponse.schema.json +30 -0
  194. package/generated/ControlHarnessListResponse.schema.json +198 -14
  195. package/generated/ControlHarnessModelsResponse.schema.json +19 -0
  196. package/generated/ControlHarnessSettingsPatch.schema.json +9 -12
  197. package/generated/ControlJournalEvent.schema.json +42 -0
  198. package/generated/ControlJournalExportReceipt.schema.json +49 -0
  199. package/generated/ControlJournalInspection.schema.json +149 -0
  200. package/generated/ControlJournalQuarantineReceipt.schema.json +55 -0
  201. package/generated/ControlJournalQuarantineRequest.schema.json +24 -0
  202. package/generated/ControlJournalValidation.schema.json +181 -0
  203. package/generated/ControlOperationCatalog.schema.json +128 -0
  204. package/generated/ControlOperationDescriptor.schema.json +110 -0
  205. package/generated/ControlProblem.schema.json +59 -0
  206. package/generated/ControlProject.schema.json +42 -0
  207. package/generated/ControlProjectListResponse.schema.json +54 -0
  208. package/generated/ControlProjectRegisterRequest.schema.json +19 -0
  209. package/generated/ControlProjectRelinkRequest.schema.json +19 -0
  210. package/generated/ControlQueuedRunInfo.schema.json +4 -2
  211. package/generated/ControlQuotaResponse.schema.json +177 -0
  212. package/generated/ControlResource.schema.json +59 -0
  213. package/generated/ControlRunAgainDraft.schema.json +539 -0
  214. package/generated/ControlRunDetail.schema.json +373 -34
  215. package/generated/ControlRunListResponse.schema.json +968 -0
  216. package/generated/ControlRunRetryResponse.schema.json +54 -0
  217. package/generated/ControlRunStartRequest.schema.json +123 -55
  218. package/generated/ControlRunStartResponse.schema.json +78 -0
  219. package/generated/ControlRunSummary.schema.json +312 -21
  220. package/generated/ControlSecretListResponse.schema.json +8 -14
  221. package/generated/ControlSecretMutationResponse.schema.json +32 -0
  222. package/generated/ControlSecretSetRequest.schema.json +27 -0
  223. package/generated/ControlSettingsSnapshot.schema.json +128 -44
  224. package/generated/ControlSettingsUpdateRequest.schema.json +119 -40
  225. package/generated/ControlSetupJob.schema.json +770 -64
  226. package/generated/ControlSetupJobCreateRequest.schema.json +16 -13
  227. package/generated/ControlSetupJobEvent.schema.json +869 -5
  228. package/generated/ControlSetupJobListFilter.schema.json +35 -0
  229. package/generated/ControlSetupJobListResponse.schema.json +770 -64
  230. package/generated/ControlSetupJobSnapshot.schema.json +878 -0
  231. package/generated/ControlSpecAnswersRequest.schema.json +74 -0
  232. package/generated/ControlSpecQuestionsRequest.schema.json +128 -2
  233. package/generated/ControlSpecSession.schema.json +249 -0
  234. package/generated/ControlSpecSessionListResponse.schema.json +261 -0
  235. package/generated/ControlThread.schema.json +36 -6
  236. package/generated/ControlThreadApplyResponse.schema.json +139 -0
  237. package/generated/ControlThreadCreateRequest.schema.json +6 -2
  238. package/generated/ControlThreadDetail.schema.json +64 -12
  239. package/generated/ControlThreadListResponse.schema.json +36 -6
  240. package/generated/ControlThreadTurnRequest.schema.json +413 -0
  241. package/generated/ControlThreadTurnResponse.schema.json +73 -0
  242. package/generated/ControlThreadUpdateRequest.schema.json +12 -1
  243. package/generated/ControlTrustListResponse.schema.json +6 -0
  244. package/generated/ControlTrustState.schema.json +6 -0
  245. package/generated/ControlTrustUpdateRequest.schema.json +65 -3
  246. package/generated/ControlUploadCreateRequest.schema.json +37 -0
  247. package/generated/ControlUploadFinalizeRequest.schema.json +17 -0
  248. package/generated/ControlUploadStatus.schema.json +40 -0
  249. package/generated/CredentialProfile.schema.json +78 -0
  250. package/generated/CredentialProfileStatus.schema.json +61 -0
  251. package/generated/DecisionRecord.schema.json +6 -3
  252. package/generated/GlobalConfig.schema.json +238 -55
  253. package/generated/HarnessEvent.schema.json +259 -11
  254. package/generated/HarnessManifest.schema.json +96 -14
  255. package/generated/HarnessModel.schema.json +19 -0
  256. package/generated/HarnessStatusDto.schema.json +198 -14
  257. package/generated/OrchestrateContract.schema.json +32 -6
  258. package/generated/OrchestratePlan.schema.json +20 -0
  259. package/generated/OrchestratePlanProgress.schema.json +61 -0
  260. package/generated/PaidBudget.schema.json +42 -0
  261. package/generated/Project.schema.json +45 -0
  262. package/generated/ProjectConfig.schema.json +45 -18
  263. package/generated/RawContextPacket.schema.json +184 -0
  264. package/generated/RawGitPatchEnvelope.schema.json +70 -0
  265. package/generated/RunEvent.schema.json +3 -0
  266. package/generated/RunTelemetry.schema.json +280 -0
  267. package/generated/SecretMetadata.schema.json +4 -7
  268. package/generated/Session.schema.json +14 -0
  269. package/generated/SpecPack.schema.json +118 -7
  270. package/generated/TaskContract.schema.json +224 -30
  271. package/generated/TestCommandInvocation.schema.json +45 -0
  272. package/generated/Thread.schema.json +74 -6
  273. package/generated/ThreadHeadPing.schema.json +40 -0
  274. package/generated/ThreadTurn.schema.json +24 -11
  275. package/generated/TrustConfig.schema.json +77 -0
  276. package/package.json +3 -2
  277. package/generated/ControlSetupJobConfirmRequest.schema.json +0 -18
  278. 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",
@@ -180,6 +248,109 @@
180
248
  "default": {},
181
249
  "description": "Global runtime timeouts and retry policy."
182
250
  },
251
+ "retention": {
252
+ "type": "object",
253
+ "properties": {
254
+ "runs_max_age_days": {
255
+ "type": "integer",
256
+ "exclusiveMinimum": 0,
257
+ "default": 30,
258
+ "description": "Delete terminal, unreferenced run trees older than this many days."
259
+ },
260
+ "reviews_max_age_days": {
261
+ "type": "integer",
262
+ "exclusiveMinimum": 0,
263
+ "default": 14,
264
+ "description": "Delete standalone diff-review trees older than this many days."
265
+ },
266
+ "keep_last_runs_per_project": {
267
+ "type": "integer",
268
+ "minimum": 0,
269
+ "default": 20,
270
+ "description": "The newest N runs per project always survive, regardless of age."
271
+ }
272
+ },
273
+ "additionalProperties": false,
274
+ "default": {},
275
+ "description": "Disk retention policy for engine-owned runtime artifacts."
276
+ },
277
+ "credential_profiles": {
278
+ "type": "array",
279
+ "items": {
280
+ "type": "object",
281
+ "properties": {
282
+ "profile_id": {
283
+ "type": "string",
284
+ "minLength": 1,
285
+ "description": "Stable user-chosen profile identifier (unique per harness)."
286
+ },
287
+ "harness_id": {
288
+ "type": "string",
289
+ "minLength": 1,
290
+ "description": "Harness family this profile belongs to."
291
+ },
292
+ "display_name": {
293
+ "type": "string",
294
+ "minLength": 1,
295
+ "description": "Human label shown wherever the profile appears."
296
+ },
297
+ "credential_kind": {
298
+ "type": "string",
299
+ "enum": [
300
+ "config_dir_login",
301
+ "oauth_token",
302
+ "api_key"
303
+ ],
304
+ "description": "Credential transport a profile isolates: a scoped vendor config-dir login, a stored OAuth token, or a stored API key."
305
+ },
306
+ "isolation_locator": {
307
+ "type": [
308
+ "string",
309
+ "null"
310
+ ],
311
+ "default": null,
312
+ "description": "Canonical absolute config-dir path for config_dir_login profiles; null for secret-ref kinds."
313
+ },
314
+ "secret_ref": {
315
+ "type": [
316
+ "string",
317
+ "null"
318
+ ],
319
+ "default": null,
320
+ "description": "Namespaced secret-store name (e.g. claude_oauth:work) for oauth_token/api_key profiles; null for config_dir_login."
321
+ },
322
+ "enabled": {
323
+ "type": "boolean",
324
+ "default": true,
325
+ "description": "Disabled profiles are never routable."
326
+ },
327
+ "created_at": {
328
+ "anyOf": [
329
+ {
330
+ "type": "string",
331
+ "minLength": 1,
332
+ "description": "ISO-8601 timestamp string."
333
+ },
334
+ {
335
+ "type": "null"
336
+ }
337
+ ],
338
+ "description": "When the profile was registered; null for hand-written config entries.",
339
+ "default": null
340
+ }
341
+ },
342
+ "required": [
343
+ "profile_id",
344
+ "harness_id",
345
+ "display_name",
346
+ "credential_kind"
347
+ ],
348
+ "additionalProperties": false,
349
+ "description": "Durable non-secret registry entry for one credential identity of one harness; secret material lives in the vendor dir or the secret store, never here."
350
+ },
351
+ "default": [],
352
+ "description": "Durable non-secret credential-profile registry; secret material lives in the vendor dir or the secret store, never in config."
353
+ },
183
354
  "harnesses": {
184
355
  "type": "object",
185
356
  "additionalProperties": {
@@ -201,15 +372,7 @@
201
372
  "effort": {
202
373
  "anyOf": [
203
374
  {
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."
375
+ "$ref": "#/definitions/GlobalConfig/properties/routing/properties/quality_tiers/additionalProperties/items/items/properties/effort"
213
376
  },
214
377
  {
215
378
  "type": "null"
@@ -244,18 +407,38 @@
244
407
  "default": null,
245
408
  "description": "Default max convergence rounds; null = engine default."
246
409
  },
247
- "max_usd": {
248
- "anyOf": [
249
- {
250
- "type": "number",
251
- "minimum": 0
410
+ "profile_policy": {
411
+ "type": "object",
412
+ "properties": {
413
+ "limit_action": {
414
+ "type": "string",
415
+ "enum": [
416
+ "fail",
417
+ "ask",
418
+ "rotate"
419
+ ],
420
+ "default": "fail",
421
+ "description": "On a typed vendor limit: fail the attempt, surface a typed ask, or rotate to the next eligible profile."
252
422
  },
253
- {
254
- "type": "null"
423
+ "rotation_eligible": {
424
+ "type": "array",
425
+ "items": {
426
+ "type": "string"
427
+ },
428
+ "default": [],
429
+ "description": "Priority-ordered profile ids eligible for rotation; empty = every enabled profile of this harness in registry order."
430
+ },
431
+ "headroom_threshold": {
432
+ "type": "number",
433
+ "minimum": 0,
434
+ "maximum": 1,
435
+ "default": 0.9,
436
+ "description": "Preflight headroom bound: a selected profile whose active window is at/over this ratio triggers the limit action BEFORE spawn."
255
437
  }
256
- ],
257
- "default": null,
258
- "description": "Per-harness USD cap; null = no cap."
438
+ },
439
+ "additionalProperties": false,
440
+ "default": {},
441
+ "description": "Typed profile-selection policy for this harness (INV-135)."
259
442
  },
260
443
  "tools_allow": {
261
444
  "type": "array",
@@ -306,7 +489,7 @@
306
489
  }
307
490
  },
308
491
  "additionalProperties": false,
309
- "description": "Global user config (~/.claudexor/config.yaml): portfolio, routing, budget, runtime, and per-harness settings."
492
+ "description": "Claudexor v2 global user config (~/.claudexor/v2/config.yaml): routing, budget, runtime, and per-harness settings."
310
493
  }
311
494
  },
312
495
  "$schema": "http://json-schema.org/draft-07/schema#"
@@ -14,11 +14,13 @@
14
14
  "tool_result",
15
15
  "interaction_requested",
16
16
  "file_change",
17
+ "patch_produced",
17
18
  "usage",
18
19
  "error",
20
+ "status",
19
21
  "completed"
20
22
  ],
21
- "description": "Normalized event type covering session lifecycle, output, tool use, interaction, file changes, usage, and errors."
23
+ "description": "Normalized event type covering session lifecycle, output, tool use, interaction, file changes, usage, transient status, and errors."
22
24
  },
23
25
  "session_id": {
24
26
  "type": "string",
@@ -33,6 +35,10 @@
33
35
  "type": "string",
34
36
  "description": "Text content for thinking/message/error events."
35
37
  },
38
+ "final": {
39
+ "type": "boolean",
40
+ "description": "True on the harness's typed final-answer message (vendor terminal result); mid-run narration never sets it."
41
+ },
36
42
  "tool": {
37
43
  "type": "object",
38
44
  "properties": {
@@ -178,6 +184,88 @@
178
184
  "additionalProperties": false,
179
185
  "description": "Set on interaction_requested events."
180
186
  },
187
+ "patch_envelope": {
188
+ "type": "object",
189
+ "properties": {
190
+ "schema_version": {
191
+ "type": "number",
192
+ "const": 1
193
+ },
194
+ "context_packet_hash": {
195
+ "type": "string",
196
+ "minLength": 1,
197
+ "description": "Content hash in algo:hex form, e.g. \"sha256:abcd...\"."
198
+ },
199
+ "base_tree_sha": {
200
+ "type": "string",
201
+ "minLength": 1
202
+ },
203
+ "patch": {
204
+ "type": "string",
205
+ "minLength": 1
206
+ },
207
+ "patch_hash": {
208
+ "$ref": "#/definitions/HarnessEvent/properties/patch_envelope/properties/context_packet_hash"
209
+ },
210
+ "touched_paths": {
211
+ "type": "array",
212
+ "items": {
213
+ "type": "object",
214
+ "properties": {
215
+ "path": {
216
+ "type": "string",
217
+ "minLength": 1
218
+ },
219
+ "expected_blob_oid": {
220
+ "anyOf": [
221
+ {
222
+ "type": "string",
223
+ "minLength": 1
224
+ },
225
+ {
226
+ "type": "null"
227
+ }
228
+ ],
229
+ "description": "Base-tree blob oid, or null only when the path is absent in the base tree."
230
+ }
231
+ },
232
+ "required": [
233
+ "path",
234
+ "expected_blob_oid"
235
+ ],
236
+ "additionalProperties": false
237
+ },
238
+ "minItems": 1
239
+ }
240
+ },
241
+ "required": [
242
+ "schema_version",
243
+ "context_packet_hash",
244
+ "base_tree_sha",
245
+ "patch",
246
+ "patch_hash",
247
+ "touched_paths"
248
+ ],
249
+ "additionalProperties": false,
250
+ "description": "Typed hash-bound patch produced by a git-patch-envelope harness."
251
+ },
252
+ "refusal_code": {
253
+ "type": "string",
254
+ "enum": [
255
+ "raw_patch_requires_isolation",
256
+ "raw_patch_missing_evidence",
257
+ "raw_patch_digest_mismatch",
258
+ "raw_patch_base_mismatch",
259
+ "raw_patch_path_traversal",
260
+ "raw_patch_outside_scope",
261
+ "raw_patch_stale_preimage",
262
+ "raw_patch_binary_unsupported",
263
+ "raw_patch_sensitive_content",
264
+ "raw_patch_truncated",
265
+ "raw_patch_apply_failed"
266
+ ],
267
+ "description": "Typed refusal code for a rejected raw patch contract."
268
+ },
181
269
  "usage": {
182
270
  "type": "object",
183
271
  "properties": {
@@ -213,29 +301,137 @@
213
301
  "type": "string",
214
302
  "description": "Model the harness actually reported using."
215
303
  },
304
+ "credential_route": {
305
+ "type": "string",
306
+ "enum": [
307
+ "vendor_native",
308
+ "managed_api_key",
309
+ "local"
310
+ ],
311
+ "description": "Concrete credential route selected before spawn; first-class route evidence, never inferred from free-form payload text."
312
+ },
313
+ "credential_source": {
314
+ "type": "string",
315
+ "enum": [
316
+ "native_session",
317
+ "oauth_token_env",
318
+ "api_key_env",
319
+ "api_key_flag",
320
+ "provider_auth_file",
321
+ "none"
322
+ ],
323
+ "description": "Concrete credential source selected before spawn; exact native subscription requires native_session, never an OAuth token or API key."
324
+ },
325
+ "credential_profile_id": {
326
+ "type": "string",
327
+ "minLength": 1,
328
+ "description": "Credential profile the attempt runs under; absent = engine-default credentials (INV-135 attribution)."
329
+ },
216
330
  "quota": {
217
331
  "type": "object",
218
332
  "properties": {
219
- "used_percent": {
220
- "type": "number",
221
- "minimum": 0,
222
- "maximum": 100,
223
- "description": "Consumed share of the binding rate window, 0-100."
333
+ "source": {
334
+ "type": "string",
335
+ "enum": [
336
+ "codex_app_server",
337
+ "codex_rollout",
338
+ "claude_statusline",
339
+ "claude_api_retry",
340
+ "claude_oauth_usage"
341
+ ],
342
+ "description": "Vendor-owned machine-readable source of a quota snapshot."
224
343
  },
225
- "resets_at": {
344
+ "plan_label": {
226
345
  "type": [
227
346
  "string",
228
347
  "null"
229
348
  ],
230
- "default": null,
231
- "description": "Native reset moment for the window, when the CLI reports one."
349
+ "default": null
350
+ },
351
+ "subject_id": {
352
+ "type": [
353
+ "string",
354
+ "null"
355
+ ],
356
+ "default": null
357
+ },
358
+ "constraints": {
359
+ "type": "array",
360
+ "items": {
361
+ "type": "object",
362
+ "properties": {
363
+ "id": {
364
+ "$ref": "#/definitions/HarnessEvent/properties/credential_profile_id"
365
+ },
366
+ "label": {
367
+ "type": "string",
368
+ "minLength": 1
369
+ },
370
+ "used_ratio": {
371
+ "anyOf": [
372
+ {
373
+ "type": "number",
374
+ "minimum": 0,
375
+ "maximum": 1
376
+ },
377
+ {
378
+ "type": "null"
379
+ }
380
+ ]
381
+ },
382
+ "window_seconds": {
383
+ "anyOf": [
384
+ {
385
+ "type": "number",
386
+ "exclusiveMinimum": 0
387
+ },
388
+ {
389
+ "type": "null"
390
+ }
391
+ ]
392
+ },
393
+ "resets_at": {
394
+ "anyOf": [
395
+ {
396
+ "type": "string",
397
+ "format": "date-time"
398
+ },
399
+ {
400
+ "type": "null"
401
+ }
402
+ ]
403
+ },
404
+ "cooldown_until": {
405
+ "anyOf": [
406
+ {
407
+ "type": "string",
408
+ "format": "date-time"
409
+ },
410
+ {
411
+ "type": "null"
412
+ }
413
+ ],
414
+ "default": null
415
+ }
416
+ },
417
+ "required": [
418
+ "id",
419
+ "label",
420
+ "used_ratio",
421
+ "window_seconds",
422
+ "resets_at"
423
+ ],
424
+ "additionalProperties": false,
425
+ "description": "One independent vendor quota window; null usage stays unknown."
426
+ }
232
427
  }
233
428
  },
234
429
  "required": [
235
- "used_percent"
430
+ "source",
431
+ "constraints"
236
432
  ],
237
433
  "additionalProperties": false,
238
- "description": "Typed quota/usage-window signal from the harness CLI's own native machine-readable surface, never scraped from prose."
434
+ "description": "All quota windows from a vendor-owned machine-readable source; never scraped from prose or collapsed into a fake aggregate."
239
435
  },
240
436
  "plan_progress": {
241
437
  "type": "object",
@@ -305,6 +501,54 @@
305
501
  "additionalProperties": false,
306
502
  "description": "Typed rate-limit/quota signal set by the adapter when the native CLI reports a 429/quota/overload."
307
503
  },
504
+ "status": {
505
+ "type": "object",
506
+ "properties": {
507
+ "kind": {
508
+ "type": "string",
509
+ "enum": [
510
+ "api_retry"
511
+ ],
512
+ "description": "Kind of transient status."
513
+ },
514
+ "attempt": {
515
+ "type": "integer",
516
+ "minimum": 0,
517
+ "description": "Retry attempt number."
518
+ },
519
+ "max_retries": {
520
+ "type": "integer",
521
+ "minimum": 0,
522
+ "description": "Vendor's configured retry ceiling."
523
+ },
524
+ "retry_delay_ms": {
525
+ "type": "integer",
526
+ "minimum": 0,
527
+ "description": "Delay before the retry, when reported."
528
+ },
529
+ "error_category": {
530
+ "type": "string",
531
+ "enum": [
532
+ "authentication_failed",
533
+ "oauth_org_not_allowed",
534
+ "billing_error",
535
+ "rate_limit",
536
+ "overloaded",
537
+ "invalid_request",
538
+ "model_not_found",
539
+ "server_error",
540
+ "max_output_tokens",
541
+ "unknown"
542
+ ],
543
+ "description": "Vendor's error category mapped onto the documented enum; unrecognized values collapse to 'unknown' (never free-form prose)."
544
+ }
545
+ },
546
+ "required": [
547
+ "kind"
548
+ ],
549
+ "additionalProperties": false,
550
+ "description": "Typed transient-status detail set by the adapter on status events."
551
+ },
308
552
  "transient": {
309
553
  "type": "object",
310
554
  "properties": {
@@ -341,6 +585,10 @@
341
585
  "type": "string",
342
586
  "description": "Error text for error events."
343
587
  },
588
+ "aborted": {
589
+ "type": "boolean",
590
+ "description": "Typed terminal cancellation marker, set on completed events when the run was aborted."
591
+ },
344
592
  "payload": {
345
593
  "type": "object",
346
594
  "additionalProperties": {},