@claudexor/schema 3.1.2 → 3.3.7-rc.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 (291) hide show
  1. package/dist/agent-capabilities.d.ts +157 -129
  2. package/dist/agent-capabilities.d.ts.map +1 -1
  3. package/dist/agent-capabilities.js +3 -1
  4. package/dist/agent-capabilities.js.map +1 -1
  5. package/dist/apply-eligibility.d.ts +472 -273
  6. package/dist/apply-eligibility.d.ts.map +1 -1
  7. package/dist/apply-eligibility.js +25 -1
  8. package/dist/apply-eligibility.js.map +1 -1
  9. package/dist/attachment.d.ts +17 -17
  10. package/dist/attachment.d.ts.map +1 -1
  11. package/dist/attachment.js +1 -1
  12. package/dist/attachment.js.map +1 -1
  13. package/dist/auth.d.ts +475 -475
  14. package/dist/auth.d.ts.map +1 -1
  15. package/dist/auth.js +1 -1
  16. package/dist/auth.js.map +1 -1
  17. package/dist/budget.d.ts +59 -59
  18. package/dist/budget.d.ts.map +1 -1
  19. package/dist/budget.js +1 -1
  20. package/dist/budget.js.map +1 -1
  21. package/dist/config.d.ts +320 -316
  22. package/dist/config.d.ts.map +1 -1
  23. package/dist/config.js +26 -19
  24. package/dist/config.js.map +1 -1
  25. package/dist/context.d.ts +38 -38
  26. package/dist/context.d.ts.map +1 -1
  27. package/dist/context.js +1 -1
  28. package/dist/context.js.map +1 -1
  29. package/dist/control-auth-route.d.ts +46 -0
  30. package/dist/control-auth-route.d.ts.map +1 -0
  31. package/dist/control-auth-route.js +24 -0
  32. package/dist/control-auth-route.js.map +1 -0
  33. package/dist/control-gc.d.ts +15 -15
  34. package/dist/control-gc.d.ts.map +1 -1
  35. package/dist/control-gc.js +1 -1
  36. package/dist/control-gc.js.map +1 -1
  37. package/dist/control-harness-list.d.ts +896 -0
  38. package/dist/control-harness-list.d.ts.map +1 -0
  39. package/dist/control-harness-list.js +13 -0
  40. package/dist/control-harness-list.js.map +1 -0
  41. package/dist/control-operation-responses.d.ts +644 -629
  42. package/dist/control-operation-responses.d.ts.map +1 -1
  43. package/dist/control-operation-responses.js +5 -1
  44. package/dist/control-operation-responses.js.map +1 -1
  45. package/dist/control-run-detail.d.ts +2229 -1569
  46. package/dist/control-run-detail.d.ts.map +1 -1
  47. package/dist/control-run-detail.js +46 -2
  48. package/dist/control-run-detail.js.map +1 -1
  49. package/dist/control-run-failure.d.ts +57 -0
  50. package/dist/control-run-failure.d.ts.map +1 -0
  51. package/dist/control-run-failure.js +89 -0
  52. package/dist/control-run-failure.js.map +1 -0
  53. package/dist/control-run-retry.d.ts +16 -16
  54. package/dist/control-run-retry.d.ts.map +1 -1
  55. package/dist/control-run-retry.js +1 -1
  56. package/dist/control-run-retry.js.map +1 -1
  57. package/dist/control-run-scope.d.ts +19 -2
  58. package/dist/control-run-scope.d.ts.map +1 -1
  59. package/dist/control-run-scope.js +22 -1
  60. package/dist/control-run-scope.js.map +1 -1
  61. package/dist/control-secret.d.ts +7 -7
  62. package/dist/control-secret.d.ts.map +1 -1
  63. package/dist/control-secret.js +1 -1
  64. package/dist/control-secret.js.map +1 -1
  65. package/dist/control-thread-apply.d.ts +65 -65
  66. package/dist/control-thread-apply.d.ts.map +1 -1
  67. package/dist/control-thread-apply.js +1 -1
  68. package/dist/control-thread-apply.js.map +1 -1
  69. package/dist/control-trust.d.ts +23 -23
  70. package/dist/control-trust.d.ts.map +1 -1
  71. package/dist/control-trust.js +1 -1
  72. package/dist/control-trust.js.map +1 -1
  73. package/dist/control.d.ts +1551 -2385
  74. package/dist/control.d.ts.map +1 -1
  75. package/dist/control.js +29 -107
  76. package/dist/control.js.map +1 -1
  77. package/dist/credential-profile-snapshot.d.ts +3206 -0
  78. package/dist/credential-profile-snapshot.d.ts.map +1 -0
  79. package/dist/credential-profile-snapshot.js +28 -0
  80. package/dist/credential-profile-snapshot.js.map +1 -0
  81. package/dist/credential-profile.d.ts +170 -107
  82. package/dist/credential-profile.d.ts.map +1 -1
  83. package/dist/credential-profile.js +24 -7
  84. package/dist/credential-profile.js.map +1 -1
  85. package/dist/decision.d.ts +121 -121
  86. package/dist/decision.d.ts.map +1 -1
  87. package/dist/decision.js +2 -1
  88. package/dist/decision.js.map +1 -1
  89. package/dist/deep-scan.d.ts +5 -5
  90. package/dist/deep-scan.d.ts.map +1 -1
  91. package/dist/deep-scan.js +1 -1
  92. package/dist/deep-scan.js.map +1 -1
  93. package/dist/delegation.d.ts +13 -13
  94. package/dist/delegation.d.ts.map +1 -1
  95. package/dist/delegation.js +1 -1
  96. package/dist/delegation.js.map +1 -1
  97. package/dist/delivery.d.ts +32 -32
  98. package/dist/delivery.d.ts.map +1 -1
  99. package/dist/delivery.js +1 -1
  100. package/dist/delivery.js.map +1 -1
  101. package/dist/effort.d.ts +1 -1
  102. package/dist/effort.d.ts.map +1 -1
  103. package/dist/effort.js +1 -1
  104. package/dist/effort.js.map +1 -1
  105. package/dist/events.d.ts +55 -35
  106. package/dist/events.d.ts.map +1 -1
  107. package/dist/events.js +20 -1
  108. package/dist/events.js.map +1 -1
  109. package/dist/gate.d.ts +7 -7
  110. package/dist/gate.d.ts.map +1 -1
  111. package/dist/gate.js +1 -1
  112. package/dist/gate.js.map +1 -1
  113. package/dist/git-capability.d.ts +23 -0
  114. package/dist/git-capability.d.ts.map +1 -0
  115. package/dist/git-capability.js +15 -0
  116. package/dist/git-capability.js.map +1 -0
  117. package/dist/harness-confinement.d.ts +64 -0
  118. package/dist/harness-confinement.d.ts.map +1 -0
  119. package/dist/harness-confinement.js +64 -0
  120. package/dist/harness-confinement.js.map +1 -0
  121. package/dist/harness.d.ts +428 -408
  122. package/dist/harness.d.ts.map +1 -1
  123. package/dist/harness.js +15 -26
  124. package/dist/harness.js.map +1 -1
  125. package/dist/index.d.ts +8 -0
  126. package/dist/index.d.ts.map +1 -1
  127. package/dist/index.js +8 -0
  128. package/dist/index.js.map +1 -1
  129. package/dist/interaction.d.ts +10 -0
  130. package/dist/interaction.d.ts.map +1 -0
  131. package/dist/interaction.js +2 -0
  132. package/dist/interaction.js.map +1 -0
  133. package/dist/operation.d.ts +113 -113
  134. package/dist/operation.d.ts.map +1 -1
  135. package/dist/operation.js +1 -1
  136. package/dist/operation.js.map +1 -1
  137. package/dist/output-schema-dialect.d.ts +1 -1
  138. package/dist/output-schema-dialect.d.ts.map +1 -1
  139. package/dist/output-schema-dialect.js +1 -1
  140. package/dist/output-schema-dialect.js.map +1 -1
  141. package/dist/output-schema.d.ts +2 -2
  142. package/dist/output-schema.js +2 -2
  143. package/dist/plan.d.ts +29 -29
  144. package/dist/plan.d.ts.map +1 -1
  145. package/dist/plan.js +2 -2
  146. package/dist/plan.js.map +1 -1
  147. package/dist/primitives.d.ts +1 -1
  148. package/dist/primitives.d.ts.map +1 -1
  149. package/dist/primitives.js +1 -1
  150. package/dist/primitives.js.map +1 -1
  151. package/dist/problem.d.ts +6 -6
  152. package/dist/problem.d.ts.map +1 -1
  153. package/dist/problem.js +1 -1
  154. package/dist/problem.js.map +1 -1
  155. package/dist/project.d.ts +87 -25
  156. package/dist/project.d.ts.map +1 -1
  157. package/dist/project.js +21 -1
  158. package/dist/project.js.map +1 -1
  159. package/dist/quota.d.ts +51 -51
  160. package/dist/quota.d.ts.map +1 -1
  161. package/dist/quota.js +6 -1
  162. package/dist/quota.js.map +1 -1
  163. package/dist/raw.d.ts +16 -16
  164. package/dist/raw.d.ts.map +1 -1
  165. package/dist/raw.js +1 -1
  166. package/dist/raw.js.map +1 -1
  167. package/dist/readiness.d.ts +242 -242
  168. package/dist/readiness.d.ts.map +1 -1
  169. package/dist/readiness.js +1 -1
  170. package/dist/readiness.js.map +1 -1
  171. package/dist/recovery.d.ts +106 -106
  172. package/dist/recovery.d.ts.map +1 -1
  173. package/dist/recovery.js +1 -1
  174. package/dist/recovery.js.map +1 -1
  175. package/dist/request-requirements.d.ts +9 -9
  176. package/dist/request-requirements.d.ts.map +1 -1
  177. package/dist/request-requirements.js +1 -1
  178. package/dist/request-requirements.js.map +1 -1
  179. package/dist/review.d.ts +29 -29
  180. package/dist/review.d.ts.map +1 -1
  181. package/dist/review.js +1 -1
  182. package/dist/review.js.map +1 -1
  183. package/dist/route.d.ts +11 -11
  184. package/dist/route.d.ts.map +1 -1
  185. package/dist/route.js +1 -1
  186. package/dist/route.js.map +1 -1
  187. package/dist/run-applicability.d.ts +764 -0
  188. package/dist/run-applicability.d.ts.map +1 -0
  189. package/dist/run-applicability.js +56 -0
  190. package/dist/run-applicability.js.map +1 -0
  191. package/dist/run-facts.d.ts +628 -0
  192. package/dist/run-facts.d.ts.map +1 -0
  193. package/dist/run-facts.js +429 -0
  194. package/dist/run-facts.js.map +1 -0
  195. package/dist/run-strategy.d.ts +40 -0
  196. package/dist/run-strategy.d.ts.map +1 -1
  197. package/dist/run-strategy.js +68 -1
  198. package/dist/run-strategy.js.map +1 -1
  199. package/dist/setup-device-code-envelope.d.ts +67 -0
  200. package/dist/setup-device-code-envelope.d.ts.map +1 -0
  201. package/dist/setup-device-code-envelope.js +25 -0
  202. package/dist/setup-device-code-envelope.js.map +1 -0
  203. package/dist/setup-login-protocol.d.ts +6 -0
  204. package/dist/setup-login-protocol.d.ts.map +1 -0
  205. package/dist/setup-login-protocol.js +12 -0
  206. package/dist/setup-login-protocol.js.map +1 -0
  207. package/dist/setup-transport.d.ts +12 -0
  208. package/dist/setup-transport.d.ts.map +1 -0
  209. package/dist/setup-transport.js +22 -0
  210. package/dist/setup-transport.js.map +1 -0
  211. package/dist/setup.d.ts +12572 -3749
  212. package/dist/setup.d.ts.map +1 -1
  213. package/dist/setup.js +34 -38
  214. package/dist/setup.js.map +1 -1
  215. package/dist/status-projection.d.ts +7 -5
  216. package/dist/status-projection.d.ts.map +1 -1
  217. package/dist/status-projection.js +11 -6
  218. package/dist/status-projection.js.map +1 -1
  219. package/dist/surface-run-controls.d.ts.map +1 -1
  220. package/dist/surface-run-controls.js +10 -1
  221. package/dist/surface-run-controls.js.map +1 -1
  222. package/dist/task.d.ts +303 -303
  223. package/dist/task.d.ts.map +1 -1
  224. package/dist/task.js +1 -1
  225. package/dist/task.js.map +1 -1
  226. package/dist/telemetry.d.ts +1157 -633
  227. package/dist/telemetry.d.ts.map +1 -1
  228. package/dist/telemetry.js +7 -4
  229. package/dist/telemetry.js.map +1 -1
  230. package/dist/thread.d.ts +133 -84
  231. package/dist/thread.d.ts.map +1 -1
  232. package/dist/thread.js +21 -2
  233. package/dist/thread.js.map +1 -1
  234. package/dist/tool-ref.d.ts +7 -7
  235. package/dist/tool-ref.d.ts.map +1 -1
  236. package/dist/tool-ref.js +1 -1
  237. package/dist/tool-ref.js.map +1 -1
  238. package/dist/work-report.d.ts +28 -28
  239. package/dist/work-report.d.ts.map +1 -1
  240. package/dist/work-report.js +3 -3
  241. package/dist/work-report.js.map +1 -1
  242. package/dist/workproduct.d.ts +6 -9
  243. package/dist/workproduct.d.ts.map +1 -1
  244. package/dist/workproduct.js +1 -2
  245. package/dist/workproduct.js.map +1 -1
  246. package/dist/workspace.d.ts +13 -13
  247. package/dist/workspace.d.ts.map +1 -1
  248. package/dist/workspace.js +1 -1
  249. package/dist/workspace.js.map +1 -1
  250. package/generated/AgentCapabilityCatalog.schema.json +41 -0
  251. package/generated/ControlCredentialProfileCreateResponse.schema.json +10 -1
  252. package/generated/ControlCredentialProfileUpdateResponse.schema.json +10 -1
  253. package/generated/ControlCredentialProfilesQueryResponse.schema.json +1343 -0
  254. package/generated/ControlCredentialProfilesResponse.schema.json +20 -3
  255. package/generated/ControlCredentialProfilesSnapshotResponse.schema.json +1322 -0
  256. package/generated/ControlDirectoryEntry.schema.json +36 -0
  257. package/generated/ControlDirectoryListing.schema.json +77 -0
  258. package/generated/ControlHarnessListResponse.schema.json +41 -1
  259. package/generated/ControlQuotaResponse.schema.json +2 -1
  260. package/generated/ControlRunAgainDraft.schema.json +12 -2
  261. package/generated/ControlRunApplicabilityResponse.schema.json +217 -0
  262. package/generated/ControlRunDetail.schema.json +494 -69
  263. package/generated/ControlRunListResponse.schema.json +30 -4
  264. package/generated/ControlRunStartRequest.schema.json +12 -2
  265. package/generated/ControlRunSummary.schema.json +30 -4
  266. package/generated/ControlSettingsSnapshot.schema.json +12 -3
  267. package/generated/ControlSettingsUpdateRequest.schema.json +12 -3
  268. package/generated/ControlSetupJob.schema.json +9 -0
  269. package/generated/ControlSetupJobCreateRequest.schema.json +9 -0
  270. package/generated/ControlSetupJobEvent.schema.json +858 -758
  271. package/generated/ControlSetupJobListResponse.schema.json +9 -0
  272. package/generated/ControlSetupJobSnapshot.schema.json +811 -736
  273. package/generated/ControlThreadCreateRequest.schema.json +5 -0
  274. package/generated/ControlThreadDetail.schema.json +31 -1
  275. package/generated/ControlThreadTurnRequest.schema.json +5 -24
  276. package/generated/CredentialProfileStatus.schema.json +10 -1
  277. package/generated/DecisionRecord.schema.json +2 -1
  278. package/generated/GitCapability.schema.json +46 -0
  279. package/generated/GlobalConfig.schema.json +13 -4
  280. package/generated/HarnessEvent.schema.json +2 -1
  281. package/generated/HarnessManifest.schema.json +1 -1
  282. package/generated/HarnessStatusDto.schema.json +1 -1
  283. package/generated/McpRunHandleResult.schema.json +182 -1
  284. package/generated/McpRunToolResult.schema.json +182 -1
  285. package/generated/OutputReadyPayload.schema.json +44 -0
  286. package/generated/RunFacts.schema.json +569 -0
  287. package/generated/RunFailure.schema.json +19 -2
  288. package/generated/RunTelemetry.schema.json +492 -2
  289. package/generated/ThreadTurn.schema.json +29 -0
  290. package/generated/WorkProduct.schema.json +0 -4
  291. package/package.json +3 -3
