@claudexor/schema 2.1.2 → 3.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 (174) hide show
  1. package/dist/agent-capabilities.d.ts +32 -24
  2. package/dist/agent-capabilities.d.ts.map +1 -1
  3. package/dist/agent-capabilities.js +20 -11
  4. package/dist/agent-capabilities.js.map +1 -1
  5. package/dist/apply-eligibility.d.ts +166 -0
  6. package/dist/apply-eligibility.d.ts.map +1 -1
  7. package/dist/apply-eligibility.js +63 -2
  8. package/dist/apply-eligibility.js.map +1 -1
  9. package/dist/attachment.d.ts +5 -5
  10. package/dist/budget.d.ts +4 -4
  11. package/dist/config.d.ts +59 -41
  12. package/dist/config.d.ts.map +1 -1
  13. package/dist/config.js +16 -6
  14. package/dist/config.js.map +1 -1
  15. package/dist/context.d.ts +6 -6
  16. package/dist/control-operation-responses.d.ts +190 -97
  17. package/dist/control-operation-responses.d.ts.map +1 -1
  18. package/dist/control-operation-responses.js +14 -1
  19. package/dist/control-operation-responses.js.map +1 -1
  20. package/dist/control-run-detail.d.ts +380 -215
  21. package/dist/control-run-detail.d.ts.map +1 -1
  22. package/dist/control-run-detail.js +54 -8
  23. package/dist/control-run-detail.js.map +1 -1
  24. package/dist/control-thread-apply.d.ts +5 -5
  25. package/dist/control-trust.d.ts +6 -6
  26. package/dist/control.d.ts +769 -323
  27. package/dist/control.d.ts.map +1 -1
  28. package/dist/control.js +164 -71
  29. package/dist/control.js.map +1 -1
  30. package/dist/credential-profile.d.ts +400 -1
  31. package/dist/credential-profile.d.ts.map +1 -1
  32. package/dist/credential-profile.js +109 -4
  33. package/dist/credential-profile.js.map +1 -1
  34. package/dist/decision.d.ts +78 -14
  35. package/dist/decision.d.ts.map +1 -1
  36. package/dist/decision.js +53 -20
  37. package/dist/decision.js.map +1 -1
  38. package/dist/delivery.d.ts +3 -3
  39. package/dist/delivery.js +1 -1
  40. package/dist/delivery.js.map +1 -1
  41. package/dist/events.d.ts +32 -6
  42. package/dist/events.d.ts.map +1 -1
  43. package/dist/events.js +46 -11
  44. package/dist/events.js.map +1 -1
  45. package/dist/gate.d.ts +4 -4
  46. package/dist/gate.d.ts.map +1 -1
  47. package/dist/gate.js +2 -2
  48. package/dist/gate.js.map +1 -1
  49. package/dist/harness.d.ts +137 -47
  50. package/dist/harness.d.ts.map +1 -1
  51. package/dist/harness.js +65 -16
  52. package/dist/harness.js.map +1 -1
  53. package/dist/index.d.ts +4 -3
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +4 -3
  56. package/dist/index.js.map +1 -1
  57. package/dist/operation.d.ts +66 -7
  58. package/dist/operation.d.ts.map +1 -1
  59. package/dist/operation.js +29 -2
  60. package/dist/operation.js.map +1 -1
  61. package/dist/output-schema.d.ts +40 -0
  62. package/dist/output-schema.d.ts.map +1 -0
  63. package/dist/output-schema.js +109 -0
  64. package/dist/output-schema.js.map +1 -0
  65. package/dist/plan.d.ts +206 -0
  66. package/dist/plan.d.ts.map +1 -0
  67. package/dist/plan.js +107 -0
  68. package/dist/plan.js.map +1 -0
  69. package/dist/primitives.d.ts +14 -10
  70. package/dist/primitives.d.ts.map +1 -1
  71. package/dist/primitives.js +14 -11
  72. package/dist/primitives.js.map +1 -1
  73. package/dist/project.d.ts +75 -0
  74. package/dist/project.d.ts.map +1 -1
  75. package/dist/project.js +17 -0
  76. package/dist/project.js.map +1 -1
  77. package/dist/quota.d.ts +119 -0
  78. package/dist/quota.d.ts.map +1 -1
  79. package/dist/quota.js +22 -0
  80. package/dist/quota.js.map +1 -1
  81. package/dist/raw.d.ts +4 -4
  82. package/dist/readiness.d.ts +14 -7
  83. package/dist/readiness.d.ts.map +1 -1
  84. package/dist/run-strategy.d.ts +17 -0
  85. package/dist/run-strategy.d.ts.map +1 -0
  86. package/dist/run-strategy.js +47 -0
  87. package/dist/run-strategy.js.map +1 -0
  88. package/dist/setup.d.ts +160 -160
  89. package/dist/status-projection.d.ts +78 -0
  90. package/dist/status-projection.d.ts.map +1 -0
  91. package/dist/status-projection.js +171 -0
  92. package/dist/status-projection.js.map +1 -0
  93. package/dist/task.d.ts +48 -316
  94. package/dist/task.d.ts.map +1 -1
  95. package/dist/task.js +3 -60
  96. package/dist/task.js.map +1 -1
  97. package/dist/telemetry.d.ts +89 -89
  98. package/dist/thread.d.ts +167 -32
  99. package/dist/thread.d.ts.map +1 -1
  100. package/dist/thread.js +92 -28
  101. package/dist/thread.js.map +1 -1
  102. package/dist/tool-ref.d.ts +1 -1
  103. package/generated/AgentCapabilityCatalog.schema.json +4 -6
  104. package/generated/ApplyEligibility.schema.json +1 -1
  105. package/generated/BudgetLease.schema.json +1 -2
  106. package/generated/ConformanceReport.schema.json +1 -2
  107. package/generated/ContinuityDisclosure.schema.json +74 -0
  108. package/generated/ControlApplyRequest.schema.json +1 -2
  109. package/generated/ControlCredentialProfileUpdateRequest.schema.json +20 -0
  110. package/generated/ControlCredentialProfileUpdateResponse.schema.json +142 -0
  111. package/generated/ControlCredentialProfilesResponse.schema.json +126 -2
  112. package/generated/ControlDeliveryResponse.schema.json +0 -1
  113. package/generated/ControlHandshakeResponse.schema.json +31 -3
  114. package/generated/ControlHarnessListResponse.schema.json +11 -6
  115. package/generated/ControlHarnessSettingsPatch.schema.json +4 -0
  116. package/generated/ControlOperationCatalog.schema.json +16 -1
  117. package/generated/ControlOperationDescriptor.schema.json +15 -0
  118. package/generated/ControlProject.schema.json +35 -0
  119. package/generated/ControlProjectListResponse.schema.json +35 -0
  120. package/generated/ControlProjectOutputsResponse.schema.json +57 -0
  121. package/generated/ControlQueuedRunInfo.schema.json +2 -11
  122. package/generated/ControlQuotaResponse.schema.json +42 -0
  123. package/generated/ControlRunAgainDraft.schema.json +37 -35
  124. package/generated/ControlRunDecisionRequest.schema.json +0 -1
  125. package/generated/ControlRunDetail.schema.json +305 -213
  126. package/generated/ControlRunListResponse.schema.json +88 -27
  127. package/generated/ControlRunStartRequest.schema.json +37 -35
  128. package/generated/ControlRunStartResponse.schema.json +2 -11
  129. package/generated/ControlRunSummary.schema.json +88 -27
  130. package/generated/ControlSettingsSnapshot.schema.json +6 -11
  131. package/generated/ControlSettingsUpdateRequest.schema.json +5 -10
  132. package/generated/ControlThread.schema.json +21 -3
  133. package/generated/ControlThreadApplyResponse.schema.json +0 -1
  134. package/generated/ControlThreadCreateRequest.schema.json +12 -3
  135. package/generated/ControlThreadDetail.schema.json +174 -16
  136. package/generated/ControlThreadListResponse.schema.json +60 -3
  137. package/generated/ControlThreadTurnRequest.schema.json +40 -34
  138. package/generated/ControlThreadUpdateRequest.schema.json +19 -0
  139. package/generated/DecisionRecord.schema.json +73 -33
  140. package/generated/GateResult.schema.json +1 -2
  141. package/generated/GlobalConfig.schema.json +7 -12
  142. package/generated/HarnessManifest.schema.json +11 -6
  143. package/generated/HarnessStatusDto.schema.json +11 -6
  144. package/generated/LaneCheckpoint.schema.json +59 -0
  145. package/generated/McpRunHandleResult.schema.json +234 -0
  146. package/generated/McpRunToolResult.schema.json +124 -2
  147. package/generated/RoutePrimaryDivergedPayload.schema.json +56 -0
  148. package/generated/RunEvent.schema.json +10 -5
  149. package/generated/RunTelemetry.schema.json +2 -4
  150. package/generated/TaskContract.schema.json +3 -135
  151. package/generated/Thread.schema.json +21 -3
  152. package/generated/ThreadTurn.schema.json +88 -0
  153. package/package.json +2 -2
  154. package/dist/control-spec.d.ts +0 -592
  155. package/dist/control-spec.d.ts.map +0 -1
  156. package/dist/control-spec.js +0 -85
  157. package/dist/control-spec.js.map +0 -1
  158. package/dist/orchestrate.d.ts +0 -556
  159. package/dist/orchestrate.d.ts.map +0 -1
  160. package/dist/orchestrate.js +0 -356
  161. package/dist/orchestrate.js.map +0 -1
  162. package/dist/spec.d.ts +0 -678
  163. package/dist/spec.d.ts.map +0 -1
  164. package/dist/spec.js +0 -186
  165. package/dist/spec.js.map +0 -1
  166. package/generated/ControlSpecAnswersRequest.schema.json +0 -74
  167. package/generated/ControlSpecQuestionsRequest.schema.json +0 -206
  168. package/generated/ControlSpecSession.schema.json +0 -249
  169. package/generated/ControlSpecSessionListResponse.schema.json +0 -261
  170. package/generated/OrchestrateContract.schema.json +0 -119
  171. package/generated/OrchestratePlan.schema.json +0 -264
  172. package/generated/OrchestratePlanProgress.schema.json +0 -164
  173. package/generated/SessionReboundLineage.schema.json +0 -73
  174. package/generated/SpecPack.schema.json +0 -483
