@claudexor/schema 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. package/dist/agent-capabilities.d.ts +88 -16
  2. package/dist/agent-capabilities.d.ts.map +1 -1
  3. package/dist/agent-capabilities.js +49 -18
  4. package/dist/agent-capabilities.js.map +1 -1
  5. package/dist/apply-eligibility.d.ts.map +1 -1
  6. package/dist/apply-eligibility.js +22 -6
  7. package/dist/apply-eligibility.js.map +1 -1
  8. package/dist/attachment.d.ts +113 -48
  9. package/dist/attachment.d.ts.map +1 -1
  10. package/dist/attachment.js +60 -45
  11. package/dist/attachment.js.map +1 -1
  12. package/dist/auth.d.ts +1423 -0
  13. package/dist/auth.d.ts.map +1 -0
  14. package/dist/auth.js +317 -0
  15. package/dist/auth.js.map +1 -0
  16. package/dist/budget.d.ts +133 -16
  17. package/dist/budget.d.ts.map +1 -1
  18. package/dist/budget.js +65 -22
  19. package/dist/budget.js.map +1 -1
  20. package/dist/config.d.ts +449 -115
  21. package/dist/config.d.ts.map +1 -1
  22. package/dist/config.js +114 -41
  23. package/dist/config.js.map +1 -1
  24. package/dist/context.d.ts +6 -6
  25. package/dist/context.d.ts.map +1 -1
  26. package/dist/context.js +31 -7
  27. package/dist/context.js.map +1 -1
  28. package/dist/control-operation-responses.d.ts +1172 -0
  29. package/dist/control-operation-responses.d.ts.map +1 -0
  30. package/dist/control-operation-responses.js +35 -0
  31. package/dist/control-operation-responses.js.map +1 -0
  32. package/dist/control-run-detail.d.ts +443 -242
  33. package/dist/control-run-detail.d.ts.map +1 -1
  34. package/dist/control-run-detail.js +72 -17
  35. package/dist/control-run-detail.js.map +1 -1
  36. package/dist/control-run-retry.d.ts +88 -0
  37. package/dist/control-run-retry.d.ts.map +1 -0
  38. package/dist/control-run-retry.js +40 -0
  39. package/dist/control-run-retry.js.map +1 -0
  40. package/dist/control-run-scope.d.ts +25 -0
  41. package/dist/control-run-scope.d.ts.map +1 -0
  42. package/dist/control-run-scope.js +22 -0
  43. package/dist/control-run-scope.js.map +1 -0
  44. package/dist/control-secret.d.ts +90 -0
  45. package/dist/control-secret.d.ts.map +1 -0
  46. package/dist/control-secret.js +35 -0
  47. package/dist/control-secret.js.map +1 -0
  48. package/dist/control-spec.d.ts +592 -0
  49. package/dist/control-spec.d.ts.map +1 -0
  50. package/dist/control-spec.js +85 -0
  51. package/dist/control-spec.js.map +1 -0
  52. package/dist/control-thread-apply.d.ts +175 -0
  53. package/dist/control-thread-apply.d.ts.map +1 -0
  54. package/dist/control-thread-apply.js +31 -0
  55. package/dist/control-thread-apply.js.map +1 -0
  56. package/dist/control-trust.d.ts +74 -10
  57. package/dist/control-trust.d.ts.map +1 -1
  58. package/dist/control-trust.js +31 -11
  59. package/dist/control-trust.js.map +1 -1
  60. package/dist/control.d.ts +1391 -878
  61. package/dist/control.d.ts.map +1 -1
  62. package/dist/control.js +468 -310
  63. package/dist/control.js.map +1 -1
  64. package/dist/decision.d.ts +10 -10
  65. package/dist/decision.d.ts.map +1 -1
  66. package/dist/decision.js +62 -15
  67. package/dist/decision.js.map +1 -1
  68. package/dist/delivery.d.ts +99 -0
  69. package/dist/delivery.d.ts.map +1 -0
  70. package/dist/delivery.js +19 -0
  71. package/dist/delivery.js.map +1 -0
  72. package/dist/events.d.ts +25 -2
  73. package/dist/events.d.ts.map +1 -1
  74. package/dist/events.js +25 -4
  75. package/dist/events.js.map +1 -1
  76. package/dist/gate.d.ts +2 -2
  77. package/dist/gate.d.ts.map +1 -1
  78. package/dist/gate.js +25 -5
  79. package/dist/gate.js.map +1 -1
  80. package/dist/harness.d.ts +558 -175
  81. package/dist/harness.d.ts.map +1 -1
  82. package/dist/harness.js +207 -82
  83. package/dist/harness.js.map +1 -1
  84. package/dist/index.d.ts +15 -0
  85. package/dist/index.d.ts.map +1 -1
  86. package/dist/index.js +15 -0
  87. package/dist/index.js.map +1 -1
  88. package/dist/operation.d.ts +185 -0
  89. package/dist/operation.d.ts.map +1 -0
  90. package/dist/operation.js +50 -0
  91. package/dist/operation.js.map +1 -0
  92. package/dist/orchestrate.d.ts +127 -22
  93. package/dist/orchestrate.d.ts.map +1 -1
  94. package/dist/orchestrate.js +61 -7
  95. package/dist/orchestrate.js.map +1 -1
  96. package/dist/primitives.d.ts.map +1 -1
  97. package/dist/primitives.js +4 -1
  98. package/dist/primitives.js.map +1 -1
  99. package/dist/problem.d.ts +29 -0
  100. package/dist/problem.d.ts.map +1 -0
  101. package/dist/problem.js +17 -0
  102. package/dist/problem.js.map +1 -0
  103. package/dist/project.d.ts +97 -0
  104. package/dist/project.d.ts.map +1 -0
  105. package/dist/project.js +27 -0
  106. package/dist/project.js.map +1 -0
  107. package/dist/quota.d.ts +251 -0
  108. package/dist/quota.d.ts.map +1 -0
  109. package/dist/quota.js +46 -0
  110. package/dist/quota.js.map +1 -0
  111. package/dist/raw.d.ts +195 -0
  112. package/dist/raw.d.ts.map +1 -0
  113. package/dist/raw.js +58 -0
  114. package/dist/raw.js.map +1 -0
  115. package/dist/recovery.d.ts +515 -0
  116. package/dist/recovery.d.ts.map +1 -0
  117. package/dist/recovery.js +93 -0
  118. package/dist/recovery.js.map +1 -0
  119. package/dist/request-requirements.d.ts +36 -0
  120. package/dist/request-requirements.d.ts.map +1 -0
  121. package/dist/request-requirements.js +26 -0
  122. package/dist/request-requirements.js.map +1 -0
  123. package/dist/review.d.ts +26 -26
  124. package/dist/review.d.ts.map +1 -1
  125. package/dist/review.js +50 -10
  126. package/dist/review.js.map +1 -1
  127. package/dist/route.d.ts +10 -10
  128. package/dist/route.d.ts.map +1 -1
  129. package/dist/route.js +19 -4
  130. package/dist/route.js.map +1 -1
  131. package/dist/setup.d.ts +9766 -0
  132. package/dist/setup.d.ts.map +1 -0
  133. package/dist/setup.js +450 -0
  134. package/dist/setup.js.map +1 -0
  135. package/dist/spec.d.ts +174 -57
  136. package/dist/spec.d.ts.map +1 -1
  137. package/dist/spec.js +69 -16
  138. package/dist/spec.js.map +1 -1
  139. package/dist/surface-run-controls.d.ts.map +1 -1
  140. package/dist/surface-run-controls.js +25 -21
  141. package/dist/surface-run-controls.js.map +1 -1
  142. package/dist/task.d.ts +1560 -58
  143. package/dist/task.d.ts.map +1 -1
  144. package/dist/task.js +97 -18
  145. package/dist/task.js.map +1 -1
  146. package/dist/telemetry.d.ts +233 -60
  147. package/dist/telemetry.d.ts.map +1 -1
  148. package/dist/telemetry.js +97 -15
  149. package/dist/telemetry.js.map +1 -1
  150. package/dist/thread.d.ts +68 -41
  151. package/dist/thread.d.ts.map +1 -1
  152. package/dist/thread.js +45 -11
  153. package/dist/thread.js.map +1 -1
  154. package/dist/workproduct.d.ts +3 -3
  155. package/dist/workproduct.d.ts.map +1 -1
  156. package/dist/workproduct.js.map +1 -1
  157. package/dist/workspace.d.ts +1 -1
  158. package/dist/workspace.d.ts.map +1 -1
  159. package/dist/workspace.js +12 -3
  160. package/dist/workspace.js.map +1 -1
  161. package/generated/AgentCapabilityCatalog.schema.json +53 -11
  162. package/generated/BudgetLease.schema.json +55 -6
  163. package/generated/BudgetObservation.schema.json +28 -7
  164. package/generated/ConformanceReport.schema.json +49 -0
  165. package/generated/ControlApplyCheckResponse.schema.json +34 -0
  166. package/generated/ControlArtifactListResponse.schema.json +57 -0
  167. package/generated/ControlAuthReadinessRefreshRequest.schema.json +38 -0
  168. package/generated/ControlAuthReadinessRefreshResponse.schema.json +85 -0
  169. package/generated/ControlDeliveryResponse.schema.json +136 -0
  170. package/generated/ControlHandshakeRequest.schema.json +26 -0
  171. package/generated/ControlHandshakeResponse.schema.json +30 -0
  172. package/generated/ControlHarnessListResponse.schema.json +103 -12
  173. package/generated/ControlHarnessSettingsPatch.schema.json +0 -12
  174. package/generated/ControlJournalEvent.schema.json +42 -0
  175. package/generated/ControlJournalExportReceipt.schema.json +49 -0
  176. package/generated/ControlJournalInspection.schema.json +149 -0
  177. package/generated/ControlJournalQuarantineReceipt.schema.json +55 -0
  178. package/generated/ControlJournalQuarantineRequest.schema.json +24 -0
  179. package/generated/ControlJournalValidation.schema.json +181 -0
  180. package/generated/ControlOperationCatalog.schema.json +128 -0
  181. package/generated/ControlOperationDescriptor.schema.json +110 -0
  182. package/generated/ControlProblem.schema.json +59 -0
  183. package/generated/ControlProject.schema.json +42 -0
  184. package/generated/ControlProjectListResponse.schema.json +54 -0
  185. package/generated/ControlProjectRegisterRequest.schema.json +19 -0
  186. package/generated/ControlProjectRelinkRequest.schema.json +19 -0
  187. package/generated/ControlQueuedRunInfo.schema.json +4 -2
  188. package/generated/ControlQuotaResponse.schema.json +176 -0
  189. package/generated/ControlResource.schema.json +59 -0
  190. package/generated/ControlRunAgainDraft.schema.json +499 -0
  191. package/generated/ControlRunDetail.schema.json +197 -30
  192. package/generated/ControlRunListResponse.schema.json +797 -0
  193. package/generated/ControlRunRetryResponse.schema.json +54 -0
  194. package/generated/ControlRunStartRequest.schema.json +83 -55
  195. package/generated/ControlRunStartResponse.schema.json +78 -0
  196. package/generated/ControlRunSummary.schema.json +140 -20
  197. package/generated/ControlSecretListResponse.schema.json +8 -14
  198. package/generated/ControlSecretMutationResponse.schema.json +32 -0
  199. package/generated/ControlSecretSetRequest.schema.json +27 -0
  200. package/generated/ControlSettingsSnapshot.schema.json +118 -44
  201. package/generated/ControlSettingsUpdateRequest.schema.json +110 -40
  202. package/generated/ControlSetupJob.schema.json +763 -65
  203. package/generated/ControlSetupJobCreateRequest.schema.json +11 -13
  204. package/generated/ControlSetupJobEvent.schema.json +861 -5
  205. package/generated/ControlSetupJobListFilter.schema.json +35 -0
  206. package/generated/ControlSetupJobListResponse.schema.json +763 -65
  207. package/generated/ControlSetupJobSnapshot.schema.json +870 -0
  208. package/generated/ControlSpecAnswersRequest.schema.json +74 -0
  209. package/generated/ControlSpecQuestionsRequest.schema.json +128 -2
  210. package/generated/ControlSpecSession.schema.json +249 -0
  211. package/generated/ControlSpecSessionListResponse.schema.json +261 -0
  212. package/generated/ControlThread.schema.json +20 -2
  213. package/generated/ControlThreadApplyResponse.schema.json +139 -0
  214. package/generated/ControlThreadDetail.schema.json +32 -4
  215. package/generated/ControlThreadListResponse.schema.json +20 -2
  216. package/generated/ControlThreadTurnRequest.schema.json +373 -0
  217. package/generated/ControlThreadTurnResponse.schema.json +73 -0
  218. package/generated/ControlThreadUpdateRequest.schema.json +1 -1
  219. package/generated/ControlTrustListResponse.schema.json +6 -0
  220. package/generated/ControlTrustState.schema.json +6 -0
  221. package/generated/ControlTrustUpdateRequest.schema.json +65 -3
  222. package/generated/ControlUploadCreateRequest.schema.json +37 -0
  223. package/generated/ControlUploadFinalizeRequest.schema.json +17 -0
  224. package/generated/ControlUploadStatus.schema.json +40 -0
  225. package/generated/DecisionRecord.schema.json +6 -3
  226. package/generated/GlobalConfig.schema.json +105 -58
  227. package/generated/HarnessEvent.schema.json +201 -10
  228. package/generated/HarnessManifest.schema.json +63 -12
  229. package/generated/HarnessStatusDto.schema.json +103 -12
  230. package/generated/OrchestrateContract.schema.json +32 -6
  231. package/generated/OrchestratePlan.schema.json +20 -0
  232. package/generated/OrchestratePlanProgress.schema.json +61 -0
  233. package/generated/PaidBudget.schema.json +42 -0
  234. package/generated/Project.schema.json +45 -0
  235. package/generated/ProjectConfig.schema.json +45 -18
  236. package/generated/RawContextPacket.schema.json +184 -0
  237. package/generated/RawGitPatchEnvelope.schema.json +70 -0
  238. package/generated/RunTelemetry.schema.json +80 -0
  239. package/generated/SecretMetadata.schema.json +4 -7
  240. package/generated/SpecPack.schema.json +118 -7
  241. package/generated/TaskContract.schema.json +159 -26
  242. package/generated/TestCommandInvocation.schema.json +45 -0
  243. package/generated/Thread.schema.json +62 -6
  244. package/generated/ThreadTurn.schema.json +24 -11
  245. package/generated/TrustConfig.schema.json +77 -0
  246. package/package.json +1 -1
  247. package/generated/ControlSetupJobConfirmRequest.schema.json +0 -18
  248. package/generated/ControlSpecFreezeRequest.schema.json +0 -83
package/dist/control.d.ts CHANGED
@@ -1,29 +1,5 @@
1
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>;
2
+ export { ControlQuotaResponse } from "./quota.js";
27
3
  export declare const RunExecution: z.ZodObject<{
28
4
  isolation: z.ZodDefault<z.ZodEnum<["envelope", "live"]>>;
29
5
  }, "strict", z.ZodTypeAny, {
@@ -42,36 +18,23 @@ export declare const ControlReviewerPanelEntry: z.ZodObject<{
42
18
  effort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>;
43
19
  }, "strict", z.ZodTypeAny, {
44
20
  harness: string;
45
- effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
46
21
  model?: string | undefined;
22
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
47
23
  }, {
48
24
  harness: string;
49
- effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
50
25
  model?: string | undefined;
26
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
51
27
  }>;
52
28
  export type ControlReviewerPanelEntry = z.infer<typeof ControlReviewerPanelEntry>;
53
29
  export declare const ControlRunStartRequest: z.ZodObject<{
54
30
  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. */
31
+ /** Immutable daemon resource ids; upload/finalize happens before enqueue. */
57
32
  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;
33
+ resourceId: z.ZodString;
34
+ }, "strict", z.ZodTypeAny, {
35
+ resourceId: string;
69
36
  }, {
70
- path?: string | null | undefined;
71
- kind?: "image" | "file" | undefined;
72
- mime?: string | undefined;
73
- name?: string | undefined;
74
- data?: string | null | undefined;
37
+ resourceId: string;
75
38
  }>, "many">>;
76
39
  mode: z.ZodDefault<z.ZodEnum<["ask", "plan", "audit", "agent", "orchestrate"]>>;
77
40
  scope: z.ZodDefault<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
@@ -102,7 +65,7 @@ export declare const ControlRunStartRequest: z.ZodObject<{
102
65
  }>>;
103
66
  harnesses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
104
67
  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"]>>;
68
+ routingGoal: z.ZodOptional<z.ZodEnum<["auto", "quality", "economy"]>>;
106
69
  /** Scalar model convenience: expands to the RESOLVED PRIMARY harness only
107
70
  * (never the pool). With a multi-harness pool and no primary it is
108
71
  * rejected — use `models` instead (INV-103). */
@@ -126,15 +89,44 @@ export declare const ControlRunStartRequest: z.ZodObject<{
126
89
  * candidate when n>=3 and candidates genuinely complement; `always`/`never`
127
90
  * force it. Threaded to the orchestrator's decideSynthesis. */
128
91
  synthesis: z.ZodOptional<z.ZodEnum<["auto", "always", "never"]>>;
129
- maxUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
92
+ paidBudget: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
93
+ kind: z.ZodLiteral<"unlimited">;
94
+ }, "strict", z.ZodTypeAny, {
95
+ kind: "unlimited";
96
+ }, {
97
+ kind: "unlimited";
98
+ }>, z.ZodObject<{
99
+ kind: z.ZodLiteral<"finite">;
100
+ maxUsd: z.ZodNumber;
101
+ }, "strict", z.ZodTypeAny, {
102
+ kind: "finite";
103
+ maxUsd: number;
104
+ }, {
105
+ kind: "finite";
106
+ maxUsd: number;
107
+ }>]>>;
130
108
  /** Requested access profile. Effective access is derived by the engine and never client-supplied. */
131
109
  access: z.ZodOptional<z.ZodEnum<["readonly", "workspace_write", "full", "external_sandbox_full", "inherit_native"]>>;
132
110
  web: z.ZodOptional<z.ZodEnum<["off", "auto", "cached", "live"]>>;
