@claudexor/schema 1.0.1 → 2.1.1

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 (278) hide show
  1. package/dist/agent-capabilities.d.ts +102 -30
  2. package/dist/agent-capabilities.d.ts.map +1 -1
  3. package/dist/agent-capabilities.js +49 -18
  4. package/dist/agent-capabilities.js.map +1 -1
  5. package/dist/apply-eligibility.d.ts.map +1 -1
  6. package/dist/apply-eligibility.js +22 -6
  7. package/dist/apply-eligibility.js.map +1 -1
  8. package/dist/attachment.d.ts +117 -52
  9. package/dist/attachment.d.ts.map +1 -1
  10. package/dist/attachment.js +60 -45
  11. package/dist/attachment.js.map +1 -1
  12. package/dist/auth.d.ts +1444 -0
  13. package/dist/auth.d.ts.map +1 -0
  14. package/dist/auth.js +371 -0
  15. package/dist/auth.js.map +1 -0
  16. package/dist/budget.d.ts +147 -18
  17. package/dist/budget.d.ts.map +1 -1
  18. package/dist/budget.js +80 -22
  19. package/dist/budget.js.map +1 -1
  20. package/dist/config.d.ts +829 -135
  21. package/dist/config.d.ts.map +1 -1
  22. package/dist/config.js +195 -41
  23. package/dist/config.js.map +1 -1
  24. package/dist/context.d.ts +6 -6
  25. package/dist/context.d.ts.map +1 -1
  26. package/dist/context.js +31 -7
  27. package/dist/context.js.map +1 -1
  28. package/dist/control-gc.d.ts +185 -0
  29. package/dist/control-gc.d.ts.map +1 -0
  30. package/dist/control-gc.js +81 -0
  31. package/dist/control-gc.js.map +1 -0
  32. package/dist/control-operation-responses.d.ts +1298 -0
  33. package/dist/control-operation-responses.d.ts.map +1 -0
  34. package/dist/control-operation-responses.js +35 -0
  35. package/dist/control-operation-responses.js.map +1 -0
  36. package/dist/control-run-detail.d.ts +556 -247
  37. package/dist/control-run-detail.d.ts.map +1 -1
  38. package/dist/control-run-detail.js +72 -17
  39. package/dist/control-run-detail.js.map +1 -1
  40. package/dist/control-run-retry.d.ts +88 -0
  41. package/dist/control-run-retry.d.ts.map +1 -0
  42. package/dist/control-run-retry.js +40 -0
  43. package/dist/control-run-retry.js.map +1 -0
  44. package/dist/control-run-scope.d.ts +25 -0
  45. package/dist/control-run-scope.d.ts.map +1 -0
  46. package/dist/control-run-scope.js +22 -0
  47. package/dist/control-run-scope.js.map +1 -0
  48. package/dist/control-secret.d.ts +90 -0
  49. package/dist/control-secret.d.ts.map +1 -0
  50. package/dist/control-secret.js +35 -0
  51. package/dist/control-secret.js.map +1 -0
  52. package/dist/control-spec.d.ts +592 -0
  53. package/dist/control-spec.d.ts.map +1 -0
  54. package/dist/control-spec.js +85 -0
  55. package/dist/control-spec.js.map +1 -0
  56. package/dist/control-thread-apply.d.ts +175 -0
  57. package/dist/control-thread-apply.d.ts.map +1 -0
  58. package/dist/control-thread-apply.js +31 -0
  59. package/dist/control-thread-apply.js.map +1 -0
  60. package/dist/control-trust.d.ts +74 -10
  61. package/dist/control-trust.d.ts.map +1 -1
  62. package/dist/control-trust.js +31 -11
  63. package/dist/control-trust.js.map +1 -1
  64. package/dist/control.d.ts +1688 -1334
  65. package/dist/control.d.ts.map +1 -1
  66. package/dist/control.js +592 -333
  67. package/dist/control.js.map +1 -1
  68. package/dist/credential-profile.d.ts +454 -0
  69. package/dist/credential-profile.d.ts.map +1 -0
  70. package/dist/credential-profile.js +140 -0
  71. package/dist/credential-profile.js.map +1 -0
  72. package/dist/decision.d.ts +10 -10
  73. package/dist/decision.d.ts.map +1 -1
  74. package/dist/decision.js +62 -15
  75. package/dist/decision.js.map +1 -1
  76. package/dist/delivery.d.ts +99 -0
  77. package/dist/delivery.d.ts.map +1 -0
  78. package/dist/delivery.js +19 -0
  79. package/dist/delivery.js.map +1 -0
  80. package/dist/events.d.ts +41 -4
  81. package/dist/events.d.ts.map +1 -1
  82. package/dist/events.js +47 -4
  83. package/dist/events.js.map +1 -1
  84. package/dist/gate.d.ts +5 -5
  85. package/dist/gate.d.ts.map +1 -1
  86. package/dist/gate.js +25 -5
  87. package/dist/gate.js.map +1 -1
  88. package/dist/harness.d.ts +775 -237
  89. package/dist/harness.d.ts.map +1 -1
  90. package/dist/harness.js +314 -111
  91. package/dist/harness.js.map +1 -1
  92. package/dist/index.d.ts +19 -0
  93. package/dist/index.d.ts.map +1 -1
  94. package/dist/index.js +19 -0
  95. package/dist/index.js.map +1 -1
  96. package/dist/operation.d.ts +185 -0
  97. package/dist/operation.d.ts.map +1 -0
  98. package/dist/operation.js +50 -0
  99. package/dist/operation.js.map +1 -0
  100. package/dist/orchestrate.d.ts +150 -22
  101. package/dist/orchestrate.d.ts.map +1 -1
  102. package/dist/orchestrate.js +117 -7
  103. package/dist/orchestrate.js.map +1 -1
  104. package/dist/primitives.d.ts.map +1 -1
  105. package/dist/primitives.js +4 -1
  106. package/dist/primitives.js.map +1 -1
  107. package/dist/problem.d.ts +29 -0
  108. package/dist/problem.d.ts.map +1 -0
  109. package/dist/problem.js +17 -0
  110. package/dist/problem.js.map +1 -0
  111. package/dist/project.d.ts +97 -0
  112. package/dist/project.d.ts.map +1 -0
  113. package/dist/project.js +27 -0
  114. package/dist/project.js.map +1 -0
  115. package/dist/quota.d.ts +269 -0
  116. package/dist/quota.d.ts.map +1 -0
  117. package/dist/quota.js +58 -0
  118. package/dist/quota.js.map +1 -0
  119. package/dist/raw.d.ts +195 -0
  120. package/dist/raw.d.ts.map +1 -0
  121. package/dist/raw.js +58 -0
  122. package/dist/raw.js.map +1 -0
  123. package/dist/readiness.d.ts +596 -0
  124. package/dist/readiness.d.ts.map +1 -0
  125. package/dist/readiness.js +87 -0
  126. package/dist/readiness.js.map +1 -0
  127. package/dist/recovery.d.ts +515 -0
  128. package/dist/recovery.d.ts.map +1 -0
  129. package/dist/recovery.js +93 -0
  130. package/dist/recovery.js.map +1 -0
  131. package/dist/request-requirements.d.ts +36 -0
  132. package/dist/request-requirements.d.ts.map +1 -0
  133. package/dist/request-requirements.js +29 -0
  134. package/dist/request-requirements.js.map +1 -0
  135. package/dist/review.d.ts +26 -26
  136. package/dist/review.d.ts.map +1 -1
  137. package/dist/review.js +50 -10
  138. package/dist/review.js.map +1 -1
  139. package/dist/route.d.ts +13 -13
  140. package/dist/route.d.ts.map +1 -1
  141. package/dist/route.js +19 -4
  142. package/dist/route.js.map +1 -1
  143. package/dist/setup.d.ts +9811 -0
  144. package/dist/setup.d.ts.map +1 -0
  145. package/dist/setup.js +475 -0
  146. package/dist/setup.js.map +1 -0
  147. package/dist/spec.d.ts +178 -61
  148. package/dist/spec.d.ts.map +1 -1
  149. package/dist/spec.js +69 -16
  150. package/dist/spec.js.map +1 -1
  151. package/dist/surface-run-controls.d.ts.map +1 -1
  152. package/dist/surface-run-controls.js +25 -21
  153. package/dist/surface-run-controls.js.map +1 -1
  154. package/dist/task.d.ts +1657 -60
  155. package/dist/task.d.ts.map +1 -1
  156. package/dist/task.js +144 -18
  157. package/dist/task.js.map +1 -1
  158. package/dist/telemetry.d.ts +487 -72
  159. package/dist/telemetry.d.ts.map +1 -1
  160. package/dist/telemetry.js +194 -16
  161. package/dist/telemetry.js.map +1 -1
  162. package/dist/thread.d.ts +89 -51
  163. package/dist/thread.d.ts.map +1 -1
  164. package/dist/thread.js +56 -11
  165. package/dist/thread.js.map +1 -1
  166. package/dist/tool-ref.d.ts +45 -0
  167. package/dist/tool-ref.d.ts.map +1 -0
  168. package/dist/tool-ref.js +45 -0
  169. package/dist/tool-ref.js.map +1 -0
  170. package/dist/workproduct.d.ts +3 -3
  171. package/dist/workproduct.d.ts.map +1 -1
  172. package/dist/workproduct.js.map +1 -1
  173. package/dist/workspace.d.ts +3 -3
  174. package/dist/workspace.d.ts.map +1 -1
  175. package/dist/workspace.js +12 -3
  176. package/dist/workspace.js.map +1 -1
  177. package/generated/AgentCapabilityCatalog.schema.json +53 -11
  178. package/generated/BudgetLease.schema.json +55 -6
  179. package/generated/BudgetObservation.schema.json +44 -7
  180. package/generated/ConformanceReport.schema.json +49 -0
  181. package/generated/ControlApplyCheckResponse.schema.json +34 -0
  182. package/generated/ControlArtifactListResponse.schema.json +57 -0
  183. package/generated/ControlAuthReadinessRefreshRequest.schema.json +38 -0
  184. package/generated/ControlAuthReadinessRefreshResponse.schema.json +85 -0
  185. package/generated/ControlCredentialProfileCreateRequest.schema.json +32 -0
  186. package/generated/ControlCredentialProfileCreateResponse.schema.json +142 -0
  187. package/generated/ControlCredentialProfileDeleteResponse.schema.json +107 -0
  188. package/generated/ControlCredentialProfilesResponse.schema.json +155 -0
  189. package/generated/ControlDeliveryResponse.schema.json +136 -0
  190. package/generated/ControlGcReceipt.schema.json +170 -0
  191. package/generated/ControlGcRequest.schema.json +18 -0
  192. package/generated/ControlHandshakeRequest.schema.json +26 -0
  193. package/generated/ControlHandshakeResponse.schema.json +30 -0
  194. package/generated/ControlHarnessListResponse.schema.json +198 -14
  195. package/generated/ControlHarnessModelsResponse.schema.json +19 -0
  196. package/generated/ControlHarnessSettingsPatch.schema.json +9 -12
  197. package/generated/ControlJournalEvent.schema.json +42 -0
  198. package/generated/ControlJournalExportReceipt.schema.json +49 -0
  199. package/generated/ControlJournalInspection.schema.json +149 -0
  200. package/generated/ControlJournalQuarantineReceipt.schema.json +55 -0
  201. package/generated/ControlJournalQuarantineRequest.schema.json +24 -0
  202. package/generated/ControlJournalValidation.schema.json +181 -0
  203. package/generated/ControlOperationCatalog.schema.json +128 -0
  204. package/generated/ControlOperationDescriptor.schema.json +110 -0
  205. package/generated/ControlProblem.schema.json +59 -0
  206. package/generated/ControlProject.schema.json +42 -0
  207. package/generated/ControlProjectListResponse.schema.json +54 -0
  208. package/generated/ControlProjectRegisterRequest.schema.json +19 -0
  209. package/generated/ControlProjectRelinkRequest.schema.json +19 -0
  210. package/generated/ControlQueuedRunInfo.schema.json +4 -2
  211. package/generated/ControlQuotaResponse.schema.json +177 -0
  212. package/generated/ControlResource.schema.json +59 -0
  213. package/generated/ControlRunAgainDraft.schema.json +539 -0
  214. package/generated/ControlRunDetail.schema.json +373 -34
  215. package/generated/ControlRunListResponse.schema.json +968 -0
  216. package/generated/ControlRunRetryResponse.schema.json +54 -0
  217. package/generated/ControlRunStartRequest.schema.json +123 -55
  218. package/generated/ControlRunStartResponse.schema.json +78 -0
  219. package/generated/ControlRunSummary.schema.json +312 -21
  220. package/generated/ControlSecretListResponse.schema.json +8 -14
  221. package/generated/ControlSecretMutationResponse.schema.json +32 -0
  222. package/generated/ControlSecretSetRequest.schema.json +27 -0
  223. package/generated/ControlSettingsSnapshot.schema.json +128 -44
  224. package/generated/ControlSettingsUpdateRequest.schema.json +119 -40
  225. package/generated/ControlSetupJob.schema.json +770 -64
  226. package/generated/ControlSetupJobCreateRequest.schema.json +16 -13
  227. package/generated/ControlSetupJobEvent.schema.json +869 -5
  228. package/generated/ControlSetupJobListFilter.schema.json +35 -0
  229. package/generated/ControlSetupJobListResponse.schema.json +770 -64
  230. package/generated/ControlSetupJobSnapshot.schema.json +878 -0
  231. package/generated/ControlSpecAnswersRequest.schema.json +74 -0
  232. package/generated/ControlSpecQuestionsRequest.schema.json +128 -2
  233. package/generated/ControlSpecSession.schema.json +249 -0
  234. package/generated/ControlSpecSessionListResponse.schema.json +261 -0
  235. package/generated/ControlThread.schema.json +36 -6
  236. package/generated/ControlThreadApplyResponse.schema.json +139 -0
  237. package/generated/ControlThreadCreateRequest.schema.json +6 -2
  238. package/generated/ControlThreadDetail.schema.json +64 -12
  239. package/generated/ControlThreadListResponse.schema.json +36 -6
  240. package/generated/ControlThreadTurnRequest.schema.json +413 -0
  241. package/generated/ControlThreadTurnResponse.schema.json +73 -0
  242. package/generated/ControlThreadUpdateRequest.schema.json +12 -1
  243. package/generated/ControlTrustListResponse.schema.json +6 -0
  244. package/generated/ControlTrustState.schema.json +6 -0
  245. package/generated/ControlTrustUpdateRequest.schema.json +65 -3
  246. package/generated/ControlUploadCreateRequest.schema.json +37 -0
  247. package/generated/ControlUploadFinalizeRequest.schema.json +17 -0
  248. package/generated/ControlUploadStatus.schema.json +40 -0
  249. package/generated/CredentialProfile.schema.json +78 -0
  250. package/generated/CredentialProfileStatus.schema.json +61 -0
  251. package/generated/DecisionRecord.schema.json +6 -3
  252. package/generated/GlobalConfig.schema.json +238 -55
  253. package/generated/HarnessEvent.schema.json +259 -11
  254. package/generated/HarnessManifest.schema.json +96 -14
  255. package/generated/HarnessModel.schema.json +19 -0
  256. package/generated/HarnessStatusDto.schema.json +198 -14
  257. package/generated/OrchestrateContract.schema.json +32 -6
  258. package/generated/OrchestratePlan.schema.json +20 -0
  259. package/generated/OrchestratePlanProgress.schema.json +61 -0
  260. package/generated/PaidBudget.schema.json +42 -0
  261. package/generated/Project.schema.json +45 -0
  262. package/generated/ProjectConfig.schema.json +45 -18
  263. package/generated/RawContextPacket.schema.json +184 -0
  264. package/generated/RawGitPatchEnvelope.schema.json +70 -0
  265. package/generated/RunEvent.schema.json +3 -0
  266. package/generated/RunTelemetry.schema.json +280 -0
  267. package/generated/SecretMetadata.schema.json +4 -7
  268. package/generated/Session.schema.json +14 -0
  269. package/generated/SpecPack.schema.json +118 -7
  270. package/generated/TaskContract.schema.json +224 -30
  271. package/generated/TestCommandInvocation.schema.json +45 -0
  272. package/generated/Thread.schema.json +74 -6
  273. package/generated/ThreadHeadPing.schema.json +40 -0
  274. package/generated/ThreadTurn.schema.json +24 -11
  275. package/generated/TrustConfig.schema.json +77 -0
  276. package/package.json +3 -2
  277. package/generated/ControlSetupJobConfirmRequest.schema.json +0 -18
  278. package/generated/ControlSpecFreezeRequest.schema.json +0 -83
