@hearsay-tools/squawk 0.18.0-pr4147.8005 → 0.18.0-pr4151.8017

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