@hearsay-tools/squawk 0.18.0-pr4147.8005 → 0.18.0-pr4149.8007

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 (37) hide show
  1. package/dist/ci-wait/controller.d.ts +4 -4
  2. package/dist/delegation/conversations.d.ts +2 -1
  3. package/dist/delegation/conversations.js +1 -1
  4. package/dist/delegation/conversations.js.map +1 -1
  5. package/dist/delegation/transport.d.ts +17 -17
  6. package/dist/project-migration/live.d.ts +1 -1
  7. package/dist/project-migration/live.js +1 -1
  8. package/dist/project-migration/live.js.map +1 -1
  9. package/dist/runs/archive-family.js +2 -2
  10. package/dist/runs/archive-family.js.map +1 -1
  11. package/dist/runs/outcome-commit.js +7 -6
  12. package/dist/runs/outcome-commit.js.map +1 -1
  13. package/dist/runs/run-decode.d.ts +3128 -0
  14. package/dist/runs/run-decode.js +132 -0
  15. package/dist/runs/run-decode.js.map +1 -0
  16. package/dist/runs/run-index.d.ts +5 -1
  17. package/dist/runs/run-index.js +6 -1
  18. package/dist/runs/run-index.js.map +1 -1
  19. package/dist/runs/store.d.ts +4 -3131
  20. package/dist/runs/store.js +4 -132
  21. package/dist/runs/store.js.map +1 -1
  22. package/dist/server/live-routes.d.ts +6 -6
  23. package/dist/server/server.d.ts +700 -700
  24. package/dist/server/server.js +1 -2
  25. package/dist/server/server.js.map +1 -1
  26. package/dist/workflows/run/opening.d.ts +2 -2
  27. package/dist/workflows/run/wait-kinds.d.ts +5 -2
  28. package/dist/workflows/run/wait-kinds.js +21 -17
  29. package/dist/workflows/run/wait-kinds.js.map +1 -1
  30. package/dist/workflows/run/workflow-position.d.ts +6 -6
  31. package/dist/workflows/waits.d.ts +4 -4
  32. package/dist/workflows/waits.js +7 -4
  33. package/dist/workflows/waits.js.map +1 -1
  34. package/package.json +4 -4
  35. package/dist/runs/wait-helpers.d.ts +0 -28
  36. package/dist/runs/wait-helpers.js +0 -34
  37. package/dist/runs/wait-helpers.js.map +0 -1
@@ -1,8 +1,9 @@
1
+ import { type RunRecord, type StepState } from './run-decode.ts';
1
2
  import { type RunLifecycleSource } from './lifecycle.ts';
2
3
  import type { WorkerExecutionRecords, WorkerExecutions } from './ports.ts';
3
4
  import { z } from 'zod';
4
5
  import { queuedMessageSchema } from '../contract/index.js';
5
- import { type WaitRegistrationReceipt } from '../contract/index.js';
6
+ import type { WaitRegistrationReceipt } from '../contract/index.js';
6
7
  import type { ConversationState, AgentInput, InboxClaim, DelegationState, Wait, WorkerDestroyRetry } from '../contract/index.js';
7
8
  import { RunTranscriptFacts } from './transcript-facts-topic.ts';
8
9
  import { workflowDefSchema } from '../workflows/types.ts';
@@ -12,7 +13,6 @@ import { type ConversationIdentity } from './conversation-identity.ts';
12
13
  export { ConversationIdInUseError } from './conversation-identity.ts';
13
14
  export { ciWaitEntry, holdsWorkerWait, upgradeLegacyWaits, workerWaitEntry } from './legacy-waits.ts';
14
15
  import { RunRetentionTopic } from './run-retention.ts';
15
- import { type RawExtras } from './raw-record.ts';
16
16
  import { RunStoreOpenError } from './store-open-error.ts';
17
17
  import { RunClaimsTopic } from './run-claims-topic.ts';
18
18
  import { RunPinsTopic } from './run-pins.ts';
@@ -27,3139 +27,12 @@ import { RunQueriesTopic } from './run-queries.ts';
27
27
  import { RunRepoScopeTopic } from './run-repo-scope.ts';
28
28
  export type RunStatus = 'queued' | 'running' | 'waiting' | 'review' | 'done' | 'failed' | 'cancelled';
29
29
  export type StepStatus = 'pending' | 'running' | 'waiting' | 'review' | 'done' | 'failed' | 'cancelled' | 'skipped';
