@catamorphic/fastify-plugin 0.1.0-alpha.38 → 0.1.0-alpha.41

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 (81) hide show
  1. package/NOTICE.txt +7 -0
  2. package/dist/app.d.ts +2 -0
  3. package/dist/app.d.ts.map +1 -1
  4. package/dist/chunk-jytcc42y.js +592 -0
  5. package/dist/chunk-jytcc42y.js.map +11 -0
  6. package/dist/index.d.ts +1 -1
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +1679 -411
  9. package/dist/index.js.map +29 -25
  10. package/dist/mcp-scopes.d.ts +12 -0
  11. package/dist/mcp-scopes.d.ts.map +1 -0
  12. package/dist/mcp-server.d.ts +158 -0
  13. package/dist/mcp-server.d.ts.map +1 -0
  14. package/dist/mcp-shared.d.ts +3 -50
  15. package/dist/mcp-shared.d.ts.map +1 -1
  16. package/dist/mcp.d.ts +4 -2
  17. package/dist/mcp.d.ts.map +1 -1
  18. package/dist/mcp.js +6 -4
  19. package/dist/mcp.js.map +1 -1
  20. package/dist/plugin.d.ts +26 -2
  21. package/dist/plugin.d.ts.map +1 -1
  22. package/dist/project-capabilities.d.ts.map +1 -1
  23. package/dist/project-mcp-surface.d.ts +3 -4
  24. package/dist/project-mcp-surface.d.ts.map +1 -1
  25. package/dist/routes/agent.d.ts.map +1 -1
  26. package/dist/routes/apps-mcp.d.ts.map +1 -1
  27. package/dist/routes/client-runners.d.ts.map +1 -1
  28. package/dist/routes/connection-mcp.d.ts.map +1 -1
  29. package/dist/routes/documents.d.ts.map +1 -1
  30. package/dist/routes/environments.d.ts.map +1 -1
  31. package/dist/routes/project-mcp.d.ts.map +1 -1
  32. package/dist/routes/projects.d.ts.map +1 -1
  33. package/dist/routes/publications.d.ts.map +1 -1
  34. package/dist/routes/run-errors.d.ts.map +1 -1
  35. package/dist/routes/runs.d.ts.map +1 -1
  36. package/dist/routes/server-mcp.d.ts +17 -0
  37. package/dist/routes/server-mcp.d.ts.map +1 -0
  38. package/dist/routes/session-mailboxes.d.ts.map +1 -1
  39. package/dist/routes/triggers.d.ts.map +1 -1
  40. package/dist/routes/watchers.d.ts.map +1 -1
  41. package/dist/routes/workflow-enablements.d.ts.map +1 -1
  42. package/dist/routes/workflows.d.ts.map +1 -1
  43. package/dist/schemas.d.ts +3717 -28
  44. package/dist/schemas.d.ts.map +1 -1
  45. package/dist/session-mcp.d.ts +54 -0
  46. package/dist/session-mcp.d.ts.map +1 -0
  47. package/dist/session-tools.d.ts +49 -0
  48. package/dist/session-tools.d.ts.map +1 -0
  49. package/package.json +22 -20
  50. package/src/app.ts +3 -0
  51. package/src/index.ts +1 -0
  52. package/src/mcp-scopes.ts +69 -0
  53. package/src/mcp-server.ts +827 -0
  54. package/src/mcp-shared.ts +3 -151
  55. package/src/mcp.ts +6 -5
  56. package/src/plugin.ts +73 -2
  57. package/src/project-capabilities.ts +5 -3
  58. package/src/project-mcp-program.ts +2 -2
  59. package/src/project-mcp-surface.ts +18 -239
  60. package/src/routes/agent.ts +384 -41
  61. package/src/routes/apps-mcp.ts +84 -82
  62. package/src/routes/client-runners.ts +3 -1
  63. package/src/routes/connection-mcp.ts +6 -13
  64. package/src/routes/documents.ts +4 -0
  65. package/src/routes/environments.ts +49 -1
  66. package/src/routes/project-mcp.ts +176 -154
  67. package/src/routes/projects.ts +6 -0
  68. package/src/routes/publications.ts +2 -0
  69. package/src/routes/run-errors.ts +5 -1
  70. package/src/routes/runs.ts +4 -0
  71. package/src/routes/server-mcp.ts +151 -0
  72. package/src/routes/session-mailboxes.ts +1 -0
  73. package/src/routes/triggers.ts +6 -1
  74. package/src/routes/watchers.ts +1 -0
  75. package/src/routes/workflow-enablements.ts +132 -1
  76. package/src/routes/workflows.ts +4 -0
  77. package/src/schemas.ts +354 -6
  78. package/src/session-mcp.ts +696 -0
  79. package/src/session-tools.ts +169 -0
  80. package/dist/chunk-baagvvm3.js +0 -164
  81. package/dist/chunk-baagvvm3.js.map +0 -10
package/dist/schemas.d.ts CHANGED
@@ -213,6 +213,17 @@ export declare const TriggerBindingInfoSchema: z.ZodObject<{
213
213
  inputSchema: z.ZodUnknown;
214
214
  outputSchema: z.ZodUnknown;
215
215
  }, z.core.$strip>;
216
+ /**
217
+ * A project store path a workflow reads or writes (ADR 0335): one
218
+ * document, or a folder (ending in `/`) and everything under it.
219
+ */
220
+ export declare const WorkflowDocumentAccessSchema: z.ZodObject<{
221
+ path: z.ZodString;
222
+ access: z.ZodEnum<{
223
+ read: "read";
224
+ write: "write";
225
+ }>;
226
+ }, z.core.$strip>;
216
227
  export declare const WorkflowEnablementOwnerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
217
228
  type: z.ZodLiteral<"member">;
218
229
  externalUserId: z.ZodString;
@@ -267,6 +278,13 @@ export declare const WorkflowEnablementPreviewSchema: z.ZodObject<{
267
278
  }, z.core.$strip>>;
268
279
  capabilities: z.ZodArray<z.ZodString>;
269
280
  permissions: z.ZodArray<z.ZodString>;
281
+ documents: z.ZodArray<z.ZodObject<{
282
+ path: z.ZodString;
283
+ access: z.ZodEnum<{
284
+ read: "read";
285
+ write: "write";
286
+ }>;
287
+ }, z.core.$strip>>;
270
288
  consentDigest: z.ZodString;
271
289
  deploymentArtifactDigest: z.ZodString;
272
290
  triggerCount: z.ZodNumber;
@@ -303,6 +321,13 @@ export declare const WorkflowEnablementSchema: z.ZodObject<{
303
321
  }, z.core.$strip>>;
304
322
  capabilities: z.ZodArray<z.ZodString>;
305
323
  permissions: z.ZodArray<z.ZodString>;
324
+ documents: z.ZodArray<z.ZodObject<{
325
+ path: z.ZodString;
326
+ access: z.ZodEnum<{
327
+ read: "read";
328
+ write: "write";
329
+ }>;
330
+ }, z.core.$strip>>;
306
331
  consentDigest: z.ZodString;
307
332
  id: z.ZodString;
