@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
@@ -280,27 +280,135 @@
280
280
  "items": {
281
281
  "type": "object",
282
282
  "properties": {
283
- "id": {
283
+ "program": {
284
284
  "type": "string",
285
285
  "minLength": 1,
286
- "description": "Test command id."
286
+ "pattern": "\\S",
287
+ "description": "Executable invoked directly without an implicit shell."
288
+ },
289
+ "args": {
290
+ "type": "array",
291
+ "items": {
292
+ "type": "string"
293
+ },
294
+ "default": [],
295
+ "description": "Exact argv passed to the executable."
296
+ },
297
+ "cwd": {
298
+ "type": "string",
299
+ "description": "Optional project-relative working directory for the command."
287
300
  },
288
- "command": {
301
+ "envAllowlist": {
302
+ "type": "array",
303
+ "items": {
304
+ "$ref": "#/definitions/TaskContract/properties/constraints/properties/protected_path_approvals/items/properties/reason"
305
+ },
306
+ "default": [],
307
+ "description": "Non-secret parent environment names explicitly forwarded to the command."
308
+ },
309
+ "id": {
289
310
  "type": "string",
290
- "description": "Shell command executed as a deterministic gate."
311
+ "minLength": 1,
312
+ "description": "Test command id."
291
313
  },
292
314
  "required": {
293
315
  "type": "boolean",
294
316
  "default": true,
295
317
  "description": "Whether this test must pass (vs advisory)."
318
+ },
319
+ "trust_required": {
320
+ "type": "boolean",
321
+ "default": false,
322
+ "description": "Whether this command originated in versioned project config."
323
+ },
324
+ "trust_grant": {
325
+ "anyOf": [
326
+ {
327
+ "type": "object",
328
+ "properties": {
329
+ "projectDigest": {
330
+ "type": "string",
331
+ "minLength": 1,
332
+ "description": "Digest of the canonical project identity."
333
+ },
334
+ "configDigest": {
335
+ "type": "string",
336
+ "minLength": 1,
337
+ "description": "Digest of the parsed versioned project config blob."
338
+ },
339
+ "commandDigest": {
340
+ "type": "string",
341
+ "minLength": 1,
342
+ "description": "Digest of the canonical command invocation."
343
+ },
344
+ "executablePath": {
345
+ "type": "string",
346
+ "description": "Resolved executable path approved by the operator."
347
+ },
348
+ "executableDigest": {
349
+ "type": "string",
350
+ "minLength": 1,
351
+ "description": "Digest of the resolved executable bytes."
352
+ },
353
+ "scriptPath": {
354
+ "type": [
355
+ "string",
356
+ "null"
357
+ ],
358
+ "default": null,
359
+ "description": "Resolved script path, when any."
360
+ },
361
+ "scriptDigest": {
362
+ "anyOf": [
363
+ {
364
+ "type": "string",
365
+ "minLength": 1,
366
+ "description": "Content hash in algo:hex form, e.g. \"sha256:abcd...\"."
367
+ },
368
+ {
369
+ "type": "null"
370
+ }
371
+ ],
372
+ "description": "Digest of the script bytes.",
373
+ "default": null
374
+ },
375
+ "accessProfile": {
376
+ "type": "string",
377
+ "enum": [
378
+ "readonly",
379
+ "workspace_write",
380
+ "full",
381
+ "external_sandbox_full",
382
+ "inherit_native"
383
+ ],
384
+ "description": "Effective access profile covered by this grant."
385
+ }
386
+ },
387
+ "required": [
388
+ "projectDigest",
389
+ "configDigest",
390
+ "commandDigest",
391
+ "executablePath",
392
+ "executableDigest",
393
+ "accessProfile"
394
+ ],
395
+ "additionalProperties": false,
396
+ "description": "External exact grant for one versioned project test command."
397
+ },
398
+ {
399
+ "type": "null"
400
+ }
401
+ ],
402
+ "description": "Matching external grant; null when none was found.",
403
+ "default": null
296
404
  }
297
405
  },
298
406
  "required": [
299
- "id",
300
- "command"
407
+ "program",
408
+ "id"
301
409
  ],
302
410
  "additionalProperties": false,
303
- "description": "A deterministic test command used as a verification gate."
411
+ "description": "A deterministic typed-argv test command used as a verification gate."
304
412
  },
305
413
  "default": [],
306
414
  "description": "Deterministic test commands configured as gates."
@@ -409,34 +517,59 @@
409
517
  "budget": {
410
518
  "type": "object",
411
519
  "properties": {
412
- "portfolio": {
520
+ "routing_goal": {
413
521
  "type": "string",
414
522
  "enum": [
415
- "daily-rich",
416
- "balanced",
417
- "cheapest",
418
- "strongest",
419
- "burn",
420
- "subscription-first",
421
- "api-overflow",
422
- "conserve-claude",
423
- "conserve-codex"
523
+ "auto",
524
+ "quality",
525
+ "economy"
424
526
  ],
425
- "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).",
426
- "default": "subscription-first"
527
+ "description": "Routing objective: pace expiring quota, choose the highest declared quality tier, or minimize incremental paid spend.",
528
+ "default": "auto"
427
529
  },
428
- "max_usd": {
429
- "type": [
430
- "number",
431
- "null"
530
+ "paid_budget": {
531
+ "anyOf": [
532
+ {
533
+ "type": "object",
534
+ "properties": {
535
+ "kind": {
536
+ "type": "string",
537
+ "const": "unlimited"
538
+ }
539
+ },
540
+ "required": [
541
+ "kind"
542
+ ],
543
+ "additionalProperties": false
544
+ },
545
+ {
546
+ "type": "object",
547
+ "properties": {
548
+ "kind": {
549
+ "type": "string",
550
+ "const": "finite"
551
+ },
552
+ "maxUsd": {
553
+ "type": "number",
554
+ "minimum": 0
555
+ }
556
+ },
557
+ "required": [
558
+ "kind",
559
+ "maxUsd"
560
+ ],
561
+ "additionalProperties": false
562
+ }
432
563
  ],
433
- "default": null,
434
- "description": "Hard USD cap for the run; null = no cap."
564
+ "description": "Incremental-cash budget: explicitly unlimited or a finite non-negative USD cap.",
565
+ "default": {
566
+ "kind": "unlimited"
567
+ }
435
568
  }
436
569
  },
437
570
  "additionalProperties": false,
438
571
  "default": {},
439
- "description": "Budget portfolio and spend cap for the run."
572
+ "description": "Routing goal and explicit incremental-cash budget for the run."
440
573
  },
441
574
  "routing_models": {
442
575
  "type": "object",
@@ -0,0 +1,45 @@
1
+ {
2
+ "$ref": "#/definitions/TestCommandInvocation",
3
+ "definitions": {
4
+ "TestCommandInvocation": {
5
+ "type": "object",
6
+ "properties": {
7
+ "program": {
8
+ "type": "string",
9
+ "minLength": 1,
10
+ "pattern": "\\S",
11
+ "description": "Executable invoked directly without an implicit shell."
12
+ },
13
+ "args": {
14
+ "type": "array",
15
+ "items": {
16
+ "type": "string"
17
+ },
18
+ "default": [],
19
+ "description": "Exact argv passed to the executable."
20
+ },
21
+ "cwd": {
22
+ "type": "string",
23
+ "description": "Optional project-relative working directory for the command."
24
+ },
25
+ "envAllowlist": {
26
+ "type": "array",
27
+ "items": {
28
+ "type": "string",
29
+ "minLength": 1,
30
+ "pattern": "\\S",
31
+ "description": "User-supplied string that must contain visible content, not just whitespace."
32
+ },
33
+ "default": [],
34
+ "description": "Non-secret parent environment names explicitly forwarded to the command."
35
+ }
36
+ },
37
+ "required": [
38
+ "program"
39
+ ],
40
+ "additionalProperties": false,
41
+ "description": "Canonical deterministic command invocation; no implicit shell parsing."
42
+ }
43
+ },
44
+ "$schema": "http://json-schema.org/draft-07/schema#"
45
+ }
@@ -124,6 +124,20 @@
124
124
  ],
125
125
  "default": null,
126
126
  "description": "Snapshot SHA the isolated worktree (or last apply) is based on."
127
+ },
128
+ "delivered_through_run_id": {
129
+ "anyOf": [
130
+ {
131
+ "type": "string",
132
+ "minLength": 1,
133
+ "description": "Non-empty identifier string."
134
+ },
135
+ {
136
+ "type": "null"
137
+ }
138
+ ],
139
+ "description": "Last run in the lineage prefix already delivered from this isolated thread.",
140
+ "default": null
127
141
  }
128
142
  },
129
143
  "additionalProperties": false,
@@ -133,9 +147,7 @@
133
147
  "run_ids": {
134
148
  "type": "array",
135
149
  "items": {
136
- "type": "string",
137
- "minLength": 1,
138
- "description": "Non-empty identifier string."
150
+ "$ref": "#/definitions/Thread/properties/workspace/properties/delivered_through_run_id/anyOf/0"
139
151
  },
140
152
  "default": [],
141
153
  "description": "Ordered run lineage (each run is a turn move)."
@@ -143,7 +155,7 @@
143
155
  "head_run_id": {
144
156
  "anyOf": [
145
157
  {
146
- "$ref": "#/definitions/Thread/properties/run_ids/items"
158
+ "$ref": "#/definitions/Thread/properties/workspace/properties/delivered_through_run_id/anyOf/0"
147
159
  },
148
160
  {
149
161
  "type": "null"
@@ -156,10 +168,54 @@
156
168
  "type": "string",
157
169
  "enum": [
158
170
  "active",
159
- "closed"
171
+ "closed",
172
+ "trashed",
173
+ "purged"
160
174
  ],
161
- "description": "Thread lifecycle state: active or explicitly closed (archived). Blocked is a live projection, not a thread state.",
175
+ "description": "Thread lifecycle state: active, closed, trashed for recovery, or terminally purged.",
162
176
  "default": "active"
177
+ },
178
+ "trashed_at": {
179
+ "anyOf": [
180
+ {
181
+ "type": "string",
182
+ "minLength": 1,
183
+ "description": "ISO-8601 timestamp string."
184
+ },
185
+ {
186
+ "type": "null"
187
+ }
188
+ ],
189
+ "description": "When the thread entered recoverable trash.",
190
+ "default": null
191
+ },
192
+ "purge_after": {
193
+ "anyOf": [
194
+ {
195
+ "$ref": "#/definitions/Thread/properties/trashed_at/anyOf/0"
196
+ },
197
+ {
198
+ "type": "null"
199
+ }
200
+ ],
201
+ "description": "Earliest automatic purge time; 30 days after trash.",
202
+ "default": null
203
+ },
204
+ "pre_trash_state": {
205
+ "anyOf": [
206
+ {
207
+ "type": "string",
208
+ "enum": [
209
+ "active",
210
+ "closed"
211
+ ]
212
+ },
213
+ {
214
+ "type": "null"
215
+ }
216
+ ],
217
+ "default": null,
218
+ "description": "Lifecycle state restored while the trash retention window remains open."
163
219
  }
164
220
  },
165
221
  "required": [
@@ -72,10 +72,10 @@
72
72
  "items": {
73
73
  "type": "object",
74
74
  "properties": {
75
- "id": {
75
+ "resource_id": {
76
76
  "type": "string",
77
77
  "minLength": 1,
78
- "description": "Attachment id."
78
+ "description": "Immutable daemon resource id."
79
79
  },
80
80
  "kind": {
81
81
  "type": "string",
@@ -83,30 +83,43 @@
83
83
  "image",
84
84
  "file"
85
85
  ],
86
- "description": "Kind of attachment: image (vision input) or file (generic bytes).",
87
- "default": "file"
86
+ "description": "Kind of attached resource: image input or generic file bytes."
88
87
  },
89
88
  "mime": {
90
89
  "type": "string",
91
- "default": "application/octet-stream",
92
- "description": "MIME type of the attachment content."
90
+ "minLength": 1,
91
+ "description": "Declared MIME type validated against adapter limits."
93
92
  },
94
93
  "name": {
95
94
  "type": "string",
96
- "default": "",
97
- "description": "Original file name as provided by the user or agent."
95
+ "description": "Original display name."
96
+ },
97
+ "sha256": {
98
+ "type": "string",
99
+ "minLength": 1,
100
+ "description": "Exact sha256 digest of the immutable bytes."
101
+ },
102
+ "size_bytes": {
103
+ "type": "integer",
104
+ "minimum": 0,
105
+ "description": "Exact byte length."
98
106
  },
99
107
  "path": {
100
108
  "type": "string",
101
- "description": "Resolved local path in the scoped attachment store (kept outside any worktree)."
109
+ "description": "Daemon-owned immutable blob path; internal adapter input only."
102
110
  }
103
111
  },
104
112
  "required": [
105
- "id",
113
+ "resource_id",
114
+ "kind",
115
+ "mime",
116
+ "name",
117
+ "sha256",
118
+ "size_bytes",
106
119
  "path"
107
120
  ],
108
121
  "additionalProperties": false,
109
- "description": "A user- or agent-provided file/image attached to a turn, stored in the scoped attachment store and forwarded to harnesses in their native shape."
122
+ "description": "Daemon-resolved immutable resource supplied to a harness adapter."
110
123
  },
111
124
  "default": [],
112
125
  "description": "Files/images the user attached to this turn (resolved scoped paths)."
@@ -34,6 +34,83 @@
34
34
  ],
35
35
  "default": null,
36
36
  "description": "Provenance only: repo root this trust file was written for; never gates anything. Null on legacy files written before this field."
37
+ },
38
+ "test_command_grants": {
39
+ "type": "array",
40
+ "items": {
41
+ "type": "object",
42
+ "properties": {
43
+ "projectDigest": {
44
+ "type": "string",
45
+ "minLength": 1,
46
+ "description": "Digest of the canonical project identity."
47
+ },
48
+ "configDigest": {
49
+ "type": "string",
50
+ "minLength": 1,
51
+ "description": "Digest of the parsed versioned project config blob."
52
+ },
53
+ "commandDigest": {
54
+ "type": "string",
55
+ "minLength": 1,
56
+ "description": "Digest of the canonical command invocation."
57
+ },
58
+ "executablePath": {
59
+ "type": "string",
60
+ "description": "Resolved executable path approved by the operator."
61
+ },
62
+ "executableDigest": {
63
+ "type": "string",
64
+ "minLength": 1,
65
+ "description": "Digest of the resolved executable bytes."
66
+ },
67
+ "scriptPath": {
68
+ "type": [
69
+ "string",
70
+ "null"
71
+ ],
72
+ "default": null,
73
+ "description": "Resolved script path, when any."
74
+ },
75
+ "scriptDigest": {
76
+ "anyOf": [
77
+ {
78
+ "type": "string",
79
+ "minLength": 1,
80
+ "description": "Content hash in algo:hex form, e.g. \"sha256:abcd...\"."
81
+ },
82
+ {
83
+ "type": "null"
84
+ }
85
+ ],
86
+ "description": "Digest of the script bytes.",
87
+ "default": null
88
+ },
89
+ "accessProfile": {
90
+ "type": "string",
91
+ "enum": [
92
+ "readonly",
93
+ "workspace_write",
94
+ "full",
95
+ "external_sandbox_full",
96
+ "inherit_native"
97
+ ],
98
+ "description": "Effective access profile covered by this grant."
99
+ }
100
+ },
101
+ "required": [
102
+ "projectDigest",
103
+ "configDigest",
104
+ "commandDigest",
105
+ "executablePath",
106
+ "executableDigest",
107
+ "accessProfile"
108
+ ],
109
+ "additionalProperties": false,
110
+ "description": "External exact grant for one versioned project test command."
111
+ },
112
+ "default": [],
113
+ "description": "External exact grants for versioned project test commands."
37
114
  }
38
115
  },
39
116
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudexor/schema",
3
- "version": "1.0.1",
3
+ "version": "2.0.0",
4
4
  "license": "MIT",
5
5
  "description": "Single source of truth for all Claudexor data shapes (Zod + generated JSON Schema).",
6
6
  "type": "module",
@@ -1,18 +0,0 @@
1
- {
2
- "$ref": "#/definitions/ControlSetupJobConfirmRequest",
3
- "definitions": {
4
- "ControlSetupJobConfirmRequest": {
5
- "type": "object",
6
- "properties": {
7
- "confirmed": {
8
- "type": "boolean",
9
- "default": true,
10
- "description": "Whether the user confirmed the pending action."
11
- }
12
- },
13
- "additionalProperties": false,
14
- "description": "Request body confirming a setup job that waits for user confirmation."
15
- }
16
- },
17
- "$schema": "http://json-schema.org/draft-07/schema#"
18
- }
@@ -1,83 +0,0 @@
1
- {
2
- "$ref": "#/definitions/ControlSpecFreezeRequest",
3
- "definitions": {
4
- "ControlSpecFreezeRequest": {
5
- "type": "object",
6
- "properties": {
7
- "prompt": {
8
- "type": "string",
9
- "description": "The user's request the spec captures."
10
- },
11
- "scope": {
12
- "type": "object",
13
- "properties": {
14
- "kind": {
15
- "type": "string",
16
- "const": "project"
17
- },
18
- "root": {
19
- "type": "string",
20
- "description": "Absolute path of the project root."
21
- },
22
- "context": {
23
- "type": "string",
24
- "enum": [
25
- "auto"
26
- ],
27
- "description": "Project context depth; auto is the only mode.",
28
- "default": "auto"
29
- }
30
- },
31
- "required": [
32
- "kind",
33
- "root"
34
- ],
35
- "additionalProperties": false,
36
- "description": "Project the spec is about."
37
- },
38
- "planDir": {
39
- "type": "string",
40
- "description": "Directory to write the frozen spec artifacts into."
41
- },
42
- "plan": {
43
- "type": "string",
44
- "description": "Plan text to fold into the spec."
45
- },
46
- "answers": {
47
- "type": "array",
48
- "items": {},
49
- "description": "Interview answers for the current tier."
50
- },
51
- "priorDecisions": {
52
- "type": "array",
53
- "items": {
54
- "type": "object",
55
- "properties": {
56
- "question": {
57
- "type": "string",
58
- "description": "Question asked in a prior tier."
59
- },
60
- "answer": {
61
- "type": "string",
62
- "description": "The user's answer."
63
- }
64
- },
65
- "required": [
66
- "question",
67
- "answer"
68
- ],
69
- "additionalProperties": false
70
- },
71
- "description": "Accumulated prior-tier interview decisions, folded into the frozen SpecPack's decided tradeoffs."
72
- }
73
- },
74
- "required": [
75
- "prompt",
76
- "scope"
77
- ],
78
- "additionalProperties": false,
79
- "description": "Request body to freeze a SpecPack from the interview."
80
- }
81
- },
82
- "$schema": "http://json-schema.org/draft-07/schema#"
83
- }