@claudexor/schema 4.7.0 → 4.8.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 (174) hide show
  1. package/dist/account-resources.d.ts +37 -37
  2. package/dist/account-routing-evidence.d.ts +14 -14
  3. package/dist/attachment.d.ts +178 -0
  4. package/dist/attachment.d.ts.map +1 -1
  5. package/dist/attachment.js +46 -0
  6. package/dist/attachment.js.map +1 -1
  7. package/dist/captured-run-start.d.ts +1105 -0
  8. package/dist/captured-run-start.d.ts.map +1 -0
  9. package/dist/captured-run-start.js +41 -0
  10. package/dist/captured-run-start.js.map +1 -0
  11. package/dist/command-summary.d.ts +1 -1
  12. package/dist/command-summary.d.ts.map +1 -1
  13. package/dist/command-summary.js +1 -0
  14. package/dist/command-summary.js.map +1 -1
  15. package/dist/control-harness-models.js +1 -1
  16. package/dist/control-harness-models.js.map +1 -1
  17. package/dist/control-operation-responses.d.ts +201 -9
  18. package/dist/control-operation-responses.d.ts.map +1 -1
  19. package/dist/control-operation-responses.js +7 -1
  20. package/dist/control-operation-responses.js.map +1 -1
  21. package/dist/control-run-detail.d.ts +277 -19
  22. package/dist/control-run-detail.d.ts.map +1 -1
  23. package/dist/control-run-detail.js +2 -0
  24. package/dist/control-run-detail.js.map +1 -1
  25. package/dist/control-run-failure.d.ts +29 -4
  26. package/dist/control-run-failure.d.ts.map +1 -1
  27. package/dist/control-run-failure.js +3 -0
  28. package/dist/control-run-failure.js.map +1 -1
  29. package/dist/control-run-retry.d.ts +31 -0
  30. package/dist/control-run-retry.d.ts.map +1 -1
  31. package/dist/control-run-retry.js +12 -1
  32. package/dist/control-run-retry.js.map +1 -1
  33. package/dist/control.d.ts +69 -5
  34. package/dist/control.d.ts.map +1 -1
  35. package/dist/control.js +3 -7
  36. package/dist/control.js.map +1 -1
  37. package/dist/credential-profile-snapshot.d.ts +28 -28
  38. package/dist/credential-profile.d.ts +1 -1
  39. package/dist/credential-profile.js +2 -2
  40. package/dist/credential-profile.js.map +1 -1
  41. package/dist/credential-store.d.ts +3 -2
  42. package/dist/credential-store.d.ts.map +1 -1
  43. package/dist/credential-store.js +5 -4
  44. package/dist/credential-store.js.map +1 -1
  45. package/dist/deferred-message.d.ts +2450 -0
  46. package/dist/deferred-message.d.ts.map +1 -0
  47. package/dist/deferred-message.js +186 -0
  48. package/dist/deferred-message.js.map +1 -0
  49. package/dist/events.d.ts +3 -3
  50. package/dist/events.js +1 -1
  51. package/dist/events.js.map +1 -1
  52. package/dist/harness-input.d.ts +15 -0
  53. package/dist/harness-input.d.ts.map +1 -1
  54. package/dist/harness-input.js +10 -1
  55. package/dist/harness-input.js.map +1 -1
  56. package/dist/harness-model.d.ts +65 -0
  57. package/dist/harness-model.d.ts.map +1 -1
  58. package/dist/harness-model.js +42 -0
  59. package/dist/harness-model.js.map +1 -1
  60. package/dist/harness-quota.d.ts +3 -3
  61. package/dist/harness.d.ts +61 -9
  62. package/dist/harness.d.ts.map +1 -1
  63. package/dist/harness.js +2 -2
  64. package/dist/harness.js.map +1 -1
  65. package/dist/index.d.ts +8 -0
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +8 -0
  68. package/dist/index.js.map +1 -1
  69. package/dist/mcp-run-result.d.ts +356 -12
  70. package/dist/mcp-run-result.d.ts.map +1 -1
  71. package/dist/mcp-run-result.js +5 -0
  72. package/dist/mcp-run-result.js.map +1 -1
  73. package/dist/mcp-run-wait.d.ts +133 -0
  74. package/dist/mcp-run-wait.d.ts.map +1 -1
  75. package/dist/mcp-run-wait.js +4 -0
  76. package/dist/mcp-run-wait.js.map +1 -1
  77. package/dist/mcp-upload.d.ts +133 -0
  78. package/dist/mcp-upload.d.ts.map +1 -0
  79. package/dist/mcp-upload.js +40 -0
  80. package/dist/mcp-upload.js.map +1 -0
  81. package/dist/quota-read.d.ts +8 -8
  82. package/dist/quota.d.ts +26 -20
  83. package/dist/quota.d.ts.map +1 -1
  84. package/dist/quota.js +11 -1
  85. package/dist/quota.js.map +1 -1
  86. package/dist/run-observation.d.ts +189 -0
  87. package/dist/run-observation.d.ts.map +1 -0
  88. package/dist/run-observation.js +93 -0
  89. package/dist/run-observation.js.map +1 -0
  90. package/dist/setup-login.d.ts +5 -5
  91. package/dist/setup.d.ts +63 -63
  92. package/dist/setup.d.ts.map +1 -1
  93. package/dist/setup.js +1 -1
  94. package/dist/setup.js.map +1 -1
  95. package/dist/task-group-runs.d.ts +257 -0
  96. package/dist/task-group-runs.d.ts.map +1 -0
  97. package/dist/task-group-runs.js +91 -0
  98. package/dist/task-group-runs.js.map +1 -0
  99. package/dist/task-group.d.ts +23 -0
  100. package/dist/task-group.d.ts.map +1 -0
  101. package/dist/task-group.js +38 -0
  102. package/dist/task-group.js.map +1 -0
  103. package/dist/telemetry.d.ts +136 -8
  104. package/dist/telemetry.d.ts.map +1 -1
  105. package/dist/telemetry.js +2 -5
  106. package/dist/telemetry.js.map +1 -1
  107. package/dist/thread-history.d.ts +12553 -0
  108. package/dist/thread-history.d.ts.map +1 -0
  109. package/dist/thread-history.js +291 -0
  110. package/dist/thread-history.js.map +1 -0
  111. package/generated/ControlAccountResetResponse.schema.json +1 -0
  112. package/generated/ControlAccountResourcesFreshnessResponse.schema.json +1 -0
  113. package/generated/ControlAccountResourcesResponse.schema.json +1 -0
  114. package/generated/ControlCredentialProfileCreateRequest.schema.json +1 -1
  115. package/generated/ControlCredentialProfilesQueryResponse.schema.json +1 -0
  116. package/generated/ControlCredentialProfilesResourcesResponse.schema.json +1 -0
  117. package/generated/ControlCredentialProfilesSnapshotResponse.schema.json +1 -0
  118. package/generated/ControlQueuedRunInfo.schema.json +10 -0
  119. package/generated/ControlQuotaFreshnessResponse.schema.json +1 -0
  120. package/generated/ControlQuotaQueryResponse.schema.json +1 -0
  121. package/generated/ControlQuotaResponse.schema.json +1 -0
  122. package/generated/ControlRunAgainDraft.schema.json +5 -0
  123. package/generated/ControlRunControlResponse.schema.json +169 -0
  124. package/generated/ControlRunDetail.schema.json +208 -1
  125. package/generated/ControlRunListResponse.schema.json +31 -1
  126. package/generated/ControlRunRetryResponse.schema.json +10 -0
  127. package/generated/ControlRunStartInfo.schema.json +10 -0
  128. package/generated/ControlRunStartRequest.schema.json +5 -0
  129. package/generated/ControlRunStartResponse.schema.json +18 -0
  130. package/generated/ControlRunSummary.schema.json +31 -1
  131. package/generated/ControlSetupJob.schema.json +2 -1
  132. package/generated/ControlSetupJobCreateRequest.schema.json +2 -1
  133. package/generated/ControlSetupJobEvent.schema.json +2 -1
  134. package/generated/ControlSetupJobListFilter.schema.json +2 -1
  135. package/generated/ControlSetupJobListResponse.schema.json +2 -1
  136. package/generated/ControlSetupJobSnapshot.schema.json +2 -1
  137. package/generated/ControlUploadImport.schema.json +124 -0
  138. package/generated/ControlUploadImportRequest.schema.json +66 -0
  139. package/generated/DeferredMessageCall.schema.json +331 -0
  140. package/generated/DeferredMessageDetail.schema.json +917 -0
  141. package/generated/DeferredMessageMutation.schema.json +315 -0
  142. package/generated/DeferredMessageProjection.schema.json +177 -0
  143. package/generated/DeferredMessageReadInput.schema.json +20 -0
  144. package/generated/DeferredMessageReadResult.schema.json +399 -0
  145. package/generated/DeferredMessageReceipt.schema.json +193 -0
  146. package/generated/HarnessEvent.schema.json +75 -1
  147. package/generated/McpAccountsToolResult.schema.json +1 -0
  148. package/generated/McpRunHandleResult.schema.json +226 -19
  149. package/generated/McpRunToolResult.schema.json +228 -11
  150. package/generated/McpRunWaitResult.schema.json +180 -2
  151. package/generated/McpStoreIdentityInput.schema.json +11 -0
  152. package/generated/McpUploadCreateInput.schema.json +54 -0
  153. package/generated/McpUploadFinalizeInput.schema.json +40 -0
  154. package/generated/McpUploadImportInput.schema.json +52 -0
  155. package/generated/McpUploadImportLocalInput.schema.json +27 -0
  156. package/generated/McpUploadImportLocalResult.schema.json +45 -0
  157. package/generated/McpUploadTargetInput.schema.json +20 -0
  158. package/generated/ResourceAttachmentRef.schema.json +21 -0
  159. package/generated/RoutePrimaryDivergedPayload.schema.json +23 -14
  160. package/generated/RunFailure.schema.json +31 -1
  161. package/generated/RunObservationRecord.schema.json +64 -0
  162. package/generated/RunTelemetry.schema.json +83 -1
  163. package/generated/RunWaitManyInput.schema.json +47 -0
  164. package/generated/RunWaitManyResult.schema.json +110 -0
  165. package/generated/RunWaitManySummary.schema.json +75 -0
  166. package/generated/TaskGroupId.schema.json +11 -0
  167. package/generated/TaskGroupReceipt.schema.json +26 -0
  168. package/generated/TaskGroupRunsInput.schema.json +46 -0
  169. package/generated/TaskGroupRunsResult.schema.json +162 -0
  170. package/generated/ThreadHistoryInput.schema.json +48 -0
  171. package/generated/ThreadHistoryPage.schema.json +2857 -0
  172. package/generated/ThreadPromptPart.schema.json +57 -0
  173. package/generated/ThreadPromptPartInput.schema.json +41 -0
  174. package/package.json +2 -2