@@ -59,11 +59,9 @@
59
59
  "enum": [
60
60
  "ask",
61
61
  "plan",
62
- "audit",
63
- "agent",
64
- "orchestrate"
62
+ "agent"
65
63
  ],
66
- "description": "Canonical run mode: ask, plan, and audit are read-only; agent writes; orchestrate is the autonomous coordinator intent. Engine strategies (race, attempts, swarm, create) are flags on a mode, not modes."
64
+ "description": "Canonical run mode: ask and plan are read-only, agent writes. Engine strategies (race width, attempts, deep_scan, create, delegate) are flags on a mode, not modes."
67
65
  }
68
66
  },
69
67
  "required": [
@@ -144,136 +142,6 @@
144
142
  "default": null,
145
143
  "description": "Per-run turn cap (beats per-harness settings); null when the caller set none."
146
144
  },
147
- "spec": {
148
- "type": "object",
149
- "properties": {
150
- "id": {
151
- "$ref": "#/definitions/TaskContract/properties/credential_profile_id/anyOf/0",
152
- "description": "SpecPack id."
153
- },
154
- "hash": {
155
- "type": "string",
156
- "description": "Content hash of the frozen SpecPack."
157
- },
158
- "path": {
159
- "type": "string",
160
- "description": "On-disk path of the SpecPack artifact."
161
- }
162
- },
163
- "additionalProperties": false,
164
- "description": "Reference to the frozen SpecPack this contract was derived from, if any."
165
- },
166
- "success_criteria": {
167
- "type": "array",
168
- "items": {
169
- "type": "object",
170
- "properties": {
171
- "id": {
172
- "type": "string",
173
- "minLength": 1,
174
- "description": "Criterion id."
175
- },
176
- "text": {
177
- "type": "string",
178
- "description": "Human-readable statement of what must hold for the run to succeed."
179
- },
180
- "required": {
181
- "type": "boolean",
182
- "default": true,
183
- "description": "Whether this criterion is required (vs advisory)."
184
- }
185
- },
186
- "required": [
187
- "id",
188
- "text"
189
- ],
190
- "additionalProperties": false,
191
- "description": "A single success criterion the run is held to."
192
- },
193
- "default": [],
194
- "description": "Criteria the run must satisfy to succeed."
195
- },
196
- "non_goals": {
197
- "type": "array",
198
- "items": {
199
- "type": "string"
200
- },
201
- "default": [],
202
- "description": "Explicitly out-of-scope outcomes."
203
- },
204
- "forbidden_approaches": {
205
- "type": "array",
206
- "items": {
207
- "type": "string"
208
- },
209
- "default": [],
210
- "description": "Approaches the run must not take."
211
- },
212
- "decided_tradeoffs": {
213
- "type": "array",
214
- "items": {
215
- "type": "string"
216
- },
217
- "default": [],
218
- "description": "Tradeoffs already decided; reviewers must not re-litigate them."
219
- },
220
- "task_graph": {
221
- "anyOf": [
222
- {
223
- "type": "object",
224
- "properties": {
225
- "nodes": {
226
- "type": "array",
227
- "items": {
228
- "type": "object",
229
- "properties": {
230
- "id": {
231
- "type": "string",
232
- "minLength": 1,
233
- "description": "Task node id."
234
- },
235
- "title": {
236
- "type": "string",
237
- "default": "",
238
- "description": "Human-readable task title."
239
- },
240
- "depends_on": {
241
- "type": "array",
242
- "items": {
243
- "$ref": "#/definitions/TaskContract/properties/credential_profile_id/anyOf/0"
244
- },
245
- "default": [],
246
- "description": "Ids of tasks this node depends on (graph edges)."
247
- }
248
- },
249
- "required": [
250
- "id"
251
- ],
252
- "additionalProperties": false,
253
- "description": "One node of the spec-derived task graph; edges are depends_on."
254
- },
255
- "default": [],
256
- "description": "Task nodes of the graph."
257
- },
258
- "order": {
259
- "type": "array",
260
- "items": {
261
- "$ref": "#/definitions/TaskContract/properties/credential_profile_id/anyOf/0"
262
- },
263
- "default": [],
264
- "description": "Topological execution order (node ids); empty when there are no tasks."
265
- }
266
- },
267
- "additionalProperties": false,
268
- "description": "A topologically-ordered task graph built from a frozen SpecPack's tasks."
269
- },
270
- {
271
- "type": "null"
272
- }
273
- ],
274
- "description": "Spec-derived task graph; null until a frozen SpecPack with tasks is resolved.",
275
- "default": null
276
- },
277
145
  "constraints": {
278
146
  "type": "object",
279
147
  "properties": {
@@ -283,7 +151,7 @@
283
151
  "type": "string"
284
152
  },
285
153
  "default": [],
286
- "description": "Spec/config-owned globs whose changes escalate risk to a human-approval gate; cannot be suppressed by per-run protected-path approvals."
154
+ "description": "Approval globs — path globs (e.g. `migrations/**`, `**/*.env`) whose changes escalate a run to a human-approval gate before it can be applied. Spec/config-owned and never suppressed by per-run protected-path approvals."
287
155
  },
