@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,4226 @@
1
+ import { z } from "zod";
2
+ /** Project context depth. The "deep" tier never shipped a distinct behavior
3
+ * (v0.15 triage): auto is the only mode; off exists solely on projections of
4
+ * no-project runs. */
5
+ export declare const RunScopeContext: z.ZodEnum<["auto"]>;
6
+ export type RunScopeContext = z.infer<typeof RunScopeContext>;
7
+ export declare const RunScope: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
8
+ kind: z.ZodLiteral<"project">;
9
+ root: z.ZodString;
10
+ context: z.ZodDefault<z.ZodEnum<["auto"]>>;
11
+ }, "strict", z.ZodTypeAny, {
12
+ kind: "project";
13
+ root: string;
14
+ context: "auto";
15
+ }, {
16
+ kind: "project";
17
+ root: string;
18
+ context?: "auto" | undefined;
19
+ }>, z.ZodObject<{
20
+ kind: z.ZodLiteral<"none">;
21
+ }, "strict", z.ZodTypeAny, {
22
+ kind: "none";
23
+ }, {
24
+ kind: "none";
25
+ }>]>;
26
+ export type RunScope = z.infer<typeof RunScope>;
27
+ export declare const RunExecution: z.ZodObject<{
28
+ isolation: z.ZodDefault<z.ZodEnum<["envelope", "live"]>>;
29
+ }, "strict", z.ZodTypeAny, {
30
+ isolation: "live" | "envelope";
31
+ }, {
32
+ isolation?: "live" | "envelope" | undefined;
33
+ }>;
34
+ export type RunExecution = z.infer<typeof RunExecution>;
35
+ export declare const ControlReviewerPanelEntry: z.ZodObject<{
36
+ /** Explicit reviewer harness id. Repeated harness ids are allowed so one
37
+ * native provider can review through multiple requested models. */
38
+ harness: z.ZodString;
39
+ /** Optional per-reviewer model hint, passed to that harness only. */
40
+ model: z.ZodOptional<z.ZodString>;
41
+ /** Optional per-reviewer effort hint, passed to that harness only. */
42
+ effort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>;
43
+ }, "strict", z.ZodTypeAny, {
44
+ harness: string;
45
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
46
+ model?: string | undefined;
47
+ }, {
48
+ harness: string;
49
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
50
+ model?: string | undefined;
51
+ }>;
52
+ export type ControlReviewerPanelEntry = z.infer<typeof ControlReviewerPanelEntry>;
53
+ export declare const ControlRunStartRequest: z.ZodObject<{
54
+ prompt: z.ZodDefault<z.ZodString>;
55
+ /** Inbound files/images for this turn; the daemon resolves each to a scoped
56
+ * on-disk Attachment before the run spec is built. */
57
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
58
+ kind: z.ZodDefault<z.ZodEnum<["image", "file"]>>;
59
+ mime: z.ZodDefault<z.ZodString>;
60
+ name: z.ZodDefault<z.ZodString>;
61
+ data: z.ZodDefault<z.ZodNullable<z.ZodString>>;
62
+ path: z.ZodDefault<z.ZodNullable<z.ZodString>>;
63
+ }, "strip", z.ZodTypeAny, {
64
+ path: string | null;
65
+ kind: "image" | "file";
66
+ mime: string;
67
+ name: string;
68
+ data: string | null;
69
+ }, {
70
+ path?: string | null | undefined;
71
+ kind?: "image" | "file" | undefined;
72
+ mime?: string | undefined;
73
+ name?: string | undefined;
74
+ data?: string | null | undefined;
75
+ }>, "many">>;
76
+ mode: z.ZodDefault<z.ZodEnum<["ask", "plan", "audit", "agent", "orchestrate"]>>;
77
+ scope: z.ZodDefault<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
78
+ kind: z.ZodLiteral<"project">;
79
+ root: z.ZodString;
80
+ context: z.ZodDefault<z.ZodEnum<["auto"]>>;
81
+ }, "strict", z.ZodTypeAny, {
82
+ kind: "project";
83
+ root: string;
84
+ context: "auto";
85
+ }, {
86
+ kind: "project";
87
+ root: string;
88
+ context?: "auto" | undefined;
89
+ }>, z.ZodObject<{
90
+ kind: z.ZodLiteral<"none">;
91
+ }, "strict", z.ZodTypeAny, {
92
+ kind: "none";
93
+ }, {
94
+ kind: "none";
95
+ }>]>>;
96
+ execution: z.ZodDefault<z.ZodObject<{
97
+ isolation: z.ZodDefault<z.ZodEnum<["envelope", "live"]>>;
98
+ }, "strict", z.ZodTypeAny, {
99
+ isolation: "live" | "envelope";
100
+ }, {
101
+ isolation?: "live" | "envelope" | undefined;
102
+ }>>;
103
+ harnesses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
104
+ primaryHarness: z.ZodOptional<z.ZodString>;
105
+ portfolio: z.ZodOptional<z.ZodEnum<["daily-rich", "balanced", "cheapest", "strongest", "burn", "subscription-first", "api-overflow", "conserve-claude", "conserve-codex"]>>;
106
+ /** Scalar model convenience: expands to the RESOLVED PRIMARY harness only
107
+ * (never the pool). With a multi-harness pool and no primary it is
108
+ * rejected — use `models` instead (INV-103). */
109
+ model: z.ZodOptional<z.ZodString>;
110
+ /** Harness-scoped model map (harness id → model id). Specific beats
111
+ * general: an entry here wins over the scalar `model` and over the
112
+ * per-harness settings default. */
113
+ models: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
114
+ effort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>;
115
+ reviewerModels: z.ZodOptional<z.ZodRecord<z.ZodEnum<["openai", "anthropic", "google", "cursor", "opencode", "xai", "local", "unknown"]>, z.ZodString>>;
116
+ reviewerEfforts: z.ZodOptional<z.ZodRecord<z.ZodEnum<["openai", "anthropic", "google", "cursor", "opencode", "xai", "local", "unknown"]>, z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>>;
117
+ n: z.ZodOptional<z.ZodNumber>;
118
+ attempts: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
119
+ /** agent flag: iterate until the convergence predicate is clean (no fixed cap). */
120
+ untilClean: z.ZodOptional<z.ZodBoolean>;
121
+ /** audit flag: bounded read-only research swarm (the old `explore`). */
122
+ swarm: z.ZodOptional<z.ZodBoolean>;
123
+ /** agent flag: create-from-scratch intent (the old `create` mode). */
124
+ create: z.ZodOptional<z.ZodBoolean>;
125
+ /** Best-of-N synthesis policy. `auto` (default) only synthesizes a 3rd
126
+ * candidate when n>=3 and candidates genuinely complement; `always`/`never`
127
+ * force it. Threaded to the orchestrator's decideSynthesis. */
128
+ synthesis: z.ZodOptional<z.ZodEnum<["auto", "always", "never"]>>;
129
+ maxUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
130
+ /** Requested access profile. Effective access is derived by the engine and never client-supplied. */
131
+ access: z.ZodOptional<z.ZodEnum<["readonly", "workspace_write", "full", "external_sandbox_full", "inherit_native"]>>;
132
+ web: z.ZodOptional<z.ZodEnum<["off", "auto", "cached", "live"]>>;
133
+ externalContextPolicy: z.ZodOptional<z.ZodEnum<["off", "auto", "cached", "live"]>>;
134
+ /** Opt this run into the agent-driven browser (Playwright MCP). Honored only
135
+ * for browser-capable harnesses when web policy is not `off`. */
136
+ browser: z.ZodOptional<z.ZodBoolean>;
137
+ tests: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
138
+ /** Typed per-run approval for changing auto-protected gate/test paths. This
139
+ * does not bypass built-in critical/security path human gates. */
140
+ protectedPathApprovals: z.ZodOptional<z.ZodArray<z.ZodObject<{
141
+ path: z.ZodString;
142
+ reason: z.ZodOptional<z.ZodString>;
143
+ }, "strict", z.ZodTypeAny, {
144
+ path: string;
145
+ reason?: string | undefined;
146
+ }, {
147
+ path: string;
148
+ reason?: string | undefined;
149
+ }>, "many">>;
150
+ specPath: z.ZodOptional<z.ZodString>;
151
+ specId: z.ZodOptional<z.ZodString>;
152
+ specHash: z.ZodOptional<z.ZodString>;
153
+ /** Thread/session linkage: a run is a turn inside a thread. */
154
+ threadId: z.ZodOptional<z.ZodString>;
155
+ /** INTERNAL single-writer handoff: control-api pre-creates the turn and
156
+ * passes its id to the daemon runner. REJECTED (400) when supplied by a
157
+ * client on POST /runs — a foreign turnId could rebind another thread's
158
+ * lineage; POST /threads/:id/turns is the public turn surface. */
159
+ turnId: z.ZodOptional<z.ZodString>;
160
+ parentRunId: z.ZodOptional<z.ZodString>;
161
+ /** When set, this turn implements an approved plan: the engine prefixes the
162
+ * parent plan run's final/plan.md into the prompt (mode is forced to agent). */
163
+ planRunId: z.ZodOptional<z.ZodString>;
164
+ /** Explicit reviewer panel. When present it overrides the legacy
165
+ * per-provider-family reviewerModels/reviewerEfforts maps and preserves
166
+ * duplicate harness entries for multi-model same-provider reviews. */
167
+ reviewerPanel: z.ZodOptional<z.ZodArray<z.ZodObject<{
168
+ /** Explicit reviewer harness id. Repeated harness ids are allowed so one
169
+ * native provider can review through multiple requested models. */
170
+ harness: z.ZodString;
171
+ /** Optional per-reviewer model hint, passed to that harness only. */
172
+ model: z.ZodOptional<z.ZodString>;
173
+ /** Optional per-reviewer effort hint, passed to that harness only. */
174
+ effort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>;
175
+ }, "strict", z.ZodTypeAny, {
176
+ harness: string;
177
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
178
+ model?: string | undefined;
179
+ }, {
180
+ harness: string;
181
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
182
+ model?: string | undefined;
183
+ }>, "many">>;
184
+ /** Per-run auth route override (subscription/api_key/auto). */
185
+ authPreference: z.ZodOptional<z.ZodEnum<["subscription", "api_key", "auto"]>>;
186
+ /** How much the orchestrate planner may act without confirmation
187
+ * (suggest/auto_safe/auto_full). Only meaningful for mode=orchestrate;
188
+ * consumed by the executor in runOrchestrate. */
189
+ autonomy: z.ZodOptional<z.ZodEnum<["suggest", "auto_safe", "auto_full"]>>;
190
+ /** Orchestrate executor: cap on plan tool calls. Only meaningful for
191
+ * mode=orchestrate; consumed by executeOrchestratePlan. */
192
+ maxToolCalls: z.ZodOptional<z.ZodNumber>;
193
+ }, "strict", z.ZodTypeAny, {
194
+ prompt: string;
195
+ mode: "ask" | "plan" | "audit" | "agent" | "orchestrate";
196
+ scope: {
197
+ kind: "project";
198
+ root: string;
199
+ context: "auto";
200
+ } | {
201
+ kind: "none";
202
+ };
203
+ execution: {
204
+ isolation: "live" | "envelope";
205
+ };
206
+ access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
207
+ web?: "off" | "auto" | "cached" | "live" | undefined;
208
+ attachments?: {
209
+ path: string | null;
210
+ kind: "image" | "file";
211
+ mime: string;
212
+ name: string;
213
+ data: string | null;
214
+ }[] | undefined;
215
+ browser?: boolean | undefined;
216
+ turnId?: string | undefined;
217
+ planRunId?: string | undefined;
218
+ models?: Record<string, string> | undefined;
219
+ harnesses?: string[] | undefined;
220
+ tests?: string[] | undefined;
221
+ portfolio?: "daily-rich" | "balanced" | "cheapest" | "strongest" | "burn" | "subscription-first" | "api-overflow" | "conserve-claude" | "conserve-codex" | undefined;
222
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
223
+ autonomy?: "suggest" | "auto_safe" | "auto_full" | undefined;
224
+ n?: number | undefined;
225
+ model?: string | undefined;
226
+ primaryHarness?: string | undefined;
227
+ reviewerModels?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", string>> | undefined;
228
+ reviewerEfforts?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", "low" | "medium" | "high" | "xhigh" | "max">> | undefined;
229
+ attempts?: number | null | undefined;
230
+ untilClean?: boolean | undefined;
231
+ swarm?: boolean | undefined;
232
+ create?: boolean | undefined;
233
+ synthesis?: "auto" | "never" | "always" | undefined;
234
+ maxUsd?: number | null | undefined;
235
+ externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
236
+ protectedPathApprovals?: {
237
+ path: string;
238
+ reason?: string | undefined;
239
+ }[] | undefined;
240
+ specPath?: string | undefined;
241
+ specId?: string | undefined;
242
+ specHash?: string | undefined;
243
+ threadId?: string | undefined;
244
+ parentRunId?: string | undefined;
245
+ reviewerPanel?: {
246
+ harness: string;
247
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
248
+ model?: string | undefined;
249
+ }[] | undefined;
250
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
251
+ maxToolCalls?: number | undefined;
252
+ }, {
253
+ prompt?: string | undefined;
254
+ access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
255
+ web?: "off" | "auto" | "cached" | "live" | undefined;
256
+ attachments?: {
257
+ path?: string | null | undefined;
258
+ kind?: "image" | "file" | undefined;
259
+ mime?: string | undefined;
260
+ name?: string | undefined;
261
+ data?: string | null | undefined;
262
+ }[] | undefined;
263
+ browser?: boolean | undefined;
264
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
265
+ turnId?: string | undefined;
266
+ planRunId?: string | undefined;
267
+ models?: Record<string, string> | undefined;
268
+ harnesses?: string[] | undefined;
269
+ tests?: string[] | undefined;
270
+ portfolio?: "daily-rich" | "balanced" | "cheapest" | "strongest" | "burn" | "subscription-first" | "api-overflow" | "conserve-claude" | "conserve-codex" | undefined;
271
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
272
+ autonomy?: "suggest" | "auto_safe" | "auto_full" | undefined;
273
+ n?: number | undefined;
274
+ model?: string | undefined;
275
+ scope?: {
276
+ kind: "project";
277
+ root: string;
278
+ context?: "auto" | undefined;
279
+ } | {
280
+ kind: "none";
281
+ } | undefined;
282
+ execution?: {
283
+ isolation?: "live" | "envelope" | undefined;
284
+ } | undefined;
285
+ primaryHarness?: string | undefined;
286
+ reviewerModels?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", string>> | undefined;
287
+ reviewerEfforts?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", "low" | "medium" | "high" | "xhigh" | "max">> | undefined;
288
+ attempts?: number | null | undefined;
289
+ untilClean?: boolean | undefined;
290
+ swarm?: boolean | undefined;
291
+ create?: boolean | undefined;
292
+ synthesis?: "auto" | "never" | "always" | undefined;
293
+ maxUsd?: number | null | undefined;
294
+ externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
295
+ protectedPathApprovals?: {
296
+ path: string;
297
+ reason?: string | undefined;
298
+ }[] | undefined;
299
+ specPath?: string | undefined;
300
+ specId?: string | undefined;
301
+ specHash?: string | undefined;
302
+ threadId?: string | undefined;
303
+ parentRunId?: string | undefined;
304
+ reviewerPanel?: {
305
+ harness: string;
306
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
307
+ model?: string | undefined;
308
+ }[] | undefined;
309
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
310
+ maxToolCalls?: number | undefined;
311
+ }>;
312
+ export type ControlRunStartRequest = z.infer<typeof ControlRunStartRequest>;
313
+ /** Harness ids that have a managed setup flow (shared by the async setup-jobs path). */
314
+ export declare const ControlHarnessSetupHarness: z.ZodEnum<["codex", "claude", "cursor", "opencode", "raw"]>;
315
+ export type ControlHarnessSetupHarness = z.infer<typeof ControlHarnessSetupHarness>;
316
+ export declare const ControlSetupJobAction: z.ZodEnum<["install", "login", "doctor", "store_key"]>;
317
+ export type ControlSetupJobAction = z.infer<typeof ControlSetupJobAction>;
318
+ export declare const ControlSetupJobState: z.ZodEnum<["queued", "running", "waiting_for_input", "succeeded", "failed", "cancelled", "not_supported"]>;
319
+ export type ControlSetupJobState = z.infer<typeof ControlSetupJobState>;
320
+ export declare const ControlSetupJobCreateRequest: z.ZodObject<{
321
+ harness: z.ZodEnum<["codex", "claude", "cursor", "opencode", "raw"]>;
322
+ action: z.ZodEnum<["install", "login", "doctor", "store_key"]>;
323
+ }, "strict", z.ZodTypeAny, {
324
+ harness: "cursor" | "opencode" | "raw" | "codex" | "claude";
325
+ action: "install" | "login" | "doctor" | "store_key";
326
+ }, {
327
+ harness: "cursor" | "opencode" | "raw" | "codex" | "claude";
328
+ action: "install" | "login" | "doctor" | "store_key";
329
+ }>;
330
+ export type ControlSetupJobCreateRequest = z.infer<typeof ControlSetupJobCreateRequest>;
331
+ export declare const ControlSetupJob: z.ZodObject<{
332
+ jobId: z.ZodString;
333
+ harness: z.ZodEnum<["codex", "claude", "cursor", "opencode", "raw"]>;
334
+ action: z.ZodEnum<["install", "login", "doctor", "store_key"]>;
335
+ state: z.ZodEnum<["queued", "running", "waiting_for_input", "succeeded", "failed", "cancelled", "not_supported"]>;
336
+ command: z.ZodDefault<z.ZodNullable<z.ZodString>>;
337
+ guideUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
338
+ logPath: z.ZodDefault<z.ZodNullable<z.ZodString>>;
339
+ message: z.ZodString;
340
+ riskFlags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
341
+ requiresConfirmation: z.ZodDefault<z.ZodBoolean>;
342
+ createdAt: z.ZodString;
343
+ startedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
344
+ firstOutputAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
345
+ lastOutputAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
346
+ finishedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
347
+ retryCount: z.ZodDefault<z.ZodNumber>;
348
+ }, "strict", z.ZodTypeAny, {
349
+ message: string;
350
+ command: string | null;
351
+ state: "cancelled" | "failed" | "running" | "queued" | "waiting_for_input" | "succeeded" | "not_supported";
352
+ harness: "cursor" | "opencode" | "raw" | "codex" | "claude";
353
+ action: "install" | "login" | "doctor" | "store_key";
354
+ jobId: string;
355
+ guideUrl: string | null;
356
+ logPath: string | null;
357
+ riskFlags: string[];
358
+ requiresConfirmation: boolean;
359
+ createdAt: string;
360
+ startedAt: string | null;
361
+ firstOutputAt: string | null;
362
+ lastOutputAt: string | null;
363
+ finishedAt: string | null;
364
+ retryCount: number;
365
+ }, {
366
+ message: string;
367
+ state: "cancelled" | "failed" | "running" | "queued" | "waiting_for_input" | "succeeded" | "not_supported";
368
+ harness: "cursor" | "opencode" | "raw" | "codex" | "claude";
369
+ action: "install" | "login" | "doctor" | "store_key";
370
+ jobId: string;
371
+ createdAt: string;
372
+ command?: string | null | undefined;
373
+ guideUrl?: string | null | undefined;
374
+ logPath?: string | null | undefined;
375
+ riskFlags?: string[] | undefined;
376
+ requiresConfirmation?: boolean | undefined;
377
+ startedAt?: string | null | undefined;
378
+ firstOutputAt?: string | null | undefined;
379
+ lastOutputAt?: string | null | undefined;
380
+ finishedAt?: string | null | undefined;
381
+ retryCount?: number | undefined;
382
+ }>;
383
+ export type ControlSetupJob = z.infer<typeof ControlSetupJob>;
384
+ export declare const ControlSetupJobEvent: z.ZodObject<{
385
+ jobId: z.ZodString;
386
+ seq: z.ZodNumber;
387
+ time: z.ZodString;
388
+ /** Only "status" is ever produced (v0.15 triage: the log/end kinds had no
389
+ * producer; SSE stream end is a transport frame, not a payload kind). */
390
+ kind: z.ZodEnum<["status"]>;
391
+ state: z.ZodOptional<z.ZodEnum<["queued", "running", "waiting_for_input", "succeeded", "failed", "cancelled", "not_supported"]>>;
392
+ message: z.ZodString;
393
+ }, "strict", z.ZodTypeAny, {
394
+ message: string;
395
+ kind: "status";
396
+ time: string;
397
+ jobId: string;
398
+ seq: number;
399
+ state?: "cancelled" | "failed" | "running" | "queued" | "waiting_for_input" | "succeeded" | "not_supported" | undefined;
400
+ }, {
401
+ message: string;
402
+ kind: "status";
403
+ time: string;
404
+ jobId: string;
405
+ seq: number;
406
+ state?: "cancelled" | "failed" | "running" | "queued" | "waiting_for_input" | "succeeded" | "not_supported" | undefined;
407
+ }>;
408
+ export type ControlSetupJobEvent = z.infer<typeof ControlSetupJobEvent>;
409
+ export declare const ControlSetupJobListResponse: z.ZodObject<{
410
+ jobs: z.ZodArray<z.ZodObject<{
411
+ jobId: z.ZodString;
412
+ harness: z.ZodEnum<["codex", "claude", "cursor", "opencode", "raw"]>;
413
+ action: z.ZodEnum<["install", "login", "doctor", "store_key"]>;
414
+ state: z.ZodEnum<["queued", "running", "waiting_for_input", "succeeded", "failed", "cancelled", "not_supported"]>;
415
+ command: z.ZodDefault<z.ZodNullable<z.ZodString>>;
416
+ guideUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
417
+ logPath: z.ZodDefault<z.ZodNullable<z.ZodString>>;
418
+ message: z.ZodString;
419
+ riskFlags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
420
+ requiresConfirmation: z.ZodDefault<z.ZodBoolean>;
421
+ createdAt: z.ZodString;
422
+ startedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
423
+ firstOutputAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
424
+ lastOutputAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
425
+ finishedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
426
+ retryCount: z.ZodDefault<z.ZodNumber>;
427
+ }, "strict", z.ZodTypeAny, {
428
+ message: string;
429
+ command: string | null;
430
+ state: "cancelled" | "failed" | "running" | "queued" | "waiting_for_input" | "succeeded" | "not_supported";
431
+ harness: "cursor" | "opencode" | "raw" | "codex" | "claude";
432
+ action: "install" | "login" | "doctor" | "store_key";
433
+ jobId: string;
434
+ guideUrl: string | null;
435
+ logPath: string | null;
436
+ riskFlags: string[];
437
+ requiresConfirmation: boolean;
438
+ createdAt: string;
439
+ startedAt: string | null;
440
+ firstOutputAt: string | null;
441
+ lastOutputAt: string | null;
442
+ finishedAt: string | null;
443
+ retryCount: number;
444
+ }, {
445
+ message: string;
446
+ state: "cancelled" | "failed" | "running" | "queued" | "waiting_for_input" | "succeeded" | "not_supported";
447
+ harness: "cursor" | "opencode" | "raw" | "codex" | "claude";
448
+ action: "install" | "login" | "doctor" | "store_key";
449
+ jobId: string;
450
+ createdAt: string;
451
+ command?: string | null | undefined;
452
+ guideUrl?: string | null | undefined;
453
+ logPath?: string | null | undefined;
454
+ riskFlags?: string[] | undefined;
455
+ requiresConfirmation?: boolean | undefined;
456
+ startedAt?: string | null | undefined;
457
+ firstOutputAt?: string | null | undefined;
458
+ lastOutputAt?: string | null | undefined;
459
+ finishedAt?: string | null | undefined;
460
+ retryCount?: number | undefined;
461
+ }>, "many">;
462
+ }, "strip", z.ZodTypeAny, {
463
+ jobs: {
464
+ message: string;
465
+ command: string | null;
466
+ state: "cancelled" | "failed" | "running" | "queued" | "waiting_for_input" | "succeeded" | "not_supported";
467
+ harness: "cursor" | "opencode" | "raw" | "codex" | "claude";
468
+ action: "install" | "login" | "doctor" | "store_key";
469
+ jobId: string;
470
+ guideUrl: string | null;
471
+ logPath: string | null;
472
+ riskFlags: string[];
473
+ requiresConfirmation: boolean;
474
+ createdAt: string;
475
+ startedAt: string | null;
476
+ firstOutputAt: string | null;
477
+ lastOutputAt: string | null;
478
+ finishedAt: string | null;
479
+ retryCount: number;
480
+ }[];
481
+ }, {
482
+ jobs: {
483
+ message: string;
484
+ state: "cancelled" | "failed" | "running" | "queued" | "waiting_for_input" | "succeeded" | "not_supported";
485
+ harness: "cursor" | "opencode" | "raw" | "codex" | "claude";
486
+ action: "install" | "login" | "doctor" | "store_key";
487
+ jobId: string;
488
+ createdAt: string;
489
+ command?: string | null | undefined;
490
+ guideUrl?: string | null | undefined;
491
+ logPath?: string | null | undefined;
492
+ riskFlags?: string[] | undefined;
493
+ requiresConfirmation?: boolean | undefined;
494
+ startedAt?: string | null | undefined;
495
+ firstOutputAt?: string | null | undefined;
496
+ lastOutputAt?: string | null | undefined;
497
+ finishedAt?: string | null | undefined;
498
+ retryCount?: number | undefined;
499
+ }[];
500
+ }>;
501
+ export type ControlSetupJobListResponse = z.infer<typeof ControlSetupJobListResponse>;
502
+ export declare const ControlSetupJobConfirmRequest: z.ZodObject<{
503
+ confirmed: z.ZodDefault<z.ZodBoolean>;
504
+ }, "strict", z.ZodTypeAny, {
505
+ confirmed: boolean;
506
+ }, {
507
+ confirmed?: boolean | undefined;
508
+ }>;
509
+ export type ControlSetupJobConfirmRequest = z.infer<typeof ControlSetupJobConfirmRequest>;
510
+ export declare const ControlSpecQuestionsRequest: z.ZodObject<{
511
+ prompt: z.ZodString;
512
+ scope: z.ZodObject<{
513
+ kind: z.ZodLiteral<"project">;
514
+ root: z.ZodString;
515
+ context: z.ZodDefault<z.ZodEnum<["auto"]>>;
516
+ }, "strict", z.ZodTypeAny, {
517
+ kind: "project";
518
+ root: string;
519
+ context: "auto";
520
+ }, {
521
+ kind: "project";
522
+ root: string;
523
+ context?: "auto" | undefined;
524
+ }>;
525
+ harnesses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
526
+ /** Already-answered decisions from prior tiers; carried so each round goes
527
+ * DEEPER instead of re-asking (multi-tier adaptive interview). */
528
+ priorDecisions: z.ZodOptional<z.ZodArray<z.ZodObject<{
529
+ question: z.ZodString;
530
+ answer: z.ZodString;
531
+ }, "strip", z.ZodTypeAny, {
532
+ question: string;
533
+ answer: string;
534
+ }, {
535
+ question: string;
536
+ answer: string;
537
+ }>, "many">>;
538
+ }, "strict", z.ZodTypeAny, {
539
+ prompt: string;
540
+ scope: {
541
+ kind: "project";
542
+ root: string;
543
+ context: "auto";
544
+ };
545
+ harnesses?: string[] | undefined;
546
+ priorDecisions?: {
547
+ question: string;
548
+ answer: string;
549
+ }[] | undefined;
550
+ }, {
551
+ prompt: string;
552
+ scope: {
553
+ kind: "project";
554
+ root: string;
555
+ context?: "auto" | undefined;
556
+ };
557
+ harnesses?: string[] | undefined;
558
+ priorDecisions?: {
559
+ question: string;
560
+ answer: string;
561
+ }[] | undefined;
562
+ }>;
563
+ export type ControlSpecQuestionsRequest = z.infer<typeof ControlSpecQuestionsRequest>;
564
+ export declare const ControlSpecFreezeRequest: z.ZodObject<{
565
+ prompt: z.ZodString;
566
+ scope: z.ZodObject<{
567
+ kind: z.ZodLiteral<"project">;
568
+ root: z.ZodString;
569
+ context: z.ZodDefault<z.ZodEnum<["auto"]>>;
570
+ }, "strict", z.ZodTypeAny, {
571
+ kind: "project";
572
+ root: string;
573
+ context: "auto";
574
+ }, {
575
+ kind: "project";
576
+ root: string;
577
+ context?: "auto" | undefined;
578
+ }>;
579
+ planDir: z.ZodOptional<z.ZodString>;
580
+ plan: z.ZodOptional<z.ZodString>;
581
+ answers: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
582
+ /** Accumulated prior-tier interview decisions. Folded into the frozen
583
+ * SpecPack's decided_tradeoffs so a MULTI-TIER spec carries every tier, not
584
+ * just the last (mirror of ControlSpecQuestionsRequest.priorDecisions). */
585
+ priorDecisions: z.ZodOptional<z.ZodArray<z.ZodObject<{
586
+ question: z.ZodString;
587
+ answer: z.ZodString;
588
+ }, "strip", z.ZodTypeAny, {
589
+ question: string;
590
+ answer: string;
591
+ }, {
592
+ question: string;
593
+ answer: string;
594
+ }>, "many">>;
595
+ }, "strict", z.ZodTypeAny, {
596
+ prompt: string;
597
+ scope: {
598
+ kind: "project";
599
+ root: string;
600
+ context: "auto";
601
+ };
602
+ plan?: string | undefined;
603
+ answers?: unknown[] | undefined;
604
+ priorDecisions?: {
605
+ question: string;
606
+ answer: string;
607
+ }[] | undefined;
608
+ planDir?: string | undefined;
609
+ }, {
610
+ prompt: string;
611
+ scope: {
612
+ kind: "project";
613
+ root: string;
614
+ context?: "auto" | undefined;
615
+ };
616
+ plan?: string | undefined;
617
+ answers?: unknown[] | undefined;
618
+ priorDecisions?: {
619
+ question: string;
620
+ answer: string;
621
+ }[] | undefined;
622
+ planDir?: string | undefined;
623
+ }>;
624
+ export type ControlSpecFreezeRequest = z.infer<typeof ControlSpecFreezeRequest>;
625
+ export declare const ControlRunStartInfo: z.ZodObject<{
626
+ jobId: z.ZodOptional<z.ZodString>;
627
+ runId: z.ZodString;
628
+ taskId: z.ZodOptional<z.ZodString>;
629
+ runDir: z.ZodString;
630
+ }, "strip", z.ZodTypeAny, {
631
+ runId: string;
632
+ runDir: string;
633
+ jobId?: string | undefined;
634
+ taskId?: string | undefined;
635
+ }, {
636
+ runId: string;
637
+ runDir: string;
638
+ jobId?: string | undefined;
639
+ taskId?: string | undefined;
640
+ }>;
641
+ export type ControlRunStartInfo = z.infer<typeof ControlRunStartInfo>;
642
+ export declare const ControlRunState: z.ZodEnum<["queued", "running", "blocked", "succeeded", "no_op", "ungated", "review_not_run", "failed", "cancelled", "interrupted", "exhausted", "not_converged", "stuck_no_progress"]>;
643
+ export type ControlRunState = z.infer<typeof ControlRunState>;
644
+ export declare const ControlQueuedRunInfo: z.ZodObject<{
645
+ jobId: z.ZodString;
646
+ state: z.ZodEnum<["queued", "running", "blocked", "succeeded", "no_op", "ungated", "review_not_run", "failed", "cancelled", "interrupted", "exhausted", "not_converged", "stuck_no_progress"]>;
647
+ error: z.ZodOptional<z.ZodString>;
648
+ }, "strip", z.ZodTypeAny, {
649
+ state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
650
+ jobId: string;
651
+ error?: string | undefined;
652
+ }, {
653
+ state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
654
+ jobId: string;
655
+ error?: string | undefined;
656
+ }>;
657
+ export type ControlQueuedRunInfo = z.infer<typeof ControlQueuedRunInfo>;
658
+ export declare const RunFailure: z.ZodObject<{
659
+ phase: z.ZodDefault<z.ZodString>;
660
+ category: z.ZodDefault<z.ZodEnum<["validation", "project", "auth", "harness_unavailable", "harness_error", "budget", "policy", "cancelled", "internal", "unknown"]>>;
661
+ harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
662
+ attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
663
+ safeMessage: z.ZodString;
664
+ rawDetailRef: z.ZodDefault<z.ZodNullable<z.ZodString>>;
665
+ logRefs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
666
+ eventRefs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
667
+ runDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
668
+ nextActions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
669
+ }, "strip", z.ZodTypeAny, {
670
+ runDir: string | null;
671
+ category: "validation" | "unknown" | "harness_error" | "auth" | "cancelled" | "budget" | "project" | "policy" | "harness_unavailable" | "internal";
672
+ phase: string;
673
+ harnessId: string | null;
674
+ attemptId: string | null;
675
+ safeMessage: string;
676
+ rawDetailRef: string | null;
677
+ logRefs: string[];
678
+ eventRefs: string[];
679
+ nextActions: string[];
680
+ }, {
681
+ safeMessage: string;
682
+ runDir?: string | null | undefined;
683
+ category?: "validation" | "unknown" | "harness_error" | "auth" | "cancelled" | "budget" | "project" | "policy" | "harness_unavailable" | "internal" | undefined;
684
+ phase?: string | undefined;
685
+ harnessId?: string | null | undefined;
686
+ attemptId?: string | null | undefined;
687
+ rawDetailRef?: string | null | undefined;
688
+ logRefs?: string[] | undefined;
689
+ eventRefs?: string[] | undefined;
690
+ nextActions?: string[] | undefined;
691
+ }>;
692
+ export type RunFailure = z.infer<typeof RunFailure>;
693
+ export declare const ControlProjectMetadata: z.ZodObject<{
694
+ kind: z.ZodDefault<z.ZodEnum<["project", "none"]>>;
695
+ root: z.ZodDefault<z.ZodNullable<z.ZodString>>;
696
+ projectName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
697
+ context: z.ZodDefault<z.ZodEnum<["off", "auto"]>>;
698
+ }, "strip", z.ZodTypeAny, {
699
+ kind: "none" | "project";
700
+ root: string | null;
701
+ context: "off" | "auto";
702
+ projectName: string | null;
703
+ }, {
704
+ kind?: "none" | "project" | undefined;
705
+ root?: string | null | undefined;
706
+ context?: "off" | "auto" | undefined;
707
+ projectName?: string | null | undefined;
708
+ }>;
709
+ export type ControlProjectMetadata = z.infer<typeof ControlProjectMetadata>;
710
+ export declare const ControlWebEvidence: z.ZodObject<{
711
+ required: z.ZodDefault<z.ZodBoolean>;
712
+ /** Requested external-context policy for the run. */
713
+ mode: z.ZodDefault<z.ZodEnum<["off", "auto", "cached", "live"]>>;
714
+ /** Mode the selected route actually executed (disclosed upgrades, e.g. claude cached->live). */
715
+ effectiveMode: z.ZodDefault<z.ZodEnum<["off", "auto", "cached", "live"]>>;
716
+ attempted: z.ZodDefault<z.ZodBoolean>;
717
+ satisfied: z.ZodDefault<z.ZodBoolean>;
718
+ status: z.ZodDefault<z.ZodEnum<["none", "attempted", "satisfied", "failed", "unverified"]>>;
719
+ tool: z.ZodDefault<z.ZodNullable<z.ZodString>>;
720
+ target: z.ZodDefault<z.ZodNullable<z.ZodString>>;
721
+ errorSummary: z.ZodDefault<z.ZodNullable<z.ZodString>>;
722
+ rawDetailRef: z.ZodDefault<z.ZodNullable<z.ZodString>>;
723
+ /** False when the run predates telemetry.yaml; surfaces must render "telemetry unavailable". */
724
+ available: z.ZodDefault<z.ZodBoolean>;
725
+ }, "strip", z.ZodTypeAny, {
726
+ status: "none" | "failed" | "attempted" | "unverified" | "satisfied";
727
+ target: string | null;
728
+ tool: string | null;
729
+ mode: "off" | "auto" | "cached" | "live";
730
+ required: boolean;
731
+ attempted: boolean;
732
+ rawDetailRef: string | null;
733
+ effectiveMode: "off" | "auto" | "cached" | "live";
734
+ satisfied: boolean;
735
+ errorSummary: string | null;
736
+ available: boolean;
737
+ }, {
738
+ status?: "none" | "failed" | "attempted" | "unverified" | "satisfied" | undefined;
739
+ target?: string | null | undefined;
740
+ tool?: string | null | undefined;
741
+ mode?: "off" | "auto" | "cached" | "live" | undefined;
742
+ required?: boolean | undefined;
743
+ attempted?: boolean | undefined;
744
+ rawDetailRef?: string | null | undefined;
745
+ effectiveMode?: "off" | "auto" | "cached" | "live" | undefined;
746
+ satisfied?: boolean | undefined;
747
+ errorSummary?: string | null | undefined;
748
+ available?: boolean | undefined;
749
+ }>;
750
+ export type ControlWebEvidence = z.infer<typeof ControlWebEvidence>;
751
+ /**
752
+ * Run-level route evidence projected from telemetry (observed model per
753
+ * attempt). `verified` is true only when an observed model was actually
754
+ * reported by the harness stream — never inferred from the request.
755
+ */
756
+ export declare const ControlRouteInfo: z.ZodObject<{
757
+ requestedModel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
758
+ observedModel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
759
+ harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
760
+ verified: z.ZodDefault<z.ZodBoolean>;
761
+ }, "strip", z.ZodTypeAny, {
762
+ verified: boolean;
763
+ harnessId: string | null;
764
+ requestedModel: string | null;
765
+ observedModel: string | null;
766
+ }, {
767
+ verified?: boolean | undefined;
768
+ harnessId?: string | null | undefined;
769
+ requestedModel?: string | null | undefined;
770
+ observedModel?: string | null | undefined;
771
+ }>;
772
+ export type ControlRouteInfo = z.infer<typeof ControlRouteInfo>;
773
+ /**
774
+ * Honest terminal outcome of a run, projected from final/work_product.yaml and
775
+ * the presence of final/answer.md. Answers "what did this turn actually do?" so
776
+ * a chat surface never shows a green "succeeded" next to nothing (the v0.9 plan
777
+ * bug): `kind:"plan"` means a plan was produced and NO files changed; `diffStat`
778
+ * is null unless a patch exists; `adopted` is true when the live in-place tree
779
+ * was actually mutated this turn (decoupled from a clean review — see applyState).
780
+ */
781
+ export declare const RunApplyState: z.ZodEnum<["not_applied", "applied", "applied_review_blocked", "reverted"]>;
782
+ export type RunApplyState = z.infer<typeof RunApplyState>;
783
+ export declare const ControlRunResult: z.ZodObject<{
784
+ kind: z.ZodDefault<z.ZodEnum<["patch", "answer", "plan", "report", "none"]>>;
785
+ diffStat: z.ZodDefault<z.ZodNullable<z.ZodObject<{
786
+ files: z.ZodNumber;
787
+ additions: z.ZodNumber;
788
+ deletions: z.ZodNumber;
789
+ }, "strip", z.ZodTypeAny, {
790
+ files: number;
791
+ additions: number;
792
+ deletions: number;
793
+ }, {
794
+ files: number;
795
+ additions: number;
796
+ deletions: number;
797
+ }>>>;
798
+ blockers: z.ZodDefault<z.ZodNumber>;
799
+ /** True when the live in-place tree was mutated this turn (regardless of review). */
800
+ adopted: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
801
+ /** Honest application state (decoupled from clean-terminal). */
802
+ applyState: z.ZodDefault<z.ZodEnum<["not_applied", "applied", "applied_review_blocked", "reverted"]>>;
803
+ /** Tree SHA before this turn mutated the in-place tree (revert restore target). */
804
+ preTurnSha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
805
+ /** Tree SHA right after this turn's mutation (revert divergence fence: refuse
806
+ * to revert if the working tree has diverged from this since). */
807
+ postTurnSha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
808
+ /** Revert metadata is available (the turn mutated the live tree in place and
809
+ * pre/post-turn snapshots were recorded), so a Revert affordance may be offered.
810
+ * This is NOT a live-safe guarantee: the server re-checks tree divergence at
811
+ * revert time and refuses (fail loud) if the working tree changed since. */
812
+ revertable: z.ZodDefault<z.ZodBoolean>;
813
+ }, "strip", z.ZodTypeAny, {
814
+ kind: "plan" | "none" | "patch" | "report" | "answer";
815
+ diffStat: {
816
+ files: number;
817
+ additions: number;
818
+ deletions: number;
819
+ } | null;
820
+ blockers: number;
821
+ adopted: boolean | null;
822
+ applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
823
+ preTurnSha: string | null;
824
+ postTurnSha: string | null;
825
+ revertable: boolean;
826
+ }, {
827
+ kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
828
+ diffStat?: {
829
+ files: number;
830
+ additions: number;
831
+ deletions: number;
832
+ } | null | undefined;
833
+ blockers?: number | undefined;
834
+ adopted?: boolean | null | undefined;
835
+ applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
836
+ preTurnSha?: string | null | undefined;
837
+ postTurnSha?: string | null | undefined;
838
+ revertable?: boolean | undefined;
839
+ }>;
840
+ export type ControlRunResult = z.infer<typeof ControlRunResult>;
841
+ export declare const ControlRunSummary: z.ZodObject<{
842
+ jobId: z.ZodString;
843
+ runId: z.ZodString;
844
+ taskId: z.ZodOptional<z.ZodString>;
845
+ state: z.ZodEnum<["queued", "running", "blocked", "succeeded", "no_op", "ungated", "review_not_run", "failed", "cancelled", "interrupted", "exhausted", "not_converged", "stuck_no_progress"]>;
846
+ runDir: z.ZodOptional<z.ZodString>;
847
+ error: z.ZodOptional<z.ZodString>;
848
+ failure: z.ZodDefault<z.ZodNullable<z.ZodObject<{
849
+ phase: z.ZodDefault<z.ZodString>;
850
+ category: z.ZodDefault<z.ZodEnum<["validation", "project", "auth", "harness_unavailable", "harness_error", "budget", "policy", "cancelled", "internal", "unknown"]>>;
851
+ harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
852
+ attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
853
+ safeMessage: z.ZodString;
854
+ rawDetailRef: z.ZodDefault<z.ZodNullable<z.ZodString>>;
855
+ logRefs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
856
+ eventRefs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
857
+ runDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
858
+ nextActions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
859
+ }, "strip", z.ZodTypeAny, {
860
+ runDir: string | null;
861
+ category: "validation" | "unknown" | "harness_error" | "auth" | "cancelled" | "budget" | "project" | "policy" | "harness_unavailable" | "internal";
862
+ phase: string;
863
+ harnessId: string | null;
864
+ attemptId: string | null;
865
+ safeMessage: string;
866
+ rawDetailRef: string | null;
867
+ logRefs: string[];
868
+ eventRefs: string[];
869
+ nextActions: string[];
870
+ }, {
871
+ safeMessage: string;
872
+ runDir?: string | null | undefined;
873
+ category?: "validation" | "unknown" | "harness_error" | "auth" | "cancelled" | "budget" | "project" | "policy" | "harness_unavailable" | "internal" | undefined;
874
+ phase?: string | undefined;
875
+ harnessId?: string | null | undefined;
876
+ attemptId?: string | null | undefined;
877
+ rawDetailRef?: string | null | undefined;
878
+ logRefs?: string[] | undefined;
879
+ eventRefs?: string[] | undefined;
880
+ nextActions?: string[] | undefined;
881
+ }>>>;
882
+ project: z.ZodDefault<z.ZodObject<{
883
+ kind: z.ZodDefault<z.ZodEnum<["project", "none"]>>;
884
+ root: z.ZodDefault<z.ZodNullable<z.ZodString>>;
885
+ projectName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
886
+ context: z.ZodDefault<z.ZodEnum<["off", "auto"]>>;
887
+ }, "strip", z.ZodTypeAny, {
888
+ kind: "none" | "project";
889
+ root: string | null;
890
+ context: "off" | "auto";
891
+ projectName: string | null;
892
+ }, {
893
+ kind?: "none" | "project" | undefined;
894
+ root?: string | null | undefined;
895
+ context?: "off" | "auto" | undefined;
896
+ projectName?: string | null | undefined;
897
+ }>>;
898
+ mode: z.ZodOptional<z.ZodEnum<["ask", "plan", "audit", "agent", "orchestrate"]>>;
899
+ /** v0.9 engine strategy on the mode (flags, not modes): race width / repair caps / swarm / create. */
900
+ strategy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["race", "attempts", "until_clean", "swarm", "create"]>>>;
901
+ prompt: z.ZodOptional<z.ZodString>;
902
+ harnesses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
903
+ primaryHarness: z.ZodOptional<z.ZodString>;
904
+ portfolio: z.ZodOptional<z.ZodEnum<["daily-rich", "balanced", "cheapest", "strongest", "burn", "subscription-first", "api-overflow", "conserve-claude", "conserve-codex"]>>;
905
+ model: z.ZodOptional<z.ZodString>;
906
+ reviewerPanel: z.ZodOptional<z.ZodArray<z.ZodObject<{
907
+ /** Explicit reviewer harness id. Repeated harness ids are allowed so one
908
+ * native provider can review through multiple requested models. */
909
+ harness: z.ZodString;
910
+ /** Optional per-reviewer model hint, passed to that harness only. */
911
+ model: z.ZodOptional<z.ZodString>;
912
+ /** Optional per-reviewer effort hint, passed to that harness only. */
913
+ effort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>;
914
+ }, "strict", z.ZodTypeAny, {
915
+ harness: string;
916
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
917
+ model?: string | undefined;
918
+ }, {
919
+ harness: string;
920
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
921
+ model?: string | undefined;
922
+ }>, "many">>;
923
+ protectedPathApprovals: z.ZodOptional<z.ZodArray<z.ZodObject<{
924
+ path: z.ZodString;
925
+ reason: z.ZodOptional<z.ZodString>;
926
+ }, "strict", z.ZodTypeAny, {
927
+ path: string;
928
+ reason?: string | undefined;
929
+ }, {
930
+ path: string;
931
+ reason?: string | undefined;
932
+ }>, "many">>;
933
+ n: z.ZodOptional<z.ZodNumber>;
934
+ maxUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
935
+ spendUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
936
+ spendEstimated: z.ZodOptional<z.ZodBoolean>;
937
+ access: z.ZodOptional<z.ZodEnum<["readonly", "workspace_write", "full", "external_sandbox_full", "inherit_native"]>>;
938
+ requestedAccess: z.ZodOptional<z.ZodEnum<["readonly", "workspace_write", "full", "external_sandbox_full", "inherit_native"]>>;
939
+ effectiveAccess: z.ZodOptional<z.ZodEnum<["readonly", "workspace_write", "full", "external_sandbox_full", "inherit_native"]>>;
940
+ externalContextPolicy: z.ZodOptional<z.ZodEnum<["off", "auto", "cached", "live"]>>;
941
+ webRequired: z.ZodOptional<z.ZodBoolean>;
942
+ webMode: z.ZodOptional<z.ZodEnum<["off", "auto", "cached", "live"]>>;
943
+ webEvidence: z.ZodDefault<z.ZodObject<{
944
+ required: z.ZodDefault<z.ZodBoolean>;
945
+ /** Requested external-context policy for the run. */
946
+ mode: z.ZodDefault<z.ZodEnum<["off", "auto", "cached", "live"]>>;
947
+ /** Mode the selected route actually executed (disclosed upgrades, e.g. claude cached->live). */
948
+ effectiveMode: z.ZodDefault<z.ZodEnum<["off", "auto", "cached", "live"]>>;
949
+ attempted: z.ZodDefault<z.ZodBoolean>;
950
+ satisfied: z.ZodDefault<z.ZodBoolean>;
951
+ status: z.ZodDefault<z.ZodEnum<["none", "attempted", "satisfied", "failed", "unverified"]>>;
952
+ tool: z.ZodDefault<z.ZodNullable<z.ZodString>>;
953
+ target: z.ZodDefault<z.ZodNullable<z.ZodString>>;
954
+ errorSummary: z.ZodDefault<z.ZodNullable<z.ZodString>>;
955
+ rawDetailRef: z.ZodDefault<z.ZodNullable<z.ZodString>>;
956
+ /** False when the run predates telemetry.yaml; surfaces must render "telemetry unavailable". */
957
+ available: z.ZodDefault<z.ZodBoolean>;
958
+ }, "strip", z.ZodTypeAny, {
959
+ status: "none" | "failed" | "attempted" | "unverified" | "satisfied";
960
+ target: string | null;
961
+ tool: string | null;
962
+ mode: "off" | "auto" | "cached" | "live";
963
+ required: boolean;
964
+ attempted: boolean;
965
+ rawDetailRef: string | null;
966
+ effectiveMode: "off" | "auto" | "cached" | "live";
967
+ satisfied: boolean;
968
+ errorSummary: string | null;
969
+ available: boolean;
970
+ }, {
971
+ status?: "none" | "failed" | "attempted" | "unverified" | "satisfied" | undefined;
972
+ target?: string | null | undefined;
973
+ tool?: string | null | undefined;
974
+ mode?: "off" | "auto" | "cached" | "live" | undefined;
975
+ required?: boolean | undefined;
976
+ attempted?: boolean | undefined;
977
+ rawDetailRef?: string | null | undefined;
978
+ effectiveMode?: "off" | "auto" | "cached" | "live" | undefined;
979
+ satisfied?: boolean | undefined;
980
+ errorSummary?: string | null | undefined;
981
+ available?: boolean | undefined;
982
+ }>>;
983
+ toolPermissionPolicy: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
984
+ outputReadyState: z.ZodDefault<z.ZodEnum<["pending", "finalizing", "ready", "diagnostic"]>>;
985
+ /** Non-blocking tool warnings projected from final/telemetry.yaml. */
986
+ toolWarningsTotal: z.ZodDefault<z.ZodNumber>;
987
+ /** Honest terminal outcome (what the turn did): patch/answer/plan/report/none. */
988
+ result: z.ZodDefault<z.ZodObject<{
989
+ kind: z.ZodDefault<z.ZodEnum<["patch", "answer", "plan", "report", "none"]>>;
990
+ diffStat: z.ZodDefault<z.ZodNullable<z.ZodObject<{
991
+ files: z.ZodNumber;
992
+ additions: z.ZodNumber;
993
+ deletions: z.ZodNumber;
994
+ }, "strip", z.ZodTypeAny, {
995
+ files: number;
996
+ additions: number;
997
+ deletions: number;
998
+ }, {
999
+ files: number;
1000
+ additions: number;
1001
+ deletions: number;
1002
+ }>>>;
1003
+ blockers: z.ZodDefault<z.ZodNumber>;
1004
+ /** True when the live in-place tree was mutated this turn (regardless of review). */
1005
+ adopted: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
1006
+ /** Honest application state (decoupled from clean-terminal). */
1007
+ applyState: z.ZodDefault<z.ZodEnum<["not_applied", "applied", "applied_review_blocked", "reverted"]>>;
1008
+ /** Tree SHA before this turn mutated the in-place tree (revert restore target). */
1009
+ preTurnSha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1010
+ /** Tree SHA right after this turn's mutation (revert divergence fence: refuse
1011
+ * to revert if the working tree has diverged from this since). */
1012
+ postTurnSha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1013
+ /** Revert metadata is available (the turn mutated the live tree in place and
1014
+ * pre/post-turn snapshots were recorded), so a Revert affordance may be offered.
1015
+ * This is NOT a live-safe guarantee: the server re-checks tree divergence at
1016
+ * revert time and refuses (fail loud) if the working tree changed since. */
1017
+ revertable: z.ZodDefault<z.ZodBoolean>;
1018
+ }, "strip", z.ZodTypeAny, {
1019
+ kind: "plan" | "none" | "patch" | "report" | "answer";
1020
+ diffStat: {
1021
+ files: number;
1022
+ additions: number;
1023
+ deletions: number;
1024
+ } | null;
1025
+ blockers: number;
1026
+ adopted: boolean | null;
1027
+ applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
1028
+ preTurnSha: string | null;
1029
+ postTurnSha: string | null;
1030
+ revertable: boolean;
1031
+ }, {
1032
+ kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
1033
+ diffStat?: {
1034
+ files: number;
1035
+ additions: number;
1036
+ deletions: number;
1037
+ } | null | undefined;
1038
+ blockers?: number | undefined;
1039
+ adopted?: boolean | null | undefined;
1040
+ applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
1041
+ preTurnSha?: string | null | undefined;
1042
+ postTurnSha?: string | null | undefined;
1043
+ revertable?: boolean | undefined;
1044
+ }>>;
1045
+ /** True while at least one interaction.requested has no answered/timeout. */
1046
+ waitingOnUser: z.ZodDefault<z.ZodBoolean>;
1047
+ /** Route evidence from telemetry; null when no telemetry exists (legacy). */
1048
+ route: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1049
+ requestedModel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1050
+ observedModel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1051
+ harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1052
+ verified: z.ZodDefault<z.ZodBoolean>;
1053
+ }, "strip", z.ZodTypeAny, {
1054
+ verified: boolean;
1055
+ harnessId: string | null;
1056
+ requestedModel: string | null;
1057
+ observedModel: string | null;
1058
+ }, {
1059
+ verified?: boolean | undefined;
1060
+ harnessId?: string | null | undefined;
1061
+ requestedModel?: string | null | undefined;
1062
+ observedModel?: string | null | undefined;
1063
+ }>>>;
1064
+ tests: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1065
+ specId: z.ZodOptional<z.ZodString>;
1066
+ specHash: z.ZodOptional<z.ZodString>;
1067
+ createdAt: z.ZodOptional<z.ZodString>;
1068
+ startedAt: z.ZodOptional<z.ZodString>;
1069
+ finishedAt: z.ZodOptional<z.ZodString>;
1070
+ }, "strip", z.ZodTypeAny, {
1071
+ state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
1072
+ runId: string;
1073
+ project: {
1074
+ kind: "none" | "project";
1075
+ root: string | null;
1076
+ context: "off" | "auto";
1077
+ projectName: string | null;
1078
+ };
1079
+ jobId: string;
1080
+ failure: {
1081
+ runDir: string | null;
1082
+ category: "validation" | "unknown" | "harness_error" | "auth" | "cancelled" | "budget" | "project" | "policy" | "harness_unavailable" | "internal";
1083
+ phase: string;
1084
+ harnessId: string | null;
1085
+ attemptId: string | null;
1086
+ safeMessage: string;
1087
+ rawDetailRef: string | null;
1088
+ logRefs: string[];
1089
+ eventRefs: string[];
1090
+ nextActions: string[];
1091
+ } | null;
1092
+ webEvidence: {
1093
+ status: "none" | "failed" | "attempted" | "unverified" | "satisfied";
1094
+ target: string | null;
1095
+ tool: string | null;
1096
+ mode: "off" | "auto" | "cached" | "live";
1097
+ required: boolean;
1098
+ attempted: boolean;
1099
+ rawDetailRef: string | null;
1100
+ effectiveMode: "off" | "auto" | "cached" | "live";
1101
+ satisfied: boolean;
1102
+ errorSummary: string | null;
1103
+ available: boolean;
1104
+ };
1105
+ outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
1106
+ toolWarningsTotal: number;
1107
+ result: {
1108
+ kind: "plan" | "none" | "patch" | "report" | "answer";
1109
+ diffStat: {
1110
+ files: number;
1111
+ additions: number;
1112
+ deletions: number;
1113
+ } | null;
1114
+ blockers: number;
1115
+ adopted: boolean | null;
1116
+ applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
1117
+ preTurnSha: string | null;
1118
+ postTurnSha: string | null;
1119
+ revertable: boolean;
1120
+ };
1121
+ waitingOnUser: boolean;
1122
+ route: {
1123
+ verified: boolean;
1124
+ harnessId: string | null;
1125
+ requestedModel: string | null;
1126
+ observedModel: string | null;
1127
+ } | null;
1128
+ prompt?: string | undefined;
1129
+ access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1130
+ error?: string | undefined;
1131
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
1132
+ harnesses?: string[] | undefined;
1133
+ runDir?: string | undefined;
1134
+ tests?: string[] | undefined;
1135
+ portfolio?: "daily-rich" | "balanced" | "cheapest" | "strongest" | "burn" | "subscription-first" | "api-overflow" | "conserve-claude" | "conserve-codex" | undefined;
1136
+ n?: number | undefined;
1137
+ model?: string | undefined;
1138
+ primaryHarness?: string | undefined;
1139
+ maxUsd?: number | null | undefined;
1140
+ externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
1141
+ protectedPathApprovals?: {
1142
+ path: string;
1143
+ reason?: string | undefined;
1144
+ }[] | undefined;
1145
+ specId?: string | undefined;
1146
+ specHash?: string | undefined;
1147
+ reviewerPanel?: {
1148
+ harness: string;
1149
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1150
+ model?: string | undefined;
1151
+ }[] | undefined;
1152
+ createdAt?: string | undefined;
1153
+ startedAt?: string | undefined;
1154
+ finishedAt?: string | undefined;
1155
+ taskId?: string | undefined;
1156
+ strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
1157
+ spendUsd?: number | null | undefined;
1158
+ spendEstimated?: boolean | undefined;
1159
+ requestedAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1160
+ effectiveAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1161
+ webRequired?: boolean | undefined;
1162
+ webMode?: "off" | "auto" | "cached" | "live" | undefined;
1163
+ toolPermissionPolicy?: Record<string, unknown> | undefined;
1164
+ }, {
1165
+ state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
1166
+ runId: string;
1167
+ jobId: string;
1168
+ prompt?: string | undefined;
1169
+ access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1170
+ error?: string | undefined;
1171
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
1172
+ harnesses?: string[] | undefined;
1173
+ runDir?: string | undefined;
1174
+ tests?: string[] | undefined;
1175
+ portfolio?: "daily-rich" | "balanced" | "cheapest" | "strongest" | "burn" | "subscription-first" | "api-overflow" | "conserve-claude" | "conserve-codex" | undefined;
1176
+ project?: {
1177
+ kind?: "none" | "project" | undefined;
1178
+ root?: string | null | undefined;
1179
+ context?: "off" | "auto" | undefined;
1180
+ projectName?: string | null | undefined;
1181
+ } | undefined;
1182
+ n?: number | undefined;
1183
+ model?: string | undefined;
1184
+ primaryHarness?: string | undefined;
1185
+ maxUsd?: number | null | undefined;
1186
+ externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
1187
+ protectedPathApprovals?: {
1188
+ path: string;
1189
+ reason?: string | undefined;
1190
+ }[] | undefined;
1191
+ specId?: string | undefined;
1192
+ specHash?: string | undefined;
1193
+ reviewerPanel?: {
1194
+ harness: string;
1195
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1196
+ model?: string | undefined;
1197
+ }[] | undefined;
1198
+ createdAt?: string | undefined;
1199
+ startedAt?: string | undefined;
1200
+ finishedAt?: string | undefined;
1201
+ taskId?: string | undefined;
1202
+ failure?: {
1203
+ safeMessage: string;
1204
+ runDir?: string | null | undefined;
1205
+ category?: "validation" | "unknown" | "harness_error" | "auth" | "cancelled" | "budget" | "project" | "policy" | "harness_unavailable" | "internal" | undefined;
1206
+ phase?: string | undefined;
1207
+ harnessId?: string | null | undefined;
1208
+ attemptId?: string | null | undefined;
1209
+ rawDetailRef?: string | null | undefined;
1210
+ logRefs?: string[] | undefined;
1211
+ eventRefs?: string[] | undefined;
1212
+ nextActions?: string[] | undefined;
1213
+ } | null | undefined;
1214
+ strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
1215
+ spendUsd?: number | null | undefined;
1216
+ spendEstimated?: boolean | undefined;
1217
+ requestedAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1218
+ effectiveAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1219
+ webRequired?: boolean | undefined;
1220
+ webMode?: "off" | "auto" | "cached" | "live" | undefined;
1221
+ webEvidence?: {
1222
+ status?: "none" | "failed" | "attempted" | "unverified" | "satisfied" | undefined;
1223
+ target?: string | null | undefined;
1224
+ tool?: string | null | undefined;
1225
+ mode?: "off" | "auto" | "cached" | "live" | undefined;
1226
+ required?: boolean | undefined;
1227
+ attempted?: boolean | undefined;
1228
+ rawDetailRef?: string | null | undefined;
1229
+ effectiveMode?: "off" | "auto" | "cached" | "live" | undefined;
1230
+ satisfied?: boolean | undefined;
1231
+ errorSummary?: string | null | undefined;
1232
+ available?: boolean | undefined;
1233
+ } | undefined;
1234
+ toolPermissionPolicy?: Record<string, unknown> | undefined;
1235
+ outputReadyState?: "pending" | "finalizing" | "ready" | "diagnostic" | undefined;
1236
+ toolWarningsTotal?: number | undefined;
1237
+ result?: {
1238
+ kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
1239
+ diffStat?: {
1240
+ files: number;
1241
+ additions: number;
1242
+ deletions: number;
1243
+ } | null | undefined;
1244
+ blockers?: number | undefined;
1245
+ adopted?: boolean | null | undefined;
1246
+ applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
1247
+ preTurnSha?: string | null | undefined;
1248
+ postTurnSha?: string | null | undefined;
1249
+ revertable?: boolean | undefined;
1250
+ } | undefined;
1251
+ waitingOnUser?: boolean | undefined;
1252
+ route?: {
1253
+ verified?: boolean | undefined;
1254
+ harnessId?: string | null | undefined;
1255
+ requestedModel?: string | null | undefined;
1256
+ observedModel?: string | null | undefined;
1257
+ } | null | undefined;
1258
+ }>;
1259
+ export type ControlRunSummary = z.infer<typeof ControlRunSummary>;
1260
+ export declare const ControlPrimaryOutput: z.ZodObject<{
1261
+ kind: z.ZodEnum<["answer", "report", "plan", "summary", "patch", "diagnostic"]>;
1262
+ path: z.ZodString;
1263
+ text: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1264
+ bytes: z.ZodOptional<z.ZodNumber>;
1265
+ }, "strip", z.ZodTypeAny, {
1266
+ path: string;
1267
+ kind: "diagnostic" | "plan" | "summary" | "patch" | "report" | "answer";
1268
+ text: string | null;
1269
+ bytes?: number | undefined;
1270
+ }, {
1271
+ path: string;
1272
+ kind: "diagnostic" | "plan" | "summary" | "patch" | "report" | "answer";
1273
+ text?: string | null | undefined;
1274
+ bytes?: number | undefined;
1275
+ }>;
1276
+ export type ControlPrimaryOutput = z.infer<typeof ControlPrimaryOutput>;
1277
+ export declare const ControlTimelineEvent: z.ZodObject<{
1278
+ type: z.ZodString;
1279
+ ts: z.ZodOptional<z.ZodString>;
1280
+ harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1281
+ attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1282
+ title: z.ZodString;
1283
+ detail: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1284
+ severity: z.ZodDefault<z.ZodEnum<["info", "warning", "error"]>>;
1285
+ toolName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1286
+ target: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1287
+ errorSummary: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1288
+ rawRef: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1289
+ }, "strip", z.ZodTypeAny, {
1290
+ type: string;
1291
+ detail: string | null;
1292
+ target: string | null;
1293
+ title: string;
1294
+ severity: "error" | "info" | "warning";
1295
+ harnessId: string | null;
1296
+ attemptId: string | null;
1297
+ errorSummary: string | null;
1298
+ toolName: string | null;
1299
+ rawRef: string | null;
1300
+ ts?: string | undefined;
1301
+ }, {
1302
+ type: string;
1303
+ title: string;
1304
+ detail?: string | null | undefined;
1305
+ target?: string | null | undefined;
1306
+ ts?: string | undefined;
1307
+ severity?: "error" | "info" | "warning" | undefined;
1308
+ harnessId?: string | null | undefined;
1309
+ attemptId?: string | null | undefined;
1310
+ errorSummary?: string | null | undefined;
1311
+ toolName?: string | null | undefined;
1312
+ rawRef?: string | null | undefined;
1313
+ }>;
1314
+ export type ControlTimelineEvent = z.infer<typeof ControlTimelineEvent>;
1315
+ export declare const ControlBudgetSnapshot: z.ZodObject<{
1316
+ maxUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1317
+ spendUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1318
+ remainingUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1319
+ estimated: z.ZodDefault<z.ZodBoolean>;
1320
+ source: z.ZodDefault<z.ZodEnum<["decision", "events", "settings", "unknown"]>>;
1321
+ }, "strip", z.ZodTypeAny, {
1322
+ source: "unknown" | "decision" | "events" | "settings";
1323
+ estimated: boolean;
1324
+ maxUsd: number | null;
1325
+ spendUsd: number | null;
1326
+ remainingUsd: number | null;
1327
+ }, {
1328
+ source?: "unknown" | "decision" | "events" | "settings" | undefined;
1329
+ estimated?: boolean | undefined;
1330
+ maxUsd?: number | null | undefined;
1331
+ spendUsd?: number | null | undefined;
1332
+ remainingUsd?: number | null | undefined;
1333
+ }>;
1334
+ export type ControlBudgetSnapshot = z.infer<typeof ControlBudgetSnapshot>;
1335
+ export declare const ControlArtifactInfo: z.ZodObject<{
1336
+ path: z.ZodString;
1337
+ kind: z.ZodEnum<["file", "directory"]>;
1338
+ bytes: z.ZodOptional<z.ZodNumber>;
1339
+ /** Clean MIME type derived from the extension (e.g. `image/png`, `text/plain`,
1340
+ * `application/pdf`); lets a gallery render text vs image vs pdf. Absent for
1341
+ * directories. */
1342
+ mime: z.ZodOptional<z.ZodString>;
1343
+ }, "strip", z.ZodTypeAny, {
1344
+ path: string;
1345
+ kind: "file" | "directory";
1346
+ mime?: string | undefined;
1347
+ bytes?: number | undefined;
1348
+ }, {
1349
+ path: string;
1350
+ kind: "file" | "directory";
1351
+ mime?: string | undefined;
1352
+ bytes?: number | undefined;
1353
+ }>;
1354
+ export type ControlArtifactInfo = z.infer<typeof ControlArtifactInfo>;
1355
+ /** A live interaction awaiting the user's answer (snapshot projection). */
1356
+ export declare const ControlPendingInteraction: z.ZodObject<{
1357
+ interactionId: z.ZodString;
1358
+ runId: z.ZodString;
1359
+ attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1360
+ harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1361
+ sourceTool: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1362
+ questions: z.ZodDefault<z.ZodArray<z.ZodObject<{
1363
+ id: z.ZodString;
1364
+ question: z.ZodString;
1365
+ header: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1366
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
1367
+ label: z.ZodString;
1368
+ description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1369
+ }, "strip", z.ZodTypeAny, {
1370
+ label: string;
1371
+ description: string | null;
1372
+ }, {
1373
+ label: string;
1374
+ description?: string | null | undefined;
1375
+ }>, "many">>;
1376
+ multi_select: z.ZodDefault<z.ZodBoolean>;
1377
+ }, "strip", z.ZodTypeAny, {
1378
+ options: {
1379
+ label: string;
1380
+ description: string | null;
1381
+ }[];
1382
+ id: string;
1383
+ question: string;
1384
+ header: string | null;
1385
+ multi_select: boolean;
1386
+ }, {
1387
+ id: string;
1388
+ question: string;
1389
+ options?: {
1390
+ label: string;
1391
+ description?: string | null | undefined;
1392
+ }[] | undefined;
1393
+ header?: string | null | undefined;
1394
+ multi_select?: boolean | undefined;
1395
+ }>, "many">>;
1396
+ requestedAt: z.ZodString;
1397
+ timeoutAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1398
+ }, "strip", z.ZodTypeAny, {
1399
+ questions: {
1400
+ options: {
1401
+ label: string;
1402
+ description: string | null;
1403
+ }[];
1404
+ id: string;
1405
+ question: string;
1406
+ header: string | null;
1407
+ multi_select: boolean;
1408
+ }[];
1409
+ runId: string;
1410
+ harnessId: string | null;
1411
+ attemptId: string | null;
1412
+ interactionId: string;
1413
+ sourceTool: string | null;
1414
+ requestedAt: string;
1415
+ timeoutAt: string | null;
1416
+ }, {
1417
+ runId: string;
1418
+ interactionId: string;
1419
+ requestedAt: string;
1420
+ questions?: {
1421
+ id: string;
1422
+ question: string;
1423
+ options?: {
1424
+ label: string;
1425
+ description?: string | null | undefined;
1426
+ }[] | undefined;
1427
+ header?: string | null | undefined;
1428
+ multi_select?: boolean | undefined;
1429
+ }[] | undefined;
1430
+ harnessId?: string | null | undefined;
1431
+ attemptId?: string | null | undefined;
1432
+ sourceTool?: string | null | undefined;
1433
+ timeoutAt?: string | null | undefined;
1434
+ }>;
1435
+ export type ControlPendingInteraction = z.infer<typeof ControlPendingInteraction>;
1436
+ export declare const ControlInteractionAnswerRequest: z.ZodObject<{
1437
+ answers: z.ZodDefault<z.ZodArray<z.ZodObject<{
1438
+ questionId: z.ZodString;
1439
+ selectedLabels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1440
+ freeText: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1441
+ }, "strict", z.ZodTypeAny, {
1442
+ questionId: string;
1443
+ selectedLabels: string[];
1444
+ freeText: string | null;
1445
+ }, {
1446
+ questionId: string;
1447
+ selectedLabels?: string[] | undefined;
1448
+ freeText?: string | null | undefined;
1449
+ }>, "many">>;
1450
+ }, "strict", z.ZodTypeAny, {
1451
+ answers: {
1452
+ questionId: string;
1453
+ selectedLabels: string[];
1454
+ freeText: string | null;
1455
+ }[];
1456
+ }, {
1457
+ answers?: {
1458
+ questionId: string;
1459
+ selectedLabels?: string[] | undefined;
1460
+ freeText?: string | null | undefined;
1461
+ }[] | undefined;
1462
+ }>;
1463
+ export type ControlInteractionAnswerRequest = z.infer<typeof ControlInteractionAnswerRequest>;
1464
+ export declare const ControlInteractionAnswerResponse: z.ZodObject<{
1465
+ accepted: z.ZodBoolean;
1466
+ status: z.ZodEnum<["delivered", "not_found", "already_resolved", "rejected"]>;
1467
+ message: z.ZodOptional<z.ZodString>;
1468
+ }, "strip", z.ZodTypeAny, {
1469
+ status: "delivered" | "not_found" | "already_resolved" | "rejected";
1470
+ accepted: boolean;
1471
+ message?: string | undefined;
1472
+ }, {
1473
+ status: "delivered" | "not_found" | "already_resolved" | "rejected";
1474
+ accepted: boolean;
1475
+ message?: string | undefined;
1476
+ }>;
1477
+ export type ControlInteractionAnswerResponse = z.infer<typeof ControlInteractionAnswerResponse>;
1478
+ export declare const RunControlTarget: z.ZodObject<{
1479
+ attemptId: z.ZodOptional<z.ZodString>;
1480
+ harnessId: z.ZodOptional<z.ZodString>;
1481
+ sessionId: z.ZodOptional<z.ZodString>;
1482
+ requestId: z.ZodOptional<z.ZodString>;
1483
+ }, "strip", z.ZodTypeAny, {
1484
+ harnessId?: string | undefined;
1485
+ attemptId?: string | undefined;
1486
+ sessionId?: string | undefined;
1487
+ requestId?: string | undefined;
1488
+ }, {
1489
+ harnessId?: string | undefined;
1490
+ attemptId?: string | undefined;
1491
+ sessionId?: string | undefined;
1492
+ requestId?: string | undefined;
1493
+ }>;
1494
+ export type RunControlTarget = z.infer<typeof RunControlTarget>;
1495
+ export declare const RunControl: z.ZodObject<{
1496
+ kind: z.ZodEnum<["cancel"]>;
1497
+ target: z.ZodDefault<z.ZodObject<{
1498
+ attemptId: z.ZodOptional<z.ZodString>;
1499
+ harnessId: z.ZodOptional<z.ZodString>;
1500
+ sessionId: z.ZodOptional<z.ZodString>;
1501
+ requestId: z.ZodOptional<z.ZodString>;
1502
+ }, "strip", z.ZodTypeAny, {
1503
+ harnessId?: string | undefined;
1504
+ attemptId?: string | undefined;
1505
+ sessionId?: string | undefined;
1506
+ requestId?: string | undefined;
1507
+ }, {
1508
+ harnessId?: string | undefined;
1509
+ attemptId?: string | undefined;
1510
+ sessionId?: string | undefined;
1511
+ requestId?: string | undefined;
1512
+ }>>;
1513
+ reason: z.ZodOptional<z.ZodString>;
1514
+ }, "strip", z.ZodTypeAny, {
1515
+ kind: "cancel";
1516
+ target: {
1517
+ harnessId?: string | undefined;
1518
+ attemptId?: string | undefined;
1519
+ sessionId?: string | undefined;
1520
+ requestId?: string | undefined;
1521
+ };
1522
+ reason?: string | undefined;
1523
+ }, {
1524
+ kind: "cancel";
1525
+ target?: {
1526
+ harnessId?: string | undefined;
1527
+ attemptId?: string | undefined;
1528
+ sessionId?: string | undefined;
1529
+ requestId?: string | undefined;
1530
+ } | undefined;
1531
+ reason?: string | undefined;
1532
+ }>;
1533
+ export type RunControl = z.infer<typeof RunControl>;
1534
+ export declare const ControlRunControlRequest: z.ZodObject<{
1535
+ control: z.ZodObject<{
1536
+ kind: z.ZodEnum<["cancel"]>;
1537
+ target: z.ZodDefault<z.ZodObject<{
1538
+ attemptId: z.ZodOptional<z.ZodString>;
1539
+ harnessId: z.ZodOptional<z.ZodString>;
1540
+ sessionId: z.ZodOptional<z.ZodString>;
1541
+ requestId: z.ZodOptional<z.ZodString>;
1542
+ }, "strip", z.ZodTypeAny, {
1543
+ harnessId?: string | undefined;
1544
+ attemptId?: string | undefined;
1545
+ sessionId?: string | undefined;
1546
+ requestId?: string | undefined;
1547
+ }, {
1548
+ harnessId?: string | undefined;
1549
+ attemptId?: string | undefined;
1550
+ sessionId?: string | undefined;
1551
+ requestId?: string | undefined;
1552
+ }>>;
1553
+ reason: z.ZodOptional<z.ZodString>;
1554
+ }, "strip", z.ZodTypeAny, {
1555
+ kind: "cancel";
1556
+ target: {
1557
+ harnessId?: string | undefined;
1558
+ attemptId?: string | undefined;
1559
+ sessionId?: string | undefined;
1560
+ requestId?: string | undefined;
1561
+ };
1562
+ reason?: string | undefined;
1563
+ }, {
1564
+ kind: "cancel";
1565
+ target?: {
1566
+ harnessId?: string | undefined;
1567
+ attemptId?: string | undefined;
1568
+ sessionId?: string | undefined;
1569
+ requestId?: string | undefined;
1570
+ } | undefined;
1571
+ reason?: string | undefined;
1572
+ }>;
1573
+ }, "strip", z.ZodTypeAny, {
1574
+ control: {
1575
+ kind: "cancel";
1576
+ target: {
1577
+ harnessId?: string | undefined;
1578
+ attemptId?: string | undefined;
1579
+ sessionId?: string | undefined;
1580
+ requestId?: string | undefined;
1581
+ };
1582
+ reason?: string | undefined;
1583
+ };
1584
+ }, {
1585
+ control: {
1586
+ kind: "cancel";
1587
+ target?: {
1588
+ harnessId?: string | undefined;
1589
+ attemptId?: string | undefined;
1590
+ sessionId?: string | undefined;
1591
+ requestId?: string | undefined;
1592
+ } | undefined;
1593
+ reason?: string | undefined;
1594
+ };
1595
+ }>;
1596
+ export type ControlRunControlRequest = z.infer<typeof ControlRunControlRequest>;
1597
+ export declare const ControlRunControlResponse: z.ZodObject<{
1598
+ accepted: z.ZodBoolean;
1599
+ status: z.ZodDefault<z.ZodEnum<["applied", "queued", "rejected", "unsupported"]>>;
1600
+ runId: z.ZodOptional<z.ZodString>;
1601
+ message: z.ZodOptional<z.ZodString>;
1602
+ }, "strip", z.ZodTypeAny, {
1603
+ status: "queued" | "applied" | "rejected" | "unsupported";
1604
+ accepted: boolean;
1605
+ message?: string | undefined;
1606
+ runId?: string | undefined;
1607
+ }, {
1608
+ accepted: boolean;
1609
+ message?: string | undefined;
1610
+ status?: "queued" | "applied" | "rejected" | "unsupported" | undefined;
1611
+ runId?: string | undefined;
1612
+ }>;
1613
+ export type ControlRunControlResponse = z.infer<typeof ControlRunControlResponse>;
1614
+ export declare const ApplyTarget: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1615
+ kind: z.ZodLiteral<"original_project">;
1616
+ }, "strict", z.ZodTypeAny, {
1617
+ kind: "original_project";
1618
+ }, {
1619
+ kind: "original_project";
1620
+ }>, z.ZodObject<{
1621
+ kind: z.ZodLiteral<"project">;
1622
+ root: z.ZodString;
1623
+ }, "strict", z.ZodTypeAny, {
1624
+ kind: "project";
1625
+ root: string;
1626
+ }, {
1627
+ kind: "project";
1628
+ root: string;
1629
+ }>]>;
1630
+ export type ApplyTarget = z.infer<typeof ApplyTarget>;
1631
+ export declare const ControlApplyCheckRequest: z.ZodObject<{
1632
+ target: z.ZodDefault<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1633
+ kind: z.ZodLiteral<"original_project">;
1634
+ }, "strict", z.ZodTypeAny, {
1635
+ kind: "original_project";
1636
+ }, {
1637
+ kind: "original_project";
1638
+ }>, z.ZodObject<{
1639
+ kind: z.ZodLiteral<"project">;
1640
+ root: z.ZodString;
1641
+ }, "strict", z.ZodTypeAny, {
1642
+ kind: "project";
1643
+ root: string;
1644
+ }, {
1645
+ kind: "project";
1646
+ root: string;
1647
+ }>]>>;
1648
+ }, "strict", z.ZodTypeAny, {
1649
+ target: {
1650
+ kind: "original_project";
1651
+ } | {
1652
+ kind: "project";
1653
+ root: string;
1654
+ };
1655
+ }, {
1656
+ target?: {
1657
+ kind: "original_project";
1658
+ } | {
1659
+ kind: "project";
1660
+ root: string;
1661
+ } | undefined;
1662
+ }>;
1663
+ export type ControlApplyCheckRequest = z.infer<typeof ControlApplyCheckRequest>;
1664
+ export declare const ControlApplyRequest: z.ZodObject<{
1665
+ target: z.ZodDefault<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1666
+ kind: z.ZodLiteral<"original_project">;
1667
+ }, "strict", z.ZodTypeAny, {
1668
+ kind: "original_project";
1669
+ }, {
1670
+ kind: "original_project";
1671
+ }>, z.ZodObject<{
1672
+ kind: z.ZodLiteral<"project">;
1673
+ root: z.ZodString;
1674
+ }, "strict", z.ZodTypeAny, {
1675
+ kind: "project";
1676
+ root: string;
1677
+ }, {
1678
+ kind: "project";
1679
+ root: string;
1680
+ }>]>>;
1681
+ mode: z.ZodDefault<z.ZodEnum<["artifact_only", "apply", "branch", "commit", "pr"]>>;
1682
+ branch: z.ZodOptional<z.ZodString>;
1683
+ message: z.ZodOptional<z.ZodString>;
1684
+ }, "strict", z.ZodTypeAny, {
1685
+ target: {
1686
+ kind: "original_project";
1687
+ } | {
1688
+ kind: "project";
1689
+ root: string;
1690
+ };
1691
+ mode: "apply" | "commit" | "branch" | "pr" | "artifact_only";
1692
+ message?: string | undefined;
1693
+ branch?: string | undefined;
1694
+ }, {
1695
+ message?: string | undefined;
1696
+ target?: {
1697
+ kind: "original_project";
1698
+ } | {
1699
+ kind: "project";
1700
+ root: string;
1701
+ } | undefined;
1702
+ mode?: "apply" | "commit" | "branch" | "pr" | "artifact_only" | undefined;
1703
+ branch?: string | undefined;
1704
+ }>;
1705
+ export type ControlApplyRequest = z.infer<typeof ControlApplyRequest>;
1706
+ /**
1707
+ * Operator decision on a NEEDS_HUMAN-blocked run (review_actions). Closes the
1708
+ * v0.8 "apply: human_review" dead end: a typed, auditable unblock path instead
1709
+ * of a read-only review queue.
1710
+ */
1711
+ export declare const RunDecisionAction: z.ZodEnum<["accept_clean_patch", "rerun_with_feedback", "accept_risk", "override_needs_human", "revert_run"]>;
1712
+ export type RunDecisionAction = z.infer<typeof RunDecisionAction>;
1713
+ export declare const ControlRunDecisionRequest: z.ZodObject<{
1714
+ action: z.ZodEnum<["accept_clean_patch", "rerun_with_feedback", "accept_risk", "override_needs_human", "revert_run"]>;
1715
+ /** Findings the decision targets (override/accept_risk). */
1716
+ findingIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1717
+ /** Reviewer feedback to seed a rerun turn. */
1718
+ feedback: z.ZodOptional<z.ZodString>;
1719
+ /** Risk reasons being explicitly accepted (recorded, never silent). */
1720
+ acceptedRisks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1721
+ /** Apply mode + target for accept_clean_patch. */
1722
+ applyMode: z.ZodOptional<z.ZodEnum<["artifact_only", "apply", "branch", "commit", "pr"]>>;
1723
+ target: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1724
+ kind: z.ZodLiteral<"original_project">;
1725
+ }, "strict", z.ZodTypeAny, {
1726
+ kind: "original_project";
1727
+ }, {
1728
+ kind: "original_project";
1729
+ }>, z.ZodObject<{
1730
+ kind: z.ZodLiteral<"project">;
1731
+ root: z.ZodString;
1732
+ }, "strict", z.ZodTypeAny, {
1733
+ kind: "project";
1734
+ root: string;
1735
+ }, {
1736
+ kind: "project";
1737
+ root: string;
1738
+ }>]>>;
1739
+ }, "strict", z.ZodTypeAny, {
1740
+ action: "accept_clean_patch" | "rerun_with_feedback" | "accept_risk" | "override_needs_human" | "revert_run";
1741
+ findingIds: string[];
1742
+ acceptedRisks: string[];
1743
+ target?: {
1744
+ kind: "original_project";
1745
+ } | {
1746
+ kind: "project";
1747
+ root: string;
1748
+ } | undefined;
1749
+ feedback?: string | undefined;
1750
+ applyMode?: "apply" | "commit" | "branch" | "pr" | "artifact_only" | undefined;
1751
+ }, {
1752
+ action: "accept_clean_patch" | "rerun_with_feedback" | "accept_risk" | "override_needs_human" | "revert_run";
1753
+ target?: {
1754
+ kind: "original_project";
1755
+ } | {
1756
+ kind: "project";
1757
+ root: string;
1758
+ } | undefined;
1759
+ findingIds?: string[] | undefined;
1760
+ feedback?: string | undefined;
1761
+ acceptedRisks?: string[] | undefined;
1762
+ applyMode?: "apply" | "commit" | "branch" | "pr" | "artifact_only" | undefined;
1763
+ }>;
1764
+ export type ControlRunDecisionRequest = z.infer<typeof ControlRunDecisionRequest>;
1765
+ export declare const ControlRunDecisionResponse: z.ZodObject<{
1766
+ accepted: z.ZodBoolean;
1767
+ status: z.ZodEnum<["applied", "requeued", "rejected", "unsupported"]>;
1768
+ /** New run id when the decision re-enqueues a turn (rerun_with_feedback). */
1769
+ newRunId: z.ZodOptional<z.ZodString>;
1770
+ message: z.ZodOptional<z.ZodString>;
1771
+ }, "strip", z.ZodTypeAny, {
1772
+ status: "applied" | "rejected" | "unsupported" | "requeued";
1773
+ accepted: boolean;
1774
+ message?: string | undefined;
1775
+ newRunId?: string | undefined;
1776
+ }, {
1777
+ status: "applied" | "rejected" | "unsupported" | "requeued";
1778
+ accepted: boolean;
1779
+ message?: string | undefined;
1780
+ newRunId?: string | undefined;
1781
+ }>;
1782
+ export type ControlRunDecisionResponse = z.infer<typeof ControlRunDecisionResponse>;
1783
+ export declare const ControlThread: z.ZodObject<{
1784
+ id: z.ZodString;
1785
+ title: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1786
+ repoRoot: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1787
+ mode: z.ZodOptional<z.ZodEnum<["ask", "plan", "audit", "agent", "orchestrate"]>>;
1788
+ /** How turns touch files (in-place live tree vs isolated worktree). */
1789
+ workspaceMode: z.ZodDefault<z.ZodEnum<["in_place", "isolated"]>>;
1790
+ authPreference: z.ZodDefault<z.ZodEnum<["subscription", "api_key", "auto"]>>;
1791
+ primaryHarness: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1792
+ /** Sticky eligible pool for the thread (empty => engine auto-pools). */
1793
+ eligibleHarnesses: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1794
+ state: z.ZodDefault<z.ZodEnum<["active", "closed"]>>;
1795
+ runIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1796
+ headRunId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1797
+ /** True when the head turn is blocked on a human decision (needs-me inbox). */
1798
+ needsHuman: z.ZodDefault<z.ZodBoolean>;
1799
+ createdAt: z.ZodString;
1800
+ updatedAt: z.ZodString;
1801
+ }, "strip", z.ZodTypeAny, {
1802
+ id: string;
1803
+ title: string | null;
1804
+ state: "active" | "closed";
1805
+ primaryHarness: string | null;
1806
+ authPreference: "auto" | "subscription" | "api_key";
1807
+ createdAt: string;
1808
+ repoRoot: string | null;
1809
+ workspaceMode: "in_place" | "isolated";
1810
+ eligibleHarnesses: string[];
1811
+ runIds: string[];
1812
+ headRunId: string | null;
1813
+ needsHuman: boolean;
1814
+ updatedAt: string;
1815
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
1816
+ }, {
1817
+ id: string;
1818
+ createdAt: string;
1819
+ updatedAt: string;
1820
+ title?: string | null | undefined;
1821
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
1822
+ state?: "active" | "closed" | undefined;
1823
+ primaryHarness?: string | null | undefined;
1824
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
1825
+ repoRoot?: string | null | undefined;
1826
+ workspaceMode?: "in_place" | "isolated" | undefined;
1827
+ eligibleHarnesses?: string[] | undefined;
1828
+ runIds?: string[] | undefined;
1829
+ headRunId?: string | null | undefined;
1830
+ needsHuman?: boolean | undefined;
1831
+ }>;
1832
+ export type ControlThread = z.infer<typeof ControlThread>;
1833
+ export declare const ControlSession: z.ZodObject<{
1834
+ id: z.ZodString;
1835
+ threadId: z.ZodString;
1836
+ harnessId: z.ZodString;
1837
+ nativeSessionId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1838
+ observedModel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1839
+ state: z.ZodDefault<z.ZodEnum<["live", "stale", "rebound"]>>;
1840
+ }, "strip", z.ZodTypeAny, {
1841
+ id: string;
1842
+ state: "live" | "stale" | "rebound";
1843
+ threadId: string;
1844
+ harnessId: string;
1845
+ observedModel: string | null;
1846
+ nativeSessionId: string | null;
1847
+ }, {
1848
+ id: string;
1849
+ threadId: string;
1850
+ harnessId: string;
1851
+ state?: "live" | "stale" | "rebound" | undefined;
1852
+ observedModel?: string | null | undefined;
1853
+ nativeSessionId?: string | null | undefined;
1854
+ }>;
1855
+ export type ControlSession = z.infer<typeof ControlSession>;
1856
+ /**
1857
+ * Compact run state embedded on a turn so a chat surface renders the whole
1858
+ * conversation from one GET /threads/:id (no N+1 run-detail fetch per turn).
1859
+ */
1860
+ export declare const ControlTurnRunCard: z.ZodObject<{
1861
+ state: z.ZodEnum<["queued", "running", "blocked", "succeeded", "no_op", "ungated", "review_not_run", "failed", "cancelled", "interrupted", "exhausted", "not_converged", "stuck_no_progress"]>;
1862
+ mode: z.ZodOptional<z.ZodEnum<["ask", "plan", "audit", "agent", "orchestrate"]>>;
1863
+ strategy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["race", "attempts", "until_clean", "swarm", "create"]>>>;
1864
+ n: z.ZodOptional<z.ZodNumber>;
1865
+ result: z.ZodDefault<z.ZodObject<{
1866
+ kind: z.ZodDefault<z.ZodEnum<["patch", "answer", "plan", "report", "none"]>>;
1867
+ diffStat: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1868
+ files: z.ZodNumber;
1869
+ additions: z.ZodNumber;
1870
+ deletions: z.ZodNumber;
1871
+ }, "strip", z.ZodTypeAny, {
1872
+ files: number;
1873
+ additions: number;
1874
+ deletions: number;
1875
+ }, {
1876
+ files: number;
1877
+ additions: number;
1878
+ deletions: number;
1879
+ }>>>;
1880
+ blockers: z.ZodDefault<z.ZodNumber>;
1881
+ /** True when the live in-place tree was mutated this turn (regardless of review). */
1882
+ adopted: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
1883
+ /** Honest application state (decoupled from clean-terminal). */
1884
+ applyState: z.ZodDefault<z.ZodEnum<["not_applied", "applied", "applied_review_blocked", "reverted"]>>;
1885
+ /** Tree SHA before this turn mutated the in-place tree (revert restore target). */
1886
+ preTurnSha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1887
+ /** Tree SHA right after this turn's mutation (revert divergence fence: refuse
1888
+ * to revert if the working tree has diverged from this since). */
1889
+ postTurnSha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1890
+ /** Revert metadata is available (the turn mutated the live tree in place and
1891
+ * pre/post-turn snapshots were recorded), so a Revert affordance may be offered.
1892
+ * This is NOT a live-safe guarantee: the server re-checks tree divergence at
1893
+ * revert time and refuses (fail loud) if the working tree changed since. */
1894
+ revertable: z.ZodDefault<z.ZodBoolean>;
1895
+ }, "strip", z.ZodTypeAny, {
1896
+ kind: "plan" | "none" | "patch" | "report" | "answer";
1897
+ diffStat: {
1898
+ files: number;
1899
+ additions: number;
1900
+ deletions: number;
1901
+ } | null;
1902
+ blockers: number;
1903
+ adopted: boolean | null;
1904
+ applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
1905
+ preTurnSha: string | null;
1906
+ postTurnSha: string | null;
1907
+ revertable: boolean;
1908
+ }, {
1909
+ kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
1910
+ diffStat?: {
1911
+ files: number;
1912
+ additions: number;
1913
+ deletions: number;
1914
+ } | null | undefined;
1915
+ blockers?: number | undefined;
1916
+ adopted?: boolean | null | undefined;
1917
+ applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
1918
+ preTurnSha?: string | null | undefined;
1919
+ postTurnSha?: string | null | undefined;
1920
+ revertable?: boolean | undefined;
1921
+ }>>;
1922
+ spendUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1923
+ outputReadyState: z.ZodDefault<z.ZodEnum<["pending", "finalizing", "ready", "diagnostic"]>>;
1924
+ waitingOnUser: z.ZodDefault<z.ZodBoolean>;
1925
+ finishedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1926
+ }, "strip", z.ZodTypeAny, {
1927
+ state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
1928
+ finishedAt: string | null;
1929
+ outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
1930
+ result: {
1931
+ kind: "plan" | "none" | "patch" | "report" | "answer";
1932
+ diffStat: {
1933
+ files: number;
1934
+ additions: number;
1935
+ deletions: number;
1936
+ } | null;
1937
+ blockers: number;
1938
+ adopted: boolean | null;
1939
+ applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
1940
+ preTurnSha: string | null;
1941
+ postTurnSha: string | null;
1942
+ revertable: boolean;
1943
+ };
1944
+ waitingOnUser: boolean;
1945
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
1946
+ n?: number | undefined;
1947
+ strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
1948
+ spendUsd?: number | null | undefined;
1949
+ }, {
1950
+ state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
1951
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
1952
+ n?: number | undefined;
1953
+ finishedAt?: string | null | undefined;
1954
+ strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
1955
+ spendUsd?: number | null | undefined;
1956
+ outputReadyState?: "pending" | "finalizing" | "ready" | "diagnostic" | undefined;
1957
+ result?: {
1958
+ kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
1959
+ diffStat?: {
1960
+ files: number;
1961
+ additions: number;
1962
+ deletions: number;
1963
+ } | null | undefined;
1964
+ blockers?: number | undefined;
1965
+ adopted?: boolean | null | undefined;
1966
+ applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
1967
+ preTurnSha?: string | null | undefined;
1968
+ postTurnSha?: string | null | undefined;
1969
+ revertable?: boolean | undefined;
1970
+ } | undefined;
1971
+ waitingOnUser?: boolean | undefined;
1972
+ }>;
1973
+ export type ControlTurnRunCard = z.infer<typeof ControlTurnRunCard>;
1974
+ export declare const ControlThreadTurn: z.ZodObject<{
1975
+ id: z.ZodString;
1976
+ threadId: z.ZodString;
1977
+ runId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1978
+ parentRunId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1979
+ /** Set when this turn implements an approved plan from an earlier run. */
1980
+ planRunId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1981
+ kind: z.ZodDefault<z.ZodEnum<["initial", "followup", "decision"]>>;
1982
+ prompt: z.ZodDefault<z.ZodString>;
1983
+ /** Embedded run card (outcome/state) so the chat renders without N+1 fetches. */
1984
+ run: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1985
+ state: z.ZodEnum<["queued", "running", "blocked", "succeeded", "no_op", "ungated", "review_not_run", "failed", "cancelled", "interrupted", "exhausted", "not_converged", "stuck_no_progress"]>;
1986
+ mode: z.ZodOptional<z.ZodEnum<["ask", "plan", "audit", "agent", "orchestrate"]>>;
1987
+ strategy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["race", "attempts", "until_clean", "swarm", "create"]>>>;
1988
+ n: z.ZodOptional<z.ZodNumber>;
1989
+ result: z.ZodDefault<z.ZodObject<{
1990
+ kind: z.ZodDefault<z.ZodEnum<["patch", "answer", "plan", "report", "none"]>>;
1991
+ diffStat: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1992
+ files: z.ZodNumber;
1993
+ additions: z.ZodNumber;
1994
+ deletions: z.ZodNumber;
1995
+ }, "strip", z.ZodTypeAny, {
1996
+ files: number;
1997
+ additions: number;
1998
+ deletions: number;
1999
+ }, {
2000
+ files: number;
2001
+ additions: number;
2002
+ deletions: number;
2003
+ }>>>;
2004
+ blockers: z.ZodDefault<z.ZodNumber>;
2005
+ /** True when the live in-place tree was mutated this turn (regardless of review). */
2006
+ adopted: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
2007
+ /** Honest application state (decoupled from clean-terminal). */
2008
+ applyState: z.ZodDefault<z.ZodEnum<["not_applied", "applied", "applied_review_blocked", "reverted"]>>;
2009
+ /** Tree SHA before this turn mutated the in-place tree (revert restore target). */
2010
+ preTurnSha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2011
+ /** Tree SHA right after this turn's mutation (revert divergence fence: refuse
2012
+ * to revert if the working tree has diverged from this since). */
2013
+ postTurnSha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2014
+ /** Revert metadata is available (the turn mutated the live tree in place and
2015
+ * pre/post-turn snapshots were recorded), so a Revert affordance may be offered.
2016
+ * This is NOT a live-safe guarantee: the server re-checks tree divergence at
2017
+ * revert time and refuses (fail loud) if the working tree changed since. */
2018
+ revertable: z.ZodDefault<z.ZodBoolean>;
2019
+ }, "strip", z.ZodTypeAny, {
2020
+ kind: "plan" | "none" | "patch" | "report" | "answer";
2021
+ diffStat: {
2022
+ files: number;
2023
+ additions: number;
2024
+ deletions: number;
2025
+ } | null;
2026
+ blockers: number;
2027
+ adopted: boolean | null;
2028
+ applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
2029
+ preTurnSha: string | null;
2030
+ postTurnSha: string | null;
2031
+ revertable: boolean;
2032
+ }, {
2033
+ kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
2034
+ diffStat?: {
2035
+ files: number;
2036
+ additions: number;
2037
+ deletions: number;
2038
+ } | null | undefined;
2039
+ blockers?: number | undefined;
2040
+ adopted?: boolean | null | undefined;
2041
+ applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
2042
+ preTurnSha?: string | null | undefined;
2043
+ postTurnSha?: string | null | undefined;
2044
+ revertable?: boolean | undefined;
2045
+ }>>;
2046
+ spendUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2047
+ outputReadyState: z.ZodDefault<z.ZodEnum<["pending", "finalizing", "ready", "diagnostic"]>>;
2048
+ waitingOnUser: z.ZodDefault<z.ZodBoolean>;
2049
+ finishedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2050
+ }, "strip", z.ZodTypeAny, {
2051
+ state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
2052
+ finishedAt: string | null;
2053
+ outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
2054
+ result: {
2055
+ kind: "plan" | "none" | "patch" | "report" | "answer";
2056
+ diffStat: {
2057
+ files: number;
2058
+ additions: number;
2059
+ deletions: number;
2060
+ } | null;
2061
+ blockers: number;
2062
+ adopted: boolean | null;
2063
+ applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
2064
+ preTurnSha: string | null;
2065
+ postTurnSha: string | null;
2066
+ revertable: boolean;
2067
+ };
2068
+ waitingOnUser: boolean;
2069
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2070
+ n?: number | undefined;
2071
+ strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
2072
+ spendUsd?: number | null | undefined;
2073
+ }, {
2074
+ state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
2075
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2076
+ n?: number | undefined;
2077
+ finishedAt?: string | null | undefined;
2078
+ strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
2079
+ spendUsd?: number | null | undefined;
2080
+ outputReadyState?: "pending" | "finalizing" | "ready" | "diagnostic" | undefined;
2081
+ result?: {
2082
+ kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
2083
+ diffStat?: {
2084
+ files: number;
2085
+ additions: number;
2086
+ deletions: number;
2087
+ } | null | undefined;
2088
+ blockers?: number | undefined;
2089
+ adopted?: boolean | null | undefined;
2090
+ applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
2091
+ preTurnSha?: string | null | undefined;
2092
+ postTurnSha?: string | null | undefined;
2093
+ revertable?: boolean | undefined;
2094
+ } | undefined;
2095
+ waitingOnUser?: boolean | undefined;
2096
+ }>>>;
2097
+ /** Why this turn has NO run (enqueue/preflight refusal, e.g. the trust
2098
+ * gate) — surfaces render it as an inline failure card with the remedy;
2099
+ * null once a run binds (retry clears it). `code` is the typed throw's
2100
+ * machine code (remedies key on it, never on the message text);
2101
+ * `retryable=false` means no recorded job exists to replay — surfaces
2102
+ * offer "send a new message" instead of a doomed Retry. */
2103
+ enqueueError: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2104
+ message: z.ZodString;
2105
+ code: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2106
+ retryable: z.ZodDefault<z.ZodBoolean>;
2107
+ failedAt: z.ZodString;
2108
+ }, "strip", z.ZodTypeAny, {
2109
+ code: string | null;
2110
+ message: string;
2111
+ retryable: boolean;
2112
+ failedAt: string;
2113
+ }, {
2114
+ message: string;
2115
+ failedAt: string;
2116
+ code?: string | null | undefined;
2117
+ retryable?: boolean | undefined;
2118
+ }>>>;
2119
+ createdAt: z.ZodString;
2120
+ }, "strip", z.ZodTypeAny, {
2121
+ id: string;
2122
+ kind: "initial" | "followup" | "decision";
2123
+ prompt: string;
2124
+ planRunId: string | null;
2125
+ runId: string | null;
2126
+ threadId: string;
2127
+ parentRunId: string | null;
2128
+ createdAt: string;
2129
+ run: {
2130
+ state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
2131
+ finishedAt: string | null;
2132
+ outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
2133
+ result: {
2134
+ kind: "plan" | "none" | "patch" | "report" | "answer";
2135
+ diffStat: {
2136
+ files: number;
2137
+ additions: number;
2138
+ deletions: number;
2139
+ } | null;
2140
+ blockers: number;
2141
+ adopted: boolean | null;
2142
+ applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
2143
+ preTurnSha: string | null;
2144
+ postTurnSha: string | null;
2145
+ revertable: boolean;
2146
+ };
2147
+ waitingOnUser: boolean;
2148
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2149
+ n?: number | undefined;
2150
+ strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
2151
+ spendUsd?: number | null | undefined;
2152
+ } | null;
2153
+ enqueueError: {
2154
+ code: string | null;
2155
+ message: string;
2156
+ retryable: boolean;
2157
+ failedAt: string;
2158
+ } | null;
2159
+ }, {
2160
+ id: string;
2161
+ threadId: string;
2162
+ createdAt: string;
2163
+ kind?: "initial" | "followup" | "decision" | undefined;
2164
+ prompt?: string | undefined;
2165
+ planRunId?: string | null | undefined;
2166
+ runId?: string | null | undefined;
2167
+ parentRunId?: string | null | undefined;
2168
+ run?: {
2169
+ state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
2170
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2171
+ n?: number | undefined;
2172
+ finishedAt?: string | null | undefined;
2173
+ strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
2174
+ spendUsd?: number | null | undefined;
2175
+ outputReadyState?: "pending" | "finalizing" | "ready" | "diagnostic" | undefined;
2176
+ result?: {
2177
+ kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
2178
+ diffStat?: {
2179
+ files: number;
2180
+ additions: number;
2181
+ deletions: number;
2182
+ } | null | undefined;
2183
+ blockers?: number | undefined;
2184
+ adopted?: boolean | null | undefined;
2185
+ applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
2186
+ preTurnSha?: string | null | undefined;
2187
+ postTurnSha?: string | null | undefined;
2188
+ revertable?: boolean | undefined;
2189
+ } | undefined;
2190
+ waitingOnUser?: boolean | undefined;
2191
+ } | null | undefined;
2192
+ enqueueError?: {
2193
+ message: string;
2194
+ failedAt: string;
2195
+ code?: string | null | undefined;
2196
+ retryable?: boolean | undefined;
2197
+ } | null | undefined;
2198
+ }>;
2199
+ export type ControlThreadTurn = z.infer<typeof ControlThreadTurn>;
2200
+ export declare const ControlThreadCreateRequest: z.ZodObject<{
2201
+ title: z.ZodOptional<z.ZodString>;
2202
+ scope: z.ZodDefault<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2203
+ kind: z.ZodLiteral<"project">;
2204
+ root: z.ZodString;
2205
+ context: z.ZodDefault<z.ZodEnum<["auto"]>>;
2206
+ }, "strict", z.ZodTypeAny, {
2207
+ kind: "project";
2208
+ root: string;
2209
+ context: "auto";
2210
+ }, {
2211
+ kind: "project";
2212
+ root: string;
2213
+ context?: "auto" | undefined;
2214
+ }>, z.ZodObject<{
2215
+ kind: z.ZodLiteral<"none">;
2216
+ }, "strict", z.ZodTypeAny, {
2217
+ kind: "none";
2218
+ }, {
2219
+ kind: "none";
2220
+ }>]>>;
2221
+ mode: z.ZodOptional<z.ZodEnum<["ask", "plan", "audit", "agent", "orchestrate"]>>;
2222
+ workspace: z.ZodOptional<z.ZodEnum<["in_place", "isolated"]>>;
2223
+ authPreference: z.ZodOptional<z.ZodEnum<["subscription", "api_key", "auto"]>>;
2224
+ primaryHarness: z.ZodOptional<z.ZodString>;
2225
+ /** Sticky eligible pool for the thread; turns inherit it when unset. */
2226
+ eligibleHarnesses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2227
+ }, "strict", z.ZodTypeAny, {
2228
+ scope: {
2229
+ kind: "project";
2230
+ root: string;
2231
+ context: "auto";
2232
+ } | {
2233
+ kind: "none";
2234
+ };
2235
+ title?: string | undefined;
2236
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2237
+ workspace?: "in_place" | "isolated" | undefined;
2238
+ primaryHarness?: string | undefined;
2239
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
2240
+ eligibleHarnesses?: string[] | undefined;
2241
+ }, {
2242
+ title?: string | undefined;
2243
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2244
+ workspace?: "in_place" | "isolated" | undefined;
2245
+ scope?: {
2246
+ kind: "project";
2247
+ root: string;
2248
+ context?: "auto" | undefined;
2249
+ } | {
2250
+ kind: "none";
2251
+ } | undefined;
2252
+ primaryHarness?: string | undefined;
2253
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
2254
+ eligibleHarnesses?: string[] | undefined;
2255
+ }>;
2256
+ export type ControlThreadCreateRequest = z.infer<typeof ControlThreadCreateRequest>;
2257
+ /** Mutate a thread's title, open/closed state, or sticky routing (rename,
2258
+ * archive, switch primary/pool). primaryHarness nullable => clear back to auto. */
2259
+ export declare const ControlThreadUpdateRequest: z.ZodObject<{
2260
+ title: z.ZodOptional<z.ZodString>;
2261
+ state: z.ZodOptional<z.ZodEnum<["active", "closed"]>>;
2262
+ primaryHarness: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2263
+ eligibleHarnesses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2264
+ }, "strict", z.ZodTypeAny, {
2265
+ title?: string | undefined;
2266
+ state?: "active" | "closed" | undefined;
2267
+ primaryHarness?: string | null | undefined;
2268
+ eligibleHarnesses?: string[] | undefined;
2269
+ }, {
2270
+ title?: string | undefined;
2271
+ state?: "active" | "closed" | undefined;
2272
+ primaryHarness?: string | null | undefined;
2273
+ eligibleHarnesses?: string[] | undefined;
2274
+ }>;
2275
+ export type ControlThreadUpdateRequest = z.infer<typeof ControlThreadUpdateRequest>;
2276
+ /** Apply an isolated thread's accumulated worktree diff to the project. */
2277
+ export declare const ControlThreadApplyRequest: z.ZodObject<{
2278
+ mode: z.ZodDefault<z.ZodEnum<["apply", "branch", "commit", "pr"]>>;
2279
+ branch: z.ZodOptional<z.ZodString>;
2280
+ message: z.ZodOptional<z.ZodString>;
2281
+ }, "strict", z.ZodTypeAny, {
2282
+ mode: "apply" | "commit" | "branch" | "pr";
2283
+ message?: string | undefined;
2284
+ branch?: string | undefined;
2285
+ }, {
2286
+ message?: string | undefined;
2287
+ mode?: "apply" | "commit" | "branch" | "pr" | undefined;
2288
+ branch?: string | undefined;
2289
+ }>;
2290
+ export type ControlThreadApplyRequest = z.infer<typeof ControlThreadApplyRequest>;
2291
+ export declare const ControlThreadApplyResponse: z.ZodObject<{
2292
+ applied: z.ZodBoolean;
2293
+ status: z.ZodEnum<["applied", "branched", "committed", "pr_opened", "empty", "conflict", "rejected"]>;
2294
+ /** True when the project HEAD moved past the thread base since the thread started. */
2295
+ headMoved: z.ZodDefault<z.ZodBoolean>;
2296
+ detail: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2297
+ }, "strip", z.ZodTypeAny, {
2298
+ status: "applied" | "rejected" | "branched" | "committed" | "pr_opened" | "empty" | "conflict";
2299
+ detail: string | null;
2300
+ applied: boolean;
2301
+ headMoved: boolean;
2302
+ }, {
2303
+ status: "applied" | "rejected" | "branched" | "committed" | "pr_opened" | "empty" | "conflict";
2304
+ applied: boolean;
2305
+ detail?: string | null | undefined;
2306
+ headMoved?: boolean | undefined;
2307
+ }>;
2308
+ export type ControlThreadApplyResponse = z.infer<typeof ControlThreadApplyResponse>;
2309
+ export declare const ControlThreadListResponse: z.ZodObject<{
2310
+ threads: z.ZodDefault<z.ZodArray<z.ZodObject<{
2311
+ id: z.ZodString;
2312
+ title: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2313
+ repoRoot: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2314
+ mode: z.ZodOptional<z.ZodEnum<["ask", "plan", "audit", "agent", "orchestrate"]>>;
2315
+ /** How turns touch files (in-place live tree vs isolated worktree). */
2316
+ workspaceMode: z.ZodDefault<z.ZodEnum<["in_place", "isolated"]>>;
2317
+ authPreference: z.ZodDefault<z.ZodEnum<["subscription", "api_key", "auto"]>>;
2318
+ primaryHarness: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2319
+ /** Sticky eligible pool for the thread (empty => engine auto-pools). */
2320
+ eligibleHarnesses: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2321
+ state: z.ZodDefault<z.ZodEnum<["active", "closed"]>>;
2322
+ runIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2323
+ headRunId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2324
+ /** True when the head turn is blocked on a human decision (needs-me inbox). */
2325
+ needsHuman: z.ZodDefault<z.ZodBoolean>;
2326
+ createdAt: z.ZodString;
2327
+ updatedAt: z.ZodString;
2328
+ }, "strip", z.ZodTypeAny, {
2329
+ id: string;
2330
+ title: string | null;
2331
+ state: "active" | "closed";
2332
+ primaryHarness: string | null;
2333
+ authPreference: "auto" | "subscription" | "api_key";
2334
+ createdAt: string;
2335
+ repoRoot: string | null;
2336
+ workspaceMode: "in_place" | "isolated";
2337
+ eligibleHarnesses: string[];
2338
+ runIds: string[];
2339
+ headRunId: string | null;
2340
+ needsHuman: boolean;
2341
+ updatedAt: string;
2342
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2343
+ }, {
2344
+ id: string;
2345
+ createdAt: string;
2346
+ updatedAt: string;
2347
+ title?: string | null | undefined;
2348
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2349
+ state?: "active" | "closed" | undefined;
2350
+ primaryHarness?: string | null | undefined;
2351
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
2352
+ repoRoot?: string | null | undefined;
2353
+ workspaceMode?: "in_place" | "isolated" | undefined;
2354
+ eligibleHarnesses?: string[] | undefined;
2355
+ runIds?: string[] | undefined;
2356
+ headRunId?: string | null | undefined;
2357
+ needsHuman?: boolean | undefined;
2358
+ }>, "many">>;
2359
+ }, "strip", z.ZodTypeAny, {
2360
+ threads: {
2361
+ id: string;
2362
+ title: string | null;
2363
+ state: "active" | "closed";
2364
+ primaryHarness: string | null;
2365
+ authPreference: "auto" | "subscription" | "api_key";
2366
+ createdAt: string;
2367
+ repoRoot: string | null;
2368
+ workspaceMode: "in_place" | "isolated";
2369
+ eligibleHarnesses: string[];
2370
+ runIds: string[];
2371
+ headRunId: string | null;
2372
+ needsHuman: boolean;
2373
+ updatedAt: string;
2374
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2375
+ }[];
2376
+ }, {
2377
+ threads?: {
2378
+ id: string;
2379
+ createdAt: string;
2380
+ updatedAt: string;
2381
+ title?: string | null | undefined;
2382
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2383
+ state?: "active" | "closed" | undefined;
2384
+ primaryHarness?: string | null | undefined;
2385
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
2386
+ repoRoot?: string | null | undefined;
2387
+ workspaceMode?: "in_place" | "isolated" | undefined;
2388
+ eligibleHarnesses?: string[] | undefined;
2389
+ runIds?: string[] | undefined;
2390
+ headRunId?: string | null | undefined;
2391
+ needsHuman?: boolean | undefined;
2392
+ }[] | undefined;
2393
+ }>;
2394
+ export type ControlThreadListResponse = z.infer<typeof ControlThreadListResponse>;
2395
+ export declare const ControlThreadDetail: z.ZodObject<{
2396
+ thread: z.ZodObject<{
2397
+ id: z.ZodString;
2398
+ title: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2399
+ repoRoot: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2400
+ mode: z.ZodOptional<z.ZodEnum<["ask", "plan", "audit", "agent", "orchestrate"]>>;
2401
+ /** How turns touch files (in-place live tree vs isolated worktree). */
2402
+ workspaceMode: z.ZodDefault<z.ZodEnum<["in_place", "isolated"]>>;
2403
+ authPreference: z.ZodDefault<z.ZodEnum<["subscription", "api_key", "auto"]>>;
2404
+ primaryHarness: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2405
+ /** Sticky eligible pool for the thread (empty => engine auto-pools). */
2406
+ eligibleHarnesses: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2407
+ state: z.ZodDefault<z.ZodEnum<["active", "closed"]>>;
2408
+ runIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2409
+ headRunId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2410
+ /** True when the head turn is blocked on a human decision (needs-me inbox). */
2411
+ needsHuman: z.ZodDefault<z.ZodBoolean>;
2412
+ createdAt: z.ZodString;
2413
+ updatedAt: z.ZodString;
2414
+ }, "strip", z.ZodTypeAny, {
2415
+ id: string;
2416
+ title: string | null;
2417
+ state: "active" | "closed";
2418
+ primaryHarness: string | null;
2419
+ authPreference: "auto" | "subscription" | "api_key";
2420
+ createdAt: string;
2421
+ repoRoot: string | null;
2422
+ workspaceMode: "in_place" | "isolated";
2423
+ eligibleHarnesses: string[];
2424
+ runIds: string[];
2425
+ headRunId: string | null;
2426
+ needsHuman: boolean;
2427
+ updatedAt: string;
2428
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2429
+ }, {
2430
+ id: string;
2431
+ createdAt: string;
2432
+ updatedAt: string;
2433
+ title?: string | null | undefined;
2434
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2435
+ state?: "active" | "closed" | undefined;
2436
+ primaryHarness?: string | null | undefined;
2437
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
2438
+ repoRoot?: string | null | undefined;
2439
+ workspaceMode?: "in_place" | "isolated" | undefined;
2440
+ eligibleHarnesses?: string[] | undefined;
2441
+ runIds?: string[] | undefined;
2442
+ headRunId?: string | null | undefined;
2443
+ needsHuman?: boolean | undefined;
2444
+ }>;
2445
+ sessions: z.ZodDefault<z.ZodArray<z.ZodObject<{
2446
+ id: z.ZodString;
2447
+ threadId: z.ZodString;
2448
+ harnessId: z.ZodString;
2449
+ nativeSessionId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2450
+ observedModel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2451
+ state: z.ZodDefault<z.ZodEnum<["live", "stale", "rebound"]>>;
2452
+ }, "strip", z.ZodTypeAny, {
2453
+ id: string;
2454
+ state: "live" | "stale" | "rebound";
2455
+ threadId: string;
2456
+ harnessId: string;
2457
+ observedModel: string | null;
2458
+ nativeSessionId: string | null;
2459
+ }, {
2460
+ id: string;
2461
+ threadId: string;
2462
+ harnessId: string;
2463
+ state?: "live" | "stale" | "rebound" | undefined;
2464
+ observedModel?: string | null | undefined;
2465
+ nativeSessionId?: string | null | undefined;
2466
+ }>, "many">>;
2467
+ turns: z.ZodDefault<z.ZodArray<z.ZodObject<{
2468
+ id: z.ZodString;
2469
+ threadId: z.ZodString;
2470
+ runId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2471
+ parentRunId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2472
+ /** Set when this turn implements an approved plan from an earlier run. */
2473
+ planRunId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2474
+ kind: z.ZodDefault<z.ZodEnum<["initial", "followup", "decision"]>>;
2475
+ prompt: z.ZodDefault<z.ZodString>;
2476
+ /** Embedded run card (outcome/state) so the chat renders without N+1 fetches. */
2477
+ run: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2478
+ state: z.ZodEnum<["queued", "running", "blocked", "succeeded", "no_op", "ungated", "review_not_run", "failed", "cancelled", "interrupted", "exhausted", "not_converged", "stuck_no_progress"]>;
2479
+ mode: z.ZodOptional<z.ZodEnum<["ask", "plan", "audit", "agent", "orchestrate"]>>;
2480
+ strategy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["race", "attempts", "until_clean", "swarm", "create"]>>>;
2481
+ n: z.ZodOptional<z.ZodNumber>;
2482
+ result: z.ZodDefault<z.ZodObject<{
2483
+ kind: z.ZodDefault<z.ZodEnum<["patch", "answer", "plan", "report", "none"]>>;
2484
+ diffStat: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2485
+ files: z.ZodNumber;
2486
+ additions: z.ZodNumber;
2487
+ deletions: z.ZodNumber;
2488
+ }, "strip", z.ZodTypeAny, {
2489
+ files: number;
2490
+ additions: number;
2491
+ deletions: number;
2492
+ }, {
2493
+ files: number;
2494
+ additions: number;
2495
+ deletions: number;
2496
+ }>>>;
2497
+ blockers: z.ZodDefault<z.ZodNumber>;
2498
+ /** True when the live in-place tree was mutated this turn (regardless of review). */
2499
+ adopted: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
2500
+ /** Honest application state (decoupled from clean-terminal). */
2501
+ applyState: z.ZodDefault<z.ZodEnum<["not_applied", "applied", "applied_review_blocked", "reverted"]>>;
2502
+ /** Tree SHA before this turn mutated the in-place tree (revert restore target). */
2503
+ preTurnSha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2504
+ /** Tree SHA right after this turn's mutation (revert divergence fence: refuse
2505
+ * to revert if the working tree has diverged from this since). */
2506
+ postTurnSha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2507
+ /** Revert metadata is available (the turn mutated the live tree in place and
2508
+ * pre/post-turn snapshots were recorded), so a Revert affordance may be offered.
2509
+ * This is NOT a live-safe guarantee: the server re-checks tree divergence at
2510
+ * revert time and refuses (fail loud) if the working tree changed since. */
2511
+ revertable: z.ZodDefault<z.ZodBoolean>;
2512
+ }, "strip", z.ZodTypeAny, {
2513
+ kind: "plan" | "none" | "patch" | "report" | "answer";
2514
+ diffStat: {
2515
+ files: number;
2516
+ additions: number;
2517
+ deletions: number;
2518
+ } | null;
2519
+ blockers: number;
2520
+ adopted: boolean | null;
2521
+ applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
2522
+ preTurnSha: string | null;
2523
+ postTurnSha: string | null;
2524
+ revertable: boolean;
2525
+ }, {
2526
+ kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
2527
+ diffStat?: {
2528
+ files: number;
2529
+ additions: number;
2530
+ deletions: number;
2531
+ } | null | undefined;
2532
+ blockers?: number | undefined;
2533
+ adopted?: boolean | null | undefined;
2534
+ applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
2535
+ preTurnSha?: string | null | undefined;
2536
+ postTurnSha?: string | null | undefined;
2537
+ revertable?: boolean | undefined;
2538
+ }>>;
2539
+ spendUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2540
+ outputReadyState: z.ZodDefault<z.ZodEnum<["pending", "finalizing", "ready", "diagnostic"]>>;
2541
+ waitingOnUser: z.ZodDefault<z.ZodBoolean>;
2542
+ finishedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2543
+ }, "strip", z.ZodTypeAny, {
2544
+ state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
2545
+ finishedAt: string | null;
2546
+ outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
2547
+ result: {
2548
+ kind: "plan" | "none" | "patch" | "report" | "answer";
2549
+ diffStat: {
2550
+ files: number;
2551
+ additions: number;
2552
+ deletions: number;
2553
+ } | null;
2554
+ blockers: number;
2555
+ adopted: boolean | null;
2556
+ applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
2557
+ preTurnSha: string | null;
2558
+ postTurnSha: string | null;
2559
+ revertable: boolean;
2560
+ };
2561
+ waitingOnUser: boolean;
2562
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2563
+ n?: number | undefined;
2564
+ strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
2565
+ spendUsd?: number | null | undefined;
2566
+ }, {
2567
+ state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
2568
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2569
+ n?: number | undefined;
2570
+ finishedAt?: string | null | undefined;
2571
+ strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
2572
+ spendUsd?: number | null | undefined;
2573
+ outputReadyState?: "pending" | "finalizing" | "ready" | "diagnostic" | undefined;
2574
+ result?: {
2575
+ kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
2576
+ diffStat?: {
2577
+ files: number;
2578
+ additions: number;
2579
+ deletions: number;
2580
+ } | null | undefined;
2581
+ blockers?: number | undefined;
2582
+ adopted?: boolean | null | undefined;
2583
+ applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
2584
+ preTurnSha?: string | null | undefined;
2585
+ postTurnSha?: string | null | undefined;
2586
+ revertable?: boolean | undefined;
2587
+ } | undefined;
2588
+ waitingOnUser?: boolean | undefined;
2589
+ }>>>;
2590
+ /** Why this turn has NO run (enqueue/preflight refusal, e.g. the trust
2591
+ * gate) — surfaces render it as an inline failure card with the remedy;
2592
+ * null once a run binds (retry clears it). `code` is the typed throw's
2593
+ * machine code (remedies key on it, never on the message text);
2594
+ * `retryable=false` means no recorded job exists to replay — surfaces
2595
+ * offer "send a new message" instead of a doomed Retry. */
2596
+ enqueueError: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2597
+ message: z.ZodString;
2598
+ code: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2599
+ retryable: z.ZodDefault<z.ZodBoolean>;
2600
+ failedAt: z.ZodString;
2601
+ }, "strip", z.ZodTypeAny, {
2602
+ code: string | null;
2603
+ message: string;
2604
+ retryable: boolean;
2605
+ failedAt: string;
2606
+ }, {
2607
+ message: string;
2608
+ failedAt: string;
2609
+ code?: string | null | undefined;
2610
+ retryable?: boolean | undefined;
2611
+ }>>>;
2612
+ createdAt: z.ZodString;
2613
+ }, "strip", z.ZodTypeAny, {
2614
+ id: string;
2615
+ kind: "initial" | "followup" | "decision";
2616
+ prompt: string;
2617
+ planRunId: string | null;
2618
+ runId: string | null;
2619
+ threadId: string;
2620
+ parentRunId: string | null;
2621
+ createdAt: string;
2622
+ run: {
2623
+ state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
2624
+ finishedAt: string | null;
2625
+ outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
2626
+ result: {
2627
+ kind: "plan" | "none" | "patch" | "report" | "answer";
2628
+ diffStat: {
2629
+ files: number;
2630
+ additions: number;
2631
+ deletions: number;
2632
+ } | null;
2633
+ blockers: number;
2634
+ adopted: boolean | null;
2635
+ applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
2636
+ preTurnSha: string | null;
2637
+ postTurnSha: string | null;
2638
+ revertable: boolean;
2639
+ };
2640
+ waitingOnUser: boolean;
2641
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2642
+ n?: number | undefined;
2643
+ strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
2644
+ spendUsd?: number | null | undefined;
2645
+ } | null;
2646
+ enqueueError: {
2647
+ code: string | null;
2648
+ message: string;
2649
+ retryable: boolean;
2650
+ failedAt: string;
2651
+ } | null;
2652
+ }, {
2653
+ id: string;
2654
+ threadId: string;
2655
+ createdAt: string;
2656
+ kind?: "initial" | "followup" | "decision" | undefined;
2657
+ prompt?: string | undefined;
2658
+ planRunId?: string | null | undefined;
2659
+ runId?: string | null | undefined;
2660
+ parentRunId?: string | null | undefined;
2661
+ run?: {
2662
+ state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
2663
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2664
+ n?: number | undefined;
2665
+ finishedAt?: string | null | undefined;
2666
+ strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
2667
+ spendUsd?: number | null | undefined;
2668
+ outputReadyState?: "pending" | "finalizing" | "ready" | "diagnostic" | undefined;
2669
+ result?: {
2670
+ kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
2671
+ diffStat?: {
2672
+ files: number;
2673
+ additions: number;
2674
+ deletions: number;
2675
+ } | null | undefined;
2676
+ blockers?: number | undefined;
2677
+ adopted?: boolean | null | undefined;
2678
+ applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
2679
+ preTurnSha?: string | null | undefined;
2680
+ postTurnSha?: string | null | undefined;
2681
+ revertable?: boolean | undefined;
2682
+ } | undefined;
2683
+ waitingOnUser?: boolean | undefined;
2684
+ } | null | undefined;
2685
+ enqueueError?: {
2686
+ message: string;
2687
+ failedAt: string;
2688
+ code?: string | null | undefined;
2689
+ retryable?: boolean | undefined;
2690
+ } | null | undefined;
2691
+ }>, "many">>;
2692
+ }, "strip", z.ZodTypeAny, {
2693
+ thread: {
2694
+ id: string;
2695
+ title: string | null;
2696
+ state: "active" | "closed";
2697
+ primaryHarness: string | null;
2698
+ authPreference: "auto" | "subscription" | "api_key";
2699
+ createdAt: string;
2700
+ repoRoot: string | null;
2701
+ workspaceMode: "in_place" | "isolated";
2702
+ eligibleHarnesses: string[];
2703
+ runIds: string[];
2704
+ headRunId: string | null;
2705
+ needsHuman: boolean;
2706
+ updatedAt: string;
2707
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2708
+ };
2709
+ sessions: {
2710
+ id: string;
2711
+ state: "live" | "stale" | "rebound";
2712
+ threadId: string;
2713
+ harnessId: string;
2714
+ observedModel: string | null;
2715
+ nativeSessionId: string | null;
2716
+ }[];
2717
+ turns: {
2718
+ id: string;
2719
+ kind: "initial" | "followup" | "decision";
2720
+ prompt: string;
2721
+ planRunId: string | null;
2722
+ runId: string | null;
2723
+ threadId: string;
2724
+ parentRunId: string | null;
2725
+ createdAt: string;
2726
+ run: {
2727
+ state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
2728
+ finishedAt: string | null;
2729
+ outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
2730
+ result: {
2731
+ kind: "plan" | "none" | "patch" | "report" | "answer";
2732
+ diffStat: {
2733
+ files: number;
2734
+ additions: number;
2735
+ deletions: number;
2736
+ } | null;
2737
+ blockers: number;
2738
+ adopted: boolean | null;
2739
+ applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
2740
+ preTurnSha: string | null;
2741
+ postTurnSha: string | null;
2742
+ revertable: boolean;
2743
+ };
2744
+ waitingOnUser: boolean;
2745
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2746
+ n?: number | undefined;
2747
+ strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
2748
+ spendUsd?: number | null | undefined;
2749
+ } | null;
2750
+ enqueueError: {
2751
+ code: string | null;
2752
+ message: string;
2753
+ retryable: boolean;
2754
+ failedAt: string;
2755
+ } | null;
2756
+ }[];
2757
+ }, {
2758
+ thread: {
2759
+ id: string;
2760
+ createdAt: string;
2761
+ updatedAt: string;
2762
+ title?: string | null | undefined;
2763
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2764
+ state?: "active" | "closed" | undefined;
2765
+ primaryHarness?: string | null | undefined;
2766
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
2767
+ repoRoot?: string | null | undefined;
2768
+ workspaceMode?: "in_place" | "isolated" | undefined;
2769
+ eligibleHarnesses?: string[] | undefined;
2770
+ runIds?: string[] | undefined;
2771
+ headRunId?: string | null | undefined;
2772
+ needsHuman?: boolean | undefined;
2773
+ };
2774
+ sessions?: {
2775
+ id: string;
2776
+ threadId: string;
2777
+ harnessId: string;
2778
+ state?: "live" | "stale" | "rebound" | undefined;
2779
+ observedModel?: string | null | undefined;
2780
+ nativeSessionId?: string | null | undefined;
2781
+ }[] | undefined;
2782
+ turns?: {
2783
+ id: string;
2784
+ threadId: string;
2785
+ createdAt: string;
2786
+ kind?: "initial" | "followup" | "decision" | undefined;
2787
+ prompt?: string | undefined;
2788
+ planRunId?: string | null | undefined;
2789
+ runId?: string | null | undefined;
2790
+ parentRunId?: string | null | undefined;
2791
+ run?: {
2792
+ state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
2793
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2794
+ n?: number | undefined;
2795
+ finishedAt?: string | null | undefined;
2796
+ strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
2797
+ spendUsd?: number | null | undefined;
2798
+ outputReadyState?: "pending" | "finalizing" | "ready" | "diagnostic" | undefined;
2799
+ result?: {
2800
+ kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
2801
+ diffStat?: {
2802
+ files: number;
2803
+ additions: number;
2804
+ deletions: number;
2805
+ } | null | undefined;
2806
+ blockers?: number | undefined;
2807
+ adopted?: boolean | null | undefined;
2808
+ applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
2809
+ preTurnSha?: string | null | undefined;
2810
+ postTurnSha?: string | null | undefined;
2811
+ revertable?: boolean | undefined;
2812
+ } | undefined;
2813
+ waitingOnUser?: boolean | undefined;
2814
+ } | null | undefined;
2815
+ enqueueError?: {
2816
+ message: string;
2817
+ failedAt: string;
2818
+ code?: string | null | undefined;
2819
+ retryable?: boolean | undefined;
2820
+ } | null | undefined;
2821
+ }[] | undefined;
2822
+ }>;
2823
+ export type ControlThreadDetail = z.infer<typeof ControlThreadDetail>;
2824
+ export declare const HarnessStatusDto: z.ZodObject<{
2825
+ id: z.ZodString;
2826
+ status: z.ZodEnum<["ok", "degraded", "unavailable"]>;
2827
+ manifest: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2828
+ id: z.ZodString;
2829
+ display_name: z.ZodString;
2830
+ kind: z.ZodEnum<["local_cli", "remote_api", "fake"]>;
2831
+ version: z.ZodOptional<z.ZodString>;
2832
+ adapter_version: z.ZodOptional<z.ZodString>;
2833
+ provider_family: z.ZodDefault<z.ZodEnum<["openai", "anthropic", "google", "cursor", "opencode", "xai", "local", "unknown"]>>;
2834
+ capability_profile: z.ZodDefault<z.ZodObject<{
2835
+ auth: z.ZodDefault<z.ZodObject<{
2836
+ supported_sources: z.ZodDefault<z.ZodArray<z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>, "many">>;
2837
+ preferred_source: z.ZodDefault<z.ZodNullable<z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>>>;
2838
+ credential_transports: z.ZodDefault<z.ZodArray<z.ZodObject<{
2839
+ source: z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
2840
+ kind: z.ZodEnum<["config_file", "env_var", "oauth_token_env", "os_keychain", "http_header", "none"]>;
2841
+ relocatable_by: z.ZodDefault<z.ZodArray<z.ZodEnum<["HOME", "CONFIG_DIR", "ENV", "none"]>, "many">>;
2842
+ }, "strip", z.ZodTypeAny, {
2843
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
2844
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
2845
+ relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
2846
+ }, {
2847
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
2848
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
2849
+ relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
2850
+ }>, "many">>;
2851
+ }, "strip", z.ZodTypeAny, {
2852
+ supported_sources: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[];
2853
+ preferred_source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null;
2854
+ credential_transports: {
2855
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
2856
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
2857
+ relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
2858
+ }[];
2859
+ }, {
2860
+ supported_sources?: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[] | undefined;
2861
+ preferred_source?: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null | undefined;
2862
+ credential_transports?: {
2863
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
2864
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
2865
+ relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
2866
+ }[] | undefined;
2867
+ }>>;
2868
+ access_control: z.ZodDefault<z.ZodObject<{
2869
+ readonly_mechanism: z.ZodDefault<z.ZodEnum<["fs_sandbox", "permission_deny", "tool_allowlist", "none"]>>;
2870
+ }, "strip", z.ZodTypeAny, {
2871
+ readonly_mechanism: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist";
2872
+ }, {
2873
+ readonly_mechanism?: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist" | undefined;
2874
+ }>>;
2875
+ isolation: z.ZodDefault<z.ZodObject<{
2876
+ supported_containment: z.ZodDefault<z.ZodArray<z.ZodEnum<["env_or_file_injection", "scoped_home_keychain_bridge", "host_user_context", "process_sandbox", "container"]>, "many">>;
2877
+ }, "strip", z.ZodTypeAny, {
2878
+ supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
2879
+ }, {
2880
+ supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
2881
+ }>>;
2882
+ image_input: z.ZodDefault<z.ZodEnum<["file_path", "base64_stream", "base64_inline", "none"]>>;
2883
+ }, "strip", z.ZodTypeAny, {
2884
+ auth: {
2885
+ supported_sources: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[];
2886
+ preferred_source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null;
2887
+ credential_transports: {
2888
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
2889
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
2890
+ relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
2891
+ }[];
2892
+ };
2893
+ access_control: {
2894
+ readonly_mechanism: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist";
2895
+ };
2896
+ isolation: {
2897
+ supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
2898
+ };
2899
+ image_input: "file_path" | "base64_stream" | "base64_inline" | "none";
2900
+ }, {
2901
+ auth?: {
2902
+ supported_sources?: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[] | undefined;
2903
+ preferred_source?: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null | undefined;
2904
+ credential_transports?: {
2905
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
2906
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
2907
+ relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
2908
+ }[] | undefined;
2909
+ } | undefined;
2910
+ access_control?: {
2911
+ readonly_mechanism?: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist" | undefined;
2912
+ } | undefined;
2913
+ isolation?: {
2914
+ supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
2915
+ } | undefined;
2916
+ image_input?: "file_path" | "base64_stream" | "base64_inline" | "none" | undefined;
2917
+ }>>;
2918
+ capabilities: z.ZodObject<{
2919
+ plan: z.ZodDefault<z.ZodBoolean>;
2920
+ implement: z.ZodDefault<z.ZodBoolean>;
2921
+ create_from_scratch: z.ZodDefault<z.ZodBoolean>;
2922
+ review: z.ZodDefault<z.ZodBoolean>;
2923
+ verify: z.ZodDefault<z.ZodBoolean>;
2924
+ synthesize: z.ZodDefault<z.ZodBoolean>;
2925
+ read_files: z.ZodDefault<z.ZodBoolean>;
2926
+ browser_tool: z.ZodDefault<z.ZodBoolean>;
2927
+ web_policy: z.ZodDefault<z.ZodEnum<["native", "tools", "uncontrolled", "none"]>>;
2928
+ max_turns: z.ZodDefault<z.ZodBoolean>;
2929
+ tool_lists: z.ZodDefault<z.ZodBoolean>;
2930
+ interactive: z.ZodDefault<z.ZodBoolean>;
2931
+ orchestrate: z.ZodDefault<z.ZodBoolean>;
2932
+ json_schema_output: z.ZodDefault<z.ZodBoolean>;
2933
+ effort_levels: z.ZodDefault<z.ZodArray<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>, "many">>;
2934
+ known_models: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2935
+ known_models_verified_against: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2936
+ }, "strip", z.ZodTypeAny, {
2937
+ plan: boolean;
2938
+ orchestrate: boolean;
2939
+ implement: boolean;
2940
+ create_from_scratch: boolean;
2941
+ review: boolean;
2942
+ verify: boolean;
2943
+ synthesize: boolean;
2944
+ read_files: boolean;
2945
+ browser_tool: boolean;
2946
+ web_policy: "none" | "native" | "tools" | "uncontrolled";
2947
+ max_turns: boolean;
2948
+ tool_lists: boolean;
2949
+ interactive: boolean;
2950
+ json_schema_output: boolean;
2951
+ effort_levels: ("low" | "medium" | "high" | "xhigh" | "max")[];
2952
+ known_models: string[];
2953
+ known_models_verified_against: string | null;
2954
+ }, {
2955
+ plan?: boolean | undefined;
2956
+ orchestrate?: boolean | undefined;
2957
+ implement?: boolean | undefined;
2958
+ create_from_scratch?: boolean | undefined;
2959
+ review?: boolean | undefined;
2960
+ verify?: boolean | undefined;
2961
+ synthesize?: boolean | undefined;
2962
+ read_files?: boolean | undefined;
2963
+ browser_tool?: boolean | undefined;
2964
+ web_policy?: "none" | "native" | "tools" | "uncontrolled" | undefined;
2965
+ max_turns?: boolean | undefined;
2966
+ tool_lists?: boolean | undefined;
2967
+ interactive?: boolean | undefined;
2968
+ json_schema_output?: boolean | undefined;
2969
+ effort_levels?: ("low" | "medium" | "high" | "xhigh" | "max")[] | undefined;
2970
+ known_models?: string[] | undefined;
2971
+ known_models_verified_against?: string | null | undefined;
2972
+ }>;
2973
+ auth_modes: z.ZodDefault<z.ZodArray<z.ZodEnum<["local_session", "api_key", "none"]>, "many">>;
2974
+ access_profiles_supported: z.ZodDefault<z.ZodArray<z.ZodEnum<["readonly", "workspace_write", "full", "external_sandbox_full", "inherit_native"]>, "many">>;
2975
+ }, "strip", z.ZodTypeAny, {
2976
+ id: string;
2977
+ kind: "local_cli" | "remote_api" | "fake";
2978
+ display_name: string;
2979
+ provider_family: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown";
2980
+ capability_profile: {
2981
+ auth: {
2982
+ supported_sources: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[];
2983
+ preferred_source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null;
2984
+ credential_transports: {
2985
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
2986
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
2987
+ relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
2988
+ }[];
2989
+ };
2990
+ access_control: {
2991
+ readonly_mechanism: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist";
2992
+ };
2993
+ isolation: {
2994
+ supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
2995
+ };
2996
+ image_input: "file_path" | "base64_stream" | "base64_inline" | "none";
2997
+ };
2998
+ capabilities: {
2999
+ plan: boolean;
3000
+ orchestrate: boolean;
3001
+ implement: boolean;
3002
+ create_from_scratch: boolean;
3003
+ review: boolean;
3004
+ verify: boolean;
3005
+ synthesize: boolean;
3006
+ read_files: boolean;
3007
+ browser_tool: boolean;
3008
+ web_policy: "none" | "native" | "tools" | "uncontrolled";
3009
+ max_turns: boolean;
3010
+ tool_lists: boolean;
3011
+ interactive: boolean;
3012
+ json_schema_output: boolean;
3013
+ effort_levels: ("low" | "medium" | "high" | "xhigh" | "max")[];
3014
+ known_models: string[];
3015
+ known_models_verified_against: string | null;
3016
+ };
3017
+ auth_modes: ("api_key" | "none" | "local_session")[];
3018
+ access_profiles_supported: ("readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native")[];
3019
+ version?: string | undefined;
3020
+ adapter_version?: string | undefined;
3021
+ }, {
3022
+ id: string;
3023
+ kind: "local_cli" | "remote_api" | "fake";
3024
+ display_name: string;
3025
+ capabilities: {
3026
+ plan?: boolean | undefined;
3027
+ orchestrate?: boolean | undefined;
3028
+ implement?: boolean | undefined;
3029
+ create_from_scratch?: boolean | undefined;
3030
+ review?: boolean | undefined;
3031
+ verify?: boolean | undefined;
3032
+ synthesize?: boolean | undefined;
3033
+ read_files?: boolean | undefined;
3034
+ browser_tool?: boolean | undefined;
3035
+ web_policy?: "none" | "native" | "tools" | "uncontrolled" | undefined;
3036
+ max_turns?: boolean | undefined;
3037
+ tool_lists?: boolean | undefined;
3038
+ interactive?: boolean | undefined;
3039
+ json_schema_output?: boolean | undefined;
3040
+ effort_levels?: ("low" | "medium" | "high" | "xhigh" | "max")[] | undefined;
3041
+ known_models?: string[] | undefined;
3042
+ known_models_verified_against?: string | null | undefined;
3043
+ };
3044
+ version?: string | undefined;
3045
+ adapter_version?: string | undefined;
3046
+ provider_family?: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown" | undefined;
3047
+ capability_profile?: {
3048
+ auth?: {
3049
+ supported_sources?: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[] | undefined;
3050
+ preferred_source?: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null | undefined;
3051
+ credential_transports?: {
3052
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
3053
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
3054
+ relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
3055
+ }[] | undefined;
3056
+ } | undefined;
3057
+ access_control?: {
3058
+ readonly_mechanism?: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist" | undefined;
3059
+ } | undefined;
3060
+ isolation?: {
3061
+ supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
3062
+ } | undefined;
3063
+ image_input?: "file_path" | "base64_stream" | "base64_inline" | "none" | undefined;
3064
+ } | undefined;
3065
+ auth_modes?: ("api_key" | "none" | "local_session")[] | undefined;
3066
+ access_profiles_supported?: ("readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native")[] | undefined;
3067
+ }>>>;
3068
+ enabledIntents: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3069
+ disabledIntents: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3070
+ checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
3071
+ id: z.ZodString;
3072
+ status: z.ZodEnum<["pass", "fail", "skip"]>;
3073
+ detail: z.ZodOptional<z.ZodString>;
3074
+ duration_ms: z.ZodOptional<z.ZodNumber>;
3075
+ }, "strip", z.ZodTypeAny, {
3076
+ status: "pass" | "fail" | "skip";
3077
+ id: string;
3078
+ detail?: string | undefined;
3079
+ duration_ms?: number | undefined;
3080
+ }, {
3081
+ status: "pass" | "fail" | "skip";
3082
+ id: string;
3083
+ detail?: string | undefined;
3084
+ duration_ms?: number | undefined;
3085
+ }>, "many">>;
3086
+ reasons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3087
+ /** The user's configured per-harness default model, if any. */
3088
+ configuredModel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3089
+ /** Strict truth-source check of `configuredModel`: null when no model
3090
+ * is configured; a rejection carries the actionable message so UIs render
3091
+ * the same honesty `claudexor doctor` prints. */
3092
+ configuredModelCheck: z.ZodDefault<z.ZodNullable<z.ZodObject<{
3093
+ status: z.ZodEnum<["ok", "rejected"]>;
3094
+ message: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3095
+ }, "strip", z.ZodTypeAny, {
3096
+ message: string | null;
3097
+ status: "ok" | "rejected";
3098
+ }, {
3099
+ status: "ok" | "rejected";
3100
+ message?: string | null | undefined;
3101
+ }>>>;
3102
+ }, "strip", z.ZodTypeAny, {
3103
+ status: "ok" | "degraded" | "unavailable";
3104
+ id: string;
3105
+ checks: {
3106
+ status: "pass" | "fail" | "skip";
3107
+ id: string;
3108
+ detail?: string | undefined;
3109
+ duration_ms?: number | undefined;
3110
+ }[];
3111
+ reasons: string[];
3112
+ enabledIntents: string[];
3113
+ disabledIntents: string[];
3114
+ configuredModel: string | null;
3115
+ configuredModelCheck: {
3116
+ message: string | null;
3117
+ status: "ok" | "rejected";
3118
+ } | null;
3119
+ manifest?: {
3120
+ id: string;
3121
+ kind: "local_cli" | "remote_api" | "fake";
3122
+ display_name: string;
3123
+ provider_family: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown";
3124
+ capability_profile: {
3125
+ auth: {
3126
+ supported_sources: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[];
3127
+ preferred_source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null;
3128
+ credential_transports: {
3129
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
3130
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
3131
+ relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
3132
+ }[];
3133
+ };
3134
+ access_control: {
3135
+ readonly_mechanism: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist";
3136
+ };
3137
+ isolation: {
3138
+ supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
3139
+ };
3140
+ image_input: "file_path" | "base64_stream" | "base64_inline" | "none";
3141
+ };
3142
+ capabilities: {
3143
+ plan: boolean;
3144
+ orchestrate: boolean;
3145
+ implement: boolean;
3146
+ create_from_scratch: boolean;
3147
+ review: boolean;
3148
+ verify: boolean;
3149
+ synthesize: boolean;
3150
+ read_files: boolean;
3151
+ browser_tool: boolean;
3152
+ web_policy: "none" | "native" | "tools" | "uncontrolled";
3153
+ max_turns: boolean;
3154
+ tool_lists: boolean;
3155
+ interactive: boolean;
3156
+ json_schema_output: boolean;
3157
+ effort_levels: ("low" | "medium" | "high" | "xhigh" | "max")[];
3158
+ known_models: string[];
3159
+ known_models_verified_against: string | null;
3160
+ };
3161
+ auth_modes: ("api_key" | "none" | "local_session")[];
3162
+ access_profiles_supported: ("readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native")[];
3163
+ version?: string | undefined;
3164
+ adapter_version?: string | undefined;
3165
+ } | null | undefined;
3166
+ }, {
3167
+ status: "ok" | "degraded" | "unavailable";
3168
+ id: string;
3169
+ checks?: {
3170
+ status: "pass" | "fail" | "skip";
3171
+ id: string;
3172
+ detail?: string | undefined;
3173
+ duration_ms?: number | undefined;
3174
+ }[] | undefined;
3175
+ reasons?: string[] | undefined;
3176
+ manifest?: {
3177
+ id: string;
3178
+ kind: "local_cli" | "remote_api" | "fake";
3179
+ display_name: string;
3180
+ capabilities: {
3181
+ plan?: boolean | undefined;
3182
+ orchestrate?: boolean | undefined;
3183
+ implement?: boolean | undefined;
3184
+ create_from_scratch?: boolean | undefined;
3185
+ review?: boolean | undefined;
3186
+ verify?: boolean | undefined;
3187
+ synthesize?: boolean | undefined;
3188
+ read_files?: boolean | undefined;
3189
+ browser_tool?: boolean | undefined;
3190
+ web_policy?: "none" | "native" | "tools" | "uncontrolled" | undefined;
3191
+ max_turns?: boolean | undefined;
3192
+ tool_lists?: boolean | undefined;
3193
+ interactive?: boolean | undefined;
3194
+ json_schema_output?: boolean | undefined;
3195
+ effort_levels?: ("low" | "medium" | "high" | "xhigh" | "max")[] | undefined;
3196
+ known_models?: string[] | undefined;
3197
+ known_models_verified_against?: string | null | undefined;
3198
+ };
3199
+ version?: string | undefined;
3200
+ adapter_version?: string | undefined;
3201
+ provider_family?: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown" | undefined;
3202
+ capability_profile?: {
3203
+ auth?: {
3204
+ supported_sources?: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[] | undefined;
3205
+ preferred_source?: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null | undefined;
3206
+ credential_transports?: {
3207
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
3208
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
3209
+ relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
3210
+ }[] | undefined;
3211
+ } | undefined;
3212
+ access_control?: {
3213
+ readonly_mechanism?: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist" | undefined;
3214
+ } | undefined;
3215
+ isolation?: {
3216
+ supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
3217
+ } | undefined;
3218
+ image_input?: "file_path" | "base64_stream" | "base64_inline" | "none" | undefined;
3219
+ } | undefined;
3220
+ auth_modes?: ("api_key" | "none" | "local_session")[] | undefined;
3221
+ access_profiles_supported?: ("readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native")[] | undefined;
3222
+ } | null | undefined;
3223
+ enabledIntents?: string[] | undefined;
3224
+ disabledIntents?: string[] | undefined;
3225
+ configuredModel?: string | null | undefined;
3226
+ configuredModelCheck?: {
3227
+ status: "ok" | "rejected";
3228
+ message?: string | null | undefined;
3229
+ } | null | undefined;
3230
+ }>;
3231
+ export type HarnessStatusDto = z.infer<typeof HarnessStatusDto>;
3232
+ export declare const ControlHarnessListResponse: z.ZodObject<{
3233
+ harnesses: z.ZodDefault<z.ZodArray<z.ZodObject<{
3234
+ id: z.ZodString;
3235
+ status: z.ZodEnum<["ok", "degraded", "unavailable"]>;
3236
+ manifest: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3237
+ id: z.ZodString;
3238
+ display_name: z.ZodString;
3239
+ kind: z.ZodEnum<["local_cli", "remote_api", "fake"]>;
3240
+ version: z.ZodOptional<z.ZodString>;
3241
+ adapter_version: z.ZodOptional<z.ZodString>;
3242
+ provider_family: z.ZodDefault<z.ZodEnum<["openai", "anthropic", "google", "cursor", "opencode", "xai", "local", "unknown"]>>;
3243
+ capability_profile: z.ZodDefault<z.ZodObject<{
3244
+ auth: z.ZodDefault<z.ZodObject<{
3245
+ supported_sources: z.ZodDefault<z.ZodArray<z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>, "many">>;
3246
+ preferred_source: z.ZodDefault<z.ZodNullable<z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>>>;
3247
+ credential_transports: z.ZodDefault<z.ZodArray<z.ZodObject<{
3248
+ source: z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
3249
+ kind: z.ZodEnum<["config_file", "env_var", "oauth_token_env", "os_keychain", "http_header", "none"]>;
3250
+ relocatable_by: z.ZodDefault<z.ZodArray<z.ZodEnum<["HOME", "CONFIG_DIR", "ENV", "none"]>, "many">>;
3251
+ }, "strip", z.ZodTypeAny, {
3252
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
3253
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
3254
+ relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
3255
+ }, {
3256
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
3257
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
3258
+ relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
3259
+ }>, "many">>;
3260
+ }, "strip", z.ZodTypeAny, {
3261
+ supported_sources: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[];
3262
+ preferred_source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null;
3263
+ credential_transports: {
3264
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
3265
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
3266
+ relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
3267
+ }[];
3268
+ }, {
3269
+ supported_sources?: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[] | undefined;
3270
+ preferred_source?: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null | undefined;
3271
+ credential_transports?: {
3272
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
3273
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
3274
+ relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
3275
+ }[] | undefined;
3276
+ }>>;
3277
+ access_control: z.ZodDefault<z.ZodObject<{
3278
+ readonly_mechanism: z.ZodDefault<z.ZodEnum<["fs_sandbox", "permission_deny", "tool_allowlist", "none"]>>;
3279
+ }, "strip", z.ZodTypeAny, {
3280
+ readonly_mechanism: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist";
3281
+ }, {
3282
+ readonly_mechanism?: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist" | undefined;
3283
+ }>>;
3284
+ isolation: z.ZodDefault<z.ZodObject<{
3285
+ supported_containment: z.ZodDefault<z.ZodArray<z.ZodEnum<["env_or_file_injection", "scoped_home_keychain_bridge", "host_user_context", "process_sandbox", "container"]>, "many">>;
3286
+ }, "strip", z.ZodTypeAny, {
3287
+ supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
3288
+ }, {
3289
+ supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
3290
+ }>>;
3291
+ image_input: z.ZodDefault<z.ZodEnum<["file_path", "base64_stream", "base64_inline", "none"]>>;
3292
+ }, "strip", z.ZodTypeAny, {
3293
+ auth: {
3294
+ supported_sources: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[];
3295
+ preferred_source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null;
3296
+ credential_transports: {
3297
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
3298
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
3299
+ relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
3300
+ }[];
3301
+ };
3302
+ access_control: {
3303
+ readonly_mechanism: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist";
3304
+ };
3305
+ isolation: {
3306
+ supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
3307
+ };
3308
+ image_input: "file_path" | "base64_stream" | "base64_inline" | "none";
3309
+ }, {
3310
+ auth?: {
3311
+ supported_sources?: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[] | undefined;
3312
+ preferred_source?: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null | undefined;
3313
+ credential_transports?: {
3314
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
3315
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
3316
+ relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
3317
+ }[] | undefined;
3318
+ } | undefined;
3319
+ access_control?: {
3320
+ readonly_mechanism?: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist" | undefined;
3321
+ } | undefined;
3322
+ isolation?: {
3323
+ supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
3324
+ } | undefined;
3325
+ image_input?: "file_path" | "base64_stream" | "base64_inline" | "none" | undefined;
3326
+ }>>;
3327
+ capabilities: z.ZodObject<{
3328
+ plan: z.ZodDefault<z.ZodBoolean>;
3329
+ implement: z.ZodDefault<z.ZodBoolean>;
3330
+ create_from_scratch: z.ZodDefault<z.ZodBoolean>;
3331
+ review: z.ZodDefault<z.ZodBoolean>;
3332
+ verify: z.ZodDefault<z.ZodBoolean>;
3333
+ synthesize: z.ZodDefault<z.ZodBoolean>;
3334
+ read_files: z.ZodDefault<z.ZodBoolean>;
3335
+ browser_tool: z.ZodDefault<z.ZodBoolean>;
3336
+ web_policy: z.ZodDefault<z.ZodEnum<["native", "tools", "uncontrolled", "none"]>>;
3337
+ max_turns: z.ZodDefault<z.ZodBoolean>;
3338
+ tool_lists: z.ZodDefault<z.ZodBoolean>;
3339
+ interactive: z.ZodDefault<z.ZodBoolean>;
3340
+ orchestrate: z.ZodDefault<z.ZodBoolean>;
3341
+ json_schema_output: z.ZodDefault<z.ZodBoolean>;
3342
+ effort_levels: z.ZodDefault<z.ZodArray<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>, "many">>;
3343
+ known_models: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3344
+ known_models_verified_against: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3345
+ }, "strip", z.ZodTypeAny, {
3346
+ plan: boolean;
3347
+ orchestrate: boolean;
3348
+ implement: boolean;
3349
+ create_from_scratch: boolean;
3350
+ review: boolean;
3351
+ verify: boolean;
3352
+ synthesize: boolean;
3353
+ read_files: boolean;
3354
+ browser_tool: boolean;
3355
+ web_policy: "none" | "native" | "tools" | "uncontrolled";
3356
+ max_turns: boolean;
3357
+ tool_lists: boolean;
3358
+ interactive: boolean;
3359
+ json_schema_output: boolean;
3360
+ effort_levels: ("low" | "medium" | "high" | "xhigh" | "max")[];
3361
+ known_models: string[];
3362
+ known_models_verified_against: string | null;
3363
+ }, {
3364
+ plan?: boolean | undefined;
3365
+ orchestrate?: boolean | undefined;
3366
+ implement?: boolean | undefined;
3367
+ create_from_scratch?: boolean | undefined;
3368
+ review?: boolean | undefined;
3369
+ verify?: boolean | undefined;
3370
+ synthesize?: boolean | undefined;
3371
+ read_files?: boolean | undefined;
3372
+ browser_tool?: boolean | undefined;
3373
+ web_policy?: "none" | "native" | "tools" | "uncontrolled" | undefined;
3374
+ max_turns?: boolean | undefined;
3375
+ tool_lists?: boolean | undefined;
3376
+ interactive?: boolean | undefined;
3377
+ json_schema_output?: boolean | undefined;
3378
+ effort_levels?: ("low" | "medium" | "high" | "xhigh" | "max")[] | undefined;
3379
+ known_models?: string[] | undefined;
3380
+ known_models_verified_against?: string | null | undefined;
3381
+ }>;
3382
+ auth_modes: z.ZodDefault<z.ZodArray<z.ZodEnum<["local_session", "api_key", "none"]>, "many">>;
3383
+ access_profiles_supported: z.ZodDefault<z.ZodArray<z.ZodEnum<["readonly", "workspace_write", "full", "external_sandbox_full", "inherit_native"]>, "many">>;
3384
+ }, "strip", z.ZodTypeAny, {
3385
+ id: string;
3386
+ kind: "local_cli" | "remote_api" | "fake";
3387
+ display_name: string;
3388
+ provider_family: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown";
3389
+ capability_profile: {
3390
+ auth: {
3391
+ supported_sources: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[];
3392
+ preferred_source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null;
3393
+ credential_transports: {
3394
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
3395
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
3396
+ relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
3397
+ }[];
3398
+ };
3399
+ access_control: {
3400
+ readonly_mechanism: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist";
3401
+ };
3402
+ isolation: {
3403
+ supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
3404
+ };
3405
+ image_input: "file_path" | "base64_stream" | "base64_inline" | "none";
3406
+ };
3407
+ capabilities: {
3408
+ plan: boolean;
3409
+ orchestrate: boolean;
3410
+ implement: boolean;
3411
+ create_from_scratch: boolean;
3412
+ review: boolean;
3413
+ verify: boolean;
3414
+ synthesize: boolean;
3415
+ read_files: boolean;
3416
+ browser_tool: boolean;
3417
+ web_policy: "none" | "native" | "tools" | "uncontrolled";
3418
+ max_turns: boolean;
3419
+ tool_lists: boolean;
3420
+ interactive: boolean;
3421
+ json_schema_output: boolean;
3422
+ effort_levels: ("low" | "medium" | "high" | "xhigh" | "max")[];
3423
+ known_models: string[];
3424
+ known_models_verified_against: string | null;
3425
+ };
3426
+ auth_modes: ("api_key" | "none" | "local_session")[];
3427
+ access_profiles_supported: ("readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native")[];
3428
+ version?: string | undefined;
3429
+ adapter_version?: string | undefined;
3430
+ }, {
3431
+ id: string;
3432
+ kind: "local_cli" | "remote_api" | "fake";
3433
+ display_name: string;
3434
+ capabilities: {
3435
+ plan?: boolean | undefined;
3436
+ orchestrate?: boolean | undefined;
3437
+ implement?: boolean | undefined;
3438
+ create_from_scratch?: boolean | undefined;
3439
+ review?: boolean | undefined;
3440
+ verify?: boolean | undefined;
3441
+ synthesize?: boolean | undefined;
3442
+ read_files?: boolean | undefined;
3443
+ browser_tool?: boolean | undefined;
3444
+ web_policy?: "none" | "native" | "tools" | "uncontrolled" | undefined;
3445
+ max_turns?: boolean | undefined;
3446
+ tool_lists?: boolean | undefined;
3447
+ interactive?: boolean | undefined;
3448
+ json_schema_output?: boolean | undefined;
3449
+ effort_levels?: ("low" | "medium" | "high" | "xhigh" | "max")[] | undefined;
3450
+ known_models?: string[] | undefined;
3451
+ known_models_verified_against?: string | null | undefined;
3452
+ };
3453
+ version?: string | undefined;
3454
+ adapter_version?: string | undefined;
3455
+ provider_family?: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown" | undefined;
3456
+ capability_profile?: {
3457
+ auth?: {
3458
+ supported_sources?: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[] | undefined;
3459
+ preferred_source?: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null | undefined;
3460
+ credential_transports?: {
3461
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
3462
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
3463
+ relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
3464
+ }[] | undefined;
3465
+ } | undefined;
3466
+ access_control?: {
3467
+ readonly_mechanism?: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist" | undefined;
3468
+ } | undefined;
3469
+ isolation?: {
3470
+ supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
3471
+ } | undefined;
3472
+ image_input?: "file_path" | "base64_stream" | "base64_inline" | "none" | undefined;
3473
+ } | undefined;
3474
+ auth_modes?: ("api_key" | "none" | "local_session")[] | undefined;
3475
+ access_profiles_supported?: ("readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native")[] | undefined;
3476
+ }>>>;
3477
+ enabledIntents: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3478
+ disabledIntents: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3479
+ checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
3480
+ id: z.ZodString;
3481
+ status: z.ZodEnum<["pass", "fail", "skip"]>;
3482
+ detail: z.ZodOptional<z.ZodString>;
3483
+ duration_ms: z.ZodOptional<z.ZodNumber>;
3484
+ }, "strip", z.ZodTypeAny, {
3485
+ status: "pass" | "fail" | "skip";
3486
+ id: string;
3487
+ detail?: string | undefined;
3488
+ duration_ms?: number | undefined;
3489
+ }, {
3490
+ status: "pass" | "fail" | "skip";
3491
+ id: string;
3492
+ detail?: string | undefined;
3493
+ duration_ms?: number | undefined;
3494
+ }>, "many">>;
3495
+ reasons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3496
+ /** The user's configured per-harness default model, if any. */
3497
+ configuredModel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3498
+ /** Strict truth-source check of `configuredModel`: null when no model
3499
+ * is configured; a rejection carries the actionable message so UIs render
3500
+ * the same honesty `claudexor doctor` prints. */
3501
+ configuredModelCheck: z.ZodDefault<z.ZodNullable<z.ZodObject<{
3502
+ status: z.ZodEnum<["ok", "rejected"]>;
3503
+ message: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3504
+ }, "strip", z.ZodTypeAny, {
3505
+ message: string | null;
3506
+ status: "ok" | "rejected";
3507
+ }, {
3508
+ status: "ok" | "rejected";
3509
+ message?: string | null | undefined;
3510
+ }>>>;
3511
+ }, "strip", z.ZodTypeAny, {
3512
+ status: "ok" | "degraded" | "unavailable";
3513
+ id: string;
3514
+ checks: {
3515
+ status: "pass" | "fail" | "skip";
3516
+ id: string;
3517
+ detail?: string | undefined;
3518
+ duration_ms?: number | undefined;
3519
+ }[];
3520
+ reasons: string[];
3521
+ enabledIntents: string[];
3522
+ disabledIntents: string[];
3523
+ configuredModel: string | null;
3524
+ configuredModelCheck: {
3525
+ message: string | null;
3526
+ status: "ok" | "rejected";
3527
+ } | null;
3528
+ manifest?: {
3529
+ id: string;
3530
+ kind: "local_cli" | "remote_api" | "fake";
3531
+ display_name: string;
3532
+ provider_family: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown";
3533
+ capability_profile: {
3534
+ auth: {
3535
+ supported_sources: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[];
3536
+ preferred_source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null;
3537
+ credential_transports: {
3538
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
3539
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
3540
+ relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
3541
+ }[];
3542
+ };
3543
+ access_control: {
3544
+ readonly_mechanism: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist";
3545
+ };
3546
+ isolation: {
3547
+ supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
3548
+ };
3549
+ image_input: "file_path" | "base64_stream" | "base64_inline" | "none";
3550
+ };
3551
+ capabilities: {
3552
+ plan: boolean;
3553
+ orchestrate: boolean;
3554
+ implement: boolean;
3555
+ create_from_scratch: boolean;
3556
+ review: boolean;
3557
+ verify: boolean;
3558
+ synthesize: boolean;
3559
+ read_files: boolean;
3560
+ browser_tool: boolean;
3561
+ web_policy: "none" | "native" | "tools" | "uncontrolled";
3562
+ max_turns: boolean;
3563
+ tool_lists: boolean;
3564
+ interactive: boolean;
3565
+ json_schema_output: boolean;
3566
+ effort_levels: ("low" | "medium" | "high" | "xhigh" | "max")[];
3567
+ known_models: string[];
3568
+ known_models_verified_against: string | null;
3569
+ };
3570
+ auth_modes: ("api_key" | "none" | "local_session")[];
3571
+ access_profiles_supported: ("readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native")[];
3572
+ version?: string | undefined;
3573
+ adapter_version?: string | undefined;
3574
+ } | null | undefined;
3575
+ }, {
3576
+ status: "ok" | "degraded" | "unavailable";
3577
+ id: string;
3578
+ checks?: {
3579
+ status: "pass" | "fail" | "skip";
3580
+ id: string;
3581
+ detail?: string | undefined;
3582
+ duration_ms?: number | undefined;
3583
+ }[] | undefined;
3584
+ reasons?: string[] | undefined;
3585
+ manifest?: {
3586
+ id: string;
3587
+ kind: "local_cli" | "remote_api" | "fake";
3588
+ display_name: string;
3589
+ capabilities: {
3590
+ plan?: boolean | undefined;
3591
+ orchestrate?: boolean | undefined;
3592
+ implement?: boolean | undefined;
3593
+ create_from_scratch?: boolean | undefined;
3594
+ review?: boolean | undefined;
3595
+ verify?: boolean | undefined;
3596
+ synthesize?: boolean | undefined;
3597
+ read_files?: boolean | undefined;
3598
+ browser_tool?: boolean | undefined;
3599
+ web_policy?: "none" | "native" | "tools" | "uncontrolled" | undefined;
3600
+ max_turns?: boolean | undefined;
3601
+ tool_lists?: boolean | undefined;
3602
+ interactive?: boolean | undefined;
3603
+ json_schema_output?: boolean | undefined;
3604
+ effort_levels?: ("low" | "medium" | "high" | "xhigh" | "max")[] | undefined;
3605
+ known_models?: string[] | undefined;
3606
+ known_models_verified_against?: string | null | undefined;
3607
+ };
3608
+ version?: string | undefined;
3609
+ adapter_version?: string | undefined;
3610
+ provider_family?: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown" | undefined;
3611
+ capability_profile?: {
3612
+ auth?: {
3613
+ supported_sources?: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[] | undefined;
3614
+ preferred_source?: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null | undefined;
3615
+ credential_transports?: {
3616
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
3617
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
3618
+ relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
3619
+ }[] | undefined;
3620
+ } | undefined;
3621
+ access_control?: {
3622
+ readonly_mechanism?: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist" | undefined;
3623
+ } | undefined;
3624
+ isolation?: {
3625
+ supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
3626
+ } | undefined;
3627
+ image_input?: "file_path" | "base64_stream" | "base64_inline" | "none" | undefined;
3628
+ } | undefined;
3629
+ auth_modes?: ("api_key" | "none" | "local_session")[] | undefined;
3630
+ access_profiles_supported?: ("readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native")[] | undefined;
3631
+ } | null | undefined;
3632
+ enabledIntents?: string[] | undefined;
3633
+ disabledIntents?: string[] | undefined;
3634
+ configuredModel?: string | null | undefined;
3635
+ configuredModelCheck?: {
3636
+ status: "ok" | "rejected";
3637
+ message?: string | null | undefined;
3638
+ } | null | undefined;
3639
+ }>, "many">>;
3640
+ }, "strip", z.ZodTypeAny, {
3641
+ harnesses: {
3642
+ status: "ok" | "degraded" | "unavailable";
3643
+ id: string;
3644
+ checks: {
3645
+ status: "pass" | "fail" | "skip";
3646
+ id: string;
3647
+ detail?: string | undefined;
3648
+ duration_ms?: number | undefined;
3649
+ }[];
3650
+ reasons: string[];
3651
+ enabledIntents: string[];
3652
+ disabledIntents: string[];
3653
+ configuredModel: string | null;
3654
+ configuredModelCheck: {
3655
+ message: string | null;
3656
+ status: "ok" | "rejected";
3657
+ } | null;
3658
+ manifest?: {
3659
+ id: string;
3660
+ kind: "local_cli" | "remote_api" | "fake";
3661
+ display_name: string;
3662
+ provider_family: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown";
3663
+ capability_profile: {
3664
+ auth: {
3665
+ supported_sources: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[];
3666
+ preferred_source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null;
3667
+ credential_transports: {
3668
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
3669
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
3670
+ relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
3671
+ }[];
3672
+ };
3673
+ access_control: {
3674
+ readonly_mechanism: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist";
3675
+ };
3676
+ isolation: {
3677
+ supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
3678
+ };
3679
+ image_input: "file_path" | "base64_stream" | "base64_inline" | "none";
3680
+ };
3681
+ capabilities: {
3682
+ plan: boolean;
3683
+ orchestrate: boolean;
3684
+ implement: boolean;
3685
+ create_from_scratch: boolean;
3686
+ review: boolean;
3687
+ verify: boolean;
3688
+ synthesize: boolean;
3689
+ read_files: boolean;
3690
+ browser_tool: boolean;
3691
+ web_policy: "none" | "native" | "tools" | "uncontrolled";
3692
+ max_turns: boolean;
3693
+ tool_lists: boolean;
3694
+ interactive: boolean;
3695
+ json_schema_output: boolean;
3696
+ effort_levels: ("low" | "medium" | "high" | "xhigh" | "max")[];
3697
+ known_models: string[];
3698
+ known_models_verified_against: string | null;
3699
+ };
3700
+ auth_modes: ("api_key" | "none" | "local_session")[];
3701
+ access_profiles_supported: ("readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native")[];
3702
+ version?: string | undefined;
3703
+ adapter_version?: string | undefined;
3704
+ } | null | undefined;
3705
+ }[];
3706
+ }, {
3707
+ harnesses?: {
3708
+ status: "ok" | "degraded" | "unavailable";
3709
+ id: string;
3710
+ checks?: {
3711
+ status: "pass" | "fail" | "skip";
3712
+ id: string;
3713
+ detail?: string | undefined;
3714
+ duration_ms?: number | undefined;
3715
+ }[] | undefined;
3716
+ reasons?: string[] | undefined;
3717
+ manifest?: {
3718
+ id: string;
3719
+ kind: "local_cli" | "remote_api" | "fake";
3720
+ display_name: string;
3721
+ capabilities: {
3722
+ plan?: boolean | undefined;
3723
+ orchestrate?: boolean | undefined;
3724
+ implement?: boolean | undefined;
3725
+ create_from_scratch?: boolean | undefined;
3726
+ review?: boolean | undefined;
3727
+ verify?: boolean | undefined;
3728
+ synthesize?: boolean | undefined;
3729
+ read_files?: boolean | undefined;
3730
+ browser_tool?: boolean | undefined;
3731
+ web_policy?: "none" | "native" | "tools" | "uncontrolled" | undefined;
3732
+ max_turns?: boolean | undefined;
3733
+ tool_lists?: boolean | undefined;
3734
+ interactive?: boolean | undefined;
3735
+ json_schema_output?: boolean | undefined;
3736
+ effort_levels?: ("low" | "medium" | "high" | "xhigh" | "max")[] | undefined;
3737
+ known_models?: string[] | undefined;
3738
+ known_models_verified_against?: string | null | undefined;
3739
+ };
3740
+ version?: string | undefined;
3741
+ adapter_version?: string | undefined;
3742
+ provider_family?: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown" | undefined;
3743
+ capability_profile?: {
3744
+ auth?: {
3745
+ supported_sources?: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[] | undefined;
3746
+ preferred_source?: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null | undefined;
3747
+ credential_transports?: {
3748
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
3749
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
3750
+ relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
3751
+ }[] | undefined;
3752
+ } | undefined;
3753
+ access_control?: {
3754
+ readonly_mechanism?: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist" | undefined;
3755
+ } | undefined;
3756
+ isolation?: {
3757
+ supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
3758
+ } | undefined;
3759
+ image_input?: "file_path" | "base64_stream" | "base64_inline" | "none" | undefined;
3760
+ } | undefined;
3761
+ auth_modes?: ("api_key" | "none" | "local_session")[] | undefined;
3762
+ access_profiles_supported?: ("readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native")[] | undefined;
3763
+ } | null | undefined;
3764
+ enabledIntents?: string[] | undefined;
3765
+ disabledIntents?: string[] | undefined;
3766
+ configuredModel?: string | null | undefined;
3767
+ configuredModelCheck?: {
3768
+ status: "ok" | "rejected";
3769
+ message?: string | null | undefined;
3770
+ } | null | undefined;
3771
+ }[] | undefined;
3772
+ }>;
3773
+ export type ControlHarnessListResponse = z.infer<typeof ControlHarnessListResponse>;
3774
+ /**
3775
+ * Models enumerable for one harness. `source` is honest about provenance:
3776
+ * "api" when the adapter implemented a real enumeration (raw-api / OpenAI
3777
+ * `GET /v1/models`), "manifest" when the list is the manifest's known-good
3778
+ * hint set, "none" when the harness has no model truth source at all (the
3779
+ * list is then empty and explicit models are refused under strict model-truth validation).
3780
+ */
3781
+ export declare const ControlHarnessModelsResponse: z.ZodObject<{
3782
+ harnessId: z.ZodString;
3783
+ models: z.ZodDefault<z.ZodArray<z.ZodObject<{
3784
+ id: z.ZodString;
3785
+ label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3786
+ context_window: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
3787
+ }, "strip", z.ZodTypeAny, {
3788
+ id: string;
3789
+ label: string | null;
3790
+ context_window: number | null;
3791
+ }, {
3792
+ id: string;
3793
+ label?: string | null | undefined;
3794
+ context_window?: number | null | undefined;
3795
+ }>, "many">>;
3796
+ source: z.ZodEnum<["api", "manifest", "none"]>;
3797
+ /** Freshness note for manifest-sourced lists: the vendor CLI version the
3798
+ * known-model hints were last verified against (null for api/none). */
3799
+ verifiedAgainst: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3800
+ }, "strip", z.ZodTypeAny, {
3801
+ source: "none" | "api" | "manifest";
3802
+ verifiedAgainst: string | null;
3803
+ models: {
3804
+ id: string;
3805
+ label: string | null;
3806
+ context_window: number | null;
3807
+ }[];
3808
+ harnessId: string;
3809
+ }, {
3810
+ source: "none" | "api" | "manifest";
3811
+ harnessId: string;
3812
+ verifiedAgainst?: string | null | undefined;
3813
+ models?: {
3814
+ id: string;
3815
+ label?: string | null | undefined;
3816
+ context_window?: number | null | undefined;
3817
+ }[] | undefined;
3818
+ }>;
3819
+ export type ControlHarnessModelsResponse = z.infer<typeof ControlHarnessModelsResponse>;
3820
+ export declare const ControlSettingsSnapshot: z.ZodObject<{
3821
+ sources: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3822
+ defaultPortfolio: z.ZodDefault<z.ZodEnum<["daily-rich", "balanced", "cheapest", "strongest", "burn", "subscription-first", "api-overflow", "conserve-claude", "conserve-codex"]>>;
3823
+ /** How long a run waits for an interactive answer before a benign decline. */
3824
+ interactionTimeoutMs: z.ZodDefault<z.ZodNumber>;
3825
+ routing: z.ZodDefault<z.ZodObject<{
3826
+ defaultPolicy: z.ZodDefault<z.ZodEnum<["auto", "primary"]>>;
3827
+ primaryHarness: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3828
+ eligibleHarnesses: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3829
+ envInheritance: z.ZodDefault<z.ZodEnum<["mirror_native", "clean"]>>;
3830
+ authPreference: z.ZodDefault<z.ZodEnum<["subscription", "api_key", "auto"]>>;
3831
+ }, "strip", z.ZodTypeAny, {
3832
+ primaryHarness: string | null;
3833
+ authPreference: "auto" | "subscription" | "api_key";
3834
+ eligibleHarnesses: string[];
3835
+ defaultPolicy: "auto" | "primary";
3836
+ envInheritance: "mirror_native" | "clean";
3837
+ }, {
3838
+ primaryHarness?: string | null | undefined;
3839
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
3840
+ eligibleHarnesses?: string[] | undefined;
3841
+ defaultPolicy?: "auto" | "primary" | undefined;
3842
+ envInheritance?: "mirror_native" | "clean" | undefined;
3843
+ }>>;
3844
+ budget: z.ZodDefault<z.ZodObject<{
3845
+ maxUsdPerRun: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
3846
+ }, "strip", z.ZodTypeAny, {
3847
+ maxUsdPerRun: number | null;
3848
+ }, {
3849
+ maxUsdPerRun?: number | null | undefined;
3850
+ }>>;
3851
+ runtime: z.ZodDefault<z.ZodObject<{
3852
+ reviewerTimeoutMs: z.ZodDefault<z.ZodNumber>;
3853
+ harnessInactivityTimeoutMs: z.ZodDefault<z.ZodNumber>;
3854
+ transientRetry: z.ZodDefault<z.ZodObject<{
3855
+ maxRetries: z.ZodDefault<z.ZodNumber>;
3856
+ initialDelayMs: z.ZodDefault<z.ZodNumber>;
3857
+ maxDelayMs: z.ZodDefault<z.ZodNumber>;
3858
+ }, "strip", z.ZodTypeAny, {
3859
+ maxRetries: number;
3860
+ initialDelayMs: number;
3861
+ maxDelayMs: number;
3862
+ }, {
3863
+ maxRetries?: number | undefined;
3864
+ initialDelayMs?: number | undefined;
3865
+ maxDelayMs?: number | undefined;
3866
+ }>>;
3867
+ }, "strip", z.ZodTypeAny, {
3868
+ reviewerTimeoutMs: number;
3869
+ harnessInactivityTimeoutMs: number;
3870
+ transientRetry: {
3871
+ maxRetries: number;
3872
+ initialDelayMs: number;
3873
+ maxDelayMs: number;
3874
+ };
3875
+ }, {
3876
+ reviewerTimeoutMs?: number | undefined;
3877
+ harnessInactivityTimeoutMs?: number | undefined;
3878
+ transientRetry?: {
3879
+ maxRetries?: number | undefined;
3880
+ initialDelayMs?: number | undefined;
3881
+ maxDelayMs?: number | undefined;
3882
+ } | undefined;
3883
+ }>>;
3884
+ harnesses: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
3885
+ enabled: z.ZodDefault<z.ZodBoolean>;
3886
+ defaultModel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3887
+ effort: z.ZodDefault<z.ZodNullable<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>>;
3888
+ maxTurns: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
3889
+ maxRounds: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
3890
+ maxUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
3891
+ toolsAllow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3892
+ toolsDeny: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3893
+ fallbackModel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3894
+ web: z.ZodDefault<z.ZodEnum<["off", "auto", "cached", "live"]>>;
3895
+ authPreference: z.ZodDefault<z.ZodEnum<["subscription", "api_key", "auto"]>>;
3896
+ }, "strip", z.ZodTypeAny, {
3897
+ web: "off" | "auto" | "cached" | "live";
3898
+ enabled: boolean;
3899
+ effort: "low" | "medium" | "high" | "xhigh" | "max" | null;
3900
+ maxUsd: number | null;
3901
+ authPreference: "auto" | "subscription" | "api_key";
3902
+ defaultModel: string | null;
3903
+ maxTurns: number | null;
3904
+ maxRounds: number | null;
3905
+ toolsAllow: string[];
3906
+ toolsDeny: string[];
3907
+ fallbackModel: string | null;
3908
+ }, {
3909
+ web?: "off" | "auto" | "cached" | "live" | undefined;
3910
+ enabled?: boolean | undefined;
3911
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
3912
+ maxUsd?: number | null | undefined;
3913
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
3914
+ defaultModel?: string | null | undefined;
3915
+ maxTurns?: number | null | undefined;
3916
+ maxRounds?: number | null | undefined;
3917
+ toolsAllow?: string[] | undefined;
3918
+ toolsDeny?: string[] | undefined;
3919
+ fallbackModel?: string | null | undefined;
3920
+ }>>>;
3921
+ }, "strip", z.ZodTypeAny, {
3922
+ harnesses: Record<string, {
3923
+ web: "off" | "auto" | "cached" | "live";
3924
+ enabled: boolean;
3925
+ effort: "low" | "medium" | "high" | "xhigh" | "max" | null;
3926
+ maxUsd: number | null;
3927
+ authPreference: "auto" | "subscription" | "api_key";
3928
+ defaultModel: string | null;
3929
+ maxTurns: number | null;
3930
+ maxRounds: number | null;
3931
+ toolsAllow: string[];
3932
+ toolsDeny: string[];
3933
+ fallbackModel: string | null;
3934
+ }>;
3935
+ budget: {
3936
+ maxUsdPerRun: number | null;
3937
+ };
3938
+ routing: {
3939
+ primaryHarness: string | null;
3940
+ authPreference: "auto" | "subscription" | "api_key";
3941
+ eligibleHarnesses: string[];
3942
+ defaultPolicy: "auto" | "primary";
3943
+ envInheritance: "mirror_native" | "clean";
3944
+ };
3945
+ runtime: {
3946
+ reviewerTimeoutMs: number;
3947
+ harnessInactivityTimeoutMs: number;
3948
+ transientRetry: {
3949
+ maxRetries: number;
3950
+ initialDelayMs: number;
3951
+ maxDelayMs: number;
3952
+ };
3953
+ };
3954
+ sources: string[];
3955
+ defaultPortfolio: "daily-rich" | "balanced" | "cheapest" | "strongest" | "burn" | "subscription-first" | "api-overflow" | "conserve-claude" | "conserve-codex";
3956
+ interactionTimeoutMs: number;
3957
+ }, {
3958
+ harnesses?: Record<string, {
3959
+ web?: "off" | "auto" | "cached" | "live" | undefined;
3960
+ enabled?: boolean | undefined;
3961
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
3962
+ maxUsd?: number | null | undefined;
3963
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
3964
+ defaultModel?: string | null | undefined;
3965
+ maxTurns?: number | null | undefined;
3966
+ maxRounds?: number | null | undefined;
3967
+ toolsAllow?: string[] | undefined;
3968
+ toolsDeny?: string[] | undefined;
3969
+ fallbackModel?: string | null | undefined;
3970
+ }> | undefined;
3971
+ budget?: {
3972
+ maxUsdPerRun?: number | null | undefined;
3973
+ } | undefined;
3974
+ routing?: {
3975
+ primaryHarness?: string | null | undefined;
3976
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
3977
+ eligibleHarnesses?: string[] | undefined;
3978
+ defaultPolicy?: "auto" | "primary" | undefined;
3979
+ envInheritance?: "mirror_native" | "clean" | undefined;
3980
+ } | undefined;
3981
+ runtime?: {
3982
+ reviewerTimeoutMs?: number | undefined;
3983
+ harnessInactivityTimeoutMs?: number | undefined;
3984
+ transientRetry?: {
3985
+ maxRetries?: number | undefined;
3986
+ initialDelayMs?: number | undefined;
3987
+ maxDelayMs?: number | undefined;
3988
+ } | undefined;
3989
+ } | undefined;
3990
+ sources?: string[] | undefined;
3991
+ defaultPortfolio?: "daily-rich" | "balanced" | "cheapest" | "strongest" | "burn" | "subscription-first" | "api-overflow" | "conserve-claude" | "conserve-codex" | undefined;
3992
+ interactionTimeoutMs?: number | undefined;
3993
+ }>;
3994
+ export type ControlSettingsSnapshot = z.infer<typeof ControlSettingsSnapshot>;
3995
+ /**
3996
+ * Partial per-harness settings patch; absent fields keep their stored value.
3997
+ * STRICT: a typoed key must 400, not silently no-op (fail-loudly contract).
3998
+ */
3999
+ export declare const ControlHarnessSettingsPatch: z.ZodObject<{
4000
+ enabled: z.ZodOptional<z.ZodBoolean>;
4001
+ defaultModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4002
+ effort: z.ZodOptional<z.ZodNullable<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>>;
4003
+ maxTurns: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4004
+ maxRounds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4005
+ maxUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4006
+ toolsAllow: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4007
+ toolsDeny: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4008
+ fallbackModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4009
+ web: z.ZodOptional<z.ZodEnum<["off", "auto", "cached", "live"]>>;
4010
+ authPreference: z.ZodOptional<z.ZodEnum<["subscription", "api_key", "auto"]>>;
4011
+ }, "strict", z.ZodTypeAny, {
4012
+ web?: "off" | "auto" | "cached" | "live" | undefined;
4013
+ enabled?: boolean | undefined;
4014
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
4015
+ maxUsd?: number | null | undefined;
4016
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
4017
+ defaultModel?: string | null | undefined;
4018
+ maxTurns?: number | null | undefined;
4019
+ maxRounds?: number | null | undefined;
4020
+ toolsAllow?: string[] | undefined;
4021
+ toolsDeny?: string[] | undefined;
4022
+ fallbackModel?: string | null | undefined;
4023
+ }, {
4024
+ web?: "off" | "auto" | "cached" | "live" | undefined;
4025
+ enabled?: boolean | undefined;
4026
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
4027
+ maxUsd?: number | null | undefined;
4028
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
4029
+ defaultModel?: string | null | undefined;
4030
+ maxTurns?: number | null | undefined;
4031
+ maxRounds?: number | null | undefined;
4032
+ toolsAllow?: string[] | undefined;
4033
+ toolsDeny?: string[] | undefined;
4034
+ fallbackModel?: string | null | undefined;
4035
+ }>;
4036
+ export type ControlHarnessSettingsPatch = z.infer<typeof ControlHarnessSettingsPatch>;
4037
+ export declare const ControlSettingsUpdateRequest: z.ZodEffects<z.ZodObject<{
4038
+ defaultPortfolio: z.ZodOptional<z.ZodEnum<["daily-rich", "balanced", "cheapest", "strongest", "burn", "subscription-first", "api-overflow", "conserve-claude", "conserve-codex"]>>;
4039
+ interactionTimeoutMs: z.ZodOptional<z.ZodNumber>;
4040
+ routingPolicy: z.ZodOptional<z.ZodEnum<["auto", "primary"]>>;
4041
+ primaryHarness: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4042
+ eligibleHarnesses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4043
+ envInheritance: z.ZodOptional<z.ZodEnum<["mirror_native", "clean"]>>;
4044
+ maxUsdPerRun: z.ZodOptional<z.ZodNumber>;
4045
+ clearMaxUsdPerRun: z.ZodOptional<z.ZodBoolean>;
4046
+ authPreference: z.ZodOptional<z.ZodEnum<["subscription", "api_key", "auto"]>>;
4047
+ harnesses: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
4048
+ enabled: z.ZodOptional<z.ZodBoolean>;
4049
+ defaultModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4050
+ effort: z.ZodOptional<z.ZodNullable<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>>;
4051
+ maxTurns: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4052
+ maxRounds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4053
+ maxUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4054
+ toolsAllow: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4055
+ toolsDeny: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4056
+ fallbackModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4057
+ web: z.ZodOptional<z.ZodEnum<["off", "auto", "cached", "live"]>>;
4058
+ authPreference: z.ZodOptional<z.ZodEnum<["subscription", "api_key", "auto"]>>;
4059
+ }, "strict", z.ZodTypeAny, {
4060
+ web?: "off" | "auto" | "cached" | "live" | undefined;
4061
+ enabled?: boolean | undefined;
4062
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
4063
+ maxUsd?: number | null | undefined;
4064
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
4065
+ defaultModel?: string | null | undefined;
4066
+ maxTurns?: number | null | undefined;
4067
+ maxRounds?: number | null | undefined;
4068
+ toolsAllow?: string[] | undefined;
4069
+ toolsDeny?: string[] | undefined;
4070
+ fallbackModel?: string | null | undefined;
4071
+ }, {
4072
+ web?: "off" | "auto" | "cached" | "live" | undefined;
4073
+ enabled?: boolean | undefined;
4074
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
4075
+ maxUsd?: number | null | undefined;
4076
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
4077
+ defaultModel?: string | null | undefined;
4078
+ maxTurns?: number | null | undefined;
4079
+ maxRounds?: number | null | undefined;
4080
+ toolsAllow?: string[] | undefined;
4081
+ toolsDeny?: string[] | undefined;
4082
+ fallbackModel?: string | null | undefined;
4083
+ }>>>;
4084
+ }, "strict", z.ZodTypeAny, {
4085
+ harnesses?: Record<string, {
4086
+ web?: "off" | "auto" | "cached" | "live" | undefined;
4087
+ enabled?: boolean | undefined;
4088
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
4089
+ maxUsd?: number | null | undefined;
4090
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
4091
+ defaultModel?: string | null | undefined;
4092
+ maxTurns?: number | null | undefined;
4093
+ maxRounds?: number | null | undefined;
4094
+ toolsAllow?: string[] | undefined;
4095
+ toolsDeny?: string[] | undefined;
4096
+ fallbackModel?: string | null | undefined;
4097
+ }> | undefined;
4098
+ primaryHarness?: string | null | undefined;
4099
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
4100
+ eligibleHarnesses?: string[] | undefined;
4101
+ defaultPortfolio?: "daily-rich" | "balanced" | "cheapest" | "strongest" | "burn" | "subscription-first" | "api-overflow" | "conserve-claude" | "conserve-codex" | undefined;
4102
+ interactionTimeoutMs?: number | undefined;
4103
+ envInheritance?: "mirror_native" | "clean" | undefined;
4104
+ maxUsdPerRun?: number | undefined;
4105
+ routingPolicy?: "auto" | "primary" | undefined;
4106
+ clearMaxUsdPerRun?: boolean | undefined;
4107
+ }, {
4108
+ harnesses?: Record<string, {
4109
+ web?: "off" | "auto" | "cached" | "live" | undefined;
4110
+ enabled?: boolean | undefined;
4111
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
4112
+ maxUsd?: number | null | undefined;
4113
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
4114
+ defaultModel?: string | null | undefined;
4115
+ maxTurns?: number | null | undefined;
4116
+ maxRounds?: number | null | undefined;
4117
+ toolsAllow?: string[] | undefined;
4118
+ toolsDeny?: string[] | undefined;
4119
+ fallbackModel?: string | null | undefined;
4120
+ }> | undefined;
4121
+ primaryHarness?: string | null | undefined;
4122
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
4123
+ eligibleHarnesses?: string[] | undefined;
4124
+ defaultPortfolio?: "daily-rich" | "balanced" | "cheapest" | "strongest" | "burn" | "subscription-first" | "api-overflow" | "conserve-claude" | "conserve-codex" | undefined;
4125
+ interactionTimeoutMs?: number | undefined;
4126
+ envInheritance?: "mirror_native" | "clean" | undefined;
4127
+ maxUsdPerRun?: number | undefined;
4128
+ routingPolicy?: "auto" | "primary" | undefined;
4129
+ clearMaxUsdPerRun?: boolean | undefined;
4130
+ }>, {
4131
+ harnesses?: Record<string, {
4132
+ web?: "off" | "auto" | "cached" | "live" | undefined;
4133
+ enabled?: boolean | undefined;
4134
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
4135
+ maxUsd?: number | null | undefined;
4136
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
4137
+ defaultModel?: string | null | undefined;
4138
+ maxTurns?: number | null | undefined;
4139
+ maxRounds?: number | null | undefined;
4140
+ toolsAllow?: string[] | undefined;
4141
+ toolsDeny?: string[] | undefined;
4142
+ fallbackModel?: string | null | undefined;
4143
+ }> | undefined;
4144
+ primaryHarness?: string | null | undefined;
4145
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
4146
+ eligibleHarnesses?: string[] | undefined;
4147
+ defaultPortfolio?: "daily-rich" | "balanced" | "cheapest" | "strongest" | "burn" | "subscription-first" | "api-overflow" | "conserve-claude" | "conserve-codex" | undefined;
4148
+ interactionTimeoutMs?: number | undefined;
4149
+ envInheritance?: "mirror_native" | "clean" | undefined;
4150
+ maxUsdPerRun?: number | undefined;
4151
+ routingPolicy?: "auto" | "primary" | undefined;
4152
+ clearMaxUsdPerRun?: boolean | undefined;
4153
+ }, {
4154
+ harnesses?: Record<string, {
4155
+ web?: "off" | "auto" | "cached" | "live" | undefined;
4156
+ enabled?: boolean | undefined;
4157
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
4158
+ maxUsd?: number | null | undefined;
4159
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
4160
+ defaultModel?: string | null | undefined;
4161
+ maxTurns?: number | null | undefined;
4162
+ maxRounds?: number | null | undefined;
4163
+ toolsAllow?: string[] | undefined;
4164
+ toolsDeny?: string[] | undefined;
4165
+ fallbackModel?: string | null | undefined;
4166
+ }> | undefined;
4167
+ primaryHarness?: string | null | undefined;
4168
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
4169
+ eligibleHarnesses?: string[] | undefined;
4170
+ defaultPortfolio?: "daily-rich" | "balanced" | "cheapest" | "strongest" | "burn" | "subscription-first" | "api-overflow" | "conserve-claude" | "conserve-codex" | undefined;
4171
+ interactionTimeoutMs?: number | undefined;
4172
+ envInheritance?: "mirror_native" | "clean" | undefined;
4173
+ maxUsdPerRun?: number | undefined;
4174
+ routingPolicy?: "auto" | "primary" | undefined;
4175
+ clearMaxUsdPerRun?: boolean | undefined;
4176
+ }>;
4177
+ export type ControlSettingsUpdateRequest = z.infer<typeof ControlSettingsUpdateRequest>;
4178
+ /** Secret list row: exactly what the store's list() can honestly produce
4179
+ * (the never-populated harnesses/env/description fields were retired in the
4180
+ * v0.15 triage). */
4181
+ export declare const SecretMetadata: z.ZodObject<{
4182
+ name: z.ZodString;
4183
+ backend: z.ZodEnum<["keychain", "file"]>;
4184
+ present: z.ZodDefault<z.ZodBoolean>;
4185
+ }, "strip", z.ZodTypeAny, {
4186
+ name: string;
4187
+ backend: "file" | "keychain";
4188
+ present: boolean;
4189
+ }, {
4190
+ name: string;
4191
+ backend: "file" | "keychain";
4192
+ present?: boolean | undefined;
4193
+ }>;
4194
+ export type SecretMetadata = z.infer<typeof SecretMetadata>;
4195
+ export declare const ControlSecretListResponse: z.ZodObject<{
4196
+ backend: z.ZodEnum<["keychain", "file"]>;
4197
+ secrets: z.ZodDefault<z.ZodArray<z.ZodObject<{
4198
+ name: z.ZodString;
4199
+ backend: z.ZodEnum<["keychain", "file"]>;
4200
+ present: z.ZodDefault<z.ZodBoolean>;
4201
+ }, "strip", z.ZodTypeAny, {
4202
+ name: string;
4203
+ backend: "file" | "keychain";
4204
+ present: boolean;
4205
+ }, {
4206
+ name: string;
4207
+ backend: "file" | "keychain";
4208
+ present?: boolean | undefined;
4209
+ }>, "many">>;
4210
+ }, "strip", z.ZodTypeAny, {
4211
+ backend: "file" | "keychain";
4212
+ secrets: {
4213
+ name: string;
4214
+ backend: "file" | "keychain";
4215
+ present: boolean;
4216
+ }[];
4217
+ }, {
4218
+ backend: "file" | "keychain";
4219
+ secrets?: {
4220
+ name: string;
4221
+ backend: "file" | "keychain";
4222
+ present?: boolean | undefined;
4223
+ }[] | undefined;
4224
+ }>;
4225
+ export type ControlSecretListResponse = z.infer<typeof ControlSecretListResponse>;
4226
+ //# sourceMappingURL=control.d.ts.map