308
333
  status: z.ZodEnum<{
@@ -312,6 +337,7 @@ export declare const WorkflowEnablementSchema: z.ZodObject<{
312
337
  }>;
313
338
  suspensionReason: z.ZodNullable<z.ZodString>;
314
339
  updateAvailable: z.ZodBoolean;
340
+ follow: z.ZodBoolean;
315
341
  temporary: z.ZodBoolean;
316
342
  expiresAt: z.ZodNullable<z.ZodString>;
317
343
  revision: z.ZodNumber;
@@ -329,6 +355,40 @@ export declare const WorkflowEnablementSchema: z.ZodObject<{
329
355
  createdAt: z.ZodString;
330
356
  updatedAt: z.ZodString;
331
357
  }, z.core.$strip>;
358
+ /** One published revision and how it went live (ADRs 0330, 0331). */
359
+ export declare const PublishedRevisionSchema: z.ZodObject<{
360
+ id: z.ZodString;
361
+ sequence: z.ZodNumber;
362
+ projectId: z.ZodString;
363
+ commitSha: z.ZodString;
364
+ status: z.ZodEnum<{
365
+ applied: "applied";
366
+ applying: "applying";
367
+ deploying: "deploying";
368
+ failed: "failed";
369
+ pending: "pending";
370
+ superseded: "superseded";
371
+ }>;
372
+ deployWorkflow: z.ZodNullable<z.ZodString>;
373
+ deployRunId: z.ZodNullable<z.ZodString>;
374
+ previousCommitSha: z.ZodNullable<z.ZodString>;
375
+ error: z.ZodNullable<z.ZodString>;
376
+ report: z.ZodArray<z.ZodObject<{
377
+ kind: z.ZodEnum<{
378
+ moved: "moved";
379
+ needs_consent: "needs_consent";
380
+ retry: "retry";
381
+ skipped: "skipped";
382
+ unchanged: "unchanged";
383
+ }>;
384
+ enablementId: z.ZodString;
385
+ workflowName: z.ZodString;
386
+ commitSha: z.ZodOptional<z.ZodString>;
387
+ reason: z.ZodOptional<z.ZodString>;
388
+ }, z.core.$strip>>;
389
+ createdAt: z.ZodString;
390
+ settledAt: z.ZodNullable<z.ZodString>;
391
+ }, z.core.$strip>;
332
392
  export declare const WorkflowSummarySchema: z.ZodObject<{
333
393
  name: z.ZodString;
334
394
  capabilities: z.ZodObject<{
@@ -605,6 +665,13 @@ export declare const WorkflowGraphSchema: z.ZodObject<{
605
665
  optional: z.ZodOptional<z.ZodBoolean>;
606
666
  }, z.core.$strip>>;
607
667
  permissions: z.ZodArray<z.ZodString>;
668
+ documents: z.ZodArray<z.ZodObject<{
669
+ path: z.ZodString;
670
+ access: z.ZodEnum<{
671
+ read: "read";
672
+ write: "write";
673
+ }>;
674
+ }, z.core.$strip>>;
608
675
  canSuspend: z.ZodBoolean;
609
676
  nodes: z.ZodArray<z.ZodObject<{
610
677
  id: z.ZodString;
@@ -740,6 +807,13 @@ export declare const WorkflowDetailSchema: z.ZodObject<{
740
807
  optional: z.ZodOptional<z.ZodBoolean>;
741
808
  }, z.core.$strip>>;
742
809
  permissions: z.ZodArray<z.ZodString>;
810
+ documents: z.ZodArray<z.ZodObject<{
811
+ path: z.ZodString;
812
+ access: z.ZodEnum<{
813
+ read: "read";
814
+ write: "write";
815
+ }>;
816
+ }, z.core.$strip>>;
743
817
  canSuspend: z.ZodBoolean;
744
818
  nodes: z.ZodArray<z.ZodObject<{
745
819
  id: z.ZodString;
@@ -834,6 +908,7 @@ export declare const RunStatusSchema: z.ZodEnum<{
834
908
  failed: "failed";
835
909
  paused: "paused";
836
910
  pending: "pending";
911
+ queued: "queued";
837
912
  running: "running";
838
913
  waiting: "waiting";
839
914
  }>;
@@ -909,6 +984,7 @@ export declare const RunSchema: z.ZodObject<{
909
984
  failed: "failed";
910
985
  paused: "paused";
911
986
  pending: "pending";
987
+ queued: "queued";
912
988
  running: "running";
913
989
  waiting: "waiting";
914
990
  }>;
@@ -1046,6 +1122,7 @@ export declare const RunDetailSchema: z.ZodObject<{
1046
1122
  failed: "failed";
1047
1123
  paused: "paused";
1048
1124
  pending: "pending";
1125
+ queued: "queued";
1049
1126
  running: "running";
1050
1127
  waiting: "waiting";
1051
1128
  }>;
@@ -1166,6 +1243,7 @@ export declare const CorrelationKeySchema: z.ZodString;
1166
1243
  export declare const EnrollmentConflictPolicySchema: z.ZodEnum<{
1167
1244
  error: "error";
1168
1245
  ignore: "ignore";
1246
+ queue: "queue";
1169
1247
  restart: "restart";
1170
1248
  }>;
1171
1249
  export declare const TriggerRunSchema: z.ZodObject<{
@@ -1175,6 +1253,7 @@ export declare const TriggerRunSchema: z.ZodObject<{
1175
1253
  onConflict: z.ZodOptional<z.ZodEnum<{
1176
1254
  error: "error";
1177
1255
  ignore: "ignore";
1256
+ queue: "queue";
1178
1257
  restart: "restart";
1179
1258
  }>>;
1180
1259
  }, z.core.$strip>;
@@ -1185,6 +1264,74 @@ export declare const EnvironmentListQuerySchema: z.ZodObject<{
1185
1264
  }>;
1186
1265
  agentId: z.ZodOptional<z.ZodString>;
1187
1266
  }, z.core.$strip>;
1267
+ /** One fill of an Environment cache on a machine (ADR 0334). */
1268
+ export declare const CacheFillSchema: z.ZodObject<{
1269
+ id: z.ZodString;
1270
+ environment: z.ZodString;
1271
+ cache: z.ZodString;
1272
+ machine: z.ZodNullable<z.ZodString>;
1273
+ status: z.ZodEnum<{
1274
+ evicted: "evicted";
1275
+ failed: "failed";
1276
+ queued: "queued";
1277
+ running: "running";
1278
+ succeeded: "succeeded";
1279
+ }>;
1280
+ reason: z.ZodEnum<{
1281
+ "first-use": "first-use";
1282
+ requested: "requested";
1283
+ }>;
1284
+ commit: z.ZodNullable<z.ZodString>;
1285
+ generation: z.ZodNullable<z.ZodNumber>;
1286
+ attempts: z.ZodNumber;
1287
+ sizeBytes: z.ZodNullable<z.ZodNumber>;
1288
+ error: z.ZodNullable<z.ZodString>;
1289
+ createdAt: z.ZodString;
1290
+ finishedAt: z.ZodNullable<z.ZodString>;
1291
+ lastUsedAt: z.ZodNullable<z.ZodString>;
1292
+ }, z.core.$strip>;
1293
+ /** The project's Environment caches, their copies and recent fills (ADR 0334). */
1294
+ export declare const EnvironmentCacheListSchema: z.ZodObject<{
1295
+ items: z.ZodArray<z.ZodObject<{
1296
+ environment: z.ZodString;
1297
+ cache: z.ZodString;
1298
+ path: z.ZodString;
1299
+ sizeMb: z.ZodNumber;
1300
+ copies: z.ZodArray<z.ZodObject<{
1301
+ machine: z.ZodString;
1302
+ generation: z.ZodNumber;
1303
+ commit: z.ZodNullable<z.ZodString>;
1304
+ filledAt: z.ZodNullable<z.ZodString>;
1305
+ sizeBytes: z.ZodNullable<z.ZodNumber>;
1306
+ lastUsedAt: z.ZodNullable<z.ZodString>;
1307
+ }, z.core.$strip>>;
1308
+ fills: z.ZodArray<z.ZodObject<{
1309
+ id: z.ZodString;
1310
+ environment: z.ZodString;
1311
+ cache: z.ZodString;
1312
+ machine: z.ZodNullable<z.ZodString>;
1313
+ status: z.ZodEnum<{
1314
+ evicted: "evicted";
1315
+ failed: "failed";
1316
+ queued: "queued";
1317
+ running: "running";
1318
+ succeeded: "succeeded";
1319
+ }>;
1320
+ reason: z.ZodEnum<{
1321
+ "first-use": "first-use";
1322
+ requested: "requested";
1323
+ }>;
1324
+ commit: z.ZodNullable<z.ZodString>;
1325
+ generation: z.ZodNullable<z.ZodNumber>;
1326
+ attempts: z.ZodNumber;
1327
+ sizeBytes: z.ZodNullable<z.ZodNumber>;
1328
+ error: z.ZodNullable<z.ZodString>;
1329
+ createdAt: z.ZodString;
1330
+ finishedAt: z.ZodNullable<z.ZodString>;
1331
+ lastUsedAt: z.ZodNullable<z.ZodString>;
1332
+ }, z.core.$strip>>;
1333
+ }, z.core.$strip>>;
1334
+ }, z.core.$strip>;
1188
1335
  export declare const EnvironmentListSchema: z.ZodObject<{
1189
1336
  items: z.ZodArray<z.ZodObject<{
1190
1337
  name: z.ZodString;
@@ -1332,6 +1479,7 @@ export declare const FireTriggerSchema: z.ZodObject<{
1332
1479
  onConflict: z.ZodOptional<z.ZodEnum<{
1333
1480
  error: "error";
1334
1481
  ignore: "ignore";
1482
+ queue: "queue";
1335
1483
  restart: "restart";
1336
1484
  }>>;
1337
1485
  budgetMs: z.ZodOptional<z.ZodNumber>;
@@ -1362,6 +1510,7 @@ export declare const CallRunSchema: z.ZodObject<{
1362
1510
  onConflict: z.ZodOptional<z.ZodEnum<{
1363
1511
  error: "error";
1364
1512
  ignore: "ignore";
1513
+ queue: "queue";
1365
1514
  restart: "restart";
1366
1515
  }>>;
1367
1516
  budgetMs: z.ZodOptional<z.ZodNumber>;
@@ -1835,6 +1984,7 @@ export declare const AgentSessionSchema: z.ZodObject<{
1835
1984
  sourceModifiedAt: z.ZodString;
1836
1985
  }, z.core.$strip>>;
1837
1986
  parentSessionId: z.ZodNullable<z.ZodString>;
1987
+ workspaceSessionId: z.ZodNullable<z.ZodString>;
1838
1988
  visibility: z.ZodEnum<{
1839
1989
  archived: "archived";
1840
1990
  latent: "latent";
@@ -1904,12 +2054,47 @@ export declare const AgentSessionIdParamsSchema: z.ZodObject<{
1904
2054
  projectId: z.ZodString;
1905
2055
  sessionId: z.ZodString;
1906
2056
  }, z.core.$strip>;
2057
+ export declare const AgentSessionUsageQuerySchema: z.ZodObject<{
2058
+ family: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
2059
+ false: "false";
2060
+ true: "true";
2061
+ }>, z.ZodTransform<boolean, "false" | "true">>>;
2062
+ }, z.core.$strip>;
2063
+ /** A chat's model usage through the gateway (ADR 0329). */
2064
+ export declare const AgentSessionUsageSchema: z.ZodObject<{
2065
+ calls: z.ZodNumber;
2066
+ inputTokens: z.ZodNumber;
2067
+ cachedInputTokens: z.ZodNumber;
2068
+ cacheCreationTokens: z.ZodNumber;
2069
+ outputTokens: z.ZodNumber;
2070
+ reasoningTokens: z.ZodNumber;
2071
+ costUsd: z.ZodNullable<z.ZodNumber>;
2072
+ unpricedCalls: z.ZodNumber;
2073
+ unmeteredCalls: z.ZodNumber;
2074
+ sessionId: z.ZodString;
2075
+ family: z.ZodBoolean;
2076
+ sessions: z.ZodNumber;
2077
+ openCalls: z.ZodNumber;
2078
+ models: z.ZodArray<z.ZodObject<{
2079
+ calls: z.ZodNumber;
2080
+ inputTokens: z.ZodNumber;
2081
+ cachedInputTokens: z.ZodNumber;
2082
+ cacheCreationTokens: z.ZodNumber;
2083
+ outputTokens: z.ZodNumber;
2084
+ reasoningTokens: z.ZodNumber;
2085
+ costUsd: z.ZodNullable<z.ZodNumber>;
2086
+ unpricedCalls: z.ZodNumber;
2087
+ unmeteredCalls: z.ZodNumber;
2088
+ model: z.ZodNullable<z.ZodString>;
2089
+ }, z.core.$strip>>;
2090
+ }, z.core.$strip>;
1907
2091
  export declare const AgentSessionPeerSchema: z.ZodObject<{
1908
2092
  id: z.ZodString;
1909
2093
  projectId: z.ZodString;
1910
2094
  title: z.ZodNullable<z.ZodString>;
1911
2095
  agentId: z.ZodNullable<z.ZodString>;
1912
2096
  parentSessionId: z.ZodNullable<z.ZodString>;
2097
+ workspaceSessionId: z.ZodNullable<z.ZodString>;
1913
2098
  forkedFromSessionId: z.ZodNullable<z.ZodString>;
1914
2099
  visibility: z.ZodEnum<{
1915
2100
  archived: "archived";
@@ -1974,6 +2159,10 @@ export declare const CreateAgentSubsessionSchema: z.ZodObject<{
1974
2159
  }>>;
1975
2160
  readOnly: z.ZodOptional<z.ZodBoolean>;
1976
2161
  delegate: z.ZodOptional<z.ZodBoolean>;
2162
+ workspace: z.ZodOptional<z.ZodEnum<{
2163
+ own: "own";
2164
+ shared: "shared";
2165
+ }>>;
1977
2166
  task: z.ZodString;
1978
2167
  contextMode: z.ZodOptional<z.ZodEnum<{
1979
2168
  fresh: "fresh";
@@ -1990,6 +2179,10 @@ export declare const AgentSubsessionSchema: z.ZodObject<{
1990
2179
  inherit: "inherit";
1991
2180
  }>;
1992
2181
  allowFurtherDelegation: z.ZodBoolean;
2182
+ workspace: z.ZodEnum<{
2183
+ own: "own";
2184
+ shared: "shared";
2185
+ }>;
1993
2186
  status: z.ZodEnum<{
1994
2187
  archived: "archived";
1995
2188
  completed: "completed";
@@ -2047,6 +2240,7 @@ export declare const AgentSubsessionSchema: z.ZodObject<{
2047
2240
  sourceModifiedAt: z.ZodString;
2048
2241
  }, z.core.$strip>>;
2049
2242
  parentSessionId: z.ZodNullable<z.ZodString>;
2243
+ workspaceSessionId: z.ZodNullable<z.ZodString>;
2050
2244
  visibility: z.ZodEnum<{
2051
2245
  archived: "archived";
2052
2246
  latent: "latent";
@@ -2112,10 +2306,65 @@ export declare const AgentSubsessionSchema: z.ZodObject<{
2112
2306
  createdAt: z.ZodString;
2113
2307
  updatedAt: z.ZodString;
2114
2308
  }, z.core.$strip>;
2309
+ results: z.ZodArray<z.ZodObject<{
2310
+ id: z.ZodString;
2311
+ name: z.ZodString;
2312
+ value: z.ZodJSONSchema;
2313
+ truncated: z.ZodBoolean;
2314
+ current: z.ZodBoolean;
2315
+ turnId: z.ZodNullable<z.ZodString>;
2316
+ recordedAt: z.ZodString;
2317
+ }, z.core.$strip>>;
2115
2318
  }, z.core.$strip>;
2116
- export declare const WaitForAgentSubsessionsSchema: z.ZodObject<{
2117
- sessionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
2118
- timeoutMs: z.ZodOptional<z.ZodNumber>;
2319
+ /**
2320
+ * `POST .../agent/sessions/start` (ADR 0346): the `session_start`
2321
+ * operation, with the project named by the route.
2322
+ */
2323
+ export declare const StartSessionSchema: z.ZodObject<{
2324
+ agent: z.ZodOptional<z.ZodString>;
2325
+ message: z.ZodString;
2326
+ environment: z.ZodOptional<z.ZodString>;
2327
+ ref: z.ZodOptional<z.ZodObject<{
2328
+ ref: z.ZodString;
2329
+ update: z.ZodOptional<z.ZodEnum<{
2330
+ rebase: "rebase";
2331
+ reset: "reset";
2332
+ }>>;
2333
+ }, z.core.$strict>>;
2334
+ model: z.ZodOptional<z.ZodString>;
2335
+ effort: z.ZodOptional<z.ZodEnum<{
2336
+ high: "high";
2337
+ low: "low";
2338
+ max: "max";
2339
+ medium: "medium";
2340
+ xhigh: "xhigh";
2341
+ }>>;
2342
+ title: z.ZodOptional<z.ZodString>;
2343
+ key: z.ZodOptional<z.ZodString>;
2344
+ audience: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"project">, z.ZodObject<{
2345
+ member: z.ZodString;
2346
+ }, z.core.$strict>]>>;
2347
+ idempotencyKey: z.ZodString;
2348
+ }, z.core.$strict>;
2349
+ /** How a session operation's route refuses: a code a client can act on. */
2350
+ export declare const SessionOperationErrorSchema: z.ZodObject<{
2351
+ error: z.ZodString;
2352
+ code: z.ZodEnum<{
2353
+ agent_unknown: "agent_unknown";
2354
+ authentication_required: "authentication_required";
2355
+ environment_full: "environment_full";
2356
+ environment_unavailable: "environment_unavailable";
2357
+ idempotency_conflict: "idempotency_conflict";
2358
+ internal: "internal";
2359
+ invalid_input: "invalid_input";
2360
+ not_authorized: "not_authorized";
2361
+ not_found: "not_found";
2362
+ request_not_pending: "request_not_pending";
2363
+ session_closed: "session_closed";
2364
+ session_elsewhere: "session_elsewhere";
2365
+ }>;
2366
+ retryable: z.ZodBoolean;
2367
+ sessionId: z.ZodOptional<z.ZodString>;
2119
2368
  }, z.core.$strip>;
2120
2369
  export declare const ArchiveAgentSessionSchema: z.ZodObject<{
2121
2370
  confirmStop: z.ZodOptional<z.ZodBoolean>;
@@ -2199,6 +2448,7 @@ export declare const AgentSessionArchiveResultSchema: z.ZodObject<{
2199
2448
  sourceModifiedAt: z.ZodString;
2200
2449
  }, z.core.$strip>>;
2201
2450
  parentSessionId: z.ZodNullable<z.ZodString>;
2451
+ workspaceSessionId: z.ZodNullable<z.ZodString>;
2202
2452
  visibility: z.ZodEnum<{
2203
2453
  archived: "archived";
2204
2454
  latent: "latent";
@@ -2539,8 +2789,10 @@ export declare const TurnSchema: z.ZodObject<{
2539
2789
  error: z.ZodObject<{
2540
2790
  message: z.ZodString;
2541
2791
  kind: z.ZodOptional<z.ZodEnum<{
2792
+ agent_missing: "agent_missing";
2542
2793
  auth: "auth";
2543
2794
  model_incompat: "model_incompat";
2795
+ out_of_disk: "out_of_disk";
2544
2796
  rate_limit: "rate_limit";
2545
2797
  unavailable: "unavailable";
2546
2798
  }>>;
@@ -2557,8 +2809,10 @@ export declare const TurnSchema: z.ZodObject<{
2557
2809
  error: z.ZodNullable<z.ZodObject<{
2558
2810
  message: z.ZodString;
2559
2811
  kind: z.ZodOptional<z.ZodEnum<{
2812
+ agent_missing: "agent_missing";
2560
2813
  auth: "auth";
2561
2814
  model_incompat: "model_incompat";
2815
+ out_of_disk: "out_of_disk";
2562
2816
  rate_limit: "rate_limit";
2563
2817
  unavailable: "unavailable";
2564
2818
  }>>;
@@ -2583,7 +2837,6 @@ export declare const TurnSchema: z.ZodObject<{
2583
2837
  contextTokens: z.ZodOptional<z.ZodNumber>;
2584
2838
  contextWindow: z.ZodOptional<z.ZodNumber>;
2585
2839
  }, z.core.$strip>>;
2586
- storeSync: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
2587
2840
  workspaceSync: z.ZodOptional<z.ZodObject<{
2588
2841
  error: z.ZodString;
2589
2842
  }, z.core.$strip>>;
@@ -2610,6 +2863,7 @@ export declare const AttemptSchema: z.ZodObject<{
2610
2863
  reason: z.ZodEnum<{
2611
2864
  initial: "initial";
2612
2865
  recovery: "recovery";
2866
+ restart: "restart";
2613
2867
  retry: "retry";
2614
2868
  steer_restart: "steer_restart";
2615
2869
  }>;
@@ -2619,6 +2873,7 @@ export declare const AttemptSchema: z.ZodObject<{
2619
2873
  interrupted: "interrupted";
2620
2874
  lost: "lost";
2621
2875
  preparing: "preparing";
2876
+ restarted: "restarted";
2622
2877
  running: "running";
2623
2878
  superseded: "superseded";
2624
2879
  }>;
@@ -2634,8 +2889,10 @@ export declare const AttemptSchema: z.ZodObject<{
2634
2889
  error: z.ZodNullable<z.ZodObject<{
2635
2890
  message: z.ZodString;
2636
2891
  kind: z.ZodOptional<z.ZodEnum<{
2892
+ agent_missing: "agent_missing";
2637
2893
  auth: "auth";
2638
2894
  model_incompat: "model_incompat";
2895
+ out_of_disk: "out_of_disk";
2639
2896
  rate_limit: "rate_limit";
2640
2897
  unavailable: "unavailable";
2641
2898
  }>>;
@@ -3207,6 +3464,44 @@ export declare const ItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3207
3464
  to: z.ZodNumber;
3208
3465
  }, z.core.$strip>;
3209
3466
  text: z.ZodString;
3467
+ }, z.core.$strip>, z.ZodObject<{
3468
+ id: z.ZodString;
3469
+ sessionId: z.ZodString;
3470
+ turnId: z.ZodNullable<z.ZodString>;
3471
+ attemptId: z.ZodNullable<z.ZodString>;
3472
+ parentItemId: z.ZodNullable<z.ZodString>;
3473
+ position: z.ZodNumber;
3474
+ status: z.ZodEnum<{
3475
+ cancelled: "cancelled";
3476
+ completed: "completed";
3477
+ failed: "failed";
3478
+ in_progress: "in_progress";
3479
+ }>;
3480
+ nativeRef: z.ZodNullable<z.ZodObject<{
3481
+ id: z.ZodString;
3482
+ strength: z.ZodEnum<{
3483
+ none: "none";
3484
+ strong: "strong";
3485
+ weak: "weak";
3486
+ }>;
3487
+ }, z.core.$strip>>;
3488
+ createdAt: z.ZodString;
3489
+ updatedAt: z.ZodString;
3490
+ startedAt: z.ZodNullable<z.ZodString>;
3491
+ endedAt: z.ZodNullable<z.ZodString>;
3492
+ kind: z.ZodLiteral<"result">;
3493
+ name: z.ZodString;
3494
+ value: z.ZodJSONSchema;
3495
+ input: z.ZodNullable<z.ZodObject<{
3496
+ itemId: z.ZodString;
3497
+ position: z.ZodNumber;
3498
+ kind: z.ZodEnum<{
3499
+ inbound_message: "inbound_message";
3500
+ task_notification: "task_notification";
3501
+ user_message: "user_message";
3502
+ }>;
3503
+ }, z.core.$strip>>;
3504
+ commit: z.ZodNullable<z.ZodString>;
3210
3505
  }, z.core.$strip>], "kind">;
3211
3506
  export declare const RuntimeRequestSchema: z.ZodObject<{
3212
3507
  id: z.ZodString;
@@ -3514,8 +3809,10 @@ export declare const SessionEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3514
3809
  error: z.ZodObject<{
3515
3810
  message: z.ZodString;
3516
3811
  kind: z.ZodOptional<z.ZodEnum<{
3812
+ agent_missing: "agent_missing";
3517
3813
  auth: "auth";
3518
3814
  model_incompat: "model_incompat";
3815
+ out_of_disk: "out_of_disk";
3519
3816
  rate_limit: "rate_limit";
3520
3817
  unavailable: "unavailable";
3521
3818
  }>>;
@@ -3532,8 +3829,10 @@ export declare const SessionEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3532
3829
  error: z.ZodNullable<z.ZodObject<{
3533
3830
  message: z.ZodString;
3534
3831
  kind: z.ZodOptional<z.ZodEnum<{
3832
+ agent_missing: "agent_missing";
3535
3833
  auth: "auth";
3536
3834
  model_incompat: "model_incompat";
3835
+ out_of_disk: "out_of_disk";
3537
3836
  rate_limit: "rate_limit";
3538
3837
  unavailable: "unavailable";
3539
3838
  }>>;
@@ -3558,7 +3857,6 @@ export declare const SessionEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3558
3857
  contextTokens: z.ZodOptional<z.ZodNumber>;
3559
3858
  contextWindow: z.ZodOptional<z.ZodNumber>;
3560
3859
  }, z.core.$strip>>;
3561
- storeSync: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
3562
3860
  workspaceSync: z.ZodOptional<z.ZodObject<{
3563
3861
  error: z.ZodString;
3564
3862
  }, z.core.$strip>>;
@@ -3587,6 +3885,7 @@ export declare const SessionEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3587
3885
  reason: z.ZodEnum<{
3588
3886
  initial: "initial";
3589
3887
  recovery: "recovery";
3888
+ restart: "restart";
3590
3889
  retry: "retry";
3591
3890
  steer_restart: "steer_restart";
3592
3891
  }>;
@@ -3596,6 +3895,7 @@ export declare const SessionEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3596
3895
  interrupted: "interrupted";
3597
3896
  lost: "lost";
3598
3897
  preparing: "preparing";
3898
+ restarted: "restarted";
3599
3899
  running: "running";
3600
3900
  superseded: "superseded";
3601
3901
  }>;
@@ -3611,8 +3911,10 @@ export declare const SessionEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3611
3911
  error: z.ZodNullable<z.ZodObject<{
3612
3912
  message: z.ZodString;
3613
3913
  kind: z.ZodOptional<z.ZodEnum<{
3914
+ agent_missing: "agent_missing";
3614
3915
  auth: "auth";
3615
3916
  model_incompat: "model_incompat";
3917
+ out_of_disk: "out_of_disk";
3616
3918
  rate_limit: "rate_limit";
3617
3919
  unavailable: "unavailable";
3618
3920
  }>>;
@@ -4186,6 +4488,44 @@ export declare const SessionEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4186
4488
  to: z.ZodNumber;
4187
4489
  }, z.core.$strip>;
4188
4490
  text: z.ZodString;
4491
+ }, z.core.$strip>, z.ZodObject<{
4492
+ id: z.ZodString;
4493
+ sessionId: z.ZodString;
4494
+ turnId: z.ZodNullable<z.ZodString>;
4495
+ attemptId: z.ZodNullable<z.ZodString>;
4496
+ parentItemId: z.ZodNullable<z.ZodString>;
4497
+ position: z.ZodNumber;
4498
+ status: z.ZodEnum<{
4499
+ cancelled: "cancelled";
4500
+ completed: "completed";
4501
+ failed: "failed";
4502
+ in_progress: "in_progress";
4503
+ }>;
4504
+ nativeRef: z.ZodNullable<z.ZodObject<{
4505
+ id: z.ZodString;
4506
+ strength: z.ZodEnum<{
4507
+ none: "none";
4508
+ strong: "strong";
4509
+ weak: "weak";
4510
+ }>;
4511
+ }, z.core.$strip>>;
4512
+ createdAt: z.ZodString;
4513
+ updatedAt: z.ZodString;
4514
+ startedAt: z.ZodNullable<z.ZodString>;
4515
+ endedAt: z.ZodNullable<z.ZodString>;
4516
+ kind: z.ZodLiteral<"result">;
4517
+ name: z.ZodString;
4518
+ value: z.ZodJSONSchema;
4519
+ input: z.ZodNullable<z.ZodObject<{
4520
+ itemId: z.ZodString;
4521
+ position: z.ZodNumber;
4522
+ kind: z.ZodEnum<{
4523
+ inbound_message: "inbound_message";
4524
+ task_notification: "task_notification";
4525
+ user_message: "user_message";
4526
+ }>;
4527
+ }, z.core.$strip>>;
4528
+ commit: z.ZodNullable<z.ZodString>;
4189
4529
  }, z.core.$strip>], "kind">;
4190
4530
  }, z.core.$strip>, z.ZodObject<{
4191
4531
  type: z.ZodLiteral<"item.changed">;
@@ -4751,6 +5091,44 @@ export declare const SessionEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4751
5091
  to: z.ZodNumber;
4752
5092
  }, z.core.$strip>;
4753
5093
  text: z.ZodString;
5094
+ }, z.core.$strip>, z.ZodObject<{
5095
+ id: z.ZodString;
5096
+ sessionId: z.ZodString;
5097
+ turnId: z.ZodNullable<z.ZodString>;
5098
+ attemptId: z.ZodNullable<z.ZodString>;
5099
+ parentItemId: z.ZodNullable<z.ZodString>;
5100
+ position: z.ZodNumber;
5101
+ status: z.ZodEnum<{
5102
+ cancelled: "cancelled";
5103
+ completed: "completed";
5104
+ failed: "failed";
5105
+ in_progress: "in_progress";
5106
+ }>;
5107
+ nativeRef: z.ZodNullable<z.ZodObject<{
5108
+ id: z.ZodString;
5109
+ strength: z.ZodEnum<{
5110
+ none: "none";
5111
+ strong: "strong";
5112
+ weak: "weak";
5113
+ }>;
5114
+ }, z.core.$strip>>;
5115
+ createdAt: z.ZodString;
5116
+ updatedAt: z.ZodString;
5117
+ startedAt: z.ZodNullable<z.ZodString>;
5118
+ endedAt: z.ZodNullable<z.ZodString>;
5119
+ kind: z.ZodLiteral<"result">;
5120
+ name: z.ZodString;
5121
+ value: z.ZodJSONSchema;
5122
+ input: z.ZodNullable<z.ZodObject<{
5123
+ itemId: z.ZodString;
5124
+ position: z.ZodNumber;
5125
+ kind: z.ZodEnum<{
5126
+ inbound_message: "inbound_message";
5127
+ task_notification: "task_notification";
5128
+ user_message: "user_message";
5129
+ }>;
5130
+ }, z.core.$strip>>;
5131
+ commit: z.ZodNullable<z.ZodString>;
4754
5132
  }, z.core.$strip>], "kind">;
4755
5133
  }, z.core.$strip>, z.ZodObject<{
4756
5134
  type: z.ZodLiteral<"item.text_appended">;
@@ -5005,8 +5383,10 @@ export declare const StoredSessionEventSchema: z.ZodObject<{
5005
5383
  error: z.ZodObject<{
5006
5384
  message: z.ZodString;
5007
5385
  kind: z.ZodOptional<z.ZodEnum<{
5386
+ agent_missing: "agent_missing";
5008
5387
  auth: "auth";
5009
5388
  model_incompat: "model_incompat";
5389
+ out_of_disk: "out_of_disk";
5010
5390
  rate_limit: "rate_limit";
5011
5391
  unavailable: "unavailable";
5012
5392
  }>>;
@@ -5023,8 +5403,10 @@ export declare const StoredSessionEventSchema: z.ZodObject<{
5023
5403
  error: z.ZodNullable<z.ZodObject<{
5024
5404
  message: z.ZodString;
5025
5405
  kind: z.ZodOptional<z.ZodEnum<{
5406
+ agent_missing: "agent_missing";
5026
5407
  auth: "auth";
5027
5408
  model_incompat: "model_incompat";
5409
+ out_of_disk: "out_of_disk";
5028
5410
  rate_limit: "rate_limit";
5029
5411
  unavailable: "unavailable";
5030
5412
  }>>;
@@ -5049,7 +5431,6 @@ export declare const StoredSessionEventSchema: z.ZodObject<{
5049
5431
  contextTokens: z.ZodOptional<z.ZodNumber>;
5050
5432
  contextWindow: z.ZodOptional<z.ZodNumber>;
5051
5433
  }, z.core.$strip>>;
5052
- storeSync: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
5053
5434
  workspaceSync: z.ZodOptional<z.ZodObject<{
5054
5435
  error: z.ZodString;
5055
5436
  }, z.core.$strip>>;
@@ -5078,6 +5459,7 @@ export declare const StoredSessionEventSchema: z.ZodObject<{
5078
5459
  reason: z.ZodEnum<{
5079
5460
  initial: "initial";
5080
5461
  recovery: "recovery";
5462
+ restart: "restart";
5081
5463
  retry: "retry";
5082
5464
  steer_restart: "steer_restart";
5083
5465
  }>;
@@ -5087,6 +5469,7 @@ export declare const StoredSessionEventSchema: z.ZodObject<{
5087
5469
  interrupted: "interrupted";
5088
5470
  lost: "lost";
5089
5471
  preparing: "preparing";
5472
+ restarted: "restarted";
5090
5473
  running: "running";
5091
5474
  superseded: "superseded";
5092
5475
  }>;
@@ -5102,8 +5485,10 @@ export declare const StoredSessionEventSchema: z.ZodObject<{
5102
5485
  error: z.ZodNullable<z.ZodObject<{
5103
5486
  message: z.ZodString;
5104
5487
  kind: z.ZodOptional<z.ZodEnum<{
5488
+ agent_missing: "agent_missing";
5105
5489
  auth: "auth";
5106
5490
  model_incompat: "model_incompat";
5491
+ out_of_disk: "out_of_disk";
5107
5492
  rate_limit: "rate_limit";
5108
5493
  unavailable: "unavailable";
5109
5494
  }>>;
@@ -5677,6 +6062,44 @@ export declare const StoredSessionEventSchema: z.ZodObject<{
5677
6062
  to: z.ZodNumber;
5678
6063
  }, z.core.$strip>;
5679
6064
  text: z.ZodString;
6065
+ }, z.core.$strip>, z.ZodObject<{
6066
+ id: z.ZodString;
6067
+ sessionId: z.ZodString;
6068
+ turnId: z.ZodNullable<z.ZodString>;
6069
+ attemptId: z.ZodNullable<z.ZodString>;
6070
+ parentItemId: z.ZodNullable<z.ZodString>;
6071
+ position: z.ZodNumber;
6072
+ status: z.ZodEnum<{
6073
+ cancelled: "cancelled";
6074
+ completed: "completed";
6075
+ failed: "failed";
6076
+ in_progress: "in_progress";
6077
+ }>;
6078
+ nativeRef: z.ZodNullable<z.ZodObject<{
6079
+ id: z.ZodString;
6080
+ strength: z.ZodEnum<{
6081
+ none: "none";
6082
+ strong: "strong";
6083
+ weak: "weak";
6084
+ }>;
6085
+ }, z.core.$strip>>;
6086
+ createdAt: z.ZodString;
6087
+ updatedAt: z.ZodString;
6088
+ startedAt: z.ZodNullable<z.ZodString>;
6089
+ endedAt: z.ZodNullable<z.ZodString>;
6090
+ kind: z.ZodLiteral<"result">;
6091
+ name: z.ZodString;
6092
+ value: z.ZodJSONSchema;
6093
+ input: z.ZodNullable<z.ZodObject<{
6094
+ itemId: z.ZodString;
6095
+ position: z.ZodNumber;
6096
+ kind: z.ZodEnum<{
6097
+ inbound_message: "inbound_message";
6098
+ task_notification: "task_notification";
6099
+ user_message: "user_message";
6100
+ }>;
6101
+ }, z.core.$strip>>;
6102
+ commit: z.ZodNullable<z.ZodString>;
5680
6103
  }, z.core.$strip>], "kind">;
5681
6104
  }, z.core.$strip>, z.ZodObject<{
5682
6105
  type: z.ZodLiteral<"item.changed">;
@@ -6242,13 +6665,51 @@ export declare const StoredSessionEventSchema: z.ZodObject<{
6242
6665
  to: z.ZodNumber;
6243
6666
  }, z.core.$strip>;
6244
6667
  text: z.ZodString;
6245
- }, z.core.$strip>], "kind">;
6246
- }, z.core.$strip>, z.ZodObject<{
6247
- type: z.ZodLiteral<"item.text_appended">;
6248
- itemId: z.ZodString;
6249
- field: z.ZodEnum<{
6250
- output: "output";
6251
- text: "text";
6668
+ }, z.core.$strip>, z.ZodObject<{
6669
+ id: z.ZodString;
6670
+ sessionId: z.ZodString;
6671
+ turnId: z.ZodNullable<z.ZodString>;
6672
+ attemptId: z.ZodNullable<z.ZodString>;
6673
+ parentItemId: z.ZodNullable<z.ZodString>;
6674
+ position: z.ZodNumber;
6675
+ status: z.ZodEnum<{
6676
+ cancelled: "cancelled";
6677
+ completed: "completed";
6678
+ failed: "failed";
6679
+ in_progress: "in_progress";
6680
+ }>;
6681
+ nativeRef: z.ZodNullable<z.ZodObject<{
6682
+ id: z.ZodString;
6683
+ strength: z.ZodEnum<{
6684
+ none: "none";
6685
+ strong: "strong";
6686
+ weak: "weak";
6687
+ }>;
6688
+ }, z.core.$strip>>;
6689
+ createdAt: z.ZodString;
6690
+ updatedAt: z.ZodString;
6691
+ startedAt: z.ZodNullable<z.ZodString>;
6692
+ endedAt: z.ZodNullable<z.ZodString>;
6693
+ kind: z.ZodLiteral<"result">;
6694
+ name: z.ZodString;
6695
+ value: z.ZodJSONSchema;
6696
+ input: z.ZodNullable<z.ZodObject<{
6697
+ itemId: z.ZodString;
6698
+ position: z.ZodNumber;
6699
+ kind: z.ZodEnum<{
6700
+ inbound_message: "inbound_message";
6701
+ task_notification: "task_notification";
6702
+ user_message: "user_message";
6703
+ }>;
6704
+ }, z.core.$strip>>;
6705
+ commit: z.ZodNullable<z.ZodString>;
6706
+ }, z.core.$strip>], "kind">;
6707
+ }, z.core.$strip>, z.ZodObject<{
6708
+ type: z.ZodLiteral<"item.text_appended">;
6709
+ itemId: z.ZodString;
6710
+ field: z.ZodEnum<{
6711
+ output: "output";
6712
+ text: "text";
6252
6713
  }>;
6253
6714
  text: z.ZodString;
6254
6715
  at: z.ZodString;
@@ -6490,8 +6951,10 @@ export declare const SessionSnapshotSchema: z.ZodObject<{
6490
6951
  error: z.ZodObject<{
6491
6952
  message: z.ZodString;
6492
6953
  kind: z.ZodOptional<z.ZodEnum<{
6954
+ agent_missing: "agent_missing";
6493
6955
  auth: "auth";
6494
6956
  model_incompat: "model_incompat";
6957
+ out_of_disk: "out_of_disk";
6495
6958
  rate_limit: "rate_limit";
6496
6959
  unavailable: "unavailable";
6497
6960
  }>>;
@@ -6508,8 +6971,10 @@ export declare const SessionSnapshotSchema: z.ZodObject<{
6508
6971
  error: z.ZodNullable<z.ZodObject<{
6509
6972
  message: z.ZodString;
6510
6973
  kind: z.ZodOptional<z.ZodEnum<{
6974
+ agent_missing: "agent_missing";
6511
6975
  auth: "auth";
6512
6976
  model_incompat: "model_incompat";
6977
+ out_of_disk: "out_of_disk";
6513
6978
  rate_limit: "rate_limit";
6514
6979
  unavailable: "unavailable";
6515
6980
  }>>;
@@ -6534,7 +6999,6 @@ export declare const SessionSnapshotSchema: z.ZodObject<{
6534
6999
  contextTokens: z.ZodOptional<z.ZodNumber>;
6535
7000
  contextWindow: z.ZodOptional<z.ZodNumber>;
6536
7001
  }, z.core.$strip>>;
6537
- storeSync: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
6538
7002
  workspaceSync: z.ZodOptional<z.ZodObject<{
6539
7003
  error: z.ZodString;
6540
7004
  }, z.core.$strip>>;
@@ -6561,6 +7025,7 @@ export declare const SessionSnapshotSchema: z.ZodObject<{
6561
7025
  reason: z.ZodEnum<{
6562
7026
  initial: "initial";
6563
7027
  recovery: "recovery";
7028
+ restart: "restart";
6564
7029
  retry: "retry";
6565
7030
  steer_restart: "steer_restart";
6566
7031
  }>;
@@ -6570,6 +7035,7 @@ export declare const SessionSnapshotSchema: z.ZodObject<{
6570
7035
  interrupted: "interrupted";
6571
7036
  lost: "lost";
6572
7037
  preparing: "preparing";
7038
+ restarted: "restarted";
6573
7039
  running: "running";
6574
7040
  superseded: "superseded";
6575
7041
  }>;
@@ -6585,8 +7051,10 @@ export declare const SessionSnapshotSchema: z.ZodObject<{
6585
7051
  error: z.ZodNullable<z.ZodObject<{
6586
7052
  message: z.ZodString;
6587
7053
  kind: z.ZodOptional<z.ZodEnum<{
7054
+ agent_missing: "agent_missing";
6588
7055
  auth: "auth";
6589
7056
  model_incompat: "model_incompat";
7057
+ out_of_disk: "out_of_disk";
6590
7058
  rate_limit: "rate_limit";
6591
7059
  unavailable: "unavailable";
6592
7060
  }>>;
@@ -7158,6 +7626,44 @@ export declare const SessionSnapshotSchema: z.ZodObject<{
7158
7626
  to: z.ZodNumber;
7159
7627
  }, z.core.$strip>;
7160
7628
  text: z.ZodString;
7629
+ }, z.core.$strip>, z.ZodObject<{
7630
+ id: z.ZodString;
7631
+ sessionId: z.ZodString;
7632
+ turnId: z.ZodNullable<z.ZodString>;
7633
+ attemptId: z.ZodNullable<z.ZodString>;
7634
+ parentItemId: z.ZodNullable<z.ZodString>;
7635
+ position: z.ZodNumber;
7636
+ status: z.ZodEnum<{
7637
+ cancelled: "cancelled";
7638
+ completed: "completed";
7639
+ failed: "failed";
7640
+ in_progress: "in_progress";
7641
+ }>;
7642
+ nativeRef: z.ZodNullable<z.ZodObject<{
7643
+ id: z.ZodString;
7644
+ strength: z.ZodEnum<{
7645
+ none: "none";
7646
+ strong: "strong";
7647
+ weak: "weak";
7648
+ }>;
7649
+ }, z.core.$strip>>;
7650
+ createdAt: z.ZodString;
7651
+ updatedAt: z.ZodString;
7652
+ startedAt: z.ZodNullable<z.ZodString>;
7653
+ endedAt: z.ZodNullable<z.ZodString>;
7654
+ kind: z.ZodLiteral<"result">;
7655
+ name: z.ZodString;
7656
+ value: z.ZodJSONSchema;
7657
+ input: z.ZodNullable<z.ZodObject<{
7658
+ itemId: z.ZodString;
7659
+ position: z.ZodNumber;
7660
+ kind: z.ZodEnum<{
7661
+ inbound_message: "inbound_message";
7662
+ task_notification: "task_notification";
7663
+ user_message: "user_message";
7664
+ }>;
7665
+ }, z.core.$strip>>;
7666
+ commit: z.ZodNullable<z.ZodString>;
7161
7667
  }, z.core.$strip>], "kind">>;
7162
7668
  requests: z.ZodArray<z.ZodObject<{
7163
7669
  id: z.ZodString;
@@ -7403,8 +7909,10 @@ export declare const SessionStreamMessageSchema: z.ZodDiscriminatedUnion<[z.ZodO
7403
7909
  error: z.ZodObject<{
7404
7910
  message: z.ZodString;
7405
7911
  kind: z.ZodOptional<z.ZodEnum<{
7912
+ agent_missing: "agent_missing";
7406
7913
  auth: "auth";
7407
7914
  model_incompat: "model_incompat";
7915
+ out_of_disk: "out_of_disk";
7408
7916
  rate_limit: "rate_limit";
7409
7917
  unavailable: "unavailable";
7410
7918
  }>>;
@@ -7421,8 +7929,10 @@ export declare const SessionStreamMessageSchema: z.ZodDiscriminatedUnion<[z.ZodO
7421
7929
  error: z.ZodNullable<z.ZodObject<{
7422
7930
  message: z.ZodString;
7423
7931
  kind: z.ZodOptional<z.ZodEnum<{
7932
+ agent_missing: "agent_missing";
7424
7933
  auth: "auth";
7425
7934
  model_incompat: "model_incompat";
7935
+ out_of_disk: "out_of_disk";
7426
7936
  rate_limit: "rate_limit";
7427
7937
  unavailable: "unavailable";
7428
7938
  }>>;
@@ -7447,7 +7957,6 @@ export declare const SessionStreamMessageSchema: z.ZodDiscriminatedUnion<[z.ZodO
7447
7957
  contextTokens: z.ZodOptional<z.ZodNumber>;
7448
7958
  contextWindow: z.ZodOptional<z.ZodNumber>;
7449
7959
  }, z.core.$strip>>;
7450
- storeSync: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
7451
7960
  workspaceSync: z.ZodOptional<z.ZodObject<{
7452
7961
  error: z.ZodString;
7453
7962
  }, z.core.$strip>>;
@@ -7476,6 +7985,7 @@ export declare const SessionStreamMessageSchema: z.ZodDiscriminatedUnion<[z.ZodO
7476
7985
  reason: z.ZodEnum<{
7477
7986
  initial: "initial";
7478
7987
  recovery: "recovery";
7988
+ restart: "restart";
7479
7989
  retry: "retry";
7480
7990
  steer_restart: "steer_restart";
7481
7991
  }>;
@@ -7485,6 +7995,7 @@ export declare const SessionStreamMessageSchema: z.ZodDiscriminatedUnion<[z.ZodO
7485
7995
  interrupted: "interrupted";
7486
7996
  lost: "lost";
7487
7997
  preparing: "preparing";
7998
+ restarted: "restarted";
7488
7999
  running: "running";
7489
8000
  superseded: "superseded";
7490
8001
  }>;
@@ -7500,8 +8011,10 @@ export declare const SessionStreamMessageSchema: z.ZodDiscriminatedUnion<[z.ZodO
7500
8011
  error: z.ZodNullable<z.ZodObject<{
7501
8012
  message: z.ZodString;
7502
8013
  kind: z.ZodOptional<z.ZodEnum<{
8014
+ agent_missing: "agent_missing";
7503
8015
  auth: "auth";
7504
8016
  model_incompat: "model_incompat";
8017
+ out_of_disk: "out_of_disk";
7505
8018
  rate_limit: "rate_limit";
7506
8019
  unavailable: "unavailable";
7507
8020
  }>>;
@@ -8075,6 +8588,44 @@ export declare const SessionStreamMessageSchema: z.ZodDiscriminatedUnion<[z.ZodO
8075
8588
  to: z.ZodNumber;
8076
8589
  }, z.core.$strip>;
8077
8590
  text: z.ZodString;
8591
+ }, z.core.$strip>, z.ZodObject<{
8592
+ id: z.ZodString;
8593
+ sessionId: z.ZodString;
8594
+ turnId: z.ZodNullable<z.ZodString>;
8595
+ attemptId: z.ZodNullable<z.ZodString>;
8596
+ parentItemId: z.ZodNullable<z.ZodString>;
8597
+ position: z.ZodNumber;
8598
+ status: z.ZodEnum<{
8599
+ cancelled: "cancelled";
8600
+ completed: "completed";
8601
+ failed: "failed";
8602
+ in_progress: "in_progress";
8603
+ }>;
8604
+ nativeRef: z.ZodNullable<z.ZodObject<{
8605
+ id: z.ZodString;
8606
+ strength: z.ZodEnum<{
8607
+ none: "none";
8608
+ strong: "strong";
8609
+ weak: "weak";
8610
+ }>;
8611
+ }, z.core.$strip>>;
8612
+ createdAt: z.ZodString;
8613
+ updatedAt: z.ZodString;
8614
+ startedAt: z.ZodNullable<z.ZodString>;
8615
+ endedAt: z.ZodNullable<z.ZodString>;
8616
+ kind: z.ZodLiteral<"result">;
8617
+ name: z.ZodString;
8618
+ value: z.ZodJSONSchema;
8619
+ input: z.ZodNullable<z.ZodObject<{
8620
+ itemId: z.ZodString;
8621
+ position: z.ZodNumber;
8622
+ kind: z.ZodEnum<{
8623
+ inbound_message: "inbound_message";
8624
+ task_notification: "task_notification";
8625
+ user_message: "user_message";
8626
+ }>;
8627
+ }, z.core.$strip>>;
8628
+ commit: z.ZodNullable<z.ZodString>;
8078
8629
  }, z.core.$strip>], "kind">;
8079
8630
  }, z.core.$strip>, z.ZodObject<{
8080
8631
  type: z.ZodLiteral<"item.changed">;
@@ -8640,6 +9191,44 @@ export declare const SessionStreamMessageSchema: z.ZodDiscriminatedUnion<[z.ZodO
8640
9191
  to: z.ZodNumber;
8641
9192
  }, z.core.$strip>;
8642
9193
  text: z.ZodString;
9194
+ }, z.core.$strip>, z.ZodObject<{
9195
+ id: z.ZodString;
9196
+ sessionId: z.ZodString;
9197
+ turnId: z.ZodNullable<z.ZodString>;
9198
+ attemptId: z.ZodNullable<z.ZodString>;
9199
+ parentItemId: z.ZodNullable<z.ZodString>;
9200
+ position: z.ZodNumber;
9201
+ status: z.ZodEnum<{
9202
+ cancelled: "cancelled";
9203
+ completed: "completed";
9204
+ failed: "failed";
9205
+ in_progress: "in_progress";
9206
+ }>;
9207
+ nativeRef: z.ZodNullable<z.ZodObject<{
9208
+ id: z.ZodString;
9209
+ strength: z.ZodEnum<{
9210
+ none: "none";
9211
+ strong: "strong";
9212
+ weak: "weak";
9213
+ }>;
9214
+ }, z.core.$strip>>;
9215
+ createdAt: z.ZodString;
9216
+ updatedAt: z.ZodString;
9217
+ startedAt: z.ZodNullable<z.ZodString>;
9218
+ endedAt: z.ZodNullable<z.ZodString>;
9219
+ kind: z.ZodLiteral<"result">;
9220
+ name: z.ZodString;
9221
+ value: z.ZodJSONSchema;
9222
+ input: z.ZodNullable<z.ZodObject<{
9223
+ itemId: z.ZodString;
9224
+ position: z.ZodNumber;
9225
+ kind: z.ZodEnum<{
9226
+ inbound_message: "inbound_message";
9227
+ task_notification: "task_notification";
9228
+ user_message: "user_message";
9229
+ }>;
9230
+ }, z.core.$strip>>;
9231
+ commit: z.ZodNullable<z.ZodString>;
8643
9232
  }, z.core.$strip>], "kind">;
8644
9233
  }, z.core.$strip>, z.ZodObject<{
8645
9234
  type: z.ZodLiteral<"item.text_appended">;
@@ -8890,8 +9479,10 @@ export declare const SessionStreamMessageSchema: z.ZodDiscriminatedUnion<[z.ZodO
8890
9479
  error: z.ZodObject<{
8891
9480
  message: z.ZodString;
8892
9481
  kind: z.ZodOptional<z.ZodEnum<{
9482
+ agent_missing: "agent_missing";
8893
9483
  auth: "auth";
8894
9484
  model_incompat: "model_incompat";
9485
+ out_of_disk: "out_of_disk";
8895
9486
  rate_limit: "rate_limit";
8896
9487
  unavailable: "unavailable";
8897
9488
  }>>;
@@ -8908,8 +9499,10 @@ export declare const SessionStreamMessageSchema: z.ZodDiscriminatedUnion<[z.ZodO
8908
9499
  error: z.ZodNullable<z.ZodObject<{
8909
9500
  message: z.ZodString;
8910
9501
  kind: z.ZodOptional<z.ZodEnum<{
9502
+ agent_missing: "agent_missing";
8911
9503
  auth: "auth";
8912
9504
  model_incompat: "model_incompat";
9505
+ out_of_disk: "out_of_disk";
8913
9506
  rate_limit: "rate_limit";
8914
9507
  unavailable: "unavailable";
8915
9508
  }>>;
@@ -8934,7 +9527,6 @@ export declare const SessionStreamMessageSchema: z.ZodDiscriminatedUnion<[z.ZodO
8934
9527
  contextTokens: z.ZodOptional<z.ZodNumber>;
8935
9528
  contextWindow: z.ZodOptional<z.ZodNumber>;
8936
9529
  }, z.core.$strip>>;
8937
- storeSync: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
8938
9530
  workspaceSync: z.ZodOptional<z.ZodObject<{
8939
9531
  error: z.ZodString;
8940
9532
  }, z.core.$strip>>;
@@ -8961,6 +9553,7 @@ export declare const SessionStreamMessageSchema: z.ZodDiscriminatedUnion<[z.ZodO
8961
9553
  reason: z.ZodEnum<{
8962
9554
  initial: "initial";
8963
9555
  recovery: "recovery";
9556
+ restart: "restart";
8964
9557
  retry: "retry";
8965
9558
  steer_restart: "steer_restart";
8966
9559
  }>;
@@ -8970,6 +9563,7 @@ export declare const SessionStreamMessageSchema: z.ZodDiscriminatedUnion<[z.ZodO
8970
9563
  interrupted: "interrupted";
8971
9564
  lost: "lost";
8972
9565
  preparing: "preparing";
9566
+ restarted: "restarted";
8973
9567
  running: "running";
8974
9568
  superseded: "superseded";
8975
9569
  }>;
@@ -8985,8 +9579,10 @@ export declare const SessionStreamMessageSchema: z.ZodDiscriminatedUnion<[z.ZodO
8985
9579
  error: z.ZodNullable<z.ZodObject<{
8986
9580
  message: z.ZodString;
8987
9581
  kind: z.ZodOptional<z.ZodEnum<{
9582
+ agent_missing: "agent_missing";
8988
9583
  auth: "auth";
8989
9584
  model_incompat: "model_incompat";
9585
+ out_of_disk: "out_of_disk";
8990
9586
  rate_limit: "rate_limit";
8991
9587
  unavailable: "unavailable";
8992
9588
  }>>;
@@ -9558,6 +10154,44 @@ export declare const SessionStreamMessageSchema: z.ZodDiscriminatedUnion<[z.ZodO
9558
10154
  to: z.ZodNumber;
9559
10155
  }, z.core.$strip>;
9560
10156
  text: z.ZodString;
10157
+ }, z.core.$strip>, z.ZodObject<{
10158
+ id: z.ZodString;
10159
+ sessionId: z.ZodString;
10160
+ turnId: z.ZodNullable<z.ZodString>;
10161
+ attemptId: z.ZodNullable<z.ZodString>;
10162
+ parentItemId: z.ZodNullable<z.ZodString>;
10163
+ position: z.ZodNumber;
10164
+ status: z.ZodEnum<{
10165
+ cancelled: "cancelled";
10166
+ completed: "completed";
10167
+ failed: "failed";
10168
+ in_progress: "in_progress";
10169
+ }>;
10170
+ nativeRef: z.ZodNullable<z.ZodObject<{
10171
+ id: z.ZodString;
10172
+ strength: z.ZodEnum<{
10173
+ none: "none";
10174
+ strong: "strong";
10175
+ weak: "weak";
10176
+ }>;
10177
+ }, z.core.$strip>>;
10178
+ createdAt: z.ZodString;
10179
+ updatedAt: z.ZodString;
10180
+ startedAt: z.ZodNullable<z.ZodString>;
10181
+ endedAt: z.ZodNullable<z.ZodString>;
10182
+ kind: z.ZodLiteral<"result">;
10183
+ name: z.ZodString;
10184
+ value: z.ZodJSONSchema;
10185
+ input: z.ZodNullable<z.ZodObject<{
10186
+ itemId: z.ZodString;
10187
+ position: z.ZodNumber;
10188
+ kind: z.ZodEnum<{
10189
+ inbound_message: "inbound_message";
10190
+ task_notification: "task_notification";
10191
+ user_message: "user_message";
10192
+ }>;
10193
+ }, z.core.$strip>>;
10194
+ commit: z.ZodNullable<z.ZodString>;
9561
10195
  }, z.core.$strip>], "kind">>;
9562
10196
  requests: z.ZodArray<z.ZodObject<{
9563
10197
  id: z.ZodString;
@@ -9869,6 +10503,40 @@ export declare const SessionCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
9869
10503
  commandId: z.ZodString;
9870
10504
  turnId: z.ZodString;
9871
10505
  }, z.core.$strip>], "type">;
10506
+ /** The turn working now and its progress (ADR 0333). */
10507
+ export declare const TurnProgressSchema: z.ZodObject<{
10508
+ id: z.ZodString;
10509
+ ordinal: z.ZodNumber;
10510
+ status: z.ZodEnum<{
10511
+ finalizing: "finalizing";
10512
+ preparing: "preparing";
10513
+ running: "running";
10514
+ waiting: "waiting";
10515
+ }>;
10516
+ attempt: z.ZodNullable<z.ZodObject<{
10517
+ id: z.ZodString;
10518
+ ordinal: z.ZodNumber;
10519
+ reason: z.ZodString;
10520
+ startedAt: z.ZodNullable<z.ZodString>;
10521
+ }, z.core.$strip>>;
10522
+ attempts: z.ZodNumber;
10523
+ restarts: z.ZodNumber;
10524
+ progressAt: z.ZodNullable<z.ZodString>;
10525
+ stalledAt: z.ZodNullable<z.ZodString>;
10526
+ stallMinutes: z.ZodNullable<z.ZodNumber>;
10527
+ activity: z.ZodObject<{
10528
+ tools: z.ZodArray<z.ZodObject<{
10529
+ name: z.ZodString;
10530
+ description: z.ZodNullable<z.ZodString>;
10531
+ since: z.ZodString;
10532
+ }, z.core.$strip>>;
10533
+ commands: z.ZodArray<z.ZodObject<{
10534
+ command: z.ZodString;
10535
+ description: z.ZodNullable<z.ZodString>;
10536
+ since: z.ZodString;
10537
+ }, z.core.$strip>>;
10538
+ }, z.core.$strip>;
10539
+ }, z.core.$strip>;
9872
10540
  export declare const AgentSessionDetailSchema: z.ZodObject<{
9873
10541
  workStatus: z.ZodEnum<{
9874
10542
  completed: "completed";
@@ -9919,6 +10587,7 @@ export declare const AgentSessionDetailSchema: z.ZodObject<{
9919
10587
  sourceModifiedAt: z.ZodString;
9920
10588
  }, z.core.$strip>>;
9921
10589
  parentSessionId: z.ZodNullable<z.ZodString>;
10590
+ workspaceSessionId: z.ZodNullable<z.ZodString>;
9922
10591
  visibility: z.ZodEnum<{
9923
10592
  archived: "archived";
9924
10593
  latent: "latent";
@@ -10072,8 +10741,10 @@ export declare const AgentSessionDetailSchema: z.ZodObject<{
10072
10741
  error: z.ZodObject<{
10073
10742
  message: z.ZodString;
10074
10743
  kind: z.ZodOptional<z.ZodEnum<{
10744
+ agent_missing: "agent_missing";
10075
10745
  auth: "auth";
10076
10746
  model_incompat: "model_incompat";
10747
+ out_of_disk: "out_of_disk";
10077
10748
  rate_limit: "rate_limit";
10078
10749
  unavailable: "unavailable";
10079
10750
  }>>;
@@ -10090,8 +10761,10 @@ export declare const AgentSessionDetailSchema: z.ZodObject<{
10090
10761
  error: z.ZodNullable<z.ZodObject<{
10091
10762
  message: z.ZodString;
10092
10763
  kind: z.ZodOptional<z.ZodEnum<{
10764
+ agent_missing: "agent_missing";
10093
10765
  auth: "auth";
10094
10766
  model_incompat: "model_incompat";
10767
+ out_of_disk: "out_of_disk";
10095
10768
  rate_limit: "rate_limit";
10096
10769
  unavailable: "unavailable";
10097
10770
  }>>;
@@ -10116,7 +10789,6 @@ export declare const AgentSessionDetailSchema: z.ZodObject<{
10116
10789
  contextTokens: z.ZodOptional<z.ZodNumber>;
10117
10790
  contextWindow: z.ZodOptional<z.ZodNumber>;
10118
10791
  }, z.core.$strip>>;
10119
- storeSync: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
10120
10792
  workspaceSync: z.ZodOptional<z.ZodObject<{
10121
10793
  error: z.ZodString;
10122
10794
  }, z.core.$strip>>;
@@ -10143,6 +10815,7 @@ export declare const AgentSessionDetailSchema: z.ZodObject<{
10143
10815
  reason: z.ZodEnum<{
10144
10816
  initial: "initial";
10145
10817
  recovery: "recovery";
10818
+ restart: "restart";
10146
10819
  retry: "retry";
10147
10820
  steer_restart: "steer_restart";
10148
10821
  }>;
@@ -10152,6 +10825,7 @@ export declare const AgentSessionDetailSchema: z.ZodObject<{
10152
10825
  interrupted: "interrupted";
10153
10826
  lost: "lost";
10154
10827
  preparing: "preparing";
10828
+ restarted: "restarted";
10155
10829
  running: "running";
10156
10830
  superseded: "superseded";
10157
10831
  }>;
@@ -10167,8 +10841,10 @@ export declare const AgentSessionDetailSchema: z.ZodObject<{
10167
10841
  error: z.ZodNullable<z.ZodObject<{
10168
10842
  message: z.ZodString;
10169
10843
  kind: z.ZodOptional<z.ZodEnum<{
10844
+ agent_missing: "agent_missing";
10170
10845
  auth: "auth";
10171
10846
  model_incompat: "model_incompat";
10847
+ out_of_disk: "out_of_disk";
10172
10848
  rate_limit: "rate_limit";
10173
10849
  unavailable: "unavailable";
10174
10850
  }>>;
@@ -10740,6 +11416,44 @@ export declare const AgentSessionDetailSchema: z.ZodObject<{
10740
11416
  to: z.ZodNumber;
10741
11417
  }, z.core.$strip>;
10742
11418
  text: z.ZodString;
11419
+ }, z.core.$strip>, z.ZodObject<{
11420
+ id: z.ZodString;
11421
+ sessionId: z.ZodString;
11422
+ turnId: z.ZodNullable<z.ZodString>;
11423
+ attemptId: z.ZodNullable<z.ZodString>;
11424
+ parentItemId: z.ZodNullable<z.ZodString>;
11425
+ position: z.ZodNumber;
11426
+ status: z.ZodEnum<{
11427
+ cancelled: "cancelled";
11428
+ completed: "completed";
11429
+ failed: "failed";
11430
+ in_progress: "in_progress";
11431
+ }>;
11432
+ nativeRef: z.ZodNullable<z.ZodObject<{
11433
+ id: z.ZodString;
11434
+ strength: z.ZodEnum<{
11435
+ none: "none";
11436
+ strong: "strong";
11437
+ weak: "weak";
11438
+ }>;
11439
+ }, z.core.$strip>>;
11440
+ createdAt: z.ZodString;
11441
+ updatedAt: z.ZodString;
11442
+ startedAt: z.ZodNullable<z.ZodString>;
11443
+ endedAt: z.ZodNullable<z.ZodString>;
11444
+ kind: z.ZodLiteral<"result">;
11445
+ name: z.ZodString;
11446
+ value: z.ZodJSONSchema;
11447
+ input: z.ZodNullable<z.ZodObject<{
11448
+ itemId: z.ZodString;
11449
+ position: z.ZodNumber;
11450
+ kind: z.ZodEnum<{
11451
+ inbound_message: "inbound_message";
11452
+ task_notification: "task_notification";
11453
+ user_message: "user_message";
11454
+ }>;
11455
+ }, z.core.$strip>>;
11456
+ commit: z.ZodNullable<z.ZodString>;
10743
11457
  }, z.core.$strip>], "kind">>;
10744
11458
  requests: z.ZodArray<z.ZodObject<{
10745
11459
  id: z.ZodString;
@@ -10886,6 +11600,79 @@ export declare const AgentSessionDetailSchema: z.ZodObject<{
10886
11600
  }, z.core.$strip>>;
10887
11601
  olderBefore: z.ZodNullable<z.ZodNumber>;
10888
11602
  }, z.core.$strip>;
11603
+ turn: z.ZodNullable<z.ZodObject<{
11604
+ id: z.ZodString;
11605
+ ordinal: z.ZodNumber;
11606
+ status: z.ZodEnum<{
11607
+ finalizing: "finalizing";
11608
+ preparing: "preparing";
11609
+ running: "running";
11610
+ waiting: "waiting";
11611
+ }>;
11612
+ attempt: z.ZodNullable<z.ZodObject<{
11613
+ id: z.ZodString;
11614
+ ordinal: z.ZodNumber;
11615
+ reason: z.ZodString;
11616
+ startedAt: z.ZodNullable<z.ZodString>;
11617
+ }, z.core.$strip>>;
11618
+ attempts: z.ZodNumber;
11619
+ restarts: z.ZodNumber;
11620
+ progressAt: z.ZodNullable<z.ZodString>;
11621
+ stalledAt: z.ZodNullable<z.ZodString>;
11622
+ stallMinutes: z.ZodNullable<z.ZodNumber>;
11623
+ activity: z.ZodObject<{
11624
+ tools: z.ZodArray<z.ZodObject<{
11625
+ name: z.ZodString;
11626
+ description: z.ZodNullable<z.ZodString>;
11627
+ since: z.ZodString;
11628
+ }, z.core.$strip>>;
11629
+ commands: z.ZodArray<z.ZodObject<{
11630
+ command: z.ZodString;
11631
+ description: z.ZodNullable<z.ZodString>;
11632
+ since: z.ZodString;
11633
+ }, z.core.$strip>>;
11634
+ }, z.core.$strip>;
11635
+ }, z.core.$strip>>;
11636
+ }, z.core.$strip>;
11637
+ /** A turn's attempts with their diagnostics (ADR 0333). */
11638
+ export declare const TurnAttemptsSchema: z.ZodObject<{
11639
+ attempts: z.ZodArray<z.ZodObject<{
11640
+ id: z.ZodString;
11641
+ ordinal: z.ZodNumber;
11642
+ reason: z.ZodString;
11643
+ status: z.ZodString;
11644
+ error: z.ZodNullable<z.ZodObject<{
11645
+ message: z.ZodString;
11646
+ }, z.core.$strip>>;
11647
+ startedAt: z.ZodNullable<z.ZodString>;
11648
+ completedAt: z.ZodNullable<z.ZodString>;
11649
+ progressAt: z.ZodNullable<z.ZodString>;
11650
+ stalledAt: z.ZodNullable<z.ZodString>;
11651
+ diagnostics: z.ZodNullable<z.ZodObject<{
11652
+ runner: z.ZodString;
11653
+ harness: z.ZodString;
11654
+ }, z.core.$strip>>;
11655
+ }, z.core.$strip>>;
11656
+ }, z.core.$strip>;
11657
+ export declare const TurnIdParamsSchema: z.ZodObject<{
11658
+ projectId: z.ZodString;
11659
+ sessionId: z.ZodString;
11660
+ turnId: z.ZodString;
11661
+ }, z.core.$strip>;
11662
+ /** Restart a running turn's attempt (ADR 0333). */
11663
+ export declare const RestartTurnSchema: z.ZodObject<{
11664
+ attemptId: z.ZodString;
11665
+ reason: z.ZodString;
11666
+ onlyIfStalled: z.ZodOptional<z.ZodBoolean>;
11667
+ idempotencyKey: z.ZodString;
11668
+ }, z.core.$strip>;
11669
+ export declare const RestartTurnResultSchema: z.ZodObject<{
11670
+ restarted: z.ZodLiteral<true>;
11671
+ turnId: z.ZodString;
11672
+ attemptId: z.ZodString;
11673
+ attempt: z.ZodNumber;
11674
+ attempts: z.ZodNumber;
11675
+ restarts: z.ZodNumber;
10889
11676
  }, z.core.$strip>;
10890
11677
  export declare const SessionItemsQuerySchema: z.ZodObject<{
10891
11678
  before: z.ZodCoercedNumber<unknown>;
@@ -11453,12 +12240,2644 @@ export declare const SessionItemsPageSchema: z.ZodObject<{
11453
12240
  from: z.ZodNumber;
11454
12241
  to: z.ZodNumber;
11455
12242
  }, z.core.$strip>;
11456
- text: z.ZodString;
11457
- }, z.core.$strip>], "kind">>;
11458
- olderBefore: z.ZodNullable<z.ZodNumber>;
11459
- }, z.core.$strip>;
11460
- export declare const SessionEventsQuerySchema: z.ZodObject<{
11461
- after: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
12243
+ text: z.ZodString;
12244
+ }, z.core.$strip>, z.ZodObject<{
12245
+ id: z.ZodString;
12246
+ sessionId: z.ZodString;
12247
+ turnId: z.ZodNullable<z.ZodString>;
12248
+ attemptId: z.ZodNullable<z.ZodString>;
12249
+ parentItemId: z.ZodNullable<z.ZodString>;
12250
+ position: z.ZodNumber;
12251
+ status: z.ZodEnum<{
12252
+ cancelled: "cancelled";
12253
+ completed: "completed";
12254
+ failed: "failed";
12255
+ in_progress: "in_progress";
12256
+ }>;
12257
+ nativeRef: z.ZodNullable<z.ZodObject<{
12258
+ id: z.ZodString;
12259
+ strength: z.ZodEnum<{
12260
+ none: "none";
12261
+ strong: "strong";
12262
+ weak: "weak";
12263
+ }>;
12264
+ }, z.core.$strip>>;
12265
+ createdAt: z.ZodString;
12266
+ updatedAt: z.ZodString;
12267
+ startedAt: z.ZodNullable<z.ZodString>;
12268
+ endedAt: z.ZodNullable<z.ZodString>;
12269
+ kind: z.ZodLiteral<"result">;
12270
+ name: z.ZodString;
12271
+ value: z.ZodJSONSchema;
12272
+ input: z.ZodNullable<z.ZodObject<{
12273
+ itemId: z.ZodString;
12274
+ position: z.ZodNumber;
12275
+ kind: z.ZodEnum<{
12276
+ inbound_message: "inbound_message";
12277
+ task_notification: "task_notification";
12278
+ user_message: "user_message";
12279
+ }>;
12280
+ }, z.core.$strip>>;
12281
+ commit: z.ZodNullable<z.ZodString>;
12282
+ }, z.core.$strip>], "kind">>;
12283
+ olderBefore: z.ZodNullable<z.ZodNumber>;
12284
+ }, z.core.$strip>;
12285
+ /** A typed result an agent submitted and its schema accepted (ADR 0323). */
12286
+ export declare const SessionResultSchema: z.ZodObject<{
12287
+ id: z.ZodString;
12288
+ sessionId: z.ZodString;
12289
+ turnId: z.ZodNullable<z.ZodString>;
12290
+ attemptId: z.ZodNullable<z.ZodString>;
12291
+ name: z.ZodString;
12292
+ value: z.ZodJSONSchema;
12293
+ input: z.ZodNullable<z.ZodObject<{
12294
+ itemId: z.ZodString;
12295
+ position: z.ZodNumber;
12296
+ kind: z.ZodEnum<{
12297
+ inbound_message: "inbound_message";
12298
+ task_notification: "task_notification";
12299
+ user_message: "user_message";
12300
+ }>;
12301
+ }, z.core.$strip>>;
12302
+ current: z.ZodBoolean;
12303
+ commit: z.ZodNullable<z.ZodString>;
12304
+ recordedAt: z.ZodString;
12305
+ }, z.core.$strip>;
12306
+ export declare const SessionResultsQuerySchema: z.ZodObject<{
12307
+ name: z.ZodOptional<z.ZodString>;
12308
+ family: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
12309
+ false: "false";
12310
+ true: "true";
12311
+ }>, z.ZodTransform<boolean, "false" | "true">>>;
12312
+ turnId: z.ZodOptional<z.ZodString>;
12313
+ afterInput: z.ZodOptional<z.ZodString>;
12314
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
12315
+ }, z.core.$strip>;
12316
+ export declare const SessionResultsSchema: z.ZodObject<{
12317
+ results: z.ZodArray<z.ZodObject<{
12318
+ id: z.ZodString;
12319
+ sessionId: z.ZodString;
12320
+ turnId: z.ZodNullable<z.ZodString>;
12321
+ attemptId: z.ZodNullable<z.ZodString>;
12322
+ name: z.ZodString;
12323
+ value: z.ZodJSONSchema;
12324
+ input: z.ZodNullable<z.ZodObject<{
12325
+ itemId: z.ZodString;
12326
+ position: z.ZodNumber;
12327
+ kind: z.ZodEnum<{
12328
+ inbound_message: "inbound_message";
12329
+ task_notification: "task_notification";
12330
+ user_message: "user_message";
12331
+ }>;
12332
+ }, z.core.$strip>>;
12333
+ current: z.ZodBoolean;
12334
+ commit: z.ZodNullable<z.ZodString>;
12335
+ recordedAt: z.ZodString;
12336
+ }, z.core.$strip>>;
12337
+ }, z.core.$strip>;
12338
+ export declare const SessionEventsQuerySchema: z.ZodObject<{
12339
+ after: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
12340
+ }, z.core.$strip>;
12341
+ export declare const SessionMissedEventsQuerySchema: z.ZodObject<{
12342
+ after: z.ZodCoercedNumber<unknown>;
12343
+ }, z.core.$strip>;
12344
+ /**
12345
+ * What a reader has missed since its sequence, read once: the messages a
12346
+ * stream opens with (the events since, or a `reset` with a fresh snapshot
12347
+ * when they are too many to replay); empty when it is current.
12348
+ */
12349
+ export declare const SessionMissedEventsSchema: z.ZodObject<{
12350
+ messages: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
12351
+ type: z.ZodLiteral<"events">;
12352
+ events: z.ZodArray<z.ZodObject<{
12353
+ sessionId: z.ZodString;
12354
+ sequence: z.ZodNumber;
12355
+ at: z.ZodString;
12356
+ commandId: z.ZodNullable<z.ZodString>;
12357
+ event: z.ZodDiscriminatedUnion<[z.ZodObject<{
12358
+ type: z.ZodLiteral<"session.changed">;
12359
+ session: z.ZodObject<{
12360
+ id: z.ZodOptional<z.ZodString>;
12361
+ projectId: z.ZodOptional<z.ZodString>;
12362
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12363
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12364
+ agentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12365
+ harness: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12366
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12367
+ modelEffort: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
12368
+ high: "high";
12369
+ low: "low";
12370
+ max: "max";
12371
+ medium: "medium";
12372
+ xhigh: "xhigh";
12373
+ }>>>;
12374
+ status: z.ZodOptional<z.ZodEnum<{
12375
+ active: "active";
12376
+ closed: "closed";
12377
+ }>>;
12378
+ workStatus: z.ZodOptional<z.ZodEnum<{
12379
+ completed: "completed";
12380
+ open: "open";
12381
+ }>>;
12382
+ activity: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12383
+ todos: z.ZodOptional<z.ZodArray<z.ZodObject<{
12384
+ id: z.ZodString;
12385
+ title: z.ZodString;
12386
+ description: z.ZodString;
12387
+ status: z.ZodEnum<{
12388
+ completed: "completed";
12389
+ in_progress: "in_progress";
12390
+ pending: "pending";
12391
+ }>;
12392
+ activeForm: z.ZodOptional<z.ZodString>;
12393
+ }, z.core.$strip>>>;
12394
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
12395
+ imported: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
12396
+ harness: z.ZodEnum<{
12397
+ "claude-code": "claude-code";
12398
+ codex: "codex";
12399
+ }>;
12400
+ nativeSessionId: z.ZodString;
12401
+ sourcePath: z.ZodString;
12402
+ contentSha256: z.ZodString;
12403
+ sourceModifiedAt: z.ZodString;
12404
+ }, z.core.$strip>>>>;
12405
+ parentSessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12406
+ forkedFromSessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12407
+ attentionRevision: z.ZodOptional<z.ZodNumber>;
12408
+ environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12409
+ authorityHostId: z.ZodOptional<z.ZodString>;
12410
+ authorityRevision: z.ZodOptional<z.ZodNumber>;
12411
+ handoffStatus: z.ZodOptional<z.ZodEnum<{
12412
+ none: "none";
12413
+ pending: "pending";
12414
+ }>>;
12415
+ updatedAt: z.ZodOptional<z.ZodString>;
12416
+ }, z.core.$strip>;
12417
+ }, z.core.$strip>, z.ZodObject<{
12418
+ type: z.ZodLiteral<"turn.changed">;
12419
+ turn: z.ZodObject<{
12420
+ id: z.ZodString;
12421
+ sessionId: z.ZodString;
12422
+ ordinal: z.ZodNumber;
12423
+ status: z.ZodEnum<{
12424
+ cancelled: "cancelled";
12425
+ completed: "completed";
12426
+ failed: "failed";
12427
+ finalizing: "finalizing";
12428
+ held: "held";
12429
+ interrupted: "interrupted";
12430
+ preparing: "preparing";
12431
+ queued: "queued";
12432
+ rolled_back: "rolled_back";
12433
+ running: "running";
12434
+ waiting: "waiting";
12435
+ }>;
12436
+ inputItemId: z.ZodNullable<z.ZodString>;
12437
+ dispatch: z.ZodEnum<{
12438
+ interrupt: "interrupt";
12439
+ queue: "queue";
12440
+ }>;
12441
+ priority: z.ZodNumber;
12442
+ activity: z.ZodNullable<z.ZodString>;
12443
+ activityAt: z.ZodNullable<z.ZodString>;
12444
+ providerRetry: z.ZodNullable<z.ZodObject<{
12445
+ error: z.ZodObject<{
12446
+ message: z.ZodString;
12447
+ kind: z.ZodOptional<z.ZodEnum<{
12448
+ agent_missing: "agent_missing";
12449
+ auth: "auth";
12450
+ model_incompat: "model_incompat";
12451
+ out_of_disk: "out_of_disk";
12452
+ rate_limit: "rate_limit";
12453
+ unavailable: "unavailable";
12454
+ }>>;
12455
+ }, z.core.$strip>;
12456
+ attempt: z.ZodNullable<z.ZodNumber>;
12457
+ maxAttempts: z.ZodNullable<z.ZodNumber>;
12458
+ retryAt: z.ZodNullable<z.ZodString>;
12459
+ }, z.core.$strip>>;
12460
+ attemptCount: z.ZodNumber;
12461
+ activeAttemptId: z.ZodNullable<z.ZodString>;
12462
+ providerThreadId: z.ZodNullable<z.ZodString>;
12463
+ retryAt: z.ZodNullable<z.ZodString>;
12464
+ cancellationRequested: z.ZodBoolean;
12465
+ error: z.ZodNullable<z.ZodObject<{
12466
+ message: z.ZodString;
12467
+ kind: z.ZodOptional<z.ZodEnum<{
12468
+ agent_missing: "agent_missing";
12469
+ auth: "auth";
12470
+ model_incompat: "model_incompat";
12471
+ out_of_disk: "out_of_disk";
12472
+ rate_limit: "rate_limit";
12473
+ unavailable: "unavailable";
12474
+ }>>;
12475
+ retrySafe: z.ZodOptional<z.ZodBoolean>;
12476
+ }, z.core.$strip>>;
12477
+ outcome: z.ZodNullable<z.ZodObject<{
12478
+ changedFiles: z.ZodArray<z.ZodObject<{
12479
+ path: z.ZodString;
12480
+ kind: z.ZodEnum<{
12481
+ deleted: "deleted";
12482
+ modified: "modified";
12483
+ }>;
12484
+ }, z.core.$strip>>;
12485
+ usage: z.ZodOptional<z.ZodObject<{
12486
+ model: z.ZodOptional<z.ZodString>;
12487
+ inputTokens: z.ZodOptional<z.ZodNumber>;
12488
+ cachedInputTokens: z.ZodOptional<z.ZodNumber>;
12489
+ cacheCreationTokens: z.ZodOptional<z.ZodNumber>;
12490
+ outputTokens: z.ZodOptional<z.ZodNumber>;
12491
+ reasoningTokens: z.ZodOptional<z.ZodNumber>;
12492
+ costUsd: z.ZodOptional<z.ZodNumber>;
12493
+ contextTokens: z.ZodOptional<z.ZodNumber>;
12494
+ contextWindow: z.ZodOptional<z.ZodNumber>;
12495
+ }, z.core.$strip>>;
12496
+ workspaceSync: z.ZodOptional<z.ZodObject<{
12497
+ error: z.ZodString;
12498
+ }, z.core.$strip>>;
12499
+ notification: z.ZodOptional<z.ZodObject<{
12500
+ title: z.ZodOptional<z.ZodString>;
12501
+ body: z.ZodOptional<z.ZodString>;
12502
+ }, z.core.$strip>>;
12503
+ }, z.core.$strip>>;
12504
+ checkpoint: z.ZodObject<{
12505
+ before: z.ZodNullable<z.ZodString>;
12506
+ after: z.ZodNullable<z.ZodString>;
12507
+ }, z.core.$strip>;
12508
+ continuationOf: z.ZodNullable<z.ZodString>;
12509
+ createdAt: z.ZodString;
12510
+ startedAt: z.ZodNullable<z.ZodString>;
12511
+ completedAt: z.ZodNullable<z.ZodString>;
12512
+ updatedAt: z.ZodString;
12513
+ }, z.core.$strip>;
12514
+ }, z.core.$strip>, z.ZodObject<{
12515
+ type: z.ZodLiteral<"attempt.changed">;
12516
+ attempt: z.ZodObject<{
12517
+ id: z.ZodString;
12518
+ turnId: z.ZodString;
12519
+ sessionId: z.ZodString;
12520
+ ordinal: z.ZodNumber;
12521
+ reason: z.ZodEnum<{
12522
+ initial: "initial";
12523
+ recovery: "recovery";
12524
+ restart: "restart";
12525
+ retry: "retry";
12526
+ steer_restart: "steer_restart";
12527
+ }>;
12528
+ status: z.ZodEnum<{
12529
+ completed: "completed";
12530
+ failed: "failed";
12531
+ interrupted: "interrupted";
12532
+ lost: "lost";
12533
+ preparing: "preparing";
12534
+ restarted: "restarted";
12535
+ running: "running";
12536
+ superseded: "superseded";
12537
+ }>;
12538
+ providerThreadId: z.ZodNullable<z.ZodString>;
12539
+ nativeTurnRef: z.ZodNullable<z.ZodObject<{
12540
+ id: z.ZodString;
12541
+ strength: z.ZodEnum<{
12542
+ none: "none";
12543
+ strong: "strong";
12544
+ weak: "weak";
12545
+ }>;
12546
+ }, z.core.$strip>>;
12547
+ error: z.ZodNullable<z.ZodObject<{
12548
+ message: z.ZodString;
12549
+ kind: z.ZodOptional<z.ZodEnum<{
12550
+ agent_missing: "agent_missing";
12551
+ auth: "auth";
12552
+ model_incompat: "model_incompat";
12553
+ out_of_disk: "out_of_disk";
12554
+ rate_limit: "rate_limit";
12555
+ unavailable: "unavailable";
12556
+ }>>;
12557
+ retrySafe: z.ZodOptional<z.ZodBoolean>;
12558
+ }, z.core.$strip>>;
12559
+ createdAt: z.ZodString;
12560
+ startedAt: z.ZodNullable<z.ZodString>;
12561
+ completedAt: z.ZodNullable<z.ZodString>;
12562
+ }, z.core.$strip>;
12563
+ }, z.core.$strip>, z.ZodObject<{
12564
+ type: z.ZodLiteral<"item.added">;
12565
+ item: z.ZodDiscriminatedUnion<[z.ZodObject<{
12566
+ id: z.ZodString;
12567
+ sessionId: z.ZodString;
12568
+ turnId: z.ZodNullable<z.ZodString>;
12569
+ attemptId: z.ZodNullable<z.ZodString>;
12570
+ parentItemId: z.ZodNullable<z.ZodString>;
12571
+ position: z.ZodNumber;
12572
+ status: z.ZodEnum<{
12573
+ cancelled: "cancelled";
12574
+ completed: "completed";
12575
+ failed: "failed";
12576
+ in_progress: "in_progress";
12577
+ }>;
12578
+ nativeRef: z.ZodNullable<z.ZodObject<{
12579
+ id: z.ZodString;
12580
+ strength: z.ZodEnum<{
12581
+ none: "none";
12582
+ strong: "strong";
12583
+ weak: "weak";
12584
+ }>;
12585
+ }, z.core.$strip>>;
12586
+ createdAt: z.ZodString;
12587
+ updatedAt: z.ZodString;
12588
+ startedAt: z.ZodNullable<z.ZodString>;
12589
+ endedAt: z.ZodNullable<z.ZodString>;
12590
+ dispatch: z.ZodEnum<{
12591
+ interrupt: "interrupt";
12592
+ message_only: "message_only";
12593
+ queue: "queue";
12594
+ steer: "steer";
12595
+ }>;
12596
+ attention: z.ZodNullable<z.ZodLiteral<"required">>;
12597
+ idempotencyKey: z.ZodNullable<z.ZodString>;
12598
+ deliveredBy: z.ZodNullable<z.ZodString>;
12599
+ causation: z.ZodArray<z.ZodString>;
12600
+ kind: z.ZodLiteral<"user_message">;
12601
+ author: z.ZodObject<{
12602
+ kind: z.ZodLiteral<"user">;
12603
+ externalUserId: z.ZodString;
12604
+ }, z.core.$strip>;
12605
+ text: z.ZodString;
12606
+ attachments: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
12607
+ kind: z.ZodEnum<{
12608
+ document: "document";
12609
+ image: "image";
12610
+ }>;
12611
+ name: z.ZodString;
12612
+ mediaType: z.ZodString;
12613
+ dataBase64: z.ZodString;
12614
+ }, z.core.$strip>, z.ZodObject<{
12615
+ kind: z.ZodLiteral<"text">;
12616
+ name: z.ZodString;
12617
+ text: z.ZodString;
12618
+ source: z.ZodUnion<readonly [z.ZodObject<{
12619
+ type: z.ZodLiteral<"paste">;
12620
+ }, z.core.$strip>, z.ZodObject<{
12621
+ type: z.ZodLiteral<"selection">;
12622
+ filePath: z.ZodString;
12623
+ startLine: z.ZodOptional<z.ZodNumber>;
12624
+ endLine: z.ZodOptional<z.ZodNumber>;
12625
+ }, z.core.$strip>, z.ZodObject<{
12626
+ type: z.ZodLiteral<"url">;
12627
+ url: z.ZodString;
12628
+ }, z.core.$strip>, z.ZodObject<{
12629
+ type: z.ZodLiteral<"path">;
12630
+ path: z.ZodString;
12631
+ }, z.core.$strip>, z.ZodObject<{
12632
+ type: z.ZodLiteral<"tab">;
12633
+ key: z.ZodString;
12634
+ kind: z.ZodString;
12635
+ title: z.ZodString;
12636
+ url: z.ZodOptional<z.ZodString>;
12637
+ filePath: z.ZodOptional<z.ZodString>;
12638
+ }, z.core.$strip>, z.ZodObject<{
12639
+ type: z.ZodLiteral<"skill">;
12640
+ name: z.ZodString;
12641
+ path: z.ZodOptional<z.ZodString>;
12642
+ }, z.core.$strip>]>;
12643
+ }, z.core.$strip>]>>;
12644
+ answer: z.ZodOptional<z.ZodObject<{
12645
+ requestId: z.ZodString;
12646
+ questions: z.ZodArray<z.ZodObject<{
12647
+ question: z.ZodString;
12648
+ header: z.ZodString;
12649
+ multiSelect: z.ZodBoolean;
12650
+ options: z.ZodArray<z.ZodObject<{
12651
+ label: z.ZodString;
12652
+ description: z.ZodString;
12653
+ }, z.core.$strip>>;
12654
+ }, z.core.$strip>>;
12655
+ answers: z.ZodArray<z.ZodString>;
12656
+ }, z.core.$strip>>;
12657
+ }, z.core.$strip>, z.ZodObject<{
12658
+ id: z.ZodString;
12659
+ sessionId: z.ZodString;
12660
+ turnId: z.ZodNullable<z.ZodString>;
12661
+ attemptId: z.ZodNullable<z.ZodString>;
12662
+ parentItemId: z.ZodNullable<z.ZodString>;
12663
+ position: z.ZodNumber;
12664
+ status: z.ZodEnum<{
12665
+ cancelled: "cancelled";
12666
+ completed: "completed";
12667
+ failed: "failed";
12668
+ in_progress: "in_progress";
12669
+ }>;
12670
+ nativeRef: z.ZodNullable<z.ZodObject<{
12671
+ id: z.ZodString;
12672
+ strength: z.ZodEnum<{
12673
+ none: "none";
12674
+ strong: "strong";
12675
+ weak: "weak";
12676
+ }>;
12677
+ }, z.core.$strip>>;
12678
+ createdAt: z.ZodString;
12679
+ updatedAt: z.ZodString;
12680
+ startedAt: z.ZodNullable<z.ZodString>;
12681
+ endedAt: z.ZodNullable<z.ZodString>;
12682
+ dispatch: z.ZodEnum<{
12683
+ interrupt: "interrupt";
12684
+ message_only: "message_only";
12685
+ queue: "queue";
12686
+ steer: "steer";
12687
+ }>;
12688
+ attention: z.ZodNullable<z.ZodLiteral<"required">>;
12689
+ idempotencyKey: z.ZodNullable<z.ZodString>;
12690
+ deliveredBy: z.ZodNullable<z.ZodString>;
12691
+ causation: z.ZodArray<z.ZodString>;
12692
+ kind: z.ZodLiteral<"inbound_message">;
12693
+ from: z.ZodUnion<readonly [z.ZodObject<{
12694
+ kind: z.ZodLiteral<"agent">;
12695
+ sessionId: z.ZodString;
12696
+ agentId: z.ZodNullable<z.ZodString>;
12697
+ projectId: z.ZodOptional<z.ZodString>;
12698
+ }, z.core.$strip>, z.ZodObject<{
12699
+ kind: z.ZodLiteral<"assistant">;
12700
+ externalUserId: z.ZodString;
12701
+ }, z.core.$strip>, z.ZodObject<{
12702
+ kind: z.ZodLiteral<"workflow">;
12703
+ runId: z.ZodString;
12704
+ workflowName: z.ZodString;
12705
+ displayName: z.ZodOptional<z.ZodString>;
12706
+ enablementId: z.ZodOptional<z.ZodString>;
12707
+ watcher: z.ZodOptional<z.ZodObject<{
12708
+ id: z.ZodString;
12709
+ sessionId: z.ZodString;
12710
+ }, z.core.$strip>>;
12711
+ scheduledFor: z.ZodOptional<z.ZodString>;
12712
+ firedAt: z.ZodOptional<z.ZodString>;
12713
+ }, z.core.$strip>]>;
12714
+ text: z.ZodString;
12715
+ attachments: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
12716
+ kind: z.ZodEnum<{
12717
+ document: "document";
12718
+ image: "image";
12719
+ }>;
12720
+ name: z.ZodString;
12721
+ mediaType: z.ZodString;
12722
+ dataBase64: z.ZodString;
12723
+ }, z.core.$strip>, z.ZodObject<{
12724
+ kind: z.ZodLiteral<"text">;
12725
+ name: z.ZodString;
12726
+ text: z.ZodString;
12727
+ source: z.ZodUnion<readonly [z.ZodObject<{
12728
+ type: z.ZodLiteral<"paste">;
12729
+ }, z.core.$strip>, z.ZodObject<{
12730
+ type: z.ZodLiteral<"selection">;
12731
+ filePath: z.ZodString;
12732
+ startLine: z.ZodOptional<z.ZodNumber>;
12733
+ endLine: z.ZodOptional<z.ZodNumber>;
12734
+ }, z.core.$strip>, z.ZodObject<{
12735
+ type: z.ZodLiteral<"url">;
12736
+ url: z.ZodString;
12737
+ }, z.core.$strip>, z.ZodObject<{
12738
+ type: z.ZodLiteral<"path">;
12739
+ path: z.ZodString;
12740
+ }, z.core.$strip>, z.ZodObject<{
12741
+ type: z.ZodLiteral<"tab">;
12742
+ key: z.ZodString;
12743
+ kind: z.ZodString;
12744
+ title: z.ZodString;
12745
+ url: z.ZodOptional<z.ZodString>;
12746
+ filePath: z.ZodOptional<z.ZodString>;
12747
+ }, z.core.$strip>, z.ZodObject<{
12748
+ type: z.ZodLiteral<"skill">;
12749
+ name: z.ZodString;
12750
+ path: z.ZodOptional<z.ZodString>;
12751
+ }, z.core.$strip>]>;
12752
+ }, z.core.$strip>]>>;
12753
+ alert: z.ZodOptional<z.ZodObject<{
12754
+ title: z.ZodOptional<z.ZodString>;
12755
+ body: z.ZodOptional<z.ZodString>;
12756
+ }, z.core.$strip>>;
12757
+ }, z.core.$strip>, z.ZodObject<{
12758
+ id: z.ZodString;
12759
+ sessionId: z.ZodString;
12760
+ turnId: z.ZodNullable<z.ZodString>;
12761
+ attemptId: z.ZodNullable<z.ZodString>;
12762
+ parentItemId: z.ZodNullable<z.ZodString>;
12763
+ position: z.ZodNumber;
12764
+ status: z.ZodEnum<{
12765
+ cancelled: "cancelled";
12766
+ completed: "completed";
12767
+ failed: "failed";
12768
+ in_progress: "in_progress";
12769
+ }>;
12770
+ nativeRef: z.ZodNullable<z.ZodObject<{
12771
+ id: z.ZodString;
12772
+ strength: z.ZodEnum<{
12773
+ none: "none";
12774
+ strong: "strong";
12775
+ weak: "weak";
12776
+ }>;
12777
+ }, z.core.$strip>>;
12778
+ createdAt: z.ZodString;
12779
+ updatedAt: z.ZodString;
12780
+ startedAt: z.ZodNullable<z.ZodString>;
12781
+ endedAt: z.ZodNullable<z.ZodString>;
12782
+ dispatch: z.ZodEnum<{
12783
+ interrupt: "interrupt";
12784
+ message_only: "message_only";
12785
+ queue: "queue";
12786
+ steer: "steer";
12787
+ }>;
12788
+ attention: z.ZodNullable<z.ZodLiteral<"required">>;
12789
+ idempotencyKey: z.ZodNullable<z.ZodString>;
12790
+ deliveredBy: z.ZodNullable<z.ZodString>;
12791
+ causation: z.ZodArray<z.ZodString>;
12792
+ kind: z.ZodLiteral<"task_notification">;
12793
+ task: z.ZodObject<{
12794
+ type: z.ZodString;
12795
+ id: z.ZodString;
12796
+ title: z.ZodString;
12797
+ status: z.ZodEnum<{
12798
+ completed: "completed";
12799
+ failed: "failed";
12800
+ needs_input: "needs_input";
12801
+ stopped: "stopped";
12802
+ update: "update";
12803
+ }>;
12804
+ }, z.core.$strip>;
12805
+ summary: z.ZodString;
12806
+ detail: z.ZodString;
12807
+ source: z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
12808
+ kind: z.ZodLiteral<"session">;
12809
+ sessionId: z.ZodString;
12810
+ projectId: z.ZodOptional<z.ZodString>;
12811
+ }, z.core.$strip>, z.ZodObject<{
12812
+ kind: z.ZodLiteral<"workflow_run">;
12813
+ runId: z.ZodString;
12814
+ workflowName: z.ZodString;
12815
+ }, z.core.$strip>, z.ZodObject<{
12816
+ kind: z.ZodLiteral<"surface">;
12817
+ key: z.ZodString;
12818
+ }, z.core.$strip>]>>;
12819
+ }, z.core.$strip>, z.ZodObject<{
12820
+ id: z.ZodString;
12821
+ sessionId: z.ZodString;
12822
+ turnId: z.ZodNullable<z.ZodString>;
12823
+ attemptId: z.ZodNullable<z.ZodString>;
12824
+ parentItemId: z.ZodNullable<z.ZodString>;
12825
+ position: z.ZodNumber;
12826
+ status: z.ZodEnum<{
12827
+ cancelled: "cancelled";
12828
+ completed: "completed";
12829
+ failed: "failed";
12830
+ in_progress: "in_progress";
12831
+ }>;
12832
+ nativeRef: z.ZodNullable<z.ZodObject<{
12833
+ id: z.ZodString;
12834
+ strength: z.ZodEnum<{
12835
+ none: "none";
12836
+ strong: "strong";
12837
+ weak: "weak";
12838
+ }>;
12839
+ }, z.core.$strip>>;
12840
+ createdAt: z.ZodString;
12841
+ updatedAt: z.ZodString;
12842
+ startedAt: z.ZodNullable<z.ZodString>;
12843
+ endedAt: z.ZodNullable<z.ZodString>;
12844
+ kind: z.ZodLiteral<"assistant_message">;
12845
+ text: z.ZodString;
12846
+ agentId: z.ZodNullable<z.ZodString>;
12847
+ }, z.core.$strip>, z.ZodObject<{
12848
+ id: z.ZodString;
12849
+ sessionId: z.ZodString;
12850
+ turnId: z.ZodNullable<z.ZodString>;
12851
+ attemptId: z.ZodNullable<z.ZodString>;
12852
+ parentItemId: z.ZodNullable<z.ZodString>;
12853
+ position: z.ZodNumber;
12854
+ status: z.ZodEnum<{
12855
+ cancelled: "cancelled";
12856
+ completed: "completed";
12857
+ failed: "failed";
12858
+ in_progress: "in_progress";
12859
+ }>;
12860
+ nativeRef: z.ZodNullable<z.ZodObject<{
12861
+ id: z.ZodString;
12862
+ strength: z.ZodEnum<{
12863
+ none: "none";
12864
+ strong: "strong";
12865
+ weak: "weak";
12866
+ }>;
12867
+ }, z.core.$strip>>;
12868
+ createdAt: z.ZodString;
12869
+ updatedAt: z.ZodString;
12870
+ startedAt: z.ZodNullable<z.ZodString>;
12871
+ endedAt: z.ZodNullable<z.ZodString>;
12872
+ kind: z.ZodLiteral<"reasoning">;
12873
+ text: z.ZodString;
12874
+ }, z.core.$strip>, z.ZodObject<{
12875
+ id: z.ZodString;
12876
+ sessionId: z.ZodString;
12877
+ turnId: z.ZodNullable<z.ZodString>;
12878
+ attemptId: z.ZodNullable<z.ZodString>;
12879
+ parentItemId: z.ZodNullable<z.ZodString>;
12880
+ position: z.ZodNumber;
12881
+ status: z.ZodEnum<{
12882
+ cancelled: "cancelled";
12883
+ completed: "completed";
12884
+ failed: "failed";
12885
+ in_progress: "in_progress";
12886
+ }>;
12887
+ nativeRef: z.ZodNullable<z.ZodObject<{
12888
+ id: z.ZodString;
12889
+ strength: z.ZodEnum<{
12890
+ none: "none";
12891
+ strong: "strong";
12892
+ weak: "weak";
12893
+ }>;
12894
+ }, z.core.$strip>>;
12895
+ createdAt: z.ZodString;
12896
+ updatedAt: z.ZodString;
12897
+ startedAt: z.ZodNullable<z.ZodString>;
12898
+ endedAt: z.ZodNullable<z.ZodString>;
12899
+ kind: z.ZodLiteral<"tool_call">;
12900
+ tool: z.ZodString;
12901
+ server: z.ZodNullable<z.ZodString>;
12902
+ description: z.ZodNullable<z.ZodString>;
12903
+ input: z.ZodJSONSchema;
12904
+ result: z.ZodNullable<z.ZodJSONSchema>;
12905
+ error: z.ZodNullable<z.ZodString>;
12906
+ }, z.core.$strip>, z.ZodObject<{
12907
+ id: z.ZodString;
12908
+ sessionId: z.ZodString;
12909
+ turnId: z.ZodNullable<z.ZodString>;
12910
+ attemptId: z.ZodNullable<z.ZodString>;
12911
+ parentItemId: z.ZodNullable<z.ZodString>;
12912
+ position: z.ZodNumber;
12913
+ status: z.ZodEnum<{
12914
+ cancelled: "cancelled";
12915
+ completed: "completed";
12916
+ failed: "failed";
12917
+ in_progress: "in_progress";
12918
+ }>;
12919
+ nativeRef: z.ZodNullable<z.ZodObject<{
12920
+ id: z.ZodString;
12921
+ strength: z.ZodEnum<{
12922
+ none: "none";
12923
+ strong: "strong";
12924
+ weak: "weak";
12925
+ }>;
12926
+ }, z.core.$strip>>;
12927
+ createdAt: z.ZodString;
12928
+ updatedAt: z.ZodString;
12929
+ startedAt: z.ZodNullable<z.ZodString>;
12930
+ endedAt: z.ZodNullable<z.ZodString>;
12931
+ kind: z.ZodLiteral<"command">;
12932
+ command: z.ZodString;
12933
+ description: z.ZodNullable<z.ZodString>;
12934
+ output: z.ZodString;
12935
+ exitCode: z.ZodNullable<z.ZodNumber>;
12936
+ }, z.core.$strip>, z.ZodObject<{
12937
+ id: z.ZodString;
12938
+ sessionId: z.ZodString;
12939
+ turnId: z.ZodNullable<z.ZodString>;
12940
+ attemptId: z.ZodNullable<z.ZodString>;
12941
+ parentItemId: z.ZodNullable<z.ZodString>;
12942
+ position: z.ZodNumber;
12943
+ status: z.ZodEnum<{
12944
+ cancelled: "cancelled";
12945
+ completed: "completed";
12946
+ failed: "failed";
12947
+ in_progress: "in_progress";
12948
+ }>;
12949
+ nativeRef: z.ZodNullable<z.ZodObject<{
12950
+ id: z.ZodString;
12951
+ strength: z.ZodEnum<{
12952
+ none: "none";
12953
+ strong: "strong";
12954
+ weak: "weak";
12955
+ }>;
12956
+ }, z.core.$strip>>;
12957
+ createdAt: z.ZodString;
12958
+ updatedAt: z.ZodString;
12959
+ startedAt: z.ZodNullable<z.ZodString>;
12960
+ endedAt: z.ZodNullable<z.ZodString>;
12961
+ kind: z.ZodLiteral<"file_change">;
12962
+ path: z.ZodString;
12963
+ change: z.ZodNullable<z.ZodEnum<{
12964
+ created: "created";
12965
+ deleted: "deleted";
12966
+ modified: "modified";
12967
+ renamed: "renamed";
12968
+ }>>;
12969
+ previousPath: z.ZodNullable<z.ZodString>;
12970
+ }, z.core.$strip>, z.ZodObject<{
12971
+ id: z.ZodString;
12972
+ sessionId: z.ZodString;
12973
+ turnId: z.ZodNullable<z.ZodString>;
12974
+ attemptId: z.ZodNullable<z.ZodString>;
12975
+ parentItemId: z.ZodNullable<z.ZodString>;
12976
+ position: z.ZodNumber;
12977
+ status: z.ZodEnum<{
12978
+ cancelled: "cancelled";
12979
+ completed: "completed";
12980
+ failed: "failed";
12981
+ in_progress: "in_progress";
12982
+ }>;
12983
+ nativeRef: z.ZodNullable<z.ZodObject<{
12984
+ id: z.ZodString;
12985
+ strength: z.ZodEnum<{
12986
+ none: "none";
12987
+ strong: "strong";
12988
+ weak: "weak";
12989
+ }>;
12990
+ }, z.core.$strip>>;
12991
+ createdAt: z.ZodString;
12992
+ updatedAt: z.ZodString;
12993
+ startedAt: z.ZodNullable<z.ZodString>;
12994
+ endedAt: z.ZodNullable<z.ZodString>;
12995
+ kind: z.ZodLiteral<"plan">;
12996
+ steps: z.ZodArray<z.ZodObject<{
12997
+ text: z.ZodString;
12998
+ status: z.ZodEnum<{
12999
+ completed: "completed";
13000
+ in_progress: "in_progress";
13001
+ pending: "pending";
13002
+ }>;
13003
+ }, z.core.$strip>>;
13004
+ }, z.core.$strip>, z.ZodObject<{
13005
+ id: z.ZodString;
13006
+ sessionId: z.ZodString;
13007
+ turnId: z.ZodNullable<z.ZodString>;
13008
+ attemptId: z.ZodNullable<z.ZodString>;
13009
+ parentItemId: z.ZodNullable<z.ZodString>;
13010
+ position: z.ZodNumber;
13011
+ status: z.ZodEnum<{
13012
+ cancelled: "cancelled";
13013
+ completed: "completed";
13014
+ failed: "failed";
13015
+ in_progress: "in_progress";
13016
+ }>;
13017
+ nativeRef: z.ZodNullable<z.ZodObject<{
13018
+ id: z.ZodString;
13019
+ strength: z.ZodEnum<{
13020
+ none: "none";
13021
+ strong: "strong";
13022
+ weak: "weak";
13023
+ }>;
13024
+ }, z.core.$strip>>;
13025
+ createdAt: z.ZodString;
13026
+ updatedAt: z.ZodString;
13027
+ startedAt: z.ZodNullable<z.ZodString>;
13028
+ endedAt: z.ZodNullable<z.ZodString>;
13029
+ kind: z.ZodLiteral<"request">;
13030
+ requestId: z.ZodString;
13031
+ }, z.core.$strip>, z.ZodObject<{
13032
+ id: z.ZodString;
13033
+ sessionId: z.ZodString;
13034
+ turnId: z.ZodNullable<z.ZodString>;
13035
+ attemptId: z.ZodNullable<z.ZodString>;
13036
+ parentItemId: z.ZodNullable<z.ZodString>;
13037
+ position: z.ZodNumber;
13038
+ status: z.ZodEnum<{
13039
+ cancelled: "cancelled";
13040
+ completed: "completed";
13041
+ failed: "failed";
13042
+ in_progress: "in_progress";
13043
+ }>;
13044
+ nativeRef: z.ZodNullable<z.ZodObject<{
13045
+ id: z.ZodString;
13046
+ strength: z.ZodEnum<{
13047
+ none: "none";
13048
+ strong: "strong";
13049
+ weak: "weak";
13050
+ }>;
13051
+ }, z.core.$strip>>;
13052
+ createdAt: z.ZodString;
13053
+ updatedAt: z.ZodString;
13054
+ startedAt: z.ZodNullable<z.ZodString>;
13055
+ endedAt: z.ZodNullable<z.ZodString>;
13056
+ kind: z.ZodLiteral<"subagent">;
13057
+ title: z.ZodString;
13058
+ agentType: z.ZodNullable<z.ZodString>;
13059
+ childSessionId: z.ZodNullable<z.ZodString>;
13060
+ result: z.ZodNullable<z.ZodString>;
13061
+ }, z.core.$strip>, z.ZodObject<{
13062
+ id: z.ZodString;
13063
+ sessionId: z.ZodString;
13064
+ turnId: z.ZodNullable<z.ZodString>;
13065
+ attemptId: z.ZodNullable<z.ZodString>;
13066
+ parentItemId: z.ZodNullable<z.ZodString>;
13067
+ position: z.ZodNumber;
13068
+ status: z.ZodEnum<{
13069
+ cancelled: "cancelled";
13070
+ completed: "completed";
13071
+ failed: "failed";
13072
+ in_progress: "in_progress";
13073
+ }>;
13074
+ nativeRef: z.ZodNullable<z.ZodObject<{
13075
+ id: z.ZodString;
13076
+ strength: z.ZodEnum<{
13077
+ none: "none";
13078
+ strong: "strong";
13079
+ weak: "weak";
13080
+ }>;
13081
+ }, z.core.$strip>>;
13082
+ createdAt: z.ZodString;
13083
+ updatedAt: z.ZodString;
13084
+ startedAt: z.ZodNullable<z.ZodString>;
13085
+ endedAt: z.ZodNullable<z.ZodString>;
13086
+ kind: z.ZodLiteral<"notice">;
13087
+ code: z.ZodString;
13088
+ text: z.ZodString;
13089
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
13090
+ }, z.core.$strip>, z.ZodObject<{
13091
+ id: z.ZodString;
13092
+ sessionId: z.ZodString;
13093
+ turnId: z.ZodNullable<z.ZodString>;
13094
+ attemptId: z.ZodNullable<z.ZodString>;
13095
+ parentItemId: z.ZodNullable<z.ZodString>;
13096
+ position: z.ZodNumber;
13097
+ status: z.ZodEnum<{
13098
+ cancelled: "cancelled";
13099
+ completed: "completed";
13100
+ failed: "failed";
13101
+ in_progress: "in_progress";
13102
+ }>;
13103
+ nativeRef: z.ZodNullable<z.ZodObject<{
13104
+ id: z.ZodString;
13105
+ strength: z.ZodEnum<{
13106
+ none: "none";
13107
+ strong: "strong";
13108
+ weak: "weak";
13109
+ }>;
13110
+ }, z.core.$strip>>;
13111
+ createdAt: z.ZodString;
13112
+ updatedAt: z.ZodString;
13113
+ startedAt: z.ZodNullable<z.ZodString>;
13114
+ endedAt: z.ZodNullable<z.ZodString>;
13115
+ kind: z.ZodLiteral<"context_handoff">;
13116
+ strategy: z.ZodEnum<{
13117
+ delta: "delta";
13118
+ full: "full";
13119
+ }>;
13120
+ fromProviderThreadIds: z.ZodArray<z.ZodString>;
13121
+ toProviderThreadId: z.ZodString;
13122
+ coveredTurnOrdinals: z.ZodObject<{
13123
+ from: z.ZodNumber;
13124
+ to: z.ZodNumber;
13125
+ }, z.core.$strip>;
13126
+ text: z.ZodString;
13127
+ }, z.core.$strip>, z.ZodObject<{
13128
+ id: z.ZodString;
13129
+ sessionId: z.ZodString;
13130
+ turnId: z.ZodNullable<z.ZodString>;
13131
+ attemptId: z.ZodNullable<z.ZodString>;
13132
+ parentItemId: z.ZodNullable<z.ZodString>;
13133
+ position: z.ZodNumber;
13134
+ status: z.ZodEnum<{
13135
+ cancelled: "cancelled";
13136
+ completed: "completed";
13137
+ failed: "failed";
13138
+ in_progress: "in_progress";
13139
+ }>;
13140
+ nativeRef: z.ZodNullable<z.ZodObject<{
13141
+ id: z.ZodString;
13142
+ strength: z.ZodEnum<{
13143
+ none: "none";
13144
+ strong: "strong";
13145
+ weak: "weak";
13146
+ }>;
13147
+ }, z.core.$strip>>;
13148
+ createdAt: z.ZodString;
13149
+ updatedAt: z.ZodString;
13150
+ startedAt: z.ZodNullable<z.ZodString>;
13151
+ endedAt: z.ZodNullable<z.ZodString>;
13152
+ kind: z.ZodLiteral<"result">;
13153
+ name: z.ZodString;
13154
+ value: z.ZodJSONSchema;
13155
+ input: z.ZodNullable<z.ZodObject<{
13156
+ itemId: z.ZodString;
13157
+ position: z.ZodNumber;
13158
+ kind: z.ZodEnum<{
13159
+ inbound_message: "inbound_message";
13160
+ task_notification: "task_notification";
13161
+ user_message: "user_message";
13162
+ }>;
13163
+ }, z.core.$strip>>;
13164
+ commit: z.ZodNullable<z.ZodString>;
13165
+ }, z.core.$strip>], "kind">;
13166
+ }, z.core.$strip>, z.ZodObject<{
13167
+ type: z.ZodLiteral<"item.changed">;
13168
+ item: z.ZodDiscriminatedUnion<[z.ZodObject<{
13169
+ id: z.ZodString;
13170
+ sessionId: z.ZodString;
13171
+ turnId: z.ZodNullable<z.ZodString>;
13172
+ attemptId: z.ZodNullable<z.ZodString>;
13173
+ parentItemId: z.ZodNullable<z.ZodString>;
13174
+ position: z.ZodNumber;
13175
+ status: z.ZodEnum<{
13176
+ cancelled: "cancelled";
13177
+ completed: "completed";
13178
+ failed: "failed";
13179
+ in_progress: "in_progress";
13180
+ }>;
13181
+ nativeRef: z.ZodNullable<z.ZodObject<{
13182
+ id: z.ZodString;
13183
+ strength: z.ZodEnum<{
13184
+ none: "none";
13185
+ strong: "strong";
13186
+ weak: "weak";
13187
+ }>;
13188
+ }, z.core.$strip>>;
13189
+ createdAt: z.ZodString;
13190
+ updatedAt: z.ZodString;
13191
+ startedAt: z.ZodNullable<z.ZodString>;
13192
+ endedAt: z.ZodNullable<z.ZodString>;
13193
+ dispatch: z.ZodEnum<{
13194
+ interrupt: "interrupt";
13195
+ message_only: "message_only";
13196
+ queue: "queue";
13197
+ steer: "steer";
13198
+ }>;
13199
+ attention: z.ZodNullable<z.ZodLiteral<"required">>;
13200
+ idempotencyKey: z.ZodNullable<z.ZodString>;
13201
+ deliveredBy: z.ZodNullable<z.ZodString>;
13202
+ causation: z.ZodArray<z.ZodString>;
13203
+ kind: z.ZodLiteral<"user_message">;
13204
+ author: z.ZodObject<{
13205
+ kind: z.ZodLiteral<"user">;
13206
+ externalUserId: z.ZodString;
13207
+ }, z.core.$strip>;
13208
+ text: z.ZodString;
13209
+ attachments: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
13210
+ kind: z.ZodEnum<{
13211
+ document: "document";
13212
+ image: "image";
13213
+ }>;
13214
+ name: z.ZodString;
13215
+ mediaType: z.ZodString;
13216
+ dataBase64: z.ZodString;
13217
+ }, z.core.$strip>, z.ZodObject<{
13218
+ kind: z.ZodLiteral<"text">;
13219
+ name: z.ZodString;
13220
+ text: z.ZodString;
13221
+ source: z.ZodUnion<readonly [z.ZodObject<{
13222
+ type: z.ZodLiteral<"paste">;
13223
+ }, z.core.$strip>, z.ZodObject<{
13224
+ type: z.ZodLiteral<"selection">;
13225
+ filePath: z.ZodString;
13226
+ startLine: z.ZodOptional<z.ZodNumber>;
13227
+ endLine: z.ZodOptional<z.ZodNumber>;
13228
+ }, z.core.$strip>, z.ZodObject<{
13229
+ type: z.ZodLiteral<"url">;
13230
+ url: z.ZodString;
13231
+ }, z.core.$strip>, z.ZodObject<{
13232
+ type: z.ZodLiteral<"path">;
13233
+ path: z.ZodString;
13234
+ }, z.core.$strip>, z.ZodObject<{
13235
+ type: z.ZodLiteral<"tab">;
13236
+ key: z.ZodString;
13237
+ kind: z.ZodString;
13238
+ title: z.ZodString;
13239
+ url: z.ZodOptional<z.ZodString>;
13240
+ filePath: z.ZodOptional<z.ZodString>;
13241
+ }, z.core.$strip>, z.ZodObject<{
13242
+ type: z.ZodLiteral<"skill">;
13243
+ name: z.ZodString;
13244
+ path: z.ZodOptional<z.ZodString>;
13245
+ }, z.core.$strip>]>;
13246
+ }, z.core.$strip>]>>;
13247
+ answer: z.ZodOptional<z.ZodObject<{
13248
+ requestId: z.ZodString;
13249
+ questions: z.ZodArray<z.ZodObject<{
13250
+ question: z.ZodString;
13251
+ header: z.ZodString;
13252
+ multiSelect: z.ZodBoolean;
13253
+ options: z.ZodArray<z.ZodObject<{
13254
+ label: z.ZodString;
13255
+ description: z.ZodString;
13256
+ }, z.core.$strip>>;
13257
+ }, z.core.$strip>>;
13258
+ answers: z.ZodArray<z.ZodString>;
13259
+ }, z.core.$strip>>;
13260
+ }, z.core.$strip>, z.ZodObject<{
13261
+ id: z.ZodString;
13262
+ sessionId: z.ZodString;
13263
+ turnId: z.ZodNullable<z.ZodString>;
13264
+ attemptId: z.ZodNullable<z.ZodString>;
13265
+ parentItemId: z.ZodNullable<z.ZodString>;
13266
+ position: z.ZodNumber;
13267
+ status: z.ZodEnum<{
13268
+ cancelled: "cancelled";
13269
+ completed: "completed";
13270
+ failed: "failed";
13271
+ in_progress: "in_progress";
13272
+ }>;
13273
+ nativeRef: z.ZodNullable<z.ZodObject<{
13274
+ id: z.ZodString;
13275
+ strength: z.ZodEnum<{
13276
+ none: "none";
13277
+ strong: "strong";
13278
+ weak: "weak";
13279
+ }>;
13280
+ }, z.core.$strip>>;
13281
+ createdAt: z.ZodString;
13282
+ updatedAt: z.ZodString;
13283
+ startedAt: z.ZodNullable<z.ZodString>;
13284
+ endedAt: z.ZodNullable<z.ZodString>;
13285
+ dispatch: z.ZodEnum<{
13286
+ interrupt: "interrupt";
13287
+ message_only: "message_only";
13288
+ queue: "queue";
13289
+ steer: "steer";
13290
+ }>;
13291
+ attention: z.ZodNullable<z.ZodLiteral<"required">>;
13292
+ idempotencyKey: z.ZodNullable<z.ZodString>;
13293
+ deliveredBy: z.ZodNullable<z.ZodString>;
13294
+ causation: z.ZodArray<z.ZodString>;
13295
+ kind: z.ZodLiteral<"inbound_message">;
13296
+ from: z.ZodUnion<readonly [z.ZodObject<{
13297
+ kind: z.ZodLiteral<"agent">;
13298
+ sessionId: z.ZodString;
13299
+ agentId: z.ZodNullable<z.ZodString>;
13300
+ projectId: z.ZodOptional<z.ZodString>;
13301
+ }, z.core.$strip>, z.ZodObject<{
13302
+ kind: z.ZodLiteral<"assistant">;
13303
+ externalUserId: z.ZodString;
13304
+ }, z.core.$strip>, z.ZodObject<{
13305
+ kind: z.ZodLiteral<"workflow">;
13306
+ runId: z.ZodString;
13307
+ workflowName: z.ZodString;
13308
+ displayName: z.ZodOptional<z.ZodString>;
13309
+ enablementId: z.ZodOptional<z.ZodString>;
13310
+ watcher: z.ZodOptional<z.ZodObject<{
13311
+ id: z.ZodString;
13312
+ sessionId: z.ZodString;
13313
+ }, z.core.$strip>>;
13314
+ scheduledFor: z.ZodOptional<z.ZodString>;
13315
+ firedAt: z.ZodOptional<z.ZodString>;
13316
+ }, z.core.$strip>]>;
13317
+ text: z.ZodString;
13318
+ attachments: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
13319
+ kind: z.ZodEnum<{
13320
+ document: "document";
13321
+ image: "image";
13322
+ }>;
13323
+ name: z.ZodString;
13324
+ mediaType: z.ZodString;
13325
+ dataBase64: z.ZodString;
13326
+ }, z.core.$strip>, z.ZodObject<{
13327
+ kind: z.ZodLiteral<"text">;
13328
+ name: z.ZodString;
13329
+ text: z.ZodString;
13330
+ source: z.ZodUnion<readonly [z.ZodObject<{
13331
+ type: z.ZodLiteral<"paste">;
13332
+ }, z.core.$strip>, z.ZodObject<{
13333
+ type: z.ZodLiteral<"selection">;
13334
+ filePath: z.ZodString;
13335
+ startLine: z.ZodOptional<z.ZodNumber>;
13336
+ endLine: z.ZodOptional<z.ZodNumber>;
13337
+ }, z.core.$strip>, z.ZodObject<{
13338
+ type: z.ZodLiteral<"url">;
13339
+ url: z.ZodString;
13340
+ }, z.core.$strip>, z.ZodObject<{
13341
+ type: z.ZodLiteral<"path">;
13342
+ path: z.ZodString;
13343
+ }, z.core.$strip>, z.ZodObject<{
13344
+ type: z.ZodLiteral<"tab">;
13345
+ key: z.ZodString;
13346
+ kind: z.ZodString;
13347
+ title: z.ZodString;
13348
+ url: z.ZodOptional<z.ZodString>;
13349
+ filePath: z.ZodOptional<z.ZodString>;
13350
+ }, z.core.$strip>, z.ZodObject<{
13351
+ type: z.ZodLiteral<"skill">;
13352
+ name: z.ZodString;
13353
+ path: z.ZodOptional<z.ZodString>;
13354
+ }, z.core.$strip>]>;
13355
+ }, z.core.$strip>]>>;
13356
+ alert: z.ZodOptional<z.ZodObject<{
13357
+ title: z.ZodOptional<z.ZodString>;
13358
+ body: z.ZodOptional<z.ZodString>;
13359
+ }, z.core.$strip>>;
13360
+ }, z.core.$strip>, z.ZodObject<{
13361
+ id: z.ZodString;
13362
+ sessionId: z.ZodString;
13363
+ turnId: z.ZodNullable<z.ZodString>;
13364
+ attemptId: z.ZodNullable<z.ZodString>;
13365
+ parentItemId: z.ZodNullable<z.ZodString>;
13366
+ position: z.ZodNumber;
13367
+ status: z.ZodEnum<{
13368
+ cancelled: "cancelled";
13369
+ completed: "completed";
13370
+ failed: "failed";
13371
+ in_progress: "in_progress";
13372
+ }>;
13373
+ nativeRef: z.ZodNullable<z.ZodObject<{
13374
+ id: z.ZodString;
13375
+ strength: z.ZodEnum<{
13376
+ none: "none";
13377
+ strong: "strong";
13378
+ weak: "weak";
13379
+ }>;
13380
+ }, z.core.$strip>>;
13381
+ createdAt: z.ZodString;
13382
+ updatedAt: z.ZodString;
13383
+ startedAt: z.ZodNullable<z.ZodString>;
13384
+ endedAt: z.ZodNullable<z.ZodString>;
13385
+ dispatch: z.ZodEnum<{
13386
+ interrupt: "interrupt";
13387
+ message_only: "message_only";
13388
+ queue: "queue";
13389
+ steer: "steer";
13390
+ }>;
13391
+ attention: z.ZodNullable<z.ZodLiteral<"required">>;
13392
+ idempotencyKey: z.ZodNullable<z.ZodString>;
13393
+ deliveredBy: z.ZodNullable<z.ZodString>;
13394
+ causation: z.ZodArray<z.ZodString>;
13395
+ kind: z.ZodLiteral<"task_notification">;
13396
+ task: z.ZodObject<{
13397
+ type: z.ZodString;
13398
+ id: z.ZodString;
13399
+ title: z.ZodString;
13400
+ status: z.ZodEnum<{
13401
+ completed: "completed";
13402
+ failed: "failed";
13403
+ needs_input: "needs_input";
13404
+ stopped: "stopped";
13405
+ update: "update";
13406
+ }>;
13407
+ }, z.core.$strip>;
13408
+ summary: z.ZodString;
13409
+ detail: z.ZodString;
13410
+ source: z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
13411
+ kind: z.ZodLiteral<"session">;
13412
+ sessionId: z.ZodString;
13413
+ projectId: z.ZodOptional<z.ZodString>;
13414
+ }, z.core.$strip>, z.ZodObject<{
13415
+ kind: z.ZodLiteral<"workflow_run">;
13416
+ runId: z.ZodString;
13417
+ workflowName: z.ZodString;
13418
+ }, z.core.$strip>, z.ZodObject<{
13419
+ kind: z.ZodLiteral<"surface">;
13420
+ key: z.ZodString;
13421
+ }, z.core.$strip>]>>;
13422
+ }, z.core.$strip>, z.ZodObject<{
13423
+ id: z.ZodString;
13424
+ sessionId: z.ZodString;
13425
+ turnId: z.ZodNullable<z.ZodString>;
13426
+ attemptId: z.ZodNullable<z.ZodString>;
13427
+ parentItemId: z.ZodNullable<z.ZodString>;
13428
+ position: z.ZodNumber;
13429
+ status: z.ZodEnum<{
13430
+ cancelled: "cancelled";
13431
+ completed: "completed";
13432
+ failed: "failed";
13433
+ in_progress: "in_progress";
13434
+ }>;
13435
+ nativeRef: z.ZodNullable<z.ZodObject<{
13436
+ id: z.ZodString;
13437
+ strength: z.ZodEnum<{
13438
+ none: "none";
13439
+ strong: "strong";
13440
+ weak: "weak";
13441
+ }>;
13442
+ }, z.core.$strip>>;
13443
+ createdAt: z.ZodString;
13444
+ updatedAt: z.ZodString;
13445
+ startedAt: z.ZodNullable<z.ZodString>;
13446
+ endedAt: z.ZodNullable<z.ZodString>;
13447
+ kind: z.ZodLiteral<"assistant_message">;
13448
+ text: z.ZodString;
13449
+ agentId: z.ZodNullable<z.ZodString>;
13450
+ }, z.core.$strip>, z.ZodObject<{
13451
+ id: z.ZodString;
13452
+ sessionId: z.ZodString;
13453
+ turnId: z.ZodNullable<z.ZodString>;
13454
+ attemptId: z.ZodNullable<z.ZodString>;
13455
+ parentItemId: z.ZodNullable<z.ZodString>;
13456
+ position: z.ZodNumber;
13457
+ status: z.ZodEnum<{
13458
+ cancelled: "cancelled";
13459
+ completed: "completed";
13460
+ failed: "failed";
13461
+ in_progress: "in_progress";
13462
+ }>;
13463
+ nativeRef: z.ZodNullable<z.ZodObject<{
13464
+ id: z.ZodString;
13465
+ strength: z.ZodEnum<{
13466
+ none: "none";
13467
+ strong: "strong";
13468
+ weak: "weak";
13469
+ }>;
13470
+ }, z.core.$strip>>;
13471
+ createdAt: z.ZodString;
13472
+ updatedAt: z.ZodString;
13473
+ startedAt: z.ZodNullable<z.ZodString>;
13474
+ endedAt: z.ZodNullable<z.ZodString>;
13475
+ kind: z.ZodLiteral<"reasoning">;
13476
+ text: z.ZodString;
13477
+ }, z.core.$strip>, z.ZodObject<{
13478
+ id: z.ZodString;
13479
+ sessionId: z.ZodString;
13480
+ turnId: z.ZodNullable<z.ZodString>;
13481
+ attemptId: z.ZodNullable<z.ZodString>;
13482
+ parentItemId: z.ZodNullable<z.ZodString>;
13483
+ position: z.ZodNumber;
13484
+ status: z.ZodEnum<{
13485
+ cancelled: "cancelled";
13486
+ completed: "completed";
13487
+ failed: "failed";
13488
+ in_progress: "in_progress";
13489
+ }>;
13490
+ nativeRef: z.ZodNullable<z.ZodObject<{
13491
+ id: z.ZodString;
13492
+ strength: z.ZodEnum<{
13493
+ none: "none";
13494
+ strong: "strong";
13495
+ weak: "weak";
13496
+ }>;
13497
+ }, z.core.$strip>>;
13498
+ createdAt: z.ZodString;
13499
+ updatedAt: z.ZodString;
13500
+ startedAt: z.ZodNullable<z.ZodString>;
13501
+ endedAt: z.ZodNullable<z.ZodString>;
13502
+ kind: z.ZodLiteral<"tool_call">;
13503
+ tool: z.ZodString;
13504
+ server: z.ZodNullable<z.ZodString>;
13505
+ description: z.ZodNullable<z.ZodString>;
13506
+ input: z.ZodJSONSchema;
13507
+ result: z.ZodNullable<z.ZodJSONSchema>;
13508
+ error: z.ZodNullable<z.ZodString>;
13509
+ }, z.core.$strip>, z.ZodObject<{
13510
+ id: z.ZodString;
13511
+ sessionId: z.ZodString;
13512
+ turnId: z.ZodNullable<z.ZodString>;
13513
+ attemptId: z.ZodNullable<z.ZodString>;
13514
+ parentItemId: z.ZodNullable<z.ZodString>;
13515
+ position: z.ZodNumber;
13516
+ status: z.ZodEnum<{
13517
+ cancelled: "cancelled";
13518
+ completed: "completed";
13519
+ failed: "failed";
13520
+ in_progress: "in_progress";
13521
+ }>;
13522
+ nativeRef: z.ZodNullable<z.ZodObject<{
13523
+ id: z.ZodString;
13524
+ strength: z.ZodEnum<{
13525
+ none: "none";
13526
+ strong: "strong";
13527
+ weak: "weak";
13528
+ }>;
13529
+ }, z.core.$strip>>;
13530
+ createdAt: z.ZodString;
13531
+ updatedAt: z.ZodString;
13532
+ startedAt: z.ZodNullable<z.ZodString>;
13533
+ endedAt: z.ZodNullable<z.ZodString>;
13534
+ kind: z.ZodLiteral<"command">;
13535
+ command: z.ZodString;
13536
+ description: z.ZodNullable<z.ZodString>;
13537
+ output: z.ZodString;
13538
+ exitCode: z.ZodNullable<z.ZodNumber>;
13539
+ }, z.core.$strip>, z.ZodObject<{
13540
+ id: z.ZodString;
13541
+ sessionId: z.ZodString;
13542
+ turnId: z.ZodNullable<z.ZodString>;
13543
+ attemptId: z.ZodNullable<z.ZodString>;
13544
+ parentItemId: z.ZodNullable<z.ZodString>;
13545
+ position: z.ZodNumber;
13546
+ status: z.ZodEnum<{
13547
+ cancelled: "cancelled";
13548
+ completed: "completed";
13549
+ failed: "failed";
13550
+ in_progress: "in_progress";
13551
+ }>;
13552
+ nativeRef: z.ZodNullable<z.ZodObject<{
13553
+ id: z.ZodString;
13554
+ strength: z.ZodEnum<{
13555
+ none: "none";
13556
+ strong: "strong";
13557
+ weak: "weak";
13558
+ }>;
13559
+ }, z.core.$strip>>;
13560
+ createdAt: z.ZodString;
13561
+ updatedAt: z.ZodString;
13562
+ startedAt: z.ZodNullable<z.ZodString>;
13563
+ endedAt: z.ZodNullable<z.ZodString>;
13564
+ kind: z.ZodLiteral<"file_change">;
13565
+ path: z.ZodString;
13566
+ change: z.ZodNullable<z.ZodEnum<{
13567
+ created: "created";
13568
+ deleted: "deleted";
13569
+ modified: "modified";
13570
+ renamed: "renamed";
13571
+ }>>;
13572
+ previousPath: z.ZodNullable<z.ZodString>;
13573
+ }, z.core.$strip>, z.ZodObject<{
13574
+ id: z.ZodString;
13575
+ sessionId: z.ZodString;
13576
+ turnId: z.ZodNullable<z.ZodString>;
13577
+ attemptId: z.ZodNullable<z.ZodString>;
13578
+ parentItemId: z.ZodNullable<z.ZodString>;
13579
+ position: z.ZodNumber;
13580
+ status: z.ZodEnum<{
13581
+ cancelled: "cancelled";
13582
+ completed: "completed";
13583
+ failed: "failed";
13584
+ in_progress: "in_progress";
13585
+ }>;
13586
+ nativeRef: z.ZodNullable<z.ZodObject<{
13587
+ id: z.ZodString;
13588
+ strength: z.ZodEnum<{
13589
+ none: "none";
13590
+ strong: "strong";
13591
+ weak: "weak";
13592
+ }>;
13593
+ }, z.core.$strip>>;
13594
+ createdAt: z.ZodString;
13595
+ updatedAt: z.ZodString;
13596
+ startedAt: z.ZodNullable<z.ZodString>;
13597
+ endedAt: z.ZodNullable<z.ZodString>;
13598
+ kind: z.ZodLiteral<"plan">;
13599
+ steps: z.ZodArray<z.ZodObject<{
13600
+ text: z.ZodString;
13601
+ status: z.ZodEnum<{
13602
+ completed: "completed";
13603
+ in_progress: "in_progress";
13604
+ pending: "pending";
13605
+ }>;
13606
+ }, z.core.$strip>>;
13607
+ }, z.core.$strip>, z.ZodObject<{
13608
+ id: z.ZodString;
13609
+ sessionId: z.ZodString;
13610
+ turnId: z.ZodNullable<z.ZodString>;
13611
+ attemptId: z.ZodNullable<z.ZodString>;
13612
+ parentItemId: z.ZodNullable<z.ZodString>;
13613
+ position: z.ZodNumber;
13614
+ status: z.ZodEnum<{
13615
+ cancelled: "cancelled";
13616
+ completed: "completed";
13617
+ failed: "failed";
13618
+ in_progress: "in_progress";
13619
+ }>;
13620
+ nativeRef: z.ZodNullable<z.ZodObject<{
13621
+ id: z.ZodString;
13622
+ strength: z.ZodEnum<{
13623
+ none: "none";
13624
+ strong: "strong";
13625
+ weak: "weak";
13626
+ }>;
13627
+ }, z.core.$strip>>;
13628
+ createdAt: z.ZodString;
13629
+ updatedAt: z.ZodString;
13630
+ startedAt: z.ZodNullable<z.ZodString>;
13631
+ endedAt: z.ZodNullable<z.ZodString>;
13632
+ kind: z.ZodLiteral<"request">;
13633
+ requestId: z.ZodString;
13634
+ }, z.core.$strip>, z.ZodObject<{
13635
+ id: z.ZodString;
13636
+ sessionId: z.ZodString;
13637
+ turnId: z.ZodNullable<z.ZodString>;
13638
+ attemptId: z.ZodNullable<z.ZodString>;
13639
+ parentItemId: z.ZodNullable<z.ZodString>;
13640
+ position: z.ZodNumber;
13641
+ status: z.ZodEnum<{
13642
+ cancelled: "cancelled";
13643
+ completed: "completed";
13644
+ failed: "failed";
13645
+ in_progress: "in_progress";
13646
+ }>;
13647
+ nativeRef: z.ZodNullable<z.ZodObject<{
13648
+ id: z.ZodString;
13649
+ strength: z.ZodEnum<{
13650
+ none: "none";
13651
+ strong: "strong";
13652
+ weak: "weak";
13653
+ }>;
13654
+ }, z.core.$strip>>;
13655
+ createdAt: z.ZodString;
13656
+ updatedAt: z.ZodString;
13657
+ startedAt: z.ZodNullable<z.ZodString>;
13658
+ endedAt: z.ZodNullable<z.ZodString>;
13659
+ kind: z.ZodLiteral<"subagent">;
13660
+ title: z.ZodString;
13661
+ agentType: z.ZodNullable<z.ZodString>;
13662
+ childSessionId: z.ZodNullable<z.ZodString>;
13663
+ result: z.ZodNullable<z.ZodString>;
13664
+ }, z.core.$strip>, z.ZodObject<{
13665
+ id: z.ZodString;
13666
+ sessionId: z.ZodString;
13667
+ turnId: z.ZodNullable<z.ZodString>;
13668
+ attemptId: z.ZodNullable<z.ZodString>;
13669
+ parentItemId: z.ZodNullable<z.ZodString>;
13670
+ position: z.ZodNumber;
13671
+ status: z.ZodEnum<{
13672
+ cancelled: "cancelled";
13673
+ completed: "completed";
13674
+ failed: "failed";
13675
+ in_progress: "in_progress";
13676
+ }>;
13677
+ nativeRef: z.ZodNullable<z.ZodObject<{
13678
+ id: z.ZodString;
13679
+ strength: z.ZodEnum<{
13680
+ none: "none";
13681
+ strong: "strong";
13682
+ weak: "weak";
13683
+ }>;
13684
+ }, z.core.$strip>>;
13685
+ createdAt: z.ZodString;
13686
+ updatedAt: z.ZodString;
13687
+ startedAt: z.ZodNullable<z.ZodString>;
13688
+ endedAt: z.ZodNullable<z.ZodString>;
13689
+ kind: z.ZodLiteral<"notice">;
13690
+ code: z.ZodString;
13691
+ text: z.ZodString;
13692
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
13693
+ }, z.core.$strip>, z.ZodObject<{
13694
+ id: z.ZodString;
13695
+ sessionId: z.ZodString;
13696
+ turnId: z.ZodNullable<z.ZodString>;
13697
+ attemptId: z.ZodNullable<z.ZodString>;
13698
+ parentItemId: z.ZodNullable<z.ZodString>;
13699
+ position: z.ZodNumber;
13700
+ status: z.ZodEnum<{
13701
+ cancelled: "cancelled";
13702
+ completed: "completed";
13703
+ failed: "failed";
13704
+ in_progress: "in_progress";
13705
+ }>;
13706
+ nativeRef: z.ZodNullable<z.ZodObject<{
13707
+ id: z.ZodString;
13708
+ strength: z.ZodEnum<{
13709
+ none: "none";
13710
+ strong: "strong";
13711
+ weak: "weak";
13712
+ }>;
13713
+ }, z.core.$strip>>;
13714
+ createdAt: z.ZodString;
13715
+ updatedAt: z.ZodString;
13716
+ startedAt: z.ZodNullable<z.ZodString>;
13717
+ endedAt: z.ZodNullable<z.ZodString>;
13718
+ kind: z.ZodLiteral<"context_handoff">;
13719
+ strategy: z.ZodEnum<{
13720
+ delta: "delta";
13721
+ full: "full";
13722
+ }>;
13723
+ fromProviderThreadIds: z.ZodArray<z.ZodString>;
13724
+ toProviderThreadId: z.ZodString;
13725
+ coveredTurnOrdinals: z.ZodObject<{
13726
+ from: z.ZodNumber;
13727
+ to: z.ZodNumber;
13728
+ }, z.core.$strip>;
13729
+ text: z.ZodString;
13730
+ }, z.core.$strip>, z.ZodObject<{
13731
+ id: z.ZodString;
13732
+ sessionId: z.ZodString;
13733
+ turnId: z.ZodNullable<z.ZodString>;
13734
+ attemptId: z.ZodNullable<z.ZodString>;
13735
+ parentItemId: z.ZodNullable<z.ZodString>;
13736
+ position: z.ZodNumber;
13737
+ status: z.ZodEnum<{
13738
+ cancelled: "cancelled";
13739
+ completed: "completed";
13740
+ failed: "failed";
13741
+ in_progress: "in_progress";
13742
+ }>;
13743
+ nativeRef: z.ZodNullable<z.ZodObject<{
13744
+ id: z.ZodString;
13745
+ strength: z.ZodEnum<{
13746
+ none: "none";
13747
+ strong: "strong";
13748
+ weak: "weak";
13749
+ }>;
13750
+ }, z.core.$strip>>;
13751
+ createdAt: z.ZodString;
13752
+ updatedAt: z.ZodString;
13753
+ startedAt: z.ZodNullable<z.ZodString>;
13754
+ endedAt: z.ZodNullable<z.ZodString>;
13755
+ kind: z.ZodLiteral<"result">;
13756
+ name: z.ZodString;
13757
+ value: z.ZodJSONSchema;
13758
+ input: z.ZodNullable<z.ZodObject<{
13759
+ itemId: z.ZodString;
13760
+ position: z.ZodNumber;
13761
+ kind: z.ZodEnum<{
13762
+ inbound_message: "inbound_message";
13763
+ task_notification: "task_notification";
13764
+ user_message: "user_message";
13765
+ }>;
13766
+ }, z.core.$strip>>;
13767
+ commit: z.ZodNullable<z.ZodString>;
13768
+ }, z.core.$strip>], "kind">;
13769
+ }, z.core.$strip>, z.ZodObject<{
13770
+ type: z.ZodLiteral<"item.text_appended">;
13771
+ itemId: z.ZodString;
13772
+ field: z.ZodEnum<{
13773
+ output: "output";
13774
+ text: "text";
13775
+ }>;
13776
+ text: z.ZodString;
13777
+ at: z.ZodString;
13778
+ }, z.core.$strip>, z.ZodObject<{
13779
+ type: z.ZodLiteral<"request.changed">;
13780
+ request: z.ZodObject<{
13781
+ id: z.ZodString;
13782
+ sessionId: z.ZodString;
13783
+ turnId: z.ZodNullable<z.ZodString>;
13784
+ attemptId: z.ZodNullable<z.ZodString>;
13785
+ itemId: z.ZodNullable<z.ZodString>;
13786
+ kind: z.ZodEnum<{
13787
+ approval: "approval";
13788
+ elicitation: "elicitation";
13789
+ question: "question";
13790
+ }>;
13791
+ status: z.ZodEnum<{
13792
+ cancelled: "cancelled";
13793
+ expired: "expired";
13794
+ pending: "pending";
13795
+ resolved: "resolved";
13796
+ }>;
13797
+ answerable: z.ZodBoolean;
13798
+ blocking: z.ZodBoolean;
13799
+ title: z.ZodString;
13800
+ description: z.ZodNullable<z.ZodString>;
13801
+ origin: z.ZodObject<{
13802
+ kind: z.ZodEnum<{
13803
+ host: "host";
13804
+ mcp: "mcp";
13805
+ provider: "provider";
13806
+ tool: "tool";
13807
+ }>;
13808
+ id: z.ZodString;
13809
+ displayName: z.ZodOptional<z.ZodString>;
13810
+ }, z.core.$strip>;
13811
+ questions: z.ZodNullable<z.ZodArray<z.ZodObject<{
13812
+ question: z.ZodString;
13813
+ header: z.ZodString;
13814
+ multiSelect: z.ZodBoolean;
13815
+ options: z.ZodArray<z.ZodObject<{
13816
+ label: z.ZodString;
13817
+ description: z.ZodString;
13818
+ }, z.core.$strip>>;
13819
+ }, z.core.$strip>>>;
13820
+ approval: z.ZodNullable<z.ZodObject<{
13821
+ action: z.ZodString;
13822
+ details: z.ZodOptional<z.ZodString>;
13823
+ tool: z.ZodOptional<z.ZodObject<{
13824
+ server: z.ZodNullable<z.ZodString>;
13825
+ name: z.ZodString;
13826
+ input: z.ZodJSONSchema;
13827
+ }, z.core.$strip>>;
13828
+ }, z.core.$strip>>;
13829
+ elicitation: z.ZodNullable<z.ZodObject<{
13830
+ server: z.ZodString;
13831
+ message: z.ZodString;
13832
+ schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
13833
+ url: z.ZodOptional<z.ZodString>;
13834
+ }, z.core.$strip>>;
13835
+ approvers: z.ZodArray<z.ZodString>;
13836
+ expiresAt: z.ZodNullable<z.ZodString>;
13837
+ response: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
13838
+ kind: z.ZodLiteral<"approval">;
13839
+ decision: z.ZodEnum<{
13840
+ approved: "approved";
13841
+ denied: "denied";
13842
+ }>;
13843
+ remember: z.ZodOptional<z.ZodLiteral<"always">>;
13844
+ reason: z.ZodOptional<z.ZodString>;
13845
+ }, z.core.$strip>, z.ZodObject<{
13846
+ kind: z.ZodLiteral<"question">;
13847
+ answers: z.ZodArray<z.ZodString>;
13848
+ attachments: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
13849
+ kind: z.ZodEnum<{
13850
+ document: "document";
13851
+ image: "image";
13852
+ }>;
13853
+ name: z.ZodString;
13854
+ mediaType: z.ZodString;
13855
+ dataBase64: z.ZodString;
13856
+ }, z.core.$strip>, z.ZodObject<{
13857
+ kind: z.ZodLiteral<"text">;
13858
+ name: z.ZodString;
13859
+ text: z.ZodString;
13860
+ source: z.ZodUnion<readonly [z.ZodObject<{
13861
+ type: z.ZodLiteral<"paste">;
13862
+ }, z.core.$strip>, z.ZodObject<{
13863
+ type: z.ZodLiteral<"selection">;
13864
+ filePath: z.ZodString;
13865
+ startLine: z.ZodOptional<z.ZodNumber>;
13866
+ endLine: z.ZodOptional<z.ZodNumber>;
13867
+ }, z.core.$strip>, z.ZodObject<{
13868
+ type: z.ZodLiteral<"url">;
13869
+ url: z.ZodString;
13870
+ }, z.core.$strip>, z.ZodObject<{
13871
+ type: z.ZodLiteral<"path">;
13872
+ path: z.ZodString;
13873
+ }, z.core.$strip>, z.ZodObject<{
13874
+ type: z.ZodLiteral<"tab">;
13875
+ key: z.ZodString;
13876
+ kind: z.ZodString;
13877
+ title: z.ZodString;
13878
+ url: z.ZodOptional<z.ZodString>;
13879
+ filePath: z.ZodOptional<z.ZodString>;
13880
+ }, z.core.$strip>, z.ZodObject<{
13881
+ type: z.ZodLiteral<"skill">;
13882
+ name: z.ZodString;
13883
+ path: z.ZodOptional<z.ZodString>;
13884
+ }, z.core.$strip>]>;
13885
+ }, z.core.$strip>]>>>>;
13886
+ }, z.core.$strip>, z.ZodObject<{
13887
+ kind: z.ZodLiteral<"elicitation">;
13888
+ action: z.ZodEnum<{
13889
+ accept: "accept";
13890
+ cancel: "cancel";
13891
+ decline: "decline";
13892
+ }>;
13893
+ content: z.ZodOptional<z.ZodJSONSchema>;
13894
+ }, z.core.$strip>], "kind">>;
13895
+ resolvedBy: z.ZodNullable<z.ZodString>;
13896
+ reason: z.ZodNullable<z.ZodString>;
13897
+ createdAt: z.ZodString;
13898
+ resolvedAt: z.ZodNullable<z.ZodString>;
13899
+ runnerKey: z.ZodOptional<z.ZodString>;
13900
+ }, z.core.$strip>;
13901
+ }, z.core.$strip>, z.ZodObject<{
13902
+ type: z.ZodLiteral<"provider_thread.changed">;
13903
+ thread: z.ZodObject<{
13904
+ id: z.ZodString;
13905
+ sessionId: z.ZodString;
13906
+ harness: z.ZodString;
13907
+ nativeRef: z.ZodNullable<z.ZodObject<{
13908
+ id: z.ZodString;
13909
+ strength: z.ZodEnum<{
13910
+ none: "none";
13911
+ strong: "strong";
13912
+ weak: "weak";
13913
+ }>;
13914
+ }, z.core.$strip>>;
13915
+ status: z.ZodEnum<{
13916
+ active: "active";
13917
+ closed: "closed";
13918
+ unavailable: "unavailable";
13919
+ }>;
13920
+ lastTurnOrdinal: z.ZodNullable<z.ZodNumber>;
13921
+ portable: z.ZodBoolean;
13922
+ createdAt: z.ZodString;
13923
+ updatedAt: z.ZodString;
13924
+ }, z.core.$strip>;
13925
+ }, z.core.$strip>], "type">;
13926
+ }, z.core.$strip>>;
13927
+ }, z.core.$strip>, z.ZodObject<{
13928
+ type: z.ZodLiteral<"reset">;
13929
+ snapshot: z.ZodObject<{
13930
+ sequence: z.ZodNumber;
13931
+ session: z.ZodObject<{
13932
+ id: z.ZodString;
13933
+ projectId: z.ZodString;
13934
+ title: z.ZodNullable<z.ZodString>;
13935
+ icon: z.ZodNullable<z.ZodString>;
13936
+ agentId: z.ZodNullable<z.ZodString>;
13937
+ harness: z.ZodNullable<z.ZodString>;
13938
+ model: z.ZodNullable<z.ZodString>;
13939
+ modelEffort: z.ZodNullable<z.ZodEnum<{
13940
+ high: "high";
13941
+ low: "low";
13942
+ max: "max";
13943
+ medium: "medium";
13944
+ xhigh: "xhigh";
13945
+ }>>;
13946
+ status: z.ZodEnum<{
13947
+ active: "active";
13948
+ closed: "closed";
13949
+ }>;
13950
+ workStatus: z.ZodEnum<{
13951
+ completed: "completed";
13952
+ open: "open";
13953
+ }>;
13954
+ activity: z.ZodNullable<z.ZodString>;
13955
+ todos: z.ZodArray<z.ZodObject<{
13956
+ id: z.ZodString;
13957
+ title: z.ZodString;
13958
+ description: z.ZodString;
13959
+ status: z.ZodEnum<{
13960
+ completed: "completed";
13961
+ in_progress: "in_progress";
13962
+ pending: "pending";
13963
+ }>;
13964
+ activeForm: z.ZodOptional<z.ZodString>;
13965
+ }, z.core.$strip>>;
13966
+ metadata: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
13967
+ imported: z.ZodOptional<z.ZodNullable<z.ZodObject<{
13968
+ harness: z.ZodEnum<{
13969
+ "claude-code": "claude-code";
13970
+ codex: "codex";
13971
+ }>;
13972
+ nativeSessionId: z.ZodString;
13973
+ sourcePath: z.ZodString;
13974
+ contentSha256: z.ZodString;
13975
+ sourceModifiedAt: z.ZodString;
13976
+ }, z.core.$strip>>>;
13977
+ parentSessionId: z.ZodNullable<z.ZodString>;
13978
+ forkedFromSessionId: z.ZodNullable<z.ZodString>;
13979
+ attentionRevision: z.ZodNumber;
13980
+ environment: z.ZodNullable<z.ZodString>;
13981
+ authorityHostId: z.ZodString;
13982
+ authorityRevision: z.ZodNumber;
13983
+ handoffStatus: z.ZodEnum<{
13984
+ none: "none";
13985
+ pending: "pending";
13986
+ }>;
13987
+ updatedAt: z.ZodString;
13988
+ }, z.core.$strip>;
13989
+ turns: z.ZodArray<z.ZodObject<{
13990
+ id: z.ZodString;
13991
+ sessionId: z.ZodString;
13992
+ ordinal: z.ZodNumber;
13993
+ status: z.ZodEnum<{
13994
+ cancelled: "cancelled";
13995
+ completed: "completed";
13996
+ failed: "failed";
13997
+ finalizing: "finalizing";
13998
+ held: "held";
13999
+ interrupted: "interrupted";
14000
+ preparing: "preparing";
14001
+ queued: "queued";
14002
+ rolled_back: "rolled_back";
14003
+ running: "running";
14004
+ waiting: "waiting";
14005
+ }>;
14006
+ inputItemId: z.ZodNullable<z.ZodString>;
14007
+ dispatch: z.ZodEnum<{
14008
+ interrupt: "interrupt";
14009
+ queue: "queue";
14010
+ }>;
14011
+ priority: z.ZodNumber;
14012
+ activity: z.ZodNullable<z.ZodString>;
14013
+ activityAt: z.ZodNullable<z.ZodString>;
14014
+ providerRetry: z.ZodNullable<z.ZodObject<{
14015
+ error: z.ZodObject<{
14016
+ message: z.ZodString;
14017
+ kind: z.ZodOptional<z.ZodEnum<{
14018
+ agent_missing: "agent_missing";
14019
+ auth: "auth";
14020
+ model_incompat: "model_incompat";
14021
+ out_of_disk: "out_of_disk";
14022
+ rate_limit: "rate_limit";
14023
+ unavailable: "unavailable";
14024
+ }>>;
14025
+ }, z.core.$strip>;
14026
+ attempt: z.ZodNullable<z.ZodNumber>;
14027
+ maxAttempts: z.ZodNullable<z.ZodNumber>;
14028
+ retryAt: z.ZodNullable<z.ZodString>;
14029
+ }, z.core.$strip>>;
14030
+ attemptCount: z.ZodNumber;
14031
+ activeAttemptId: z.ZodNullable<z.ZodString>;
14032
+ providerThreadId: z.ZodNullable<z.ZodString>;
14033
+ retryAt: z.ZodNullable<z.ZodString>;
14034
+ cancellationRequested: z.ZodBoolean;
14035
+ error: z.ZodNullable<z.ZodObject<{
14036
+ message: z.ZodString;
14037
+ kind: z.ZodOptional<z.ZodEnum<{
14038
+ agent_missing: "agent_missing";
14039
+ auth: "auth";
14040
+ model_incompat: "model_incompat";
14041
+ out_of_disk: "out_of_disk";
14042
+ rate_limit: "rate_limit";
14043
+ unavailable: "unavailable";
14044
+ }>>;
14045
+ retrySafe: z.ZodOptional<z.ZodBoolean>;
14046
+ }, z.core.$strip>>;
14047
+ outcome: z.ZodNullable<z.ZodObject<{
14048
+ changedFiles: z.ZodArray<z.ZodObject<{
14049
+ path: z.ZodString;
14050
+ kind: z.ZodEnum<{
14051
+ deleted: "deleted";
14052
+ modified: "modified";
14053
+ }>;
14054
+ }, z.core.$strip>>;
14055
+ usage: z.ZodOptional<z.ZodObject<{
14056
+ model: z.ZodOptional<z.ZodString>;
14057
+ inputTokens: z.ZodOptional<z.ZodNumber>;
14058
+ cachedInputTokens: z.ZodOptional<z.ZodNumber>;
14059
+ cacheCreationTokens: z.ZodOptional<z.ZodNumber>;
14060
+ outputTokens: z.ZodOptional<z.ZodNumber>;
14061
+ reasoningTokens: z.ZodOptional<z.ZodNumber>;
14062
+ costUsd: z.ZodOptional<z.ZodNumber>;
14063
+ contextTokens: z.ZodOptional<z.ZodNumber>;
14064
+ contextWindow: z.ZodOptional<z.ZodNumber>;
14065
+ }, z.core.$strip>>;
14066
+ workspaceSync: z.ZodOptional<z.ZodObject<{
14067
+ error: z.ZodString;
14068
+ }, z.core.$strip>>;
14069
+ notification: z.ZodOptional<z.ZodObject<{
14070
+ title: z.ZodOptional<z.ZodString>;
14071
+ body: z.ZodOptional<z.ZodString>;
14072
+ }, z.core.$strip>>;
14073
+ }, z.core.$strip>>;
14074
+ checkpoint: z.ZodObject<{
14075
+ before: z.ZodNullable<z.ZodString>;
14076
+ after: z.ZodNullable<z.ZodString>;
14077
+ }, z.core.$strip>;
14078
+ continuationOf: z.ZodNullable<z.ZodString>;
14079
+ createdAt: z.ZodString;
14080
+ startedAt: z.ZodNullable<z.ZodString>;
14081
+ completedAt: z.ZodNullable<z.ZodString>;
14082
+ updatedAt: z.ZodString;
14083
+ }, z.core.$strip>>;
14084
+ attempts: z.ZodArray<z.ZodObject<{
14085
+ id: z.ZodString;
14086
+ turnId: z.ZodString;
14087
+ sessionId: z.ZodString;
14088
+ ordinal: z.ZodNumber;
14089
+ reason: z.ZodEnum<{
14090
+ initial: "initial";
14091
+ recovery: "recovery";
14092
+ restart: "restart";
14093
+ retry: "retry";
14094
+ steer_restart: "steer_restart";
14095
+ }>;
14096
+ status: z.ZodEnum<{
14097
+ completed: "completed";
14098
+ failed: "failed";
14099
+ interrupted: "interrupted";
14100
+ lost: "lost";
14101
+ preparing: "preparing";
14102
+ restarted: "restarted";
14103
+ running: "running";
14104
+ superseded: "superseded";
14105
+ }>;
14106
+ providerThreadId: z.ZodNullable<z.ZodString>;
14107
+ nativeTurnRef: z.ZodNullable<z.ZodObject<{
14108
+ id: z.ZodString;
14109
+ strength: z.ZodEnum<{
14110
+ none: "none";
14111
+ strong: "strong";
14112
+ weak: "weak";
14113
+ }>;
14114
+ }, z.core.$strip>>;
14115
+ error: z.ZodNullable<z.ZodObject<{
14116
+ message: z.ZodString;
14117
+ kind: z.ZodOptional<z.ZodEnum<{
14118
+ agent_missing: "agent_missing";
14119
+ auth: "auth";
14120
+ model_incompat: "model_incompat";
14121
+ out_of_disk: "out_of_disk";
14122
+ rate_limit: "rate_limit";
14123
+ unavailable: "unavailable";
14124
+ }>>;
14125
+ retrySafe: z.ZodOptional<z.ZodBoolean>;
14126
+ }, z.core.$strip>>;
14127
+ createdAt: z.ZodString;
14128
+ startedAt: z.ZodNullable<z.ZodString>;
14129
+ completedAt: z.ZodNullable<z.ZodString>;
14130
+ }, z.core.$strip>>;
14131
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
14132
+ id: z.ZodString;
14133
+ sessionId: z.ZodString;
14134
+ turnId: z.ZodNullable<z.ZodString>;
14135
+ attemptId: z.ZodNullable<z.ZodString>;
14136
+ parentItemId: z.ZodNullable<z.ZodString>;
14137
+ position: z.ZodNumber;
14138
+ status: z.ZodEnum<{
14139
+ cancelled: "cancelled";
14140
+ completed: "completed";
14141
+ failed: "failed";
14142
+ in_progress: "in_progress";
14143
+ }>;
14144
+ nativeRef: z.ZodNullable<z.ZodObject<{
14145
+ id: z.ZodString;
14146
+ strength: z.ZodEnum<{
14147
+ none: "none";
14148
+ strong: "strong";
14149
+ weak: "weak";
14150
+ }>;
14151
+ }, z.core.$strip>>;
14152
+ createdAt: z.ZodString;
14153
+ updatedAt: z.ZodString;
14154
+ startedAt: z.ZodNullable<z.ZodString>;
14155
+ endedAt: z.ZodNullable<z.ZodString>;
14156
+ dispatch: z.ZodEnum<{
14157
+ interrupt: "interrupt";
14158
+ message_only: "message_only";
14159
+ queue: "queue";
14160
+ steer: "steer";
14161
+ }>;
14162
+ attention: z.ZodNullable<z.ZodLiteral<"required">>;
14163
+ idempotencyKey: z.ZodNullable<z.ZodString>;
14164
+ deliveredBy: z.ZodNullable<z.ZodString>;
14165
+ causation: z.ZodArray<z.ZodString>;
14166
+ kind: z.ZodLiteral<"user_message">;
14167
+ author: z.ZodObject<{
14168
+ kind: z.ZodLiteral<"user">;
14169
+ externalUserId: z.ZodString;
14170
+ }, z.core.$strip>;
14171
+ text: z.ZodString;
14172
+ attachments: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
14173
+ kind: z.ZodEnum<{
14174
+ document: "document";
14175
+ image: "image";
14176
+ }>;
14177
+ name: z.ZodString;
14178
+ mediaType: z.ZodString;
14179
+ dataBase64: z.ZodString;
14180
+ }, z.core.$strip>, z.ZodObject<{
14181
+ kind: z.ZodLiteral<"text">;
14182
+ name: z.ZodString;
14183
+ text: z.ZodString;
14184
+ source: z.ZodUnion<readonly [z.ZodObject<{
14185
+ type: z.ZodLiteral<"paste">;
14186
+ }, z.core.$strip>, z.ZodObject<{
14187
+ type: z.ZodLiteral<"selection">;
14188
+ filePath: z.ZodString;
14189
+ startLine: z.ZodOptional<z.ZodNumber>;
14190
+ endLine: z.ZodOptional<z.ZodNumber>;
14191
+ }, z.core.$strip>, z.ZodObject<{
14192
+ type: z.ZodLiteral<"url">;
14193
+ url: z.ZodString;
14194
+ }, z.core.$strip>, z.ZodObject<{
14195
+ type: z.ZodLiteral<"path">;
14196
+ path: z.ZodString;
14197
+ }, z.core.$strip>, z.ZodObject<{
14198
+ type: z.ZodLiteral<"tab">;
14199
+ key: z.ZodString;
14200
+ kind: z.ZodString;
14201
+ title: z.ZodString;
14202
+ url: z.ZodOptional<z.ZodString>;
14203
+ filePath: z.ZodOptional<z.ZodString>;
14204
+ }, z.core.$strip>, z.ZodObject<{
14205
+ type: z.ZodLiteral<"skill">;
14206
+ name: z.ZodString;
14207
+ path: z.ZodOptional<z.ZodString>;
14208
+ }, z.core.$strip>]>;
14209
+ }, z.core.$strip>]>>;
14210
+ answer: z.ZodOptional<z.ZodObject<{
14211
+ requestId: z.ZodString;
14212
+ questions: z.ZodArray<z.ZodObject<{
14213
+ question: z.ZodString;
14214
+ header: z.ZodString;
14215
+ multiSelect: z.ZodBoolean;
14216
+ options: z.ZodArray<z.ZodObject<{
14217
+ label: z.ZodString;
14218
+ description: z.ZodString;
14219
+ }, z.core.$strip>>;
14220
+ }, z.core.$strip>>;
14221
+ answers: z.ZodArray<z.ZodString>;
14222
+ }, z.core.$strip>>;
14223
+ }, z.core.$strip>, z.ZodObject<{
14224
+ id: z.ZodString;
14225
+ sessionId: z.ZodString;
14226
+ turnId: z.ZodNullable<z.ZodString>;
14227
+ attemptId: z.ZodNullable<z.ZodString>;
14228
+ parentItemId: z.ZodNullable<z.ZodString>;
14229
+ position: z.ZodNumber;
14230
+ status: z.ZodEnum<{
14231
+ cancelled: "cancelled";
14232
+ completed: "completed";
14233
+ failed: "failed";
14234
+ in_progress: "in_progress";
14235
+ }>;
14236
+ nativeRef: z.ZodNullable<z.ZodObject<{
14237
+ id: z.ZodString;
14238
+ strength: z.ZodEnum<{
14239
+ none: "none";
14240
+ strong: "strong";
14241
+ weak: "weak";
14242
+ }>;
14243
+ }, z.core.$strip>>;
14244
+ createdAt: z.ZodString;
14245
+ updatedAt: z.ZodString;
14246
+ startedAt: z.ZodNullable<z.ZodString>;
14247
+ endedAt: z.ZodNullable<z.ZodString>;
14248
+ dispatch: z.ZodEnum<{
14249
+ interrupt: "interrupt";
14250
+ message_only: "message_only";
14251
+ queue: "queue";
14252
+ steer: "steer";
14253
+ }>;
14254
+ attention: z.ZodNullable<z.ZodLiteral<"required">>;
14255
+ idempotencyKey: z.ZodNullable<z.ZodString>;
14256
+ deliveredBy: z.ZodNullable<z.ZodString>;
14257
+ causation: z.ZodArray<z.ZodString>;
14258
+ kind: z.ZodLiteral<"inbound_message">;
14259
+ from: z.ZodUnion<readonly [z.ZodObject<{
14260
+ kind: z.ZodLiteral<"agent">;
14261
+ sessionId: z.ZodString;
14262
+ agentId: z.ZodNullable<z.ZodString>;
14263
+ projectId: z.ZodOptional<z.ZodString>;
14264
+ }, z.core.$strip>, z.ZodObject<{
14265
+ kind: z.ZodLiteral<"assistant">;
14266
+ externalUserId: z.ZodString;
14267
+ }, z.core.$strip>, z.ZodObject<{
14268
+ kind: z.ZodLiteral<"workflow">;
14269
+ runId: z.ZodString;
14270
+ workflowName: z.ZodString;
14271
+ displayName: z.ZodOptional<z.ZodString>;
14272
+ enablementId: z.ZodOptional<z.ZodString>;
14273
+ watcher: z.ZodOptional<z.ZodObject<{
14274
+ id: z.ZodString;
14275
+ sessionId: z.ZodString;
14276
+ }, z.core.$strip>>;
14277
+ scheduledFor: z.ZodOptional<z.ZodString>;
14278
+ firedAt: z.ZodOptional<z.ZodString>;
14279
+ }, z.core.$strip>]>;
14280
+ text: z.ZodString;
14281
+ attachments: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
14282
+ kind: z.ZodEnum<{
14283
+ document: "document";
14284
+ image: "image";
14285
+ }>;
14286
+ name: z.ZodString;
14287
+ mediaType: z.ZodString;
14288
+ dataBase64: z.ZodString;
14289
+ }, z.core.$strip>, z.ZodObject<{
14290
+ kind: z.ZodLiteral<"text">;
14291
+ name: z.ZodString;
14292
+ text: z.ZodString;
14293
+ source: z.ZodUnion<readonly [z.ZodObject<{
14294
+ type: z.ZodLiteral<"paste">;
14295
+ }, z.core.$strip>, z.ZodObject<{
14296
+ type: z.ZodLiteral<"selection">;
14297
+ filePath: z.ZodString;
14298
+ startLine: z.ZodOptional<z.ZodNumber>;
14299
+ endLine: z.ZodOptional<z.ZodNumber>;
14300
+ }, z.core.$strip>, z.ZodObject<{
14301
+ type: z.ZodLiteral<"url">;
14302
+ url: z.ZodString;
14303
+ }, z.core.$strip>, z.ZodObject<{
14304
+ type: z.ZodLiteral<"path">;
14305
+ path: z.ZodString;
14306
+ }, z.core.$strip>, z.ZodObject<{
14307
+ type: z.ZodLiteral<"tab">;
14308
+ key: z.ZodString;
14309
+ kind: z.ZodString;
14310
+ title: z.ZodString;
14311
+ url: z.ZodOptional<z.ZodString>;
14312
+ filePath: z.ZodOptional<z.ZodString>;
14313
+ }, z.core.$strip>, z.ZodObject<{
14314
+ type: z.ZodLiteral<"skill">;
14315
+ name: z.ZodString;
14316
+ path: z.ZodOptional<z.ZodString>;
14317
+ }, z.core.$strip>]>;
14318
+ }, z.core.$strip>]>>;
14319
+ alert: z.ZodOptional<z.ZodObject<{
14320
+ title: z.ZodOptional<z.ZodString>;
14321
+ body: z.ZodOptional<z.ZodString>;
14322
+ }, z.core.$strip>>;
14323
+ }, z.core.$strip>, z.ZodObject<{
14324
+ id: z.ZodString;
14325
+ sessionId: z.ZodString;
14326
+ turnId: z.ZodNullable<z.ZodString>;
14327
+ attemptId: z.ZodNullable<z.ZodString>;
14328
+ parentItemId: z.ZodNullable<z.ZodString>;
14329
+ position: z.ZodNumber;
14330
+ status: z.ZodEnum<{
14331
+ cancelled: "cancelled";
14332
+ completed: "completed";
14333
+ failed: "failed";
14334
+ in_progress: "in_progress";
14335
+ }>;
14336
+ nativeRef: z.ZodNullable<z.ZodObject<{
14337
+ id: z.ZodString;
14338
+ strength: z.ZodEnum<{
14339
+ none: "none";
14340
+ strong: "strong";
14341
+ weak: "weak";
14342
+ }>;
14343
+ }, z.core.$strip>>;
14344
+ createdAt: z.ZodString;
14345
+ updatedAt: z.ZodString;
14346
+ startedAt: z.ZodNullable<z.ZodString>;
14347
+ endedAt: z.ZodNullable<z.ZodString>;
14348
+ dispatch: z.ZodEnum<{
14349
+ interrupt: "interrupt";
14350
+ message_only: "message_only";
14351
+ queue: "queue";
14352
+ steer: "steer";
14353
+ }>;
14354
+ attention: z.ZodNullable<z.ZodLiteral<"required">>;
14355
+ idempotencyKey: z.ZodNullable<z.ZodString>;
14356
+ deliveredBy: z.ZodNullable<z.ZodString>;
14357
+ causation: z.ZodArray<z.ZodString>;
14358
+ kind: z.ZodLiteral<"task_notification">;
14359
+ task: z.ZodObject<{
14360
+ type: z.ZodString;
14361
+ id: z.ZodString;
14362
+ title: z.ZodString;
14363
+ status: z.ZodEnum<{
14364
+ completed: "completed";
14365
+ failed: "failed";
14366
+ needs_input: "needs_input";
14367
+ stopped: "stopped";
14368
+ update: "update";
14369
+ }>;
14370
+ }, z.core.$strip>;
14371
+ summary: z.ZodString;
14372
+ detail: z.ZodString;
14373
+ source: z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
14374
+ kind: z.ZodLiteral<"session">;
14375
+ sessionId: z.ZodString;
14376
+ projectId: z.ZodOptional<z.ZodString>;
14377
+ }, z.core.$strip>, z.ZodObject<{
14378
+ kind: z.ZodLiteral<"workflow_run">;
14379
+ runId: z.ZodString;
14380
+ workflowName: z.ZodString;
14381
+ }, z.core.$strip>, z.ZodObject<{
14382
+ kind: z.ZodLiteral<"surface">;
14383
+ key: z.ZodString;
14384
+ }, z.core.$strip>]>>;
14385
+ }, z.core.$strip>, z.ZodObject<{
14386
+ id: z.ZodString;
14387
+ sessionId: z.ZodString;
14388
+ turnId: z.ZodNullable<z.ZodString>;
14389
+ attemptId: z.ZodNullable<z.ZodString>;
14390
+ parentItemId: z.ZodNullable<z.ZodString>;
14391
+ position: z.ZodNumber;
14392
+ status: z.ZodEnum<{
14393
+ cancelled: "cancelled";
14394
+ completed: "completed";
14395
+ failed: "failed";
14396
+ in_progress: "in_progress";
14397
+ }>;
14398
+ nativeRef: z.ZodNullable<z.ZodObject<{
14399
+ id: z.ZodString;
14400
+ strength: z.ZodEnum<{
14401
+ none: "none";
14402
+ strong: "strong";
14403
+ weak: "weak";
14404
+ }>;
14405
+ }, z.core.$strip>>;
14406
+ createdAt: z.ZodString;
14407
+ updatedAt: z.ZodString;
14408
+ startedAt: z.ZodNullable<z.ZodString>;
14409
+ endedAt: z.ZodNullable<z.ZodString>;
14410
+ kind: z.ZodLiteral<"assistant_message">;
14411
+ text: z.ZodString;
14412
+ agentId: z.ZodNullable<z.ZodString>;
14413
+ }, z.core.$strip>, z.ZodObject<{
14414
+ id: z.ZodString;
14415
+ sessionId: z.ZodString;
14416
+ turnId: z.ZodNullable<z.ZodString>;
14417
+ attemptId: z.ZodNullable<z.ZodString>;
14418
+ parentItemId: z.ZodNullable<z.ZodString>;
14419
+ position: z.ZodNumber;
14420
+ status: z.ZodEnum<{
14421
+ cancelled: "cancelled";
14422
+ completed: "completed";
14423
+ failed: "failed";
14424
+ in_progress: "in_progress";
14425
+ }>;
14426
+ nativeRef: z.ZodNullable<z.ZodObject<{
14427
+ id: z.ZodString;
14428
+ strength: z.ZodEnum<{
14429
+ none: "none";
14430
+ strong: "strong";
14431
+ weak: "weak";
14432
+ }>;
14433
+ }, z.core.$strip>>;
14434
+ createdAt: z.ZodString;
14435
+ updatedAt: z.ZodString;
14436
+ startedAt: z.ZodNullable<z.ZodString>;
14437
+ endedAt: z.ZodNullable<z.ZodString>;
14438
+ kind: z.ZodLiteral<"reasoning">;
14439
+ text: z.ZodString;
14440
+ }, z.core.$strip>, z.ZodObject<{
14441
+ id: z.ZodString;
14442
+ sessionId: z.ZodString;
14443
+ turnId: z.ZodNullable<z.ZodString>;
14444
+ attemptId: z.ZodNullable<z.ZodString>;
14445
+ parentItemId: z.ZodNullable<z.ZodString>;
14446
+ position: z.ZodNumber;
14447
+ status: z.ZodEnum<{
14448
+ cancelled: "cancelled";
14449
+ completed: "completed";
14450
+ failed: "failed";
14451
+ in_progress: "in_progress";
14452
+ }>;
14453
+ nativeRef: z.ZodNullable<z.ZodObject<{
14454
+ id: z.ZodString;
14455
+ strength: z.ZodEnum<{
14456
+ none: "none";
14457
+ strong: "strong";
14458
+ weak: "weak";
14459
+ }>;
14460
+ }, z.core.$strip>>;
14461
+ createdAt: z.ZodString;
14462
+ updatedAt: z.ZodString;
14463
+ startedAt: z.ZodNullable<z.ZodString>;
14464
+ endedAt: z.ZodNullable<z.ZodString>;
14465
+ kind: z.ZodLiteral<"tool_call">;
14466
+ tool: z.ZodString;
14467
+ server: z.ZodNullable<z.ZodString>;
14468
+ description: z.ZodNullable<z.ZodString>;
14469
+ input: z.ZodJSONSchema;
14470
+ result: z.ZodNullable<z.ZodJSONSchema>;
14471
+ error: z.ZodNullable<z.ZodString>;
14472
+ }, z.core.$strip>, z.ZodObject<{
14473
+ id: z.ZodString;
14474
+ sessionId: z.ZodString;
14475
+ turnId: z.ZodNullable<z.ZodString>;
14476
+ attemptId: z.ZodNullable<z.ZodString>;
14477
+ parentItemId: z.ZodNullable<z.ZodString>;
14478
+ position: z.ZodNumber;
14479
+ status: z.ZodEnum<{
14480
+ cancelled: "cancelled";
14481
+ completed: "completed";
14482
+ failed: "failed";
14483
+ in_progress: "in_progress";
14484
+ }>;
14485
+ nativeRef: z.ZodNullable<z.ZodObject<{
14486
+ id: z.ZodString;
14487
+ strength: z.ZodEnum<{
14488
+ none: "none";
14489
+ strong: "strong";
14490
+ weak: "weak";
14491
+ }>;
14492
+ }, z.core.$strip>>;
14493
+ createdAt: z.ZodString;
14494
+ updatedAt: z.ZodString;
14495
+ startedAt: z.ZodNullable<z.ZodString>;
14496
+ endedAt: z.ZodNullable<z.ZodString>;
14497
+ kind: z.ZodLiteral<"command">;
14498
+ command: z.ZodString;
14499
+ description: z.ZodNullable<z.ZodString>;
14500
+ output: z.ZodString;
14501
+ exitCode: z.ZodNullable<z.ZodNumber>;
14502
+ }, z.core.$strip>, z.ZodObject<{
14503
+ id: z.ZodString;
14504
+ sessionId: z.ZodString;
14505
+ turnId: z.ZodNullable<z.ZodString>;
14506
+ attemptId: z.ZodNullable<z.ZodString>;
14507
+ parentItemId: z.ZodNullable<z.ZodString>;
14508
+ position: z.ZodNumber;
14509
+ status: z.ZodEnum<{
14510
+ cancelled: "cancelled";
14511
+ completed: "completed";
14512
+ failed: "failed";
14513
+ in_progress: "in_progress";
14514
+ }>;
14515
+ nativeRef: z.ZodNullable<z.ZodObject<{
14516
+ id: z.ZodString;
14517
+ strength: z.ZodEnum<{
14518
+ none: "none";
14519
+ strong: "strong";
14520
+ weak: "weak";
14521
+ }>;
14522
+ }, z.core.$strip>>;
14523
+ createdAt: z.ZodString;
14524
+ updatedAt: z.ZodString;
14525
+ startedAt: z.ZodNullable<z.ZodString>;
14526
+ endedAt: z.ZodNullable<z.ZodString>;
14527
+ kind: z.ZodLiteral<"file_change">;
14528
+ path: z.ZodString;
14529
+ change: z.ZodNullable<z.ZodEnum<{
14530
+ created: "created";
14531
+ deleted: "deleted";
14532
+ modified: "modified";
14533
+ renamed: "renamed";
14534
+ }>>;
14535
+ previousPath: z.ZodNullable<z.ZodString>;
14536
+ }, z.core.$strip>, z.ZodObject<{
14537
+ id: z.ZodString;
14538
+ sessionId: z.ZodString;
14539
+ turnId: z.ZodNullable<z.ZodString>;
14540
+ attemptId: z.ZodNullable<z.ZodString>;
14541
+ parentItemId: z.ZodNullable<z.ZodString>;
14542
+ position: z.ZodNumber;
14543
+ status: z.ZodEnum<{
14544
+ cancelled: "cancelled";
14545
+ completed: "completed";
14546
+ failed: "failed";
14547
+ in_progress: "in_progress";
14548
+ }>;
14549
+ nativeRef: z.ZodNullable<z.ZodObject<{
14550
+ id: z.ZodString;
14551
+ strength: z.ZodEnum<{
14552
+ none: "none";
14553
+ strong: "strong";
14554
+ weak: "weak";
14555
+ }>;
14556
+ }, z.core.$strip>>;
14557
+ createdAt: z.ZodString;
14558
+ updatedAt: z.ZodString;
14559
+ startedAt: z.ZodNullable<z.ZodString>;
14560
+ endedAt: z.ZodNullable<z.ZodString>;
14561
+ kind: z.ZodLiteral<"plan">;
14562
+ steps: z.ZodArray<z.ZodObject<{
14563
+ text: z.ZodString;
14564
+ status: z.ZodEnum<{
14565
+ completed: "completed";
14566
+ in_progress: "in_progress";
14567
+ pending: "pending";
14568
+ }>;
14569
+ }, z.core.$strip>>;
14570
+ }, z.core.$strip>, z.ZodObject<{
14571
+ id: z.ZodString;
14572
+ sessionId: z.ZodString;
14573
+ turnId: z.ZodNullable<z.ZodString>;
14574
+ attemptId: z.ZodNullable<z.ZodString>;
14575
+ parentItemId: z.ZodNullable<z.ZodString>;
14576
+ position: z.ZodNumber;
14577
+ status: z.ZodEnum<{
14578
+ cancelled: "cancelled";
14579
+ completed: "completed";
14580
+ failed: "failed";
14581
+ in_progress: "in_progress";
14582
+ }>;
14583
+ nativeRef: z.ZodNullable<z.ZodObject<{
14584
+ id: z.ZodString;
14585
+ strength: z.ZodEnum<{
14586
+ none: "none";
14587
+ strong: "strong";
14588
+ weak: "weak";
14589
+ }>;
14590
+ }, z.core.$strip>>;
14591
+ createdAt: z.ZodString;
14592
+ updatedAt: z.ZodString;
14593
+ startedAt: z.ZodNullable<z.ZodString>;
14594
+ endedAt: z.ZodNullable<z.ZodString>;
14595
+ kind: z.ZodLiteral<"request">;
14596
+ requestId: z.ZodString;
14597
+ }, z.core.$strip>, z.ZodObject<{
14598
+ id: z.ZodString;
14599
+ sessionId: z.ZodString;
14600
+ turnId: z.ZodNullable<z.ZodString>;
14601
+ attemptId: z.ZodNullable<z.ZodString>;
14602
+ parentItemId: z.ZodNullable<z.ZodString>;
14603
+ position: z.ZodNumber;
14604
+ status: z.ZodEnum<{
14605
+ cancelled: "cancelled";
14606
+ completed: "completed";
14607
+ failed: "failed";
14608
+ in_progress: "in_progress";
14609
+ }>;
14610
+ nativeRef: z.ZodNullable<z.ZodObject<{
14611
+ id: z.ZodString;
14612
+ strength: z.ZodEnum<{
14613
+ none: "none";
14614
+ strong: "strong";
14615
+ weak: "weak";
14616
+ }>;
14617
+ }, z.core.$strip>>;
14618
+ createdAt: z.ZodString;
14619
+ updatedAt: z.ZodString;
14620
+ startedAt: z.ZodNullable<z.ZodString>;
14621
+ endedAt: z.ZodNullable<z.ZodString>;
14622
+ kind: z.ZodLiteral<"subagent">;
14623
+ title: z.ZodString;
14624
+ agentType: z.ZodNullable<z.ZodString>;
14625
+ childSessionId: z.ZodNullable<z.ZodString>;
14626
+ result: z.ZodNullable<z.ZodString>;
14627
+ }, z.core.$strip>, z.ZodObject<{
14628
+ id: z.ZodString;
14629
+ sessionId: z.ZodString;
14630
+ turnId: z.ZodNullable<z.ZodString>;
14631
+ attemptId: z.ZodNullable<z.ZodString>;
14632
+ parentItemId: z.ZodNullable<z.ZodString>;
14633
+ position: z.ZodNumber;
14634
+ status: z.ZodEnum<{
14635
+ cancelled: "cancelled";
14636
+ completed: "completed";
14637
+ failed: "failed";
14638
+ in_progress: "in_progress";
14639
+ }>;
14640
+ nativeRef: z.ZodNullable<z.ZodObject<{
14641
+ id: z.ZodString;
14642
+ strength: z.ZodEnum<{
14643
+ none: "none";
14644
+ strong: "strong";
14645
+ weak: "weak";
14646
+ }>;
14647
+ }, z.core.$strip>>;
14648
+ createdAt: z.ZodString;
14649
+ updatedAt: z.ZodString;
14650
+ startedAt: z.ZodNullable<z.ZodString>;
14651
+ endedAt: z.ZodNullable<z.ZodString>;
14652
+ kind: z.ZodLiteral<"notice">;
14653
+ code: z.ZodString;
14654
+ text: z.ZodString;
14655
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
14656
+ }, z.core.$strip>, z.ZodObject<{
14657
+ id: z.ZodString;
14658
+ sessionId: z.ZodString;
14659
+ turnId: z.ZodNullable<z.ZodString>;
14660
+ attemptId: z.ZodNullable<z.ZodString>;
14661
+ parentItemId: z.ZodNullable<z.ZodString>;
14662
+ position: z.ZodNumber;
14663
+ status: z.ZodEnum<{
14664
+ cancelled: "cancelled";
14665
+ completed: "completed";
14666
+ failed: "failed";
14667
+ in_progress: "in_progress";
14668
+ }>;
14669
+ nativeRef: z.ZodNullable<z.ZodObject<{
14670
+ id: z.ZodString;
14671
+ strength: z.ZodEnum<{
14672
+ none: "none";
14673
+ strong: "strong";
14674
+ weak: "weak";
14675
+ }>;
14676
+ }, z.core.$strip>>;
14677
+ createdAt: z.ZodString;
14678
+ updatedAt: z.ZodString;
14679
+ startedAt: z.ZodNullable<z.ZodString>;
14680
+ endedAt: z.ZodNullable<z.ZodString>;
14681
+ kind: z.ZodLiteral<"context_handoff">;
14682
+ strategy: z.ZodEnum<{
14683
+ delta: "delta";
14684
+ full: "full";
14685
+ }>;
14686
+ fromProviderThreadIds: z.ZodArray<z.ZodString>;
14687
+ toProviderThreadId: z.ZodString;
14688
+ coveredTurnOrdinals: z.ZodObject<{
14689
+ from: z.ZodNumber;
14690
+ to: z.ZodNumber;
14691
+ }, z.core.$strip>;
14692
+ text: z.ZodString;
14693
+ }, z.core.$strip>, z.ZodObject<{
14694
+ id: z.ZodString;
14695
+ sessionId: z.ZodString;
14696
+ turnId: z.ZodNullable<z.ZodString>;
14697
+ attemptId: z.ZodNullable<z.ZodString>;
14698
+ parentItemId: z.ZodNullable<z.ZodString>;
14699
+ position: z.ZodNumber;
14700
+ status: z.ZodEnum<{
14701
+ cancelled: "cancelled";
14702
+ completed: "completed";
14703
+ failed: "failed";
14704
+ in_progress: "in_progress";
14705
+ }>;
14706
+ nativeRef: z.ZodNullable<z.ZodObject<{
14707
+ id: z.ZodString;
14708
+ strength: z.ZodEnum<{
14709
+ none: "none";
14710
+ strong: "strong";
14711
+ weak: "weak";
14712
+ }>;
14713
+ }, z.core.$strip>>;
14714
+ createdAt: z.ZodString;
14715
+ updatedAt: z.ZodString;
14716
+ startedAt: z.ZodNullable<z.ZodString>;
14717
+ endedAt: z.ZodNullable<z.ZodString>;
14718
+ kind: z.ZodLiteral<"result">;
14719
+ name: z.ZodString;
14720
+ value: z.ZodJSONSchema;
14721
+ input: z.ZodNullable<z.ZodObject<{
14722
+ itemId: z.ZodString;
14723
+ position: z.ZodNumber;
14724
+ kind: z.ZodEnum<{
14725
+ inbound_message: "inbound_message";
14726
+ task_notification: "task_notification";
14727
+ user_message: "user_message";
14728
+ }>;
14729
+ }, z.core.$strip>>;
14730
+ commit: z.ZodNullable<z.ZodString>;
14731
+ }, z.core.$strip>], "kind">>;
14732
+ requests: z.ZodArray<z.ZodObject<{
14733
+ id: z.ZodString;
14734
+ sessionId: z.ZodString;
14735
+ turnId: z.ZodNullable<z.ZodString>;
14736
+ attemptId: z.ZodNullable<z.ZodString>;
14737
+ itemId: z.ZodNullable<z.ZodString>;
14738
+ kind: z.ZodEnum<{
14739
+ approval: "approval";
14740
+ elicitation: "elicitation";
14741
+ question: "question";
14742
+ }>;
14743
+ status: z.ZodEnum<{
14744
+ cancelled: "cancelled";
14745
+ expired: "expired";
14746
+ pending: "pending";
14747
+ resolved: "resolved";
14748
+ }>;
14749
+ answerable: z.ZodBoolean;
14750
+ blocking: z.ZodBoolean;
14751
+ title: z.ZodString;
14752
+ description: z.ZodNullable<z.ZodString>;
14753
+ origin: z.ZodObject<{
14754
+ kind: z.ZodEnum<{
14755
+ host: "host";
14756
+ mcp: "mcp";
14757
+ provider: "provider";
14758
+ tool: "tool";
14759
+ }>;
14760
+ id: z.ZodString;
14761
+ displayName: z.ZodOptional<z.ZodString>;
14762
+ }, z.core.$strip>;
14763
+ questions: z.ZodNullable<z.ZodArray<z.ZodObject<{
14764
+ question: z.ZodString;
14765
+ header: z.ZodString;
14766
+ multiSelect: z.ZodBoolean;
14767
+ options: z.ZodArray<z.ZodObject<{
14768
+ label: z.ZodString;
14769
+ description: z.ZodString;
14770
+ }, z.core.$strip>>;
14771
+ }, z.core.$strip>>>;
14772
+ approval: z.ZodNullable<z.ZodObject<{
14773
+ action: z.ZodString;
14774
+ details: z.ZodOptional<z.ZodString>;
14775
+ tool: z.ZodOptional<z.ZodObject<{
14776
+ server: z.ZodNullable<z.ZodString>;
14777
+ name: z.ZodString;
14778
+ input: z.ZodJSONSchema;
14779
+ }, z.core.$strip>>;
14780
+ }, z.core.$strip>>;
14781
+ elicitation: z.ZodNullable<z.ZodObject<{
14782
+ server: z.ZodString;
14783
+ message: z.ZodString;
14784
+ schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
14785
+ url: z.ZodOptional<z.ZodString>;
14786
+ }, z.core.$strip>>;
14787
+ approvers: z.ZodArray<z.ZodString>;
14788
+ expiresAt: z.ZodNullable<z.ZodString>;
14789
+ response: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
14790
+ kind: z.ZodLiteral<"approval">;
14791
+ decision: z.ZodEnum<{
14792
+ approved: "approved";
14793
+ denied: "denied";
14794
+ }>;
14795
+ remember: z.ZodOptional<z.ZodLiteral<"always">>;
14796
+ reason: z.ZodOptional<z.ZodString>;
14797
+ }, z.core.$strip>, z.ZodObject<{
14798
+ kind: z.ZodLiteral<"question">;
14799
+ answers: z.ZodArray<z.ZodString>;
14800
+ attachments: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
14801
+ kind: z.ZodEnum<{
14802
+ document: "document";
14803
+ image: "image";
14804
+ }>;
14805
+ name: z.ZodString;
14806
+ mediaType: z.ZodString;
14807
+ dataBase64: z.ZodString;
14808
+ }, z.core.$strip>, z.ZodObject<{
14809
+ kind: z.ZodLiteral<"text">;
14810
+ name: z.ZodString;
14811
+ text: z.ZodString;
14812
+ source: z.ZodUnion<readonly [z.ZodObject<{
14813
+ type: z.ZodLiteral<"paste">;
14814
+ }, z.core.$strip>, z.ZodObject<{
14815
+ type: z.ZodLiteral<"selection">;
14816
+ filePath: z.ZodString;
14817
+ startLine: z.ZodOptional<z.ZodNumber>;
14818
+ endLine: z.ZodOptional<z.ZodNumber>;
14819
+ }, z.core.$strip>, z.ZodObject<{
14820
+ type: z.ZodLiteral<"url">;
14821
+ url: z.ZodString;
14822
+ }, z.core.$strip>, z.ZodObject<{
14823
+ type: z.ZodLiteral<"path">;
14824
+ path: z.ZodString;
14825
+ }, z.core.$strip>, z.ZodObject<{
14826
+ type: z.ZodLiteral<"tab">;
14827
+ key: z.ZodString;
14828
+ kind: z.ZodString;
14829
+ title: z.ZodString;
14830
+ url: z.ZodOptional<z.ZodString>;
14831
+ filePath: z.ZodOptional<z.ZodString>;
14832
+ }, z.core.$strip>, z.ZodObject<{
14833
+ type: z.ZodLiteral<"skill">;
14834
+ name: z.ZodString;
14835
+ path: z.ZodOptional<z.ZodString>;
14836
+ }, z.core.$strip>]>;
14837
+ }, z.core.$strip>]>>>>;
14838
+ }, z.core.$strip>, z.ZodObject<{
14839
+ kind: z.ZodLiteral<"elicitation">;
14840
+ action: z.ZodEnum<{
14841
+ accept: "accept";
14842
+ cancel: "cancel";
14843
+ decline: "decline";
14844
+ }>;
14845
+ content: z.ZodOptional<z.ZodJSONSchema>;
14846
+ }, z.core.$strip>], "kind">>;
14847
+ resolvedBy: z.ZodNullable<z.ZodString>;
14848
+ reason: z.ZodNullable<z.ZodString>;
14849
+ createdAt: z.ZodString;
14850
+ resolvedAt: z.ZodNullable<z.ZodString>;
14851
+ runnerKey: z.ZodOptional<z.ZodString>;
14852
+ }, z.core.$strip>>;
14853
+ providerThreads: z.ZodArray<z.ZodObject<{
14854
+ id: z.ZodString;
14855
+ sessionId: z.ZodString;
14856
+ harness: z.ZodString;
14857
+ nativeRef: z.ZodNullable<z.ZodObject<{
14858
+ id: z.ZodString;
14859
+ strength: z.ZodEnum<{
14860
+ none: "none";
14861
+ strong: "strong";
14862
+ weak: "weak";
14863
+ }>;
14864
+ }, z.core.$strip>>;
14865
+ status: z.ZodEnum<{
14866
+ active: "active";
14867
+ closed: "closed";
14868
+ unavailable: "unavailable";
14869
+ }>;
14870
+ lastTurnOrdinal: z.ZodNullable<z.ZodNumber>;
14871
+ portable: z.ZodBoolean;
14872
+ createdAt: z.ZodString;
14873
+ updatedAt: z.ZodString;
14874
+ }, z.core.$strip>>;
14875
+ olderBefore: z.ZodNullable<z.ZodNumber>;
14876
+ }, z.core.$strip>;
14877
+ }, z.core.$strip>, z.ZodObject<{
14878
+ type: z.ZodLiteral<"heartbeat">;
14879
+ sequence: z.ZodNumber;
14880
+ }, z.core.$strip>], "type">>;
11462
14881
  }, z.core.$strip>;
