@wjarka/cezarion 0.17.0 → 0.18.0-dev.5799

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 (1158) hide show
  1. package/bin.js +2 -0
  2. package/cez.js +2 -0
  3. package/cezarion.js +2 -0
  4. package/dist/cez.js +2 -0
  5. package/dist/cezarion.js +2 -0
  6. package/dist/hsq.js +2 -0
  7. package/dist/index.js +1 -835
  8. package/dist/server/app-type.d.ts +1 -6
  9. package/dist/server/app-type.js +1 -2
  10. package/hsq.js +2 -0
  11. package/package.json +20 -59
  12. package/web/dist/assets/activity-motion-0wHCeUs7.css +1 -0
  13. package/web/dist/assets/activity-motion-2nE59DAT.js +2 -0
  14. package/web/dist/assets/activity-route-R9lPc2jy.js +1 -0
  15. package/web/dist/assets/agent-accounts-f1cxwgfz.js +18 -0
  16. package/web/dist/assets/alert-dialog-Dj464rjk.js +1 -0
  17. package/web/dist/assets/arrow-right-Dh_Lx3um.js +1 -0
  18. package/web/dist/assets/button-CHUAMTHK.js +3 -0
  19. package/web/dist/assets/centered-state-DGyy0SuA.js +1 -0
  20. package/web/dist/assets/cez-idle-EVoUsgU3.js +1 -0
  21. package/web/dist/assets/commit-diff-panel-BJyNYmCY.js +1 -0
  22. package/web/dist/assets/control-locations-C9II3kPz.js +1 -0
  23. package/web/dist/assets/design-icons-DmYTv2r1.js +1 -0
  24. package/web/dist/assets/diff-D_9MtICR.js +3 -0
  25. package/web/dist/assets/diff-controls-BR2uqhwG.js +1 -0
  26. package/web/dist/assets/diff-view-xRPxXHXl.js +11 -0
  27. package/web/dist/assets/dropdown-menu-DhrBcVgr.js +1 -0
  28. package/web/dist/assets/es2015-D345RR4o.js +41 -0
  29. package/web/dist/assets/file-preview-D08Kq15E.js +2 -0
  30. package/web/dist/assets/git-toolbar-D9taioU5.js +1 -0
  31. package/web/dist/assets/github-bv_pBGc5.js +1 -0
  32. package/web/dist/assets/github-sidebar-model-B0Ufci5S.js +1 -0
  33. package/web/dist/assets/global-activity-route-QxTPDyx-.js +1 -0
  34. package/web/dist/assets/hourglass-B0lPAJvT.js +1 -0
  35. package/web/dist/assets/{image-preview-C_t9q45f.js → image-preview-Cq1vDiEo.js} +1 -1
  36. package/web/dist/assets/index-B18AqW0Z.css +1 -0
  37. package/web/dist/assets/index-DgU3yYUl.js +14 -0
  38. package/web/dist/assets/index.global-D3Ga_D3Y.js +1 -0
  39. package/web/dist/assets/live-protocol-BVn0UA_g.js +64 -0
  40. package/web/dist/assets/live-refetch-BdnmTJ_8.js +1 -0
  41. package/web/dist/assets/{live-worker-BizfZSoh.ts → live-worker-BWdeGzQX.ts} +2 -1
  42. package/web/dist/assets/loader-circle-CZkGEdoI.js +1 -0
  43. package/web/dist/assets/markdown-D7DUNWcJ.js +6 -0
  44. package/web/dist/assets/mermaid.min-3O9YjB2l.js +1 -0
  45. package/web/dist/assets/message-square-B-MD-8rD.js +1 -0
  46. package/web/dist/assets/{nav-row-styles-AoIhhIwf.js → nav-row-styles-BZUUavOF.js} +1 -1
  47. package/web/dist/assets/popover-DRcRI46x.js +1 -0
  48. package/web/dist/assets/preview-pane-connected-cD-MTiVN.js +3 -0
  49. package/web/dist/assets/project-router-MMOk9VbW.js +1 -0
  50. package/web/dist/assets/project-scope-context-B3M-u8R0.js +4 -0
  51. package/web/dist/assets/queries-DORTKwyN.js +1 -0
  52. package/web/dist/assets/repo-git-E_4Ighvg.js +1 -0
  53. package/web/dist/assets/report-reader-XVNQsXB4.js +1 -0
  54. package/web/dist/assets/report-title-D4Mbu2Er.js +1 -0
  55. package/web/dist/assets/reports-B7QAzibP.css +1 -0
  56. package/web/dist/assets/reports-B_PVTBzP.js +1 -0
  57. package/web/dist/assets/run-header-wm0gSs6X.js +2 -0
  58. package/web/dist/assets/skill-empty-hint-YDmkqgo-.js +1 -0
  59. package/web/dist/assets/skills-D2RLxUIc.js +1 -0
  60. package/web/dist/assets/skills-DFBiAuJG.js +1 -0
  61. package/web/dist/assets/skills-workflows-C21NystW.css +1 -0
  62. package/web/dist/assets/sortable.esm-zp_qkYGV.js +5 -0
  63. package/web/dist/assets/tab-link-BvoGfK8S.js +1 -0
  64. package/web/dist/assets/task-changes-DNtkfFzQ.js +1 -0
  65. package/web/dist/assets/task-commits-CivO-OrN.js +1 -0
  66. package/web/dist/assets/task-files-dczkxV_G.js +1 -0
  67. package/web/dist/assets/task-github-item-DKV4yrcf.js +1 -0
  68. package/web/dist/assets/task-thread-DIaTTGEF.js +9 -0
  69. package/web/dist/assets/textarea-DlVUfdWG.js +1 -0
  70. package/web/dist/assets/thread-state-DIozHuHb.js +4 -0
  71. package/web/dist/assets/toaster-B1MyeHiE.js +1 -0
  72. package/web/dist/assets/use-hand-to-agent-state-D58ayxI4.js +1 -0
  73. package/web/dist/assets/useInfiniteQuery-BbYMWe23.js +1 -0
  74. package/web/dist/assets/useQuery-CqqnAJvu.js +1 -0
  75. package/web/dist/assets/workflows-YMEsGXeB.js +7 -0
  76. package/web/dist/assets/ws-BtSVmivO.js +1 -0
  77. package/web/dist/assets/zoomable-image-5pOUaPEg.js +1 -0
  78. package/web/dist/index.html +31 -15
  79. package/web/dist/live-worker.js +2 -2
  80. package/LICENSE +0 -22
  81. package/README.md +0 -1725
  82. package/dist/agent-config/account-identity.d.ts +0 -28
  83. package/dist/agent-config/account-identity.js +0 -131
  84. package/dist/agent-config/account-identity.js.map +0 -1
  85. package/dist/agent-config/catalog.d.ts +0 -70
  86. package/dist/agent-config/catalog.js +0 -383
  87. package/dist/agent-config/catalog.js.map +0 -1
  88. package/dist/agent-config/files.d.ts +0 -42
  89. package/dist/agent-config/files.js +0 -115
  90. package/dist/agent-config/files.js.map +0 -1
  91. package/dist/agent-config/model-settings/claude.d.ts +0 -2
  92. package/dist/agent-config/model-settings/claude.js +0 -11
  93. package/dist/agent-config/model-settings/claude.js.map +0 -1
  94. package/dist/agent-config/model-settings/codex.d.ts +0 -2
  95. package/dist/agent-config/model-settings/codex.js +0 -16
  96. package/dist/agent-config/model-settings/codex.js.map +0 -1
  97. package/dist/agent-config/model-settings/opencode.d.ts +0 -2
  98. package/dist/agent-config/model-settings/opencode.js +0 -8
  99. package/dist/agent-config/model-settings/opencode.js.map +0 -1
  100. package/dist/agent-config/model-settings/pi.d.ts +0 -2
  101. package/dist/agent-config/model-settings/pi.js +0 -38
  102. package/dist/agent-config/model-settings/pi.js.map +0 -1
  103. package/dist/agent-config/model-settings/shared.d.ts +0 -12
  104. package/dist/agent-config/model-settings/shared.js +0 -100
  105. package/dist/agent-config/model-settings/shared.js.map +0 -1
  106. package/dist/agent-config/model-settings/types.d.ts +0 -9
  107. package/dist/agent-config/model-settings/types.js +0 -2
  108. package/dist/agent-config/model-settings/types.js.map +0 -1
  109. package/dist/agent-config/models.d.ts +0 -9
  110. package/dist/agent-config/models.js +0 -40
  111. package/dist/agent-config/models.js.map +0 -1
  112. package/dist/agent-config/seed.d.ts +0 -15
  113. package/dist/agent-config/seed.js +0 -94
  114. package/dist/agent-config/seed.js.map +0 -1
  115. package/dist/agent-config/service.d.ts +0 -44
  116. package/dist/agent-config/service.js +0 -72
  117. package/dist/agent-config/service.js.map +0 -1
  118. package/dist/agent-config/validate.d.ts +0 -18
  119. package/dist/agent-config/validate.js +0 -82
  120. package/dist/agent-config/validate.js.map +0 -1
  121. package/dist/application-update/bin-recovery.d.ts +0 -5
  122. package/dist/application-update/bin-recovery.js +0 -96
  123. package/dist/application-update/bin-recovery.js.map +0 -1
  124. package/dist/application-update/discovery.d.ts +0 -22
  125. package/dist/application-update/discovery.js +0 -91
  126. package/dist/application-update/discovery.js.map +0 -1
  127. package/dist/application-update/helper.d.ts +0 -57
  128. package/dist/application-update/helper.js +0 -369
  129. package/dist/application-update/helper.js.map +0 -1
  130. package/dist/application-update/launcher.d.ts +0 -12
  131. package/dist/application-update/launcher.js +0 -59
  132. package/dist/application-update/launcher.js.map +0 -1
  133. package/dist/application-update/lock.d.ts +0 -4
  134. package/dist/application-update/lock.js +0 -70
  135. package/dist/application-update/lock.js.map +0 -1
  136. package/dist/application-update/npm-process.d.ts +0 -17
  137. package/dist/application-update/npm-process.js +0 -133
  138. package/dist/application-update/npm-process.js.map +0 -1
  139. package/dist/application-update/service.d.ts +0 -69
  140. package/dist/application-update/service.js +0 -456
  141. package/dist/application-update/service.js.map +0 -1
  142. package/dist/archive-on-merge-setting.d.ts +0 -15
  143. package/dist/archive-on-merge-setting.js +0 -14
  144. package/dist/archive-on-merge-setting.js.map +0 -1
  145. package/dist/artifacts/cli.d.ts +0 -9
  146. package/dist/artifacts/cli.js +0 -59
  147. package/dist/artifacts/cli.js.map +0 -1
  148. package/dist/artifacts/lifecycle.d.ts +0 -4
  149. package/dist/artifacts/lifecycle.js +0 -42
  150. package/dist/artifacts/lifecycle.js.map +0 -1
  151. package/dist/artifacts/resolve.d.ts +0 -18
  152. package/dist/artifacts/resolve.js +0 -103
  153. package/dist/artifacts/resolve.js.map +0 -1
  154. package/dist/artifacts/store.d.ts +0 -8
  155. package/dist/artifacts/store.js +0 -323
  156. package/dist/artifacts/store.js.map +0 -1
  157. package/dist/automations/automation-cli.d.ts +0 -59
  158. package/dist/automations/automation-cli.js +0 -509
  159. package/dist/automations/automation-cli.js.map +0 -1
  160. package/dist/automations/builtin-skill.d.ts +0 -7
  161. package/dist/automations/builtin-skill.js +0 -14
  162. package/dist/automations/builtin-skill.js.map +0 -1
  163. package/dist/automations/coordinator.d.ts +0 -33
  164. package/dist/automations/coordinator.js +0 -86
  165. package/dist/automations/coordinator.js.map +0 -1
  166. package/dist/automations/github-baseline.d.ts +0 -3
  167. package/dist/automations/github-baseline.js +0 -17
  168. package/dist/automations/github-baseline.js.map +0 -1
  169. package/dist/automations/github-poller.d.ts +0 -93
  170. package/dist/automations/github-poller.js +0 -303
  171. package/dist/automations/github-poller.js.map +0 -1
  172. package/dist/automations/prompts.d.ts +0 -12
  173. package/dist/automations/prompts.js +0 -160
  174. package/dist/automations/prompts.js.map +0 -1
  175. package/dist/automations/schedule-runner.d.ts +0 -149
  176. package/dist/automations/schedule-runner.js +0 -513
  177. package/dist/automations/schedule-runner.js.map +0 -1
  178. package/dist/automations/scheduler.d.ts +0 -87
  179. package/dist/automations/scheduler.js +0 -434
  180. package/dist/automations/scheduler.js.map +0 -1
  181. package/dist/automations/service.d.ts +0 -777
  182. package/dist/automations/service.js +0 -444
  183. package/dist/automations/service.js.map +0 -1
  184. package/dist/automations/store.d.ts +0 -160
  185. package/dist/automations/store.js +0 -738
  186. package/dist/automations/store.js.map +0 -1
  187. package/dist/automations/task-template.d.ts +0 -59
  188. package/dist/automations/task-template.js +0 -273
  189. package/dist/automations/task-template.js.map +0 -1
  190. package/dist/automations/tool-adapter.d.ts +0 -6
  191. package/dist/automations/tool-adapter.js +0 -108
  192. package/dist/automations/tool-adapter.js.map +0 -1
  193. package/dist/automations/types.d.ts +0 -1
  194. package/dist/automations/types.js +0 -2
  195. package/dist/automations/types.js.map +0 -1
  196. package/dist/autosave-cleanup.d.ts +0 -26
  197. package/dist/autosave-cleanup.js +0 -87
  198. package/dist/autosave-cleanup.js.map +0 -1
  199. package/dist/autosave-git.d.ts +0 -21
  200. package/dist/autosave-git.js +0 -204
  201. package/dist/autosave-git.js.map +0 -1
  202. package/dist/autosave-group.d.ts +0 -8
  203. package/dist/autosave-group.js +0 -61
  204. package/dist/autosave-group.js.map +0 -1
  205. package/dist/autosave-holders.d.ts +0 -34
  206. package/dist/autosave-holders.js +0 -204
  207. package/dist/autosave-holders.js.map +0 -1
  208. package/dist/autosave-windows.d.ts +0 -25
  209. package/dist/autosave-windows.js +0 -156
  210. package/dist/autosave-windows.js.map +0 -1
  211. package/dist/ci-wait/client.d.ts +0 -28
  212. package/dist/ci-wait/client.js +0 -105
  213. package/dist/ci-wait/client.js.map +0 -1
  214. package/dist/ci-wait/controller.d.ts +0 -756
  215. package/dist/ci-wait/controller.js +0 -334
  216. package/dist/ci-wait/controller.js.map +0 -1
  217. package/dist/ci-wait/errors.d.ts +0 -27
  218. package/dist/ci-wait/errors.js +0 -252
  219. package/dist/ci-wait/errors.js.map +0 -1
  220. package/dist/ci-wait/github.d.ts +0 -87
  221. package/dist/ci-wait/github.js +0 -278
  222. package/dist/ci-wait/github.js.map +0 -1
  223. package/dist/ci-wait/injection.d.ts +0 -3
  224. package/dist/ci-wait/injection.js +0 -26
  225. package/dist/ci-wait/injection.js.map +0 -1
  226. package/dist/ci-wait/mcp.d.ts +0 -3
  227. package/dist/ci-wait/mcp.js +0 -30
  228. package/dist/ci-wait/mcp.js.map +0 -1
  229. package/dist/ci-wait/resources.d.ts +0 -7
  230. package/dist/ci-wait/resources.js +0 -32
  231. package/dist/ci-wait/resources.js.map +0 -1
  232. package/dist/ci-wait/supervisor.d.ts +0 -29
  233. package/dist/ci-wait/supervisor.js +0 -260
  234. package/dist/ci-wait/supervisor.js.map +0 -1
  235. package/dist/ci-wait/tools.d.ts +0 -827
  236. package/dist/ci-wait/tools.js +0 -208
  237. package/dist/ci-wait/tools.js.map +0 -1
  238. package/dist/config.d.ts +0 -68
  239. package/dist/config.js +0 -209
  240. package/dist/config.js.map +0 -1
  241. package/dist/contract/active-provider.d.ts +0 -12
  242. package/dist/contract/agent-config.d.ts +0 -160
  243. package/dist/contract/agent-profiles.d.ts +0 -369
  244. package/dist/contract/application-update.d.ts +0 -32
  245. package/dist/contract/artifacts.d.ts +0 -83
  246. package/dist/contract/ask-schema.d.ts +0 -50
  247. package/dist/contract/ask.d.ts +0 -9
  248. package/dist/contract/attachments.d.ts +0 -35
  249. package/dist/contract/attention.d.ts +0 -90
  250. package/dist/contract/automation-requests.d.ts +0 -308
  251. package/dist/contract/automation-schedule.d.ts +0 -89
  252. package/dist/contract/automation-storage.d.ts +0 -512
  253. package/dist/contract/automations.d.ts +0 -1542
  254. package/dist/contract/ci-wait.d.ts +0 -222
  255. package/dist/contract/config-requests.d.ts +0 -36
  256. package/dist/contract/conversations.d.ts +0 -351
  257. package/dist/contract/defined.d.ts +0 -8
  258. package/dist/contract/delegation.d.ts +0 -1882
  259. package/dist/contract/discovery.d.ts +0 -141
  260. package/dist/contract/effort.d.ts +0 -18
  261. package/dist/contract/events.d.ts +0 -292
  262. package/dist/contract/github-requests.d.ts +0 -26
  263. package/dist/contract/github.d.ts +0 -732
  264. package/dist/contract/handoff.d.ts +0 -43
  265. package/dist/contract/health.d.ts +0 -124
  266. package/dist/contract/image-path.d.ts +0 -6
  267. package/dist/contract/index.d.ts +0 -59
  268. package/dist/contract/index.js +0 -5887
  269. package/dist/contract/live-coordination.d.ts +0 -158
  270. package/dist/contract/live-limits.d.ts +0 -8
  271. package/dist/contract/live.d.ts +0 -123
  272. package/dist/contract/pending-ask.d.ts +0 -58
  273. package/dist/contract/permissions.d.ts +0 -54
  274. package/dist/contract/preview.d.ts +0 -541
  275. package/dist/contract/project-limits.d.ts +0 -33
  276. package/dist/contract/projects.d.ts +0 -716
  277. package/dist/contract/provider-requests.d.ts +0 -77
  278. package/dist/contract/query-requests.d.ts +0 -52
  279. package/dist/contract/repo-requests.d.ts +0 -12
  280. package/dist/contract/repo.d.ts +0 -496
  281. package/dist/contract/run-labels.d.ts +0 -8
  282. package/dist/contract/run-limits.d.ts +0 -8
  283. package/dist/contract/run-predicates.d.ts +0 -32
  284. package/dist/contract/run-requests.d.ts +0 -33
  285. package/dist/contract/run-search.d.ts +0 -193
  286. package/dist/contract/runs.d.ts +0 -5340
  287. package/dist/contract/scheduled-tasks.d.ts +0 -187
  288. package/dist/contract/skills.d.ts +0 -56
  289. package/dist/contract/team-skill-ref.d.ts +0 -10
  290. package/dist/contract/tool-display.d.ts +0 -25
  291. package/dist/contract/ui-state-requests.d.ts +0 -60
  292. package/dist/contract/version.d.ts +0 -3
  293. package/dist/contract/voice.d.ts +0 -213
  294. package/dist/contract/waits.d.ts +0 -1204
  295. package/dist/contract/workflow-file.d.ts +0 -37
  296. package/dist/contract/workflow-requests.d.ts +0 -7
  297. package/dist/contract/workflows.d.ts +0 -250
  298. package/dist/contract/workspace.d.ts +0 -631
  299. package/dist/contract/zoned-time.d.ts +0 -26
  300. package/dist/core/agent-env.d.ts +0 -30
  301. package/dist/core/agent-env.js +0 -400
  302. package/dist/core/agent-env.js.map +0 -1
  303. package/dist/core/agent-model-policy.d.ts +0 -10
  304. package/dist/core/agent-model-policy.js +0 -36
  305. package/dist/core/agent-model-policy.js.map +0 -1
  306. package/dist/core/agent-profiles.d.ts +0 -50
  307. package/dist/core/agent-profiles.js +0 -105
  308. package/dist/core/agent-profiles.js.map +0 -1
  309. package/dist/core/agent-runner.d.ts +0 -394
  310. package/dist/core/agent-runner.js +0 -96
  311. package/dist/core/agent-runner.js.map +0 -1
  312. package/dist/core/ask.d.ts +0 -79
  313. package/dist/core/ask.js +0 -232
  314. package/dist/core/ask.js.map +0 -1
  315. package/dist/core/backend-detect.d.ts +0 -17
  316. package/dist/core/backend-detect.js +0 -209
  317. package/dist/core/backend-detect.js.map +0 -1
  318. package/dist/core/claude-cli-runner.d.ts +0 -72
  319. package/dist/core/claude-cli-runner.js +0 -910
  320. package/dist/core/claude-cli-runner.js.map +0 -1
  321. package/dist/core/claude-model-catalog.d.ts +0 -16
  322. package/dist/core/claude-model-catalog.js +0 -198
  323. package/dist/core/claude-model-catalog.js.map +0 -1
  324. package/dist/core/claude-ui-mapper.d.ts +0 -80
  325. package/dist/core/claude-ui-mapper.js +0 -696
  326. package/dist/core/claude-ui-mapper.js.map +0 -1
  327. package/dist/core/codex-app-server-runner.d.ts +0 -61
  328. package/dist/core/codex-app-server-runner.js +0 -1278
  329. package/dist/core/codex-app-server-runner.js.map +0 -1
  330. package/dist/core/codex-app-server-transport.d.ts +0 -52
  331. package/dist/core/codex-app-server-transport.js +0 -199
  332. package/dist/core/codex-app-server-transport.js.map +0 -1
  333. package/dist/core/codex-approvals.d.ts +0 -12
  334. package/dist/core/codex-approvals.js +0 -161
  335. package/dist/core/codex-approvals.js.map +0 -1
  336. package/dist/core/codex-model-catalog.d.ts +0 -10
  337. package/dist/core/codex-model-catalog.js +0 -110
  338. package/dist/core/codex-model-catalog.js.map +0 -1
  339. package/dist/core/codex-permissions.d.ts +0 -6
  340. package/dist/core/codex-permissions.js +0 -27
  341. package/dist/core/codex-permissions.js.map +0 -1
  342. package/dist/core/codex-stream-error.d.ts +0 -2
  343. package/dist/core/codex-stream-error.js +0 -12
  344. package/dist/core/codex-stream-error.js.map +0 -1
  345. package/dist/core/codex-turn-outcome.d.ts +0 -8
  346. package/dist/core/codex-turn-outcome.js +0 -30
  347. package/dist/core/codex-turn-outcome.js.map +0 -1
  348. package/dist/core/codex-ui-mapper.d.ts +0 -112
  349. package/dist/core/codex-ui-mapper.js +0 -808
  350. package/dist/core/codex-ui-mapper.js.map +0 -1
  351. package/dist/core/cursor-acp-runner.d.ts +0 -34
  352. package/dist/core/cursor-acp-runner.js +0 -777
  353. package/dist/core/cursor-acp-runner.js.map +0 -1
  354. package/dist/core/cursor-cli-flags.d.ts +0 -19
  355. package/dist/core/cursor-cli-flags.js +0 -47
  356. package/dist/core/cursor-cli-flags.js.map +0 -1
  357. package/dist/core/cursor-config-options.d.ts +0 -18
  358. package/dist/core/cursor-config-options.js +0 -31
  359. package/dist/core/cursor-config-options.js.map +0 -1
  360. package/dist/core/cursor-model-catalog.d.ts +0 -45
  361. package/dist/core/cursor-model-catalog.js +0 -300
  362. package/dist/core/cursor-model-catalog.js.map +0 -1
  363. package/dist/core/cursor-print-capabilities.d.ts +0 -16
  364. package/dist/core/cursor-print-capabilities.js +0 -141
  365. package/dist/core/cursor-print-capabilities.js.map +0 -1
  366. package/dist/core/cursor-print-process.d.ts +0 -31
  367. package/dist/core/cursor-print-process.js +0 -117
  368. package/dist/core/cursor-print-process.js.map +0 -1
  369. package/dist/core/cursor-print-runner.d.ts +0 -31
  370. package/dist/core/cursor-print-runner.js +0 -555
  371. package/dist/core/cursor-print-runner.js.map +0 -1
  372. package/dist/core/cursor-print-tool-catalog.d.ts +0 -10
  373. package/dist/core/cursor-print-tool-catalog.js +0 -91
  374. package/dist/core/cursor-print-tool-catalog.js.map +0 -1
  375. package/dist/core/cursor-print-ui-mapper.d.ts +0 -47
  376. package/dist/core/cursor-print-ui-mapper.js +0 -553
  377. package/dist/core/cursor-print-ui-mapper.js.map +0 -1
  378. package/dist/core/cursor-provider-error.d.ts +0 -33
  379. package/dist/core/cursor-provider-error.js +0 -68
  380. package/dist/core/cursor-provider-error.js.map +0 -1
  381. package/dist/core/cursor-runner.d.ts +0 -24
  382. package/dist/core/cursor-runner.js +0 -149
  383. package/dist/core/cursor-runner.js.map +0 -1
  384. package/dist/core/cursor-ui-mapper.d.ts +0 -29
  385. package/dist/core/cursor-ui-mapper.js +0 -275
  386. package/dist/core/cursor-ui-mapper.js.map +0 -1
  387. package/dist/core/defined.d.ts +0 -1
  388. package/dist/core/defined.js +0 -2
  389. package/dist/core/defined.js.map +0 -1
  390. package/dist/core/hook-items.d.ts +0 -14
  391. package/dist/core/hook-items.js +0 -13
  392. package/dist/core/hook-items.js.map +0 -1
  393. package/dist/core/host-model-catalog.d.ts +0 -7
  394. package/dist/core/host-model-catalog.js +0 -21
  395. package/dist/core/host-model-catalog.js.map +0 -1
  396. package/dist/core/input-submissions.d.ts +0 -14
  397. package/dist/core/input-submissions.js +0 -26
  398. package/dist/core/input-submissions.js.map +0 -1
  399. package/dist/core/managed-session.d.ts +0 -6
  400. package/dist/core/managed-session.js +0 -116
  401. package/dist/core/managed-session.js.map +0 -1
  402. package/dist/core/model-identity.d.ts +0 -108
  403. package/dist/core/model-identity.js +0 -137
  404. package/dist/core/model-identity.js.map +0 -1
  405. package/dist/core/model-presets.d.ts +0 -10
  406. package/dist/core/model-presets.js +0 -77
  407. package/dist/core/model-presets.js.map +0 -1
  408. package/dist/core/ndjson.d.ts +0 -6
  409. package/dist/core/ndjson.js +0 -23
  410. package/dist/core/ndjson.js.map +0 -1
  411. package/dist/core/omp-model-catalog.d.ts +0 -43
  412. package/dist/core/omp-model-catalog.js +0 -205
  413. package/dist/core/omp-model-catalog.js.map +0 -1
  414. package/dist/core/omp-runner.d.ts +0 -72
  415. package/dist/core/omp-runner.js +0 -1049
  416. package/dist/core/omp-runner.js.map +0 -1
  417. package/dist/core/omp-ui-mapper.d.ts +0 -106
  418. package/dist/core/omp-ui-mapper.js +0 -882
  419. package/dist/core/omp-ui-mapper.js.map +0 -1
  420. package/dist/core/opencode-model-catalog.d.ts +0 -32
  421. package/dist/core/opencode-model-catalog.js +0 -215
  422. package/dist/core/opencode-model-catalog.js.map +0 -1
  423. package/dist/core/opencode-permissions.d.ts +0 -52
  424. package/dist/core/opencode-permissions.js +0 -101
  425. package/dist/core/opencode-permissions.js.map +0 -1
  426. package/dist/core/opencode-server-runner.d.ts +0 -61
  427. package/dist/core/opencode-server-runner.js +0 -1692
  428. package/dist/core/opencode-server-runner.js.map +0 -1
  429. package/dist/core/opencode-session-error.d.ts +0 -19
  430. package/dist/core/opencode-session-error.js +0 -42
  431. package/dist/core/opencode-session-error.js.map +0 -1
  432. package/dist/core/opencode-ui-mapper.d.ts +0 -137
  433. package/dist/core/opencode-ui-mapper.js +0 -768
  434. package/dist/core/opencode-ui-mapper.js.map +0 -1
  435. package/dist/core/pi-model-catalog.d.ts +0 -38
  436. package/dist/core/pi-model-catalog.js +0 -249
  437. package/dist/core/pi-model-catalog.js.map +0 -1
  438. package/dist/core/pi-runner.d.ts +0 -43
  439. package/dist/core/pi-runner.js +0 -827
  440. package/dist/core/pi-runner.js.map +0 -1
  441. package/dist/core/pi-ui-mapper.d.ts +0 -52
  442. package/dist/core/pi-ui-mapper.js +0 -395
  443. package/dist/core/pi-ui-mapper.js.map +0 -1
  444. package/dist/core/process-usage.d.ts +0 -74
  445. package/dist/core/process-usage.js +0 -218
  446. package/dist/core/process-usage.js.map +0 -1
  447. package/dist/core/provider-auth.d.ts +0 -168
  448. package/dist/core/provider-auth.js +0 -660
  449. package/dist/core/provider-auth.js.map +0 -1
  450. package/dist/core/provider-availability.d.ts +0 -3
  451. package/dist/core/provider-availability.js +0 -14
  452. package/dist/core/provider-availability.js.map +0 -1
  453. package/dist/core/runner-factory.d.ts +0 -11
  454. package/dist/core/runner-factory.js +0 -31
  455. package/dist/core/runner-factory.js.map +0 -1
  456. package/dist/core/runner-model-catalog.d.ts +0 -34
  457. package/dist/core/runner-model-catalog.js +0 -109
  458. package/dist/core/runner-model-catalog.js.map +0 -1
  459. package/dist/core/runner-runtime.d.ts +0 -40
  460. package/dist/core/runner-runtime.js +0 -88
  461. package/dist/core/runner-runtime.js.map +0 -1
  462. package/dist/core/runner-stderr.d.ts +0 -2
  463. package/dist/core/runner-stderr.js +0 -20
  464. package/dist/core/runner-stderr.js.map +0 -1
  465. package/dist/core/runner-tool-grants.d.ts +0 -21
  466. package/dist/core/runner-tool-grants.js +0 -64
  467. package/dist/core/runner-tool-grants.js.map +0 -1
  468. package/dist/core/secret-redaction.d.ts +0 -20
  469. package/dist/core/secret-redaction.js +0 -98
  470. package/dist/core/secret-redaction.js.map +0 -1
  471. package/dist/core/session-process.d.ts +0 -42
  472. package/dist/core/session-process.js +0 -360
  473. package/dist/core/session-process.js.map +0 -1
  474. package/dist/core/shell-env.d.ts +0 -17
  475. package/dist/core/shell-env.js +0 -51
  476. package/dist/core/shell-env.js.map +0 -1
  477. package/dist/core/ui-events.d.ts +0 -348
  478. package/dist/core/ui-events.js +0 -2
  479. package/dist/core/ui-events.js.map +0 -1
  480. package/dist/core/usage-limit.d.ts +0 -42
  481. package/dist/core/usage-limit.js +0 -152
  482. package/dist/core/usage-limit.js.map +0 -1
  483. package/dist/core/usage.d.ts +0 -11
  484. package/dist/core/usage.js +0 -15
  485. package/dist/core/usage.js.map +0 -1
  486. package/dist/core/v1-text-coalescer.d.ts +0 -36
  487. package/dist/core/v1-text-coalescer.js +0 -72
  488. package/dist/core/v1-text-coalescer.js.map +0 -1
  489. package/dist/data-gitignore.d.ts +0 -6
  490. package/dist/data-gitignore.js +0 -59
  491. package/dist/data-gitignore.js.map +0 -1
  492. package/dist/delegation/capacity.d.ts +0 -15
  493. package/dist/delegation/capacity.js +0 -30
  494. package/dist/delegation/capacity.js.map +0 -1
  495. package/dist/delegation/cli.d.ts +0 -4
  496. package/dist/delegation/cli.js +0 -481
  497. package/dist/delegation/cli.js.map +0 -1
  498. package/dist/delegation/context.d.ts +0 -40
  499. package/dist/delegation/context.js +0 -378
  500. package/dist/delegation/context.js.map +0 -1
  501. package/dist/delegation/conversations.d.ts +0 -9
  502. package/dist/delegation/conversations.js +0 -66
  503. package/dist/delegation/conversations.js.map +0 -1
  504. package/dist/delegation/credentials.d.ts +0 -21
  505. package/dist/delegation/credentials.js +0 -66
  506. package/dist/delegation/credentials.js.map +0 -1
  507. package/dist/delegation/destroy-observation.d.ts +0 -42
  508. package/dist/delegation/destroy-observation.js +0 -115
  509. package/dist/delegation/destroy-observation.js.map +0 -1
  510. package/dist/delegation/effort.d.ts +0 -1
  511. package/dist/delegation/effort.js +0 -11
  512. package/dist/delegation/effort.js.map +0 -1
  513. package/dist/delegation/execution-identity.d.ts +0 -180
  514. package/dist/delegation/execution-identity.js +0 -154
  515. package/dist/delegation/execution-identity.js.map +0 -1
  516. package/dist/delegation/idle-test-app.d.ts +0 -4
  517. package/dist/delegation/idle-test-app.js +0 -174
  518. package/dist/delegation/idle-test-app.js.map +0 -1
  519. package/dist/delegation/input.d.ts +0 -12
  520. package/dist/delegation/input.js +0 -50
  521. package/dist/delegation/input.js.map +0 -1
  522. package/dist/delegation/park-notice.d.ts +0 -42
  523. package/dist/delegation/park-notice.js +0 -71
  524. package/dist/delegation/park-notice.js.map +0 -1
  525. package/dist/delegation/policy.d.ts +0 -22
  526. package/dist/delegation/policy.js +0 -95
  527. package/dist/delegation/policy.js.map +0 -1
  528. package/dist/delegation/process-liveness.d.ts +0 -98
  529. package/dist/delegation/process-liveness.js +0 -213
  530. package/dist/delegation/process-liveness.js.map +0 -1
  531. package/dist/delegation/provision.d.ts +0 -32
  532. package/dist/delegation/provision.js +0 -177
  533. package/dist/delegation/provision.js.map +0 -1
  534. package/dist/delegation/questions.d.ts +0 -21
  535. package/dist/delegation/questions.js +0 -50
  536. package/dist/delegation/questions.js.map +0 -1
  537. package/dist/delegation/readiness.d.ts +0 -13
  538. package/dist/delegation/readiness.js +0 -19
  539. package/dist/delegation/readiness.js.map +0 -1
  540. package/dist/delegation/results.d.ts +0 -13
  541. package/dist/delegation/results.js +0 -154
  542. package/dist/delegation/results.js.map +0 -1
  543. package/dist/delegation/retry-backoff.d.ts +0 -31
  544. package/dist/delegation/retry-backoff.js +0 -26
  545. package/dist/delegation/retry-backoff.js.map +0 -1
  546. package/dist/delegation/routes.d.ts +0 -953
  547. package/dist/delegation/routes.js +0 -74
  548. package/dist/delegation/routes.js.map +0 -1
  549. package/dist/delegation/scratch-cleanup.d.ts +0 -28
  550. package/dist/delegation/scratch-cleanup.js +0 -145
  551. package/dist/delegation/scratch-cleanup.js.map +0 -1
  552. package/dist/delegation/service.d.ts +0 -211
  553. package/dist/delegation/service.js +0 -946
  554. package/dist/delegation/service.js.map +0 -1
  555. package/dist/delegation/transport.d.ts +0 -931
  556. package/dist/delegation/transport.js +0 -22
  557. package/dist/delegation/transport.js.map +0 -1
  558. package/dist/delegation/wait.d.ts +0 -14
  559. package/dist/delegation/wait.js +0 -72
  560. package/dist/delegation/wait.js.map +0 -1
  561. package/dist/delegation/windows-test-app.d.ts +0 -5
  562. package/dist/delegation/windows-test-app.js +0 -63
  563. package/dist/delegation/windows-test-app.js.map +0 -1
  564. package/dist/delegation/windows-workspace-identity.d.ts +0 -3
  565. package/dist/delegation/windows-workspace-identity.js +0 -22
  566. package/dist/delegation/windows-workspace-identity.js.map +0 -1
  567. package/dist/delegation/workspace.d.ts +0 -33
  568. package/dist/delegation/workspace.js +0 -556
  569. package/dist/delegation/workspace.js.map +0 -1
  570. package/dist/detached-process.d.ts +0 -103
  571. package/dist/detached-process.js +0 -301
  572. package/dist/detached-process.js.map +0 -1
  573. package/dist/discovery/catalog.d.ts +0 -15
  574. package/dist/discovery/catalog.js +0 -31
  575. package/dist/discovery/catalog.js.map +0 -1
  576. package/dist/discovery/cli.d.ts +0 -8
  577. package/dist/discovery/cli.js +0 -106
  578. package/dist/discovery/cli.js.map +0 -1
  579. package/dist/git-diff-base.d.ts +0 -41
  580. package/dist/git-diff-base.js +0 -116
  581. package/dist/git-diff-base.js.map +0 -1
  582. package/dist/git-index-copy.d.ts +0 -4
  583. package/dist/git-index-copy.js +0 -10
  584. package/dist/git-index-copy.js.map +0 -1
  585. package/dist/git-refs.d.ts +0 -11
  586. package/dist/git-refs.js +0 -14
  587. package/dist/git-refs.js.map +0 -1
  588. package/dist/git-worktree-lock-helper.d.ts +0 -7
  589. package/dist/git-worktree-lock-helper.js +0 -158
  590. package/dist/git-worktree-lock-helper.js.map +0 -1
  591. package/dist/git-worktree-lock.d.ts +0 -17
  592. package/dist/git-worktree-lock.js +0 -90
  593. package/dist/git-worktree-lock.js.map +0 -1
  594. package/dist/git-worktree-release.d.ts +0 -20
  595. package/dist/git-worktree-release.js +0 -27
  596. package/dist/git-worktree-release.js.map +0 -1
  597. package/dist/git-worktree.d.ts +0 -154
  598. package/dist/git-worktree.js +0 -858
  599. package/dist/git-worktree.js.map +0 -1
  600. package/dist/handoff.d.ts +0 -72
  601. package/dist/handoff.js +0 -206
  602. package/dist/handoff.js.map +0 -1
  603. package/dist/index.d.ts +0 -2
  604. package/dist/index.js.map +0 -1
  605. package/dist/install-as-command.d.ts +0 -40
  606. package/dist/install-as-command.js +0 -52
  607. package/dist/install-as-command.js.map +0 -1
  608. package/dist/merge-observations.d.ts +0 -13
  609. package/dist/merge-observations.js +0 -55
  610. package/dist/merge-observations.js.map +0 -1
  611. package/dist/open-url.d.ts +0 -2
  612. package/dist/open-url.js +0 -10
  613. package/dist/open-url.js.map +0 -1
  614. package/dist/pack-check.d.ts +0 -17
  615. package/dist/pack-check.js +0 -27
  616. package/dist/pack-check.js.map +0 -1
  617. package/dist/paths.d.ts +0 -138
  618. package/dist/paths.js +0 -220
  619. package/dist/paths.js.map +0 -1
  620. package/dist/planner.d.ts +0 -28
  621. package/dist/planner.js +0 -271
  622. package/dist/planner.js.map +0 -1
  623. package/dist/preview/agent-address.d.ts +0 -34
  624. package/dist/preview/agent-address.js +0 -51
  625. package/dist/preview/agent-address.js.map +0 -1
  626. package/dist/preview/agent-marker.d.ts +0 -17
  627. package/dist/preview/agent-marker.js +0 -71
  628. package/dist/preview/agent-marker.js.map +0 -1
  629. package/dist/preview/cdp-proxy.d.ts +0 -54
  630. package/dist/preview/cdp-proxy.js +0 -151
  631. package/dist/preview/cdp-proxy.js.map +0 -1
  632. package/dist/preview/cdp.d.ts +0 -49
  633. package/dist/preview/cdp.js +0 -167
  634. package/dist/preview/cdp.js.map +0 -1
  635. package/dist/preview/chromium.d.ts +0 -87
  636. package/dist/preview/chromium.js +0 -481
  637. package/dist/preview/chromium.js.map +0 -1
  638. package/dist/preview/dev-server.d.ts +0 -68
  639. package/dist/preview/dev-server.js +0 -317
  640. package/dist/preview/dev-server.js.map +0 -1
  641. package/dist/preview/host.d.ts +0 -221
  642. package/dist/preview/host.js +0 -967
  643. package/dist/preview/host.js.map +0 -1
  644. package/dist/preview/registration.d.ts +0 -68
  645. package/dist/preview/registration.js +0 -111
  646. package/dist/preview/registration.js.map +0 -1
  647. package/dist/preview/session.d.ts +0 -75
  648. package/dist/preview/session.js +0 -357
  649. package/dist/preview/session.js.map +0 -1
  650. package/dist/preview/url.d.ts +0 -6
  651. package/dist/preview/url.js +0 -17
  652. package/dist/preview/url.js.map +0 -1
  653. package/dist/process-wait/exit-file.d.ts +0 -29
  654. package/dist/process-wait/exit-file.js +0 -67
  655. package/dist/process-wait/exit-file.js.map +0 -1
  656. package/dist/process-wait/supervisor.d.ts +0 -30
  657. package/dist/process-wait/supervisor.js +0 -71
  658. package/dist/process-wait/supervisor.js.map +0 -1
  659. package/dist/release/manifests.d.ts +0 -103
  660. package/dist/release/manifests.js +0 -90
  661. package/dist/release/manifests.js.map +0 -1
  662. package/dist/release/snapshot.d.ts +0 -67
  663. package/dist/release/snapshot.js +0 -97
  664. package/dist/release/snapshot.js.map +0 -1
  665. package/dist/release/stable.d.ts +0 -38
  666. package/dist/release/stable.js +0 -55
  667. package/dist/release/stable.js.map +0 -1
  668. package/dist/runs/agent-tmpdir-removal.d.ts +0 -15
  669. package/dist/runs/agent-tmpdir-removal.js +0 -60
  670. package/dist/runs/agent-tmpdir-removal.js.map +0 -1
  671. package/dist/runs/agent-tmpdir.d.ts +0 -119
  672. package/dist/runs/agent-tmpdir.js +0 -829
  673. package/dist/runs/agent-tmpdir.js.map +0 -1
  674. package/dist/runs/arm-repo-handle.d.ts +0 -9
  675. package/dist/runs/arm-repo-handle.js +0 -45
  676. package/dist/runs/arm-repo-handle.js.map +0 -1
  677. package/dist/runs/auto-name.d.ts +0 -75
  678. package/dist/runs/auto-name.js +0 -179
  679. package/dist/runs/auto-name.js.map +0 -1
  680. package/dist/runs/client-request.d.ts +0 -11
  681. package/dist/runs/client-request.js +0 -26
  682. package/dist/runs/client-request.js.map +0 -1
  683. package/dist/runs/delegation-state.d.ts +0 -400
  684. package/dist/runs/delegation-state.js +0 -22
  685. package/dist/runs/delegation-state.js.map +0 -1
  686. package/dist/runs/event-history-agent-context.d.ts +0 -14
  687. package/dist/runs/event-history-agent-context.js +0 -105
  688. package/dist/runs/event-history-agent-context.js.map +0 -1
  689. package/dist/runs/event-history-context.d.ts +0 -15
  690. package/dist/runs/event-history-context.js +0 -109
  691. package/dist/runs/event-history-context.js.map +0 -1
  692. package/dist/runs/event-history.d.ts +0 -53
  693. package/dist/runs/event-history.js +0 -535
  694. package/dist/runs/event-history.js.map +0 -1
  695. package/dist/runs/history-compressor.d.ts +0 -29
  696. package/dist/runs/history-compressor.js +0 -116
  697. package/dist/runs/history-compressor.js.map +0 -1
  698. package/dist/runs/history-file.d.ts +0 -36
  699. package/dist/runs/history-file.js +0 -463
  700. package/dist/runs/history-file.js.map +0 -1
  701. package/dist/runs/history-stream.d.ts +0 -2
  702. package/dist/runs/history-stream.js +0 -62
  703. package/dist/runs/history-stream.js.map +0 -1
  704. package/dist/runs/legacy-index.d.ts +0 -49
  705. package/dist/runs/legacy-index.js +0 -155
  706. package/dist/runs/legacy-index.js.map +0 -1
  707. package/dist/runs/live-item-snapshots.d.ts +0 -13
  708. package/dist/runs/live-item-snapshots.js +0 -79
  709. package/dist/runs/live-item-snapshots.js.map +0 -1
  710. package/dist/runs/loaded-run-healing.d.ts +0 -3
  711. package/dist/runs/loaded-run-healing.js +0 -17
  712. package/dist/runs/loaded-run-healing.js.map +0 -1
  713. package/dist/runs/outcome-commit.d.ts +0 -98
  714. package/dist/runs/outcome-commit.js +0 -132
  715. package/dist/runs/outcome-commit.js.map +0 -1
  716. package/dist/runs/pull-requests.d.ts +0 -14
  717. package/dist/runs/pull-requests.js +0 -96
  718. package/dist/runs/pull-requests.js.map +0 -1
  719. package/dist/runs/raw-record.d.ts +0 -40
  720. package/dist/runs/raw-record.js +0 -133
  721. package/dist/runs/raw-record.js.map +0 -1
  722. package/dist/runs/retention.d.ts +0 -91
  723. package/dist/runs/retention.js +0 -182
  724. package/dist/runs/retention.js.map +0 -1
  725. package/dist/runs/review-gate.d.ts +0 -18
  726. package/dist/runs/review-gate.js +0 -21
  727. package/dist/runs/review-gate.js.map +0 -1
  728. package/dist/runs/run-claims.d.ts +0 -16
  729. package/dist/runs/run-claims.js +0 -24
  730. package/dist/runs/run-claims.js.map +0 -1
  731. package/dist/runs/run-database.d.ts +0 -380
  732. package/dist/runs/run-database.js +0 -1008
  733. package/dist/runs/run-database.js.map +0 -1
  734. package/dist/runs/run-index.d.ts +0 -26
  735. package/dist/runs/run-index.js +0 -212
  736. package/dist/runs/run-index.js.map +0 -1
  737. package/dist/runs/run-row.d.ts +0 -15
  738. package/dist/runs/run-row.js +0 -59
  739. package/dist/runs/run-row.js.map +0 -1
  740. package/dist/runs/store-open-error.d.ts +0 -24
  741. package/dist/runs/store-open-error.js +0 -61
  742. package/dist/runs/store-open-error.js.map +0 -1
  743. package/dist/runs/store.d.ts +0 -3090
  744. package/dist/runs/store.js +0 -4693
  745. package/dist/runs/store.js.map +0 -1
  746. package/dist/runs/task-markers.d.ts +0 -29
  747. package/dist/runs/task-markers.js +0 -78
  748. package/dist/runs/task-markers.js.map +0 -1
  749. package/dist/runs/task-refs.d.ts +0 -25
  750. package/dist/runs/task-refs.js +0 -74
  751. package/dist/runs/task-refs.js.map +0 -1
  752. package/dist/runs/transcript-facts-fold.d.ts +0 -64
  753. package/dist/runs/transcript-facts-fold.js +0 -109
  754. package/dist/runs/transcript-facts-fold.js.map +0 -1
  755. package/dist/runs/transcript-facts-load.d.ts +0 -11
  756. package/dist/runs/transcript-facts-load.js +0 -66
  757. package/dist/runs/transcript-facts-load.js.map +0 -1
  758. package/dist/runs/transcript-facts-queue.d.ts +0 -30
  759. package/dist/runs/transcript-facts-queue.js +0 -227
  760. package/dist/runs/transcript-facts-queue.js.map +0 -1
  761. package/dist/runs/transcript-facts-worker.d.ts +0 -15
  762. package/dist/runs/transcript-facts-worker.js +0 -26
  763. package/dist/runs/transcript-facts-worker.js.map +0 -1
  764. package/dist/runs/transcript-facts.d.ts +0 -39
  765. package/dist/runs/transcript-facts.js +0 -186
  766. package/dist/runs/transcript-facts.js.map +0 -1
  767. package/dist/runs/ui-event-sink.d.ts +0 -56
  768. package/dist/runs/ui-event-sink.js +0 -188
  769. package/dist/runs/ui-event-sink.js.map +0 -1
  770. package/dist/runs/webhook.d.ts +0 -191
  771. package/dist/runs/webhook.js +0 -360
  772. package/dist/runs/webhook.js.map +0 -1
  773. package/dist/runs/worker-execution.d.ts +0 -22
  774. package/dist/runs/worker-execution.js +0 -30
  775. package/dist/runs/worker-execution.js.map +0 -1
  776. package/dist/server/app-type.js.map +0 -1
  777. package/dist/server/archive-on-merge.d.ts +0 -35
  778. package/dist/server/archive-on-merge.js +0 -202
  779. package/dist/server/archive-on-merge.js.map +0 -1
  780. package/dist/server/capabilities.d.ts +0 -59
  781. package/dist/server/capabilities.js +0 -141
  782. package/dist/server/capabilities.js.map +0 -1
  783. package/dist/server/checkout-progress.d.ts +0 -10
  784. package/dist/server/checkout-progress.js +0 -27
  785. package/dist/server/checkout-progress.js.map +0 -1
  786. package/dist/server/checkout.d.ts +0 -129
  787. package/dist/server/checkout.js +0 -304
  788. package/dist/server/checkout.js.map +0 -1
  789. package/dist/server/cockpit-ownership.d.ts +0 -31
  790. package/dist/server/cockpit-ownership.js +0 -191
  791. package/dist/server/cockpit-ownership.js.map +0 -1
  792. package/dist/server/cold-repo-handles.d.ts +0 -14
  793. package/dist/server/cold-repo-handles.js +0 -78
  794. package/dist/server/cold-repo-handles.js.map +0 -1
  795. package/dist/server/completion-actions.d.ts +0 -30
  796. package/dist/server/completion-actions.js +0 -204
  797. package/dist/server/completion-actions.js.map +0 -1
  798. package/dist/server/create-project.d.ts +0 -71
  799. package/dist/server/create-project.js +0 -448
  800. package/dist/server/create-project.js.map +0 -1
  801. package/dist/server/forge/github-filters.d.ts +0 -22
  802. package/dist/server/forge/github-filters.js +0 -127
  803. package/dist/server/forge/github-filters.js.map +0 -1
  804. package/dist/server/forge/github-merge-requirements.d.ts +0 -18
  805. package/dist/server/forge/github-merge-requirements.js +0 -137
  806. package/dist/server/forge/github-merge-requirements.js.map +0 -1
  807. package/dist/server/forge/github.d.ts +0 -535
  808. package/dist/server/forge/github.js +0 -3200
  809. package/dist/server/forge/github.js.map +0 -1
  810. package/dist/server/forge/index.d.ts +0 -40
  811. package/dist/server/forge/index.js +0 -72
  812. package/dist/server/forge/index.js.map +0 -1
  813. package/dist/server/forge/types.d.ts +0 -244
  814. package/dist/server/forge/types.js +0 -2
  815. package/dist/server/forge/types.js.map +0 -1
  816. package/dist/server/fs-browse.d.ts +0 -80
  817. package/dist/server/fs-browse.js +0 -182
  818. package/dist/server/fs-browse.js.map +0 -1
  819. package/dist/server/git-changes.d.ts +0 -203
  820. package/dist/server/git-changes.js +0 -508
  821. package/dist/server/git-changes.js.map +0 -1
  822. package/dist/server/git.d.ts +0 -52
  823. package/dist/server/git.js +0 -170
  824. package/dist/server/git.js.map +0 -1
  825. package/dist/server/github.d.ts +0 -9
  826. package/dist/server/github.js +0 -8
  827. package/dist/server/github.js.map +0 -1
  828. package/dist/server/launch-key.d.ts +0 -5
  829. package/dist/server/launch-key.js +0 -31
  830. package/dist/server/launch-key.js.map +0 -1
  831. package/dist/server/live-routes.d.ts +0 -68
  832. package/dist/server/live-routes.js +0 -147
  833. package/dist/server/live-routes.js.map +0 -1
  834. package/dist/server/open-in-app.d.ts +0 -57
  835. package/dist/server/open-in-app.js +0 -177
  836. package/dist/server/open-in-app.js.map +0 -1
  837. package/dist/server/open-in-targets.d.ts +0 -42
  838. package/dist/server/open-in-targets.js +0 -110
  839. package/dist/server/open-in-targets.js.map +0 -1
  840. package/dist/server/open-in-terminal.d.ts +0 -73
  841. package/dist/server/open-in-terminal.js +0 -159
  842. package/dist/server/open-in-terminal.js.map +0 -1
  843. package/dist/server/pr.d.ts +0 -7
  844. package/dist/server/pr.js +0 -7
  845. package/dist/server/pr.js.map +0 -1
  846. package/dist/server/preview-cdp-socket.d.ts +0 -21
  847. package/dist/server/preview-cdp-socket.js +0 -112
  848. package/dist/server/preview-cdp-socket.js.map +0 -1
  849. package/dist/server/preview-socket.d.ts +0 -36
  850. package/dist/server/preview-socket.js +0 -126
  851. package/dist/server/preview-socket.js.map +0 -1
  852. package/dist/server/preview-sockets.d.ts +0 -14
  853. package/dist/server/preview-sockets.js +0 -18
  854. package/dist/server/preview-sockets.js.map +0 -1
  855. package/dist/server/project-context.d.ts +0 -192
  856. package/dist/server/project-context.js +0 -444
  857. package/dist/server/project-context.js.map +0 -1
  858. package/dist/server/provider-action-gate.d.ts +0 -5
  859. package/dist/server/provider-action-gate.js +0 -27
  860. package/dist/server/provider-action-gate.js.map +0 -1
  861. package/dist/server/provider-auth-runtime.d.ts +0 -32
  862. package/dist/server/provider-auth-runtime.js +0 -116
  863. package/dist/server/provider-auth-runtime.js.map +0 -1
  864. package/dist/server/repo-branches.d.ts +0 -99
  865. package/dist/server/repo-branches.js +0 -620
  866. package/dist/server/repo-branches.js.map +0 -1
  867. package/dist/server/repo-pull.d.ts +0 -18
  868. package/dist/server/repo-pull.js +0 -96
  869. package/dist/server/repo-pull.js.map +0 -1
  870. package/dist/server/run-event-feed.d.ts +0 -20
  871. package/dist/server/run-event-feed.js +0 -190
  872. package/dist/server/run-event-feed.js.map +0 -1
  873. package/dist/server/server-deps.d.ts +0 -37
  874. package/dist/server/server-deps.js +0 -114
  875. package/dist/server/server-deps.js.map +0 -1
  876. package/dist/server/server.d.ts +0 -28587
  877. package/dist/server/server.js +0 -5466
  878. package/dist/server/server.js.map +0 -1
  879. package/dist/server/start-run-options.d.ts +0 -82
  880. package/dist/server/start-run-options.js +0 -111
  881. package/dist/server/start-run-options.js.map +0 -1
  882. package/dist/server/static-ui.d.ts +0 -49
  883. package/dist/server/static-ui.js +0 -98
  884. package/dist/server/static-ui.js.map +0 -1
  885. package/dist/server/upgrade-router.d.ts +0 -23
  886. package/dist/server/upgrade-router.js +0 -53
  887. package/dist/server/upgrade-router.js.map +0 -1
  888. package/dist/server/validators.d.ts +0 -80
  889. package/dist/server/validators.js +0 -85
  890. package/dist/server/validators.js.map +0 -1
  891. package/dist/server/ws.d.ts +0 -65
  892. package/dist/server/ws.js +0 -200
  893. package/dist/server/ws.js.map +0 -1
  894. package/dist/server/wsl.d.ts +0 -25
  895. package/dist/server/wsl.js +0 -92
  896. package/dist/server/wsl.js.map +0 -1
  897. package/dist/server-install/engine.d.ts +0 -47
  898. package/dist/server-install/engine.js +0 -317
  899. package/dist/server-install/engine.js.map +0 -1
  900. package/dist/server-install/npx-cache.d.ts +0 -36
  901. package/dist/server-install/npx-cache.js +0 -104
  902. package/dist/server-install/npx-cache.js.map +0 -1
  903. package/dist/server-install/platforms/macosx-ngrok.d.ts +0 -6
  904. package/dist/server-install/platforms/macosx-ngrok.js +0 -371
  905. package/dist/server-install/platforms/macosx-ngrok.js.map +0 -1
  906. package/dist/server-install/platforms/ubuntu-vps.d.ts +0 -54
  907. package/dist/server-install/platforms/ubuntu-vps.js +0 -1066
  908. package/dist/server-install/platforms/ubuntu-vps.js.map +0 -1
  909. package/dist/server-install/state.d.ts +0 -50
  910. package/dist/server-install/state.js +0 -180
  911. package/dist/server-install/state.js.map +0 -1
  912. package/dist/server-install/steps.d.ts +0 -108
  913. package/dist/server-install/steps.js +0 -332
  914. package/dist/server-install/steps.js.map +0 -1
  915. package/dist/server-install/strategies.d.ts +0 -4
  916. package/dist/server-install/strategies.js +0 -20
  917. package/dist/server-install/strategies.js.map +0 -1
  918. package/dist/server-install/types.d.ts +0 -284
  919. package/dist/server-install/types.js +0 -118
  920. package/dist/server-install/types.js.map +0 -1
  921. package/dist/server-install/ui.d.ts +0 -36
  922. package/dist/server-install/ui.js +0 -130
  923. package/dist/server-install/ui.js.map +0 -1
  924. package/dist/session-context.d.ts +0 -64
  925. package/dist/session-context.js +0 -264
  926. package/dist/session-context.js.map +0 -1
  927. package/dist/skills-provision.d.ts +0 -62
  928. package/dist/skills-provision.js +0 -325
  929. package/dist/skills-provision.js.map +0 -1
  930. package/dist/skills-remote.d.ts +0 -129
  931. package/dist/skills-remote.js +0 -782
  932. package/dist/skills-remote.js.map +0 -1
  933. package/dist/skills.d.ts +0 -71
  934. package/dist/skills.js +0 -249
  935. package/dist/skills.js.map +0 -1
  936. package/dist/subcommands.d.ts +0 -11
  937. package/dist/subcommands.js +0 -24
  938. package/dist/subcommands.js.map +0 -1
  939. package/dist/task-cli/cli.d.ts +0 -38
  940. package/dist/task-cli/cli.js +0 -710
  941. package/dist/task-cli/cli.js.map +0 -1
  942. package/dist/task-cli/discovery.d.ts +0 -25
  943. package/dist/task-cli/discovery.js +0 -98
  944. package/dist/task-cli/discovery.js.map +0 -1
  945. package/dist/task-cli/hint.d.ts +0 -20
  946. package/dist/task-cli/hint.js +0 -14
  947. package/dist/task-cli/hint.js.map +0 -1
  948. package/dist/task-cli/http.d.ts +0 -49
  949. package/dist/task-cli/http.js +0 -109
  950. package/dist/task-cli/http.js.map +0 -1
  951. package/dist/task-cli/projections.d.ts +0 -68
  952. package/dist/task-cli/projections.js +0 -76
  953. package/dist/task-cli/projections.js.map +0 -1
  954. package/dist/task-cli/watch.d.ts +0 -119
  955. package/dist/task-cli/watch.js +0 -475
  956. package/dist/task-cli/watch.js.map +0 -1
  957. package/dist/ui-state.d.ts +0 -41
  958. package/dist/ui-state.js +0 -90
  959. package/dist/ui-state.js.map +0 -1
  960. package/dist/update-check.d.ts +0 -2
  961. package/dist/update-check.js +0 -26
  962. package/dist/update-check.js.map +0 -1
  963. package/dist/voice/decide.d.ts +0 -32
  964. package/dist/voice/decide.js +0 -297
  965. package/dist/voice/decide.js.map +0 -1
  966. package/dist/voice/decision-log.d.ts +0 -52
  967. package/dist/voice/decision-log.js +0 -107
  968. package/dist/voice/decision-log.js.map +0 -1
  969. package/dist/voice/engine.d.ts +0 -119
  970. package/dist/voice/engine.js +0 -60
  971. package/dist/voice/engine.js.map +0 -1
  972. package/dist/voice/fake-engine.d.ts +0 -10
  973. package/dist/voice/fake-engine.js +0 -192
  974. package/dist/voice/fake-engine.js.map +0 -1
  975. package/dist/voice/jev-engine.d.ts +0 -17
  976. package/dist/voice/jev-engine.js +0 -110
  977. package/dist/voice/jev-engine.js.map +0 -1
  978. package/dist/voice/pending-ask.d.ts +0 -17
  979. package/dist/voice/pending-ask.js +0 -50
  980. package/dist/voice/pending-ask.js.map +0 -1
  981. package/dist/voice/routes.d.ts +0 -115
  982. package/dist/voice/routes.js +0 -91
  983. package/dist/voice/routes.js.map +0 -1
  984. package/dist/voice/sentence.d.ts +0 -21
  985. package/dist/voice/sentence.js +0 -61
  986. package/dist/voice/sentence.js.map +0 -1
  987. package/dist/voice/thresholds.d.ts +0 -28
  988. package/dist/voice/thresholds.js +0 -29
  989. package/dist/voice/thresholds.js.map +0 -1
  990. package/dist/webhooks/cli.d.ts +0 -18
  991. package/dist/webhooks/cli.js +0 -145
  992. package/dist/webhooks/cli.js.map +0 -1
  993. package/dist/webhooks/prompt.d.ts +0 -5
  994. package/dist/webhooks/prompt.js +0 -26
  995. package/dist/webhooks/prompt.js.map +0 -1
  996. package/dist/workflows/active-run.d.ts +0 -167
  997. package/dist/workflows/active-run.js +0 -21
  998. package/dist/workflows/active-run.js.map +0 -1
  999. package/dist/workflows/attachment-path.d.ts +0 -6
  1000. package/dist/workflows/attachment-path.js +0 -40
  1001. package/dist/workflows/attachment-path.js.map +0 -1
  1002. package/dist/workflows/continuation-admission.d.ts +0 -913
  1003. package/dist/workflows/continuation-admission.js +0 -265
  1004. package/dist/workflows/continuation-admission.js.map +0 -1
  1005. package/dist/workflows/execution-account.d.ts +0 -13
  1006. package/dist/workflows/execution-account.js +0 -18
  1007. package/dist/workflows/execution-account.js.map +0 -1
  1008. package/dist/workflows/grouped-command.d.ts +0 -31
  1009. package/dist/workflows/grouped-command.js +0 -143
  1010. package/dist/workflows/grouped-command.js.map +0 -1
  1011. package/dist/workflows/input-acknowledgement.d.ts +0 -152
  1012. package/dist/workflows/input-acknowledgement.js +0 -38
  1013. package/dist/workflows/input-acknowledgement.js.map +0 -1
  1014. package/dist/workflows/line-order.d.ts +0 -5
  1015. package/dist/workflows/line-order.js +0 -25
  1016. package/dist/workflows/line-order.js.map +0 -1
  1017. package/dist/workflows/load.d.ts +0 -17
  1018. package/dist/workflows/load.js +0 -61
  1019. package/dist/workflows/load.js.map +0 -1
  1020. package/dist/workflows/outcome-batches.d.ts +0 -20
  1021. package/dist/workflows/outcome-batches.js +0 -25
  1022. package/dist/workflows/outcome-batches.js.map +0 -1
  1023. package/dist/workflows/question-routing.d.ts +0 -8
  1024. package/dist/workflows/question-routing.js +0 -18
  1025. package/dist/workflows/question-routing.js.map +0 -1
  1026. package/dist/workflows/run-scheduling.d.ts +0 -35
  1027. package/dist/workflows/run-scheduling.js +0 -61
  1028. package/dist/workflows/run-scheduling.js.map +0 -1
  1029. package/dist/workflows/run-states.d.ts +0 -190
  1030. package/dist/workflows/run-states.js +0 -295
  1031. package/dist/workflows/run-states.js.map +0 -1
  1032. package/dist/workflows/run.d.ts +0 -2405
  1033. package/dist/workflows/run.js +0 -10745
  1034. package/dist/workflows/run.js.map +0 -1
  1035. package/dist/workflows/turn-end.d.ts +0 -116
  1036. package/dist/workflows/turn-end.js +0 -68
  1037. package/dist/workflows/turn-end.js.map +0 -1
  1038. package/dist/workflows/types.d.ts +0 -83
  1039. package/dist/workflows/types.js +0 -192
  1040. package/dist/workflows/types.js.map +0 -1
  1041. package/dist/workflows/waits.d.ts +0 -74
  1042. package/dist/workflows/waits.js +0 -197
  1043. package/dist/workflows/waits.js.map +0 -1
  1044. package/dist/workspace/agent-accounts.d.ts +0 -128
  1045. package/dist/workspace/agent-accounts.js +0 -280
  1046. package/dist/workspace/agent-accounts.js.map +0 -1
  1047. package/dist/workspace/agent-profiles.d.ts +0 -124
  1048. package/dist/workspace/agent-profiles.js +0 -190
  1049. package/dist/workspace/agent-profiles.js.map +0 -1
  1050. package/dist/workspace/config.d.ts +0 -181
  1051. package/dist/workspace/config.js +0 -389
  1052. package/dist/workspace/config.js.map +0 -1
  1053. package/dist/workspace/migrations.d.ts +0 -35
  1054. package/dist/workspace/migrations.js +0 -147
  1055. package/dist/workspace/migrations.js.map +0 -1
  1056. package/dist/workspace/projects-cli.d.ts +0 -25
  1057. package/dist/workspace/projects-cli.js +0 -172
  1058. package/dist/workspace/projects-cli.js.map +0 -1
  1059. package/dist/workspace/projects.d.ts +0 -129
  1060. package/dist/workspace/projects.js +0 -267
  1061. package/dist/workspace/projects.js.map +0 -1
  1062. package/dist/workspace/semaphore.d.ts +0 -145
  1063. package/dist/workspace/semaphore.js +0 -196
  1064. package/dist/workspace/semaphore.js.map +0 -1
  1065. package/dist/workspace/ui-state.d.ts +0 -36
  1066. package/dist/workspace/ui-state.js +0 -55
  1067. package/dist/workspace/ui-state.js.map +0 -1
  1068. package/dist/workspace/webhooks.d.ts +0 -40
  1069. package/dist/workspace/webhooks.js +0 -146
  1070. package/dist/workspace/webhooks.js.map +0 -1
  1071. package/dist/worktree-manifest.d.ts +0 -165
  1072. package/dist/worktree-manifest.js +0 -530
  1073. package/dist/worktree-manifest.js.map +0 -1
  1074. package/dist/worktree-setup.d.ts +0 -85
  1075. package/dist/worktree-setup.js +0 -164
  1076. package/dist/worktree-setup.js.map +0 -1
  1077. package/scripts/benchmark-run-store-fixture.ts +0 -432
  1078. package/scripts/benchmark-run-store.ts +0 -743
  1079. package/scripts/benchmark-stuck-destroys.ts +0 -143
  1080. package/scripts/check-pack.mjs +0 -48
  1081. package/scripts/inline-contract.mjs +0 -165
  1082. package/scripts/install-as-command.mjs +0 -122
  1083. package/scripts/measure-transcript-facts-health.mjs +0 -87
  1084. package/scripts/measure-transcript-facts-lag.mjs +0 -68
  1085. package/scripts/mock-autonomous.mjs +0 -11
  1086. package/scripts/mock-ci-tool.mjs +0 -111
  1087. package/scripts/mock-claude-model-refusal.mjs +0 -42
  1088. package/scripts/mock-claude.mjs +0 -1065
  1089. package/scripts/mock-codex-app-server.mjs +0 -905
  1090. package/scripts/mock-codex-coalesce-steer.mjs +0 -59
  1091. package/scripts/mock-codex-reverse-steer.mjs +0 -130
  1092. package/scripts/mock-cursor-acp.mjs +0 -423
  1093. package/scripts/mock-cursor-hang-stdin-late.mjs +0 -35
  1094. package/scripts/mock-cursor-hang-stdin.mjs +0 -30
  1095. package/scripts/mock-cursor-print.mjs +0 -256
  1096. package/scripts/mock-deferred-turn-start.mjs +0 -16
  1097. package/scripts/mock-delivery-control.d.mts +0 -23
  1098. package/scripts/mock-delivery-control.mjs +0 -80
  1099. package/scripts/mock-env-record.mjs +0 -11
  1100. package/scripts/mock-failure-control.d.mts +0 -13
  1101. package/scripts/mock-failure-control.mjs +0 -68
  1102. package/scripts/mock-multi-pr.mjs +0 -7
  1103. package/scripts/mock-nudge.mjs +0 -45
  1104. package/scripts/mock-omp-rpc.mjs +0 -779
  1105. package/scripts/mock-opencode-serve.mjs +0 -1230
  1106. package/scripts/mock-pi-rpc.mjs +0 -698
  1107. package/scripts/mock-runner-crash.mjs +0 -58
  1108. package/scripts/mock-session-context.d.mts +0 -5
  1109. package/scripts/mock-session-context.mjs +0 -56
  1110. package/scripts/mock-silent-tail.mjs +0 -85
  1111. package/scripts/mock-turn-messages.mjs +0 -5
  1112. package/scripts/omp-ci-wait.mjs +0 -29
  1113. package/scripts/omp-restrict-delegation.yml +0 -4
  1114. package/scripts/pi-ci-wait.mjs +0 -17
  1115. package/scripts/pi-default-tools.mjs +0 -22
  1116. package/scripts/pi-project-skills.mjs +0 -59
  1117. package/scripts/pi-retry-degraded-service.mjs +0 -16
  1118. package/scripts/probe-cursor-print.mjs +0 -627
  1119. package/scripts/seed-archive-profile.ts +0 -53
  1120. package/scripts/sync-readme.mjs +0 -20
  1121. package/scripts/test-process-usage.mjs +0 -47
  1122. package/scripts/transcript-facts-fixture.mjs +0 -53
  1123. package/scripts/voice-replay.ts +0 -50
  1124. package/scripts/windows-workspace-identity.cs +0 -208
  1125. package/scripts/windows-workspace-identity.ps1 +0 -10
  1126. package/web/dist/assets/alert-dialog-DfctKUMw.js +0 -1
  1127. package/web/dist/assets/button-CeupvoKG.js +0 -41
  1128. package/web/dist/assets/centered-state-hDsyXrnH.js +0 -1
  1129. package/web/dist/assets/cez-idle-D3aj_9lp.js +0 -1
  1130. package/web/dist/assets/diff-BnIXZK3i2.js +0 -3
  1131. package/web/dist/assets/diff-controls-GewpW9aF.js +0 -1
  1132. package/web/dist/assets/diff-view-Byo7gpvW.js +0 -11
  1133. package/web/dist/assets/dropdown-menu-COj_J5wd.js +0 -6
  1134. package/web/dist/assets/git-toolbar-DY0z0n4S.js +0 -1
  1135. package/web/dist/assets/github-DwU6ALRK.js +0 -1
  1136. package/web/dist/assets/index-BOfE8pyD.js +0 -34
  1137. package/web/dist/assets/index-D9HpsmdW.css +0 -1
  1138. package/web/dist/assets/lib-BQXq3kEf.js +0 -1
  1139. package/web/dist/assets/live-protocol-Uce2NwEX.js +0 -64
  1140. package/web/dist/assets/play-CmVAj_fu.js +0 -1
  1141. package/web/dist/assets/popover-D56fhiXj.js +0 -1
  1142. package/web/dist/assets/preview-pane-connected-BmVqfSU5.js +0 -3
  1143. package/web/dist/assets/reference-chip-gQNk-4jc.js +0 -1
  1144. package/web/dist/assets/repo-git-B5ECDUuv.js +0 -1
  1145. package/web/dist/assets/run-header-C0Y1NvEM.js +0 -2
  1146. package/web/dist/assets/skill-empty-hint-oOtzR3v0.js +0 -1
  1147. package/web/dist/assets/skills-DUeTkZ9z.js +0 -1
  1148. package/web/dist/assets/status-dot-1PR0i69P.js +0 -1
  1149. package/web/dist/assets/tab-link-DmWk4l5O.js +0 -1
  1150. package/web/dist/assets/task-changes-DKZXuW89.js +0 -1
  1151. package/web/dist/assets/task-commits-BZ6KxWdF.js +0 -1
  1152. package/web/dist/assets/task-files-DlF7Apcn.js +0 -2
  1153. package/web/dist/assets/task-github-item-CVPo3geZ.js +0 -1
  1154. package/web/dist/assets/task-thread-mm4-ECyo.js +0 -9
  1155. package/web/dist/assets/thread-state-CIw2BlhT.js +0 -4
  1156. package/web/dist/assets/use-hand-to-agent-state-BCDjzHnG.js +0 -1
  1157. package/web/dist/assets/workflows-D8vYD-ql.js +0 -7
  1158. package/web/dist/assets/zoomable-image-CxQSsfcn.js +0 -1