@@ -1,30 +1,30 @@
1
- import { z } from "zod";
1
+ import { z } from "zod/v3";
2
2
  export declare const ControlRunStartResponse: z.ZodUnion<[z.ZodObject<{
3
3
  jobId: z.ZodOptional<z.ZodString>;
4
4
  runId: z.ZodString;
5
5
  taskId: z.ZodOptional<z.ZodString>;
6
6
  runDir: z.ZodString;
7
7
  }, "strip", z.ZodTypeAny, {
8
- runId: string;
9
- runDir: string;
10
8
  jobId?: string | undefined;
11
- taskId?: string | undefined;
12
- }, {
13
9
  runId: string;
10
+ taskId?: string | undefined;
14
11
  runDir: string;
12
+ }, {
15
13
  jobId?: string | undefined;
14
+ runId: string;
16
15
  taskId?: string | undefined;
16
+ runDir: string;
17
17
  }>, z.ZodObject<{
18
18
  jobId: z.ZodString;
19
19
  state: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled", "interrupted"]>;
20
20
  error: z.ZodOptional<z.ZodString>;
21
21
  }, "strip", z.ZodTypeAny, {
22
- state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
23
22
  jobId: string;
23
+ state: "cancelled" | "failed" | "interrupted" | "queued" | "running" | "succeeded";
24
24
  error?: string | undefined;
25
25
  }, {
26
- state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
27
26
  jobId: string;
27
+ state: "cancelled" | "failed" | "interrupted" | "queued" | "running" | "succeeded";
28
28
  error?: string | undefined;
29
29
  }>]>;
30
30
  export type ControlRunStartResponse = z.infer<typeof ControlRunStartResponse>;
@@ -33,12 +33,12 @@ export declare const ControlInteractionAnswerResponse: z.ZodObject<{
33
33
  status: z.ZodEnum<["delivered", "not_found", "already_resolved", "rejected"]>;
34
34
  message: z.ZodOptional<z.ZodString>;
35
35
  }, "strip", z.ZodTypeAny, {
36
- status: "rejected" | "delivered" | "not_found" | "already_resolved";
37
36
  accepted: boolean;
37
+ status: "already_resolved" | "delivered" | "not_found" | "rejected";
38
38
  message?: string | undefined;
39
39
  }, {
40
- status: "rejected" | "delivered" | "not_found" | "already_resolved";
41
40
  accepted: boolean;
41
+ status: "already_resolved" | "delivered" | "not_found" | "rejected";
42
42
  message?: string | undefined;
43
43
  }>;
44
44
  export type ControlInteractionAnswerResponse = z.infer<typeof ControlInteractionAnswerResponse>;
@@ -49,17 +49,17 @@ export declare const ControlRunControlResponse: z.ZodObject<{
49
49
  cascadeRunIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
50
50
  message: z.ZodOptional<z.ZodString>;
51
51
  }, "strip", z.ZodTypeAny, {
52
- status: "unsupported" | "rejected" | "queued" | "applied";
53
52
  accepted: boolean;
53
+ status: "applied" | "queued" | "rejected" | "unsupported";
54
+ runId?: string | undefined;
54
55
  cascadeRunIds: string[];
55
56
  message?: string | undefined;
56
- runId?: string | undefined;
57
57
  }, {
58
58
  accepted: boolean;
59
- message?: string | undefined;
60
- status?: "unsupported" | "rejected" | "queued" | "applied" | undefined;
59
+ status?: "applied" | "queued" | "rejected" | "unsupported" | undefined;
61
60
  runId?: string | undefined;
62
61
  cascadeRunIds?: string[] | undefined;
62
+ message?: string | undefined;
63
63
  }>;
64
64
  export type ControlRunControlResponse = z.infer<typeof ControlRunControlResponse>;