30
- declare const stepStateSchema: z.ZodObject<{
31
- id: z.ZodString;
32
- name: z.ZodString;
33
- kind: z.ZodEnum<{
34
- agent: "agent";
35
- check: "check";
36
- }>;
37
- status: z.ZodEnum<{
38
- cancelled: "cancelled";
39
- done: "done";
40
- failed: "failed";
41
- pending: "pending";
42
- review: "review";
43
- running: "running";
44
- skipped: "skipped";
45
- waiting: "waiting";
46
- }>;
47
- iterations: z.ZodNumber;
48
- retriesUsed: z.ZodOptional<z.ZodNumber>;
49
- tokensUsed: z.ZodNumber;
50
- inputTokens: z.ZodOptional<z.ZodNumber>;
51
- outputTokens: z.ZodOptional<z.ZodNumber>;
52
- usageInvocationsStarted: z.ZodOptional<z.ZodNumber>;
53
- usageInvocationsObserved: z.ZodOptional<z.ZodNumber>;
54
- usageTurnsStarted: z.ZodOptional<z.ZodNumber>;
55
- usageTurnsRecorded: z.ZodOptional<z.ZodNumber>;
56
- usageInvocationEpoch: z.ZodOptional<z.ZodNumber>;
57
- startedAt: z.ZodOptional<z.ZodString>;
58
- finishedAt: z.ZodOptional<z.ZodString>;
59
- error: z.ZodOptional<z.ZodString>;
60
- sessionId: z.ZodOptional<z.ZodString>;
61
- removedBackend: z.ZodOptional<z.ZodString>;
62
- profileId: z.ZodOptional<z.ZodString>;
63
- skillPath: z.ZodOptional<z.ZodString>;
64
- costUsd: z.ZodOptional<z.ZodNumber>;
65
- synthetic: z.ZodOptional<z.ZodLiteral<"continuation">>;
66
- continuesStepId: z.ZodOptional<z.ZodString>;
67
- backend: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
68
- }, z.core.$strip>;
69
- /** Exported for `./run-index.ts`, the read-only reader of the same records. Nothing else should
70
- * parse a stored run — see `reconcileLoadedRun` for why a second parser is a correctness risk. */
71
- export declare const runRecordSchema: z.ZodObject<{
72
- archiveWhenDone: z.ZodOptional<z.ZodBoolean>;
73
- autoMergePr: z.ZodOptional<z.ZodBoolean>;
74
- allowWorkers: z.ZodOptional<z.ZodBoolean>;
75
- allowMessaging: z.ZodOptional<z.ZodBoolean>;
76
- id: z.ZodString;
77
- title: z.ZodString;
78
- titleSummary: z.ZodOptional<z.ZodString>;
79
- diffStat: z.ZodOptional<z.ZodObject<{
80
- adds: z.ZodNumber;
81
- dels: z.ZodNumber;
82
- files: z.ZodNumber;
83
- repointed: z.ZodOptional<z.ZodBoolean>;
84
- }, z.core.$strip>>;
85
- workflow: z.ZodString;
86
- task: z.ZodString;
87
- queuedMessages: z.ZodOptional<z.ZodArray<z.ZodObject<{
88
- replayAfterOpen: z.ZodOptional<z.ZodLiteral<true>>;
89
- id: z.ZodString;
90
- text: z.ZodString;
91
- images: z.ZodOptional<z.ZodArray<z.ZodString>>;
92
- createdAt: z.ZodString;
93
- }, z.core.$strip>>>;
94
- continuationMessage: z.ZodOptional<z.ZodObject<{
95
- replayAfterOpen: z.ZodOptional<z.ZodLiteral<true>>;
96
- id: z.ZodString;
97
- text: z.ZodString;
98
- images: z.ZodOptional<z.ZodArray<z.ZodString>>;
99
- createdAt: z.ZodString;
100
- origin: z.ZodOptional<z.ZodEnum<{
101
- human: "human";
102
- lifecycle: "lifecycle";
103
- }>>;
104
- agentInputId: z.ZodOptional<z.ZodUUID>;
105
- task: z.ZodOptional<z.ZodString>;
106
- resumeContext: z.ZodOptional<z.ZodObject<{
107
- failure: z.ZodOptional<z.ZodObject<{
108
- stepId: z.ZodOptional<z.ZodString>;
109
- error: z.ZodString;
110
- }, z.core.$strip>>;
111
- restarted: z.ZodOptional<z.ZodLiteral<true>>;
112
- cutOff: z.ZodOptional<z.ZodObject<{
113
- tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
114
- subagents: z.ZodOptional<z.ZodArray<z.ZodString>>;
115
- }, z.core.$strip>>;
116
- }, z.core.$strip>>;
117
- }, z.core.$strip>>;
118
- invalidAsk: z.ZodOptional<z.ZodBoolean>;
119
- agentInputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
120
- conversation: z.ZodOptional<z.ZodObject<{
121
- senderRunId: z.ZodUUID;
122
- recipientRunId: z.ZodUUID;
123
- kind: z.ZodEnum<{
124
- "follow-up": "follow-up";
125
- progress: "progress";
126
- reply: "reply";
127
- request: "request";
128
- }>;
129
- requestId: z.ZodOptional<z.ZodUUID>;
130
- relationship: z.ZodOptional<z.ZodEnum<{
131
- family: "family";
132
- peer: "peer";
133
- }>>;
134
- }, z.core.$strict>>;
135
- id: z.ZodUUID;
136
- source: z.ZodEnum<{
137
- agent: "agent";
138
- lifecycle: "lifecycle";
139
- }>;
140
- parentRunId: z.ZodUUID;
141
- text: z.ZodString;
142
- createdAt: z.ZodISODateTime;
143
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
144
- consumedAt: z.ZodOptional<z.ZodISODateTime>;
145
- awaitingRead: z.ZodOptional<z.ZodLiteral<true>>;
146
- inboxClaim: z.ZodOptional<z.ZodObject<{
147
- receiptId: z.ZodUUID;
148
- generation: z.ZodUUID;
149
- expiresAt: z.ZodISODateTime;
150
- acknowledgedAt: z.ZodOptional<z.ZodISODateTime>;
151
- memberIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
152
- }, z.core.$strict>>;
153
- purpose: z.ZodOptional<z.ZodEnum<{
154
- "completion-refusal": "completion-refusal";
155
- "undelivered-question": "undelivered-question";
156
- }>>;
157
- requestHash: z.ZodOptional<z.ZodString>;
158
- deadline: z.ZodOptional<z.ZodISODateTime>;
159
- }, z.core.$strict>>>;
160
- waits: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
161
- prUrl: z.ZodString;
162
- repository: z.ZodString;
163
- prNumber: z.ZodNumber;
164
- headSha: z.ZodString;
165
- id: z.ZodUUID;
166
- source: z.ZodEnum<{
167
- agent: "agent";
168
- cezar: "cezar";
169
- }>;
170
- via: z.ZodEnum<{
171
- "ask-line": "ask-line";
172
- budget: "budget";
173
- "cez-message-wait": "cez-message-wait";
174
- "cez-worker-wait": "cez-worker-wait";
175
- cezar_ask: "cezar_ask";
176
- cezar_wait: "cezar_wait";
177
- cezar_wait_for_ci: "cezar_wait_for_ci";
178
- completion: "completion";
179
- "monitoring-line": "monitoring-line";
180
- "native-ask": "native-ask";
181
- "native-subagents": "native-subagents";
182
- "no-wait": "no-wait";
183
- "schedule-wakeup": "schedule-wakeup";
184
- }>;
185
- registeredAt: z.ZodISODateTime;
186
- phase: z.ZodEnum<{
187
- cancelled: "cancelled";
188
- delivered: "delivered";
189
- open: "open";
190
- resolved: "resolved";
191
- }>;
192
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
193
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
194
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
195
- turnId: z.ZodString;
196
- kind: z.ZodLiteral<"pr">;
197
- deadline: z.ZodISODateTime;
198
- generation: z.ZodString;
199
- timeoutSeconds: z.ZodNumber;
200
- until: z.ZodEnum<{
201
- checks: "checks";
202
- merge: "merge";
203
- merge_or_blocked: "merge_or_blocked";
204
- }>;
205
- wakeOnConflict: z.ZodBoolean;
206
- callerHead: z.ZodOptional<z.ZodLiteral<true>>;
207
- result: z.ZodOptional<z.ZodObject<{
208
- outcome: z.ZodEnum<{
209
- blocked: "blocked";
210
- cancelled: "cancelled";
211
- closed: "closed";
212
- conflicting: "conflicting";
213
- deadline: "deadline";
214
- error: "error";
215
- failed: "failed";
216
- head_changed: "head_changed";
217
- merged: "merged";
218
- no_checks: "no_checks";
219
- passed: "passed";
220
- skipped: "skipped";
221
- startup_failure: "startup_failure";
222
- stuck: "stuck";
223
- }>;
224
- headSha: z.ZodString;
225
- observedHeadSha: z.ZodOptional<z.ZodString>;
226
- mergeable: z.ZodOptional<z.ZodEnum<{
227
- CONFLICTING: "CONFLICTING";
228
- MERGEABLE: "MERGEABLE";
229
- UNKNOWN: "UNKNOWN";
230
- }>>;
231
- mergeStateStatus: z.ZodOptional<z.ZodString>;
232
- mergedAt: z.ZodOptional<z.ZodISODateTime>;
233
- mergeCommitSha: z.ZodOptional<z.ZodString>;
234
- mergeBlock: z.ZodOptional<z.ZodObject<{
235
- reason: z.ZodEnum<{
236
- conflict: "conflict";
237
- no_pending_merge: "no_pending_merge";
238
- }>;
239
- isInMergeQueue: z.ZodBoolean;
240
- autoMergeEnabled: z.ZodBoolean;
241
- event: z.ZodOptional<z.ZodObject<{
242
- kind: z.ZodEnum<{
243
- auto_merge_disabled: "auto_merge_disabled";
244
- queue_removal: "queue_removal";
245
- }>;
246
- createdAt: z.ZodISODateTime;
247
- reason: z.ZodOptional<z.ZodString>;
248
- reasonCode: z.ZodOptional<z.ZodString>;
249
- }, z.core.$strict>>;
250
- }, z.core.$strict>>;
251
- observedAt: z.ZodISODateTime;
252
- checks: z.ZodArray<z.ZodObject<{
253
- name: z.ZodString;
254
- state: z.ZodString;
255
- link: z.ZodString;
256
- }, z.core.$strict>>;
257
- totalChecks: z.ZodNumber;
258
- truncated: z.ZodBoolean;
259
- diagnostic: z.ZodOptional<z.ZodString>;
260
- }, z.core.$strict>>;
261
- }, z.core.$strict>, z.ZodObject<{
262
- id: z.ZodUUID;
263
- source: z.ZodEnum<{
264
- agent: "agent";
265
- cezar: "cezar";
266
- }>;
267
- via: z.ZodEnum<{
268
- "ask-line": "ask-line";
269
- budget: "budget";
270
- "cez-message-wait": "cez-message-wait";
271
- "cez-worker-wait": "cez-worker-wait";
272
- cezar_ask: "cezar_ask";
273
- cezar_wait: "cezar_wait";
274
- cezar_wait_for_ci: "cezar_wait_for_ci";
275
- completion: "completion";
276
- "monitoring-line": "monitoring-line";
277
- "native-ask": "native-ask";
278
- "native-subagents": "native-subagents";
279
- "no-wait": "no-wait";
280
- "schedule-wakeup": "schedule-wakeup";
281
- }>;
282
- registeredAt: z.ZodISODateTime;
283
- phase: z.ZodEnum<{
284
- cancelled: "cancelled";
285
- delivered: "delivered";
286
- open: "open";
287
- resolved: "resolved";
288
- }>;
289
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
290
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
291
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
292
- turnId: z.ZodString;
293
- kind: z.ZodLiteral<"timer">;
294
- deadline: z.ZodISODateTime;
295
- seconds: z.ZodNumber;
296
- note: z.ZodOptional<z.ZodString>;
297
- }, z.core.$strict>, z.ZodObject<{
298
- id: z.ZodUUID;
299
- source: z.ZodEnum<{
300
- agent: "agent";
301
- cezar: "cezar";
302
- }>;
303
- via: z.ZodEnum<{
304
- "ask-line": "ask-line";
305
- budget: "budget";
306
- "cez-message-wait": "cez-message-wait";
307
- "cez-worker-wait": "cez-worker-wait";
308
- cezar_ask: "cezar_ask";
309
- cezar_wait: "cezar_wait";
310
- cezar_wait_for_ci: "cezar_wait_for_ci";
311
- completion: "completion";
312
- "monitoring-line": "monitoring-line";
313
- "native-ask": "native-ask";
314
- "native-subagents": "native-subagents";
315
- "no-wait": "no-wait";
316
- "schedule-wakeup": "schedule-wakeup";
317
- }>;
318
- registeredAt: z.ZodISODateTime;
319
- phase: z.ZodEnum<{
320
- cancelled: "cancelled";
321
- delivered: "delivered";
322
- open: "open";
323
- resolved: "resolved";
324
- }>;
325
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
326
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
327
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
328
- turnId: z.ZodString;
329
- kind: z.ZodLiteral<"human">;
330
- questions: z.ZodOptional<z.ZodArray<z.ZodObject<{
331
- id: z.ZodOptional<z.ZodString>;
332
- header: z.ZodString;
333
- question: z.ZodString;
334
- options: z.ZodOptional<z.ZodArray<z.ZodObject<{
335
- label: z.ZodString;
336
- description: z.ZodOptional<z.ZodString>;
337
- }, z.core.$strict>>>;
338
- multiSelect: z.ZodOptional<z.ZodBoolean>;
339
- allowFreeText: z.ZodOptional<z.ZodBoolean>;
340
- }, z.core.$strict>>>;
341
- context: z.ZodOptional<z.ZodString>;
342
- askSeq: z.ZodOptional<z.ZodNumber>;
343
- }, z.core.$strict>, z.ZodObject<{
344
- id: z.ZodUUID;
345
- source: z.ZodEnum<{
346
- agent: "agent";
347
- cezar: "cezar";
348
- }>;
349
- via: z.ZodEnum<{
350
- "ask-line": "ask-line";
351
- budget: "budget";
352
- "cez-message-wait": "cez-message-wait";
353
- "cez-worker-wait": "cez-worker-wait";
354
- cezar_ask: "cezar_ask";
355
- cezar_wait: "cezar_wait";
356
- cezar_wait_for_ci: "cezar_wait_for_ci";
357
- completion: "completion";
358
- "monitoring-line": "monitoring-line";
359
- "native-ask": "native-ask";
360
- "native-subagents": "native-subagents";
361
- "no-wait": "no-wait";
362
- "schedule-wakeup": "schedule-wakeup";
363
- }>;
364
- registeredAt: z.ZodISODateTime;
365
- phase: z.ZodEnum<{
366
- cancelled: "cancelled";
367
- delivered: "delivered";
368
- open: "open";
369
- resolved: "resolved";
370
- }>;
371
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
372
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
373
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
374
- turnId: z.ZodString;
375
- kind: z.ZodLiteral<"worker">;
376
- deadline: z.ZodOptional<z.ZodISODateTime>;
377
- timeoutSeconds: z.ZodOptional<z.ZodNumber>;
378
- mode: z.ZodOptional<z.ZodEnum<{
379
- all: "all";
380
- any: "any";
381
- one: "one";
382
- }>>;
383
- workerIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
384
- revisions: z.ZodOptional<z.ZodArray<z.ZodObject<{
385
- workerId: z.ZodUUID;
386
- revision: z.ZodNumber;
387
- }, z.core.$strict>>>;
388
- outcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
389
- workerId: z.ZodUUID;
390
- status: z.ZodEnum<{
391
- cancelled: "cancelled";
392
- done: "done";
393
- failed: "failed";
394
- review: "review";
395
- }>;
396
- observedAt: z.ZodISODateTime;
397
- summary: z.ZodOptional<z.ZodString>;
398
- revision: z.ZodOptional<z.ZodNumber>;
399
- }, z.core.$strict>>>;
400
- requestIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
401
- requestOutcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
402
- requestId: z.ZodUUID;
403
- status: z.ZodEnum<{
404
- cancelled: "cancelled";
405
- "completed-without-reply": "completed-without-reply";
406
- deleted: "deleted";
407
- destroyed: "destroyed";
408
- failed: "failed";
409
- "human-fallback": "human-fallback";
410
- replied: "replied";
411
- "replied-late": "replied-late";
412
- "sender-closed": "sender-closed";
413
- "timed-out": "timed-out";
414
- }>;
415
- observedAt: z.ZodISODateTime;
416
- replyId: z.ZodOptional<z.ZodUUID>;
417
- }, z.core.$strict>>>;
418
- result: z.ZodOptional<z.ZodObject<{
419
- reason: z.ZodEnum<{
420
- outcome: "outcome";
421
- timeout: "timeout";
422
- }>;
423
- }, z.core.$strict>>;
424
- wakeInputId: z.ZodOptional<z.ZodUUID>;
425
- }, z.core.$strict>, z.ZodObject<{
426
- id: z.ZodUUID;
427
- source: z.ZodEnum<{
428
- agent: "agent";
429
- cezar: "cezar";
430
- }>;
431
- via: z.ZodEnum<{
432
- "ask-line": "ask-line";
433
- budget: "budget";
434
- "cez-message-wait": "cez-message-wait";
435
- "cez-worker-wait": "cez-worker-wait";
436
- cezar_ask: "cezar_ask";
437
- cezar_wait: "cezar_wait";
438
- cezar_wait_for_ci: "cezar_wait_for_ci";
439
- completion: "completion";
440
- "monitoring-line": "monitoring-line";
441
- "native-ask": "native-ask";
442
- "native-subagents": "native-subagents";
443
- "no-wait": "no-wait";
444
- "schedule-wakeup": "schedule-wakeup";
445
- }>;
446
- registeredAt: z.ZodISODateTime;
447
- phase: z.ZodEnum<{
448
- cancelled: "cancelled";
449
- delivered: "delivered";
450
- open: "open";
451
- resolved: "resolved";
452
- }>;
453
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
454
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
455
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
456
- turnId: z.ZodString;
457
- kind: z.ZodLiteral<"process">;
458
- deadline: z.ZodISODateTime;
459
- timeoutSeconds: z.ZodNumber;
460
- pid: z.ZodNumber;
461
- startToken: z.ZodOptional<z.ZodString>;
462
- exitFile: z.ZodOptional<z.ZodString>;
463
- note: z.ZodOptional<z.ZodString>;
464
- result: z.ZodOptional<z.ZodObject<{
465
- outcome: z.ZodEnum<{
466
- deadline: "deadline";
467
- error: "error";
468
- exit_file: "exit_file";
469
- exited: "exited";
470
- }>;
471
- observedAt: z.ZodISODateTime;
472
- exitCode: z.ZodOptional<z.ZodNumber>;
473
- exitFileNote: z.ZodOptional<z.ZodLiteral<"not-an-exit-code">>;
474
- diagnostic: z.ZodOptional<z.ZodString>;
475
- }, z.core.$strict>>;
476
- }, z.core.$strict>, z.ZodObject<{
477
- id: z.ZodUUID;
478
- source: z.ZodEnum<{
479
- agent: "agent";
480
- cezar: "cezar";
481
- }>;
482
- via: z.ZodEnum<{
483
- "ask-line": "ask-line";
484
- budget: "budget";
485
- "cez-message-wait": "cez-message-wait";
486
- "cez-worker-wait": "cez-worker-wait";
487
- cezar_ask: "cezar_ask";
488
- cezar_wait: "cezar_wait";
489
- cezar_wait_for_ci: "cezar_wait_for_ci";
490
- completion: "completion";
491
- "monitoring-line": "monitoring-line";
492
- "native-ask": "native-ask";
493
- "native-subagents": "native-subagents";
494
- "no-wait": "no-wait";
495
- "schedule-wakeup": "schedule-wakeup";
496
- }>;
497
- registeredAt: z.ZodISODateTime;
498
- phase: z.ZodEnum<{
499
- cancelled: "cancelled";
500
- delivered: "delivered";
501
- open: "open";
502
- resolved: "resolved";
503
- }>;
504
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
505
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
506
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
507
- turnId: z.ZodString;
508
- kind: z.ZodLiteral<"peer">;
509
- deadline: z.ZodISODateTime;
510
- timeoutSeconds: z.ZodNumber;
511
- peerIds: z.ZodArray<z.ZodUUID>;
512
- result: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
513
- reason: z.ZodLiteral<"message">;
514
- peerRunId: z.ZodUUID;
515
- messageId: z.ZodUUID;
516
- }, z.core.$strict>, z.ZodObject<{
517
- reason: z.ZodLiteral<"settled">;
518
- peerRunId: z.ZodUUID;
519
- }, z.core.$strict>, z.ZodObject<{
520
- reason: z.ZodLiteral<"timeout">;
521
- }, z.core.$strict>], "reason">>;
522
- }, z.core.$strict>, z.ZodObject<{
523
- id: z.ZodUUID;
524
- registeredAt: z.ZodISODateTime;
525
- phase: z.ZodEnum<{
526
- cancelled: "cancelled";
527
- delivered: "delivered";
528
- open: "open";
529
- resolved: "resolved";
530
- }>;
531
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
532
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
533
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
534
- turnId: z.ZodString;
535
- kind: z.ZodLiteral<"subagent">;
536
- source: z.ZodLiteral<"cezar">;
537
- via: z.ZodLiteral<"native-subagents">;
538
- deadline: z.ZodISODateTime;
539
- children: z.ZodArray<z.ZodObject<{
540
- id: z.ZodString;
541
- status: z.ZodEnum<{
542
- cancelled: "cancelled";
543
- completed: "completed";
544
- failed: "failed";
545
- running: "running";
546
- }>;
547
- }, z.core.$strict>>;
548
- result: z.ZodOptional<z.ZodObject<{
549
- reason: z.ZodEnum<{
550
- interrupted: "interrupted";
551
- settled: "settled";
552
- superseded: "superseded";
553
- timeout: "timeout";
554
- }>;
555
- }, z.core.$strict>>;
556
- }, z.core.$strict>], "kind">>>;
557
- waitRegistrations: z.ZodOptional<z.ZodArray<z.ZodObject<{
558
- operationId: z.ZodUUID;
559
- requestHash: z.ZodString;
560
- wait: z.ZodDiscriminatedUnion<[z.ZodObject<{
561
- prUrl: z.ZodString;
562
- repository: z.ZodString;
563
- prNumber: z.ZodNumber;
564
- headSha: z.ZodString;
565
- id: z.ZodUUID;
566
- source: z.ZodEnum<{
567
- agent: "agent";
568
- cezar: "cezar";
569
- }>;
570
- via: z.ZodEnum<{
571
- "ask-line": "ask-line";
572
- budget: "budget";
573
- "cez-message-wait": "cez-message-wait";
574
- "cez-worker-wait": "cez-worker-wait";
575
- cezar_ask: "cezar_ask";
576
- cezar_wait: "cezar_wait";
577
- cezar_wait_for_ci: "cezar_wait_for_ci";
578
- completion: "completion";
579
- "monitoring-line": "monitoring-line";
580
- "native-ask": "native-ask";
581
- "native-subagents": "native-subagents";
582
- "no-wait": "no-wait";
583
- "schedule-wakeup": "schedule-wakeup";
584
- }>;
585
- registeredAt: z.ZodISODateTime;
586
- phase: z.ZodEnum<{
587
- cancelled: "cancelled";
588
- delivered: "delivered";
589
- open: "open";
590
- resolved: "resolved";
591
- }>;
592
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
593
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
594
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
595
- turnId: z.ZodString;
596
- kind: z.ZodLiteral<"pr">;
597
- deadline: z.ZodISODateTime;
598
- generation: z.ZodString;
599
- timeoutSeconds: z.ZodNumber;
600
- until: z.ZodEnum<{
601
- checks: "checks";
602
- merge: "merge";
603
- merge_or_blocked: "merge_or_blocked";
604
- }>;
605
- wakeOnConflict: z.ZodBoolean;
606
- callerHead: z.ZodOptional<z.ZodLiteral<true>>;
607
- result: z.ZodOptional<z.ZodObject<{
608
- outcome: z.ZodEnum<{
609
- blocked: "blocked";
610
- cancelled: "cancelled";
611
- closed: "closed";
612
- conflicting: "conflicting";
613
- deadline: "deadline";
614
- error: "error";
615
- failed: "failed";
616
- head_changed: "head_changed";
617
- merged: "merged";
618
- no_checks: "no_checks";
619
- passed: "passed";
620
- skipped: "skipped";
621
- startup_failure: "startup_failure";
622
- stuck: "stuck";
623
- }>;
624
- headSha: z.ZodString;
625
- observedHeadSha: z.ZodOptional<z.ZodString>;
626
- mergeable: z.ZodOptional<z.ZodEnum<{
627
- CONFLICTING: "CONFLICTING";
628
- MERGEABLE: "MERGEABLE";
629
- UNKNOWN: "UNKNOWN";
630
- }>>;
631
- mergeStateStatus: z.ZodOptional<z.ZodString>;
632
- mergedAt: z.ZodOptional<z.ZodISODateTime>;
633
- mergeCommitSha: z.ZodOptional<z.ZodString>;
634
- mergeBlock: z.ZodOptional<z.ZodObject<{
635
- reason: z.ZodEnum<{
636
- conflict: "conflict";
637
- no_pending_merge: "no_pending_merge";
638
- }>;
639
- isInMergeQueue: z.ZodBoolean;
640
- autoMergeEnabled: z.ZodBoolean;
641
- event: z.ZodOptional<z.ZodObject<{
642
- kind: z.ZodEnum<{
643
- auto_merge_disabled: "auto_merge_disabled";
644
- queue_removal: "queue_removal";
645
- }>;
646
- createdAt: z.ZodISODateTime;
647
- reason: z.ZodOptional<z.ZodString>;
648
- reasonCode: z.ZodOptional<z.ZodString>;
649
- }, z.core.$strict>>;
650
- }, z.core.$strict>>;
651
- observedAt: z.ZodISODateTime;
652
- checks: z.ZodArray<z.ZodObject<{
653
- name: z.ZodString;
654
- state: z.ZodString;
655
- link: z.ZodString;
656
- }, z.core.$strict>>;
657
- totalChecks: z.ZodNumber;
658
- truncated: z.ZodBoolean;
659
- diagnostic: z.ZodOptional<z.ZodString>;
660
- }, z.core.$strict>>;
661
- }, z.core.$strict>, z.ZodObject<{
662
- id: z.ZodUUID;
663
- source: z.ZodEnum<{
664
- agent: "agent";
665
- cezar: "cezar";
666
- }>;
667
- via: z.ZodEnum<{
668
- "ask-line": "ask-line";
669
- budget: "budget";
670
- "cez-message-wait": "cez-message-wait";
671
- "cez-worker-wait": "cez-worker-wait";
672
- cezar_ask: "cezar_ask";
673
- cezar_wait: "cezar_wait";
674
- cezar_wait_for_ci: "cezar_wait_for_ci";
675
- completion: "completion";
676
- "monitoring-line": "monitoring-line";
677
- "native-ask": "native-ask";
678
- "native-subagents": "native-subagents";
679
- "no-wait": "no-wait";
680
- "schedule-wakeup": "schedule-wakeup";
681
- }>;
682
- registeredAt: z.ZodISODateTime;
683
- phase: z.ZodEnum<{
684
- cancelled: "cancelled";
685
- delivered: "delivered";
686
- open: "open";
687
- resolved: "resolved";
688
- }>;
689
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
690
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
691
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
692
- turnId: z.ZodString;
693
- kind: z.ZodLiteral<"timer">;
694
- deadline: z.ZodISODateTime;
695
- seconds: z.ZodNumber;
696
- note: z.ZodOptional<z.ZodString>;
697
- }, z.core.$strict>, z.ZodObject<{
698
- id: z.ZodUUID;
699
- source: z.ZodEnum<{
700
- agent: "agent";
701
- cezar: "cezar";
702
- }>;
703
- via: z.ZodEnum<{
704
- "ask-line": "ask-line";
705
- budget: "budget";
706
- "cez-message-wait": "cez-message-wait";
707
- "cez-worker-wait": "cez-worker-wait";
708
- cezar_ask: "cezar_ask";
709
- cezar_wait: "cezar_wait";
710
- cezar_wait_for_ci: "cezar_wait_for_ci";
711
- completion: "completion";
712
- "monitoring-line": "monitoring-line";
713
- "native-ask": "native-ask";
714
- "native-subagents": "native-subagents";
715
- "no-wait": "no-wait";
716
- "schedule-wakeup": "schedule-wakeup";
717
- }>;
718
- registeredAt: z.ZodISODateTime;
719
- phase: z.ZodEnum<{
720
- cancelled: "cancelled";
721
- delivered: "delivered";
722
- open: "open";
723
- resolved: "resolved";
724
- }>;
725
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
726
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
727
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
728
- turnId: z.ZodString;
729
- kind: z.ZodLiteral<"human">;
730
- questions: z.ZodOptional<z.ZodArray<z.ZodObject<{
731
- id: z.ZodOptional<z.ZodString>;
732
- header: z.ZodString;
733
- question: z.ZodString;
734
- options: z.ZodOptional<z.ZodArray<z.ZodObject<{
735
- label: z.ZodString;
736
- description: z.ZodOptional<z.ZodString>;
737
- }, z.core.$strict>>>;
738
- multiSelect: z.ZodOptional<z.ZodBoolean>;
739
- allowFreeText: z.ZodOptional<z.ZodBoolean>;
740
- }, z.core.$strict>>>;
741
- context: z.ZodOptional<z.ZodString>;
742
- askSeq: z.ZodOptional<z.ZodNumber>;
743
- }, z.core.$strict>, z.ZodObject<{
744
- id: z.ZodUUID;
745
- source: z.ZodEnum<{
746
- agent: "agent";
747
- cezar: "cezar";
748
- }>;
749
- via: z.ZodEnum<{
750
- "ask-line": "ask-line";
751
- budget: "budget";
752
- "cez-message-wait": "cez-message-wait";
753
- "cez-worker-wait": "cez-worker-wait";
754
- cezar_ask: "cezar_ask";
755
- cezar_wait: "cezar_wait";
756
- cezar_wait_for_ci: "cezar_wait_for_ci";
757
- completion: "completion";
758
- "monitoring-line": "monitoring-line";
759
- "native-ask": "native-ask";
760
- "native-subagents": "native-subagents";
761
- "no-wait": "no-wait";
762
- "schedule-wakeup": "schedule-wakeup";
763
- }>;
764
- registeredAt: z.ZodISODateTime;
765
- phase: z.ZodEnum<{
766
- cancelled: "cancelled";
767
- delivered: "delivered";
768
- open: "open";
769
- resolved: "resolved";
770
- }>;
771
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
772
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
773
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
774
- turnId: z.ZodString;
775
- kind: z.ZodLiteral<"worker">;
776
- deadline: z.ZodOptional<z.ZodISODateTime>;
777
- timeoutSeconds: z.ZodOptional<z.ZodNumber>;
778
- mode: z.ZodOptional<z.ZodEnum<{
779
- all: "all";
780
- any: "any";
781
- one: "one";
782
- }>>;
783
- workerIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
784
- revisions: z.ZodOptional<z.ZodArray<z.ZodObject<{
785
- workerId: z.ZodUUID;
786
- revision: z.ZodNumber;
787
- }, z.core.$strict>>>;
788
- outcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
789
- workerId: z.ZodUUID;
790
- status: z.ZodEnum<{
791
- cancelled: "cancelled";
792
- done: "done";
793
- failed: "failed";
794
- review: "review";
795
- }>;
796
- observedAt: z.ZodISODateTime;
797
- summary: z.ZodOptional<z.ZodString>;
798
- revision: z.ZodOptional<z.ZodNumber>;
799
- }, z.core.$strict>>>;
800
- requestIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
801
- requestOutcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
802
- requestId: z.ZodUUID;
803
- status: z.ZodEnum<{
804
- cancelled: "cancelled";
805
- "completed-without-reply": "completed-without-reply";
806
- deleted: "deleted";
807
- destroyed: "destroyed";
808
- failed: "failed";
809
- "human-fallback": "human-fallback";
810
- replied: "replied";
811
- "replied-late": "replied-late";
812
- "sender-closed": "sender-closed";
813
- "timed-out": "timed-out";
814
- }>;
815
- observedAt: z.ZodISODateTime;
816
- replyId: z.ZodOptional<z.ZodUUID>;
817
- }, z.core.$strict>>>;
818
- result: z.ZodOptional<z.ZodObject<{
819
- reason: z.ZodEnum<{
820
- outcome: "outcome";
821
- timeout: "timeout";
822
- }>;
823
- }, z.core.$strict>>;
824
- wakeInputId: z.ZodOptional<z.ZodUUID>;
825
- }, z.core.$strict>, z.ZodObject<{
826
- id: z.ZodUUID;
827
- source: z.ZodEnum<{
828
- agent: "agent";
829
- cezar: "cezar";
830
- }>;
831
- via: z.ZodEnum<{
832
- "ask-line": "ask-line";
833
- budget: "budget";
834
- "cez-message-wait": "cez-message-wait";
835
- "cez-worker-wait": "cez-worker-wait";
836
- cezar_ask: "cezar_ask";
837
- cezar_wait: "cezar_wait";
838
- cezar_wait_for_ci: "cezar_wait_for_ci";
839
- completion: "completion";
840
- "monitoring-line": "monitoring-line";
841
- "native-ask": "native-ask";
842
- "native-subagents": "native-subagents";
843
- "no-wait": "no-wait";
844
- "schedule-wakeup": "schedule-wakeup";
845
- }>;
846
- registeredAt: z.ZodISODateTime;
847
- phase: z.ZodEnum<{
848
- cancelled: "cancelled";
849
- delivered: "delivered";
850
- open: "open";
851
- resolved: "resolved";
852
- }>;
853
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
854
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
855
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
856
- turnId: z.ZodString;
857
- kind: z.ZodLiteral<"process">;
858
- deadline: z.ZodISODateTime;
859
- timeoutSeconds: z.ZodNumber;
860
- pid: z.ZodNumber;
861
- startToken: z.ZodOptional<z.ZodString>;
862
- exitFile: z.ZodOptional<z.ZodString>;
863
- note: z.ZodOptional<z.ZodString>;
864
- result: z.ZodOptional<z.ZodObject<{
865
- outcome: z.ZodEnum<{
866
- deadline: "deadline";
867
- error: "error";
868
- exit_file: "exit_file";
869
- exited: "exited";
870
- }>;
871
- observedAt: z.ZodISODateTime;
872
- exitCode: z.ZodOptional<z.ZodNumber>;
873
- exitFileNote: z.ZodOptional<z.ZodLiteral<"not-an-exit-code">>;
874
- diagnostic: z.ZodOptional<z.ZodString>;
875
- }, z.core.$strict>>;
876
- }, z.core.$strict>, z.ZodObject<{
877
- id: z.ZodUUID;
878
- source: z.ZodEnum<{
879
- agent: "agent";
880
- cezar: "cezar";
881
- }>;
882
- via: z.ZodEnum<{
883
- "ask-line": "ask-line";
884
- budget: "budget";
885
- "cez-message-wait": "cez-message-wait";
886
- "cez-worker-wait": "cez-worker-wait";
887
- cezar_ask: "cezar_ask";
888
- cezar_wait: "cezar_wait";
889
- cezar_wait_for_ci: "cezar_wait_for_ci";
890
- completion: "completion";
891
- "monitoring-line": "monitoring-line";
892
- "native-ask": "native-ask";
893
- "native-subagents": "native-subagents";
894
- "no-wait": "no-wait";
895
- "schedule-wakeup": "schedule-wakeup";
896
- }>;
897
- registeredAt: z.ZodISODateTime;
898
- phase: z.ZodEnum<{
899
- cancelled: "cancelled";
900
- delivered: "delivered";
901
- open: "open";
902
- resolved: "resolved";
903
- }>;
904
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
905
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
906
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
907
- turnId: z.ZodString;
908
- kind: z.ZodLiteral<"peer">;
909
- deadline: z.ZodISODateTime;
910
- timeoutSeconds: z.ZodNumber;
911
- peerIds: z.ZodArray<z.ZodUUID>;
912
- result: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
913
- reason: z.ZodLiteral<"message">;
914
- peerRunId: z.ZodUUID;
915
- messageId: z.ZodUUID;
916
- }, z.core.$strict>, z.ZodObject<{
917
- reason: z.ZodLiteral<"settled">;
918
- peerRunId: z.ZodUUID;
919
- }, z.core.$strict>, z.ZodObject<{
920
- reason: z.ZodLiteral<"timeout">;
921
- }, z.core.$strict>], "reason">>;
922
- }, z.core.$strict>, z.ZodObject<{
923
- id: z.ZodUUID;
924
- registeredAt: z.ZodISODateTime;
925
- phase: z.ZodEnum<{
926
- cancelled: "cancelled";
927
- delivered: "delivered";
928
- open: "open";
929
- resolved: "resolved";
930
- }>;
931
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
932
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
933
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
934
- turnId: z.ZodString;
935
- kind: z.ZodLiteral<"subagent">;
936
- source: z.ZodLiteral<"cezar">;
937
- via: z.ZodLiteral<"native-subagents">;
938
- deadline: z.ZodISODateTime;
939
- children: z.ZodArray<z.ZodObject<{
940
- id: z.ZodString;
941
- status: z.ZodEnum<{
942
- cancelled: "cancelled";
943
- completed: "completed";
944
- failed: "failed";
945
- running: "running";
946
- }>;
947
- }, z.core.$strict>>;
948
- result: z.ZodOptional<z.ZodObject<{
949
- reason: z.ZodEnum<{
950
- interrupted: "interrupted";
951
- settled: "settled";
952
- superseded: "superseded";
953
- timeout: "timeout";
954
- }>;
955
- }, z.core.$strict>>;
956
- }, z.core.$strict>], "kind">;
957
- deduplicated: z.ZodBoolean;
958
- }, z.core.$strict>>>;
959
- lastWaits: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
960
- prUrl: z.ZodString;
961
- repository: z.ZodString;
962
- prNumber: z.ZodNumber;
963
- headSha: z.ZodString;
964
- id: z.ZodUUID;
965
- source: z.ZodEnum<{
966
- agent: "agent";
967
- cezar: "cezar";
968
- }>;
969
- via: z.ZodEnum<{
970
- "ask-line": "ask-line";
971
- budget: "budget";
972
- "cez-message-wait": "cez-message-wait";
973
- "cez-worker-wait": "cez-worker-wait";
974
- cezar_ask: "cezar_ask";
975
- cezar_wait: "cezar_wait";
976
- cezar_wait_for_ci: "cezar_wait_for_ci";
977
- completion: "completion";
978
- "monitoring-line": "monitoring-line";
979
- "native-ask": "native-ask";
980
- "native-subagents": "native-subagents";
981
- "no-wait": "no-wait";
982
- "schedule-wakeup": "schedule-wakeup";
983
- }>;
984
- registeredAt: z.ZodISODateTime;
985
- phase: z.ZodEnum<{
986
- cancelled: "cancelled";
987
- delivered: "delivered";
988
- open: "open";
989
- resolved: "resolved";
990
- }>;
991
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
992
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
993
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
994
- turnId: z.ZodString;
995
- kind: z.ZodLiteral<"pr">;
996
- deadline: z.ZodISODateTime;
997
- generation: z.ZodString;
998
- timeoutSeconds: z.ZodNumber;
999
- until: z.ZodEnum<{
1000
- checks: "checks";
1001
- merge: "merge";
1002
- merge_or_blocked: "merge_or_blocked";
1003
- }>;
1004
- wakeOnConflict: z.ZodBoolean;
1005
- callerHead: z.ZodOptional<z.ZodLiteral<true>>;
1006
- result: z.ZodOptional<z.ZodObject<{
1007
- outcome: z.ZodEnum<{
1008
- blocked: "blocked";
1009
- cancelled: "cancelled";
1010
- closed: "closed";
1011
- conflicting: "conflicting";
1012
- deadline: "deadline";
1013
- error: "error";
1014
- failed: "failed";
1015
- head_changed: "head_changed";
1016
- merged: "merged";
1017
- no_checks: "no_checks";
1018
- passed: "passed";
1019
- skipped: "skipped";
1020
- startup_failure: "startup_failure";
1021
- stuck: "stuck";
1022
- }>;
1023
- headSha: z.ZodString;
1024
- observedHeadSha: z.ZodOptional<z.ZodString>;
1025
- mergeable: z.ZodOptional<z.ZodEnum<{
1026
- CONFLICTING: "CONFLICTING";
1027
- MERGEABLE: "MERGEABLE";
1028
- UNKNOWN: "UNKNOWN";
1029
- }>>;
1030
- mergeStateStatus: z.ZodOptional<z.ZodString>;
1031
- mergedAt: z.ZodOptional<z.ZodISODateTime>;
1032
- mergeCommitSha: z.ZodOptional<z.ZodString>;
1033
- mergeBlock: z.ZodOptional<z.ZodObject<{
1034
- reason: z.ZodEnum<{
1035
- conflict: "conflict";
1036
- no_pending_merge: "no_pending_merge";
1037
- }>;
1038
- isInMergeQueue: z.ZodBoolean;
1039
- autoMergeEnabled: z.ZodBoolean;
1040
- event: z.ZodOptional<z.ZodObject<{
1041
- kind: z.ZodEnum<{
1042
- auto_merge_disabled: "auto_merge_disabled";
1043
- queue_removal: "queue_removal";
1044
- }>;
1045
- createdAt: z.ZodISODateTime;
1046
- reason: z.ZodOptional<z.ZodString>;
1047
- reasonCode: z.ZodOptional<z.ZodString>;
1048
- }, z.core.$strict>>;
1049
- }, z.core.$strict>>;
1050
- observedAt: z.ZodISODateTime;
1051
- checks: z.ZodArray<z.ZodObject<{
1052
- name: z.ZodString;
1053
- state: z.ZodString;
1054
- link: z.ZodString;
1055
- }, z.core.$strict>>;
1056
- totalChecks: z.ZodNumber;
1057
- truncated: z.ZodBoolean;
1058
- diagnostic: z.ZodOptional<z.ZodString>;
1059
- }, z.core.$strict>>;
1060
- }, z.core.$strict>, z.ZodObject<{
1061
- id: z.ZodUUID;
1062
- source: z.ZodEnum<{
1063
- agent: "agent";
1064
- cezar: "cezar";
1065
- }>;
1066
- via: z.ZodEnum<{
1067
- "ask-line": "ask-line";
1068
- budget: "budget";
1069
- "cez-message-wait": "cez-message-wait";
1070
- "cez-worker-wait": "cez-worker-wait";
1071
- cezar_ask: "cezar_ask";
1072
- cezar_wait: "cezar_wait";
1073
- cezar_wait_for_ci: "cezar_wait_for_ci";
1074
- completion: "completion";
1075
- "monitoring-line": "monitoring-line";
1076
- "native-ask": "native-ask";
1077
- "native-subagents": "native-subagents";
1078
- "no-wait": "no-wait";
1079
- "schedule-wakeup": "schedule-wakeup";
1080
- }>;
1081
- registeredAt: z.ZodISODateTime;
1082
- phase: z.ZodEnum<{
1083
- cancelled: "cancelled";
1084
- delivered: "delivered";
1085
- open: "open";
1086
- resolved: "resolved";
1087
- }>;
1088
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
1089
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
1090
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
1091
- turnId: z.ZodString;
1092
- kind: z.ZodLiteral<"timer">;
1093
- deadline: z.ZodISODateTime;
1094
- seconds: z.ZodNumber;
1095
- note: z.ZodOptional<z.ZodString>;
1096
- }, z.core.$strict>, z.ZodObject<{
1097
- id: z.ZodUUID;
1098
- source: z.ZodEnum<{
1099
- agent: "agent";
1100
- cezar: "cezar";
1101
- }>;
1102
- via: z.ZodEnum<{
1103
- "ask-line": "ask-line";
1104
- budget: "budget";
1105
- "cez-message-wait": "cez-message-wait";
1106
- "cez-worker-wait": "cez-worker-wait";
1107
- cezar_ask: "cezar_ask";
1108
- cezar_wait: "cezar_wait";
1109
- cezar_wait_for_ci: "cezar_wait_for_ci";
1110
- completion: "completion";
1111
- "monitoring-line": "monitoring-line";
1112
- "native-ask": "native-ask";
1113
- "native-subagents": "native-subagents";
1114
- "no-wait": "no-wait";
1115
- "schedule-wakeup": "schedule-wakeup";
1116
- }>;
1117
- registeredAt: z.ZodISODateTime;
1118
- phase: z.ZodEnum<{
1119
- cancelled: "cancelled";
1120
- delivered: "delivered";
1121
- open: "open";
1122
- resolved: "resolved";
1123
- }>;
1124
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
1125
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
1126
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
1127
- turnId: z.ZodString;
1128
- kind: z.ZodLiteral<"human">;
1129
- questions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1130
- id: z.ZodOptional<z.ZodString>;
1131
- header: z.ZodString;
1132
- question: z.ZodString;
1133
- options: z.ZodOptional<z.ZodArray<z.ZodObject<{
1134
- label: z.ZodString;
1135
- description: z.ZodOptional<z.ZodString>;
1136
- }, z.core.$strict>>>;
1137
- multiSelect: z.ZodOptional<z.ZodBoolean>;
1138
- allowFreeText: z.ZodOptional<z.ZodBoolean>;
1139
- }, z.core.$strict>>>;
1140
- context: z.ZodOptional<z.ZodString>;
1141
- askSeq: z.ZodOptional<z.ZodNumber>;
1142
- }, z.core.$strict>, z.ZodObject<{
1143
- id: z.ZodUUID;
1144
- source: z.ZodEnum<{
1145
- agent: "agent";
1146
- cezar: "cezar";
1147
- }>;
1148
- via: z.ZodEnum<{
1149
- "ask-line": "ask-line";
1150
- budget: "budget";
1151
- "cez-message-wait": "cez-message-wait";
1152
- "cez-worker-wait": "cez-worker-wait";
1153
- cezar_ask: "cezar_ask";
1154
- cezar_wait: "cezar_wait";
1155
- cezar_wait_for_ci: "cezar_wait_for_ci";
1156
- completion: "completion";
1157
- "monitoring-line": "monitoring-line";
1158
- "native-ask": "native-ask";
1159
- "native-subagents": "native-subagents";
1160
- "no-wait": "no-wait";
1161
- "schedule-wakeup": "schedule-wakeup";
1162
- }>;
1163
- registeredAt: z.ZodISODateTime;
1164
- phase: z.ZodEnum<{
1165
- cancelled: "cancelled";
1166
- delivered: "delivered";
1167
- open: "open";
1168
- resolved: "resolved";
1169
- }>;
1170
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
1171
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
1172
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
1173
- turnId: z.ZodString;
1174
- kind: z.ZodLiteral<"worker">;
1175
- deadline: z.ZodOptional<z.ZodISODateTime>;
1176
- timeoutSeconds: z.ZodOptional<z.ZodNumber>;
1177
- mode: z.ZodOptional<z.ZodEnum<{
1178
- all: "all";
1179
- any: "any";
1180
- one: "one";
1181
- }>>;
1182
- workerIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
1183
- revisions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1184
- workerId: z.ZodUUID;
1185
- revision: z.ZodNumber;
1186
- }, z.core.$strict>>>;
1187
- outcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1188
- workerId: z.ZodUUID;
1189
- status: z.ZodEnum<{
1190
- cancelled: "cancelled";
1191
- done: "done";
1192
- failed: "failed";
1193
- review: "review";
1194
- }>;
1195
- observedAt: z.ZodISODateTime;
1196
- summary: z.ZodOptional<z.ZodString>;
1197
- revision: z.ZodOptional<z.ZodNumber>;
1198
- }, z.core.$strict>>>;
1199
- requestIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
1200
- requestOutcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1201
- requestId: z.ZodUUID;
1202
- status: z.ZodEnum<{
1203
- cancelled: "cancelled";
1204
- "completed-without-reply": "completed-without-reply";
1205
- deleted: "deleted";
1206
- destroyed: "destroyed";
1207
- failed: "failed";
1208
- "human-fallback": "human-fallback";
1209
- replied: "replied";
1210
- "replied-late": "replied-late";
1211
- "sender-closed": "sender-closed";
1212
- "timed-out": "timed-out";
1213
- }>;
1214
- observedAt: z.ZodISODateTime;
1215
- replyId: z.ZodOptional<z.ZodUUID>;
1216
- }, z.core.$strict>>>;
1217
- result: z.ZodOptional<z.ZodObject<{
1218
- reason: z.ZodEnum<{
1219
- outcome: "outcome";
1220
- timeout: "timeout";
1221
- }>;
1222
- }, z.core.$strict>>;
1223
- wakeInputId: z.ZodOptional<z.ZodUUID>;
1224
- }, z.core.$strict>, z.ZodObject<{
1225
- id: z.ZodUUID;
1226
- source: z.ZodEnum<{
1227
- agent: "agent";
1228
- cezar: "cezar";
1229
- }>;
1230
- via: z.ZodEnum<{
1231
- "ask-line": "ask-line";
1232
- budget: "budget";
1233
- "cez-message-wait": "cez-message-wait";
1234
- "cez-worker-wait": "cez-worker-wait";
1235
- cezar_ask: "cezar_ask";
1236
- cezar_wait: "cezar_wait";
1237
- cezar_wait_for_ci: "cezar_wait_for_ci";
1238
- completion: "completion";
1239
- "monitoring-line": "monitoring-line";
1240
- "native-ask": "native-ask";
1241
- "native-subagents": "native-subagents";
1242
- "no-wait": "no-wait";
1243
- "schedule-wakeup": "schedule-wakeup";
1244
- }>;
1245
- registeredAt: z.ZodISODateTime;
1246
- phase: z.ZodEnum<{
1247
- cancelled: "cancelled";
1248
- delivered: "delivered";
1249
- open: "open";
1250
- resolved: "resolved";
1251
- }>;
1252
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
1253
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
1254
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
1255
- turnId: z.ZodString;
1256
- kind: z.ZodLiteral<"process">;
1257
- deadline: z.ZodISODateTime;
1258
- timeoutSeconds: z.ZodNumber;
1259
- pid: z.ZodNumber;
1260
- startToken: z.ZodOptional<z.ZodString>;
1261
- exitFile: z.ZodOptional<z.ZodString>;
1262
- note: z.ZodOptional<z.ZodString>;
1263
- result: z.ZodOptional<z.ZodObject<{
1264
- outcome: z.ZodEnum<{
1265
- deadline: "deadline";
1266
- error: "error";
1267
- exit_file: "exit_file";
1268
- exited: "exited";
1269
- }>;
1270
- observedAt: z.ZodISODateTime;
1271
- exitCode: z.ZodOptional<z.ZodNumber>;
1272
- exitFileNote: z.ZodOptional<z.ZodLiteral<"not-an-exit-code">>;
1273
- diagnostic: z.ZodOptional<z.ZodString>;
1274
- }, z.core.$strict>>;
1275
- }, z.core.$strict>, z.ZodObject<{
1276
- id: z.ZodUUID;
1277
- source: z.ZodEnum<{
1278
- agent: "agent";
1279
- cezar: "cezar";
1280
- }>;
1281
- via: z.ZodEnum<{
1282
- "ask-line": "ask-line";
1283
- budget: "budget";
1284
- "cez-message-wait": "cez-message-wait";
1285
- "cez-worker-wait": "cez-worker-wait";
1286
- cezar_ask: "cezar_ask";
1287
- cezar_wait: "cezar_wait";
1288
- cezar_wait_for_ci: "cezar_wait_for_ci";
1289
- completion: "completion";
1290
- "monitoring-line": "monitoring-line";
1291
- "native-ask": "native-ask";
1292
- "native-subagents": "native-subagents";
1293
- "no-wait": "no-wait";
1294
- "schedule-wakeup": "schedule-wakeup";
1295
- }>;
1296
- registeredAt: z.ZodISODateTime;
1297
- phase: z.ZodEnum<{
1298
- cancelled: "cancelled";
1299
- delivered: "delivered";
1300
- open: "open";
1301
- resolved: "resolved";
1302
- }>;
1303
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
1304
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
1305
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
1306
- turnId: z.ZodString;
1307
- kind: z.ZodLiteral<"peer">;
1308
- deadline: z.ZodISODateTime;
1309
- timeoutSeconds: z.ZodNumber;
1310
- peerIds: z.ZodArray<z.ZodUUID>;
1311
- result: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1312
- reason: z.ZodLiteral<"message">;
1313
- peerRunId: z.ZodUUID;
1314
- messageId: z.ZodUUID;
1315
- }, z.core.$strict>, z.ZodObject<{
1316
- reason: z.ZodLiteral<"settled">;
1317
- peerRunId: z.ZodUUID;
1318
- }, z.core.$strict>, z.ZodObject<{
1319
- reason: z.ZodLiteral<"timeout">;
1320
- }, z.core.$strict>], "reason">>;
1321
- }, z.core.$strict>, z.ZodObject<{
1322
- id: z.ZodUUID;
1323
- registeredAt: z.ZodISODateTime;
1324
- phase: z.ZodEnum<{
1325
- cancelled: "cancelled";
1326
- delivered: "delivered";
1327
- open: "open";
1328
- resolved: "resolved";
1329
- }>;
1330
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
1331
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
1332
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
1333
- turnId: z.ZodString;
1334
- kind: z.ZodLiteral<"subagent">;
1335
- source: z.ZodLiteral<"cezar">;
1336
- via: z.ZodLiteral<"native-subagents">;
1337
- deadline: z.ZodISODateTime;
1338
- children: z.ZodArray<z.ZodObject<{
1339
- id: z.ZodString;
1340
- status: z.ZodEnum<{
1341
- cancelled: "cancelled";
1342
- completed: "completed";
1343
- failed: "failed";
1344
- running: "running";
1345
- }>;
1346
- }, z.core.$strict>>;
1347
- result: z.ZodOptional<z.ZodObject<{
1348
- reason: z.ZodEnum<{
1349
- interrupted: "interrupted";
1350
- settled: "settled";
1351
- superseded: "superseded";
1352
- timeout: "timeout";
1353
- }>;
1354
- }, z.core.$strict>>;
1355
- }, z.core.$strict>], "kind">>>;
1356
- previewServers: z.ZodOptional<z.ZodArray<z.ZodObject<{
1357
- port: z.ZodNumber;
1358
- command: z.ZodString;
1359
- cwd: z.ZodOptional<z.ZodString>;
1360
- label: z.ZodString;
1361
- path: z.ZodOptional<z.ZodString>;
1362
- registeredAt: z.ZodISODateTime;
1363
- answeredAtRegistration: z.ZodBoolean;
1364
- }, z.core.$strip>>>;
1365
- taskImages: z.ZodOptional<z.ZodArray<z.ZodString>>;
1366
- model: z.ZodOptional<z.ZodString>;
1367
- effort: z.ZodOptional<z.ZodString>;
1368
- modelIdentity: z.ZodOptional<z.ZodString>;
1369
- removedRunner: z.ZodOptional<z.ZodString>;
1370
- agentProfile: z.ZodOptional<z.ZodString>;
1371
- systemPrompt: z.ZodOptional<z.ZodString>;
1372
- generateFollowups: z.ZodOptional<z.ZodBoolean>;
1373
- autonomous: z.ZodOptional<z.ZodBoolean>;
1374
- completionAction: z.ZodOptional<z.ZodObject<{
1375
- id: z.ZodString;
1376
- phase: z.ZodEnum<{
1377
- blocked: "blocked";
1378
- complete: "complete";
1379
- pending: "pending";
1380
- }>;
1381
- message: z.ZodOptional<z.ZodString>;
1382
- }, z.core.$strip>>;
1383
- archiveBlocker: z.ZodOptional<z.ZodObject<{
1384
- message: z.ZodString;
1385
- runId: z.ZodOptional<z.ZodString>;
1386
- pullRequestUrl: z.ZodOptional<z.ZodString>;
1387
- }, z.core.$strip>>;
1388
- status: z.ZodEnum<{
1389
- cancelled: "cancelled";
1390
- done: "done";
1391
- failed: "failed";
1392
- queued: "queued";
1393
- review: "review";
1394
- running: "running";
1395
- waiting: "waiting";
1396
- }>;
1397
- createdAt: z.ZodString;
1398
- startedAt: z.ZodOptional<z.ZodString>;
1399
- finishedAt: z.ZodOptional<z.ZodString>;
1400
- tokensUsed: z.ZodNumber;
1401
- inputTokens: z.ZodOptional<z.ZodNumber>;
1402
- outputTokens: z.ZodOptional<z.ZodNumber>;
1403
- costUsd: z.ZodOptional<z.ZodNumber>;
1404
- pullRequestUrl: z.ZodOptional<z.ZodString>;
1405
- referencedPullRequestUrl: z.ZodOptional<z.ZodString>;
1406
- prNumber: z.ZodOptional<z.ZodNumber>;
1407
- issueNumber: z.ZodOptional<z.ZodNumber>;
1408
- referencedIssueNumberSeeded: z.ZodOptional<z.ZodBoolean>;
1409
- titleOrigin: z.ZodOptional<z.ZodEnum<{
1410
- auto: "auto";
1411
- marker: "marker";
1412
- user: "user";
1413
- }>>;
1414
- markerRefs: z.ZodOptional<z.ZodObject<{
1415
- pr: z.ZodOptional<z.ZodNumber>;
1416
- issue: z.ZodOptional<z.ZodNumber>;
1417
- }, z.core.$strip>>;
1418
- referencedPrCandidates: z.ZodOptional<z.ZodArray<z.ZodString>>;
1419
- referencedIssueUrl: z.ZodOptional<z.ZodString>;
1420
- referencedIssueCandidates: z.ZodOptional<z.ZodArray<z.ZodString>>;
1421
- worktree: z.ZodOptional<z.ZodLiteral<false>>;
1422
- worktreePath: z.ZodOptional<z.ZodString>;
1423
- branch: z.ZodOptional<z.ZodString>;
1424
- baseBranch: z.ZodOptional<z.ZodString>;
1425
- worktreeReclaimedAt: z.ZodOptional<z.ZodString>;
1426
- groupId: z.ZodOptional<z.ZodString>;
1427
- variant: z.ZodOptional<z.ZodString>;
1428
- clientRequestId: z.ZodOptional<z.ZodString>;
1429
- clientRequestHash: z.ZodOptional<z.ZodString>;
1430
- peakRssBytes: z.ZodOptional<z.ZodNumber>;
1431
- peakProcCount: z.ZodOptional<z.ZodNumber>;
1432
- archivedAt: z.ZodOptional<z.ZodString>;
1433
- autoArchive: z.ZodOptional<z.ZodObject<{
1434
- reason: z.ZodLiteral<"pull-requests-merged">;
1435
- archivedAt: z.ZodString;
1436
- fingerprint: z.ZodString;
1437
- pullRequests: z.ZodArray<z.ZodObject<{
1438
- owner: z.ZodString;
1439
- repo: z.ZodString;
1440
- number: z.ZodNumber;
1441
- mergedAt: z.ZodString;
1442
- }, z.core.$strip>>;
1443
- }, z.core.$strip>>;
1444
- manualUnarchivedAt: z.ZodOptional<z.ZodString>;
1445
- pinned: z.ZodOptional<z.ZodBoolean>;
1446
- pinnedAt: z.ZodOptional<z.ZodString>;
1447
- seenAt: z.ZodOptional<z.ZodString>;
1448
- currentStepId: z.ZodOptional<z.ZodString>;
1449
- error: z.ZodOptional<z.ZodString>;
1450
- delegation: z.ZodCatch<z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1451
- role: z.ZodLiteral<"root">;
1452
- conversation: z.ZodOptional<z.ZodObject<{
1453
- messages: z.ZodArray<z.ZodObject<{
1454
- senderRunId: z.ZodUUID;
1455
- recipientRunId: z.ZodUUID;
1456
- kind: z.ZodEnum<{
1457
- "follow-up": "follow-up";
1458
- progress: "progress";
1459
- reply: "reply";
1460
- request: "request";
1461
- }>;
1462
- requestId: z.ZodOptional<z.ZodUUID>;
1463
- relationship: z.ZodOptional<z.ZodEnum<{
1464
- family: "family";
1465
- peer: "peer";
1466
- }>>;
1467
- id: z.ZodUUID;
1468
- text: z.ZodString;
1469
- createdAt: z.ZodISODateTime;
1470
- deadline: z.ZodOptional<z.ZodISODateTime>;
1471
- requestHash: z.ZodString;
1472
- state: z.ZodEnum<{
1473
- accepted: "accepted";
1474
- "continuation-required": "continuation-required";
1475
- destroyed: "destroyed";
1476
- late: "late";
1477
- }>;
1478
- resumed: z.ZodOptional<z.ZodLiteral<true>>;
1479
- instruction: z.ZodOptional<z.ZodString>;
1480
- question: z.ZodOptional<z.ZodObject<{
1481
- context: z.ZodOptional<z.ZodString>;
1482
- questions: z.ZodArray<z.ZodObject<{
1483
- id: z.ZodOptional<z.ZodString>;
1484
- header: z.ZodString;
1485
- question: z.ZodString;
1486
- options: z.ZodOptional<z.ZodArray<z.ZodObject<{
1487
- label: z.ZodString;
1488
- description: z.ZodOptional<z.ZodString>;
1489
- }, z.core.$strict>>>;
1490
- multiSelect: z.ZodOptional<z.ZodBoolean>;
1491
- allowFreeText: z.ZodOptional<z.ZodBoolean>;
1492
- }, z.core.$strict>>;
1493
- }, z.core.$strict>>;
1494
- }, z.core.$strict>>;
1495
- outcomes: z.ZodArray<z.ZodObject<{
1496
- requestId: z.ZodUUID;
1497
- status: z.ZodEnum<{
1498
- cancelled: "cancelled";
1499
- "completed-without-reply": "completed-without-reply";
1500
- deleted: "deleted";
1501
- destroyed: "destroyed";
1502
- failed: "failed";
1503
- "human-fallback": "human-fallback";
1504
- replied: "replied";
1505
- "replied-late": "replied-late";
1506
- "sender-closed": "sender-closed";
1507
- "timed-out": "timed-out";
1508
- }>;
1509
- observedAt: z.ZodISODateTime;
1510
- replyId: z.ZodOptional<z.ZodUUID>;
1511
- }, z.core.$strict>>;
1512
- }, z.core.$strict>>;
1513
- permissions: z.ZodArray<z.ZodEnum<{
1514
- destroy: "destroy";
1515
- diff: "diff";
1516
- inspect: "inspect";
1517
- spawn: "spawn";
1518
- steer: "steer";
1519
- stop: "stop";
1520
- wait: "wait";
1521
- }>>;
1522
- spawnGrant: z.ZodOptional<z.ZodObject<{
1523
- kinds: z.ZodArray<z.ZodEnum<{
1524
- "owned-isolated": "owned-isolated";
1525
- shared: "shared";
1526
- }>>;
1527
- live: z.ZodNumber;
1528
- children: z.ZodOptional<z.ZodObject</*elided*/ any, z.core.$strict>>;
1529
- }, z.core.$strict>>;
1530
- receipts: z.ZodArray<z.ZodObject<{
1531
- requestId: z.ZodUUID;
1532
- workerId: z.ZodUUID;
1533
- requestHash: z.ZodString;
1534
- supervisorRunId: z.ZodOptional<z.ZodUUID>;
1535
- deletion: z.ZodOptional<z.ZodObject<{
1536
- phase: z.ZodEnum<{
1537
- complete: "complete";
1538
- pending: "pending";
1539
- }>;
1540
- revision: z.ZodNumber;
1541
- resourceId: z.ZodUUID;
1542
- generation: z.ZodUUID;
1543
- }, z.core.$strict>>;
1544
- }, z.core.$strict>>;
1545
- wait: z.ZodOptional<z.ZodObject<{
1546
- id: z.ZodUUID;
1547
- workerIds: z.ZodArray<z.ZodUUID>;
1548
- requestIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
1549
- requestOutcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1550
- requestId: z.ZodUUID;
1551
- status: z.ZodEnum<{
1552
- cancelled: "cancelled";
1553
- "completed-without-reply": "completed-without-reply";
1554
- deleted: "deleted";
1555
- destroyed: "destroyed";
1556
- failed: "failed";
1557
- "human-fallback": "human-fallback";
1558
- replied: "replied";
1559
- "replied-late": "replied-late";
1560
- "sender-closed": "sender-closed";
1561
- "timed-out": "timed-out";
1562
- }>;
1563
- observedAt: z.ZodISODateTime;
1564
- replyId: z.ZodOptional<z.ZodUUID>;
1565
- }, z.core.$strict>>>;
1566
- deadline: z.ZodISODateTime;
1567
- mode: z.ZodOptional<z.ZodEnum<{
1568
- all: "all";
1569
- any: "any";
1570
- one: "one";
1571
- }>>;
1572
- revisions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1573
- workerId: z.ZodUUID;
1574
- revision: z.ZodNumber;
1575
- }, z.core.$strict>>>;
1576
- reason: z.ZodOptional<z.ZodEnum<{
1577
- cancelled: "cancelled";
1578
- message: "message";
1579
- outcome: "outcome";
1580
- timeout: "timeout";
1581
- }>>;
1582
- phase: z.ZodEnum<{
1583
- parked: "parked";
1584
- registered: "registered";
1585
- "wake-pending": "wake-pending";
1586
- }>;
1587
- outcomes: z.ZodArray<z.ZodObject<{
1588
- workerId: z.ZodUUID;
1589
- status: z.ZodEnum<{
1590
- cancelled: "cancelled";
1591
- done: "done";
1592
- failed: "failed";
1593
- review: "review";
1594
- }>;
1595
- observedAt: z.ZodISODateTime;
1596
- summary: z.ZodOptional<z.ZodString>;
1597
- revision: z.ZodOptional<z.ZodNumber>;
1598
- }, z.core.$strict>>;
1599
- wakeId: z.ZodOptional<z.ZodUUID>;
1600
- }, z.core.$strict>>;
1601
- lastWait: z.ZodOptional<z.ZodObject<{
1602
- id: z.ZodUUID;
1603
- workerIds: z.ZodArray<z.ZodUUID>;
1604
- requestIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
1605
- requestOutcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1606
- requestId: z.ZodUUID;
1607
- status: z.ZodEnum<{
1608
- cancelled: "cancelled";
1609
- "completed-without-reply": "completed-without-reply";
1610
- deleted: "deleted";
1611
- destroyed: "destroyed";
1612
- failed: "failed";
1613
- "human-fallback": "human-fallback";
1614
- replied: "replied";
1615
- "replied-late": "replied-late";
1616
- "sender-closed": "sender-closed";
1617
- "timed-out": "timed-out";
1618
- }>;
1619
- observedAt: z.ZodISODateTime;
1620
- replyId: z.ZodOptional<z.ZodUUID>;
1621
- }, z.core.$strict>>>;
1622
- deadline: z.ZodISODateTime;
1623
- mode: z.ZodOptional<z.ZodEnum<{
1624
- all: "all";
1625
- any: "any";
1626
- one: "one";
1627
- }>>;
1628
- revisions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1629
- workerId: z.ZodUUID;
1630
- revision: z.ZodNumber;
1631
- }, z.core.$strict>>>;
1632
- reason: z.ZodOptional<z.ZodEnum<{
1633
- cancelled: "cancelled";
1634
- message: "message";
1635
- outcome: "outcome";
1636
- timeout: "timeout";
1637
- }>>;
1638
- phase: z.ZodEnum<{
1639
- parked: "parked";
1640
- registered: "registered";
1641
- "wake-pending": "wake-pending";
1642
- }>;
1643
- outcomes: z.ZodArray<z.ZodObject<{
1644
- workerId: z.ZodUUID;
1645
- status: z.ZodEnum<{
1646
- cancelled: "cancelled";
1647
- done: "done";
1648
- failed: "failed";
1649
- review: "review";
1650
- }>;
1651
- observedAt: z.ZodISODateTime;
1652
- summary: z.ZodOptional<z.ZodString>;
1653
- revision: z.ZodOptional<z.ZodNumber>;
1654
- }, z.core.$strict>>;
1655
- wakeId: z.ZodOptional<z.ZodUUID>;
1656
- }, z.core.$strict>>;
1657
- results: z.ZodOptional<z.ZodArray<z.ZodObject<{
1658
- workerId: z.ZodUUID;
1659
- revision: z.ZodNumber;
1660
- snapshotId: z.ZodUUID;
1661
- observedAt: z.ZodISODateTime;
1662
- lastExecutionOutcome: z.ZodEnum<{
1663
- cancelled: "cancelled";
1664
- completed: "completed";
1665
- failed: "failed";
1666
- "review-ready": "review-ready";
1667
- running: "running";
1668
- }>;
1669
- previous: z.ZodOptional<z.ZodObject<{
1670
- revision: z.ZodNumber;
1671
- observedAt: z.ZodISODateTime;
1672
- lastExecutionOutcome: z.ZodEnum<{
1673
- cancelled: "cancelled";
1674
- completed: "completed";
1675
- failed: "failed";
1676
- "review-ready": "review-ready";
1677
- running: "running";
1678
- }>;
1679
- }, z.core.$strict>>;
1680
- }, z.core.$strict>>>;
1681
- finishRequestedAt: z.ZodOptional<z.ZodISODateTime>;
1682
- historyDeletion: z.ZodOptional<z.ZodLiteral<"pending">>;
1683
- completion: z.ZodOptional<z.ZodObject<{
1684
- phase: z.ZodEnum<{
1685
- attention: "attention";
1686
- waiting: "waiting";
1687
- }>;
1688
- waitId: z.ZodOptional<z.ZodUUID>;
1689
- }, z.core.$strict>>;
1690
- }, z.core.$strict>, z.ZodObject<{
1691
- role: z.ZodLiteral<"worker">;
1692
- wait: z.ZodOptional<z.ZodObject<{
1693
- id: z.ZodUUID;
1694
- workerIds: z.ZodArray<z.ZodUUID>;
1695
- requestIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
1696
- requestOutcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1697
- requestId: z.ZodUUID;
1698
- status: z.ZodEnum<{
1699
- cancelled: "cancelled";
1700
- "completed-without-reply": "completed-without-reply";
1701
- deleted: "deleted";
1702
- destroyed: "destroyed";
1703
- failed: "failed";
1704
- "human-fallback": "human-fallback";
1705
- replied: "replied";
1706
- "replied-late": "replied-late";
1707
- "sender-closed": "sender-closed";
1708
- "timed-out": "timed-out";
1709
- }>;
1710
- observedAt: z.ZodISODateTime;
1711
- replyId: z.ZodOptional<z.ZodUUID>;
1712
- }, z.core.$strict>>>;
1713
- deadline: z.ZodISODateTime;
1714
- mode: z.ZodOptional<z.ZodEnum<{
1715
- all: "all";
1716
- any: "any";
1717
- one: "one";
1718
- }>>;
1719
- revisions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1720
- workerId: z.ZodUUID;
1721
- revision: z.ZodNumber;
1722
- }, z.core.$strict>>>;
1723
- reason: z.ZodOptional<z.ZodEnum<{
1724
- cancelled: "cancelled";
1725
- message: "message";
1726
- outcome: "outcome";
1727
- timeout: "timeout";
1728
- }>>;
1729
- phase: z.ZodEnum<{
1730
- parked: "parked";
1731
- registered: "registered";
1732
- "wake-pending": "wake-pending";
1733
- }>;
1734
- outcomes: z.ZodArray<z.ZodObject<{
1735
- workerId: z.ZodUUID;
1736
- status: z.ZodEnum<{
1737
- cancelled: "cancelled";
1738
- done: "done";
1739
- failed: "failed";
1740
- review: "review";
1741
- }>;
1742
- observedAt: z.ZodISODateTime;
1743
- summary: z.ZodOptional<z.ZodString>;
1744
- revision: z.ZodOptional<z.ZodNumber>;
1745
- }, z.core.$strict>>;
1746
- wakeId: z.ZodOptional<z.ZodUUID>;
1747
- }, z.core.$strict>>;
1748
- lastWait: z.ZodOptional<z.ZodObject<{
1749
- id: z.ZodUUID;
1750
- workerIds: z.ZodArray<z.ZodUUID>;
1751
- requestIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
1752
- requestOutcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1753
- requestId: z.ZodUUID;
1754
- status: z.ZodEnum<{
1755
- cancelled: "cancelled";
1756
- "completed-without-reply": "completed-without-reply";
1757
- deleted: "deleted";
1758
- destroyed: "destroyed";
1759
- failed: "failed";
1760
- "human-fallback": "human-fallback";
1761
- replied: "replied";
1762
- "replied-late": "replied-late";
1763
- "sender-closed": "sender-closed";
1764
- "timed-out": "timed-out";
1765
- }>;
1766
- observedAt: z.ZodISODateTime;
1767
- replyId: z.ZodOptional<z.ZodUUID>;
1768
- }, z.core.$strict>>>;
1769
- deadline: z.ZodISODateTime;
1770
- mode: z.ZodOptional<z.ZodEnum<{
1771
- all: "all";
1772
- any: "any";
1773
- one: "one";
1774
- }>>;
1775
- revisions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1776
- workerId: z.ZodUUID;
1777
- revision: z.ZodNumber;
1778
- }, z.core.$strict>>>;
1779
- reason: z.ZodOptional<z.ZodEnum<{
1780
- cancelled: "cancelled";
1781
- message: "message";
1782
- outcome: "outcome";
1783
- timeout: "timeout";
1784
- }>>;
1785
- phase: z.ZodEnum<{
1786
- parked: "parked";
1787
- registered: "registered";
1788
- "wake-pending": "wake-pending";
1789
- }>;
1790
- outcomes: z.ZodArray<z.ZodObject<{
1791
- workerId: z.ZodUUID;
1792
- status: z.ZodEnum<{
1793
- cancelled: "cancelled";
1794
- done: "done";
1795
- failed: "failed";
1796
- review: "review";
1797
- }>;
1798
- observedAt: z.ZodISODateTime;
1799
- summary: z.ZodOptional<z.ZodString>;
1800
- revision: z.ZodOptional<z.ZodNumber>;
1801
- }, z.core.$strict>>;
1802
- wakeId: z.ZodOptional<z.ZodUUID>;
1803
- }, z.core.$strict>>;
1804
- permissions: z.ZodArray<z.ZodEnum<{
1805
- destroy: "destroy";
1806
- diff: "diff";
1807
- inspect: "inspect";
1808
- spawn: "spawn";
1809
- steer: "steer";
1810
- stop: "stop";
1811
- wait: "wait";
1812
- }>>;
1813
- spawnGrant: z.ZodOptional<z.ZodObject<{
1814
- kinds: z.ZodArray<z.ZodEnum<{
1815
- "owned-isolated": "owned-isolated";
1816
- shared: "shared";
1817
- }>>;
1818
- live: z.ZodNumber;
1819
- children: z.ZodOptional<z.ZodObject<any, z.core.$strict>>;
1820
- }, z.core.$strict>>;
1821
- parentRunId: z.ZodUUID;
1822
- supervisorRunId: z.ZodOptional<z.ZodUUID>;
1823
- workspace: z.ZodDiscriminatedUnion<[z.ZodObject<{
1824
- ownerRunId: z.ZodUUID;
1825
- resourceId: z.ZodUUID;
1826
- kind: z.ZodLiteral<"owned-isolated">;
1827
- path: z.ZodString;
1828
- branch: z.ZodString;
1829
- baselineSha: z.ZodString;
1830
- }, z.core.$strict>, z.ZodObject<{
1831
- ownerRunId: z.ZodUUID;
1832
- resourceId: z.ZodUUID;
1833
- kind: z.ZodLiteral<"shared">;
1834
- path: z.ZodString;
1835
- hostRunId: z.ZodUUID;
1836
- baselineSha: z.ZodString;
1837
- }, z.core.$strict>], "kind">;
1838
- destroy: z.ZodOptional<z.ZodObject<{
1839
- requestedAt: z.ZodISODateTime;
1840
- phase: z.ZodEnum<{
1841
- cleaning: "cleaning";
1842
- complete: "complete";
1843
- incomplete: "incomplete";
1844
- requested: "requested";
1845
- terminating: "terminating";
1846
- }>;
1847
- remaining: z.ZodArray<z.ZodEnum<{
1848
- branch: "branch";
1849
- process: "process";
1850
- worktree: "worktree";
1851
- }>>;
1852
- error: z.ZodOptional<z.ZodString>;
1853
- discardWork: z.ZodOptional<z.ZodLiteral<true>>;
1854
- }, z.core.$strict>>;
1855
- context: z.ZodOptional<z.ZodObject<{
1856
- text: z.ZodOptional<z.ZodString>;
1857
- inputs: z.ZodArray<z.ZodObject<{
1858
- source: z.ZodDiscriminatedUnion<[z.ZodObject<{
1859
- kind: z.ZodLiteral<"baseline-file">;
1860
- path: z.ZodString;
1861
- }, z.core.$strict>, z.ZodObject<{
1862
- kind: z.ZodLiteral<"parent-attachment">;
1863
- id: z.ZodString;
1864
- }, z.core.$strict>, z.ZodObject<{
1865
- kind: z.ZodLiteral<"parent-file">;
1866
- path: z.ZodString;
1867
- }, z.core.$strict>], "kind">;
1868
- path: z.ZodString;
1869
- sha256: z.ZodString;
1870
- bytes: z.ZodNumber;
1871
- }, z.core.$strict>>;
1872
- }, z.core.$strict>>;
1873
- executionRevision: z.ZodOptional<z.ZodNumber>;
1874
- executionStartSeq: z.ZodOptional<z.ZodNumber>;
1875
- }, z.core.$strict>, z.ZodObject<{
1876
- role: z.ZodLiteral<"invalid">;
1877
- }, z.core.$strict>], "role">>>;
1878
- lastWaitsError: z.ZodCatch<z.ZodOptional<z.ZodString>>;
1879
- automaticWakes: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
1880
- waitDeliveryFailures: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
1881
- runner: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1882
- notify: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
1883
- webhook: z.ZodCatch<z.ZodOptional<z.ZodObject<{
1884
- lastDeliveredAt: z.ZodOptional<z.ZodString>;
1885
- lastError: z.ZodOptional<z.ZodString>;
1886
- lastErrorWebhookId: z.ZodOptional<z.ZodString>;
1887
- }, z.core.$strip>>>;
1888
- destroyRetry: z.ZodCatch<z.ZodOptional<z.ZodObject<{
1889
- attempts: z.ZodNumber;
1890
- nextAt: z.ZodISODateTime;
1891
- needsAttention: z.ZodOptional<z.ZodLiteral<true>>;
1892
- }, z.core.$strict>>>;
1893
- stopping: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
1894
- autoResumeAt: z.ZodCatch<z.ZodOptional<z.ZodString>>;
1895
- autoResumeAttempts: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
1896
- autoResumeReason: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
1897
- "provider-error": "provider-error";
1898
- "usage-limit": "usage-limit";
1899
- }>>>;
1900
- parkReason: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
1901
- "closing-wakes": "closing-wakes";
1902
- hold: "hold";
1903
- turn: "turn";
1904
- }>>>;
1905
- hasPendingPermission: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
1906
- pullRequests: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodObject<{
1907
- number: z.ZodNumber;
1908
- url: z.ZodOptional<z.ZodString>;
1909
- source: z.ZodEnum<{
1910
- created: "created";
1911
- declared: "declared";
1912
- }>;
1913
- }, z.core.$strip>>>>;
1914
- worktreeSetup: z.ZodCatch<z.ZodOptional<z.ZodObject<{
1915
- status: z.ZodEnum<{
1916
- done: "done";
1917
- failed: "failed";
1918
- running: "running";
1919
- }>;
1920
- startedAt: z.ZodString;
1921
- finishedAt: z.ZodOptional<z.ZodString>;
1922
- durationMs: z.ZodOptional<z.ZodNumber>;
1923
- error: z.ZodOptional<z.ZodString>;
1924
- }, z.core.$strip>>>;
1925
- workflowCursor: z.ZodCatch<z.ZodOptional<z.ZodObject<{
1926
- stepId: z.ZodString;
1927
- mode: z.ZodEnum<{
1928
- resume: "resume";
1929
- start: "start";
1930
- }>;
1931
- }, z.core.$strip>>>;
1932
- doneAccepted: z.ZodCatch<z.ZodOptional<z.ZodObject<{
1933
- session: z.ZodString;
1934
- at: z.ZodString;
1935
- seq: z.ZodNumber;
1936
- openWaits: z.ZodArray<z.ZodString>;
1937
- settledWaits: z.ZodArray<z.ZodString>;
1938
- lastInput: z.ZodOptional<z.ZodString>;
1939
- summary: z.ZodOptional<z.ZodString>;
1940
- freeTurn: z.ZodOptional<z.ZodLiteral<true>>;
1941
- }, z.core.$strip>>>;
1942
- archived: z.ZodDefault<z.ZodBoolean>;
1943
- workflowDef: z.ZodCatch<z.ZodOptional<z.ZodObject<{
1944
- name: z.ZodString;
1945
- description: z.ZodOptional<z.ZodString>;
1946
- steps: z.ZodArray<z.ZodObject<{
1947
- id: z.ZodString;
1948
- name: z.ZodOptional<z.ZodString>;
1949
- prompt: z.ZodOptional<z.ZodString>;
1950
- skill: z.ZodOptional<z.ZodString>;
1951
- model: z.ZodOptional<z.ZodString>;
1952
- effort: z.ZodOptional<z.ZodString>;
1953
- timeoutMs: z.ZodOptional<z.ZodNumber>;
1954
- runner: z.ZodOptional<z.ZodString>;
1955
- agentProfile: z.ZodOptional<z.ZodString>;
1956
- allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1957
- bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
1958
- command: z.ZodOptional<z.ZodString>;
1959
- onFail: z.ZodOptional<z.ZodObject<{
1960
- retry: z.ZodString;
1961
- max: z.ZodDefault<z.ZodNumber>;
1962
- }, z.core.$strip>>;
1963
- }, z.core.$strip>>;
1964
- source: z.ZodEnum<{
1965
- "built-in": "built-in";
1966
- file: "file";
1967
- }>;
1968
- path: z.ZodOptional<z.ZodString>;
1969
- }, z.core.$strip>>>;
1970
- steps: z.ZodArray<z.ZodObject<{
1971
- id: z.ZodString;
1972
- name: z.ZodString;
1973
- kind: z.ZodEnum<{
1974
- agent: "agent";
1975
- check: "check";
1976
- }>;
1977
- status: z.ZodEnum<{
1978
- cancelled: "cancelled";
1979
- done: "done";
1980
- failed: "failed";
1981
- pending: "pending";
1982
- review: "review";
1983
- running: "running";
1984
- skipped: "skipped";
1985
- waiting: "waiting";
1986
- }>;
1987
- iterations: z.ZodNumber;
1988
- retriesUsed: z.ZodOptional<z.ZodNumber>;
1989
- tokensUsed: z.ZodNumber;
1990
- inputTokens: z.ZodOptional<z.ZodNumber>;
1991
- outputTokens: z.ZodOptional<z.ZodNumber>;
1992
- usageInvocationsStarted: z.ZodOptional<z.ZodNumber>;
1993
- usageInvocationsObserved: z.ZodOptional<z.ZodNumber>;
1994
- usageTurnsStarted: z.ZodOptional<z.ZodNumber>;
1995
- usageTurnsRecorded: z.ZodOptional<z.ZodNumber>;
1996
- usageInvocationEpoch: z.ZodOptional<z.ZodNumber>;
1997
- startedAt: z.ZodOptional<z.ZodString>;
1998
- finishedAt: z.ZodOptional<z.ZodString>;
1999
- error: z.ZodOptional<z.ZodString>;
2000
- sessionId: z.ZodOptional<z.ZodString>;
2001
- removedBackend: z.ZodOptional<z.ZodString>;
2002
- profileId: z.ZodOptional<z.ZodString>;
2003
- skillPath: z.ZodOptional<z.ZodString>;
2004
- costUsd: z.ZodOptional<z.ZodNumber>;
2005
- synthetic: z.ZodOptional<z.ZodLiteral<"continuation">>;
2006
- continuesStepId: z.ZodOptional<z.ZodString>;
2007
- backend: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
2008
- }, z.core.$strip>>;
2009
- automation: z.ZodOptional<z.ZodObject<{
2010
- automationId: z.ZodString;
2011
- receiptId: z.ZodString;
2012
- event: z.ZodString;
2013
- automationRevision: z.ZodNumber;
2014
- githubUrl: z.ZodString;
2015
- }, z.core.$strip>>;
2016
- automationTrigger: z.ZodOptional<z.ZodObject<{
2017
- automationId: z.ZodString;
2018
- receiptId: z.ZodString;
2019
- trigger: z.ZodEnum<{
2020
- "catch-up": "catch-up";
2021
- manual: "manual";
2022
- schedule: "schedule";
2023
- }>;
2024
- occurrenceAt: z.ZodString;
2025
- automationRevision: z.ZodNumber;
2026
- }, z.core.$strip>>;
2027
- handoffRecords: z.ZodCatch<z.ZodOptional<z.ZodObject<{
2028
- autosave: z.ZodArray<z.ZodObject<{
2029
- at: z.ZodString;
2030
- note: z.ZodString;
2031
- periodic: z.ZodOptional<z.ZodObject<{
2032
- branch: z.ZodNullable<z.ZodString>;
2033
- count: z.ZodNumber;
2034
- first: z.ZodNullable<z.ZodString>;
2035
- latest: z.ZodNullable<z.ZodString>;
2036
- }, z.core.$strip>>;
2037
- }, z.core.$strip>>;
2038
- }, z.core.$strip>>>;
2039
- }, z.core.$strip>;
2040
- /** Read legacy wait fields into the wait list and salvage per entry, identically for live stores
2041
- * and the read-only workspace index. */
2042
- export declare function parseRunRecords(raw: unknown): z.ZodSafeParseResult<{
2043
- archiveWhenDone?: boolean | undefined;
2044
- autoMergePr?: boolean | undefined;
2045
- allowWorkers?: boolean | undefined;
2046
- allowMessaging?: boolean | undefined;
2047
- id: string;
2048
- title: string;
2049
- titleSummary?: string | undefined;
2050
- diffStat?: {
2051
- adds: number;
2052
- dels: number;
2053
- files: number;
2054
- repointed?: boolean | undefined;
2055
- } | undefined;
2056
- workflow: string;
2057
- task: string;
2058
- queuedMessages?: {
2059
- replayAfterOpen?: true | undefined;
2060
- id: string;
2061
- text: string;
2062
- images?: string[] | undefined;
2063
- createdAt: string;
2064
- }[] | undefined;
2065
- continuationMessage?: {
2066
- replayAfterOpen?: true | undefined;
2067
- id: string;
2068
- text: string;
2069
- images?: string[] | undefined;
2070
- createdAt: string;
2071
- origin?: "human" | "lifecycle" | undefined;
2072
- agentInputId?: string | undefined;
2073
- task?: string | undefined;
2074
- resumeContext?: {
2075
- failure?: {
2076
- stepId?: string | undefined;
2077
- error: string;
2078
- } | undefined;
2079
- restarted?: true | undefined;
2080
- cutOff?: {
2081
- tools?: string[] | undefined;
2082
- subagents?: string[] | undefined;
2083
- } | undefined;
2084
- } | undefined;
2085
- } | undefined;
2086
- invalidAsk?: boolean | undefined;
2087
- agentInputs?: {
2088
- conversation?: {
2089
- senderRunId: string;
2090
- recipientRunId: string;
2091
- kind: "follow-up" | "progress" | "reply" | "request";
2092
- requestId?: string | undefined;
2093
- relationship?: "family" | "peer" | undefined;
2094
- } | undefined;
2095
- id: string;
2096
- source: "agent" | "lifecycle";
2097
- parentRunId: string;
2098
- text: string;
2099
- createdAt: string;
2100
- deliveredAt?: string | undefined;
2101
- consumedAt?: string | undefined;
2102
- awaitingRead?: true | undefined;
2103
- inboxClaim?: {
2104
- receiptId: string;
2105
- generation: string;
2106
- expiresAt: string;
2107
- acknowledgedAt?: string | undefined;
2108
- memberIds?: string[] | undefined;
2109
- } | undefined;
2110
- purpose?: "completion-refusal" | "undelivered-question" | undefined;
2111
- requestHash?: string | undefined;
2112
- deadline?: string | undefined;
2113
- }[] | undefined;
2114
- waits?: ({
2115
- prUrl: string;
2116
- repository: string;
2117
- prNumber: number;
2118
- headSha: string;
2119
- id: string;
2120
- source: "agent" | "cezar";
2121
- via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
2122
- registeredAt: string;
2123
- phase: "cancelled" | "delivered" | "open" | "resolved";
2124
- resolvedAt?: string | undefined;
2125
- deliveredAt?: string | undefined;
2126
- cancelledAt?: string | undefined;
2127
- turnId: string;
2128
- kind: "pr";
2129
- deadline: string;
2130
- generation: string;
2131
- timeoutSeconds: number;
2132
- until: "checks" | "merge" | "merge_or_blocked";
2133
- wakeOnConflict: boolean;
2134
- callerHead?: true | undefined;
2135
- result?: {
2136
- outcome: "blocked" | "cancelled" | "closed" | "conflicting" | "deadline" | "error" | "failed" | "head_changed" | "merged" | "no_checks" | "passed" | "skipped" | "startup_failure" | "stuck";
2137
- headSha: string;
2138
- observedHeadSha?: string | undefined;
2139
- mergeable?: "CONFLICTING" | "MERGEABLE" | "UNKNOWN" | undefined;
2140
- mergeStateStatus?: string | undefined;
2141
- mergedAt?: string | undefined;
2142
- mergeCommitSha?: string | undefined;
2143
- mergeBlock?: {
2144
- reason: "conflict" | "no_pending_merge";
2145
- isInMergeQueue: boolean;
2146
- autoMergeEnabled: boolean;
2147
- event?: {
2148
- kind: "auto_merge_disabled" | "queue_removal";
2149
- createdAt: string;
2150
- reason?: string | undefined;
2151
- reasonCode?: string | undefined;
2152
- } | undefined;
2153
- } | undefined;
2154
- observedAt: string;
2155
- checks: {
2156
- name: string;
2157
- state: string;
2158
- link: string;
2159
- }[];
2160
- totalChecks: number;
2161
- truncated: boolean;
2162
- diagnostic?: string | undefined;
2163
- } | undefined;
2164
- } | {
2165
- id: string;
2166
- source: "agent" | "cezar";
2167
- via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
2168
- registeredAt: string;
2169
- phase: "cancelled" | "delivered" | "open" | "resolved";
2170
- resolvedAt?: string | undefined;
2171
- deliveredAt?: string | undefined;
2172
- cancelledAt?: string | undefined;
2173
- turnId: string;
2174
- kind: "timer";
2175
- deadline: string;
2176
- seconds: number;
2177
- note?: string | undefined;
2178
- } | {
2179
- id: string;
2180
- source: "agent" | "cezar";
2181
- via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
2182
- registeredAt: string;
2183
- phase: "cancelled" | "delivered" | "open" | "resolved";
2184
- resolvedAt?: string | undefined;
2185
- deliveredAt?: string | undefined;
2186
- cancelledAt?: string | undefined;
2187
- turnId: string;
2188
- kind: "human";
2189
- questions?: {
2190
- id?: string | undefined;
2191
- header: string;
2192
- question: string;
2193
- options?: {
2194
- label: string;
2195
- description?: string | undefined;
2196
- }[] | undefined;
2197
- multiSelect?: boolean | undefined;
2198
- allowFreeText?: boolean | undefined;
2199
- }[] | undefined;
2200
- context?: string | undefined;
2201
- askSeq?: number | undefined;
2202
- } | {
2203
- id: string;
2204
- source: "agent" | "cezar";
2205
- via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
2206
- registeredAt: string;
2207
- phase: "cancelled" | "delivered" | "open" | "resolved";
2208
- resolvedAt?: string | undefined;
2209
- deliveredAt?: string | undefined;
2210
- cancelledAt?: string | undefined;
2211
- turnId: string;
2212
- kind: "worker";
2213
- deadline?: string | undefined;
2214
- timeoutSeconds?: number | undefined;
2215
- mode?: "all" | "any" | "one" | undefined;
2216
- workerIds?: string[] | undefined;
2217
- revisions?: {
2218
- workerId: string;
2219
- revision: number;
2220
- }[] | undefined;
2221
- outcomes?: {
2222
- workerId: string;
2223
- status: "cancelled" | "done" | "failed" | "review";
2224
- observedAt: string;
2225
- summary?: string | undefined;
2226
- revision?: number | undefined;
2227
- }[] | undefined;
2228
- requestIds?: string[] | undefined;
2229
- requestOutcomes?: {
2230
- requestId: string;
2231
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
2232
- observedAt: string;
2233
- replyId?: string | undefined;
2234
- }[] | undefined;
2235
- result?: {
2236
- reason: "outcome" | "timeout";
2237
- } | undefined;
2238
- wakeInputId?: string | undefined;
2239
- } | {
2240
- id: string;
2241
- source: "agent" | "cezar";
2242
- via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
2243
- registeredAt: string;
2244
- phase: "cancelled" | "delivered" | "open" | "resolved";
2245
- resolvedAt?: string | undefined;
2246
- deliveredAt?: string | undefined;
2247
- cancelledAt?: string | undefined;
2248
- turnId: string;
2249
- kind: "process";
2250
- deadline: string;
2251
- timeoutSeconds: number;
2252
- pid: number;
2253
- startToken?: string | undefined;
2254
- exitFile?: string | undefined;
2255
- note?: string | undefined;
2256
- result?: {
2257
- outcome: "deadline" | "error" | "exit_file" | "exited";
2258
- observedAt: string;
2259
- exitCode?: number | undefined;
2260
- exitFileNote?: "not-an-exit-code" | undefined;
2261
- diagnostic?: string | undefined;
2262
- } | undefined;
2263
- } | {
2264
- id: string;
2265
- source: "agent" | "cezar";
2266
- via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
2267
- registeredAt: string;
2268
- phase: "cancelled" | "delivered" | "open" | "resolved";
2269
- resolvedAt?: string | undefined;
2270
- deliveredAt?: string | undefined;
2271
- cancelledAt?: string | undefined;
2272
- turnId: string;
2273
- kind: "peer";
2274
- deadline: string;
2275
- timeoutSeconds: number;
2276
- peerIds: string[];
2277
- result?: {
2278
- reason: "message";
2279
- peerRunId: string;
2280
- messageId: string;
2281
- } | {
2282
- reason: "settled";
2283
- peerRunId: string;
2284
- } | {
2285
- reason: "timeout";
2286
- } | undefined;
2287
- } | {
2288
- id: string;
2289
- registeredAt: string;
2290
- phase: "cancelled" | "delivered" | "open" | "resolved";
2291
- resolvedAt?: string | undefined;
2292
- deliveredAt?: string | undefined;
2293
- cancelledAt?: string | undefined;
2294
- turnId: string;
2295
- kind: "subagent";
2296
- source: "cezar";
2297
- via: "native-subagents";
2298
- deadline: string;
2299
- children: {
2300
- id: string;
2301
- status: "cancelled" | "completed" | "failed" | "running";
2302
- }[];
2303
- result?: {
2304
- reason: "interrupted" | "settled" | "superseded" | "timeout";
2305
- } | undefined;
2306
- })[] | undefined;
2307
- waitRegistrations?: {
2308
- operationId: string;
2309
- requestHash: string;
2310
- wait: {
2311
- prUrl: string;
2312
- repository: string;
2313
- prNumber: number;
2314
- headSha: string;
2315
- id: string;
2316
- source: "agent" | "cezar";
2317
- via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
2318
- registeredAt: string;
2319
- phase: "cancelled" | "delivered" | "open" | "resolved";
2320
- resolvedAt?: string | undefined;
2321
- deliveredAt?: string | undefined;
2322
- cancelledAt?: string | undefined;
2323
- turnId: string;
2324
- kind: "pr";
2325
- deadline: string;
2326
- generation: string;
2327
- timeoutSeconds: number;
2328
- until: "checks" | "merge" | "merge_or_blocked";
2329
- wakeOnConflict: boolean;
2330
- callerHead?: true | undefined;
2331
- result?: {
2332
- outcome: "blocked" | "cancelled" | "closed" | "conflicting" | "deadline" | "error" | "failed" | "head_changed" | "merged" | "no_checks" | "passed" | "skipped" | "startup_failure" | "stuck";
2333
- headSha: string;
2334
- observedHeadSha?: string | undefined;
2335
- mergeable?: "CONFLICTING" | "MERGEABLE" | "UNKNOWN" | undefined;
2336
- mergeStateStatus?: string | undefined;
2337
- mergedAt?: string | undefined;
2338
- mergeCommitSha?: string | undefined;
2339
- mergeBlock?: {
2340
- reason: "conflict" | "no_pending_merge";
2341
- isInMergeQueue: boolean;
2342
- autoMergeEnabled: boolean;
2343
- event?: {
2344
- kind: "auto_merge_disabled" | "queue_removal";
2345
- createdAt: string;
2346
- reason?: string | undefined;
2347
- reasonCode?: string | undefined;
2348
- } | undefined;
2349
- } | undefined;
2350
- observedAt: string;
2351
- checks: {
2352
- name: string;
2353
- state: string;
2354
- link: string;
2355
- }[];
2356
- totalChecks: number;
2357
- truncated: boolean;
2358
- diagnostic?: string | undefined;
2359
- } | undefined;
2360
- } | {
2361
- id: string;
2362
- source: "agent" | "cezar";
2363
- via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
2364
- registeredAt: string;
2365
- phase: "cancelled" | "delivered" | "open" | "resolved";
2366
- resolvedAt?: string | undefined;
2367
- deliveredAt?: string | undefined;
2368
- cancelledAt?: string | undefined;
2369
- turnId: string;
2370
- kind: "timer";
2371
- deadline: string;
2372
- seconds: number;
2373
- note?: string | undefined;
2374
- } | {
2375
- id: string;
2376
- source: "agent" | "cezar";
2377
- via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
2378
- registeredAt: string;
2379
- phase: "cancelled" | "delivered" | "open" | "resolved";
2380
- resolvedAt?: string | undefined;
2381
- deliveredAt?: string | undefined;
2382
- cancelledAt?: string | undefined;
2383
- turnId: string;
2384
- kind: "human";
2385
- questions?: {
2386
- id?: string | undefined;
2387
- header: string;
2388
- question: string;
2389
- options?: {
2390
- label: string;
2391
- description?: string | undefined;
2392
- }[] | undefined;
2393
- multiSelect?: boolean | undefined;
2394
- allowFreeText?: boolean | undefined;
2395
- }[] | undefined;
2396
- context?: string | undefined;
2397
- askSeq?: number | undefined;
2398
- } | {
2399
- id: string;
2400
- source: "agent" | "cezar";
2401
- via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
2402
- registeredAt: string;
2403
- phase: "cancelled" | "delivered" | "open" | "resolved";
2404
- resolvedAt?: string | undefined;
2405
- deliveredAt?: string | undefined;
2406
- cancelledAt?: string | undefined;
2407
- turnId: string;
2408
- kind: "worker";
2409
- deadline?: string | undefined;
2410
- timeoutSeconds?: number | undefined;
2411
- mode?: "all" | "any" | "one" | undefined;
2412
- workerIds?: string[] | undefined;
2413
- revisions?: {
2414
- workerId: string;
2415
- revision: number;
2416
- }[] | undefined;
2417
- outcomes?: {
2418
- workerId: string;
2419
- status: "cancelled" | "done" | "failed" | "review";
2420
- observedAt: string;
2421
- summary?: string | undefined;
2422
- revision?: number | undefined;
2423
- }[] | undefined;
2424
- requestIds?: string[] | undefined;
2425
- requestOutcomes?: {
2426
- requestId: string;
2427
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
2428
- observedAt: string;
2429
- replyId?: string | undefined;
2430
- }[] | undefined;
2431
- result?: {
2432
- reason: "outcome" | "timeout";
2433
- } | undefined;
2434
- wakeInputId?: string | undefined;
2435
- } | {
2436
- id: string;
2437
- source: "agent" | "cezar";
2438
- via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
2439
- registeredAt: string;
2440
- phase: "cancelled" | "delivered" | "open" | "resolved";
2441
- resolvedAt?: string | undefined;
2442
- deliveredAt?: string | undefined;
2443
- cancelledAt?: string | undefined;
2444
- turnId: string;
2445
- kind: "process";
2446
- deadline: string;
2447
- timeoutSeconds: number;
2448
- pid: number;
2449
- startToken?: string | undefined;
2450
- exitFile?: string | undefined;
2451
- note?: string | undefined;
2452
- result?: {
2453
- outcome: "deadline" | "error" | "exit_file" | "exited";
2454
- observedAt: string;
2455
- exitCode?: number | undefined;
2456
- exitFileNote?: "not-an-exit-code" | undefined;
2457
- diagnostic?: string | undefined;
2458
- } | undefined;
2459
- } | {
2460
- id: string;
2461
- source: "agent" | "cezar";
2462
- via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
2463
- registeredAt: string;
2464
- phase: "cancelled" | "delivered" | "open" | "resolved";
2465
- resolvedAt?: string | undefined;
2466
- deliveredAt?: string | undefined;
2467
- cancelledAt?: string | undefined;
2468
- turnId: string;
2469
- kind: "peer";
2470
- deadline: string;
2471
- timeoutSeconds: number;
2472
- peerIds: string[];
2473
- result?: {
2474
- reason: "message";
2475
- peerRunId: string;
2476
- messageId: string;
2477
- } | {
2478
- reason: "settled";
2479
- peerRunId: string;
2480
- } | {
2481
- reason: "timeout";
2482
- } | undefined;
2483
- } | {
2484
- id: string;
2485
- registeredAt: string;
2486
- phase: "cancelled" | "delivered" | "open" | "resolved";
2487
- resolvedAt?: string | undefined;
2488
- deliveredAt?: string | undefined;
2489
- cancelledAt?: string | undefined;
2490
- turnId: string;
2491
- kind: "subagent";
2492
- source: "cezar";
2493
- via: "native-subagents";
2494
- deadline: string;
2495
- children: {
2496
- id: string;
2497
- status: "cancelled" | "completed" | "failed" | "running";
2498
- }[];
2499
- result?: {
2500
- reason: "interrupted" | "settled" | "superseded" | "timeout";
2501
- } | undefined;
2502
- };
2503
- deduplicated: boolean;
2504
- }[] | undefined;
2505
- lastWaits?: ({
2506
- prUrl: string;
2507
- repository: string;
2508
- prNumber: number;
2509
- headSha: string;
2510
- id: string;
2511
- source: "agent" | "cezar";
2512
- via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
2513
- registeredAt: string;
2514
- phase: "cancelled" | "delivered" | "open" | "resolved";
2515
- resolvedAt?: string | undefined;
2516
- deliveredAt?: string | undefined;
2517
- cancelledAt?: string | undefined;
2518
- turnId: string;
2519
- kind: "pr";
2520
- deadline: string;
2521
- generation: string;
2522
- timeoutSeconds: number;
2523
- until: "checks" | "merge" | "merge_or_blocked";
2524
- wakeOnConflict: boolean;
2525
- callerHead?: true | undefined;
2526
- result?: {
2527
- outcome: "blocked" | "cancelled" | "closed" | "conflicting" | "deadline" | "error" | "failed" | "head_changed" | "merged" | "no_checks" | "passed" | "skipped" | "startup_failure" | "stuck";
2528
- headSha: string;
2529
- observedHeadSha?: string | undefined;
2530
- mergeable?: "CONFLICTING" | "MERGEABLE" | "UNKNOWN" | undefined;
2531
- mergeStateStatus?: string | undefined;
2532
- mergedAt?: string | undefined;
2533
- mergeCommitSha?: string | undefined;
2534
- mergeBlock?: {
2535
- reason: "conflict" | "no_pending_merge";
2536
- isInMergeQueue: boolean;
2537
- autoMergeEnabled: boolean;
2538
- event?: {
2539
- kind: "auto_merge_disabled" | "queue_removal";
2540
- createdAt: string;
2541
- reason?: string | undefined;
2542
- reasonCode?: string | undefined;
2543
- } | undefined;
2544
- } | undefined;
2545
- observedAt: string;
2546
- checks: {
2547
- name: string;
2548
- state: string;
2549
- link: string;
2550
- }[];
2551
- totalChecks: number;
2552
- truncated: boolean;
2553
- diagnostic?: string | undefined;
2554
- } | undefined;
2555
- } | {
2556
- id: string;
2557
- source: "agent" | "cezar";
2558
- via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
2559
- registeredAt: string;
2560
- phase: "cancelled" | "delivered" | "open" | "resolved";
2561
- resolvedAt?: string | undefined;
2562
- deliveredAt?: string | undefined;
2563
- cancelledAt?: string | undefined;
2564
- turnId: string;
2565
- kind: "timer";
2566
- deadline: string;
2567
- seconds: number;
2568
- note?: string | undefined;
2569
- } | {
2570
- id: string;
2571
- source: "agent" | "cezar";
2572
- via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
2573
- registeredAt: string;
2574
- phase: "cancelled" | "delivered" | "open" | "resolved";
2575
- resolvedAt?: string | undefined;
2576
- deliveredAt?: string | undefined;
2577
- cancelledAt?: string | undefined;
2578
- turnId: string;
2579
- kind: "human";
2580
- questions?: {
2581
- id?: string | undefined;
2582
- header: string;
2583
- question: string;
2584
- options?: {
2585
- label: string;
2586
- description?: string | undefined;
2587
- }[] | undefined;
2588
- multiSelect?: boolean | undefined;
2589
- allowFreeText?: boolean | undefined;
2590
- }[] | undefined;
2591
- context?: string | undefined;
2592
- askSeq?: number | undefined;
2593
- } | {
2594
- id: string;
2595
- source: "agent" | "cezar";
2596
- via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
2597
- registeredAt: string;
2598
- phase: "cancelled" | "delivered" | "open" | "resolved";
2599
- resolvedAt?: string | undefined;
2600
- deliveredAt?: string | undefined;
2601
- cancelledAt?: string | undefined;
2602
- turnId: string;
2603
- kind: "worker";
2604
- deadline?: string | undefined;
2605
- timeoutSeconds?: number | undefined;
2606
- mode?: "all" | "any" | "one" | undefined;
2607
- workerIds?: string[] | undefined;
2608
- revisions?: {
2609
- workerId: string;
2610
- revision: number;
2611
- }[] | undefined;
2612
- outcomes?: {
2613
- workerId: string;
2614
- status: "cancelled" | "done" | "failed" | "review";
2615
- observedAt: string;
2616
- summary?: string | undefined;
2617
- revision?: number | undefined;
2618
- }[] | undefined;
2619
- requestIds?: string[] | undefined;
2620
- requestOutcomes?: {
2621
- requestId: string;
2622
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
2623
- observedAt: string;
2624
- replyId?: string | undefined;
2625
- }[] | undefined;
2626
- result?: {
2627
- reason: "outcome" | "timeout";
2628
- } | undefined;
2629
- wakeInputId?: string | undefined;
2630
- } | {
2631
- id: string;
2632
- source: "agent" | "cezar";
2633
- via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
2634
- registeredAt: string;
2635
- phase: "cancelled" | "delivered" | "open" | "resolved";
2636
- resolvedAt?: string | undefined;
2637
- deliveredAt?: string | undefined;
2638
- cancelledAt?: string | undefined;
2639
- turnId: string;
2640
- kind: "process";
2641
- deadline: string;
2642
- timeoutSeconds: number;
2643
- pid: number;
2644
- startToken?: string | undefined;
2645
- exitFile?: string | undefined;
2646
- note?: string | undefined;
2647
- result?: {
2648
- outcome: "deadline" | "error" | "exit_file" | "exited";
2649
- observedAt: string;
2650
- exitCode?: number | undefined;
2651
- exitFileNote?: "not-an-exit-code" | undefined;
2652
- diagnostic?: string | undefined;
2653
- } | undefined;
2654
- } | {
2655
- id: string;
2656
- source: "agent" | "cezar";
2657
- via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
2658
- registeredAt: string;
2659
- phase: "cancelled" | "delivered" | "open" | "resolved";
2660
- resolvedAt?: string | undefined;
2661
- deliveredAt?: string | undefined;
2662
- cancelledAt?: string | undefined;
2663
- turnId: string;
2664
- kind: "peer";
2665
- deadline: string;
2666
- timeoutSeconds: number;
2667
- peerIds: string[];
2668
- result?: {
2669
- reason: "message";
2670
- peerRunId: string;
2671
- messageId: string;
2672
- } | {
2673
- reason: "settled";
2674
- peerRunId: string;
2675
- } | {
2676
- reason: "timeout";
2677
- } | undefined;
2678
- } | {
2679
- id: string;
2680
- registeredAt: string;
2681
- phase: "cancelled" | "delivered" | "open" | "resolved";
2682
- resolvedAt?: string | undefined;
2683
- deliveredAt?: string | undefined;
2684
- cancelledAt?: string | undefined;
2685
- turnId: string;
2686
- kind: "subagent";
2687
- source: "cezar";
2688
- via: "native-subagents";
2689
- deadline: string;
2690
- children: {
2691
- id: string;
2692
- status: "cancelled" | "completed" | "failed" | "running";
2693
- }[];
2694
- result?: {
2695
- reason: "interrupted" | "settled" | "superseded" | "timeout";
2696
- } | undefined;
2697
- })[] | undefined;
2698
- previewServers?: {
2699
- port: number;
2700
- command: string;
2701
- cwd?: string | undefined;
2702
- label: string;
2703
- path?: string | undefined;
2704
- registeredAt: string;
2705
- answeredAtRegistration: boolean;
2706
- }[] | undefined;
2707
- taskImages?: string[] | undefined;
2708
- model?: string | undefined;
2709
- effort?: string | undefined;
2710
- modelIdentity?: string | undefined;
2711
- removedRunner?: string | undefined;
2712
- agentProfile?: string | undefined;
2713
- systemPrompt?: string | undefined;
2714
- generateFollowups?: boolean | undefined;
2715
- autonomous?: boolean | undefined;
2716
- completionAction?: {
2717
- id: string;
2718
- phase: "blocked" | "complete" | "pending";
2719
- message?: string | undefined;
2720
- } | undefined;
2721
- archiveBlocker?: {
2722
- message: string;
2723
- runId?: string | undefined;
2724
- pullRequestUrl?: string | undefined;
2725
- } | undefined;
2726
- status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
2727
- createdAt: string;
2728
- startedAt?: string | undefined;
2729
- finishedAt?: string | undefined;
2730
- tokensUsed: number;
2731
- inputTokens?: number | undefined;
2732
- outputTokens?: number | undefined;
2733
- costUsd?: number | undefined;
2734
- pullRequestUrl?: string | undefined;
2735
- referencedPullRequestUrl?: string | undefined;
2736
- prNumber?: number | undefined;
2737
- issueNumber?: number | undefined;
2738
- referencedIssueNumberSeeded?: boolean | undefined;
2739
- titleOrigin?: "auto" | "marker" | "user" | undefined;
2740
- markerRefs?: {
2741
- pr?: number | undefined;
2742
- issue?: number | undefined;
2743
- } | undefined;
2744
- referencedPrCandidates?: string[] | undefined;
2745
- referencedIssueUrl?: string | undefined;
2746
- referencedIssueCandidates?: string[] | undefined;
2747
- worktree?: false | undefined;
2748
- worktreePath?: string | undefined;
2749
- branch?: string | undefined;
2750
- baseBranch?: string | undefined;
2751
- worktreeReclaimedAt?: string | undefined;
2752
- groupId?: string | undefined;
2753
- variant?: string | undefined;
2754
- clientRequestId?: string | undefined;
2755
- clientRequestHash?: string | undefined;
2756
- peakRssBytes?: number | undefined;
2757
- peakProcCount?: number | undefined;
2758
- archivedAt?: string | undefined;
2759
- autoArchive?: {
2760
- reason: "pull-requests-merged";
2761
- archivedAt: string;
2762
- fingerprint: string;
2763
- pullRequests: {
2764
- owner: string;
2765
- repo: string;
2766
- number: number;
2767
- mergedAt: string;
2768
- }[];
2769
- } | undefined;
2770
- manualUnarchivedAt?: string | undefined;
2771
- pinned?: boolean | undefined;
2772
- pinnedAt?: string | undefined;
2773
- seenAt?: string | undefined;
2774
- currentStepId?: string | undefined;
2775
- error?: string | undefined;
2776
- delegation?: {
2777
- role: "root";
2778
- conversation?: {
2779
- messages: {
2780
- senderRunId: string;
2781
- recipientRunId: string;
2782
- kind: "follow-up" | "progress" | "reply" | "request";
2783
- requestId?: string | undefined;
2784
- relationship?: "family" | "peer" | undefined;
2785
- id: string;
2786
- text: string;
2787
- createdAt: string;
2788
- deadline?: string | undefined;
2789
- requestHash: string;
2790
- state: "accepted" | "continuation-required" | "destroyed" | "late";
2791
- resumed?: true | undefined;
2792
- instruction?: string | undefined;
2793
- question?: {
2794
- context?: string | undefined;
2795
- questions: {
2796
- id?: string | undefined;
2797
- header: string;
2798
- question: string;
2799
- options?: {
2800
- label: string;
2801
- description?: string | undefined;
2802
- }[] | undefined;
2803
- multiSelect?: boolean | undefined;
2804
- allowFreeText?: boolean | undefined;
2805
- }[];
2806
- } | undefined;
2807
- }[];
2808
- outcomes: {
2809
- requestId: string;
2810
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
2811
- observedAt: string;
2812
- replyId?: string | undefined;
2813
- }[];
2814
- } | undefined;
2815
- permissions: ("destroy" | "diff" | "inspect" | "spawn" | "steer" | "stop" | "wait")[];
2816
- spawnGrant?: {
2817
- kinds: ("owned-isolated" | "shared")[];
2818
- live: number;
2819
- children?: /*elided*/ any | undefined;
2820
- } | undefined;
2821
- receipts: {
2822
- requestId: string;
2823
- workerId: string;
2824
- requestHash: string;
2825
- supervisorRunId?: string | undefined;
2826
- deletion?: {
2827
- phase: "complete" | "pending";
2828
- revision: number;
2829
- resourceId: string;
2830
- generation: string;
2831
- } | undefined;
2832
- }[];
2833
- wait?: {
2834
- id: string;
2835
- workerIds: string[];
2836
- requestIds?: string[] | undefined;
2837
- requestOutcomes?: {
2838
- requestId: string;
2839
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
2840
- observedAt: string;
2841
- replyId?: string | undefined;
2842
- }[] | undefined;
2843
- deadline: string;
2844
- mode?: "all" | "any" | "one" | undefined;
2845
- revisions?: {
2846
- workerId: string;
2847
- revision: number;
2848
- }[] | undefined;
2849
- reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
2850
- phase: "parked" | "registered" | "wake-pending";
2851
- outcomes: {
2852
- workerId: string;
2853
- status: "cancelled" | "done" | "failed" | "review";
2854
- observedAt: string;
2855
- summary?: string | undefined;
2856
- revision?: number | undefined;
2857
- }[];
2858
- wakeId?: string | undefined;
2859
- } | undefined;
2860
- lastWait?: {
2861
- id: string;
2862
- workerIds: string[];
2863
- requestIds?: string[] | undefined;
2864
- requestOutcomes?: {
2865
- requestId: string;
2866
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
2867
- observedAt: string;
2868
- replyId?: string | undefined;
2869
- }[] | undefined;
2870
- deadline: string;
2871
- mode?: "all" | "any" | "one" | undefined;
2872
- revisions?: {
2873
- workerId: string;
2874
- revision: number;
2875
- }[] | undefined;
2876
- reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
2877
- phase: "parked" | "registered" | "wake-pending";
2878
- outcomes: {
2879
- workerId: string;
2880
- status: "cancelled" | "done" | "failed" | "review";
2881
- observedAt: string;
2882
- summary?: string | undefined;
2883
- revision?: number | undefined;
2884
- }[];
2885
- wakeId?: string | undefined;
2886
- } | undefined;
2887
- results?: {
2888
- workerId: string;
2889
- revision: number;
2890
- snapshotId: string;
2891
- observedAt: string;
2892
- lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
2893
- previous?: {
2894
- revision: number;
2895
- observedAt: string;
2896
- lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
2897
- } | undefined;
2898
- }[] | undefined;
2899
- finishRequestedAt?: string | undefined;
2900
- historyDeletion?: "pending" | undefined;
2901
- completion?: {
2902
- phase: "attention" | "waiting";
2903
- waitId?: string | undefined;
2904
- } | undefined;
2905
- } | {
2906
- role: "worker";
2907
- wait?: {
2908
- id: string;
2909
- workerIds: string[];
2910
- requestIds?: string[] | undefined;
2911
- requestOutcomes?: {
2912
- requestId: string;
2913
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
2914
- observedAt: string;
2915
- replyId?: string | undefined;
2916
- }[] | undefined;
2917
- deadline: string;
2918
- mode?: "all" | "any" | "one" | undefined;
2919
- revisions?: {
2920
- workerId: string;
2921
- revision: number;
2922
- }[] | undefined;
2923
- reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
2924
- phase: "parked" | "registered" | "wake-pending";
2925
- outcomes: {
2926
- workerId: string;
2927
- status: "cancelled" | "done" | "failed" | "review";
2928
- observedAt: string;
2929
- summary?: string | undefined;
2930
- revision?: number | undefined;
2931
- }[];
2932
- wakeId?: string | undefined;
2933
- } | undefined;
2934
- lastWait?: {
2935
- id: string;
2936
- workerIds: string[];
2937
- requestIds?: string[] | undefined;
2938
- requestOutcomes?: {
2939
- requestId: string;
2940
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
2941
- observedAt: string;
2942
- replyId?: string | undefined;
2943
- }[] | undefined;
2944
- deadline: string;
2945
- mode?: "all" | "any" | "one" | undefined;
2946
- revisions?: {
2947
- workerId: string;
2948
- revision: number;
2949
- }[] | undefined;
2950
- reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
2951
- phase: "parked" | "registered" | "wake-pending";
2952
- outcomes: {
2953
- workerId: string;
2954
- status: "cancelled" | "done" | "failed" | "review";
2955
- observedAt: string;
2956
- summary?: string | undefined;
2957
- revision?: number | undefined;
2958
- }[];
2959
- wakeId?: string | undefined;
2960
- } | undefined;
2961
- permissions: ("destroy" | "diff" | "inspect" | "spawn" | "steer" | "stop" | "wait")[];
2962
- spawnGrant?: {
2963
- kinds: ("owned-isolated" | "shared")[];
2964
- live: number;
2965
- children?: any | undefined;
2966
- } | undefined;
2967
- parentRunId: string;
2968
- supervisorRunId?: string | undefined;
2969
- workspace: {
2970
- ownerRunId: string;
2971
- resourceId: string;
2972
- kind: "owned-isolated";
2973
- path: string;
2974
- branch: string;
2975
- baselineSha: string;
2976
- } | {
2977
- ownerRunId: string;
2978
- resourceId: string;
2979
- kind: "shared";
2980
- path: string;
2981
- hostRunId: string;
2982
- baselineSha: string;
2983
- };
2984
- destroy?: {
2985
- requestedAt: string;
2986
- phase: "cleaning" | "complete" | "incomplete" | "requested" | "terminating";
2987
- remaining: ("branch" | "process" | "worktree")[];
2988
- error?: string | undefined;
2989
- discardWork?: true | undefined;
2990
- } | undefined;
2991
- context?: {
2992
- text?: string | undefined;
2993
- inputs: {
2994
- source: {
2995
- kind: "parent-file";
2996
- path: string;
2997
- } | {
2998
- kind: "baseline-file";
2999
- path: string;
3000
- } | {
3001
- kind: "parent-attachment";
3002
- id: string;
3003
- };
3004
- path: string;
3005
- sha256: string;
3006
- bytes: number;
3007
- }[];
3008
- } | undefined;
3009
- executionRevision?: number | undefined;
3010
- executionStartSeq?: number | undefined;
3011
- } | {
3012
- role: "invalid";
3013
- } | undefined;
3014
- lastWaitsError?: string | undefined;
3015
- automaticWakes?: number | undefined;
3016
- waitDeliveryFailures?: number | undefined;
3017
- runner?: string | undefined;
3018
- notify?: boolean | undefined;
3019
- webhook?: {
3020
- lastDeliveredAt?: string | undefined;
3021
- lastError?: string | undefined;
3022
- lastErrorWebhookId?: string | undefined;
3023
- } | undefined;
3024
- destroyRetry?: {
3025
- attempts: number;
3026
- nextAt: string;
3027
- needsAttention?: true | undefined;
3028
- } | undefined;
3029
- stopping?: boolean | undefined;
3030
- autoResumeAt?: string | undefined;
3031
- autoResumeAttempts?: number | undefined;
3032
- autoResumeReason?: "provider-error" | "usage-limit" | undefined;
3033
- parkReason?: "closing-wakes" | "hold" | "turn" | undefined;
3034
- hasPendingPermission?: boolean | undefined;
3035
- pullRequests?: {
3036
- number: number;
3037
- url?: string | undefined;
3038
- source: "created" | "declared";
3039
- }[] | undefined;
3040
- worktreeSetup?: {
3041
- status: "done" | "failed" | "running";
3042
- startedAt: string;
3043
- finishedAt?: string | undefined;
3044
- durationMs?: number | undefined;
3045
- error?: string | undefined;
3046
- } | undefined;
3047
- workflowCursor?: {
3048
- stepId: string;
3049
- mode: "resume" | "start";
3050
- } | undefined;
3051
- doneAccepted?: {
3052
- session: string;
3053
- at: string;
3054
- seq: number;
3055
- openWaits: string[];
3056
- settledWaits: string[];
3057
- lastInput?: string | undefined;
3058
- summary?: string | undefined;
3059
- freeTurn?: true | undefined;
3060
- } | undefined;
3061
- archived: boolean;
3062
- workflowDef?: {
3063
- name: string;
3064
- description?: string | undefined;
3065
- steps: {
3066
- id: string;
3067
- name?: string | undefined;
3068
- prompt?: string | undefined;
3069
- skill?: string | undefined;
3070
- model?: string | undefined;
3071
- effort?: string | undefined;
3072
- timeoutMs?: number | undefined;
3073
- runner?: string | undefined;
3074
- agentProfile?: string | undefined;
3075
- allowedTools?: string[] | undefined;
3076
- bashAllowlist?: string[] | undefined;
3077
- command?: string | undefined;
3078
- onFail?: {
3079
- retry: string;
3080
- max: number;
3081
- } | undefined;
3082
- }[];
3083
- source: "built-in" | "file";
3084
- path?: string | undefined;
3085
- } | undefined;
3086
- steps: {
3087
- id: string;
3088
- name: string;
3089
- kind: "agent" | "check";
3090
- status: "cancelled" | "done" | "failed" | "pending" | "review" | "running" | "skipped" | "waiting";
3091
- iterations: number;
3092
- retriesUsed?: number | undefined;
3093
- tokensUsed: number;
3094
- inputTokens?: number | undefined;
3095
- outputTokens?: number | undefined;
3096
- usageInvocationsStarted?: number | undefined;
3097
- usageInvocationsObserved?: number | undefined;
3098
- usageTurnsStarted?: number | undefined;
3099
- usageTurnsRecorded?: number | undefined;
3100
- usageInvocationEpoch?: number | undefined;
3101
- startedAt?: string | undefined;
3102
- finishedAt?: string | undefined;
3103
- error?: string | undefined;
3104
- sessionId?: string | undefined;
3105
- removedBackend?: string | undefined;
3106
- profileId?: string | undefined;
3107
- skillPath?: string | undefined;
3108
- costUsd?: number | undefined;
3109
- synthetic?: "continuation" | undefined;
3110
- continuesStepId?: string | undefined;
3111
- backend?: string | undefined;
3112
- }[];
3113
- automation?: {
3114
- automationId: string;
3115
- receiptId: string;
3116
- event: string;
3117
- automationRevision: number;
3118
- githubUrl: string;
3119
- } | undefined;
3120
- automationTrigger?: {
3121
- automationId: string;
3122
- receiptId: string;
3123
- trigger: "catch-up" | "manual" | "schedule";
3124
- occurrenceAt: string;
3125
- automationRevision: number;
3126
- } | undefined;
3127
- handoffRecords?: {
3128
- autosave: {
3129
- at: string;
3130
- note: string;
3131
- periodic?: {
3132
- branch: string | null;
3133
- count: number;
3134
- first: string | null;
3135
- latest: string | null;
3136
- } | undefined;
3137
- }[];
3138
- } | undefined;
3139
- }[]>;
3140
- /** One stored record and what its JSON holds beyond the runtime schema (raw-record.ts), which
3141
- * the next write of its row puts back. */
3142
- export interface DecodedRun {
3143
- run: RunRecord;
3144
- extras: RawExtras | undefined;
3145
- /** The stored JSON still had schema-3 wait fields (`upgradeLegacyWaits`): open rewrites it. */
3146
- upgraded?: true;
3147
- }
3148
- /** One database row's `data` back into a record and its extras. Undefined when it does not parse:
3149
- * one unreadable row costs that row only. */
3150
- export declare function decodeRunRow(data: string): DecodedRun | undefined;
3151
- /** One database row's `data` back into a record, for a reader that never writes it back. */
3152
- export declare function decodeRunRecord(data: string): RunRecord | undefined;
3153
30
  export { LEGACY_INDEX_BACKUP_FILE, LEGACY_INDEX_FILE } from './legacy-index.ts';
3154
- export type StepState = z.infer<typeof stepStateSchema>;
31
+ export { decodeRunRecord, decodeRunRow, parseRunRecords, runRecordSchema, type DecodedRun, type RunRecord, type StepState } from './run-decode.ts';
32
+ export { ARCHIVED_WINDOW } from './run-index.ts';
3155
33
  export type QueuedMessage = z.infer<typeof queuedMessageSchema>;
3156
- export type RunRecord = z.infer<typeof runRecordSchema>;
3157
34
  /** One persisted event line; `type` mirrors AgentEvent plus engine lifecycle. */
3158
35
  export type RunEvent = import('../contract/index.js').RunEvent;
3159
- /** How many archived root runs the run lists carry per project (#864): `GET /run-summaries?archived=recent`
3160
- * and `GET /workspace/runs-index`. Unarchived runs are never cut; older archived runs page in
3161
- * through `GET /run-summaries/archived` and the workspace search. */
3162
- export declare const ARCHIVED_WINDOW = 200;
3163
36
  /** The repository a project IS, as `resolveRepoHandle` reports it. `null`/absent means "unknown",
3164
37
  * which is a real and common state (no `gh`, no remote, a non-git root) — never an error. */
3165
38
  export type RepoHandle = {