133
111
  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`. */
112
+ /** Opt this run into the agent-driven browser (Playwright MCP). */
136
113
  browser: z.ZodOptional<z.ZodBoolean>;
137
- tests: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
114
+ tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
115
+ program: z.ZodString;
116
+ args: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
117
+ cwd: z.ZodOptional<z.ZodString>;
118
+ envAllowlist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
119
+ }, "strict", z.ZodTypeAny, {
120
+ program: string;
121
+ args: string[];
122
+ envAllowlist: string[];
123
+ cwd?: string | undefined;
124
+ }, {
125
+ program: string;
126
+ cwd?: string | undefined;
127
+ args?: string[] | undefined;
128
+ envAllowlist?: string[] | undefined;
129
+ }>, "many">>;
138
130
  /** Typed per-run approval for changing auto-protected gate/test paths. This
139
131
  * does not bypass built-in critical/security path human gates. */
140
132
  protectedPathApprovals: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -158,6 +150,7 @@ export declare const ControlRunStartRequest: z.ZodObject<{
158
150
  * lineage; POST /threads/:id/turns is the public turn surface. */
159
151
  turnId: z.ZodOptional<z.ZodString>;
160
152
  parentRunId: z.ZodOptional<z.ZodString>;
153
+ retryOf: z.ZodOptional<z.ZodString>;
161
154
  /** When set, this turn implements an approved plan: the engine prefixes the
162
155
  * parent plan run's final/plan.md into the prompt (mode is forced to agent). */
163
156
  planRunId: z.ZodOptional<z.ZodString>;
@@ -174,12 +167,12 @@ export declare const ControlRunStartRequest: z.ZodObject<{
174
167
  effort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>;
175
168
  }, "strict", z.ZodTypeAny, {
176
169
  harness: string;
177
- effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
178
170
  model?: string | undefined;
171
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
179
172
  }, {
180
173
  harness: string;
181
- effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
182
174
  model?: string | undefined;
175
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
183
176
  }>, "many">>;
184
177
  /** Per-run auth route override (subscription/api_key/auto). */
185
178
  authPreference: z.ZodOptional<z.ZodEnum<["subscription", "api_key", "auto"]>>;
@@ -191,8 +184,8 @@ export declare const ControlRunStartRequest: z.ZodObject<{
191
184
  * mode=orchestrate; consumed by executeOrchestratePlan. */
192
185
  maxToolCalls: z.ZodOptional<z.ZodNumber>;
193
186
  }, "strict", z.ZodTypeAny, {
194
- prompt: string;
195
187
  mode: "ask" | "plan" | "audit" | "agent" | "orchestrate";
188
+ prompt: string;
196
189
  scope: {
197
190
  kind: "project";
198
191
  root: string;
@@ -206,24 +199,26 @@ export declare const ControlRunStartRequest: z.ZodObject<{
206
199
  access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
207
200
  web?: "off" | "auto" | "cached" | "live" | undefined;
208
201
  attachments?: {
209
- path: string | null;
210
- kind: "image" | "file";
211
- mime: string;
212
- name: string;
213
- data: string | null;
202
+ resourceId: string;
214
203
  }[] | undefined;
215
204
  browser?: boolean | undefined;
216
205
  turnId?: string | undefined;
217
206
  planRunId?: string | undefined;
218
207
  models?: Record<string, string> | undefined;
219
208
  harnesses?: string[] | undefined;
220
- tests?: string[] | undefined;
221
- portfolio?: "daily-rich" | "balanced" | "cheapest" | "strongest" | "burn" | "subscription-first" | "api-overflow" | "conserve-claude" | "conserve-codex" | undefined;
209
+ model?: string | undefined;
222
210
  effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
211
+ tests?: {
212
+ program: string;
213
+ args: string[];
214
+ envAllowlist: string[];
215
+ cwd?: string | undefined;
216
+ }[] | undefined;
223
217
  autonomy?: "suggest" | "auto_safe" | "auto_full" | undefined;
224
218
  n?: number | undefined;
225
- model?: string | undefined;
219
+ retryOf?: string | undefined;
226
220
  primaryHarness?: string | undefined;
221
+ routingGoal?: "auto" | "quality" | "economy" | undefined;
227
222
  reviewerModels?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", string>> | undefined;
228
223
  reviewerEfforts?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", "low" | "medium" | "high" | "xhigh" | "max">> | undefined;
229
224
  attempts?: number | null | undefined;
@@ -231,7 +226,12 @@ export declare const ControlRunStartRequest: z.ZodObject<{
231
226
  swarm?: boolean | undefined;
232
227
  create?: boolean | undefined;
233
228
  synthesis?: "auto" | "never" | "always" | undefined;
234
- maxUsd?: number | null | undefined;
229
+ paidBudget?: {
230
+ kind: "unlimited";
231
+ } | {
232
+ kind: "finite";
233
+ maxUsd: number;
234
+ } | undefined;
235
235
  externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
236
236
  protectedPathApprovals?: {
237
237
  path: string;
@@ -244,34 +244,35 @@ export declare const ControlRunStartRequest: z.ZodObject<{
244
244
  parentRunId?: string | undefined;
245
245
  reviewerPanel?: {
246
246
  harness: string;
247
- effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
248
247
  model?: string | undefined;
248
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
249
249
  }[] | undefined;
250
250
  authPreference?: "auto" | "subscription" | "api_key" | undefined;
251
251
  maxToolCalls?: number | undefined;
252
252
  }, {
253
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
253
254
  prompt?: string | undefined;
254
255
  access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
255
256
  web?: "off" | "auto" | "cached" | "live" | undefined;
256
257
  attachments?: {
257
- path?: string | null | undefined;
258
- kind?: "image" | "file" | undefined;
259
- mime?: string | undefined;
260
- name?: string | undefined;
261
- data?: string | null | undefined;
258
+ resourceId: string;
262
259
  }[] | undefined;
263
260
  browser?: boolean | undefined;
264
- mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
265
261
  turnId?: string | undefined;
266
262
  planRunId?: string | undefined;
267
263
  models?: Record<string, string> | undefined;
268
264
  harnesses?: string[] | undefined;
269
- tests?: string[] | undefined;
270
- portfolio?: "daily-rich" | "balanced" | "cheapest" | "strongest" | "burn" | "subscription-first" | "api-overflow" | "conserve-claude" | "conserve-codex" | undefined;
265
+ model?: string | undefined;
271
266
  effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
267
+ tests?: {
268
+ program: string;
269
+ cwd?: string | undefined;
270
+ args?: string[] | undefined;
271
+ envAllowlist?: string[] | undefined;
272
+ }[] | undefined;
272
273
  autonomy?: "suggest" | "auto_safe" | "auto_full" | undefined;
273
274
  n?: number | undefined;
274
- model?: string | undefined;
275
+ retryOf?: string | undefined;
275
276
  scope?: {
276
277
  kind: "project";
277
278
  root: string;
@@ -283,6 +284,7 @@ export declare const ControlRunStartRequest: z.ZodObject<{
283
284
  isolation?: "live" | "envelope" | undefined;
284
285
  } | undefined;
285
286
  primaryHarness?: string | undefined;
287
+ routingGoal?: "auto" | "quality" | "economy" | undefined;
286
288
  reviewerModels?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", string>> | undefined;
287
289
  reviewerEfforts?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", "low" | "medium" | "high" | "xhigh" | "max">> | undefined;
288
290
  attempts?: number | null | undefined;
@@ -290,7 +292,12 @@ export declare const ControlRunStartRequest: z.ZodObject<{
290
292
  swarm?: boolean | undefined;
291
293
  create?: boolean | undefined;
292
294
  synthesis?: "auto" | "never" | "always" | undefined;
293
- maxUsd?: number | null | undefined;
295
+ paidBudget?: {
296
+ kind: "unlimited";
297
+ } | {
298
+ kind: "finite";
299
+ maxUsd: number;
300
+ } | undefined;
294
301
  externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
295
302
  protectedPathApprovals?: {
296
303
  path: string;
@@ -303,354 +310,515 @@ export declare const ControlRunStartRequest: z.ZodObject<{
303
310
  parentRunId?: string | undefined;
304
311
  reviewerPanel?: {
305
312
  harness: string;
306
- effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
307
313
  model?: string | undefined;
314
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
308
315
  }[] | undefined;
309
316
  authPreference?: "auto" | "subscription" | "api_key" | undefined;
310
317
  maxToolCalls?: number | undefined;
311
318
  }>;
312
319
  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;
320
+ export declare const ControlRunStartInfo: z.ZodObject<{
321
+ jobId: z.ZodOptional<z.ZodString>;
322
+ runId: z.ZodString;
323
+ taskId: z.ZodOptional<z.ZodString>;
324
+ runDir: z.ZodString;
325
+ }, "strip", z.ZodTypeAny, {
326
+ runId: string;
327
+ runDir: string;
328
+ jobId?: string | undefined;
329
+ taskId?: string | undefined;
365
330
  }, {
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;
331
+ runId: string;
332
+ runDir: string;
333
+ jobId?: string | undefined;
334
+ taskId?: string | undefined;
382
335
  }>;
383
- export type ControlSetupJob = z.infer<typeof ControlSetupJob>;
384
- export declare const ControlSetupJobEvent: z.ZodObject<{
336
+ export type ControlRunStartInfo = z.infer<typeof ControlRunStartInfo>;
337
+ export declare const ControlRunRetryResponse: z.ZodObject<{
338
+ retryOf: z.ZodString;
385
339
  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;
340
+ runId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
341
+ turnId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
342
+ state: z.ZodString;
393
343
  }, "strict", z.ZodTypeAny, {
394
- message: string;
395
- kind: "status";
396
- time: string;
344
+ state: string;
345
+ turnId: string | null;
346
+ runId: string | null;
397
347
  jobId: string;
398
- seq: number;
399
- state?: "cancelled" | "failed" | "running" | "queued" | "waiting_for_input" | "succeeded" | "not_supported" | undefined;
348
+ retryOf: string;
400
349
  }, {
401
- message: string;
402
- kind: "status";
403
- time: string;
350
+ state: string;
404
351
  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;
352
+ retryOf: string;
353
+ turnId?: string | null | undefined;
354
+ runId?: string | null | undefined;
508
355
  }>;
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"]>>;
356
+ export declare const ControlRunAgainDraft: z.ZodObject<{
357
+ sourceRunId: z.ZodString;
358
+ request: z.ZodObject<{
359
+ prompt: z.ZodDefault<z.ZodString>;
360
+ /** Immutable daemon resource ids; upload/finalize happens before enqueue. */
361
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
362
+ resourceId: z.ZodString;
363
+ }, "strict", z.ZodTypeAny, {
364
+ resourceId: string;
365
+ }, {
366
+ resourceId: string;
367
+ }>, "many">>;
368
+ mode: z.ZodDefault<z.ZodEnum<["ask", "plan", "audit", "agent", "orchestrate"]>>;
369
+ scope: z.ZodDefault<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
370
+ kind: z.ZodLiteral<"project">;
371
+ root: z.ZodString;
372
+ context: z.ZodDefault<z.ZodEnum<["auto"]>>;
373
+ }, "strict", z.ZodTypeAny, {
374
+ kind: "project";
375
+ root: string;
376
+ context: "auto";
377
+ }, {
378
+ kind: "project";
379
+ root: string;
380
+ context?: "auto" | undefined;
381
+ }>, z.ZodObject<{
382
+ kind: z.ZodLiteral<"none">;
383
+ }, "strict", z.ZodTypeAny, {
384
+ kind: "none";
385
+ }, {
386
+ kind: "none";
387
+ }>]>>;
388
+ execution: z.ZodDefault<z.ZodObject<{
389
+ isolation: z.ZodDefault<z.ZodEnum<["envelope", "live"]>>;
390
+ }, "strict", z.ZodTypeAny, {
391
+ isolation: "live" | "envelope";
392
+ }, {
393
+ isolation?: "live" | "envelope" | undefined;
394
+ }>>;
395
+ harnesses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
396
+ primaryHarness: z.ZodOptional<z.ZodString>;
397
+ routingGoal: z.ZodOptional<z.ZodEnum<["auto", "quality", "economy"]>>;
398
+ /** Scalar model convenience: expands to the RESOLVED PRIMARY harness only
399
+ * (never the pool). With a multi-harness pool and no primary it is
400
+ * rejected — use `models` instead (INV-103). */
401
+ model: z.ZodOptional<z.ZodString>;
402
+ /** Harness-scoped model map (harness id → model id). Specific beats
403
+ * general: an entry here wins over the scalar `model` and over the
404
+ * per-harness settings default. */
405
+ models: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
406
+ effort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>;
407
+ reviewerModels: z.ZodOptional<z.ZodRecord<z.ZodEnum<["openai", "anthropic", "google", "cursor", "opencode", "xai", "local", "unknown"]>, z.ZodString>>;
408
+ reviewerEfforts: z.ZodOptional<z.ZodRecord<z.ZodEnum<["openai", "anthropic", "google", "cursor", "opencode", "xai", "local", "unknown"]>, z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>>;
409
+ n: z.ZodOptional<z.ZodNumber>;
410
+ attempts: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
411
+ /** agent flag: iterate until the convergence predicate is clean (no fixed cap). */
412
+ untilClean: z.ZodOptional<z.ZodBoolean>;
413
+ /** audit flag: bounded read-only research swarm (the old `explore`). */
414
+ swarm: z.ZodOptional<z.ZodBoolean>;
415
+ /** agent flag: create-from-scratch intent (the old `create` mode). */
416
+ create: z.ZodOptional<z.ZodBoolean>;
417
+ /** Best-of-N synthesis policy. `auto` (default) only synthesizes a 3rd
418
+ * candidate when n>=3 and candidates genuinely complement; `always`/`never`
419
+ * force it. Threaded to the orchestrator's decideSynthesis. */
420
+ synthesis: z.ZodOptional<z.ZodEnum<["auto", "always", "never"]>>;
421
+ paidBudget: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
422
+ kind: z.ZodLiteral<"unlimited">;
423
+ }, "strict", z.ZodTypeAny, {
424
+ kind: "unlimited";
425
+ }, {
426
+ kind: "unlimited";
427
+ }>, z.ZodObject<{
428
+ kind: z.ZodLiteral<"finite">;
429
+ maxUsd: z.ZodNumber;
430
+ }, "strict", z.ZodTypeAny, {
431
+ kind: "finite";
432
+ maxUsd: number;
433
+ }, {
434
+ kind: "finite";
435
+ maxUsd: number;
436
+ }>]>>;
437
+ /** Requested access profile. Effective access is derived by the engine and never client-supplied. */
438
+ access: z.ZodOptional<z.ZodEnum<["readonly", "workspace_write", "full", "external_sandbox_full", "inherit_native"]>>;
439
+ web: z.ZodOptional<z.ZodEnum<["off", "auto", "cached", "live"]>>;
440
+ externalContextPolicy: z.ZodOptional<z.ZodEnum<["off", "auto", "cached", "live"]>>;
441
+ /** Opt this run into the agent-driven browser (Playwright MCP). */
442
+ browser: z.ZodOptional<z.ZodBoolean>;
443
+ tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
444
+ program: z.ZodString;
445
+ args: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
446
+ cwd: z.ZodOptional<z.ZodString>;
447
+ envAllowlist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
448
+ }, "strict", z.ZodTypeAny, {
449
+ program: string;
450
+ args: string[];
451
+ envAllowlist: string[];
452
+ cwd?: string | undefined;
453
+ }, {
454
+ program: string;
455
+ cwd?: string | undefined;
456
+ args?: string[] | undefined;
457
+ envAllowlist?: string[] | undefined;
458
+ }>, "many">>;
459
+ /** Typed per-run approval for changing auto-protected gate/test paths. This
460
+ * does not bypass built-in critical/security path human gates. */
461
+ protectedPathApprovals: z.ZodOptional<z.ZodArray<z.ZodObject<{
462
+ path: z.ZodString;
463
+ reason: z.ZodOptional<z.ZodString>;
464
+ }, "strict", z.ZodTypeAny, {
465
+ path: string;
466
+ reason?: string | undefined;
467
+ }, {
468
+ path: string;
469
+ reason?: string | undefined;
470
+ }>, "many">>;
471
+ specPath: z.ZodOptional<z.ZodString>;
472
+ specId: z.ZodOptional<z.ZodString>;
473
+ specHash: z.ZodOptional<z.ZodString>;
474
+ /** Thread/session linkage: a run is a turn inside a thread. */
475
+ threadId: z.ZodOptional<z.ZodString>;
476
+ /** INTERNAL single-writer handoff: control-api pre-creates the turn and
477
+ * passes its id to the daemon runner. REJECTED (400) when supplied by a
478
+ * client on POST /runs — a foreign turnId could rebind another thread's
479
+ * lineage; POST /threads/:id/turns is the public turn surface. */
480
+ turnId: z.ZodOptional<z.ZodString>;
481
+ parentRunId: z.ZodOptional<z.ZodString>;
482
+ retryOf: z.ZodOptional<z.ZodString>;
483
+ /** When set, this turn implements an approved plan: the engine prefixes the
484
+ * parent plan run's final/plan.md into the prompt (mode is forced to agent). */
485
+ planRunId: z.ZodOptional<z.ZodString>;
486
+ /** Explicit reviewer panel. When present it overrides the legacy
487
+ * per-provider-family reviewerModels/reviewerEfforts maps and preserves
488
+ * duplicate harness entries for multi-model same-provider reviews. */
489
+ reviewerPanel: z.ZodOptional<z.ZodArray<z.ZodObject<{
490
+ /** Explicit reviewer harness id. Repeated harness ids are allowed so one
491
+ * native provider can review through multiple requested models. */
492
+ harness: z.ZodString;
493
+ /** Optional per-reviewer model hint, passed to that harness only. */
494
+ model: z.ZodOptional<z.ZodString>;
495
+ /** Optional per-reviewer effort hint, passed to that harness only. */
496
+ effort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>;
497
+ }, "strict", z.ZodTypeAny, {
498
+ harness: string;
499
+ model?: string | undefined;
500
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
501
+ }, {
502
+ harness: string;
503
+ model?: string | undefined;
504
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
505
+ }>, "many">>;
506
+ /** Per-run auth route override (subscription/api_key/auto). */
507
+ authPreference: z.ZodOptional<z.ZodEnum<["subscription", "api_key", "auto"]>>;
508
+ /** How much the orchestrate planner may act without confirmation
509
+ * (suggest/auto_safe/auto_full). Only meaningful for mode=orchestrate;
510
+ * consumed by the executor in runOrchestrate. */
511
+ autonomy: z.ZodOptional<z.ZodEnum<["suggest", "auto_safe", "auto_full"]>>;
512
+ /** Orchestrate executor: cap on plan tool calls. Only meaningful for
513
+ * mode=orchestrate; consumed by executeOrchestratePlan. */
514
+ maxToolCalls: z.ZodOptional<z.ZodNumber>;
516
515
  }, "strict", z.ZodTypeAny, {
517
- kind: "project";
518
- root: string;
519
- context: "auto";
516
+ mode: "ask" | "plan" | "audit" | "agent" | "orchestrate";
517
+ prompt: string;
518
+ scope: {
519
+ kind: "project";
520
+ root: string;
521
+ context: "auto";
522
+ } | {
523
+ kind: "none";
524
+ };
525
+ execution: {
526
+ isolation: "live" | "envelope";
527
+ };
528
+ access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
529
+ web?: "off" | "auto" | "cached" | "live" | undefined;
530
+ attachments?: {
531
+ resourceId: string;
532
+ }[] | undefined;
533
+ browser?: boolean | undefined;
534
+ turnId?: string | undefined;
535
+ planRunId?: string | undefined;
536
+ models?: Record<string, string> | undefined;
537
+ harnesses?: string[] | undefined;
538
+ model?: string | undefined;
539
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
540
+ tests?: {
541
+ program: string;
542
+ args: string[];
543
+ envAllowlist: string[];
544
+ cwd?: string | undefined;
545
+ }[] | undefined;
546
+ autonomy?: "suggest" | "auto_safe" | "auto_full" | undefined;
547
+ n?: number | undefined;
548
+ retryOf?: string | undefined;
549
+ primaryHarness?: string | undefined;
550
+ routingGoal?: "auto" | "quality" | "economy" | undefined;
551
+ reviewerModels?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", string>> | undefined;
552
+ reviewerEfforts?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", "low" | "medium" | "high" | "xhigh" | "max">> | undefined;
553
+ attempts?: number | null | undefined;
554
+ untilClean?: boolean | undefined;
555
+ swarm?: boolean | undefined;
556
+ create?: boolean | undefined;
557
+ synthesis?: "auto" | "never" | "always" | undefined;
558
+ paidBudget?: {
559
+ kind: "unlimited";
560
+ } | {
561
+ kind: "finite";
562
+ maxUsd: number;
563
+ } | undefined;
564
+ externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
565
+ protectedPathApprovals?: {
566
+ path: string;
567
+ reason?: string | undefined;
568
+ }[] | undefined;
569
+ specPath?: string | undefined;
570
+ specId?: string | undefined;
571
+ specHash?: string | undefined;
572
+ threadId?: string | undefined;
573
+ parentRunId?: string | undefined;
574
+ reviewerPanel?: {
575
+ harness: string;
576
+ model?: string | undefined;
577
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
578
+ }[] | undefined;
579
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
580
+ maxToolCalls?: number | undefined;
520
581
  }, {
521
- kind: "project";
522
- root: string;
523
- context?: "auto" | undefined;
582
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
583
+ prompt?: string | undefined;
584
+ access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
585
+ web?: "off" | "auto" | "cached" | "live" | undefined;
586
+ attachments?: {
587
+ resourceId: string;
588
+ }[] | undefined;
589
+ browser?: boolean | undefined;
590
+ turnId?: string | undefined;
591
+ planRunId?: string | undefined;
592
+ models?: Record<string, string> | undefined;
593
+ harnesses?: string[] | undefined;
594
+ model?: string | undefined;
595
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
596
+ tests?: {
597
+ program: string;
598
+ cwd?: string | undefined;
599
+ args?: string[] | undefined;
600
+ envAllowlist?: string[] | undefined;
601
+ }[] | undefined;
602
+ autonomy?: "suggest" | "auto_safe" | "auto_full" | undefined;
603
+ n?: number | undefined;
604
+ retryOf?: string | undefined;
605
+ scope?: {
606
+ kind: "project";
607
+ root: string;
608
+ context?: "auto" | undefined;
609
+ } | {
610
+ kind: "none";
611
+ } | undefined;
612
+ execution?: {
613
+ isolation?: "live" | "envelope" | undefined;
614
+ } | undefined;
615
+ primaryHarness?: string | undefined;
616
+ routingGoal?: "auto" | "quality" | "economy" | undefined;
617
+ reviewerModels?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", string>> | undefined;
618
+ reviewerEfforts?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", "low" | "medium" | "high" | "xhigh" | "max">> | undefined;
619
+ attempts?: number | null | undefined;
620
+ untilClean?: boolean | undefined;
621
+ swarm?: boolean | undefined;
622
+ create?: boolean | undefined;
623
+ synthesis?: "auto" | "never" | "always" | undefined;
624
+ paidBudget?: {
625
+ kind: "unlimited";
626
+ } | {
627
+ kind: "finite";
628
+ maxUsd: number;
629
+ } | undefined;
630
+ externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
631
+ protectedPathApprovals?: {
632
+ path: string;
633
+ reason?: string | undefined;
634
+ }[] | undefined;
635
+ specPath?: string | undefined;
636
+ specId?: string | undefined;
637
+ specHash?: string | undefined;
638
+ threadId?: string | undefined;
639
+ parentRunId?: string | undefined;
640
+ reviewerPanel?: {
641
+ harness: string;
642
+ model?: string | undefined;
643
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
644
+ }[] | undefined;
645
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
646
+ maxToolCalls?: number | undefined;
524
647
  }>;
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"]>>;
648
+ differences: z.ZodDefault<z.ZodArray<z.ZodObject<{
649
+ field: z.ZodString;
650
+ change: z.ZodLiteral<"omitted">;
651
+ reason: z.ZodString;
570
652
  }, "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;
653
+ reason: string;
654
+ field: string;
655
+ change: "omitted";
591
656
  }, {
592
- question: string;
593
- answer: string;
657
+ reason: string;
658
+ field: string;
659
+ change: "omitted";
594
660
  }>, "many">>;
595
661
  }, "strict", z.ZodTypeAny, {
596
- prompt: string;
597
- scope: {
598
- kind: "project";
599
- root: string;
600
- context: "auto";
662
+ sourceRunId: string;
663
+ request: {
664
+ mode: "ask" | "plan" | "audit" | "agent" | "orchestrate";
665
+ prompt: string;
666
+ scope: {
667
+ kind: "project";
668
+ root: string;
669
+ context: "auto";
670
+ } | {
671
+ kind: "none";
672
+ };
673
+ execution: {
674
+ isolation: "live" | "envelope";
675
+ };
676
+ access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
677
+ web?: "off" | "auto" | "cached" | "live" | undefined;
678
+ attachments?: {
679
+ resourceId: string;
680
+ }[] | undefined;
681
+ browser?: boolean | undefined;
682
+ turnId?: string | undefined;
683
+ planRunId?: string | undefined;
684
+ models?: Record<string, string> | undefined;
685
+ harnesses?: string[] | undefined;
686
+ model?: string | undefined;
687
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
688
+ tests?: {
689
+ program: string;
690
+ args: string[];
691
+ envAllowlist: string[];
692
+ cwd?: string | undefined;
693
+ }[] | undefined;
694
+ autonomy?: "suggest" | "auto_safe" | "auto_full" | undefined;
695
+ n?: number | undefined;
696
+ retryOf?: string | undefined;
697
+ primaryHarness?: string | undefined;
698
+ routingGoal?: "auto" | "quality" | "economy" | undefined;
699
+ reviewerModels?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", string>> | undefined;
700
+ reviewerEfforts?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", "low" | "medium" | "high" | "xhigh" | "max">> | undefined;
701
+ attempts?: number | null | undefined;
702
+ untilClean?: boolean | undefined;
703
+ swarm?: boolean | undefined;
704
+ create?: boolean | undefined;
705
+ synthesis?: "auto" | "never" | "always" | undefined;
706
+ paidBudget?: {
707
+ kind: "unlimited";
708
+ } | {
709
+ kind: "finite";
710
+ maxUsd: number;
711
+ } | undefined;
712
+ externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
713
+ protectedPathApprovals?: {
714
+ path: string;
715
+ reason?: string | undefined;
716
+ }[] | undefined;
717
+ specPath?: string | undefined;
718
+ specId?: string | undefined;
719
+ specHash?: string | undefined;
720
+ threadId?: string | undefined;
721
+ parentRunId?: string | undefined;
722
+ reviewerPanel?: {
723
+ harness: string;
724
+ model?: string | undefined;
725
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
726
+ }[] | undefined;
727
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
728
+ maxToolCalls?: number | undefined;
601
729
  };
602
- plan?: string | undefined;
603
- answers?: unknown[] | undefined;
604
- priorDecisions?: {
605
- question: string;
606
- answer: string;
607
- }[] | undefined;
608
- planDir?: string | undefined;
730
+ differences: {
731
+ reason: string;
732
+ field: string;
733
+ change: "omitted";
734
+ }[];
609
735
  }, {
610
- prompt: string;
611
- scope: {
612
- kind: "project";
613
- root: string;
614
- context?: "auto" | undefined;
736
+ sourceRunId: string;
737
+ request: {
738
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
739
+ prompt?: string | undefined;
740
+ access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
741
+ web?: "off" | "auto" | "cached" | "live" | undefined;
742
+ attachments?: {
743
+ resourceId: string;
744
+ }[] | undefined;
745
+ browser?: boolean | undefined;
746
+ turnId?: string | undefined;
747
+ planRunId?: string | undefined;
748
+ models?: Record<string, string> | undefined;
749
+ harnesses?: string[] | undefined;
750
+ model?: string | undefined;
751
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
752
+ tests?: {
753
+ program: string;
754
+ cwd?: string | undefined;
755
+ args?: string[] | undefined;
756
+ envAllowlist?: string[] | undefined;
757
+ }[] | undefined;
758
+ autonomy?: "suggest" | "auto_safe" | "auto_full" | undefined;
759
+ n?: number | undefined;
760
+ retryOf?: string | undefined;
761
+ scope?: {
762
+ kind: "project";
763
+ root: string;
764
+ context?: "auto" | undefined;
765
+ } | {
766
+ kind: "none";
767
+ } | undefined;
768
+ execution?: {
769
+ isolation?: "live" | "envelope" | undefined;
770
+ } | undefined;
771
+ primaryHarness?: string | undefined;
772
+ routingGoal?: "auto" | "quality" | "economy" | undefined;
773
+ reviewerModels?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", string>> | undefined;
774
+ reviewerEfforts?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", "low" | "medium" | "high" | "xhigh" | "max">> | undefined;
775
+ attempts?: number | null | undefined;
776
+ untilClean?: boolean | undefined;
777
+ swarm?: boolean | undefined;
778
+ create?: boolean | undefined;
779
+ synthesis?: "auto" | "never" | "always" | undefined;
780
+ paidBudget?: {
781
+ kind: "unlimited";
782
+ } | {
783
+ kind: "finite";
784
+ maxUsd: number;
785
+ } | undefined;
786
+ externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
787
+ protectedPathApprovals?: {
788
+ path: string;
789
+ reason?: string | undefined;
790
+ }[] | undefined;
791
+ specPath?: string | undefined;
792
+ specId?: string | undefined;
793
+ specHash?: string | undefined;
794
+ threadId?: string | undefined;
795
+ parentRunId?: string | undefined;
796
+ reviewerPanel?: {
797
+ harness: string;
798
+ model?: string | undefined;
799
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
800
+ }[] | undefined;
801
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
802
+ maxToolCalls?: number | undefined;
615
803
  };
616
- plan?: string | undefined;
617
- answers?: unknown[] | undefined;
618
- priorDecisions?: {
619
- question: string;
620
- answer: string;
804
+ differences?: {
805
+ reason: string;
806
+ field: string;
807
+ change: "omitted";
621
808
  }[] | 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
809
  }>;
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"]>;
810
+ export declare const ControlRunState: z.ZodEnum<["queued", "running", "blocked", "succeeded", "no_op", "ungated", "review_not_run", "failed", "cancelled", "interrupted_unknown", "cost_unverifiable", "exhausted_overshoot", "exhausted", "not_converged", "stuck_no_progress"]>;
643
811
  export type ControlRunState = z.infer<typeof ControlRunState>;
644
812
  export declare const ControlQueuedRunInfo: z.ZodObject<{
645
813
  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"]>;
814
+ state: z.ZodEnum<["queued", "running", "blocked", "succeeded", "no_op", "ungated", "review_not_run", "failed", "cancelled", "interrupted_unknown", "cost_unverifiable", "exhausted_overshoot", "exhausted", "not_converged", "stuck_no_progress"]>;
647
815
  error: z.ZodOptional<z.ZodString>;
648
816
  }, "strip", z.ZodTypeAny, {
649
- state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
817
+ state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress" | "queued" | "succeeded";
650
818
  jobId: string;
651
819
  error?: string | undefined;
652
820
  }, {
653
- state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
821
+ state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress" | "queued" | "succeeded";
654
822
  jobId: string;
655
823
  error?: string | undefined;
656
824
  }>;
@@ -667,11 +835,11 @@ export declare const RunFailure: z.ZodObject<{
667
835
  runDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
668
836
  nextActions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
669
837
  }, "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
838
  harnessId: string | null;
674
839
  attemptId: string | null;
840
+ runDir: string | null;
841
+ phase: string;
842
+ category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal";
675
843
  safeMessage: string;
676
844
  rawDetailRef: string | null;
677
845
  logRefs: string[];
@@ -679,11 +847,11 @@ export declare const RunFailure: z.ZodObject<{
679
847
  nextActions: string[];
680
848
  }, {
681
849
  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
850
  harnessId?: string | null | undefined;
686
851
  attemptId?: string | null | undefined;
852
+ runDir?: string | null | undefined;
853
+ phase?: string | undefined;
854
+ category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal" | undefined;
687
855
  rawDetailRef?: string | null | undefined;
688
856
  logRefs?: string[] | undefined;
689
857
  eventRefs?: string[] | undefined;
@@ -723,29 +891,29 @@ export declare const ControlWebEvidence: z.ZodObject<{
723
891
  /** False when the run predates telemetry.yaml; surfaces must render "telemetry unavailable". */
724
892
  available: z.ZodDefault<z.ZodBoolean>;
725
893
  }, "strip", z.ZodTypeAny, {
726
- status: "none" | "failed" | "attempted" | "unverified" | "satisfied";
894
+ status: "failed" | "none" | "attempted" | "satisfied" | "unverified";
895
+ available: boolean;
896
+ mode: "off" | "auto" | "cached" | "live";
727
897
  target: string | null;
728
898
  tool: string | null;
729
- mode: "off" | "auto" | "cached" | "live";
730
899
  required: boolean;
731
900
  attempted: boolean;
732
901
  rawDetailRef: string | null;
733
902
  effectiveMode: "off" | "auto" | "cached" | "live";
734
903
  satisfied: boolean;
735
904
  errorSummary: string | null;
736
- available: boolean;
737
905
  }, {
738
- status?: "none" | "failed" | "attempted" | "unverified" | "satisfied" | undefined;
906
+ status?: "failed" | "none" | "attempted" | "satisfied" | "unverified" | undefined;
907
+ available?: boolean | undefined;
908
+ mode?: "off" | "auto" | "cached" | "live" | undefined;
739
909
  target?: string | null | undefined;
740
910
  tool?: string | null | undefined;
741
- mode?: "off" | "auto" | "cached" | "live" | undefined;
742
911
  required?: boolean | undefined;
743
912
  attempted?: boolean | undefined;
744
913
  rawDetailRef?: string | null | undefined;
745
914
  effectiveMode?: "off" | "auto" | "cached" | "live" | undefined;
746
915
  satisfied?: boolean | undefined;
747
916
  errorSummary?: string | null | undefined;
748
- available?: boolean | undefined;
749
917
  }>;
750
918
  export type ControlWebEvidence = z.infer<typeof ControlWebEvidence>;
751
919
  /**
@@ -759,15 +927,15 @@ export declare const ControlRouteInfo: z.ZodObject<{
759
927
  harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
760
928
  verified: z.ZodDefault<z.ZodBoolean>;
761
929
  }, "strip", z.ZodTypeAny, {
762
- verified: boolean;
763
930
  harnessId: string | null;
764
931
  requestedModel: string | null;
765
932
  observedModel: string | null;
933
+ verified: boolean;
766
934
  }, {
767
- verified?: boolean | undefined;
768
935
  harnessId?: string | null | undefined;
769
936
  requestedModel?: string | null | undefined;
770
937
  observedModel?: string | null | undefined;
938
+ verified?: boolean | undefined;
771
939
  }>;
772
940
  export type ControlRouteInfo = z.infer<typeof ControlRouteInfo>;
773
941
  /**
@@ -800,18 +968,16 @@ export declare const ControlRunResult: z.ZodObject<{
800
968
  adopted: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
801
969
  /** Honest application state (decoupled from clean-terminal). */
802
970
  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
971
  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
972
  postTurnSha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
973
+ revertAnchorId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
808
974
  /** 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.
975
+ * an external patch anchor was recorded), so a Revert affordance may be offered.
810
976
  * This is NOT a live-safe guarantee: the server re-checks tree divergence at
811
977
  * revert time and refuses (fail loud) if the working tree changed since. */
812
978
  revertable: z.ZodDefault<z.ZodBoolean>;
813
979
  }, "strip", z.ZodTypeAny, {
814
- kind: "plan" | "none" | "patch" | "report" | "answer";
980
+ kind: "plan" | "none" | "patch" | "answer" | "report";
815
981
  diffStat: {
816
982
  files: number;
817
983
  additions: number;
@@ -822,9 +988,10 @@ export declare const ControlRunResult: z.ZodObject<{
822
988
  applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
823
989
  preTurnSha: string | null;
824
990
  postTurnSha: string | null;
991
+ revertAnchorId: string | null;
825
992
  revertable: boolean;
826
993
  }, {
827
- kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
994
+ kind?: "plan" | "none" | "patch" | "answer" | "report" | undefined;
828
995
  diffStat?: {
829
996
  files: number;
830
997
  additions: number;
@@ -835,6 +1002,7 @@ export declare const ControlRunResult: z.ZodObject<{
835
1002
  applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
836
1003
  preTurnSha?: string | null | undefined;
837
1004
  postTurnSha?: string | null | undefined;
1005
+ revertAnchorId?: string | null | undefined;
838
1006
  revertable?: boolean | undefined;
839
1007
  }>;
840
1008
  export type ControlRunResult = z.infer<typeof ControlRunResult>;
@@ -842,7 +1010,7 @@ export declare const ControlRunSummary: z.ZodObject<{
842
1010
  jobId: z.ZodString;
843
1011
  runId: z.ZodString;
844
1012
  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"]>;
1013
+ state: z.ZodEnum<["queued", "running", "blocked", "succeeded", "no_op", "ungated", "review_not_run", "failed", "cancelled", "interrupted_unknown", "cost_unverifiable", "exhausted_overshoot", "exhausted", "not_converged", "stuck_no_progress"]>;
846
1014
  runDir: z.ZodOptional<z.ZodString>;
847
1015
  error: z.ZodOptional<z.ZodString>;
848
1016
  failure: z.ZodDefault<z.ZodNullable<z.ZodObject<{
@@ -857,11 +1025,11 @@ export declare const ControlRunSummary: z.ZodObject<{
857
1025
  runDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
858
1026
  nextActions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
859
1027
  }, "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
1028
  harnessId: string | null;
864
1029
  attemptId: string | null;
1030
+ runDir: string | null;
1031
+ phase: string;
1032
+ category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal";
865
1033
  safeMessage: string;
866
1034
  rawDetailRef: string | null;
867
1035
  logRefs: string[];
@@ -869,11 +1037,11 @@ export declare const ControlRunSummary: z.ZodObject<{
869
1037
  nextActions: string[];
870
1038
  }, {
871
1039
  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
1040
  harnessId?: string | null | undefined;
876
1041
  attemptId?: string | null | undefined;
1042
+ runDir?: string | null | undefined;
1043
+ phase?: string | undefined;
1044
+ category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal" | undefined;
877
1045
  rawDetailRef?: string | null | undefined;
878
1046
  logRefs?: string[] | undefined;
879
1047
  eventRefs?: string[] | undefined;
@@ -901,7 +1069,7 @@ export declare const ControlRunSummary: z.ZodObject<{
901
1069
  prompt: z.ZodOptional<z.ZodString>;
902
1070
  harnesses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
903
1071
  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"]>>;
1072
+ routingGoal: z.ZodOptional<z.ZodEnum<["auto", "quality", "economy"]>>;
905
1073
  model: z.ZodOptional<z.ZodString>;
906
1074
  reviewerPanel: z.ZodOptional<z.ZodArray<z.ZodObject<{
907
1075
  /** Explicit reviewer harness id. Repeated harness ids are allowed so one
@@ -913,12 +1081,12 @@ export declare const ControlRunSummary: z.ZodObject<{
913
1081
  effort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>;
914
1082
  }, "strict", z.ZodTypeAny, {
915
1083
  harness: string;
916
- effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
917
1084
  model?: string | undefined;
1085
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
918
1086
  }, {
919
1087
  harness: string;
920
- effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
921
1088
  model?: string | undefined;
1089
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
922
1090
  }>, "many">>;
923
1091
  protectedPathApprovals: z.ZodOptional<z.ZodArray<z.ZodObject<{
924
1092
  path: z.ZodString;
@@ -931,7 +1099,22 @@ export declare const ControlRunSummary: z.ZodObject<{
931
1099
  reason?: string | undefined;
932
1100
  }>, "many">>;
933
1101
  n: z.ZodOptional<z.ZodNumber>;
934
- maxUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1102
+ paidBudget: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1103
+ kind: z.ZodLiteral<"unlimited">;
1104
+ }, "strict", z.ZodTypeAny, {
1105
+ kind: "unlimited";
1106
+ }, {
1107
+ kind: "unlimited";
1108
+ }>, z.ZodObject<{
1109
+ kind: z.ZodLiteral<"finite">;
1110
+ maxUsd: z.ZodNumber;
1111
+ }, "strict", z.ZodTypeAny, {
1112
+ kind: "finite";
1113
+ maxUsd: number;
1114
+ }, {
1115
+ kind: "finite";
1116
+ maxUsd: number;
1117
+ }>]>>;
935
1118
  spendUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
936
1119
  spendEstimated: z.ZodOptional<z.ZodBoolean>;
937
1120
  access: z.ZodOptional<z.ZodEnum<["readonly", "workspace_write", "full", "external_sandbox_full", "inherit_native"]>>;
@@ -956,30 +1139,55 @@ export declare const ControlRunSummary: z.ZodObject<{
956
1139
  /** False when the run predates telemetry.yaml; surfaces must render "telemetry unavailable". */
957
1140
  available: z.ZodDefault<z.ZodBoolean>;
958
1141
  }, "strip", z.ZodTypeAny, {
959
- status: "none" | "failed" | "attempted" | "unverified" | "satisfied";
1142
+ status: "failed" | "none" | "attempted" | "satisfied" | "unverified";
1143
+ available: boolean;
1144
+ mode: "off" | "auto" | "cached" | "live";
960
1145
  target: string | null;
961
1146
  tool: string | null;
962
- mode: "off" | "auto" | "cached" | "live";
963
1147
  required: boolean;
964
1148
  attempted: boolean;
965
1149
  rawDetailRef: string | null;
966
1150
  effectiveMode: "off" | "auto" | "cached" | "live";
967
1151
  satisfied: boolean;
968
1152
  errorSummary: string | null;
969
- available: boolean;
970
1153
  }, {
971
- status?: "none" | "failed" | "attempted" | "unverified" | "satisfied" | undefined;
1154
+ status?: "failed" | "none" | "attempted" | "satisfied" | "unverified" | undefined;
1155
+ available?: boolean | undefined;
1156
+ mode?: "off" | "auto" | "cached" | "live" | undefined;
972
1157
  target?: string | null | undefined;
973
1158
  tool?: string | null | undefined;
974
- mode?: "off" | "auto" | "cached" | "live" | undefined;
975
1159
  required?: boolean | undefined;
976
1160
  attempted?: boolean | undefined;
977
1161
  rawDetailRef?: string | null | undefined;
978
1162
  effectiveMode?: "off" | "auto" | "cached" | "live" | undefined;
979
1163
  satisfied?: boolean | undefined;
980
1164
  errorSummary?: string | null | undefined;
981
- available?: boolean | undefined;
982
1165
  }>>;
1166
+ requestRequirements: z.ZodDefault<z.ZodArray<z.ZodObject<{
1167
+ capability: z.ZodLiteral<"browser">;
1168
+ harness_id: z.ZodString;
1169
+ eligible: z.ZodBoolean;
1170
+ requested: z.ZodBoolean;
1171
+ effective: z.ZodBoolean;
1172
+ reason: z.ZodEnum<["not_requested", "effective", "manifest_unsupported", "web_policy_off", "access_profile_incompatible"]>;
1173
+ evidence_refs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1174
+ }, "strip", z.ZodTypeAny, {
1175
+ requested: boolean;
1176
+ effective: boolean;
1177
+ reason: "effective" | "not_requested" | "manifest_unsupported" | "web_policy_off" | "access_profile_incompatible";
1178
+ evidence_refs: string[];
1179
+ harness_id: string;
1180
+ eligible: boolean;
1181
+ capability: "browser";
1182
+ }, {
1183
+ requested: boolean;
1184
+ effective: boolean;
1185
+ reason: "effective" | "not_requested" | "manifest_unsupported" | "web_policy_off" | "access_profile_incompatible";
1186
+ harness_id: string;
1187
+ eligible: boolean;
1188
+ capability: "browser";
1189
+ evidence_refs?: string[] | undefined;
1190
+ }>, "many">>;
983
1191
  toolPermissionPolicy: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
984
1192
  outputReadyState: z.ZodDefault<z.ZodEnum<["pending", "finalizing", "ready", "diagnostic"]>>;
985
1193
  /** Non-blocking tool warnings projected from final/telemetry.yaml. */
@@ -1005,18 +1213,16 @@ export declare const ControlRunSummary: z.ZodObject<{
1005
1213
  adopted: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
1006
1214
  /** Honest application state (decoupled from clean-terminal). */
1007
1215
  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
1216
  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
1217
  postTurnSha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1218
+ revertAnchorId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1013
1219
  /** 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.
1220
+ * an external patch anchor was recorded), so a Revert affordance may be offered.
1015
1221
  * This is NOT a live-safe guarantee: the server re-checks tree divergence at
1016
1222
  * revert time and refuses (fail loud) if the working tree changed since. */
1017
1223
  revertable: z.ZodDefault<z.ZodBoolean>;
1018
1224
  }, "strip", z.ZodTypeAny, {
1019
- kind: "plan" | "none" | "patch" | "report" | "answer";
1225
+ kind: "plan" | "none" | "patch" | "answer" | "report";
1020
1226
  diffStat: {
1021
1227
  files: number;
1022
1228
  additions: number;
@@ -1027,9 +1233,10 @@ export declare const ControlRunSummary: z.ZodObject<{
1027
1233
  applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
1028
1234
  preTurnSha: string | null;
1029
1235
  postTurnSha: string | null;
1236
+ revertAnchorId: string | null;
1030
1237
  revertable: boolean;
1031
1238
  }, {
1032
- kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
1239
+ kind?: "plan" | "none" | "patch" | "answer" | "report" | undefined;
1033
1240
  diffStat?: {
1034
1241
  files: number;
1035
1242
  additions: number;
@@ -1040,6 +1247,7 @@ export declare const ControlRunSummary: z.ZodObject<{
1040
1247
  applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
1041
1248
  preTurnSha?: string | null | undefined;
1042
1249
  postTurnSha?: string | null | undefined;
1250
+ revertAnchorId?: string | null | undefined;
1043
1251
  revertable?: boolean | undefined;
1044
1252
  }>>;
1045
1253
  /** True while at least one interaction.requested has no answered/timeout. */
@@ -1051,24 +1259,39 @@ export declare const ControlRunSummary: z.ZodObject<{
1051
1259
  harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1052
1260
  verified: z.ZodDefault<z.ZodBoolean>;
1053
1261
  }, "strip", z.ZodTypeAny, {
1054
- verified: boolean;
1055
1262
  harnessId: string | null;
1056
1263
  requestedModel: string | null;
1057
1264
  observedModel: string | null;
1265
+ verified: boolean;
1058
1266
  }, {
1059
- verified?: boolean | undefined;
1060
1267
  harnessId?: string | null | undefined;
1061
1268
  requestedModel?: string | null | undefined;
1062
1269
  observedModel?: string | null | undefined;
1270
+ verified?: boolean | undefined;
1063
1271
  }>>>;
1064
- tests: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1272
+ tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
1273
+ program: z.ZodString;
1274
+ args: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1275
+ cwd: z.ZodOptional<z.ZodString>;
1276
+ envAllowlist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1277
+ }, "strict", z.ZodTypeAny, {
1278
+ program: string;
1279
+ args: string[];
1280
+ envAllowlist: string[];
1281
+ cwd?: string | undefined;
1282
+ }, {
1283
+ program: string;
1284
+ cwd?: string | undefined;
1285
+ args?: string[] | undefined;
1286
+ envAllowlist?: string[] | undefined;
1287
+ }>, "many">>;
1065
1288
  specId: z.ZodOptional<z.ZodString>;
1066
1289
  specHash: z.ZodOptional<z.ZodString>;
1067
1290
  createdAt: z.ZodOptional<z.ZodString>;
1068
1291
  startedAt: z.ZodOptional<z.ZodString>;
1069
1292
  finishedAt: z.ZodOptional<z.ZodString>;
1070
1293
  }, "strip", z.ZodTypeAny, {
1071
- state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
1294
+ state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress" | "queued" | "succeeded";
1072
1295
  runId: string;
1073
1296
  project: {
1074
1297
  kind: "none" | "project";
@@ -1078,11 +1301,11 @@ export declare const ControlRunSummary: z.ZodObject<{
1078
1301
  };
1079
1302
  jobId: string;
1080
1303
  failure: {
1081
- runDir: string | null;
1082
- category: "validation" | "unknown" | "harness_error" | "auth" | "cancelled" | "budget" | "project" | "policy" | "harness_unavailable" | "internal";
1083
- phase: string;
1084
1304
  harnessId: string | null;
1085
1305
  attemptId: string | null;
1306
+ runDir: string | null;
1307
+ phase: string;
1308
+ category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal";
1086
1309
  safeMessage: string;
1087
1310
  rawDetailRef: string | null;
1088
1311
  logRefs: string[];
@@ -1090,22 +1313,31 @@ export declare const ControlRunSummary: z.ZodObject<{
1090
1313
  nextActions: string[];
1091
1314
  } | null;
1092
1315
  webEvidence: {
1093
- status: "none" | "failed" | "attempted" | "unverified" | "satisfied";
1316
+ status: "failed" | "none" | "attempted" | "satisfied" | "unverified";
1317
+ available: boolean;
1318
+ mode: "off" | "auto" | "cached" | "live";
1094
1319
  target: string | null;
1095
1320
  tool: string | null;
1096
- mode: "off" | "auto" | "cached" | "live";
1097
1321
  required: boolean;
1098
1322
  attempted: boolean;
1099
1323
  rawDetailRef: string | null;
1100
1324
  effectiveMode: "off" | "auto" | "cached" | "live";
1101
1325
  satisfied: boolean;
1102
1326
  errorSummary: string | null;
1103
- available: boolean;
1104
1327
  };
1328
+ requestRequirements: {
1329
+ requested: boolean;
1330
+ effective: boolean;
1331
+ reason: "effective" | "not_requested" | "manifest_unsupported" | "web_policy_off" | "access_profile_incompatible";
1332
+ evidence_refs: string[];
1333
+ harness_id: string;
1334
+ eligible: boolean;
1335
+ capability: "browser";
1336
+ }[];
1105
1337
  outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
1106
1338
  toolWarningsTotal: number;
1107
1339
  result: {
1108
- kind: "plan" | "none" | "patch" | "report" | "answer";
1340
+ kind: "plan" | "none" | "patch" | "answer" | "report";
1109
1341
  diffStat: {
1110
1342
  files: number;
1111
1343
  additions: number;
@@ -1116,27 +1348,41 @@ export declare const ControlRunSummary: z.ZodObject<{
1116
1348
  applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
1117
1349
  preTurnSha: string | null;
1118
1350
  postTurnSha: string | null;
1351
+ revertAnchorId: string | null;
1119
1352
  revertable: boolean;
1120
1353
  };
1121
1354
  waitingOnUser: boolean;
1122
1355
  route: {
1123
- verified: boolean;
1124
1356
  harnessId: string | null;
1125
1357
  requestedModel: string | null;
1126
1358
  observedModel: string | null;
1359
+ verified: boolean;
1127
1360
  } | null;
1361
+ startedAt?: string | undefined;
1362
+ createdAt?: string | undefined;
1363
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
1128
1364
  prompt?: string | undefined;
1129
1365
  access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1130
1366
  error?: string | undefined;
1131
- mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
1132
1367
  harnesses?: string[] | undefined;
1133
1368
  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
1369
  model?: string | undefined;
1370
+ tests?: {
1371
+ program: string;
1372
+ args: string[];
1373
+ envAllowlist: string[];
1374
+ cwd?: string | undefined;
1375
+ }[] | undefined;
1376
+ n?: number | undefined;
1377
+ taskId?: string | undefined;
1138
1378
  primaryHarness?: string | undefined;
1139
- maxUsd?: number | null | undefined;
1379
+ routingGoal?: "auto" | "quality" | "economy" | undefined;
1380
+ paidBudget?: {
1381
+ kind: "unlimited";
1382
+ } | {
1383
+ kind: "finite";
1384
+ maxUsd: number;
1385
+ } | undefined;
1140
1386
  externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
1141
1387
  protectedPathApprovals?: {
1142
1388
  path: string;
@@ -1146,13 +1392,9 @@ export declare const ControlRunSummary: z.ZodObject<{
1146
1392
  specHash?: string | undefined;
1147
1393
  reviewerPanel?: {
1148
1394
  harness: string;
1149
- effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1150
1395
  model?: string | undefined;
1396
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1151
1397
  }[] | undefined;
1152
- createdAt?: string | undefined;
1153
- startedAt?: string | undefined;
1154
- finishedAt?: string | undefined;
1155
- taskId?: string | undefined;
1156
1398
  strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
1157
1399
  spendUsd?: number | null | undefined;
1158
1400
  spendEstimated?: boolean | undefined;
@@ -1161,18 +1403,26 @@ export declare const ControlRunSummary: z.ZodObject<{
1161
1403
  webRequired?: boolean | undefined;
1162
1404
  webMode?: "off" | "auto" | "cached" | "live" | undefined;
1163
1405
  toolPermissionPolicy?: Record<string, unknown> | undefined;
1406
+ finishedAt?: string | undefined;
1164
1407
  }, {
1165
- state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
1408
+ state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress" | "queued" | "succeeded";
1166
1409
  runId: string;
1167
1410
  jobId: string;
1411
+ startedAt?: string | undefined;
1412
+ createdAt?: string | undefined;
1413
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
1168
1414
  prompt?: string | undefined;
1169
1415
  access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1170
1416
  error?: string | undefined;
1171
- mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
1172
1417
  harnesses?: string[] | undefined;
1173
1418
  runDir?: string | undefined;
1174
- tests?: string[] | undefined;
1175
- portfolio?: "daily-rich" | "balanced" | "cheapest" | "strongest" | "burn" | "subscription-first" | "api-overflow" | "conserve-claude" | "conserve-codex" | undefined;
1419
+ model?: string | undefined;
1420
+ tests?: {
1421
+ program: string;
1422
+ cwd?: string | undefined;
1423
+ args?: string[] | undefined;
1424
+ envAllowlist?: string[] | undefined;
1425
+ }[] | undefined;
1176
1426
  project?: {
1177
1427
  kind?: "none" | "project" | undefined;
1178
1428
  root?: string | null | undefined;
@@ -1180,9 +1430,15 @@ export declare const ControlRunSummary: z.ZodObject<{
1180
1430
  projectName?: string | null | undefined;
1181
1431
  } | undefined;
1182
1432
  n?: number | undefined;
1183
- model?: string | undefined;
1433
+ taskId?: string | undefined;
1184
1434
  primaryHarness?: string | undefined;
1185
- maxUsd?: number | null | undefined;
1435
+ routingGoal?: "auto" | "quality" | "economy" | undefined;
1436
+ paidBudget?: {
1437
+ kind: "unlimited";
1438
+ } | {
1439
+ kind: "finite";
1440
+ maxUsd: number;
1441
+ } | undefined;
1186
1442
  externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
1187
1443
  protectedPathApprovals?: {
1188
1444
  path: string;
@@ -1192,20 +1448,16 @@ export declare const ControlRunSummary: z.ZodObject<{
1192
1448
  specHash?: string | undefined;
1193
1449
  reviewerPanel?: {
1194
1450
  harness: string;
1195
- effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1196
1451
  model?: string | undefined;
1452
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1197
1453
  }[] | undefined;
1198
- createdAt?: string | undefined;
1199
- startedAt?: string | undefined;
1200
- finishedAt?: string | undefined;
1201
- taskId?: string | undefined;
1202
1454
  failure?: {
1203
1455
  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
1456
  harnessId?: string | null | undefined;
1208
1457
  attemptId?: string | null | undefined;
1458
+ runDir?: string | null | undefined;
1459
+ phase?: string | undefined;
1460
+ category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal" | undefined;
1209
1461
  rawDetailRef?: string | null | undefined;
1210
1462
  logRefs?: string[] | undefined;
1211
1463
  eventRefs?: string[] | undefined;
@@ -1219,23 +1471,32 @@ export declare const ControlRunSummary: z.ZodObject<{
1219
1471
  webRequired?: boolean | undefined;
1220
1472
  webMode?: "off" | "auto" | "cached" | "live" | undefined;
1221
1473
  webEvidence?: {
1222
- status?: "none" | "failed" | "attempted" | "unverified" | "satisfied" | undefined;
1474
+ status?: "failed" | "none" | "attempted" | "satisfied" | "unverified" | undefined;
1475
+ available?: boolean | undefined;
1476
+ mode?: "off" | "auto" | "cached" | "live" | undefined;
1223
1477
  target?: string | null | undefined;
1224
1478
  tool?: string | null | undefined;
1225
- mode?: "off" | "auto" | "cached" | "live" | undefined;
1226
1479
  required?: boolean | undefined;
1227
1480
  attempted?: boolean | undefined;
1228
1481
  rawDetailRef?: string | null | undefined;
1229
1482
  effectiveMode?: "off" | "auto" | "cached" | "live" | undefined;
1230
1483
  satisfied?: boolean | undefined;
1231
1484
  errorSummary?: string | null | undefined;
1232
- available?: boolean | undefined;
1233
1485
  } | undefined;
1486
+ requestRequirements?: {
1487
+ requested: boolean;
1488
+ effective: boolean;
1489
+ reason: "effective" | "not_requested" | "manifest_unsupported" | "web_policy_off" | "access_profile_incompatible";
1490
+ harness_id: string;
1491
+ eligible: boolean;
1492
+ capability: "browser";
1493
+ evidence_refs?: string[] | undefined;
1494
+ }[] | undefined;
1234
1495
  toolPermissionPolicy?: Record<string, unknown> | undefined;
1235
1496
  outputReadyState?: "pending" | "finalizing" | "ready" | "diagnostic" | undefined;
1236
1497
  toolWarningsTotal?: number | undefined;
1237
1498
  result?: {
1238
- kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
1499
+ kind?: "plan" | "none" | "patch" | "answer" | "report" | undefined;
1239
1500
  diffStat?: {
1240
1501
  files: number;
1241
1502
  additions: number;
@@ -1246,15 +1507,17 @@ export declare const ControlRunSummary: z.ZodObject<{
1246
1507
  applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
1247
1508
  preTurnSha?: string | null | undefined;
1248
1509
  postTurnSha?: string | null | undefined;
1510
+ revertAnchorId?: string | null | undefined;
1249
1511
  revertable?: boolean | undefined;
1250
1512
  } | undefined;
1251
1513
  waitingOnUser?: boolean | undefined;
1252
1514
  route?: {
1253
- verified?: boolean | undefined;
1254
1515
  harnessId?: string | null | undefined;
1255
1516
  requestedModel?: string | null | undefined;
1256
1517
  observedModel?: string | null | undefined;
1518
+ verified?: boolean | undefined;
1257
1519
  } | null | undefined;
1520
+ finishedAt?: string | undefined;
1258
1521
  }>;
1259
1522
  export type ControlRunSummary = z.infer<typeof ControlRunSummary>;
1260
1523
  export declare const ControlPrimaryOutput: z.ZodObject<{
@@ -1264,14 +1527,14 @@ export declare const ControlPrimaryOutput: z.ZodObject<{
1264
1527
  bytes: z.ZodOptional<z.ZodNumber>;
1265
1528
  }, "strip", z.ZodTypeAny, {
1266
1529
  path: string;
1267
- kind: "diagnostic" | "plan" | "summary" | "patch" | "report" | "answer";
1530
+ kind: "diagnostic" | "plan" | "summary" | "patch" | "answer" | "report";
1268
1531
  text: string | null;
1269
1532
  bytes?: number | undefined;
1270
1533
  }, {
1271
1534
  path: string;
1272
- kind: "diagnostic" | "plan" | "summary" | "patch" | "report" | "answer";
1273
- text?: string | null | undefined;
1535
+ kind: "diagnostic" | "plan" | "summary" | "patch" | "answer" | "report";
1274
1536
  bytes?: number | undefined;
1537
+ text?: string | null | undefined;
1275
1538
  }>;
1276
1539
  export type ControlPrimaryOutput = z.infer<typeof ControlPrimaryOutput>;
1277
1540
  export declare const ControlTimelineEvent: z.ZodObject<{
@@ -1289,12 +1552,12 @@ export declare const ControlTimelineEvent: z.ZodObject<{
1289
1552
  }, "strip", z.ZodTypeAny, {
1290
1553
  type: string;
1291
1554
  detail: string | null;
1292
- target: string | null;
1293
- title: string;
1294
- severity: "error" | "info" | "warning";
1295
1555
  harnessId: string | null;
1296
1556
  attemptId: string | null;
1557
+ target: string | null;
1558
+ title: string;
1297
1559
  errorSummary: string | null;
1560
+ severity: "error" | "info" | "warning";
1298
1561
  toolName: string | null;
1299
1562
  rawRef: string | null;
1300
1563
  ts?: string | undefined;
@@ -1302,18 +1565,33 @@ export declare const ControlTimelineEvent: z.ZodObject<{
1302
1565
  type: string;
1303
1566
  title: string;
1304
1567
  detail?: string | null | undefined;
1305
- target?: string | null | undefined;
1306
- ts?: string | undefined;
1307
- severity?: "error" | "info" | "warning" | undefined;
1308
1568
  harnessId?: string | null | undefined;
1309
1569
  attemptId?: string | null | undefined;
1570
+ target?: string | null | undefined;
1571
+ ts?: string | undefined;
1310
1572
  errorSummary?: string | null | undefined;
1573
+ severity?: "error" | "info" | "warning" | undefined;
1311
1574
  toolName?: string | null | undefined;
1312
1575
  rawRef?: string | null | undefined;
1313
1576
  }>;
1314
1577
  export type ControlTimelineEvent = z.infer<typeof ControlTimelineEvent>;
1315
1578
  export declare const ControlBudgetSnapshot: z.ZodObject<{
1316
- maxUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1579
+ paidBudget: z.ZodDefault<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1580
+ kind: z.ZodLiteral<"unlimited">;
1581
+ }, "strict", z.ZodTypeAny, {
1582
+ kind: "unlimited";
1583
+ }, {
1584
+ kind: "unlimited";
1585
+ }>, z.ZodObject<{
1586
+ kind: z.ZodLiteral<"finite">;
1587
+ maxUsd: z.ZodNumber;
1588
+ }, "strict", z.ZodTypeAny, {
1589
+ kind: "finite";
1590
+ maxUsd: number;
1591
+ }, {
1592
+ kind: "finite";
1593
+ maxUsd: number;
1594
+ }>]>>;
1317
1595
  spendUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1318
1596
  remainingUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1319
1597
  estimated: z.ZodDefault<z.ZodBoolean>;
@@ -1321,13 +1599,23 @@ export declare const ControlBudgetSnapshot: z.ZodObject<{
1321
1599
  }, "strip", z.ZodTypeAny, {
1322
1600
  source: "unknown" | "decision" | "events" | "settings";
1323
1601
  estimated: boolean;
1324
- maxUsd: number | null;
1602
+ paidBudget: {
1603
+ kind: "unlimited";
1604
+ } | {
1605
+ kind: "finite";
1606
+ maxUsd: number;
1607
+ };
1325
1608
  spendUsd: number | null;
1326
1609
  remainingUsd: number | null;
1327
1610
  }, {
1328
1611
  source?: "unknown" | "decision" | "events" | "settings" | undefined;
1329
1612
  estimated?: boolean | undefined;
1330
- maxUsd?: number | null | undefined;
1613
+ paidBudget?: {
1614
+ kind: "unlimited";
1615
+ } | {
1616
+ kind: "finite";
1617
+ maxUsd: number;
1618
+ } | undefined;
1331
1619
  spendUsd?: number | null | undefined;
1332
1620
  remainingUsd?: number | null | undefined;
1333
1621
  }>;
@@ -1396,6 +1684,8 @@ export declare const ControlPendingInteraction: z.ZodObject<{
1396
1684
  requestedAt: z.ZodString;
1397
1685
  timeoutAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1398
1686
  }, "strip", z.ZodTypeAny, {
1687
+ harnessId: string | null;
1688
+ attemptId: string | null;
1399
1689
  questions: {
1400
1690
  options: {
1401
1691
  label: string;
@@ -1407,8 +1697,6 @@ export declare const ControlPendingInteraction: z.ZodObject<{
1407
1697
  multi_select: boolean;
1408
1698
  }[];
1409
1699
  runId: string;
1410
- harnessId: string | null;
1411
- attemptId: string | null;
1412
1700
  interactionId: string;
1413
1701
  sourceTool: string | null;
1414
1702
  requestedAt: string;
@@ -1417,6 +1705,8 @@ export declare const ControlPendingInteraction: z.ZodObject<{
1417
1705
  runId: string;
1418
1706
  interactionId: string;
1419
1707
  requestedAt: string;
1708
+ harnessId?: string | null | undefined;
1709
+ attemptId?: string | null | undefined;
1420
1710
  questions?: {
1421
1711
  id: string;
1422
1712
  question: string;
@@ -1427,8 +1717,6 @@ export declare const ControlPendingInteraction: z.ZodObject<{
1427
1717
  header?: string | null | undefined;
1428
1718
  multi_select?: boolean | undefined;
1429
1719
  }[] | undefined;
1430
- harnessId?: string | null | undefined;
1431
- attemptId?: string | null | undefined;
1432
1720
  sourceTool?: string | null | undefined;
1433
1721
  timeoutAt?: string | null | undefined;
1434
1722
  }>;
@@ -1522,13 +1810,13 @@ export declare const RunControl: z.ZodObject<{
1522
1810
  reason?: string | undefined;
1523
1811
  }, {
1524
1812
  kind: "cancel";
1813
+ reason?: string | undefined;
1525
1814
  target?: {
1526
1815
  harnessId?: string | undefined;
1527
1816
  attemptId?: string | undefined;
1528
1817
  sessionId?: string | undefined;
1529
1818
  requestId?: string | undefined;
1530
1819
  } | undefined;
1531
- reason?: string | undefined;
1532
1820
  }>;
1533
1821
  export type RunControl = z.infer<typeof RunControl>;
1534
1822
  export declare const ControlRunControlRequest: z.ZodObject<{
@@ -1562,13 +1850,13 @@ export declare const ControlRunControlRequest: z.ZodObject<{
1562
1850
  reason?: string | undefined;
1563
1851
  }, {
1564
1852
  kind: "cancel";
1853
+ reason?: string | undefined;
1565
1854
  target?: {
1566
1855
  harnessId?: string | undefined;
1567
1856
  attemptId?: string | undefined;
1568
1857
  sessionId?: string | undefined;
1569
1858
  requestId?: string | undefined;
1570
1859
  } | undefined;
1571
- reason?: string | undefined;
1572
1860
  }>;
1573
1861
  }, "strip", z.ZodTypeAny, {
1574
1862
  control: {
@@ -1584,13 +1872,13 @@ export declare const ControlRunControlRequest: z.ZodObject<{
1584
1872
  }, {
1585
1873
  control: {
1586
1874
  kind: "cancel";
1875
+ reason?: string | undefined;
1587
1876
  target?: {
1588
1877
  harnessId?: string | undefined;
1589
1878
  attemptId?: string | undefined;
1590
1879
  sessionId?: string | undefined;
1591
1880
  requestId?: string | undefined;
1592
1881
  } | undefined;
1593
- reason?: string | undefined;
1594
1882
  };
1595
1883
  }>;
1596
1884
  export type ControlRunControlRequest = z.infer<typeof ControlRunControlRequest>;
@@ -1682,24 +1970,24 @@ export declare const ControlApplyRequest: z.ZodObject<{
1682
1970
  branch: z.ZodOptional<z.ZodString>;
1683
1971
  message: z.ZodOptional<z.ZodString>;
1684
1972
  }, "strict", z.ZodTypeAny, {
1973
+ mode: "apply" | "commit" | "branch" | "pr" | "artifact_only";
1685
1974
  target: {
1686
1975
  kind: "original_project";
1687
1976
  } | {
1688
1977
  kind: "project";
1689
1978
  root: string;
1690
1979
  };
1691
- mode: "apply" | "commit" | "branch" | "pr" | "artifact_only";
1692
1980
  message?: string | undefined;
1693
1981
  branch?: string | undefined;
1694
1982
  }, {
1695
1983
  message?: string | undefined;
1984
+ mode?: "apply" | "commit" | "branch" | "pr" | "artifact_only" | undefined;
1696
1985
  target?: {
1697
1986
  kind: "original_project";
1698
1987
  } | {
1699
1988
  kind: "project";
1700
1989
  root: string;
1701
1990
  } | undefined;
1702
- mode?: "apply" | "commit" | "branch" | "pr" | "artifact_only" | undefined;
1703
1991
  branch?: string | undefined;
1704
1992
  }>;
1705
1993
  export type ControlApplyRequest = z.infer<typeof ControlApplyRequest>;
@@ -1791,7 +2079,9 @@ export declare const ControlThread: z.ZodObject<{
1791
2079
  primaryHarness: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1792
2080
  /** Sticky eligible pool for the thread (empty => engine auto-pools). */
1793
2081
  eligibleHarnesses: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1794
- state: z.ZodDefault<z.ZodEnum<["active", "closed"]>>;
2082
+ state: z.ZodDefault<z.ZodEnum<["active", "closed", "trashed", "purged"]>>;
2083
+ trashedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2084
+ purgeAfter: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1795
2085
  runIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1796
2086
  headRunId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1797
2087
  /** True when the head turn is blocked on a human decision (needs-me inbox). */
@@ -1799,32 +2089,36 @@ export declare const ControlThread: z.ZodObject<{
1799
2089
  createdAt: z.ZodString;
1800
2090
  updatedAt: z.ZodString;
1801
2091
  }, "strip", z.ZodTypeAny, {
2092
+ state: "active" | "closed" | "trashed" | "purged";
2093
+ createdAt: string;
1802
2094
  id: string;
1803
2095
  title: string | null;
1804
- state: "active" | "closed";
1805
2096
  primaryHarness: string | null;
1806
2097
  authPreference: "auto" | "subscription" | "api_key";
1807
- createdAt: string;
1808
2098
  repoRoot: string | null;
1809
2099
  workspaceMode: "in_place" | "isolated";
1810
2100
  eligibleHarnesses: string[];
2101
+ trashedAt: string | null;
2102
+ purgeAfter: string | null;
1811
2103
  runIds: string[];
1812
2104
  headRunId: string | null;
1813
2105
  needsHuman: boolean;
1814
2106
  updatedAt: string;
1815
2107
  mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
1816
2108
  }, {
1817
- id: string;
1818
2109
  createdAt: string;
2110
+ id: string;
1819
2111
  updatedAt: string;
1820
- title?: string | null | undefined;
2112
+ state?: "active" | "closed" | "trashed" | "purged" | undefined;
1821
2113
  mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
1822
- state?: "active" | "closed" | undefined;
2114
+ title?: string | null | undefined;
1823
2115
  primaryHarness?: string | null | undefined;
1824
2116
  authPreference?: "auto" | "subscription" | "api_key" | undefined;
1825
2117
  repoRoot?: string | null | undefined;
1826
2118
  workspaceMode?: "in_place" | "isolated" | undefined;
1827
2119
  eligibleHarnesses?: string[] | undefined;
2120
+ trashedAt?: string | null | undefined;
2121
+ purgeAfter?: string | null | undefined;
1828
2122
  runIds?: string[] | undefined;
1829
2123
  headRunId?: string | null | undefined;
1830
2124
  needsHuman?: boolean | undefined;
@@ -1838,16 +2132,16 @@ export declare const ControlSession: z.ZodObject<{
1838
2132
  observedModel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1839
2133
  state: z.ZodDefault<z.ZodEnum<["live", "stale", "rebound"]>>;
1840
2134
  }, "strip", z.ZodTypeAny, {
1841
- id: string;
2135
+ harnessId: string;
1842
2136
  state: "live" | "stale" | "rebound";
2137
+ id: string;
1843
2138
  threadId: string;
1844
- harnessId: string;
1845
2139
  observedModel: string | null;
1846
2140
  nativeSessionId: string | null;
1847
2141
  }, {
2142
+ harnessId: string;
1848
2143
  id: string;
1849
2144
  threadId: string;
1850
- harnessId: string;
1851
2145
  state?: "live" | "stale" | "rebound" | undefined;
1852
2146
  observedModel?: string | null | undefined;
1853
2147
  nativeSessionId?: string | null | undefined;
@@ -1858,7 +2152,7 @@ export type ControlSession = z.infer<typeof ControlSession>;
1858
2152
  * conversation from one GET /threads/:id (no N+1 run-detail fetch per turn).
1859
2153
  */
1860
2154
  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"]>;
2155
+ state: z.ZodEnum<["queued", "running", "blocked", "succeeded", "no_op", "ungated", "review_not_run", "failed", "cancelled", "interrupted_unknown", "cost_unverifiable", "exhausted_overshoot", "exhausted", "not_converged", "stuck_no_progress"]>;
1862
2156
  mode: z.ZodOptional<z.ZodEnum<["ask", "plan", "audit", "agent", "orchestrate"]>>;
1863
2157
  strategy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["race", "attempts", "until_clean", "swarm", "create"]>>>;
1864
2158
  n: z.ZodOptional<z.ZodNumber>;
@@ -1882,18 +2176,16 @@ export declare const ControlTurnRunCard: z.ZodObject<{
1882
2176
  adopted: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
1883
2177
  /** Honest application state (decoupled from clean-terminal). */
1884
2178
  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
2179
  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
2180
  postTurnSha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2181
+ revertAnchorId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1890
2182
  /** 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.
2183
+ * an external patch anchor was recorded), so a Revert affordance may be offered.
1892
2184
  * This is NOT a live-safe guarantee: the server re-checks tree divergence at
1893
2185
  * revert time and refuses (fail loud) if the working tree changed since. */
1894
2186
  revertable: z.ZodDefault<z.ZodBoolean>;
1895
2187
  }, "strip", z.ZodTypeAny, {
1896
- kind: "plan" | "none" | "patch" | "report" | "answer";
2188
+ kind: "plan" | "none" | "patch" | "answer" | "report";
1897
2189
  diffStat: {
1898
2190
  files: number;
1899
2191
  additions: number;
@@ -1904,9 +2196,10 @@ export declare const ControlTurnRunCard: z.ZodObject<{
1904
2196
  applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
1905
2197
  preTurnSha: string | null;
1906
2198
  postTurnSha: string | null;
2199
+ revertAnchorId: string | null;
1907
2200
  revertable: boolean;
1908
2201
  }, {
1909
- kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
2202
+ kind?: "plan" | "none" | "patch" | "answer" | "report" | undefined;
1910
2203
  diffStat?: {
1911
2204
  files: number;
1912
2205
  additions: number;
@@ -1917,6 +2210,7 @@ export declare const ControlTurnRunCard: z.ZodObject<{
1917
2210
  applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
1918
2211
  preTurnSha?: string | null | undefined;
1919
2212
  postTurnSha?: string | null | undefined;
2213
+ revertAnchorId?: string | null | undefined;
1920
2214
  revertable?: boolean | undefined;
1921
2215
  }>>;
1922
2216
  spendUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -1924,11 +2218,10 @@ export declare const ControlTurnRunCard: z.ZodObject<{
1924
2218
  waitingOnUser: z.ZodDefault<z.ZodBoolean>;
1925
2219
  finishedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1926
2220
  }, "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;
2221
+ state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress" | "queued" | "succeeded";
1929
2222
  outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
1930
2223
  result: {
1931
- kind: "plan" | "none" | "patch" | "report" | "answer";
2224
+ kind: "plan" | "none" | "patch" | "answer" | "report";
1932
2225
  diffStat: {
1933
2226
  files: number;
1934
2227
  additions: number;
@@ -1939,23 +2232,24 @@ export declare const ControlTurnRunCard: z.ZodObject<{
1939
2232
  applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
1940
2233
  preTurnSha: string | null;
1941
2234
  postTurnSha: string | null;
2235
+ revertAnchorId: string | null;
1942
2236
  revertable: boolean;
1943
2237
  };
1944
2238
  waitingOnUser: boolean;
2239
+ finishedAt: string | null;
1945
2240
  mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
1946
2241
  n?: number | undefined;
1947
2242
  strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
1948
2243
  spendUsd?: number | null | undefined;
1949
2244
  }, {
1950
- state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
2245
+ state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress" | "queued" | "succeeded";
1951
2246
  mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
1952
2247
  n?: number | undefined;
1953
- finishedAt?: string | null | undefined;
1954
2248
  strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
1955
2249
  spendUsd?: number | null | undefined;
1956
2250
  outputReadyState?: "pending" | "finalizing" | "ready" | "diagnostic" | undefined;
1957
2251
  result?: {
1958
- kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
2252
+ kind?: "plan" | "none" | "patch" | "answer" | "report" | undefined;
1959
2253
  diffStat?: {
1960
2254
  files: number;
1961
2255
  additions: number;
@@ -1966,9 +2260,11 @@ export declare const ControlTurnRunCard: z.ZodObject<{
1966
2260
  applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
1967
2261
  preTurnSha?: string | null | undefined;
1968
2262
  postTurnSha?: string | null | undefined;
2263
+ revertAnchorId?: string | null | undefined;
1969
2264
  revertable?: boolean | undefined;
1970
2265
  } | undefined;
1971
2266
  waitingOnUser?: boolean | undefined;
2267
+ finishedAt?: string | null | undefined;
1972
2268
  }>;
1973
2269
  export type ControlTurnRunCard = z.infer<typeof ControlTurnRunCard>;
1974
2270
  export declare const ControlThreadTurn: z.ZodObject<{
@@ -1982,7 +2278,7 @@ export declare const ControlThreadTurn: z.ZodObject<{
1982
2278
  prompt: z.ZodDefault<z.ZodString>;
1983
2279
  /** Embedded run card (outcome/state) so the chat renders without N+1 fetches. */
1984
2280
  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"]>;
2281
+ state: z.ZodEnum<["queued", "running", "blocked", "succeeded", "no_op", "ungated", "review_not_run", "failed", "cancelled", "interrupted_unknown", "cost_unverifiable", "exhausted_overshoot", "exhausted", "not_converged", "stuck_no_progress"]>;
1986
2282
  mode: z.ZodOptional<z.ZodEnum<["ask", "plan", "audit", "agent", "orchestrate"]>>;
1987
2283
  strategy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["race", "attempts", "until_clean", "swarm", "create"]>>>;
1988
2284
  n: z.ZodOptional<z.ZodNumber>;
@@ -2006,18 +2302,16 @@ export declare const ControlThreadTurn: z.ZodObject<{
2006
2302
  adopted: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
2007
2303
  /** Honest application state (decoupled from clean-terminal). */
2008
2304
  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
2305
  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
2306
  postTurnSha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2307
+ revertAnchorId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2014
2308
  /** 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.
2309
+ * an external patch anchor was recorded), so a Revert affordance may be offered.
2016
2310
  * This is NOT a live-safe guarantee: the server re-checks tree divergence at
2017
2311
  * revert time and refuses (fail loud) if the working tree changed since. */
2018
2312
  revertable: z.ZodDefault<z.ZodBoolean>;
2019
2313
  }, "strip", z.ZodTypeAny, {
2020
- kind: "plan" | "none" | "patch" | "report" | "answer";
2314
+ kind: "plan" | "none" | "patch" | "answer" | "report";
2021
2315
  diffStat: {
2022
2316
  files: number;
2023
2317
  additions: number;
@@ -2028,9 +2322,10 @@ export declare const ControlThreadTurn: z.ZodObject<{
2028
2322
  applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
2029
2323
  preTurnSha: string | null;
2030
2324
  postTurnSha: string | null;
2325
+ revertAnchorId: string | null;
2031
2326
  revertable: boolean;
2032
2327
  }, {
2033
- kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
2328
+ kind?: "plan" | "none" | "patch" | "answer" | "report" | undefined;
2034
2329
  diffStat?: {
2035
2330
  files: number;
2036
2331
  additions: number;
@@ -2041,6 +2336,7 @@ export declare const ControlThreadTurn: z.ZodObject<{
2041
2336
  applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
2042
2337
  preTurnSha?: string | null | undefined;
2043
2338
  postTurnSha?: string | null | undefined;
2339
+ revertAnchorId?: string | null | undefined;
2044
2340
  revertable?: boolean | undefined;
2045
2341
  }>>;
2046
2342
  spendUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -2048,11 +2344,10 @@ export declare const ControlThreadTurn: z.ZodObject<{
2048
2344
  waitingOnUser: z.ZodDefault<z.ZodBoolean>;
2049
2345
  finishedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2050
2346
  }, "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;
2347
+ state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress" | "queued" | "succeeded";
2053
2348
  outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
2054
2349
  result: {
2055
- kind: "plan" | "none" | "patch" | "report" | "answer";
2350
+ kind: "plan" | "none" | "patch" | "answer" | "report";
2056
2351
  diffStat: {
2057
2352
  files: number;
2058
2353
  additions: number;
@@ -2063,23 +2358,24 @@ export declare const ControlThreadTurn: z.ZodObject<{
2063
2358
  applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
2064
2359
  preTurnSha: string | null;
2065
2360
  postTurnSha: string | null;
2361
+ revertAnchorId: string | null;
2066
2362
  revertable: boolean;
2067
2363
  };
2068
2364
  waitingOnUser: boolean;
2365
+ finishedAt: string | null;
2069
2366
  mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2070
2367
  n?: number | undefined;
2071
2368
  strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
2072
2369
  spendUsd?: number | null | undefined;
2073
2370
  }, {
2074
- state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
2371
+ state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress" | "queued" | "succeeded";
2075
2372
  mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2076
2373
  n?: number | undefined;
2077
- finishedAt?: string | null | undefined;
2078
2374
  strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
2079
2375
  spendUsd?: number | null | undefined;
2080
2376
  outputReadyState?: "pending" | "finalizing" | "ready" | "diagnostic" | undefined;
2081
2377
  result?: {
2082
- kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
2378
+ kind?: "plan" | "none" | "patch" | "answer" | "report" | undefined;
2083
2379
  diffStat?: {
2084
2380
  files: number;
2085
2381
  additions: number;
@@ -2090,9 +2386,11 @@ export declare const ControlThreadTurn: z.ZodObject<{
2090
2386
  applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
2091
2387
  preTurnSha?: string | null | undefined;
2092
2388
  postTurnSha?: string | null | undefined;
2389
+ revertAnchorId?: string | null | undefined;
2093
2390
  revertable?: boolean | undefined;
2094
2391
  } | undefined;
2095
2392
  waitingOnUser?: boolean | undefined;
2393
+ finishedAt?: string | null | undefined;
2096
2394
  }>>>;
2097
2395
  /** Why this turn has NO run (enqueue/preflight refusal, e.g. the trust
2098
2396
  * gate) — surfaces render it as an inline failure card with the remedy;
@@ -2118,20 +2416,19 @@ export declare const ControlThreadTurn: z.ZodObject<{
2118
2416
  }>>>;
2119
2417
  createdAt: z.ZodString;
2120
2418
  }, "strip", z.ZodTypeAny, {
2121
- id: string;
2122
2419
  kind: "initial" | "followup" | "decision";
2420
+ createdAt: string;
2421
+ id: string;
2123
2422
  prompt: string;
2124
2423
  planRunId: string | null;
2125
2424
  runId: string | null;
2126
2425
  threadId: string;
2127
2426
  parentRunId: string | null;
2128
- createdAt: string;
2129
2427
  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;
2428
+ state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress" | "queued" | "succeeded";
2132
2429
  outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
2133
2430
  result: {
2134
- kind: "plan" | "none" | "patch" | "report" | "answer";
2431
+ kind: "plan" | "none" | "patch" | "answer" | "report";
2135
2432
  diffStat: {
2136
2433
  files: number;
2137
2434
  additions: number;
@@ -2142,9 +2439,11 @@ export declare const ControlThreadTurn: z.ZodObject<{
2142
2439
  applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
2143
2440
  preTurnSha: string | null;
2144
2441
  postTurnSha: string | null;
2442
+ revertAnchorId: string | null;
2145
2443
  revertable: boolean;
2146
2444
  };
2147
2445
  waitingOnUser: boolean;
2446
+ finishedAt: string | null;
2148
2447
  mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2149
2448
  n?: number | undefined;
2150
2449
  strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
@@ -2157,24 +2456,23 @@ export declare const ControlThreadTurn: z.ZodObject<{
2157
2456
  failedAt: string;
2158
2457
  } | null;
2159
2458
  }, {
2459
+ createdAt: string;
2160
2460
  id: string;
2161
2461
  threadId: string;
2162
- createdAt: string;
2163
2462
  kind?: "initial" | "followup" | "decision" | undefined;
2164
2463
  prompt?: string | undefined;
2165
2464
  planRunId?: string | null | undefined;
2166
2465
  runId?: string | null | undefined;
2167
2466
  parentRunId?: string | null | undefined;
2168
2467
  run?: {
2169
- state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
2468
+ state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress" | "queued" | "succeeded";
2170
2469
  mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2171
2470
  n?: number | undefined;
2172
- finishedAt?: string | null | undefined;
2173
2471
  strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
2174
2472
  spendUsd?: number | null | undefined;
2175
2473
  outputReadyState?: "pending" | "finalizing" | "ready" | "diagnostic" | undefined;
2176
2474
  result?: {
2177
- kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
2475
+ kind?: "plan" | "none" | "patch" | "answer" | "report" | undefined;
2178
2476
  diffStat?: {
2179
2477
  files: number;
2180
2478
  additions: number;
@@ -2185,9 +2483,11 @@ export declare const ControlThreadTurn: z.ZodObject<{
2185
2483
  applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
2186
2484
  preTurnSha?: string | null | undefined;
2187
2485
  postTurnSha?: string | null | undefined;
2486
+ revertAnchorId?: string | null | undefined;
2188
2487
  revertable?: boolean | undefined;
2189
2488
  } | undefined;
2190
2489
  waitingOnUser?: boolean | undefined;
2490
+ finishedAt?: string | null | undefined;
2191
2491
  } | null | undefined;
2192
2492
  enqueueError?: {
2193
2493
  message: string;
@@ -2232,16 +2532,16 @@ export declare const ControlThreadCreateRequest: z.ZodObject<{
2232
2532
  } | {
2233
2533
  kind: "none";
2234
2534
  };
2235
- title?: string | undefined;
2236
- mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2237
2535
  workspace?: "in_place" | "isolated" | undefined;
2536
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2537
+ title?: string | undefined;
2238
2538
  primaryHarness?: string | undefined;
2239
2539
  authPreference?: "auto" | "subscription" | "api_key" | undefined;
2240
2540
  eligibleHarnesses?: string[] | undefined;
2241
2541
  }, {
2242
- title?: string | undefined;
2243
- mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2244
2542
  workspace?: "in_place" | "isolated" | undefined;
2543
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2544
+ title?: string | undefined;
2245
2545
  scope?: {
2246
2546
  kind: "project";
2247
2547
  root: string;
@@ -2262,50 +2562,17 @@ export declare const ControlThreadUpdateRequest: z.ZodObject<{
2262
2562
  primaryHarness: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2263
2563
  eligibleHarnesses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2264
2564
  }, "strict", z.ZodTypeAny, {
2265
- title?: string | undefined;
2266
2565
  state?: "active" | "closed" | undefined;
2566
+ title?: string | undefined;
2267
2567
  primaryHarness?: string | null | undefined;
2268
2568
  eligibleHarnesses?: string[] | undefined;
2269
2569
  }, {
2270
- title?: string | undefined;
2271
2570
  state?: "active" | "closed" | undefined;
2571
+ title?: string | undefined;
2272
2572
  primaryHarness?: string | null | undefined;
2273
2573
  eligibleHarnesses?: string[] | undefined;
2274
2574
  }>;
2275
2575
  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
2576
  export declare const ControlThreadListResponse: z.ZodObject<{
2310
2577
  threads: z.ZodDefault<z.ZodArray<z.ZodObject<{
2311
2578
  id: z.ZodString;
@@ -2318,7 +2585,9 @@ export declare const ControlThreadListResponse: z.ZodObject<{
2318
2585
  primaryHarness: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2319
2586
  /** Sticky eligible pool for the thread (empty => engine auto-pools). */
2320
2587
  eligibleHarnesses: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2321
- state: z.ZodDefault<z.ZodEnum<["active", "closed"]>>;
2588
+ state: z.ZodDefault<z.ZodEnum<["active", "closed", "trashed", "purged"]>>;
2589
+ trashedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2590
+ purgeAfter: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2322
2591
  runIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2323
2592
  headRunId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2324
2593
  /** True when the head turn is blocked on a human decision (needs-me inbox). */
@@ -2326,47 +2595,53 @@ export declare const ControlThreadListResponse: z.ZodObject<{
2326
2595
  createdAt: z.ZodString;
2327
2596
  updatedAt: z.ZodString;
2328
2597
  }, "strip", z.ZodTypeAny, {
2598
+ state: "active" | "closed" | "trashed" | "purged";
2599
+ createdAt: string;
2329
2600
  id: string;
2330
2601
  title: string | null;
2331
- state: "active" | "closed";
2332
2602
  primaryHarness: string | null;
2333
2603
  authPreference: "auto" | "subscription" | "api_key";
2334
- createdAt: string;
2335
2604
  repoRoot: string | null;
2336
2605
  workspaceMode: "in_place" | "isolated";
2337
2606
  eligibleHarnesses: string[];
2607
+ trashedAt: string | null;
2608
+ purgeAfter: string | null;
2338
2609
  runIds: string[];
2339
2610
  headRunId: string | null;
2340
2611
  needsHuman: boolean;
2341
2612
  updatedAt: string;
2342
2613
  mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2343
2614
  }, {
2344
- id: string;
2345
2615
  createdAt: string;
2616
+ id: string;
2346
2617
  updatedAt: string;
2347
- title?: string | null | undefined;
2618
+ state?: "active" | "closed" | "trashed" | "purged" | undefined;
2348
2619
  mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2349
- state?: "active" | "closed" | undefined;
2620
+ title?: string | null | undefined;
2350
2621
  primaryHarness?: string | null | undefined;
2351
2622
  authPreference?: "auto" | "subscription" | "api_key" | undefined;
2352
2623
  repoRoot?: string | null | undefined;
2353
2624
  workspaceMode?: "in_place" | "isolated" | undefined;
2354
2625
  eligibleHarnesses?: string[] | undefined;
2626
+ trashedAt?: string | null | undefined;
2627
+ purgeAfter?: string | null | undefined;
2355
2628
  runIds?: string[] | undefined;
2356
2629
  headRunId?: string | null | undefined;
2357
2630
  needsHuman?: boolean | undefined;
2358
2631
  }>, "many">>;
2359
2632
  }, "strip", z.ZodTypeAny, {
2360
2633
  threads: {
2634
+ state: "active" | "closed" | "trashed" | "purged";
2635
+ createdAt: string;
2361
2636
  id: string;
2362
2637
  title: string | null;
2363
- state: "active" | "closed";
2364
2638
  primaryHarness: string | null;
2365
2639
  authPreference: "auto" | "subscription" | "api_key";
2366
- createdAt: string;
2367
2640
  repoRoot: string | null;
2368
2641
  workspaceMode: "in_place" | "isolated";
2369
2642
  eligibleHarnesses: string[];
2643
+ trashedAt: string | null;
2644
+ purgeAfter: string | null;
2370
2645
  runIds: string[];
2371
2646
  headRunId: string | null;
2372
2647
  needsHuman: boolean;
@@ -2375,17 +2650,19 @@ export declare const ControlThreadListResponse: z.ZodObject<{
2375
2650
  }[];
2376
2651
  }, {
2377
2652
  threads?: {
2378
- id: string;
2379
2653
  createdAt: string;
2654
+ id: string;
2380
2655
  updatedAt: string;
2381
- title?: string | null | undefined;
2656
+ state?: "active" | "closed" | "trashed" | "purged" | undefined;
2382
2657
  mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2383
- state?: "active" | "closed" | undefined;
2658
+ title?: string | null | undefined;
2384
2659
  primaryHarness?: string | null | undefined;
2385
2660
  authPreference?: "auto" | "subscription" | "api_key" | undefined;
2386
2661
  repoRoot?: string | null | undefined;
2387
2662
  workspaceMode?: "in_place" | "isolated" | undefined;
2388
2663
  eligibleHarnesses?: string[] | undefined;
2664
+ trashedAt?: string | null | undefined;
2665
+ purgeAfter?: string | null | undefined;
2389
2666
  runIds?: string[] | undefined;
2390
2667
  headRunId?: string | null | undefined;
2391
2668
  needsHuman?: boolean | undefined;
@@ -2404,7 +2681,9 @@ export declare const ControlThreadDetail: z.ZodObject<{
2404
2681
  primaryHarness: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2405
2682
  /** Sticky eligible pool for the thread (empty => engine auto-pools). */
2406
2683
  eligibleHarnesses: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2407
- state: z.ZodDefault<z.ZodEnum<["active", "closed"]>>;
2684
+ state: z.ZodDefault<z.ZodEnum<["active", "closed", "trashed", "purged"]>>;
2685
+ trashedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2686
+ purgeAfter: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2408
2687
  runIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2409
2688
  headRunId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2410
2689
  /** True when the head turn is blocked on a human decision (needs-me inbox). */
@@ -2412,32 +2691,36 @@ export declare const ControlThreadDetail: z.ZodObject<{
2412
2691
  createdAt: z.ZodString;
2413
2692
  updatedAt: z.ZodString;
2414
2693
  }, "strip", z.ZodTypeAny, {
2694
+ state: "active" | "closed" | "trashed" | "purged";
2695
+ createdAt: string;
2415
2696
  id: string;
2416
2697
  title: string | null;
2417
- state: "active" | "closed";
2418
2698
  primaryHarness: string | null;
2419
2699
  authPreference: "auto" | "subscription" | "api_key";
2420
- createdAt: string;
2421
2700
  repoRoot: string | null;
2422
2701
  workspaceMode: "in_place" | "isolated";
2423
2702
  eligibleHarnesses: string[];
2703
+ trashedAt: string | null;
2704
+ purgeAfter: string | null;
2424
2705
  runIds: string[];
2425
2706
  headRunId: string | null;
2426
2707
  needsHuman: boolean;
2427
2708
  updatedAt: string;
2428
2709
  mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2429
2710
  }, {
2430
- id: string;
2431
2711
  createdAt: string;
2712
+ id: string;
2432
2713
  updatedAt: string;
2433
- title?: string | null | undefined;
2714
+ state?: "active" | "closed" | "trashed" | "purged" | undefined;
2434
2715
  mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2435
- state?: "active" | "closed" | undefined;
2716
+ title?: string | null | undefined;
2436
2717
  primaryHarness?: string | null | undefined;
2437
2718
  authPreference?: "auto" | "subscription" | "api_key" | undefined;
2438
2719
  repoRoot?: string | null | undefined;
2439
2720
  workspaceMode?: "in_place" | "isolated" | undefined;
2440
2721
  eligibleHarnesses?: string[] | undefined;
2722
+ trashedAt?: string | null | undefined;
2723
+ purgeAfter?: string | null | undefined;
2441
2724
  runIds?: string[] | undefined;
2442
2725
  headRunId?: string | null | undefined;
2443
2726
  needsHuman?: boolean | undefined;
@@ -2450,16 +2733,16 @@ export declare const ControlThreadDetail: z.ZodObject<{
2450
2733
  observedModel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2451
2734
  state: z.ZodDefault<z.ZodEnum<["live", "stale", "rebound"]>>;
2452
2735
  }, "strip", z.ZodTypeAny, {
2453
- id: string;
2736
+ harnessId: string;
2454
2737
  state: "live" | "stale" | "rebound";
2738
+ id: string;
2455
2739
  threadId: string;
2456
- harnessId: string;
2457
2740
  observedModel: string | null;
2458
2741
  nativeSessionId: string | null;
2459
2742
  }, {
2743
+ harnessId: string;
2460
2744
  id: string;
2461
2745
  threadId: string;
2462
- harnessId: string;
2463
2746
  state?: "live" | "stale" | "rebound" | undefined;
2464
2747
  observedModel?: string | null | undefined;
2465
2748
  nativeSessionId?: string | null | undefined;
@@ -2475,7 +2758,7 @@ export declare const ControlThreadDetail: z.ZodObject<{
2475
2758
  prompt: z.ZodDefault<z.ZodString>;
2476
2759
  /** Embedded run card (outcome/state) so the chat renders without N+1 fetches. */
2477
2760
  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"]>;
2761
+ state: z.ZodEnum<["queued", "running", "blocked", "succeeded", "no_op", "ungated", "review_not_run", "failed", "cancelled", "interrupted_unknown", "cost_unverifiable", "exhausted_overshoot", "exhausted", "not_converged", "stuck_no_progress"]>;
2479
2762
  mode: z.ZodOptional<z.ZodEnum<["ask", "plan", "audit", "agent", "orchestrate"]>>;
2480
2763
  strategy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["race", "attempts", "until_clean", "swarm", "create"]>>>;
2481
2764
  n: z.ZodOptional<z.ZodNumber>;
@@ -2499,18 +2782,16 @@ export declare const ControlThreadDetail: z.ZodObject<{
2499
2782
  adopted: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
2500
2783
  /** Honest application state (decoupled from clean-terminal). */
2501
2784
  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
2785
  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
2786
  postTurnSha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2787
+ revertAnchorId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2507
2788
  /** 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.
2789
+ * an external patch anchor was recorded), so a Revert affordance may be offered.
2509
2790
  * This is NOT a live-safe guarantee: the server re-checks tree divergence at
2510
2791
  * revert time and refuses (fail loud) if the working tree changed since. */
2511
2792
  revertable: z.ZodDefault<z.ZodBoolean>;
2512
2793
  }, "strip", z.ZodTypeAny, {
2513
- kind: "plan" | "none" | "patch" | "report" | "answer";
2794
+ kind: "plan" | "none" | "patch" | "answer" | "report";
2514
2795
  diffStat: {
2515
2796
  files: number;
2516
2797
  additions: number;
@@ -2521,9 +2802,10 @@ export declare const ControlThreadDetail: z.ZodObject<{
2521
2802
  applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
2522
2803
  preTurnSha: string | null;
2523
2804
  postTurnSha: string | null;
2805
+ revertAnchorId: string | null;
2524
2806
  revertable: boolean;
2525
2807
  }, {
2526
- kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
2808
+ kind?: "plan" | "none" | "patch" | "answer" | "report" | undefined;
2527
2809
  diffStat?: {
2528
2810
  files: number;
2529
2811
  additions: number;
@@ -2534,6 +2816,7 @@ export declare const ControlThreadDetail: z.ZodObject<{
2534
2816
  applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
2535
2817
  preTurnSha?: string | null | undefined;
2536
2818
  postTurnSha?: string | null | undefined;
2819
+ revertAnchorId?: string | null | undefined;
2537
2820
  revertable?: boolean | undefined;
2538
2821
  }>>;
2539
2822
  spendUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -2541,11 +2824,10 @@ export declare const ControlThreadDetail: z.ZodObject<{
2541
2824
  waitingOnUser: z.ZodDefault<z.ZodBoolean>;
2542
2825
  finishedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2543
2826
  }, "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;
2827
+ state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress" | "queued" | "succeeded";
2546
2828
  outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
2547
2829
  result: {
2548
- kind: "plan" | "none" | "patch" | "report" | "answer";
2830
+ kind: "plan" | "none" | "patch" | "answer" | "report";
2549
2831
  diffStat: {
2550
2832
  files: number;
2551
2833
  additions: number;
@@ -2556,23 +2838,24 @@ export declare const ControlThreadDetail: z.ZodObject<{
2556
2838
  applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
2557
2839
  preTurnSha: string | null;
2558
2840
  postTurnSha: string | null;
2841
+ revertAnchorId: string | null;
2559
2842
  revertable: boolean;
2560
2843
  };
2561
2844
  waitingOnUser: boolean;
2845
+ finishedAt: string | null;
2562
2846
  mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2563
2847
  n?: number | undefined;
2564
2848
  strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
2565
2849
  spendUsd?: number | null | undefined;
2566
2850
  }, {
2567
- state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
2851
+ state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress" | "queued" | "succeeded";
2568
2852
  mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2569
2853
  n?: number | undefined;
2570
- finishedAt?: string | null | undefined;
2571
2854
  strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
2572
2855
  spendUsd?: number | null | undefined;
2573
2856
  outputReadyState?: "pending" | "finalizing" | "ready" | "diagnostic" | undefined;
2574
2857
  result?: {
2575
- kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
2858
+ kind?: "plan" | "none" | "patch" | "answer" | "report" | undefined;
2576
2859
  diffStat?: {
2577
2860
  files: number;
2578
2861
  additions: number;
@@ -2583,9 +2866,11 @@ export declare const ControlThreadDetail: z.ZodObject<{
2583
2866
  applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
2584
2867
  preTurnSha?: string | null | undefined;
2585
2868
  postTurnSha?: string | null | undefined;
2869
+ revertAnchorId?: string | null | undefined;
2586
2870
  revertable?: boolean | undefined;
2587
2871
  } | undefined;
2588
2872
  waitingOnUser?: boolean | undefined;
2873
+ finishedAt?: string | null | undefined;
2589
2874
  }>>>;
2590
2875
  /** Why this turn has NO run (enqueue/preflight refusal, e.g. the trust
2591
2876
  * gate) — surfaces render it as an inline failure card with the remedy;
@@ -2611,20 +2896,19 @@ export declare const ControlThreadDetail: z.ZodObject<{
2611
2896
  }>>>;
2612
2897
  createdAt: z.ZodString;
2613
2898
  }, "strip", z.ZodTypeAny, {
2614
- id: string;
2615
2899
  kind: "initial" | "followup" | "decision";
2900
+ createdAt: string;
2901
+ id: string;
2616
2902
  prompt: string;
2617
2903
  planRunId: string | null;
2618
2904
  runId: string | null;
2619
2905
  threadId: string;
2620
2906
  parentRunId: string | null;
2621
- createdAt: string;
2622
2907
  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;
2908
+ state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress" | "queued" | "succeeded";
2625
2909
  outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
2626
2910
  result: {
2627
- kind: "plan" | "none" | "patch" | "report" | "answer";
2911
+ kind: "plan" | "none" | "patch" | "answer" | "report";
2628
2912
  diffStat: {
2629
2913
  files: number;
2630
2914
  additions: number;
@@ -2635,9 +2919,11 @@ export declare const ControlThreadDetail: z.ZodObject<{
2635
2919
  applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
2636
2920
  preTurnSha: string | null;
2637
2921
  postTurnSha: string | null;
2922
+ revertAnchorId: string | null;
2638
2923
  revertable: boolean;
2639
2924
  };
2640
2925
  waitingOnUser: boolean;
2926
+ finishedAt: string | null;
2641
2927
  mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2642
2928
  n?: number | undefined;
2643
2929
  strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
@@ -2650,24 +2936,23 @@ export declare const ControlThreadDetail: z.ZodObject<{
2650
2936
  failedAt: string;
2651
2937
  } | null;
2652
2938
  }, {
2939
+ createdAt: string;
2653
2940
  id: string;
2654
2941
  threadId: string;
2655
- createdAt: string;
2656
2942
  kind?: "initial" | "followup" | "decision" | undefined;
2657
2943
  prompt?: string | undefined;
2658
2944
  planRunId?: string | null | undefined;
2659
2945
  runId?: string | null | undefined;
2660
2946
  parentRunId?: string | null | undefined;
2661
2947
  run?: {
2662
- state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
2948
+ state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress" | "queued" | "succeeded";
2663
2949
  mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2664
2950
  n?: number | undefined;
2665
- finishedAt?: string | null | undefined;
2666
2951
  strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
2667
2952
  spendUsd?: number | null | undefined;
2668
2953
  outputReadyState?: "pending" | "finalizing" | "ready" | "diagnostic" | undefined;
2669
2954
  result?: {
2670
- kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
2955
+ kind?: "plan" | "none" | "patch" | "answer" | "report" | undefined;
2671
2956
  diffStat?: {
2672
2957
  files: number;
2673
2958
  additions: number;
@@ -2678,9 +2963,11 @@ export declare const ControlThreadDetail: z.ZodObject<{
2678
2963
  applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
2679
2964
  preTurnSha?: string | null | undefined;
2680
2965
  postTurnSha?: string | null | undefined;
2966
+ revertAnchorId?: string | null | undefined;
2681
2967
  revertable?: boolean | undefined;
2682
2968
  } | undefined;
2683
2969
  waitingOnUser?: boolean | undefined;
2970
+ finishedAt?: string | null | undefined;
2684
2971
  } | null | undefined;
2685
2972
  enqueueError?: {
2686
2973
  message: string;
@@ -2691,15 +2978,17 @@ export declare const ControlThreadDetail: z.ZodObject<{
2691
2978
  }>, "many">>;
2692
2979
  }, "strip", z.ZodTypeAny, {
2693
2980
  thread: {
2981
+ state: "active" | "closed" | "trashed" | "purged";
2982
+ createdAt: string;
2694
2983
  id: string;
2695
2984
  title: string | null;
2696
- state: "active" | "closed";
2697
2985
  primaryHarness: string | null;
2698
2986
  authPreference: "auto" | "subscription" | "api_key";
2699
- createdAt: string;
2700
2987
  repoRoot: string | null;
2701
2988
  workspaceMode: "in_place" | "isolated";
2702
2989
  eligibleHarnesses: string[];
2990
+ trashedAt: string | null;
2991
+ purgeAfter: string | null;
2703
2992
  runIds: string[];
2704
2993
  headRunId: string | null;
2705
2994
  needsHuman: boolean;
@@ -2707,28 +2996,27 @@ export declare const ControlThreadDetail: z.ZodObject<{
2707
2996
  mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2708
2997
  };
2709
2998
  sessions: {
2710
- id: string;
2999
+ harnessId: string;
2711
3000
  state: "live" | "stale" | "rebound";
3001
+ id: string;
2712
3002
  threadId: string;
2713
- harnessId: string;
2714
3003
  observedModel: string | null;
2715
3004
  nativeSessionId: string | null;
2716
3005
  }[];
2717
3006
  turns: {
2718
- id: string;
2719
3007
  kind: "initial" | "followup" | "decision";
3008
+ createdAt: string;
3009
+ id: string;
2720
3010
  prompt: string;
2721
3011
  planRunId: string | null;
2722
3012
  runId: string | null;
2723
3013
  threadId: string;
2724
3014
  parentRunId: string | null;
2725
- createdAt: string;
2726
3015
  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;
3016
+ state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress" | "queued" | "succeeded";
2729
3017
  outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
2730
3018
  result: {
2731
- kind: "plan" | "none" | "patch" | "report" | "answer";
3019
+ kind: "plan" | "none" | "patch" | "answer" | "report";
2732
3020
  diffStat: {
2733
3021
  files: number;
2734
3022
  additions: number;
@@ -2739,9 +3027,11 @@ export declare const ControlThreadDetail: z.ZodObject<{
2739
3027
  applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
2740
3028
  preTurnSha: string | null;
2741
3029
  postTurnSha: string | null;
3030
+ revertAnchorId: string | null;
2742
3031
  revertable: boolean;
2743
3032
  };
2744
3033
  waitingOnUser: boolean;
3034
+ finishedAt: string | null;
2745
3035
  mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2746
3036
  n?: number | undefined;
2747
3037
  strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
@@ -2756,48 +3046,49 @@ export declare const ControlThreadDetail: z.ZodObject<{
2756
3046
  }[];
2757
3047
  }, {
2758
3048
  thread: {
2759
- id: string;
2760
3049
  createdAt: string;
3050
+ id: string;
2761
3051
  updatedAt: string;
2762
- title?: string | null | undefined;
3052
+ state?: "active" | "closed" | "trashed" | "purged" | undefined;
2763
3053
  mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2764
- state?: "active" | "closed" | undefined;
3054
+ title?: string | null | undefined;
2765
3055
  primaryHarness?: string | null | undefined;
2766
3056
  authPreference?: "auto" | "subscription" | "api_key" | undefined;
2767
3057
  repoRoot?: string | null | undefined;
2768
3058
  workspaceMode?: "in_place" | "isolated" | undefined;
2769
3059
  eligibleHarnesses?: string[] | undefined;
3060
+ trashedAt?: string | null | undefined;
3061
+ purgeAfter?: string | null | undefined;
2770
3062
  runIds?: string[] | undefined;
2771
3063
  headRunId?: string | null | undefined;
2772
3064
  needsHuman?: boolean | undefined;
2773
3065
  };
2774
3066
  sessions?: {
3067
+ harnessId: string;
2775
3068
  id: string;
2776
3069
  threadId: string;
2777
- harnessId: string;
2778
3070
  state?: "live" | "stale" | "rebound" | undefined;
2779
3071
  observedModel?: string | null | undefined;
2780
3072
  nativeSessionId?: string | null | undefined;
2781
3073
  }[] | undefined;
2782
3074
  turns?: {
3075
+ createdAt: string;
2783
3076
  id: string;
2784
3077
  threadId: string;
2785
- createdAt: string;
2786
3078
  kind?: "initial" | "followup" | "decision" | undefined;
2787
3079
  prompt?: string | undefined;
2788
3080
  planRunId?: string | null | undefined;
2789
3081
  runId?: string | null | undefined;
2790
3082
  parentRunId?: string | null | undefined;
2791
3083
  run?: {
2792
- state: "cancelled" | "no_op" | "ungated" | "review_not_run" | "blocked" | "not_converged" | "stuck_no_progress" | "failed" | "exhausted" | "running" | "queued" | "succeeded" | "interrupted";
3084
+ state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress" | "queued" | "succeeded";
2793
3085
  mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
2794
3086
  n?: number | undefined;
2795
- finishedAt?: string | null | undefined;
2796
3087
  strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
2797
3088
  spendUsd?: number | null | undefined;
2798
3089
  outputReadyState?: "pending" | "finalizing" | "ready" | "diagnostic" | undefined;
2799
3090
  result?: {
2800
- kind?: "plan" | "none" | "patch" | "report" | "answer" | undefined;
3091
+ kind?: "plan" | "none" | "patch" | "answer" | "report" | undefined;
2801
3092
  diffStat?: {
2802
3093
  files: number;
2803
3094
  additions: number;
@@ -2808,9 +3099,11 @@ export declare const ControlThreadDetail: z.ZodObject<{
2808
3099
  applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
2809
3100
  preTurnSha?: string | null | undefined;
2810
3101
  postTurnSha?: string | null | undefined;
3102
+ revertAnchorId?: string | null | undefined;
2811
3103
  revertable?: boolean | undefined;
2812
3104
  } | undefined;
2813
3105
  waitingOnUser?: boolean | undefined;
3106
+ finishedAt?: string | null | undefined;
2814
3107
  } | null | undefined;
2815
3108
  enqueueError?: {
2816
3109
  message: string;
@@ -2833,35 +3126,35 @@ export declare const HarnessStatusDto: z.ZodObject<{
2833
3126
  provider_family: z.ZodDefault<z.ZodEnum<["openai", "anthropic", "google", "cursor", "opencode", "xai", "local", "unknown"]>>;
2834
3127
  capability_profile: z.ZodDefault<z.ZodObject<{
2835
3128
  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"]>>>;
3129
+ supported_sources: z.ZodDefault<z.ZodArray<z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>, "many">>;
3130
+ preferred_source: z.ZodDefault<z.ZodNullable<z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>>>;
2838
3131
  credential_transports: z.ZodDefault<z.ZodArray<z.ZodObject<{
2839
- source: z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
3132
+ source: z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
2840
3133
  kind: z.ZodEnum<["config_file", "env_var", "oauth_token_env", "os_keychain", "http_header", "none"]>;
2841
3134
  relocatable_by: z.ZodDefault<z.ZodArray<z.ZodEnum<["HOME", "CONFIG_DIR", "ENV", "none"]>, "many">>;
2842
3135
  }, "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";
3136
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3137
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
2845
3138
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
2846
3139
  }, {
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";
3140
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3141
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
2849
3142
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
2850
3143
  }>, "many">>;
2851
3144
  }, "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;
3145
+ supported_sources: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[];
3146
+ preferred_source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
2854
3147
  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";
3148
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3149
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
2857
3150
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
2858
3151
  }[];
2859
3152
  }, {
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;
3153
+ supported_sources?: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[] | undefined;
3154
+ preferred_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
2862
3155
  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";
3156
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3157
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
2865
3158
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
2866
3159
  }[] | undefined;
2867
3160
  }>>;
@@ -2879,14 +3172,32 @@ export declare const HarnessStatusDto: z.ZodObject<{
2879
3172
  }, {
2880
3173
  supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
2881
3174
  }>>;
2882
- image_input: z.ZodDefault<z.ZodEnum<["file_path", "base64_stream", "base64_inline", "none"]>>;
3175
+ attachment_inputs: z.ZodDefault<z.ZodArray<z.ZodObject<{
3176
+ kind: z.ZodEnum<["image", "file"]>;
3177
+ mime_types: z.ZodArray<z.ZodString, "many">;
3178
+ max_bytes: z.ZodNumber;
3179
+ max_count: z.ZodNumber;
3180
+ transport: z.ZodEnum<["file_path", "base64_stream", "base64_inline", "text_inline"]>;
3181
+ }, "strict", z.ZodTypeAny, {
3182
+ kind: "image" | "file";
3183
+ mime_types: string[];
3184
+ max_bytes: number;
3185
+ max_count: number;
3186
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
3187
+ }, {
3188
+ kind: "image" | "file";
3189
+ mime_types: string[];
3190
+ max_bytes: number;
3191
+ max_count: number;
3192
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
3193
+ }>, "many">>;
2883
3194
  }, "strip", z.ZodTypeAny, {
2884
3195
  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;
3196
+ supported_sources: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[];
3197
+ preferred_source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
2887
3198
  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";
3199
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3200
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
2890
3201
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
2891
3202
  }[];
2892
3203
  };
@@ -2896,14 +3207,20 @@ export declare const HarnessStatusDto: z.ZodObject<{
2896
3207
  isolation: {
2897
3208
  supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
2898
3209
  };
2899
- image_input: "file_path" | "base64_stream" | "base64_inline" | "none";
3210
+ attachment_inputs: {
3211
+ kind: "image" | "file";
3212
+ mime_types: string[];
3213
+ max_bytes: number;
3214
+ max_count: number;
3215
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
3216
+ }[];
2900
3217
  }, {
2901
3218
  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;
3219
+ supported_sources?: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[] | undefined;
3220
+ preferred_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
2904
3221
  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";
3222
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3223
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
2907
3224
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
2908
3225
  }[] | undefined;
2909
3226
  } | undefined;
@@ -2913,11 +3230,18 @@ export declare const HarnessStatusDto: z.ZodObject<{
2913
3230
  isolation?: {
2914
3231
  supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
2915
3232
  } | undefined;
2916
- image_input?: "file_path" | "base64_stream" | "base64_inline" | "none" | undefined;
3233
+ attachment_inputs?: {
3234
+ kind: "image" | "file";
3235
+ mime_types: string[];
3236
+ max_bytes: number;
3237
+ max_count: number;
3238
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
3239
+ }[] | undefined;
2917
3240
  }>>;
2918
3241
  capabilities: z.ZodObject<{
2919
3242
  plan: z.ZodDefault<z.ZodBoolean>;
2920
3243
  implement: z.ZodDefault<z.ZodBoolean>;
3244
+ implementation_transport: z.ZodDefault<z.ZodEnum<["workspace", "git_patch_envelope"]>>;
2921
3245
  create_from_scratch: z.ZodDefault<z.ZodBoolean>;
2922
3246
  review: z.ZodDefault<z.ZodBoolean>;
2923
3247
  verify: z.ZodDefault<z.ZodBoolean>;
@@ -2941,6 +3265,7 @@ export declare const HarnessStatusDto: z.ZodObject<{
2941
3265
  review: boolean;
2942
3266
  verify: boolean;
2943
3267
  synthesize: boolean;
3268
+ implementation_transport: "workspace" | "git_patch_envelope";
2944
3269
  read_files: boolean;
2945
3270
  browser_tool: boolean;
2946
3271
  web_policy: "none" | "native" | "tools" | "uncontrolled";
@@ -2959,6 +3284,7 @@ export declare const HarnessStatusDto: z.ZodObject<{
2959
3284
  review?: boolean | undefined;
2960
3285
  verify?: boolean | undefined;
2961
3286
  synthesize?: boolean | undefined;
3287
+ implementation_transport?: "workspace" | "git_patch_envelope" | undefined;
2962
3288
  read_files?: boolean | undefined;
2963
3289
  browser_tool?: boolean | undefined;
2964
3290
  web_policy?: "none" | "native" | "tools" | "uncontrolled" | undefined;
@@ -2973,17 +3299,17 @@ export declare const HarnessStatusDto: z.ZodObject<{
2973
3299
  auth_modes: z.ZodDefault<z.ZodArray<z.ZodEnum<["local_session", "api_key", "none"]>, "many">>;
2974
3300
  access_profiles_supported: z.ZodDefault<z.ZodArray<z.ZodEnum<["readonly", "workspace_write", "full", "external_sandbox_full", "inherit_native"]>, "many">>;
2975
3301
  }, "strip", z.ZodTypeAny, {
2976
- id: string;
2977
3302
  kind: "local_cli" | "remote_api" | "fake";
3303
+ id: string;
2978
3304
  display_name: string;
2979
3305
  provider_family: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown";
2980
3306
  capability_profile: {
2981
3307
  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;
3308
+ supported_sources: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[];
3309
+ preferred_source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
2984
3310
  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";
3311
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3312
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
2987
3313
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
2988
3314
  }[];
2989
3315
  };
@@ -2993,7 +3319,13 @@ export declare const HarnessStatusDto: z.ZodObject<{
2993
3319
  isolation: {
2994
3320
  supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
2995
3321
  };
2996
- image_input: "file_path" | "base64_stream" | "base64_inline" | "none";
3322
+ attachment_inputs: {
3323
+ kind: "image" | "file";
3324
+ mime_types: string[];
3325
+ max_bytes: number;
3326
+ max_count: number;
3327
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
3328
+ }[];
2997
3329
  };
2998
3330
  capabilities: {
2999
3331
  plan: boolean;
@@ -3003,6 +3335,7 @@ export declare const HarnessStatusDto: z.ZodObject<{
3003
3335
  review: boolean;
3004
3336
  verify: boolean;
3005
3337
  synthesize: boolean;
3338
+ implementation_transport: "workspace" | "git_patch_envelope";
3006
3339
  read_files: boolean;
3007
3340
  browser_tool: boolean;
3008
3341
  web_policy: "none" | "native" | "tools" | "uncontrolled";
@@ -3019,8 +3352,8 @@ export declare const HarnessStatusDto: z.ZodObject<{
3019
3352
  version?: string | undefined;
3020
3353
  adapter_version?: string | undefined;
3021
3354
  }, {
3022
- id: string;
3023
3355
  kind: "local_cli" | "remote_api" | "fake";
3356
+ id: string;
3024
3357
  display_name: string;
3025
3358
  capabilities: {
3026
3359
  plan?: boolean | undefined;
@@ -3030,6 +3363,7 @@ export declare const HarnessStatusDto: z.ZodObject<{
3030
3363
  review?: boolean | undefined;
3031
3364
  verify?: boolean | undefined;
3032
3365
  synthesize?: boolean | undefined;
3366
+ implementation_transport?: "workspace" | "git_patch_envelope" | undefined;
3033
3367
  read_files?: boolean | undefined;
3034
3368
  browser_tool?: boolean | undefined;
3035
3369
  web_policy?: "none" | "native" | "tools" | "uncontrolled" | undefined;
@@ -3046,11 +3380,11 @@ export declare const HarnessStatusDto: z.ZodObject<{
3046
3380
  provider_family?: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown" | undefined;
3047
3381
  capability_profile?: {
3048
3382
  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;
3383
+ supported_sources?: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[] | undefined;
3384
+ preferred_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
3051
3385
  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";
3386
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3387
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
3054
3388
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
3055
3389
  }[] | undefined;
3056
3390
  } | undefined;
@@ -3060,7 +3394,13 @@ export declare const HarnessStatusDto: z.ZodObject<{
3060
3394
  isolation?: {
3061
3395
  supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
3062
3396
  } | undefined;
3063
- image_input?: "file_path" | "base64_stream" | "base64_inline" | "none" | undefined;
3397
+ attachment_inputs?: {
3398
+ kind: "image" | "file";
3399
+ mime_types: string[];
3400
+ max_bytes: number;
3401
+ max_count: number;
3402
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
3403
+ }[] | undefined;
3064
3404
  } | undefined;
3065
3405
  auth_modes?: ("api_key" | "none" | "local_session")[] | undefined;
3066
3406
  access_profiles_supported?: ("readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native")[] | undefined;
@@ -3084,6 +3424,22 @@ export declare const HarnessStatusDto: z.ZodObject<{
3084
3424
  duration_ms?: number | undefined;
3085
3425
  }>, "many">>;
3086
3426
  reasons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3427
+ authSources: z.ZodDefault<z.ZodArray<z.ZodObject<{
3428
+ source: z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
3429
+ availability: z.ZodEnum<["available", "unavailable", "unknown"]>;
3430
+ verification: z.ZodEnum<["passed", "failed", "not_run"]>;
3431
+ detail: z.ZodOptional<z.ZodString>;
3432
+ }, "strict", z.ZodTypeAny, {
3433
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3434
+ availability: "unknown" | "available" | "unavailable";
3435
+ verification: "passed" | "failed" | "not_run";
3436
+ detail?: string | undefined;
3437
+ }, {
3438
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3439
+ availability: "unknown" | "available" | "unavailable";
3440
+ verification: "passed" | "failed" | "not_run";
3441
+ detail?: string | undefined;
3442
+ }>, "many">>;
3087
3443
  /** The user's configured per-harness default model, if any. */
3088
3444
  configuredModel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3089
3445
  /** Strict truth-source check of `configuredModel`: null when no model
@@ -3100,7 +3456,7 @@ export declare const HarnessStatusDto: z.ZodObject<{
3100
3456
  message?: string | null | undefined;
3101
3457
  }>>>;
3102
3458
  }, "strip", z.ZodTypeAny, {
3103
- status: "ok" | "degraded" | "unavailable";
3459
+ status: "unavailable" | "ok" | "degraded";
3104
3460
  id: string;
3105
3461
  checks: {
3106
3462
  status: "pass" | "fail" | "skip";
@@ -3112,22 +3468,28 @@ export declare const HarnessStatusDto: z.ZodObject<{
3112
3468
  enabledIntents: string[];
3113
3469
  disabledIntents: string[];
3114
3470
  configuredModel: string | null;
3471
+ authSources: {
3472
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3473
+ availability: "unknown" | "available" | "unavailable";
3474
+ verification: "passed" | "failed" | "not_run";
3475
+ detail?: string | undefined;
3476
+ }[];
3115
3477
  configuredModelCheck: {
3116
3478
  message: string | null;
3117
3479
  status: "ok" | "rejected";
3118
3480
  } | null;
3119
3481
  manifest?: {
3120
- id: string;
3121
3482
  kind: "local_cli" | "remote_api" | "fake";
3483
+ id: string;
3122
3484
  display_name: string;
3123
3485
  provider_family: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown";
3124
3486
  capability_profile: {
3125
3487
  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;
3488
+ supported_sources: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[];
3489
+ preferred_source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
3128
3490
  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";
3491
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3492
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
3131
3493
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
3132
3494
  }[];
3133
3495
  };
@@ -3137,7 +3499,13 @@ export declare const HarnessStatusDto: z.ZodObject<{
3137
3499
  isolation: {
3138
3500
  supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
3139
3501
  };
3140
- image_input: "file_path" | "base64_stream" | "base64_inline" | "none";
3502
+ attachment_inputs: {
3503
+ kind: "image" | "file";
3504
+ mime_types: string[];
3505
+ max_bytes: number;
3506
+ max_count: number;
3507
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
3508
+ }[];
3141
3509
  };
3142
3510
  capabilities: {
3143
3511
  plan: boolean;
@@ -3147,6 +3515,7 @@ export declare const HarnessStatusDto: z.ZodObject<{
3147
3515
  review: boolean;
3148
3516
  verify: boolean;
3149
3517
  synthesize: boolean;
3518
+ implementation_transport: "workspace" | "git_patch_envelope";
3150
3519
  read_files: boolean;
3151
3520
  browser_tool: boolean;
3152
3521
  web_policy: "none" | "native" | "tools" | "uncontrolled";
@@ -3164,7 +3533,7 @@ export declare const HarnessStatusDto: z.ZodObject<{
3164
3533
  adapter_version?: string | undefined;
3165
3534
  } | null | undefined;
3166
3535
  }, {
3167
- status: "ok" | "degraded" | "unavailable";
3536
+ status: "unavailable" | "ok" | "degraded";
3168
3537
  id: string;
3169
3538
  checks?: {
3170
3539
  status: "pass" | "fail" | "skip";
@@ -3174,8 +3543,8 @@ export declare const HarnessStatusDto: z.ZodObject<{
3174
3543
  }[] | undefined;
3175
3544
  reasons?: string[] | undefined;
3176
3545
  manifest?: {
3177
- id: string;
3178
3546
  kind: "local_cli" | "remote_api" | "fake";
3547
+ id: string;
3179
3548
  display_name: string;
3180
3549
  capabilities: {
3181
3550
  plan?: boolean | undefined;
@@ -3185,6 +3554,7 @@ export declare const HarnessStatusDto: z.ZodObject<{
3185
3554
  review?: boolean | undefined;
3186
3555
  verify?: boolean | undefined;
3187
3556
  synthesize?: boolean | undefined;
3557
+ implementation_transport?: "workspace" | "git_patch_envelope" | undefined;
3188
3558
  read_files?: boolean | undefined;
3189
3559
  browser_tool?: boolean | undefined;
3190
3560
  web_policy?: "none" | "native" | "tools" | "uncontrolled" | undefined;
@@ -3201,11 +3571,11 @@ export declare const HarnessStatusDto: z.ZodObject<{
3201
3571
  provider_family?: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown" | undefined;
3202
3572
  capability_profile?: {
3203
3573
  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;
3574
+ supported_sources?: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[] | undefined;
3575
+ preferred_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
3206
3576
  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";
3577
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3578
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
3209
3579
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
3210
3580
  }[] | undefined;
3211
3581
  } | undefined;
@@ -3215,7 +3585,13 @@ export declare const HarnessStatusDto: z.ZodObject<{
3215
3585
  isolation?: {
3216
3586
  supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
3217
3587
  } | undefined;
3218
- image_input?: "file_path" | "base64_stream" | "base64_inline" | "none" | undefined;
3588
+ attachment_inputs?: {
3589
+ kind: "image" | "file";
3590
+ mime_types: string[];
3591
+ max_bytes: number;
3592
+ max_count: number;
3593
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
3594
+ }[] | undefined;
3219
3595
  } | undefined;
3220
3596
  auth_modes?: ("api_key" | "none" | "local_session")[] | undefined;
3221
3597
  access_profiles_supported?: ("readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native")[] | undefined;
@@ -3223,6 +3599,12 @@ export declare const HarnessStatusDto: z.ZodObject<{
3223
3599
  enabledIntents?: string[] | undefined;
3224
3600
  disabledIntents?: string[] | undefined;
3225
3601
  configuredModel?: string | null | undefined;
3602
+ authSources?: {
3603
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3604
+ availability: "unknown" | "available" | "unavailable";
3605
+ verification: "passed" | "failed" | "not_run";
3606
+ detail?: string | undefined;
3607
+ }[] | undefined;
3226
3608
  configuredModelCheck?: {
3227
3609
  status: "ok" | "rejected";
3228
3610
  message?: string | null | undefined;
@@ -3242,35 +3624,35 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3242
3624
  provider_family: z.ZodDefault<z.ZodEnum<["openai", "anthropic", "google", "cursor", "opencode", "xai", "local", "unknown"]>>;
3243
3625
  capability_profile: z.ZodDefault<z.ZodObject<{
3244
3626
  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"]>>>;
3627
+ supported_sources: z.ZodDefault<z.ZodArray<z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>, "many">>;
3628
+ preferred_source: z.ZodDefault<z.ZodNullable<z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>>>;
3247
3629
  credential_transports: z.ZodDefault<z.ZodArray<z.ZodObject<{
3248
- source: z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
3630
+ source: z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
3249
3631
  kind: z.ZodEnum<["config_file", "env_var", "oauth_token_env", "os_keychain", "http_header", "none"]>;
3250
3632
  relocatable_by: z.ZodDefault<z.ZodArray<z.ZodEnum<["HOME", "CONFIG_DIR", "ENV", "none"]>, "many">>;
3251
3633
  }, "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";
3634
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3635
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
3254
3636
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
3255
3637
  }, {
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";
3638
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3639
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
3258
3640
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
3259
3641
  }>, "many">>;
3260
3642
  }, "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;
3643
+ supported_sources: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[];
3644
+ preferred_source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
3263
3645
  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";
3646
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3647
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
3266
3648
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
3267
3649
  }[];
3268
3650
  }, {
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;
3651
+ supported_sources?: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[] | undefined;
3652
+ preferred_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
3271
3653
  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";
3654
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3655
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
3274
3656
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
3275
3657
  }[] | undefined;
3276
3658
  }>>;
@@ -3288,14 +3670,32 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3288
3670
  }, {
3289
3671
  supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
3290
3672
  }>>;
3291
- image_input: z.ZodDefault<z.ZodEnum<["file_path", "base64_stream", "base64_inline", "none"]>>;
3673
+ attachment_inputs: z.ZodDefault<z.ZodArray<z.ZodObject<{
3674
+ kind: z.ZodEnum<["image", "file"]>;
3675
+ mime_types: z.ZodArray<z.ZodString, "many">;
3676
+ max_bytes: z.ZodNumber;
3677
+ max_count: z.ZodNumber;
3678
+ transport: z.ZodEnum<["file_path", "base64_stream", "base64_inline", "text_inline"]>;
3679
+ }, "strict", z.ZodTypeAny, {
3680
+ kind: "image" | "file";
3681
+ mime_types: string[];
3682
+ max_bytes: number;
3683
+ max_count: number;
3684
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
3685
+ }, {
3686
+ kind: "image" | "file";
3687
+ mime_types: string[];
3688
+ max_bytes: number;
3689
+ max_count: number;
3690
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
3691
+ }>, "many">>;
3292
3692
  }, "strip", z.ZodTypeAny, {
3293
3693
  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;
3694
+ supported_sources: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[];
3695
+ preferred_source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
3296
3696
  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";
3697
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3698
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
3299
3699
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
3300
3700
  }[];
3301
3701
  };
@@ -3305,14 +3705,20 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3305
3705
  isolation: {
3306
3706
  supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
3307
3707
  };
3308
- image_input: "file_path" | "base64_stream" | "base64_inline" | "none";
3708
+ attachment_inputs: {
3709
+ kind: "image" | "file";
3710
+ mime_types: string[];
3711
+ max_bytes: number;
3712
+ max_count: number;
3713
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
3714
+ }[];
3309
3715
  }, {
3310
3716
  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;
3717
+ supported_sources?: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[] | undefined;
3718
+ preferred_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
3313
3719
  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";
3720
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3721
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
3316
3722
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
3317
3723
  }[] | undefined;
3318
3724
  } | undefined;
@@ -3322,11 +3728,18 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3322
3728
  isolation?: {
3323
3729
  supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
3324
3730
  } | undefined;
3325
- image_input?: "file_path" | "base64_stream" | "base64_inline" | "none" | undefined;
3731
+ attachment_inputs?: {
3732
+ kind: "image" | "file";
3733
+ mime_types: string[];
3734
+ max_bytes: number;
3735
+ max_count: number;
3736
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
3737
+ }[] | undefined;
3326
3738
  }>>;
3327
3739
  capabilities: z.ZodObject<{
3328
3740
  plan: z.ZodDefault<z.ZodBoolean>;
3329
3741
  implement: z.ZodDefault<z.ZodBoolean>;
3742
+ implementation_transport: z.ZodDefault<z.ZodEnum<["workspace", "git_patch_envelope"]>>;
3330
3743
  create_from_scratch: z.ZodDefault<z.ZodBoolean>;
3331
3744
  review: z.ZodDefault<z.ZodBoolean>;
3332
3745
  verify: z.ZodDefault<z.ZodBoolean>;
@@ -3350,6 +3763,7 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3350
3763
  review: boolean;
3351
3764
  verify: boolean;
3352
3765
  synthesize: boolean;
3766
+ implementation_transport: "workspace" | "git_patch_envelope";
3353
3767
  read_files: boolean;
3354
3768
  browser_tool: boolean;
3355
3769
  web_policy: "none" | "native" | "tools" | "uncontrolled";
@@ -3368,6 +3782,7 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3368
3782
  review?: boolean | undefined;
3369
3783
  verify?: boolean | undefined;
3370
3784
  synthesize?: boolean | undefined;
3785
+ implementation_transport?: "workspace" | "git_patch_envelope" | undefined;
3371
3786
  read_files?: boolean | undefined;
3372
3787
  browser_tool?: boolean | undefined;
3373
3788
  web_policy?: "none" | "native" | "tools" | "uncontrolled" | undefined;
@@ -3382,17 +3797,17 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3382
3797
  auth_modes: z.ZodDefault<z.ZodArray<z.ZodEnum<["local_session", "api_key", "none"]>, "many">>;
3383
3798
  access_profiles_supported: z.ZodDefault<z.ZodArray<z.ZodEnum<["readonly", "workspace_write", "full", "external_sandbox_full", "inherit_native"]>, "many">>;
3384
3799
  }, "strip", z.ZodTypeAny, {
3385
- id: string;
3386
3800
  kind: "local_cli" | "remote_api" | "fake";
3801
+ id: string;
3387
3802
  display_name: string;
3388
3803
  provider_family: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown";
3389
3804
  capability_profile: {
3390
3805
  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;
3806
+ supported_sources: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[];
3807
+ preferred_source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
3393
3808
  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";
3809
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3810
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
3396
3811
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
3397
3812
  }[];
3398
3813
  };
@@ -3402,7 +3817,13 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3402
3817
  isolation: {
3403
3818
  supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
3404
3819
  };
3405
- image_input: "file_path" | "base64_stream" | "base64_inline" | "none";
3820
+ attachment_inputs: {
3821
+ kind: "image" | "file";
3822
+ mime_types: string[];
3823
+ max_bytes: number;
3824
+ max_count: number;
3825
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
3826
+ }[];
3406
3827
  };
3407
3828
  capabilities: {
3408
3829
  plan: boolean;
@@ -3412,6 +3833,7 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3412
3833
  review: boolean;
3413
3834
  verify: boolean;
3414
3835
  synthesize: boolean;
3836
+ implementation_transport: "workspace" | "git_patch_envelope";
3415
3837
  read_files: boolean;
3416
3838
  browser_tool: boolean;
3417
3839
  web_policy: "none" | "native" | "tools" | "uncontrolled";
@@ -3428,8 +3850,8 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3428
3850
  version?: string | undefined;
3429
3851
  adapter_version?: string | undefined;
3430
3852
  }, {
3431
- id: string;
3432
3853
  kind: "local_cli" | "remote_api" | "fake";
3854
+ id: string;
3433
3855
  display_name: string;
3434
3856
  capabilities: {
3435
3857
  plan?: boolean | undefined;
@@ -3439,6 +3861,7 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3439
3861
  review?: boolean | undefined;
3440
3862
  verify?: boolean | undefined;
3441
3863
  synthesize?: boolean | undefined;
3864
+ implementation_transport?: "workspace" | "git_patch_envelope" | undefined;
3442
3865
  read_files?: boolean | undefined;
3443
3866
  browser_tool?: boolean | undefined;
3444
3867
  web_policy?: "none" | "native" | "tools" | "uncontrolled" | undefined;
@@ -3455,11 +3878,11 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3455
3878
  provider_family?: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown" | undefined;
3456
3879
  capability_profile?: {
3457
3880
  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;
3881
+ supported_sources?: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[] | undefined;
3882
+ preferred_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
3460
3883
  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";
3884
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3885
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
3463
3886
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
3464
3887
  }[] | undefined;
3465
3888
  } | undefined;
@@ -3469,7 +3892,13 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3469
3892
  isolation?: {
3470
3893
  supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
3471
3894
  } | undefined;
3472
- image_input?: "file_path" | "base64_stream" | "base64_inline" | "none" | undefined;
3895
+ attachment_inputs?: {
3896
+ kind: "image" | "file";
3897
+ mime_types: string[];
3898
+ max_bytes: number;
3899
+ max_count: number;
3900
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
3901
+ }[] | undefined;
3473
3902
  } | undefined;
3474
3903
  auth_modes?: ("api_key" | "none" | "local_session")[] | undefined;
3475
3904
  access_profiles_supported?: ("readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native")[] | undefined;
@@ -3493,6 +3922,22 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3493
3922
  duration_ms?: number | undefined;
3494
3923
  }>, "many">>;
3495
3924
  reasons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3925
+ authSources: z.ZodDefault<z.ZodArray<z.ZodObject<{
3926
+ source: z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
3927
+ availability: z.ZodEnum<["available", "unavailable", "unknown"]>;
3928
+ verification: z.ZodEnum<["passed", "failed", "not_run"]>;
3929
+ detail: z.ZodOptional<z.ZodString>;
3930
+ }, "strict", z.ZodTypeAny, {
3931
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3932
+ availability: "unknown" | "available" | "unavailable";
3933
+ verification: "passed" | "failed" | "not_run";
3934
+ detail?: string | undefined;
3935
+ }, {
3936
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3937
+ availability: "unknown" | "available" | "unavailable";
3938
+ verification: "passed" | "failed" | "not_run";
3939
+ detail?: string | undefined;
3940
+ }>, "many">>;
3496
3941
  /** The user's configured per-harness default model, if any. */
3497
3942
  configuredModel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3498
3943
  /** Strict truth-source check of `configuredModel`: null when no model
@@ -3509,7 +3954,7 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3509
3954
  message?: string | null | undefined;
3510
3955
  }>>>;
3511
3956
  }, "strip", z.ZodTypeAny, {
3512
- status: "ok" | "degraded" | "unavailable";
3957
+ status: "unavailable" | "ok" | "degraded";
3513
3958
  id: string;
3514
3959
  checks: {
3515
3960
  status: "pass" | "fail" | "skip";
@@ -3521,22 +3966,28 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3521
3966
  enabledIntents: string[];
3522
3967
  disabledIntents: string[];
3523
3968
  configuredModel: string | null;
3969
+ authSources: {
3970
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3971
+ availability: "unknown" | "available" | "unavailable";
3972
+ verification: "passed" | "failed" | "not_run";
3973
+ detail?: string | undefined;
3974
+ }[];
3524
3975
  configuredModelCheck: {
3525
3976
  message: string | null;
3526
3977
  status: "ok" | "rejected";
3527
3978
  } | null;
3528
3979
  manifest?: {
3529
- id: string;
3530
3980
  kind: "local_cli" | "remote_api" | "fake";
3981
+ id: string;
3531
3982
  display_name: string;
3532
3983
  provider_family: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown";
3533
3984
  capability_profile: {
3534
3985
  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;
3986
+ supported_sources: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[];
3987
+ preferred_source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
3537
3988
  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";
3989
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
3990
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
3540
3991
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
3541
3992
  }[];
3542
3993
  };
@@ -3546,7 +3997,13 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3546
3997
  isolation: {
3547
3998
  supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
3548
3999
  };
3549
- image_input: "file_path" | "base64_stream" | "base64_inline" | "none";
4000
+ attachment_inputs: {
4001
+ kind: "image" | "file";
4002
+ mime_types: string[];
4003
+ max_bytes: number;
4004
+ max_count: number;
4005
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
4006
+ }[];
3550
4007
  };
3551
4008
  capabilities: {
3552
4009
  plan: boolean;
@@ -3556,6 +4013,7 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3556
4013
  review: boolean;
3557
4014
  verify: boolean;
3558
4015
  synthesize: boolean;
4016
+ implementation_transport: "workspace" | "git_patch_envelope";
3559
4017
  read_files: boolean;
3560
4018
  browser_tool: boolean;
3561
4019
  web_policy: "none" | "native" | "tools" | "uncontrolled";
@@ -3573,7 +4031,7 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3573
4031
  adapter_version?: string | undefined;
3574
4032
  } | null | undefined;
3575
4033
  }, {
3576
- status: "ok" | "degraded" | "unavailable";
4034
+ status: "unavailable" | "ok" | "degraded";
3577
4035
  id: string;
3578
4036
  checks?: {
3579
4037
  status: "pass" | "fail" | "skip";
@@ -3583,8 +4041,8 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3583
4041
  }[] | undefined;
3584
4042
  reasons?: string[] | undefined;
3585
4043
  manifest?: {
3586
- id: string;
3587
4044
  kind: "local_cli" | "remote_api" | "fake";
4045
+ id: string;
3588
4046
  display_name: string;
3589
4047
  capabilities: {
3590
4048
  plan?: boolean | undefined;
@@ -3594,6 +4052,7 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3594
4052
  review?: boolean | undefined;
3595
4053
  verify?: boolean | undefined;
3596
4054
  synthesize?: boolean | undefined;
4055
+ implementation_transport?: "workspace" | "git_patch_envelope" | undefined;
3597
4056
  read_files?: boolean | undefined;
3598
4057
  browser_tool?: boolean | undefined;
3599
4058
  web_policy?: "none" | "native" | "tools" | "uncontrolled" | undefined;
@@ -3610,11 +4069,11 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3610
4069
  provider_family?: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown" | undefined;
3611
4070
  capability_profile?: {
3612
4071
  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;
4072
+ supported_sources?: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[] | undefined;
4073
+ preferred_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
3615
4074
  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";
4075
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
4076
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
3618
4077
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
3619
4078
  }[] | undefined;
3620
4079
  } | undefined;
@@ -3624,7 +4083,13 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3624
4083
  isolation?: {
3625
4084
  supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
3626
4085
  } | undefined;
3627
- image_input?: "file_path" | "base64_stream" | "base64_inline" | "none" | undefined;
4086
+ attachment_inputs?: {
4087
+ kind: "image" | "file";
4088
+ mime_types: string[];
4089
+ max_bytes: number;
4090
+ max_count: number;
4091
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
4092
+ }[] | undefined;
3628
4093
  } | undefined;
3629
4094
  auth_modes?: ("api_key" | "none" | "local_session")[] | undefined;
3630
4095
  access_profiles_supported?: ("readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native")[] | undefined;
@@ -3632,6 +4097,12 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3632
4097
  enabledIntents?: string[] | undefined;
3633
4098
  disabledIntents?: string[] | undefined;
3634
4099
  configuredModel?: string | null | undefined;
4100
+ authSources?: {
4101
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
4102
+ availability: "unknown" | "available" | "unavailable";
4103
+ verification: "passed" | "failed" | "not_run";
4104
+ detail?: string | undefined;
4105
+ }[] | undefined;
3635
4106
  configuredModelCheck?: {
3636
4107
  status: "ok" | "rejected";
3637
4108
  message?: string | null | undefined;
@@ -3639,7 +4110,7 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3639
4110
  }>, "many">>;
3640
4111
  }, "strip", z.ZodTypeAny, {
3641
4112
  harnesses: {
3642
- status: "ok" | "degraded" | "unavailable";
4113
+ status: "unavailable" | "ok" | "degraded";
3643
4114
  id: string;
3644
4115
  checks: {
3645
4116
  status: "pass" | "fail" | "skip";
@@ -3651,22 +4122,28 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3651
4122
  enabledIntents: string[];
3652
4123
  disabledIntents: string[];
3653
4124
  configuredModel: string | null;
4125
+ authSources: {
4126
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
4127
+ availability: "unknown" | "available" | "unavailable";
4128
+ verification: "passed" | "failed" | "not_run";
4129
+ detail?: string | undefined;
4130
+ }[];
3654
4131
  configuredModelCheck: {
3655
4132
  message: string | null;
3656
4133
  status: "ok" | "rejected";
3657
4134
  } | null;
3658
4135
  manifest?: {
3659
- id: string;
3660
4136
  kind: "local_cli" | "remote_api" | "fake";
4137
+ id: string;
3661
4138
  display_name: string;
3662
4139
  provider_family: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown";
3663
4140
  capability_profile: {
3664
4141
  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;
4142
+ supported_sources: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[];
4143
+ preferred_source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
3667
4144
  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";
4145
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
4146
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
3670
4147
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
3671
4148
  }[];
3672
4149
  };
@@ -3676,7 +4153,13 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3676
4153
  isolation: {
3677
4154
  supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
3678
4155
  };
3679
- image_input: "file_path" | "base64_stream" | "base64_inline" | "none";
4156
+ attachment_inputs: {
4157
+ kind: "image" | "file";
4158
+ mime_types: string[];
4159
+ max_bytes: number;
4160
+ max_count: number;
4161
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
4162
+ }[];
3680
4163
  };
3681
4164
  capabilities: {
3682
4165
  plan: boolean;
@@ -3686,6 +4169,7 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3686
4169
  review: boolean;
3687
4170
  verify: boolean;
3688
4171
  synthesize: boolean;
4172
+ implementation_transport: "workspace" | "git_patch_envelope";
3689
4173
  read_files: boolean;
3690
4174
  browser_tool: boolean;
3691
4175
  web_policy: "none" | "native" | "tools" | "uncontrolled";
@@ -3705,7 +4189,7 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3705
4189
  }[];
3706
4190
  }, {
3707
4191
  harnesses?: {
3708
- status: "ok" | "degraded" | "unavailable";
4192
+ status: "unavailable" | "ok" | "degraded";
3709
4193
  id: string;
3710
4194
  checks?: {
3711
4195
  status: "pass" | "fail" | "skip";
@@ -3715,8 +4199,8 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3715
4199
  }[] | undefined;
3716
4200
  reasons?: string[] | undefined;
3717
4201
  manifest?: {
3718
- id: string;
3719
4202
  kind: "local_cli" | "remote_api" | "fake";
4203
+ id: string;
3720
4204
  display_name: string;
3721
4205
  capabilities: {
3722
4206
  plan?: boolean | undefined;
@@ -3726,6 +4210,7 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3726
4210
  review?: boolean | undefined;
3727
4211
  verify?: boolean | undefined;
3728
4212
  synthesize?: boolean | undefined;
4213
+ implementation_transport?: "workspace" | "git_patch_envelope" | undefined;
3729
4214
  read_files?: boolean | undefined;
3730
4215
  browser_tool?: boolean | undefined;
3731
4216
  web_policy?: "none" | "native" | "tools" | "uncontrolled" | undefined;
@@ -3742,11 +4227,11 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3742
4227
  provider_family?: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown" | undefined;
3743
4228
  capability_profile?: {
3744
4229
  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;
4230
+ supported_sources?: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[] | undefined;
4231
+ preferred_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
3747
4232
  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";
4233
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
4234
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
3750
4235
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
3751
4236
  }[] | undefined;
3752
4237
  } | undefined;
@@ -3756,7 +4241,13 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3756
4241
  isolation?: {
3757
4242
  supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
3758
4243
  } | undefined;
3759
- image_input?: "file_path" | "base64_stream" | "base64_inline" | "none" | undefined;
4244
+ attachment_inputs?: {
4245
+ kind: "image" | "file";
4246
+ mime_types: string[];
4247
+ max_bytes: number;
4248
+ max_count: number;
4249
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
4250
+ }[] | undefined;
3760
4251
  } | undefined;
3761
4252
  auth_modes?: ("api_key" | "none" | "local_session")[] | undefined;
3762
4253
  access_profiles_supported?: ("readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native")[] | undefined;
@@ -3764,6 +4255,12 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
3764
4255
  enabledIntents?: string[] | undefined;
3765
4256
  disabledIntents?: string[] | undefined;
3766
4257
  configuredModel?: string | null | undefined;
4258
+ authSources?: {
4259
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
4260
+ availability: "unknown" | "available" | "unavailable";
4261
+ verification: "passed" | "failed" | "not_run";
4262
+ detail?: string | undefined;
4263
+ }[] | undefined;
3767
4264
  configuredModelCheck?: {
3768
4265
  status: "ok" | "rejected";
3769
4266
  message?: string | null | undefined;
@@ -3799,13 +4296,13 @@ export declare const ControlHarnessModelsResponse: z.ZodObject<{
3799
4296
  verifiedAgainst: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3800
4297
  }, "strip", z.ZodTypeAny, {
3801
4298
  source: "none" | "api" | "manifest";
4299
+ harnessId: string;
3802
4300
  verifiedAgainst: string | null;
3803
4301
  models: {
3804
4302
  id: string;
3805
4303
  label: string | null;
3806
4304
  context_window: number | null;
3807
4305
  }[];
3808
- harnessId: string;
3809
4306
  }, {
3810
4307
  source: "none" | "api" | "manifest";
3811
4308
  harnessId: string;
@@ -3819,7 +4316,6 @@ export declare const ControlHarnessModelsResponse: z.ZodObject<{
3819
4316
  export type ControlHarnessModelsResponse = z.infer<typeof ControlHarnessModelsResponse>;
3820
4317
  export declare const ControlSettingsSnapshot: z.ZodObject<{
3821
4318
  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
4319
  /** How long a run waits for an interactive answer before a benign decline. */
3824
4320
  interactionTimeoutMs: z.ZodDefault<z.ZodNumber>;
3825
4321
  routing: z.ZodDefault<z.ZodObject<{
@@ -3828,25 +4324,79 @@ export declare const ControlSettingsSnapshot: z.ZodObject<{
3828
4324
  eligibleHarnesses: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3829
4325
  envInheritance: z.ZodDefault<z.ZodEnum<["mirror_native", "clean"]>>;
3830
4326
  authPreference: z.ZodDefault<z.ZodEnum<["subscription", "api_key", "auto"]>>;
4327
+ goal: z.ZodDefault<z.ZodEnum<["auto", "quality", "economy"]>>;
4328
+ paidFallback: z.ZodDefault<z.ZodEnum<["never", "when_unavailable", "allowed_within_cap"]>>;
4329
+ qualityTiers: z.ZodDefault<z.ZodRecord<z.ZodEnum<["plan", "spec", "implement", "create_from_scratch", "repair", "review", "verify", "synthesize", "explain", "audit", "orchestrate"]>, z.ZodArray<z.ZodArray<z.ZodObject<{
4330
+ harness: z.ZodString;
4331
+ model: z.ZodString;
4332
+ effort: z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>;
4333
+ }, "strict", z.ZodTypeAny, {
4334
+ harness: string;
4335
+ model: string;
4336
+ effort: "low" | "medium" | "high" | "xhigh" | "max";
4337
+ }, {
4338
+ harness: string;
4339
+ model: string;
4340
+ effort: "low" | "medium" | "high" | "xhigh" | "max";
4341
+ }>, "many">, "many">>>;
3831
4342
  }, "strip", z.ZodTypeAny, {
4343
+ goal: "auto" | "quality" | "economy";
3832
4344
  primaryHarness: string | null;
3833
4345
  authPreference: "auto" | "subscription" | "api_key";
3834
4346
  eligibleHarnesses: string[];
3835
4347
  defaultPolicy: "auto" | "primary";
3836
4348
  envInheritance: "mirror_native" | "clean";
4349
+ paidFallback: "never" | "when_unavailable" | "allowed_within_cap";
4350
+ qualityTiers: Partial<Record<"plan" | "audit" | "orchestrate" | "spec" | "implement" | "create_from_scratch" | "repair" | "review" | "verify" | "synthesize" | "explain", {
4351
+ harness: string;
4352
+ model: string;
4353
+ effort: "low" | "medium" | "high" | "xhigh" | "max";
4354
+ }[][]>>;
3837
4355
  }, {
4356
+ goal?: "auto" | "quality" | "economy" | undefined;
3838
4357
  primaryHarness?: string | null | undefined;
3839
4358
  authPreference?: "auto" | "subscription" | "api_key" | undefined;
3840
4359
  eligibleHarnesses?: string[] | undefined;
3841
4360
  defaultPolicy?: "auto" | "primary" | undefined;
3842
4361
  envInheritance?: "mirror_native" | "clean" | undefined;
4362
+ paidFallback?: "never" | "when_unavailable" | "allowed_within_cap" | undefined;
4363
+ qualityTiers?: Partial<Record<"plan" | "audit" | "orchestrate" | "spec" | "implement" | "create_from_scratch" | "repair" | "review" | "verify" | "synthesize" | "explain", {
4364
+ harness: string;
4365
+ model: string;
4366
+ effort: "low" | "medium" | "high" | "xhigh" | "max";
4367
+ }[][]>> | undefined;
3843
4368
  }>>;
3844
4369
  budget: z.ZodDefault<z.ZodObject<{
3845
- maxUsdPerRun: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
4370
+ paidBudgetPerRun: z.ZodDefault<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
4371
+ kind: z.ZodLiteral<"unlimited">;
4372
+ }, "strict", z.ZodTypeAny, {
4373
+ kind: "unlimited";
4374
+ }, {
4375
+ kind: "unlimited";
4376
+ }>, z.ZodObject<{
4377
+ kind: z.ZodLiteral<"finite">;
4378
+ maxUsd: z.ZodNumber;
4379
+ }, "strict", z.ZodTypeAny, {
4380
+ kind: "finite";
4381
+ maxUsd: number;
4382
+ }, {
4383
+ kind: "finite";
4384
+ maxUsd: number;
4385
+ }>]>>;
3846
4386
  }, "strip", z.ZodTypeAny, {
3847
- maxUsdPerRun: number | null;
4387
+ paidBudgetPerRun: {
4388
+ kind: "unlimited";
4389
+ } | {
4390
+ kind: "finite";
4391
+ maxUsd: number;
4392
+ };
3848
4393
  }, {
3849
- maxUsdPerRun?: number | null | undefined;
4394
+ paidBudgetPerRun?: {
4395
+ kind: "unlimited";
4396
+ } | {
4397
+ kind: "finite";
4398
+ maxUsd: number;
4399
+ } | undefined;
3850
4400
  }>>;
3851
4401
  runtime: z.ZodDefault<z.ZodObject<{
3852
4402
  reviewerTimeoutMs: z.ZodDefault<z.ZodNumber>;
@@ -3887,7 +4437,6 @@ export declare const ControlSettingsSnapshot: z.ZodObject<{
3887
4437
  effort: z.ZodDefault<z.ZodNullable<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>>;
3888
4438
  maxTurns: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
3889
4439
  maxRounds: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
3890
- maxUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
3891
4440
  toolsAllow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3892
4441
  toolsDeny: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3893
4442
  fallbackModel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
@@ -3897,7 +4446,6 @@ export declare const ControlSettingsSnapshot: z.ZodObject<{
3897
4446
  web: "off" | "auto" | "cached" | "live";
3898
4447
  enabled: boolean;
3899
4448
  effort: "low" | "medium" | "high" | "xhigh" | "max" | null;
3900
- maxUsd: number | null;
3901
4449
  authPreference: "auto" | "subscription" | "api_key";
3902
4450
  defaultModel: string | null;
3903
4451
  maxTurns: number | null;
@@ -3909,7 +4457,6 @@ export declare const ControlSettingsSnapshot: z.ZodObject<{
3909
4457
  web?: "off" | "auto" | "cached" | "live" | undefined;
3910
4458
  enabled?: boolean | undefined;
3911
4459
  effort?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
3912
- maxUsd?: number | null | undefined;
3913
4460
  authPreference?: "auto" | "subscription" | "api_key" | undefined;
3914
4461
  defaultModel?: string | null | undefined;
3915
4462
  maxTurns?: number | null | undefined;
@@ -3923,7 +4470,6 @@ export declare const ControlSettingsSnapshot: z.ZodObject<{
3923
4470
  web: "off" | "auto" | "cached" | "live";
3924
4471
  enabled: boolean;
3925
4472
  effort: "low" | "medium" | "high" | "xhigh" | "max" | null;
3926
- maxUsd: number | null;
3927
4473
  authPreference: "auto" | "subscription" | "api_key";
3928
4474
  defaultModel: string | null;
3929
4475
  maxTurns: number | null;
@@ -3933,14 +4479,26 @@ export declare const ControlSettingsSnapshot: z.ZodObject<{
3933
4479
  fallbackModel: string | null;
3934
4480
  }>;
3935
4481
  budget: {
3936
- maxUsdPerRun: number | null;
4482
+ paidBudgetPerRun: {
4483
+ kind: "unlimited";
4484
+ } | {
4485
+ kind: "finite";
4486
+ maxUsd: number;
4487
+ };
3937
4488
  };
3938
4489
  routing: {
4490
+ goal: "auto" | "quality" | "economy";
3939
4491
  primaryHarness: string | null;
3940
4492
  authPreference: "auto" | "subscription" | "api_key";
3941
4493
  eligibleHarnesses: string[];
3942
4494
  defaultPolicy: "auto" | "primary";
3943
4495
  envInheritance: "mirror_native" | "clean";
4496
+ paidFallback: "never" | "when_unavailable" | "allowed_within_cap";
4497
+ qualityTiers: Partial<Record<"plan" | "audit" | "orchestrate" | "spec" | "implement" | "create_from_scratch" | "repair" | "review" | "verify" | "synthesize" | "explain", {
4498
+ harness: string;
4499
+ model: string;
4500
+ effort: "low" | "medium" | "high" | "xhigh" | "max";
4501
+ }[][]>>;
3944
4502
  };
3945
4503
  runtime: {
3946
4504
  reviewerTimeoutMs: number;
@@ -3952,14 +4510,12 @@ export declare const ControlSettingsSnapshot: z.ZodObject<{
3952
4510
  };
3953
4511
  };
3954
4512
  sources: string[];
3955
- defaultPortfolio: "daily-rich" | "balanced" | "cheapest" | "strongest" | "burn" | "subscription-first" | "api-overflow" | "conserve-claude" | "conserve-codex";
3956
4513
  interactionTimeoutMs: number;
3957
4514
  }, {
3958
4515
  harnesses?: Record<string, {
3959
4516
  web?: "off" | "auto" | "cached" | "live" | undefined;
3960
4517
  enabled?: boolean | undefined;
3961
4518
  effort?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
3962
- maxUsd?: number | null | undefined;
3963
4519
  authPreference?: "auto" | "subscription" | "api_key" | undefined;
3964
4520
  defaultModel?: string | null | undefined;
3965
4521
  maxTurns?: number | null | undefined;
@@ -3969,14 +4525,26 @@ export declare const ControlSettingsSnapshot: z.ZodObject<{
3969
4525
  fallbackModel?: string | null | undefined;
3970
4526
  }> | undefined;
3971
4527
  budget?: {
3972
- maxUsdPerRun?: number | null | undefined;
4528
+ paidBudgetPerRun?: {
4529
+ kind: "unlimited";
4530
+ } | {
4531
+ kind: "finite";
4532
+ maxUsd: number;
4533
+ } | undefined;
3973
4534
  } | undefined;
3974
4535
  routing?: {
4536
+ goal?: "auto" | "quality" | "economy" | undefined;
3975
4537
  primaryHarness?: string | null | undefined;
3976
4538
  authPreference?: "auto" | "subscription" | "api_key" | undefined;
3977
4539
  eligibleHarnesses?: string[] | undefined;
3978
4540
  defaultPolicy?: "auto" | "primary" | undefined;
3979
4541
  envInheritance?: "mirror_native" | "clean" | undefined;
4542
+ paidFallback?: "never" | "when_unavailable" | "allowed_within_cap" | undefined;
4543
+ qualityTiers?: Partial<Record<"plan" | "audit" | "orchestrate" | "spec" | "implement" | "create_from_scratch" | "repair" | "review" | "verify" | "synthesize" | "explain", {
4544
+ harness: string;
4545
+ model: string;
4546
+ effort: "low" | "medium" | "high" | "xhigh" | "max";
4547
+ }[][]>> | undefined;
3980
4548
  } | undefined;
3981
4549
  runtime?: {
3982
4550
  reviewerTimeoutMs?: number | undefined;
@@ -3988,7 +4556,6 @@ export declare const ControlSettingsSnapshot: z.ZodObject<{
3988
4556
  } | undefined;
3989
4557
  } | undefined;
3990
4558
  sources?: string[] | undefined;
3991
- defaultPortfolio?: "daily-rich" | "balanced" | "cheapest" | "strongest" | "burn" | "subscription-first" | "api-overflow" | "conserve-claude" | "conserve-codex" | undefined;
3992
4559
  interactionTimeoutMs?: number | undefined;
3993
4560
  }>;
3994
4561
  export type ControlSettingsSnapshot = z.infer<typeof ControlSettingsSnapshot>;
@@ -4002,7 +4569,6 @@ export declare const ControlHarnessSettingsPatch: z.ZodObject<{
4002
4569
  effort: z.ZodOptional<z.ZodNullable<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>>;
4003
4570
  maxTurns: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4004
4571
  maxRounds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4005
- maxUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4006
4572
  toolsAllow: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4007
4573
  toolsDeny: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4008
4574
  fallbackModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -4012,7 +4578,6 @@ export declare const ControlHarnessSettingsPatch: z.ZodObject<{
4012
4578
  web?: "off" | "auto" | "cached" | "live" | undefined;
4013
4579
  enabled?: boolean | undefined;
4014
4580
  effort?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
4015
- maxUsd?: number | null | undefined;
4016
4581
  authPreference?: "auto" | "subscription" | "api_key" | undefined;
4017
4582
  defaultModel?: string | null | undefined;
4018
4583
  maxTurns?: number | null | undefined;
@@ -4024,7 +4589,6 @@ export declare const ControlHarnessSettingsPatch: z.ZodObject<{
4024
4589
  web?: "off" | "auto" | "cached" | "live" | undefined;
4025
4590
  enabled?: boolean | undefined;
4026
4591
  effort?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
4027
- maxUsd?: number | null | undefined;
4028
4592
  authPreference?: "auto" | "subscription" | "api_key" | undefined;
4029
4593
  defaultModel?: string | null | undefined;
4030
4594
  maxTurns?: number | null | undefined;
@@ -4034,15 +4598,43 @@ export declare const ControlHarnessSettingsPatch: z.ZodObject<{
4034
4598
  fallbackModel?: string | null | undefined;
4035
4599
  }>;
4036
4600
  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"]>>;
4601
+ export declare const ControlSettingsUpdateRequest: z.ZodObject<{
4602
+ routingGoal: z.ZodOptional<z.ZodEnum<["auto", "quality", "economy"]>>;
4603
+ paidFallback: z.ZodOptional<z.ZodEnum<["never", "when_unavailable", "allowed_within_cap"]>>;
4604
+ qualityTiers: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodEnum<["plan", "spec", "implement", "create_from_scratch", "repair", "review", "verify", "synthesize", "explain", "audit", "orchestrate"]>, z.ZodArray<z.ZodArray<z.ZodObject<{
4605
+ harness: z.ZodString;
4606
+ model: z.ZodString;
4607
+ effort: z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>;
4608
+ }, "strict", z.ZodTypeAny, {
4609
+ harness: string;
4610
+ model: string;
4611
+ effort: "low" | "medium" | "high" | "xhigh" | "max";
4612
+ }, {
4613
+ harness: string;
4614
+ model: string;
4615
+ effort: "low" | "medium" | "high" | "xhigh" | "max";
4616
+ }>, "many">, "many">>>>;
4039
4617
  interactionTimeoutMs: z.ZodOptional<z.ZodNumber>;
4040
4618
  routingPolicy: z.ZodOptional<z.ZodEnum<["auto", "primary"]>>;
4041
4619
  primaryHarness: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4042
4620
  eligibleHarnesses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4043
4621
  envInheritance: z.ZodOptional<z.ZodEnum<["mirror_native", "clean"]>>;
4044
- maxUsdPerRun: z.ZodOptional<z.ZodNumber>;
4045
- clearMaxUsdPerRun: z.ZodOptional<z.ZodBoolean>;
4622
+ paidBudgetPerRun: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
4623
+ kind: z.ZodLiteral<"unlimited">;
4624
+ }, "strict", z.ZodTypeAny, {
4625
+ kind: "unlimited";
4626
+ }, {
4627
+ kind: "unlimited";
4628
+ }>, z.ZodObject<{
4629
+ kind: z.ZodLiteral<"finite">;
4630
+ maxUsd: z.ZodNumber;
4631
+ }, "strict", z.ZodTypeAny, {
4632
+ kind: "finite";
4633
+ maxUsd: number;
4634
+ }, {
4635
+ kind: "finite";
4636
+ maxUsd: number;
4637
+ }>]>>;
4046
4638
  authPreference: z.ZodOptional<z.ZodEnum<["subscription", "api_key", "auto"]>>;
4047
4639
  harnesses: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
4048
4640
  enabled: z.ZodOptional<z.ZodBoolean>;
@@ -4050,7 +4642,6 @@ export declare const ControlSettingsUpdateRequest: z.ZodEffects<z.ZodObject<{
4050
4642
  effort: z.ZodOptional<z.ZodNullable<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>>;
4051
4643
  maxTurns: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4052
4644
  maxRounds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4053
- maxUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4054
4645
  toolsAllow: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4055
4646
  toolsDeny: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4056
4647
  fallbackModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -4060,7 +4651,6 @@ export declare const ControlSettingsUpdateRequest: z.ZodEffects<z.ZodObject<{
4060
4651
  web?: "off" | "auto" | "cached" | "live" | undefined;
4061
4652
  enabled?: boolean | undefined;
4062
4653
  effort?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
4063
- maxUsd?: number | null | undefined;
4064
4654
  authPreference?: "auto" | "subscription" | "api_key" | undefined;
4065
4655
  defaultModel?: string | null | undefined;
4066
4656
  maxTurns?: number | null | undefined;
@@ -4072,7 +4662,6 @@ export declare const ControlSettingsUpdateRequest: z.ZodEffects<z.ZodObject<{
4072
4662
  web?: "off" | "auto" | "cached" | "live" | undefined;
4073
4663
  enabled?: boolean | undefined;
4074
4664
  effort?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
4075
- maxUsd?: number | null | undefined;
4076
4665
  authPreference?: "auto" | "subscription" | "api_key" | undefined;
4077
4666
  defaultModel?: string | null | undefined;
4078
4667
  maxTurns?: number | null | undefined;
@@ -4086,53 +4675,6 @@ export declare const ControlSettingsUpdateRequest: z.ZodEffects<z.ZodObject<{
4086
4675
  web?: "off" | "auto" | "cached" | "live" | undefined;
4087
4676
  enabled?: boolean | undefined;
4088
4677
  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
4678
  authPreference?: "auto" | "subscription" | "api_key" | undefined;
4137
4679
  defaultModel?: string | null | undefined;
4138
4680
  maxTurns?: number | null | undefined;
@@ -4142,20 +4684,29 @@ export declare const ControlSettingsUpdateRequest: z.ZodEffects<z.ZodObject<{
4142
4684
  fallbackModel?: string | null | undefined;
4143
4685
  }> | undefined;
4144
4686
  primaryHarness?: string | null | undefined;
4687
+ routingGoal?: "auto" | "quality" | "economy" | undefined;
4145
4688
  authPreference?: "auto" | "subscription" | "api_key" | undefined;
4146
4689
  eligibleHarnesses?: string[] | undefined;
4147
- defaultPortfolio?: "daily-rich" | "balanced" | "cheapest" | "strongest" | "burn" | "subscription-first" | "api-overflow" | "conserve-claude" | "conserve-codex" | undefined;
4148
4690
  interactionTimeoutMs?: number | undefined;
4149
4691
  envInheritance?: "mirror_native" | "clean" | undefined;
4150
- maxUsdPerRun?: number | undefined;
4692
+ paidFallback?: "never" | "when_unavailable" | "allowed_within_cap" | undefined;
4693
+ qualityTiers?: Partial<Record<"plan" | "audit" | "orchestrate" | "spec" | "implement" | "create_from_scratch" | "repair" | "review" | "verify" | "synthesize" | "explain", {
4694
+ harness: string;
4695
+ model: string;
4696
+ effort: "low" | "medium" | "high" | "xhigh" | "max";
4697
+ }[][]>> | undefined;
4698
+ paidBudgetPerRun?: {
4699
+ kind: "unlimited";
4700
+ } | {
4701
+ kind: "finite";
4702
+ maxUsd: number;
4703
+ } | undefined;
4151
4704
  routingPolicy?: "auto" | "primary" | undefined;
4152
- clearMaxUsdPerRun?: boolean | undefined;
4153
4705
  }, {
4154
4706
  harnesses?: Record<string, {
4155
4707
  web?: "off" | "auto" | "cached" | "live" | undefined;
4156
4708
  enabled?: boolean | undefined;
4157
4709
  effort?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
4158
- maxUsd?: number | null | undefined;
4159
4710
  authPreference?: "auto" | "subscription" | "api_key" | undefined;
4160
4711
  defaultModel?: string | null | undefined;
4161
4712
  maxTurns?: number | null | undefined;
@@ -4165,62 +4716,24 @@ export declare const ControlSettingsUpdateRequest: z.ZodEffects<z.ZodObject<{
4165
4716
  fallbackModel?: string | null | undefined;
4166
4717
  }> | undefined;
4167
4718
  primaryHarness?: string | null | undefined;
4719
+ routingGoal?: "auto" | "quality" | "economy" | undefined;
4168
4720
  authPreference?: "auto" | "subscription" | "api_key" | undefined;
4169
4721
  eligibleHarnesses?: string[] | undefined;
4170
- defaultPortfolio?: "daily-rich" | "balanced" | "cheapest" | "strongest" | "burn" | "subscription-first" | "api-overflow" | "conserve-claude" | "conserve-codex" | undefined;
4171
4722
  interactionTimeoutMs?: number | undefined;
4172
4723
  envInheritance?: "mirror_native" | "clean" | undefined;
4173
- maxUsdPerRun?: number | undefined;
4724
+ paidFallback?: "never" | "when_unavailable" | "allowed_within_cap" | undefined;
4725
+ qualityTiers?: Partial<Record<"plan" | "audit" | "orchestrate" | "spec" | "implement" | "create_from_scratch" | "repair" | "review" | "verify" | "synthesize" | "explain", {
4726
+ harness: string;
4727
+ model: string;
4728
+ effort: "low" | "medium" | "high" | "xhigh" | "max";
4729
+ }[][]>> | undefined;
4730
+ paidBudgetPerRun?: {
4731
+ kind: "unlimited";
4732
+ } | {
4733
+ kind: "finite";
4734
+ maxUsd: number;
4735
+ } | undefined;
4174
4736
  routingPolicy?: "auto" | "primary" | undefined;
4175
- clearMaxUsdPerRun?: boolean | undefined;
4176
4737
  }>;
4177
4738
  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
4739
  //# sourceMappingURL=control.d.ts.map