@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,1686 @@
1
+ import { z } from "zod";
2
+ /** Per-candidate evidence card for a race run (projected from
3
+ * attempts/<id>/attempt.yaml + reviews/<id>.yaml + the decision winner).
4
+ * The macOS Candidates tab renders these; SSE freshness rides the client's
5
+ * existing refresh-on-event. */
6
+ export declare const ControlCandidate: z.ZodObject<{
7
+ attemptId: z.ZodString;
8
+ harnessId: z.ZodString;
9
+ label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
10
+ costUsd: z.ZodDefault<z.ZodNumber>;
11
+ costEstimated: z.ZodDefault<z.ZodBoolean>;
12
+ errored: z.ZodDefault<z.ZodBoolean>;
13
+ gatesPassed: z.ZodDefault<z.ZodNumber>;
14
+ gatesTotal: z.ZodDefault<z.ZodNumber>;
15
+ /** Blocking review findings count (accepted blockers). */
16
+ blockers: z.ZodDefault<z.ZodNumber>;
17
+ reviewVerified: z.ZodDefault<z.ZodBoolean>;
18
+ finalReviewClean: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
19
+ winner: z.ZodDefault<z.ZodBoolean>;
20
+ diffstat: z.ZodDefault<z.ZodNullable<z.ZodObject<{
21
+ files: z.ZodDefault<z.ZodNumber>;
22
+ additions: z.ZodDefault<z.ZodNumber>;
23
+ deletions: z.ZodDefault<z.ZodNumber>;
24
+ }, "strip", z.ZodTypeAny, {
25
+ files: number;
26
+ additions: number;
27
+ deletions: number;
28
+ }, {
29
+ files?: number | undefined;
30
+ additions?: number | undefined;
31
+ deletions?: number | undefined;
32
+ }>>>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ label: string | null;
35
+ winner: boolean;
36
+ harnessId: string;
37
+ attemptId: string;
38
+ blockers: number;
39
+ costUsd: number;
40
+ costEstimated: boolean;
41
+ errored: boolean;
42
+ gatesPassed: number;
43
+ gatesTotal: number;
44
+ reviewVerified: boolean;
45
+ finalReviewClean: boolean | null;
46
+ diffstat: {
47
+ files: number;
48
+ additions: number;
49
+ deletions: number;
50
+ } | null;
51
+ }, {
52
+ harnessId: string;
53
+ attemptId: string;
54
+ label?: string | null | undefined;
55
+ winner?: boolean | undefined;
56
+ blockers?: number | undefined;
57
+ costUsd?: number | undefined;
58
+ costEstimated?: boolean | undefined;
59
+ errored?: boolean | undefined;
60
+ gatesPassed?: number | undefined;
61
+ gatesTotal?: number | undefined;
62
+ reviewVerified?: boolean | undefined;
63
+ finalReviewClean?: boolean | null | undefined;
64
+ diffstat?: {
65
+ files?: number | undefined;
66
+ additions?: number | undefined;
67
+ deletions?: number | undefined;
68
+ } | null | undefined;
69
+ }>;
70
+ export type ControlCandidate = z.infer<typeof ControlCandidate>;
71
+ export declare const ControlRunDetail: z.ZodObject<{
72
+ summary: z.ZodObject<{
73
+ jobId: z.ZodString;
74
+ runId: z.ZodString;
75
+ taskId: z.ZodOptional<z.ZodString>;
76
+ state: z.ZodEnum<["queued", "running", "blocked", "succeeded", "no_op", "ungated", "review_not_run", "failed", "cancelled", "interrupted", "exhausted", "not_converged", "stuck_no_progress"]>;
77
+ runDir: z.ZodOptional<z.ZodString>;
78
+ error: z.ZodOptional<z.ZodString>;
79
+ failure: z.ZodDefault<z.ZodNullable<z.ZodObject<{
80
+ phase: z.ZodDefault<z.ZodString>;
81
+ category: z.ZodDefault<z.ZodEnum<["validation", "project", "auth", "harness_unavailable", "harness_error", "budget", "policy", "cancelled", "internal", "unknown"]>>;
82
+ harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
83
+ attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
84
+ safeMessage: z.ZodString;
85
+ rawDetailRef: z.ZodDefault<z.ZodNullable<z.ZodString>>;
86
+ logRefs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
87
+ eventRefs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
88
+ runDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
89
+ nextActions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
90
+ }, "strip", z.ZodTypeAny, {
91
+ runDir: string | null;
92
+ category: "validation" | "unknown" | "harness_error" | "auth" | "cancelled" | "budget" | "project" | "policy" | "harness_unavailable" | "internal";
93
+ phase: string;
94
+ harnessId: string | null;
95
+ attemptId: string | null;
96
+ safeMessage: string;
97
+ rawDetailRef: string | null;
98
+ logRefs: string[];
99
+ eventRefs: string[];
100
+ nextActions: string[];
101
+ }, {
102
+ safeMessage: string;
103
+ runDir?: string | null | undefined;
104
+ category?: "validation" | "unknown" | "harness_error" | "auth" | "cancelled" | "budget" | "project" | "policy" | "harness_unavailable" | "internal" | undefined;
105
+ phase?: string | undefined;
106
+ harnessId?: string | null | undefined;
107
+ attemptId?: string | null | undefined;
108
+ rawDetailRef?: string | null | undefined;
109
+ logRefs?: string[] | undefined;
110
+ eventRefs?: string[] | undefined;
111
+ nextActions?: string[] | undefined;
112
+ }>>>;
113
+ project: z.ZodDefault<z.ZodObject<{
114
+ kind: z.ZodDefault<z.ZodEnum<["project", "none"]>>;
115
+ root: z.ZodDefault<z.ZodNullable<z.ZodString>>;
116
+ projectName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
117
+ context: z.ZodDefault<z.ZodEnum<["off", "auto"]>>;
118
+ }, "strip", z.ZodTypeAny, {
119
+ kind: "none" | "project";
120
+ root: string | null;
121
+ context: "off" | "auto";
122
+ projectName: string | null;
123
+ }, {
124
+ kind?: "none" | "project" | undefined;
125
+ root?: string | null | undefined;
126
+ context?: "off" | "auto" | undefined;
127
+ projectName?: string | null | undefined;
128
+ }>>;
129
+ mode: z.ZodOptional<z.ZodEnum<["ask", "plan", "audit", "agent", "orchestrate"]>>;
130
+ strategy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["race", "attempts", "until_clean", "swarm", "create"]>>>;
131
+ prompt: z.ZodOptional<z.ZodString>;
132
+ harnesses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
133
+ primaryHarness: z.ZodOptional<z.ZodString>;
134
+ portfolio: z.ZodOptional<z.ZodEnum<["daily-rich", "balanced", "cheapest", "strongest", "burn", "subscription-first", "api-overflow", "conserve-claude", "conserve-codex"]>>;
135
+ model: z.ZodOptional<z.ZodString>;
136
+ reviewerPanel: z.ZodOptional<z.ZodArray<z.ZodObject<{
137
+ harness: z.ZodString;
138
+ model: z.ZodOptional<z.ZodString>;
139
+ effort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>;
140
+ }, "strict", z.ZodTypeAny, {
141
+ harness: string;
142
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
143
+ model?: string | undefined;
144
+ }, {
145
+ harness: string;
146
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
147
+ model?: string | undefined;
148
+ }>, "many">>;
149
+ protectedPathApprovals: z.ZodOptional<z.ZodArray<z.ZodObject<{
150
+ path: z.ZodString;
151
+ reason: z.ZodOptional<z.ZodString>;
152
+ }, "strict", z.ZodTypeAny, {
153
+ path: string;
154
+ reason?: string | undefined;
155
+ }, {
156
+ path: string;
157
+ reason?: string | undefined;
158
+ }>, "many">>;
159
+ n: z.ZodOptional<z.ZodNumber>;
160
+ maxUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
161
+ spendUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
162
+ spendEstimated: z.ZodOptional<z.ZodBoolean>;
163
+ access: z.ZodOptional<z.ZodEnum<["readonly", "workspace_write", "full", "external_sandbox_full", "inherit_native"]>>;
164
+ requestedAccess: z.ZodOptional<z.ZodEnum<["readonly", "workspace_write", "full", "external_sandbox_full", "inherit_native"]>>;
165
+ effectiveAccess: z.ZodOptional<z.ZodEnum<["readonly", "workspace_write", "full", "external_sandbox_full", "inherit_native"]>>;
166
+ externalContextPolicy: z.ZodOptional<z.ZodEnum<["off", "auto", "cached", "live"]>>;
167
+ webRequired: z.ZodOptional<z.ZodBoolean>;
168
+ webMode: z.ZodOptional<z.ZodEnum<["off", "auto", "cached", "live"]>>;
169
+ webEvidence: z.ZodDefault<z.ZodObject<{
170
+ required: z.ZodDefault<z.ZodBoolean>;
171
+ mode: z.ZodDefault<z.ZodEnum<["off", "auto", "cached", "live"]>>;
172
+ effectiveMode: z.ZodDefault<z.ZodEnum<["off", "auto", "cached", "live"]>>;
173
+ attempted: z.ZodDefault<z.ZodBoolean>;
174
+ satisfied: z.ZodDefault<z.ZodBoolean>;
175
+ status: z.ZodDefault<z.ZodEnum<["none", "attempted", "satisfied", "failed", "unverified"]>>;
176
+ tool: z.ZodDefault<z.ZodNullable<z.ZodString>>;
177
+ target: z.ZodDefault<z.ZodNullable<z.ZodString>>;
178
+ errorSummary: z.ZodDefault<z.ZodNullable<z.ZodString>>;
179
+ rawDetailRef: z.ZodDefault<z.ZodNullable<z.ZodString>>;
180
+ available: z.ZodDefault<z.ZodBoolean>;
181
+ }, "strip", z.ZodTypeAny, {
182
+ status: "none" | "failed" | "attempted" | "unverified" | "satisfied";
183
+ target: string | null;
184
+ tool: string | null;
185
+ mode: "off" | "auto" | "cached" | "live";
186
+ required: boolean;
187
+ attempted: boolean;
188
+ rawDetailRef: string | null;
189
+ effectiveMode: "off" | "auto" | "cached" | "live";
190
+ satisfied: boolean;
191
+ errorSummary: string | null;
192
+ available: boolean;
193
+ }, {
194
+ status?: "none" | "failed" | "attempted" | "unverified" | "satisfied" | undefined;
195
+ target?: string | null | undefined;
196
+ tool?: string | null | undefined;
197
+ mode?: "off" | "auto" | "cached" | "live" | undefined;
198
+ required?: boolean | undefined;
199
+ attempted?: boolean | undefined;
200
+ rawDetailRef?: string | null | undefined;
201
+ effectiveMode?: "off" | "auto" | "cached" | "live" | undefined;
202
+ satisfied?: boolean | undefined;
203
+ errorSummary?: string | null | undefined;
204
+ available?: boolean | undefined;
205
+ }>>;
206
+ toolPermissionPolicy: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
207
+ outputReadyState: z.ZodDefault<z.ZodEnum<["pending", "finalizing", "ready", "diagnostic"]>>;
208
+ toolWarningsTotal: z.ZodDefault<z.ZodNumber>;
209
+ result: z.ZodDefault<z.ZodObject<{
210
+ kind: z.ZodDefault<z.ZodEnum<["patch", "answer", "plan", "report", "none"]>>;
211
+ diffStat: z.ZodDefault<z.ZodNullable<z.ZodObject<{
212
+ files: z.ZodNumber;
213
+ additions: z.ZodNumber;
214
+ deletions: z.ZodNumber;
215
+ }, "strip", z.ZodTypeAny, {
216
+ files: number;
217
+ additions: number;
218
+ deletions: number;
219
+ }, {
220
+ files: number;
221
+ additions: number;
222
+ deletions: number;
223
+ }>>>;
224
+ blockers: z.ZodDefault<z.ZodNumber>;
225
+ adopted: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
226
+ applyState: z.ZodDefault<z.ZodEnum<["not_applied", "applied", "applied_review_blocked", "reverted"]>>;
227
+ preTurnSha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
228
+ postTurnSha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
229
+ revertable: z.ZodDefault<z.ZodBoolean>;
230
+ }, "strip", z.ZodTypeAny, {
231
+ kind: "plan" | "none" | "patch" | "report" | "answer";
232
+ diffStat: {
233
+ files: number;
234
+ additions: number;
235
+ deletions: number;
236
+ } | null;
237
+ blockers: number;
238
+ adopted: boolean | null;
239
+ applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
240
+ preTurnSha: string | null;
241
+ postTurnSha: string | null;
242
+ revertable: boolean;
243
+ }, {
244
+ kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
245
+ diffStat?: {
246
+ files: number;
247
+ additions: number;
248
+ deletions: number;
249
+ } | null | undefined;
250
+ blockers?: number | undefined;
251
+ adopted?: boolean | null | undefined;
252
+ applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
253
+ preTurnSha?: string | null | undefined;
254
+ postTurnSha?: string | null | undefined;
255
+ revertable?: boolean | undefined;
256
+ }>>;
257
+ waitingOnUser: z.ZodDefault<z.ZodBoolean>;
258
+ route: z.ZodDefault<z.ZodNullable<z.ZodObject<{
259
+ requestedModel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
260
+ observedModel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
261
+ harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
262
+ verified: z.ZodDefault<z.ZodBoolean>;
263
+ }, "strip", z.ZodTypeAny, {
264
+ verified: boolean;
265
+ harnessId: string | null;
266
+ requestedModel: string | null;
267
+ observedModel: string | null;
268
+ }, {
269
+ verified?: boolean | undefined;
270
+ harnessId?: string | null | undefined;
271
+ requestedModel?: string | null | undefined;
272
+ observedModel?: string | null | undefined;
273
+ }>>>;
274
+ tests: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
275
+ specId: z.ZodOptional<z.ZodString>;
276
+ specHash: z.ZodOptional<z.ZodString>;
277
+ createdAt: z.ZodOptional<z.ZodString>;
278
+ startedAt: z.ZodOptional<z.ZodString>;
279
+ finishedAt: z.ZodOptional<z.ZodString>;
280
+ }, "strip", z.ZodTypeAny, {
281
+ state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
282
+ runId: string;
283
+ project: {
284
+ kind: "none" | "project";
285
+ root: string | null;
286
+ context: "off" | "auto";
287
+ projectName: string | null;
288
+ };
289
+ jobId: string;
290
+ failure: {
291
+ runDir: string | null;
292
+ category: "validation" | "unknown" | "harness_error" | "auth" | "cancelled" | "budget" | "project" | "policy" | "harness_unavailable" | "internal";
293
+ phase: string;
294
+ harnessId: string | null;
295
+ attemptId: string | null;
296
+ safeMessage: string;
297
+ rawDetailRef: string | null;
298
+ logRefs: string[];
299
+ eventRefs: string[];
300
+ nextActions: string[];
301
+ } | null;
302
+ webEvidence: {
303
+ status: "none" | "failed" | "attempted" | "unverified" | "satisfied";
304
+ target: string | null;
305
+ tool: string | null;
306
+ mode: "off" | "auto" | "cached" | "live";
307
+ required: boolean;
308
+ attempted: boolean;
309
+ rawDetailRef: string | null;
310
+ effectiveMode: "off" | "auto" | "cached" | "live";
311
+ satisfied: boolean;
312
+ errorSummary: string | null;
313
+ available: boolean;
314
+ };
315
+ outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
316
+ toolWarningsTotal: number;
317
+ result: {
318
+ kind: "plan" | "none" | "patch" | "report" | "answer";
319
+ diffStat: {
320
+ files: number;
321
+ additions: number;
322
+ deletions: number;
323
+ } | null;
324
+ blockers: number;
325
+ adopted: boolean | null;
326
+ applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
327
+ preTurnSha: string | null;
328
+ postTurnSha: string | null;
329
+ revertable: boolean;
330
+ };
331
+ waitingOnUser: boolean;
332
+ route: {
333
+ verified: boolean;
334
+ harnessId: string | null;
335
+ requestedModel: string | null;
336
+ observedModel: string | null;
337
+ } | null;
338
+ prompt?: string | undefined;
339
+ access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
340
+ error?: string | undefined;
341
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
342
+ harnesses?: string[] | undefined;
343
+ runDir?: string | undefined;
344
+ tests?: string[] | undefined;
345
+ portfolio?: "daily-rich" | "balanced" | "cheapest" | "strongest" | "burn" | "subscription-first" | "api-overflow" | "conserve-claude" | "conserve-codex" | undefined;
346
+ n?: number | undefined;
347
+ model?: string | undefined;
348
+ primaryHarness?: string | undefined;
349
+ maxUsd?: number | null | undefined;
350
+ externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
351
+ protectedPathApprovals?: {
352
+ path: string;
353
+ reason?: string | undefined;
354
+ }[] | undefined;
355
+ specId?: string | undefined;
356
+ specHash?: string | undefined;
357
+ reviewerPanel?: {
358
+ harness: string;
359
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
360
+ model?: string | undefined;
361
+ }[] | undefined;
362
+ createdAt?: string | undefined;
363
+ startedAt?: string | undefined;
364
+ finishedAt?: string | undefined;
365
+ taskId?: string | undefined;
366
+ strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
367
+ spendUsd?: number | null | undefined;
368
+ spendEstimated?: boolean | undefined;
369
+ requestedAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
370
+ effectiveAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
371
+ webRequired?: boolean | undefined;
372
+ webMode?: "off" | "auto" | "cached" | "live" | undefined;
373
+ toolPermissionPolicy?: Record<string, unknown> | undefined;
374
+ }, {
375
+ state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
376
+ runId: string;
377
+ jobId: string;
378
+ prompt?: string | undefined;
379
+ access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
380
+ error?: string | undefined;
381
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
382
+ harnesses?: string[] | undefined;
383
+ runDir?: string | undefined;
384
+ tests?: string[] | undefined;
385
+ portfolio?: "daily-rich" | "balanced" | "cheapest" | "strongest" | "burn" | "subscription-first" | "api-overflow" | "conserve-claude" | "conserve-codex" | undefined;
386
+ project?: {
387
+ kind?: "none" | "project" | undefined;
388
+ root?: string | null | undefined;
389
+ context?: "off" | "auto" | undefined;
390
+ projectName?: string | null | undefined;
391
+ } | undefined;
392
+ n?: number | undefined;
393
+ model?: string | undefined;
394
+ primaryHarness?: string | undefined;
395
+ maxUsd?: number | null | undefined;
396
+ externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
397
+ protectedPathApprovals?: {
398
+ path: string;
399
+ reason?: string | undefined;
400
+ }[] | undefined;
401
+ specId?: string | undefined;
402
+ specHash?: string | undefined;
403
+ reviewerPanel?: {
404
+ harness: string;
405
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
406
+ model?: string | undefined;
407
+ }[] | undefined;
408
+ createdAt?: string | undefined;
409
+ startedAt?: string | undefined;
410
+ finishedAt?: string | undefined;
411
+ taskId?: string | undefined;
412
+ failure?: {
413
+ safeMessage: string;
414
+ runDir?: string | null | undefined;
415
+ category?: "validation" | "unknown" | "harness_error" | "auth" | "cancelled" | "budget" | "project" | "policy" | "harness_unavailable" | "internal" | undefined;
416
+ phase?: string | undefined;
417
+ harnessId?: string | null | undefined;
418
+ attemptId?: string | null | undefined;
419
+ rawDetailRef?: string | null | undefined;
420
+ logRefs?: string[] | undefined;
421
+ eventRefs?: string[] | undefined;
422
+ nextActions?: string[] | undefined;
423
+ } | null | undefined;
424
+ strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
425
+ spendUsd?: number | null | undefined;
426
+ spendEstimated?: boolean | undefined;
427
+ requestedAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
428
+ effectiveAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
429
+ webRequired?: boolean | undefined;
430
+ webMode?: "off" | "auto" | "cached" | "live" | undefined;
431
+ webEvidence?: {
432
+ status?: "none" | "failed" | "attempted" | "unverified" | "satisfied" | undefined;
433
+ target?: string | null | undefined;
434
+ tool?: string | null | undefined;
435
+ mode?: "off" | "auto" | "cached" | "live" | undefined;
436
+ required?: boolean | undefined;
437
+ attempted?: boolean | undefined;
438
+ rawDetailRef?: string | null | undefined;
439
+ effectiveMode?: "off" | "auto" | "cached" | "live" | undefined;
440
+ satisfied?: boolean | undefined;
441
+ errorSummary?: string | null | undefined;
442
+ available?: boolean | undefined;
443
+ } | undefined;
444
+ toolPermissionPolicy?: Record<string, unknown> | undefined;
445
+ outputReadyState?: "pending" | "finalizing" | "ready" | "diagnostic" | undefined;
446
+ toolWarningsTotal?: number | undefined;
447
+ result?: {
448
+ kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
449
+ diffStat?: {
450
+ files: number;
451
+ additions: number;
452
+ deletions: number;
453
+ } | null | undefined;
454
+ blockers?: number | undefined;
455
+ adopted?: boolean | null | undefined;
456
+ applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
457
+ preTurnSha?: string | null | undefined;
458
+ postTurnSha?: string | null | undefined;
459
+ revertable?: boolean | undefined;
460
+ } | undefined;
461
+ waitingOnUser?: boolean | undefined;
462
+ route?: {
463
+ verified?: boolean | undefined;
464
+ harnessId?: string | null | undefined;
465
+ requestedModel?: string | null | undefined;
466
+ observedModel?: string | null | undefined;
467
+ } | null | undefined;
468
+ }>;
469
+ /**
470
+ * Highest event seq included in this snapshot. Clients subscribe to the
471
+ * event stream from this cursor; events with seq <= lastSeq are already
472
+ * reflected in the snapshot (snapshot-then-subscribe, no gaps, no dupes).
473
+ */
474
+ lastSeq: z.ZodDefault<z.ZodNumber>;
475
+ artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
476
+ path: z.ZodString;
477
+ kind: z.ZodEnum<["file", "directory"]>;
478
+ bytes: z.ZodOptional<z.ZodNumber>;
479
+ mime: z.ZodOptional<z.ZodString>;
480
+ }, "strip", z.ZodTypeAny, {
481
+ path: string;
482
+ kind: "file" | "directory";
483
+ mime?: string | undefined;
484
+ bytes?: number | undefined;
485
+ }, {
486
+ path: string;
487
+ kind: "file" | "directory";
488
+ mime?: string | undefined;
489
+ bytes?: number | undefined;
490
+ }>, "many">>;
491
+ primaryOutput: z.ZodDefault<z.ZodNullable<z.ZodObject<{
492
+ kind: z.ZodEnum<["answer", "report", "plan", "summary", "patch", "diagnostic"]>;
493
+ path: z.ZodString;
494
+ text: z.ZodDefault<z.ZodNullable<z.ZodString>>;
495
+ bytes: z.ZodOptional<z.ZodNumber>;
496
+ }, "strip", z.ZodTypeAny, {
497
+ path: string;
498
+ kind: "diagnostic" | "plan" | "summary" | "patch" | "report" | "answer";
499
+ text: string | null;
500
+ bytes?: number | undefined;
501
+ }, {
502
+ path: string;
503
+ kind: "diagnostic" | "plan" | "summary" | "patch" | "report" | "answer";
504
+ text?: string | null | undefined;
505
+ bytes?: number | undefined;
506
+ }>>>;
507
+ timeline: z.ZodDefault<z.ZodArray<z.ZodObject<{
508
+ type: z.ZodString;
509
+ ts: z.ZodOptional<z.ZodString>;
510
+ harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
511
+ attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
512
+ title: z.ZodString;
513
+ detail: z.ZodDefault<z.ZodNullable<z.ZodString>>;
514
+ severity: z.ZodDefault<z.ZodEnum<["info", "warning", "error"]>>;
515
+ toolName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
516
+ target: z.ZodDefault<z.ZodNullable<z.ZodString>>;
517
+ errorSummary: z.ZodDefault<z.ZodNullable<z.ZodString>>;
518
+ rawRef: z.ZodDefault<z.ZodNullable<z.ZodString>>;
519
+ }, "strip", z.ZodTypeAny, {
520
+ type: string;
521
+ detail: string | null;
522
+ target: string | null;
523
+ title: string;
524
+ severity: "error" | "info" | "warning";
525
+ harnessId: string | null;
526
+ attemptId: string | null;
527
+ errorSummary: string | null;
528
+ toolName: string | null;
529
+ rawRef: string | null;
530
+ ts?: string | undefined;
531
+ }, {
532
+ type: string;
533
+ title: string;
534
+ detail?: string | null | undefined;
535
+ target?: string | null | undefined;
536
+ ts?: string | undefined;
537
+ severity?: "error" | "info" | "warning" | undefined;
538
+ harnessId?: string | null | undefined;
539
+ attemptId?: string | null | undefined;
540
+ errorSummary?: string | null | undefined;
541
+ toolName?: string | null | undefined;
542
+ rawRef?: string | null | undefined;
543
+ }>, "many">>;
544
+ budget: z.ZodDefault<z.ZodObject<{
545
+ maxUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
546
+ spendUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
547
+ remainingUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
548
+ estimated: z.ZodDefault<z.ZodBoolean>;
549
+ source: z.ZodDefault<z.ZodEnum<["decision", "events", "settings", "unknown"]>>;
550
+ }, "strip", z.ZodTypeAny, {
551
+ source: "unknown" | "decision" | "events" | "settings";
552
+ estimated: boolean;
553
+ maxUsd: number | null;
554
+ spendUsd: number | null;
555
+ remainingUsd: number | null;
556
+ }, {
557
+ source?: "unknown" | "decision" | "events" | "settings" | undefined;
558
+ estimated?: boolean | undefined;
559
+ maxUsd?: number | null | undefined;
560
+ spendUsd?: number | null | undefined;
561
+ remainingUsd?: number | null | undefined;
562
+ }>>;
563
+ finalSummary: z.ZodDefault<z.ZodNullable<z.ZodString>>;
564
+ decision: z.ZodDefault<z.ZodNullable<z.ZodObject<{
565
+ winner: z.ZodNullable<z.ZodString>;
566
+ status: z.ZodEnum<["success", "no_op", "ungated", "review_not_run", "blocked", "not_converged", "stuck_no_progress", "failed", "exhausted", "cancelled"]>;
567
+ outcome: z.ZodDefault<z.ZodEnum<["ready", "no_op", "ungated", "review_not_run", "blocked"]>>;
568
+ why_winner: z.ZodDefault<z.ZodString>;
569
+ why_not_others: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
570
+ accepted_risks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
571
+ final_checks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
572
+ evidence_facts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
573
+ budget_summary: z.ZodDefault<z.ZodObject<{
574
+ spend_usd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
575
+ estimated: z.ZodDefault<z.ZodBoolean>;
576
+ }, "strip", z.ZodTypeAny, {
577
+ estimated: boolean;
578
+ spend_usd: number | null;
579
+ }, {
580
+ estimated?: boolean | undefined;
581
+ spend_usd?: number | null | undefined;
582
+ }>>;
583
+ apply_recommendation: z.ZodDefault<z.ZodEnum<["apply", "inspect", "continue", "split_task", "human_review"]>>;
584
+ verification_basis: z.ZodDefault<z.ZodEnum<["none", "cross_family_review", "both"]>>;
585
+ final_verify: z.ZodDefault<z.ZodNullable<z.ZodObject<{
586
+ attempted: z.ZodBoolean;
587
+ base_sha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
588
+ applied_cleanly: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
589
+ gates_passed: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
590
+ gates: z.ZodDefault<z.ZodArray<z.ZodObject<{
591
+ id: z.ZodString;
592
+ status: z.ZodString;
593
+ }, "strip", z.ZodTypeAny, {
594
+ status: string;
595
+ id: string;
596
+ }, {
597
+ status: string;
598
+ id: string;
599
+ }>, "many">>;
600
+ duration_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
601
+ reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
602
+ }, "strip", z.ZodTypeAny, {
603
+ duration_ms: number | null;
604
+ base_sha: string | null;
605
+ reason: string | null;
606
+ attempted: boolean;
607
+ applied_cleanly: boolean | null;
608
+ gates_passed: boolean | null;
609
+ gates: {
610
+ status: string;
611
+ id: string;
612
+ }[];
613
+ }, {
614
+ attempted: boolean;
615
+ duration_ms?: number | null | undefined;
616
+ base_sha?: string | null | undefined;
617
+ reason?: string | null | undefined;
618
+ applied_cleanly?: boolean | null | undefined;
619
+ gates_passed?: boolean | null | undefined;
620
+ gates?: {
621
+ status: string;
622
+ id: string;
623
+ }[] | undefined;
624
+ }>>>;
625
+ }, "strip", z.ZodTypeAny, {
626
+ status: "cancelled" | "success" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted";
627
+ winner: string | null;
628
+ outcome: "ready" | "no_op" | "ungated" | "review_not_run" | "blocked";
629
+ why_winner: string;
630
+ why_not_others: Record<string, string>;
631
+ accepted_risks: string[];
632
+ final_checks: string[];
633
+ evidence_facts: string[];
634
+ budget_summary: {
635
+ estimated: boolean;
636
+ spend_usd: number | null;
637
+ };
638
+ apply_recommendation: "apply" | "inspect" | "continue" | "split_task" | "human_review";
639
+ verification_basis: "none" | "cross_family_review" | "both";
640
+ final_verify: {
641
+ duration_ms: number | null;
642
+ base_sha: string | null;
643
+ reason: string | null;
644
+ attempted: boolean;
645
+ applied_cleanly: boolean | null;
646
+ gates_passed: boolean | null;
647
+ gates: {
648
+ status: string;
649
+ id: string;
650
+ }[];
651
+ } | null;
652
+ }, {
653
+ status: "cancelled" | "success" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted";
654
+ winner: string | null;
655
+ outcome?: "ready" | "no_op" | "ungated" | "review_not_run" | "blocked" | undefined;
656
+ why_winner?: string | undefined;
657
+ why_not_others?: Record<string, string> | undefined;
658
+ accepted_risks?: string[] | undefined;
659
+ final_checks?: string[] | undefined;
660
+ evidence_facts?: string[] | undefined;
661
+ budget_summary?: {
662
+ estimated?: boolean | undefined;
663
+ spend_usd?: number | null | undefined;
664
+ } | undefined;
665
+ apply_recommendation?: "apply" | "inspect" | "continue" | "split_task" | "human_review" | undefined;
666
+ verification_basis?: "none" | "cross_family_review" | "both" | undefined;
667
+ final_verify?: {
668
+ attempted: boolean;
669
+ duration_ms?: number | null | undefined;
670
+ base_sha?: string | null | undefined;
671
+ reason?: string | null | undefined;
672
+ applied_cleanly?: boolean | null | undefined;
673
+ gates_passed?: boolean | null | undefined;
674
+ gates?: {
675
+ status: string;
676
+ id: string;
677
+ }[] | undefined;
678
+ } | null | undefined;
679
+ }>>>;
680
+ /** Persisted operator unblock decision (accept_risk/override), hash-bound; server-owned apply affordance. */
681
+ operatorDecision: z.ZodDefault<z.ZodNullable<z.ZodObject<{
682
+ action: z.ZodString;
683
+ decidedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
684
+ }, "strip", z.ZodTypeAny, {
685
+ action: string;
686
+ decidedAt: string | null;
687
+ }, {
688
+ action: string;
689
+ decidedAt?: string | null | undefined;
690
+ }>>>;
691
+ workProduct: z.ZodDefault<z.ZodNullable<z.ZodObject<{
692
+ id: z.ZodString;
693
+ kind: z.ZodEnum<["patch", "new_repo", "report"]>;
694
+ source_task_id: z.ZodString;
695
+ producer_attempt_id: z.ZodOptional<z.ZodString>;
696
+ evidence_dir: z.ZodOptional<z.ZodString>;
697
+ files: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
698
+ meta: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
699
+ }, "strip", z.ZodTypeAny, {
700
+ id: string;
701
+ kind: "patch" | "new_repo" | "report";
702
+ files: Record<string, string>;
703
+ source_task_id: string;
704
+ meta: Record<string, unknown>;
705
+ producer_attempt_id?: string | undefined;
706
+ evidence_dir?: string | undefined;
707
+ }, {
708
+ id: string;
709
+ kind: "patch" | "new_repo" | "report";
710
+ source_task_id: string;
711
+ files?: Record<string, string> | undefined;
712
+ producer_attempt_id?: string | undefined;
713
+ evidence_dir?: string | undefined;
714
+ meta?: Record<string, unknown> | undefined;
715
+ }>>>;
716
+ /** Derived apply-gate verdict (single producer: the delivery gate); null when the run has no patch artifact. */
717
+ applyEligibility: z.ZodDefault<z.ZodNullable<z.ZodObject<{
718
+ eligible: z.ZodBoolean;
719
+ state: z.ZodNullable<z.ZodString>;
720
+ reason: z.ZodNullable<z.ZodString>;
721
+ requiredAction: z.ZodNullable<z.ZodString>;
722
+ }, "strip", z.ZodTypeAny, {
723
+ state: string | null;
724
+ reason: string | null;
725
+ eligible: boolean;
726
+ requiredAction: string | null;
727
+ }, {
728
+ state: string | null;
729
+ reason: string | null;
730
+ eligible: boolean;
731
+ requiredAction: string | null;
732
+ }>>>;
733
+ reviewFindings: z.ZodDefault<z.ZodArray<z.ZodObject<{
734
+ id: z.ZodString;
735
+ severity: z.ZodEnum<["BLOCK", "FIX_FIRST", "WARN", "NIT", "OUT_OF_SCOPE", "INSUFFICIENT_EVIDENCE", "NEEDS_HUMAN"]>;
736
+ category: z.ZodEnum<["correctness", "regression", "security", "performance", "maintainability", "test_gap", "spec_gap", "deploy", "architecture", "ux"]>;
737
+ claim: z.ZodString;
738
+ linked_acceptance_criteria: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
739
+ evidence: z.ZodDefault<z.ZodObject<{
740
+ files: z.ZodDefault<z.ZodArray<z.ZodObject<{
741
+ path: z.ZodString;
742
+ lines: z.ZodDefault<z.ZodNullable<z.ZodString>>;
743
+ }, "strip", z.ZodTypeAny, {
744
+ path: string;
745
+ lines: string | null;
746
+ }, {
747
+ path: string;
748
+ lines?: string | null | undefined;
749
+ }>, "many">>;
750
+ diff_hunks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
751
+ commands: z.ZodDefault<z.ZodArray<z.ZodObject<{
752
+ command: z.ZodString;
753
+ }, "strip", z.ZodTypeAny, {
754
+ command: string;
755
+ }, {
756
+ command: string;
757
+ }>, "many">>;
758
+ logs: z.ZodDefault<z.ZodArray<z.ZodObject<{
759
+ path: z.ZodString;
760
+ }, "strip", z.ZodTypeAny, {
761
+ path: string;
762
+ }, {
763
+ path: string;
764
+ }>, "many">>;
765
+ }, "strip", z.ZodTypeAny, {
766
+ commands: {
767
+ command: string;
768
+ }[];
769
+ files: {
770
+ path: string;
771
+ lines: string | null;
772
+ }[];
773
+ diff_hunks: string[];
774
+ logs: {
775
+ path: string;
776
+ }[];
777
+ }, {
778
+ commands?: {
779
+ command: string;
780
+ }[] | undefined;
781
+ files?: {
782
+ path: string;
783
+ lines?: string | null | undefined;
784
+ }[] | undefined;
785
+ diff_hunks?: string[] | undefined;
786
+ logs?: {
787
+ path: string;
788
+ }[] | undefined;
789
+ }>>;
790
+ proposed_fix: z.ZodDefault<z.ZodNullable<z.ZodString>>;
791
+ reviewer: z.ZodObject<{
792
+ harness_id: z.ZodString;
793
+ requested_model: z.ZodDefault<z.ZodNullable<z.ZodString>>;
794
+ requested_effort: z.ZodDefault<z.ZodNullable<z.ZodString>>;
795
+ observed_model: z.ZodDefault<z.ZodNullable<z.ZodString>>;
796
+ route_proof_status: z.ZodDefault<z.ZodEnum<["verified", "accepted_model_arg", "unverified", "same_model_fallback"]>>;
797
+ }, "strip", z.ZodTypeAny, {
798
+ harness_id: string;
799
+ observed_model: string | null;
800
+ requested_model: string | null;
801
+ requested_effort: string | null;
802
+ route_proof_status: "verified" | "accepted_model_arg" | "unverified" | "same_model_fallback";
803
+ }, {
804
+ harness_id: string;
805
+ observed_model?: string | null | undefined;
806
+ requested_model?: string | null | undefined;
807
+ requested_effort?: string | null | undefined;
808
+ route_proof_status?: "verified" | "accepted_model_arg" | "unverified" | "same_model_fallback" | undefined;
809
+ }>;
810
+ status: z.ZodDefault<z.ZodEnum<["proposed", "accepted", "rebutted", "fixed", "accepted_risk", "duplicate", "stale", "out_of_scope", "insufficient_evidence"]>>;
811
+ revalidation_note: z.ZodOptional<z.ZodString>;
812
+ }, "strip", z.ZodTypeAny, {
813
+ status: "stale" | "proposed" | "accepted" | "rebutted" | "fixed" | "accepted_risk" | "duplicate" | "out_of_scope" | "insufficient_evidence";
814
+ id: string;
815
+ severity: "BLOCK" | "FIX_FIRST" | "WARN" | "NIT" | "OUT_OF_SCOPE" | "INSUFFICIENT_EVIDENCE" | "NEEDS_HUMAN";
816
+ category: "correctness" | "regression" | "security" | "performance" | "maintainability" | "test_gap" | "spec_gap" | "deploy" | "architecture" | "ux";
817
+ claim: string;
818
+ linked_acceptance_criteria: string[];
819
+ evidence: {
820
+ commands: {
821
+ command: string;
822
+ }[];
823
+ files: {
824
+ path: string;
825
+ lines: string | null;
826
+ }[];
827
+ diff_hunks: string[];
828
+ logs: {
829
+ path: string;
830
+ }[];
831
+ };
832
+ proposed_fix: string | null;
833
+ reviewer: {
834
+ harness_id: string;
835
+ observed_model: string | null;
836
+ requested_model: string | null;
837
+ requested_effort: string | null;
838
+ route_proof_status: "verified" | "accepted_model_arg" | "unverified" | "same_model_fallback";
839
+ };
840
+ revalidation_note?: string | undefined;
841
+ }, {
842
+ id: string;
843
+ severity: "BLOCK" | "FIX_FIRST" | "WARN" | "NIT" | "OUT_OF_SCOPE" | "INSUFFICIENT_EVIDENCE" | "NEEDS_HUMAN";
844
+ category: "correctness" | "regression" | "security" | "performance" | "maintainability" | "test_gap" | "spec_gap" | "deploy" | "architecture" | "ux";
845
+ claim: string;
846
+ reviewer: {
847
+ harness_id: string;
848
+ observed_model?: string | null | undefined;
849
+ requested_model?: string | null | undefined;
850
+ requested_effort?: string | null | undefined;
851
+ route_proof_status?: "verified" | "accepted_model_arg" | "unverified" | "same_model_fallback" | undefined;
852
+ };
853
+ status?: "stale" | "proposed" | "accepted" | "rebutted" | "fixed" | "accepted_risk" | "duplicate" | "out_of_scope" | "insufficient_evidence" | undefined;
854
+ linked_acceptance_criteria?: string[] | undefined;
855
+ evidence?: {
856
+ commands?: {
857
+ command: string;
858
+ }[] | undefined;
859
+ files?: {
860
+ path: string;
861
+ lines?: string | null | undefined;
862
+ }[] | undefined;
863
+ diff_hunks?: string[] | undefined;
864
+ logs?: {
865
+ path: string;
866
+ }[] | undefined;
867
+ } | undefined;
868
+ proposed_fix?: string | null | undefined;
869
+ revalidation_note?: string | undefined;
870
+ }>, "many">>;
871
+ pendingInteractions: z.ZodDefault<z.ZodArray<z.ZodObject<{
872
+ interactionId: z.ZodString;
873
+ runId: z.ZodString;
874
+ attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
875
+ harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
876
+ sourceTool: z.ZodDefault<z.ZodNullable<z.ZodString>>;
877
+ questions: z.ZodDefault<z.ZodArray<z.ZodObject<{
878
+ id: z.ZodString;
879
+ question: z.ZodString;
880
+ header: z.ZodDefault<z.ZodNullable<z.ZodString>>;
881
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
882
+ label: z.ZodString;
883
+ description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
884
+ }, "strip", z.ZodTypeAny, {
885
+ label: string;
886
+ description: string | null;
887
+ }, {
888
+ label: string;
889
+ description?: string | null | undefined;
890
+ }>, "many">>;
891
+ multi_select: z.ZodDefault<z.ZodBoolean>;
892
+ }, "strip", z.ZodTypeAny, {
893
+ options: {
894
+ label: string;
895
+ description: string | null;
896
+ }[];
897
+ id: string;
898
+ question: string;
899
+ header: string | null;
900
+ multi_select: boolean;
901
+ }, {
902
+ id: string;
903
+ question: string;
904
+ options?: {
905
+ label: string;
906
+ description?: string | null | undefined;
907
+ }[] | undefined;
908
+ header?: string | null | undefined;
909
+ multi_select?: boolean | undefined;
910
+ }>, "many">>;
911
+ requestedAt: z.ZodString;
912
+ timeoutAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
913
+ }, "strip", z.ZodTypeAny, {
914
+ questions: {
915
+ options: {
916
+ label: string;
917
+ description: string | null;
918
+ }[];
919
+ id: string;
920
+ question: string;
921
+ header: string | null;
922
+ multi_select: boolean;
923
+ }[];
924
+ runId: string;
925
+ harnessId: string | null;
926
+ attemptId: string | null;
927
+ interactionId: string;
928
+ sourceTool: string | null;
929
+ requestedAt: string;
930
+ timeoutAt: string | null;
931
+ }, {
932
+ runId: string;
933
+ interactionId: string;
934
+ requestedAt: string;
935
+ questions?: {
936
+ id: string;
937
+ question: string;
938
+ options?: {
939
+ label: string;
940
+ description?: string | null | undefined;
941
+ }[] | undefined;
942
+ header?: string | null | undefined;
943
+ multi_select?: boolean | undefined;
944
+ }[] | undefined;
945
+ harnessId?: string | null | undefined;
946
+ attemptId?: string | null | undefined;
947
+ sourceTool?: string | null | undefined;
948
+ timeoutAt?: string | null | undefined;
949
+ }>, "many">>;
950
+ /** Typed executor progress for an orchestrate run (auto_safe/auto_full);
951
+ * null for non-orchestrate runs or suggest autonomy. Projected from
952
+ * final/orchestration_progress.yaml. */
953
+ orchestrate: z.ZodDefault<z.ZodNullable<z.ZodObject<{
954
+ steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
955
+ index: z.ZodNumber;
956
+ tool: z.ZodEnum<["start_run", "race", "status", "answer_question", "apply", "review"]>;
957
+ risk: z.ZodEnum<["safe", "risky"]>;
958
+ status: z.ZodEnum<["pending", "running", "done", "skipped", "blocked", "failed"]>;
959
+ run_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
960
+ detail: z.ZodDefault<z.ZodNullable<z.ZodString>>;
961
+ }, "strip", z.ZodTypeAny, {
962
+ status: "pending" | "blocked" | "failed" | "running" | "done" | "skipped";
963
+ detail: string | null;
964
+ tool: "status" | "review" | "apply" | "start_run" | "race" | "answer_question";
965
+ run_id: string | null;
966
+ index: number;
967
+ risk: "safe" | "risky";
968
+ }, {
969
+ status: "pending" | "blocked" | "failed" | "running" | "done" | "skipped";
970
+ tool: "status" | "review" | "apply" | "start_run" | "race" | "answer_question";
971
+ index: number;
972
+ risk: "safe" | "risky";
973
+ detail?: string | null | undefined;
974
+ run_id?: string | null | undefined;
975
+ }>, "many">>;
976
+ autonomy: z.ZodEnum<["suggest", "auto_safe", "auto_full"]>;
977
+ stopped_reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
978
+ }, "strip", z.ZodTypeAny, {
979
+ autonomy: "suggest" | "auto_safe" | "auto_full";
980
+ steps: {
981
+ status: "pending" | "blocked" | "failed" | "running" | "done" | "skipped";
982
+ detail: string | null;
983
+ tool: "status" | "review" | "apply" | "start_run" | "race" | "answer_question";
984
+ run_id: string | null;
985
+ index: number;
986
+ risk: "safe" | "risky";
987
+ }[];
988
+ stopped_reason: string | null;
989
+ }, {
990
+ autonomy: "suggest" | "auto_safe" | "auto_full";
991
+ steps?: {
992
+ status: "pending" | "blocked" | "failed" | "running" | "done" | "skipped";
993
+ tool: "status" | "review" | "apply" | "start_run" | "race" | "answer_question";
994
+ index: number;
995
+ risk: "safe" | "risky";
996
+ detail?: string | null | undefined;
997
+ run_id?: string | null | undefined;
998
+ }[] | undefined;
999
+ stopped_reason?: string | null | undefined;
1000
+ }>>>;
1001
+ /** Per-candidate evidence cards. Present for EVERY envelope-producing
1002
+ * mode (races show N lanes; single-candidate turns and convergence
1003
+ * refinements project their attempts too); empty only when no attempt
1004
+ * artifacts exist. */
1005
+ candidates: z.ZodDefault<z.ZodArray<z.ZodObject<{
1006
+ attemptId: z.ZodString;
1007
+ harnessId: z.ZodString;
1008
+ label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1009
+ costUsd: z.ZodDefault<z.ZodNumber>;
1010
+ costEstimated: z.ZodDefault<z.ZodBoolean>;
1011
+ errored: z.ZodDefault<z.ZodBoolean>;
1012
+ gatesPassed: z.ZodDefault<z.ZodNumber>;
1013
+ gatesTotal: z.ZodDefault<z.ZodNumber>;
1014
+ /** Blocking review findings count (accepted blockers). */
1015
+ blockers: z.ZodDefault<z.ZodNumber>;
1016
+ reviewVerified: z.ZodDefault<z.ZodBoolean>;
1017
+ finalReviewClean: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
1018
+ winner: z.ZodDefault<z.ZodBoolean>;
1019
+ diffstat: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1020
+ files: z.ZodDefault<z.ZodNumber>;
1021
+ additions: z.ZodDefault<z.ZodNumber>;
1022
+ deletions: z.ZodDefault<z.ZodNumber>;
1023
+ }, "strip", z.ZodTypeAny, {
1024
+ files: number;
1025
+ additions: number;
1026
+ deletions: number;
1027
+ }, {
1028
+ files?: number | undefined;
1029
+ additions?: number | undefined;
1030
+ deletions?: number | undefined;
1031
+ }>>>;
1032
+ }, "strip", z.ZodTypeAny, {
1033
+ label: string | null;
1034
+ winner: boolean;
1035
+ harnessId: string;
1036
+ attemptId: string;
1037
+ blockers: number;
1038
+ costUsd: number;
1039
+ costEstimated: boolean;
1040
+ errored: boolean;
1041
+ gatesPassed: number;
1042
+ gatesTotal: number;
1043
+ reviewVerified: boolean;
1044
+ finalReviewClean: boolean | null;
1045
+ diffstat: {
1046
+ files: number;
1047
+ additions: number;
1048
+ deletions: number;
1049
+ } | null;
1050
+ }, {
1051
+ harnessId: string;
1052
+ attemptId: string;
1053
+ label?: string | null | undefined;
1054
+ winner?: boolean | undefined;
1055
+ blockers?: number | undefined;
1056
+ costUsd?: number | undefined;
1057
+ costEstimated?: boolean | undefined;
1058
+ errored?: boolean | undefined;
1059
+ gatesPassed?: number | undefined;
1060
+ gatesTotal?: number | undefined;
1061
+ reviewVerified?: boolean | undefined;
1062
+ finalReviewClean?: boolean | null | undefined;
1063
+ diffstat?: {
1064
+ files?: number | undefined;
1065
+ additions?: number | undefined;
1066
+ deletions?: number | undefined;
1067
+ } | null | undefined;
1068
+ }>, "many">>;
1069
+ /** Live plan checklist: the LAST plan.progress event's items, or null
1070
+ * when the run never emitted one. */
1071
+ planProgress: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1072
+ items: z.ZodDefault<z.ZodArray<z.ZodObject<{
1073
+ id: z.ZodString;
1074
+ title: z.ZodString;
1075
+ status: z.ZodEnum<["pending", "in_progress", "completed"]>;
1076
+ }, "strip", z.ZodTypeAny, {
1077
+ status: "pending" | "completed" | "in_progress";
1078
+ id: string;
1079
+ title: string;
1080
+ }, {
1081
+ status: "pending" | "completed" | "in_progress";
1082
+ id: string;
1083
+ title: string;
1084
+ }>, "many">>;
1085
+ }, "strip", z.ZodTypeAny, {
1086
+ items: {
1087
+ status: "pending" | "completed" | "in_progress";
1088
+ id: string;
1089
+ title: string;
1090
+ }[];
1091
+ }, {
1092
+ items?: {
1093
+ status: "pending" | "completed" | "in_progress";
1094
+ id: string;
1095
+ title: string;
1096
+ }[] | undefined;
1097
+ }>>>;
1098
+ failure: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1099
+ phase: z.ZodDefault<z.ZodString>;
1100
+ category: z.ZodDefault<z.ZodEnum<["validation", "project", "auth", "harness_unavailable", "harness_error", "budget", "policy", "cancelled", "internal", "unknown"]>>;
1101
+ harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1102
+ attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1103
+ safeMessage: z.ZodString;
1104
+ rawDetailRef: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1105
+ logRefs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1106
+ eventRefs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1107
+ runDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1108
+ nextActions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1109
+ }, "strip", z.ZodTypeAny, {
1110
+ runDir: string | null;
1111
+ category: "validation" | "unknown" | "harness_error" | "auth" | "cancelled" | "budget" | "project" | "policy" | "harness_unavailable" | "internal";
1112
+ phase: string;
1113
+ harnessId: string | null;
1114
+ attemptId: string | null;
1115
+ safeMessage: string;
1116
+ rawDetailRef: string | null;
1117
+ logRefs: string[];
1118
+ eventRefs: string[];
1119
+ nextActions: string[];
1120
+ }, {
1121
+ safeMessage: string;
1122
+ runDir?: string | null | undefined;
1123
+ category?: "validation" | "unknown" | "harness_error" | "auth" | "cancelled" | "budget" | "project" | "policy" | "harness_unavailable" | "internal" | undefined;
1124
+ phase?: string | undefined;
1125
+ harnessId?: string | null | undefined;
1126
+ attemptId?: string | null | undefined;
1127
+ rawDetailRef?: string | null | undefined;
1128
+ logRefs?: string[] | undefined;
1129
+ eventRefs?: string[] | undefined;
1130
+ nextActions?: string[] | undefined;
1131
+ }>>>;
1132
+ }, "strip", z.ZodTypeAny, {
1133
+ orchestrate: {
1134
+ autonomy: "suggest" | "auto_safe" | "auto_full";
1135
+ steps: {
1136
+ status: "pending" | "blocked" | "failed" | "running" | "done" | "skipped";
1137
+ detail: string | null;
1138
+ tool: "status" | "review" | "apply" | "start_run" | "race" | "answer_question";
1139
+ run_id: string | null;
1140
+ index: number;
1141
+ risk: "safe" | "risky";
1142
+ }[];
1143
+ stopped_reason: string | null;
1144
+ } | null;
1145
+ decision: {
1146
+ status: "cancelled" | "success" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted";
1147
+ winner: string | null;
1148
+ outcome: "ready" | "no_op" | "ungated" | "review_not_run" | "blocked";
1149
+ why_winner: string;
1150
+ why_not_others: Record<string, string>;
1151
+ accepted_risks: string[];
1152
+ final_checks: string[];
1153
+ evidence_facts: string[];
1154
+ budget_summary: {
1155
+ estimated: boolean;
1156
+ spend_usd: number | null;
1157
+ };
1158
+ apply_recommendation: "apply" | "inspect" | "continue" | "split_task" | "human_review";
1159
+ verification_basis: "none" | "cross_family_review" | "both";
1160
+ final_verify: {
1161
+ duration_ms: number | null;
1162
+ base_sha: string | null;
1163
+ reason: string | null;
1164
+ attempted: boolean;
1165
+ applied_cleanly: boolean | null;
1166
+ gates_passed: boolean | null;
1167
+ gates: {
1168
+ status: string;
1169
+ id: string;
1170
+ }[];
1171
+ } | null;
1172
+ } | null;
1173
+ summary: {
1174
+ state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
1175
+ runId: string;
1176
+ project: {
1177
+ kind: "none" | "project";
1178
+ root: string | null;
1179
+ context: "off" | "auto";
1180
+ projectName: string | null;
1181
+ };
1182
+ jobId: string;
1183
+ failure: {
1184
+ runDir: string | null;
1185
+ category: "validation" | "unknown" | "harness_error" | "auth" | "cancelled" | "budget" | "project" | "policy" | "harness_unavailable" | "internal";
1186
+ phase: string;
1187
+ harnessId: string | null;
1188
+ attemptId: string | null;
1189
+ safeMessage: string;
1190
+ rawDetailRef: string | null;
1191
+ logRefs: string[];
1192
+ eventRefs: string[];
1193
+ nextActions: string[];
1194
+ } | null;
1195
+ webEvidence: {
1196
+ status: "none" | "failed" | "attempted" | "unverified" | "satisfied";
1197
+ target: string | null;
1198
+ tool: string | null;
1199
+ mode: "off" | "auto" | "cached" | "live";
1200
+ required: boolean;
1201
+ attempted: boolean;
1202
+ rawDetailRef: string | null;
1203
+ effectiveMode: "off" | "auto" | "cached" | "live";
1204
+ satisfied: boolean;
1205
+ errorSummary: string | null;
1206
+ available: boolean;
1207
+ };
1208
+ outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
1209
+ toolWarningsTotal: number;
1210
+ result: {
1211
+ kind: "plan" | "none" | "patch" | "report" | "answer";
1212
+ diffStat: {
1213
+ files: number;
1214
+ additions: number;
1215
+ deletions: number;
1216
+ } | null;
1217
+ blockers: number;
1218
+ adopted: boolean | null;
1219
+ applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
1220
+ preTurnSha: string | null;
1221
+ postTurnSha: string | null;
1222
+ revertable: boolean;
1223
+ };
1224
+ waitingOnUser: boolean;
1225
+ route: {
1226
+ verified: boolean;
1227
+ harnessId: string | null;
1228
+ requestedModel: string | null;
1229
+ observedModel: string | null;
1230
+ } | null;
1231
+ prompt?: string | undefined;
1232
+ access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1233
+ error?: string | undefined;
1234
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
1235
+ harnesses?: string[] | undefined;
1236
+ runDir?: string | undefined;
1237
+ tests?: string[] | undefined;
1238
+ portfolio?: "daily-rich" | "balanced" | "cheapest" | "strongest" | "burn" | "subscription-first" | "api-overflow" | "conserve-claude" | "conserve-codex" | undefined;
1239
+ n?: number | undefined;
1240
+ model?: string | undefined;
1241
+ primaryHarness?: string | undefined;
1242
+ maxUsd?: number | null | undefined;
1243
+ externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
1244
+ protectedPathApprovals?: {
1245
+ path: string;
1246
+ reason?: string | undefined;
1247
+ }[] | undefined;
1248
+ specId?: string | undefined;
1249
+ specHash?: string | undefined;
1250
+ reviewerPanel?: {
1251
+ harness: string;
1252
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1253
+ model?: string | undefined;
1254
+ }[] | undefined;
1255
+ createdAt?: string | undefined;
1256
+ startedAt?: string | undefined;
1257
+ finishedAt?: string | undefined;
1258
+ taskId?: string | undefined;
1259
+ strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
1260
+ spendUsd?: number | null | undefined;
1261
+ spendEstimated?: boolean | undefined;
1262
+ requestedAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1263
+ effectiveAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1264
+ webRequired?: boolean | undefined;
1265
+ webMode?: "off" | "auto" | "cached" | "live" | undefined;
1266
+ toolPermissionPolicy?: Record<string, unknown> | undefined;
1267
+ };
1268
+ applyEligibility: {
1269
+ state: string | null;
1270
+ reason: string | null;
1271
+ eligible: boolean;
1272
+ requiredAction: string | null;
1273
+ } | null;
1274
+ budget: {
1275
+ source: "unknown" | "decision" | "events" | "settings";
1276
+ estimated: boolean;
1277
+ maxUsd: number | null;
1278
+ spendUsd: number | null;
1279
+ remainingUsd: number | null;
1280
+ };
1281
+ failure: {
1282
+ runDir: string | null;
1283
+ category: "validation" | "unknown" | "harness_error" | "auth" | "cancelled" | "budget" | "project" | "policy" | "harness_unavailable" | "internal";
1284
+ phase: string;
1285
+ harnessId: string | null;
1286
+ attemptId: string | null;
1287
+ safeMessage: string;
1288
+ rawDetailRef: string | null;
1289
+ logRefs: string[];
1290
+ eventRefs: string[];
1291
+ nextActions: string[];
1292
+ } | null;
1293
+ lastSeq: number;
1294
+ artifacts: {
1295
+ path: string;
1296
+ kind: "file" | "directory";
1297
+ mime?: string | undefined;
1298
+ bytes?: number | undefined;
1299
+ }[];
1300
+ primaryOutput: {
1301
+ path: string;
1302
+ kind: "diagnostic" | "plan" | "summary" | "patch" | "report" | "answer";
1303
+ text: string | null;
1304
+ bytes?: number | undefined;
1305
+ } | null;
1306
+ timeline: {
1307
+ type: string;
1308
+ detail: string | null;
1309
+ target: string | null;
1310
+ title: string;
1311
+ severity: "error" | "info" | "warning";
1312
+ harnessId: string | null;
1313
+ attemptId: string | null;
1314
+ errorSummary: string | null;
1315
+ toolName: string | null;
1316
+ rawRef: string | null;
1317
+ ts?: string | undefined;
1318
+ }[];
1319
+ finalSummary: string | null;
1320
+ operatorDecision: {
1321
+ action: string;
1322
+ decidedAt: string | null;
1323
+ } | null;
1324
+ workProduct: {
1325
+ id: string;
1326
+ kind: "patch" | "new_repo" | "report";
1327
+ files: Record<string, string>;
1328
+ source_task_id: string;
1329
+ meta: Record<string, unknown>;
1330
+ producer_attempt_id?: string | undefined;
1331
+ evidence_dir?: string | undefined;
1332
+ } | null;
1333
+ reviewFindings: {
1334
+ status: "stale" | "proposed" | "accepted" | "rebutted" | "fixed" | "accepted_risk" | "duplicate" | "out_of_scope" | "insufficient_evidence";
1335
+ id: string;
1336
+ severity: "BLOCK" | "FIX_FIRST" | "WARN" | "NIT" | "OUT_OF_SCOPE" | "INSUFFICIENT_EVIDENCE" | "NEEDS_HUMAN";
1337
+ category: "correctness" | "regression" | "security" | "performance" | "maintainability" | "test_gap" | "spec_gap" | "deploy" | "architecture" | "ux";
1338
+ claim: string;
1339
+ linked_acceptance_criteria: string[];
1340
+ evidence: {
1341
+ commands: {
1342
+ command: string;
1343
+ }[];
1344
+ files: {
1345
+ path: string;
1346
+ lines: string | null;
1347
+ }[];
1348
+ diff_hunks: string[];
1349
+ logs: {
1350
+ path: string;
1351
+ }[];
1352
+ };
1353
+ proposed_fix: string | null;
1354
+ reviewer: {
1355
+ harness_id: string;
1356
+ observed_model: string | null;
1357
+ requested_model: string | null;
1358
+ requested_effort: string | null;
1359
+ route_proof_status: "verified" | "accepted_model_arg" | "unverified" | "same_model_fallback";
1360
+ };
1361
+ revalidation_note?: string | undefined;
1362
+ }[];
1363
+ pendingInteractions: {
1364
+ questions: {
1365
+ options: {
1366
+ label: string;
1367
+ description: string | null;
1368
+ }[];
1369
+ id: string;
1370
+ question: string;
1371
+ header: string | null;
1372
+ multi_select: boolean;
1373
+ }[];
1374
+ runId: string;
1375
+ harnessId: string | null;
1376
+ attemptId: string | null;
1377
+ interactionId: string;
1378
+ sourceTool: string | null;
1379
+ requestedAt: string;
1380
+ timeoutAt: string | null;
1381
+ }[];
1382
+ candidates: {
1383
+ label: string | null;
1384
+ winner: boolean;
1385
+ harnessId: string;
1386
+ attemptId: string;
1387
+ blockers: number;
1388
+ costUsd: number;
1389
+ costEstimated: boolean;
1390
+ errored: boolean;
1391
+ gatesPassed: number;
1392
+ gatesTotal: number;
1393
+ reviewVerified: boolean;
1394
+ finalReviewClean: boolean | null;
1395
+ diffstat: {
1396
+ files: number;
1397
+ additions: number;
1398
+ deletions: number;
1399
+ } | null;
1400
+ }[];
1401
+ planProgress: {
1402
+ items: {
1403
+ status: "pending" | "completed" | "in_progress";
1404
+ id: string;
1405
+ title: string;
1406
+ }[];
1407
+ } | null;
1408
+ }, {
1409
+ summary: {
1410
+ state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
1411
+ runId: string;
1412
+ jobId: string;
1413
+ prompt?: string | undefined;
1414
+ access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1415
+ error?: string | undefined;
1416
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
1417
+ harnesses?: string[] | undefined;
1418
+ runDir?: string | undefined;
1419
+ tests?: string[] | undefined;
1420
+ portfolio?: "daily-rich" | "balanced" | "cheapest" | "strongest" | "burn" | "subscription-first" | "api-overflow" | "conserve-claude" | "conserve-codex" | undefined;
1421
+ project?: {
1422
+ kind?: "none" | "project" | undefined;
1423
+ root?: string | null | undefined;
1424
+ context?: "off" | "auto" | undefined;
1425
+ projectName?: string | null | undefined;
1426
+ } | undefined;
1427
+ n?: number | undefined;
1428
+ model?: string | undefined;
1429
+ primaryHarness?: string | undefined;
1430
+ maxUsd?: number | null | undefined;
1431
+ externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
1432
+ protectedPathApprovals?: {
1433
+ path: string;
1434
+ reason?: string | undefined;
1435
+ }[] | undefined;
1436
+ specId?: string | undefined;
1437
+ specHash?: string | undefined;
1438
+ reviewerPanel?: {
1439
+ harness: string;
1440
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1441
+ model?: string | undefined;
1442
+ }[] | undefined;
1443
+ createdAt?: string | undefined;
1444
+ startedAt?: string | undefined;
1445
+ finishedAt?: string | undefined;
1446
+ taskId?: string | undefined;
1447
+ failure?: {
1448
+ safeMessage: string;
1449
+ runDir?: string | null | undefined;
1450
+ category?: "validation" | "unknown" | "harness_error" | "auth" | "cancelled" | "budget" | "project" | "policy" | "harness_unavailable" | "internal" | undefined;
1451
+ phase?: string | undefined;
1452
+ harnessId?: string | null | undefined;
1453
+ attemptId?: string | null | undefined;
1454
+ rawDetailRef?: string | null | undefined;
1455
+ logRefs?: string[] | undefined;
1456
+ eventRefs?: string[] | undefined;
1457
+ nextActions?: string[] | undefined;
1458
+ } | null | undefined;
1459
+ strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
1460
+ spendUsd?: number | null | undefined;
1461
+ spendEstimated?: boolean | undefined;
1462
+ requestedAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1463
+ effectiveAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1464
+ webRequired?: boolean | undefined;
1465
+ webMode?: "off" | "auto" | "cached" | "live" | undefined;
1466
+ webEvidence?: {
1467
+ status?: "none" | "failed" | "attempted" | "unverified" | "satisfied" | undefined;
1468
+ target?: string | null | undefined;
1469
+ tool?: string | null | undefined;
1470
+ mode?: "off" | "auto" | "cached" | "live" | undefined;
1471
+ required?: boolean | undefined;
1472
+ attempted?: boolean | undefined;
1473
+ rawDetailRef?: string | null | undefined;
1474
+ effectiveMode?: "off" | "auto" | "cached" | "live" | undefined;
1475
+ satisfied?: boolean | undefined;
1476
+ errorSummary?: string | null | undefined;
1477
+ available?: boolean | undefined;
1478
+ } | undefined;
1479
+ toolPermissionPolicy?: Record<string, unknown> | undefined;
1480
+ outputReadyState?: "pending" | "finalizing" | "ready" | "diagnostic" | undefined;
1481
+ toolWarningsTotal?: number | undefined;
1482
+ result?: {
1483
+ kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
1484
+ diffStat?: {
1485
+ files: number;
1486
+ additions: number;
1487
+ deletions: number;
1488
+ } | null | undefined;
1489
+ blockers?: number | undefined;
1490
+ adopted?: boolean | null | undefined;
1491
+ applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
1492
+ preTurnSha?: string | null | undefined;
1493
+ postTurnSha?: string | null | undefined;
1494
+ revertable?: boolean | undefined;
1495
+ } | undefined;
1496
+ waitingOnUser?: boolean | undefined;
1497
+ route?: {
1498
+ verified?: boolean | undefined;
1499
+ harnessId?: string | null | undefined;
1500
+ requestedModel?: string | null | undefined;
1501
+ observedModel?: string | null | undefined;
1502
+ } | null | undefined;
1503
+ };
1504
+ orchestrate?: {
1505
+ autonomy: "suggest" | "auto_safe" | "auto_full";
1506
+ steps?: {
1507
+ status: "pending" | "blocked" | "failed" | "running" | "done" | "skipped";
1508
+ tool: "status" | "review" | "apply" | "start_run" | "race" | "answer_question";
1509
+ index: number;
1510
+ risk: "safe" | "risky";
1511
+ detail?: string | null | undefined;
1512
+ run_id?: string | null | undefined;
1513
+ }[] | undefined;
1514
+ stopped_reason?: string | null | undefined;
1515
+ } | null | undefined;
1516
+ decision?: {
1517
+ status: "cancelled" | "success" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted";
1518
+ winner: string | null;
1519
+ outcome?: "ready" | "no_op" | "ungated" | "review_not_run" | "blocked" | undefined;
1520
+ why_winner?: string | undefined;
1521
+ why_not_others?: Record<string, string> | undefined;
1522
+ accepted_risks?: string[] | undefined;
1523
+ final_checks?: string[] | undefined;
1524
+ evidence_facts?: string[] | undefined;
1525
+ budget_summary?: {
1526
+ estimated?: boolean | undefined;
1527
+ spend_usd?: number | null | undefined;
1528
+ } | undefined;
1529
+ apply_recommendation?: "apply" | "inspect" | "continue" | "split_task" | "human_review" | undefined;
1530
+ verification_basis?: "none" | "cross_family_review" | "both" | undefined;
1531
+ final_verify?: {
1532
+ attempted: boolean;
1533
+ duration_ms?: number | null | undefined;
1534
+ base_sha?: string | null | undefined;
1535
+ reason?: string | null | undefined;
1536
+ applied_cleanly?: boolean | null | undefined;
1537
+ gates_passed?: boolean | null | undefined;
1538
+ gates?: {
1539
+ status: string;
1540
+ id: string;
1541
+ }[] | undefined;
1542
+ } | null | undefined;
1543
+ } | null | undefined;
1544
+ applyEligibility?: {
1545
+ state: string | null;
1546
+ reason: string | null;
1547
+ eligible: boolean;
1548
+ requiredAction: string | null;
1549
+ } | null | undefined;
1550
+ budget?: {
1551
+ source?: "unknown" | "decision" | "events" | "settings" | undefined;
1552
+ estimated?: boolean | undefined;
1553
+ maxUsd?: number | null | undefined;
1554
+ spendUsd?: number | null | undefined;
1555
+ remainingUsd?: number | null | undefined;
1556
+ } | undefined;
1557
+ failure?: {
1558
+ safeMessage: string;
1559
+ runDir?: string | null | undefined;
1560
+ category?: "validation" | "unknown" | "harness_error" | "auth" | "cancelled" | "budget" | "project" | "policy" | "harness_unavailable" | "internal" | undefined;
1561
+ phase?: string | undefined;
1562
+ harnessId?: string | null | undefined;
1563
+ attemptId?: string | null | undefined;
1564
+ rawDetailRef?: string | null | undefined;
1565
+ logRefs?: string[] | undefined;
1566
+ eventRefs?: string[] | undefined;
1567
+ nextActions?: string[] | undefined;
1568
+ } | null | undefined;
1569
+ lastSeq?: number | undefined;
1570
+ artifacts?: {
1571
+ path: string;
1572
+ kind: "file" | "directory";
1573
+ mime?: string | undefined;
1574
+ bytes?: number | undefined;
1575
+ }[] | undefined;
1576
+ primaryOutput?: {
1577
+ path: string;
1578
+ kind: "diagnostic" | "plan" | "summary" | "patch" | "report" | "answer";
1579
+ text?: string | null | undefined;
1580
+ bytes?: number | undefined;
1581
+ } | null | undefined;
1582
+ timeline?: {
1583
+ type: string;
1584
+ title: string;
1585
+ detail?: string | null | undefined;
1586
+ target?: string | null | undefined;
1587
+ ts?: string | undefined;
1588
+ severity?: "error" | "info" | "warning" | undefined;
1589
+ harnessId?: string | null | undefined;
1590
+ attemptId?: string | null | undefined;
1591
+ errorSummary?: string | null | undefined;
1592
+ toolName?: string | null | undefined;
1593
+ rawRef?: string | null | undefined;
1594
+ }[] | undefined;
1595
+ finalSummary?: string | null | undefined;
1596
+ operatorDecision?: {
1597
+ action: string;
1598
+ decidedAt?: string | null | undefined;
1599
+ } | null | undefined;
1600
+ workProduct?: {
1601
+ id: string;
1602
+ kind: "patch" | "new_repo" | "report";
1603
+ source_task_id: string;
1604
+ files?: Record<string, string> | undefined;
1605
+ producer_attempt_id?: string | undefined;
1606
+ evidence_dir?: string | undefined;
1607
+ meta?: Record<string, unknown> | undefined;
1608
+ } | null | undefined;
1609
+ reviewFindings?: {
1610
+ id: string;
1611
+ severity: "BLOCK" | "FIX_FIRST" | "WARN" | "NIT" | "OUT_OF_SCOPE" | "INSUFFICIENT_EVIDENCE" | "NEEDS_HUMAN";
1612
+ category: "correctness" | "regression" | "security" | "performance" | "maintainability" | "test_gap" | "spec_gap" | "deploy" | "architecture" | "ux";
1613
+ claim: string;
1614
+ reviewer: {
1615
+ harness_id: string;
1616
+ observed_model?: string | null | undefined;
1617
+ requested_model?: string | null | undefined;
1618
+ requested_effort?: string | null | undefined;
1619
+ route_proof_status?: "verified" | "accepted_model_arg" | "unverified" | "same_model_fallback" | undefined;
1620
+ };
1621
+ status?: "stale" | "proposed" | "accepted" | "rebutted" | "fixed" | "accepted_risk" | "duplicate" | "out_of_scope" | "insufficient_evidence" | undefined;
1622
+ linked_acceptance_criteria?: string[] | undefined;
1623
+ evidence?: {
1624
+ commands?: {
1625
+ command: string;
1626
+ }[] | undefined;
1627
+ files?: {
1628
+ path: string;
1629
+ lines?: string | null | undefined;
1630
+ }[] | undefined;
1631
+ diff_hunks?: string[] | undefined;
1632
+ logs?: {
1633
+ path: string;
1634
+ }[] | undefined;
1635
+ } | undefined;
1636
+ proposed_fix?: string | null | undefined;
1637
+ revalidation_note?: string | undefined;
1638
+ }[] | undefined;
1639
+ pendingInteractions?: {
1640
+ runId: string;
1641
+ interactionId: string;
1642
+ requestedAt: string;
1643
+ questions?: {
1644
+ id: string;
1645
+ question: string;
1646
+ options?: {
1647
+ label: string;
1648
+ description?: string | null | undefined;
1649
+ }[] | undefined;
1650
+ header?: string | null | undefined;
1651
+ multi_select?: boolean | undefined;
1652
+ }[] | undefined;
1653
+ harnessId?: string | null | undefined;
1654
+ attemptId?: string | null | undefined;
1655
+ sourceTool?: string | null | undefined;
1656
+ timeoutAt?: string | null | undefined;
1657
+ }[] | undefined;
1658
+ candidates?: {
1659
+ harnessId: string;
1660
+ attemptId: string;
1661
+ label?: string | null | undefined;
1662
+ winner?: boolean | undefined;
1663
+ blockers?: number | undefined;
1664
+ costUsd?: number | undefined;
1665
+ costEstimated?: boolean | undefined;
1666
+ errored?: boolean | undefined;
1667
+ gatesPassed?: number | undefined;
1668
+ gatesTotal?: number | undefined;
1669
+ reviewVerified?: boolean | undefined;
1670
+ finalReviewClean?: boolean | null | undefined;
1671
+ diffstat?: {
1672
+ files?: number | undefined;
1673
+ additions?: number | undefined;
1674
+ deletions?: number | undefined;
1675
+ } | null | undefined;
1676
+ }[] | undefined;
1677
+ planProgress?: {
1678
+ items?: {
1679
+ status: "pending" | "completed" | "in_progress";
1680
+ id: string;
1681
+ title: string;
1682
+ }[] | undefined;
1683
+ } | null | undefined;
1684
+ }>;
1685
+ export type ControlRunDetail = z.infer<typeof ControlRunDetail>;
1686
+ //# sourceMappingURL=control-run-detail.d.ts.map