65
65
  export declare const ControlRunListResponse: z.ZodObject<{
@@ -77,27 +77,27 @@ export declare const ControlRunListResponse: z.ZodObject<{
77
77
  }, "strict", z.ZodTypeAny, {
78
78
  requested: boolean;
79
79
  effective: boolean;
80
- reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
81
- remediation: string | null;
82
80
  used: boolean;
81
+ reason: "access_profile_incompatible" | "injected_unused" | "manifest_unsupported" | "not_requested" | "partially_degraded" | "pending" | "runtime_unavailable" | "startup_failed" | "used";
82
+ remediation: string | null;
83
83
  }, {
84
84
  requested?: boolean | undefined;
85
85
  effective?: boolean | undefined;
86
- reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
87
- remediation?: string | null | undefined;
88
86
  used?: boolean | undefined;
87
+ reason?: "access_profile_incompatible" | "injected_unused" | "manifest_unsupported" | "not_requested" | "partially_degraded" | "pending" | "runtime_unavailable" | "startup_failed" | "used" | undefined;
88
+ remediation?: string | null | undefined;
89
89
  }>, {
90
90
  requested: boolean;
91
91
  effective: boolean;
92
- reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
93
- remediation: string | null;
94
92
  used: boolean;
93
+ reason: "access_profile_incompatible" | "injected_unused" | "manifest_unsupported" | "not_requested" | "partially_degraded" | "pending" | "runtime_unavailable" | "startup_failed" | "used";
94
+ remediation: string | null;
95
95
  }, {
96
96
  requested?: boolean | undefined;
97
97
  effective?: boolean | undefined;
98
- reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
99
- remediation?: string | null | undefined;
100
98
  used?: boolean | undefined;
99
+ reason?: "access_profile_incompatible" | "injected_unused" | "manifest_unsupported" | "not_requested" | "partially_degraded" | "pending" | "runtime_unavailable" | "startup_failed" | "used" | undefined;
100
+ remediation?: string | null | undefined;
101
101
  }>>>;
102
102
  taskId: z.ZodOptional<z.ZodString>;
103
103
  state: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled", "interrupted"]>;
@@ -106,7 +106,7 @@ export declare const ControlRunListResponse: z.ZodObject<{
106
106
  failure: z.ZodDefault<z.ZodNullable<z.ZodObject<{
107
107
  phase: z.ZodDefault<z.ZodString>;
108
108
  category: z.ZodDefault<z.ZodEnum<["validation", "project", "auth", "harness_unavailable", "harness_error", "config_error", "budget", "policy", "cancelled", "internal", "unknown"]>>;
109
- code: z.ZodDefault<z.ZodNullable<z.ZodEnum<["finite_zero", "hard_cap", "estimate_headroom", "unknown_paid_in_flight", "budget_overshoot", "cost_unverifiable", "delegation_child_drain_timeout"]>>>;
109
+ code: z.ZodDefault<z.ZodNullable<z.ZodEnum<["finite_zero", "hard_cap", "estimate_headroom", "unknown_paid_in_flight", "budget_overshoot", "cost_unverifiable", "delegation_child_drain_timeout", "subscription_window_exhausted", "delegated_home_unavailable", "delegated_confinement_unavailable", "delegated_evidence_incomplete"]>>>;
110
110
  harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
111
111
  attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
112
112
  safeMessage: z.ZodString;
@@ -114,30 +114,33 @@ export declare const ControlRunListResponse: z.ZodObject<{
114
114
  logRefs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
115
115
  eventRefs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
116
116
  runDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
117
+ resetsAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
117
118
  nextActions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
118
119
  }, "strip", z.ZodTypeAny, {
119
- code: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | "delegation_child_drain_timeout" | null;
120
+ phase: string;
121
+ category: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation";
122
+ code: "budget_overshoot" | "cost_unverifiable" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null;
120
123
  harnessId: string | null;
121
124
  attemptId: string | null;
122
- runDir: string | null;
123
- phase: string;
124
- category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "config_error" | "internal";
125
125
  safeMessage: string;
126
126
  rawDetailRef: string | null;
127
127
  logRefs: string[];
128
128
  eventRefs: string[];
129
+ runDir: string | null;
130
+ resetsAt: string | null;
129
131
  nextActions: string[];
130
132
  }, {
131
- safeMessage: string;
132
- code?: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | "delegation_child_drain_timeout" | null | undefined;
133
+ phase?: string | undefined;
134
+ category?: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation" | undefined;
135
+ code?: "budget_overshoot" | "cost_unverifiable" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null | undefined;
133
136
  harnessId?: string | null | undefined;
134
137
  attemptId?: string | null | undefined;
135
- runDir?: string | null | undefined;
136
- phase?: string | undefined;
137
- category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "config_error" | "internal" | undefined;
138
+ safeMessage: string;
138
139
  rawDetailRef?: string | null | undefined;
139
140
  logRefs?: string[] | undefined;
140
141
  eventRefs?: string[] | undefined;
142
+ runDir?: string | null | undefined;
143
+ resetsAt?: string | null | undefined;
141
144
  nextActions?: string[] | undefined;
142
145
  }>>>;
143
146
  project: z.ZodDefault<z.ZodObject<{
@@ -147,14 +150,14 @@ export declare const ControlRunListResponse: z.ZodObject<{
147
150
  context: z.ZodDefault<z.ZodEnum<["off", "auto"]>>;
148
151
  }, "strip", z.ZodTypeAny, {
149
152
  kind: "none" | "project";
150
- context: "off" | "auto";
151
153
  root: string | null;
152
154
  projectName: string | null;
155
+ context: "auto" | "off";
153
156
  }, {
154
157
  kind?: "none" | "project" | undefined;
155
- context?: "off" | "auto" | undefined;
156
158
  root?: string | null | undefined;
157
159
  projectName?: string | null | undefined;
160
+ context?: "auto" | "off" | undefined;
158
161
  }>>;
159
162
  mode: z.ZodOptional<z.ZodEnum<["ask", "plan", "agent"]>>;
160
163
  strategy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["race", "attempts", "until_clean", "deep_scan", "create"]>>>;
@@ -216,6 +219,7 @@ export declare const ControlRunListResponse: z.ZodObject<{
216
219
  reason: z.ZodEnum<["as_requested", "native_first", "no_native_session_fallback", "requested_route_unavailable", "undisclosed"]>;
217
220
  harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
218
221
  attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
222
+ profileId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
219
223
  modelMismatch: z.ZodDefault<z.ZodNullable<z.ZodObject<{
220
224
  requested: z.ZodString;
221
225
  observed: z.ZodString;
@@ -227,23 +231,25 @@ export declare const ControlRunListResponse: z.ZodObject<{
227
231
  observed: string;
228
232
  }>>>;
229
233
  }, "strip", z.ZodTypeAny, {
230
- source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
234
+ requested: "api_key" | "auto" | "subscription";
235
+ effective: "api_key" | "local_session" | "unknown" | null;
236
+ source: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | null;
237
+ reason: "as_requested" | "native_first" | "no_native_session_fallback" | "requested_route_unavailable" | "undisclosed";
231
238
  harnessId: string | null;
232
- requested: "auto" | "subscription" | "api_key";
233
239
  attemptId: string | null;
234
- effective: "unknown" | "api_key" | "local_session" | null;
235
- reason: "as_requested" | "native_first" | "no_native_session_fallback" | "requested_route_unavailable" | "undisclosed";
240
+ profileId: string | null;
236
241
  modelMismatch: {
237
242
  requested: string;
238
243
  observed: string;
239
244
  } | null;
240
245
  }, {
241
- requested: "auto" | "subscription" | "api_key";
246
+ requested: "api_key" | "auto" | "subscription";
247
+ effective?: "api_key" | "local_session" | "unknown" | null | undefined;
248
+ source?: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | null | undefined;
242
249
  reason: "as_requested" | "native_first" | "no_native_session_fallback" | "requested_route_unavailable" | "undisclosed";
243
- source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
244
250
  harnessId?: string | null | undefined;
245
251
  attemptId?: string | null | undefined;
246
- effective?: "unknown" | "api_key" | "local_session" | null | undefined;
252
+ profileId?: string | null | undefined;
247
253
  modelMismatch?: {
248
254
  requested: string;
249
255
  observed: string;
@@ -268,29 +274,29 @@ export declare const ControlRunListResponse: z.ZodObject<{
268
274
  rawDetailRef: z.ZodDefault<z.ZodNullable<z.ZodString>>;
269
275
  available: z.ZodDefault<z.ZodBoolean>;
270
276
  }, "strip", z.ZodTypeAny, {
271
- status: "failed" | "none" | "unverified" | "attempted" | "satisfied";
272
- available: boolean;
273
- target: string | null;
274
- mode: "off" | "auto" | "cached" | "live";
275
277
  required: boolean;
276
- tool: string | null;
278
+ mode: "auto" | "cached" | "live" | "off";
279
+ effectiveMode: "auto" | "cached" | "live" | "off";
277
280
  attempted: boolean;
278
- rawDetailRef: string | null;
279
- effectiveMode: "off" | "auto" | "cached" | "live";
280
281
  satisfied: boolean;
282
+ status: "attempted" | "failed" | "none" | "satisfied" | "unverified";
283
+ tool: string | null;
284
+ target: string | null;
281
285
  errorSummary: string | null;
286
+ rawDetailRef: string | null;
287
+ available: boolean;
282
288
  }, {
283
- status?: "failed" | "none" | "unverified" | "attempted" | "satisfied" | undefined;
284
- available?: boolean | undefined;
285
- target?: string | null | undefined;
286
- mode?: "off" | "auto" | "cached" | "live" | undefined;
287
289
  required?: boolean | undefined;
288
- tool?: string | null | undefined;
290
+ mode?: "auto" | "cached" | "live" | "off" | undefined;
291
+ effectiveMode?: "auto" | "cached" | "live" | "off" | undefined;
289
292
  attempted?: boolean | undefined;
290
- rawDetailRef?: string | null | undefined;
291
- effectiveMode?: "off" | "auto" | "cached" | "live" | undefined;
292
293
  satisfied?: boolean | undefined;
294
+ status?: "attempted" | "failed" | "none" | "satisfied" | "unverified" | undefined;
295
+ tool?: string | null | undefined;
296
+ target?: string | null | undefined;
293
297
  errorSummary?: string | null | undefined;
298
+ rawDetailRef?: string | null | undefined;
299
+ available?: boolean | undefined;
294
300
  }>>;
295
301
  requestRequirements: z.ZodDefault<z.ZodArray<z.ZodObject<{
296
302
  capability: z.ZodEnum<["browser", "path_deny", "delegation"]>;
@@ -301,20 +307,20 @@ export declare const ControlRunListResponse: z.ZodObject<{
301
307
  reason: z.ZodEnum<["not_requested", "effective", "manifest_unsupported", "web_policy_off", "access_profile_incompatible", "runtime_unavailable", "postdiff_only"]>;
302
308
  evidence_refs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
303
309
  }, "strip", z.ZodTypeAny, {
304
- requested: boolean;
305
- effective: boolean;
310
+ capability: "browser" | "delegation" | "path_deny";
306
311
  harness_id: string;
307
- reason: "effective" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "access_profile_incompatible" | "web_policy_off" | "postdiff_only";
308
- evidence_refs: string[];
309
312
  eligible: boolean;
310
- capability: "browser" | "delegation" | "path_deny";
311
- }, {
312
313
  requested: boolean;
313
314
  effective: boolean;
315
+ reason: "access_profile_incompatible" | "effective" | "manifest_unsupported" | "not_requested" | "postdiff_only" | "runtime_unavailable" | "web_policy_off";
316
+ evidence_refs: string[];
317
+ }, {
318
+ capability: "browser" | "delegation" | "path_deny";
314
319
  harness_id: string;
315
- reason: "effective" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "access_profile_incompatible" | "web_policy_off" | "postdiff_only";
316
320
  eligible: boolean;
317
- capability: "browser" | "delegation" | "path_deny";
321
+ requested: boolean;
322
+ effective: boolean;
323
+ reason: "access_profile_incompatible" | "effective" | "manifest_unsupported" | "not_requested" | "postdiff_only" | "runtime_unavailable" | "web_policy_off";
318
324
  evidence_refs?: string[] | undefined;
319
325
  }>, "many">>;
320
326
  toolPermissionPolicy: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -343,10 +349,7 @@ export declare const ControlRunListResponse: z.ZodObject<{
343
349
  revertAnchorId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
344
350
  revertable: z.ZodDefault<z.ZodBoolean>;
345
351
  }, "strip", z.ZodTypeAny, {
346
- kind: "plan" | "none" | "patch" | "answer" | "report";
347
- applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
348
- revertAnchorId: string | null;
349
- postTurnSha: string | null;
352
+ kind: "answer" | "none" | "patch" | "plan" | "report";
350
353
  diffStat: {
351
354
  files: number;
352
355
  additions: number;
@@ -354,13 +357,13 @@ export declare const ControlRunListResponse: z.ZodObject<{
354
357
  } | null;
355
358
  blockers: number;
356
359
  adopted: boolean | null;
360
+ applyState: "applied" | "applied_review_blocked" | "not_applied" | "reverted";
357
361
  preTurnSha: string | null;
362
+ postTurnSha: string | null;
363
+ revertAnchorId: string | null;
358
364
  revertable: boolean;
359
365
  }, {
360
- kind?: "plan" | "none" | "patch" | "answer" | "report" | undefined;
361
- applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
362
- revertAnchorId?: string | null | undefined;
363
- postTurnSha?: string | null | undefined;
366
+ kind?: "answer" | "none" | "patch" | "plan" | "report" | undefined;
364
367
  diffStat?: {
365
368
  files: number;
366
369
  additions: number;
@@ -368,7 +371,10 @@ export declare const ControlRunListResponse: z.ZodObject<{
368
371
  } | null | undefined;
369
372
  blockers?: number | undefined;
370
373
  adopted?: boolean | null | undefined;
374
+ applyState?: "applied" | "applied_review_blocked" | "not_applied" | "reverted" | undefined;
371
375
  preTurnSha?: string | null | undefined;
376
+ postTurnSha?: string | null | undefined;
377
+ revertAnchorId?: string | null | undefined;
372
378
  revertable?: boolean | undefined;
373
379
  }>>;
374
380
  outcomeFacts: z.ZodDefault<z.ZodNullable<z.ZodObject<{
@@ -376,7 +382,7 @@ export declare const ControlRunListResponse: z.ZodObject<{
376
382
  noChanges: z.ZodDefault<z.ZodBoolean>;
377
383
  checks: z.ZodDefault<z.ZodEnum<["passed", "failed", "not_configured"]>>;
378
384
  review: z.ZodDefault<z.ZodEnum<["approved", "blocked", "not_run"]>>;
379
- reason: z.ZodDefault<z.ZodNullable<z.ZodEnum<["harness_failed", "no_changes", "review_blocked", "checks_failed", "budget_exhausted", "budget_overshoot", "cost_unverifiable", "not_converged", "stuck_no_progress", "wall_clock_exceeded", "user_cancelled", "crash_interrupted", "input_required", "work_incomplete", "context_capacity_exhausted", "work_report_contract"]>>>;
385
+ reason: z.ZodDefault<z.ZodNullable<z.ZodEnum<["harness_failed", "no_changes", "review_blocked", "checks_failed", "budget_exhausted", "budget_overshoot", "cost_unverifiable", "not_converged", "stuck_no_progress", "wall_clock_exceeded", "user_cancelled", "crash_interrupted", "workspace_unavailable", "input_required", "work_incomplete", "context_capacity_exhausted", "work_report_contract"]>>>;
380
386
  work_state: z.ZodOptional<z.ZodObject<{
381
387
  state: z.ZodEnum<["completed", "needs_input", "incomplete", "unverified"]>;
382
388
  source: z.ZodEnum<["constrained", "validated", "absent"]>;
@@ -385,59 +391,59 @@ export declare const ControlRunListResponse: z.ZodObject<{
385
391
  locator: z.ZodDefault<z.ZodNullable<z.ZodString>>;
386
392
  description: z.ZodString;
387
393
  }, "strip", z.ZodTypeAny, {
388
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
389
- description: string;
394
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
390
395
  locator: string | null;
391
- }, {
392
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
393
396
  description: string;
397
+ }, {
398
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
394
399
  locator?: string | null | undefined;
400
+ description: string;
395
401
  }>, "many">>;
396
402
  }, "strip", z.ZodTypeAny, {
397
- source: "constrained" | "validated" | "absent";
398
- state: "completed" | "needs_input" | "incomplete" | "unverified";
403
+ state: "completed" | "incomplete" | "needs_input" | "unverified";
404
+ source: "absent" | "constrained" | "validated";
399
405
  required_inputs?: {
400
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
401
- description: string;
406
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
402
407
  locator: string | null;
408
+ description: string;
403
409
  }[] | undefined;
404
410
  }, {
405
- source: "constrained" | "validated" | "absent";
406
- state: "completed" | "needs_input" | "incomplete" | "unverified";
411
+ state: "completed" | "incomplete" | "needs_input" | "unverified";
412
+ source: "absent" | "constrained" | "validated";
407
413
  required_inputs?: {
408
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
409
- description: string;
414
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
410
415
  locator?: string | null | undefined;
416
+ description: string;
411
417
  }[] | undefined;
412
418
  }>>;
413
419
  }, "strict", z.ZodTypeAny, {
414
- review: "not_run" | "approved" | "blocked";
415
- reason: "harness_failed" | "no_changes" | "review_blocked" | "checks_failed" | "budget_exhausted" | "budget_overshoot" | "cost_unverifiable" | "not_converged" | "stuck_no_progress" | "wall_clock_exceeded" | "user_cancelled" | "crash_interrupted" | "input_required" | "work_incomplete" | "context_capacity_exhausted" | "work_report_contract" | null;
416
- checks: "passed" | "failed" | "not_configured";
417
- lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
420
+ lifecycle: "cancelled" | "failed" | "interrupted" | "succeeded";
418
421
  noChanges: boolean;
422
+ checks: "failed" | "not_configured" | "passed";
423
+ review: "approved" | "blocked" | "not_run";
424
+ reason: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "input_required" | "no_changes" | "not_converged" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
419
425
  work_state?: {
420
- source: "constrained" | "validated" | "absent";
421
- state: "completed" | "needs_input" | "incomplete" | "unverified";
426
+ state: "completed" | "incomplete" | "needs_input" | "unverified";
427
+ source: "absent" | "constrained" | "validated";
422
428
  required_inputs?: {
423
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
424
- description: string;
429
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
425
430
  locator: string | null;
431
+ description: string;
426
432
  }[] | undefined;
427
433
  } | undefined;
428
434
  }, {
429
- lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
430
- review?: "not_run" | "approved" | "blocked" | undefined;
431
- reason?: "harness_failed" | "no_changes" | "review_blocked" | "checks_failed" | "budget_exhausted" | "budget_overshoot" | "cost_unverifiable" | "not_converged" | "stuck_no_progress" | "wall_clock_exceeded" | "user_cancelled" | "crash_interrupted" | "input_required" | "work_incomplete" | "context_capacity_exhausted" | "work_report_contract" | null | undefined;
432
- checks?: "passed" | "failed" | "not_configured" | undefined;
435
+ lifecycle: "cancelled" | "failed" | "interrupted" | "succeeded";
433
436
  noChanges?: boolean | undefined;
437
+ checks?: "failed" | "not_configured" | "passed" | undefined;
438
+ review?: "approved" | "blocked" | "not_run" | undefined;
439
+ reason?: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "input_required" | "no_changes" | "not_converged" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
434
440
  work_state?: {
435
- source: "constrained" | "validated" | "absent";
436
- state: "completed" | "needs_input" | "incomplete" | "unverified";
441
+ state: "completed" | "incomplete" | "needs_input" | "unverified";
442
+ source: "absent" | "constrained" | "validated";
437
443
  required_inputs?: {
438
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
439
- description: string;
444
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
440
445
  locator?: string | null | undefined;
446
+ description: string;
441
447
  }[] | undefined;
442
448
  } | undefined;
443
449
  }>>>;
@@ -448,15 +454,15 @@ export declare const ControlRunListResponse: z.ZodObject<{
448
454
  harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
449
455
  verified: z.ZodDefault<z.ZodBoolean>;
450
456
  }, "strip", z.ZodTypeAny, {
451
- harnessId: string | null;
452
- verified: boolean;
453
457
  requestedModel: string | null;
454
458
  observedModel: string | null;
459
+ harnessId: string | null;
460
+ verified: boolean;
455
461
  }, {
456
- harnessId?: string | null | undefined;
457
- verified?: boolean | undefined;
458
462
  requestedModel?: string | null | undefined;
459
463
  observedModel?: string | null | undefined;
464
+ harnessId?: string | null | undefined;
465
+ verified?: boolean | undefined;
460
466
  }>>>;
461
467
  routingRationale: z.ZodDefault<z.ZodNullable<z.ZodObject<{
462
468
  goal: z.ZodEnum<["auto", "quality", "economy"]>;
@@ -471,39 +477,39 @@ export declare const ControlRunListResponse: z.ZodObject<{
471
477
  eligible: z.ZodBoolean;
472
478
  }, "strip", z.ZodTypeAny, {
473
479
  harness_id: string;
474
- billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
480
+ billing_knowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
475
481
  incremental_cost_usd: number | null;
476
482
  eligible: boolean;
477
483
  }, {
478
484
  harness_id: string;
479
- billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
480
- eligible: boolean;
485
+ billing_knowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
481
486
  incremental_cost_usd?: number | null | undefined;
487
+ eligible: boolean;
482
488
  }>, "many">>;
483
489
  }, "strip", z.ZodTypeAny, {
490
+ goal: "auto" | "economy" | "quality";
491
+ paid_fallback: "allowed_within_cap" | "never" | "when_unavailable";
492
+ order: string[];
493
+ dropped: string[];
494
+ reason: "all_incremental_cash_unknown" | "declared_order" | "delegate_effective_first" | "expiring_quota_slack" | "explicit_primary" | "lowest_incremental_cash" | "quality_tier" | "subscription_entitlement_first";
484
495
  entries: {
485
496
  harness_id: string;
486
- billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
497
+ billing_knowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
487
498
  incremental_cost_usd: number | null;
488
499
  eligible: boolean;
489
500
  }[];
490
- reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "delegate_effective_first" | "explicit_primary" | "declared_order";
491
- goal: "auto" | "quality" | "economy";
492
- paid_fallback: "never" | "when_unavailable" | "allowed_within_cap";
493
- order: string[];
494
- dropped: string[];
495
501
  }, {
496
- reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "delegate_effective_first" | "explicit_primary" | "declared_order";
497
- goal: "auto" | "quality" | "economy";
498
- paid_fallback: "never" | "when_unavailable" | "allowed_within_cap";
502
+ goal: "auto" | "economy" | "quality";
503
+ paid_fallback: "allowed_within_cap" | "never" | "when_unavailable";
504
+ order?: string[] | undefined;
505
+ dropped?: string[] | undefined;
506
+ reason: "all_incremental_cash_unknown" | "declared_order" | "delegate_effective_first" | "expiring_quota_slack" | "explicit_primary" | "lowest_incremental_cash" | "quality_tier" | "subscription_entitlement_first";
499
507
  entries?: {
500
508
  harness_id: string;
501
- billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
502
- eligible: boolean;
509
+ billing_knowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
503
510
  incremental_cost_usd?: number | null | undefined;
511
+ eligible: boolean;
504
512
  }[] | undefined;
505
- order?: string[] | undefined;
506
- dropped?: string[] | undefined;
507
513
  }>>>;
508
514
  tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
509
515
  program: z.ZodString;
@@ -511,10 +517,10 @@ export declare const ControlRunListResponse: z.ZodObject<{
511
517
  cwd: z.ZodOptional<z.ZodString>;
512
518
  envAllowlist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
513
519
  }, "strict", z.ZodTypeAny, {
514
- args: string[];
515
520
  program: string;
516
- envAllowlist: string[];
521
+ args: string[];
517
522
  cwd?: string | undefined;
523
+ envAllowlist: string[];
518
524
  }, {
519
525
  program: string;
520
526
  args?: string[] | undefined;
@@ -525,66 +531,116 @@ export declare const ControlRunListResponse: z.ZodObject<{
525
531
  startedAt: z.ZodOptional<z.ZodString>;
526
532
  finishedAt: z.ZodOptional<z.ZodString>;
527
533
  }, "strip", z.ZodTypeAny, {
528
- state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
534
+ jobId: string;
535
+ runId: string;
529
536
  parentRunId: string | null;
530
537
  delegatedFromRunId: string | null;
531
538
  delegation: {
532
539
  requested: boolean;
533
540
  effective: boolean;
534
- reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
535
- remediation: string | null;
536
541
  used: boolean;
542
+ reason: "access_profile_incompatible" | "injected_unused" | "manifest_unsupported" | "not_requested" | "partially_degraded" | "pending" | "runtime_unavailable" | "startup_failed" | "used";
543
+ remediation: string | null;
537
544
  } | null;
538
- project: {
539
- kind: "none" | "project";
540
- context: "off" | "auto";
541
- root: string | null;
542
- projectName: string | null;
543
- };
544
- jobId: string;
545
- runId: string;
545
+ taskId?: string | undefined;
546
+ state: "cancelled" | "failed" | "interrupted" | "queued" | "running" | "succeeded";
547
+ runDir?: string | undefined;
548
+ error?: string | undefined;
546
549
  failure: {
547
- code: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | "delegation_child_drain_timeout" | null;
550
+ phase: string;
551
+ category: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation";
552
+ code: "budget_overshoot" | "cost_unverifiable" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null;
548
553
  harnessId: string | null;
549
554
  attemptId: string | null;
550
- runDir: string | null;
551
- phase: string;
552
- category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "config_error" | "internal";
553
555
  safeMessage: string;
554
556
  rawDetailRef: string | null;
555
557
  logRefs: string[];
556
558
  eventRefs: string[];
559
+ runDir: string | null;
560
+ resetsAt: string | null;
557
561
  nextActions: string[];
558
562
  } | null;
563
+ project: {
564
+ kind: "none" | "project";
565
+ root: string | null;
566
+ projectName: string | null;
567
+ context: "auto" | "off";
568
+ };
569
+ mode?: "agent" | "ask" | "plan" | undefined;
570
+ strategy?: "attempts" | "create" | "deep_scan" | "race" | "until_clean" | null | undefined;
571
+ prompt?: string | undefined;
572
+ harnesses?: string[] | undefined;
573
+ primaryHarness?: string | undefined;
574
+ routingGoal?: "auto" | "economy" | "quality" | undefined;
575
+ model?: string | undefined;
576
+ reviewerPanel?: {
577
+ harness: string;
578
+ model?: string | undefined;
579
+ effort?: string | undefined;
580
+ }[] | undefined;
581
+ protectedPathApprovals?: {
582
+ path: string;
583
+ reason?: string | undefined;
584
+ }[] | undefined;
585
+ n?: number | undefined;
586
+ paidBudget?: {
587
+ kind: "unlimited";
588
+ } | {
589
+ kind: "finite";
590
+ maxUsd: number;
591
+ } | undefined;
592
+ spendUsd?: number | null | undefined;
593
+ spendEstimated?: boolean | undefined;
594
+ inputTokens?: number | null | undefined;
595
+ outputTokens?: number | null | undefined;
596
+ cachedInputTokens?: number | null | undefined;
597
+ outputConformance?: "failed" | "passed" | null | undefined;
598
+ authRoute?: {
599
+ requested: "api_key" | "auto" | "subscription";
600
+ effective: "api_key" | "local_session" | "unknown" | null;
601
+ source: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | null;
602
+ reason: "as_requested" | "native_first" | "no_native_session_fallback" | "requested_route_unavailable" | "undisclosed";
603
+ harnessId: string | null;
604
+ attemptId: string | null;
605
+ profileId: string | null;
606
+ modelMismatch: {
607
+ requested: string;
608
+ observed: string;
609
+ } | null;
610
+ } | null | undefined;
611
+ access?: "external_sandbox_full" | "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
612
+ requestedAccess?: "external_sandbox_full" | "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
613
+ effectiveAccess?: "external_sandbox_full" | "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
614
+ externalContextPolicy?: "auto" | "cached" | "live" | "off" | undefined;
615
+ webRequired?: boolean | undefined;
616
+ webMode?: "auto" | "cached" | "live" | "off" | undefined;
559
617
  webEvidence: {
560
- status: "failed" | "none" | "unverified" | "attempted" | "satisfied";
561
- available: boolean;
562
- target: string | null;
563
- mode: "off" | "auto" | "cached" | "live";
564
618
  required: boolean;
565
- tool: string | null;
619
+ mode: "auto" | "cached" | "live" | "off";
620
+ effectiveMode: "auto" | "cached" | "live" | "off";
566
621
  attempted: boolean;
567
- rawDetailRef: string | null;
568
- effectiveMode: "off" | "auto" | "cached" | "live";
569
622
  satisfied: boolean;
623
+ status: "attempted" | "failed" | "none" | "satisfied" | "unverified";
624
+ tool: string | null;
625
+ target: string | null;
570
626
  errorSummary: string | null;
627
+ rawDetailRef: string | null;
628
+ available: boolean;
571
629
  };
572
630
  requestRequirements: {
631
+ capability: "browser" | "delegation" | "path_deny";
632
+ harness_id: string;
633
+ eligible: boolean;
573
634
  requested: boolean;
574
635
  effective: boolean;
575
- harness_id: string;
576
- reason: "effective" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "access_profile_incompatible" | "web_policy_off" | "postdiff_only";
636
+ reason: "access_profile_incompatible" | "effective" | "manifest_unsupported" | "not_requested" | "postdiff_only" | "runtime_unavailable" | "web_policy_off";
577
637
  evidence_refs: string[];
578
- eligible: boolean;
579
- capability: "browser" | "delegation" | "path_deny";
580
638
  }[];
581
- outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
639
+ toolPermissionPolicy?: Record<string, unknown> | undefined;
640
+ outputReadyState: "diagnostic" | "finalizing" | "pending" | "ready";
582
641
  toolWarningsTotal: number;
583
642
  result: {
584
- kind: "plan" | "none" | "patch" | "answer" | "report";
585
- applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
586
- revertAnchorId: string | null;
587
- postTurnSha: string | null;
643
+ kind: "answer" | "none" | "patch" | "plan" | "report";
588
644
  diffStat: {
589
645
  files: number;
590
646
  additions: number;
@@ -592,63 +648,109 @@ export declare const ControlRunListResponse: z.ZodObject<{
592
648
  } | null;
593
649
  blockers: number;
594
650
  adopted: boolean | null;
651
+ applyState: "applied" | "applied_review_blocked" | "not_applied" | "reverted";
595
652
  preTurnSha: string | null;
653
+ postTurnSha: string | null;
654
+ revertAnchorId: string | null;
596
655
  revertable: boolean;
597
656
  };
598
657
  outcomeFacts: {
599
- review: "not_run" | "approved" | "blocked";
600
- reason: "harness_failed" | "no_changes" | "review_blocked" | "checks_failed" | "budget_exhausted" | "budget_overshoot" | "cost_unverifiable" | "not_converged" | "stuck_no_progress" | "wall_clock_exceeded" | "user_cancelled" | "crash_interrupted" | "input_required" | "work_incomplete" | "context_capacity_exhausted" | "work_report_contract" | null;
601
- checks: "passed" | "failed" | "not_configured";
602
- lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
658
+ lifecycle: "cancelled" | "failed" | "interrupted" | "succeeded";
603
659
  noChanges: boolean;
660
+ checks: "failed" | "not_configured" | "passed";
661
+ review: "approved" | "blocked" | "not_run";
662
+ reason: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "input_required" | "no_changes" | "not_converged" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
604
663
  work_state?: {
605
- source: "constrained" | "validated" | "absent";
606
- state: "completed" | "needs_input" | "incomplete" | "unverified";
664
+ state: "completed" | "incomplete" | "needs_input" | "unverified";
665
+ source: "absent" | "constrained" | "validated";
607
666
  required_inputs?: {
608
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
609
- description: string;
667
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
610
668
  locator: string | null;
669
+ description: string;
611
670
  }[] | undefined;
612
671
  } | undefined;
613
672
  } | null;
614
673
  waitingOnUser: boolean;
615
674
  route: {
616
- harnessId: string | null;
617
- verified: boolean;
618
675
  requestedModel: string | null;
619
676
  observedModel: string | null;
677
+ harnessId: string | null;
678
+ verified: boolean;
620
679
  } | null;
621
680
  routingRationale: {
681
+ goal: "auto" | "economy" | "quality";
682
+ paid_fallback: "allowed_within_cap" | "never" | "when_unavailable";
683
+ order: string[];
684
+ dropped: string[];
685
+ reason: "all_incremental_cash_unknown" | "declared_order" | "delegate_effective_first" | "expiring_quota_slack" | "explicit_primary" | "lowest_incremental_cash" | "quality_tier" | "subscription_entitlement_first";
622
686
  entries: {
623
687
  harness_id: string;
624
- billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
688
+ billing_knowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
625
689
  incremental_cost_usd: number | null;
626
690
  eligible: boolean;
627
691
  }[];
628
- reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "delegate_effective_first" | "explicit_primary" | "declared_order";
629
- goal: "auto" | "quality" | "economy";
630
- paid_fallback: "never" | "when_unavailable" | "allowed_within_cap";
631
- order: string[];
632
- dropped: string[];
633
692
  } | null;
634
- startedAt?: string | undefined;
635
- error?: string | undefined;
636
- createdAt?: string | undefined;
637
- mode?: "ask" | "plan" | "agent" | undefined;
638
- prompt?: string | undefined;
639
- access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
640
- harnesses?: string[] | undefined;
641
- model?: string | undefined;
642
693
  tests?: {
643
- args: string[];
644
694
  program: string;
645
- envAllowlist: string[];
695
+ args: string[];
646
696
  cwd?: string | undefined;
697
+ envAllowlist: string[];
647
698
  }[] | undefined;
699
+ createdAt?: string | undefined;
700
+ startedAt?: string | undefined;
701
+ finishedAt?: string | undefined;
702
+ }, {
703
+ jobId: string;
704
+ runId: string;
705
+ parentRunId?: string | null | undefined;
706
+ delegatedFromRunId?: string | null | undefined;
707
+ delegation?: {
708
+ requested?: boolean | undefined;
709
+ effective?: boolean | undefined;
710
+ used?: boolean | undefined;
711
+ reason?: "access_profile_incompatible" | "injected_unused" | "manifest_unsupported" | "not_requested" | "partially_degraded" | "pending" | "runtime_unavailable" | "startup_failed" | "used" | undefined;
712
+ remediation?: string | null | undefined;
713
+ } | null | undefined;
648
714
  taskId?: string | undefined;
715
+ state: "cancelled" | "failed" | "interrupted" | "queued" | "running" | "succeeded";
649
716
  runDir?: string | undefined;
717
+ error?: string | undefined;
718
+ failure?: {
719
+ phase?: string | undefined;
720
+ category?: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation" | undefined;
721
+ code?: "budget_overshoot" | "cost_unverifiable" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null | undefined;
722
+ harnessId?: string | null | undefined;
723
+ attemptId?: string | null | undefined;
724
+ safeMessage: string;
725
+ rawDetailRef?: string | null | undefined;
726
+ logRefs?: string[] | undefined;
727
+ eventRefs?: string[] | undefined;
728
+ runDir?: string | null | undefined;
729
+ resetsAt?: string | null | undefined;
730
+ nextActions?: string[] | undefined;
731
+ } | null | undefined;
732
+ project?: {
733
+ kind?: "none" | "project" | undefined;
734
+ root?: string | null | undefined;
735
+ projectName?: string | null | undefined;
736
+ context?: "auto" | "off" | undefined;
737
+ } | undefined;
738
+ mode?: "agent" | "ask" | "plan" | undefined;
739
+ strategy?: "attempts" | "create" | "deep_scan" | "race" | "until_clean" | null | undefined;
740
+ prompt?: string | undefined;
741
+ harnesses?: string[] | undefined;
650
742
  primaryHarness?: string | undefined;
651
- routingGoal?: "auto" | "quality" | "economy" | undefined;
743
+ routingGoal?: "auto" | "economy" | "quality" | undefined;
744
+ model?: string | undefined;
745
+ reviewerPanel?: {
746
+ harness: string;
747
+ model?: string | undefined;
748
+ effort?: string | undefined;
749
+ }[] | undefined;
750
+ protectedPathApprovals?: {
751
+ path: string;
752
+ reason?: string | undefined;
753
+ }[] | undefined;
652
754
  n?: number | undefined;
653
755
  paidBudget?: {
654
756
  kind: "unlimited";
@@ -656,161 +758,58 @@ export declare const ControlRunListResponse: z.ZodObject<{
656
758
  kind: "finite";
657
759
  maxUsd: number;
658
760
  } | undefined;
659
- externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
660
- protectedPathApprovals?: {
661
- path: string;
662
- reason?: string | undefined;
663
- }[] | undefined;
664
- reviewerPanel?: {
665
- harness: string;
666
- model?: string | undefined;
667
- effort?: string | undefined;
668
- }[] | undefined;
669
- strategy?: "attempts" | "create" | "race" | "until_clean" | "deep_scan" | null | undefined;
670
761
  spendUsd?: number | null | undefined;
671
762
  spendEstimated?: boolean | undefined;
672
763
  inputTokens?: number | null | undefined;
673
764
  outputTokens?: number | null | undefined;
674
765
  cachedInputTokens?: number | null | undefined;
675
- outputConformance?: "passed" | "failed" | null | undefined;
766
+ outputConformance?: "failed" | "passed" | null | undefined;
676
767
  authRoute?: {
677
- source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
678
- harnessId: string | null;
679
- requested: "auto" | "subscription" | "api_key";
680
- attemptId: string | null;
681
- effective: "unknown" | "api_key" | "local_session" | null;
768
+ requested: "api_key" | "auto" | "subscription";
769
+ effective?: "api_key" | "local_session" | "unknown" | null | undefined;
770
+ source?: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | null | undefined;
682
771
  reason: "as_requested" | "native_first" | "no_native_session_fallback" | "requested_route_unavailable" | "undisclosed";
683
- modelMismatch: {
684
- requested: string;
685
- observed: string;
686
- } | null;
687
- } | null | undefined;
688
- requestedAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
689
- effectiveAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
690
- webRequired?: boolean | undefined;
691
- webMode?: "off" | "auto" | "cached" | "live" | undefined;
692
- toolPermissionPolicy?: Record<string, unknown> | undefined;
693
- finishedAt?: string | undefined;
694
- }, {
695
- state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
696
- jobId: string;
697
- runId: string;
698
- startedAt?: string | undefined;
699
- error?: string | undefined;
700
- createdAt?: string | undefined;
701
- mode?: "ask" | "plan" | "agent" | undefined;
702
- prompt?: string | undefined;
703
- access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
704
- parentRunId?: string | null | undefined;
705
- delegatedFromRunId?: string | null | undefined;
706
- delegation?: {
707
- requested?: boolean | undefined;
708
- effective?: boolean | undefined;
709
- reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
710
- remediation?: string | null | undefined;
711
- used?: boolean | undefined;
712
- } | null | undefined;
713
- harnesses?: string[] | undefined;
714
- model?: string | undefined;
715
- tests?: {
716
- program: string;
717
- args?: string[] | undefined;
718
- cwd?: string | undefined;
719
- envAllowlist?: string[] | undefined;
720
- }[] | undefined;
721
- project?: {
722
- kind?: "none" | "project" | undefined;
723
- context?: "off" | "auto" | undefined;
724
- root?: string | null | undefined;
725
- projectName?: string | null | undefined;
726
- } | undefined;
727
- taskId?: string | undefined;
728
- runDir?: string | undefined;
729
- primaryHarness?: string | undefined;
730
- routingGoal?: "auto" | "quality" | "economy" | undefined;
731
- n?: number | undefined;
732
- paidBudget?: {
733
- kind: "unlimited";
734
- } | {
735
- kind: "finite";
736
- maxUsd: number;
737
- } | undefined;
738
- externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
739
- protectedPathApprovals?: {
740
- path: string;
741
- reason?: string | undefined;
742
- }[] | undefined;
743
- reviewerPanel?: {
744
- harness: string;
745
- model?: string | undefined;
746
- effort?: string | undefined;
747
- }[] | undefined;
748
- failure?: {
749
- safeMessage: string;
750
- code?: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | "delegation_child_drain_timeout" | null | undefined;
751
772
  harnessId?: string | null | undefined;
752
773
  attemptId?: string | null | undefined;
753
- runDir?: string | null | undefined;
754
- phase?: string | undefined;
755
- category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "config_error" | "internal" | undefined;
756
- rawDetailRef?: string | null | undefined;
757
- logRefs?: string[] | undefined;
758
- eventRefs?: string[] | undefined;
759
- nextActions?: string[] | undefined;
760
- } | null | undefined;
761
- strategy?: "attempts" | "create" | "race" | "until_clean" | "deep_scan" | null | undefined;
762
- spendUsd?: number | null | undefined;
763
- spendEstimated?: boolean | undefined;
764
- inputTokens?: number | null | undefined;
765
- outputTokens?: number | null | undefined;
766
- cachedInputTokens?: number | null | undefined;
767
- outputConformance?: "passed" | "failed" | null | undefined;
768
- authRoute?: {
769
- requested: "auto" | "subscription" | "api_key";
770
- reason: "as_requested" | "native_first" | "no_native_session_fallback" | "requested_route_unavailable" | "undisclosed";
771
- source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
772
- harnessId?: string | null | undefined;
773
- attemptId?: string | null | undefined;
774
- effective?: "unknown" | "api_key" | "local_session" | null | undefined;
774
+ profileId?: string | null | undefined;
775
775
  modelMismatch?: {
776
776
  requested: string;
777
777
  observed: string;
778
778
  } | null | undefined;
779
779
  } | null | undefined;
780
- requestedAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
781
- effectiveAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
780
+ access?: "external_sandbox_full" | "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
781
+ requestedAccess?: "external_sandbox_full" | "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
782
+ effectiveAccess?: "external_sandbox_full" | "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
783
+ externalContextPolicy?: "auto" | "cached" | "live" | "off" | undefined;
782
784
  webRequired?: boolean | undefined;
783
- webMode?: "off" | "auto" | "cached" | "live" | undefined;
785
+ webMode?: "auto" | "cached" | "live" | "off" | undefined;
784
786
  webEvidence?: {
785
- status?: "failed" | "none" | "unverified" | "attempted" | "satisfied" | undefined;
786
- available?: boolean | undefined;
787
- target?: string | null | undefined;
788
- mode?: "off" | "auto" | "cached" | "live" | undefined;
789
787
  required?: boolean | undefined;
790
- tool?: string | null | undefined;
788
+ mode?: "auto" | "cached" | "live" | "off" | undefined;
789
+ effectiveMode?: "auto" | "cached" | "live" | "off" | undefined;
791
790
  attempted?: boolean | undefined;
792
- rawDetailRef?: string | null | undefined;
793
- effectiveMode?: "off" | "auto" | "cached" | "live" | undefined;
794
791
  satisfied?: boolean | undefined;
792
+ status?: "attempted" | "failed" | "none" | "satisfied" | "unverified" | undefined;
793
+ tool?: string | null | undefined;
794
+ target?: string | null | undefined;
795
795
  errorSummary?: string | null | undefined;
796
+ rawDetailRef?: string | null | undefined;
797
+ available?: boolean | undefined;
796
798
  } | undefined;
797
799
  requestRequirements?: {
798
- requested: boolean;
799
- effective: boolean;
800
+ capability: "browser" | "delegation" | "path_deny";
800
801
  harness_id: string;
801
- reason: "effective" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "access_profile_incompatible" | "web_policy_off" | "postdiff_only";
802
802
  eligible: boolean;
803
- capability: "browser" | "delegation" | "path_deny";
803
+ requested: boolean;
804
+ effective: boolean;
805
+ reason: "access_profile_incompatible" | "effective" | "manifest_unsupported" | "not_requested" | "postdiff_only" | "runtime_unavailable" | "web_policy_off";
804
806
  evidence_refs?: string[] | undefined;
805
807
  }[] | undefined;
806
808
  toolPermissionPolicy?: Record<string, unknown> | undefined;
807
- outputReadyState?: "pending" | "finalizing" | "ready" | "diagnostic" | undefined;
809
+ outputReadyState?: "diagnostic" | "finalizing" | "pending" | "ready" | undefined;
808
810
  toolWarningsTotal?: number | undefined;
809
811
  result?: {
810
- kind?: "plan" | "none" | "patch" | "answer" | "report" | undefined;
811
- applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
812
- revertAnchorId?: string | null | undefined;
813
- postTurnSha?: string | null | undefined;
812
+ kind?: "answer" | "none" | "patch" | "plan" | "report" | undefined;
814
813
  diffStat?: {
815
814
  files: number;
816
815
  additions: number;
@@ -818,45 +817,56 @@ export declare const ControlRunListResponse: z.ZodObject<{
818
817
  } | null | undefined;
819
818
  blockers?: number | undefined;
820
819
  adopted?: boolean | null | undefined;
820
+ applyState?: "applied" | "applied_review_blocked" | "not_applied" | "reverted" | undefined;
821
821
  preTurnSha?: string | null | undefined;
822
+ postTurnSha?: string | null | undefined;
823
+ revertAnchorId?: string | null | undefined;
822
824
  revertable?: boolean | undefined;
823
825
  } | undefined;
824
826
  outcomeFacts?: {
825
- lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
826
- review?: "not_run" | "approved" | "blocked" | undefined;
827
- reason?: "harness_failed" | "no_changes" | "review_blocked" | "checks_failed" | "budget_exhausted" | "budget_overshoot" | "cost_unverifiable" | "not_converged" | "stuck_no_progress" | "wall_clock_exceeded" | "user_cancelled" | "crash_interrupted" | "input_required" | "work_incomplete" | "context_capacity_exhausted" | "work_report_contract" | null | undefined;
828
- checks?: "passed" | "failed" | "not_configured" | undefined;
827
+ lifecycle: "cancelled" | "failed" | "interrupted" | "succeeded";
829
828
  noChanges?: boolean | undefined;
829
+ checks?: "failed" | "not_configured" | "passed" | undefined;
830
+ review?: "approved" | "blocked" | "not_run" | undefined;
831
+ reason?: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "input_required" | "no_changes" | "not_converged" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
830
832
  work_state?: {
831
- source: "constrained" | "validated" | "absent";
832
- state: "completed" | "needs_input" | "incomplete" | "unverified";
833
+ state: "completed" | "incomplete" | "needs_input" | "unverified";
834
+ source: "absent" | "constrained" | "validated";
833
835
  required_inputs?: {
834
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
835
- description: string;
836
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
836
837
  locator?: string | null | undefined;
838
+ description: string;
837
839
  }[] | undefined;
838
840
  } | undefined;
839
841
  } | null | undefined;
840
842
  waitingOnUser?: boolean | undefined;
841
843
  route?: {
842
- harnessId?: string | null | undefined;
843
- verified?: boolean | undefined;
844
844
  requestedModel?: string | null | undefined;
845
845
  observedModel?: string | null | undefined;
846
+ harnessId?: string | null | undefined;
847
+ verified?: boolean | undefined;
846
848
  } | null | undefined;
847
849
  routingRationale?: {
848
- reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "delegate_effective_first" | "explicit_primary" | "declared_order";
849
- goal: "auto" | "quality" | "economy";
850
- paid_fallback: "never" | "when_unavailable" | "allowed_within_cap";
850
+ goal: "auto" | "economy" | "quality";
851
+ paid_fallback: "allowed_within_cap" | "never" | "when_unavailable";
852
+ order?: string[] | undefined;
853
+ dropped?: string[] | undefined;
854
+ reason: "all_incremental_cash_unknown" | "declared_order" | "delegate_effective_first" | "expiring_quota_slack" | "explicit_primary" | "lowest_incremental_cash" | "quality_tier" | "subscription_entitlement_first";
851
855
  entries?: {
852
856
  harness_id: string;
853
- billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
854
- eligible: boolean;
857
+ billing_knowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
855
858
  incremental_cost_usd?: number | null | undefined;
859
+ eligible: boolean;
856
860
  }[] | undefined;
857
- order?: string[] | undefined;
858
- dropped?: string[] | undefined;
859
861
  } | null | undefined;
862
+ tests?: {
863
+ program: string;
864
+ args?: string[] | undefined;
865
+ cwd?: string | undefined;
866
+ envAllowlist?: string[] | undefined;
867
+ }[] | undefined;
868
+ createdAt?: string | undefined;
869
+ startedAt?: string | undefined;
860
870
  finishedAt?: string | undefined;
861
871
  }>, "many">>;
862
872
  /** QA-052 keyset page cursor: opaque `(createdAt,id)` token to fetch the
@@ -869,66 +879,116 @@ export declare const ControlRunListResponse: z.ZodObject<{
869
879
  hasMore: z.ZodDefault<z.ZodBoolean>;
870
880
  }, "strict", z.ZodTypeAny, {
871
881
  runs: {
872
- state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
882
+ jobId: string;
883
+ runId: string;
873
884
  parentRunId: string | null;
874
885
  delegatedFromRunId: string | null;
875
886
  delegation: {
876
887
  requested: boolean;
877
888
  effective: boolean;
878
- reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
879
- remediation: string | null;
880
889
  used: boolean;
890
+ reason: "access_profile_incompatible" | "injected_unused" | "manifest_unsupported" | "not_requested" | "partially_degraded" | "pending" | "runtime_unavailable" | "startup_failed" | "used";
891
+ remediation: string | null;
881
892
  } | null;
882
- project: {
883
- kind: "none" | "project";
884
- context: "off" | "auto";
885
- root: string | null;
886
- projectName: string | null;
887
- };
888
- jobId: string;
889
- runId: string;
893
+ taskId?: string | undefined;
894
+ state: "cancelled" | "failed" | "interrupted" | "queued" | "running" | "succeeded";
895
+ runDir?: string | undefined;
896
+ error?: string | undefined;
890
897
  failure: {
891
- code: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | "delegation_child_drain_timeout" | null;
898
+ phase: string;
899
+ category: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation";
900
+ code: "budget_overshoot" | "cost_unverifiable" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null;
892
901
  harnessId: string | null;
893
902
  attemptId: string | null;
894
- runDir: string | null;
895
- phase: string;
896
- category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "config_error" | "internal";
897
903
  safeMessage: string;
898
904
  rawDetailRef: string | null;
899
905
  logRefs: string[];
900
906
  eventRefs: string[];
907
+ runDir: string | null;
908
+ resetsAt: string | null;
901
909
  nextActions: string[];
902
910
  } | null;
911
+ project: {
912
+ kind: "none" | "project";
913
+ root: string | null;
914
+ projectName: string | null;
915
+ context: "auto" | "off";
916
+ };
917
+ mode?: "agent" | "ask" | "plan" | undefined;
918
+ strategy?: "attempts" | "create" | "deep_scan" | "race" | "until_clean" | null | undefined;
919
+ prompt?: string | undefined;
920
+ harnesses?: string[] | undefined;
921
+ primaryHarness?: string | undefined;
922
+ routingGoal?: "auto" | "economy" | "quality" | undefined;
923
+ model?: string | undefined;
924
+ reviewerPanel?: {
925
+ harness: string;
926
+ model?: string | undefined;
927
+ effort?: string | undefined;
928
+ }[] | undefined;
929
+ protectedPathApprovals?: {
930
+ path: string;
931
+ reason?: string | undefined;
932
+ }[] | undefined;
933
+ n?: number | undefined;
934
+ paidBudget?: {
935
+ kind: "unlimited";
936
+ } | {
937
+ kind: "finite";
938
+ maxUsd: number;
939
+ } | undefined;
940
+ spendUsd?: number | null | undefined;
941
+ spendEstimated?: boolean | undefined;
942
+ inputTokens?: number | null | undefined;
943
+ outputTokens?: number | null | undefined;
944
+ cachedInputTokens?: number | null | undefined;
945
+ outputConformance?: "failed" | "passed" | null | undefined;
946
+ authRoute?: {
947
+ requested: "api_key" | "auto" | "subscription";
948
+ effective: "api_key" | "local_session" | "unknown" | null;
949
+ source: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | null;
950
+ reason: "as_requested" | "native_first" | "no_native_session_fallback" | "requested_route_unavailable" | "undisclosed";
951
+ harnessId: string | null;
952
+ attemptId: string | null;
953
+ profileId: string | null;
954
+ modelMismatch: {
955
+ requested: string;
956
+ observed: string;
957
+ } | null;
958
+ } | null | undefined;
959
+ access?: "external_sandbox_full" | "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
960
+ requestedAccess?: "external_sandbox_full" | "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
961
+ effectiveAccess?: "external_sandbox_full" | "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
962
+ externalContextPolicy?: "auto" | "cached" | "live" | "off" | undefined;
963
+ webRequired?: boolean | undefined;
964
+ webMode?: "auto" | "cached" | "live" | "off" | undefined;
903
965
  webEvidence: {
904
- status: "failed" | "none" | "unverified" | "attempted" | "satisfied";
905
- available: boolean;
906
- target: string | null;
907
- mode: "off" | "auto" | "cached" | "live";
908
966
  required: boolean;
909
- tool: string | null;
967
+ mode: "auto" | "cached" | "live" | "off";
968
+ effectiveMode: "auto" | "cached" | "live" | "off";
910
969
  attempted: boolean;
911
- rawDetailRef: string | null;
912
- effectiveMode: "off" | "auto" | "cached" | "live";
913
970
  satisfied: boolean;
971
+ status: "attempted" | "failed" | "none" | "satisfied" | "unverified";
972
+ tool: string | null;
973
+ target: string | null;
914
974
  errorSummary: string | null;
975
+ rawDetailRef: string | null;
976
+ available: boolean;
915
977
  };
916
978
  requestRequirements: {
979
+ capability: "browser" | "delegation" | "path_deny";
980
+ harness_id: string;
981
+ eligible: boolean;
917
982
  requested: boolean;
918
983
  effective: boolean;
919
- harness_id: string;
920
- reason: "effective" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "access_profile_incompatible" | "web_policy_off" | "postdiff_only";
984
+ reason: "access_profile_incompatible" | "effective" | "manifest_unsupported" | "not_requested" | "postdiff_only" | "runtime_unavailable" | "web_policy_off";
921
985
  evidence_refs: string[];
922
- eligible: boolean;
923
- capability: "browser" | "delegation" | "path_deny";
924
986
  }[];
925
- outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
987
+ toolPermissionPolicy?: Record<string, unknown> | undefined;
988
+ outputReadyState: "diagnostic" | "finalizing" | "pending" | "ready";
926
989
  toolWarningsTotal: number;
927
990
  result: {
928
- kind: "plan" | "none" | "patch" | "answer" | "report";
929
- applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
930
- revertAnchorId: string | null;
931
- postTurnSha: string | null;
991
+ kind: "answer" | "none" | "patch" | "plan" | "report";
932
992
  diffStat: {
933
993
  files: number;
934
994
  additions: number;
@@ -936,146 +996,113 @@ export declare const ControlRunListResponse: z.ZodObject<{
936
996
  } | null;
937
997
  blockers: number;
938
998
  adopted: boolean | null;
999
+ applyState: "applied" | "applied_review_blocked" | "not_applied" | "reverted";
939
1000
  preTurnSha: string | null;
1001
+ postTurnSha: string | null;
1002
+ revertAnchorId: string | null;
940
1003
  revertable: boolean;
941
1004
  };
942
1005
  outcomeFacts: {
943
- review: "not_run" | "approved" | "blocked";
944
- reason: "harness_failed" | "no_changes" | "review_blocked" | "checks_failed" | "budget_exhausted" | "budget_overshoot" | "cost_unverifiable" | "not_converged" | "stuck_no_progress" | "wall_clock_exceeded" | "user_cancelled" | "crash_interrupted" | "input_required" | "work_incomplete" | "context_capacity_exhausted" | "work_report_contract" | null;
945
- checks: "passed" | "failed" | "not_configured";
946
- lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
1006
+ lifecycle: "cancelled" | "failed" | "interrupted" | "succeeded";
947
1007
  noChanges: boolean;
1008
+ checks: "failed" | "not_configured" | "passed";
1009
+ review: "approved" | "blocked" | "not_run";
1010
+ reason: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "input_required" | "no_changes" | "not_converged" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
948
1011
  work_state?: {
949
- source: "constrained" | "validated" | "absent";
950
- state: "completed" | "needs_input" | "incomplete" | "unverified";
1012
+ state: "completed" | "incomplete" | "needs_input" | "unverified";
1013
+ source: "absent" | "constrained" | "validated";
951
1014
  required_inputs?: {
952
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
953
- description: string;
1015
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
954
1016
  locator: string | null;
1017
+ description: string;
955
1018
  }[] | undefined;
956
1019
  } | undefined;
957
1020
  } | null;
958
1021
  waitingOnUser: boolean;
959
1022
  route: {
960
- harnessId: string | null;
961
- verified: boolean;
962
1023
  requestedModel: string | null;
963
1024
  observedModel: string | null;
1025
+ harnessId: string | null;
1026
+ verified: boolean;
964
1027
  } | null;
965
1028
  routingRationale: {
1029
+ goal: "auto" | "economy" | "quality";
1030
+ paid_fallback: "allowed_within_cap" | "never" | "when_unavailable";
1031
+ order: string[];
1032
+ dropped: string[];
1033
+ reason: "all_incremental_cash_unknown" | "declared_order" | "delegate_effective_first" | "expiring_quota_slack" | "explicit_primary" | "lowest_incremental_cash" | "quality_tier" | "subscription_entitlement_first";
966
1034
  entries: {
967
1035
  harness_id: string;
968
- billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1036
+ billing_knowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
969
1037
  incremental_cost_usd: number | null;
970
1038
  eligible: boolean;
971
1039
  }[];
972
- reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "delegate_effective_first" | "explicit_primary" | "declared_order";
973
- goal: "auto" | "quality" | "economy";
974
- paid_fallback: "never" | "when_unavailable" | "allowed_within_cap";
975
- order: string[];
976
- dropped: string[];
977
1040
  } | null;
978
- startedAt?: string | undefined;
979
- error?: string | undefined;
980
- createdAt?: string | undefined;
981
- mode?: "ask" | "plan" | "agent" | undefined;
982
- prompt?: string | undefined;
983
- access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
984
- harnesses?: string[] | undefined;
985
- model?: string | undefined;
986
1041
  tests?: {
987
- args: string[];
988
1042
  program: string;
989
- envAllowlist: string[];
1043
+ args: string[];
990
1044
  cwd?: string | undefined;
1045
+ envAllowlist: string[];
991
1046
  }[] | undefined;
992
- taskId?: string | undefined;
993
- runDir?: string | undefined;
994
- primaryHarness?: string | undefined;
995
- routingGoal?: "auto" | "quality" | "economy" | undefined;
996
- n?: number | undefined;
997
- paidBudget?: {
998
- kind: "unlimited";
999
- } | {
1000
- kind: "finite";
1001
- maxUsd: number;
1002
- } | undefined;
1003
- externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
1004
- protectedPathApprovals?: {
1005
- path: string;
1006
- reason?: string | undefined;
1007
- }[] | undefined;
1008
- reviewerPanel?: {
1009
- harness: string;
1010
- model?: string | undefined;
1011
- effort?: string | undefined;
1012
- }[] | undefined;
1013
- strategy?: "attempts" | "create" | "race" | "until_clean" | "deep_scan" | null | undefined;
1014
- spendUsd?: number | null | undefined;
1015
- spendEstimated?: boolean | undefined;
1016
- inputTokens?: number | null | undefined;
1017
- outputTokens?: number | null | undefined;
1018
- cachedInputTokens?: number | null | undefined;
1019
- outputConformance?: "passed" | "failed" | null | undefined;
1020
- authRoute?: {
1021
- source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
1022
- harnessId: string | null;
1023
- requested: "auto" | "subscription" | "api_key";
1024
- attemptId: string | null;
1025
- effective: "unknown" | "api_key" | "local_session" | null;
1026
- reason: "as_requested" | "native_first" | "no_native_session_fallback" | "requested_route_unavailable" | "undisclosed";
1027
- modelMismatch: {
1028
- requested: string;
1029
- observed: string;
1030
- } | null;
1031
- } | null | undefined;
1032
- requestedAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1033
- effectiveAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1034
- webRequired?: boolean | undefined;
1035
- webMode?: "off" | "auto" | "cached" | "live" | undefined;
1036
- toolPermissionPolicy?: Record<string, unknown> | undefined;
1047
+ createdAt?: string | undefined;
1048
+ startedAt?: string | undefined;
1037
1049
  finishedAt?: string | undefined;
1038
1050
  }[];
1039
1051
  nextCursor: string | null;
1040
1052
  hasMore: boolean;
1041
1053
  }, {
1042
1054
  runs?: {
1043
- state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
1044
1055
  jobId: string;
1045
1056
  runId: string;
1046
- startedAt?: string | undefined;
1047
- error?: string | undefined;
1048
- createdAt?: string | undefined;
1049
- mode?: "ask" | "plan" | "agent" | undefined;
1050
- prompt?: string | undefined;
1051
- access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1052
1057
  parentRunId?: string | null | undefined;
1053
1058
  delegatedFromRunId?: string | null | undefined;
1054
1059
  delegation?: {
1055
1060
  requested?: boolean | undefined;
1056
1061
  effective?: boolean | undefined;
1057
- reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
1058
- remediation?: string | null | undefined;
1059
1062
  used?: boolean | undefined;
1063
+ reason?: "access_profile_incompatible" | "injected_unused" | "manifest_unsupported" | "not_requested" | "partially_degraded" | "pending" | "runtime_unavailable" | "startup_failed" | "used" | undefined;
1064
+ remediation?: string | null | undefined;
1065
+ } | null | undefined;
1066
+ taskId?: string | undefined;
1067
+ state: "cancelled" | "failed" | "interrupted" | "queued" | "running" | "succeeded";
1068
+ runDir?: string | undefined;
1069
+ error?: string | undefined;
1070
+ failure?: {
1071
+ phase?: string | undefined;
1072
+ category?: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation" | undefined;
1073
+ code?: "budget_overshoot" | "cost_unverifiable" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null | undefined;
1074
+ harnessId?: string | null | undefined;
1075
+ attemptId?: string | null | undefined;
1076
+ safeMessage: string;
1077
+ rawDetailRef?: string | null | undefined;
1078
+ logRefs?: string[] | undefined;
1079
+ eventRefs?: string[] | undefined;
1080
+ runDir?: string | null | undefined;
1081
+ resetsAt?: string | null | undefined;
1082
+ nextActions?: string[] | undefined;
1060
1083
  } | null | undefined;
1061
- harnesses?: string[] | undefined;
1062
- model?: string | undefined;
1063
- tests?: {
1064
- program: string;
1065
- args?: string[] | undefined;
1066
- cwd?: string | undefined;
1067
- envAllowlist?: string[] | undefined;
1068
- }[] | undefined;
1069
1084
  project?: {
1070
1085
  kind?: "none" | "project" | undefined;
1071
- context?: "off" | "auto" | undefined;
1072
1086
  root?: string | null | undefined;
1073
1087
  projectName?: string | null | undefined;
1088
+ context?: "auto" | "off" | undefined;
1074
1089
  } | undefined;
1075
- taskId?: string | undefined;
1076
- runDir?: string | undefined;
1090
+ mode?: "agent" | "ask" | "plan" | undefined;
1091
+ strategy?: "attempts" | "create" | "deep_scan" | "race" | "until_clean" | null | undefined;
1092
+ prompt?: string | undefined;
1093
+ harnesses?: string[] | undefined;
1077
1094
  primaryHarness?: string | undefined;
1078
- routingGoal?: "auto" | "quality" | "economy" | undefined;
1095
+ routingGoal?: "auto" | "economy" | "quality" | undefined;
1096
+ model?: string | undefined;
1097
+ reviewerPanel?: {
1098
+ harness: string;
1099
+ model?: string | undefined;
1100
+ effort?: string | undefined;
1101
+ }[] | undefined;
1102
+ protectedPathApprovals?: {
1103
+ path: string;
1104
+ reason?: string | undefined;
1105
+ }[] | undefined;
1079
1106
  n?: number | undefined;
1080
1107
  paidBudget?: {
1081
1108
  kind: "unlimited";
@@ -1083,82 +1110,58 @@ export declare const ControlRunListResponse: z.ZodObject<{
1083
1110
  kind: "finite";
1084
1111
  maxUsd: number;
1085
1112
  } | undefined;
1086
- externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
1087
- protectedPathApprovals?: {
1088
- path: string;
1089
- reason?: string | undefined;
1090
- }[] | undefined;
1091
- reviewerPanel?: {
1092
- harness: string;
1093
- model?: string | undefined;
1094
- effort?: string | undefined;
1095
- }[] | undefined;
1096
- failure?: {
1097
- safeMessage: string;
1098
- code?: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | "delegation_child_drain_timeout" | null | undefined;
1099
- harnessId?: string | null | undefined;
1100
- attemptId?: string | null | undefined;
1101
- runDir?: string | null | undefined;
1102
- phase?: string | undefined;
1103
- category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "config_error" | "internal" | undefined;
1104
- rawDetailRef?: string | null | undefined;
1105
- logRefs?: string[] | undefined;
1106
- eventRefs?: string[] | undefined;
1107
- nextActions?: string[] | undefined;
1108
- } | null | undefined;
1109
- strategy?: "attempts" | "create" | "race" | "until_clean" | "deep_scan" | null | undefined;
1110
1113
  spendUsd?: number | null | undefined;
1111
1114
  spendEstimated?: boolean | undefined;
1112
1115
  inputTokens?: number | null | undefined;
1113
1116
  outputTokens?: number | null | undefined;
1114
1117
  cachedInputTokens?: number | null | undefined;
1115
- outputConformance?: "passed" | "failed" | null | undefined;
1118
+ outputConformance?: "failed" | "passed" | null | undefined;
1116
1119
  authRoute?: {
1117
- requested: "auto" | "subscription" | "api_key";
1120
+ requested: "api_key" | "auto" | "subscription";
1121
+ effective?: "api_key" | "local_session" | "unknown" | null | undefined;
1122
+ source?: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | null | undefined;
1118
1123
  reason: "as_requested" | "native_first" | "no_native_session_fallback" | "requested_route_unavailable" | "undisclosed";
1119
- source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
1120
1124
  harnessId?: string | null | undefined;
1121
1125
  attemptId?: string | null | undefined;
1122
- effective?: "unknown" | "api_key" | "local_session" | null | undefined;
1126
+ profileId?: string | null | undefined;
1123
1127
  modelMismatch?: {
1124
1128
  requested: string;
1125
1129
  observed: string;
1126
1130
  } | null | undefined;
1127
1131
  } | null | undefined;
1128
- requestedAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1129
- effectiveAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1132
+ access?: "external_sandbox_full" | "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
1133
+ requestedAccess?: "external_sandbox_full" | "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
1134
+ effectiveAccess?: "external_sandbox_full" | "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
1135
+ externalContextPolicy?: "auto" | "cached" | "live" | "off" | undefined;
1130
1136
  webRequired?: boolean | undefined;
1131
- webMode?: "off" | "auto" | "cached" | "live" | undefined;
1137
+ webMode?: "auto" | "cached" | "live" | "off" | undefined;
1132
1138
  webEvidence?: {
1133
- status?: "failed" | "none" | "unverified" | "attempted" | "satisfied" | undefined;
1134
- available?: boolean | undefined;
1135
- target?: string | null | undefined;
1136
- mode?: "off" | "auto" | "cached" | "live" | undefined;
1137
1139
  required?: boolean | undefined;
1138
- tool?: string | null | undefined;
1140
+ mode?: "auto" | "cached" | "live" | "off" | undefined;
1141
+ effectiveMode?: "auto" | "cached" | "live" | "off" | undefined;
1139
1142
  attempted?: boolean | undefined;
1140
- rawDetailRef?: string | null | undefined;
1141
- effectiveMode?: "off" | "auto" | "cached" | "live" | undefined;
1142
1143
  satisfied?: boolean | undefined;
1144
+ status?: "attempted" | "failed" | "none" | "satisfied" | "unverified" | undefined;
1145
+ tool?: string | null | undefined;
1146
+ target?: string | null | undefined;
1143
1147
  errorSummary?: string | null | undefined;
1148
+ rawDetailRef?: string | null | undefined;
1149
+ available?: boolean | undefined;
1144
1150
  } | undefined;
1145
1151
  requestRequirements?: {
1146
- requested: boolean;
1147
- effective: boolean;
1152
+ capability: "browser" | "delegation" | "path_deny";
1148
1153
  harness_id: string;
1149
- reason: "effective" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "access_profile_incompatible" | "web_policy_off" | "postdiff_only";
1150
1154
  eligible: boolean;
1151
- capability: "browser" | "delegation" | "path_deny";
1155
+ requested: boolean;
1156
+ effective: boolean;
1157
+ reason: "access_profile_incompatible" | "effective" | "manifest_unsupported" | "not_requested" | "postdiff_only" | "runtime_unavailable" | "web_policy_off";
1152
1158
  evidence_refs?: string[] | undefined;
1153
1159
  }[] | undefined;
1154
1160
  toolPermissionPolicy?: Record<string, unknown> | undefined;
1155
- outputReadyState?: "pending" | "finalizing" | "ready" | "diagnostic" | undefined;
1161
+ outputReadyState?: "diagnostic" | "finalizing" | "pending" | "ready" | undefined;
1156
1162
  toolWarningsTotal?: number | undefined;
1157
1163
  result?: {
1158
- kind?: "plan" | "none" | "patch" | "answer" | "report" | undefined;
1159
- applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
1160
- revertAnchorId?: string | null | undefined;
1161
- postTurnSha?: string | null | undefined;
1164
+ kind?: "answer" | "none" | "patch" | "plan" | "report" | undefined;
1162
1165
  diffStat?: {
1163
1166
  files: number;
1164
1167
  additions: number;
@@ -1166,45 +1169,56 @@ export declare const ControlRunListResponse: z.ZodObject<{
1166
1169
  } | null | undefined;
1167
1170
  blockers?: number | undefined;
1168
1171
  adopted?: boolean | null | undefined;
1172
+ applyState?: "applied" | "applied_review_blocked" | "not_applied" | "reverted" | undefined;
1169
1173
  preTurnSha?: string | null | undefined;
1174
+ postTurnSha?: string | null | undefined;
1175
+ revertAnchorId?: string | null | undefined;
1170
1176
  revertable?: boolean | undefined;
1171
1177
  } | undefined;
1172
1178
  outcomeFacts?: {
1173
- lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
1174
- review?: "not_run" | "approved" | "blocked" | undefined;
1175
- reason?: "harness_failed" | "no_changes" | "review_blocked" | "checks_failed" | "budget_exhausted" | "budget_overshoot" | "cost_unverifiable" | "not_converged" | "stuck_no_progress" | "wall_clock_exceeded" | "user_cancelled" | "crash_interrupted" | "input_required" | "work_incomplete" | "context_capacity_exhausted" | "work_report_contract" | null | undefined;
1176
- checks?: "passed" | "failed" | "not_configured" | undefined;
1179
+ lifecycle: "cancelled" | "failed" | "interrupted" | "succeeded";
1177
1180
  noChanges?: boolean | undefined;
1181
+ checks?: "failed" | "not_configured" | "passed" | undefined;
1182
+ review?: "approved" | "blocked" | "not_run" | undefined;
1183
+ reason?: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "input_required" | "no_changes" | "not_converged" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
1178
1184
  work_state?: {
1179
- source: "constrained" | "validated" | "absent";
1180
- state: "completed" | "needs_input" | "incomplete" | "unverified";
1185
+ state: "completed" | "incomplete" | "needs_input" | "unverified";
1186
+ source: "absent" | "constrained" | "validated";
1181
1187
  required_inputs?: {
1182
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
1183
- description: string;
1188
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
1184
1189
  locator?: string | null | undefined;
1190
+ description: string;
1185
1191
  }[] | undefined;
1186
1192
  } | undefined;
1187
1193
  } | null | undefined;
1188
1194
  waitingOnUser?: boolean | undefined;
1189
1195
  route?: {
1190
- harnessId?: string | null | undefined;
1191
- verified?: boolean | undefined;
1192
1196
  requestedModel?: string | null | undefined;
1193
1197
  observedModel?: string | null | undefined;
1198
+ harnessId?: string | null | undefined;
1199
+ verified?: boolean | undefined;
1194
1200
  } | null | undefined;
1195
1201
  routingRationale?: {
1196
- reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "delegate_effective_first" | "explicit_primary" | "declared_order";
1197
- goal: "auto" | "quality" | "economy";
1198
- paid_fallback: "never" | "when_unavailable" | "allowed_within_cap";
1202
+ goal: "auto" | "economy" | "quality";
1203
+ paid_fallback: "allowed_within_cap" | "never" | "when_unavailable";
1204
+ order?: string[] | undefined;
1205
+ dropped?: string[] | undefined;
1206
+ reason: "all_incremental_cash_unknown" | "declared_order" | "delegate_effective_first" | "expiring_quota_slack" | "explicit_primary" | "lowest_incremental_cash" | "quality_tier" | "subscription_entitlement_first";
1199
1207
  entries?: {
1200
1208
  harness_id: string;
1201
- billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1202
- eligible: boolean;
1209
+ billing_knowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1203
1210
  incremental_cost_usd?: number | null | undefined;
1211
+ eligible: boolean;
1204
1212
  }[] | undefined;
1205
- order?: string[] | undefined;
1206
- dropped?: string[] | undefined;
1207
1213
  } | null | undefined;
1214
+ tests?: {
1215
+ program: string;
1216
+ args?: string[] | undefined;
1217
+ cwd?: string | undefined;
1218
+ envAllowlist?: string[] | undefined;
1219
+ }[] | undefined;
1220
+ createdAt?: string | undefined;
1221
+ startedAt?: string | undefined;
1208
1222
  finishedAt?: string | undefined;
1209
1223
  }[] | undefined;
1210
1224
  nextCursor?: string | null | undefined;
@@ -1220,30 +1234,30 @@ export declare const ControlArtifactListResponse: z.ZodObject<{
1220
1234
  mime: z.ZodOptional<z.ZodString>;
1221
1235
  }, "strip", z.ZodTypeAny, {
1222
1236
  path: string;
1223
- kind: "file" | "directory";
1224
- mime?: string | undefined;
1237
+ kind: "directory" | "file";
1225
1238
  bytes?: number | undefined;
1239
+ mime?: string | undefined;
1226
1240
  }, {
1227
1241
  path: string;
1228
- kind: "file" | "directory";
1229
- mime?: string | undefined;
1242
+ kind: "directory" | "file";
1230
1243
  bytes?: number | undefined;
1244
+ mime?: string | undefined;
1231
1245
  }>, "many">>;
1232
1246
  }, "strict", z.ZodTypeAny, {
1233
1247
  runId: string;
1234
1248
  artifacts: {
1235
1249
  path: string;
1236
- kind: "file" | "directory";
1237
- mime?: string | undefined;
1250
+ kind: "directory" | "file";
1238
1251
  bytes?: number | undefined;
1252
+ mime?: string | undefined;
1239
1253
  }[];
1240
1254
  }, {
1241
1255
  runId: string;
1242
1256
  artifacts?: {
1243
1257
  path: string;
1244
- kind: "file" | "directory";
1245
- mime?: string | undefined;
1258
+ kind: "directory" | "file";
1246
1259
  bytes?: number | undefined;
1260
+ mime?: string | undefined;
1247
1261
  }[] | undefined;
1248
1262
  }>;
1249
1263
  export type ControlArtifactListResponse = z.infer<typeof ControlArtifactListResponse>;
@@ -1256,30 +1270,30 @@ export declare const ControlProjectOutputsResponse: z.ZodObject<{
1256
1270
  mime: z.ZodOptional<z.ZodString>;
1257
1271
  }, "strip", z.ZodTypeAny, {
1258
1272
  path: string;
1259
- kind: "file" | "directory";
1260
- mime?: string | undefined;
1273
+ kind: "directory" | "file";
1261
1274
  bytes?: number | undefined;
1275
+ mime?: string | undefined;
1262
1276
  }, {
1263
1277
  path: string;
1264
- kind: "file" | "directory";
1265
- mime?: string | undefined;
1278
+ kind: "directory" | "file";
1266
1279
  bytes?: number | undefined;
1280
+ mime?: string | undefined;
1267
1281
  }>, "many">>;
1268
1282
  }, "strict", z.ZodTypeAny, {
1269
1283
  projectId: string;
1270
1284
  artifacts: {
1271
1285
  path: string;
1272
- kind: "file" | "directory";
1273
- mime?: string | undefined;
1286
+ kind: "directory" | "file";
1274
1287
  bytes?: number | undefined;
1288
+ mime?: string | undefined;
1275
1289
  }[];
1276
1290
  }, {
1277
1291
  projectId: string;
1278
1292
  artifacts?: {
1279
1293
  path: string;
1280
- kind: "file" | "directory";
1281
- mime?: string | undefined;
1294
+ kind: "directory" | "file";
1282
1295
  bytes?: number | undefined;
1296
+ mime?: string | undefined;
1283
1297
  }[] | undefined;
1284
1298
  }>;
1285
1299
  export type ControlProjectOutputsResponse = z.infer<typeof ControlProjectOutputsResponse>;
@@ -1294,13 +1308,13 @@ export declare const ControlApplyCheckResponse: z.ZodObject<{
1294
1308
  * false. */
1295
1309
  alreadyApplied: z.ZodDefault<z.ZodBoolean>;
1296
1310
  }, "strict", z.ZodTypeAny, {
1297
- code: number | null;
1298
1311
  ok: boolean;
1299
- alreadyApplied: boolean;
1312
+ code: number | null;
1300
1313
  stderr: string;
1314
+ alreadyApplied: boolean;
1301
1315
  }, {
1302
- code: number | null;
1303
1316
  ok: boolean;
1317
+ code: number | null;
1304
1318
  stderr: string;
1305
1319
  alreadyApplied?: boolean | undefined;
1306
1320
  }>;
@@ -1325,86 +1339,86 @@ export declare const ControlDeliveryResponse: z.ZodObject<{
1325
1339
  id: z.ZodString;
1326
1340
  status: z.ZodString;
1327
1341
  }, "strip", z.ZodTypeAny, {
1328
- status: string;
1329
1342
  id: string;
1330
- }, {
1331
1343
  status: string;
1344
+ }, {
1332
1345
  id: string;
1346
+ status: string;
1333
1347
  }>, "many">>;
1334
1348
  duration_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1335
1349
  reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1336
1350
  }, "strip", z.ZodTypeAny, {
1337
- reason: string | null;
1338
- duration_ms: number | null;
1339
- base_sha: string | null;
1340
1351
  attempted: boolean;
1352
+ base_sha: string | null;
1341
1353
  applied_cleanly: boolean | null;
1342
1354
  gates_passed: boolean | null;
1343
1355
  gates: {
1344
- status: string;
1345
1356
  id: string;
1357
+ status: string;
1346
1358
  }[];
1359
+ duration_ms: number | null;
1360
+ reason: string | null;
1347
1361
  }, {
1348
1362
  attempted: boolean;
1349
- reason?: string | null | undefined;
1350
- duration_ms?: number | null | undefined;
1351
1363
  base_sha?: string | null | undefined;
1352
1364
  applied_cleanly?: boolean | null | undefined;
1353
1365
  gates_passed?: boolean | null | undefined;
1354
1366
  gates?: {
1355
- status: string;
1356
1367
  id: string;
1368
+ status: string;
1357
1369
  }[] | undefined;
1370
+ duration_ms?: number | null | undefined;
1371
+ reason?: string | null | undefined;
1358
1372
  }>;
1359
1373
  targetPreimageSha: z.ZodString;
1360
1374
  }, "strict", z.ZodTypeAny, {
1361
- mode: "apply" | "commit" | "branch" | "pr";
1375
+ mode: "apply" | "branch" | "commit" | "pr";
1362
1376
  applied: boolean;
1377
+ branch?: string | undefined;
1378
+ commit?: string | undefined;
1379
+ prUrl?: string | undefined;
1380
+ detail?: string | undefined;
1381
+ treeMutated?: boolean | undefined;
1382
+ refused?: boolean | undefined;
1363
1383
  alreadyApplied: boolean;
1384
+ deliveryStatus?: "already_applied" | "applied" | "refused" | undefined;
1364
1385
  finalVerify: {
1365
- reason: string | null;
1366
- duration_ms: number | null;
1367
- base_sha: string | null;
1368
1386
  attempted: boolean;
1387
+ base_sha: string | null;
1369
1388
  applied_cleanly: boolean | null;
1370
1389
  gates_passed: boolean | null;
1371
1390
  gates: {
1372
- status: string;
1373
1391
  id: string;
1392
+ status: string;
1374
1393
  }[];
1394
+ duration_ms: number | null;
1395
+ reason: string | null;
1375
1396
  };
1376
1397
  targetPreimageSha: string;
1377
- detail?: string | undefined;
1378
- commit?: string | undefined;
1398
+ }, {
1399
+ mode: "apply" | "branch" | "commit" | "pr";
1400
+ applied: boolean;
1379
1401
  branch?: string | undefined;
1402
+ commit?: string | undefined;
1380
1403
  prUrl?: string | undefined;
1404
+ detail?: string | undefined;
1381
1405
  treeMutated?: boolean | undefined;
1382
1406
  refused?: boolean | undefined;
1383
- deliveryStatus?: "applied" | "refused" | "already_applied" | undefined;
1384
- }, {
1385
- mode: "apply" | "commit" | "branch" | "pr";
1386
- applied: boolean;
1407
+ alreadyApplied?: boolean | undefined;
1408
+ deliveryStatus?: "already_applied" | "applied" | "refused" | undefined;
1387
1409
  finalVerify: {
1388
1410
  attempted: boolean;
1389
- reason?: string | null | undefined;
1390
- duration_ms?: number | null | undefined;
1391
1411
  base_sha?: string | null | undefined;
1392
1412
  applied_cleanly?: boolean | null | undefined;
1393
1413
  gates_passed?: boolean | null | undefined;
1394
1414
  gates?: {
1395
- status: string;
1396
1415
  id: string;
1416
+ status: string;
1397
1417
  }[] | undefined;
1418
+ duration_ms?: number | null | undefined;
1419
+ reason?: string | null | undefined;
1398
1420
  };
1399
1421
  targetPreimageSha: string;
1400
- detail?: string | undefined;
1401
- commit?: string | undefined;
1402
- branch?: string | undefined;
1403
- prUrl?: string | undefined;
1404
- treeMutated?: boolean | undefined;
1405
- refused?: boolean | undefined;
1406
- alreadyApplied?: boolean | undefined;
1407
- deliveryStatus?: "applied" | "refused" | "already_applied" | undefined;
1408
1422
  }>;
1409
1423
  export type ControlDeliveryResponse = z.infer<typeof ControlDeliveryResponse>;
1410
1424
  export declare const ControlThreadTurnRequest: z.ZodObject<Omit<{
@@ -1422,14 +1436,17 @@ export declare const ControlThreadTurnRequest: z.ZodObject<Omit<{
1422
1436
  kind: z.ZodLiteral<"project">;
1423
1437
  root: z.ZodString;
1424
1438
  context: z.ZodDefault<z.ZodEnum<["auto"]>>;
1439
+ ephemeral: z.ZodDefault<z.ZodBoolean>;
1425
1440
  }, "strict", z.ZodTypeAny, {
1426
1441
  kind: "project";
1427
- context: "auto";
1428
1442
  root: string;
1443
+ context: "auto";
1444
+ ephemeral: boolean;
1429
1445
  }, {
1430
1446
  kind: "project";
1431
1447
  root: string;
1432
1448
  context?: "auto" | undefined;
1449
+ ephemeral?: boolean | undefined;
1433
1450
  }>, z.ZodObject<{
1434
1451
  kind: z.ZodLiteral<"none">;
1435
1452
  }, "strict", z.ZodTypeAny, {
@@ -1439,10 +1456,13 @@ export declare const ControlThreadTurnRequest: z.ZodObject<Omit<{
1439
1456
  }>]>>;
1440
1457
  execution: z.ZodDefault<z.ZodObject<{
1441
1458
  isolation: z.ZodDefault<z.ZodEnum<["envelope", "live"]>>;
1459
+ delegated: z.ZodDefault<z.ZodBoolean>;
1442
1460
  }, "strict", z.ZodTypeAny, {
1443
- isolation: "live" | "envelope";
1461
+ isolation: "envelope" | "live";
1462
+ delegated: boolean;
1444
1463
  }, {
1445
- isolation?: "live" | "envelope" | undefined;
1464
+ isolation?: "envelope" | "live" | undefined;
1465
+ delegated?: boolean | undefined;
1446
1466
  }>>;
1447
1467
  harnesses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1448
1468
  primaryHarness: z.ZodOptional<z.ZodString>;
@@ -1486,10 +1506,10 @@ export declare const ControlThreadTurnRequest: z.ZodObject<Omit<{
1486
1506
  cwd: z.ZodOptional<z.ZodString>;
1487
1507
  envAllowlist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1488
1508
  }, "strict", z.ZodTypeAny, {
1489
- args: string[];
1490
1509
  program: string;
1491
- envAllowlist: string[];
1510
+ args: string[];
1492
1511
  cwd?: string | undefined;
1512
+ envAllowlist: string[];
1493
1513
  }, {
1494
1514
  program: string;
1495
1515
  args?: string[] | undefined;
@@ -1517,13 +1537,13 @@ export declare const ControlThreadTurnRequest: z.ZodObject<Omit<{
1517
1537
  sha256: z.ZodString;
1518
1538
  path: z.ZodString;
1519
1539
  }, "strict", z.ZodTypeAny, {
1520
- path: string;
1521
- sha256: string;
1522
1540
  runId: string;
1523
- }, {
1524
- path: string;
1525
1541
  sha256: string;
1542
+ path: string;
1543
+ }, {
1526
1544
  runId: string;
1545
+ sha256: string;
1546
+ path: string;
1527
1547
  }>>;
1528
1548
  reviewerPanel: z.ZodOptional<z.ZodArray<z.ZodObject<{
1529
1549
  harness: z.ZodString;
@@ -1545,133 +1565,128 @@ export declare const ControlThreadTurnRequest: z.ZodObject<Omit<{
1545
1565
  denyPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1546
1566
  outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1547
1567
  maxTurns: z.ZodOptional<z.ZodNumber>;
1548
- }, "threadId" | "turnId" | "retryOf" | "parentRunId" | "delegatedFromRunId" | "scope" | "execution"> & {
1568
+ }, "delegatedFromRunId" | "execution" | "parentRunId" | "planRef" | "retryOf" | "scope" | "threadId" | "turnId"> & {
1569
+ /** Source plan whose open questions this follow-up answers. The thread
1570
+ * route validates ownership/current-head/duplicate submission. */
1571
+ answersPlanRunId: z.ZodOptional<z.ZodString>;
1549
1572
  /** Implement-plan only: explicitly proceed although the plan still has
1550
1573
  * open questions (D17). Recorded on the turn for provenance. */
1551
1574
  overridePlanReadiness: z.ZodOptional<z.ZodBoolean>;
1552
1575
  }, "strict", z.ZodTypeAny, {
1553
- mode: "ask" | "plan" | "agent";
1554
1576
  prompt: string;
1555
- web?: "off" | "auto" | "cached" | "live" | undefined;
1556
1577
  instructions?: string | undefined;
1557
- access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1558
1578
  attachments?: {
1559
1579
  resourceId: string;
1560
1580
  }[] | undefined;
1561
- browser?: boolean | undefined;
1562
- planRunId?: string | undefined;
1563
- planRef?: {
1564
- path: string;
1565
- sha256: string;
1566
- runId: string;
1567
- } | undefined;
1568
- models?: Record<string, string> | undefined;
1581
+ mode: "agent" | "ask" | "plan";
1569
1582
  harnesses?: string[] | undefined;
1583
+ primaryHarness?: string | undefined;
1584
+ routingGoal?: "auto" | "economy" | "quality" | undefined;
1570
1585
  model?: string | undefined;
1586
+ models?: Record<string, string> | undefined;
1571
1587
  effort?: string | undefined;
1572
- tests?: {
1573
- args: string[];
1574
- program: string;
1575
- envAllowlist: string[];
1576
- cwd?: string | undefined;
1577
- }[] | undefined;
1578
- primaryHarness?: string | undefined;
1579
- routingGoal?: "auto" | "quality" | "economy" | undefined;
1580
1588
  efforts?: Record<string, string> | undefined;
1581
- reviewerModels?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", string>> | undefined;
1582
- reviewerEfforts?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", string>> | undefined;
1589
+ reviewerModels?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
1590
+ reviewerEfforts?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
1583
1591
  n?: number | undefined;
1584
1592
  attempts?: number | null | undefined;
1585
1593
  untilClean?: boolean | undefined;
1586
1594
  deepScan?: boolean | undefined;
1587
1595
  create?: boolean | undefined;
1588
1596
  council?: boolean | undefined;
1589
- synthesis?: "auto" | "never" | "always" | undefined;
1597
+ synthesis?: "always" | "auto" | "never" | undefined;
1590
1598
  paidBudget?: {
1591
1599
  kind: "unlimited";
1592
1600
  } | {
1593
1601
  kind: "finite";
1594
1602
  maxUsd: number;
1595
1603
  } | undefined;
1596
- externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
1604
+ access?: "external_sandbox_full" | "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
1605
+ web?: "auto" | "cached" | "live" | "off" | undefined;
1606
+ externalContextPolicy?: "auto" | "cached" | "live" | "off" | undefined;
1607
+ browser?: boolean | undefined;
1608
+ tests?: {
1609
+ program: string;
1610
+ args: string[];
1611
+ cwd?: string | undefined;
1612
+ envAllowlist: string[];
1613
+ }[] | undefined;
1597
1614
  protectedPathApprovals?: {
1598
1615
  path: string;
1599
1616
  reason?: string | undefined;
1600
1617
  }[] | undefined;
1618
+ planRunId?: string | undefined;
1601
1619
  reviewerPanel?: {
1602
1620
  harness: string;
1603
1621
  model?: string | undefined;
1604
1622
  effort?: string | undefined;
1605
1623
  }[] | undefined;
1606
- authPreference?: "auto" | "subscription" | "api_key" | undefined;
1624
+ authPreference?: "api_key" | "auto" | "subscription" | undefined;
1607
1625
  credentialProfileId?: string | null | undefined;
1608
1626
  delegate?: boolean | undefined;
1609
1627
  maxSeconds?: number | undefined;
1610
1628
  denyPaths?: string[] | undefined;
1611
1629
  outputSchema?: Record<string, unknown> | undefined;
1612
1630
  maxTurns?: number | undefined;
1631
+ answersPlanRunId?: string | undefined;
1613
1632
  overridePlanReadiness?: boolean | undefined;
1614
1633
  }, {
1615
- web?: "off" | "auto" | "cached" | "live" | undefined;
1616
- instructions?: string | undefined;
1617
- mode?: "ask" | "plan" | "agent" | undefined;
1618
1634
  prompt?: string | undefined;
1619
- access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1635
+ instructions?: string | undefined;
1620
1636
  attachments?: {
1621
1637
  resourceId: string;
1622
1638
  }[] | undefined;
1623
- browser?: boolean | undefined;
1624
- planRunId?: string | undefined;
1625
- planRef?: {
1626
- path: string;
1627
- sha256: string;
1628
- runId: string;
1629
- } | undefined;
1630
- models?: Record<string, string> | undefined;
1639
+ mode?: "agent" | "ask" | "plan" | undefined;
1631
1640
  harnesses?: string[] | undefined;
1641
+ primaryHarness?: string | undefined;
1642
+ routingGoal?: "auto" | "economy" | "quality" | undefined;
1632
1643
  model?: string | undefined;
1644
+ models?: Record<string, string> | undefined;
1633
1645
  effort?: string | undefined;
1634
- tests?: {
1635
- program: string;
1636
- args?: string[] | undefined;
1637
- cwd?: string | undefined;
1638
- envAllowlist?: string[] | undefined;
1639
- }[] | undefined;
1640
- primaryHarness?: string | undefined;
1641
- routingGoal?: "auto" | "quality" | "economy" | undefined;
1642
1646
  efforts?: Record<string, string> | undefined;
1643
- reviewerModels?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", string>> | undefined;
1644
- reviewerEfforts?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", string>> | undefined;
1647
+ reviewerModels?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
1648
+ reviewerEfforts?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
1645
1649
  n?: number | undefined;
1646
1650
  attempts?: number | null | undefined;
1647
1651
  untilClean?: boolean | undefined;
1648
1652
  deepScan?: boolean | undefined;
1649
1653
  create?: boolean | undefined;
1650
1654
  council?: boolean | undefined;
1651
- synthesis?: "auto" | "never" | "always" | undefined;
1655
+ synthesis?: "always" | "auto" | "never" | undefined;
1652
1656
  paidBudget?: {
1653
1657
  kind: "unlimited";
1654
1658
  } | {
1655
1659
  kind: "finite";
1656
1660
  maxUsd: number;
1657
1661
  } | undefined;
1658
- externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
1662
+ access?: "external_sandbox_full" | "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
1663
+ web?: "auto" | "cached" | "live" | "off" | undefined;
1664
+ externalContextPolicy?: "auto" | "cached" | "live" | "off" | undefined;
1665
+ browser?: boolean | undefined;
1666
+ tests?: {
1667
+ program: string;
1668
+ args?: string[] | undefined;
1669
+ cwd?: string | undefined;
1670
+ envAllowlist?: string[] | undefined;
1671
+ }[] | undefined;
1659
1672
  protectedPathApprovals?: {
1660
1673
  path: string;
1661
1674
  reason?: string | undefined;
1662
1675
  }[] | undefined;
1676
+ planRunId?: string | undefined;
1663
1677
  reviewerPanel?: {
1664
1678
  harness: string;
1665
1679
  model?: string | undefined;
1666
1680
  effort?: string | undefined;
1667
1681
  }[] | undefined;
1668
- authPreference?: "auto" | "subscription" | "api_key" | undefined;
1682
+ authPreference?: "api_key" | "auto" | "subscription" | undefined;
1669
1683
  credentialProfileId?: string | null | undefined;
1670
1684
  delegate?: boolean | undefined;
1671
1685
  maxSeconds?: number | undefined;
1672
1686
  denyPaths?: string[] | undefined;
1673
1687
  outputSchema?: Record<string, unknown> | undefined;
1674
1688
  maxTurns?: number | undefined;
1689
+ answersPlanRunId?: string | undefined;
1675
1690
  overridePlanReadiness?: boolean | undefined;
1676
1691
  }>;
1677
1692
  export type ControlThreadTurnRequest = z.infer<typeof ControlThreadTurnRequest>;
@@ -1684,34 +1699,34 @@ export declare const ControlThreadTurnResponse: z.ZodUnion<[z.ZodObject<{
1684
1699
  threadId: z.ZodString;
1685
1700
  turnId: z.ZodString;
1686
1701
  }, "strip", z.ZodTypeAny, {
1687
- threadId: string;
1688
- turnId: string;
1689
- runId: string;
1690
- runDir: string;
1691
1702
  jobId?: string | undefined;
1703
+ runId: string;
1692
1704
  taskId?: string | undefined;
1693
- }, {
1705
+ runDir: string;
1694
1706
  threadId: string;
1695
1707
  turnId: string;
1696
- runId: string;
1697
- runDir: string;
1708
+ }, {
1698
1709
  jobId?: string | undefined;
1710
+ runId: string;
1699
1711
  taskId?: string | undefined;
1712
+ runDir: string;
1713
+ threadId: string;
1714
+ turnId: string;
1700
1715
  }>, z.ZodObject<{
1701
1716
  jobId: z.ZodString;
1702
1717
  threadId: z.ZodString;
1703
1718
  turnId: z.ZodString;
1704
1719
  state: z.ZodString;
1705
1720
  }, "strict", z.ZodTypeAny, {
1706
- state: string;
1721
+ jobId: string;
1707
1722
  threadId: string;
1708
1723
  turnId: string;
1709
- jobId: string;
1710
- }, {
1711
1724
  state: string;
1725
+ }, {
1726
+ jobId: string;
1712
1727
  threadId: string;
1713
1728
  turnId: string;
1714
- jobId: string;
1729
+ state: string;
1715
1730
  }>]>;
1716
1731
  export type ControlThreadTurnResponse = z.infer<typeof ControlThreadTurnResponse>;
1717
1732
  //# sourceMappingURL=control-operation-responses.d.ts.map