@hearsay-tools/squawk 0.18.0-dev.7405 → 0.18.0-dev.7412

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 (350) hide show
  1. package/dist/activity/read-model.js +1 -2
  2. package/dist/activity/read-model.js.map +1 -1
  3. package/dist/agent-config/catalog.js +2 -3
  4. package/dist/agent-config/catalog.js.map +1 -1
  5. package/dist/artifacts/cli.js +1 -2
  6. package/dist/artifacts/cli.js.map +1 -1
  7. package/dist/artifacts/reports-index.js +9 -10
  8. package/dist/artifacts/reports-index.js.map +1 -1
  9. package/dist/artifacts/reports-watch.js +2 -3
  10. package/dist/artifacts/reports-watch.js.map +1 -1
  11. package/dist/artifacts/resolve.js +1 -2
  12. package/dist/artifacts/resolve.js.map +1 -1
  13. package/dist/automations/automation-cli.js +1 -2
  14. package/dist/automations/automation-cli.js.map +1 -1
  15. package/dist/automations/coordinator.js +1 -2
  16. package/dist/automations/coordinator.js.map +1 -1
  17. package/dist/automations/prompts.js +2 -3
  18. package/dist/automations/prompts.js.map +1 -1
  19. package/dist/automations/schedule-runner.js +5 -6
  20. package/dist/automations/schedule-runner.js.map +1 -1
  21. package/dist/automations/task-template.js +1 -2
  22. package/dist/automations/task-template.js.map +1 -1
  23. package/dist/autosave-commit.js +3 -4
  24. package/dist/autosave-commit.js.map +1 -1
  25. package/dist/autosave-git.js +1 -2
  26. package/dist/autosave-git.js.map +1 -1
  27. package/dist/ci-wait/client.js +1 -2
  28. package/dist/ci-wait/client.js.map +1 -1
  29. package/dist/ci-wait/controller.d.ts +4 -4
  30. package/dist/ci-wait/errors.js +14 -15
  31. package/dist/ci-wait/errors.js.map +1 -1
  32. package/dist/ci-wait/resource-pool.js +1 -2
  33. package/dist/ci-wait/resource-pool.js.map +1 -1
  34. package/dist/ci-wait/tool-catalog.js +8 -9
  35. package/dist/ci-wait/tool-catalog.js.map +1 -1
  36. package/dist/ci-wait/tools.d.ts +4 -4
  37. package/dist/ci-wait/tools.js +5 -6
  38. package/dist/ci-wait/tools.js.map +1 -1
  39. package/dist/cli-dispatch.js +4 -5
  40. package/dist/cli-dispatch.js.map +1 -1
  41. package/dist/contract/delegation.d.ts +30 -0
  42. package/dist/contract/index.js +10 -0
  43. package/dist/contract/runs.d.ts +48 -0
  44. package/dist/core/claude-cli-runner.js +1 -2
  45. package/dist/core/claude-cli-runner.js.map +1 -1
  46. package/dist/core/codex-native-frames.js +1 -2
  47. package/dist/core/codex-native-frames.js.map +1 -1
  48. package/dist/core/omp-model-catalog.js +1 -2
  49. package/dist/core/omp-model-catalog.js.map +1 -1
  50. package/dist/core/omp-runner.js +1 -2
  51. package/dist/core/omp-runner.js.map +1 -1
  52. package/dist/core/pi-rpc-turn.js +1 -2
  53. package/dist/core/pi-rpc-turn.js.map +1 -1
  54. package/dist/core/pi-runner.js +1 -2
  55. package/dist/core/pi-runner.js.map +1 -1
  56. package/dist/delegation/capacity.d.ts +7 -1
  57. package/dist/delegation/capacity.js +21 -12
  58. package/dist/delegation/capacity.js.map +1 -1
  59. package/dist/delegation/cli.js +3 -4
  60. package/dist/delegation/cli.js.map +1 -1
  61. package/dist/delegation/conversation-send.d.ts +3 -10
  62. package/dist/delegation/conversation-send.js +4 -3
  63. package/dist/delegation/conversation-send.js.map +1 -1
  64. package/dist/delegation/conversations.d.ts +18 -2175
  65. package/dist/delegation/conversations.js +48 -64
  66. package/dist/delegation/conversations.js.map +1 -1
  67. package/dist/delegation/park-notice.js +1 -2
  68. package/dist/delegation/park-notice.js.map +1 -1
  69. package/dist/delegation/policy.d.ts +8 -5
  70. package/dist/delegation/policy.js +30 -29
  71. package/dist/delegation/policy.js.map +1 -1
  72. package/dist/delegation/provision.js +12 -13
  73. package/dist/delegation/provision.js.map +1 -1
  74. package/dist/delegation/readiness.js +3 -2
  75. package/dist/delegation/readiness.js.map +1 -1
  76. package/dist/delegation/service.d.ts +4 -9
  77. package/dist/delegation/service.js +69 -83
  78. package/dist/delegation/service.js.map +1 -1
  79. package/dist/delegation/task-discovery.js +3 -3
  80. package/dist/delegation/task-discovery.js.map +1 -1
  81. package/dist/delegation/transport.d.ts +9 -9
  82. package/dist/delegation/worker-cleanup.js +1 -2
  83. package/dist/delegation/worker-cleanup.js.map +1 -1
  84. package/dist/git-worktree.js +1 -2
  85. package/dist/git-worktree.js.map +1 -1
  86. package/dist/handoff.js +9 -10
  87. package/dist/handoff.js.map +1 -1
  88. package/dist/home/entry.js +1 -2
  89. package/dist/home/entry.js.map +1 -1
  90. package/dist/home/install-marker.js +3 -4
  91. package/dist/home/install-marker.js.map +1 -1
  92. package/dist/home/migration-boot.js +1 -2
  93. package/dist/home/migration-boot.js.map +1 -1
  94. package/dist/home/migration-guard.js +1 -2
  95. package/dist/home/migration-guard.js.map +1 -1
  96. package/dist/home/protected-roots.js +2 -3
  97. package/dist/home/protected-roots.js.map +1 -1
  98. package/dist/index.js +1 -2
  99. package/dist/index.js.map +1 -1
  100. package/dist/jobs/cli.js +3 -4
  101. package/dist/jobs/cli.js.map +1 -1
  102. package/dist/paths.js +2 -3
  103. package/dist/paths.js.map +1 -1
  104. package/dist/preview/cdp-proxy.js +4 -5
  105. package/dist/preview/cdp-proxy.js.map +1 -1
  106. package/dist/preview/dev-server.js +2 -3
  107. package/dist/preview/dev-server.js.map +1 -1
  108. package/dist/preview/host.js +1 -2
  109. package/dist/preview/host.js.map +1 -1
  110. package/dist/preview/registration.js +4 -5
  111. package/dist/preview/registration.js.map +1 -1
  112. package/dist/process-wait/exit-file.js +1 -2
  113. package/dist/process-wait/exit-file.js.map +1 -1
  114. package/dist/project-fence.js +1 -2
  115. package/dist/project-fence.js.map +1 -1
  116. package/dist/remote-settings-cli.js +1 -2
  117. package/dist/remote-settings-cli.js.map +1 -1
  118. package/dist/runs/delegation-state.d.ts +16 -0
  119. package/dist/runs/exit-events.d.ts +5 -0
  120. package/dist/runs/exit-events.js +1 -7
  121. package/dist/runs/exit-events.js.map +1 -1
  122. package/dist/runs/history-file.js +2 -3
  123. package/dist/runs/history-file.js.map +1 -1
  124. package/dist/runs/legacy-index.js +2 -3
  125. package/dist/runs/legacy-index.js.map +1 -1
  126. package/dist/runs/project-run-sources.js +1 -2
  127. package/dist/runs/project-run-sources.js.map +1 -1
  128. package/dist/runs/retention.js +1 -2
  129. package/dist/runs/retention.js.map +1 -1
  130. package/dist/runs/run-exits.d.ts +60 -0
  131. package/dist/runs/run-index.js +1 -2
  132. package/dist/runs/run-index.js.map +1 -1
  133. package/dist/runs/store-open-error.js +7 -8
  134. package/dist/runs/store-open-error.js.map +1 -1
  135. package/dist/runs/store.d.ts +100 -74
  136. package/dist/runs/store.js +11 -12
  137. package/dist/runs/store.js.map +1 -1
  138. package/dist/runs/task-rights.d.ts +68 -0
  139. package/dist/runs/task-rights.js +108 -0
  140. package/dist/runs/task-rights.js.map +1 -0
  141. package/dist/runs/transcript-facts.js +1 -2
  142. package/dist/runs/transcript-facts.js.map +1 -1
  143. package/dist/serve-boot.js +2 -3
  144. package/dist/serve-boot.js.map +1 -1
  145. package/dist/serve-command.js +1 -2
  146. package/dist/serve-command.js.map +1 -1
  147. package/dist/server/activity-routes.js +1 -2
  148. package/dist/server/activity-routes.js.map +1 -1
  149. package/dist/server/forge/draft-pr.js +1 -2
  150. package/dist/server/forge/draft-pr.js.map +1 -1
  151. package/dist/server/forge/github-filters.js +2 -3
  152. package/dist/server/forge/github-filters.js.map +1 -1
  153. package/dist/server/fs-browse.d.ts +1 -1
  154. package/dist/server/fs-browse.js +1 -2
  155. package/dist/server/fs-browse.js.map +1 -1
  156. package/dist/server/live-routes.d.ts +6 -6
  157. package/dist/server/project-context.js +1 -2
  158. package/dist/server/project-context.js.map +1 -1
  159. package/dist/server/repo-branches.js +2 -3
  160. package/dist/server/repo-branches.js.map +1 -1
  161. package/dist/server/reports-api.d.ts +2 -2
  162. package/dist/server/server.d.ts +1506 -1326
  163. package/dist/server/server.js +7 -8
  164. package/dist/server/server.js.map +1 -1
  165. package/dist/server/static-ui.d.ts +1 -1
  166. package/dist/server/static-ui.js +1 -2
  167. package/dist/server/static-ui.js.map +1 -1
  168. package/dist/server/workspace-live-routes.d.ts +6 -6
  169. package/dist/server/workspace-projects.js +1 -2
  170. package/dist/server/workspace-projects.js.map +1 -1
  171. package/dist/server-command.js +1 -2
  172. package/dist/server-command.js.map +1 -1
  173. package/dist/server-install/engine.js +2 -3
  174. package/dist/server-install/engine.js.map +1 -1
  175. package/dist/server-install/platforms/macosx-ngrok.js +7 -8
  176. package/dist/server-install/platforms/macosx-ngrok.js.map +1 -1
  177. package/dist/server-install/platforms/ubuntu-vps-redeploy.js +1 -2
  178. package/dist/server-install/platforms/ubuntu-vps-redeploy.js.map +1 -1
  179. package/dist/server-install/platforms/ubuntu-vps.js +28 -29
  180. package/dist/server-install/platforms/ubuntu-vps.js.map +1 -1
  181. package/dist/server-install/state.js +2 -3
  182. package/dist/server-install/state.js.map +1 -1
  183. package/dist/server-install/steps.js +1 -2
  184. package/dist/server-install/steps.js.map +1 -1
  185. package/dist/task-cli/cli.js +2 -3
  186. package/dist/task-cli/cli.js.map +1 -1
  187. package/dist/task-cli/discovery.js +1 -2
  188. package/dist/task-cli/discovery.js.map +1 -1
  189. package/dist/worker-scope/worker-scopes.js +1 -6
  190. package/dist/worker-scope/worker-scopes.js.map +1 -1
  191. package/dist/workflows/continuation-admission.d.ts +10 -0
  192. package/dist/workflows/input-acknowledgement.d.ts +24 -24
  193. package/dist/workflows/run/auto-resume.js +2 -3
  194. package/dist/workflows/run/auto-resume.js.map +1 -1
  195. package/dist/workflows/run/completion-gate.js +9 -10
  196. package/dist/workflows/run/completion-gate.js.map +1 -1
  197. package/dist/workflows/run/constants.d.ts +2 -2
  198. package/dist/workflows/run/constants.js +2 -3
  199. package/dist/workflows/run/constants.js.map +1 -1
  200. package/dist/workflows/run/continuation-acceptance.js +1 -2
  201. package/dist/workflows/run/continuation-acceptance.js.map +1 -1
  202. package/dist/workflows/run/human-waits.js +5 -6
  203. package/dist/workflows/run/human-waits.js.map +1 -1
  204. package/dist/workflows/run/inbox-claims.js +1 -2
  205. package/dist/workflows/run/inbox-claims.js.map +1 -1
  206. package/dist/workflows/run/input-delivery.js +1 -2
  207. package/dist/workflows/run/input-delivery.js.map +1 -1
  208. package/dist/workflows/run/input-receipts.js +6 -7
  209. package/dist/workflows/run/input-receipts.js.map +1 -1
  210. package/dist/workflows/run/prompts.js +1 -2
  211. package/dist/workflows/run/prompts.js.map +1 -1
  212. package/dist/workflows/run/run-finish.js +6 -6
  213. package/dist/workflows/run/run-finish.js.map +1 -1
  214. package/dist/workflows/run/run-line.js +2 -3
  215. package/dist/workflows/run/run-line.js.map +1 -1
  216. package/dist/workflows/run/run-recovery.js +4 -6
  217. package/dist/workflows/run/run-recovery.js.map +1 -1
  218. package/dist/workflows/run/subagent-waits.js +3 -4
  219. package/dist/workflows/run/subagent-waits.js.map +1 -1
  220. package/dist/workflows/run/turn-nudges.js +2 -3
  221. package/dist/workflows/run/turn-nudges.js.map +1 -1
  222. package/dist/workflows/run/turn-settler.js +1 -2
  223. package/dist/workflows/run/turn-settler.js.map +1 -1
  224. package/dist/workflows/run/wait-engine.d.ts +82 -72
  225. package/dist/workflows/run/wait-engine.js +6 -7
  226. package/dist/workflows/run/wait-engine.js.map +1 -1
  227. package/dist/workflows/run/wait-kinds.js +11 -12
  228. package/dist/workflows/run/wait-kinds.js.map +1 -1
  229. package/dist/workflows/run/wait-registry.js +2 -2
  230. package/dist/workflows/run/wait-registry.js.map +1 -1
  231. package/dist/workflows/run/worker-executions.js +2 -3
  232. package/dist/workflows/run/worker-executions.js.map +1 -1
  233. package/dist/workflows/run/worker-questions.js +4 -5
  234. package/dist/workflows/run/worker-questions.js.map +1 -1
  235. package/dist/workflows/run/worktree-autosave.js +2 -3
  236. package/dist/workflows/run/worktree-autosave.js.map +1 -1
  237. package/dist/workflows/run-states.js +17 -18
  238. package/dist/workflows/run-states.js.map +1 -1
  239. package/dist/workflows/turn-end.d.ts +1 -1
  240. package/dist/workflows/turn-end.js +12 -2
  241. package/dist/workflows/turn-end.js.map +1 -1
  242. package/dist/workflows/types.js +1 -2
  243. package/dist/workflows/types.js.map +1 -1
  244. package/dist/workflows/wait-scope.d.ts +6 -8
  245. package/dist/workflows/wait-scope.js +13 -14
  246. package/dist/workflows/wait-scope.js.map +1 -1
  247. package/dist/workspace/agent-accounts.js +3 -4
  248. package/dist/workspace/agent-accounts.js.map +1 -1
  249. package/dist/workspace/backup-cli.js +2 -3
  250. package/dist/workspace/backup-cli.js.map +1 -1
  251. package/dist/workspace/backups.js +1 -2
  252. package/dist/workspace/backups.js.map +1 -1
  253. package/dist/workspace/config.js +3 -4
  254. package/dist/workspace/config.js.map +1 -1
  255. package/dist/workspace/migrations.js +1 -2
  256. package/dist/workspace/migrations.js.map +1 -1
  257. package/dist/workspace/projects-cli.js +1 -2
  258. package/dist/workspace/projects-cli.js.map +1 -1
  259. package/dist/worktree-manifest.js +1 -2
  260. package/dist/worktree-manifest.js.map +1 -1
  261. package/dist/worktree-setup.js +3 -4
  262. package/dist/worktree-setup.js.map +1 -1
  263. package/package.json +4 -4
  264. package/web/dist/assets/activity-motion-CjiZJB7H.js +2 -0
  265. package/web/dist/assets/activity-route-1W0U2NqM.js +1 -0
  266. package/web/dist/assets/{agent-accounts-0EKsrgdJ.js → agent-accounts-DJbSC2sB.js} +1 -1
  267. package/web/dist/assets/attention-BdI3xSwD.js +1 -0
  268. package/web/dist/assets/button-RJMdCnZw.js +3 -0
  269. package/web/dist/assets/centered-state-dmABwupF.js +1 -0
  270. package/web/dist/assets/{cez-idle-DreV5r0B.js → cez-idle-CKE0WtrH.js} +1 -1
  271. package/web/dist/assets/commit-diff-panel-DkvsBvlr.js +1 -0
  272. package/web/dist/assets/dialog-7Mg2IZCP.js +1 -0
  273. package/web/dist/assets/diff-BCSgE1l6.js +3 -0
  274. package/web/dist/assets/diff-controls-BpQyN23g.js +1 -0
  275. package/web/dist/assets/{diff-view-Ch_cdfcV.js → diff-view-B3eMq9Uw.js} +5 -5
  276. package/web/dist/assets/{dist-CwBtGUlU.js → dist-FHKv_Ysh.js} +1 -1
  277. package/web/dist/assets/dropdown-menu-Cr9RsmWG.js +1 -0
  278. package/web/dist/assets/es2015-VrVcR1vD.js +41 -0
  279. package/web/dist/assets/file-preview-BIHQ0YTn.js +2 -0
  280. package/web/dist/assets/git-toolbar-BtU7xtmD.js +1 -0
  281. package/web/dist/assets/github-INQcTy36.js +1 -0
  282. package/web/dist/assets/{global-activity-route-DVSxx-ha.js → global-activity-route-B3-2eIFG.js} +1 -1
  283. package/web/dist/assets/{image-preview-cn57tA1m.js → image-preview-BmcpjY75.js} +1 -1
  284. package/web/dist/assets/index-DUuc-42H.js +14 -0
  285. package/web/dist/assets/{live-protocol-kUxhOnN1.js → live-protocol-B5jzpJgG.js} +1 -1
  286. package/web/dist/assets/markdown-DcRzCfVU.js +4 -0
  287. package/web/dist/assets/{nav-row-styles-DSBuSnEE.js → nav-row-styles-D4xk5Osn.js} +1 -1
  288. package/web/dist/assets/picker-pill-x0hXGTLP.js +15 -0
  289. package/web/dist/assets/preview-pane-connected-CCHDk6rz.js +3 -0
  290. package/web/dist/assets/project-router-_V9XDi3p.js +1 -0
  291. package/web/dist/assets/project-scope-context-VENshCVj.js +4 -0
  292. package/web/dist/assets/{prompt-template-menu-i7FXpDOj.js → prompt-template-menu-C60uqznw.js} +1 -1
  293. package/web/dist/assets/{queries-B4jd0jVr.js → queries-r1Fc1fWN.js} +1 -1
  294. package/web/dist/assets/reference-chip-GElOouoU.js +1 -0
  295. package/web/dist/assets/repo-git-B09hWAxY.js +1 -0
  296. package/web/dist/assets/{report-reader-B1yQJCNt.js → report-reader-y4t2Prir.js} +1 -1
  297. package/web/dist/assets/reports-BU3a_4kU.js +1 -0
  298. package/web/dist/assets/run-header-BZukpHEK.js +2 -0
  299. package/web/dist/assets/skills-C6V0Yo95.js +1 -0
  300. package/web/dist/assets/{tab-link-Bc-CvRBn.js → tab-link-CuL027Wh.js} +1 -1
  301. package/web/dist/assets/{task-changes-DIU2Co-H.js → task-changes-Dx9OTRkk.js} +1 -1
  302. package/web/dist/assets/{task-commits-Cccn7xrR.js → task-commits-ClWR4wQR.js} +1 -1
  303. package/web/dist/assets/{task-files-C-66-xPc.js → task-files-DCkrdsrz.js} +1 -1
  304. package/web/dist/assets/{task-github-item-5mF5DxKm.js → task-github-item-C3D4vDw7.js} +1 -1
  305. package/web/dist/assets/task-thread-D0sTMg9h.js +9 -0
  306. package/web/dist/assets/thread-state-BHSYtS79.js +4 -0
  307. package/web/dist/assets/{toaster-CoMJoQvk.js → toaster-BWMQArHJ.js} +1 -1
  308. package/web/dist/assets/use-desktop-BnWAyH1e.js +1 -0
  309. package/web/dist/assets/use-hand-to-agent-state-VmvgZIh6.js +1 -0
  310. package/web/dist/assets/{useInfiniteQuery-DBV7oz3w.js → useInfiniteQuery-DbCUWSLK.js} +1 -1
  311. package/web/dist/assets/useQuery-CxWGWuW4.js +1 -0
  312. package/web/dist/assets/{workflows-C1kx7nsU.js → workflows-B_HWC2FT.js} +3 -3
  313. package/web/dist/assets/{ws-D6M4b5Tw.js → ws-jytXIi1s.js} +1 -1
  314. package/web/dist/assets/zoomable-image-DefjK4q5.js +1 -0
  315. package/web/dist/index.html +23 -23
  316. package/web/dist/live-worker.js +1 -1
  317. package/dist/home/display.d.ts +0 -5
  318. package/dist/home/display.js +0 -11
  319. package/dist/home/display.js.map +0 -1
  320. package/web/dist/assets/activity-motion-W7LQQzqR.js +0 -2
  321. package/web/dist/assets/activity-route-b-zH6KX6.js +0 -1
  322. package/web/dist/assets/attention-CvRtkmnP.js +0 -1
  323. package/web/dist/assets/button-DGwhwRuD.js +0 -3
  324. package/web/dist/assets/centered-state-B5QmAy2y.js +0 -1
  325. package/web/dist/assets/commit-diff-panel-BBZZbVgE.js +0 -1
  326. package/web/dist/assets/dialog-tMSuX5a7.js +0 -1
  327. package/web/dist/assets/diff-CkqVFsT7.js +0 -3
  328. package/web/dist/assets/diff-controls-fOOHkbPK.js +0 -1
  329. package/web/dist/assets/dropdown-menu-CzUYjvx4.js +0 -1
  330. package/web/dist/assets/es2015-DTn4s5Lh.js +0 -41
  331. package/web/dist/assets/file-preview-0T9fzXJY.js +0 -2
  332. package/web/dist/assets/git-toolbar-Ccpg_TKe.js +0 -1
  333. package/web/dist/assets/github-CPJXTYE-.js +0 -1
  334. package/web/dist/assets/index-FZIxXka9.js +0 -14
  335. package/web/dist/assets/markdown-BldkAL5N.js +0 -4
  336. package/web/dist/assets/picker-pill-DN0WFWoS.js +0 -15
  337. package/web/dist/assets/preview-pane-connected-xrHDiOdF.js +0 -3
  338. package/web/dist/assets/project-router-BVp1TVVP.js +0 -1
  339. package/web/dist/assets/project-scope-context-DSlnqjT3.js +0 -4
  340. package/web/dist/assets/reference-chip-DeYsiLdM.js +0 -1
  341. package/web/dist/assets/repo-git-BzPaI8dr.js +0 -1
  342. package/web/dist/assets/reports-DeRPb5Oo.js +0 -1
  343. package/web/dist/assets/run-header-DGZHSrbt.js +0 -2
  344. package/web/dist/assets/skills-2ng-kCCS.js +0 -1
  345. package/web/dist/assets/task-thread-B_AnobAW.js +0 -9
  346. package/web/dist/assets/thread-state-DQJxLYUo.js +0 -4
  347. package/web/dist/assets/use-desktop-CPzO9ufG.js +0 -1
  348. package/web/dist/assets/use-hand-to-agent-state-ClzuNnhO.js +0 -1
  349. package/web/dist/assets/useQuery-DqWzagrg.js +0 -1
  350. package/web/dist/assets/zoomable-image-C7mEDZaS.js +0 -1
