@wjarka/cezarion 0.15.1 → 0.16.0

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 (462) hide show
  1. package/README.md +167 -46
  2. package/dist/agent-config/catalog.d.ts +6 -2
  3. package/dist/agent-config/catalog.js +78 -3
  4. package/dist/agent-config/catalog.js.map +1 -1
  5. package/dist/agent-config/model-settings/shared.js +6 -3
  6. package/dist/agent-config/model-settings/shared.js.map +1 -1
  7. package/dist/agent-config/models.js +4 -0
  8. package/dist/agent-config/models.js.map +1 -1
  9. package/dist/agent-config/validate.js +6 -0
  10. package/dist/agent-config/validate.js.map +1 -1
  11. package/dist/artifacts/cli.js +10 -2
  12. package/dist/artifacts/cli.js.map +1 -1
  13. package/dist/automations/coordinator.d.ts +7 -0
  14. package/dist/automations/coordinator.js +22 -2
  15. package/dist/automations/coordinator.js.map +1 -1
  16. package/dist/automations/github-poller.d.ts +4 -4
  17. package/dist/automations/github-poller.js.map +1 -1
  18. package/dist/automations/schedule-runner.d.ts +130 -0
  19. package/dist/automations/schedule-runner.js +326 -0
  20. package/dist/automations/schedule-runner.js.map +1 -0
  21. package/dist/automations/scheduler.d.ts +38 -7
  22. package/dist/automations/scheduler.js +90 -22
  23. package/dist/automations/scheduler.js.map +1 -1
  24. package/dist/automations/store.d.ts +80 -3
  25. package/dist/automations/store.js +208 -16
  26. package/dist/automations/store.js.map +1 -1
  27. package/dist/automations/task-template.d.ts +42 -6
  28. package/dist/automations/task-template.js +152 -24
  29. package/dist/automations/task-template.js.map +1 -1
  30. package/dist/automations/types.d.ts +142 -6
  31. package/dist/automations/types.js +64 -6
  32. package/dist/automations/types.js.map +1 -1
  33. package/dist/autosave-holders.js +8 -12
  34. package/dist/autosave-holders.js.map +1 -1
  35. package/dist/ci-wait/client.d.ts +8 -1
  36. package/dist/ci-wait/client.js +43 -1
  37. package/dist/ci-wait/client.js.map +1 -1
  38. package/dist/ci-wait/controller.d.ts +83 -4
  39. package/dist/ci-wait/controller.js +76 -11
  40. package/dist/ci-wait/controller.js.map +1 -1
  41. package/dist/ci-wait/errors.d.ts +7 -1
  42. package/dist/ci-wait/errors.js +36 -0
  43. package/dist/ci-wait/errors.js.map +1 -1
  44. package/dist/ci-wait/github.d.ts +2 -0
  45. package/dist/ci-wait/github.js +3 -1
  46. package/dist/ci-wait/github.js.map +1 -1
  47. package/dist/ci-wait/mcp.d.ts +2 -98
  48. package/dist/ci-wait/mcp.js +11 -25
  49. package/dist/ci-wait/mcp.js.map +1 -1
  50. package/dist/ci-wait/supervisor.d.ts +2 -1
  51. package/dist/ci-wait/supervisor.js +2 -1
  52. package/dist/ci-wait/supervisor.js.map +1 -1
  53. package/dist/ci-wait/tools.d.ts +307 -0
  54. package/dist/ci-wait/tools.js +63 -0
  55. package/dist/ci-wait/tools.js.map +1 -0
  56. package/dist/config.d.ts +3 -0
  57. package/dist/config.js +7 -0
  58. package/dist/config.js.map +1 -1
  59. package/dist/contract/agent-config.d.ts +5 -0
  60. package/dist/contract/agent-profiles.d.ts +15 -0
  61. package/dist/contract/automation-schedule.d.ts +60 -0
  62. package/dist/contract/automations.d.ts +208 -36
  63. package/dist/contract/delegation.d.ts +96 -0
  64. package/dist/contract/discovery.d.ts +7 -0
  65. package/dist/contract/github.d.ts +1 -0
  66. package/dist/contract/health.d.ts +6 -0
  67. package/dist/contract/index.d.ts +3 -0
  68. package/dist/contract/index.js +1445 -745
  69. package/dist/contract/preview.d.ts +508 -0
  70. package/dist/contract/runs.d.ts +716 -15
  71. package/dist/contract/skills.d.ts +39 -0
  72. package/dist/contract/workflows.d.ts +6 -0
  73. package/dist/contract/workspace.d.ts +65 -0
  74. package/dist/contract/zoned-time.d.ts +35 -0
  75. package/dist/core/agent-env.d.ts +11 -0
  76. package/dist/core/agent-env.js +27 -5
  77. package/dist/core/agent-env.js.map +1 -1
  78. package/dist/core/agent-profiles.js +7 -0
  79. package/dist/core/agent-profiles.js.map +1 -1
  80. package/dist/core/agent-runner.d.ts +49 -1
  81. package/dist/core/agent-runner.js +2 -1
  82. package/dist/core/agent-runner.js.map +1 -1
  83. package/dist/core/backend-detect.d.ts +3 -2
  84. package/dist/core/backend-detect.js +27 -1
  85. package/dist/core/backend-detect.js.map +1 -1
  86. package/dist/core/claude-cli-runner.d.ts +1 -0
  87. package/dist/core/claude-cli-runner.js +69 -19
  88. package/dist/core/claude-cli-runner.js.map +1 -1
  89. package/dist/core/codex-app-server-runner.d.ts +1 -0
  90. package/dist/core/codex-app-server-runner.js +200 -25
  91. package/dist/core/codex-app-server-runner.js.map +1 -1
  92. package/dist/core/codex-app-server-transport.d.ts +7 -3
  93. package/dist/core/codex-app-server-transport.js +11 -9
  94. package/dist/core/codex-app-server-transport.js.map +1 -1
  95. package/dist/core/cursor-acp-runner.d.ts +1 -0
  96. package/dist/core/cursor-acp-runner.js +24 -9
  97. package/dist/core/cursor-acp-runner.js.map +1 -1
  98. package/dist/core/host-model-catalog.js +2 -0
  99. package/dist/core/host-model-catalog.js.map +1 -1
  100. package/dist/core/managed-session.js +2 -0
  101. package/dist/core/managed-session.js.map +1 -1
  102. package/dist/core/model-identity.js +2 -0
  103. package/dist/core/model-identity.js.map +1 -1
  104. package/dist/core/model-presets.js +3 -0
  105. package/dist/core/model-presets.js.map +1 -1
  106. package/dist/core/omp-model-catalog.d.ts +43 -0
  107. package/dist/core/omp-model-catalog.js +205 -0
  108. package/dist/core/omp-model-catalog.js.map +1 -0
  109. package/dist/core/omp-runner.d.ts +73 -0
  110. package/dist/core/omp-runner.js +990 -0
  111. package/dist/core/omp-runner.js.map +1 -0
  112. package/dist/core/omp-ui-mapper.d.ts +106 -0
  113. package/dist/core/omp-ui-mapper.js +882 -0
  114. package/dist/core/omp-ui-mapper.js.map +1 -0
  115. package/dist/core/opencode-server-runner.d.ts +18 -4
  116. package/dist/core/opencode-server-runner.js +337 -96
  117. package/dist/core/opencode-server-runner.js.map +1 -1
  118. package/dist/core/opencode-session-error.d.ts +11 -0
  119. package/dist/core/opencode-session-error.js +26 -0
  120. package/dist/core/opencode-session-error.js.map +1 -0
  121. package/dist/core/opencode-ui-mapper.js +4 -36
  122. package/dist/core/opencode-ui-mapper.js.map +1 -1
  123. package/dist/core/pi-runner.d.ts +1 -0
  124. package/dist/core/pi-runner.js +75 -12
  125. package/dist/core/pi-runner.js.map +1 -1
  126. package/dist/core/provider-auth.d.ts +9 -2
  127. package/dist/core/provider-auth.js +43 -6
  128. package/dist/core/provider-auth.js.map +1 -1
  129. package/dist/core/runner-factory.js +3 -0
  130. package/dist/core/runner-factory.js.map +1 -1
  131. package/dist/core/runner-model-catalog.js +1 -0
  132. package/dist/core/runner-model-catalog.js.map +1 -1
  133. package/dist/core/runner-stderr.d.ts +2 -0
  134. package/dist/core/runner-stderr.js +20 -0
  135. package/dist/core/runner-stderr.js.map +1 -0
  136. package/dist/core/session-process.d.ts +22 -0
  137. package/dist/core/session-process.js +202 -0
  138. package/dist/core/session-process.js.map +1 -0
  139. package/dist/core/ui-events.d.ts +1 -1
  140. package/dist/core/usage-limit.js +3 -60
  141. package/dist/core/usage-limit.js.map +1 -1
  142. package/dist/data-gitignore.d.ts +6 -0
  143. package/dist/data-gitignore.js +57 -0
  144. package/dist/data-gitignore.js.map +1 -0
  145. package/dist/delegation/capacity.d.ts +19 -0
  146. package/dist/delegation/capacity.js +34 -0
  147. package/dist/delegation/capacity.js.map +1 -0
  148. package/dist/delegation/cli.js +13 -4
  149. package/dist/delegation/cli.js.map +1 -1
  150. package/dist/delegation/conversations.d.ts +4 -2
  151. package/dist/delegation/conversations.js +8 -12
  152. package/dist/delegation/conversations.js.map +1 -1
  153. package/dist/delegation/credentials.d.ts +2 -0
  154. package/dist/delegation/credentials.js +10 -0
  155. package/dist/delegation/credentials.js.map +1 -1
  156. package/dist/delegation/destroy-observation.d.ts +42 -0
  157. package/dist/delegation/destroy-observation.js +115 -0
  158. package/dist/delegation/destroy-observation.js.map +1 -0
  159. package/dist/delegation/execution-identity.d.ts +6 -0
  160. package/dist/delegation/execution-identity.js +1 -1
  161. package/dist/delegation/execution-identity.js.map +1 -1
  162. package/dist/delegation/policy.d.ts +3 -2
  163. package/dist/delegation/policy.js +7 -5
  164. package/dist/delegation/policy.js.map +1 -1
  165. package/dist/delegation/process-liveness.d.ts +57 -20
  166. package/dist/delegation/process-liveness.js +114 -92
  167. package/dist/delegation/process-liveness.js.map +1 -1
  168. package/dist/delegation/provision.js +6 -6
  169. package/dist/delegation/provision.js.map +1 -1
  170. package/dist/delegation/results.js +4 -2
  171. package/dist/delegation/results.js.map +1 -1
  172. package/dist/delegation/retry-backoff.d.ts +23 -0
  173. package/dist/delegation/retry-backoff.js +18 -0
  174. package/dist/delegation/retry-backoff.js.map +1 -0
  175. package/dist/delegation/routes.d.ts +64 -58
  176. package/dist/delegation/scratch-cleanup.d.ts +29 -0
  177. package/dist/delegation/scratch-cleanup.js +143 -0
  178. package/dist/delegation/scratch-cleanup.js.map +1 -0
  179. package/dist/delegation/service.d.ts +20 -1
  180. package/dist/delegation/service.js +233 -70
  181. package/dist/delegation/service.js.map +1 -1
  182. package/dist/delegation/transport.d.ts +12 -6
  183. package/dist/delegation/workspace.d.ts +23 -4
  184. package/dist/delegation/workspace.js +147 -31
  185. package/dist/delegation/workspace.js.map +1 -1
  186. package/dist/git-worktree-lock-helper.js +8 -3
  187. package/dist/git-worktree-lock-helper.js.map +1 -1
  188. package/dist/git-worktree-lock.d.ts +6 -1
  189. package/dist/git-worktree-lock.js +10 -4
  190. package/dist/git-worktree-lock.js.map +1 -1
  191. package/dist/git-worktree-release.d.ts +20 -0
  192. package/dist/git-worktree-release.js +27 -0
  193. package/dist/git-worktree-release.js.map +1 -0
  194. package/dist/git-worktree.d.ts +8 -2
  195. package/dist/git-worktree.js +19 -2
  196. package/dist/git-worktree.js.map +1 -1
  197. package/dist/handoff.d.ts +2 -2
  198. package/dist/handoff.js +1 -1
  199. package/dist/index.js +109 -76
  200. package/dist/index.js.map +1 -1
  201. package/dist/paths.d.ts +1 -1
  202. package/dist/paths.js +5 -1
  203. package/dist/paths.js.map +1 -1
  204. package/dist/preview/cdp.d.ts +13 -0
  205. package/dist/preview/cdp.js +69 -0
  206. package/dist/preview/cdp.js.map +1 -0
  207. package/dist/preview/chromium.d.ts +75 -0
  208. package/dist/preview/chromium.js +394 -0
  209. package/dist/preview/chromium.js.map +1 -0
  210. package/dist/preview/dev-server.d.ts +68 -0
  211. package/dist/preview/dev-server.js +341 -0
  212. package/dist/preview/dev-server.js.map +1 -0
  213. package/dist/preview/host.d.ts +154 -0
  214. package/dist/preview/host.js +681 -0
  215. package/dist/preview/host.js.map +1 -0
  216. package/dist/preview/registration.d.ts +63 -0
  217. package/dist/preview/registration.js +109 -0
  218. package/dist/preview/registration.js.map +1 -0
  219. package/dist/preview/session.d.ts +73 -0
  220. package/dist/preview/session.js +347 -0
  221. package/dist/preview/session.js.map +1 -0
  222. package/dist/preview/url.d.ts +6 -0
  223. package/dist/preview/url.js +17 -0
  224. package/dist/preview/url.js.map +1 -0
  225. package/dist/runs/agent-tmpdir-removal.d.ts +15 -0
  226. package/dist/runs/agent-tmpdir-removal.js +60 -0
  227. package/dist/runs/agent-tmpdir-removal.js.map +1 -0
  228. package/dist/runs/agent-tmpdir.d.ts +12 -1
  229. package/dist/runs/agent-tmpdir.js +123 -34
  230. package/dist/runs/agent-tmpdir.js.map +1 -1
  231. package/dist/runs/delegation-state.d.ts +5 -1
  232. package/dist/runs/delegation-state.js +9 -0
  233. package/dist/runs/delegation-state.js.map +1 -1
  234. package/dist/runs/event-history.d.ts +4 -4
  235. package/dist/runs/event-history.js +97 -117
  236. package/dist/runs/event-history.js.map +1 -1
  237. package/dist/runs/history-compressor.d.ts +29 -0
  238. package/dist/runs/history-compressor.js +116 -0
  239. package/dist/runs/history-compressor.js.map +1 -0
  240. package/dist/runs/history-file.d.ts +36 -0
  241. package/dist/runs/history-file.js +463 -0
  242. package/dist/runs/history-file.js.map +1 -0
  243. package/dist/runs/human-ask-summary.js +18 -13
  244. package/dist/runs/human-ask-summary.js.map +1 -1
  245. package/dist/runs/legacy-index.d.ts +62 -0
  246. package/dist/runs/legacy-index.js +168 -0
  247. package/dist/runs/legacy-index.js.map +1 -0
  248. package/dist/runs/raw-record.d.ts +52 -0
  249. package/dist/runs/raw-record.js +145 -0
  250. package/dist/runs/raw-record.js.map +1 -0
  251. package/dist/runs/retention.d.ts +13 -6
  252. package/dist/runs/retention.js +42 -13
  253. package/dist/runs/retention.js.map +1 -1
  254. package/dist/runs/run-claims.d.ts +23 -0
  255. package/dist/runs/run-claims.js +24 -0
  256. package/dist/runs/run-claims.js.map +1 -0
  257. package/dist/runs/run-database.d.ts +385 -0
  258. package/dist/runs/run-database.js +930 -0
  259. package/dist/runs/run-database.js.map +1 -0
  260. package/dist/runs/run-index.d.ts +35 -9
  261. package/dist/runs/run-index.js +200 -25
  262. package/dist/runs/run-index.js.map +1 -1
  263. package/dist/runs/run-row.d.ts +44 -0
  264. package/dist/runs/run-row.js +84 -0
  265. package/dist/runs/run-row.js.map +1 -0
  266. package/dist/runs/run-search.d.ts +29 -0
  267. package/dist/runs/run-search.js +63 -0
  268. package/dist/runs/run-search.js.map +1 -0
  269. package/dist/runs/store-open-error.d.ts +24 -0
  270. package/dist/runs/store-open-error.js +61 -0
  271. package/dist/runs/store-open-error.js.map +1 -0
  272. package/dist/runs/store.d.ts +667 -32
  273. package/dist/runs/store.js +2153 -324
  274. package/dist/runs/store.js.map +1 -1
  275. package/dist/runs/transcript-facts.d.ts +77 -0
  276. package/dist/runs/transcript-facts.js +302 -0
  277. package/dist/runs/transcript-facts.js.map +1 -0
  278. package/dist/runs/webhook.js +5 -4
  279. package/dist/runs/webhook.js.map +1 -1
  280. package/dist/runs/worker-execution.d.ts +22 -0
  281. package/dist/runs/worker-execution.js +30 -0
  282. package/dist/runs/worker-execution.js.map +1 -0
  283. package/dist/server/capabilities.d.ts +1 -0
  284. package/dist/server/capabilities.js +2 -0
  285. package/dist/server/capabilities.js.map +1 -1
  286. package/dist/server/cockpit-ownership.d.ts +8 -0
  287. package/dist/server/cockpit-ownership.js +19 -0
  288. package/dist/server/cockpit-ownership.js.map +1 -1
  289. package/dist/server/forge/github.d.ts +1 -4
  290. package/dist/server/forge/github.js +47 -23
  291. package/dist/server/forge/github.js.map +1 -1
  292. package/dist/server/git.js +1 -1
  293. package/dist/server/git.js.map +1 -1
  294. package/dist/server/open-in-app.js +1 -0
  295. package/dist/server/open-in-app.js.map +1 -1
  296. package/dist/server/preview-socket.d.ts +36 -0
  297. package/dist/server/preview-socket.js +126 -0
  298. package/dist/server/preview-socket.js.map +1 -0
  299. package/dist/server/project-context.d.ts +31 -4
  300. package/dist/server/project-context.js +73 -9
  301. package/dist/server/project-context.js.map +1 -1
  302. package/dist/server/provider-action-gate.js +1 -0
  303. package/dist/server/provider-action-gate.js.map +1 -1
  304. package/dist/server/repo-branches.d.ts +4 -3
  305. package/dist/server/repo-branches.js +5 -4
  306. package/dist/server/repo-branches.js.map +1 -1
  307. package/dist/server/server.d.ts +4500 -2727
  308. package/dist/server/server.js +651 -202
  309. package/dist/server/server.js.map +1 -1
  310. package/dist/server/upgrade-router.d.ts +23 -0
  311. package/dist/server/upgrade-router.js +53 -0
  312. package/dist/server/upgrade-router.js.map +1 -0
  313. package/dist/server/validators.d.ts +6 -1
  314. package/dist/server/validators.js +4 -4
  315. package/dist/server/validators.js.map +1 -1
  316. package/dist/server/ws.d.ts +16 -16
  317. package/dist/server/ws.js +56 -54
  318. package/dist/server/ws.js.map +1 -1
  319. package/dist/skills-remote.d.ts +14 -0
  320. package/dist/skills-remote.js +91 -15
  321. package/dist/skills-remote.js.map +1 -1
  322. package/dist/task-cli/cli.js +40 -16
  323. package/dist/task-cli/cli.js.map +1 -1
  324. package/dist/task-cli/discovery.d.ts +4 -3
  325. package/dist/task-cli/discovery.js +4 -3
  326. package/dist/task-cli/discovery.js.map +1 -1
  327. package/dist/task-cli/http.d.ts +2 -0
  328. package/dist/task-cli/http.js +10 -4
  329. package/dist/task-cli/http.js.map +1 -1
  330. package/dist/task-cli/projections.d.ts +5 -2
  331. package/dist/task-cli/projections.js +13 -0
  332. package/dist/task-cli/projections.js.map +1 -1
  333. package/dist/task-cli/watch.d.ts +15 -2
  334. package/dist/task-cli/watch.js +31 -9
  335. package/dist/task-cli/watch.js.map +1 -1
  336. package/dist/ui-state.d.ts +4 -3
  337. package/dist/ui-state.js +8 -3
  338. package/dist/ui-state.js.map +1 -1
  339. package/dist/workflows/grouped-command.d.ts +31 -0
  340. package/dist/workflows/grouped-command.js +143 -0
  341. package/dist/workflows/grouped-command.js.map +1 -0
  342. package/dist/workflows/run.d.ts +223 -42
  343. package/dist/workflows/run.js +1316 -398
  344. package/dist/workflows/run.js.map +1 -1
  345. package/dist/workflows/types.d.ts +12 -0
  346. package/dist/workflows/types.js +20 -0
  347. package/dist/workflows/types.js.map +1 -1
  348. package/dist/workspace/agent-accounts.d.ts +5 -1
  349. package/dist/workspace/agent-accounts.js +1 -0
  350. package/dist/workspace/agent-accounts.js.map +1 -1
  351. package/dist/workspace/agent-profiles.js +1 -1
  352. package/dist/workspace/agent-profiles.js.map +1 -1
  353. package/dist/workspace/config.d.ts +3 -1
  354. package/dist/workspace/config.js +1 -0
  355. package/dist/workspace/config.js.map +1 -1
  356. package/dist/worktree-setup.d.ts +85 -0
  357. package/dist/worktree-setup.js +164 -0
  358. package/dist/worktree-setup.js.map +1 -0
  359. package/package.json +7 -5
  360. package/scripts/benchmark-run-store-fixture.ts +428 -0
  361. package/scripts/benchmark-run-store.ts +743 -0
  362. package/scripts/benchmark-stuck-destroys.ts +143 -0
  363. package/scripts/mock-autonomous.mjs +11 -0
  364. package/scripts/mock-ci-tool.mjs +20 -5
  365. package/scripts/mock-claude.mjs +110 -1
  366. package/scripts/mock-codex-app-server.mjs +117 -2
  367. package/scripts/mock-codex-coalesce-steer.mjs +59 -0
  368. package/scripts/mock-codex-reverse-steer.mjs +130 -0
  369. package/scripts/mock-cursor-acp.mjs +75 -1
  370. package/scripts/mock-omp-rpc.mjs +605 -0
  371. package/scripts/mock-opencode-serve.mjs +312 -22
  372. package/scripts/mock-pi-rpc.mjs +109 -3
  373. package/scripts/mock-runner-crash.mjs +42 -0
  374. package/scripts/mock-silent-tail.mjs +78 -0
  375. package/scripts/mock-turn-messages.mjs +5 -0
  376. package/scripts/omp-ci-wait.mjs +29 -0
  377. package/scripts/omp-restrict-delegation.yml +4 -0
  378. package/scripts/pi-ci-wait.mjs +12 -9
  379. package/scripts/seed-archive-profile.ts +3 -3
  380. package/web/dist/assets/agent-accounts-CFOBMVHc.js +1 -0
  381. package/web/dist/assets/alert-dialog-BrpNUwMt.js +1 -0
  382. package/web/dist/assets/app-window-CSHwDX9N.js +1 -0
  383. package/web/dist/assets/button-C_rd7CPp.js +43 -0
  384. package/web/dist/assets/compare-variants-D6WXhvXA.js +1 -0
  385. package/web/dist/assets/diff-DrEARXTV.js +3 -0
  386. package/web/dist/assets/diff-controls-B1-j7nFg.js +1 -0
  387. package/web/dist/assets/{diff-view-DPn6bQ5W.js → diff-view-DvGLjdTk.js} +3 -3
  388. package/web/dist/assets/dropdown-menu-BegOZFrj.js +1 -0
  389. package/web/dist/assets/format-DpNe3S0A.js +1 -0
  390. package/web/dist/assets/git-toolbar-Cw4ljmhB.js +1 -0
  391. package/web/dist/assets/github-CfV5sqL0.js +1 -0
  392. package/web/dist/assets/{image-preview-DJ8cgb1Z.js → image-preview-FOEfqpZP.js} +1 -1
  393. package/web/dist/assets/index-DgWWlOLy.js +13 -0
  394. package/web/dist/assets/index-fBFnuvxu.css +1 -0
  395. package/web/dist/assets/{nav-row-styles-3j64kH5s.js → nav-row-styles-vp2JbhuJ.js} +1 -1
  396. package/web/dist/assets/play-CmVAj_fu.js +1 -0
  397. package/web/dist/assets/popover-BohP6WTx.js +1 -0
  398. package/web/dist/assets/preview-pane-connected-qTA5KNoJ.js +3 -0
  399. package/web/dist/assets/preview-state-vuMviq6q.js +1 -0
  400. package/web/dist/assets/prompt-templates-Cubdut_C.js +15 -0
  401. package/web/dist/assets/repo-git-Cf4t5PD0.js +1 -0
  402. package/web/dist/assets/{run-diff-5-RRdcVz.js → run-diff-BpkUW37Z.js} +3 -3
  403. package/web/dist/assets/run-header-68WHf9wV.js +1 -0
  404. package/web/dist/assets/skills-DiVIgKeU.js +1 -0
  405. package/web/dist/assets/square-terminal-B6RYYieR.js +1 -0
  406. package/web/dist/assets/status-dot-CqTJHSP9.js +1 -0
  407. package/web/dist/assets/{tab-link-K0hjzEXR.js → tab-link-B07Hu4QX.js} +1 -1
  408. package/web/dist/assets/task-changes--lQF6EYf.js +1 -0
  409. package/web/dist/assets/task-commits-Cx0qy4DN.js +1 -0
  410. package/web/dist/assets/task-files-D50s-gKW.js +2 -0
  411. package/web/dist/assets/task-github-item-DaqmSwYT.js +1 -0
  412. package/web/dist/assets/task-thread-BPQ64lui.js +7 -0
  413. package/web/dist/assets/{task-thread-Bw_nQuTx.css → task-thread-zNE2Q9E-.css} +1 -1
  414. package/web/dist/assets/textarea-D20O4Pw0.js +1 -0
  415. package/web/dist/assets/thread-state-DWcFMrvb.js +4 -0
  416. package/web/dist/assets/use-hand-to-agent-state-BLIGmwbd.css +1 -0
  417. package/web/dist/assets/use-hand-to-agent-state-Cy9eyyfL.js +1 -0
  418. package/web/dist/assets/{utils-fzNfbPzA.js → utils-JsL3ZsJf.js} +1 -1
  419. package/web/dist/assets/workflows-jwG7uxqi.js +11 -0
  420. package/web/dist/assets/{zoomable-image-CDmZ_Rtl.js → zoomable-image-BJJ64KGc.js} +1 -1
  421. package/web/dist/cezarion-lockup-dark.svg +1 -13
  422. package/web/dist/cezarion-lockup-light.svg +1 -13
  423. package/web/dist/cezarion-mark-dark.svg +1 -12
  424. package/web/dist/cezarion-mark-light.svg +1 -12
  425. package/web/dist/index.html +16 -21
  426. package/web/dist/assets/agent-accounts-CU2ZDv24.js +0 -1
  427. package/web/dist/assets/alert-dialog-C-xYE_dg.js +0 -43
  428. package/web/dist/assets/chevron-right-BENZ-1ZN.js +0 -1
  429. package/web/dist/assets/collapsible-DD9J91Iv.js +0 -1
  430. package/web/dist/assets/compare-variants-5FmqpFSN.js +0 -1
  431. package/web/dist/assets/diff-controls-Bj0YrioE.js +0 -1
  432. package/web/dist/assets/diff-rE8rm75J2.js +0 -3
  433. package/web/dist/assets/diff-stat-BKDCSVfJ.js +0 -1
  434. package/web/dist/assets/dropdown-menu-Ch5BYQh_.js +0 -1
  435. package/web/dist/assets/format-dBiNDNVe.js +0 -1
  436. package/web/dist/assets/git-toolbar-ClVvf5iF.js +0 -1
  437. package/web/dist/assets/github-BkNOyour.css +0 -1
  438. package/web/dist/assets/github-DeZMeMwJ.js +0 -1
  439. package/web/dist/assets/github-item-detail-W5F6GVjF.js +0 -1
  440. package/web/dist/assets/github-sidebar-model-DcMu-IK2.js +0 -1
  441. package/web/dist/assets/highlighter-CdHqIwFr.js +0 -3
  442. package/web/dist/assets/index-CatemBEL.js +0 -8
  443. package/web/dist/assets/index-MvfD8bZJ.css +0 -1
  444. package/web/dist/assets/markdown-zdKeLIYA.js +0 -2
  445. package/web/dist/assets/mobile-run-bar-BCfmFi8V.js +0 -1
  446. package/web/dist/assets/prompt-templates-CBPp39IU.js +0 -15
  447. package/web/dist/assets/reference-chip-D6owncJT.js +0 -1
  448. package/web/dist/assets/repo-git-CtdkZFey.js +0 -1
  449. package/web/dist/assets/run-header-BcjoDi0W.js +0 -1
  450. package/web/dist/assets/sheet-ChnYVrp1.js +0 -1
  451. package/web/dist/assets/skills-C8YKp2vr.js +0 -1
  452. package/web/dist/assets/task-changes-BW8YdWG8.js +0 -1
  453. package/web/dist/assets/task-commits-q2kB2y6L.js +0 -1
  454. package/web/dist/assets/task-files-pPL6_3Cr.js +0 -2
  455. package/web/dist/assets/task-github-item-BXF5R52U.js +0 -1
  456. package/web/dist/assets/task-thread-DtkFL3EC.js +0 -10
  457. package/web/dist/assets/textarea-DxlkE-Yd.js +0 -1
  458. package/web/dist/assets/token-metrics-DIAjrPlM.js +0 -1
  459. package/web/dist/assets/use-desktop-CrDny2uG.js +0 -1
  460. package/web/dist/assets/use-submit-shortcut-KWJsC906.js +0 -1
  461. package/web/dist/assets/workflows-TmcPEj2K.js +0 -11
  462. /package/web/dist/assets/{lib-BQXq3kEf2.js → lib-BQXq3kEf.js} +0 -0