@@ -1,3090 +0,0 @@
1
- import { EventEmitter } from 'node:events';
2
- import { type WorkerExecution } from './worker-execution.ts';
3
- import { z } from 'zod';
4
- import { queuedMessageSchema } from '../contract/index.js';
5
- import type { ArchiveFinishedScope, ArchivedRunsResponse, ArchivePullRequestIdentity, CiWait, PrWaitEntry, ConversationState, AgentInput, InboxClaim, DelegationState, MergedPullRequest, RunSummary, Wait, WorkerCollectedResult, WorkerDestroyRetry, WorkerWait, WorkerWaitEntry } from '../contract/index.js';
6
- import { type AutomationNames } from '../contract/index.js';
7
- import { type TranscriptFacts } from './transcript-facts.ts';
8
- import { type WorkerExecutionIdentity } from '../delegation/execution-identity.ts';
9
- import { type CwdSource, type WorkerProcessRecord } from '../delegation/process-liveness.ts';
10
- import { workflowDefSchema } from '../workflows/types.ts';
11
- import { type OutcomeDependencies, type RunOutcome } from './outcome-commit.ts';
12
- import { type RunnerId } from '../core/agent-runner.ts';
13
- import { type RawExtras } from './raw-record.ts';
14
- import { RunStoreOpenError } from './store-open-error.ts';
15
- export type RunStatus = 'queued' | 'running' | 'waiting' | 'review' | 'done' | 'failed' | 'cancelled';
16
- export type StepStatus = 'pending' | 'running' | 'waiting' | 'review' | 'done' | 'failed' | 'cancelled' | 'skipped';
17
- declare const stepStateSchema: z.ZodObject<{
18
- id: z.ZodString;
19
- name: z.ZodString;
20
- kind: z.ZodEnum<{
21
- agent: "agent";
22
- check: "check";
23
- }>;
24
- status: z.ZodEnum<{
25
- cancelled: "cancelled";
26
- done: "done";
27
- failed: "failed";
28
- pending: "pending";
29
- review: "review";
30
- running: "running";
31
- skipped: "skipped";
32
- waiting: "waiting";
33
- }>;
34
- iterations: z.ZodNumber;
35
- retriesUsed: z.ZodOptional<z.ZodNumber>;
36
- tokensUsed: z.ZodNumber;
37
- inputTokens: z.ZodOptional<z.ZodNumber>;
38
- outputTokens: z.ZodOptional<z.ZodNumber>;
39
- usageInvocationsStarted: z.ZodOptional<z.ZodNumber>;
40
- usageInvocationsObserved: z.ZodOptional<z.ZodNumber>;
41
- usageTurnsStarted: z.ZodOptional<z.ZodNumber>;
42
- usageTurnsRecorded: z.ZodOptional<z.ZodNumber>;
43
- usageInvocationEpoch: z.ZodOptional<z.ZodNumber>;
44
- startedAt: z.ZodOptional<z.ZodString>;
45
- finishedAt: z.ZodOptional<z.ZodString>;
46
- error: z.ZodOptional<z.ZodString>;
47
- sessionId: z.ZodOptional<z.ZodString>;
48
- sessionTransport: z.ZodOptional<z.ZodEnum<{
49
- "cursor-acp": "cursor-acp";
50
- "cursor-print": "cursor-print";
51
- }>>;
52
- profileId: z.ZodOptional<z.ZodString>;
53
- costUsd: z.ZodOptional<z.ZodNumber>;
54
- synthetic: z.ZodOptional<z.ZodLiteral<"continuation">>;
55
- backend: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
56
- claude: "claude";
57
- "claude-cli": "claude-cli";
58
- codex: "codex";
59
- cursor: "cursor";
60
- omp: "omp";
61
- opencode: "opencode";
62
- pi: "pi";
63
- }>, z.ZodTransform<"claude" | "codex" | "cursor" | "omp" | "opencode" | "pi", "claude" | "claude-cli" | "codex" | "cursor" | "omp" | "opencode" | "pi">>>;
64
- }, z.core.$strip>;
65
- /** Exported for `./run-index.ts`, the read-only reader of the same records. Nothing else should
66
- * parse a stored run — see `reconcileLoadedRun` for why a second parser is a correctness risk. */
67
- export declare const runRecordSchema: z.ZodObject<{
68
- id: z.ZodString;
69
- title: z.ZodString;
70
- titleSummary: z.ZodOptional<z.ZodString>;
71
- diffStat: z.ZodOptional<z.ZodObject<{
72
- adds: z.ZodNumber;
73
- dels: z.ZodNumber;
74
- files: z.ZodNumber;
75
- repointed: z.ZodOptional<z.ZodBoolean>;
76
- }, z.core.$strip>>;
77
- workflow: z.ZodString;
78
- task: z.ZodString;
79
- queuedMessages: z.ZodOptional<z.ZodArray<z.ZodObject<{
80
- id: z.ZodString;
81
- text: z.ZodString;
82
- images: z.ZodOptional<z.ZodArray<z.ZodString>>;
83
- createdAt: z.ZodString;
84
- }, z.core.$strip>>>;
85
- continuationMessage: z.ZodOptional<z.ZodObject<{
86
- id: z.ZodString;
87
- text: z.ZodString;
88
- images: z.ZodOptional<z.ZodArray<z.ZodString>>;
89
- createdAt: z.ZodString;
90
- origin: z.ZodOptional<z.ZodEnum<{
91
- human: "human";
92
- lifecycle: "lifecycle";
93
- }>>;
94
- agentInputId: z.ZodOptional<z.ZodUUID>;
95
- resumeContext: z.ZodOptional<z.ZodObject<{
96
- failure: z.ZodOptional<z.ZodObject<{
97
- stepId: z.ZodOptional<z.ZodString>;
98
- error: z.ZodString;
99
- }, z.core.$strip>>;
100
- restarted: z.ZodOptional<z.ZodLiteral<true>>;
101
- }, z.core.$strip>>;
102
- }, z.core.$strip>>;
103
- workflowResumeStepId: z.ZodOptional<z.ZodString>;
104
- invalidAsk: z.ZodOptional<z.ZodBoolean>;
105
- agentInputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
106
- conversation: z.ZodOptional<z.ZodObject<{
107
- senderRunId: z.ZodUUID;
108
- recipientRunId: z.ZodUUID;
109
- kind: z.ZodEnum<{
110
- "follow-up": "follow-up";
111
- progress: "progress";
112
- reply: "reply";
113
- request: "request";
114
- }>;
115
- requestId: z.ZodOptional<z.ZodUUID>;
116
- }, z.core.$strict>>;
117
- id: z.ZodUUID;
118
- source: z.ZodEnum<{
119
- agent: "agent";
120
- lifecycle: "lifecycle";
121
- }>;
122
- parentRunId: z.ZodUUID;
123
- text: z.ZodString;
124
- createdAt: z.ZodISODateTime;
125
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
126
- consumedAt: z.ZodOptional<z.ZodISODateTime>;
127
- awaitingRead: z.ZodOptional<z.ZodLiteral<true>>;
128
- inboxClaim: z.ZodOptional<z.ZodObject<{
129
- receiptId: z.ZodUUID;
130
- generation: z.ZodUUID;
131
- expiresAt: z.ZodISODateTime;
132
- acknowledgedAt: z.ZodOptional<z.ZodISODateTime>;
133
- memberIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
134
- }, z.core.$strict>>;
135
- purpose: z.ZodOptional<z.ZodLiteral<"completion-refusal">>;
136
- }, z.core.$strict>>>;
137
- waits: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
138
- prUrl: z.ZodString;
139
- repository: z.ZodString;
140
- prNumber: z.ZodNumber;
141
- headSha: z.ZodString;
142
- id: z.ZodUUID;
143
- source: z.ZodEnum<{
144
- agent: "agent";
145
- cezar: "cezar";
146
- }>;
147
- via: z.ZodEnum<{
148
- "ask-line": "ask-line";
149
- budget: "budget";
150
- "cez-worker-wait": "cez-worker-wait";
151
- cezar_ask: "cezar_ask";
152
- cezar_wait: "cezar_wait";
153
- cezar_wait_for_ci: "cezar_wait_for_ci";
154
- completion: "completion";
155
- "monitoring-line": "monitoring-line";
156
- "native-ask": "native-ask";
157
- "no-wait": "no-wait";
158
- "schedule-wakeup": "schedule-wakeup";
159
- }>;
160
- registeredAt: z.ZodISODateTime;
161
- phase: z.ZodEnum<{
162
- cancelled: "cancelled";
163
- delivered: "delivered";
164
- open: "open";
165
- resolved: "resolved";
166
- }>;
167
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
168
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
169
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
170
- turnId: z.ZodString;
171
- kind: z.ZodLiteral<"pr">;
172
- deadline: z.ZodISODateTime;
173
- generation: z.ZodString;
174
- timeoutSeconds: z.ZodNumber;
175
- until: z.ZodEnum<{
176
- checks: "checks";
177
- merge: "merge";
178
- }>;
179
- wakeOnConflict: z.ZodBoolean;
180
- result: z.ZodOptional<z.ZodObject<{
181
- outcome: z.ZodEnum<{
182
- cancelled: "cancelled";
183
- closed: "closed";
184
- conflicting: "conflicting";
185
- deadline: "deadline";
186
- error: "error";
187
- failed: "failed";
188
- head_changed: "head_changed";
189
- merged: "merged";
190
- no_checks: "no_checks";
191
- passed: "passed";
192
- skipped: "skipped";
193
- }>;
194
- headSha: z.ZodString;
195
- observedHeadSha: z.ZodOptional<z.ZodString>;
196
- mergeable: z.ZodOptional<z.ZodEnum<{
197
- CONFLICTING: "CONFLICTING";
198
- MERGEABLE: "MERGEABLE";
199
- UNKNOWN: "UNKNOWN";
200
- }>>;
201
- mergeStateStatus: z.ZodOptional<z.ZodString>;
202
- mergedAt: z.ZodOptional<z.ZodISODateTime>;
203
- mergeCommitSha: z.ZodOptional<z.ZodString>;
204
- observedAt: z.ZodISODateTime;
205
- checks: z.ZodArray<z.ZodObject<{
206
- name: z.ZodString;
207
- state: z.ZodString;
208
- link: z.ZodString;
209
- }, z.core.$strict>>;
210
- totalChecks: z.ZodNumber;
211
- truncated: z.ZodBoolean;
212
- diagnostic: z.ZodOptional<z.ZodString>;
213
- }, z.core.$strict>>;
214
- }, z.core.$strict>, z.ZodObject<{
215
- id: z.ZodUUID;
216
- source: z.ZodEnum<{
217
- agent: "agent";
218
- cezar: "cezar";
219
- }>;
220
- via: z.ZodEnum<{
221
- "ask-line": "ask-line";
222
- budget: "budget";
223
- "cez-worker-wait": "cez-worker-wait";
224
- cezar_ask: "cezar_ask";
225
- cezar_wait: "cezar_wait";
226
- cezar_wait_for_ci: "cezar_wait_for_ci";
227
- completion: "completion";
228
- "monitoring-line": "monitoring-line";
229
- "native-ask": "native-ask";
230
- "no-wait": "no-wait";
231
- "schedule-wakeup": "schedule-wakeup";
232
- }>;
233
- registeredAt: z.ZodISODateTime;
234
- phase: z.ZodEnum<{
235
- cancelled: "cancelled";
236
- delivered: "delivered";
237
- open: "open";
238
- resolved: "resolved";
239
- }>;
240
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
241
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
242
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
243
- turnId: z.ZodString;
244
- kind: z.ZodLiteral<"timer">;
245
- deadline: z.ZodISODateTime;
246
- seconds: z.ZodNumber;
247
- note: z.ZodOptional<z.ZodString>;
248
- }, z.core.$strict>, z.ZodObject<{
249
- id: z.ZodUUID;
250
- source: z.ZodEnum<{
251
- agent: "agent";
252
- cezar: "cezar";
253
- }>;
254
- via: z.ZodEnum<{
255
- "ask-line": "ask-line";
256
- budget: "budget";
257
- "cez-worker-wait": "cez-worker-wait";
258
- cezar_ask: "cezar_ask";
259
- cezar_wait: "cezar_wait";
260
- cezar_wait_for_ci: "cezar_wait_for_ci";
261
- completion: "completion";
262
- "monitoring-line": "monitoring-line";
263
- "native-ask": "native-ask";
264
- "no-wait": "no-wait";
265
- "schedule-wakeup": "schedule-wakeup";
266
- }>;
267
- registeredAt: z.ZodISODateTime;
268
- phase: z.ZodEnum<{
269
- cancelled: "cancelled";
270
- delivered: "delivered";
271
- open: "open";
272
- resolved: "resolved";
273
- }>;
274
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
275
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
276
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
277
- turnId: z.ZodString;
278
- kind: z.ZodLiteral<"human">;
279
- questions: z.ZodOptional<z.ZodArray<z.ZodObject<{
280
- id: z.ZodOptional<z.ZodString>;
281
- header: z.ZodString;
282
- question: z.ZodString;
283
- options: z.ZodOptional<z.ZodArray<z.ZodObject<{
284
- label: z.ZodString;
285
- description: z.ZodOptional<z.ZodString>;
286
- }, z.core.$strict>>>;
287
- multiSelect: z.ZodOptional<z.ZodBoolean>;
288
- }, z.core.$strict>>>;
289
- context: z.ZodOptional<z.ZodString>;
290
- askSeq: z.ZodOptional<z.ZodNumber>;
291
- }, z.core.$strict>, z.ZodObject<{
292
- id: z.ZodUUID;
293
- source: z.ZodEnum<{
294
- agent: "agent";
295
- cezar: "cezar";
296
- }>;
297
- via: z.ZodEnum<{
298
- "ask-line": "ask-line";
299
- budget: "budget";
300
- "cez-worker-wait": "cez-worker-wait";
301
- cezar_ask: "cezar_ask";
302
- cezar_wait: "cezar_wait";
303
- cezar_wait_for_ci: "cezar_wait_for_ci";
304
- completion: "completion";
305
- "monitoring-line": "monitoring-line";
306
- "native-ask": "native-ask";
307
- "no-wait": "no-wait";
308
- "schedule-wakeup": "schedule-wakeup";
309
- }>;
310
- registeredAt: z.ZodISODateTime;
311
- phase: z.ZodEnum<{
312
- cancelled: "cancelled";
313
- delivered: "delivered";
314
- open: "open";
315
- resolved: "resolved";
316
- }>;
317
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
318
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
319
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
320
- turnId: z.ZodString;
321
- kind: z.ZodLiteral<"worker">;
322
- deadline: z.ZodOptional<z.ZodISODateTime>;
323
- timeoutSeconds: z.ZodOptional<z.ZodNumber>;
324
- mode: z.ZodOptional<z.ZodEnum<{
325
- all: "all";
326
- any: "any";
327
- one: "one";
328
- }>>;
329
- workerIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
330
- revisions: z.ZodOptional<z.ZodArray<z.ZodObject<{
331
- workerId: z.ZodUUID;
332
- revision: z.ZodNumber;
333
- }, z.core.$strict>>>;
334
- outcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
335
- workerId: z.ZodUUID;
336
- status: z.ZodEnum<{
337
- cancelled: "cancelled";
338
- done: "done";
339
- failed: "failed";
340
- review: "review";
341
- }>;
342
- observedAt: z.ZodISODateTime;
343
- summary: z.ZodOptional<z.ZodString>;
344
- revision: z.ZodOptional<z.ZodNumber>;
345
- }, z.core.$strict>>>;
346
- requestIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
347
- requestOutcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
348
- requestId: z.ZodUUID;
349
- status: z.ZodEnum<{
350
- cancelled: "cancelled";
351
- "completed-without-reply": "completed-without-reply";
352
- destroyed: "destroyed";
353
- failed: "failed";
354
- "human-fallback": "human-fallback";
355
- replied: "replied";
356
- "replied-late": "replied-late";
357
- "sender-closed": "sender-closed";
358
- "timed-out": "timed-out";
359
- }>;
360
- observedAt: z.ZodISODateTime;
361
- replyId: z.ZodOptional<z.ZodUUID>;
362
- }, z.core.$strict>>>;
363
- result: z.ZodOptional<z.ZodObject<{
364
- reason: z.ZodEnum<{
365
- outcome: "outcome";
366
- timeout: "timeout";
367
- }>;
368
- }, z.core.$strict>>;
369
- wakeInputId: z.ZodOptional<z.ZodUUID>;
370
- }, z.core.$strict>, z.ZodObject<{
371
- id: z.ZodUUID;
372
- source: z.ZodEnum<{
373
- agent: "agent";
374
- cezar: "cezar";
375
- }>;
376
- via: z.ZodEnum<{
377
- "ask-line": "ask-line";
378
- budget: "budget";
379
- "cez-worker-wait": "cez-worker-wait";
380
- cezar_ask: "cezar_ask";
381
- cezar_wait: "cezar_wait";
382
- cezar_wait_for_ci: "cezar_wait_for_ci";
383
- completion: "completion";
384
- "monitoring-line": "monitoring-line";
385
- "native-ask": "native-ask";
386
- "no-wait": "no-wait";
387
- "schedule-wakeup": "schedule-wakeup";
388
- }>;
389
- registeredAt: z.ZodISODateTime;
390
- phase: z.ZodEnum<{
391
- cancelled: "cancelled";
392
- delivered: "delivered";
393
- open: "open";
394
- resolved: "resolved";
395
- }>;
396
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
397
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
398
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
399
- turnId: z.ZodString;
400
- kind: z.ZodLiteral<"process">;
401
- deadline: z.ZodISODateTime;
402
- timeoutSeconds: z.ZodNumber;
403
- pid: z.ZodNumber;
404
- startToken: z.ZodOptional<z.ZodString>;
405
- exitFile: z.ZodOptional<z.ZodString>;
406
- note: z.ZodOptional<z.ZodString>;
407
- result: z.ZodOptional<z.ZodObject<{
408
- outcome: z.ZodEnum<{
409
- deadline: "deadline";
410
- error: "error";
411
- exit_file: "exit_file";
412
- exited: "exited";
413
- }>;
414
- observedAt: z.ZodISODateTime;
415
- exitCode: z.ZodOptional<z.ZodNumber>;
416
- exitFileNote: z.ZodOptional<z.ZodLiteral<"not-an-exit-code">>;
417
- diagnostic: z.ZodOptional<z.ZodString>;
418
- }, z.core.$strict>>;
419
- }, z.core.$strict>], "kind">>>;
420
- lastWaits: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
421
- prUrl: z.ZodString;
422
- repository: z.ZodString;
423
- prNumber: z.ZodNumber;
424
- headSha: z.ZodString;
425
- id: z.ZodUUID;
426
- source: z.ZodEnum<{
427
- agent: "agent";
428
- cezar: "cezar";
429
- }>;
430
- via: z.ZodEnum<{
431
- "ask-line": "ask-line";
432
- budget: "budget";
433
- "cez-worker-wait": "cez-worker-wait";
434
- cezar_ask: "cezar_ask";
435
- cezar_wait: "cezar_wait";
436
- cezar_wait_for_ci: "cezar_wait_for_ci";
437
- completion: "completion";
438
- "monitoring-line": "monitoring-line";
439
- "native-ask": "native-ask";
440
- "no-wait": "no-wait";
441
- "schedule-wakeup": "schedule-wakeup";
442
- }>;
443
- registeredAt: z.ZodISODateTime;
444
- phase: z.ZodEnum<{
445
- cancelled: "cancelled";
446
- delivered: "delivered";
447
- open: "open";
448
- resolved: "resolved";
449
- }>;
450
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
451
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
452
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
453
- turnId: z.ZodString;
454
- kind: z.ZodLiteral<"pr">;
455
- deadline: z.ZodISODateTime;
456
- generation: z.ZodString;
457
- timeoutSeconds: z.ZodNumber;
458
- until: z.ZodEnum<{
459
- checks: "checks";
460
- merge: "merge";
461
- }>;
462
- wakeOnConflict: z.ZodBoolean;
463
- result: z.ZodOptional<z.ZodObject<{
464
- outcome: z.ZodEnum<{
465
- cancelled: "cancelled";
466
- closed: "closed";
467
- conflicting: "conflicting";
468
- deadline: "deadline";
469
- error: "error";
470
- failed: "failed";
471
- head_changed: "head_changed";
472
- merged: "merged";
473
- no_checks: "no_checks";
474
- passed: "passed";
475
- skipped: "skipped";
476
- }>;
477
- headSha: z.ZodString;
478
- observedHeadSha: z.ZodOptional<z.ZodString>;
479
- mergeable: z.ZodOptional<z.ZodEnum<{
480
- CONFLICTING: "CONFLICTING";
481
- MERGEABLE: "MERGEABLE";
482
- UNKNOWN: "UNKNOWN";
483
- }>>;
484
- mergeStateStatus: z.ZodOptional<z.ZodString>;
485
- mergedAt: z.ZodOptional<z.ZodISODateTime>;
486
- mergeCommitSha: z.ZodOptional<z.ZodString>;
487
- observedAt: z.ZodISODateTime;
488
- checks: z.ZodArray<z.ZodObject<{
489
- name: z.ZodString;
490
- state: z.ZodString;
491
- link: z.ZodString;
492
- }, z.core.$strict>>;
493
- totalChecks: z.ZodNumber;
494
- truncated: z.ZodBoolean;
495
- diagnostic: z.ZodOptional<z.ZodString>;
496
- }, z.core.$strict>>;
497
- }, z.core.$strict>, z.ZodObject<{
498
- id: z.ZodUUID;
499
- source: z.ZodEnum<{
500
- agent: "agent";
501
- cezar: "cezar";
502
- }>;
503
- via: z.ZodEnum<{
504
- "ask-line": "ask-line";
505
- budget: "budget";
506
- "cez-worker-wait": "cez-worker-wait";
507
- cezar_ask: "cezar_ask";
508
- cezar_wait: "cezar_wait";
509
- cezar_wait_for_ci: "cezar_wait_for_ci";
510
- completion: "completion";
511
- "monitoring-line": "monitoring-line";
512
- "native-ask": "native-ask";
513
- "no-wait": "no-wait";
514
- "schedule-wakeup": "schedule-wakeup";
515
- }>;
516
- registeredAt: z.ZodISODateTime;
517
- phase: z.ZodEnum<{
518
- cancelled: "cancelled";
519
- delivered: "delivered";
520
- open: "open";
521
- resolved: "resolved";
522
- }>;
523
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
524
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
525
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
526
- turnId: z.ZodString;
527
- kind: z.ZodLiteral<"timer">;
528
- deadline: z.ZodISODateTime;
529
- seconds: z.ZodNumber;
530
- note: z.ZodOptional<z.ZodString>;
531
- }, z.core.$strict>, z.ZodObject<{
532
- id: z.ZodUUID;
533
- source: z.ZodEnum<{
534
- agent: "agent";
535
- cezar: "cezar";
536
- }>;
537
- via: z.ZodEnum<{
538
- "ask-line": "ask-line";
539
- budget: "budget";
540
- "cez-worker-wait": "cez-worker-wait";
541
- cezar_ask: "cezar_ask";
542
- cezar_wait: "cezar_wait";
543
- cezar_wait_for_ci: "cezar_wait_for_ci";
544
- completion: "completion";
545
- "monitoring-line": "monitoring-line";
546
- "native-ask": "native-ask";
547
- "no-wait": "no-wait";
548
- "schedule-wakeup": "schedule-wakeup";
549
- }>;
550
- registeredAt: z.ZodISODateTime;
551
- phase: z.ZodEnum<{
552
- cancelled: "cancelled";
553
- delivered: "delivered";
554
- open: "open";
555
- resolved: "resolved";
556
- }>;
557
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
558
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
559
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
560
- turnId: z.ZodString;
561
- kind: z.ZodLiteral<"human">;
562
- questions: z.ZodOptional<z.ZodArray<z.ZodObject<{
563
- id: z.ZodOptional<z.ZodString>;
564
- header: z.ZodString;
565
- question: z.ZodString;
566
- options: z.ZodOptional<z.ZodArray<z.ZodObject<{
567
- label: z.ZodString;
568
- description: z.ZodOptional<z.ZodString>;
569
- }, z.core.$strict>>>;
570
- multiSelect: z.ZodOptional<z.ZodBoolean>;
571
- }, z.core.$strict>>>;
572
- context: z.ZodOptional<z.ZodString>;
573
- askSeq: z.ZodOptional<z.ZodNumber>;
574
- }, z.core.$strict>, z.ZodObject<{
575
- id: z.ZodUUID;
576
- source: z.ZodEnum<{
577
- agent: "agent";
578
- cezar: "cezar";
579
- }>;
580
- via: z.ZodEnum<{
581
- "ask-line": "ask-line";
582
- budget: "budget";
583
- "cez-worker-wait": "cez-worker-wait";
584
- cezar_ask: "cezar_ask";
585
- cezar_wait: "cezar_wait";
586
- cezar_wait_for_ci: "cezar_wait_for_ci";
587
- completion: "completion";
588
- "monitoring-line": "monitoring-line";
589
- "native-ask": "native-ask";
590
- "no-wait": "no-wait";
591
- "schedule-wakeup": "schedule-wakeup";
592
- }>;
593
- registeredAt: z.ZodISODateTime;
594
- phase: z.ZodEnum<{
595
- cancelled: "cancelled";
596
- delivered: "delivered";
597
- open: "open";
598
- resolved: "resolved";
599
- }>;
600
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
601
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
602
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
603
- turnId: z.ZodString;
604
- kind: z.ZodLiteral<"worker">;
605
- deadline: z.ZodOptional<z.ZodISODateTime>;
606
- timeoutSeconds: z.ZodOptional<z.ZodNumber>;
607
- mode: z.ZodOptional<z.ZodEnum<{
608
- all: "all";
609
- any: "any";
610
- one: "one";
611
- }>>;
612
- workerIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
613
- revisions: z.ZodOptional<z.ZodArray<z.ZodObject<{
614
- workerId: z.ZodUUID;
615
- revision: z.ZodNumber;
616
- }, z.core.$strict>>>;
617
- outcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
618
- workerId: z.ZodUUID;
619
- status: z.ZodEnum<{
620
- cancelled: "cancelled";
621
- done: "done";
622
- failed: "failed";
623
- review: "review";
624
- }>;
625
- observedAt: z.ZodISODateTime;
626
- summary: z.ZodOptional<z.ZodString>;
627
- revision: z.ZodOptional<z.ZodNumber>;
628
- }, z.core.$strict>>>;
629
- requestIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
630
- requestOutcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
631
- requestId: z.ZodUUID;
632
- status: z.ZodEnum<{
633
- cancelled: "cancelled";
634
- "completed-without-reply": "completed-without-reply";
635
- destroyed: "destroyed";
636
- failed: "failed";
637
- "human-fallback": "human-fallback";
638
- replied: "replied";
639
- "replied-late": "replied-late";
640
- "sender-closed": "sender-closed";
641
- "timed-out": "timed-out";
642
- }>;
643
- observedAt: z.ZodISODateTime;
644
- replyId: z.ZodOptional<z.ZodUUID>;
645
- }, z.core.$strict>>>;
646
- result: z.ZodOptional<z.ZodObject<{
647
- reason: z.ZodEnum<{
648
- outcome: "outcome";
649
- timeout: "timeout";
650
- }>;
651
- }, z.core.$strict>>;
652
- wakeInputId: z.ZodOptional<z.ZodUUID>;
653
- }, z.core.$strict>, z.ZodObject<{
654
- id: z.ZodUUID;
655
- source: z.ZodEnum<{
656
- agent: "agent";
657
- cezar: "cezar";
658
- }>;
659
- via: z.ZodEnum<{
660
- "ask-line": "ask-line";
661
- budget: "budget";
662
- "cez-worker-wait": "cez-worker-wait";
663
- cezar_ask: "cezar_ask";
664
- cezar_wait: "cezar_wait";
665
- cezar_wait_for_ci: "cezar_wait_for_ci";
666
- completion: "completion";
667
- "monitoring-line": "monitoring-line";
668
- "native-ask": "native-ask";
669
- "no-wait": "no-wait";
670
- "schedule-wakeup": "schedule-wakeup";
671
- }>;
672
- registeredAt: z.ZodISODateTime;
673
- phase: z.ZodEnum<{
674
- cancelled: "cancelled";
675
- delivered: "delivered";
676
- open: "open";
677
- resolved: "resolved";
678
- }>;
679
- resolvedAt: z.ZodOptional<z.ZodISODateTime>;
680
- deliveredAt: z.ZodOptional<z.ZodISODateTime>;
681
- cancelledAt: z.ZodOptional<z.ZodISODateTime>;
682
- turnId: z.ZodString;
683
- kind: z.ZodLiteral<"process">;
684
- deadline: z.ZodISODateTime;
685
- timeoutSeconds: z.ZodNumber;
686
- pid: z.ZodNumber;
687
- startToken: z.ZodOptional<z.ZodString>;
688
- exitFile: z.ZodOptional<z.ZodString>;
689
- note: z.ZodOptional<z.ZodString>;
690
- result: z.ZodOptional<z.ZodObject<{
691
- outcome: z.ZodEnum<{
692
- deadline: "deadline";
693
- error: "error";
694
- exit_file: "exit_file";
695
- exited: "exited";
696
- }>;
697
- observedAt: z.ZodISODateTime;
698
- exitCode: z.ZodOptional<z.ZodNumber>;
699
- exitFileNote: z.ZodOptional<z.ZodLiteral<"not-an-exit-code">>;
700
- diagnostic: z.ZodOptional<z.ZodString>;
701
- }, z.core.$strict>>;
702
- }, z.core.$strict>], "kind">>>;
703
- previewServers: z.ZodOptional<z.ZodArray<z.ZodObject<{
704
- port: z.ZodNumber;
705
- command: z.ZodString;
706
- cwd: z.ZodOptional<z.ZodString>;
707
- label: z.ZodString;
708
- path: z.ZodOptional<z.ZodString>;
709
- registeredAt: z.ZodISODateTime;
710
- answeredAtRegistration: z.ZodBoolean;
711
- }, z.core.$strip>>>;
712
- taskImages: z.ZodOptional<z.ZodArray<z.ZodString>>;
713
- model: z.ZodOptional<z.ZodString>;
714
- effort: z.ZodOptional<z.ZodString>;
715
- modelIdentity: z.ZodOptional<z.ZodString>;
716
- agentProfile: z.ZodOptional<z.ZodString>;
717
- systemPrompt: z.ZodOptional<z.ZodString>;
718
- generateFollowups: z.ZodOptional<z.ZodBoolean>;
719
- autonomous: z.ZodOptional<z.ZodBoolean>;
720
- archiveWhenDone: z.ZodOptional<z.ZodBoolean>;
721
- autoMergePr: z.ZodOptional<z.ZodBoolean>;
722
- completionAction: z.ZodOptional<z.ZodObject<{
723
- id: z.ZodString;
724
- phase: z.ZodEnum<{
725
- blocked: "blocked";
726
- complete: "complete";
727
- pending: "pending";
728
- }>;
729
- message: z.ZodOptional<z.ZodString>;
730
- }, z.core.$strip>>;
731
- archiveBlocker: z.ZodOptional<z.ZodObject<{
732
- message: z.ZodString;
733
- runId: z.ZodOptional<z.ZodString>;
734
- pullRequestUrl: z.ZodOptional<z.ZodString>;
735
- }, z.core.$strip>>;
736
- status: z.ZodEnum<{
737
- cancelled: "cancelled";
738
- done: "done";
739
- failed: "failed";
740
- queued: "queued";
741
- review: "review";
742
- running: "running";
743
- waiting: "waiting";
744
- }>;
745
- createdAt: z.ZodString;
746
- startedAt: z.ZodOptional<z.ZodString>;
747
- finishedAt: z.ZodOptional<z.ZodString>;
748
- tokensUsed: z.ZodNumber;
749
- inputTokens: z.ZodOptional<z.ZodNumber>;
750
- outputTokens: z.ZodOptional<z.ZodNumber>;
751
- costUsd: z.ZodOptional<z.ZodNumber>;
752
- pullRequestUrl: z.ZodOptional<z.ZodString>;
753
- referencedPullRequestUrl: z.ZodOptional<z.ZodString>;
754
- prNumber: z.ZodOptional<z.ZodNumber>;
755
- issueNumber: z.ZodOptional<z.ZodNumber>;
756
- referencedIssueNumberSeeded: z.ZodOptional<z.ZodBoolean>;
757
- titleOrigin: z.ZodOptional<z.ZodEnum<{
758
- auto: "auto";
759
- marker: "marker";
760
- user: "user";
761
- }>>;
762
- markerRefs: z.ZodOptional<z.ZodObject<{
763
- pr: z.ZodOptional<z.ZodNumber>;
764
- issue: z.ZodOptional<z.ZodNumber>;
765
- }, z.core.$strip>>;
766
- referencedPrCandidates: z.ZodOptional<z.ZodArray<z.ZodString>>;
767
- referencedIssueUrl: z.ZodOptional<z.ZodString>;
768
- referencedIssueCandidates: z.ZodOptional<z.ZodArray<z.ZodString>>;
769
- worktree: z.ZodOptional<z.ZodLiteral<false>>;
770
- worktreePath: z.ZodOptional<z.ZodString>;
771
- branch: z.ZodOptional<z.ZodString>;
772
- baseBranch: z.ZodOptional<z.ZodString>;
773
- worktreeReclaimedAt: z.ZodOptional<z.ZodString>;
774
- groupId: z.ZodOptional<z.ZodString>;
775
- variant: z.ZodOptional<z.ZodString>;
776
- clientRequestId: z.ZodOptional<z.ZodString>;
777
- clientRequestHash: z.ZodOptional<z.ZodString>;
778
- peakRssBytes: z.ZodOptional<z.ZodNumber>;
779
- peakProcCount: z.ZodOptional<z.ZodNumber>;
780
- archivedAt: z.ZodOptional<z.ZodString>;
781
- autoArchive: z.ZodOptional<z.ZodObject<{
782
- reason: z.ZodLiteral<"pull-requests-merged">;
783
- archivedAt: z.ZodString;
784
- fingerprint: z.ZodString;
785
- pullRequests: z.ZodArray<z.ZodObject<{
786
- owner: z.ZodString;
787
- repo: z.ZodString;
788
- number: z.ZodNumber;
789
- mergedAt: z.ZodString;
790
- }, z.core.$strip>>;
791
- }, z.core.$strip>>;
792
- manualUnarchivedAt: z.ZodOptional<z.ZodString>;
793
- pinned: z.ZodOptional<z.ZodBoolean>;
794
- pinnedAt: z.ZodOptional<z.ZodString>;
795
- seenAt: z.ZodOptional<z.ZodString>;
796
- currentStepId: z.ZodOptional<z.ZodString>;
797
- error: z.ZodOptional<z.ZodString>;
798
- delegation: z.ZodCatch<z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
799
- role: z.ZodLiteral<"root">;
800
- conversation: z.ZodOptional<z.ZodObject<{
801
- messages: z.ZodArray<z.ZodObject<{
802
- senderRunId: z.ZodUUID;
803
- recipientRunId: z.ZodUUID;
804
- kind: z.ZodEnum<{
805
- "follow-up": "follow-up";
806
- progress: "progress";
807
- reply: "reply";
808
- request: "request";
809
- }>;
810
- requestId: z.ZodOptional<z.ZodUUID>;
811
- id: z.ZodUUID;
812
- text: z.ZodString;
813
- createdAt: z.ZodISODateTime;
814
- deadline: z.ZodOptional<z.ZodISODateTime>;
815
- requestHash: z.ZodString;
816
- state: z.ZodEnum<{
817
- accepted: "accepted";
818
- "continuation-required": "continuation-required";
819
- destroyed: "destroyed";
820
- late: "late";
821
- }>;
822
- resumed: z.ZodOptional<z.ZodLiteral<true>>;
823
- instruction: z.ZodOptional<z.ZodString>;
824
- question: z.ZodOptional<z.ZodObject<{
825
- context: z.ZodOptional<z.ZodString>;
826
- questions: z.ZodArray<z.ZodObject<{
827
- id: z.ZodOptional<z.ZodString>;
828
- header: z.ZodString;
829
- question: z.ZodString;
830
- options: z.ZodOptional<z.ZodArray<z.ZodObject<{
831
- label: z.ZodString;
832
- description: z.ZodOptional<z.ZodString>;
833
- }, z.core.$strict>>>;
834
- multiSelect: z.ZodOptional<z.ZodBoolean>;
835
- }, z.core.$strict>>;
836
- }, z.core.$strict>>;
837
- }, z.core.$strict>>;
838
- outcomes: z.ZodArray<z.ZodObject<{
839
- requestId: z.ZodUUID;
840
- status: z.ZodEnum<{
841
- cancelled: "cancelled";
842
- "completed-without-reply": "completed-without-reply";
843
- destroyed: "destroyed";
844
- failed: "failed";
845
- "human-fallback": "human-fallback";
846
- replied: "replied";
847
- "replied-late": "replied-late";
848
- "sender-closed": "sender-closed";
849
- "timed-out": "timed-out";
850
- }>;
851
- observedAt: z.ZodISODateTime;
852
- replyId: z.ZodOptional<z.ZodUUID>;
853
- }, z.core.$strict>>;
854
- }, z.core.$strict>>;
855
- permissions: z.ZodArray<z.ZodEnum<{
856
- destroy: "destroy";
857
- diff: "diff";
858
- inspect: "inspect";
859
- spawn: "spawn";
860
- steer: "steer";
861
- stop: "stop";
862
- wait: "wait";
863
- }>>;
864
- receipts: z.ZodArray<z.ZodObject<{
865
- requestId: z.ZodUUID;
866
- workerId: z.ZodUUID;
867
- requestHash: z.ZodString;
868
- deletion: z.ZodOptional<z.ZodObject<{
869
- phase: z.ZodEnum<{
870
- complete: "complete";
871
- pending: "pending";
872
- }>;
873
- revision: z.ZodNumber;
874
- resourceId: z.ZodUUID;
875
- generation: z.ZodUUID;
876
- }, z.core.$strict>>;
877
- }, z.core.$strict>>;
878
- wait: z.ZodOptional<z.ZodObject<{
879
- id: z.ZodUUID;
880
- workerIds: z.ZodArray<z.ZodUUID>;
881
- requestIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
882
- requestOutcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
883
- requestId: z.ZodUUID;
884
- status: z.ZodEnum<{
885
- cancelled: "cancelled";
886
- "completed-without-reply": "completed-without-reply";
887
- destroyed: "destroyed";
888
- failed: "failed";
889
- "human-fallback": "human-fallback";
890
- replied: "replied";
891
- "replied-late": "replied-late";
892
- "sender-closed": "sender-closed";
893
- "timed-out": "timed-out";
894
- }>;
895
- observedAt: z.ZodISODateTime;
896
- replyId: z.ZodOptional<z.ZodUUID>;
897
- }, z.core.$strict>>>;
898
- deadline: z.ZodISODateTime;
899
- mode: z.ZodOptional<z.ZodEnum<{
900
- all: "all";
901
- any: "any";
902
- one: "one";
903
- }>>;
904
- revisions: z.ZodOptional<z.ZodArray<z.ZodObject<{
905
- workerId: z.ZodUUID;
906
- revision: z.ZodNumber;
907
- }, z.core.$strict>>>;
908
- reason: z.ZodOptional<z.ZodEnum<{
909
- cancelled: "cancelled";
910
- message: "message";
911
- outcome: "outcome";
912
- timeout: "timeout";
913
- }>>;
914
- phase: z.ZodEnum<{
915
- parked: "parked";
916
- registered: "registered";
917
- "wake-pending": "wake-pending";
918
- }>;
919
- outcomes: z.ZodArray<z.ZodObject<{
920
- workerId: z.ZodUUID;
921
- status: z.ZodEnum<{
922
- cancelled: "cancelled";
923
- done: "done";
924
- failed: "failed";
925
- review: "review";
926
- }>;
927
- observedAt: z.ZodISODateTime;
928
- summary: z.ZodOptional<z.ZodString>;
929
- revision: z.ZodOptional<z.ZodNumber>;
930
- }, z.core.$strict>>;
931
- wakeId: z.ZodOptional<z.ZodUUID>;
932
- }, z.core.$strict>>;
933
- lastWait: z.ZodOptional<z.ZodObject<{
934
- id: z.ZodUUID;
935
- workerIds: z.ZodArray<z.ZodUUID>;
936
- requestIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
937
- requestOutcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
938
- requestId: z.ZodUUID;
939
- status: z.ZodEnum<{
940
- cancelled: "cancelled";
941
- "completed-without-reply": "completed-without-reply";
942
- destroyed: "destroyed";
943
- failed: "failed";
944
- "human-fallback": "human-fallback";
945
- replied: "replied";
946
- "replied-late": "replied-late";
947
- "sender-closed": "sender-closed";
948
- "timed-out": "timed-out";
949
- }>;
950
- observedAt: z.ZodISODateTime;
951
- replyId: z.ZodOptional<z.ZodUUID>;
952
- }, z.core.$strict>>>;
953
- deadline: z.ZodISODateTime;
954
- mode: z.ZodOptional<z.ZodEnum<{
955
- all: "all";
956
- any: "any";
957
- one: "one";
958
- }>>;
959
- revisions: z.ZodOptional<z.ZodArray<z.ZodObject<{
960
- workerId: z.ZodUUID;
961
- revision: z.ZodNumber;
962
- }, z.core.$strict>>>;
963
- reason: z.ZodOptional<z.ZodEnum<{
964
- cancelled: "cancelled";
965
- message: "message";
966
- outcome: "outcome";
967
- timeout: "timeout";
968
- }>>;
969
- phase: z.ZodEnum<{
970
- parked: "parked";
971
- registered: "registered";
972
- "wake-pending": "wake-pending";
973
- }>;
974
- outcomes: z.ZodArray<z.ZodObject<{
975
- workerId: z.ZodUUID;
976
- status: z.ZodEnum<{
977
- cancelled: "cancelled";
978
- done: "done";
979
- failed: "failed";
980
- review: "review";
981
- }>;
982
- observedAt: z.ZodISODateTime;
983
- summary: z.ZodOptional<z.ZodString>;
984
- revision: z.ZodOptional<z.ZodNumber>;
985
- }, z.core.$strict>>;
986
- wakeId: z.ZodOptional<z.ZodUUID>;
987
- }, z.core.$strict>>;
988
- results: z.ZodOptional<z.ZodArray<z.ZodObject<{
989
- workerId: z.ZodUUID;
990
- revision: z.ZodNumber;
991
- snapshotId: z.ZodUUID;
992
- observedAt: z.ZodISODateTime;
993
- lastExecutionOutcome: z.ZodEnum<{
994
- cancelled: "cancelled";
995
- completed: "completed";
996
- failed: "failed";
997
- "review-ready": "review-ready";
998
- running: "running";
999
- }>;
1000
- previous: z.ZodOptional<z.ZodObject<{
1001
- revision: z.ZodNumber;
1002
- observedAt: z.ZodISODateTime;
1003
- lastExecutionOutcome: z.ZodEnum<{
1004
- cancelled: "cancelled";
1005
- completed: "completed";
1006
- failed: "failed";
1007
- "review-ready": "review-ready";
1008
- running: "running";
1009
- }>;
1010
- }, z.core.$strict>>;
1011
- }, z.core.$strict>>>;
1012
- finishRequestedAt: z.ZodOptional<z.ZodISODateTime>;
1013
- historyDeletion: z.ZodOptional<z.ZodLiteral<"pending">>;
1014
- completion: z.ZodOptional<z.ZodObject<{
1015
- phase: z.ZodEnum<{
1016
- attention: "attention";
1017
- waiting: "waiting";
1018
- }>;
1019
- waitId: z.ZodOptional<z.ZodUUID>;
1020
- }, z.core.$strict>>;
1021
- }, z.core.$strict>, z.ZodObject<{
1022
- role: z.ZodLiteral<"worker">;
1023
- wait: z.ZodOptional<z.ZodObject<{
1024
- id: z.ZodUUID;
1025
- workerIds: z.ZodArray<z.ZodUUID>;
1026
- requestIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
1027
- requestOutcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1028
- requestId: z.ZodUUID;
1029
- status: z.ZodEnum<{
1030
- cancelled: "cancelled";
1031
- "completed-without-reply": "completed-without-reply";
1032
- destroyed: "destroyed";
1033
- failed: "failed";
1034
- "human-fallback": "human-fallback";
1035
- replied: "replied";
1036
- "replied-late": "replied-late";
1037
- "sender-closed": "sender-closed";
1038
- "timed-out": "timed-out";
1039
- }>;
1040
- observedAt: z.ZodISODateTime;
1041
- replyId: z.ZodOptional<z.ZodUUID>;
1042
- }, z.core.$strict>>>;
1043
- deadline: z.ZodISODateTime;
1044
- mode: z.ZodOptional<z.ZodEnum<{
1045
- all: "all";
1046
- any: "any";
1047
- one: "one";
1048
- }>>;
1049
- revisions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1050
- workerId: z.ZodUUID;
1051
- revision: z.ZodNumber;
1052
- }, z.core.$strict>>>;
1053
- reason: z.ZodOptional<z.ZodEnum<{
1054
- cancelled: "cancelled";
1055
- message: "message";
1056
- outcome: "outcome";
1057
- timeout: "timeout";
1058
- }>>;
1059
- phase: z.ZodEnum<{
1060
- parked: "parked";
1061
- registered: "registered";
1062
- "wake-pending": "wake-pending";
1063
- }>;
1064
- outcomes: z.ZodArray<z.ZodObject<{
1065
- workerId: z.ZodUUID;
1066
- status: z.ZodEnum<{
1067
- cancelled: "cancelled";
1068
- done: "done";
1069
- failed: "failed";
1070
- review: "review";
1071
- }>;
1072
- observedAt: z.ZodISODateTime;
1073
- summary: z.ZodOptional<z.ZodString>;
1074
- revision: z.ZodOptional<z.ZodNumber>;
1075
- }, z.core.$strict>>;
1076
- wakeId: z.ZodOptional<z.ZodUUID>;
1077
- }, z.core.$strict>>;
1078
- lastWait: z.ZodOptional<z.ZodObject<{
1079
- id: z.ZodUUID;
1080
- workerIds: z.ZodArray<z.ZodUUID>;
1081
- requestIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
1082
- requestOutcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1083
- requestId: z.ZodUUID;
1084
- status: z.ZodEnum<{
1085
- cancelled: "cancelled";
1086
- "completed-without-reply": "completed-without-reply";
1087
- destroyed: "destroyed";
1088
- failed: "failed";
1089
- "human-fallback": "human-fallback";
1090
- replied: "replied";
1091
- "replied-late": "replied-late";
1092
- "sender-closed": "sender-closed";
1093
- "timed-out": "timed-out";
1094
- }>;
1095
- observedAt: z.ZodISODateTime;
1096
- replyId: z.ZodOptional<z.ZodUUID>;
1097
- }, z.core.$strict>>>;
1098
- deadline: z.ZodISODateTime;
1099
- mode: z.ZodOptional<z.ZodEnum<{
1100
- all: "all";
1101
- any: "any";
1102
- one: "one";
1103
- }>>;
1104
- revisions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1105
- workerId: z.ZodUUID;
1106
- revision: z.ZodNumber;
1107
- }, z.core.$strict>>>;
1108
- reason: z.ZodOptional<z.ZodEnum<{
1109
- cancelled: "cancelled";
1110
- message: "message";
1111
- outcome: "outcome";
1112
- timeout: "timeout";
1113
- }>>;
1114
- phase: z.ZodEnum<{
1115
- parked: "parked";
1116
- registered: "registered";
1117
- "wake-pending": "wake-pending";
1118
- }>;
1119
- outcomes: z.ZodArray<z.ZodObject<{
1120
- workerId: z.ZodUUID;
1121
- status: z.ZodEnum<{
1122
- cancelled: "cancelled";
1123
- done: "done";
1124
- failed: "failed";
1125
- review: "review";
1126
- }>;
1127
- observedAt: z.ZodISODateTime;
1128
- summary: z.ZodOptional<z.ZodString>;
1129
- revision: z.ZodOptional<z.ZodNumber>;
1130
- }, z.core.$strict>>;
1131
- wakeId: z.ZodOptional<z.ZodUUID>;
1132
- }, z.core.$strict>>;
1133
- permissions: z.ZodArray<z.ZodEnum<{
1134
- destroy: "destroy";
1135
- diff: "diff";
1136
- inspect: "inspect";
1137
- spawn: "spawn";
1138
- steer: "steer";
1139
- stop: "stop";
1140
- wait: "wait";
1141
- }>>;
1142
- parentRunId: z.ZodUUID;
1143
- workspace: z.ZodObject<{
1144
- ownerRunId: z.ZodUUID;
1145
- resourceId: z.ZodUUID;
1146
- kind: z.ZodLiteral<"owned-isolated">;
1147
- path: z.ZodString;
1148
- branch: z.ZodString;
1149
- baselineSha: z.ZodString;
1150
- }, z.core.$strict>;
1151
- destroy: z.ZodOptional<z.ZodObject<{
1152
- requestedAt: z.ZodISODateTime;
1153
- phase: z.ZodEnum<{
1154
- cleaning: "cleaning";
1155
- complete: "complete";
1156
- incomplete: "incomplete";
1157
- requested: "requested";
1158
- terminating: "terminating";
1159
- }>;
1160
- remaining: z.ZodArray<z.ZodEnum<{
1161
- branch: "branch";
1162
- process: "process";
1163
- worktree: "worktree";
1164
- }>>;
1165
- error: z.ZodOptional<z.ZodString>;
1166
- }, z.core.$strict>>;
1167
- context: z.ZodOptional<z.ZodObject<{
1168
- text: z.ZodOptional<z.ZodString>;
1169
- inputs: z.ZodArray<z.ZodObject<{
1170
- source: z.ZodDiscriminatedUnion<[z.ZodObject<{
1171
- kind: z.ZodLiteral<"baseline-file">;
1172
- path: z.ZodString;
1173
- }, z.core.$strict>, z.ZodObject<{
1174
- kind: z.ZodLiteral<"parent-attachment">;
1175
- id: z.ZodString;
1176
- }, z.core.$strict>, z.ZodObject<{
1177
- kind: z.ZodLiteral<"parent-file">;
1178
- path: z.ZodString;
1179
- }, z.core.$strict>], "kind">;
1180
- path: z.ZodString;
1181
- sha256: z.ZodString;
1182
- bytes: z.ZodNumber;
1183
- }, z.core.$strict>>;
1184
- }, z.core.$strict>>;
1185
- executionRevision: z.ZodOptional<z.ZodNumber>;
1186
- executionStartSeq: z.ZodOptional<z.ZodNumber>;
1187
- }, z.core.$strict>, z.ZodObject<{
1188
- role: z.ZodLiteral<"invalid">;
1189
- }, z.core.$strict>], "role">>>;
1190
- lastWaitsError: z.ZodCatch<z.ZodOptional<z.ZodString>>;
1191
- automaticWakes: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
1192
- waitDeliveryFailures: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
1193
- runner: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
1194
- claude: "claude";
1195
- "claude-cli": "claude-cli";
1196
- codex: "codex";
1197
- cursor: "cursor";
1198
- omp: "omp";
1199
- opencode: "opencode";
1200
- pi: "pi";
1201
- }>, z.ZodTransform<"claude" | "codex" | "cursor" | "omp" | "opencode" | "pi", "claude" | "claude-cli" | "codex" | "cursor" | "omp" | "opencode" | "pi">>>;
1202
- notify: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
1203
- webhook: z.ZodCatch<z.ZodOptional<z.ZodObject<{
1204
- lastDeliveredAt: z.ZodOptional<z.ZodString>;
1205
- lastError: z.ZodOptional<z.ZodString>;
1206
- lastErrorWebhookId: z.ZodOptional<z.ZodString>;
1207
- }, z.core.$strip>>>;
1208
- destroyRetry: z.ZodCatch<z.ZodOptional<z.ZodObject<{
1209
- attempts: z.ZodNumber;
1210
- nextAt: z.ZodISODateTime;
1211
- needsAttention: z.ZodOptional<z.ZodLiteral<true>>;
1212
- }, z.core.$strict>>>;
1213
- stopping: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
1214
- hasPendingPermission: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
1215
- autoResumeAt: z.ZodCatch<z.ZodOptional<z.ZodString>>;
1216
- autoResumeAttempts: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
1217
- pullRequests: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodObject<{
1218
- number: z.ZodNumber;
1219
- url: z.ZodOptional<z.ZodString>;
1220
- source: z.ZodEnum<{
1221
- created: "created";
1222
- declared: "declared";
1223
- }>;
1224
- }, z.core.$strip>>>>;
1225
- worktreeSetup: z.ZodCatch<z.ZodOptional<z.ZodObject<{
1226
- status: z.ZodEnum<{
1227
- done: "done";
1228
- failed: "failed";
1229
- running: "running";
1230
- }>;
1231
- startedAt: z.ZodString;
1232
- finishedAt: z.ZodOptional<z.ZodString>;
1233
- durationMs: z.ZodOptional<z.ZodNumber>;
1234
- error: z.ZodOptional<z.ZodString>;
1235
- }, z.core.$strip>>>;
1236
- archived: z.ZodDefault<z.ZodBoolean>;
1237
- workflowDef: z.ZodCatch<z.ZodOptional<z.ZodObject<{
1238
- name: z.ZodString;
1239
- description: z.ZodOptional<z.ZodString>;
1240
- steps: z.ZodArray<z.ZodObject<{
1241
- id: z.ZodString;
1242
- name: z.ZodOptional<z.ZodString>;
1243
- prompt: z.ZodOptional<z.ZodString>;
1244
- skill: z.ZodOptional<z.ZodString>;
1245
- model: z.ZodOptional<z.ZodString>;
1246
- effort: z.ZodOptional<z.ZodString>;
1247
- timeoutMs: z.ZodOptional<z.ZodNumber>;
1248
- runner: z.ZodOptional<z.ZodEnum<{
1249
- claude: "claude";
1250
- codex: "codex";
1251
- cursor: "cursor";
1252
- omp: "omp";
1253
- opencode: "opencode";
1254
- pi: "pi";
1255
- }>>;
1256
- agentProfile: z.ZodOptional<z.ZodString>;
1257
- allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1258
- bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
1259
- command: z.ZodOptional<z.ZodString>;
1260
- onFail: z.ZodOptional<z.ZodObject<{
1261
- retry: z.ZodString;
1262
- max: z.ZodDefault<z.ZodNumber>;
1263
- }, z.core.$strip>>;
1264
- }, z.core.$strip>>;
1265
- source: z.ZodEnum<{
1266
- "built-in": "built-in";
1267
- file: "file";
1268
- }>;
1269
- path: z.ZodOptional<z.ZodString>;
1270
- }, z.core.$strip>>>;
1271
- steps: z.ZodArray<z.ZodObject<{
1272
- id: z.ZodString;
1273
- name: z.ZodString;
1274
- kind: z.ZodEnum<{
1275
- agent: "agent";
1276
- check: "check";
1277
- }>;
1278
- status: z.ZodEnum<{
1279
- cancelled: "cancelled";
1280
- done: "done";
1281
- failed: "failed";
1282
- pending: "pending";
1283
- review: "review";
1284
- running: "running";
1285
- skipped: "skipped";
1286
- waiting: "waiting";
1287
- }>;
1288
- iterations: z.ZodNumber;
1289
- retriesUsed: z.ZodOptional<z.ZodNumber>;
1290
- tokensUsed: z.ZodNumber;
1291
- inputTokens: z.ZodOptional<z.ZodNumber>;
1292
- outputTokens: z.ZodOptional<z.ZodNumber>;
1293
- usageInvocationsStarted: z.ZodOptional<z.ZodNumber>;
1294
- usageInvocationsObserved: z.ZodOptional<z.ZodNumber>;
1295
- usageTurnsStarted: z.ZodOptional<z.ZodNumber>;
1296
- usageTurnsRecorded: z.ZodOptional<z.ZodNumber>;
1297
- usageInvocationEpoch: z.ZodOptional<z.ZodNumber>;
1298
- startedAt: z.ZodOptional<z.ZodString>;
1299
- finishedAt: z.ZodOptional<z.ZodString>;
1300
- error: z.ZodOptional<z.ZodString>;
1301
- sessionId: z.ZodOptional<z.ZodString>;
1302
- sessionTransport: z.ZodOptional<z.ZodEnum<{
1303
- "cursor-acp": "cursor-acp";
1304
- "cursor-print": "cursor-print";
1305
- }>>;
1306
- profileId: z.ZodOptional<z.ZodString>;
1307
- costUsd: z.ZodOptional<z.ZodNumber>;
1308
- synthetic: z.ZodOptional<z.ZodLiteral<"continuation">>;
1309
- backend: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
1310
- claude: "claude";
1311
- "claude-cli": "claude-cli";
1312
- codex: "codex";
1313
- cursor: "cursor";
1314
- omp: "omp";
1315
- opencode: "opencode";
1316
- pi: "pi";
1317
- }>, z.ZodTransform<"claude" | "codex" | "cursor" | "omp" | "opencode" | "pi", "claude" | "claude-cli" | "codex" | "cursor" | "omp" | "opencode" | "pi">>>;
1318
- }, z.core.$strip>>;
1319
- automation: z.ZodOptional<z.ZodObject<{
1320
- automationId: z.ZodString;
1321
- receiptId: z.ZodString;
1322
- event: z.ZodString;
1323
- automationRevision: z.ZodNumber;
1324
- githubUrl: z.ZodString;
1325
- }, z.core.$strip>>;
1326
- automationTrigger: z.ZodOptional<z.ZodObject<{
1327
- automationId: z.ZodString;
1328
- receiptId: z.ZodString;
1329
- trigger: z.ZodEnum<{
1330
- "catch-up": "catch-up";
1331
- manual: "manual";
1332
- schedule: "schedule";
1333
- }>;
1334
- occurrenceAt: z.ZodString;
1335
- automationRevision: z.ZodNumber;
1336
- }, z.core.$strip>>;
1337
- handoffRecords: z.ZodCatch<z.ZodOptional<z.ZodObject<{
1338
- autosave: z.ZodArray<z.ZodObject<{
1339
- at: z.ZodString;
1340
- note: z.ZodString;
1341
- periodic: z.ZodOptional<z.ZodObject<{
1342
- branch: z.ZodNullable<z.ZodString>;
1343
- count: z.ZodNumber;
1344
- first: z.ZodNullable<z.ZodString>;
1345
- latest: z.ZodNullable<z.ZodString>;
1346
- }, z.core.$strip>>;
1347
- }, z.core.$strip>>;
1348
- }, z.core.$strip>>>;
1349
- }, z.core.$strip>;
1350
- /** A legacy `CiWait` as a wait entry. Its wake input's id was the wait's own (`wakeId`, which
1351
- * `run.ts` set to the wait id), so the entry keeps that id and delivery still finds the input. */
1352
- export declare function ciWaitEntry(wait: CiWait): PrWaitEntry;
1353
- /**
1354
- * A legacy agent `delegation.wait` as a worker wait entry (store schema 6, hearsay-tools/cezarion#1235),
1355
- * judged from the wait alone: what became of its wake input is `upgradeLegacyWaits`' to apply.
1356
- * `registered`/`parked` → open; `wake-pending` → resolved with its `outcome`/`timeout` reason, or
1357
- * cancelled. Undefined for the `message` stand-in, which was never an agent's wait: a message no
1358
- * longer resolves a wait, and its input still wakes the run on its own.
1359
- *
1360
- * Deterministic, never read from the clock: a row is upgraded on every read until open rewrites
1361
- * it, and two reads must agree. A `WorkerWait` kept no registration time, so `timeoutSeconds` is
1362
- * the 600 default, `registeredAt` is 600 s before the original deadline (kept as it was), and the
1363
- * settled stamps come from the wait itself: `resolvedAt` is the latest observation it holds, else
1364
- * its deadline, and `cancelledAt` is its deadline. `now` is only the fallback for a deadline that
1365
- * does not read, which the wait schema never admits.
1366
- */
1367
- export declare function workerWaitEntry(wait: WorkerWait, now: string): WorkerWaitEntry | undefined;
1368
- /** Whether a record is a root still parked on its workers: an open or resolved worker wait in the
1369
- * list. Such a root has its pending human question re-read from the transcript before a manager
1370
- * parks it. Every stored `delegation.wait`, the completion gate's included, is read into the list
1371
- * on open (store schema 7, hearsay-tools/cezarion#1301), so the list is the only place to look. */
1372
- export declare function holdsWorkerWait(run: Pick<RunRecord, 'delegation' | 'waits'>): boolean;
1373
- export declare function upgradeLegacyWaits(row: Record<string, unknown>): void;
1374
- /** Read legacy wait fields into the wait list and salvage per entry, identically for live stores
1375
- * and the read-only workspace index. */
1376
- export declare function parseRunRecords(raw: unknown): z.ZodSafeParseResult<{
1377
- id: string;
1378
- title: string;
1379
- titleSummary?: string | undefined;
1380
- diffStat?: {
1381
- adds: number;
1382
- dels: number;
1383
- files: number;
1384
- repointed?: boolean | undefined;
1385
- } | undefined;
1386
- workflow: string;
1387
- task: string;
1388
- queuedMessages?: {
1389
- id: string;
1390
- text: string;
1391
- images?: string[] | undefined;
1392
- createdAt: string;
1393
- }[] | undefined;
1394
- continuationMessage?: {
1395
- id: string;
1396
- text: string;
1397
- images?: string[] | undefined;
1398
- createdAt: string;
1399
- origin?: "human" | "lifecycle" | undefined;
1400
- agentInputId?: string | undefined;
1401
- resumeContext?: {
1402
- failure?: {
1403
- stepId?: string | undefined;
1404
- error: string;
1405
- } | undefined;
1406
- restarted?: true | undefined;
1407
- } | undefined;
1408
- } | undefined;
1409
- workflowResumeStepId?: string | undefined;
1410
- invalidAsk?: boolean | undefined;
1411
- agentInputs?: {
1412
- conversation?: {
1413
- senderRunId: string;
1414
- recipientRunId: string;
1415
- kind: "follow-up" | "progress" | "reply" | "request";
1416
- requestId?: string | undefined;
1417
- } | undefined;
1418
- id: string;
1419
- source: "agent" | "lifecycle";
1420
- parentRunId: string;
1421
- text: string;
1422
- createdAt: string;
1423
- deliveredAt?: string | undefined;
1424
- consumedAt?: string | undefined;
1425
- awaitingRead?: true | undefined;
1426
- inboxClaim?: {
1427
- receiptId: string;
1428
- generation: string;
1429
- expiresAt: string;
1430
- acknowledgedAt?: string | undefined;
1431
- memberIds?: string[] | undefined;
1432
- } | undefined;
1433
- purpose?: "completion-refusal" | undefined;
1434
- }[] | undefined;
1435
- waits?: ({
1436
- prUrl: string;
1437
- repository: string;
1438
- prNumber: number;
1439
- headSha: string;
1440
- id: string;
1441
- source: "agent" | "cezar";
1442
- via: "ask-line" | "budget" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "no-wait" | "schedule-wakeup";
1443
- registeredAt: string;
1444
- phase: "cancelled" | "delivered" | "open" | "resolved";
1445
- resolvedAt?: string | undefined;
1446
- deliveredAt?: string | undefined;
1447
- cancelledAt?: string | undefined;
1448
- turnId: string;
1449
- kind: "pr";
1450
- deadline: string;
1451
- generation: string;
1452
- timeoutSeconds: number;
1453
- until: "checks" | "merge";
1454
- wakeOnConflict: boolean;
1455
- result?: {
1456
- outcome: "cancelled" | "closed" | "conflicting" | "deadline" | "error" | "failed" | "head_changed" | "merged" | "no_checks" | "passed" | "skipped";
1457
- headSha: string;
1458
- observedHeadSha?: string | undefined;
1459
- mergeable?: "CONFLICTING" | "MERGEABLE" | "UNKNOWN" | undefined;
1460
- mergeStateStatus?: string | undefined;
1461
- mergedAt?: string | undefined;
1462
- mergeCommitSha?: string | undefined;
1463
- observedAt: string;
1464
- checks: {
1465
- name: string;
1466
- state: string;
1467
- link: string;
1468
- }[];
1469
- totalChecks: number;
1470
- truncated: boolean;
1471
- diagnostic?: string | undefined;
1472
- } | undefined;
1473
- } | {
1474
- id: string;
1475
- source: "agent" | "cezar";
1476
- via: "ask-line" | "budget" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "no-wait" | "schedule-wakeup";
1477
- registeredAt: string;
1478
- phase: "cancelled" | "delivered" | "open" | "resolved";
1479
- resolvedAt?: string | undefined;
1480
- deliveredAt?: string | undefined;
1481
- cancelledAt?: string | undefined;
1482
- turnId: string;
1483
- kind: "timer";
1484
- deadline: string;
1485
- seconds: number;
1486
- note?: string | undefined;
1487
- } | {
1488
- id: string;
1489
- source: "agent" | "cezar";
1490
- via: "ask-line" | "budget" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "no-wait" | "schedule-wakeup";
1491
- registeredAt: string;
1492
- phase: "cancelled" | "delivered" | "open" | "resolved";
1493
- resolvedAt?: string | undefined;
1494
- deliveredAt?: string | undefined;
1495
- cancelledAt?: string | undefined;
1496
- turnId: string;
1497
- kind: "human";
1498
- questions?: {
1499
- id?: string | undefined;
1500
- header: string;
1501
- question: string;
1502
- options?: {
1503
- label: string;
1504
- description?: string | undefined;
1505
- }[] | undefined;
1506
- multiSelect?: boolean | undefined;
1507
- }[] | undefined;
1508
- context?: string | undefined;
1509
- askSeq?: number | undefined;
1510
- } | {
1511
- id: string;
1512
- source: "agent" | "cezar";
1513
- via: "ask-line" | "budget" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "no-wait" | "schedule-wakeup";
1514
- registeredAt: string;
1515
- phase: "cancelled" | "delivered" | "open" | "resolved";
1516
- resolvedAt?: string | undefined;
1517
- deliveredAt?: string | undefined;
1518
- cancelledAt?: string | undefined;
1519
- turnId: string;
1520
- kind: "worker";
1521
- deadline?: string | undefined;
1522
- timeoutSeconds?: number | undefined;
1523
- mode?: "all" | "any" | "one" | undefined;
1524
- workerIds?: string[] | undefined;
1525
- revisions?: {
1526
- workerId: string;
1527
- revision: number;
1528
- }[] | undefined;
1529
- outcomes?: {
1530
- workerId: string;
1531
- status: "cancelled" | "done" | "failed" | "review";
1532
- observedAt: string;
1533
- summary?: string | undefined;
1534
- revision?: number | undefined;
1535
- }[] | undefined;
1536
- requestIds?: string[] | undefined;
1537
- requestOutcomes?: {
1538
- requestId: string;
1539
- status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
1540
- observedAt: string;
1541
- replyId?: string | undefined;
1542
- }[] | undefined;
1543
- result?: {
1544
- reason: "outcome" | "timeout";
1545
- } | undefined;
1546
- wakeInputId?: string | undefined;
1547
- } | {
1548
- id: string;
1549
- source: "agent" | "cezar";
1550
- via: "ask-line" | "budget" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "no-wait" | "schedule-wakeup";
1551
- registeredAt: string;
1552
- phase: "cancelled" | "delivered" | "open" | "resolved";
1553
- resolvedAt?: string | undefined;
1554
- deliveredAt?: string | undefined;
1555
- cancelledAt?: string | undefined;
1556
- turnId: string;
1557
- kind: "process";
1558
- deadline: string;
1559
- timeoutSeconds: number;
1560
- pid: number;
1561
- startToken?: string | undefined;
1562
- exitFile?: string | undefined;
1563
- note?: string | undefined;
1564
- result?: {
1565
- outcome: "deadline" | "error" | "exit_file" | "exited";
1566
- observedAt: string;
1567
- exitCode?: number | undefined;
1568
- exitFileNote?: "not-an-exit-code" | undefined;
1569
- diagnostic?: string | undefined;
1570
- } | undefined;
1571
- })[] | undefined;
1572
- lastWaits?: ({
1573
- prUrl: string;
1574
- repository: string;
1575
- prNumber: number;
1576
- headSha: string;
1577
- id: string;
1578
- source: "agent" | "cezar";
1579
- via: "ask-line" | "budget" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "no-wait" | "schedule-wakeup";
1580
- registeredAt: string;
1581
- phase: "cancelled" | "delivered" | "open" | "resolved";
1582
- resolvedAt?: string | undefined;
1583
- deliveredAt?: string | undefined;
1584
- cancelledAt?: string | undefined;
1585
- turnId: string;
1586
- kind: "pr";
1587
- deadline: string;
1588
- generation: string;
1589
- timeoutSeconds: number;
1590
- until: "checks" | "merge";
1591
- wakeOnConflict: boolean;
1592
- result?: {
1593
- outcome: "cancelled" | "closed" | "conflicting" | "deadline" | "error" | "failed" | "head_changed" | "merged" | "no_checks" | "passed" | "skipped";
1594
- headSha: string;
1595
- observedHeadSha?: string | undefined;
1596
- mergeable?: "CONFLICTING" | "MERGEABLE" | "UNKNOWN" | undefined;
1597
- mergeStateStatus?: string | undefined;
1598
- mergedAt?: string | undefined;
1599
- mergeCommitSha?: string | 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-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "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-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "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-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "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" | "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-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "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
- })[] | undefined;
1709
- previewServers?: {
1710
- port: number;
1711
- command: string;
1712
- cwd?: string | undefined;
1713
- label: string;
1714
- path?: string | undefined;
1715
- registeredAt: string;
1716
- answeredAtRegistration: boolean;
1717
- }[] | undefined;
1718
- taskImages?: string[] | undefined;
1719
- model?: string | undefined;
1720
- effort?: string | undefined;
1721
- modelIdentity?: string | undefined;
1722
- agentProfile?: string | undefined;
1723
- systemPrompt?: string | undefined;
1724
- generateFollowups?: boolean | undefined;
1725
- autonomous?: boolean | undefined;
1726
- archiveWhenDone?: boolean | undefined;
1727
- autoMergePr?: boolean | undefined;
1728
- completionAction?: {
1729
- id: string;
1730
- phase: "blocked" | "complete" | "pending";
1731
- message?: string | undefined;
1732
- } | undefined;
1733
- archiveBlocker?: {
1734
- message: string;
1735
- runId?: string | undefined;
1736
- pullRequestUrl?: string | undefined;
1737
- } | undefined;
1738
- status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
1739
- createdAt: string;
1740
- startedAt?: string | undefined;
1741
- finishedAt?: string | undefined;
1742
- tokensUsed: number;
1743
- inputTokens?: number | undefined;
1744
- outputTokens?: number | undefined;
1745
- costUsd?: number | undefined;
1746
- pullRequestUrl?: string | undefined;
1747
- referencedPullRequestUrl?: string | undefined;
1748
- prNumber?: number | undefined;
1749
- issueNumber?: number | undefined;
1750
- referencedIssueNumberSeeded?: boolean | undefined;
1751
- titleOrigin?: "auto" | "marker" | "user" | undefined;
1752
- markerRefs?: {
1753
- pr?: number | undefined;
1754
- issue?: number | undefined;
1755
- } | undefined;
1756
- referencedPrCandidates?: string[] | undefined;
1757
- referencedIssueUrl?: string | undefined;
1758
- referencedIssueCandidates?: string[] | undefined;
1759
- worktree?: false | undefined;
1760
- worktreePath?: string | undefined;
1761
- branch?: string | undefined;
1762
- baseBranch?: string | undefined;
1763
- worktreeReclaimedAt?: string | undefined;
1764
- groupId?: string | undefined;
1765
- variant?: string | undefined;
1766
- clientRequestId?: string | undefined;
1767
- clientRequestHash?: string | undefined;
1768
- peakRssBytes?: number | undefined;
1769
- peakProcCount?: number | undefined;
1770
- archivedAt?: string | undefined;
1771
- autoArchive?: {
1772
- reason: "pull-requests-merged";
1773
- archivedAt: string;
1774
- fingerprint: string;
1775
- pullRequests: {
1776
- owner: string;
1777
- repo: string;
1778
- number: number;
1779
- mergedAt: string;
1780
- }[];
1781
- } | undefined;
1782
- manualUnarchivedAt?: string | undefined;
1783
- pinned?: boolean | undefined;
1784
- pinnedAt?: string | undefined;
1785
- seenAt?: string | undefined;
1786
- currentStepId?: string | undefined;
1787
- error?: string | undefined;
1788
- delegation?: {
1789
- role: "root";
1790
- conversation?: {
1791
- messages: {
1792
- senderRunId: string;
1793
- recipientRunId: string;
1794
- kind: "follow-up" | "progress" | "reply" | "request";
1795
- requestId?: string | undefined;
1796
- id: string;
1797
- text: string;
1798
- createdAt: string;
1799
- deadline?: string | undefined;
1800
- requestHash: string;
1801
- state: "accepted" | "continuation-required" | "destroyed" | "late";
1802
- resumed?: true | undefined;
1803
- instruction?: string | undefined;
1804
- question?: {
1805
- context?: string | undefined;
1806
- questions: {
1807
- id?: string | undefined;
1808
- header: string;
1809
- question: string;
1810
- options?: {
1811
- label: string;
1812
- description?: string | undefined;
1813
- }[] | undefined;
1814
- multiSelect?: boolean | undefined;
1815
- }[];
1816
- } | undefined;
1817
- }[];
1818
- outcomes: {
1819
- requestId: string;
1820
- status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
1821
- observedAt: string;
1822
- replyId?: string | undefined;
1823
- }[];
1824
- } | undefined;
1825
- permissions: ("destroy" | "diff" | "inspect" | "spawn" | "steer" | "stop" | "wait")[];
1826
- receipts: {
1827
- requestId: string;
1828
- workerId: string;
1829
- requestHash: string;
1830
- deletion?: {
1831
- phase: "complete" | "pending";
1832
- revision: number;
1833
- resourceId: string;
1834
- generation: string;
1835
- } | undefined;
1836
- }[];
1837
- wait?: {
1838
- id: string;
1839
- workerIds: string[];
1840
- requestIds?: string[] | undefined;
1841
- requestOutcomes?: {
1842
- requestId: string;
1843
- status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
1844
- observedAt: string;
1845
- replyId?: string | undefined;
1846
- }[] | undefined;
1847
- deadline: string;
1848
- mode?: "all" | "any" | "one" | undefined;
1849
- revisions?: {
1850
- workerId: string;
1851
- revision: number;
1852
- }[] | undefined;
1853
- reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
1854
- phase: "parked" | "registered" | "wake-pending";
1855
- outcomes: {
1856
- workerId: string;
1857
- status: "cancelled" | "done" | "failed" | "review";
1858
- observedAt: string;
1859
- summary?: string | undefined;
1860
- revision?: number | undefined;
1861
- }[];
1862
- wakeId?: string | undefined;
1863
- } | undefined;
1864
- lastWait?: {
1865
- id: string;
1866
- workerIds: string[];
1867
- requestIds?: string[] | undefined;
1868
- requestOutcomes?: {
1869
- requestId: string;
1870
- status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
1871
- observedAt: string;
1872
- replyId?: string | undefined;
1873
- }[] | undefined;
1874
- deadline: string;
1875
- mode?: "all" | "any" | "one" | undefined;
1876
- revisions?: {
1877
- workerId: string;
1878
- revision: number;
1879
- }[] | undefined;
1880
- reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
1881
- phase: "parked" | "registered" | "wake-pending";
1882
- outcomes: {
1883
- workerId: string;
1884
- status: "cancelled" | "done" | "failed" | "review";
1885
- observedAt: string;
1886
- summary?: string | undefined;
1887
- revision?: number | undefined;
1888
- }[];
1889
- wakeId?: string | undefined;
1890
- } | undefined;
1891
- results?: {
1892
- workerId: string;
1893
- revision: number;
1894
- snapshotId: string;
1895
- observedAt: string;
1896
- lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
1897
- previous?: {
1898
- revision: number;
1899
- observedAt: string;
1900
- lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
1901
- } | undefined;
1902
- }[] | undefined;
1903
- finishRequestedAt?: string | undefined;
1904
- historyDeletion?: "pending" | undefined;
1905
- completion?: {
1906
- phase: "attention" | "waiting";
1907
- waitId?: string | undefined;
1908
- } | undefined;
1909
- } | {
1910
- role: "worker";
1911
- wait?: {
1912
- id: string;
1913
- workerIds: string[];
1914
- requestIds?: string[] | undefined;
1915
- requestOutcomes?: {
1916
- requestId: string;
1917
- status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
1918
- observedAt: string;
1919
- replyId?: string | undefined;
1920
- }[] | undefined;
1921
- deadline: string;
1922
- mode?: "all" | "any" | "one" | undefined;
1923
- revisions?: {
1924
- workerId: string;
1925
- revision: number;
1926
- }[] | undefined;
1927
- reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
1928
- phase: "parked" | "registered" | "wake-pending";
1929
- outcomes: {
1930
- workerId: string;
1931
- status: "cancelled" | "done" | "failed" | "review";
1932
- observedAt: string;
1933
- summary?: string | undefined;
1934
- revision?: number | undefined;
1935
- }[];
1936
- wakeId?: string | undefined;
1937
- } | undefined;
1938
- lastWait?: {
1939
- id: string;
1940
- workerIds: string[];
1941
- requestIds?: string[] | undefined;
1942
- requestOutcomes?: {
1943
- requestId: string;
1944
- status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
1945
- observedAt: string;
1946
- replyId?: string | undefined;
1947
- }[] | undefined;
1948
- deadline: string;
1949
- mode?: "all" | "any" | "one" | undefined;
1950
- revisions?: {
1951
- workerId: string;
1952
- revision: number;
1953
- }[] | undefined;
1954
- reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
1955
- phase: "parked" | "registered" | "wake-pending";
1956
- outcomes: {
1957
- workerId: string;
1958
- status: "cancelled" | "done" | "failed" | "review";
1959
- observedAt: string;
1960
- summary?: string | undefined;
1961
- revision?: number | undefined;
1962
- }[];
1963
- wakeId?: string | undefined;
1964
- } | undefined;
1965
- permissions: ("destroy" | "diff" | "inspect" | "spawn" | "steer" | "stop" | "wait")[];
1966
- parentRunId: string;
1967
- workspace: {
1968
- ownerRunId: string;
1969
- resourceId: string;
1970
- kind: "owned-isolated";
1971
- path: string;
1972
- branch: string;
1973
- baselineSha: string;
1974
- };
1975
- destroy?: {
1976
- requestedAt: string;
1977
- phase: "cleaning" | "complete" | "incomplete" | "requested" | "terminating";
1978
- remaining: ("branch" | "process" | "worktree")[];
1979
- error?: string | undefined;
1980
- } | undefined;
1981
- context?: {
1982
- text?: string | undefined;
1983
- inputs: {
1984
- source: {
1985
- kind: "parent-file";
1986
- path: string;
1987
- } | {
1988
- kind: "baseline-file";
1989
- path: string;
1990
- } | {
1991
- kind: "parent-attachment";
1992
- id: string;
1993
- };
1994
- path: string;
1995
- sha256: string;
1996
- bytes: number;
1997
- }[];
1998
- } | undefined;
1999
- executionRevision?: number | undefined;
2000
- executionStartSeq?: number | undefined;
2001
- } | {
2002
- role: "invalid";
2003
- } | undefined;
2004
- lastWaitsError?: string | undefined;
2005
- automaticWakes?: number | undefined;
2006
- waitDeliveryFailures?: number | undefined;
2007
- runner?: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi" | undefined;
2008
- notify?: boolean | undefined;
2009
- webhook?: {
2010
- lastDeliveredAt?: string | undefined;
2011
- lastError?: string | undefined;
2012
- lastErrorWebhookId?: string | undefined;
2013
- } | undefined;
2014
- destroyRetry?: {
2015
- attempts: number;
2016
- nextAt: string;
2017
- needsAttention?: true | undefined;
2018
- } | undefined;
2019
- stopping?: boolean | undefined;
2020
- hasPendingPermission?: boolean | undefined;
2021
- autoResumeAt?: string | undefined;
2022
- autoResumeAttempts?: number | undefined;
2023
- pullRequests?: {
2024
- number: number;
2025
- url?: string | undefined;
2026
- source: "created" | "declared";
2027
- }[] | undefined;
2028
- worktreeSetup?: {
2029
- status: "done" | "failed" | "running";
2030
- startedAt: string;
2031
- finishedAt?: string | undefined;
2032
- durationMs?: number | undefined;
2033
- error?: string | undefined;
2034
- } | undefined;
2035
- archived: boolean;
2036
- workflowDef?: {
2037
- name: string;
2038
- description?: string | undefined;
2039
- steps: {
2040
- id: string;
2041
- name?: string | undefined;
2042
- prompt?: string | undefined;
2043
- skill?: string | undefined;
2044
- model?: string | undefined;
2045
- effort?: string | undefined;
2046
- timeoutMs?: number | undefined;
2047
- runner?: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi" | undefined;
2048
- agentProfile?: string | undefined;
2049
- allowedTools?: string[] | undefined;
2050
- bashAllowlist?: string[] | undefined;
2051
- command?: string | undefined;
2052
- onFail?: {
2053
- retry: string;
2054
- max: number;
2055
- } | undefined;
2056
- }[];
2057
- source: "built-in" | "file";
2058
- path?: string | undefined;
2059
- } | undefined;
2060
- steps: {
2061
- id: string;
2062
- name: string;
2063
- kind: "agent" | "check";
2064
- status: "cancelled" | "done" | "failed" | "pending" | "review" | "running" | "skipped" | "waiting";
2065
- iterations: number;
2066
- retriesUsed?: number | undefined;
2067
- tokensUsed: number;
2068
- inputTokens?: number | undefined;
2069
- outputTokens?: number | undefined;
2070
- usageInvocationsStarted?: number | undefined;
2071
- usageInvocationsObserved?: number | undefined;
2072
- usageTurnsStarted?: number | undefined;
2073
- usageTurnsRecorded?: number | undefined;
2074
- usageInvocationEpoch?: number | undefined;
2075
- startedAt?: string | undefined;
2076
- finishedAt?: string | undefined;
2077
- error?: string | undefined;
2078
- sessionId?: string | undefined;
2079
- sessionTransport?: "cursor-acp" | "cursor-print" | undefined;
2080
- profileId?: string | undefined;
2081
- costUsd?: number | undefined;
2082
- synthetic?: "continuation" | undefined;
2083
- backend?: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi" | undefined;
2084
- }[];
2085
- automation?: {
2086
- automationId: string;
2087
- receiptId: string;
2088
- event: string;
2089
- automationRevision: number;
2090
- githubUrl: string;
2091
- } | undefined;
2092
- automationTrigger?: {
2093
- automationId: string;
2094
- receiptId: string;
2095
- trigger: "catch-up" | "manual" | "schedule";
2096
- occurrenceAt: string;
2097
- automationRevision: number;
2098
- } | undefined;
2099
- handoffRecords?: {
2100
- autosave: {
2101
- at: string;
2102
- note: string;
2103
- periodic?: {
2104
- branch: string | null;
2105
- count: number;
2106
- first: string | null;
2107
- latest: string | null;
2108
- } | undefined;
2109
- }[];
2110
- } | undefined;
2111
- }[]>;
2112
- /** One stored record and what its JSON holds beyond the runtime schema (raw-record.ts), which
2113
- * the next write of its row puts back. */
2114
- export interface DecodedRun {
2115
- run: RunRecord;
2116
- extras: RawExtras | undefined;
2117
- /** The stored JSON still had schema-3 wait fields (`upgradeLegacyWaits`): open rewrites it. */
2118
- upgraded?: true;
2119
- }
2120
- /** One database row's `data` back into a record and its extras. Undefined when it does not parse:
2121
- * one unreadable row costs that row only. */
2122
- export declare function decodeRunRow(data: string): DecodedRun | undefined;
2123
- /** One database row's `data` back into a record, for a reader that never writes it back. */
2124
- export declare function decodeRunRecord(data: string): RunRecord | undefined;
2125
- export { LEGACY_INDEX_BACKUP_FILE, LEGACY_INDEX_FILE } from './legacy-index.ts';
2126
- export type StepState = z.infer<typeof stepStateSchema>;
2127
- export type QueuedMessage = z.infer<typeof queuedMessageSchema>;
2128
- export type RunRecord = z.infer<typeof runRecordSchema>;
2129
- /** One persisted event line; `type` mirrors AgentEvent plus engine lifecycle. */
2130
- export type RunEvent = import('../contract/index.js').RunEvent;
2131
- /** How many archived root runs the run lists carry per project (#864): `GET /run-summaries?archived=recent`
2132
- * and `GET /workspace/runs-index`. Unarchived runs are never cut; older archived runs page in
2133
- * through `GET /run-summaries/archived` and the workspace search. */
2134
- export declare const ARCHIVED_WINDOW = 200;
2135
- /** The repository a project IS, as `resolveRepoHandle` reports it. `null`/absent means "unknown",
2136
- * which is a real and common state (no `gh`, no remote, a non-git root) — never an error. */
2137
- export type RepoHandle = {
2138
- owner: string;
2139
- name: string;
2140
- };
2141
- /**
2142
- * Reconcile one record just read off disk with the fact that whichever process wrote it is gone.
2143
- *
2144
- * Mutates and returns `run`. Extracted from `RunStore.open` so the read-only index reader
2145
- * (`./run-index.ts`) answers the SAME question about a `running` row on disk. Two parsers that
2146
- * disagree here is a visible bug, not an internal one: the cockpit would show a task as running
2147
- * in the ⌘K index and failed the moment you opened it.
2148
- *
2149
- * `keepLive` (#367): leave `queued`/`running`/`waiting` untouched so the caller can recover them
2150
- * (RunManager.recover re-queues queued runs, resumes interrupted ones). Without it — one-shot CLI
2151
- * paths that never recover, and the index reader, which has no manager at all — live-looking runs
2152
- * are marked failed so no ghost stays behind.
2153
- */
2154
- export declare function reconcileLoadedRun(run: RunRecord, opts?: {
2155
- keepLive?: boolean;
2156
- }): RunRecord;
2157
- /**
2158
- * Settle an adopted dead owner’s live run without starting work. Untouched runs cancel; started
2159
- * runs become interrupted. Stop explicitly cancels its target. Mutates run.
2160
- */
2161
- export declare function settleOrphanedRun(run: RunRecord, opts?: {
2162
- stop?: boolean | undefined;
2163
- }): RunRecord;
2164
- /**
2165
- * Drop this run's referenced PR/issue if the project's handle proves it foreign and the prompt
2166
- * does not corroborate it (#945). Returns whether anything changed.
2167
- *
2168
- * One-directional by construction: it only ever clears fields, so a record written by an older
2169
- * cezar — or read by one after this ran — is never worse off, and a downgrade sees a record whose
2170
- * format is untouched and whose cleared fields were already optional.
2171
- */
2172
- export declare function rescopeRun(run: RunRecord, handle?: RepoHandle | null): boolean;
2173
- export declare function __setLegacyImportHookForTests(hook?: {
2174
- beforeTransaction?: () => void;
2175
- beforeCommit?: () => void;
2176
- }): void;
2177
- /** What branch cleanup and git-log attribution read about a run (`RunStore.listBranchOwners`). */
2178
- export interface BranchOwner {
2179
- id: string;
2180
- title: string;
2181
- status: RunStatus;
2182
- archived: boolean;
2183
- createdAt: string;
2184
- /** The branch the run owns (see `encodeRunRow`); absent for a run listed for its PR alone. */
2185
- branch?: string;
2186
- baseBranch?: string;
2187
- pullRequestUrl?: string;
2188
- }
2189
- /** A record as a branch owner, or undefined when it owns no branch and created no PR: the
2190
- * projection `listBranchOwners` reads off a row's summary and columns, computed from memory. */
2191
- export declare function branchOwnerOf(run: RunRecord): BranchOwner | undefined;
2192
- /** Who may hold a run in memory besides its own record (see `RunStore.pin`). `maintenance` is the
2193
- * RunManager's publish, worktree-reclaim and branch-cleanup claims, held across their async work. */
2194
- export type RunPinHolder = 'active' | 'continue' | 'cleanup' | 'maintenance';
2195
- /**
2196
- * Who may change a run, as this store sees it (#779, plan step 3; `RunStore.runOwnership`):
2197
- * - `held`: this store claims its delegation family;
2198
- * - `free`: no live process claims it and nothing in its family is live; a write takes it. A
2199
- * proven-dead owner's claim on such a family counts for nothing: there is nothing to recover;
2200
- * - `orphaned`: nobody alive owns a family that still has a live run (its owner died, or nobody
2201
- * claimed it): taking it means adopting it first (`RunStore.adoptFamily` settles it, then the
2202
- * manager recovers the family);
2203
- * - `foreign`: another process that is alive (or cannot be proven dead) holds it: read-only here;
2204
- * - `quarantined`: a write found it changed under this store; refused until cezar restarts.
2205
- */
2206
- export type RunOwnership = 'held' | 'free' | 'orphaned' | 'foreign' | 'quarantined';
2207
- /** The one answer every control gives for a run another cezar process owns (`409 { error }`). */
2208
- export declare const RUN_IN_USE_ELSEWHERE = "run is in use by another cezar process";
2209
- /** The answer for a run this process stopped writing after a conflicting write. */
2210
- export declare const RUN_QUARANTINED = "run changed under this cezar process \u2014 restart cezar to reload it";
2211
- /** A write this store must not make: another process owns the run, its owner died with work
2212
- * still live (adopt it first), or a conflict quarantined it. Nothing was changed. */
2213
- export declare class RunWriteRefusedError extends Error {
2214
- readonly runId: string;
2215
- readonly ownership: Exclude<RunOwnership, 'held' | 'free'>;
2216
- constructor(runId: string, ownership: Exclude<RunOwnership, 'held' | 'free'>);
2217
- }
2218
- /** Newest first, runs created in the same millisecond in insertion order: the order `runs.db`
2219
- * lists in, and the order every list had while it was a stable sort of the in-memory map. */
2220
- /** Why a `run` event fired, when a delegation checkpoint caused it or nothing durable changed
2221
- * (`republish`) (in-process only). */
2222
- export type CommitSource = 'delegation-checkpoint' | 'delegation-destroy-progress' | 'live-release';
2223
- /**
2224
- * A stored summary, or undefined when the row holds none (a row seeded without one, or text that
2225
- * is not a summary): the caller then projects the record instead. The column is written only by
2226
- * `encodeRunRow`, from a record the schema accepted, so this checks the shape a list row cannot
2227
- * do without rather than running the full contract schema — on a cockpit's thousand rows that
2228
- * schema costs more than reading them. The cold reader (`run-index.ts`), which reads other
2229
- * projects' databases, still validates in full.
2230
- */
2231
- export declare function parseStoredSummary(text: string): RunSummary | undefined;
2232
- /**
2233
- * Run rows in runs.db plus append-only NDJSON events and an in-process event bus. Hold live,
2234
- * pinned, related and unsettled records only. Optimistic writes debounce; durable commits
2235
- * publish after persistence. Family claims fence every write.
2236
- */
2237
- export declare class RunStore extends EventEmitter {
2238
- private readonly dataDir;
2239
- /** The held set: every record this store keeps in memory, by id. */
2240
- private readonly held;
2241
- /** Who holds a run beyond its record, by holder, so one holder's unpin never releases another. */
2242
- private readonly pins;
2243
- /** Staged ids while a durable commit installs and announces them: never evicted mid-commit. */
2244
- private readonly committing;
2245
- private saveTimer;
2246
- /** `null` once the store is closed, and in a `RunStore.unavailable` store (nothing is written,
2247
- * nothing is evicted). */
2248
- private db;
2249
- /** Why `open` failed, in a `RunStore.unavailable` store. */
2250
- private openFailure;
2251
- /** Runs whose held record is ahead of its row; the next save or commit writes them. */
2252
- private readonly dirty;
2253
- /** Runs gone from memory whose rows the next save or commit deletes. */
2254
- private readonly deleted;
2255
- /** Deleted runs whose history files (events, handoff, images, artifacts) go once the delete of
2256
- * their row commits: until then a conflict can undo the delete and bring the row back. */
2257
- private readonly historyOwed;
2258
- /** The repository this project IS (#945), armed after `open()` by `setRepoHandle`. Undefined
2259
- * until it arrives and `null` when it cannot be known — both mean "unscoped", which is
2260
- * exactly the pre-#945 behavior. */
2261
- private repoHandle;
2262
- /** `open()`'s `keepLive`, which a run read later from `runs.db` is reconciled with too. */
2263
- private keepLive;
2264
- /** This store's identity in `run_claims`; undefined without a database. */
2265
- private owner;
2266
- /** The families this store claims, with the generation each acquisition got. */
2267
- private readonly claimed;
2268
- /** Families judged free whose claim a busy database kept this store from taking: the next write
2269
- * of their rows takes it in its own transaction, if it is still as judged (null: absent). */
2270
- private readonly pendingClaims;
2271
- /** The revision and `data` of each held row (and pending deletion) as this store last read or
2272
- * wrote it: what a write is fenced against, and a conflict's "original". No entry: this store
2273
- * created the row and has not written it yet. `extras` is what that `data` holds beyond the
2274
- * schema, which the next write of the row puts back (raw-record.ts). */
2275
- private readonly base;
2276
- /** Rows read cold in the current synchronous turn, so a commit staged from one is fenced against
2277
- * the version it was computed from. `owned`: its family was already this store's when read.
2278
- * Cleared at the next microtask: no commit spans a turn. */
2279
- private readonly coldBase;
2280
- /** The family of each pending deletion, whose claim the deleting write is fenced against. */
2281
- private readonly deletedFamilies;
2282
- /** Rows a conflicting write excluded: this store refuses to write them until it is reopened. */
2283
- private readonly quarantined;
2284
- /** Rows whose `data` this store tried to decode and could not: left in the database untouched,
2285
- * and left out of the list rows from then on, as the cold reader leaves them out (run-index.ts). */
2286
- private readonly unreadable;
2287
- /** Background one-at-a-time compressor for archived transcripts (#818). */
2288
- private readonly compressor;
2289
- /** Transcript facts the delegation paths ask about, so they never re-read a transcript (#880). */
2290
- private readonly facts;
2291
- private readonly liveItems;
2292
- /** Capture both sources on the same synchronous sequence boundary before history IO. */
2293
- liveReadSnapshot(runId: string): {
2294
- events: {
2295
- [x: string]: unknown;
2296
- seq: number;
2297
- ts: string;
2298
- stepId?: string | undefined;
2299
- type: string;
2300
- }[];
2301
- throughSeq: number;
2302
- };
2303
- private constructor();
2304
- /**
2305
- * Open the project's run store. See `reconcileLoadedRun` for what `keepLive` (#367) decides
2306
- * about live-looking rows.
2307
- *
2308
- * Reads `runs.db` once its import is complete. Before that, `runs.json` is imported into it in
2309
- * one transaction (`importLegacyIndex`) and left exactly as it was, for older cezars to read.
2310
- * Either way only the held set is decoded: the live rows (by the indexed `live` column), the
2311
- * few finished rows a normalization still repairs, and the delegation families of the live
2312
- * ones.
2313
- *
2314
- * A store that cannot be opened is never an empty one (#779, plan step 4): `open` throws a
2315
- * `RunStoreOpenError` naming the cause, and nothing is reset, restored or deleted. `retryBusy`
2316
- * waits out a busy database (and a cockpit that may still be importing) with growing pauses,
2317
- * about 3.5 s in all, before it gives up. Open is synchronous, so the wait blocks this thread:
2318
- * only a boot passes it, while nothing else runs yet. Without it a busy database fails after
2319
- * one busy timeout.
2320
- */
2321
- static open(dataDir: string, opts?: {
2322
- keepLive?: boolean | undefined;
2323
- retryBusy?: boolean;
2324
- maintenance?: boolean;
2325
- }): RunStore;
2326
- private static openOnce;
2327
- /**
2328
- * The store `serve` keeps for its boot project when `open` failed: no database, nothing held,
2329
- * and every attempt to create or save a run refused with `failure`. The cockpit answers every
2330
- * route of that project with `failure`'s message, and boot skips everything that would read
2331
- * its empty run list as "no runs" (orphan pruning, retention, recovery, scratch sweeps). The
2332
- * way out is a restart once the cause is gone.
2333
- */
2334
- static unavailable(dataDir: string, failure: RunStoreOpenError): RunStore;
2335
- /** Why this store has no database, when it is `RunStore.unavailable`'s: its runs are unknown,
2336
- * not absent. */
2337
- get unavailable(): RunStoreOpenError | undefined;
2338
- /**
2339
- * Open-time load: the live rows, the finished rows a load normalization repairs, then the
2340
- * delegation families of the live ones. A row that does not parse is skipped and left in the
2341
- * database untouched; one warning says how many.
2342
- *
2343
- * Only rows this store can claim are loaded (#779, plan step 3). A live row whose family another
2344
- * live process claims — `serve`'s parked run, seen by a headless `cez run` — is that process's:
2345
- * it is not loaded, normalized or recovered here, and stays readable through `getRun` and the
2346
- * list rows. A live row nobody alive claims is taken over, as before: this open recovers it
2347
- * (`keepLive`) or settles it as interrupted.
2348
- */
2349
- private loadHeldRows;
2350
- /** Normalize a record just read from `row` (see `reconcileLoadedRun`) and hold it. Marks the row
2351
- * dirty only when normalization changed it, so the next save persists exactly the runs open()
2352
- * rewrote. A row read up from schema-3 wait fields counts as changed: its rewrite drops them
2353
- * and recomputes its summary and live column (`upgradeLegacyWaits`). The caller has claimed
2354
- * the row's family. */
2355
- private adoptLoadedRun;
2356
- /**
2357
- * Hold one delegation family: its root and the root's direct workers, read through the
2358
- * `parent_run_id` index. No recursion: workers cannot delegate, so a worker's own id never
2359
- * names a family. The caller has claimed it. `settle` settles its live rows instead of keeping
2360
- * them for recovery (`settleOrphanedRun`); `stopId` is the run a Stop settles as cancelled.
2361
- */
2362
- private holdFamily;
2363
- /**
2364
- * Make sure this store claims each of `families`, taking every one no live process holds, and
2365
- * return the ones it now holds. Liveness is judged here (`claimOwnerLive`), outside the write
2366
- * transaction; `takeClaims` then takes a claim only if it is still exactly what was judged.
2367
- *
2368
- * `allowLive` also takes a family that still has a live row although no live process owns it.
2369
- * Open and `adoptFamily` pass it, because recovery follows both, and so does a write moving a
2370
- * run this store holds into a new family (a worker quarantined to `invalid` becomes its own):
2371
- * an ordinary write must not quietly inherit a dead process's live run and leave it unrecovered.
2372
- * `wait` retries a busy database instead of leaving the claim to the next write: recovery
2373
- * cannot start without it.
2374
- */
2375
- private claimFamilies;
2376
- /** `takeClaims`, retried while another connection holds the write lock (each try waits out the
2377
- * busy timeout), then the busy error. */
2378
- private takeClaims;
2379
- /** Release the claim of every family with nothing left in memory, once nothing is pending: a
2380
- * failed save keeps its families claimed until it succeeds. A failed release retries at the
2381
- * next sweep; `close()` releases the rest. */
2382
- private releaseUnheldClaims;
2383
- /**
2384
- * Who may change this run right now (see `RunOwnership`), or undefined when there is no such
2385
- * run. Read-only: nothing is claimed. Controls ask this first, so a run another process owns is
2386
- * refused with `RUN_IN_USE_ELSEWHERE` and a dead process's run is adopted before it is changed.
2387
- */
2388
- runOwnership(id: string): RunOwnership | undefined;
2389
- /** Why a control on this run must be refused here, or undefined when this store may change it. */
2390
- writeRefusal(id: string): string | undefined;
2391
- /**
2392
- * Claim an orphaned family and settle its live rows before a control acts. Stop cancels its
2393
- * target. Return the root id, or undefined for a live owner or missing run; adoption never
2394
- * resumes work.
2395
- */
2396
- adoptFamily(id: string, opts?: {
2397
- stop?: boolean;
2398
- }): string | undefined;
2399
- /** Every run whose family another process owns — alive, or dead with a live run left to
2400
- * recover (cleanup keeps their scratch: it is theirs, or recovery's once someone adopts them).
2401
- * A dead owner's claim on a family with nothing live is no claim (see `runOwnership`). */
2402
- listForeignClaimedRunIds(): string[];
2403
- /**
2404
- * Whether a held run anchors itself (and its family) in memory. Anything else held is a family
2405
- * member or a settled write, and leaves at the next sweep (`evictSettled`).
2406
- *
2407
- * The held set is: every run that is live (`isLiveRecord`), pinned by a RunManager (`pin`),
2408
- * dirty, or inside a durable commit; plus the whole delegation family (root and direct
2409
- * workers) of any such run. Families are held because the RunManager reads a live run's family
2410
- * on every run event — `GET /runs/:id/relationships`, the global `reconcileWorkerWaits` pass
2411
- * (about twenty call sites), completion blockers and conversations — and decoding a cold
2412
- * record costs about 200 µs (JSON.parse plus the schema). Measured on a copy of a real
2413
- * cockpit's `runs.json` (958 runs, 957 of them delegated): a running root with 26 workers
2414
- * paid about 5 ms per family read, and the live families together about 10 ms per global
2415
- * pass, all on the event loop. Holding them costs memory in proportion to active work, not to
2416
- * history.
2417
- */
2418
- private isAnchor;
2419
- /** The family roots with an anchoring member in memory. */
2420
- private anchoredFamilies;
2421
- /** Drop every held run that is neither an anchor nor in an anchored family. A store without a
2422
- * database keeps everything: memory is the only copy it has. */
2423
- private evictSettled;
2424
- /** A run read from `runs.db`, normalized like a loaded one (`reconcileLoadedRun`, then the
2425
- * repository scope) but held by nobody. Undefined when absent, deleted or unreadable. */
2426
- private loadCold;
2427
- private decodeCold;
2428
- /** Hold a run just decoded from its row: the object every later read and write shares. */
2429
- private holdDecoded;
2430
- /**
2431
- * Bring a run into memory and return the held object: the record a write changes in place.
2432
- * It leaves again at the first sweep after its write settles, unless something anchors it.
2433
- * Its family is claimed first, then the row is read, so the version held is the claimed one;
2434
- * undefined while another process owns it (see `claimFamilies`).
2435
- */
2436
- private hold;
2437
- /** The record a store write changes in place: held, or loaded to be. Undefined for a run this
2438
- * store may not write (another process's, or quarantined), so the write changes nothing. */
2439
- private record;
2440
- /** The current record for reading: the held object, the held copy of a run whose family is in
2441
- * memory, or else a fresh copy nobody holds. */
2442
- private peek;
2443
- /**
2444
- * A run just read off its row, as reads answer it: held when its family is in memory (a live
2445
- * family's members are read on every run event), else a copy nobody holds — frozen under
2446
- * vitest when it leaves the store (`freeze`).
2447
- */
2448
- private answerCold;
2449
- /** `getRun` for a row a query already read: the held object, else decoded from `row`. */
2450
- private fromRow;
2451
- /** Whether the run exists, held or not, without decoding it. */
2452
- private hasRun;
2453
- /**
2454
- * Keep a run in memory for `holder` until `unpin(id, holder)`: a RunManager pins the runs it is
2455
- * executing (`active`) and the run a Continue is admitting (`continue`). A finished run is
2456
- * loaded. Pins are per holder, so releasing one never releases another. Returns the held record.
2457
- */
2458
- pin(id: string, holder: RunPinHolder): RunRecord | undefined;
2459
- /** Publish a run's current record again without a write: something read beside the record
2460
- * changed, such as the run leaving the manager's live registries, which a detail's finish
2461
- * verdict reads (hearsay-tools/cezarion#1301). */
2462
- republish(id: string): void;
2463
- /** Release `holder`'s pin. The run leaves memory at the next sweep once nothing else holds it. */
2464
- unpin(id: string, holder: RunPinHolder): void;
2465
- /**
2466
- * Set discovered repository identity without blocking boot. Recompute conclusions from retained
2467
- * evidence, including cold records; null retains unknown-handle behavior.
2468
- */
2469
- setRepoHandle(handle: RepoHandle | null): void;
2470
- /** Whether the stored summary still names a reference the scoped record no longer has. */
2471
- private storedScopeDiffers;
2472
- /**
2473
- * The live set, newest first: runs whose record is live (`isLiveRecord`) or that a RunManager
2474
- * pins. Finished runs are not here — read one by id (`getRun`), by an indexed query
2475
- * (`listWorkersOf`, `findRunByClientRequestId`, `listRunsWithWorktree`,
2476
- * `listBranchOwners`), or as list rows (`listRunSummaries`).
2477
- */
2478
- listRuns(): RunRecord[];
2479
- /** Where a held run lists: its row's insertion order, or after every row while this store has
2480
- * not written it yet. The held set keeps such runs in creation order, and so does every list
2481
- * that sorts them in held-set order (`sortNewestFirst` is stable). */
2482
- private listOrder;
2483
- /**
2484
- * EVERY run as a full record, newest first — decoded row by row. Only the legacy `GET /runs`
2485
- * (older clients; the cockpit reads `GET /run-summaries`) may call this: it is exactly the
2486
- * whole-history parse #779 exists to remove from everything else.
2487
- */
2488
- listAllRunsForLegacyRoute(): RunRecord[];
2489
- /**
2490
- * Every run as its list row, newest first: the stored `summary` column, with each held run's
2491
- * own projection laid over it — a debounced save keeps memory up to 300 ms ahead of the row,
2492
- * and a run created since the last save has no row yet. `usage` is the caller's to attach.
2493
- *
2494
- * With `archivedWindow` (#864), the window the cockpit's lists read: every unarchived run, plus
2495
- * the newest `archivedWindow` archived ROOT runs, and whether older archived roots were left
2496
- * out. Archived workers are never in it (see `RunDatabase.listWindowSummaries`); with `roots`,
2497
- * no worker is — the runs index, whose readers list no workers. A held run
2498
- * lists by its record, so one archived or unarchived since the last save is ranked as it is now.
2499
- *
2500
- * A row this store found unreadable is left out, as the cold reader leaves out a row it had to
2501
- * decode and could not. A finished row nobody has decoded is served from its summary by both,
2502
- * which decodes nothing; reading it is what finds out (`isUnreadable`).
2503
- */
2504
- listRunSummaries(options?: {
2505
- archivedWindow?: number | undefined;
2506
- roots?: boolean;
2507
- }): {
2508
- runs: RunSummary[];
2509
- truncated: boolean;
2510
- };
2511
- /**
2512
- * One page of archived ROOT runs, newest first (#864): `GET /run-summaries/archived`, the
2513
- * archived runs past the window. Held runs list by their record, as in `listRunSummaries`.
2514
- * `before` is the previous page's `nextCursor`; with `q`, only runs `matchesRunQuery` keeps, and
2515
- * `total` counts those. `automationNames` lets `q` match a task by its automation's name, as the
2516
- * list's origin line shows it (hearsay-tools/cezarion#1616). A cursor this store did not write
2517
- * answers `{ error }`.
2518
- *
2519
- * Ranking reads every archived root's key (id, created_at, seq: no record, no summary), so the
2520
- * page and `total` agree with the held overlay; only the page's own rows are read in full.
2521
- */
2522
- listArchivedRuns(options: {
2523
- before?: string;
2524
- limit: number;
2525
- q?: string;
2526
- automationNames?: AutomationNames;
2527
- }): ArchivedRunsResponse | {
2528
- error: string;
2529
- };
2530
- /** The archived roots in `runs.db`, each by its key: every one without `q` (no record, no
2531
- * summary read), and with `q` the searched rows `matchesRunSearch` keeps, which carry the summary
2532
- * the search read. A deleted, held or unreadable run's row is left out; a held run joins in
2533
- * `overlayHeldArchived`. */
2534
- private rankArchivedRows;
2535
- /** Lay the held archived roots over `ranked`, each by its record: it replaces its stored row
2536
- * (already left out of `ranked`), and with `q` it must match. A held worker never lists. */
2537
- private overlayHeldArchived;
2538
- /** The page of `ordered` after the cursor `after`: its summaries, the cursor of the next page,
2539
- * and `total`, the count of all of `ordered`. */
2540
- private archivedPage;
2541
- /** The page's summaries: a ranked key's own, else its stored one, read for the rows that have
2542
- * none in a single query. A row whose stored summary does not fit the contract is projected from
2543
- * its record; a row that cannot be read at all is left out. */
2544
- private hydrateArchivedPage;
2545
- /**
2546
- * The ROOT runs, archived or not, that match `query` (`matchesRunSearch`), newest first: at most
2547
- * `limit`, and whether more matched. The owned half of the workspace search (#864); held runs
2548
- * match by their record.
2549
- */
2550
- searchRunSummaries(query: string, limit: number): {
2551
- runs: RunSummary[];
2552
- truncated: boolean;
2553
- };
2554
- /** A row whose stored summary does not fit the contract any more, projected from its record. */
2555
- private coldSummary;
2556
- /**
2557
- * The run, or undefined. A held run is the held object (writes install into it). Any other run
2558
- * is a fresh copy of its row each call, normalized like a loaded record — frozen under vitest —
2559
- * so changing it means a store method, never an assignment.
2560
- */
2561
- getRun(id: string): RunRecord | undefined;
2562
- /** Whether the run's row is in `runs.db` but its record could not be read here: what tells a
2563
- * run that cannot open from one that does not exist. Known once something tried to read it. */
2564
- isUnreadable(id: string): boolean;
2565
- /** The ids in memory right now: the held set, for diagnostics and the benchmark's heap pass. */
2566
- heldIds(): string[];
2567
- /**
2568
- * The workers a root run owns, newest first, read off its own `receipts` (#659). Every
2569
- * `createOwnedRun` writes the receipt and the worker record in one transaction, and the
2570
- * receipt list is capped at 1,024 creations (#816), so this is a bounded lookup rather than a walk of the whole
2571
- * project index. An ordinary or worker run owns nothing and costs one map read; a receipt
2572
- * whose record has been deleted is skipped, never invented. A parent quarantined to
2573
- * `invalid` has no readable receipts and reports none, which is also what the cockpit
2574
- * assumes for that role.
2575
- */
2576
- listOwnedWorkers(parentId: string): RunRecord[];
2577
- /** Every worker filed under `parentId` (the `parent_run_id` index plus memory), newest first:
2578
- * receipts or not, which is what the reconcile and deletion checks ask. */
2579
- listWorkersOf(parentId: string): RunRecord[];
2580
- /** The id of every worker, held or stored, without decoding any (recovery's worker passes). */
2581
- listWorkerIds(): string[];
2582
- /** The id of every run whose delegation is quarantined (`invalid`), held or stored: its stored
2583
- * summary says so, so nothing is decoded (scratch cleanup). */
2584
- listQuarantinedRunIds(): string[];
2585
- /** All retained tasks this automation started, including variants, finished and archived runs.
2586
- * Logs and receipts may compact independently. Read only matching keys in SQLite and overlay
2587
- * held records so a debounced provenance update or deletion is reflected immediately. */
2588
- countAutomationRuns(automationId: string): number;
2589
- /** First non-archived task referencing a project issue, including secondary references. */
2590
- findNonArchivedRunByIssue(repo: string, number: number): string | undefined;
2591
- /**
2592
- * The runs automation receipts launched, by receipt id (`automation.receiptId` or
2593
- * `automationTrigger.receiptId`). Memory answers first; a receipt it does not know costs one
2594
- * pass over `runs.db` that reads the records' JSON in SQLite — only a crash leftover (a
2595
- * receipt still `reserved` at startup) ever asks.
2596
- */
2597
- findRunIdsByAutomationReceipt(receiptIds: readonly string[]): Map<string, string>;
2598
- /** The id of every root whose delegation carries a conversation, held or stored: recovery's
2599
- * full reconcile pass (#661). The stored summary names the role, so only roots' records are
2600
- * read, in SQLite. */
2601
- listConversationRootIds(): string[];
2602
- /** The id of every run, held or stored, without decoding any (orphan-worktree sweeps). */
2603
- listRunIds(): string[];
2604
- /** Runs with a materialized worktree directory (`worktreePath`, not reclaimed), most recently
2605
- * finished first, then newest first: worktree retention and the worktrees panel. */
2606
- listRunsWithWorktree(): RunRecord[];
2607
- /**
2608
- * Every run that owns a branch or names the PR it created, as the few fields branch cleanup and
2609
- * git-log attribution read (issue 08 §B3, §B5; a squash commit is attributed by its PR number):
2610
- * the stored summary plus the `branch` and `base_branch` columns, so a Git-tab request decodes
2611
- * no record. Held runs answer from memory.
2612
- */
2613
- listBranchOwners(): BranchOwner[];
2614
- /** The rows a column query returned, as records, with memory laid over them: a held run
2615
- * answers from memory (matching `matches` there, not on its maybe-older row). */
2616
- private queryRuns;
2617
- /** The run an idempotent start already created (#504), archived or not. A deleted run is gone
2618
- * with its record, so a retry after deletion honestly creates a fresh one. */
2619
- findRunByClientRequestId(clientRequestId: string): RunRecord | undefined;
2620
- createRun(input: {
2621
- title: string;
2622
- systemPrompt?: string | undefined;
2623
- workflowDef?: z.infer<typeof workflowDefSchema>;
2624
- workflow: string;
2625
- task: string;
2626
- model?: string | undefined;
2627
- /** Reasoning-effort pin (#45). Absent = harness default. */
2628
- effort?: string | undefined;
2629
- runner?: RunnerId | undefined;
2630
- /** Composer's per-task agent account (spec 2026-07-29-agent-profiles). */
2631
- agentProfile?: string | undefined;
2632
- autonomous?: boolean | undefined;
2633
- archiveWhenDone?: boolean | undefined;
2634
- autoMergePr?: boolean | undefined;
2635
- /** Task webhook opt-in (#589), set at creation so the first transition is already covered. */
2636
- notify?: boolean | undefined;
2637
- worktree?: false | undefined;
2638
- groupId?: string;
2639
- variant?: string;
2640
- clientRequestId?: string | undefined;
2641
- clientRequestHash?: string | undefined;
2642
- /** Automation provenance, committed with the row that creates the run (hearsay-tools/cezarion#1465):
2643
- * a crash before a later write must still let reconciliation find the receipt's task. */
2644
- automation?: RunRecord['automation'];
2645
- automationTrigger?: RunRecord['automationTrigger'];
2646
- steps: Array<Pick<StepState, 'id' | 'name' | 'kind'>>;
2647
- }): RunRecord;
2648
- /** Build without publishing: owned creation must commit its receipt and run together. */
2649
- private buildRun;
2650
- /** Accept the family ledger and its recipient queue in a single durable index replacement. */
2651
- commitConversation(rootId: string, conversation: ConversationState, delivery?: {
2652
- recipientRunId: string;
2653
- input: AgentInput;
2654
- }): void;
2655
- /** Crash recovery (#505): input a harness accepted but was never seen reading goes
2656
- * back to the queue. Returns the requeued IDs. */
2657
- requeueAwaitingReadInputs(id: string): string[];
2658
- /** Delivered, but the harness never confirmed reading it (#505): stop awaiting a read. */
2659
- commitAgentInputsUnconfirmed(id: string, ids: readonly string[]): void;
2660
- /** Observable atomic input checkpoint for the queue itself: enqueue, retire, reorder. Delivery
2661
- * and reads are outcomes (`commitOutcome`). */
2662
- commitAgentInputs(id: string, inputs: readonly AgentInput[]): void;
2663
- /** Reserve only unread conversation inputs in one durable index replacement. */
2664
- claimInboxInputs(runId: string, ids: readonly string[], claim: InboxClaim): void;
2665
- /** A receipt owns every matching input or none; exact ACK retries preserve the first timestamp. */
2666
- ackInboxInputs(runId: string, receiptId: string, generation: string, at: string): 'acknowledged' | 'already-acknowledged';
2667
- releaseInboxInputs(runId: string, receiptId: string, generation: string): 'released';
2668
- clearExpiredInboxClaims(runId: string, now: string): void;
2669
- /**
2670
- * A wait and its wake input share one atomic index replacement (spec 2026-10-17-unified-waits).
2671
- * Upserts `wait` by id into `waits` and clears `lastWaitsError`; `input` is appended once (an
2672
- * input whose id is already queued stays as it is). Only an open or resolved wait is committed
2673
- * here: settling is an outcome (`commitOutcome`). A new open wait
2674
- * past `WAIT_LIMIT` open ones is refused, so the list stays bounded whatever the caller checked.
2675
- */
2676
- commitWait(id: string, wait: Wait, input?: AgentInput): void;
2677
- /** A park that gives up its slot (hearsay-tools/cezarion#1235): the run and its step read
2678
- * `waiting`, committed at once instead of on the debounced save, so a refused write throws with
2679
- * nothing changed and the caller keeps the slot. */
2680
- commitParked(id: string, stepId?: string): void;
2681
- /** A usage-limit appointment withdrawn, committed at once instead of on the debounced save
2682
- * (hearsay-tools/cezarion#1236): a crash right after the withdrawal must not find it on disk,
2683
- * or recovery re-arms work the user cancelled. A run held for its resume settles `failed`. */
2684
- commitAutoResumeWithdrawal(id: string): void;
2685
- /** Legacy CI checkpoint over `commitWait`, kept until its callers move (unified waits, Task 4). */
2686
- commitCiWait(id: string, wait: CiWait, input?: AgentInput): void;
2687
- /** A human message beside a run's waits (hearsay-tools/cezarion#1235): accepted durably, and
2688
- * every wait stays. A lifecycle opening becomes
2689
- * the human's and keeps its wake text, so the message opens the continuation (and answers a
2690
- * pending question) and the owed results still reach the agent. */
2691
- commitHumanMessageBesideWaits(id: string, acceptedHumanMessage: QueuedMessage): void;
2692
- /**
2693
- * The one write of a run outcome (hearsay-tools/cezarion#1805): an input or wait delivered, a wake
2694
- * charged, a wait settled, a question answered, staged by `applyOutcomes` with what it depends on
2695
- * (`deps`) and committed in one transaction, with every pending row. A crash keeps all of it or
2696
- * none. Nothing changes: nothing is written. Needs no live session: it reads the stored record.
2697
- *
2698
- * A refused write throws with nothing changed. `bestEffort` is for a cleanup path, which must
2699
- * never stop on it: it warns and applies the change in memory for the debounced save to retry.
2700
- * A conversation request outcome is the other sanctioned write: `commitConversation`.
2701
- */
2702
- commitOutcome(id: string, outcomes: RunOutcome | readonly RunOutcome[], deps?: OutcomeDependencies, opts?: {
2703
- bestEffort?: boolean;
2704
- }): {
2705
- committed: boolean;
2706
- answered: string[];
2707
- };
2708
- /** An acknowledged inactive-root Finish must survive the async diff and restart. */
2709
- commitRootFinishIntent(id: string): void;
2710
- /** Cancellation supersedes pending Finish in one durable checkpoint. Also
2711
- * repairs cancelled-plus-intent snapshots left by older controllers. */
2712
- commitRootFinishCancellation(id: string): boolean;
2713
- /** Publish terminal success and completed steps only after their atomic checkpoint.
2714
- * A concurrent explicit cancellation is never overwritten by the async diff. */
2715
- commitRootFinishSuccess(id: string, status: 'done' | 'review'): boolean;
2716
- /** Persist all authority patches before exposing any of them to the engine or subscribers. */
2717
- commitDelegation(patches: ReadonlyArray<{
2718
- id: string;
2719
- delegation: DelegationState;
2720
- }>): void;
2721
- /** A pending destroy's automatic retry state, or its removal (hearsay-tools/cezarion#879). Kept on
2722
- * the record beside the strict delegation, so an older cezar strips it rather than quarantining the
2723
- * worker. Destroy progress: nothing the family reconcile reads changes. */
2724
- commitDestroyRetry(id: string, retry: WorkerDestroyRetry | undefined): void;
2725
- /** Accepted execution revision is public lifecycle identity, separate from process generations. */
2726
- commitWorkerContinuation(id: string, patch: Partial<Omit<RunRecord, 'id' | 'steps' | 'delegation'>>, step?: Pick<StepState, 'id' | 'name' | 'kind' | 'synthetic'>, conversation?: {
2727
- rootId: string;
2728
- state: ConversationState;
2729
- input: AgentInput;
2730
- }): void;
2731
- private workerResultsDir;
2732
- workerResultSnapshotPath(parentId: string, workerId: string, snapshotId: string): string;
2733
- private readWorkerResultFile;
2734
- readWorkerResult(parentId: string, workerId: string): WorkerCollectedResult | undefined;
2735
- readWorkerResultDiff(parentId: string, workerId: string): string | undefined;
2736
- /** Publish a pointer only after its redacted immutable snapshot reaches disk. Failed index writes retain the old evidence.
2737
- * A result whose evidence is already stored returns the stored one and writes nothing; `ignoreCleanup` is for a
2738
- * caller that only needs the payload durable, whatever cleanup phase the stored copy names. */
2739
- commitWorkerResult(parentId: string, value: WorkerCollectedResult, diffSnapshot?: string, opts?: {
2740
- ignoreCleanup?: boolean;
2741
- }): WorkerCollectedResult;
2742
- /**
2743
- * requestHash is supplied only by the trusted service: hash the ORIGINAL normalized request,
2744
- * before resolving refs. A retry keeps the original worker and pinned SHA even if HEAD moved.
2745
- * workspace.ownerRunId is the trusted service's preallocated worker UUID.
2746
- */
2747
- createOwnedRun(input: Parameters<RunStore['createRun']>[0], parentId: string, requestId: string, worker: DelegationState, requestHash: string, executionIdentity?: WorkerExecutionIdentity): RunRecord;
2748
- /**
2749
- * Durably replace or delete staged rows together with pending dirty rows. Persist before
2750
- * changing held objects or notifying subscribers. On failure retain all pending state; flush()
2751
- * remains best-effort.
2752
- */
2753
- private commitIndex;
2754
- /** Completion and its intent/archive share the same committed rows, including root Finish. */
2755
- private prepareCompletionActions;
2756
- private completionArchiveBlocker;
2757
- /** One archive write for manual actions, merge observations, completion, and sweeps.
2758
- * Archiving files history away; it never stops a process or removes a worktree. */
2759
- private stageArchive;
2760
- /** A bounded persisted queue also covers projects without a live RunManager. */
2761
- listCompletionCandidates(afterSeq?: number, limit?: number): Array<{
2762
- id: string;
2763
- seq: number;
2764
- }>;
2765
- canCompleteAction(id: string, token: string): boolean;
2766
- claimCompletionAction(id: string, token: string): boolean;
2767
- completeAction(id: string, token: string, phase: 'blocked' | 'complete', message?: string): boolean;
2768
- /**
2769
- * Refuse (throwing, with nothing changed) a commit that stages a quarantined run, or a run whose
2770
- * family this store does not claim and cannot take: another process owns it, or a dead process
2771
- * left it live and it has not been adopted.
2772
- */
2773
- private assertWritable;
2774
- /** The family of a run this store knows: held, else its row; a run nowhere is its own. */
2775
- private familyOf;
2776
- /** Schedule the sweep that lets any of `ids` leave memory, when one of them now can. */
2777
- private sweepIfSettled;
2778
- updateRun(id: string, patch: Partial<Omit<RunRecord, 'id' | 'steps'>>): RunRecord | undefined;
2779
- /** Prompt edits can both revoke and restore a reference. Resolve the retained working sets
2780
- * before notifying readers, using the same ambiguity, marker and repository rules as events. */
2781
- private resolveEditedTaskRefs;
2782
- /**
2783
- * Scrub the free-text fields of a record patch (#427 review). Redacting only
2784
- * events left a hole: `titleSummary` is derived from the RAW first agent turn
2785
- * and `error` from raw process output, so a token the agent echoed was
2786
- * `[REDACTED]` in the NDJSON yet verbatim in `runs.json` — the file the "no
2787
- * secrets in state files" rule names explicitly. These three are the only
2788
- * patch fields carrying agent/process text; the rest are ids, enums, counters
2789
- * and URLs, and running the scrubber over them would only risk mangling them.
2790
- *
2791
- * `StepState.error` is the step-level counterpart and is scrubbed the same
2792
- * way in `updateStep` — `run.ts` feeds the SAME `err.message` string to both
2793
- * calls, so redacting only the run-level copy left the token verbatim one
2794
- * field away (#456 review).
2795
- */
2796
- private redactPatch;
2797
- /**
2798
- * Step-level counterpart of `redactPatch` (#456 review). `error` is the only
2799
- * free-text `StepState` field — it is set from raw `err.message` /process
2800
- * output (`run.ts` `finishStep`), and `touch()` fans the whole record out
2801
- * over SSE, so an unscrubbed copy leaked to `runs.json` AND to the browser.
2802
- * The remaining fields are ids, enums, counters and timestamps.
2803
- */
2804
- private redactStepPatch;
2805
- /** Append a step to an existing run (used by "Continue" — spec 003). */
2806
- addStep(runId: string, step: Pick<StepState, 'id' | 'name' | 'kind' | 'synthetic'>): void;
2807
- updateStep(runId: string, stepId: string, patch: Partial<Omit<StepState, 'id'>>): void;
2808
- listArchiveOnMergeCandidates(afterSeq?: number, limit?: number): Array<{
2809
- id: string;
2810
- seq: number;
2811
- }>;
2812
- /** Use unnormalized persisted evidence: cold reads must not turn interrupted work into safety. */
2813
- private archiveFamily;
2814
- /** Blockers are feedback, never archive authority or cleanup permission. */
2815
- setArchiveBlocker(id: string, blocker: RunRecord['archiveBlocker']): void;
2816
- archiveMergeBlocker(snapshot: ArchiveOnMergeSnapshot, missing: ArchivePullRequestIdentity, repoBase?: string): void;
2817
- hasArchiveOnMergeAssociations(id: string): boolean;
2818
- prepareArchiveOnMerge(id: string): Promise<void>;
2819
- archiveOnMergeSnapshot(id: string, repoBase?: string, isActive?: (id: string) => boolean): ArchiveOnMergeSnapshot | undefined;
2820
- private archiveSnapshot;
2821
- /** No await between final revalidation and the fenced, all-or-nothing cascade. */
2822
- archiveAfterMerge(snapshot: ArchiveOnMergeSnapshot, observations: readonly MergedPullRequest[], repoBase?: string, isActive?: (id: string) => boolean): boolean;
2823
- setArchived(id: string, archived: boolean): RunRecord | undefined;
2824
- /** Parent + owned workers; returns how many records flipped `archived`. */
2825
- private applyArchivedCascade;
2826
- private applyArchived;
2827
- /** Transcript form follows `archived`: enqueue compression, or restore the plain file now. */
2828
- private syncTranscriptForm;
2829
- /**
2830
- * Whether this store may compress `id`'s transcript: the run exists, is archived, is not in a
2831
- * live status (queued/running/waiting), and this process holds the family's claim in `claimed`
2832
- * (not merely `pendingClaims`). Two processes never both write a run (#779, #818 B1).
2833
- */
2834
- private isHistoryCompressEligible;
2835
- /** Take the family claim if free and require it to be in `this.claimed`, not only pending. */
2836
- private holdsCompressClaim;
2837
- /** Startup sweep: enqueue every archived non-live run that still has a plain transcript. */
2838
- compressArchivedHistory(): void;
2839
- /** Resolves when the transcript compressor is idle (tests, shutdown). */
2840
- historyIdle(): Promise<void>;
2841
- /** Pin one run to the top of this project's task list, or unpin it (#935). Mirrors
2842
- * `setArchived`: sets the fields, then persists + broadcasts via `touch`, so the updated
2843
- * record rides the existing `run` SSE with no new event. Idempotent — re-pinning a pinned
2844
- * run just re-stamps `pinnedAt`.
2845
- *
2846
- * Every active status is pinnable. Archived requests clear stale metadata instead, so a
2847
- * late click racing archive cannot leave a hidden pin that reappears on unarchive. */
2848
- setPinned(id: string, pinned: boolean): RunRecord | undefined;
2849
- /** Bulk-archive finished runs (#780). `isSweepable` decides which; `archived` counts every
2850
- * record that flipped (cascaded workers included), `ids` lists the top-level runs picked and
2851
- * `pinnedIds` the subset that carried a pin before `clearPin` dropped it. */
2852
- archiveFinished(scope?: ArchiveFinishedScope, automation?: boolean): {
2853
- archived: number;
2854
- ids: string[];
2855
- pinnedIds: string[];
2856
- };
2857
- /** Mark one run as read (#unread-done-items): stamp the read receipt now. Mirrors
2858
- * `setArchived` — sets the field then persists + broadcasts via `touch`, so the
2859
- * updated record rides the existing `run` SSE with no new event. Idempotent by
2860
- * design: opening an already-read thread just re-stamps a later `seenAt`. */
2861
- setRead(id: string): RunRecord | undefined;
2862
- /** Mark one run as UNread (#775): drop the read receipt so the run rejoins the unread
2863
- * list. The inverse of `setRead` and, like it, `touch`es so the updated record rides the
2864
- * existing `run` SSE.
2865
- *
2866
- * Deleting the field rather than adding a "manually unread" flag is the whole point:
2867
- * absent `seenAt` is ALREADY what every reader treats as unread (`isUnread` in the
2868
- * cockpit's read-state.ts, and `markAllRead`'s clause-for-clause copy of it below), so
2869
- * clearing needs no new state and writes a shape any older cezar already parses.
2870
- *
2871
- * Deliberately unconditional: clearing a receipt is always a legal write, so this
2872
- * succeeds for an already-unread run (idempotent) and for statuses that can never wear
2873
- * the marker. WHETHER the action means anything for a given run is UI policy, and lives
2874
- * in the cockpit's `runActionFlags` — the same split the rest of the store keeps. */
2875
- setUnread(id: string): RunRecord | undefined;
2876
- /**
2877
- * Stamp unread finished runs in bulk and return the count. Keep the rule aligned with cockpit
2878
- * isUnread: done/failed, finished since seen, not archived; cancelled and usage-limit waiting
2879
- * runs are excluded. `automation` narrows it to one origin, as in `archiveFinished`
2880
- * (hearsay-tools/cezarion#1616); absent stamps both.
2881
- */
2882
- markAllRead(automation?: boolean): number;
2883
- appendEvent(runId: string, event: {
2884
- type: string;
2885
- stepId?: string | undefined;
2886
- [key: string]: unknown;
2887
- }): RunEvent;
2888
- /**
2889
- * Fold every PR URL in `haystack` into the run's referenced-tier working
2890
- * set and re-resolve `referencedPullRequestUrl` (spec
2891
- * 2026-07-16-pr-autodiscovery). Mutates the record in place — the caller
2892
- * owns persistence/fan-out — and reports whether anything changed.
2893
- */
2894
- private trackReferencedPrs;
2895
- /**
2896
- * The issue-side mirror of `trackReferencedPrs` (spec
2897
- * 2026-07-21-report-ref-discovery): fold every issue URL in `haystack` into
2898
- * the working set and re-resolve `referencedIssueUrl`. An unambiguous
2899
- * resolution also seeds `issueNumber` when nothing owns that field yet —
2900
- * marker and namer both outrank this janitor and overwrite it freely.
2901
- */
2902
- private trackReferencedIssues;
2903
- /**
2904
- * Apply agent-declared reference markers (spec 2026-07-18-task-ref-markers).
2905
- * Marker values are authoritative for the display tier: they overwrite the
2906
- * regex/namer numbers unless the prompt identifies the originating issue, and a declared PR re-resolves the referenced URL
2907
- * against the candidate working set — including down to `undefined` when no
2908
- * candidate matches (a wrong chip is worse than no chip). The created tier
2909
- * (`pullRequestUrl`) is deliberately untouched.
2910
- *
2911
- * One declaration is NOT a statement about the referenced tier: the number of the PR this run
2912
- * itself created. See `referencedPrDeclaration` — the marker contract asks the agent to
2913
- * re-declare after it opens a PR, and taking that literally cost the task the PR it was about.
2914
- */
2915
- applyMarkerRefs(runId: string, refs: {
2916
- pr?: number | undefined;
2917
- prs?: readonly number[] | undefined;
2918
- issue?: number | undefined;
2919
- }): RunRecord | undefined;
2920
- /** Authoritative creation keeps the first scalar for publishing, plus every created identity. */
2921
- recordCreatedPr(runId: string, url: string): RunRecord | undefined;
2922
- private accumulatePullRequests;
2923
- /**
2924
- * Fan an event out to live subscribers WITHOUT writing it to the NDJSON
2925
- * file — the channel for coalesced `item.delta` flushes (protocol-v2
2926
- * performance guardrail: raw deltas never hit disk; replay = the persisted
2927
- * snapshots). Stamped with `seq`/`ts` like persisted lines so the live
2928
- * wire keeps one ordering axis. Finite polling coalesces active item content
2929
- * into bounded in-memory snapshots on that clock; disk replay still has gaps
2930
- * (dedup compares with `>`).
2931
- */
2932
- emitEphemeral(runId: string, event: {
2933
- type: string;
2934
- stepId?: string;
2935
- [key: string]: unknown;
2936
- }): RunEvent;
2937
- /** Lazily-collected concrete secret values from the host env (#427). */
2938
- private secretValues;
2939
- /** Controller-issued tokens never persist, including when host-secret redaction is disabled. */
2940
- private readonly sessionSecrets;
2941
- registerSessionSecret(value: string): void;
2942
- containsSessionSecret(value: string): boolean;
2943
- /**
2944
- * Scrub known credential values / token shapes from an event before it is
2945
- * persisted or fanned out. On by default; `CEZ_REDACT_SECRETS=0` opts out.
2946
- */
2947
- private redact;
2948
- /** Best-effort scrub of one free-text string bound for `runs.json`. Honors
2949
- * the `CEZ_REDACT_SECRETS=0` opt-out itself so every caller inherits it. */
2950
- redactText(text: string): string;
2951
- private hostSecrets;
2952
- /** The run's indexed transcript facts (#880): a read-only view, never a transcript read once
2953
- * the run's index is loaded. An unreadable transcript answers as empty, as readEvents does. */
2954
- transcriptFacts(runId: string): Readonly<TranscriptFacts>;
2955
- /** The run's transcript facts when they are known: undefined when the transcript exists but its
2956
- * facts are not current or cannot be read, so a caller can tell "no ask" from "no evidence". */
2957
- knownTranscriptFacts(runId: string): Readonly<TranscriptFacts> | undefined;
2958
- hasProjection(runId: string, projectionId: string): boolean;
2959
- private factsWarming;
2960
- /** Indexed family enumeration, including members not yet flushed to SQLite. */
2961
- listFamilyRunIds(rootId: string): string[];
2962
- private recoveryFactIds;
2963
- /** Readiness owns no run snapshot across an await: refresh only the currently held owner. */
2964
- prepareTranscriptFacts(runIds: Iterable<string>): Promise<void>;
2965
- prepareRecoveryFacts(familyRootId?: string): Promise<void>;
2966
- /** Register IDs only here; the index yields between cache reads and off-loop rebuilds. */
2967
- private warmTranscriptFacts;
2968
- /** Resolves when the open-time warm-up is done (tests). */
2969
- factsWarmIdle(): Promise<void>;
2970
- /** `readEvents` off the event loop (async read and async brotli), for collection paths. */
2971
- readEventsAsync(runId: string): Promise<RunEvent[]>;
2972
- readEvents(runId: string): RunEvent[];
2973
- /** Private process-generation evidence; never part of run JSON or SSE. */
2974
- private identityPath;
2975
- readWorkerIdentity(id: string): WorkerExecutionIdentity | undefined;
2976
- private writeWorkerIdentity;
2977
- private executionPath;
2978
- readWorkerExecution(id: string): WorkerExecution | undefined;
2979
- private writeWorkerExecution;
2980
- /** Complete execution is not permission to reuse/delete persistent resources (#738).
2981
- * Synchronous, fresh and generation/resource fenced; callers hold admission off across awaits. */
2982
- workerResourcesSafe(id: string, generation: string, resourceId: string, admittingQueued?: boolean): boolean;
2983
- /** `workerResourcesSafe` with the refusal's live PIDs (empty when no PID explains it). */
2984
- workerResourceHolders(id: string, generation: string, resourceId: string, opts?: {
2985
- admittingQueued?: boolean;
2986
- cwds?: CwdSource | undefined;
2987
- }): 'safe' | number[];
2988
- /** Upgrade a legacy completed checkpoint while terminal task ownership is still known.
2989
- * No holder scan here: settlement and scheduling must never wait on cleanup proof. */
2990
- retainWorkerScratchCleanup(id: string): void;
2991
- /** Cleanup can outlive its index row, but never its generation or terminal task intent.
2992
- * `cwds` is the scratch reprobe tick's shared `/proc` snapshot (hearsay-tools/cezarion#879). */
2993
- workerScratchResourcesSafe(id: string, generation: string, resourceId: string, cwds?: CwdSource): boolean;
2994
- commitWorkerExecutionStart(id: string): string;
2995
- /** Private process record (#469): which processes a generation spawned, never part of run JSON or SSE. */
2996
- private processesPath;
2997
- /** Tri-state: only ENOENT is `absent` (legacy, scan-only). A present record that is unreadable,
2998
- * wrongly permissioned, malformed or of another generation is `unknown`: never finalized or reaped. */
2999
- readWorkerProcesses(id: string, generation: string): WorkerProcessRecord | 'absent' | 'unknown';
3000
- private writeWorkerProcesses;
3001
- /** Bound to the current generation. Past the cap the record never drops an entry: the
3002
- * working-directory scan is the remaining evidence. */
3003
- appendWorkerProcess(id: string, generation: string, pid: number, pgid?: number): boolean;
3004
- commitWorkerExecutionComplete(id: string, generation: string): boolean;
3005
- /** Cancellation must hit disk before queued no-start evidence authorizes cleanup. */
3006
- commitWorkerCancellation(id: string): void;
3007
- /** Complete replacement evidence can stand in for absent child history, never for a present execution. */
3008
- readDeletedWorkerResult(parentId: string, workerId: string): WorkerCollectedResult | undefined;
3009
- /** A deleted child's receipt replaces the private proof only after the deletion checkpoint. */
3010
- private workerDeletionEvidence;
3011
- canDeleteRun(id: string): boolean;
3012
- /** Delegated history deletion is synchronous and checkpointed; any failed byte/index removal remains retryable. */
3013
- private deleteDelegatedRun;
3014
- private removeRunHistoryBytes;
3015
- deleteRun(id: string): boolean;
3016
- /** Write the pending rows out now (used on shutdown). */
3017
- flush(): void;
3018
- private seqs;
3019
- private nextSeq;
3020
- /** After a restart the in-memory counter is empty while the run's NDJSON file
3021
- * keeps the history. Restarting from 1 would collide with the seqs a client
3022
- * already replayed — its `seq > maxSeq` dedup then silently drops every
3023
- * resumed event, even across a reload (the frozen-transcript symptom class
3024
- * of #424). One file read on the first post-restart append per run. */
3025
- private rehydrateSeq;
3026
- private eventsPath;
3027
- /** Same location `handoffPath()` in handoff.ts produces — inlined to keep
3028
- * the store free of upward imports. */
3029
- private handoffPath;
3030
- /** Agent screenshots persisted by the run manager (see persistImage). */
3031
- private imagesDir;
3032
- private touch;
3033
- /** Form follows archived: a terminal archived run with a plain transcript is queued again. */
3034
- private maybeEnqueueHistoryCompress;
3035
- /** The held record is gone; the next save or commit deletes its row, fenced by `family`'s claim
3036
- * and by the revision this store last saw (kept in `base` until the delete is written). */
3037
- private markDeleted;
3038
- /** A deleted run's history files, once the delete of its row has committed. Best effort, as
3039
- * deletion always was. */
3040
- private removeOwedHistory;
3041
- /**
3042
- * Count-based history retention: of the runs past the newest `MAX_RUNS_KEPT` unarchived ones,
3043
- * archive each finished run without delegation that is not pinned and whose family this store
3044
- * can claim. Ranked over the row keys (the `created_at` index, no record decoded) with memory
3045
- * laid over them, since a run created or archived since the last save has no row yet; the rows
3046
- * past the cut are then filtered in `runs.db`, so only real candidates decode. Archived runs
3047
- * are never deleted by retention — only an explicit delete, worker destruction, or history
3048
- * deletion removes a run.
3049
- */
3050
- private pruneOldRuns;
3051
- /** Debounced so token-usage updates don't rewrite a row per event. Nothing to schedule without
3052
- * a database: a `RunStore.unavailable` store, or a closed one, writes nothing. */
3053
- private scheduleSave;
3054
- /** The single database write, so a test can fail it the way a full disk would. */
3055
- private writeIndex;
3056
- /**
3057
- * Write `staged` plus everything still pending — dirty rows from memory, deletions — in one
3058
- * transaction, then clear the pending marks. Throws with nothing cleared when it fails.
3059
- * Never copies or sorts the whole store: the cost is the rows that changed.
3060
- *
3061
- * Fenced (#779, plan step 3): the transaction commits only if every family it writes still
3062
- * carries this store's claim and every row is at the revision this store last saw. Otherwise
3063
- * nothing is written and `handleConflicts` deals with the rows that changed under it.
3064
- */
3065
- private persist;
3066
- /** What a write of these rows (id → family) must still find: this store's claims, at the
3067
- * generations it took them, and each row at the revision it last saw (none for a new row). */
3068
- private fence;
3069
- /**
3070
- * Handle a fenced-write conflict. Save unexpected conflict evidence before clearing pending
3071
- * state or quarantining the row. If evidence persistence fails, retain pending writes. Other
3072
- * rows remain writable; stale unclaimed reads only fail their write.
3073
- */
3074
- private handleConflicts;
3075
- /** Write what is pending, then (unless closing) let every run whose write settled leave memory. */
3076
- private saveNow;
3077
- /**
3078
- * Write what is pending and release the database (store disposal, process shutdown).
3079
- * Idempotent. A closed store keeps answering reads for what it holds — the final save evicts
3080
- * nothing — but cannot read `runs.db` any more, so a run that had already left memory reads as
3081
- * absent. It saves nothing more, and a durable commit on it throws.
3082
- */
3083
- close(): void;
3084
- }
3085
- export interface ArchiveOnMergeSnapshot {
3086
- rootId: string;
3087
- fingerprint: string;
3088
- pullRequests: ArchivePullRequestIdentity[];
3089
- token: string;
3090
- }