@claudexor/schema 1.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 (175) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +16 -0
  3. package/dist/agent-capabilities.d.ts +366 -0
  4. package/dist/agent-capabilities.d.ts.map +1 -0
  5. package/dist/agent-capabilities.js +125 -0
  6. package/dist/agent-capabilities.js.map +1 -0
  7. package/dist/apply-eligibility.d.ts +76 -0
  8. package/dist/apply-eligibility.d.ts.map +1 -0
  9. package/dist/apply-eligibility.js +37 -0
  10. package/dist/apply-eligibility.js.map +1 -0
  11. package/dist/attachment.d.ts +69 -0
  12. package/dist/attachment.d.ts.map +1 -0
  13. package/dist/attachment.js +54 -0
  14. package/dist/attachment.js.map +1 -0
  15. package/dist/budget.d.ts +75 -0
  16. package/dist/budget.d.ts.map +1 -0
  17. package/dist/budget.js +54 -0
  18. package/dist/budget.js.map +1 -0
  19. package/dist/config.d.ts +743 -0
  20. package/dist/config.d.ts.map +1 -0
  21. package/dist/config.js +194 -0
  22. package/dist/config.js.map +1 -0
  23. package/dist/context.d.ts +222 -0
  24. package/dist/context.d.ts.map +1 -0
  25. package/dist/context.js +70 -0
  26. package/dist/context.js.map +1 -0
  27. package/dist/control-run-detail.d.ts +1686 -0
  28. package/dist/control-run-detail.d.ts.map +1 -0
  29. package/dist/control-run-detail.js +107 -0
  30. package/dist/control-run-detail.js.map +1 -0
  31. package/dist/control-trust.d.ts +79 -0
  32. package/dist/control-trust.d.ts.map +1 -0
  33. package/dist/control-trust.js +39 -0
  34. package/dist/control-trust.js.map +1 -0
  35. package/dist/control.d.ts +4226 -0
  36. package/dist/control.d.ts.map +1 -0
  37. package/dist/control.js +1022 -0
  38. package/dist/control.js.map +1 -0
  39. package/dist/decision.d.ts +208 -0
  40. package/dist/decision.d.ts.map +1 -0
  41. package/dist/decision.js +98 -0
  42. package/dist/decision.js.map +1 -0
  43. package/dist/events.d.ts +70 -0
  44. package/dist/events.d.ts.map +1 -0
  45. package/dist/events.js +105 -0
  46. package/dist/events.js.map +1 -0
  47. package/dist/gate.d.ts +37 -0
  48. package/dist/gate.d.ts.map +1 -0
  49. package/dist/gate.js +20 -0
  50. package/dist/gate.js.map +1 -0
  51. package/dist/harness.d.ts +1418 -0
  52. package/dist/harness.d.ts.map +1 -0
  53. package/dist/harness.js +552 -0
  54. package/dist/harness.js.map +1 -0
  55. package/dist/index.d.ts +32 -0
  56. package/dist/index.d.ts.map +1 -0
  57. package/dist/index.js +32 -0
  58. package/dist/index.js.map +1 -0
  59. package/dist/orchestrate.d.ts +428 -0
  60. package/dist/orchestrate.d.ts.map +1 -0
  61. package/dist/orchestrate.js +246 -0
  62. package/dist/orchestrate.js.map +1 -0
  63. package/dist/primitives.d.ts +71 -0
  64. package/dist/primitives.d.ts.map +1 -0
  65. package/dist/primitives.js +114 -0
  66. package/dist/primitives.js.map +1 -0
  67. package/dist/review.d.ts +220 -0
  68. package/dist/review.d.ts.map +1 -0
  69. package/dist/review.js +91 -0
  70. package/dist/review.js.map +1 -0
  71. package/dist/route.d.ts +67 -0
  72. package/dist/route.d.ts.map +1 -0
  73. package/dist/route.js +33 -0
  74. package/dist/route.js.map +1 -0
  75. package/dist/spec.d.ts +561 -0
  76. package/dist/spec.d.ts.map +1 -0
  77. package/dist/spec.js +133 -0
  78. package/dist/spec.js.map +1 -0
  79. package/dist/surface-run-controls.d.ts +14 -0
  80. package/dist/surface-run-controls.d.ts.map +1 -0
  81. package/dist/surface-run-controls.js +142 -0
  82. package/dist/surface-run-controls.js.map +1 -0
  83. package/dist/task.d.ts +565 -0
  84. package/dist/task.d.ts.map +1 -0
  85. package/dist/task.js +186 -0
  86. package/dist/task.js.map +1 -0
  87. package/dist/telemetry.d.ts +660 -0
  88. package/dist/telemetry.d.ts.map +1 -0
  89. package/dist/telemetry.js +140 -0
  90. package/dist/telemetry.js.map +1 -0
  91. package/dist/thread.d.ts +348 -0
  92. package/dist/thread.d.ts.map +1 -0
  93. package/dist/thread.js +194 -0
  94. package/dist/thread.js.map +1 -0
  95. package/dist/workproduct.d.ts +31 -0
  96. package/dist/workproduct.d.ts.map +1 -0
  97. package/dist/workproduct.js +25 -0
  98. package/dist/workproduct.js.map +1 -0
  99. package/dist/workspace.d.ts +53 -0
  100. package/dist/workspace.d.ts.map +1 -0
  101. package/dist/workspace.js +30 -0
  102. package/dist/workspace.js.map +1 -0
  103. package/generated/AgentCapabilityCatalog.schema.json +389 -0
  104. package/generated/ApplyEligibility.schema.json +44 -0
  105. package/generated/BudgetLease.schema.json +95 -0
  106. package/generated/BudgetObservation.schema.json +76 -0
  107. package/generated/ConformanceReport.schema.json +107 -0
  108. package/generated/ContextPack.schema.json +186 -0
  109. package/generated/ControlApplyCheckRequest.schema.json +54 -0
  110. package/generated/ControlApplyRequest.schema.json +74 -0
  111. package/generated/ControlHarnessListResponse.schema.json +498 -0
  112. package/generated/ControlHarnessModelsResponse.schema.json +78 -0
  113. package/generated/ControlHarnessSettingsPatch.schema.json +130 -0
  114. package/generated/ControlInteractionAnswerRequest.schema.json +48 -0
  115. package/generated/ControlInteractionAnswerResponse.schema.json +35 -0
  116. package/generated/ControlPendingInteraction.schema.json +129 -0
  117. package/generated/ControlQueuedRunInfo.schema.json +44 -0
  118. package/generated/ControlRunControlRequest.schema.json +61 -0
  119. package/generated/ControlRunControlResponse.schema.json +40 -0
  120. package/generated/ControlRunDecisionRequest.schema.json +98 -0
  121. package/generated/ControlRunDecisionResponse.schema.json +40 -0
  122. package/generated/ControlRunDetail.schema.json +1925 -0
  123. package/generated/ControlRunStartInfo.schema.json +33 -0
  124. package/generated/ControlRunStartRequest.schema.json +429 -0
  125. package/generated/ControlRunSummary.schema.json +666 -0
  126. package/generated/ControlSecretListResponse.schema.json +57 -0
  127. package/generated/ControlSettingsSnapshot.schema.json +281 -0
  128. package/generated/ControlSettingsUpdateRequest.schema.json +212 -0
  129. package/generated/ControlSetupJob.schema.json +148 -0
  130. package/generated/ControlSetupJobConfirmRequest.schema.json +18 -0
  131. package/generated/ControlSetupJobCreateRequest.schema.json +38 -0
  132. package/generated/ControlSetupJobEvent.schema.json +58 -0
  133. package/generated/ControlSetupJobListResponse.schema.json +162 -0
  134. package/generated/ControlSpecFreezeRequest.schema.json +83 -0
  135. package/generated/ControlSpecQuestionsRequest.schema.json +80 -0
  136. package/generated/ControlThread.schema.json +129 -0
  137. package/generated/ControlThreadApplyRequest.schema.json +32 -0
  138. package/generated/ControlThreadApplyResponse.schema.json +47 -0
  139. package/generated/ControlThreadCreateRequest.schema.json +107 -0
  140. package/generated/ControlThreadDetail.schema.json +515 -0
  141. package/generated/ControlThreadListResponse.schema.json +141 -0
  142. package/generated/ControlThreadUpdateRequest.schema.json +46 -0
  143. package/generated/ControlTrustListResponse.schema.json +59 -0
  144. package/generated/ControlTrustState.schema.json +45 -0
  145. package/generated/ControlTrustUpdateRequest.schema.json +26 -0
  146. package/generated/DecisionRecord.schema.json +232 -0
  147. package/generated/GateResult.schema.json +81 -0
  148. package/generated/GlobalConfig.schema.json +313 -0
  149. package/generated/HarnessEvent.schema.json +360 -0
  150. package/generated/HarnessManifest.schema.json +350 -0
  151. package/generated/HarnessModel.schema.json +41 -0
  152. package/generated/HarnessStatusDto.schema.json +486 -0
  153. package/generated/McpRunToolResult.schema.json +91 -0
  154. package/generated/OrchestrateContract.schema.json +93 -0
  155. package/generated/OrchestratePlan.schema.json +244 -0
  156. package/generated/OrchestratePlanProgress.schema.json +103 -0
  157. package/generated/ProjectConfig.schema.json +95 -0
  158. package/generated/ReviewFinding.schema.json +226 -0
  159. package/generated/RouteFallbackPayload.schema.json +79 -0
  160. package/generated/RouteProof.schema.json +111 -0
  161. package/generated/RunControl.schema.json +51 -0
  162. package/generated/RunEvent.schema.json +103 -0
  163. package/generated/RunFailure.schema.json +98 -0
  164. package/generated/RunTelemetry.schema.json +433 -0
  165. package/generated/SecretMetadata.schema.json +34 -0
  166. package/generated/Session.schema.json +80 -0
  167. package/generated/SessionReboundLineage.schema.json +73 -0
  168. package/generated/SpecPack.schema.json +372 -0
  169. package/generated/TaskContract.schema.json +501 -0
  170. package/generated/Thread.schema.json +176 -0
  171. package/generated/ThreadTurn.schema.json +172 -0
  172. package/generated/TrustConfig.schema.json +44 -0
  173. package/generated/WorkProduct.schema.json +60 -0
  174. package/generated/WorkspaceEnvelope.schema.json +94 -0
  175. package/package.json +43 -0