@@ -1,5 +1,6 @@
1
1
  import type { AgentInput, ConversationMessage, ConversationSendRequest, ConversationState, DelegationState, RequestOutcome } from '../contract/index.js';
2
2
  import { type RunRecord, type RunStore } from '../runs/store.ts';
3
+ import { type Lookup } from '../runs/task-rights.ts';
3
4
  /**
4
5
  * First durable request settlement wins, with the defined late-reply timeout amendment handled
5
6
  * by send. Review is not completion for a worker, which its parent can resume; a peer recipient at
@@ -14,2185 +15,27 @@ export declare function reconcileConversationState(root: RunRecord, lookup: (id:
14
15
  export declare function projectConversationEvents(store: import('../runs/store.ts').RunStore, root: RunRecord): void;
15
16
  /** The record that makes a run a root task: every worker operation, no receipts yet. */
16
17
  export declare const rootDelegation: () => DelegationState;
17
- /** A root task: a root delegation record, or a top-level run with no record yet, which has not
18
- * opened a delegation session yet (spec 2026-10-27-task-communication-protocol § 2). */
19
- export declare function isRootTask(run: RunRecord | undefined): run is RunRecord;
20
- /** Two root tasks of one project (spec § 2), neither family deleting its history; a sender of a new
21
- * message is live. Undefined when the two are not both root tasks. */
22
- export declare function peerPair(sender: RunRecord | undefined, recipient: RunRecord | undefined, send: boolean): {
18
+ export type ResolvedPair = {
19
+ sender: RunRecord;
20
+ recipient: RunRecord;
21
+ } & ({
23
22
  relationship: 'peer';
24
- sender: {
25
- archiveWhenDone?: boolean | undefined;
26
- autoMergePr?: boolean | undefined;
27
- allowWorkers?: boolean | undefined;
28
- allowMessaging?: boolean | undefined;
29
- id: string;
30
- title: string;
31
- titleSummary?: string | undefined;
32
- diffStat?: {
33
- adds: number;
34
- dels: number;
35
- files: number;
36
- repointed?: boolean | undefined;
37
- } | undefined;
38
- workflow: string;
39
- task: string;
40
- queuedMessages?: {
41
- replayAfterOpen?: true | undefined;
42
- id: string;
43
- text: string;
44
- images?: string[] | undefined;
45
- createdAt: string;
46
- }[] | undefined;
47
- continuationMessage?: {
48
- replayAfterOpen?: true | undefined;
49
- id: string;
50
- text: string;
51
- images?: string[] | undefined;
52
- createdAt: string;
53
- origin?: "human" | "lifecycle" | undefined;
54
- agentInputId?: string | undefined;
55
- task?: string | undefined;
56
- resumeContext?: {
57
- failure?: {
58
- stepId?: string | undefined;
59
- error: string;
60
- } | undefined;
61
- restarted?: true | undefined;
62
- cutOff?: {
63
- tools?: string[] | undefined;
64
- subagents?: string[] | undefined;
65
- } | undefined;
66
- } | undefined;
67
- } | undefined;
68
- invalidAsk?: boolean | undefined;
69
- agentInputs?: {
70
- conversation?: {
71
- senderRunId: string;
72
- recipientRunId: string;
73
- kind: "follow-up" | "progress" | "reply" | "request";
74
- requestId?: string | undefined;
75
- relationship?: "family" | "peer" | undefined;
76
- } | undefined;
77
- id: string;
78
- source: "agent" | "lifecycle";
79
- parentRunId: string;
80
- text: string;
81
- createdAt: string;
82
- deliveredAt?: string | undefined;
83
- consumedAt?: string | undefined;
84
- awaitingRead?: true | undefined;
85
- inboxClaim?: {
86
- receiptId: string;
87
- generation: string;
88
- expiresAt: string;
89
- acknowledgedAt?: string | undefined;
90
- memberIds?: string[] | undefined;
91
- } | undefined;
92
- purpose?: "completion-refusal" | "undelivered-question" | undefined;
93
- requestHash?: string | undefined;
94
- deadline?: string | undefined;
95
- }[] | undefined;
96
- waits?: ({
97
- prUrl: string;
98
- repository: string;
99
- prNumber: number;
100
- headSha: string;
101
- id: string;
102
- source: "agent" | "cezar";
103
- 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";
104
- registeredAt: string;
105
- phase: "cancelled" | "delivered" | "open" | "resolved";
106
- resolvedAt?: string | undefined;
107
- deliveredAt?: string | undefined;
108
- cancelledAt?: string | undefined;
109
- turnId: string;
110
- kind: "pr";
111
- deadline: string;
112
- generation: string;
113
- timeoutSeconds: number;
114
- until: "checks" | "merge" | "merge_or_blocked";
115
- wakeOnConflict: boolean;
116
- result?: {
117
- outcome: "blocked" | "cancelled" | "closed" | "conflicting" | "deadline" | "error" | "failed" | "head_changed" | "merged" | "no_checks" | "passed" | "skipped" | "stuck";
118
- headSha: string;
119
- observedHeadSha?: string | undefined;
120
- mergeable?: "CONFLICTING" | "MERGEABLE" | "UNKNOWN" | undefined;
121
- mergeStateStatus?: string | undefined;
122
- mergedAt?: string | undefined;
123
- mergeCommitSha?: string | undefined;
124
- mergeBlock?: {
125
- reason: "conflict" | "no_pending_merge";
126
- isInMergeQueue: boolean;
127
- autoMergeEnabled: boolean;
128
- event?: {
129
- kind: "auto_merge_disabled" | "queue_removal";
130
- createdAt: string;
131
- reason?: string | undefined;
132
- reasonCode?: string | undefined;
133
- } | undefined;
134
- } | undefined;
135
- observedAt: string;
136
- checks: {
137
- name: string;
138
- state: string;
139
- link: string;
140
- }[];
141
- totalChecks: number;
142
- truncated: boolean;
143
- diagnostic?: string | undefined;
144
- } | undefined;
145
- } | {
146
- id: string;
147
- source: "agent" | "cezar";
148
- 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";
149
- registeredAt: string;
150
- phase: "cancelled" | "delivered" | "open" | "resolved";
151
- resolvedAt?: string | undefined;
152
- deliveredAt?: string | undefined;
153
- cancelledAt?: string | undefined;
154
- turnId: string;
155
- kind: "timer";
156
- deadline: string;
157
- seconds: number;
158
- note?: string | undefined;
159
- } | {
160
- id: string;
161
- source: "agent" | "cezar";
162
- 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";
163
- registeredAt: string;
164
- phase: "cancelled" | "delivered" | "open" | "resolved";
165
- resolvedAt?: string | undefined;
166
- deliveredAt?: string | undefined;
167
- cancelledAt?: string | undefined;
168
- turnId: string;
169
- kind: "human";
170
- questions?: {
171
- id?: string | undefined;
172
- header: string;
173
- question: string;
174
- options?: {
175
- label: string;
176
- description?: string | undefined;
177
- }[] | undefined;
178
- multiSelect?: boolean | undefined;
179
- }[] | undefined;
180
- context?: string | undefined;
181
- askSeq?: number | undefined;
182
- } | {
183
- id: string;
184
- source: "agent" | "cezar";
185
- 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";
186
- registeredAt: string;
187
- phase: "cancelled" | "delivered" | "open" | "resolved";
188
- resolvedAt?: string | undefined;
189
- deliveredAt?: string | undefined;
190
- cancelledAt?: string | undefined;
191
- turnId: string;
192
- kind: "worker";
193
- deadline?: string | undefined;
194
- timeoutSeconds?: number | undefined;
195
- mode?: "all" | "any" | "one" | undefined;
196
- workerIds?: string[] | undefined;
197
- revisions?: {
198
- workerId: string;
199
- revision: number;
200
- }[] | undefined;
201
- outcomes?: {
202
- workerId: string;
203
- status: "cancelled" | "done" | "failed" | "review";
204
- observedAt: string;
205
- summary?: string | undefined;
206
- revision?: number | undefined;
207
- }[] | undefined;
208
- requestIds?: string[] | undefined;
209
- requestOutcomes?: {
210
- requestId: string;
211
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
212
- observedAt: string;
213
- replyId?: string | undefined;
214
- }[] | undefined;
215
- result?: {
216
- reason: "outcome" | "timeout";
217
- } | undefined;
218
- wakeInputId?: string | undefined;
219
- } | {
220
- id: string;
221
- source: "agent" | "cezar";
222
- 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";
223
- registeredAt: string;
224
- phase: "cancelled" | "delivered" | "open" | "resolved";
225
- resolvedAt?: string | undefined;
226
- deliveredAt?: string | undefined;
227
- cancelledAt?: string | undefined;
228
- turnId: string;
229
- kind: "process";
230
- deadline: string;
231
- timeoutSeconds: number;
232
- pid: number;
233
- startToken?: string | undefined;
234
- exitFile?: string | undefined;
235
- note?: string | undefined;
236
- result?: {
237
- outcome: "deadline" | "error" | "exit_file" | "exited";
238
- observedAt: string;
239
- exitCode?: number | undefined;
240
- exitFileNote?: "not-an-exit-code" | undefined;
241
- diagnostic?: string | undefined;
242
- } | undefined;
243
- } | {
244
- id: string;
245
- source: "agent" | "cezar";
246
- 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";
247
- registeredAt: string;
248
- phase: "cancelled" | "delivered" | "open" | "resolved";
249
- resolvedAt?: string | undefined;
250
- deliveredAt?: string | undefined;
251
- cancelledAt?: string | undefined;
252
- turnId: string;
253
- kind: "peer";
254
- deadline: string;
255
- timeoutSeconds: number;
256
- peerIds: string[];
257
- result?: {
258
- reason: "message";
259
- peerRunId: string;
260
- messageId: string;
261
- } | {
262
- reason: "settled";
263
- peerRunId: string;
264
- } | {
265
- reason: "timeout";
266
- } | undefined;
267
- } | {
268
- id: string;
269
- registeredAt: string;
270
- phase: "cancelled" | "delivered" | "open" | "resolved";
271
- resolvedAt?: string | undefined;
272
- deliveredAt?: string | undefined;
273
- cancelledAt?: string | undefined;
274
- turnId: string;
275
- kind: "subagent";
276
- source: "cezar";
277
- via: "native-subagents";
278
- deadline: string;
279
- children: {
280
- id: string;
281
- status: "cancelled" | "completed" | "failed" | "running";
282
- }[];
283
- result?: {
284
- reason: "interrupted" | "settled" | "superseded" | "timeout";
285
- } | undefined;
286
- })[] | undefined;
287
- waitRegistrations?: {
288
- operationId: string;
289
- requestHash: string;
290
- wait: {
291
- prUrl: string;
292
- repository: string;
293
- prNumber: number;
294
- headSha: string;
295
- id: string;
296
- source: "agent" | "cezar";
297
- 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";
298
- registeredAt: string;
299
- phase: "cancelled" | "delivered" | "open" | "resolved";
300
- resolvedAt?: string | undefined;
301
- deliveredAt?: string | undefined;
302
- cancelledAt?: string | undefined;
303
- turnId: string;
304
- kind: "pr";
305
- deadline: string;
306
- generation: string;
307
- timeoutSeconds: number;
308
- until: "checks" | "merge" | "merge_or_blocked";
309
- wakeOnConflict: boolean;
310
- result?: {
311
- outcome: "blocked" | "cancelled" | "closed" | "conflicting" | "deadline" | "error" | "failed" | "head_changed" | "merged" | "no_checks" | "passed" | "skipped" | "stuck";
312
- headSha: string;
313
- observedHeadSha?: string | undefined;
314
- mergeable?: "CONFLICTING" | "MERGEABLE" | "UNKNOWN" | undefined;
315
- mergeStateStatus?: string | undefined;
316
- mergedAt?: string | undefined;
317
- mergeCommitSha?: string | undefined;
318
- mergeBlock?: {
319
- reason: "conflict" | "no_pending_merge";
320
- isInMergeQueue: boolean;
321
- autoMergeEnabled: boolean;
322
- event?: {
323
- kind: "auto_merge_disabled" | "queue_removal";
324
- createdAt: string;
325
- reason?: string | undefined;
326
- reasonCode?: string | undefined;
327
- } | undefined;
328
- } | undefined;
329
- observedAt: string;
330
- checks: {
331
- name: string;
332
- state: string;
333
- link: string;
334
- }[];
335
- totalChecks: number;
336
- truncated: boolean;
337
- diagnostic?: string | undefined;
338
- } | undefined;
339
- } | {
340
- id: string;
341
- source: "agent" | "cezar";
342
- 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";
343
- registeredAt: string;
344
- phase: "cancelled" | "delivered" | "open" | "resolved";
345
- resolvedAt?: string | undefined;
346
- deliveredAt?: string | undefined;
347
- cancelledAt?: string | undefined;
348
- turnId: string;
349
- kind: "timer";
350
- deadline: string;
351
- seconds: number;
352
- note?: string | undefined;
353
- } | {
354
- id: string;
355
- source: "agent" | "cezar";
356
- 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";
357
- registeredAt: string;
358
- phase: "cancelled" | "delivered" | "open" | "resolved";
359
- resolvedAt?: string | undefined;
360
- deliveredAt?: string | undefined;
361
- cancelledAt?: string | undefined;
362
- turnId: string;
363
- kind: "human";
364
- questions?: {
365
- id?: string | undefined;
366
- header: string;
367
- question: string;
368
- options?: {
369
- label: string;
370
- description?: string | undefined;
371
- }[] | undefined;
372
- multiSelect?: boolean | undefined;
373
- }[] | undefined;
374
- context?: string | undefined;
375
- askSeq?: number | undefined;
376
- } | {
377
- id: string;
378
- source: "agent" | "cezar";
379
- 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";
380
- registeredAt: string;
381
- phase: "cancelled" | "delivered" | "open" | "resolved";
382
- resolvedAt?: string | undefined;
383
- deliveredAt?: string | undefined;
384
- cancelledAt?: string | undefined;
385
- turnId: string;
386
- kind: "worker";
387
- deadline?: string | undefined;
388
- timeoutSeconds?: number | undefined;
389
- mode?: "all" | "any" | "one" | undefined;
390
- workerIds?: string[] | undefined;
391
- revisions?: {
392
- workerId: string;
393
- revision: number;
394
- }[] | undefined;
395
- outcomes?: {
396
- workerId: string;
397
- status: "cancelled" | "done" | "failed" | "review";
398
- observedAt: string;
399
- summary?: string | undefined;
400
- revision?: number | undefined;
401
- }[] | undefined;
402
- requestIds?: string[] | undefined;
403
- requestOutcomes?: {
404
- requestId: string;
405
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
406
- observedAt: string;
407
- replyId?: string | undefined;
408
- }[] | undefined;
409
- result?: {
410
- reason: "outcome" | "timeout";
411
- } | undefined;
412
- wakeInputId?: string | undefined;
413
- } | {
414
- id: string;
415
- source: "agent" | "cezar";
416
- 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";
417
- registeredAt: string;
418
- phase: "cancelled" | "delivered" | "open" | "resolved";
419
- resolvedAt?: string | undefined;
420
- deliveredAt?: string | undefined;
421
- cancelledAt?: string | undefined;
422
- turnId: string;
423
- kind: "process";
424
- deadline: string;
425
- timeoutSeconds: number;
426
- pid: number;
427
- startToken?: string | undefined;
428
- exitFile?: string | undefined;
429
- note?: string | undefined;
430
- result?: {
431
- outcome: "deadline" | "error" | "exit_file" | "exited";
432
- observedAt: string;
433
- exitCode?: number | undefined;
434
- exitFileNote?: "not-an-exit-code" | undefined;
435
- diagnostic?: string | undefined;
436
- } | undefined;
437
- } | {
438
- id: string;
439
- source: "agent" | "cezar";
440
- 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";
441
- registeredAt: string;
442
- phase: "cancelled" | "delivered" | "open" | "resolved";
443
- resolvedAt?: string | undefined;
444
- deliveredAt?: string | undefined;
445
- cancelledAt?: string | undefined;
446
- turnId: string;
447
- kind: "peer";
448
- deadline: string;
449
- timeoutSeconds: number;
450
- peerIds: string[];
451
- result?: {
452
- reason: "message";
453
- peerRunId: string;
454
- messageId: string;
455
- } | {
456
- reason: "settled";
457
- peerRunId: string;
458
- } | {
459
- reason: "timeout";
460
- } | undefined;
461
- } | {
462
- id: string;
463
- registeredAt: string;
464
- phase: "cancelled" | "delivered" | "open" | "resolved";
465
- resolvedAt?: string | undefined;
466
- deliveredAt?: string | undefined;
467
- cancelledAt?: string | undefined;
468
- turnId: string;
469
- kind: "subagent";
470
- source: "cezar";
471
- via: "native-subagents";
472
- deadline: string;
473
- children: {
474
- id: string;
475
- status: "cancelled" | "completed" | "failed" | "running";
476
- }[];
477
- result?: {
478
- reason: "interrupted" | "settled" | "superseded" | "timeout";
479
- } | undefined;
480
- };
481
- deduplicated: boolean;
482
- }[] | undefined;
483
- lastWaits?: ({
484
- prUrl: string;
485
- repository: string;
486
- prNumber: number;
487
- headSha: string;
488
- id: string;
489
- source: "agent" | "cezar";
490
- 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";
491
- registeredAt: string;
492
- phase: "cancelled" | "delivered" | "open" | "resolved";
493
- resolvedAt?: string | undefined;
494
- deliveredAt?: string | undefined;
495
- cancelledAt?: string | undefined;
496
- turnId: string;
497
- kind: "pr";
498
- deadline: string;
499
- generation: string;
500
- timeoutSeconds: number;
501
- until: "checks" | "merge" | "merge_or_blocked";
502
- wakeOnConflict: boolean;
503
- result?: {
504
- outcome: "blocked" | "cancelled" | "closed" | "conflicting" | "deadline" | "error" | "failed" | "head_changed" | "merged" | "no_checks" | "passed" | "skipped" | "stuck";
505
- headSha: string;
506
- observedHeadSha?: string | undefined;
507
- mergeable?: "CONFLICTING" | "MERGEABLE" | "UNKNOWN" | undefined;
508
- mergeStateStatus?: string | undefined;
509
- mergedAt?: string | undefined;
510
- mergeCommitSha?: string | undefined;
511
- mergeBlock?: {
512
- reason: "conflict" | "no_pending_merge";
513
- isInMergeQueue: boolean;
514
- autoMergeEnabled: boolean;
515
- event?: {
516
- kind: "auto_merge_disabled" | "queue_removal";
517
- createdAt: string;
518
- reason?: string | undefined;
519
- reasonCode?: string | undefined;
520
- } | undefined;
521
- } | undefined;
522
- observedAt: string;
523
- checks: {
524
- name: string;
525
- state: string;
526
- link: string;
527
- }[];
528
- totalChecks: number;
529
- truncated: boolean;
530
- diagnostic?: string | undefined;
531
- } | undefined;
532
- } | {
533
- id: string;
534
- source: "agent" | "cezar";
535
- 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";
536
- registeredAt: string;
537
- phase: "cancelled" | "delivered" | "open" | "resolved";
538
- resolvedAt?: string | undefined;
539
- deliveredAt?: string | undefined;
540
- cancelledAt?: string | undefined;
541
- turnId: string;
542
- kind: "timer";
543
- deadline: string;
544
- seconds: number;
545
- note?: string | undefined;
546
- } | {
547
- id: string;
548
- source: "agent" | "cezar";
549
- 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";
550
- registeredAt: string;
551
- phase: "cancelled" | "delivered" | "open" | "resolved";
552
- resolvedAt?: string | undefined;
553
- deliveredAt?: string | undefined;
554
- cancelledAt?: string | undefined;
555
- turnId: string;
556
- kind: "human";
557
- questions?: {
558
- id?: string | undefined;
559
- header: string;
560
- question: string;
561
- options?: {
562
- label: string;
563
- description?: string | undefined;
564
- }[] | undefined;
565
- multiSelect?: boolean | undefined;
566
- }[] | undefined;
567
- context?: string | undefined;
568
- askSeq?: number | undefined;
569
- } | {
570
- id: string;
571
- source: "agent" | "cezar";
572
- 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";
573
- registeredAt: string;
574
- phase: "cancelled" | "delivered" | "open" | "resolved";
575
- resolvedAt?: string | undefined;
576
- deliveredAt?: string | undefined;
577
- cancelledAt?: string | undefined;
578
- turnId: string;
579
- kind: "worker";
580
- deadline?: string | undefined;
581
- timeoutSeconds?: number | undefined;
582
- mode?: "all" | "any" | "one" | undefined;
583
- workerIds?: string[] | undefined;
584
- revisions?: {
585
- workerId: string;
586
- revision: number;
587
- }[] | undefined;
588
- outcomes?: {
589
- workerId: string;
590
- status: "cancelled" | "done" | "failed" | "review";
591
- observedAt: string;
592
- summary?: string | undefined;
593
- revision?: number | undefined;
594
- }[] | undefined;
595
- requestIds?: string[] | undefined;
596
- requestOutcomes?: {
597
- requestId: string;
598
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
599
- observedAt: string;
600
- replyId?: string | undefined;
601
- }[] | undefined;
602
- result?: {
603
- reason: "outcome" | "timeout";
604
- } | undefined;
605
- wakeInputId?: string | undefined;
606
- } | {
607
- id: string;
608
- source: "agent" | "cezar";
609
- 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";
610
- registeredAt: string;
611
- phase: "cancelled" | "delivered" | "open" | "resolved";
612
- resolvedAt?: string | undefined;
613
- deliveredAt?: string | undefined;
614
- cancelledAt?: string | undefined;
615
- turnId: string;
616
- kind: "process";
617
- deadline: string;
618
- timeoutSeconds: number;
619
- pid: number;
620
- startToken?: string | undefined;
621
- exitFile?: string | undefined;
622
- note?: string | undefined;
623
- result?: {
624
- outcome: "deadline" | "error" | "exit_file" | "exited";
625
- observedAt: string;
626
- exitCode?: number | undefined;
627
- exitFileNote?: "not-an-exit-code" | undefined;
628
- diagnostic?: string | undefined;
629
- } | undefined;
630
- } | {
631
- id: string;
632
- source: "agent" | "cezar";
633
- 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";
634
- registeredAt: string;
635
- phase: "cancelled" | "delivered" | "open" | "resolved";
636
- resolvedAt?: string | undefined;
637
- deliveredAt?: string | undefined;
638
- cancelledAt?: string | undefined;
639
- turnId: string;
640
- kind: "peer";
641
- deadline: string;
642
- timeoutSeconds: number;
643
- peerIds: string[];
644
- result?: {
645
- reason: "message";
646
- peerRunId: string;
647
- messageId: string;
648
- } | {
649
- reason: "settled";
650
- peerRunId: string;
651
- } | {
652
- reason: "timeout";
653
- } | undefined;
654
- } | {
655
- id: string;
656
- registeredAt: string;
657
- phase: "cancelled" | "delivered" | "open" | "resolved";
658
- resolvedAt?: string | undefined;
659
- deliveredAt?: string | undefined;
660
- cancelledAt?: string | undefined;
661
- turnId: string;
662
- kind: "subagent";
663
- source: "cezar";
664
- via: "native-subagents";
665
- deadline: string;
666
- children: {
667
- id: string;
668
- status: "cancelled" | "completed" | "failed" | "running";
669
- }[];
670
- result?: {
671
- reason: "interrupted" | "settled" | "superseded" | "timeout";
672
- } | undefined;
673
- })[] | undefined;
674
- previewServers?: {
675
- port: number;
676
- command: string;
677
- cwd?: string | undefined;
678
- label: string;
679
- path?: string | undefined;
680
- registeredAt: string;
681
- answeredAtRegistration: boolean;
682
- }[] | undefined;
683
- taskImages?: string[] | undefined;
684
- model?: string | undefined;
685
- effort?: string | undefined;
686
- modelIdentity?: string | undefined;
687
- removedRunner?: string | undefined;
688
- agentProfile?: string | undefined;
689
- systemPrompt?: string | undefined;
690
- generateFollowups?: boolean | undefined;
691
- autonomous?: boolean | undefined;
692
- completionAction?: {
693
- id: string;
694
- phase: "blocked" | "complete" | "pending";
695
- message?: string | undefined;
696
- } | undefined;
697
- archiveBlocker?: {
698
- message: string;
699
- runId?: string | undefined;
700
- pullRequestUrl?: string | undefined;
701
- } | undefined;
702
- status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
703
- createdAt: string;
704
- startedAt?: string | undefined;
705
- finishedAt?: string | undefined;
706
- tokensUsed: number;
707
- inputTokens?: number | undefined;
708
- outputTokens?: number | undefined;
709
- costUsd?: number | undefined;
710
- pullRequestUrl?: string | undefined;
711
- referencedPullRequestUrl?: string | undefined;
712
- prNumber?: number | undefined;
713
- issueNumber?: number | undefined;
714
- referencedIssueNumberSeeded?: boolean | undefined;
715
- titleOrigin?: "auto" | "marker" | "user" | undefined;
716
- markerRefs?: {
717
- pr?: number | undefined;
718
- issue?: number | undefined;
719
- } | undefined;
720
- referencedPrCandidates?: string[] | undefined;
721
- referencedIssueUrl?: string | undefined;
722
- referencedIssueCandidates?: string[] | undefined;
723
- worktree?: false | undefined;
724
- worktreePath?: string | undefined;
725
- branch?: string | undefined;
726
- baseBranch?: string | undefined;
727
- worktreeReclaimedAt?: string | undefined;
728
- groupId?: string | undefined;
729
- variant?: string | undefined;
730
- clientRequestId?: string | undefined;
731
- clientRequestHash?: string | undefined;
732
- peakRssBytes?: number | undefined;
733
- peakProcCount?: number | undefined;
734
- archivedAt?: string | undefined;
735
- autoArchive?: {
736
- reason: "pull-requests-merged";
737
- archivedAt: string;
738
- fingerprint: string;
739
- pullRequests: {
740
- owner: string;
741
- repo: string;
742
- number: number;
743
- mergedAt: string;
744
- }[];
745
- } | undefined;
746
- manualUnarchivedAt?: string | undefined;
747
- pinned?: boolean | undefined;
748
- pinnedAt?: string | undefined;
749
- seenAt?: string | undefined;
750
- currentStepId?: string | undefined;
751
- error?: string | undefined;
752
- delegation?: {
753
- role: "root";
754
- conversation?: {
755
- messages: {
756
- senderRunId: string;
757
- recipientRunId: string;
758
- kind: "follow-up" | "progress" | "reply" | "request";
759
- requestId?: string | undefined;
760
- relationship?: "family" | "peer" | undefined;
761
- id: string;
762
- text: string;
763
- createdAt: string;
764
- deadline?: string | undefined;
765
- requestHash: string;
766
- state: "accepted" | "continuation-required" | "destroyed" | "late";
767
- resumed?: true | undefined;
768
- instruction?: string | undefined;
769
- question?: {
770
- context?: string | undefined;
771
- questions: {
772
- id?: string | undefined;
773
- header: string;
774
- question: string;
775
- options?: {
776
- label: string;
777
- description?: string | undefined;
778
- }[] | undefined;
779
- multiSelect?: boolean | undefined;
780
- }[];
781
- } | undefined;
782
- }[];
783
- outcomes: {
784
- requestId: string;
785
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
786
- observedAt: string;
787
- replyId?: string | undefined;
788
- }[];
789
- } | undefined;
790
- permissions: ("destroy" | "diff" | "inspect" | "spawn" | "steer" | "stop" | "wait")[];
791
- receipts: {
792
- requestId: string;
793
- workerId: string;
794
- requestHash: string;
795
- deletion?: {
796
- phase: "complete" | "pending";
797
- revision: number;
798
- resourceId: string;
799
- generation: string;
800
- } | undefined;
801
- }[];
802
- wait?: {
803
- id: string;
804
- workerIds: string[];
805
- requestIds?: string[] | undefined;
806
- requestOutcomes?: {
807
- requestId: string;
808
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
809
- observedAt: string;
810
- replyId?: string | undefined;
811
- }[] | undefined;
812
- deadline: string;
813
- mode?: "all" | "any" | "one" | undefined;
814
- revisions?: {
815
- workerId: string;
816
- revision: number;
817
- }[] | undefined;
818
- reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
819
- phase: "parked" | "registered" | "wake-pending";
820
- outcomes: {
821
- workerId: string;
822
- status: "cancelled" | "done" | "failed" | "review";
823
- observedAt: string;
824
- summary?: string | undefined;
825
- revision?: number | undefined;
826
- }[];
827
- wakeId?: string | undefined;
828
- } | undefined;
829
- lastWait?: {
830
- id: string;
831
- workerIds: string[];
832
- requestIds?: string[] | undefined;
833
- requestOutcomes?: {
834
- requestId: string;
835
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
836
- observedAt: string;
837
- replyId?: string | undefined;
838
- }[] | undefined;
839
- deadline: string;
840
- mode?: "all" | "any" | "one" | undefined;
841
- revisions?: {
842
- workerId: string;
843
- revision: number;
844
- }[] | undefined;
845
- reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
846
- phase: "parked" | "registered" | "wake-pending";
847
- outcomes: {
848
- workerId: string;
849
- status: "cancelled" | "done" | "failed" | "review";
850
- observedAt: string;
851
- summary?: string | undefined;
852
- revision?: number | undefined;
853
- }[];
854
- wakeId?: string | undefined;
855
- } | undefined;
856
- results?: {
857
- workerId: string;
858
- revision: number;
859
- snapshotId: string;
860
- observedAt: string;
861
- lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
862
- previous?: {
863
- revision: number;
864
- observedAt: string;
865
- lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
866
- } | undefined;
867
- }[] | undefined;
868
- finishRequestedAt?: string | undefined;
869
- historyDeletion?: "pending" | undefined;
870
- completion?: {
871
- phase: "attention" | "waiting";
872
- waitId?: string | undefined;
873
- } | undefined;
874
- } | {
875
- role: "worker";
876
- wait?: {
877
- id: string;
878
- workerIds: string[];
879
- requestIds?: string[] | undefined;
880
- requestOutcomes?: {
881
- requestId: string;
882
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
883
- observedAt: string;
884
- replyId?: string | undefined;
885
- }[] | undefined;
886
- deadline: string;
887
- mode?: "all" | "any" | "one" | undefined;
888
- revisions?: {
889
- workerId: string;
890
- revision: number;
891
- }[] | undefined;
892
- reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
893
- phase: "parked" | "registered" | "wake-pending";
894
- outcomes: {
895
- workerId: string;
896
- status: "cancelled" | "done" | "failed" | "review";
897
- observedAt: string;
898
- summary?: string | undefined;
899
- revision?: number | undefined;
900
- }[];
901
- wakeId?: string | undefined;
902
- } | undefined;
903
- lastWait?: {
904
- id: string;
905
- workerIds: string[];
906
- requestIds?: string[] | undefined;
907
- requestOutcomes?: {
908
- requestId: string;
909
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
910
- observedAt: string;
911
- replyId?: string | undefined;
912
- }[] | undefined;
913
- deadline: string;
914
- mode?: "all" | "any" | "one" | undefined;
915
- revisions?: {
916
- workerId: string;
917
- revision: number;
918
- }[] | undefined;
919
- reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
920
- phase: "parked" | "registered" | "wake-pending";
921
- outcomes: {
922
- workerId: string;
923
- status: "cancelled" | "done" | "failed" | "review";
924
- observedAt: string;
925
- summary?: string | undefined;
926
- revision?: number | undefined;
927
- }[];
928
- wakeId?: string | undefined;
929
- } | undefined;
930
- permissions: ("destroy" | "diff" | "inspect" | "spawn" | "steer" | "stop" | "wait")[];
931
- parentRunId: string;
932
- workspace: {
933
- ownerRunId: string;
934
- resourceId: string;
935
- kind: "owned-isolated";
936
- path: string;
937
- branch: string;
938
- baselineSha: string;
939
- } | {
940
- ownerRunId: string;
941
- resourceId: string;
942
- kind: "shared";
943
- path: string;
944
- hostRunId: string;
945
- baselineSha: string;
946
- };
947
- destroy?: {
948
- requestedAt: string;
949
- phase: "cleaning" | "complete" | "incomplete" | "requested" | "terminating";
950
- remaining: ("branch" | "process" | "worktree")[];
951
- error?: string | undefined;
952
- } | undefined;
953
- context?: {
954
- text?: string | undefined;
955
- inputs: {
956
- source: {
957
- kind: "parent-file";
958
- path: string;
959
- } | {
960
- kind: "baseline-file";
961
- path: string;
962
- } | {
963
- kind: "parent-attachment";
964
- id: string;
965
- };
966
- path: string;
967
- sha256: string;
968
- bytes: number;
969
- }[];
970
- } | undefined;
971
- executionRevision?: number | undefined;
972
- executionStartSeq?: number | undefined;
973
- } | {
974
- role: "invalid";
975
- } | undefined;
976
- lastWaitsError?: string | undefined;
977
- automaticWakes?: number | undefined;
978
- waitDeliveryFailures?: number | undefined;
979
- runner?: "claude" | "codex" | "omp" | "opencode" | "pi" | undefined;
980
- notify?: boolean | undefined;
981
- webhook?: {
982
- lastDeliveredAt?: string | undefined;
983
- lastError?: string | undefined;
984
- lastErrorWebhookId?: string | undefined;
985
- } | undefined;
986
- destroyRetry?: {
987
- attempts: number;
988
- nextAt: string;
989
- needsAttention?: true | undefined;
990
- } | undefined;
991
- stopping?: boolean | undefined;
992
- autoResumeAt?: string | undefined;
993
- autoResumeAttempts?: number | undefined;
994
- autoResumeReason?: "provider-error" | "usage-limit" | undefined;
995
- parkReason?: "closing-wakes" | "hold" | "turn" | undefined;
996
- hasPendingPermission?: boolean | undefined;
997
- pullRequests?: {
998
- number: number;
999
- url?: string | undefined;
1000
- source: "created" | "declared";
1001
- }[] | undefined;
1002
- worktreeSetup?: {
1003
- status: "done" | "failed" | "running";
1004
- startedAt: string;
1005
- finishedAt?: string | undefined;
1006
- durationMs?: number | undefined;
1007
- error?: string | undefined;
1008
- } | undefined;
1009
- workflowCursor?: {
1010
- stepId: string;
1011
- mode: "resume" | "start";
1012
- } | undefined;
1013
- doneAccepted?: {
1014
- session: string;
1015
- at: string;
1016
- seq: number;
1017
- openWaits: string[];
1018
- settledWaits: string[];
1019
- lastInput?: string | undefined;
1020
- summary?: string | undefined;
1021
- freeTurn?: true | undefined;
1022
- } | undefined;
1023
- archived: boolean;
1024
- workflowDef?: {
1025
- name: string;
1026
- description?: string | undefined;
1027
- steps: {
1028
- id: string;
1029
- name?: string | undefined;
1030
- prompt?: string | undefined;
1031
- skill?: string | undefined;
1032
- model?: string | undefined;
1033
- effort?: string | undefined;
1034
- timeoutMs?: number | undefined;
1035
- runner?: "claude" | "codex" | "omp" | "opencode" | "pi" | undefined;
1036
- agentProfile?: string | undefined;
1037
- allowedTools?: string[] | undefined;
1038
- bashAllowlist?: string[] | undefined;
1039
- command?: string | undefined;
1040
- onFail?: {
1041
- retry: string;
1042
- max: number;
1043
- } | undefined;
1044
- }[];
1045
- source: "built-in" | "file";
1046
- path?: string | undefined;
1047
- } | undefined;
1048
- steps: {
1049
- id: string;
1050
- name: string;
1051
- kind: "agent" | "check";
1052
- status: "cancelled" | "done" | "failed" | "pending" | "review" | "running" | "skipped" | "waiting";
1053
- iterations: number;
1054
- retriesUsed?: number | undefined;
1055
- tokensUsed: number;
1056
- inputTokens?: number | undefined;
1057
- outputTokens?: number | undefined;
1058
- usageInvocationsStarted?: number | undefined;
1059
- usageInvocationsObserved?: number | undefined;
1060
- usageTurnsStarted?: number | undefined;
1061
- usageTurnsRecorded?: number | undefined;
1062
- usageInvocationEpoch?: number | undefined;
1063
- startedAt?: string | undefined;
1064
- finishedAt?: string | undefined;
1065
- error?: string | undefined;
1066
- sessionId?: string | undefined;
1067
- removedBackend?: string | undefined;
1068
- profileId?: string | undefined;
1069
- skillPath?: string | undefined;
1070
- costUsd?: number | undefined;
1071
- synthetic?: "continuation" | undefined;
1072
- continuesStepId?: string | undefined;
1073
- backend?: "claude" | "codex" | "omp" | "opencode" | "pi" | undefined;
1074
- }[];
1075
- automation?: {
1076
- automationId: string;
1077
- receiptId: string;
1078
- event: string;
1079
- automationRevision: number;
1080
- githubUrl: string;
1081
- } | undefined;
1082
- automationTrigger?: {
1083
- automationId: string;
1084
- receiptId: string;
1085
- trigger: "catch-up" | "manual" | "schedule";
1086
- occurrenceAt: string;
1087
- automationRevision: number;
1088
- } | undefined;
1089
- handoffRecords?: {
1090
- autosave: {
1091
- at: string;
1092
- note: string;
1093
- periodic?: {
1094
- branch: string | null;
1095
- count: number;
1096
- first: string | null;
1097
- latest: string | null;
1098
- } | undefined;
1099
- }[];
1100
- } | undefined;
1101
- };
1102
- recipient: {
1103
- archiveWhenDone?: boolean | undefined;
1104
- autoMergePr?: boolean | undefined;
1105
- allowWorkers?: boolean | undefined;
1106
- allowMessaging?: boolean | undefined;
1107
- id: string;
1108
- title: string;
1109
- titleSummary?: string | undefined;
1110
- diffStat?: {
1111
- adds: number;
1112
- dels: number;
1113
- files: number;
1114
- repointed?: boolean | undefined;
1115
- } | undefined;
1116
- workflow: string;
1117
- task: string;
1118
- queuedMessages?: {
1119
- replayAfterOpen?: true | undefined;
1120
- id: string;
1121
- text: string;
1122
- images?: string[] | undefined;
1123
- createdAt: string;
1124
- }[] | undefined;
1125
- continuationMessage?: {
1126
- replayAfterOpen?: true | undefined;
1127
- id: string;
1128
- text: string;
1129
- images?: string[] | undefined;
1130
- createdAt: string;
1131
- origin?: "human" | "lifecycle" | undefined;
1132
- agentInputId?: string | undefined;
1133
- task?: string | undefined;
1134
- resumeContext?: {
1135
- failure?: {
1136
- stepId?: string | undefined;
1137
- error: string;
1138
- } | undefined;
1139
- restarted?: true | undefined;
1140
- cutOff?: {
1141
- tools?: string[] | undefined;
1142
- subagents?: string[] | undefined;
1143
- } | undefined;
1144
- } | undefined;
1145
- } | undefined;
1146
- invalidAsk?: boolean | undefined;
1147
- agentInputs?: {
1148
- conversation?: {
1149
- senderRunId: string;
1150
- recipientRunId: string;
1151
- kind: "follow-up" | "progress" | "reply" | "request";
1152
- requestId?: string | undefined;
1153
- relationship?: "family" | "peer" | undefined;
1154
- } | undefined;
1155
- id: string;
1156
- source: "agent" | "lifecycle";
1157
- parentRunId: string;
1158
- text: string;
1159
- createdAt: string;
1160
- deliveredAt?: string | undefined;
1161
- consumedAt?: string | undefined;
1162
- awaitingRead?: true | undefined;
1163
- inboxClaim?: {
1164
- receiptId: string;
1165
- generation: string;
1166
- expiresAt: string;
1167
- acknowledgedAt?: string | undefined;
1168
- memberIds?: string[] | undefined;
1169
- } | undefined;
1170
- purpose?: "completion-refusal" | "undelivered-question" | undefined;
1171
- requestHash?: string | undefined;
1172
- deadline?: string | undefined;
1173
- }[] | undefined;
1174
- waits?: ({
1175
- prUrl: string;
1176
- repository: string;
1177
- prNumber: number;
1178
- headSha: string;
1179
- id: string;
1180
- source: "agent" | "cezar";
1181
- 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";
1182
- registeredAt: string;
1183
- phase: "cancelled" | "delivered" | "open" | "resolved";
1184
- resolvedAt?: string | undefined;
1185
- deliveredAt?: string | undefined;
1186
- cancelledAt?: string | undefined;
1187
- turnId: string;
1188
- kind: "pr";
1189
- deadline: string;
1190
- generation: string;
1191
- timeoutSeconds: number;
1192
- until: "checks" | "merge" | "merge_or_blocked";
1193
- wakeOnConflict: boolean;
1194
- result?: {
1195
- outcome: "blocked" | "cancelled" | "closed" | "conflicting" | "deadline" | "error" | "failed" | "head_changed" | "merged" | "no_checks" | "passed" | "skipped" | "stuck";
1196
- headSha: string;
1197
- observedHeadSha?: string | undefined;
1198
- mergeable?: "CONFLICTING" | "MERGEABLE" | "UNKNOWN" | undefined;
1199
- mergeStateStatus?: string | undefined;
1200
- mergedAt?: string | undefined;
1201
- mergeCommitSha?: string | undefined;
1202
- mergeBlock?: {
1203
- reason: "conflict" | "no_pending_merge";
1204
- isInMergeQueue: boolean;
1205
- autoMergeEnabled: boolean;
1206
- event?: {
1207
- kind: "auto_merge_disabled" | "queue_removal";
1208
- createdAt: string;
1209
- reason?: string | undefined;
1210
- reasonCode?: string | undefined;
1211
- } | undefined;
1212
- } | undefined;
1213
- observedAt: string;
1214
- checks: {
1215
- name: string;
1216
- state: string;
1217
- link: string;
1218
- }[];
1219
- totalChecks: number;
1220
- truncated: boolean;
1221
- diagnostic?: string | undefined;
1222
- } | undefined;
1223
- } | {
1224
- id: string;
1225
- source: "agent" | "cezar";
1226
- 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";
1227
- registeredAt: string;
1228
- phase: "cancelled" | "delivered" | "open" | "resolved";
1229
- resolvedAt?: string | undefined;
1230
- deliveredAt?: string | undefined;
1231
- cancelledAt?: string | undefined;
1232
- turnId: string;
1233
- kind: "timer";
1234
- deadline: string;
1235
- seconds: number;
1236
- note?: string | undefined;
1237
- } | {
1238
- id: string;
1239
- source: "agent" | "cezar";
1240
- 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";
1241
- registeredAt: string;
1242
- phase: "cancelled" | "delivered" | "open" | "resolved";
1243
- resolvedAt?: string | undefined;
1244
- deliveredAt?: string | undefined;
1245
- cancelledAt?: string | undefined;
1246
- turnId: string;
1247
- kind: "human";
1248
- questions?: {
1249
- id?: string | undefined;
1250
- header: string;
1251
- question: string;
1252
- options?: {
1253
- label: string;
1254
- description?: string | undefined;
1255
- }[] | undefined;
1256
- multiSelect?: boolean | undefined;
1257
- }[] | undefined;
1258
- context?: string | undefined;
1259
- askSeq?: number | undefined;
1260
- } | {
1261
- id: string;
1262
- source: "agent" | "cezar";
1263
- 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";
1264
- registeredAt: string;
1265
- phase: "cancelled" | "delivered" | "open" | "resolved";
1266
- resolvedAt?: string | undefined;
1267
- deliveredAt?: string | undefined;
1268
- cancelledAt?: string | undefined;
1269
- turnId: string;
1270
- kind: "worker";
1271
- deadline?: string | undefined;
1272
- timeoutSeconds?: number | undefined;
1273
- mode?: "all" | "any" | "one" | undefined;
1274
- workerIds?: string[] | undefined;
1275
- revisions?: {
1276
- workerId: string;
1277
- revision: number;
1278
- }[] | undefined;
1279
- outcomes?: {
1280
- workerId: string;
1281
- status: "cancelled" | "done" | "failed" | "review";
1282
- observedAt: string;
1283
- summary?: string | undefined;
1284
- revision?: number | undefined;
1285
- }[] | undefined;
1286
- requestIds?: string[] | undefined;
1287
- requestOutcomes?: {
1288
- requestId: string;
1289
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
1290
- observedAt: string;
1291
- replyId?: string | undefined;
1292
- }[] | undefined;
1293
- result?: {
1294
- reason: "outcome" | "timeout";
1295
- } | undefined;
1296
- wakeInputId?: string | undefined;
1297
- } | {
1298
- id: string;
1299
- source: "agent" | "cezar";
1300
- 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";
1301
- registeredAt: string;
1302
- phase: "cancelled" | "delivered" | "open" | "resolved";
1303
- resolvedAt?: string | undefined;
1304
- deliveredAt?: string | undefined;
1305
- cancelledAt?: string | undefined;
1306
- turnId: string;
1307
- kind: "process";
1308
- deadline: string;
1309
- timeoutSeconds: number;
1310
- pid: number;
1311
- startToken?: string | undefined;
1312
- exitFile?: string | undefined;
1313
- note?: string | undefined;
1314
- result?: {
1315
- outcome: "deadline" | "error" | "exit_file" | "exited";
1316
- observedAt: string;
1317
- exitCode?: number | undefined;
1318
- exitFileNote?: "not-an-exit-code" | undefined;
1319
- diagnostic?: string | undefined;
1320
- } | undefined;
1321
- } | {
1322
- id: string;
1323
- source: "agent" | "cezar";
1324
- 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";
1325
- registeredAt: string;
1326
- phase: "cancelled" | "delivered" | "open" | "resolved";
1327
- resolvedAt?: string | undefined;
1328
- deliveredAt?: string | undefined;
1329
- cancelledAt?: string | undefined;
1330
- turnId: string;
1331
- kind: "peer";
1332
- deadline: string;
1333
- timeoutSeconds: number;
1334
- peerIds: string[];
1335
- result?: {
1336
- reason: "message";
1337
- peerRunId: string;
1338
- messageId: string;
1339
- } | {
1340
- reason: "settled";
1341
- peerRunId: string;
1342
- } | {
1343
- reason: "timeout";
1344
- } | undefined;
1345
- } | {
1346
- id: string;
1347
- registeredAt: string;
1348
- phase: "cancelled" | "delivered" | "open" | "resolved";
1349
- resolvedAt?: string | undefined;
1350
- deliveredAt?: string | undefined;
1351
- cancelledAt?: string | undefined;
1352
- turnId: string;
1353
- kind: "subagent";
1354
- source: "cezar";
1355
- via: "native-subagents";
1356
- deadline: string;
1357
- children: {
1358
- id: string;
1359
- status: "cancelled" | "completed" | "failed" | "running";
1360
- }[];
1361
- result?: {
1362
- reason: "interrupted" | "settled" | "superseded" | "timeout";
1363
- } | undefined;
1364
- })[] | undefined;
1365
- waitRegistrations?: {
1366
- operationId: string;
1367
- requestHash: string;
1368
- wait: {
1369
- prUrl: string;
1370
- repository: string;
1371
- prNumber: number;
1372
- headSha: string;
1373
- id: string;
1374
- source: "agent" | "cezar";
1375
- 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";
1376
- registeredAt: string;
1377
- phase: "cancelled" | "delivered" | "open" | "resolved";
1378
- resolvedAt?: string | undefined;
1379
- deliveredAt?: string | undefined;
1380
- cancelledAt?: string | undefined;
1381
- turnId: string;
1382
- kind: "pr";
1383
- deadline: string;
1384
- generation: string;
1385
- timeoutSeconds: number;
1386
- until: "checks" | "merge" | "merge_or_blocked";
1387
- wakeOnConflict: boolean;
1388
- result?: {
1389
- outcome: "blocked" | "cancelled" | "closed" | "conflicting" | "deadline" | "error" | "failed" | "head_changed" | "merged" | "no_checks" | "passed" | "skipped" | "stuck";
1390
- headSha: string;
1391
- observedHeadSha?: string | undefined;
1392
- mergeable?: "CONFLICTING" | "MERGEABLE" | "UNKNOWN" | undefined;
1393
- mergeStateStatus?: string | undefined;
1394
- mergedAt?: string | undefined;
1395
- mergeCommitSha?: string | undefined;
1396
- mergeBlock?: {
1397
- reason: "conflict" | "no_pending_merge";
1398
- isInMergeQueue: boolean;
1399
- autoMergeEnabled: boolean;
1400
- event?: {
1401
- kind: "auto_merge_disabled" | "queue_removal";
1402
- createdAt: string;
1403
- reason?: string | undefined;
1404
- reasonCode?: string | undefined;
1405
- } | undefined;
1406
- } | undefined;
1407
- observedAt: string;
1408
- checks: {
1409
- name: string;
1410
- state: string;
1411
- link: string;
1412
- }[];
1413
- totalChecks: number;
1414
- truncated: boolean;
1415
- diagnostic?: string | undefined;
1416
- } | undefined;
1417
- } | {
1418
- id: string;
1419
- source: "agent" | "cezar";
1420
- 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";
1421
- registeredAt: string;
1422
- phase: "cancelled" | "delivered" | "open" | "resolved";
1423
- resolvedAt?: string | undefined;
1424
- deliveredAt?: string | undefined;
1425
- cancelledAt?: string | undefined;
1426
- turnId: string;
1427
- kind: "timer";
1428
- deadline: string;
1429
- seconds: number;
1430
- note?: string | undefined;
1431
- } | {
1432
- id: string;
1433
- source: "agent" | "cezar";
1434
- 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";
1435
- registeredAt: string;
1436
- phase: "cancelled" | "delivered" | "open" | "resolved";
1437
- resolvedAt?: string | undefined;
1438
- deliveredAt?: string | undefined;
1439
- cancelledAt?: string | undefined;
1440
- turnId: string;
1441
- kind: "human";
1442
- questions?: {
1443
- id?: string | undefined;
1444
- header: string;
1445
- question: string;
1446
- options?: {
1447
- label: string;
1448
- description?: string | undefined;
1449
- }[] | undefined;
1450
- multiSelect?: boolean | undefined;
1451
- }[] | undefined;
1452
- context?: string | undefined;
1453
- askSeq?: number | undefined;
1454
- } | {
1455
- id: string;
1456
- source: "agent" | "cezar";
1457
- 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";
1458
- registeredAt: string;
1459
- phase: "cancelled" | "delivered" | "open" | "resolved";
1460
- resolvedAt?: string | undefined;
1461
- deliveredAt?: string | undefined;
1462
- cancelledAt?: string | undefined;
1463
- turnId: string;
1464
- kind: "worker";
1465
- deadline?: string | undefined;
1466
- timeoutSeconds?: number | undefined;
1467
- mode?: "all" | "any" | "one" | undefined;
1468
- workerIds?: string[] | undefined;
1469
- revisions?: {
1470
- workerId: string;
1471
- revision: number;
1472
- }[] | undefined;
1473
- outcomes?: {
1474
- workerId: string;
1475
- status: "cancelled" | "done" | "failed" | "review";
1476
- observedAt: string;
1477
- summary?: string | undefined;
1478
- revision?: number | undefined;
1479
- }[] | undefined;
1480
- requestIds?: string[] | undefined;
1481
- requestOutcomes?: {
1482
- requestId: string;
1483
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
1484
- observedAt: string;
1485
- replyId?: string | undefined;
1486
- }[] | undefined;
1487
- result?: {
1488
- reason: "outcome" | "timeout";
1489
- } | undefined;
1490
- wakeInputId?: string | undefined;
1491
- } | {
1492
- id: string;
1493
- source: "agent" | "cezar";
1494
- 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";
1495
- registeredAt: string;
1496
- phase: "cancelled" | "delivered" | "open" | "resolved";
1497
- resolvedAt?: string | undefined;
1498
- deliveredAt?: string | undefined;
1499
- cancelledAt?: string | undefined;
1500
- turnId: string;
1501
- kind: "process";
1502
- deadline: string;
1503
- timeoutSeconds: number;
1504
- pid: number;
1505
- startToken?: string | undefined;
1506
- exitFile?: string | undefined;
1507
- note?: string | undefined;
1508
- result?: {
1509
- outcome: "deadline" | "error" | "exit_file" | "exited";
1510
- observedAt: string;
1511
- exitCode?: number | undefined;
1512
- exitFileNote?: "not-an-exit-code" | undefined;
1513
- diagnostic?: string | undefined;
1514
- } | undefined;
1515
- } | {
1516
- id: string;
1517
- source: "agent" | "cezar";
1518
- 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";
1519
- registeredAt: string;
1520
- phase: "cancelled" | "delivered" | "open" | "resolved";
1521
- resolvedAt?: string | undefined;
1522
- deliveredAt?: string | undefined;
1523
- cancelledAt?: string | undefined;
1524
- turnId: string;
1525
- kind: "peer";
1526
- deadline: string;
1527
- timeoutSeconds: number;
1528
- peerIds: string[];
1529
- result?: {
1530
- reason: "message";
1531
- peerRunId: string;
1532
- messageId: string;
1533
- } | {
1534
- reason: "settled";
1535
- peerRunId: string;
1536
- } | {
1537
- reason: "timeout";
1538
- } | undefined;
1539
- } | {
1540
- id: string;
1541
- registeredAt: string;
1542
- phase: "cancelled" | "delivered" | "open" | "resolved";
1543
- resolvedAt?: string | undefined;
1544
- deliveredAt?: string | undefined;
1545
- cancelledAt?: string | undefined;
1546
- turnId: string;
1547
- kind: "subagent";
1548
- source: "cezar";
1549
- via: "native-subagents";
1550
- deadline: string;
1551
- children: {
1552
- id: string;
1553
- status: "cancelled" | "completed" | "failed" | "running";
1554
- }[];
1555
- result?: {
1556
- reason: "interrupted" | "settled" | "superseded" | "timeout";
1557
- } | undefined;
1558
- };
1559
- deduplicated: boolean;
1560
- }[] | undefined;
1561
- lastWaits?: ({
1562
- prUrl: string;
1563
- repository: string;
1564
- prNumber: number;
1565
- headSha: string;
1566
- id: string;
1567
- source: "agent" | "cezar";
1568
- 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";
1569
- registeredAt: string;
1570
- phase: "cancelled" | "delivered" | "open" | "resolved";
1571
- resolvedAt?: string | undefined;
1572
- deliveredAt?: string | undefined;
1573
- cancelledAt?: string | undefined;
1574
- turnId: string;
1575
- kind: "pr";
1576
- deadline: string;
1577
- generation: string;
1578
- timeoutSeconds: number;
1579
- until: "checks" | "merge" | "merge_or_blocked";
1580
- wakeOnConflict: boolean;
1581
- result?: {
1582
- outcome: "blocked" | "cancelled" | "closed" | "conflicting" | "deadline" | "error" | "failed" | "head_changed" | "merged" | "no_checks" | "passed" | "skipped" | "stuck";
1583
- headSha: string;
1584
- observedHeadSha?: string | undefined;
1585
- mergeable?: "CONFLICTING" | "MERGEABLE" | "UNKNOWN" | undefined;
1586
- mergeStateStatus?: string | undefined;
1587
- mergedAt?: string | undefined;
1588
- mergeCommitSha?: string | undefined;
1589
- mergeBlock?: {
1590
- reason: "conflict" | "no_pending_merge";
1591
- isInMergeQueue: boolean;
1592
- autoMergeEnabled: boolean;
1593
- event?: {
1594
- kind: "auto_merge_disabled" | "queue_removal";
1595
- createdAt: string;
1596
- reason?: string | undefined;
1597
- reasonCode?: string | undefined;
1598
- } | undefined;
1599
- } | undefined;
1600
- observedAt: string;
1601
- checks: {
1602
- name: string;
1603
- state: string;
1604
- link: string;
1605
- }[];
1606
- totalChecks: number;
1607
- truncated: boolean;
1608
- diagnostic?: string | undefined;
1609
- } | undefined;
1610
- } | {
1611
- id: string;
1612
- source: "agent" | "cezar";
1613
- 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";
1614
- registeredAt: string;
1615
- phase: "cancelled" | "delivered" | "open" | "resolved";
1616
- resolvedAt?: string | undefined;
1617
- deliveredAt?: string | undefined;
1618
- cancelledAt?: string | undefined;
1619
- turnId: string;
1620
- kind: "timer";
1621
- deadline: string;
1622
- seconds: number;
1623
- note?: string | undefined;
1624
- } | {
1625
- id: string;
1626
- source: "agent" | "cezar";
1627
- 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";
1628
- registeredAt: string;
1629
- phase: "cancelled" | "delivered" | "open" | "resolved";
1630
- resolvedAt?: string | undefined;
1631
- deliveredAt?: string | undefined;
1632
- cancelledAt?: string | undefined;
1633
- turnId: string;
1634
- kind: "human";
1635
- questions?: {
1636
- id?: string | undefined;
1637
- header: string;
1638
- question: string;
1639
- options?: {
1640
- label: string;
1641
- description?: string | undefined;
1642
- }[] | undefined;
1643
- multiSelect?: boolean | undefined;
1644
- }[] | undefined;
1645
- context?: string | undefined;
1646
- askSeq?: number | undefined;
1647
- } | {
1648
- id: string;
1649
- source: "agent" | "cezar";
1650
- 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";
1651
- registeredAt: string;
1652
- phase: "cancelled" | "delivered" | "open" | "resolved";
1653
- resolvedAt?: string | undefined;
1654
- deliveredAt?: string | undefined;
1655
- cancelledAt?: string | undefined;
1656
- turnId: string;
1657
- kind: "worker";
1658
- deadline?: string | undefined;
1659
- timeoutSeconds?: number | undefined;
1660
- mode?: "all" | "any" | "one" | undefined;
1661
- workerIds?: string[] | undefined;
1662
- revisions?: {
1663
- workerId: string;
1664
- revision: number;
1665
- }[] | undefined;
1666
- outcomes?: {
1667
- workerId: string;
1668
- status: "cancelled" | "done" | "failed" | "review";
1669
- observedAt: string;
1670
- summary?: string | undefined;
1671
- revision?: number | undefined;
1672
- }[] | undefined;
1673
- requestIds?: string[] | undefined;
1674
- requestOutcomes?: {
1675
- requestId: string;
1676
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
1677
- observedAt: string;
1678
- replyId?: string | undefined;
1679
- }[] | undefined;
1680
- result?: {
1681
- reason: "outcome" | "timeout";
1682
- } | undefined;
1683
- wakeInputId?: string | undefined;
1684
- } | {
1685
- id: string;
1686
- source: "agent" | "cezar";
1687
- 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";
1688
- registeredAt: string;
1689
- phase: "cancelled" | "delivered" | "open" | "resolved";
1690
- resolvedAt?: string | undefined;
1691
- deliveredAt?: string | undefined;
1692
- cancelledAt?: string | undefined;
1693
- turnId: string;
1694
- kind: "process";
1695
- deadline: string;
1696
- timeoutSeconds: number;
1697
- pid: number;
1698
- startToken?: string | undefined;
1699
- exitFile?: string | undefined;
1700
- note?: string | undefined;
1701
- result?: {
1702
- outcome: "deadline" | "error" | "exit_file" | "exited";
1703
- observedAt: string;
1704
- exitCode?: number | undefined;
1705
- exitFileNote?: "not-an-exit-code" | undefined;
1706
- diagnostic?: string | undefined;
1707
- } | undefined;
1708
- } | {
1709
- id: string;
1710
- source: "agent" | "cezar";
1711
- 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";
1712
- registeredAt: string;
1713
- phase: "cancelled" | "delivered" | "open" | "resolved";
1714
- resolvedAt?: string | undefined;
1715
- deliveredAt?: string | undefined;
1716
- cancelledAt?: string | undefined;
1717
- turnId: string;
1718
- kind: "peer";
1719
- deadline: string;
1720
- timeoutSeconds: number;
1721
- peerIds: string[];
1722
- result?: {
1723
- reason: "message";
1724
- peerRunId: string;
1725
- messageId: string;
1726
- } | {
1727
- reason: "settled";
1728
- peerRunId: string;
1729
- } | {
1730
- reason: "timeout";
1731
- } | undefined;
1732
- } | {
1733
- id: string;
1734
- registeredAt: string;
1735
- phase: "cancelled" | "delivered" | "open" | "resolved";
1736
- resolvedAt?: string | undefined;
1737
- deliveredAt?: string | undefined;
1738
- cancelledAt?: string | undefined;
1739
- turnId: string;
1740
- kind: "subagent";
1741
- source: "cezar";
1742
- via: "native-subagents";
1743
- deadline: string;
1744
- children: {
1745
- id: string;
1746
- status: "cancelled" | "completed" | "failed" | "running";
1747
- }[];
1748
- result?: {
1749
- reason: "interrupted" | "settled" | "superseded" | "timeout";
1750
- } | undefined;
1751
- })[] | undefined;
1752
- previewServers?: {
1753
- port: number;
1754
- command: string;
1755
- cwd?: string | undefined;
1756
- label: string;
1757
- path?: string | undefined;
1758
- registeredAt: string;
1759
- answeredAtRegistration: boolean;
1760
- }[] | undefined;
1761
- taskImages?: string[] | undefined;
1762
- model?: string | undefined;
1763
- effort?: string | undefined;
1764
- modelIdentity?: string | undefined;
1765
- removedRunner?: string | undefined;
1766
- agentProfile?: string | undefined;
1767
- systemPrompt?: string | undefined;
1768
- generateFollowups?: boolean | undefined;
1769
- autonomous?: boolean | undefined;
1770
- completionAction?: {
1771
- id: string;
1772
- phase: "blocked" | "complete" | "pending";
1773
- message?: string | undefined;
1774
- } | undefined;
1775
- archiveBlocker?: {
1776
- message: string;
1777
- runId?: string | undefined;
1778
- pullRequestUrl?: string | undefined;
1779
- } | undefined;
1780
- status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
1781
- createdAt: string;
1782
- startedAt?: string | undefined;
1783
- finishedAt?: string | undefined;
1784
- tokensUsed: number;
1785
- inputTokens?: number | undefined;
1786
- outputTokens?: number | undefined;
1787
- costUsd?: number | undefined;
1788
- pullRequestUrl?: string | undefined;
1789
- referencedPullRequestUrl?: string | undefined;
1790
- prNumber?: number | undefined;
1791
- issueNumber?: number | undefined;
1792
- referencedIssueNumberSeeded?: boolean | undefined;
1793
- titleOrigin?: "auto" | "marker" | "user" | undefined;
1794
- markerRefs?: {
1795
- pr?: number | undefined;
1796
- issue?: number | undefined;
1797
- } | undefined;
1798
- referencedPrCandidates?: string[] | undefined;
1799
- referencedIssueUrl?: string | undefined;
1800
- referencedIssueCandidates?: string[] | undefined;
1801
- worktree?: false | undefined;
1802
- worktreePath?: string | undefined;
1803
- branch?: string | undefined;
1804
- baseBranch?: string | undefined;
1805
- worktreeReclaimedAt?: string | undefined;
1806
- groupId?: string | undefined;
1807
- variant?: string | undefined;
1808
- clientRequestId?: string | undefined;
1809
- clientRequestHash?: string | undefined;
1810
- peakRssBytes?: number | undefined;
1811
- peakProcCount?: number | undefined;
1812
- archivedAt?: string | undefined;
1813
- autoArchive?: {
1814
- reason: "pull-requests-merged";
1815
- archivedAt: string;
1816
- fingerprint: string;
1817
- pullRequests: {
1818
- owner: string;
1819
- repo: string;
1820
- number: number;
1821
- mergedAt: string;
1822
- }[];
1823
- } | undefined;
1824
- manualUnarchivedAt?: string | undefined;
1825
- pinned?: boolean | undefined;
1826
- pinnedAt?: string | undefined;
1827
- seenAt?: string | undefined;
1828
- currentStepId?: string | undefined;
1829
- error?: string | undefined;
1830
- delegation?: {
1831
- role: "root";
1832
- conversation?: {
1833
- messages: {
1834
- senderRunId: string;
1835
- recipientRunId: string;
1836
- kind: "follow-up" | "progress" | "reply" | "request";
1837
- requestId?: string | undefined;
1838
- relationship?: "family" | "peer" | undefined;
1839
- id: string;
1840
- text: string;
1841
- createdAt: string;
1842
- deadline?: string | undefined;
1843
- requestHash: string;
1844
- state: "accepted" | "continuation-required" | "destroyed" | "late";
1845
- resumed?: true | undefined;
1846
- instruction?: string | undefined;
1847
- question?: {
1848
- context?: string | undefined;
1849
- questions: {
1850
- id?: string | undefined;
1851
- header: string;
1852
- question: string;
1853
- options?: {
1854
- label: string;
1855
- description?: string | undefined;
1856
- }[] | undefined;
1857
- multiSelect?: boolean | undefined;
1858
- }[];
1859
- } | undefined;
1860
- }[];
1861
- outcomes: {
1862
- requestId: string;
1863
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
1864
- observedAt: string;
1865
- replyId?: string | undefined;
1866
- }[];
1867
- } | undefined;
1868
- permissions: ("destroy" | "diff" | "inspect" | "spawn" | "steer" | "stop" | "wait")[];
1869
- receipts: {
1870
- requestId: string;
1871
- workerId: string;
1872
- requestHash: string;
1873
- deletion?: {
1874
- phase: "complete" | "pending";
1875
- revision: number;
1876
- resourceId: string;
1877
- generation: string;
1878
- } | undefined;
1879
- }[];
1880
- wait?: {
1881
- id: string;
1882
- workerIds: string[];
1883
- requestIds?: string[] | undefined;
1884
- requestOutcomes?: {
1885
- requestId: string;
1886
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
1887
- observedAt: string;
1888
- replyId?: string | undefined;
1889
- }[] | undefined;
1890
- deadline: string;
1891
- mode?: "all" | "any" | "one" | undefined;
1892
- revisions?: {
1893
- workerId: string;
1894
- revision: number;
1895
- }[] | undefined;
1896
- reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
1897
- phase: "parked" | "registered" | "wake-pending";
1898
- outcomes: {
1899
- workerId: string;
1900
- status: "cancelled" | "done" | "failed" | "review";
1901
- observedAt: string;
1902
- summary?: string | undefined;
1903
- revision?: number | undefined;
1904
- }[];
1905
- wakeId?: string | undefined;
1906
- } | undefined;
1907
- lastWait?: {
1908
- id: string;
1909
- workerIds: string[];
1910
- requestIds?: string[] | undefined;
1911
- requestOutcomes?: {
1912
- requestId: string;
1913
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
1914
- observedAt: string;
1915
- replyId?: string | undefined;
1916
- }[] | undefined;
1917
- deadline: string;
1918
- mode?: "all" | "any" | "one" | undefined;
1919
- revisions?: {
1920
- workerId: string;
1921
- revision: number;
1922
- }[] | undefined;
1923
- reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
1924
- phase: "parked" | "registered" | "wake-pending";
1925
- outcomes: {
1926
- workerId: string;
1927
- status: "cancelled" | "done" | "failed" | "review";
1928
- observedAt: string;
1929
- summary?: string | undefined;
1930
- revision?: number | undefined;
1931
- }[];
1932
- wakeId?: string | undefined;
1933
- } | undefined;
1934
- results?: {
1935
- workerId: string;
1936
- revision: number;
1937
- snapshotId: string;
1938
- observedAt: string;
1939
- lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
1940
- previous?: {
1941
- revision: number;
1942
- observedAt: string;
1943
- lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
1944
- } | undefined;
1945
- }[] | undefined;
1946
- finishRequestedAt?: string | undefined;
1947
- historyDeletion?: "pending" | undefined;
1948
- completion?: {
1949
- phase: "attention" | "waiting";
1950
- waitId?: string | undefined;
1951
- } | undefined;
1952
- } | {
1953
- role: "worker";
1954
- wait?: {
1955
- id: string;
1956
- workerIds: string[];
1957
- requestIds?: string[] | undefined;
1958
- requestOutcomes?: {
1959
- requestId: string;
1960
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
1961
- observedAt: string;
1962
- replyId?: string | undefined;
1963
- }[] | undefined;
1964
- deadline: string;
1965
- mode?: "all" | "any" | "one" | undefined;
1966
- revisions?: {
1967
- workerId: string;
1968
- revision: number;
1969
- }[] | undefined;
1970
- reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
1971
- phase: "parked" | "registered" | "wake-pending";
1972
- outcomes: {
1973
- workerId: string;
1974
- status: "cancelled" | "done" | "failed" | "review";
1975
- observedAt: string;
1976
- summary?: string | undefined;
1977
- revision?: number | undefined;
1978
- }[];
1979
- wakeId?: string | undefined;
1980
- } | undefined;
1981
- lastWait?: {
1982
- id: string;
1983
- workerIds: string[];
1984
- requestIds?: string[] | undefined;
1985
- requestOutcomes?: {
1986
- requestId: string;
1987
- status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
1988
- observedAt: string;
1989
- replyId?: string | undefined;
1990
- }[] | undefined;
1991
- deadline: string;
1992
- mode?: "all" | "any" | "one" | undefined;
1993
- revisions?: {
1994
- workerId: string;
1995
- revision: number;
1996
- }[] | undefined;
1997
- reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
1998
- phase: "parked" | "registered" | "wake-pending";
1999
- outcomes: {
2000
- workerId: string;
2001
- status: "cancelled" | "done" | "failed" | "review";
2002
- observedAt: string;
2003
- summary?: string | undefined;
2004
- revision?: number | undefined;
2005
- }[];
2006
- wakeId?: string | undefined;
2007
- } | undefined;
2008
- permissions: ("destroy" | "diff" | "inspect" | "spawn" | "steer" | "stop" | "wait")[];
2009
- parentRunId: string;
2010
- workspace: {
2011
- ownerRunId: string;
2012
- resourceId: string;
2013
- kind: "owned-isolated";
2014
- path: string;
2015
- branch: string;
2016
- baselineSha: string;
2017
- } | {
2018
- ownerRunId: string;
2019
- resourceId: string;
2020
- kind: "shared";
2021
- path: string;
2022
- hostRunId: string;
2023
- baselineSha: string;
2024
- };
2025
- destroy?: {
2026
- requestedAt: string;
2027
- phase: "cleaning" | "complete" | "incomplete" | "requested" | "terminating";
2028
- remaining: ("branch" | "process" | "worktree")[];
2029
- error?: string | undefined;
2030
- } | undefined;
2031
- context?: {
2032
- text?: string | undefined;
2033
- inputs: {
2034
- source: {
2035
- kind: "parent-file";
2036
- path: string;
2037
- } | {
2038
- kind: "baseline-file";
2039
- path: string;
2040
- } | {
2041
- kind: "parent-attachment";
2042
- id: string;
2043
- };
2044
- path: string;
2045
- sha256: string;
2046
- bytes: number;
2047
- }[];
2048
- } | undefined;
2049
- executionRevision?: number | undefined;
2050
- executionStartSeq?: number | undefined;
2051
- } | {
2052
- role: "invalid";
2053
- } | undefined;
2054
- lastWaitsError?: string | undefined;
2055
- automaticWakes?: number | undefined;
2056
- waitDeliveryFailures?: number | undefined;
2057
- runner?: "claude" | "codex" | "omp" | "opencode" | "pi" | undefined;
2058
- notify?: boolean | undefined;
2059
- webhook?: {
2060
- lastDeliveredAt?: string | undefined;
2061
- lastError?: string | undefined;
2062
- lastErrorWebhookId?: string | undefined;
2063
- } | undefined;
2064
- destroyRetry?: {
2065
- attempts: number;
2066
- nextAt: string;
2067
- needsAttention?: true | undefined;
2068
- } | undefined;
2069
- stopping?: boolean | undefined;
2070
- autoResumeAt?: string | undefined;
2071
- autoResumeAttempts?: number | undefined;
2072
- autoResumeReason?: "provider-error" | "usage-limit" | undefined;
2073
- parkReason?: "closing-wakes" | "hold" | "turn" | undefined;
2074
- hasPendingPermission?: boolean | undefined;
2075
- pullRequests?: {
2076
- number: number;
2077
- url?: string | undefined;
2078
- source: "created" | "declared";
2079
- }[] | undefined;
2080
- worktreeSetup?: {
2081
- status: "done" | "failed" | "running";
2082
- startedAt: string;
2083
- finishedAt?: string | undefined;
2084
- durationMs?: number | undefined;
2085
- error?: string | undefined;
2086
- } | undefined;
2087
- workflowCursor?: {
2088
- stepId: string;
2089
- mode: "resume" | "start";
2090
- } | undefined;
2091
- doneAccepted?: {
2092
- session: string;
2093
- at: string;
2094
- seq: number;
2095
- openWaits: string[];
2096
- settledWaits: string[];
2097
- lastInput?: string | undefined;
2098
- summary?: string | undefined;
2099
- freeTurn?: true | undefined;
2100
- } | undefined;
2101
- archived: boolean;
2102
- workflowDef?: {
2103
- name: string;
2104
- description?: string | undefined;
2105
- steps: {
2106
- id: string;
2107
- name?: string | undefined;
2108
- prompt?: string | undefined;
2109
- skill?: string | undefined;
2110
- model?: string | undefined;
2111
- effort?: string | undefined;
2112
- timeoutMs?: number | undefined;
2113
- runner?: "claude" | "codex" | "omp" | "opencode" | "pi" | undefined;
2114
- agentProfile?: string | undefined;
2115
- allowedTools?: string[] | undefined;
2116
- bashAllowlist?: string[] | undefined;
2117
- command?: string | undefined;
2118
- onFail?: {
2119
- retry: string;
2120
- max: number;
2121
- } | undefined;
2122
- }[];
2123
- source: "built-in" | "file";
2124
- path?: string | undefined;
2125
- } | undefined;
2126
- steps: {
2127
- id: string;
2128
- name: string;
2129
- kind: "agent" | "check";
2130
- status: "cancelled" | "done" | "failed" | "pending" | "review" | "running" | "skipped" | "waiting";
2131
- iterations: number;
2132
- retriesUsed?: number | undefined;
2133
- tokensUsed: number;
2134
- inputTokens?: number | undefined;
2135
- outputTokens?: number | undefined;
2136
- usageInvocationsStarted?: number | undefined;
2137
- usageInvocationsObserved?: number | undefined;
2138
- usageTurnsStarted?: number | undefined;
2139
- usageTurnsRecorded?: number | undefined;
2140
- usageInvocationEpoch?: number | undefined;
2141
- startedAt?: string | undefined;
2142
- finishedAt?: string | undefined;
2143
- error?: string | undefined;
2144
- sessionId?: string | undefined;
2145
- removedBackend?: string | undefined;
2146
- profileId?: string | undefined;
2147
- skillPath?: string | undefined;
2148
- costUsd?: number | undefined;
2149
- synthetic?: "continuation" | undefined;
2150
- continuesStepId?: string | undefined;
2151
- backend?: "claude" | "codex" | "omp" | "opencode" | "pi" | undefined;
2152
- }[];
2153
- automation?: {
2154
- automationId: string;
2155
- receiptId: string;
2156
- event: string;
2157
- automationRevision: number;
2158
- githubUrl: string;
2159
- } | undefined;
2160
- automationTrigger?: {
2161
- automationId: string;
2162
- receiptId: string;
2163
- trigger: "catch-up" | "manual" | "schedule";
2164
- occurrenceAt: string;
2165
- automationRevision: number;
2166
- } | undefined;
2167
- handoffRecords?: {
2168
- autosave: {
2169
- at: string;
2170
- note: string;
2171
- periodic?: {
2172
- branch: string | null;
2173
- count: number;
2174
- first: string | null;
2175
- latest: string | null;
2176
- } | undefined;
2177
- }[];
2178
- } | undefined;
2179
- };
2180
- } | undefined;
2181
- /** A root and its direct owned worker, in either direction; anything else is `denied_scope`. */
2182
- export declare function familyPair(sender: RunRecord | undefined, recipient: RunRecord | undefined): {
23
+ } | {
24
+ relationship: 'family';
25
+ relation: 'supervisor' | 'supervised';
2183
26
  root: RunRecord;
2184
27
  worker: RunRecord;
2185
- };
2186
- /** A family sender of a new message: a parent holding `steer`, live and not finishing; a worker live and not being destroyed. */
2187
- export declare function assertFamilySender(sender: RunRecord, root: RunRecord, send: boolean): void;
2188
- /** A root whose human pressed Finish, which has not settled yet. */
2189
- export declare function finishing(run: RunRecord): boolean;
28
+ });
29
+ /**
30
+ * The relationship resolver (spec 2026-10-27-task-communication-protocol § 2): `peer` for two root
31
+ * tasks of one project, `family` for a task and the worker it supervises, in either direction, and
32
+ * `denied_scope` with one text for everything else. A family pair names its `root`, the run that
33
+ * holds the family's ledger, and the direction: `supervised` when the sender supervises the
34
+ * recipient. `send` asks for the live sender a new message needs.
35
+ */
36
+ export declare function resolvePair(sender: RunRecord | undefined, recipient: RunRecord | undefined, getRun: Lookup, send: boolean): ResolvedPair;
2190
37
  /** Why a send to a run that cannot take it now was not delivered, and the next step. */
2191
- export declare function notDeliveredInstruction(pair: {
2192
- relationship: 'family' | 'peer';
2193
- sender: RunRecord;
2194
- recipient: RunRecord;
2195
- }, root: RunRecord): string;
38
+ export declare function notDeliveredInstruction(pair: ResolvedPair): string;
2196
39
  /** The ledger's 1,024 messages, where every open request holds room for its reply and a new
2197
40
  * request needs room for its own; its 32 open requests; and 32 inbox slots per run, which hold its
2198
41
  * undelivered inputs and one slot for each open peer request it sent (`inboxSlotsUsed`). A new