@@ -1,13 +1,15 @@
1
- import { type CiWait, type CiWaitRequest } from '../contract/index.js';
1
+ import { type PreviewStopRequest, type PreviewStopResult, type CiWait, type CiWaitRequest, type PreviewServeRequest, type PreviewServeResult } from '../contract/index.js';
2
+ import { type PreviewHostLike } from '../preview/registration.ts';
2
3
  import { type WorkerAccountBinding } from '../delegation/execution-identity.ts';
3
4
  import type { DelegationProvisioner } from '../delegation/provision.ts';
5
+ import { type CwdSource } from '../delegation/process-liveness.ts';
4
6
  import type { RunnerId } from '../core/agent-runner.ts';
5
7
  import { type AgentInput, type WorkerStopResult, type WorkerWait, type WorkerWaitRequest, type RequestWaitRequest } from '../contract/index.js';
6
8
  import type { ContentBlock } from '../core/agent-runner.ts';
7
9
  import { type Skill } from '../skills.ts';
8
- import { type WorkerNoMaterializationProof } from '../delegation/workspace.ts';
9
- import type { QueuedMessage, RunRecord, RunStore } from '../runs/store.ts';
10
+ import { type QueuedMessage, type RunRecord, type RunStore } from '../runs/store.ts';
10
11
  import { WorkspaceSemaphore, type AccountHolds } from '../workspace/semaphore.ts';