@@ -0,0 +1,501 @@
1
+ {
2
+ "$ref": "#/definitions/TaskContract",
3
+ "definitions": {
4
+ "TaskContract": {
5
+ "type": "object",
6
+ "properties": {
7
+ "schema_version": {
8
+ "type": "number",
9
+ "const": 2,
10
+ "description": "Schema version of the artifact; bumped on breaking ABI changes."
11
+ },
12
+ "task_id": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "description": "Task id this contract belongs to."
16
+ },
17
+ "created_at": {
18
+ "type": "string",
19
+ "minLength": 1,
20
+ "description": "When the contract was built."
21
+ },
22
+ "repo": {
23
+ "type": "object",
24
+ "properties": {
25
+ "root": {
26
+ "type": "string",
27
+ "description": "Absolute path to the project repository root."
28
+ },
29
+ "base_ref": {
30
+ "type": "string",
31
+ "description": "Git ref the run is based on."
32
+ },
33
+ "base_sha": {
34
+ "type": "string",
35
+ "description": "Resolved base commit SHA, when known."
36
+ },
37
+ "dirty_policy": {
38
+ "type": "string",
39
+ "enum": [
40
+ "refuse",
41
+ "snapshot"
42
+ ],
43
+ "description": "How a dirty working tree is handled when creating an envelope: snapshot captures the dirty state as the base SHA without touching the live tree; refuse fails loudly.",
44
+ "default": "refuse"
45
+ }
46
+ },
47
+ "required": [
48
+ "root",
49
+ "base_ref"
50
+ ],
51
+ "additionalProperties": false,
52
+ "description": "Repository the run operates on and how a dirty tree is handled."
53
+ },
54
+ "mode": {
55
+ "type": "object",
56
+ "properties": {
57
+ "kind": {
58
+ "type": "string",
59
+ "enum": [
60
+ "ask",
61
+ "plan",
62
+ "audit",
63
+ "agent",
64
+ "orchestrate"
65
+ ],
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."
67
+ }
68
+ },
69
+ "required": [
70
+ "kind"
71
+ ],
72
+ "additionalProperties": false,
73
+ "description": "Canonical run mode for this task."
74
+ },
75
+ "user_intent": {
76
+ "type": "object",
77
+ "properties": {
78
+ "raw": {
79
+ "type": "string",
80
+ "description": "The user's original prompt, verbatim."
81
+ },
82
+ "normalized": {
83
+ "type": "string",
84
+ "description": "Optional normalized restatement of the prompt."
85
+ }
86
+ },
87
+ "required": [
88
+ "raw"
89
+ ],
90
+ "additionalProperties": false,
91
+ "description": "The user's request this run is held to."
92
+ },
93
+ "spec": {
94
+ "type": "object",
95
+ "properties": {
96
+ "id": {
97
+ "type": "string",
98
+ "minLength": 1,
99
+ "description": "SpecPack id."
100
+ },
101
+ "hash": {
102
+ "type": "string",
103
+ "description": "Content hash of the frozen SpecPack."
104
+ },
105
+ "path": {
106
+ "type": "string",
107
+ "description": "On-disk path of the SpecPack artifact."
108
+ }
109
+ },
110
+ "additionalProperties": false,
111
+ "description": "Reference to the frozen SpecPack this contract was derived from, if any."
112
+ },
113
+ "success_criteria": {
114
+ "type": "array",
115
+ "items": {
116
+ "type": "object",
117
+ "properties": {
118
+ "id": {
119
+ "type": "string",
120
+ "minLength": 1,
121
+ "description": "Criterion id."
122
+ },
123
+ "text": {
124
+ "type": "string",
125
+ "description": "Human-readable statement of what must hold for the run to succeed."
126
+ },
127
+ "required": {
128
+ "type": "boolean",
129
+ "default": true,
130
+ "description": "Whether this criterion is required (vs advisory)."
131
+ }
132
+ },
133
+ "required": [
134
+ "id",
135
+ "text"
136
+ ],
137
+ "additionalProperties": false,
138
+ "description": "A single success criterion the run is held to."
139
+ },
140
+ "default": [],
141
+ "description": "Criteria the run must satisfy to succeed."
142
+ },
143
+ "non_goals": {
144
+ "type": "array",
145
+ "items": {
146
+ "type": "string"
147
+ },
148
+ "default": [],
149
+ "description": "Explicitly out-of-scope outcomes."
150
+ },
151
+ "forbidden_approaches": {
152
+ "type": "array",
153
+ "items": {
154
+ "type": "string"
155
+ },
156
+ "default": [],
157
+ "description": "Approaches the run must not take."
158
+ },
159
+ "decided_tradeoffs": {
160
+ "type": "array",
161
+ "items": {
162
+ "type": "string"
163
+ },
164
+ "default": [],
165
+ "description": "Tradeoffs already decided; reviewers must not re-litigate them."
166
+ },
167
+ "task_graph": {
168
+ "anyOf": [
169
+ {
170
+ "type": "object",
171
+ "properties": {
172
+ "nodes": {
173
+ "type": "array",
174
+ "items": {
175
+ "type": "object",
176
+ "properties": {
177
+ "id": {
178
+ "type": "string",
179
+ "minLength": 1,
180
+ "description": "Task node id."
181
+ },
182
+ "title": {
183
+ "type": "string",
184
+ "default": "",
185
+ "description": "Human-readable task title."
186
+ },
187
+ "depends_on": {
188
+ "type": "array",
189
+ "items": {
190
+ "$ref": "#/definitions/TaskContract/properties/spec/properties/id"
191
+ },
192
+ "default": [],
193
+ "description": "Ids of tasks this node depends on (graph edges)."
194
+ }
195
+ },
196
+ "required": [
197
+ "id"
198
+ ],
199
+ "additionalProperties": false,
200
+ "description": "One node of the spec-derived task graph; edges are depends_on."
201
+ },
202
+ "default": [],
203
+ "description": "Task nodes of the graph."
204
+ },
205
+ "order": {
206
+ "type": "array",
207
+ "items": {
208
+ "$ref": "#/definitions/TaskContract/properties/spec/properties/id"
209
+ },
210
+ "default": [],
211
+ "description": "Topological execution order (node ids); empty when there are no tasks."
212
+ }
213
+ },
214
+ "additionalProperties": false,
215
+ "description": "A topologically-ordered task graph built from a frozen SpecPack's tasks."
216
+ },
217
+ {
218
+ "type": "null"
219
+ }
220
+ ],
221
+ "description": "Spec-derived task graph; null until a frozen SpecPack with tasks is resolved.",
222
+ "default": null
223
+ },
224
+ "constraints": {
225
+ "type": "object",
226
+ "properties": {
227
+ "protected_paths": {
228
+ "type": "array",
229
+ "items": {
230
+ "type": "string"
231
+ },
232
+ "default": [],
233
+ "description": "Spec/config-owned globs whose changes escalate risk to a human-approval gate; cannot be suppressed by per-run protected-path approvals."
234
+ },
235
+ "auto_protected_paths": {
236
+ "type": "array",
237
+ "items": {
238
+ "type": "string"
239
+ },
240
+ "default": [],
241
+ "description": "Engine-derived gate/test path protections; per-run approvals can narrow only this set."
242
+ },
243
+ "protected_path_approvals": {
244
+ "type": "array",
245
+ "items": {
246
+ "type": "object",
247
+ "properties": {
248
+ "path": {
249
+ "type": "string",
250
+ "minLength": 1,
251
+ "pattern": "\\S",
252
+ "description": "Glob approved by the operator/user for this run; consumed only by the auto-protected gate/test path policy, not by built-in critical-path gates."
253
+ },
254
+ "reason": {
255
+ "type": "string",
256
+ "minLength": 1,
257
+ "pattern": "\\S",
258
+ "description": "Optional human-readable reason for the approval."
259
+ }
260
+ },
261
+ "required": [
262
+ "path"
263
+ ],
264
+ "additionalProperties": false,
265
+ "description": "Per-run typed operator approval allowing changes under an auto-protected gate/test path."
266
+ },
267
+ "default": [],
268
+ "description": "Per-run typed approvals for protected gate/test path changes, produced by explicit surfaces and consumed by policy."
269
+ }
270
+ },
271
+ "additionalProperties": false,
272
+ "description": "Path-protection constraints applied to a run.",
273
+ "default": {}
274
+ },
275
+ "tests": {
276
+ "type": "object",
277
+ "properties": {
278
+ "commands": {
279
+ "type": "array",
280
+ "items": {
281
+ "type": "object",
282
+ "properties": {
283
+ "id": {
284
+ "type": "string",
285
+ "minLength": 1,
286
+ "description": "Test command id."
287
+ },
288
+ "command": {
289
+ "type": "string",
290
+ "description": "Shell command executed as a deterministic gate."
291
+ },
292
+ "required": {
293
+ "type": "boolean",
294
+ "default": true,
295
+ "description": "Whether this test must pass (vs advisory)."
296
+ }
297
+ },
298
+ "required": [
299
+ "id",
300
+ "command"
301
+ ],
302
+ "additionalProperties": false,
303
+ "description": "A deterministic test command used as a verification gate."
304
+ },
305
+ "default": [],
306
+ "description": "Deterministic test commands configured as gates."
307
+ }
308
+ },
309
+ "additionalProperties": false,
310
+ "default": {
311
+ "commands": []
312
+ },
313
+ "description": "Deterministic test gates for the run."
314
+ },
315
+ "access": {
316
+ "type": "object",
317
+ "properties": {
318
+ "requested_profile": {
319
+ "type": "string",
320
+ "enum": [
321
+ "readonly",
322
+ "workspace_write",
323
+ "full",
324
+ "external_sandbox_full",
325
+ "inherit_native"
326
+ ],
327
+ "description": "Access profile the caller requested.",
328
+ "default": "workspace_write"
329
+ },
330
+ "effective_profile": {
331
+ "$ref": "#/definitions/TaskContract/properties/access/properties/requested_profile",
332
+ "default": "workspace_write",
333
+ "description": "Access profile actually enforced by the engine (mode/trust clamps applied; never client-supplied)."
334
+ }
335
+ },
336
+ "additionalProperties": false,
337
+ "default": {
338
+ "requested_profile": "workspace_write",
339
+ "effective_profile": "workspace_write"
340
+ },
341
+ "description": "Requested vs engine-enforced access profile."
342
+ },
343
+ "external_context": {
344
+ "type": "object",
345
+ "properties": {
346
+ "policy": {
347
+ "type": "string",
348
+ "enum": [
349
+ "off",
350
+ "auto",
351
+ "cached",
352
+ "live"
353
+ ],
354
+ "description": "Requested external web/context policy.",
355
+ "default": "auto"
356
+ },
357
+ "web_required": {
358
+ "type": "boolean",
359
+ "default": false,
360
+ "description": "Whether the task requires live web evidence."
361
+ },
362
+ "effective_mode": {
363
+ "$ref": "#/definitions/TaskContract/properties/external_context/properties/policy",
364
+ "default": "auto",
365
+ "description": "Policy the selected route actually executes (disclosed upgrades, e.g. cached to live)."
366
+ }
367
+ },
368
+ "additionalProperties": false,
369
+ "default": {
370
+ "policy": "auto",
371
+ "web_required": false,
372
+ "effective_mode": "auto"
373
+ },
374
+ "description": "External web/context policy for the run."
375
+ },
376
+ "tool_permission_policy": {
377
+ "type": "object",
378
+ "properties": {
379
+ "web": {
380
+ "$ref": "#/definitions/TaskContract/properties/external_context/properties/policy",
381
+ "default": "auto",
382
+ "description": "Web policy forwarded to tool permissioning."
383
+ },
384
+ "allow": {
385
+ "type": "array",
386
+ "items": {
387
+ "type": "string"
388
+ },
389
+ "default": [],
390
+ "description": "Tool names explicitly allowed."
391
+ },
392
+ "deny": {
393
+ "type": "array",
394
+ "items": {
395
+ "type": "string"
396
+ },
397
+ "default": [],
398
+ "description": "Tool names explicitly denied."
399
+ }
400
+ },
401
+ "additionalProperties": false,
402
+ "default": {
403
+ "web": "auto",
404
+ "allow": [],
405
+ "deny": []
406
+ },
407
+ "description": "Tool permission policy passed to harnesses that support allow/deny lists."
408
+ },
409
+ "budget": {
410
+ "type": "object",
411
+ "properties": {
412
+ "portfolio": {
413
+ "type": "string",
414
+ "enum": [
415
+ "daily-rich",
416
+ "balanced",
417
+ "cheapest",
418
+ "strongest",
419
+ "burn",
420
+ "subscription-first",
421
+ "api-overflow",
422
+ "conserve-claude",
423
+ "conserve-codex"
424
+ ],
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"
427
+ },
428
+ "max_usd": {
429
+ "type": [
430
+ "number",
431
+ "null"
432
+ ],
433
+ "default": null,
434
+ "description": "Hard USD cap for the run; null = no cap."
435
+ }
436
+ },
437
+ "additionalProperties": false,
438
+ "default": {},
439
+ "description": "Budget portfolio and spend cap for the run."
440
+ },
441
+ "routing_models": {
442
+ "type": "object",
443
+ "additionalProperties": {
444
+ "type": "string"
445
+ },
446
+ "default": {},
447
+ "description": "Resolved harness-scoped model map for this run (harness id to model id); empty means every route uses its per-harness settings default."
448
+ },
449
+ "convergence": {
450
+ "type": "object",
451
+ "properties": {
452
+ "require_tests_pass": {
453
+ "type": "boolean",
454
+ "default": true,
455
+ "description": "Require all configured test commands to pass before convergence."
456
+ },
457
+ "require_no_accepted_block_open": {
458
+ "type": "boolean",
459
+ "default": true,
460
+ "description": "Block convergence while an accepted BLOCK review finding is still open."
461
+ },
462
+ "require_no_accepted_fix_first_open": {
463
+ "type": "boolean",
464
+ "default": true,
465
+ "description": "Block convergence while an accepted FIX_FIRST review finding is still open."
466
+ },
467
+ "require_final_cross_family_clean_review": {
468
+ "type": "boolean",
469
+ "default": true,
470
+ "description": "Require a final clean review from a different provider family before convergence."
471
+ },
472
+ "require_final_diff_stable_after_review": {
473
+ "type": "boolean",
474
+ "default": true,
475
+ "description": "Require the diff to be unchanged after the final review (a mutated diff makes the review stale)."
476
+ },
477
+ "require_no_accepted_needs_human_open": {
478
+ "type": "boolean",
479
+ "default": true,
480
+ "description": "Block convergence while an accepted NEEDS_HUMAN escalation is still open."
481
+ }
482
+ },
483
+ "additionalProperties": false,
484
+ "description": "Predicate deciding when an until-clean/convergence run may stop as successful.",
485
+ "default": {}
486
+ }
487
+ },
488
+ "required": [
489
+ "schema_version",
490
+ "task_id",
491
+ "created_at",
492
+ "repo",
493
+ "mode",
494
+ "user_intent"
495
+ ],
496
+ "additionalProperties": false,
497
+ "description": "Immutable contract describing a single run; built once, hashed, never mutated."
498
+ }
499
+ },
500
+ "$schema": "http://json-schema.org/draft-07/schema#"
501
+ }
@@ -0,0 +1,176 @@
1
+ {
2
+ "$ref": "#/definitions/Thread",
3
+ "definitions": {
4
+ "Thread": {
5
+ "type": "object",
6
+ "properties": {
7
+ "schema_version": {
8
+ "type": "number",
9
+ "const": 2,
10
+ "description": "Schema version of the artifact; bumped on breaking ABI changes."
11
+ },
12
+ "id": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "description": "Thread id."
16
+ },
17
+ "created_at": {
18
+ "type": "string",
19
+ "minLength": 1,
20
+ "description": "When the thread was created."
21
+ },
22
+ "updated_at": {
23
+ "type": "string",
24
+ "minLength": 1,
25
+ "description": "When the thread was last updated."
26
+ },
27
+ "repo": {
28
+ "anyOf": [
29
+ {
30
+ "type": "object",
31
+ "properties": {
32
+ "root": {
33
+ "type": "string",
34
+ "description": "Absolute path of the project root."
35
+ },
36
+ "base_ref": {
37
+ "type": "string",
38
+ "description": "Git ref the thread works against."
39
+ }
40
+ },
41
+ "required": [
42
+ "root",
43
+ "base_ref"
44
+ ],
45
+ "additionalProperties": false
46
+ },
47
+ {
48
+ "type": "null"
49
+ }
50
+ ],
51
+ "default": null,
52
+ "description": "Project the thread is anchored to; null for a no-project Ask thread."
53
+ },
54
+ "title": {
55
+ "type": [
56
+ "string",
57
+ "null"
58
+ ],
59
+ "default": null,
60
+ "description": "Thread title; null until set."
61
+ },
62
+ "mode": {
63
+ "type": "string",
64
+ "enum": [
65
+ "ask",
66
+ "plan",
67
+ "audit",
68
+ "agent",
69
+ "orchestrate"
70
+ ],
71
+ "description": "Default mode for new turns; individual turns may override.",
72
+ "default": "agent"
73
+ },
74
+ "auth_preference": {
75
+ "type": "string",
76
+ "enum": [
77
+ "subscription",
78
+ "api_key",
79
+ "auto"
80
+ ],
81
+ "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
+ "default": "auto"
83
+ },
84
+ "primary_harness": {
85
+ "type": [
86
+ "string",
87
+ "null"
88
+ ],
89
+ "default": null,
90
+ "description": "Sticky primary harness for the thread (re-routable); an ordering bias, not a privileged role."
91
+ },
92
+ "eligible_harnesses": {
93
+ "type": "array",
94
+ "items": {
95
+ "type": "string"
96
+ },
97
+ "default": [],
98
+ "description": "Sticky eligible harness pool for the thread (races run one candidate per pool member); empty = the engine auto-pools doctor-ok harnesses."
99
+ },
100
+ "workspace": {
101
+ "type": "object",
102
+ "properties": {
103
+ "mode": {
104
+ "type": "string",
105
+ "enum": [
106
+ "in_place",
107
+ "isolated"
108
+ ],
109
+ "description": "Per-thread workspace mode: in_place mutates the live project tree directly (the default); isolated keeps a persistent git worktree per thread that apply merges into the project.",
110
+ "default": "in_place"
111
+ },
112
+ "worktree_path": {
113
+ "type": [
114
+ "string",
115
+ "null"
116
+ ],
117
+ "default": null,
118
+ "description": "Persistent worktree path; set lazily on the first write turn of an isolated thread."
119
+ },
120
+ "base_sha": {
121
+ "type": [
122
+ "string",
123
+ "null"
124
+ ],
125
+ "default": null,
126
+ "description": "Snapshot SHA the isolated worktree (or last apply) is based on."
127
+ }
128
+ },
129
+ "additionalProperties": false,
130
+ "description": "How the thread's turns touch files (in-place live tree vs isolated worktree).",
131
+ "default": {}
132
+ },
133
+ "run_ids": {
134
+ "type": "array",
135
+ "items": {
136
+ "type": "string",
137
+ "minLength": 1,
138
+ "description": "Non-empty identifier string."
139
+ },
140
+ "default": [],
141
+ "description": "Ordered run lineage (each run is a turn move)."
142
+ },
143
+ "head_run_id": {
144
+ "anyOf": [
145
+ {
146
+ "$ref": "#/definitions/Thread/properties/run_ids/items"
147
+ },
148
+ {
149
+ "type": "null"
150
+ }
151
+ ],
152
+ "description": "Most recent run of the thread; null before the first turn runs.",
153
+ "default": null
154
+ },
155
+ "state": {
156
+ "type": "string",
157
+ "enum": [
158
+ "active",
159
+ "closed"
160
+ ],
161
+ "description": "Thread lifecycle state: active or explicitly closed (archived). Blocked is a live projection, not a thread state.",
162
+ "default": "active"
163
+ }
164
+ },
165
+ "required": [
166
+ "schema_version",
167
+ "id",
168
+ "created_at",
169
+ "updated_at"
170
+ ],
171
+ "additionalProperties": false,
172
+ "description": "The Claudexor-owned conversation about a project; runs are turns inside it. SSOT for lineage; vendor sessions are caches."
173
+ }
174
+ },
175
+ "$schema": "http://json-schema.org/draft-07/schema#"
176
+ }