288
156
  "deny_paths": {
289
157
  "type": "array",
@@ -64,9 +64,7 @@
64
64
  "enum": [
65
65
  "ask",
66
66
  "plan",
67
- "audit",
68
- "agent",
69
- "orchestrate"
67
+ "agent"
70
68
  ],
71
69
  "description": "Default mode for new turns; individual turns may override.",
72
70
  "default": "agent"
@@ -81,6 +79,26 @@
81
79
  "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.",
82
80
  "default": "auto"
83
81
  },
82
+ "access": {
83
+ "anyOf": [
84
+ {
85
+ "type": "string",
86
+ "enum": [
87
+ "readonly",
88
+ "workspace_write",
89
+ "full",
90
+ "external_sandbox_full",
91
+ "inherit_native"
92
+ ],
93
+ "description": "Filesystem/command access profile for a run: readonly (no writes), workspace_write (writes inside the workspace only), full (unrestricted; requires the per-repo trust allow), external_sandbox_full (full access inside an external sandbox), inherit_native (defer to the harness's own native sandbox settings)."
94
+ },
95
+ {
96
+ "type": "null"
97
+ }
98
+ ],
99
+ "description": "Sticky write scope for write turns; per-turn selection wins, null = the repo trust default.",
100
+ "default": null
101
+ },
84
102
  "credential_profile_id": {
85
103
  "anyOf": [
86
104
  {
@@ -52,6 +52,19 @@
52
52
  "description": "Set when this turn implements an approved plan from an earlier plan run.",
53
53
  "default": null
54
54
  },
55
+ "plan_hash": {
56
+ "type": [
57
+ "string",
58
+ "null"
59
+ ],
60
+ "default": null,
61
+ "description": "sha256 of the implemented plan at freeze time; null for non-implement turns."
62
+ },
63
+ "plan_readiness_overridden": {
64
+ "type": "boolean",
65
+ "default": false,
66
+ "description": "True when the user explicitly implemented a plan with open questions."
67
+ },
55
68
  "kind": {
56
69
  "type": "string",
57
70
  "enum": [
@@ -166,6 +179,81 @@
166
179
  "description": "Why this turn has no run (enqueue/preflight refusal); null once a run binds.",
167
180
  "default": null
168
181
  },
182
+ "continuity": {
183
+ "anyOf": [
184
+ {
185
+ "type": "object",
186
+ "properties": {
187
+ "kind": {
188
+ "type": "string",
189
+ "enum": [
190
+ "native_resume",
191
+ "packet",
192
+ "fresh"
193
+ ],
194
+ "description": "How a turn's lane was continued: native_resume (the lane's own vendor session already held the delta), packet (a continuation packet hydrated a lane switch/gap), or fresh (nothing to carry — the thread's first turn on any lane)."
195
+ },
196
+ "packet_turns": {
197
+ "type": "integer",
198
+ "minimum": 0,
199
+ "default": 0,
200
+ "description": "Number of delta turns carried in the continuation packet (0 for native_resume/fresh)."
201
+ },
202
+ "summarized": {
203
+ "type": "boolean",
204
+ "default": false,
205
+ "description": "True when the packet collapsed an older prefix to one-line entries (mechanical fallback)."
206
+ },
207
+ "lane_switched_from": {
208
+ "anyOf": [
209
+ {
210
+ "type": "object",
211
+ "properties": {
212
+ "harness_id": {
213
+ "type": "string",
214
+ "minLength": 1,
215
+ "description": "Harness of the prior lane."
216
+ },
217
+ "profile_id": {
218
+ "anyOf": [
219
+ {
220
+ "$ref": "#/definitions/ThreadTurn/properties/run_id/anyOf/0"
221
+ },
222
+ {
223
+ "type": "null"
224
+ }
225
+ ],
226
+ "description": "Credential profile of the prior lane (null = engine default).",
227
+ "default": null
228
+ }
229
+ },
230
+ "required": [
231
+ "harness_id"
232
+ ],
233
+ "additionalProperties": false,
234
+ "description": "A (harness, profile) lane reference; the null profile is the engine default."
235
+ },
236
+ {
237
+ "type": "null"
238
+ }
239
+ ],
240
+ "description": "The lane this turn switched away from, when the continuation crossed lanes; null otherwise.",
241
+ "default": null
242
+ }
243
+ },
244
+ "required": [
245
+ "kind"
246
+ ],
247
+ "additionalProperties": false,
248
+ "description": "How a turn's lane was continued from the conversation (native resume / continuation packet / fresh), disclosed visibly per INV-137."
249
+ },
250
+ {
251
+ "type": "null"
252
+ }
253
+ ],
254
+ "description": "How this turn's lane was continued (native resume / packet / fresh); null until stamped.",
255
+ "default": null
256
+ },
169
257
  "created_at": {
170
258
  "type": "string",
171
259
  "minLength": 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudexor/schema",
3
- "version": "2.1.2",
3
+ "version": "3.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",
@@ -20,7 +20,7 @@
20
20
  "dependencies": {
21
21
  "zod": "^3.24.1",
22
22
  "zod-to-json-schema": "^3.24.1",
23
- "@claudexor/util": "2.1.2"
23
+ "@claudexor/util": "3.0.0"
24
24
  },
25
25
  "repository": {
26
26
  "type": "git",