12
+ import type { UiEvent } from '../core/ui-events.ts';
11
13
  import { type WorkflowDef } from './types.ts';
12
14
  /** An interactive session that hears nothing from the user closes itself. */
13
15
  export declare const IDLE_TIMEOUT_MS: number;
@@ -18,12 +20,12 @@ export declare const IDLE_TIMEOUT_MS: number;
18
20
  * trailing `CEZ:TITLE=` block from absorbing later commentary (#623).
19
21
  */
20
22
  export declare function appendTurnText(current: string, next: string): string;
23
+ export type TurnTail = 'none' | 'visible' | 'silent';
24
+ /** Last top-level completed item: a non-empty assistant message is a visible tail; reasoning or a tool is silent even after earlier visible text (#544). An empty turn stays `none` and never nudges. */
25
+ export declare function trackTurnTail(tail: TurnTail, event: UiEvent): TurnTail;
21
26
  /** Periodic "cezar autosave" commit in the task worktree (spec 006). */
22
27
  export declare const AUTOSAVE_INTERVAL_MS = 90000;
23
- /** Stop on a workflow check: SIGTERM first, SIGKILL to its process group after this grace. */
24
- export declare const CHECK_KILL_GRACE_MS = 3000;
25
- /** After SIGKILL, how long to wait for the group to disappear before resolving unconfirmed. */
26
- export declare const CHECK_TERMINATION_CONFIRM_MS = 5000;
28
+ export { CHECK_KILL_GRACE_MS, CHECK_TERMINATION_CONFIRM_MS } from './grouped-command.ts';
27
29
  /** The periodic autosave timer is opt-in (#471): off, a task branch carries only the
28
30
  * agent's own commits plus the turn-end/pre-PR flushes — no mid-run "cezar autosave"
29
31
  * noise interleaving PR history. The flushes (`autosaveCommit` at turn end and before
@@ -49,10 +51,35 @@ export type DelegationExecutionSettings = {
49
51
  allowedTools?: string[];
50
52
  bashAllowlist?: string[];
51
53
  };
52
- /** Safety cap on autonomous auto-continues per run — stops a stuck agent from nudging forever. */
54
+ /** What a Continue may carry (`RunManager.continueRun`). */
55
+ type ContinueRunOptions = {
56
+ text?: string;
57
+ images?: PastedContent[];
58
+ runner?: RunnerId;
59
+ /** Internal configured fallback for an untouched workflow, resolved by the route. */
60
+ originalRunner?: RunnerId;
61
+ model?: string;
62
+ /** Reasoning-effort pin (#45). Omitted keeps the run's pin; empty string clears it. */
63
+ effort?: string;
64
+ /** Agent account for the reopened session (spec 2026-07-29-agent-profiles). Omitted = the
65
+ * account the run is already on. */
66
+ agentProfile?: string;
67
+ /** #505: the parent reply this continuation delivers as the answer to a routed question. */
68
+ answerInputId?: string;
69
+ };
53
70
  /** #505: a real steer is read at the harness's next model step; a quiet boundary this long
54
71
  * with input still unread means the harness will not read it without help. */
55
72
  export declare const UNREAD_INPUT_GRACE_MS = 30000;
73
+ /** #486: recheck a turn-end that deferred close/park only because the harness still held a human follow-up. */
74
+ export declare const HELD_HUMAN_INPUT_RECHECK_MS = 250;
75
+ /** Bound a final-message nudge that is ACKed but never produces a turn (#544).
76
+ * OpenCode heartbeats re-arm the managed-session no-progress guard, so this is
77
+ * the DEFAULT-path exit when the agent stays silent. Overridable on RunManager. */
78
+ export declare const FINAL_MESSAGE_NUDGE_REPLY_MS: number;
79
+ /** Bound one unattended session; an explicit Continue starts a new budget. */
80
+ export declare const MAX_AUTO_CONTINUES = 40;
81
+ export declare const AUTONOMOUS_NUDGE = "Continue working autonomously until the task is fully complete. Do not ask me for confirmation or clarification \u2014 make reasonable assumptions and proceed. When everything is done, end the session with your done signal.";
82
+ export declare const FINAL_MESSAGE_NUDGE = "Your last turn ended without a message to the user. Write your user-facing reply now: what you did, where things stand, and anything you need from the user. If the task goal is fully achieved, end that message with CEZ:DONE.";
56
83
  /**
57
84
  * Auto-resume after a provider usage limit (spec 2026-08-03-auto-resume-after-usage-limit).
58
85
  *
@@ -119,9 +146,8 @@ export interface StartRunInput {
119
146
  * working tree instead of an isolated worktree. Undefined/`true` keeps the
120
147
  * default per-task worktree. Ignored for variants (they always isolate). */
121
148
  worktree?: boolean;
122
- /** Autonomous mode (#autonomous): the run never parks at `waiting` for the
123
- * user — turn-ends auto-continue until the agent signals done or the safety
124
- * cap is hit. No "needs you" is ever raised. */
149
+ /** Autonomous mode (#autonomous): eligible turn ends auto-continue until done
150
+ * or the safety cap. Native asks, input delivery and lifecycle waits still apply. */
125
151
  autonomous?: boolean;
126
152
  /** Task webhook opt-in (#589). Persisted on the record at creation; read from there after. */
127
153
  notify?: boolean;
@@ -269,28 +295,34 @@ export declare class RunManager {
269
295
  * manager holds the run); `unknown` is a present record that proves nothing. */
270
296
  private orphanState;
271
297
  private orphanedWorkerGeneration;
272
- /** Completes a crashed generation's proof once every one of its processes is proven gone (#469).
273
- * Sync and signal-free; recovery, resume, delivery, collect and destroy then take their normal paths.
298
+ /** Settles a crashed generation after exit proof. Sync and signal-free; recovery, resume,
299
+ * delivery, collect and destroy then take their normal paths.
274
300
  * A non-gone probe is cached briefly: on darwin the scan is a synchronous `lsof` on the event loop. */
275
301
  settleOrphanedWorkerExecution(runId: string, opts?: {
276
302
  admitting?: boolean;
277
303
  fresh?: boolean;
304
+ cwds?: CwdSource;
278
305
  }): boolean;
279
306
  private readonly orphanProbes;
280
- private readonly orphanReprobes;
307
+ /** Pending orphan reprobes by run id. One timer serves them all (hearsay-tools/cezarion#879). */
308
+ private readonly orphanDue;
309
+ private orphanTimer?;
310
+ /** The `at` the timer was armed for; with the clock, it decides what a tick takes. */
311
+ private orphanArmedFor;
281
312
  private readonly orphanBlockers;
282
313
  private readonly reportedOrphanBlockers;
283
- private orphanReprobeMs;
284
- private orphanReprobeLimitMs;
285
- private orphanReprobeSlowMs;
314
+ private orphanBackoff;
286
315
  private orphanTermGraceMs;
287
316
  /** #469: a survivor that dies after recovery has no other wake source (no exit callback for a
288
317
  * process another cezar spawned). Unref'd; finalization's `run` event then lets worker waits and
289
- * outcomes observe it. Fast for the first window, then slow but uncapped, so a long-lived
290
- * survivor is still noticed when it exits. A tick while this manager holds the run is skipped;
291
- * only terminal reasons (proof settled, generation changed, run gone, unknown record, dispose)
292
- * stop it. */
318
+ * outcomes observe it. Every 15 s for the first 15 minutes, then backing off to hourly
319
+ * (hearsay-tools/cezarion#879), so a long-lived survivor is still noticed when it exits. One
320
+ * timer serves every orphan, and a tick shares one `/proc` scan across them. A tick while this
321
+ * manager holds the run is skipped; only terminal reasons (proof settled, generation changed,
322
+ * run gone, unknown record, dispose) stop it. */
293
323
  private armOrphanReprobe;
324
+ private wakeOrphanReprobes;
325
+ private orphanReprobeTick;
294
326
  private clearOrphanReprobe;
295
327
  /** Why the last destroy could not prove termination (#469), and whether that differs from the
296
328
  * reason last reported, so a retry loop appends one lifecycle event per distinct blocker set. */
@@ -303,6 +335,16 @@ export declare class RunManager {
303
335
  /** Destroy only (#469): signal the recorded, token-verified survivors of a generation whose
304
336
  * controller is proven dead, then finalize on `gone`. Scan-only processes are never signalled. */
305
337
  private reapOrphanedWorker;
338
+ /** Destroy only: SIGTERM recorded survivors, then SIGKILL what outlives `orphanTermGraceMs`.
339
+ * `pids` are signalled by token-verified pid; `groups` are session leaders whose whole process
340
+ * group is signalled (hearsay-tools/cezarion#890), so what an agent left behind exits with it. A
341
+ * dead leader's group counts only while a process holding `paths` is in it. Every signal
342
+ * re-verifies first: a reused PID or group number is never touched. */
343
+ private terminateRecorded;
344
+ /** Destroy of a finished generation (hearsay-tools/cezarion#890): a dev server or watcher its
345
+ * agent left in its process group holds the worktree, and nothing else ties it to the worker.
346
+ * A record whose controller is another live cezar is not ours to act on. */
347
+ private terminateFinishedWorkerGroups;
306
348
  /** Best effort: a failed write leaves the working-directory scan as this process's evidence. */
307
349
  private recordWorkerProcess;
308
350
  private trackTurnEnd;
@@ -310,9 +352,7 @@ export declare class RunManager {
310
352
  awaitRunTermination(runId: string, timeoutMs: number, opts?: {
311
353
  reapOrphans?: boolean;
312
354
  }): Promise<boolean>;
313
- /** Private cleanup capability, never serialized. Obtain after stop/termination
314
- * under the service's destroy lock; each invocation rechecks the same generation. */
315
- getWorkerNoMaterializationProof(runId: string): WorkerNoMaterializationProof | undefined;
355
+ private proveRunTermination;
316
356
  /** Irreversible history removal is an execution tombstone, including for legacy children. */
317
357
  private historyDeletionPending;
318
358
  private workerExecutionStopped;
@@ -330,6 +370,12 @@ export declare class RunManager {
330
370
  private readonly ciRegistrations;
331
371
  private readonly ciRetries;
332
372
  private readonly ciResources;
373
+ /** #781: the workspace-wide preview host. Absent (`cez run`, tests) means every registration is `headless`. */
374
+ private readonly preview?;
375
+ /** The same host, for a removal outside this manager that must release a run's preview first. */
376
+ get previewHost(): PreviewHostLike | undefined;
377
+ /** #781: cezar's own listening port, which no dev server may register. */
378
+ private readonly cezarPort?;
333
379
  private ciSupervisor;
334
380
  private readonly workerWaiting;
335
381
  private readonly workerWakeAdmitted;
@@ -339,16 +385,37 @@ export declare class RunManager {
339
385
  private reconcilingWorkers;
340
386
  private reconcilingFamily;
341
387
  private readonly pendingReconciliations;
342
- private recovering;
388
+ /** What the recovery in progress covers: every run at boot (`family` undefined), or the one
389
+ * family an adoption hands it (#779, plan step 3). Undefined: no recovery in progress. */
390
+ private recoveryScope;
391
+ /** Settles when the recovery in progress (if any) has finished. */
392
+ private recoveryInFlight;
393
+ /** Adoptions of dead processes' runs, one at a time (`adoptOrphanedRun`). */
394
+ private adoptionTail;
343
395
  /** Quiet window before unread input is resubmitted or left unconfirmed (#505). */
344
396
  private readonly unreadInputGraceMs;
397
+ /** Quiet window after a final-message nudge before a still-silent session parks (#544). */
398
+ private readonly finalMessageNudgeReplyMs;
345
399
  private disposed;
400
+ /** Whether any recovery is in progress: one at a time (`recover`), and `pump` waits for it. */
401
+ private get recovering();
402
+ /**
403
+ * Whether a recovery in progress holds this run, so its wakes, input flushes and delegation
404
+ * reconciles wait for that recovery's own passes: every run during boot recovery, and only the
405
+ * adopted family's during a recovery scoped to one. The rest of a running project stays live: a
406
+ * wake held back for an unrelated family would be lost, since the scoped passes never revisit it.
407
+ */
408
+ private recoveringRun;
346
409
  private readonly onDelegationRun;
347
410
  private readonly pendingJobs;
348
411
  /** Interrupted agent turns recovered after a process restart. Unlike an
349
412
  * explicit user Continue, these are bulk scheduler work and must re-enter
350
413
  * through `pump()` so both workspace and per-project caps are honored. */
351
414
  private readonly pendingContinuations;
415
+ /** Accepted Continues supersede in-flight settlement even before launch or after
416
+ * idle close. Retain these across dropActive/dispose so absence cannot look like
417
+ * the earlier execution again; disposal alone never revokes terminal intent. */
418
+ private readonly continuationGenerations;
352
419
  /** Per-run image counter behind `pasted-<n>` / `screenshot-<n>` (#472). Lives on
353
420
  * the manager rather than the `ActiveRun` so a *queued* run — which has no
354
421
  * `ActiveRun` at all — can persist attachments. Seeded lazily from disk. */
@@ -402,6 +469,9 @@ export declare class RunManager {
402
469
  constructor(store: RunStore, repoRoot: string, options?: {
403
470
  semaphore?: WorkspaceSemaphore;
404
471
  unreadInputGraceMs?: number;
472
+ finalMessageNudgeReplyMs?: number;
473
+ preview?: PreviewHostLike;
474
+ cezarPort?: () => number | undefined;
405
475
  });
406
476
  /**
407
477
  * Release everything this manager owns without touching run records
@@ -484,6 +554,12 @@ export declare class RunManager {
484
554
  private provisionSession;
485
555
  /** Provision the same capability and descriptor on every start, Continue and recovered launch. */
486
556
  private provisionCiSession;
557
+ stopPreviewServer(runId: string, request: PreviewStopRequest, signal?: AbortSignal): Promise<PreviewStopResult>;
558
+ /**
559
+ * #781: record a dev server the agent registered. One probe at registration becomes
560
+ * `answeredAtRegistration`; the run is re-validated after it, since the probe awaits.
561
+ */
562
+ registerPreviewServer(runId: string, request: PreviewServeRequest, signal?: AbortSignal): Promise<PreviewServeResult>;
487
563
  /** Trusted capability callbacks supply run identity; the model supplies only a PR and deadline. */
488
564
  registerCiWait(runId: string, request: CiWaitRequest, generation: string, capabilitySignal?: AbortSignal): Promise<CiWait>;
489
565
  private startCiWatch;
@@ -607,15 +683,49 @@ export declare class RunManager {
607
683
  * - `running` → mark interrupted, then immediately resume the last agent
608
684
  * session via the Continue path, pointing the agent at its handoff file.
609
685
  * Call once, before the server starts taking requests.
686
+ *
687
+ * With `familyRootId`, the same recovery for the one delegation family a dead process left
688
+ * behind, which `adoptOrphanedRun` has just loaded. Either way only runs this store owns are
689
+ * touched: another live process's runs are not in the live set, and the passes that read every
690
+ * worker or root skip their families (#779, plan step 3).
610
691
  */
611
- recover(): Promise<void>;
692
+ recover(familyRootId?: string): Promise<void>;
693
+ /**
694
+ * Take over a run whose owning process is gone (#779, plan step 3): a control (Stop, Continue,
695
+ * archive…) reached a run `runOwnership` calls `orphaned`. Its family is claimed, its live runs
696
+ * are settled rather than resumed (`settleOrphanedRun`: interrupted, or cancelled before they
697
+ * began), and the family is recovered as a restart would, which repairs it but finds nothing live
698
+ * to resume. The control that follows then acts on a run this process now owns — rather than on
699
+ * a record nobody owns, a dead end until a restart — and only Continue starts agent work, with
700
+ * the user's own input. With `stop` the control is Stop, which the adoption carries out itself:
701
+ * `runId` ends cancelled, as an accepted Stop reads, rather than interrupted. False when a live
702
+ * process holds it after all (or it is gone): the control is refused as another process's.
703
+ * Adoptions run one at a time, after any recovery already in progress.
704
+ */
705
+ adoptOrphanedRun(runId: string, opts?: {
706
+ stop?: boolean;
707
+ }): Promise<boolean>;
612
708
  /** The persisted definition when it looks sane, else the catalog by name. */
613
709
  private reviveWorkflow;
614
710
  private isDisposedDelegatedRun;
615
711
  /** Shutdown is not completion. Explicit terminal controls retain their precedence. */
616
712
  private preserveRunAfterDisposal;
713
+ /**
714
+ * Register an executing run: the ONE way an `ActiveRun` enters `active`. Both construction
715
+ * sites (`execute` and `runContinuation`, which serves Continue and restart recovery) call it,
716
+ * so the store pins every run this manager executes (#779) — its record stays the held object
717
+ * every turn-end handler reads and writes until `dropActive` lets it go. A second site that set
718
+ * `active` directly would execute a run the store could evict mid-turn (the #811 shape).
719
+ */
720
+ private activate;
617
721
  /** Remove a run from the live registries — keeps `waiting ⊆ active`. */
618
722
  private dropActive;
723
+ private readonly workerScratchCleanup;
724
+ /** Project detach cancels autonomous cleanup; reattach reconstructs the durable intents. */
725
+ pauseWorkerCleanup(): void;
726
+ recoverWorkerCleanup(): void;
727
+ /** Hold off every admission path until destructive work (including async Git) completes. */
728
+ claimWorkerCleanup(runId: string): (() => void) | undefined;
619
729
  /** Scratch belongs to the task, not its current agent process (#515).
620
730
  * Terminal status alone is not process-exit proof: an active session or an
621
731
  * unfinished private worker generation must retain its files until exit. */
@@ -745,6 +855,14 @@ export declare class RunManager {
745
855
  * forced removal is deleting — nor a removal start under a session that was just admitted.
746
856
  */
747
857
  claimWorktreeReclaim(runId: string): (() => void) | null;
858
+ /**
859
+ * Hold `runIds` against Continue, reclaim, publish and branch cleanup here AND in every other
860
+ * cezar process for the length of an async operation (#779, plan step 3; PR #851 review). An
861
+ * ownership check alone is a moment: pinning claims each run's family, so another process
862
+ * cannot claim and Continue it while this one rematerializes, publishes or deletes. Null when
863
+ * any hold fails (another process took the claim first); nothing stays held then.
864
+ */
865
+ private holdForMaintenance;
748
866
  /**
749
867
  * Claim every run that owns a branch about to be deleted (issue 08 §B3), or null when any is in
750
868
  * use: live, queued, at the review gate, or already claimed. The classification that allowed the
@@ -913,7 +1031,23 @@ export declare class RunManager {
913
1031
  private settleRequestedRootFinish;
914
1032
  /** Request deadlines share the existing reconciliation timer registry, never a polling loop. */
915
1033
  private reconcileConversations;
916
- /** Authority and wait live on disk; these collections are admission/timer caches only. */
1034
+ /** One delegation family: its root, then the root's direct workers (the store's
1035
+ * `parent_run_id` query). Workers cannot delegate, so this never recurses. */
1036
+ private familyMembers;
1037
+ /** Every member of every family with a live member, each once: the families the store holds
1038
+ * in memory (#779), which is where every delegation sweep that is not about one family looks. */
1039
+ private liveFamilyMembers;
1040
+ /**
1041
+ * Recovery's full pass (#661): every family whose root carries a conversation — settled ones
1042
+ * too, so a projection or outcome a crash interrupted is repaired — then every live family.
1043
+ * Only roots with a conversation are read; a settled family without one has nothing to settle:
1044
+ * every other repair the sweep makes on a finished member (a stale `wait`, a cancelled root's
1045
+ * Finish intent) is a clause of `isLiveRecord`, so open already holds that family.
1046
+ * Everything else asks `reconcileWorkerWaits()`, which covers the live families (#779).
1047
+ */
1048
+ reconcileAllWorkerFamilies(): void;
1049
+ /** Authority and wait live on disk; these collections are admission/timer caches only. One
1050
+ * family by its root's id, or (no id) every family with a live member. */
917
1051
  reconcileWorkerWaits(familyRootId?: string): void;
918
1052
  private reconcileWorkerFamily;
919
1053
  queueWorkerWake(parentId: string): void;
@@ -958,8 +1092,13 @@ export declare class RunManager {
958
1092
  * input is resubmitted once; after a second it is left delivered but unconfirmed. */
959
1093
  private armUnreadInputTimer;
960
1094
  private clearUnreadInputTimer;
1095
+ /** #486: a turn-end deferred close/park only because the harness still held a human follow-up. */
1096
+ private armHeldHumanInputTimer;
1097
+ private clearHeldHumanInputTimer;
961
1098
  /** #505: the harness accepted input this session has not reported reading yet. */
962
1099
  private harnessOwesInput;
1100
+ /** #486: a human follow-up is still queued in the live session and will still be delivered. */
1101
+ private harnessHoldsHumanInput;
963
1102
  /** A callback from an old/replaced/disposed session carries no authority. */
964
1103
  private handleAgentInputReady;
965
1104
  /** Reservation is synchronous; only an acknowledged transport may checkpoint delivery. */
@@ -992,6 +1131,9 @@ export declare class RunManager {
992
1131
  * original workflow still has steps after the waiting one, that would skip
993
1132
  * those steps rather than resume the workflow engine. */
994
1133
  private waitingBeforeFinalWorkflowStep;
1134
+ /** A clean process exit cannot complete a workflow still blocked on a question.
1135
+ * Keep its existing durable waiting step so Continue can resume the tail. */
1136
+ private unansweredWorkflowAsk;
995
1137
  /** Locate the original workflow step whose closed session a synthetic Continue is resuming. */
996
1138
  private waitingWorkflowStepIndex;
997
1139
  /**
@@ -1005,27 +1147,14 @@ export declare class RunManager {
1005
1147
  * behaves exactly like an interactive step: `waiting` after each turn,
1006
1148
  * messages via sendMessage, closed by finish/idle/cancel.
1007
1149
  */
1008
- continueRun(runId: string, opts?: {
1009
- text?: string;
1010
- images?: PastedContent[];
1011
- runner?: RunnerId;
1012
- /** Internal configured fallback for an untouched workflow, resolved by the route. */
1013
- originalRunner?: RunnerId;
1014
- model?: string;
1015
- /** Reasoning-effort pin (#45). Omitted keeps the run's pin; empty string clears it. */
1016
- effort?: string;
1017
- /** Agent account for the reopened session (spec 2026-07-29-agent-profiles). Omitted = the
1018
- * account the run is already on. */
1019
- agentProfile?: string;
1020
- /** #505: the parent reply this continuation delivers as the answer to a routed question. */
1021
- answerInputId?: string;
1022
- },
1150
+ continueRun(runId: string, opts?: ContinueRunOptions,
1023
1151
  /** Restart recovery may discover several interrupted tasks at once. Those
1024
1152
  * continuations are queued; an explicit user Continue remains immediate. */
1025
1153
  deferForCapacity?: boolean, conversation?: Parameters<RunStore['commitWorkerContinuation']>[3]): {
1026
1154
  ok: boolean;
1027
1155
  error?: string;
1028
1156
  };
1157
+ private admitContinuation;
1029
1158
  private runContinuation;
1030
1159
  private execute;
1031
1160
  /** Returns an error message, or null on success. */
@@ -1046,6 +1175,10 @@ export declare class RunManager {
1046
1175
  /** Ask precedence also releases an admitted but not yet delivered worker wake.
1047
1176
  * Its durable input/wait remain queued until an actual human answer. */
1048
1177
  private prepareHumanAsk;
1178
+ /** A prose or rejected-ASK fallback supersedes a registered autonomous wait. Keep the
1179
+ * checkpoint through idle closure/restart and hold worker input until a
1180
+ * successful human delivery, just as for a structured ask. */
1181
+ private prepareProseHumanGate;
1049
1182
  /** Native backend asks arrive before turn-end. Persist and park immediately
1050
1183
  * so the cockpit shows attention and the run releases its workspace slot. */
1051
1184
  private handleRunnerUiEvent;
@@ -1124,6 +1257,10 @@ export declare class RunManager {
1124
1257
  * off — settle straight to `done`, leaving the diff in the worktree untouched.
1125
1258
  */
1126
1259
  private settleSuccess;
1260
+ /** Called only after session/process settlement. A refused nudge retained its
1261
+ * slot and running status until idle close; ordinary roots must now become
1262
+ * resumable. Previously parked roots and delegated lifecycle policy stay intact. */
1263
+ private settleIdleClosedRun;
1127
1264
  /** An ordinary owned worker cannot accept an inactive Continue. Once its
1128
1265
  * idle-closed process has ended, publish the same terminal outcome recovery
1129
1266
  * would produce so its parent can collect it. Explicit asks and worker waits
@@ -1149,6 +1286,41 @@ export declare class RunManager {
1149
1286
  * shows the tool result's `[screenshot]` placeholder (or the image count).
1150
1287
  */
1151
1288
  private persistAttachment;
1289
+ /** Shared stop/input/liveness guards for an automatic continuation. */
1290
+ private canAutoContinue;
1291
+ /**
1292
+ * Both turn-end paths keep a nudged session running, with no user-wait timer or
1293
+ * released slot. The next turn can finish with DONE, nudge again, or park at the
1294
+ * cap (waiting/monitoring with their existing wake/idle rules). Queued/accepted
1295
+ * input, worker/CI waits and parent completion keep priority. Cancel, Finish,
1296
+ * disposal and memory pause stop nudging; provider errors/exits use normal
1297
+ * teardown. Native mid-turn asks still park for an answer (outside this policy).
1298
+ * A refused ordinary nudge waits for readiness at this exact boundary; the idle
1299
+ * timeout bounds a missing readiness signal. New activity/input invalidates it.
1300
+ * A refused portable override falls back to normal question parking.
1301
+ */
1302
+ private tryAutonomousNudge;
1303
+ /** Shared silent-tail conditions for the one-shot visible-message nudge. Callers must
1304
+ * invoke this only when nothing else already continued. */
1305
+ private maybeFinalMessageNudge;
1306
+ /** One-shot visible-message nudge when a turn ends on reasoning or a tool (#544, #119).
1307
+ * Liveness: this path has no inputIds, so #505's unread-input timer does not apply, and
1308
+ * resumeParkedRun / clearIdleTimer drop the user-wait idle bound. Do not re-arm idle until
1309
+ * content arrives — some harnesses omit `turn.started` and still run (N8); idle would then
1310
+ * kill a live turn. OpenCode heartbeats re-arm the managed-session no-progress guard without
1311
+ * opening a turn, so an ACK that stays silent is bounded by FINAL_MESSAGE_NUDGE_REPLY_MS:
1312
+ * parent-level v1 content (text, tool-call, tool-result) and UiEvent items count at any time,
1313
+ * including before the timer is armed; `turn.started` counts after arm or while
1314
+ * `finalMessageNudgeParked` matches the session (OpenCode/Cursor emit a synthetic one inside
1315
+ * sendAgentMessage). Nested `item.*` with `parentItemId` is ignored.
1316
+ * Expiry parks `waiting` and latches `finalMessageNudgeParked`; a late reply from that session
1317
+ * resumes. User-authored delivery resets the one-shot latch; expiry does not. */
1318
+ private tryFinalMessageNudge;
1319
+ /** Heartbeats and nested subagent items are not a reply. OpenCode/Cursor synthetic `turn.started` inside `sendAgentMessage` cannot false-resume after expiry because a later send goes through `submitAgentInput` → `resumeParkedRun`. */
1320
+ private isFinalMessageNudgeReply;
1321
+ private noteFinalMessageNudgeContent;
1322
+ private armFinalMessageNudgeReplyTimer;
1323
+ private clearFinalMessageNudgeReplyTimer;
1152
1324
  private armIdleTimer;
1153
1325
  private clearIdleTimer;
1154
1326
  private reconcileMonitoringWakeTimers;
@@ -1160,6 +1332,15 @@ export declare class RunManager {
1160
1332
  * Opt-in via CEZ_AUTOSAVE=1 (#471) — see periodicAutosaveEnabled. */
1161
1333
  private armAutosave;
1162
1334
  private clearAutosaveTimer;
1335
+ /**
1336
+ * Worktree setup (#917, spec `.ai/specs/2026-10-07-worktree-setup.md`): run the project's
1337
+ * `worktreeSetup` commands in this run's isolated worktree when it needs them, and return the
1338
+ * paragraph for the agent's opening message. `start` is a new task or worker, `rematerialized`
1339
+ * a Continue that rebuilt a reclaimed directory, and `resume` any other Continue, which only
1340
+ * finishes a setup a restart interrupted. In-place and non-Git runs never get setup: that tree
1341
+ * is the user's own checkout.
1342
+ */
1343
+ private prepareWorktree;
1163
1344
  private runCheckStep;
1164
1345
  private finishStep;
1165
1346
  }