@@ -0,0 +1,2450 @@
1
+ import { z } from "zod/v3";
2
+ import { type ExpectedRunFactsIdentity } from "./run-facts.js";
3
+ /** Create-time control keys; the bounded read reports their captured values. */
4
+ export declare const DEFERRED_MESSAGE_CONTROL_KEYS: string[];
5
+ export declare const DeferredMessageMutation: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
6
+ prompt: z.ZodString;
7
+ attachments: z.ZodArray<z.ZodObject<{
8
+ resourceId: z.ZodString;
9
+ }, "strict", z.ZodTypeAny, {
10
+ resourceId: string;
11
+ }, {
12
+ resourceId: string;
13
+ }>, "many">;
14
+ action: z.ZodLiteral<"create">;
15
+ predecessorId: z.ZodString;
16
+ controls: z.ZodOptional<z.ZodObject<Pick<{
17
+ maxSeconds: z.ZodOptional<z.ZodNumber>;
18
+ timeLimitMode: z.ZodOptional<z.ZodEnum<["soft", "hard"]>>;
19
+ prompt: z.ZodDefault<z.ZodString>;
20
+ instructions: z.ZodOptional<z.ZodString>;
21
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
22
+ resourceId: z.ZodString;
23
+ }, "strict", z.ZodTypeAny, {
24
+ resourceId: string;
25
+ }, {
26
+ resourceId: string;
27
+ }>, "many">>;
28
+ mode: z.ZodDefault<z.ZodEnum<["ask", "plan", "agent"]>>;
29
+ taskGroupId: z.ZodOptional<z.ZodString>;
30
+ scope: z.ZodDefault<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
31
+ kind: z.ZodLiteral<"project">;
32
+ root: z.ZodString;
33
+ context: z.ZodDefault<z.ZodEnum<["auto"]>>;
34
+ ephemeral: z.ZodDefault<z.ZodBoolean>;
35
+ }, "strict", z.ZodTypeAny, {
36
+ kind: "project";
37
+ root: string;
38
+ context: "auto";
39
+ ephemeral: boolean;
40
+ }, {
41
+ kind: "project";
42
+ root: string;
43
+ context?: "auto" | undefined;
44
+ ephemeral?: boolean | undefined;
45
+ }>, z.ZodObject<{
46
+ kind: z.ZodLiteral<"none">;
47
+ }, "strict", z.ZodTypeAny, {
48
+ kind: "none";
49
+ }, {
50
+ kind: "none";
51
+ }>]>>;
52
+ execution: z.ZodDefault<z.ZodObject<{
53
+ isolation: z.ZodDefault<z.ZodEnum<["envelope", "live"]>>;
54
+ delegated: z.ZodDefault<z.ZodBoolean>;
55
+ workspaceRoot: z.ZodOptional<z.ZodString>;
56
+ workspaceKind: z.ZodOptional<z.ZodEnum<["git", "directory"]>>;
57
+ scopePaths: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
58
+ auxiliaryWritableRoots: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
59
+ }, "strict", z.ZodTypeAny, {
60
+ isolation: "envelope" | "live";
61
+ delegated: boolean;
62
+ workspaceRoot?: string | undefined;
63
+ workspaceKind?: "directory" | "git" | undefined;
64
+ scopePaths?: string[] | undefined;
65
+ auxiliaryWritableRoots?: string[] | undefined;
66
+ }, {
67
+ isolation?: "envelope" | "live" | undefined;
68
+ delegated?: boolean | undefined;
69
+ workspaceRoot?: string | undefined;
70
+ workspaceKind?: "directory" | "git" | undefined;
71
+ scopePaths?: string[] | undefined;
72
+ auxiliaryWritableRoots?: string[] | undefined;
73
+ }>>;
74
+ harnesses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
75
+ primaryHarness: z.ZodOptional<z.ZodString>;
76
+ routingGoal: z.ZodOptional<z.ZodEnum<["auto", "quality", "economy"]>>;
77
+ model: z.ZodOptional<z.ZodString>;
78
+ models: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
79
+ effort: z.ZodOptional<z.ZodString>;
80
+ processingPreference: z.ZodOptional<z.ZodEnum<["standard", "fast", "economy"]>>;
81
+ promptCacheTtl: z.ZodOptional<z.ZodEnum<["5m", "1h"]>>;
82
+ efforts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
83
+ review: z.ZodOptional<z.ZodBoolean>;
84
+ reviewerModels: z.ZodOptional<z.ZodRecord<z.ZodEnum<["openai", "anthropic", "google", "cursor", "opencode", "xai", "local", "unknown"]>, z.ZodString>>;
85
+ reviewerEfforts: z.ZodOptional<z.ZodRecord<z.ZodEnum<["openai", "anthropic", "google", "cursor", "opencode", "xai", "local", "unknown"]>, z.ZodString>>;
86
+ n: z.ZodOptional<z.ZodNumber>;
87
+ attempts: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
88
+ untilClean: z.ZodOptional<z.ZodBoolean>;
89
+ deepScan: z.ZodOptional<z.ZodBoolean>;
90
+ create: z.ZodOptional<z.ZodBoolean>;
91
+ council: z.ZodOptional<z.ZodBoolean>;
92
+ synthesis: z.ZodOptional<z.ZodEnum<["auto", "always", "never"]>>;
93
+ paidBudget: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
94
+ kind: z.ZodLiteral<"unlimited">;
95
+ }, "strict", z.ZodTypeAny, {
96
+ kind: "unlimited";
97
+ }, {
98
+ kind: "unlimited";
99
+ }>, z.ZodObject<{
100
+ kind: z.ZodLiteral<"finite">;
101
+ maxUsd: z.ZodNumber;
102
+ }, "strict", z.ZodTypeAny, {
103
+ kind: "finite";
104
+ maxUsd: number;
105
+ }, {
106
+ kind: "finite";
107
+ maxUsd: number;
108
+ }>]>>;
109
+ access: z.ZodOptional<z.ZodEnum<["readonly", "workspace_write", "full", "inherit_native"]>>;
110
+ web: z.ZodOptional<z.ZodEnum<["off", "auto", "cached", "live"]>>;
111
+ externalContextPolicy: z.ZodOptional<z.ZodEnum<["off", "auto", "cached", "live"]>>;
112
+ browser: z.ZodOptional<z.ZodBoolean>;
113
+ tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
114
+ program: z.ZodString;
115
+ args: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
116
+ cwd: z.ZodOptional<z.ZodString>;
117
+ envAllowlist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
118
+ }, "strict", z.ZodTypeAny, {
119
+ program: string;
120
+ args: string[];
121
+ cwd?: string | undefined;
122
+ envAllowlist: string[];
123
+ }, {
124
+ program: string;
125
+ args?: string[] | undefined;
126
+ cwd?: string | undefined;
127
+ envAllowlist?: string[] | undefined;
128
+ }>, "many">>;
129
+ protectedPathApprovals: z.ZodOptional<z.ZodArray<z.ZodObject<{
130
+ path: z.ZodString;
131
+ reason: z.ZodOptional<z.ZodString>;
132
+ }, "strict", z.ZodTypeAny, {
133
+ path: string;
134
+ reason?: string | undefined;
135
+ }, {
136
+ path: string;
137
+ reason?: string | undefined;
138
+ }>, "many">>;
139
+ threadId: z.ZodOptional<z.ZodString>;
140
+ turnId: z.ZodOptional<z.ZodString>;
141
+ parentRunId: z.ZodOptional<z.ZodString>;
142
+ delegatedFromRunId: z.ZodOptional<z.ZodString>;
143
+ retryOf: z.ZodOptional<z.ZodString>;
144
+ continueFrom: z.ZodOptional<z.ZodString>;
145
+ continueCarrier: z.ZodOptional<z.ZodEnum<["auto", "packet"]>>;
146
+ continueModelInherited: z.ZodOptional<z.ZodBoolean>;
147
+ planRunId: z.ZodOptional<z.ZodString>;
148
+ planRef: z.ZodOptional<z.ZodObject<{
149
+ runId: z.ZodString;
150
+ sha256: z.ZodString;
151
+ path: z.ZodString;
152
+ }, "strict", z.ZodTypeAny, {
153
+ runId: string;
154
+ sha256: string;
155
+ path: string;
156
+ }, {
157
+ runId: string;
158
+ sha256: string;
159
+ path: string;
160
+ }>>;
161
+ reviewerPanel: z.ZodOptional<z.ZodArray<z.ZodObject<{
162
+ harness: z.ZodString;
163
+ model: z.ZodOptional<z.ZodString>;
164
+ effort: z.ZodOptional<z.ZodString>;
165
+ credentialProfileId: z.ZodOptional<z.ZodString>;
166
+ processingPreference: z.ZodOptional<z.ZodEnum<["standard", "fast", "economy"]>>;
167
+ }, "strict", z.ZodTypeAny, {
168
+ harness: string;
169
+ model?: string | undefined;
170
+ effort?: string | undefined;
171
+ credentialProfileId?: string | undefined;
172
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
173
+ }, {
174
+ harness: string;
175
+ model?: string | undefined;
176
+ effort?: string | undefined;
177
+ credentialProfileId?: string | undefined;
178
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
179
+ }>, "many">>;
180
+ authPreference: z.ZodOptional<z.ZodEnum<["subscription", "api_key", "auto"]>>;
181
+ credentialProfileId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
182
+ delegate: z.ZodOptional<z.ZodBoolean>;
183
+ denyPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
184
+ outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
185
+ maxTurns: z.ZodOptional<z.ZodNumber>;
186
+ }, "access" | "continueCarrier" | "credentialProfileId" | "effort" | "efforts" | "externalContextPolicy" | "maxSeconds" | "paidBudget" | "review" | "reviewerEfforts" | "reviewerModels" | "reviewerPanel" | "taskGroupId" | "timeLimitMode" | "web">, "strict", z.ZodTypeAny, {
187
+ maxSeconds?: number | undefined;
188
+ timeLimitMode?: "hard" | "soft" | undefined;
189
+ taskGroupId?: string | undefined;
190
+ effort?: string | undefined;
191
+ efforts?: Record<string, string> | undefined;
192
+ review?: boolean | undefined;
193
+ reviewerModels?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
194
+ reviewerEfforts?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
195
+ paidBudget?: {
196
+ kind: "unlimited";
197
+ } | {
198
+ kind: "finite";
199
+ maxUsd: number;
200
+ } | undefined;
201
+ access?: "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
202
+ web?: "auto" | "cached" | "live" | "off" | undefined;
203
+ externalContextPolicy?: "auto" | "cached" | "live" | "off" | undefined;
204
+ continueCarrier?: "auto" | "packet" | undefined;
205
+ reviewerPanel?: {
206
+ harness: string;
207
+ model?: string | undefined;
208
+ effort?: string | undefined;
209
+ credentialProfileId?: string | undefined;
210
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
211
+ }[] | undefined;
212
+ credentialProfileId?: string | null | undefined;
213
+ }, {
214
+ maxSeconds?: number | undefined;
215
+ timeLimitMode?: "hard" | "soft" | undefined;
216
+ taskGroupId?: string | undefined;
217
+ effort?: string | undefined;
218
+ efforts?: Record<string, string> | undefined;
219
+ review?: boolean | undefined;
220
+ reviewerModels?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
221
+ reviewerEfforts?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
222
+ paidBudget?: {
223
+ kind: "unlimited";
224
+ } | {
225
+ kind: "finite";
226
+ maxUsd: number;
227
+ } | undefined;
228
+ access?: "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
229
+ web?: "auto" | "cached" | "live" | "off" | undefined;
230
+ externalContextPolicy?: "auto" | "cached" | "live" | "off" | undefined;
231
+ continueCarrier?: "auto" | "packet" | undefined;
232
+ reviewerPanel?: {
233
+ harness: string;
234
+ model?: string | undefined;
235
+ effort?: string | undefined;
236
+ credentialProfileId?: string | undefined;
237
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
238
+ }[] | undefined;
239
+ credentialProfileId?: string | null | undefined;
240
+ }>>;
241
+ }, "strict", z.ZodTypeAny, {
242
+ prompt: string;
243
+ attachments: {
244
+ resourceId: string;
245
+ }[];
246
+ action: "create";
247
+ predecessorId: string;
248
+ controls?: {
249
+ maxSeconds?: number | undefined;
250
+ timeLimitMode?: "hard" | "soft" | undefined;
251
+ taskGroupId?: string | undefined;
252
+ effort?: string | undefined;
253
+ efforts?: Record<string, string> | undefined;
254
+ review?: boolean | undefined;
255
+ reviewerModels?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
256
+ reviewerEfforts?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
257
+ paidBudget?: {
258
+ kind: "unlimited";
259
+ } | {
260
+ kind: "finite";
261
+ maxUsd: number;
262
+ } | undefined;
263
+ access?: "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
264
+ web?: "auto" | "cached" | "live" | "off" | undefined;
265
+ externalContextPolicy?: "auto" | "cached" | "live" | "off" | undefined;
266
+ continueCarrier?: "auto" | "packet" | undefined;
267
+ reviewerPanel?: {
268
+ harness: string;
269
+ model?: string | undefined;
270
+ effort?: string | undefined;
271
+ credentialProfileId?: string | undefined;
272
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
273
+ }[] | undefined;
274
+ credentialProfileId?: string | null | undefined;
275
+ } | undefined;
276
+ }, {
277
+ prompt: string;
278
+ attachments: {
279
+ resourceId: string;
280
+ }[];
281
+ action: "create";
282
+ predecessorId: string;
283
+ controls?: {
284
+ maxSeconds?: number | undefined;
285
+ timeLimitMode?: "hard" | "soft" | undefined;
286
+ taskGroupId?: string | undefined;
287
+ effort?: string | undefined;
288
+ efforts?: Record<string, string> | undefined;
289
+ review?: boolean | undefined;
290
+ reviewerModels?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
291
+ reviewerEfforts?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
292
+ paidBudget?: {
293
+ kind: "unlimited";
294
+ } | {
295
+ kind: "finite";
296
+ maxUsd: number;
297
+ } | undefined;
298
+ access?: "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
299
+ web?: "auto" | "cached" | "live" | "off" | undefined;
300
+ externalContextPolicy?: "auto" | "cached" | "live" | "off" | undefined;
301
+ continueCarrier?: "auto" | "packet" | undefined;
302
+ reviewerPanel?: {
303
+ harness: string;
304
+ model?: string | undefined;
305
+ effort?: string | undefined;
306
+ credentialProfileId?: string | undefined;
307
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
308
+ }[] | undefined;
309
+ credentialProfileId?: string | null | undefined;
310
+ } | undefined;
311
+ }>, z.ZodObject<{
312
+ prompt: z.ZodString;
313
+ attachments: z.ZodArray<z.ZodObject<{
314
+ resourceId: z.ZodString;
315
+ }, "strict", z.ZodTypeAny, {
316
+ resourceId: string;
317
+ }, {
318
+ resourceId: string;
319
+ }>, "many">;
320
+ action: z.ZodLiteral<"replace">;
321
+ draftId: z.ZodString;
322
+ expectedRevision: z.ZodNumber;
323
+ }, "strict", z.ZodTypeAny, {
324
+ prompt: string;
325
+ attachments: {
326
+ resourceId: string;
327
+ }[];
328
+ action: "replace";
329
+ draftId: string;
330
+ expectedRevision: number;
331
+ }, {
332
+ prompt: string;
333
+ attachments: {
334
+ resourceId: string;
335
+ }[];
336
+ action: "replace";
337
+ draftId: string;
338
+ expectedRevision: number;
339
+ }>, z.ZodObject<{
340
+ action: z.ZodLiteral<"clear">;
341
+ draftId: z.ZodString;
342
+ expectedRevision: z.ZodNumber;
343
+ }, "strict", z.ZodTypeAny, {
344
+ action: "clear";
345
+ draftId: string;
346
+ expectedRevision: number;
347
+ }, {
348
+ action: "clear";
349
+ draftId: string;
350
+ expectedRevision: number;
351
+ }>]>;
352
+ export type DeferredMessageMutation = z.infer<typeof DeferredMessageMutation>;
353
+ export declare const DeferredMessageCall: z.ZodObject<{
354
+ request: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
355
+ prompt: z.ZodString;
356
+ attachments: z.ZodArray<z.ZodObject<{
357
+ resourceId: z.ZodString;
358
+ }, "strict", z.ZodTypeAny, {
359
+ resourceId: string;
360
+ }, {
361
+ resourceId: string;
362
+ }>, "many">;
363
+ action: z.ZodLiteral<"create">;
364
+ predecessorId: z.ZodString;
365
+ controls: z.ZodOptional<z.ZodObject<Pick<{
366
+ maxSeconds: z.ZodOptional<z.ZodNumber>;
367
+ timeLimitMode: z.ZodOptional<z.ZodEnum<["soft", "hard"]>>;
368
+ prompt: z.ZodDefault<z.ZodString>;
369
+ instructions: z.ZodOptional<z.ZodString>;
370
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
371
+ resourceId: z.ZodString;
372
+ }, "strict", z.ZodTypeAny, {
373
+ resourceId: string;
374
+ }, {
375
+ resourceId: string;
376
+ }>, "many">>;
377
+ mode: z.ZodDefault<z.ZodEnum<["ask", "plan", "agent"]>>;
378
+ taskGroupId: z.ZodOptional<z.ZodString>;
379
+ scope: z.ZodDefault<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
380
+ kind: z.ZodLiteral<"project">;
381
+ root: z.ZodString;
382
+ context: z.ZodDefault<z.ZodEnum<["auto"]>>;
383
+ ephemeral: z.ZodDefault<z.ZodBoolean>;
384
+ }, "strict", z.ZodTypeAny, {
385
+ kind: "project";
386
+ root: string;
387
+ context: "auto";
388
+ ephemeral: boolean;
389
+ }, {
390
+ kind: "project";
391
+ root: string;
392
+ context?: "auto" | undefined;
393
+ ephemeral?: boolean | undefined;
394
+ }>, z.ZodObject<{
395
+ kind: z.ZodLiteral<"none">;
396
+ }, "strict", z.ZodTypeAny, {
397
+ kind: "none";
398
+ }, {
399
+ kind: "none";
400
+ }>]>>;
401
+ execution: z.ZodDefault<z.ZodObject<{
402
+ isolation: z.ZodDefault<z.ZodEnum<["envelope", "live"]>>;
403
+ delegated: z.ZodDefault<z.ZodBoolean>;
404
+ workspaceRoot: z.ZodOptional<z.ZodString>;
405
+ workspaceKind: z.ZodOptional<z.ZodEnum<["git", "directory"]>>;
406
+ scopePaths: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
407
+ auxiliaryWritableRoots: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
408
+ }, "strict", z.ZodTypeAny, {
409
+ isolation: "envelope" | "live";
410
+ delegated: boolean;
411
+ workspaceRoot?: string | undefined;
412
+ workspaceKind?: "directory" | "git" | undefined;
413
+ scopePaths?: string[] | undefined;
414
+ auxiliaryWritableRoots?: string[] | undefined;
415
+ }, {
416
+ isolation?: "envelope" | "live" | undefined;
417
+ delegated?: boolean | undefined;
418
+ workspaceRoot?: string | undefined;
419
+ workspaceKind?: "directory" | "git" | undefined;
420
+ scopePaths?: string[] | undefined;
421
+ auxiliaryWritableRoots?: string[] | undefined;
422
+ }>>;
423
+ harnesses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
424
+ primaryHarness: z.ZodOptional<z.ZodString>;
425
+ routingGoal: z.ZodOptional<z.ZodEnum<["auto", "quality", "economy"]>>;
426
+ model: z.ZodOptional<z.ZodString>;
427
+ models: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
428
+ effort: z.ZodOptional<z.ZodString>;
429
+ processingPreference: z.ZodOptional<z.ZodEnum<["standard", "fast", "economy"]>>;
430
+ promptCacheTtl: z.ZodOptional<z.ZodEnum<["5m", "1h"]>>;
431
+ efforts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
432
+ review: z.ZodOptional<z.ZodBoolean>;
433
+ reviewerModels: z.ZodOptional<z.ZodRecord<z.ZodEnum<["openai", "anthropic", "google", "cursor", "opencode", "xai", "local", "unknown"]>, z.ZodString>>;
434
+ reviewerEfforts: z.ZodOptional<z.ZodRecord<z.ZodEnum<["openai", "anthropic", "google", "cursor", "opencode", "xai", "local", "unknown"]>, z.ZodString>>;
435
+ n: z.ZodOptional<z.ZodNumber>;
436
+ attempts: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
437
+ untilClean: z.ZodOptional<z.ZodBoolean>;
438
+ deepScan: z.ZodOptional<z.ZodBoolean>;
439
+ create: z.ZodOptional<z.ZodBoolean>;
440
+ council: z.ZodOptional<z.ZodBoolean>;
441
+ synthesis: z.ZodOptional<z.ZodEnum<["auto", "always", "never"]>>;
442
+ paidBudget: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
443
+ kind: z.ZodLiteral<"unlimited">;
444
+ }, "strict", z.ZodTypeAny, {
445
+ kind: "unlimited";
446
+ }, {
447
+ kind: "unlimited";
448
+ }>, z.ZodObject<{
449
+ kind: z.ZodLiteral<"finite">;
450
+ maxUsd: z.ZodNumber;
451
+ }, "strict", z.ZodTypeAny, {
452
+ kind: "finite";
453
+ maxUsd: number;
454
+ }, {
455
+ kind: "finite";
456
+ maxUsd: number;
457
+ }>]>>;
458
+ access: z.ZodOptional<z.ZodEnum<["readonly", "workspace_write", "full", "inherit_native"]>>;
459
+ web: z.ZodOptional<z.ZodEnum<["off", "auto", "cached", "live"]>>;
460
+ externalContextPolicy: z.ZodOptional<z.ZodEnum<["off", "auto", "cached", "live"]>>;
461
+ browser: z.ZodOptional<z.ZodBoolean>;
462
+ tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
463
+ program: z.ZodString;
464
+ args: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
465
+ cwd: z.ZodOptional<z.ZodString>;
466
+ envAllowlist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
467
+ }, "strict", z.ZodTypeAny, {
468
+ program: string;
469
+ args: string[];
470
+ cwd?: string | undefined;
471
+ envAllowlist: string[];
472
+ }, {
473
+ program: string;
474
+ args?: string[] | undefined;
475
+ cwd?: string | undefined;
476
+ envAllowlist?: string[] | undefined;
477
+ }>, "many">>;
478
+ protectedPathApprovals: z.ZodOptional<z.ZodArray<z.ZodObject<{
479
+ path: z.ZodString;
480
+ reason: z.ZodOptional<z.ZodString>;
481
+ }, "strict", z.ZodTypeAny, {
482
+ path: string;
483
+ reason?: string | undefined;
484
+ }, {
485
+ path: string;
486
+ reason?: string | undefined;
487
+ }>, "many">>;
488
+ threadId: z.ZodOptional<z.ZodString>;
489
+ turnId: z.ZodOptional<z.ZodString>;
490
+ parentRunId: z.ZodOptional<z.ZodString>;
491
+ delegatedFromRunId: z.ZodOptional<z.ZodString>;
492
+ retryOf: z.ZodOptional<z.ZodString>;
493
+ continueFrom: z.ZodOptional<z.ZodString>;
494
+ continueCarrier: z.ZodOptional<z.ZodEnum<["auto", "packet"]>>;
495
+ continueModelInherited: z.ZodOptional<z.ZodBoolean>;
496
+ planRunId: z.ZodOptional<z.ZodString>;
497
+ planRef: z.ZodOptional<z.ZodObject<{
498
+ runId: z.ZodString;
499
+ sha256: z.ZodString;
500
+ path: z.ZodString;
501
+ }, "strict", z.ZodTypeAny, {
502
+ runId: string;
503
+ sha256: string;
504
+ path: string;
505
+ }, {
506
+ runId: string;
507
+ sha256: string;
508
+ path: string;
509
+ }>>;
510
+ reviewerPanel: z.ZodOptional<z.ZodArray<z.ZodObject<{
511
+ harness: z.ZodString;
512
+ model: z.ZodOptional<z.ZodString>;
513
+ effort: z.ZodOptional<z.ZodString>;
514
+ credentialProfileId: z.ZodOptional<z.ZodString>;
515
+ processingPreference: z.ZodOptional<z.ZodEnum<["standard", "fast", "economy"]>>;
516
+ }, "strict", z.ZodTypeAny, {
517
+ harness: string;
518
+ model?: string | undefined;
519
+ effort?: string | undefined;
520
+ credentialProfileId?: string | undefined;
521
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
522
+ }, {
523
+ harness: string;
524
+ model?: string | undefined;
525
+ effort?: string | undefined;
526
+ credentialProfileId?: string | undefined;
527
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
528
+ }>, "many">>;
529
+ authPreference: z.ZodOptional<z.ZodEnum<["subscription", "api_key", "auto"]>>;
530
+ credentialProfileId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
531
+ delegate: z.ZodOptional<z.ZodBoolean>;
532
+ denyPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
533
+ outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
534
+ maxTurns: z.ZodOptional<z.ZodNumber>;
535
+ }, "access" | "continueCarrier" | "credentialProfileId" | "effort" | "efforts" | "externalContextPolicy" | "maxSeconds" | "paidBudget" | "review" | "reviewerEfforts" | "reviewerModels" | "reviewerPanel" | "taskGroupId" | "timeLimitMode" | "web">, "strict", z.ZodTypeAny, {
536
+ maxSeconds?: number | undefined;
537
+ timeLimitMode?: "hard" | "soft" | undefined;
538
+ taskGroupId?: string | undefined;
539
+ effort?: string | undefined;
540
+ efforts?: Record<string, string> | undefined;
541
+ review?: boolean | undefined;
542
+ reviewerModels?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
543
+ reviewerEfforts?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
544
+ paidBudget?: {
545
+ kind: "unlimited";
546
+ } | {
547
+ kind: "finite";
548
+ maxUsd: number;
549
+ } | undefined;
550
+ access?: "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
551
+ web?: "auto" | "cached" | "live" | "off" | undefined;
552
+ externalContextPolicy?: "auto" | "cached" | "live" | "off" | undefined;
553
+ continueCarrier?: "auto" | "packet" | undefined;
554
+ reviewerPanel?: {
555
+ harness: string;
556
+ model?: string | undefined;
557
+ effort?: string | undefined;
558
+ credentialProfileId?: string | undefined;
559
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
560
+ }[] | undefined;
561
+ credentialProfileId?: string | null | undefined;
562
+ }, {
563
+ maxSeconds?: number | undefined;
564
+ timeLimitMode?: "hard" | "soft" | undefined;
565
+ taskGroupId?: string | undefined;
566
+ effort?: string | undefined;
567
+ efforts?: Record<string, string> | undefined;
568
+ review?: boolean | undefined;
569
+ reviewerModels?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
570
+ reviewerEfforts?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
571
+ paidBudget?: {
572
+ kind: "unlimited";
573
+ } | {
574
+ kind: "finite";
575
+ maxUsd: number;
576
+ } | undefined;
577
+ access?: "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
578
+ web?: "auto" | "cached" | "live" | "off" | undefined;
579
+ externalContextPolicy?: "auto" | "cached" | "live" | "off" | undefined;
580
+ continueCarrier?: "auto" | "packet" | undefined;
581
+ reviewerPanel?: {
582
+ harness: string;
583
+ model?: string | undefined;
584
+ effort?: string | undefined;
585
+ credentialProfileId?: string | undefined;
586
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
587
+ }[] | undefined;
588
+ credentialProfileId?: string | null | undefined;
589
+ }>>;
590
+ }, "strict", z.ZodTypeAny, {
591
+ prompt: string;
592
+ attachments: {
593
+ resourceId: string;
594
+ }[];
595
+ action: "create";
596
+ predecessorId: string;
597
+ controls?: {
598
+ maxSeconds?: number | undefined;
599
+ timeLimitMode?: "hard" | "soft" | undefined;
600
+ taskGroupId?: string | undefined;
601
+ effort?: string | undefined;
602
+ efforts?: Record<string, string> | undefined;
603
+ review?: boolean | undefined;
604
+ reviewerModels?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
605
+ reviewerEfforts?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
606
+ paidBudget?: {
607
+ kind: "unlimited";
608
+ } | {
609
+ kind: "finite";
610
+ maxUsd: number;
611
+ } | undefined;
612
+ access?: "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
613
+ web?: "auto" | "cached" | "live" | "off" | undefined;
614
+ externalContextPolicy?: "auto" | "cached" | "live" | "off" | undefined;
615
+ continueCarrier?: "auto" | "packet" | undefined;
616
+ reviewerPanel?: {
617
+ harness: string;
618
+ model?: string | undefined;
619
+ effort?: string | undefined;
620
+ credentialProfileId?: string | undefined;
621
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
622
+ }[] | undefined;
623
+ credentialProfileId?: string | null | undefined;
624
+ } | undefined;
625
+ }, {
626
+ prompt: string;
627
+ attachments: {
628
+ resourceId: string;
629
+ }[];
630
+ action: "create";
631
+ predecessorId: string;
632
+ controls?: {
633
+ maxSeconds?: number | undefined;
634
+ timeLimitMode?: "hard" | "soft" | undefined;
635
+ taskGroupId?: string | undefined;
636
+ effort?: string | undefined;
637
+ efforts?: Record<string, string> | undefined;
638
+ review?: boolean | undefined;
639
+ reviewerModels?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
640
+ reviewerEfforts?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
641
+ paidBudget?: {
642
+ kind: "unlimited";
643
+ } | {
644
+ kind: "finite";
645
+ maxUsd: number;
646
+ } | undefined;
647
+ access?: "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
648
+ web?: "auto" | "cached" | "live" | "off" | undefined;
649
+ externalContextPolicy?: "auto" | "cached" | "live" | "off" | undefined;
650
+ continueCarrier?: "auto" | "packet" | undefined;
651
+ reviewerPanel?: {
652
+ harness: string;
653
+ model?: string | undefined;
654
+ effort?: string | undefined;
655
+ credentialProfileId?: string | undefined;
656
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
657
+ }[] | undefined;
658
+ credentialProfileId?: string | null | undefined;
659
+ } | undefined;
660
+ }>, z.ZodObject<{
661
+ prompt: z.ZodString;
662
+ attachments: z.ZodArray<z.ZodObject<{
663
+ resourceId: z.ZodString;
664
+ }, "strict", z.ZodTypeAny, {
665
+ resourceId: string;
666
+ }, {
667
+ resourceId: string;
668
+ }>, "many">;
669
+ action: z.ZodLiteral<"replace">;
670
+ draftId: z.ZodString;
671
+ expectedRevision: z.ZodNumber;
672
+ }, "strict", z.ZodTypeAny, {
673
+ prompt: string;
674
+ attachments: {
675
+ resourceId: string;
676
+ }[];
677
+ action: "replace";
678
+ draftId: string;
679
+ expectedRevision: number;
680
+ }, {
681
+ prompt: string;
682
+ attachments: {
683
+ resourceId: string;
684
+ }[];
685
+ action: "replace";
686
+ draftId: string;
687
+ expectedRevision: number;
688
+ }>, z.ZodObject<{
689
+ action: z.ZodLiteral<"clear">;
690
+ draftId: z.ZodString;
691
+ expectedRevision: z.ZodNumber;
692
+ }, "strict", z.ZodTypeAny, {
693
+ action: "clear";
694
+ draftId: string;
695
+ expectedRevision: number;
696
+ }, {
697
+ action: "clear";
698
+ draftId: string;
699
+ expectedRevision: number;
700
+ }>]>;
701
+ idempotencyKey: z.ZodString;
702
+ }, "strict", z.ZodTypeAny, {
703
+ request: {
704
+ prompt: string;
705
+ attachments: {
706
+ resourceId: string;
707
+ }[];
708
+ action: "create";
709
+ predecessorId: string;
710
+ controls?: {
711
+ maxSeconds?: number | undefined;
712
+ timeLimitMode?: "hard" | "soft" | undefined;
713
+ taskGroupId?: string | undefined;
714
+ effort?: string | undefined;
715
+ efforts?: Record<string, string> | undefined;
716
+ review?: boolean | undefined;
717
+ reviewerModels?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
718
+ reviewerEfforts?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
719
+ paidBudget?: {
720
+ kind: "unlimited";
721
+ } | {
722
+ kind: "finite";
723
+ maxUsd: number;
724
+ } | undefined;
725
+ access?: "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
726
+ web?: "auto" | "cached" | "live" | "off" | undefined;
727
+ externalContextPolicy?: "auto" | "cached" | "live" | "off" | undefined;
728
+ continueCarrier?: "auto" | "packet" | undefined;
729
+ reviewerPanel?: {
730
+ harness: string;
731
+ model?: string | undefined;
732
+ effort?: string | undefined;
733
+ credentialProfileId?: string | undefined;
734
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
735
+ }[] | undefined;
736
+ credentialProfileId?: string | null | undefined;
737
+ } | undefined;
738
+ } | {
739
+ prompt: string;
740
+ attachments: {
741
+ resourceId: string;
742
+ }[];
743
+ action: "replace";
744
+ draftId: string;
745
+ expectedRevision: number;
746
+ } | {
747
+ action: "clear";
748
+ draftId: string;
749
+ expectedRevision: number;
750
+ };
751
+ idempotencyKey: string;
752
+ }, {
753
+ request: {
754
+ prompt: string;
755
+ attachments: {
756
+ resourceId: string;
757
+ }[];
758
+ action: "create";
759
+ predecessorId: string;
760
+ controls?: {
761
+ maxSeconds?: number | undefined;
762
+ timeLimitMode?: "hard" | "soft" | undefined;
763
+ taskGroupId?: string | undefined;
764
+ effort?: string | undefined;
765
+ efforts?: Record<string, string> | undefined;
766
+ review?: boolean | undefined;
767
+ reviewerModels?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
768
+ reviewerEfforts?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
769
+ paidBudget?: {
770
+ kind: "unlimited";
771
+ } | {
772
+ kind: "finite";
773
+ maxUsd: number;
774
+ } | undefined;
775
+ access?: "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
776
+ web?: "auto" | "cached" | "live" | "off" | undefined;
777
+ externalContextPolicy?: "auto" | "cached" | "live" | "off" | undefined;
778
+ continueCarrier?: "auto" | "packet" | undefined;
779
+ reviewerPanel?: {
780
+ harness: string;
781
+ model?: string | undefined;
782
+ effort?: string | undefined;
783
+ credentialProfileId?: string | undefined;
784
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
785
+ }[] | undefined;
786
+ credentialProfileId?: string | null | undefined;
787
+ } | undefined;
788
+ } | {
789
+ prompt: string;
790
+ attachments: {
791
+ resourceId: string;
792
+ }[];
793
+ action: "replace";
794
+ draftId: string;
795
+ expectedRevision: number;
796
+ } | {
797
+ action: "clear";
798
+ draftId: string;
799
+ expectedRevision: number;
800
+ };
801
+ idempotencyKey: string;
802
+ }>;
803
+ export type DeferredMessageCall = z.infer<typeof DeferredMessageCall>;
804
+ export declare const DeferredMessageHold: z.ZodObject<{
805
+ code: z.ZodEnum<["predecessor_failed", "predecessor_cancelled", "predecessor_interrupted", "predecessor_needs_input", "predecessor_incomplete", "predecessor_facts_unavailable", "predecessor_work_unverified", "predecessor_checks_failed", "predecessor_review_blocked", "predecessor_output_unavailable", "settlement_unknown", "stop_requested", "shutdown", "restart_requires_controller", "partition_retired", "admission_refused"]>;
806
+ problem: z.ZodOptional<z.ZodObject<{
807
+ message: z.ZodString;
808
+ code: z.ZodDefault<z.ZodNullable<z.ZodString>>;
809
+ retryable: z.ZodDefault<z.ZodBoolean>;
810
+ required_actions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
811
+ context: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
812
+ }, "strict", z.ZodTypeAny, {
813
+ message: string;
814
+ code: string | null;
815
+ retryable: boolean;
816
+ required_actions: string[];
817
+ context: Record<string, unknown>;
818
+ }, {
819
+ message: string;
820
+ code?: string | null | undefined;
821
+ retryable?: boolean | undefined;
822
+ required_actions?: string[] | undefined;
823
+ context?: Record<string, unknown> | undefined;
824
+ }>>;
825
+ }, "strict", z.ZodTypeAny, {
826
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
827
+ problem?: {
828
+ message: string;
829
+ code: string | null;
830
+ retryable: boolean;
831
+ required_actions: string[];
832
+ context: Record<string, unknown>;
833
+ } | undefined;
834
+ }, {
835
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
836
+ problem?: {
837
+ message: string;
838
+ code?: string | null | undefined;
839
+ retryable?: boolean | undefined;
840
+ required_actions?: string[] | undefined;
841
+ context?: Record<string, unknown> | undefined;
842
+ } | undefined;
843
+ }>;
844
+ export type DeferredMessageHold = z.infer<typeof DeferredMessageHold>;
845
+ export declare const DeferredMessageProjection: z.ZodObject<{
846
+ draftId: z.ZodString;
847
+ revision: z.ZodNumber;
848
+ state: z.ZodEnum<["waiting", "held", "dispatched", "cleared"]>;
849
+ predecessorJobId: z.ZodString;
850
+ predecessorRunId: z.ZodNullable<z.ZodString>;
851
+ predecessorResult: z.ZodString;
852
+ hold: z.ZodNullable<z.ZodObject<{
853
+ code: z.ZodEnum<["predecessor_failed", "predecessor_cancelled", "predecessor_interrupted", "predecessor_needs_input", "predecessor_incomplete", "predecessor_facts_unavailable", "predecessor_work_unverified", "predecessor_checks_failed", "predecessor_review_blocked", "predecessor_output_unavailable", "settlement_unknown", "stop_requested", "shutdown", "restart_requires_controller", "partition_retired", "admission_refused"]>;
854
+ problem: z.ZodOptional<z.ZodObject<{
855
+ message: z.ZodString;
856
+ code: z.ZodDefault<z.ZodNullable<z.ZodString>>;
857
+ retryable: z.ZodDefault<z.ZodBoolean>;
858
+ required_actions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
859
+ context: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
860
+ }, "strict", z.ZodTypeAny, {
861
+ message: string;
862
+ code: string | null;
863
+ retryable: boolean;
864
+ required_actions: string[];
865
+ context: Record<string, unknown>;
866
+ }, {
867
+ message: string;
868
+ code?: string | null | undefined;
869
+ retryable?: boolean | undefined;
870
+ required_actions?: string[] | undefined;
871
+ context?: Record<string, unknown> | undefined;
872
+ }>>;
873
+ }, "strict", z.ZodTypeAny, {
874
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
875
+ problem?: {
876
+ message: string;
877
+ code: string | null;
878
+ retryable: boolean;
879
+ required_actions: string[];
880
+ context: Record<string, unknown>;
881
+ } | undefined;
882
+ }, {
883
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
884
+ problem?: {
885
+ message: string;
886
+ code?: string | null | undefined;
887
+ retryable?: boolean | undefined;
888
+ required_actions?: string[] | undefined;
889
+ context?: Record<string, unknown> | undefined;
890
+ } | undefined;
891
+ }>>;
892
+ dispatchedRevision: z.ZodNullable<z.ZodNumber>;
893
+ successorJobId: z.ZodNullable<z.ZodString>;
894
+ successorRunId: z.ZodNullable<z.ZodString>;
895
+ }, "strict", z.ZodTypeAny, {
896
+ draftId: string;
897
+ revision: number;
898
+ state: "cleared" | "dispatched" | "held" | "waiting";
899
+ predecessorJobId: string;
900
+ predecessorRunId: string | null;
901
+ predecessorResult: string;
902
+ hold: {
903
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
904
+ problem?: {
905
+ message: string;
906
+ code: string | null;
907
+ retryable: boolean;
908
+ required_actions: string[];
909
+ context: Record<string, unknown>;
910
+ } | undefined;
911
+ } | null;
912
+ dispatchedRevision: number | null;
913
+ successorJobId: string | null;
914
+ successorRunId: string | null;
915
+ }, {
916
+ draftId: string;
917
+ revision: number;
918
+ state: "cleared" | "dispatched" | "held" | "waiting";
919
+ predecessorJobId: string;
920
+ predecessorRunId: string | null;
921
+ predecessorResult: string;
922
+ hold: {
923
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
924
+ problem?: {
925
+ message: string;
926
+ code?: string | null | undefined;
927
+ retryable?: boolean | undefined;
928
+ required_actions?: string[] | undefined;
929
+ context?: Record<string, unknown> | undefined;
930
+ } | undefined;
931
+ } | null;
932
+ dispatchedRevision: number | null;
933
+ successorJobId: string | null;
934
+ successorRunId: string | null;
935
+ }>;
936
+ export type DeferredMessageProjection = z.infer<typeof DeferredMessageProjection>;
937
+ /** Daemon answer to a public Stop of the predecessor, whatever its lifecycle. */
938
+ export declare const DeferredMessageStopReport: z.ZodObject<{
939
+ held: z.ZodBoolean;
940
+ draft: z.ZodNullable<z.ZodObject<{
941
+ draftId: z.ZodString;
942
+ revision: z.ZodNumber;
943
+ state: z.ZodEnum<["waiting", "held", "dispatched", "cleared"]>;
944
+ predecessorJobId: z.ZodString;
945
+ predecessorRunId: z.ZodNullable<z.ZodString>;
946
+ predecessorResult: z.ZodString;
947
+ hold: z.ZodNullable<z.ZodObject<{
948
+ code: z.ZodEnum<["predecessor_failed", "predecessor_cancelled", "predecessor_interrupted", "predecessor_needs_input", "predecessor_incomplete", "predecessor_facts_unavailable", "predecessor_work_unverified", "predecessor_checks_failed", "predecessor_review_blocked", "predecessor_output_unavailable", "settlement_unknown", "stop_requested", "shutdown", "restart_requires_controller", "partition_retired", "admission_refused"]>;
949
+ problem: z.ZodOptional<z.ZodObject<{
950
+ message: z.ZodString;
951
+ code: z.ZodDefault<z.ZodNullable<z.ZodString>>;
952
+ retryable: z.ZodDefault<z.ZodBoolean>;
953
+ required_actions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
954
+ context: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
955
+ }, "strict", z.ZodTypeAny, {
956
+ message: string;
957
+ code: string | null;
958
+ retryable: boolean;
959
+ required_actions: string[];
960
+ context: Record<string, unknown>;
961
+ }, {
962
+ message: string;
963
+ code?: string | null | undefined;
964
+ retryable?: boolean | undefined;
965
+ required_actions?: string[] | undefined;
966
+ context?: Record<string, unknown> | undefined;
967
+ }>>;
968
+ }, "strict", z.ZodTypeAny, {
969
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
970
+ problem?: {
971
+ message: string;
972
+ code: string | null;
973
+ retryable: boolean;
974
+ required_actions: string[];
975
+ context: Record<string, unknown>;
976
+ } | undefined;
977
+ }, {
978
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
979
+ problem?: {
980
+ message: string;
981
+ code?: string | null | undefined;
982
+ retryable?: boolean | undefined;
983
+ required_actions?: string[] | undefined;
984
+ context?: Record<string, unknown> | undefined;
985
+ } | undefined;
986
+ }>>;
987
+ dispatchedRevision: z.ZodNullable<z.ZodNumber>;
988
+ successorJobId: z.ZodNullable<z.ZodString>;
989
+ successorRunId: z.ZodNullable<z.ZodString>;
990
+ }, "strict", z.ZodTypeAny, {
991
+ draftId: string;
992
+ revision: number;
993
+ state: "cleared" | "dispatched" | "held" | "waiting";
994
+ predecessorJobId: string;
995
+ predecessorRunId: string | null;
996
+ predecessorResult: string;
997
+ hold: {
998
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
999
+ problem?: {
1000
+ message: string;
1001
+ code: string | null;
1002
+ retryable: boolean;
1003
+ required_actions: string[];
1004
+ context: Record<string, unknown>;
1005
+ } | undefined;
1006
+ } | null;
1007
+ dispatchedRevision: number | null;
1008
+ successorJobId: string | null;
1009
+ successorRunId: string | null;
1010
+ }, {
1011
+ draftId: string;
1012
+ revision: number;
1013
+ state: "cleared" | "dispatched" | "held" | "waiting";
1014
+ predecessorJobId: string;
1015
+ predecessorRunId: string | null;
1016
+ predecessorResult: string;
1017
+ hold: {
1018
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
1019
+ problem?: {
1020
+ message: string;
1021
+ code?: string | null | undefined;
1022
+ retryable?: boolean | undefined;
1023
+ required_actions?: string[] | undefined;
1024
+ context?: Record<string, unknown> | undefined;
1025
+ } | undefined;
1026
+ } | null;
1027
+ dispatchedRevision: number | null;
1028
+ successorJobId: string | null;
1029
+ successorRunId: string | null;
1030
+ }>>;
1031
+ }, "strict", z.ZodTypeAny, {
1032
+ held: boolean;
1033
+ draft: {
1034
+ draftId: string;
1035
+ revision: number;
1036
+ state: "cleared" | "dispatched" | "held" | "waiting";
1037
+ predecessorJobId: string;
1038
+ predecessorRunId: string | null;
1039
+ predecessorResult: string;
1040
+ hold: {
1041
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
1042
+ problem?: {
1043
+ message: string;
1044
+ code: string | null;
1045
+ retryable: boolean;
1046
+ required_actions: string[];
1047
+ context: Record<string, unknown>;
1048
+ } | undefined;
1049
+ } | null;
1050
+ dispatchedRevision: number | null;
1051
+ successorJobId: string | null;
1052
+ successorRunId: string | null;
1053
+ } | null;
1054
+ }, {
1055
+ held: boolean;
1056
+ draft: {
1057
+ draftId: string;
1058
+ revision: number;
1059
+ state: "cleared" | "dispatched" | "held" | "waiting";
1060
+ predecessorJobId: string;
1061
+ predecessorRunId: string | null;
1062
+ predecessorResult: string;
1063
+ hold: {
1064
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
1065
+ problem?: {
1066
+ message: string;
1067
+ code?: string | null | undefined;
1068
+ retryable?: boolean | undefined;
1069
+ required_actions?: string[] | undefined;
1070
+ context?: Record<string, unknown> | undefined;
1071
+ } | undefined;
1072
+ } | null;
1073
+ dispatchedRevision: number | null;
1074
+ successorJobId: string | null;
1075
+ successorRunId: string | null;
1076
+ } | null;
1077
+ }>;
1078
+ export type DeferredMessageStopReport = z.infer<typeof DeferredMessageStopReport>;
1079
+ /** Same typed claim refusal at ordinary HTTP preflight and raw acceptance. */
1080
+ export declare function assertDeferredReservation(reservation: DeferredMessageProjection | null | undefined, reservedDraftId?: string): void;
1081
+ export declare const DeferredMessageDetail: z.ZodObject<{
1082
+ draftId: z.ZodString;
1083
+ revision: z.ZodNumber;
1084
+ state: z.ZodEnum<["waiting", "held", "dispatched", "cleared"]>;
1085
+ predecessorJobId: z.ZodString;
1086
+ predecessorRunId: z.ZodNullable<z.ZodString>;
1087
+ predecessorResult: z.ZodString;
1088
+ hold: z.ZodNullable<z.ZodObject<{
1089
+ code: z.ZodEnum<["predecessor_failed", "predecessor_cancelled", "predecessor_interrupted", "predecessor_needs_input", "predecessor_incomplete", "predecessor_facts_unavailable", "predecessor_work_unverified", "predecessor_checks_failed", "predecessor_review_blocked", "predecessor_output_unavailable", "settlement_unknown", "stop_requested", "shutdown", "restart_requires_controller", "partition_retired", "admission_refused"]>;
1090
+ problem: z.ZodOptional<z.ZodObject<{
1091
+ message: z.ZodString;
1092
+ code: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1093
+ retryable: z.ZodDefault<z.ZodBoolean>;
1094
+ required_actions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1095
+ context: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1096
+ }, "strict", z.ZodTypeAny, {
1097
+ message: string;
1098
+ code: string | null;
1099
+ retryable: boolean;
1100
+ required_actions: string[];
1101
+ context: Record<string, unknown>;
1102
+ }, {
1103
+ message: string;
1104
+ code?: string | null | undefined;
1105
+ retryable?: boolean | undefined;
1106
+ required_actions?: string[] | undefined;
1107
+ context?: Record<string, unknown> | undefined;
1108
+ }>>;
1109
+ }, "strict", z.ZodTypeAny, {
1110
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
1111
+ problem?: {
1112
+ message: string;
1113
+ code: string | null;
1114
+ retryable: boolean;
1115
+ required_actions: string[];
1116
+ context: Record<string, unknown>;
1117
+ } | undefined;
1118
+ }, {
1119
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
1120
+ problem?: {
1121
+ message: string;
1122
+ code?: string | null | undefined;
1123
+ retryable?: boolean | undefined;
1124
+ required_actions?: string[] | undefined;
1125
+ context?: Record<string, unknown> | undefined;
1126
+ } | undefined;
1127
+ }>>;
1128
+ dispatchedRevision: z.ZodNullable<z.ZodNumber>;
1129
+ successorJobId: z.ZodNullable<z.ZodString>;
1130
+ successorRunId: z.ZodNullable<z.ZodString>;
1131
+ } & {
1132
+ prompt: z.ZodString;
1133
+ attachments: z.ZodArray<z.ZodObject<{
1134
+ resourceId: z.ZodString;
1135
+ }, "strict", z.ZodTypeAny, {
1136
+ resourceId: string;
1137
+ }, {
1138
+ resourceId: string;
1139
+ }>, "many">;
1140
+ capturedStart: z.ZodNullable<z.ZodObject<{
1141
+ maxSeconds: z.ZodOptional<z.ZodNumber>;
1142
+ timeLimitMode: z.ZodOptional<z.ZodEnum<["soft", "hard"]>>;
1143
+ prompt: z.ZodDefault<z.ZodString>;
1144
+ instructions: z.ZodOptional<z.ZodString>;
1145
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
1146
+ resourceId: z.ZodString;
1147
+ }, "strict", z.ZodTypeAny, {
1148
+ resourceId: string;
1149
+ }, {
1150
+ resourceId: string;
1151
+ }>, "many">>;
1152
+ mode: z.ZodDefault<z.ZodEnum<["ask", "plan", "agent"]>>;
1153
+ taskGroupId: z.ZodOptional<z.ZodString>;
1154
+ scope: z.ZodDefault<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1155
+ kind: z.ZodLiteral<"project">;
1156
+ root: z.ZodString;
1157
+ context: z.ZodDefault<z.ZodEnum<["auto"]>>;
1158
+ ephemeral: z.ZodDefault<z.ZodBoolean>;
1159
+ }, "strict", z.ZodTypeAny, {
1160
+ kind: "project";
1161
+ root: string;
1162
+ context: "auto";
1163
+ ephemeral: boolean;
1164
+ }, {
1165
+ kind: "project";
1166
+ root: string;
1167
+ context?: "auto" | undefined;
1168
+ ephemeral?: boolean | undefined;
1169
+ }>, z.ZodObject<{
1170
+ kind: z.ZodLiteral<"none">;
1171
+ }, "strict", z.ZodTypeAny, {
1172
+ kind: "none";
1173
+ }, {
1174
+ kind: "none";
1175
+ }>]>>;
1176
+ execution: z.ZodDefault<z.ZodObject<{
1177
+ isolation: z.ZodDefault<z.ZodEnum<["envelope", "live"]>>;
1178
+ delegated: z.ZodDefault<z.ZodBoolean>;
1179
+ workspaceRoot: z.ZodOptional<z.ZodString>;
1180
+ workspaceKind: z.ZodOptional<z.ZodEnum<["git", "directory"]>>;
1181
+ scopePaths: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
1182
+ auxiliaryWritableRoots: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1183
+ }, "strict", z.ZodTypeAny, {
1184
+ isolation: "envelope" | "live";
1185
+ delegated: boolean;
1186
+ workspaceRoot?: string | undefined;
1187
+ workspaceKind?: "directory" | "git" | undefined;
1188
+ scopePaths?: string[] | undefined;
1189
+ auxiliaryWritableRoots?: string[] | undefined;
1190
+ }, {
1191
+ isolation?: "envelope" | "live" | undefined;
1192
+ delegated?: boolean | undefined;
1193
+ workspaceRoot?: string | undefined;
1194
+ workspaceKind?: "directory" | "git" | undefined;
1195
+ scopePaths?: string[] | undefined;
1196
+ auxiliaryWritableRoots?: string[] | undefined;
1197
+ }>>;
1198
+ harnesses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1199
+ primaryHarness: z.ZodOptional<z.ZodString>;
1200
+ routingGoal: z.ZodOptional<z.ZodEnum<["auto", "quality", "economy"]>>;
1201
+ model: z.ZodOptional<z.ZodString>;
1202
+ models: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1203
+ effort: z.ZodOptional<z.ZodString>;
1204
+ processingPreference: z.ZodOptional<z.ZodEnum<["standard", "fast", "economy"]>>;
1205
+ promptCacheTtl: z.ZodOptional<z.ZodEnum<["5m", "1h"]>>;
1206
+ efforts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1207
+ review: z.ZodOptional<z.ZodBoolean>;
1208
+ reviewerModels: z.ZodOptional<z.ZodRecord<z.ZodEnum<["openai", "anthropic", "google", "cursor", "opencode", "xai", "local", "unknown"]>, z.ZodString>>;
1209
+ reviewerEfforts: z.ZodOptional<z.ZodRecord<z.ZodEnum<["openai", "anthropic", "google", "cursor", "opencode", "xai", "local", "unknown"]>, z.ZodString>>;
1210
+ n: z.ZodOptional<z.ZodNumber>;
1211
+ attempts: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1212
+ untilClean: z.ZodOptional<z.ZodBoolean>;
1213
+ deepScan: z.ZodOptional<z.ZodBoolean>;
1214
+ create: z.ZodOptional<z.ZodBoolean>;
1215
+ council: z.ZodOptional<z.ZodBoolean>;
1216
+ synthesis: z.ZodOptional<z.ZodEnum<["auto", "always", "never"]>>;
1217
+ paidBudget: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1218
+ kind: z.ZodLiteral<"unlimited">;
1219
+ }, "strict", z.ZodTypeAny, {
1220
+ kind: "unlimited";
1221
+ }, {
1222
+ kind: "unlimited";
1223
+ }>, z.ZodObject<{
1224
+ kind: z.ZodLiteral<"finite">;
1225
+ maxUsd: z.ZodNumber;
1226
+ }, "strict", z.ZodTypeAny, {
1227
+ kind: "finite";
1228
+ maxUsd: number;
1229
+ }, {
1230
+ kind: "finite";
1231
+ maxUsd: number;
1232
+ }>]>>;
1233
+ access: z.ZodOptional<z.ZodEnum<["readonly", "workspace_write", "full", "inherit_native"]>>;
1234
+ web: z.ZodOptional<z.ZodEnum<["off", "auto", "cached", "live"]>>;
1235
+ externalContextPolicy: z.ZodOptional<z.ZodEnum<["off", "auto", "cached", "live"]>>;
1236
+ browser: z.ZodOptional<z.ZodBoolean>;
1237
+ tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
1238
+ program: z.ZodString;
1239
+ args: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1240
+ cwd: z.ZodOptional<z.ZodString>;
1241
+ envAllowlist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1242
+ }, "strict", z.ZodTypeAny, {
1243
+ program: string;
1244
+ args: string[];
1245
+ cwd?: string | undefined;
1246
+ envAllowlist: string[];
1247
+ }, {
1248
+ program: string;
1249
+ args?: string[] | undefined;
1250
+ cwd?: string | undefined;
1251
+ envAllowlist?: string[] | undefined;
1252
+ }>, "many">>;
1253
+ protectedPathApprovals: z.ZodOptional<z.ZodArray<z.ZodObject<{
1254
+ path: z.ZodString;
1255
+ reason: z.ZodOptional<z.ZodString>;
1256
+ }, "strict", z.ZodTypeAny, {
1257
+ path: string;
1258
+ reason?: string | undefined;
1259
+ }, {
1260
+ path: string;
1261
+ reason?: string | undefined;
1262
+ }>, "many">>;
1263
+ threadId: z.ZodOptional<z.ZodString>;
1264
+ turnId: z.ZodOptional<z.ZodString>;
1265
+ parentRunId: z.ZodOptional<z.ZodString>;
1266
+ delegatedFromRunId: z.ZodOptional<z.ZodString>;
1267
+ retryOf: z.ZodOptional<z.ZodString>;
1268
+ continueFrom: z.ZodOptional<z.ZodString>;
1269
+ continueCarrier: z.ZodOptional<z.ZodEnum<["auto", "packet"]>>;
1270
+ continueModelInherited: z.ZodOptional<z.ZodBoolean>;
1271
+ planRunId: z.ZodOptional<z.ZodString>;
1272
+ planRef: z.ZodOptional<z.ZodObject<{
1273
+ runId: z.ZodString;
1274
+ sha256: z.ZodString;
1275
+ path: z.ZodString;
1276
+ }, "strict", z.ZodTypeAny, {
1277
+ runId: string;
1278
+ sha256: string;
1279
+ path: string;
1280
+ }, {
1281
+ runId: string;
1282
+ sha256: string;
1283
+ path: string;
1284
+ }>>;
1285
+ reviewerPanel: z.ZodOptional<z.ZodArray<z.ZodObject<{
1286
+ harness: z.ZodString;
1287
+ model: z.ZodOptional<z.ZodString>;
1288
+ effort: z.ZodOptional<z.ZodString>;
1289
+ credentialProfileId: z.ZodOptional<z.ZodString>;
1290
+ processingPreference: z.ZodOptional<z.ZodEnum<["standard", "fast", "economy"]>>;
1291
+ }, "strict", z.ZodTypeAny, {
1292
+ harness: string;
1293
+ model?: string | undefined;
1294
+ effort?: string | undefined;
1295
+ credentialProfileId?: string | undefined;
1296
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
1297
+ }, {
1298
+ harness: string;
1299
+ model?: string | undefined;
1300
+ effort?: string | undefined;
1301
+ credentialProfileId?: string | undefined;
1302
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
1303
+ }>, "many">>;
1304
+ authPreference: z.ZodOptional<z.ZodEnum<["subscription", "api_key", "auto"]>>;
1305
+ credentialProfileId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1306
+ delegate: z.ZodOptional<z.ZodBoolean>;
1307
+ denyPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1308
+ outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1309
+ maxTurns: z.ZodOptional<z.ZodNumber>;
1310
+ } & {
1311
+ deferredDefaults: z.ZodOptional<z.ZodObject<{
1312
+ harnesses: z.ZodRecord<z.ZodString, z.ZodObject<Pick<{
1313
+ enabled: z.ZodDefault<z.ZodBoolean>;
1314
+ native_credentials_enabled: z.ZodDefault<z.ZodBoolean>;
1315
+ default_model: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1316
+ effort: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1317
+ max_turns: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1318
+ max_rounds: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1319
+ profile_policy: z.ZodDefault<z.ZodObject<{
1320
+ limit_action: z.ZodDefault<z.ZodEnum<["auto", "fail", "ask", "rotate"]>>;
1321
+ rotation_eligible: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1322
+ headroom_threshold: z.ZodDefault<z.ZodNumber>;
1323
+ }, "strict", z.ZodTypeAny, {
1324
+ limit_action: "ask" | "auto" | "fail" | "rotate";
1325
+ rotation_eligible: string[];
1326
+ headroom_threshold: number;
1327
+ }, {
1328
+ limit_action?: "ask" | "auto" | "fail" | "rotate" | undefined;
1329
+ rotation_eligible?: string[] | undefined;
1330
+ headroom_threshold?: number | undefined;
1331
+ }>>;
1332
+ tools_allow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1333
+ tools_deny: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1334
+ fallback_model: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1335
+ web: z.ZodDefault<z.ZodEnum<["off", "auto", "cached", "live"]>>;
1336
+ auth_preference: z.ZodDefault<z.ZodEnum<["subscription", "api_key", "auto"]>>;
1337
+ }, "auth_preference" | "default_model" | "effort" | "fallback_model" | "max_rounds" | "max_turns" | "web">, "strip", z.ZodTypeAny, {
1338
+ default_model: string | null;
1339
+ effort: string | null;
1340
+ max_turns: number | null;
1341
+ max_rounds: number | null;
1342
+ fallback_model: string | null;
1343
+ web: "auto" | "cached" | "live" | "off";
1344
+ auth_preference: "api_key" | "auto" | "subscription";
1345
+ }, {
1346
+ default_model?: string | null | undefined;
1347
+ effort?: string | null | undefined;
1348
+ max_turns?: number | null | undefined;
1349
+ max_rounds?: number | null | undefined;
1350
+ fallback_model?: string | null | undefined;
1351
+ web?: "auto" | "cached" | "live" | "off" | undefined;
1352
+ auth_preference?: "api_key" | "auto" | "subscription" | undefined;
1353
+ }>>;
1354
+ eligibleHarnesses: z.ZodArray<z.ZodString, "many">;
1355
+ primaryHarness: z.ZodNullable<z.ZodString>;
1356
+ authPreference: z.ZodEnum<["subscription", "api_key", "auto"]>;
1357
+ }, "strict", z.ZodTypeAny, {
1358
+ harnesses: Record<string, {
1359
+ default_model: string | null;
1360
+ effort: string | null;
1361
+ max_turns: number | null;
1362
+ max_rounds: number | null;
1363
+ fallback_model: string | null;
1364
+ web: "auto" | "cached" | "live" | "off";
1365
+ auth_preference: "api_key" | "auto" | "subscription";
1366
+ }>;
1367
+ eligibleHarnesses: string[];
1368
+ primaryHarness: string | null;
1369
+ authPreference: "api_key" | "auto" | "subscription";
1370
+ }, {
1371
+ harnesses: Record<string, {
1372
+ default_model?: string | null | undefined;
1373
+ effort?: string | null | undefined;
1374
+ max_turns?: number | null | undefined;
1375
+ max_rounds?: number | null | undefined;
1376
+ fallback_model?: string | null | undefined;
1377
+ web?: "auto" | "cached" | "live" | "off" | undefined;
1378
+ auth_preference?: "api_key" | "auto" | "subscription" | undefined;
1379
+ }>;
1380
+ eligibleHarnesses: string[];
1381
+ primaryHarness: string | null;
1382
+ authPreference: "api_key" | "auto" | "subscription";
1383
+ }>>;
1384
+ }, "strict", z.ZodTypeAny, {
1385
+ maxSeconds?: number | undefined;
1386
+ timeLimitMode?: "hard" | "soft" | undefined;
1387
+ prompt: string;
1388
+ instructions?: string | undefined;
1389
+ attachments?: {
1390
+ resourceId: string;
1391
+ }[] | undefined;
1392
+ mode: "agent" | "ask" | "plan";
1393
+ taskGroupId?: string | undefined;
1394
+ scope: {
1395
+ kind: "project";
1396
+ root: string;
1397
+ context: "auto";
1398
+ ephemeral: boolean;
1399
+ } | {
1400
+ kind: "none";
1401
+ };
1402
+ execution: {
1403
+ isolation: "envelope" | "live";
1404
+ delegated: boolean;
1405
+ workspaceRoot?: string | undefined;
1406
+ workspaceKind?: "directory" | "git" | undefined;
1407
+ scopePaths?: string[] | undefined;
1408
+ auxiliaryWritableRoots?: string[] | undefined;
1409
+ };
1410
+ harnesses?: string[] | undefined;
1411
+ primaryHarness?: string | undefined;
1412
+ routingGoal?: "auto" | "economy" | "quality" | undefined;
1413
+ model?: string | undefined;
1414
+ models?: Record<string, string> | undefined;
1415
+ effort?: string | undefined;
1416
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
1417
+ promptCacheTtl?: "1h" | "5m" | undefined;
1418
+ efforts?: Record<string, string> | undefined;
1419
+ review?: boolean | undefined;
1420
+ reviewerModels?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
1421
+ reviewerEfforts?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
1422
+ n?: number | undefined;
1423
+ attempts?: number | null | undefined;
1424
+ untilClean?: boolean | undefined;
1425
+ deepScan?: boolean | undefined;
1426
+ create?: boolean | undefined;
1427
+ council?: boolean | undefined;
1428
+ synthesis?: "always" | "auto" | "never" | undefined;
1429
+ paidBudget?: {
1430
+ kind: "unlimited";
1431
+ } | {
1432
+ kind: "finite";
1433
+ maxUsd: number;
1434
+ } | undefined;
1435
+ access?: "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
1436
+ web?: "auto" | "cached" | "live" | "off" | undefined;
1437
+ externalContextPolicy?: "auto" | "cached" | "live" | "off" | undefined;
1438
+ browser?: boolean | undefined;
1439
+ tests?: {
1440
+ program: string;
1441
+ args: string[];
1442
+ cwd?: string | undefined;
1443
+ envAllowlist: string[];
1444
+ }[] | undefined;
1445
+ protectedPathApprovals?: {
1446
+ path: string;
1447
+ reason?: string | undefined;
1448
+ }[] | undefined;
1449
+ threadId?: string | undefined;
1450
+ turnId?: string | undefined;
1451
+ parentRunId?: string | undefined;
1452
+ delegatedFromRunId?: string | undefined;
1453
+ retryOf?: string | undefined;
1454
+ continueFrom?: string | undefined;
1455
+ continueCarrier?: "auto" | "packet" | undefined;
1456
+ continueModelInherited?: boolean | undefined;
1457
+ planRunId?: string | undefined;
1458
+ planRef?: {
1459
+ runId: string;
1460
+ sha256: string;
1461
+ path: string;
1462
+ } | undefined;
1463
+ reviewerPanel?: {
1464
+ harness: string;
1465
+ model?: string | undefined;
1466
+ effort?: string | undefined;
1467
+ credentialProfileId?: string | undefined;
1468
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
1469
+ }[] | undefined;
1470
+ authPreference?: "api_key" | "auto" | "subscription" | undefined;
1471
+ credentialProfileId?: string | null | undefined;
1472
+ delegate?: boolean | undefined;
1473
+ denyPaths?: string[] | undefined;
1474
+ outputSchema?: Record<string, unknown> | undefined;
1475
+ maxTurns?: number | undefined;
1476
+ deferredDefaults?: {
1477
+ harnesses: Record<string, {
1478
+ default_model: string | null;
1479
+ effort: string | null;
1480
+ max_turns: number | null;
1481
+ max_rounds: number | null;
1482
+ fallback_model: string | null;
1483
+ web: "auto" | "cached" | "live" | "off";
1484
+ auth_preference: "api_key" | "auto" | "subscription";
1485
+ }>;
1486
+ eligibleHarnesses: string[];
1487
+ primaryHarness: string | null;
1488
+ authPreference: "api_key" | "auto" | "subscription";
1489
+ } | undefined;
1490
+ }, {
1491
+ maxSeconds?: number | undefined;
1492
+ timeLimitMode?: "hard" | "soft" | undefined;
1493
+ prompt?: string | undefined;
1494
+ instructions?: string | undefined;
1495
+ attachments?: {
1496
+ resourceId: string;
1497
+ }[] | undefined;
1498
+ mode?: "agent" | "ask" | "plan" | undefined;
1499
+ taskGroupId?: string | undefined;
1500
+ scope?: {
1501
+ kind: "project";
1502
+ root: string;
1503
+ context?: "auto" | undefined;
1504
+ ephemeral?: boolean | undefined;
1505
+ } | {
1506
+ kind: "none";
1507
+ } | undefined;
1508
+ execution?: {
1509
+ isolation?: "envelope" | "live" | undefined;
1510
+ delegated?: boolean | undefined;
1511
+ workspaceRoot?: string | undefined;
1512
+ workspaceKind?: "directory" | "git" | undefined;
1513
+ scopePaths?: string[] | undefined;
1514
+ auxiliaryWritableRoots?: string[] | undefined;
1515
+ } | undefined;
1516
+ harnesses?: string[] | undefined;
1517
+ primaryHarness?: string | undefined;
1518
+ routingGoal?: "auto" | "economy" | "quality" | undefined;
1519
+ model?: string | undefined;
1520
+ models?: Record<string, string> | undefined;
1521
+ effort?: string | undefined;
1522
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
1523
+ promptCacheTtl?: "1h" | "5m" | undefined;
1524
+ efforts?: Record<string, string> | undefined;
1525
+ review?: boolean | undefined;
1526
+ reviewerModels?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
1527
+ reviewerEfforts?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
1528
+ n?: number | undefined;
1529
+ attempts?: number | null | undefined;
1530
+ untilClean?: boolean | undefined;
1531
+ deepScan?: boolean | undefined;
1532
+ create?: boolean | undefined;
1533
+ council?: boolean | undefined;
1534
+ synthesis?: "always" | "auto" | "never" | undefined;
1535
+ paidBudget?: {
1536
+ kind: "unlimited";
1537
+ } | {
1538
+ kind: "finite";
1539
+ maxUsd: number;
1540
+ } | undefined;
1541
+ access?: "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
1542
+ web?: "auto" | "cached" | "live" | "off" | undefined;
1543
+ externalContextPolicy?: "auto" | "cached" | "live" | "off" | undefined;
1544
+ browser?: boolean | undefined;
1545
+ tests?: {
1546
+ program: string;
1547
+ args?: string[] | undefined;
1548
+ cwd?: string | undefined;
1549
+ envAllowlist?: string[] | undefined;
1550
+ }[] | undefined;
1551
+ protectedPathApprovals?: {
1552
+ path: string;
1553
+ reason?: string | undefined;
1554
+ }[] | undefined;
1555
+ threadId?: string | undefined;
1556
+ turnId?: string | undefined;
1557
+ parentRunId?: string | undefined;
1558
+ delegatedFromRunId?: string | undefined;
1559
+ retryOf?: string | undefined;
1560
+ continueFrom?: string | undefined;
1561
+ continueCarrier?: "auto" | "packet" | undefined;
1562
+ continueModelInherited?: boolean | undefined;
1563
+ planRunId?: string | undefined;
1564
+ planRef?: {
1565
+ runId: string;
1566
+ sha256: string;
1567
+ path: string;
1568
+ } | undefined;
1569
+ reviewerPanel?: {
1570
+ harness: string;
1571
+ model?: string | undefined;
1572
+ effort?: string | undefined;
1573
+ credentialProfileId?: string | undefined;
1574
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
1575
+ }[] | undefined;
1576
+ authPreference?: "api_key" | "auto" | "subscription" | undefined;
1577
+ credentialProfileId?: string | null | undefined;
1578
+ delegate?: boolean | undefined;
1579
+ denyPaths?: string[] | undefined;
1580
+ outputSchema?: Record<string, unknown> | undefined;
1581
+ maxTurns?: number | undefined;
1582
+ deferredDefaults?: {
1583
+ harnesses: Record<string, {
1584
+ default_model?: string | null | undefined;
1585
+ effort?: string | null | undefined;
1586
+ max_turns?: number | null | undefined;
1587
+ max_rounds?: number | null | undefined;
1588
+ fallback_model?: string | null | undefined;
1589
+ web?: "auto" | "cached" | "live" | "off" | undefined;
1590
+ auth_preference?: "api_key" | "auto" | "subscription" | undefined;
1591
+ }>;
1592
+ eligibleHarnesses: string[];
1593
+ primaryHarness: string | null;
1594
+ authPreference: "api_key" | "auto" | "subscription";
1595
+ } | undefined;
1596
+ }>>;
1597
+ capturedAt: z.ZodNullable<z.ZodString>;
1598
+ }, "strict", z.ZodTypeAny, {
1599
+ prompt: string;
1600
+ attachments: {
1601
+ resourceId: string;
1602
+ }[];
1603
+ draftId: string;
1604
+ revision: number;
1605
+ state: "cleared" | "dispatched" | "held" | "waiting";
1606
+ predecessorJobId: string;
1607
+ predecessorRunId: string | null;
1608
+ predecessorResult: string;
1609
+ hold: {
1610
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
1611
+ problem?: {
1612
+ message: string;
1613
+ code: string | null;
1614
+ retryable: boolean;
1615
+ required_actions: string[];
1616
+ context: Record<string, unknown>;
1617
+ } | undefined;
1618
+ } | null;
1619
+ dispatchedRevision: number | null;
1620
+ successorJobId: string | null;
1621
+ successorRunId: string | null;
1622
+ capturedStart: {
1623
+ maxSeconds?: number | undefined;
1624
+ timeLimitMode?: "hard" | "soft" | undefined;
1625
+ prompt: string;
1626
+ instructions?: string | undefined;
1627
+ attachments?: {
1628
+ resourceId: string;
1629
+ }[] | undefined;
1630
+ mode: "agent" | "ask" | "plan";
1631
+ taskGroupId?: string | undefined;
1632
+ scope: {
1633
+ kind: "project";
1634
+ root: string;
1635
+ context: "auto";
1636
+ ephemeral: boolean;
1637
+ } | {
1638
+ kind: "none";
1639
+ };
1640
+ execution: {
1641
+ isolation: "envelope" | "live";
1642
+ delegated: boolean;
1643
+ workspaceRoot?: string | undefined;
1644
+ workspaceKind?: "directory" | "git" | undefined;
1645
+ scopePaths?: string[] | undefined;
1646
+ auxiliaryWritableRoots?: string[] | undefined;
1647
+ };
1648
+ harnesses?: string[] | undefined;
1649
+ primaryHarness?: string | undefined;
1650
+ routingGoal?: "auto" | "economy" | "quality" | undefined;
1651
+ model?: string | undefined;
1652
+ models?: Record<string, string> | undefined;
1653
+ effort?: string | undefined;
1654
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
1655
+ promptCacheTtl?: "1h" | "5m" | undefined;
1656
+ efforts?: Record<string, string> | undefined;
1657
+ review?: boolean | undefined;
1658
+ reviewerModels?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
1659
+ reviewerEfforts?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
1660
+ n?: number | undefined;
1661
+ attempts?: number | null | undefined;
1662
+ untilClean?: boolean | undefined;
1663
+ deepScan?: boolean | undefined;
1664
+ create?: boolean | undefined;
1665
+ council?: boolean | undefined;
1666
+ synthesis?: "always" | "auto" | "never" | undefined;
1667
+ paidBudget?: {
1668
+ kind: "unlimited";
1669
+ } | {
1670
+ kind: "finite";
1671
+ maxUsd: number;
1672
+ } | undefined;
1673
+ access?: "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
1674
+ web?: "auto" | "cached" | "live" | "off" | undefined;
1675
+ externalContextPolicy?: "auto" | "cached" | "live" | "off" | undefined;
1676
+ browser?: boolean | undefined;
1677
+ tests?: {
1678
+ program: string;
1679
+ args: string[];
1680
+ cwd?: string | undefined;
1681
+ envAllowlist: string[];
1682
+ }[] | undefined;
1683
+ protectedPathApprovals?: {
1684
+ path: string;
1685
+ reason?: string | undefined;
1686
+ }[] | undefined;
1687
+ threadId?: string | undefined;
1688
+ turnId?: string | undefined;
1689
+ parentRunId?: string | undefined;
1690
+ delegatedFromRunId?: string | undefined;
1691
+ retryOf?: string | undefined;
1692
+ continueFrom?: string | undefined;
1693
+ continueCarrier?: "auto" | "packet" | undefined;
1694
+ continueModelInherited?: boolean | undefined;
1695
+ planRunId?: string | undefined;
1696
+ planRef?: {
1697
+ runId: string;
1698
+ sha256: string;
1699
+ path: string;
1700
+ } | undefined;
1701
+ reviewerPanel?: {
1702
+ harness: string;
1703
+ model?: string | undefined;
1704
+ effort?: string | undefined;
1705
+ credentialProfileId?: string | undefined;
1706
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
1707
+ }[] | undefined;
1708
+ authPreference?: "api_key" | "auto" | "subscription" | undefined;
1709
+ credentialProfileId?: string | null | undefined;
1710
+ delegate?: boolean | undefined;
1711
+ denyPaths?: string[] | undefined;
1712
+ outputSchema?: Record<string, unknown> | undefined;
1713
+ maxTurns?: number | undefined;
1714
+ deferredDefaults?: {
1715
+ harnesses: Record<string, {
1716
+ default_model: string | null;
1717
+ effort: string | null;
1718
+ max_turns: number | null;
1719
+ max_rounds: number | null;
1720
+ fallback_model: string | null;
1721
+ web: "auto" | "cached" | "live" | "off";
1722
+ auth_preference: "api_key" | "auto" | "subscription";
1723
+ }>;
1724
+ eligibleHarnesses: string[];
1725
+ primaryHarness: string | null;
1726
+ authPreference: "api_key" | "auto" | "subscription";
1727
+ } | undefined;
1728
+ } | null;
1729
+ capturedAt: string | null;
1730
+ }, {
1731
+ prompt: string;
1732
+ attachments: {
1733
+ resourceId: string;
1734
+ }[];
1735
+ draftId: string;
1736
+ revision: number;
1737
+ state: "cleared" | "dispatched" | "held" | "waiting";
1738
+ predecessorJobId: string;
1739
+ predecessorRunId: string | null;
1740
+ predecessorResult: string;
1741
+ hold: {
1742
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
1743
+ problem?: {
1744
+ message: string;
1745
+ code?: string | null | undefined;
1746
+ retryable?: boolean | undefined;
1747
+ required_actions?: string[] | undefined;
1748
+ context?: Record<string, unknown> | undefined;
1749
+ } | undefined;
1750
+ } | null;
1751
+ dispatchedRevision: number | null;
1752
+ successorJobId: string | null;
1753
+ successorRunId: string | null;
1754
+ capturedStart: {
1755
+ maxSeconds?: number | undefined;
1756
+ timeLimitMode?: "hard" | "soft" | undefined;
1757
+ prompt?: string | undefined;
1758
+ instructions?: string | undefined;
1759
+ attachments?: {
1760
+ resourceId: string;
1761
+ }[] | undefined;
1762
+ mode?: "agent" | "ask" | "plan" | undefined;
1763
+ taskGroupId?: string | undefined;
1764
+ scope?: {
1765
+ kind: "project";
1766
+ root: string;
1767
+ context?: "auto" | undefined;
1768
+ ephemeral?: boolean | undefined;
1769
+ } | {
1770
+ kind: "none";
1771
+ } | undefined;
1772
+ execution?: {
1773
+ isolation?: "envelope" | "live" | undefined;
1774
+ delegated?: boolean | undefined;
1775
+ workspaceRoot?: string | undefined;
1776
+ workspaceKind?: "directory" | "git" | undefined;
1777
+ scopePaths?: string[] | undefined;
1778
+ auxiliaryWritableRoots?: string[] | undefined;
1779
+ } | undefined;
1780
+ harnesses?: string[] | undefined;
1781
+ primaryHarness?: string | undefined;
1782
+ routingGoal?: "auto" | "economy" | "quality" | undefined;
1783
+ model?: string | undefined;
1784
+ models?: Record<string, string> | undefined;
1785
+ effort?: string | undefined;
1786
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
1787
+ promptCacheTtl?: "1h" | "5m" | undefined;
1788
+ efforts?: Record<string, string> | undefined;
1789
+ review?: boolean | undefined;
1790
+ reviewerModels?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
1791
+ reviewerEfforts?: Partial<Record<"anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai", string>> | undefined;
1792
+ n?: number | undefined;
1793
+ attempts?: number | null | undefined;
1794
+ untilClean?: boolean | undefined;
1795
+ deepScan?: boolean | undefined;
1796
+ create?: boolean | undefined;
1797
+ council?: boolean | undefined;
1798
+ synthesis?: "always" | "auto" | "never" | undefined;
1799
+ paidBudget?: {
1800
+ kind: "unlimited";
1801
+ } | {
1802
+ kind: "finite";
1803
+ maxUsd: number;
1804
+ } | undefined;
1805
+ access?: "full" | "inherit_native" | "readonly" | "workspace_write" | undefined;
1806
+ web?: "auto" | "cached" | "live" | "off" | undefined;
1807
+ externalContextPolicy?: "auto" | "cached" | "live" | "off" | undefined;
1808
+ browser?: boolean | undefined;
1809
+ tests?: {
1810
+ program: string;
1811
+ args?: string[] | undefined;
1812
+ cwd?: string | undefined;
1813
+ envAllowlist?: string[] | undefined;
1814
+ }[] | undefined;
1815
+ protectedPathApprovals?: {
1816
+ path: string;
1817
+ reason?: string | undefined;
1818
+ }[] | undefined;
1819
+ threadId?: string | undefined;
1820
+ turnId?: string | undefined;
1821
+ parentRunId?: string | undefined;
1822
+ delegatedFromRunId?: string | undefined;
1823
+ retryOf?: string | undefined;
1824
+ continueFrom?: string | undefined;
1825
+ continueCarrier?: "auto" | "packet" | undefined;
1826
+ continueModelInherited?: boolean | undefined;
1827
+ planRunId?: string | undefined;
1828
+ planRef?: {
1829
+ runId: string;
1830
+ sha256: string;
1831
+ path: string;
1832
+ } | undefined;
1833
+ reviewerPanel?: {
1834
+ harness: string;
1835
+ model?: string | undefined;
1836
+ effort?: string | undefined;
1837
+ credentialProfileId?: string | undefined;
1838
+ processingPreference?: "economy" | "fast" | "standard" | undefined;
1839
+ }[] | undefined;
1840
+ authPreference?: "api_key" | "auto" | "subscription" | undefined;
1841
+ credentialProfileId?: string | null | undefined;
1842
+ delegate?: boolean | undefined;
1843
+ denyPaths?: string[] | undefined;
1844
+ outputSchema?: Record<string, unknown> | undefined;
1845
+ maxTurns?: number | undefined;
1846
+ deferredDefaults?: {
1847
+ harnesses: Record<string, {
1848
+ default_model?: string | null | undefined;
1849
+ effort?: string | null | undefined;
1850
+ max_turns?: number | null | undefined;
1851
+ max_rounds?: number | null | undefined;
1852
+ fallback_model?: string | null | undefined;
1853
+ web?: "auto" | "cached" | "live" | "off" | undefined;
1854
+ auth_preference?: "api_key" | "auto" | "subscription" | undefined;
1855
+ }>;
1856
+ eligibleHarnesses: string[];
1857
+ primaryHarness: string | null;
1858
+ authPreference: "api_key" | "auto" | "subscription";
1859
+ } | undefined;
1860
+ } | null;
1861
+ capturedAt: string | null;
1862
+ }>;
1863
+ export type DeferredMessageDetail = z.infer<typeof DeferredMessageDetail>;
1864
+ export declare const DeferredMessageReceipt: z.ZodObject<{
1865
+ appliedRevision: z.ZodNumber;
1866
+ draft: z.ZodObject<{
1867
+ draftId: z.ZodString;
1868
+ revision: z.ZodNumber;
1869
+ state: z.ZodEnum<["waiting", "held", "dispatched", "cleared"]>;
1870
+ predecessorJobId: z.ZodString;
1871
+ predecessorRunId: z.ZodNullable<z.ZodString>;
1872
+ predecessorResult: z.ZodString;
1873
+ hold: z.ZodNullable<z.ZodObject<{
1874
+ code: z.ZodEnum<["predecessor_failed", "predecessor_cancelled", "predecessor_interrupted", "predecessor_needs_input", "predecessor_incomplete", "predecessor_facts_unavailable", "predecessor_work_unverified", "predecessor_checks_failed", "predecessor_review_blocked", "predecessor_output_unavailable", "settlement_unknown", "stop_requested", "shutdown", "restart_requires_controller", "partition_retired", "admission_refused"]>;
1875
+ problem: z.ZodOptional<z.ZodObject<{
1876
+ message: z.ZodString;
1877
+ code: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1878
+ retryable: z.ZodDefault<z.ZodBoolean>;
1879
+ required_actions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1880
+ context: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1881
+ }, "strict", z.ZodTypeAny, {
1882
+ message: string;
1883
+ code: string | null;
1884
+ retryable: boolean;
1885
+ required_actions: string[];
1886
+ context: Record<string, unknown>;
1887
+ }, {
1888
+ message: string;
1889
+ code?: string | null | undefined;
1890
+ retryable?: boolean | undefined;
1891
+ required_actions?: string[] | undefined;
1892
+ context?: Record<string, unknown> | undefined;
1893
+ }>>;
1894
+ }, "strict", z.ZodTypeAny, {
1895
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
1896
+ problem?: {
1897
+ message: string;
1898
+ code: string | null;
1899
+ retryable: boolean;
1900
+ required_actions: string[];
1901
+ context: Record<string, unknown>;
1902
+ } | undefined;
1903
+ }, {
1904
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
1905
+ problem?: {
1906
+ message: string;
1907
+ code?: string | null | undefined;
1908
+ retryable?: boolean | undefined;
1909
+ required_actions?: string[] | undefined;
1910
+ context?: Record<string, unknown> | undefined;
1911
+ } | undefined;
1912
+ }>>;
1913
+ dispatchedRevision: z.ZodNullable<z.ZodNumber>;
1914
+ successorJobId: z.ZodNullable<z.ZodString>;
1915
+ successorRunId: z.ZodNullable<z.ZodString>;
1916
+ }, "strict", z.ZodTypeAny, {
1917
+ draftId: string;
1918
+ revision: number;
1919
+ state: "cleared" | "dispatched" | "held" | "waiting";
1920
+ predecessorJobId: string;
1921
+ predecessorRunId: string | null;
1922
+ predecessorResult: string;
1923
+ hold: {
1924
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
1925
+ problem?: {
1926
+ message: string;
1927
+ code: string | null;
1928
+ retryable: boolean;
1929
+ required_actions: string[];
1930
+ context: Record<string, unknown>;
1931
+ } | undefined;
1932
+ } | null;
1933
+ dispatchedRevision: number | null;
1934
+ successorJobId: string | null;
1935
+ successorRunId: string | null;
1936
+ }, {
1937
+ draftId: string;
1938
+ revision: number;
1939
+ state: "cleared" | "dispatched" | "held" | "waiting";
1940
+ predecessorJobId: string;
1941
+ predecessorRunId: string | null;
1942
+ predecessorResult: string;
1943
+ hold: {
1944
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
1945
+ problem?: {
1946
+ message: string;
1947
+ code?: string | null | undefined;
1948
+ retryable?: boolean | undefined;
1949
+ required_actions?: string[] | undefined;
1950
+ context?: Record<string, unknown> | undefined;
1951
+ } | undefined;
1952
+ } | null;
1953
+ dispatchedRevision: number | null;
1954
+ successorJobId: string | null;
1955
+ successorRunId: string | null;
1956
+ }>;
1957
+ }, "strict", z.ZodTypeAny, {
1958
+ appliedRevision: number;
1959
+ draft: {
1960
+ draftId: string;
1961
+ revision: number;
1962
+ state: "cleared" | "dispatched" | "held" | "waiting";
1963
+ predecessorJobId: string;
1964
+ predecessorRunId: string | null;
1965
+ predecessorResult: string;
1966
+ hold: {
1967
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
1968
+ problem?: {
1969
+ message: string;
1970
+ code: string | null;
1971
+ retryable: boolean;
1972
+ required_actions: string[];
1973
+ context: Record<string, unknown>;
1974
+ } | undefined;
1975
+ } | null;
1976
+ dispatchedRevision: number | null;
1977
+ successorJobId: string | null;
1978
+ successorRunId: string | null;
1979
+ };
1980
+ }, {
1981
+ appliedRevision: number;
1982
+ draft: {
1983
+ draftId: string;
1984
+ revision: number;
1985
+ state: "cleared" | "dispatched" | "held" | "waiting";
1986
+ predecessorJobId: string;
1987
+ predecessorRunId: string | null;
1988
+ predecessorResult: string;
1989
+ hold: {
1990
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
1991
+ problem?: {
1992
+ message: string;
1993
+ code?: string | null | undefined;
1994
+ retryable?: boolean | undefined;
1995
+ required_actions?: string[] | undefined;
1996
+ context?: Record<string, unknown> | undefined;
1997
+ } | undefined;
1998
+ } | null;
1999
+ dispatchedRevision: number | null;
2000
+ successorJobId: string | null;
2001
+ successorRunId: string | null;
2002
+ };
2003
+ }>;
2004
+ export type DeferredMessageReceipt = z.infer<typeof DeferredMessageReceipt>;
2005
+ /** Captured values only: nothing here is re-resolved against current settings. */
2006
+ export declare const DeferredMessageCapturedControls: z.ZodObject<{
2007
+ capturedAt: z.ZodString;
2008
+ inherited: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2009
+ resolved: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2010
+ settings: z.ZodNullable<z.ZodObject<{
2011
+ harnesses: z.ZodRecord<z.ZodString, z.ZodObject<Pick<{
2012
+ enabled: z.ZodDefault<z.ZodBoolean>;
2013
+ native_credentials_enabled: z.ZodDefault<z.ZodBoolean>;
2014
+ default_model: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2015
+ effort: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2016
+ max_turns: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
2017
+ max_rounds: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
2018
+ profile_policy: z.ZodDefault<z.ZodObject<{
2019
+ limit_action: z.ZodDefault<z.ZodEnum<["auto", "fail", "ask", "rotate"]>>;
2020
+ rotation_eligible: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2021
+ headroom_threshold: z.ZodDefault<z.ZodNumber>;
2022
+ }, "strict", z.ZodTypeAny, {
2023
+ limit_action: "ask" | "auto" | "fail" | "rotate";
2024
+ rotation_eligible: string[];
2025
+ headroom_threshold: number;
2026
+ }, {
2027
+ limit_action?: "ask" | "auto" | "fail" | "rotate" | undefined;
2028
+ rotation_eligible?: string[] | undefined;
2029
+ headroom_threshold?: number | undefined;
2030
+ }>>;
2031
+ tools_allow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2032
+ tools_deny: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2033
+ fallback_model: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2034
+ web: z.ZodDefault<z.ZodEnum<["off", "auto", "cached", "live"]>>;
2035
+ auth_preference: z.ZodDefault<z.ZodEnum<["subscription", "api_key", "auto"]>>;
2036
+ }, "auth_preference" | "default_model" | "effort" | "fallback_model" | "max_rounds" | "max_turns" | "web">, "strip", z.ZodTypeAny, {
2037
+ default_model: string | null;
2038
+ effort: string | null;
2039
+ max_turns: number | null;
2040
+ max_rounds: number | null;
2041
+ fallback_model: string | null;
2042
+ web: "auto" | "cached" | "live" | "off";
2043
+ auth_preference: "api_key" | "auto" | "subscription";
2044
+ }, {
2045
+ default_model?: string | null | undefined;
2046
+ effort?: string | null | undefined;
2047
+ max_turns?: number | null | undefined;
2048
+ max_rounds?: number | null | undefined;
2049
+ fallback_model?: string | null | undefined;
2050
+ web?: "auto" | "cached" | "live" | "off" | undefined;
2051
+ auth_preference?: "api_key" | "auto" | "subscription" | undefined;
2052
+ }>>;
2053
+ eligibleHarnesses: z.ZodArray<z.ZodString, "many">;
2054
+ primaryHarness: z.ZodNullable<z.ZodString>;
2055
+ authPreference: z.ZodEnum<["subscription", "api_key", "auto"]>;
2056
+ }, "strict", z.ZodTypeAny, {
2057
+ harnesses: Record<string, {
2058
+ default_model: string | null;
2059
+ effort: string | null;
2060
+ max_turns: number | null;
2061
+ max_rounds: number | null;
2062
+ fallback_model: string | null;
2063
+ web: "auto" | "cached" | "live" | "off";
2064
+ auth_preference: "api_key" | "auto" | "subscription";
2065
+ }>;
2066
+ eligibleHarnesses: string[];
2067
+ primaryHarness: string | null;
2068
+ authPreference: "api_key" | "auto" | "subscription";
2069
+ }, {
2070
+ harnesses: Record<string, {
2071
+ default_model?: string | null | undefined;
2072
+ effort?: string | null | undefined;
2073
+ max_turns?: number | null | undefined;
2074
+ max_rounds?: number | null | undefined;
2075
+ fallback_model?: string | null | undefined;
2076
+ web?: "auto" | "cached" | "live" | "off" | undefined;
2077
+ auth_preference?: "api_key" | "auto" | "subscription" | undefined;
2078
+ }>;
2079
+ eligibleHarnesses: string[];
2080
+ primaryHarness: string | null;
2081
+ authPreference: "api_key" | "auto" | "subscription";
2082
+ }>>;
2083
+ }, "strict", z.ZodTypeAny, {
2084
+ capturedAt: string;
2085
+ inherited: Record<string, unknown>;
2086
+ resolved: Record<string, unknown>;
2087
+ settings: {
2088
+ harnesses: Record<string, {
2089
+ default_model: string | null;
2090
+ effort: string | null;
2091
+ max_turns: number | null;
2092
+ max_rounds: number | null;
2093
+ fallback_model: string | null;
2094
+ web: "auto" | "cached" | "live" | "off";
2095
+ auth_preference: "api_key" | "auto" | "subscription";
2096
+ }>;
2097
+ eligibleHarnesses: string[];
2098
+ primaryHarness: string | null;
2099
+ authPreference: "api_key" | "auto" | "subscription";
2100
+ } | null;
2101
+ }, {
2102
+ capturedAt: string;
2103
+ inherited: Record<string, unknown>;
2104
+ resolved: Record<string, unknown>;
2105
+ settings: {
2106
+ harnesses: Record<string, {
2107
+ default_model?: string | null | undefined;
2108
+ effort?: string | null | undefined;
2109
+ max_turns?: number | null | undefined;
2110
+ max_rounds?: number | null | undefined;
2111
+ fallback_model?: string | null | undefined;
2112
+ web?: "auto" | "cached" | "live" | "off" | undefined;
2113
+ auth_preference?: "api_key" | "auto" | "subscription" | undefined;
2114
+ }>;
2115
+ eligibleHarnesses: string[];
2116
+ primaryHarness: string | null;
2117
+ authPreference: "api_key" | "auto" | "subscription";
2118
+ } | null;
2119
+ }>;
2120
+ export type DeferredMessageCapturedControls = z.infer<typeof DeferredMessageCapturedControls>;
2121
+ export declare const DeferredMessageReadInput: z.ZodObject<{
2122
+ draftId: z.ZodString;
2123
+ }, "strict", z.ZodTypeAny, {
2124
+ draftId: string;
2125
+ }, {
2126
+ draftId: string;
2127
+ }>;
2128
+ export declare const DeferredMessageReadResult: z.ZodObject<{
2129
+ draft: z.ZodObject<{
2130
+ draftId: z.ZodString;
2131
+ revision: z.ZodNumber;
2132
+ state: z.ZodEnum<["waiting", "held", "dispatched", "cleared"]>;
2133
+ predecessorJobId: z.ZodString;
2134
+ predecessorRunId: z.ZodNullable<z.ZodString>;
2135
+ predecessorResult: z.ZodString;
2136
+ hold: z.ZodNullable<z.ZodObject<{
2137
+ code: z.ZodEnum<["predecessor_failed", "predecessor_cancelled", "predecessor_interrupted", "predecessor_needs_input", "predecessor_incomplete", "predecessor_facts_unavailable", "predecessor_work_unverified", "predecessor_checks_failed", "predecessor_review_blocked", "predecessor_output_unavailable", "settlement_unknown", "stop_requested", "shutdown", "restart_requires_controller", "partition_retired", "admission_refused"]>;
2138
+ problem: z.ZodOptional<z.ZodObject<{
2139
+ message: z.ZodString;
2140
+ code: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2141
+ retryable: z.ZodDefault<z.ZodBoolean>;
2142
+ required_actions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2143
+ context: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2144
+ }, "strict", z.ZodTypeAny, {
2145
+ message: string;
2146
+ code: string | null;
2147
+ retryable: boolean;
2148
+ required_actions: string[];
2149
+ context: Record<string, unknown>;
2150
+ }, {
2151
+ message: string;
2152
+ code?: string | null | undefined;
2153
+ retryable?: boolean | undefined;
2154
+ required_actions?: string[] | undefined;
2155
+ context?: Record<string, unknown> | undefined;
2156
+ }>>;
2157
+ }, "strict", z.ZodTypeAny, {
2158
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
2159
+ problem?: {
2160
+ message: string;
2161
+ code: string | null;
2162
+ retryable: boolean;
2163
+ required_actions: string[];
2164
+ context: Record<string, unknown>;
2165
+ } | undefined;
2166
+ }, {
2167
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
2168
+ problem?: {
2169
+ message: string;
2170
+ code?: string | null | undefined;
2171
+ retryable?: boolean | undefined;
2172
+ required_actions?: string[] | undefined;
2173
+ context?: Record<string, unknown> | undefined;
2174
+ } | undefined;
2175
+ }>>;
2176
+ dispatchedRevision: z.ZodNullable<z.ZodNumber>;
2177
+ successorJobId: z.ZodNullable<z.ZodString>;
2178
+ successorRunId: z.ZodNullable<z.ZodString>;
2179
+ }, "strict", z.ZodTypeAny, {
2180
+ draftId: string;
2181
+ revision: number;
2182
+ state: "cleared" | "dispatched" | "held" | "waiting";
2183
+ predecessorJobId: string;
2184
+ predecessorRunId: string | null;
2185
+ predecessorResult: string;
2186
+ hold: {
2187
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
2188
+ problem?: {
2189
+ message: string;
2190
+ code: string | null;
2191
+ retryable: boolean;
2192
+ required_actions: string[];
2193
+ context: Record<string, unknown>;
2194
+ } | undefined;
2195
+ } | null;
2196
+ dispatchedRevision: number | null;
2197
+ successorJobId: string | null;
2198
+ successorRunId: string | null;
2199
+ }, {
2200
+ draftId: string;
2201
+ revision: number;
2202
+ state: "cleared" | "dispatched" | "held" | "waiting";
2203
+ predecessorJobId: string;
2204
+ predecessorRunId: string | null;
2205
+ predecessorResult: string;
2206
+ hold: {
2207
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
2208
+ problem?: {
2209
+ message: string;
2210
+ code?: string | null | undefined;
2211
+ retryable?: boolean | undefined;
2212
+ required_actions?: string[] | undefined;
2213
+ context?: Record<string, unknown> | undefined;
2214
+ } | undefined;
2215
+ } | null;
2216
+ dispatchedRevision: number | null;
2217
+ successorJobId: string | null;
2218
+ successorRunId: string | null;
2219
+ }>;
2220
+ promptPreview: z.ZodString;
2221
+ promptBytes: z.ZodNumber;
2222
+ omittedPromptBytes: z.ZodNumber;
2223
+ attachments: z.ZodArray<z.ZodObject<{
2224
+ resourceId: z.ZodString;
2225
+ }, "strict", z.ZodTypeAny, {
2226
+ resourceId: string;
2227
+ }, {
2228
+ resourceId: string;
2229
+ }>, "many">;
2230
+ omittedAttachments: z.ZodNumber;
2231
+ controls: z.ZodNullable<z.ZodObject<{
2232
+ capturedAt: z.ZodString;
2233
+ inherited: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2234
+ resolved: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2235
+ settings: z.ZodNullable<z.ZodObject<{
2236
+ harnesses: z.ZodRecord<z.ZodString, z.ZodObject<Pick<{
2237
+ enabled: z.ZodDefault<z.ZodBoolean>;
2238
+ native_credentials_enabled: z.ZodDefault<z.ZodBoolean>;
2239
+ default_model: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2240
+ effort: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2241
+ max_turns: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
2242
+ max_rounds: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
2243
+ profile_policy: z.ZodDefault<z.ZodObject<{
2244
+ limit_action: z.ZodDefault<z.ZodEnum<["auto", "fail", "ask", "rotate"]>>;
2245
+ rotation_eligible: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2246
+ headroom_threshold: z.ZodDefault<z.ZodNumber>;
2247
+ }, "strict", z.ZodTypeAny, {
2248
+ limit_action: "ask" | "auto" | "fail" | "rotate";
2249
+ rotation_eligible: string[];
2250
+ headroom_threshold: number;
2251
+ }, {
2252
+ limit_action?: "ask" | "auto" | "fail" | "rotate" | undefined;
2253
+ rotation_eligible?: string[] | undefined;
2254
+ headroom_threshold?: number | undefined;
2255
+ }>>;
2256
+ tools_allow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2257
+ tools_deny: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2258
+ fallback_model: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2259
+ web: z.ZodDefault<z.ZodEnum<["off", "auto", "cached", "live"]>>;
2260
+ auth_preference: z.ZodDefault<z.ZodEnum<["subscription", "api_key", "auto"]>>;
2261
+ }, "auth_preference" | "default_model" | "effort" | "fallback_model" | "max_rounds" | "max_turns" | "web">, "strip", z.ZodTypeAny, {
2262
+ default_model: string | null;
2263
+ effort: string | null;
2264
+ max_turns: number | null;
2265
+ max_rounds: number | null;
2266
+ fallback_model: string | null;
2267
+ web: "auto" | "cached" | "live" | "off";
2268
+ auth_preference: "api_key" | "auto" | "subscription";
2269
+ }, {
2270
+ default_model?: string | null | undefined;
2271
+ effort?: string | null | undefined;
2272
+ max_turns?: number | null | undefined;
2273
+ max_rounds?: number | null | undefined;
2274
+ fallback_model?: string | null | undefined;
2275
+ web?: "auto" | "cached" | "live" | "off" | undefined;
2276
+ auth_preference?: "api_key" | "auto" | "subscription" | undefined;
2277
+ }>>;
2278
+ eligibleHarnesses: z.ZodArray<z.ZodString, "many">;
2279
+ primaryHarness: z.ZodNullable<z.ZodString>;
2280
+ authPreference: z.ZodEnum<["subscription", "api_key", "auto"]>;
2281
+ }, "strict", z.ZodTypeAny, {
2282
+ harnesses: Record<string, {
2283
+ default_model: string | null;
2284
+ effort: string | null;
2285
+ max_turns: number | null;
2286
+ max_rounds: number | null;
2287
+ fallback_model: string | null;
2288
+ web: "auto" | "cached" | "live" | "off";
2289
+ auth_preference: "api_key" | "auto" | "subscription";
2290
+ }>;
2291
+ eligibleHarnesses: string[];
2292
+ primaryHarness: string | null;
2293
+ authPreference: "api_key" | "auto" | "subscription";
2294
+ }, {
2295
+ harnesses: Record<string, {
2296
+ default_model?: string | null | undefined;
2297
+ effort?: string | null | undefined;
2298
+ max_turns?: number | null | undefined;
2299
+ max_rounds?: number | null | undefined;
2300
+ fallback_model?: string | null | undefined;
2301
+ web?: "auto" | "cached" | "live" | "off" | undefined;
2302
+ auth_preference?: "api_key" | "auto" | "subscription" | undefined;
2303
+ }>;
2304
+ eligibleHarnesses: string[];
2305
+ primaryHarness: string | null;
2306
+ authPreference: "api_key" | "auto" | "subscription";
2307
+ }>>;
2308
+ }, "strict", z.ZodTypeAny, {
2309
+ capturedAt: string;
2310
+ inherited: Record<string, unknown>;
2311
+ resolved: Record<string, unknown>;
2312
+ settings: {
2313
+ harnesses: Record<string, {
2314
+ default_model: string | null;
2315
+ effort: string | null;
2316
+ max_turns: number | null;
2317
+ max_rounds: number | null;
2318
+ fallback_model: string | null;
2319
+ web: "auto" | "cached" | "live" | "off";
2320
+ auth_preference: "api_key" | "auto" | "subscription";
2321
+ }>;
2322
+ eligibleHarnesses: string[];
2323
+ primaryHarness: string | null;
2324
+ authPreference: "api_key" | "auto" | "subscription";
2325
+ } | null;
2326
+ }, {
2327
+ capturedAt: string;
2328
+ inherited: Record<string, unknown>;
2329
+ resolved: Record<string, unknown>;
2330
+ settings: {
2331
+ harnesses: Record<string, {
2332
+ default_model?: string | null | undefined;
2333
+ effort?: string | null | undefined;
2334
+ max_turns?: number | null | undefined;
2335
+ max_rounds?: number | null | undefined;
2336
+ fallback_model?: string | null | undefined;
2337
+ web?: "auto" | "cached" | "live" | "off" | undefined;
2338
+ auth_preference?: "api_key" | "auto" | "subscription" | undefined;
2339
+ }>;
2340
+ eligibleHarnesses: string[];
2341
+ primaryHarness: string | null;
2342
+ authPreference: "api_key" | "auto" | "subscription";
2343
+ } | null;
2344
+ }>>;
2345
+ detailPath: z.ZodString;
2346
+ }, "strict", z.ZodTypeAny, {
2347
+ draft: {
2348
+ draftId: string;
2349
+ revision: number;
2350
+ state: "cleared" | "dispatched" | "held" | "waiting";
2351
+ predecessorJobId: string;
2352
+ predecessorRunId: string | null;
2353
+ predecessorResult: string;
2354
+ hold: {
2355
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
2356
+ problem?: {
2357
+ message: string;
2358
+ code: string | null;
2359
+ retryable: boolean;
2360
+ required_actions: string[];
2361
+ context: Record<string, unknown>;
2362
+ } | undefined;
2363
+ } | null;
2364
+ dispatchedRevision: number | null;
2365
+ successorJobId: string | null;
2366
+ successorRunId: string | null;
2367
+ };
2368
+ promptPreview: string;
2369
+ promptBytes: number;
2370
+ omittedPromptBytes: number;
2371
+ attachments: {
2372
+ resourceId: string;
2373
+ }[];
2374
+ omittedAttachments: number;
2375
+ controls: {
2376
+ capturedAt: string;
2377
+ inherited: Record<string, unknown>;
2378
+ resolved: Record<string, unknown>;
2379
+ settings: {
2380
+ harnesses: Record<string, {
2381
+ default_model: string | null;
2382
+ effort: string | null;
2383
+ max_turns: number | null;
2384
+ max_rounds: number | null;
2385
+ fallback_model: string | null;
2386
+ web: "auto" | "cached" | "live" | "off";
2387
+ auth_preference: "api_key" | "auto" | "subscription";
2388
+ }>;
2389
+ eligibleHarnesses: string[];
2390
+ primaryHarness: string | null;
2391
+ authPreference: "api_key" | "auto" | "subscription";
2392
+ } | null;
2393
+ } | null;
2394
+ detailPath: string;
2395
+ }, {
2396
+ draft: {
2397
+ draftId: string;
2398
+ revision: number;
2399
+ state: "cleared" | "dispatched" | "held" | "waiting";
2400
+ predecessorJobId: string;
2401
+ predecessorRunId: string | null;
2402
+ predecessorResult: string;
2403
+ hold: {
2404
+ code: "admission_refused" | "partition_retired" | "predecessor_cancelled" | "predecessor_checks_failed" | "predecessor_facts_unavailable" | "predecessor_failed" | "predecessor_incomplete" | "predecessor_interrupted" | "predecessor_needs_input" | "predecessor_output_unavailable" | "predecessor_review_blocked" | "predecessor_work_unverified" | "restart_requires_controller" | "settlement_unknown" | "shutdown" | "stop_requested";
2405
+ problem?: {
2406
+ message: string;
2407
+ code?: string | null | undefined;
2408
+ retryable?: boolean | undefined;
2409
+ required_actions?: string[] | undefined;
2410
+ context?: Record<string, unknown> | undefined;
2411
+ } | undefined;
2412
+ } | null;
2413
+ dispatchedRevision: number | null;
2414
+ successorJobId: string | null;
2415
+ successorRunId: string | null;
2416
+ };
2417
+ promptPreview: string;
2418
+ promptBytes: number;
2419
+ omittedPromptBytes: number;
2420
+ attachments: {
2421
+ resourceId: string;
2422
+ }[];
2423
+ omittedAttachments: number;
2424
+ controls: {
2425
+ capturedAt: string;
2426
+ inherited: Record<string, unknown>;
2427
+ resolved: Record<string, unknown>;
2428
+ settings: {
2429
+ harnesses: Record<string, {
2430
+ default_model?: string | null | undefined;
2431
+ effort?: string | null | undefined;
2432
+ max_turns?: number | null | undefined;
2433
+ max_rounds?: number | null | undefined;
2434
+ fallback_model?: string | null | undefined;
2435
+ web?: "auto" | "cached" | "live" | "off" | undefined;
2436
+ auth_preference?: "api_key" | "auto" | "subscription" | undefined;
2437
+ }>;
2438
+ eligibleHarnesses: string[];
2439
+ primaryHarness: string | null;
2440
+ authPreference: "api_key" | "auto" | "subscription";
2441
+ } | null;
2442
+ } | null;
2443
+ detailPath: string;
2444
+ }>;
2445
+ export type DeferredMessageReadResult = z.infer<typeof DeferredMessageReadResult>;
2446
+ /** Automatic promotion is deliberately stricter than explicit continuation.
2447
+ * Receipts are validated canonical facts; neither prose nor native retry events
2448
+ * enter this decision. Unverified work is a disclosure, not an invented failure. */
2449
+ export declare function deferredMessageHold(lifecycle: string, rawFacts: unknown, identity?: ExpectedRunFactsIdentity): DeferredMessageHold | null;
2450
+ //# sourceMappingURL=deferred-message.d.ts.map