@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
@@ -0,0 +1,385 @@
1
+ /**
2
+ * The transactional run store underneath `RunStore` (#779, plan step 2).
3
+ *
4
+ * One SQLite file per project, `<dataDir>/runs.db`, holding every run as a complete JSON record
5
+ * plus the handful of columns the store has to query without decoding that record. The module is
6
+ * deliberately schema-agnostic: it never imports `RunRecord`, never parses `data` or `summary`,
7
+ * and never decides what a column's value should be. The caller (RunStore's codec) computes them
8
+ * and hands over strings, so the record schema can change without this file noticing.
9
+ *
10
+ * Everything is synchronous, like the store it serves. Writes go through ONE entry point,
11
+ * `transaction()`, which commits a whole change set or nothing — the property `runs.json`'s
12
+ * debounced whole-file rewrite only approximated.
13
+ *
14
+ * Failure policy: every SQLite error leaves as a typed `RunDatabaseError` (`toRunDatabaseError`),
15
+ * and nothing here ever deletes, truncates or "repairs" a file. A corrupt database, WAL or SHM
16
+ * stays exactly where it is for the user (or a later recovery step) to inspect.
17
+ */
18
+ export declare const RUNS_DB_FILE = "runs.db";
19
+ /** `meta` key whose presence means the legacy `runs.json` import committed (or there was nothing
20
+ * to import): from then on this database is authoritative and `runs.json` is history. Written in
21
+ * the same transaction as the imported rows, so it can never describe a half-finished import. */
22
+ export declare const RUNS_IMPORT_COMPLETE_KEY = "import-complete";
23
+ /** `PRAGMA user_version` of a database this build created. A higher number means a newer cezar
24
+ * wrote it; that is refused rather than read, because a newer schema may store what this one
25
+ * would silently drop on its next write. */
26
+ export declare const RUN_DATABASE_SCHEMA_VERSION = 2;
27
+ /**
28
+ * The oldest `user_version` the READ-ONLY reader can read as it stands (`openReadOnly`). It never
29
+ * migrates, so a project this build has not opened yet is still at the version an earlier build
30
+ * left; while every migration since only adds what readers can do without (indexes), that
31
+ * database stays readable rather than reading as empty. Raise it with any migration that changes
32
+ * a table or column a reader queries.
33
+ */
34
+ export declare const RUN_DATABASE_READABLE_FROM = 1;
35
+ /** What the caller writes for one run. Optional columns may be omitted or null. */
36
+ export interface RunRowInput {
37
+ id: string;
38
+ createdAt: string;
39
+ finishedAt?: string | null;
40
+ status: string;
41
+ archived: boolean;
42
+ live: boolean;
43
+ parentRunId?: string | null;
44
+ clientRequestId?: string | null;
45
+ groupId?: string | null;
46
+ worktreePath?: string | null;
47
+ branch?: string | null;
48
+ baseBranch?: string | null;
49
+ /** The complete record, serialized. */
50
+ data: string;
51
+ /** The record's summary projection, serialized. */
52
+ summary: string;
53
+ }
54
+ export interface RunRow {
55
+ /** Insertion order: assigned by the row's first insert, never changed (see the schema). */
56
+ seq: number;
57
+ id: string;
58
+ createdAt: string;
59
+ finishedAt: string | null;
60
+ status: string;
61
+ archived: boolean;
62
+ live: boolean;
63
+ parentRunId: string | null;
64
+ clientRequestId: string | null;
65
+ groupId: string | null;
66
+ worktreePath: string | null;
67
+ branch: string | null;
68
+ baseBranch: string | null;
69
+ revision: number;
70
+ data: string;
71
+ summary: string;
72
+ }
73
+ export interface RunSummaryRow {
74
+ seq: number;
75
+ id: string;
76
+ createdAt: string;
77
+ revision: number;
78
+ summary: string;
79
+ }
80
+ /** What branch cleanup and git-log attribution read about one run, without its record. */
81
+ export interface BranchOwnerRow {
82
+ id: string;
83
+ createdAt: string;
84
+ status: string;
85
+ archived: boolean;
86
+ branch: string | null;
87
+ baseBranch: string | null;
88
+ summary: string;
89
+ }
90
+ export interface RunRevision {
91
+ id: string;
92
+ revision: number;
93
+ }
94
+ export interface RunDatabaseChanges {
95
+ upserts: readonly RunRowInput[];
96
+ deletes: readonly string[];
97
+ /** Private metadata in the same commit; `null` deletes the key. */
98
+ meta?: Readonly<Record<string, string | null>>;
99
+ /** What must still hold for this writer to commit (#779, plan step 3), checked inside the
100
+ * transaction before anything is written. A violation throws `RunConflictError`. */
101
+ fence?: RunWriteFence;
102
+ /** Write nothing if this `meta` key is present when the transaction holds the write lock: the
103
+ * commit comes back `skipped`. How exactly one of two concurrent importers imports (#779, plan
104
+ * step 4) — a check made before the lock is only a hint. */
105
+ onlyIfMetaAbsent?: string;
106
+ /** Runs inside the transaction after every write, just before COMMIT; throwing rolls it all
107
+ * back. The last moment a caller can still refuse what it wrote. What it returns is more
108
+ * private metadata, written in the same commit. */
109
+ beforeCommit?: () => Readonly<Record<string, string>> | void;
110
+ }
111
+ /** A family a fenced write touches: held at `generation`, or to `take` in that same transaction if
112
+ * its claim is still exactly as the writer judged it (absent, or a dead owner's) — the claim a
113
+ * busy database kept the writer from taking before. */
114
+ export type RunFenceClaim = {
115
+ generation: number;
116
+ } | {
117
+ take: {
118
+ session: string;
119
+ generation: number;
120
+ } | null;
121
+ };
122
+ export interface RunWriteFence {
123
+ owner: {
124
+ session: string;
125
+ pid: number;
126
+ startToken: string | null;
127
+ };
128
+ /** Each family this change set writes. */
129
+ claims: ReadonlyMap<string, RunFenceClaim>;
130
+ /** Each row it writes or deletes: the revision the writer last saw (`null`: it expects no row),
131
+ * and the family the row belongs to. */
132
+ rows: ReadonlyMap<string, {
133
+ revision: number | null;
134
+ family: string;
135
+ }>;
136
+ }
137
+ export interface RunDatabaseCommit {
138
+ /** The revision each upserted row now has. */
139
+ revisions: Map<string, number>;
140
+ /** The insertion order (`seq`) of each upserted row: new for a row this commit inserted. */
141
+ seqs: Map<string, number>;
142
+ /** The generation of each claim the fence took. */
143
+ claims: Map<string, number>;
144
+ /** Nothing was written: the `onlyIfMetaAbsent` key was present. */
145
+ skipped: boolean;
146
+ }
147
+ /** One family's owner in `run_claims`. */
148
+ export interface RunClaim {
149
+ family: string;
150
+ session: string;
151
+ pid: number;
152
+ startToken: string | null;
153
+ generation: number;
154
+ }
155
+ /** A row a fenced write found other than its writer last saw it. */
156
+ export interface RunRowConflict {
157
+ id: string;
158
+ reason: 'changed' | 'created' | 'deleted' | 'claim-lost';
159
+ /** The row as it stands, or undefined when another writer deleted it. */
160
+ current: RunRow | undefined;
161
+ }
162
+ /** One `run_conflicts` row: the original, local and current versions of a conflicted run. */
163
+ export interface RunConflictEvidence {
164
+ runId: string;
165
+ reason: RunRowConflict['reason'];
166
+ baseRevision: number | null;
167
+ baseData: string | null;
168
+ localData: string | null;
169
+ localDeleted: boolean;
170
+ currentRevision: number | null;
171
+ currentData: string | null;
172
+ }
173
+ export type RunDatabaseErrorKind = 'busy' | 'permission' | 'disk-full' | 'corrupt' | 'unsupported-schema' | 'conflict' | 'other';
174
+ /** Every failure this module reports. `kind` is the discriminant; the subclasses exist so a
175
+ * caller can also `instanceof` the one case it handles. */
176
+ export declare class RunDatabaseError extends Error {
177
+ readonly kind: RunDatabaseErrorKind;
178
+ /** SQLite's primary result code, when the failure came from SQLite. */
179
+ readonly sqliteCode: number | undefined;
180
+ constructor(kind: RunDatabaseErrorKind, message: string, options?: {
181
+ sqliteCode?: number;
182
+ cause?: unknown;
183
+ });
184
+ }
185
+ /** Another connection holds the lock past the busy timeout. Transient: retry later. */
186
+ export declare class RunDatabaseBusyError extends RunDatabaseError {
187
+ }
188
+ /** The file or its directory cannot be opened or written by this user. */
189
+ export declare class RunDatabasePermissionError extends RunDatabaseError {
190
+ }
191
+ /** The disk (or a page-count limit) has no room for the write. */
192
+ export declare class RunDatabaseDiskFullError extends RunDatabaseError {
193
+ }
194
+ /** The file is not a database, or a page is malformed. Never reset by this module. */
195
+ export declare class RunDatabaseCorruptError extends RunDatabaseError {
196
+ }
197
+ /** The database was written by a newer cezar whose schema this build does not know. */
198
+ export declare class RunDatabaseUnsupportedSchemaError extends RunDatabaseError {
199
+ readonly found: number;
200
+ readonly supported: number;
201
+ constructor(found: number, supported: number);
202
+ }
203
+ /** A fenced write found rows changed, created or deleted under it, or its claim gone. Nothing was
204
+ * written. `conflicts` names every such row of the change set, each with its current row. */
205
+ export declare class RunConflictError extends RunDatabaseError {
206
+ readonly conflicts: readonly RunRowConflict[];
207
+ constructor(conflicts: readonly RunRowConflict[]);
208
+ }
209
+ /**
210
+ * Map a node:sqlite error (`code: 'ERR_SQLITE_ERROR'`, numeric `errcode`) to its typed class.
211
+ * Anything that is not a SQLite error — a closed connection, a bad argument — passes through
212
+ * unchanged, because wrapping it would claim a database failure that did not happen.
213
+ *
214
+ * `path`, when given, lets SQLITE_CANTOPEN be told apart: it is a permission problem only when
215
+ * the directory, or the file itself, refuses this user. A missing directory, or a directory where
216
+ * the file should be, is not — and "check your permissions" would send the user the wrong way.
217
+ */
218
+ export declare function toRunDatabaseError(error: unknown, path?: string): unknown;
219
+ /** An archived run that is not an owned worker: what the run lists' archived window counts (#864). */
220
+ export declare const ARCHIVED_ROOT = "archived = 1 AND parent_run_id IS NULL";
221
+ export declare class RunDatabase {
222
+ private readonly db;
223
+ private readonly path;
224
+ /** Set by the first statement that reports the file damaged (SQLITE_CORRUPT or NOTADB). */
225
+ private damaged;
226
+ private readonly statements;
227
+ private constructor();
228
+ /**
229
+ * Open (creating if absent) the database at `path` and bring its schema up to date. The
230
+ * directory must already exist; creating it is the caller's decision. On any failure the
231
+ * connection is closed and no existing data is deleted or rewritten — but a fresh path may be
232
+ * left holding an empty database (and its WAL), which the next open migrates. A reader that must
233
+ * create nothing uses `openReadOnly`.
234
+ */
235
+ static open(path: string): RunDatabase;
236
+ /**
237
+ * Open an existing database for reading only: never creates the file, never migrates it, never
238
+ * changes journal mode. Answers `null` when there is nothing this build can read yet — no file,
239
+ * or a file below `RUN_DATABASE_READABLE_FROM` (schema 0 is what a failed first open leaves) —
240
+ * so the caller can fall back to whatever it read before the database existed. A database from
241
+ * `RUN_DATABASE_READABLE_FROM` up to this build's schema is read as it stands. A newer schema is
242
+ * still refused.
243
+ *
244
+ * SQLite may create the `-wal`/`-shm` coordination files beside the database; that is the price
245
+ * of seeing a live writer's commits. In a read-only directory with neither file present it
246
+ * cannot, and the open fails as permission denied — deliberately not worked around with
247
+ * `immutable=1`, which would read a stale snapshot without saying so.
248
+ */
249
+ static openReadOnly(path: string): RunDatabase | null;
250
+ get(id: string): RunRow | undefined;
251
+ /** The rows for `ids` that exist, in no particular order. */
252
+ getMany(ids: readonly string[]): RunRow[];
253
+ /** Summaries newest first (`created_at` descending, then insertion order). Archived runs are included,
254
+ * as every list route includes them. Without a limit, every row. */
255
+ listSummaries(options?: {
256
+ limit?: number;
257
+ }): RunSummaryRow[];
258
+ /**
259
+ * The run lists' window (#864), newest first: every unarchived row, plus the newest
260
+ * `archivedLimit` archived roots. Archived workers are never in it — no list renders them, and
261
+ * counting them is what let them push an older live root out of a newest-N window.
262
+ */
263
+ listWindowSummaries(archivedLimit: number, options?: {
264
+ roots?: boolean;
265
+ }): RunSummaryRow[];
266
+ /** The summary rows of `ids` that exist, in no particular order. */
267
+ getSummaries(ids: readonly string[]): RunSummaryRow[];
268
+ /** Every root row (archived or not) whose stored summary contains each `prefilter` token,
269
+ * lowercased, newest first: the candidates of a run search (#864), which the caller still
270
+ * checks with `matchesRunQuery`. No tokens, every root. */
271
+ searchRootSummaries(prefilter: readonly string[]): RunSummaryRow[];
272
+ /** The rows `searchRootSummaries` answers, one at a time, until `visit` answers false: a search
273
+ * that needs only its first matches stops reading there. */
274
+ visitRootSummaries(prefilter: readonly string[], visit: (row: RunSummaryRow) => boolean): void;
275
+ /** Every row, newest first (`created_at` descending, then insertion order). */
276
+ listAll(): RunRow[];
277
+ /** The rows `RunStore.open` holds in memory: those whose `live` column is set, in insertion order. */
278
+ listLive(): RunRow[];
279
+ /** The workers of one parent, newest first. */
280
+ listByParent(parentId: string): RunRow[];
281
+ /** The ids of one parent's workers, in no particular order, without reading their records. */
282
+ listIdsByParent(parentId: string): string[];
283
+ /** The id of every worker row, in no particular order. */
284
+ listWorkerIds(): string[];
285
+ findByClientRequestId(clientRequestId: string): RunRow | undefined;
286
+ /** The members of one variant group, in no particular order. */
287
+ listByGroup(groupId: string): RunRow[];
288
+ /** Rows with a materialized worktree, most recently finished (else created) first, then newest first. */
289
+ listWithWorktree(): RunRow[];
290
+ /** The rows matching `where` (by default, every row that owns a branch) as branch owners,
291
+ * with their summary, in no particular order. Same contract for `where` as `listWhere`. */
292
+ listBranchOwners(where?: string): BranchOwnerRow[];
293
+ /** The ids of the rows that own `branch` or hold a worktree at `worktreePath`. */
294
+ findResourceHolders(resource: {
295
+ branch: string;
296
+ worktreePath: string;
297
+ }): string[];
298
+ /** Every id, in no particular order. */
299
+ listIds(): string[];
300
+ has(id: string): boolean;
301
+ /**
302
+ * Rows matching `where`, newest first — the store's candidate filters (mark all read, archive
303
+ * finished, retention, the reference heal), which combine these columns with `json_extract`
304
+ * over `summary`. `where` is the caller's constant SQL; values go in `params`, never into it.
305
+ * `offset` skips the newest rows first (retention keeps the newest N).
306
+ */
307
+ listWhere(where: string, params?: readonly (string | number)[], options?: {
308
+ offset?: number;
309
+ }): RunRow[];
310
+ /** The id and creation time of each row matching `where`, newest first, read off the
311
+ * `created_at` index without touching `data` or `summary` (history retention's ranking).
312
+ * Same contract for `where` as `listWhere`. */
313
+ listKeysWhere(where: string, params?: readonly (string | number)[]): Array<{
314
+ id: string;
315
+ createdAt: string;
316
+ seq: number;
317
+ }>;
318
+ /** Every id with its revision, ordered by id. */
319
+ listRevisions(): RunRevision[];
320
+ getMeta(key: string): string | undefined;
321
+ /**
322
+ * The only write of run rows. Deletes, upserts and metadata commit together or not at all: on
323
+ * any failure the transaction is rolled back and the error is rethrown typed, with the database
324
+ * exactly as it was. Every upserted row gets this commit's revision from the database-wide
325
+ * sequence. With a `fence`, nothing is written unless every claim and row is still as the writer
326
+ * last saw it (`RunConflictError` otherwise).
327
+ */
328
+ transaction(changes: RunDatabaseChanges): RunDatabaseCommit;
329
+ /** Inside a write transaction: take the claims the fence asks for, then throw `RunConflictError`
330
+ * naming every row of the fence that is not as its writer last saw it, before anything is
331
+ * written (the claims taken roll back with it). Returns the claims taken. */
332
+ private checkFence;
333
+ /** Inside a write transaction: the next value of a database-wide sequence kept in `meta`. */
334
+ private nextSequence;
335
+ /** The family a stored run belongs to (`parent_run_id`, else its own id), or undefined. */
336
+ familyOf(id: string): string | undefined;
337
+ /** Whether any row of `family` (its root or a direct worker) is live. */
338
+ familyHasLive(family: string): boolean;
339
+ getClaim(family: string): RunClaim | undefined;
340
+ /** The claims on `families` that exist, by family. */
341
+ getClaims(families: readonly string[]): Map<string, RunClaim>;
342
+ listClaims(): RunClaim[];
343
+ /**
344
+ * Take the claims in `take` for `owner`, in one transaction. Each is taken only when its claim
345
+ * is still exactly what the caller judged it to be: absent (`expect: null`) or held by the dead
346
+ * owner it read (same session and generation) — so two takers racing for one family cannot both
347
+ * win. Returns the generation of each claim taken.
348
+ */
349
+ takeClaims(owner: {
350
+ session: string;
351
+ pid: number;
352
+ startToken: string | null;
353
+ }, take: ReadonlyArray<{
354
+ family: string;
355
+ expect: {
356
+ session: string;
357
+ generation: number;
358
+ } | null;
359
+ }>): Map<string, number>;
360
+ /** Drop `session`'s claims on `families`, or on everything it holds when omitted. */
361
+ releaseClaims(session: string, families?: readonly string[]): void;
362
+ /** Every row whose family a session other than `session` claims, live or not, with that family. */
363
+ listForeignClaimedIds(session: string): Array<{
364
+ id: string;
365
+ family: string;
366
+ }>;
367
+ /** Store conflict evidence in one transaction; returns each entry's `seq`. */
368
+ recordConflicts(session: string, entries: readonly RunConflictEvidence[]): number[];
369
+ /** Every stored conflict, oldest first (diagnostics and tests). */
370
+ listConflicts(): Array<RunConflictEvidence & {
371
+ seq: number;
372
+ session: string;
373
+ detectedAt: string;
374
+ }>;
375
+ /** The connection's effective settings, for diagnostics. */
376
+ pragmas(): {
377
+ journalMode: string;
378
+ synchronous: number;
379
+ busyTimeoutMs: number;
380
+ };
381
+ /** Idempotent: closing a closed database does nothing. Once any statement found the file
382
+ * damaged, the close leaves every file exactly as it is (`closeLeavingFiles`). */
383
+ close(): void;
384
+ private run;
385
+ }