11463
14882
  export declare const SessionMirrorQuerySchema: z.ZodObject<{
11464
14883
  after: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
@@ -11587,8 +15006,10 @@ export declare const MirrorAgentSessionSchema: z.ZodObject<{
11587
15006
  error: z.ZodObject<{
11588
15007
  message: z.ZodString;
11589
15008
  kind: z.ZodOptional<z.ZodEnum<{
15009
+ agent_missing: "agent_missing";
11590
15010
  auth: "auth";
11591
15011
  model_incompat: "model_incompat";
15012
+ out_of_disk: "out_of_disk";
11592
15013
  rate_limit: "rate_limit";
11593
15014
  unavailable: "unavailable";
11594
15015
  }>>;
@@ -11605,8 +15026,10 @@ export declare const MirrorAgentSessionSchema: z.ZodObject<{
11605
15026
  error: z.ZodNullable<z.ZodObject<{
11606
15027
  message: z.ZodString;
11607
15028
  kind: z.ZodOptional<z.ZodEnum<{
15029
+ agent_missing: "agent_missing";
11608
15030
  auth: "auth";
11609
15031
  model_incompat: "model_incompat";
15032
+ out_of_disk: "out_of_disk";
11610
15033
  rate_limit: "rate_limit";
11611
15034
  unavailable: "unavailable";
11612
15035
  }>>;
@@ -11631,7 +15054,6 @@ export declare const MirrorAgentSessionSchema: z.ZodObject<{
11631
15054
  contextTokens: z.ZodOptional<z.ZodNumber>;
11632
15055
  contextWindow: z.ZodOptional<z.ZodNumber>;
11633
15056
  }, z.core.$strip>>;
11634
- storeSync: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
11635
15057
  workspaceSync: z.ZodOptional<z.ZodObject<{
11636
15058
  error: z.ZodString;
11637
15059
  }, z.core.$strip>>;
@@ -11658,6 +15080,7 @@ export declare const MirrorAgentSessionSchema: z.ZodObject<{
11658
15080
  reason: z.ZodEnum<{
11659
15081
  initial: "initial";
11660
15082
  recovery: "recovery";
15083
+ restart: "restart";
11661
15084
  retry: "retry";
11662
15085
  steer_restart: "steer_restart";
11663
15086
  }>;
@@ -11667,6 +15090,7 @@ export declare const MirrorAgentSessionSchema: z.ZodObject<{
11667
15090
  interrupted: "interrupted";
11668
15091
  lost: "lost";
11669
15092
  preparing: "preparing";
15093
+ restarted: "restarted";
11670
15094
  running: "running";
11671
15095
  superseded: "superseded";
11672
15096
  }>;
@@ -11682,8 +15106,10 @@ export declare const MirrorAgentSessionSchema: z.ZodObject<{
11682
15106
  error: z.ZodNullable<z.ZodObject<{
11683
15107
  message: z.ZodString;
11684
15108
  kind: z.ZodOptional<z.ZodEnum<{
15109
+ agent_missing: "agent_missing";
11685
15110
  auth: "auth";
11686
15111
  model_incompat: "model_incompat";
15112
+ out_of_disk: "out_of_disk";
11687
15113
  rate_limit: "rate_limit";
11688
15114
  unavailable: "unavailable";
11689
15115
  }>>;
@@ -12255,6 +15681,44 @@ export declare const MirrorAgentSessionSchema: z.ZodObject<{
12255
15681
  to: z.ZodNumber;
12256
15682
  }, z.core.$strip>;
12257
15683
  text: z.ZodString;
15684
+ }, z.core.$strip>, z.ZodObject<{
15685
+ id: z.ZodString;
15686
+ sessionId: z.ZodString;
15687
+ turnId: z.ZodNullable<z.ZodString>;
15688
+ attemptId: z.ZodNullable<z.ZodString>;
15689
+ parentItemId: z.ZodNullable<z.ZodString>;
15690
+ position: z.ZodNumber;
15691
+ status: z.ZodEnum<{
15692
+ cancelled: "cancelled";
15693
+ completed: "completed";
15694
+ failed: "failed";
15695
+ in_progress: "in_progress";
15696
+ }>;
15697
+ nativeRef: z.ZodNullable<z.ZodObject<{
15698
+ id: z.ZodString;
15699
+ strength: z.ZodEnum<{
15700
+ none: "none";
15701
+ strong: "strong";
15702
+ weak: "weak";
15703
+ }>;
15704
+ }, z.core.$strip>>;
15705
+ createdAt: z.ZodString;
15706
+ updatedAt: z.ZodString;
15707
+ startedAt: z.ZodNullable<z.ZodString>;
15708
+ endedAt: z.ZodNullable<z.ZodString>;
15709
+ kind: z.ZodLiteral<"result">;
15710
+ name: z.ZodString;
15711
+ value: z.ZodJSONSchema;
15712
+ input: z.ZodNullable<z.ZodObject<{
15713
+ itemId: z.ZodString;
15714
+ position: z.ZodNumber;
15715
+ kind: z.ZodEnum<{
15716
+ inbound_message: "inbound_message";
15717
+ task_notification: "task_notification";
15718
+ user_message: "user_message";
15719
+ }>;
15720
+ }, z.core.$strip>>;
15721
+ commit: z.ZodNullable<z.ZodString>;
12258
15722
  }, z.core.$strip>], "kind">>;
12259
15723
  requests: z.ZodArray<z.ZodObject<{
12260
15724
  id: z.ZodString;
@@ -12497,8 +15961,10 @@ export declare const MirrorAgentSessionSchema: z.ZodObject<{
12497
15961
  error: z.ZodObject<{
12498
15962
  message: z.ZodString;
12499
15963
  kind: z.ZodOptional<z.ZodEnum<{
15964
+ agent_missing: "agent_missing";
12500
15965
  auth: "auth";
12501
15966
  model_incompat: "model_incompat";
15967
+ out_of_disk: "out_of_disk";
12502
15968
  rate_limit: "rate_limit";
12503
15969
  unavailable: "unavailable";
12504
15970
  }>>;
@@ -12515,8 +15981,10 @@ export declare const MirrorAgentSessionSchema: z.ZodObject<{
12515
15981
  error: z.ZodNullable<z.ZodObject<{
12516
15982
  message: z.ZodString;
12517
15983
  kind: z.ZodOptional<z.ZodEnum<{
15984
+ agent_missing: "agent_missing";
12518
15985
  auth: "auth";
12519
15986
  model_incompat: "model_incompat";
15987
+ out_of_disk: "out_of_disk";
12520
15988
  rate_limit: "rate_limit";
12521
15989
  unavailable: "unavailable";
12522
15990
  }>>;
@@ -12541,7 +16009,6 @@ export declare const MirrorAgentSessionSchema: z.ZodObject<{
12541
16009
  contextTokens: z.ZodOptional<z.ZodNumber>;
12542
16010
  contextWindow: z.ZodOptional<z.ZodNumber>;
12543
16011
  }, z.core.$strip>>;
12544
- storeSync: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
12545
16012
  workspaceSync: z.ZodOptional<z.ZodObject<{
12546
16013
  error: z.ZodString;
12547
16014
  }, z.core.$strip>>;
@@ -12570,6 +16037,7 @@ export declare const MirrorAgentSessionSchema: z.ZodObject<{
12570
16037
  reason: z.ZodEnum<{
12571
16038
  initial: "initial";
12572
16039
  recovery: "recovery";
16040
+ restart: "restart";
12573
16041
  retry: "retry";
12574
16042
  steer_restart: "steer_restart";
12575
16043
  }>;
@@ -12579,6 +16047,7 @@ export declare const MirrorAgentSessionSchema: z.ZodObject<{
12579
16047
  interrupted: "interrupted";
12580
16048
  lost: "lost";
12581
16049
  preparing: "preparing";
16050
+ restarted: "restarted";
12582
16051
  running: "running";
12583
16052
  superseded: "superseded";
12584
16053
  }>;
@@ -12594,8 +16063,10 @@ export declare const MirrorAgentSessionSchema: z.ZodObject<{
12594
16063
  error: z.ZodNullable<z.ZodObject<{
12595
16064
  message: z.ZodString;
12596
16065
  kind: z.ZodOptional<z.ZodEnum<{
16066
+ agent_missing: "agent_missing";
12597
16067
  auth: "auth";
12598
16068
  model_incompat: "model_incompat";
16069
+ out_of_disk: "out_of_disk";
12599
16070
  rate_limit: "rate_limit";
12600
16071
  unavailable: "unavailable";
12601
16072
  }>>;
@@ -13169,6 +16640,44 @@ export declare const MirrorAgentSessionSchema: z.ZodObject<{
13169
16640
  to: z.ZodNumber;
13170
16641
  }, z.core.$strip>;
13171
16642
  text: z.ZodString;
16643
+ }, z.core.$strip>, z.ZodObject<{
16644
+ id: z.ZodString;
16645
+ sessionId: z.ZodString;
16646
+ turnId: z.ZodNullable<z.ZodString>;
16647
+ attemptId: z.ZodNullable<z.ZodString>;
16648
+ parentItemId: z.ZodNullable<z.ZodString>;
16649
+ position: z.ZodNumber;
16650
+ status: z.ZodEnum<{
16651
+ cancelled: "cancelled";
16652
+ completed: "completed";
16653
+ failed: "failed";
16654
+ in_progress: "in_progress";
16655
+ }>;
16656
+ nativeRef: z.ZodNullable<z.ZodObject<{
16657
+ id: z.ZodString;
16658
+ strength: z.ZodEnum<{
16659
+ none: "none";
16660
+ strong: "strong";
16661
+ weak: "weak";
16662
+ }>;
16663
+ }, z.core.$strip>>;
16664
+ createdAt: z.ZodString;
16665
+ updatedAt: z.ZodString;
16666
+ startedAt: z.ZodNullable<z.ZodString>;
16667
+ endedAt: z.ZodNullable<z.ZodString>;
16668
+ kind: z.ZodLiteral<"result">;
16669
+ name: z.ZodString;
16670
+ value: z.ZodJSONSchema;
16671
+ input: z.ZodNullable<z.ZodObject<{
16672
+ itemId: z.ZodString;
16673
+ position: z.ZodNumber;
16674
+ kind: z.ZodEnum<{
16675
+ inbound_message: "inbound_message";
16676
+ task_notification: "task_notification";
16677
+ user_message: "user_message";
16678
+ }>;
16679
+ }, z.core.$strip>>;
16680
+ commit: z.ZodNullable<z.ZodString>;
13172
16681
  }, z.core.$strip>], "kind">;
13173
16682
  }, z.core.$strip>, z.ZodObject<{
13174
16683
  type: z.ZodLiteral<"item.changed">;
@@ -13734,6 +17243,44 @@ export declare const MirrorAgentSessionSchema: z.ZodObject<{
13734
17243
  to: z.ZodNumber;
13735
17244
  }, z.core.$strip>;
13736
17245
  text: z.ZodString;
17246
+ }, z.core.$strip>, z.ZodObject<{
17247
+ id: z.ZodString;
17248
+ sessionId: z.ZodString;
17249
+ turnId: z.ZodNullable<z.ZodString>;
17250
+ attemptId: z.ZodNullable<z.ZodString>;
17251
+ parentItemId: z.ZodNullable<z.ZodString>;
17252
+ position: z.ZodNumber;
17253
+ status: z.ZodEnum<{
17254
+ cancelled: "cancelled";
17255
+ completed: "completed";
17256
+ failed: "failed";
17257
+ in_progress: "in_progress";
17258
+ }>;
17259
+ nativeRef: z.ZodNullable<z.ZodObject<{
17260
+ id: z.ZodString;
17261
+ strength: z.ZodEnum<{
17262
+ none: "none";
17263
+ strong: "strong";
17264
+ weak: "weak";
17265
+ }>;
17266
+ }, z.core.$strip>>;
17267
+ createdAt: z.ZodString;
17268
+ updatedAt: z.ZodString;
17269
+ startedAt: z.ZodNullable<z.ZodString>;
17270
+ endedAt: z.ZodNullable<z.ZodString>;
17271
+ kind: z.ZodLiteral<"result">;
17272
+ name: z.ZodString;
17273
+ value: z.ZodJSONSchema;
17274
+ input: z.ZodNullable<z.ZodObject<{
17275
+ itemId: z.ZodString;
17276
+ position: z.ZodNumber;
17277
+ kind: z.ZodEnum<{
17278
+ inbound_message: "inbound_message";
17279
+ task_notification: "task_notification";
17280
+ user_message: "user_message";
17281
+ }>;
17282
+ }, z.core.$strip>>;
17283
+ commit: z.ZodNullable<z.ZodString>;
13737
17284
  }, z.core.$strip>], "kind">;
13738
17285
  }, z.core.$strip>, z.ZodObject<{
13739
17286
  type: z.ZodLiteral<"item.text_appended">;
@@ -13951,6 +17498,7 @@ export declare const MirrorAgentSessionResultSchema: z.ZodObject<{
13951
17498
  sourceModifiedAt: z.ZodString;
13952
17499
  }, z.core.$strip>>;
13953
17500
  parentSessionId: z.ZodNullable<z.ZodString>;
17501
+ workspaceSessionId: z.ZodNullable<z.ZodString>;
13954
17502
  visibility: z.ZodEnum<{
13955
17503
  archived: "archived";
13956
17504
  latent: "latent";
@@ -14109,8 +17657,10 @@ export declare const MirrorExportSchema: z.ZodObject<{
14109
17657
  error: z.ZodObject<{
14110
17658
  message: z.ZodString;
14111
17659
  kind: z.ZodOptional<z.ZodEnum<{
17660
+ agent_missing: "agent_missing";
14112
17661
  auth: "auth";
14113
17662
  model_incompat: "model_incompat";
17663
+ out_of_disk: "out_of_disk";
14114
17664
  rate_limit: "rate_limit";
14115
17665
  unavailable: "unavailable";
14116
17666
  }>>;
@@ -14127,8 +17677,10 @@ export declare const MirrorExportSchema: z.ZodObject<{
14127
17677
  error: z.ZodNullable<z.ZodObject<{
14128
17678
  message: z.ZodString;
14129
17679
  kind: z.ZodOptional<z.ZodEnum<{
17680
+ agent_missing: "agent_missing";
14130
17681
  auth: "auth";
14131
17682
  model_incompat: "model_incompat";
17683
+ out_of_disk: "out_of_disk";
14132
17684
  rate_limit: "rate_limit";
14133
17685
  unavailable: "unavailable";
14134
17686
  }>>;
@@ -14153,7 +17705,6 @@ export declare const MirrorExportSchema: z.ZodObject<{
14153
17705
  contextTokens: z.ZodOptional<z.ZodNumber>;
14154
17706
  contextWindow: z.ZodOptional<z.ZodNumber>;
14155
17707
  }, z.core.$strip>>;
14156
- storeSync: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
14157
17708
  workspaceSync: z.ZodOptional<z.ZodObject<{
14158
17709
  error: z.ZodString;
14159
17710
  }, z.core.$strip>>;
@@ -14180,6 +17731,7 @@ export declare const MirrorExportSchema: z.ZodObject<{
14180
17731
  reason: z.ZodEnum<{
14181
17732
  initial: "initial";
14182
17733
  recovery: "recovery";
17734
+ restart: "restart";
14183
17735
  retry: "retry";
14184
17736
  steer_restart: "steer_restart";
14185
17737
  }>;
@@ -14189,6 +17741,7 @@ export declare const MirrorExportSchema: z.ZodObject<{
14189
17741
  interrupted: "interrupted";
14190
17742
  lost: "lost";
14191
17743
  preparing: "preparing";
17744
+ restarted: "restarted";
14192
17745
  running: "running";
14193
17746
  superseded: "superseded";
14194
17747
  }>;
@@ -14204,8 +17757,10 @@ export declare const MirrorExportSchema: z.ZodObject<{
14204
17757
  error: z.ZodNullable<z.ZodObject<{
14205
17758
  message: z.ZodString;
14206
17759
  kind: z.ZodOptional<z.ZodEnum<{
17760
+ agent_missing: "agent_missing";
14207
17761
  auth: "auth";
14208
17762
  model_incompat: "model_incompat";
17763
+ out_of_disk: "out_of_disk";
14209
17764
  rate_limit: "rate_limit";
14210
17765
  unavailable: "unavailable";
14211
17766
  }>>;
@@ -14777,6 +18332,44 @@ export declare const MirrorExportSchema: z.ZodObject<{
14777
18332
  to: z.ZodNumber;
14778
18333
  }, z.core.$strip>;
14779
18334
  text: z.ZodString;
18335
+ }, z.core.$strip>, z.ZodObject<{
18336
+ id: z.ZodString;
18337
+ sessionId: z.ZodString;
18338
+ turnId: z.ZodNullable<z.ZodString>;
18339
+ attemptId: z.ZodNullable<z.ZodString>;
18340
+ parentItemId: z.ZodNullable<z.ZodString>;
18341
+ position: z.ZodNumber;
18342
+ status: z.ZodEnum<{
18343
+ cancelled: "cancelled";
18344
+ completed: "completed";
18345
+ failed: "failed";
18346
+ in_progress: "in_progress";
18347
+ }>;
18348
+ nativeRef: z.ZodNullable<z.ZodObject<{
18349
+ id: z.ZodString;
18350
+ strength: z.ZodEnum<{
18351
+ none: "none";
18352
+ strong: "strong";
18353
+ weak: "weak";
18354
+ }>;
18355
+ }, z.core.$strip>>;
18356
+ createdAt: z.ZodString;
18357
+ updatedAt: z.ZodString;
18358
+ startedAt: z.ZodNullable<z.ZodString>;
18359
+ endedAt: z.ZodNullable<z.ZodString>;
18360
+ kind: z.ZodLiteral<"result">;
18361
+ name: z.ZodString;
18362
+ value: z.ZodJSONSchema;
18363
+ input: z.ZodNullable<z.ZodObject<{
18364
+ itemId: z.ZodString;
18365
+ position: z.ZodNumber;
18366
+ kind: z.ZodEnum<{
18367
+ inbound_message: "inbound_message";
18368
+ task_notification: "task_notification";
18369
+ user_message: "user_message";
18370
+ }>;
18371
+ }, z.core.$strip>>;
18372
+ commit: z.ZodNullable<z.ZodString>;
14780
18373
  }, z.core.$strip>], "kind">>;
14781
18374
  requests: z.ZodArray<z.ZodObject<{
14782
18375
  id: z.ZodString;
@@ -15019,8 +18612,10 @@ export declare const MirrorExportSchema: z.ZodObject<{
15019
18612
  error: z.ZodObject<{
15020
18613
  message: z.ZodString;
15021
18614
  kind: z.ZodOptional<z.ZodEnum<{
18615
+ agent_missing: "agent_missing";
15022
18616
  auth: "auth";
15023
18617
  model_incompat: "model_incompat";
18618
+ out_of_disk: "out_of_disk";
15024
18619
  rate_limit: "rate_limit";
15025
18620
  unavailable: "unavailable";
15026
18621
  }>>;
@@ -15037,8 +18632,10 @@ export declare const MirrorExportSchema: z.ZodObject<{
15037
18632
  error: z.ZodNullable<z.ZodObject<{
15038
18633
  message: z.ZodString;
15039
18634
  kind: z.ZodOptional<z.ZodEnum<{
18635
+ agent_missing: "agent_missing";
15040
18636
  auth: "auth";
15041
18637
  model_incompat: "model_incompat";
18638
+ out_of_disk: "out_of_disk";
15042
18639
  rate_limit: "rate_limit";
15043
18640
  unavailable: "unavailable";
15044
18641
  }>>;
@@ -15063,7 +18660,6 @@ export declare const MirrorExportSchema: z.ZodObject<{
15063
18660
  contextTokens: z.ZodOptional<z.ZodNumber>;
15064
18661
  contextWindow: z.ZodOptional<z.ZodNumber>;
15065
18662
  }, z.core.$strip>>;
15066
- storeSync: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
15067
18663
  workspaceSync: z.ZodOptional<z.ZodObject<{
15068
18664
  error: z.ZodString;
15069
18665
  }, z.core.$strip>>;
@@ -15092,6 +18688,7 @@ export declare const MirrorExportSchema: z.ZodObject<{
15092
18688
  reason: z.ZodEnum<{
15093
18689
  initial: "initial";
15094
18690
  recovery: "recovery";
18691
+ restart: "restart";
15095
18692
  retry: "retry";
15096
18693
  steer_restart: "steer_restart";
15097
18694
  }>;
@@ -15101,6 +18698,7 @@ export declare const MirrorExportSchema: z.ZodObject<{
15101
18698
  interrupted: "interrupted";
15102
18699
  lost: "lost";
15103
18700
  preparing: "preparing";
18701
+ restarted: "restarted";
15104
18702
  running: "running";
15105
18703
  superseded: "superseded";
15106
18704
  }>;
@@ -15116,8 +18714,10 @@ export declare const MirrorExportSchema: z.ZodObject<{
15116
18714
  error: z.ZodNullable<z.ZodObject<{
15117
18715
  message: z.ZodString;
15118
18716
  kind: z.ZodOptional<z.ZodEnum<{
18717
+ agent_missing: "agent_missing";
15119
18718
  auth: "auth";
15120
18719
  model_incompat: "model_incompat";
18720
+ out_of_disk: "out_of_disk";
15121
18721
  rate_limit: "rate_limit";
15122
18722
  unavailable: "unavailable";
15123
18723
  }>>;
@@ -15691,6 +19291,44 @@ export declare const MirrorExportSchema: z.ZodObject<{
15691
19291
  to: z.ZodNumber;
15692
19292
  }, z.core.$strip>;
15693
19293
  text: z.ZodString;
19294
+ }, z.core.$strip>, z.ZodObject<{
19295
+ id: z.ZodString;
19296
+ sessionId: z.ZodString;
19297
+ turnId: z.ZodNullable<z.ZodString>;
19298
+ attemptId: z.ZodNullable<z.ZodString>;
19299
+ parentItemId: z.ZodNullable<z.ZodString>;
19300
+ position: z.ZodNumber;
19301
+ status: z.ZodEnum<{
19302
+ cancelled: "cancelled";
19303
+ completed: "completed";
19304
+ failed: "failed";
19305
+ in_progress: "in_progress";
19306
+ }>;
19307
+ nativeRef: z.ZodNullable<z.ZodObject<{
19308
+ id: z.ZodString;
19309
+ strength: z.ZodEnum<{
19310
+ none: "none";
19311
+ strong: "strong";
19312
+ weak: "weak";
19313
+ }>;
19314
+ }, z.core.$strip>>;
19315
+ createdAt: z.ZodString;
19316
+ updatedAt: z.ZodString;
19317
+ startedAt: z.ZodNullable<z.ZodString>;
19318
+ endedAt: z.ZodNullable<z.ZodString>;
19319
+ kind: z.ZodLiteral<"result">;
19320
+ name: z.ZodString;
19321
+ value: z.ZodJSONSchema;
19322
+ input: z.ZodNullable<z.ZodObject<{
19323
+ itemId: z.ZodString;
19324
+ position: z.ZodNumber;
19325
+ kind: z.ZodEnum<{
19326
+ inbound_message: "inbound_message";
19327
+ task_notification: "task_notification";
19328
+ user_message: "user_message";
19329
+ }>;
19330
+ }, z.core.$strip>>;
19331
+ commit: z.ZodNullable<z.ZodString>;
15694
19332
  }, z.core.$strip>], "kind">;
15695
19333
  }, z.core.$strip>, z.ZodObject<{
15696
19334
  type: z.ZodLiteral<"item.changed">;
@@ -16256,6 +19894,44 @@ export declare const MirrorExportSchema: z.ZodObject<{
16256
19894
  to: z.ZodNumber;
16257
19895
  }, z.core.$strip>;
16258
19896
  text: z.ZodString;
19897
+ }, z.core.$strip>, z.ZodObject<{
19898
+ id: z.ZodString;
19899
+ sessionId: z.ZodString;
19900
+ turnId: z.ZodNullable<z.ZodString>;
19901
+ attemptId: z.ZodNullable<z.ZodString>;
19902
+ parentItemId: z.ZodNullable<z.ZodString>;
19903
+ position: z.ZodNumber;
19904
+ status: z.ZodEnum<{
19905
+ cancelled: "cancelled";
19906
+ completed: "completed";
19907
+ failed: "failed";
19908
+ in_progress: "in_progress";
19909
+ }>;
19910
+ nativeRef: z.ZodNullable<z.ZodObject<{
19911
+ id: z.ZodString;
19912
+ strength: z.ZodEnum<{
19913
+ none: "none";
19914
+ strong: "strong";
19915
+ weak: "weak";
19916
+ }>;
19917
+ }, z.core.$strip>>;
19918
+ createdAt: z.ZodString;
19919
+ updatedAt: z.ZodString;
19920
+ startedAt: z.ZodNullable<z.ZodString>;
19921
+ endedAt: z.ZodNullable<z.ZodString>;
19922
+ kind: z.ZodLiteral<"result">;
19923
+ name: z.ZodString;
19924
+ value: z.ZodJSONSchema;
19925
+ input: z.ZodNullable<z.ZodObject<{
19926
+ itemId: z.ZodString;
19927
+ position: z.ZodNumber;
19928
+ kind: z.ZodEnum<{
19929
+ inbound_message: "inbound_message";
19930
+ task_notification: "task_notification";
19931
+ user_message: "user_message";
19932
+ }>;
19933
+ }, z.core.$strip>>;
19934
+ commit: z.ZodNullable<z.ZodString>;
16259
19935
  }, z.core.$strip>], "kind">;
16260
19936
  }, z.core.$strip>, z.ZodObject<{
16261
19937
  type: z.ZodLiteral<"item.text_appended">;
@@ -17062,6 +20738,9 @@ export declare const ProjectAgentDefinitionSchema: z.ZodObject<{
17062
20738
  acp: z.ZodOptional<z.ZodObject<{
17063
20739
  endpoint: z.ZodOptional<z.ZodString>;
17064
20740
  command: z.ZodOptional<z.ZodArray<z.ZodString>>;
20741
+ shell: z.ZodOptional<z.ZodBoolean>;
20742
+ projectConfig: z.ZodOptional<z.ZodBoolean>;
20743
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
17065
20744
  }, z.core.$strip>>;
17066
20745
  }, z.core.$strip>;
17067
20746
  export declare const ProjectAgentEntrySchema: z.ZodObject<{
@@ -17131,6 +20810,9 @@ export declare const ProjectAgentEntrySchema: z.ZodObject<{
17131
20810
  acp: z.ZodOptional<z.ZodObject<{
17132
20811
  endpoint: z.ZodOptional<z.ZodString>;
17133
20812
  command: z.ZodOptional<z.ZodArray<z.ZodString>>;
20813
+ shell: z.ZodOptional<z.ZodBoolean>;
20814
+ projectConfig: z.ZodOptional<z.ZodBoolean>;
20815
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
17134
20816
  }, z.core.$strip>>;
17135
20817
  }, z.core.$strip>>;
17136
20818
  promptFile: z.ZodOptional<z.ZodString>;
@@ -17510,7 +21192,7 @@ export declare const MeSchema: z.ZodObject<{
17510
21192
  storeUploadMaxBytes: z.ZodNumber;
17511
21193
  }, z.core.$strip>;
17512
21194
  agentProtocol: z.ZodObject<{
17513
- session: z.ZodLiteral<3>;
21195
+ session: z.ZodLiteral<4>;
17514
21196
  runner: z.ZodLiteral<3>;
17515
21197
  }, z.core.$strip>;
17516
21198
  }, z.core.$strip>;
@@ -17569,6 +21251,13 @@ export declare const ParseWorkflowResponseSchema: z.ZodNullable<z.ZodObject<{
17569
21251
  optional: z.ZodOptional<z.ZodBoolean>;
17570
21252
  }, z.core.$strip>>;
17571
21253
  permissions: z.ZodArray<z.ZodString>;
21254
+ documents: z.ZodArray<z.ZodObject<{
21255
+ path: z.ZodString;
21256
+ access: z.ZodEnum<{
21257
+ read: "read";
21258
+ write: "write";
21259
+ }>;
21260
+ }, z.core.$strip>>;
17572
21261
  canSuspend: z.ZodBoolean;
17573
21262
  nodes: z.ZodArray<z.ZodObject<{
17574
21263
  id: z.ZodString;