@@ -0,0 +1,1298 @@
1
+ import { z } from "zod";
2
+ export declare const ControlRunStartResponse: z.ZodUnion<[z.ZodObject<{
3
+ jobId: z.ZodOptional<z.ZodString>;
4
+ runId: z.ZodString;
5
+ taskId: z.ZodOptional<z.ZodString>;
6
+ runDir: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ runId: string;
9
+ runDir: string;
10
+ jobId?: string | undefined;
11
+ taskId?: string | undefined;
12
+ }, {
13
+ runId: string;
14
+ runDir: string;
15
+ jobId?: string | undefined;
16
+ taskId?: string | undefined;
17
+ }>, z.ZodObject<{
18
+ jobId: z.ZodString;
19
+ state: z.ZodEnum<["queued", "running", "blocked", "succeeded", "no_op", "ungated", "review_not_run", "failed", "cancelled", "interrupted_unknown", "cost_unverifiable", "exhausted_overshoot", "exhausted", "not_converged", "stuck_no_progress"]>;
20
+ error: z.ZodOptional<z.ZodString>;
21
+ }, "strip", z.ZodTypeAny, {
22
+ state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress" | "queued" | "succeeded";
23
+ jobId: string;
24
+ error?: string | undefined;
25
+ }, {
26
+ state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress" | "queued" | "succeeded";
27
+ jobId: string;
28
+ error?: string | undefined;
29
+ }>]>;
30
+ export type ControlRunStartResponse = z.infer<typeof ControlRunStartResponse>;
31
+ export declare const ControlRunListResponse: z.ZodObject<{
32
+ runs: z.ZodDefault<z.ZodArray<z.ZodObject<{
33
+ jobId: z.ZodString;
34
+ runId: z.ZodString;
35
+ taskId: z.ZodOptional<z.ZodString>;
36
+ state: z.ZodEnum<["queued", "running", "blocked", "succeeded", "no_op", "ungated", "review_not_run", "failed", "cancelled", "interrupted_unknown", "cost_unverifiable", "exhausted_overshoot", "exhausted", "not_converged", "stuck_no_progress"]>;
37
+ runDir: z.ZodOptional<z.ZodString>;
38
+ error: z.ZodOptional<z.ZodString>;
39
+ failure: z.ZodDefault<z.ZodNullable<z.ZodObject<{
40
+ phase: z.ZodDefault<z.ZodString>;
41
+ category: z.ZodDefault<z.ZodEnum<["validation", "project", "auth", "harness_unavailable", "harness_error", "budget", "policy", "cancelled", "internal", "unknown"]>>;
42
+ harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
43
+ attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
44
+ safeMessage: z.ZodString;
45
+ rawDetailRef: z.ZodDefault<z.ZodNullable<z.ZodString>>;
46
+ logRefs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
47
+ eventRefs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
48
+ runDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
49
+ nextActions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
50
+ }, "strip", z.ZodTypeAny, {
51
+ harnessId: string | null;
52
+ attemptId: string | null;
53
+ runDir: string | null;
54
+ phase: string;
55
+ category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal";
56
+ safeMessage: string;
57
+ rawDetailRef: string | null;
58
+ logRefs: string[];
59
+ eventRefs: string[];
60
+ nextActions: string[];
61
+ }, {
62
+ safeMessage: string;
63
+ harnessId?: string | null | undefined;
64
+ attemptId?: string | null | undefined;
65
+ runDir?: string | null | undefined;
66
+ phase?: string | undefined;
67
+ category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal" | undefined;
68
+ rawDetailRef?: string | null | undefined;
69
+ logRefs?: string[] | undefined;
70
+ eventRefs?: string[] | undefined;
71
+ nextActions?: string[] | undefined;
72
+ }>>>;
73
+ project: z.ZodDefault<z.ZodObject<{
74
+ kind: z.ZodDefault<z.ZodEnum<["project", "none"]>>;
75
+ root: z.ZodDefault<z.ZodNullable<z.ZodString>>;
76
+ projectName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
77
+ context: z.ZodDefault<z.ZodEnum<["off", "auto"]>>;
78
+ }, "strip", z.ZodTypeAny, {
79
+ kind: "none" | "project";
80
+ root: string | null;
81
+ context: "off" | "auto";
82
+ projectName: string | null;
83
+ }, {
84
+ kind?: "none" | "project" | undefined;
85
+ root?: string | null | undefined;
86
+ context?: "off" | "auto" | undefined;
87
+ projectName?: string | null | undefined;
88
+ }>>;
89
+ mode: z.ZodOptional<z.ZodEnum<["ask", "plan", "audit", "agent", "orchestrate"]>>;
90
+ strategy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["race", "attempts", "until_clean", "swarm", "create"]>>>;
91
+ prompt: z.ZodOptional<z.ZodString>;
92
+ harnesses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
93
+ primaryHarness: z.ZodOptional<z.ZodString>;
94
+ routingGoal: z.ZodOptional<z.ZodEnum<["auto", "quality", "economy"]>>;
95
+ model: z.ZodOptional<z.ZodString>;
96
+ reviewerPanel: z.ZodOptional<z.ZodArray<z.ZodObject<{
97
+ harness: z.ZodString;
98
+ model: z.ZodOptional<z.ZodString>;
99
+ effort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>;
100
+ }, "strict", z.ZodTypeAny, {
101
+ harness: string;
102
+ model?: string | undefined;
103
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
104
+ }, {
105
+ harness: string;
106
+ model?: string | undefined;
107
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
108
+ }>, "many">>;
109
+ protectedPathApprovals: z.ZodOptional<z.ZodArray<z.ZodObject<{
110
+ path: z.ZodString;
111
+ reason: z.ZodOptional<z.ZodString>;
112
+ }, "strict", z.ZodTypeAny, {
113
+ path: string;
114
+ reason?: string | undefined;
115
+ }, {
116
+ path: string;
117
+ reason?: string | undefined;
118
+ }>, "many">>;
119
+ n: z.ZodOptional<z.ZodNumber>;
120
+ paidBudget: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
121
+ kind: z.ZodLiteral<"unlimited">;
122
+ }, "strict", z.ZodTypeAny, {
123
+ kind: "unlimited";
124
+ }, {
125
+ kind: "unlimited";
126
+ }>, z.ZodObject<{
127
+ kind: z.ZodLiteral<"finite">;
128
+ maxUsd: z.ZodNumber;
129
+ }, "strict", z.ZodTypeAny, {
130
+ kind: "finite";
131
+ maxUsd: number;
132
+ }, {
133
+ kind: "finite";
134
+ maxUsd: number;
135
+ }>]>>;
136
+ spendUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
137
+ spendEstimated: z.ZodOptional<z.ZodBoolean>;
138
+ inputTokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
139
+ outputTokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
140
+ cachedInputTokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
141
+ outputConformance: z.ZodOptional<z.ZodNullable<z.ZodEnum<["passed", "failed"]>>>;
142
+ authRoute: z.ZodOptional<z.ZodNullable<z.ZodObject<{
143
+ requested: z.ZodEnum<["subscription", "api_key", "auto"]>;
144
+ effective: z.ZodDefault<z.ZodNullable<z.ZodEnum<["local_session", "api_key", "unknown"]>>>;
145
+ source: z.ZodDefault<z.ZodNullable<z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>>>;
146
+ reason: z.ZodEnum<["as_requested", "native_first", "no_native_session_fallback", "requested_route_unavailable", "undisclosed"]>;
147
+ harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
148
+ attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
149
+ modelMismatch: z.ZodDefault<z.ZodNullable<z.ZodObject<{
150
+ requested: z.ZodString;
151
+ observed: z.ZodString;
152
+ }, "strip", z.ZodTypeAny, {
153
+ requested: string;
154
+ observed: string;
155
+ }, {
156
+ requested: string;
157
+ observed: string;
158
+ }>>>;
159
+ }, "strip", z.ZodTypeAny, {
160
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
161
+ harnessId: string | null;
162
+ requested: "auto" | "subscription" | "api_key";
163
+ attemptId: string | null;
164
+ effective: "unknown" | "api_key" | "local_session" | null;
165
+ reason: "as_requested" | "native_first" | "no_native_session_fallback" | "requested_route_unavailable" | "undisclosed";
166
+ modelMismatch: {
167
+ requested: string;
168
+ observed: string;
169
+ } | null;
170
+ }, {
171
+ requested: "auto" | "subscription" | "api_key";
172
+ reason: "as_requested" | "native_first" | "no_native_session_fallback" | "requested_route_unavailable" | "undisclosed";
173
+ source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
174
+ harnessId?: string | null | undefined;
175
+ attemptId?: string | null | undefined;
176
+ effective?: "unknown" | "api_key" | "local_session" | null | undefined;
177
+ modelMismatch?: {
178
+ requested: string;
179
+ observed: string;
180
+ } | null | undefined;
181
+ }>>>;
182
+ access: z.ZodOptional<z.ZodEnum<["readonly", "workspace_write", "full", "external_sandbox_full", "inherit_native"]>>;
183
+ requestedAccess: z.ZodOptional<z.ZodEnum<["readonly", "workspace_write", "full", "external_sandbox_full", "inherit_native"]>>;
184
+ effectiveAccess: z.ZodOptional<z.ZodEnum<["readonly", "workspace_write", "full", "external_sandbox_full", "inherit_native"]>>;
185
+ externalContextPolicy: z.ZodOptional<z.ZodEnum<["off", "auto", "cached", "live"]>>;
186
+ webRequired: z.ZodOptional<z.ZodBoolean>;
187
+ webMode: z.ZodOptional<z.ZodEnum<["off", "auto", "cached", "live"]>>;
188
+ webEvidence: z.ZodDefault<z.ZodObject<{
189
+ required: z.ZodDefault<z.ZodBoolean>;
190
+ mode: z.ZodDefault<z.ZodEnum<["off", "auto", "cached", "live"]>>;
191
+ effectiveMode: z.ZodDefault<z.ZodEnum<["off", "auto", "cached", "live"]>>;
192
+ attempted: z.ZodDefault<z.ZodBoolean>;
193
+ satisfied: z.ZodDefault<z.ZodBoolean>;
194
+ status: z.ZodDefault<z.ZodEnum<["none", "attempted", "satisfied", "failed", "unverified"]>>;
195
+ tool: z.ZodDefault<z.ZodNullable<z.ZodString>>;
196
+ target: z.ZodDefault<z.ZodNullable<z.ZodString>>;
197
+ errorSummary: z.ZodDefault<z.ZodNullable<z.ZodString>>;
198
+ rawDetailRef: z.ZodDefault<z.ZodNullable<z.ZodString>>;
199
+ available: z.ZodDefault<z.ZodBoolean>;
200
+ }, "strip", z.ZodTypeAny, {
201
+ status: "failed" | "none" | "attempted" | "satisfied" | "unverified";
202
+ available: boolean;
203
+ target: string | null;
204
+ mode: "off" | "auto" | "cached" | "live";
205
+ tool: string | null;
206
+ required: boolean;
207
+ attempted: boolean;
208
+ rawDetailRef: string | null;
209
+ effectiveMode: "off" | "auto" | "cached" | "live";
210
+ satisfied: boolean;
211
+ errorSummary: string | null;
212
+ }, {
213
+ status?: "failed" | "none" | "attempted" | "satisfied" | "unverified" | undefined;
214
+ available?: boolean | undefined;
215
+ target?: string | null | undefined;
216
+ mode?: "off" | "auto" | "cached" | "live" | undefined;
217
+ tool?: string | null | undefined;
218
+ required?: boolean | undefined;
219
+ attempted?: boolean | undefined;
220
+ rawDetailRef?: string | null | undefined;
221
+ effectiveMode?: "off" | "auto" | "cached" | "live" | undefined;
222
+ satisfied?: boolean | undefined;
223
+ errorSummary?: string | null | undefined;
224
+ }>>;
225
+ requestRequirements: z.ZodDefault<z.ZodArray<z.ZodObject<{
226
+ capability: z.ZodEnum<["browser", "path_deny"]>;
227
+ harness_id: z.ZodString;
228
+ eligible: z.ZodBoolean;
229
+ requested: z.ZodBoolean;
230
+ effective: z.ZodBoolean;
231
+ reason: z.ZodEnum<["not_requested", "effective", "manifest_unsupported", "web_policy_off", "access_profile_incompatible", "postdiff_only"]>;
232
+ evidence_refs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
233
+ }, "strip", z.ZodTypeAny, {
234
+ requested: boolean;
235
+ effective: boolean;
236
+ harness_id: string;
237
+ reason: "effective" | "not_requested" | "manifest_unsupported" | "web_policy_off" | "access_profile_incompatible" | "postdiff_only";
238
+ evidence_refs: string[];
239
+ eligible: boolean;
240
+ capability: "browser" | "path_deny";
241
+ }, {
242
+ requested: boolean;
243
+ effective: boolean;
244
+ harness_id: string;
245
+ reason: "effective" | "not_requested" | "manifest_unsupported" | "web_policy_off" | "access_profile_incompatible" | "postdiff_only";
246
+ eligible: boolean;
247
+ capability: "browser" | "path_deny";
248
+ evidence_refs?: string[] | undefined;
249
+ }>, "many">>;
250
+ toolPermissionPolicy: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
251
+ outputReadyState: z.ZodDefault<z.ZodEnum<["pending", "finalizing", "ready", "diagnostic"]>>;
252
+ toolWarningsTotal: z.ZodDefault<z.ZodNumber>;
253
+ result: z.ZodDefault<z.ZodObject<{
254
+ kind: z.ZodDefault<z.ZodEnum<["patch", "answer", "plan", "report", "none"]>>;
255
+ diffStat: z.ZodDefault<z.ZodNullable<z.ZodObject<{
256
+ files: z.ZodNumber;
257
+ additions: z.ZodNumber;
258
+ deletions: z.ZodNumber;
259
+ }, "strip", z.ZodTypeAny, {
260
+ files: number;
261
+ additions: number;
262
+ deletions: number;
263
+ }, {
264
+ files: number;
265
+ additions: number;
266
+ deletions: number;
267
+ }>>>;
268
+ blockers: z.ZodDefault<z.ZodNumber>;
269
+ adopted: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
270
+ applyState: z.ZodDefault<z.ZodEnum<["not_applied", "applied", "applied_review_blocked", "reverted"]>>;
271
+ preTurnSha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
272
+ postTurnSha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
273
+ revertAnchorId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
274
+ revertable: z.ZodDefault<z.ZodBoolean>;
275
+ }, "strip", z.ZodTypeAny, {
276
+ kind: "plan" | "none" | "patch" | "answer" | "report";
277
+ diffStat: {
278
+ files: number;
279
+ additions: number;
280
+ deletions: number;
281
+ } | null;
282
+ blockers: number;
283
+ adopted: boolean | null;
284
+ applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
285
+ preTurnSha: string | null;
286
+ postTurnSha: string | null;
287
+ revertAnchorId: string | null;
288
+ revertable: boolean;
289
+ }, {
290
+ kind?: "plan" | "none" | "patch" | "answer" | "report" | undefined;
291
+ diffStat?: {
292
+ files: number;
293
+ additions: number;
294
+ deletions: number;
295
+ } | null | undefined;
296
+ blockers?: number | undefined;
297
+ adopted?: boolean | null | undefined;
298
+ applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
299
+ preTurnSha?: string | null | undefined;
300
+ postTurnSha?: string | null | undefined;
301
+ revertAnchorId?: string | null | undefined;
302
+ revertable?: boolean | undefined;
303
+ }>>;
304
+ waitingOnUser: z.ZodDefault<z.ZodBoolean>;
305
+ route: z.ZodDefault<z.ZodNullable<z.ZodObject<{
306
+ requestedModel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
307
+ observedModel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
308
+ harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
309
+ verified: z.ZodDefault<z.ZodBoolean>;
310
+ }, "strip", z.ZodTypeAny, {
311
+ harnessId: string | null;
312
+ requestedModel: string | null;
313
+ observedModel: string | null;
314
+ verified: boolean;
315
+ }, {
316
+ harnessId?: string | null | undefined;
317
+ requestedModel?: string | null | undefined;
318
+ observedModel?: string | null | undefined;
319
+ verified?: boolean | undefined;
320
+ }>>>;
321
+ tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
322
+ program: z.ZodString;
323
+ args: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
324
+ cwd: z.ZodOptional<z.ZodString>;
325
+ envAllowlist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
326
+ }, "strict", z.ZodTypeAny, {
327
+ program: string;
328
+ args: string[];
329
+ envAllowlist: string[];
330
+ cwd?: string | undefined;
331
+ }, {
332
+ program: string;
333
+ cwd?: string | undefined;
334
+ args?: string[] | undefined;
335
+ envAllowlist?: string[] | undefined;
336
+ }>, "many">>;
337
+ specId: z.ZodOptional<z.ZodString>;
338
+ specHash: z.ZodOptional<z.ZodString>;
339
+ createdAt: z.ZodOptional<z.ZodString>;
340
+ startedAt: z.ZodOptional<z.ZodString>;
341
+ finishedAt: z.ZodOptional<z.ZodString>;
342
+ }, "strip", z.ZodTypeAny, {
343
+ state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress" | "queued" | "succeeded";
344
+ runId: string;
345
+ project: {
346
+ kind: "none" | "project";
347
+ root: string | null;
348
+ context: "off" | "auto";
349
+ projectName: string | null;
350
+ };
351
+ jobId: string;
352
+ failure: {
353
+ harnessId: string | null;
354
+ attemptId: string | null;
355
+ runDir: string | null;
356
+ phase: string;
357
+ category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal";
358
+ safeMessage: string;
359
+ rawDetailRef: string | null;
360
+ logRefs: string[];
361
+ eventRefs: string[];
362
+ nextActions: string[];
363
+ } | null;
364
+ webEvidence: {
365
+ status: "failed" | "none" | "attempted" | "satisfied" | "unverified";
366
+ available: boolean;
367
+ target: string | null;
368
+ mode: "off" | "auto" | "cached" | "live";
369
+ tool: string | null;
370
+ required: boolean;
371
+ attempted: boolean;
372
+ rawDetailRef: string | null;
373
+ effectiveMode: "off" | "auto" | "cached" | "live";
374
+ satisfied: boolean;
375
+ errorSummary: string | null;
376
+ };
377
+ requestRequirements: {
378
+ requested: boolean;
379
+ effective: boolean;
380
+ harness_id: string;
381
+ reason: "effective" | "not_requested" | "manifest_unsupported" | "web_policy_off" | "access_profile_incompatible" | "postdiff_only";
382
+ evidence_refs: string[];
383
+ eligible: boolean;
384
+ capability: "browser" | "path_deny";
385
+ }[];
386
+ outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
387
+ toolWarningsTotal: number;
388
+ result: {
389
+ kind: "plan" | "none" | "patch" | "answer" | "report";
390
+ diffStat: {
391
+ files: number;
392
+ additions: number;
393
+ deletions: number;
394
+ } | null;
395
+ blockers: number;
396
+ adopted: boolean | null;
397
+ applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
398
+ preTurnSha: string | null;
399
+ postTurnSha: string | null;
400
+ revertAnchorId: string | null;
401
+ revertable: boolean;
402
+ };
403
+ waitingOnUser: boolean;
404
+ route: {
405
+ harnessId: string | null;
406
+ requestedModel: string | null;
407
+ observedModel: string | null;
408
+ verified: boolean;
409
+ } | null;
410
+ startedAt?: string | undefined;
411
+ error?: string | undefined;
412
+ createdAt?: string | undefined;
413
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
414
+ prompt?: string | undefined;
415
+ access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
416
+ harnesses?: string[] | undefined;
417
+ runDir?: string | undefined;
418
+ model?: string | undefined;
419
+ tests?: {
420
+ program: string;
421
+ args: string[];
422
+ envAllowlist: string[];
423
+ cwd?: string | undefined;
424
+ }[] | undefined;
425
+ n?: number | undefined;
426
+ taskId?: string | undefined;
427
+ primaryHarness?: string | undefined;
428
+ routingGoal?: "auto" | "quality" | "economy" | undefined;
429
+ paidBudget?: {
430
+ kind: "unlimited";
431
+ } | {
432
+ kind: "finite";
433
+ maxUsd: number;
434
+ } | undefined;
435
+ externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
436
+ protectedPathApprovals?: {
437
+ path: string;
438
+ reason?: string | undefined;
439
+ }[] | undefined;
440
+ specId?: string | undefined;
441
+ specHash?: string | undefined;
442
+ reviewerPanel?: {
443
+ harness: string;
444
+ model?: string | undefined;
445
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
446
+ }[] | undefined;
447
+ strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
448
+ spendUsd?: number | null | undefined;
449
+ spendEstimated?: boolean | undefined;
450
+ inputTokens?: number | null | undefined;
451
+ outputTokens?: number | null | undefined;
452
+ cachedInputTokens?: number | null | undefined;
453
+ outputConformance?: "passed" | "failed" | null | undefined;
454
+ authRoute?: {
455
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
456
+ harnessId: string | null;
457
+ requested: "auto" | "subscription" | "api_key";
458
+ attemptId: string | null;
459
+ effective: "unknown" | "api_key" | "local_session" | null;
460
+ reason: "as_requested" | "native_first" | "no_native_session_fallback" | "requested_route_unavailable" | "undisclosed";
461
+ modelMismatch: {
462
+ requested: string;
463
+ observed: string;
464
+ } | null;
465
+ } | null | undefined;
466
+ requestedAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
467
+ effectiveAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
468
+ webRequired?: boolean | undefined;
469
+ webMode?: "off" | "auto" | "cached" | "live" | undefined;
470
+ toolPermissionPolicy?: Record<string, unknown> | undefined;
471
+ finishedAt?: string | undefined;
472
+ }, {
473
+ state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress" | "queued" | "succeeded";
474
+ runId: string;
475
+ jobId: string;
476
+ startedAt?: string | undefined;
477
+ error?: string | undefined;
478
+ createdAt?: string | undefined;
479
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
480
+ prompt?: string | undefined;
481
+ access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
482
+ harnesses?: string[] | undefined;
483
+ runDir?: string | undefined;
484
+ model?: string | undefined;
485
+ tests?: {
486
+ program: string;
487
+ cwd?: string | undefined;
488
+ args?: string[] | undefined;
489
+ envAllowlist?: string[] | undefined;
490
+ }[] | undefined;
491
+ project?: {
492
+ kind?: "none" | "project" | undefined;
493
+ root?: string | null | undefined;
494
+ context?: "off" | "auto" | undefined;
495
+ projectName?: string | null | undefined;
496
+ } | undefined;
497
+ n?: number | undefined;
498
+ taskId?: string | undefined;
499
+ primaryHarness?: string | undefined;
500
+ routingGoal?: "auto" | "quality" | "economy" | undefined;
501
+ paidBudget?: {
502
+ kind: "unlimited";
503
+ } | {
504
+ kind: "finite";
505
+ maxUsd: number;
506
+ } | undefined;
507
+ externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
508
+ protectedPathApprovals?: {
509
+ path: string;
510
+ reason?: string | undefined;
511
+ }[] | undefined;
512
+ specId?: string | undefined;
513
+ specHash?: string | undefined;
514
+ reviewerPanel?: {
515
+ harness: string;
516
+ model?: string | undefined;
517
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
518
+ }[] | undefined;
519
+ failure?: {
520
+ safeMessage: string;
521
+ harnessId?: string | null | undefined;
522
+ attemptId?: string | null | undefined;
523
+ runDir?: string | null | undefined;
524
+ phase?: string | undefined;
525
+ category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal" | undefined;
526
+ rawDetailRef?: string | null | undefined;
527
+ logRefs?: string[] | undefined;
528
+ eventRefs?: string[] | undefined;
529
+ nextActions?: string[] | undefined;
530
+ } | null | undefined;
531
+ strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
532
+ spendUsd?: number | null | undefined;
533
+ spendEstimated?: boolean | undefined;
534
+ inputTokens?: number | null | undefined;
535
+ outputTokens?: number | null | undefined;
536
+ cachedInputTokens?: number | null | undefined;
537
+ outputConformance?: "passed" | "failed" | null | undefined;
538
+ authRoute?: {
539
+ requested: "auto" | "subscription" | "api_key";
540
+ reason: "as_requested" | "native_first" | "no_native_session_fallback" | "requested_route_unavailable" | "undisclosed";
541
+ source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
542
+ harnessId?: string | null | undefined;
543
+ attemptId?: string | null | undefined;
544
+ effective?: "unknown" | "api_key" | "local_session" | null | undefined;
545
+ modelMismatch?: {
546
+ requested: string;
547
+ observed: string;
548
+ } | null | undefined;
549
+ } | null | undefined;
550
+ requestedAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
551
+ effectiveAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
552
+ webRequired?: boolean | undefined;
553
+ webMode?: "off" | "auto" | "cached" | "live" | undefined;
554
+ webEvidence?: {
555
+ status?: "failed" | "none" | "attempted" | "satisfied" | "unverified" | undefined;
556
+ available?: boolean | undefined;
557
+ target?: string | null | undefined;
558
+ mode?: "off" | "auto" | "cached" | "live" | undefined;
559
+ tool?: string | null | undefined;
560
+ required?: boolean | undefined;
561
+ attempted?: boolean | undefined;
562
+ rawDetailRef?: string | null | undefined;
563
+ effectiveMode?: "off" | "auto" | "cached" | "live" | undefined;
564
+ satisfied?: boolean | undefined;
565
+ errorSummary?: string | null | undefined;
566
+ } | undefined;
567
+ requestRequirements?: {
568
+ requested: boolean;
569
+ effective: boolean;
570
+ harness_id: string;
571
+ reason: "effective" | "not_requested" | "manifest_unsupported" | "web_policy_off" | "access_profile_incompatible" | "postdiff_only";
572
+ eligible: boolean;
573
+ capability: "browser" | "path_deny";
574
+ evidence_refs?: string[] | undefined;
575
+ }[] | undefined;
576
+ toolPermissionPolicy?: Record<string, unknown> | undefined;
577
+ outputReadyState?: "pending" | "finalizing" | "ready" | "diagnostic" | undefined;
578
+ toolWarningsTotal?: number | undefined;
579
+ result?: {
580
+ kind?: "plan" | "none" | "patch" | "answer" | "report" | undefined;
581
+ diffStat?: {
582
+ files: number;
583
+ additions: number;
584
+ deletions: number;
585
+ } | null | undefined;
586
+ blockers?: number | undefined;
587
+ adopted?: boolean | null | undefined;
588
+ applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
589
+ preTurnSha?: string | null | undefined;
590
+ postTurnSha?: string | null | undefined;
591
+ revertAnchorId?: string | null | undefined;
592
+ revertable?: boolean | undefined;
593
+ } | undefined;
594
+ waitingOnUser?: boolean | undefined;
595
+ route?: {
596
+ harnessId?: string | null | undefined;
597
+ requestedModel?: string | null | undefined;
598
+ observedModel?: string | null | undefined;
599
+ verified?: boolean | undefined;
600
+ } | null | undefined;
601
+ finishedAt?: string | undefined;
602
+ }>, "many">>;
603
+ }, "strict", z.ZodTypeAny, {
604
+ runs: {
605
+ state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress" | "queued" | "succeeded";
606
+ runId: string;
607
+ project: {
608
+ kind: "none" | "project";
609
+ root: string | null;
610
+ context: "off" | "auto";
611
+ projectName: string | null;
612
+ };
613
+ jobId: string;
614
+ failure: {
615
+ harnessId: string | null;
616
+ attemptId: string | null;
617
+ runDir: string | null;
618
+ phase: string;
619
+ category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal";
620
+ safeMessage: string;
621
+ rawDetailRef: string | null;
622
+ logRefs: string[];
623
+ eventRefs: string[];
624
+ nextActions: string[];
625
+ } | null;
626
+ webEvidence: {
627
+ status: "failed" | "none" | "attempted" | "satisfied" | "unverified";
628
+ available: boolean;
629
+ target: string | null;
630
+ mode: "off" | "auto" | "cached" | "live";
631
+ tool: string | null;
632
+ required: boolean;
633
+ attempted: boolean;
634
+ rawDetailRef: string | null;
635
+ effectiveMode: "off" | "auto" | "cached" | "live";
636
+ satisfied: boolean;
637
+ errorSummary: string | null;
638
+ };
639
+ requestRequirements: {
640
+ requested: boolean;
641
+ effective: boolean;
642
+ harness_id: string;
643
+ reason: "effective" | "not_requested" | "manifest_unsupported" | "web_policy_off" | "access_profile_incompatible" | "postdiff_only";
644
+ evidence_refs: string[];
645
+ eligible: boolean;
646
+ capability: "browser" | "path_deny";
647
+ }[];
648
+ outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
649
+ toolWarningsTotal: number;
650
+ result: {
651
+ kind: "plan" | "none" | "patch" | "answer" | "report";
652
+ diffStat: {
653
+ files: number;
654
+ additions: number;
655
+ deletions: number;
656
+ } | null;
657
+ blockers: number;
658
+ adopted: boolean | null;
659
+ applyState: "not_applied" | "applied" | "applied_review_blocked" | "reverted";
660
+ preTurnSha: string | null;
661
+ postTurnSha: string | null;
662
+ revertAnchorId: string | null;
663
+ revertable: boolean;
664
+ };
665
+ waitingOnUser: boolean;
666
+ route: {
667
+ harnessId: string | null;
668
+ requestedModel: string | null;
669
+ observedModel: string | null;
670
+ verified: boolean;
671
+ } | null;
672
+ startedAt?: string | undefined;
673
+ error?: string | undefined;
674
+ createdAt?: string | undefined;
675
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
676
+ prompt?: string | undefined;
677
+ access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
678
+ harnesses?: string[] | undefined;
679
+ runDir?: string | undefined;
680
+ model?: string | undefined;
681
+ tests?: {
682
+ program: string;
683
+ args: string[];
684
+ envAllowlist: string[];
685
+ cwd?: string | undefined;
686
+ }[] | undefined;
687
+ n?: number | undefined;
688
+ taskId?: string | undefined;
689
+ primaryHarness?: string | undefined;
690
+ routingGoal?: "auto" | "quality" | "economy" | undefined;
691
+ paidBudget?: {
692
+ kind: "unlimited";
693
+ } | {
694
+ kind: "finite";
695
+ maxUsd: number;
696
+ } | undefined;
697
+ externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
698
+ protectedPathApprovals?: {
699
+ path: string;
700
+ reason?: string | undefined;
701
+ }[] | undefined;
702
+ specId?: string | undefined;
703
+ specHash?: string | undefined;
704
+ reviewerPanel?: {
705
+ harness: string;
706
+ model?: string | undefined;
707
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
708
+ }[] | undefined;
709
+ strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
710
+ spendUsd?: number | null | undefined;
711
+ spendEstimated?: boolean | undefined;
712
+ inputTokens?: number | null | undefined;
713
+ outputTokens?: number | null | undefined;
714
+ cachedInputTokens?: number | null | undefined;
715
+ outputConformance?: "passed" | "failed" | null | undefined;
716
+ authRoute?: {
717
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
718
+ harnessId: string | null;
719
+ requested: "auto" | "subscription" | "api_key";
720
+ attemptId: string | null;
721
+ effective: "unknown" | "api_key" | "local_session" | null;
722
+ reason: "as_requested" | "native_first" | "no_native_session_fallback" | "requested_route_unavailable" | "undisclosed";
723
+ modelMismatch: {
724
+ requested: string;
725
+ observed: string;
726
+ } | null;
727
+ } | null | undefined;
728
+ requestedAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
729
+ effectiveAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
730
+ webRequired?: boolean | undefined;
731
+ webMode?: "off" | "auto" | "cached" | "live" | undefined;
732
+ toolPermissionPolicy?: Record<string, unknown> | undefined;
733
+ finishedAt?: string | undefined;
734
+ }[];
735
+ }, {
736
+ runs?: {
737
+ state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress" | "queued" | "succeeded";
738
+ runId: string;
739
+ jobId: string;
740
+ startedAt?: string | undefined;
741
+ error?: string | undefined;
742
+ createdAt?: string | undefined;
743
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
744
+ prompt?: string | undefined;
745
+ access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
746
+ harnesses?: string[] | undefined;
747
+ runDir?: string | undefined;
748
+ model?: string | undefined;
749
+ tests?: {
750
+ program: string;
751
+ cwd?: string | undefined;
752
+ args?: string[] | undefined;
753
+ envAllowlist?: string[] | undefined;
754
+ }[] | undefined;
755
+ project?: {
756
+ kind?: "none" | "project" | undefined;
757
+ root?: string | null | undefined;
758
+ context?: "off" | "auto" | undefined;
759
+ projectName?: string | null | undefined;
760
+ } | undefined;
761
+ n?: number | undefined;
762
+ taskId?: string | undefined;
763
+ primaryHarness?: string | undefined;
764
+ routingGoal?: "auto" | "quality" | "economy" | undefined;
765
+ paidBudget?: {
766
+ kind: "unlimited";
767
+ } | {
768
+ kind: "finite";
769
+ maxUsd: number;
770
+ } | undefined;
771
+ externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
772
+ protectedPathApprovals?: {
773
+ path: string;
774
+ reason?: string | undefined;
775
+ }[] | undefined;
776
+ specId?: string | undefined;
777
+ specHash?: string | undefined;
778
+ reviewerPanel?: {
779
+ harness: string;
780
+ model?: string | undefined;
781
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
782
+ }[] | undefined;
783
+ failure?: {
784
+ safeMessage: string;
785
+ harnessId?: string | null | undefined;
786
+ attemptId?: string | null | undefined;
787
+ runDir?: string | null | undefined;
788
+ phase?: string | undefined;
789
+ category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal" | undefined;
790
+ rawDetailRef?: string | null | undefined;
791
+ logRefs?: string[] | undefined;
792
+ eventRefs?: string[] | undefined;
793
+ nextActions?: string[] | undefined;
794
+ } | null | undefined;
795
+ strategy?: "race" | "attempts" | "swarm" | "create" | "until_clean" | null | undefined;
796
+ spendUsd?: number | null | undefined;
797
+ spendEstimated?: boolean | undefined;
798
+ inputTokens?: number | null | undefined;
799
+ outputTokens?: number | null | undefined;
800
+ cachedInputTokens?: number | null | undefined;
801
+ outputConformance?: "passed" | "failed" | null | undefined;
802
+ authRoute?: {
803
+ requested: "auto" | "subscription" | "api_key";
804
+ reason: "as_requested" | "native_first" | "no_native_session_fallback" | "requested_route_unavailable" | "undisclosed";
805
+ source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
806
+ harnessId?: string | null | undefined;
807
+ attemptId?: string | null | undefined;
808
+ effective?: "unknown" | "api_key" | "local_session" | null | undefined;
809
+ modelMismatch?: {
810
+ requested: string;
811
+ observed: string;
812
+ } | null | undefined;
813
+ } | null | undefined;
814
+ requestedAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
815
+ effectiveAccess?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
816
+ webRequired?: boolean | undefined;
817
+ webMode?: "off" | "auto" | "cached" | "live" | undefined;
818
+ webEvidence?: {
819
+ status?: "failed" | "none" | "attempted" | "satisfied" | "unverified" | undefined;
820
+ available?: boolean | undefined;
821
+ target?: string | null | undefined;
822
+ mode?: "off" | "auto" | "cached" | "live" | undefined;
823
+ tool?: string | null | undefined;
824
+ required?: boolean | undefined;
825
+ attempted?: boolean | undefined;
826
+ rawDetailRef?: string | null | undefined;
827
+ effectiveMode?: "off" | "auto" | "cached" | "live" | undefined;
828
+ satisfied?: boolean | undefined;
829
+ errorSummary?: string | null | undefined;
830
+ } | undefined;
831
+ requestRequirements?: {
832
+ requested: boolean;
833
+ effective: boolean;
834
+ harness_id: string;
835
+ reason: "effective" | "not_requested" | "manifest_unsupported" | "web_policy_off" | "access_profile_incompatible" | "postdiff_only";
836
+ eligible: boolean;
837
+ capability: "browser" | "path_deny";
838
+ evidence_refs?: string[] | undefined;
839
+ }[] | undefined;
840
+ toolPermissionPolicy?: Record<string, unknown> | undefined;
841
+ outputReadyState?: "pending" | "finalizing" | "ready" | "diagnostic" | undefined;
842
+ toolWarningsTotal?: number | undefined;
843
+ result?: {
844
+ kind?: "plan" | "none" | "patch" | "answer" | "report" | undefined;
845
+ diffStat?: {
846
+ files: number;
847
+ additions: number;
848
+ deletions: number;
849
+ } | null | undefined;
850
+ blockers?: number | undefined;
851
+ adopted?: boolean | null | undefined;
852
+ applyState?: "not_applied" | "applied" | "applied_review_blocked" | "reverted" | undefined;
853
+ preTurnSha?: string | null | undefined;
854
+ postTurnSha?: string | null | undefined;
855
+ revertAnchorId?: string | null | undefined;
856
+ revertable?: boolean | undefined;
857
+ } | undefined;
858
+ waitingOnUser?: boolean | undefined;
859
+ route?: {
860
+ harnessId?: string | null | undefined;
861
+ requestedModel?: string | null | undefined;
862
+ observedModel?: string | null | undefined;
863
+ verified?: boolean | undefined;
864
+ } | null | undefined;
865
+ finishedAt?: string | undefined;
866
+ }[] | undefined;
867
+ }>;
868
+ export type ControlRunListResponse = z.infer<typeof ControlRunListResponse>;
869
+ export declare const ControlArtifactListResponse: z.ZodObject<{
870
+ runId: z.ZodString;
871
+ artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
872
+ path: z.ZodString;
873
+ kind: z.ZodEnum<["file", "directory"]>;
874
+ bytes: z.ZodOptional<z.ZodNumber>;
875
+ mime: z.ZodOptional<z.ZodString>;
876
+ }, "strip", z.ZodTypeAny, {
877
+ path: string;
878
+ kind: "file" | "directory";
879
+ mime?: string | undefined;
880
+ bytes?: number | undefined;
881
+ }, {
882
+ path: string;
883
+ kind: "file" | "directory";
884
+ mime?: string | undefined;
885
+ bytes?: number | undefined;
886
+ }>, "many">>;
887
+ }, "strict", z.ZodTypeAny, {
888
+ runId: string;
889
+ artifacts: {
890
+ path: string;
891
+ kind: "file" | "directory";
892
+ mime?: string | undefined;
893
+ bytes?: number | undefined;
894
+ }[];
895
+ }, {
896
+ runId: string;
897
+ artifacts?: {
898
+ path: string;
899
+ kind: "file" | "directory";
900
+ mime?: string | undefined;
901
+ bytes?: number | undefined;
902
+ }[] | undefined;
903
+ }>;
904
+ export type ControlArtifactListResponse = z.infer<typeof ControlArtifactListResponse>;
905
+ export declare const ControlApplyCheckResponse: z.ZodObject<{
906
+ ok: z.ZodBoolean;
907
+ code: z.ZodNullable<z.ZodNumber>;
908
+ stderr: z.ZodString;
909
+ }, "strict", z.ZodTypeAny, {
910
+ code: number | null;
911
+ ok: boolean;
912
+ stderr: string;
913
+ }, {
914
+ code: number | null;
915
+ ok: boolean;
916
+ stderr: string;
917
+ }>;
918
+ export type ControlApplyCheckResponse = z.infer<typeof ControlApplyCheckResponse>;
919
+ export declare const ControlDeliveryResponse: z.ZodObject<{
920
+ mode: z.ZodEnum<["artifact_only", "apply", "branch", "commit", "pr"]>;
921
+ applied: z.ZodBoolean;
922
+ branch: z.ZodOptional<z.ZodString>;
923
+ commit: z.ZodOptional<z.ZodString>;
924
+ prUrl: z.ZodOptional<z.ZodString>;
925
+ detail: z.ZodOptional<z.ZodString>;
926
+ treeMutated: z.ZodOptional<z.ZodBoolean>;
927
+ refused: z.ZodOptional<z.ZodBoolean>;
928
+ finalVerify: z.ZodObject<{
929
+ attempted: z.ZodBoolean;
930
+ base_sha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
931
+ applied_cleanly: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
932
+ gates_passed: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
933
+ gates: z.ZodDefault<z.ZodArray<z.ZodObject<{
934
+ id: z.ZodString;
935
+ status: z.ZodString;
936
+ }, "strip", z.ZodTypeAny, {
937
+ status: string;
938
+ id: string;
939
+ }, {
940
+ status: string;
941
+ id: string;
942
+ }>, "many">>;
943
+ duration_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
944
+ reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
945
+ }, "strip", z.ZodTypeAny, {
946
+ reason: string | null;
947
+ duration_ms: number | null;
948
+ base_sha: string | null;
949
+ attempted: boolean;
950
+ applied_cleanly: boolean | null;
951
+ gates_passed: boolean | null;
952
+ gates: {
953
+ status: string;
954
+ id: string;
955
+ }[];
956
+ }, {
957
+ attempted: boolean;
958
+ reason?: string | null | undefined;
959
+ duration_ms?: number | null | undefined;
960
+ base_sha?: string | null | undefined;
961
+ applied_cleanly?: boolean | null | undefined;
962
+ gates_passed?: boolean | null | undefined;
963
+ gates?: {
964
+ status: string;
965
+ id: string;
966
+ }[] | undefined;
967
+ }>;
968
+ targetPreimageSha: z.ZodString;
969
+ }, "strict", z.ZodTypeAny, {
970
+ mode: "apply" | "commit" | "branch" | "pr" | "artifact_only";
971
+ applied: boolean;
972
+ finalVerify: {
973
+ reason: string | null;
974
+ duration_ms: number | null;
975
+ base_sha: string | null;
976
+ attempted: boolean;
977
+ applied_cleanly: boolean | null;
978
+ gates_passed: boolean | null;
979
+ gates: {
980
+ status: string;
981
+ id: string;
982
+ }[];
983
+ };
984
+ targetPreimageSha: string;
985
+ detail?: string | undefined;
986
+ commit?: string | undefined;
987
+ branch?: string | undefined;
988
+ prUrl?: string | undefined;
989
+ treeMutated?: boolean | undefined;
990
+ refused?: boolean | undefined;
991
+ }, {
992
+ mode: "apply" | "commit" | "branch" | "pr" | "artifact_only";
993
+ applied: boolean;
994
+ finalVerify: {
995
+ attempted: boolean;
996
+ reason?: string | null | undefined;
997
+ duration_ms?: number | null | undefined;
998
+ base_sha?: string | null | undefined;
999
+ applied_cleanly?: boolean | null | undefined;
1000
+ gates_passed?: boolean | null | undefined;
1001
+ gates?: {
1002
+ status: string;
1003
+ id: string;
1004
+ }[] | undefined;
1005
+ };
1006
+ targetPreimageSha: string;
1007
+ detail?: string | undefined;
1008
+ commit?: string | undefined;
1009
+ branch?: string | undefined;
1010
+ prUrl?: string | undefined;
1011
+ treeMutated?: boolean | undefined;
1012
+ refused?: boolean | undefined;
1013
+ }>;
1014
+ export type ControlDeliveryResponse = z.infer<typeof ControlDeliveryResponse>;
1015
+ export declare const ControlThreadTurnRequest: z.ZodObject<Omit<{
1016
+ prompt: z.ZodDefault<z.ZodString>;
1017
+ instructions: z.ZodOptional<z.ZodString>;
1018
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
1019
+ resourceId: z.ZodString;
1020
+ }, "strict", z.ZodTypeAny, {
1021
+ resourceId: string;
1022
+ }, {
1023
+ resourceId: string;
1024
+ }>, "many">>;
1025
+ mode: z.ZodDefault<z.ZodEnum<["ask", "plan", "audit", "agent", "orchestrate"]>>;
1026
+ scope: z.ZodDefault<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1027
+ kind: z.ZodLiteral<"project">;
1028
+ root: z.ZodString;
1029
+ context: z.ZodDefault<z.ZodEnum<["auto"]>>;
1030
+ }, "strict", z.ZodTypeAny, {
1031
+ kind: "project";
1032
+ root: string;
1033
+ context: "auto";
1034
+ }, {
1035
+ kind: "project";
1036
+ root: string;
1037
+ context?: "auto" | undefined;
1038
+ }>, z.ZodObject<{
1039
+ kind: z.ZodLiteral<"none">;
1040
+ }, "strict", z.ZodTypeAny, {
1041
+ kind: "none";
1042
+ }, {
1043
+ kind: "none";
1044
+ }>]>>;
1045
+ execution: z.ZodDefault<z.ZodObject<{
1046
+ isolation: z.ZodDefault<z.ZodEnum<["envelope", "live"]>>;
1047
+ }, "strict", z.ZodTypeAny, {
1048
+ isolation: "live" | "envelope";
1049
+ }, {
1050
+ isolation?: "live" | "envelope" | undefined;
1051
+ }>>;
1052
+ harnesses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1053
+ primaryHarness: z.ZodOptional<z.ZodString>;
1054
+ routingGoal: z.ZodOptional<z.ZodEnum<["auto", "quality", "economy"]>>;
1055
+ model: z.ZodOptional<z.ZodString>;
1056
+ models: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1057
+ effort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>;
1058
+ reviewerModels: z.ZodOptional<z.ZodRecord<z.ZodEnum<["openai", "anthropic", "google", "cursor", "opencode", "xai", "local", "unknown"]>, z.ZodString>>;
1059
+ reviewerEfforts: z.ZodOptional<z.ZodRecord<z.ZodEnum<["openai", "anthropic", "google", "cursor", "opencode", "xai", "local", "unknown"]>, z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>>;
1060
+ n: z.ZodOptional<z.ZodNumber>;
1061
+ attempts: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1062
+ untilClean: z.ZodOptional<z.ZodBoolean>;
1063
+ swarm: z.ZodOptional<z.ZodBoolean>;
1064
+ create: z.ZodOptional<z.ZodBoolean>;
1065
+ synthesis: z.ZodOptional<z.ZodEnum<["auto", "always", "never"]>>;
1066
+ paidBudget: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1067
+ kind: z.ZodLiteral<"unlimited">;
1068
+ }, "strict", z.ZodTypeAny, {
1069
+ kind: "unlimited";
1070
+ }, {
1071
+ kind: "unlimited";
1072
+ }>, z.ZodObject<{
1073
+ kind: z.ZodLiteral<"finite">;
1074
+ maxUsd: z.ZodNumber;
1075
+ }, "strict", z.ZodTypeAny, {
1076
+ kind: "finite";
1077
+ maxUsd: number;
1078
+ }, {
1079
+ kind: "finite";
1080
+ maxUsd: number;
1081
+ }>]>>;
1082
+ access: z.ZodOptional<z.ZodEnum<["readonly", "workspace_write", "full", "external_sandbox_full", "inherit_native"]>>;
1083
+ web: z.ZodOptional<z.ZodEnum<["off", "auto", "cached", "live"]>>;
1084
+ externalContextPolicy: z.ZodOptional<z.ZodEnum<["off", "auto", "cached", "live"]>>;
1085
+ browser: z.ZodOptional<z.ZodBoolean>;
1086
+ tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
1087
+ program: z.ZodString;
1088
+ args: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1089
+ cwd: z.ZodOptional<z.ZodString>;
1090
+ envAllowlist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1091
+ }, "strict", z.ZodTypeAny, {
1092
+ program: string;
1093
+ args: string[];
1094
+ envAllowlist: string[];
1095
+ cwd?: string | undefined;
1096
+ }, {
1097
+ program: string;
1098
+ cwd?: string | undefined;
1099
+ args?: string[] | undefined;
1100
+ envAllowlist?: string[] | undefined;
1101
+ }>, "many">>;
1102
+ protectedPathApprovals: z.ZodOptional<z.ZodArray<z.ZodObject<{
1103
+ path: z.ZodString;
1104
+ reason: z.ZodOptional<z.ZodString>;
1105
+ }, "strict", z.ZodTypeAny, {
1106
+ path: string;
1107
+ reason?: string | undefined;
1108
+ }, {
1109
+ path: string;
1110
+ reason?: string | undefined;
1111
+ }>, "many">>;
1112
+ specPath: z.ZodOptional<z.ZodString>;
1113
+ specId: z.ZodOptional<z.ZodString>;
1114
+ specHash: z.ZodOptional<z.ZodString>;
1115
+ threadId: z.ZodOptional<z.ZodString>;
1116
+ turnId: z.ZodOptional<z.ZodString>;
1117
+ parentRunId: z.ZodOptional<z.ZodString>;
1118
+ retryOf: z.ZodOptional<z.ZodString>;
1119
+ planRunId: z.ZodOptional<z.ZodString>;
1120
+ reviewerPanel: z.ZodOptional<z.ZodArray<z.ZodObject<{
1121
+ harness: z.ZodString;
1122
+ model: z.ZodOptional<z.ZodString>;
1123
+ effort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>;
1124
+ }, "strict", z.ZodTypeAny, {
1125
+ harness: string;
1126
+ model?: string | undefined;
1127
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1128
+ }, {
1129
+ harness: string;
1130
+ model?: string | undefined;
1131
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1132
+ }>, "many">>;
1133
+ authPreference: z.ZodOptional<z.ZodEnum<["subscription", "api_key", "auto"]>>;
1134
+ credentialProfileId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1135
+ autonomy: z.ZodOptional<z.ZodEnum<["suggest", "auto_safe", "auto_full"]>>;
1136
+ maxToolCalls: z.ZodOptional<z.ZodNumber>;
1137
+ maxSeconds: z.ZodOptional<z.ZodNumber>;
1138
+ denyPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1139
+ outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1140
+ maxTurns: z.ZodOptional<z.ZodNumber>;
1141
+ }, "turnId" | "retryOf" | "scope" | "execution" | "threadId" | "parentRunId">, "strict", z.ZodTypeAny, {
1142
+ mode: "ask" | "plan" | "audit" | "agent" | "orchestrate";
1143
+ prompt: string;
1144
+ web?: "off" | "auto" | "cached" | "live" | undefined;
1145
+ instructions?: string | undefined;
1146
+ access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1147
+ attachments?: {
1148
+ resourceId: string;
1149
+ }[] | undefined;
1150
+ browser?: boolean | undefined;
1151
+ planRunId?: string | undefined;
1152
+ models?: Record<string, string> | undefined;
1153
+ harnesses?: string[] | undefined;
1154
+ model?: string | undefined;
1155
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1156
+ tests?: {
1157
+ program: string;
1158
+ args: string[];
1159
+ envAllowlist: string[];
1160
+ cwd?: string | undefined;
1161
+ }[] | undefined;
1162
+ autonomy?: "suggest" | "auto_safe" | "auto_full" | undefined;
1163
+ n?: number | undefined;
1164
+ primaryHarness?: string | undefined;
1165
+ routingGoal?: "auto" | "quality" | "economy" | undefined;
1166
+ reviewerModels?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", string>> | undefined;
1167
+ reviewerEfforts?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", "low" | "medium" | "high" | "xhigh" | "max">> | undefined;
1168
+ attempts?: number | null | undefined;
1169
+ untilClean?: boolean | undefined;
1170
+ swarm?: boolean | undefined;
1171
+ create?: boolean | undefined;
1172
+ synthesis?: "auto" | "never" | "always" | undefined;
1173
+ paidBudget?: {
1174
+ kind: "unlimited";
1175
+ } | {
1176
+ kind: "finite";
1177
+ maxUsd: number;
1178
+ } | undefined;
1179
+ externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
1180
+ protectedPathApprovals?: {
1181
+ path: string;
1182
+ reason?: string | undefined;
1183
+ }[] | undefined;
1184
+ specPath?: string | undefined;
1185
+ specId?: string | undefined;
1186
+ specHash?: string | undefined;
1187
+ reviewerPanel?: {
1188
+ harness: string;
1189
+ model?: string | undefined;
1190
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1191
+ }[] | undefined;
1192
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
1193
+ credentialProfileId?: string | null | undefined;
1194
+ maxToolCalls?: number | undefined;
1195
+ maxSeconds?: number | undefined;
1196
+ denyPaths?: string[] | undefined;
1197
+ outputSchema?: Record<string, unknown> | undefined;
1198
+ maxTurns?: number | undefined;
1199
+ }, {
1200
+ web?: "off" | "auto" | "cached" | "live" | undefined;
1201
+ instructions?: string | undefined;
1202
+ mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
1203
+ prompt?: string | undefined;
1204
+ access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1205
+ attachments?: {
1206
+ resourceId: string;
1207
+ }[] | undefined;
1208
+ browser?: boolean | undefined;
1209
+ planRunId?: string | undefined;
1210
+ models?: Record<string, string> | undefined;
1211
+ harnesses?: string[] | undefined;
1212
+ model?: string | undefined;
1213
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1214
+ tests?: {
1215
+ program: string;
1216
+ cwd?: string | undefined;
1217
+ args?: string[] | undefined;
1218
+ envAllowlist?: string[] | undefined;
1219
+ }[] | undefined;
1220
+ autonomy?: "suggest" | "auto_safe" | "auto_full" | undefined;
1221
+ n?: number | undefined;
1222
+ primaryHarness?: string | undefined;
1223
+ routingGoal?: "auto" | "quality" | "economy" | undefined;
1224
+ reviewerModels?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", string>> | undefined;
1225
+ reviewerEfforts?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", "low" | "medium" | "high" | "xhigh" | "max">> | undefined;
1226
+ attempts?: number | null | undefined;
1227
+ untilClean?: boolean | undefined;
1228
+ swarm?: boolean | undefined;
1229
+ create?: boolean | undefined;
1230
+ synthesis?: "auto" | "never" | "always" | undefined;
1231
+ paidBudget?: {
1232
+ kind: "unlimited";
1233
+ } | {
1234
+ kind: "finite";
1235
+ maxUsd: number;
1236
+ } | undefined;
1237
+ externalContextPolicy?: "off" | "auto" | "cached" | "live" | undefined;
1238
+ protectedPathApprovals?: {
1239
+ path: string;
1240
+ reason?: string | undefined;
1241
+ }[] | undefined;
1242
+ specPath?: string | undefined;
1243
+ specId?: string | undefined;
1244
+ specHash?: string | undefined;
1245
+ reviewerPanel?: {
1246
+ harness: string;
1247
+ model?: string | undefined;
1248
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1249
+ }[] | undefined;
1250
+ authPreference?: "auto" | "subscription" | "api_key" | undefined;
1251
+ credentialProfileId?: string | null | undefined;
1252
+ maxToolCalls?: number | undefined;
1253
+ maxSeconds?: number | undefined;
1254
+ denyPaths?: string[] | undefined;
1255
+ outputSchema?: Record<string, unknown> | undefined;
1256
+ maxTurns?: number | undefined;
1257
+ }>;
1258
+ export type ControlThreadTurnRequest = z.infer<typeof ControlThreadTurnRequest>;
1259
+ export declare const ControlThreadTurnResponse: z.ZodUnion<[z.ZodObject<{
1260
+ jobId: z.ZodOptional<z.ZodString>;
1261
+ runId: z.ZodString;
1262
+ taskId: z.ZodOptional<z.ZodString>;
1263
+ runDir: z.ZodString;
1264
+ } & {
1265
+ threadId: z.ZodString;
1266
+ turnId: z.ZodString;
1267
+ }, "strip", z.ZodTypeAny, {
1268
+ turnId: string;
1269
+ runId: string;
1270
+ runDir: string;
1271
+ threadId: string;
1272
+ jobId?: string | undefined;
1273
+ taskId?: string | undefined;
1274
+ }, {
1275
+ turnId: string;
1276
+ runId: string;
1277
+ runDir: string;
1278
+ threadId: string;
1279
+ jobId?: string | undefined;
1280
+ taskId?: string | undefined;
1281
+ }>, z.ZodObject<{
1282
+ jobId: z.ZodString;
1283
+ threadId: z.ZodString;
1284
+ turnId: z.ZodString;
1285
+ state: z.ZodString;
1286
+ }, "strict", z.ZodTypeAny, {
1287
+ state: string;
1288
+ turnId: string;
1289
+ jobId: string;
1290
+ threadId: string;
1291
+ }, {
1292
+ state: string;
1293
+ turnId: string;
1294
+ jobId: string;
1295
+ threadId: string;
1296
+ }>]>;
1297
+ export type ControlThreadTurnResponse = z.infer<typeof ControlThreadTurnResponse>;
1298
+ //# sourceMappingURL=control-operation-responses.d.ts.map