@open-mercato/cezar 0.9.1 → 0.9.2-pr710.1256

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 (393) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +157 -32
  3. package/dist/agent-config/account-identity.d.ts +44 -0
  4. package/dist/agent-config/account-identity.js +128 -0
  5. package/dist/agent-config/account-identity.js.map +1 -0
  6. package/dist/agent-config/catalog.d.ts +9 -1
  7. package/dist/agent-config/catalog.js +18 -0
  8. package/dist/agent-config/catalog.js.map +1 -1
  9. package/dist/agent-config/files.d.ts +1 -1
  10. package/dist/agent-config/model-settings/claude.d.ts +2 -0
  11. package/dist/agent-config/model-settings/claude.js +11 -0
  12. package/dist/agent-config/model-settings/claude.js.map +1 -0
  13. package/dist/agent-config/model-settings/codex.d.ts +2 -0
  14. package/dist/agent-config/model-settings/codex.js +16 -0
  15. package/dist/agent-config/model-settings/codex.js.map +1 -0
  16. package/dist/agent-config/model-settings/opencode.d.ts +2 -0
  17. package/dist/agent-config/model-settings/opencode.js +8 -0
  18. package/dist/agent-config/model-settings/opencode.js.map +1 -0
  19. package/dist/agent-config/model-settings/pi.d.ts +12 -0
  20. package/dist/agent-config/model-settings/pi.js +18 -0
  21. package/dist/agent-config/model-settings/pi.js.map +1 -0
  22. package/dist/agent-config/model-settings/shared.d.ts +9 -0
  23. package/dist/agent-config/model-settings/shared.js +93 -0
  24. package/dist/agent-config/model-settings/shared.js.map +1 -0
  25. package/dist/agent-config/model-settings/types.d.ts +9 -0
  26. package/dist/agent-config/model-settings/types.js +2 -0
  27. package/dist/agent-config/model-settings/types.js.map +1 -0
  28. package/dist/agent-config/models.d.ts +9 -0
  29. package/dist/agent-config/models.js +32 -0
  30. package/dist/agent-config/models.js.map +1 -0
  31. package/dist/agent-config/service.d.ts +1 -1
  32. package/dist/agent-config/service.js +4 -4
  33. package/dist/agent-config/service.js.map +1 -1
  34. package/dist/agent-config/validate.d.ts +1 -1
  35. package/dist/automations/coordinator.d.ts +26 -0
  36. package/dist/automations/coordinator.js +66 -0
  37. package/dist/automations/coordinator.js.map +1 -0
  38. package/dist/automations/github-poller.d.ts +74 -0
  39. package/dist/automations/github-poller.js +234 -0
  40. package/dist/automations/github-poller.js.map +1 -0
  41. package/dist/automations/scheduler.d.ts +42 -0
  42. package/dist/automations/scheduler.js +192 -0
  43. package/dist/automations/scheduler.js.map +1 -0
  44. package/dist/automations/store.d.ts +65 -0
  45. package/dist/automations/store.js +298 -0
  46. package/dist/automations/store.js.map +1 -0
  47. package/dist/automations/task-template.d.ts +18 -0
  48. package/dist/automations/task-template.js +95 -0
  49. package/dist/automations/task-template.js.map +1 -0
  50. package/dist/automations/types.d.ts +255 -0
  51. package/dist/automations/types.js +159 -0
  52. package/dist/automations/types.js.map +1 -0
  53. package/dist/config.d.ts +19 -112
  54. package/dist/config.js +48 -5
  55. package/dist/config.js.map +1 -1
  56. package/dist/contract/agent-config.d.ts +153 -0
  57. package/dist/contract/agent-profiles.d.ts +347 -0
  58. package/dist/contract/automations.d.ts +935 -0
  59. package/dist/contract/events.d.ts +104 -0
  60. package/dist/contract/github.d.ts +467 -0
  61. package/dist/contract/health.d.ts +102 -0
  62. package/dist/contract/index.d.ts +16 -0
  63. package/dist/contract/index.js +1830 -0
  64. package/dist/contract/projects.d.ts +210 -0
  65. package/dist/contract/repo.d.ts +234 -0
  66. package/dist/contract/runs.d.ts +1407 -0
  67. package/dist/contract/skills.d.ts +232 -0
  68. package/dist/contract/workflows.d.ts +218 -0
  69. package/dist/contract/workspace.d.ts +577 -0
  70. package/dist/core/agent-env.d.ts +1 -1
  71. package/dist/core/agent-env.js +41 -16
  72. package/dist/core/agent-env.js.map +1 -1
  73. package/dist/core/agent-model-policy.d.ts +10 -0
  74. package/dist/core/agent-model-policy.js +36 -0
  75. package/dist/core/agent-model-policy.js.map +1 -0
  76. package/dist/core/agent-profiles.d.ts +62 -0
  77. package/dist/core/agent-profiles.js +90 -0
  78. package/dist/core/agent-profiles.js.map +1 -0
  79. package/dist/core/agent-runner.d.ts +49 -7
  80. package/dist/core/agent-runner.js +48 -3
  81. package/dist/core/agent-runner.js.map +1 -1
  82. package/dist/core/ask.d.ts +45 -124
  83. package/dist/core/ask.js +103 -13
  84. package/dist/core/ask.js.map +1 -1
  85. package/dist/core/backend-detect.d.ts +5 -5
  86. package/dist/core/backend-detect.js +44 -7
  87. package/dist/core/backend-detect.js.map +1 -1
  88. package/dist/core/claude-cli-runner.d.ts +2 -2
  89. package/dist/core/claude-cli-runner.js +61 -13
  90. package/dist/core/claude-cli-runner.js.map +1 -1
  91. package/dist/core/claude-ui-mapper.d.ts +1 -1
  92. package/dist/core/codex-app-server-runner.d.ts +1 -1
  93. package/dist/core/codex-app-server-runner.js +65 -3
  94. package/dist/core/codex-app-server-runner.js.map +1 -1
  95. package/dist/core/codex-app-server-transport.d.ts +6 -1
  96. package/dist/core/codex-app-server-transport.js +17 -3
  97. package/dist/core/codex-app-server-transport.js.map +1 -1
  98. package/dist/core/codex-model-catalog.d.ts +1 -1
  99. package/dist/core/codex-ui-mapper.d.ts +5 -1
  100. package/dist/core/codex-ui-mapper.js +74 -17
  101. package/dist/core/codex-ui-mapper.js.map +1 -1
  102. package/dist/core/model-identity.d.ts +24 -12
  103. package/dist/core/model-identity.js +41 -24
  104. package/dist/core/model-identity.js.map +1 -1
  105. package/dist/core/model-presets.d.ts +10 -4
  106. package/dist/core/model-presets.js +52 -9
  107. package/dist/core/model-presets.js.map +1 -1
  108. package/dist/core/opencode-model-catalog.d.ts +30 -0
  109. package/dist/core/opencode-model-catalog.js +126 -0
  110. package/dist/core/opencode-model-catalog.js.map +1 -0
  111. package/dist/core/opencode-server-runner.d.ts +2 -2
  112. package/dist/core/opencode-ui-mapper.d.ts +4 -1
  113. package/dist/core/opencode-ui-mapper.js +45 -7
  114. package/dist/core/opencode-ui-mapper.js.map +1 -1
  115. package/dist/core/pi-runner.d.ts +24 -0
  116. package/dist/core/pi-runner.js +349 -0
  117. package/dist/core/pi-runner.js.map +1 -0
  118. package/dist/core/pi-ui-mapper.d.ts +34 -0
  119. package/dist/core/pi-ui-mapper.js +270 -0
  120. package/dist/core/pi-ui-mapper.js.map +1 -0
  121. package/dist/core/provider-auth.d.ts +154 -0
  122. package/dist/core/provider-auth.js +509 -0
  123. package/dist/core/provider-auth.js.map +1 -0
  124. package/dist/core/provider-availability.d.ts +3 -0
  125. package/dist/core/provider-availability.js +14 -0
  126. package/dist/core/provider-availability.js.map +1 -0
  127. package/dist/core/runner-factory.d.ts +1 -1
  128. package/dist/core/runner-factory.js +3 -0
  129. package/dist/core/runner-factory.js.map +1 -1
  130. package/dist/core/runner-model-catalog.d.ts +1 -1
  131. package/dist/core/shell-env.d.ts +28 -0
  132. package/dist/core/shell-env.js +56 -0
  133. package/dist/core/shell-env.js.map +1 -0
  134. package/dist/core/tool-display.d.ts +1 -1
  135. package/dist/core/ui-events.d.ts +2 -2
  136. package/dist/core/ui-events.js +1 -1
  137. package/dist/core/usage-limit.d.ts +42 -0
  138. package/dist/core/usage-limit.js +209 -0
  139. package/dist/core/usage-limit.js.map +1 -0
  140. package/dist/git-diff-base.d.ts +85 -0
  141. package/dist/git-diff-base.js +180 -0
  142. package/dist/git-diff-base.js.map +1 -0
  143. package/dist/git-worktree.d.ts +46 -6
  144. package/dist/git-worktree.js +46 -9
  145. package/dist/git-worktree.js.map +1 -1
  146. package/dist/handoff.d.ts +2 -2
  147. package/dist/handoff.js +1 -1
  148. package/dist/index.js +66 -8
  149. package/dist/index.js.map +1 -1
  150. package/dist/paths.d.ts +69 -6
  151. package/dist/paths.js +86 -9
  152. package/dist/paths.js.map +1 -1
  153. package/dist/planner.d.ts +2 -2
  154. package/dist/planner.js +7 -1
  155. package/dist/planner.js.map +1 -1
  156. package/dist/release/manifests.d.ts +81 -0
  157. package/dist/release/manifests.js +74 -0
  158. package/dist/release/manifests.js.map +1 -0
  159. package/dist/release/snapshot.d.ts +9 -23
  160. package/dist/release/snapshot.js +9 -22
  161. package/dist/release/snapshot.js.map +1 -1
  162. package/dist/release/stable.d.ts +15 -29
  163. package/dist/release/stable.js +14 -27
  164. package/dist/release/stable.js.map +1 -1
  165. package/dist/runs/agent-tmpdir.d.ts +41 -0
  166. package/dist/runs/agent-tmpdir.js +183 -0
  167. package/dist/runs/agent-tmpdir.js.map +1 -0
  168. package/dist/runs/auto-name.d.ts +1 -1
  169. package/dist/runs/auto-name.js +6 -1
  170. package/dist/runs/auto-name.js.map +1 -1
  171. package/dist/runs/event-history.d.ts +50 -0
  172. package/dist/runs/event-history.js +613 -0
  173. package/dist/runs/event-history.js.map +1 -0
  174. package/dist/runs/retention.d.ts +1 -1
  175. package/dist/runs/run-index.d.ts +19 -0
  176. package/dist/runs/run-index.js +43 -0
  177. package/dist/runs/run-index.js.map +1 -0
  178. package/dist/runs/store.d.ts +209 -344
  179. package/dist/runs/store.js +298 -39
  180. package/dist/runs/store.js.map +1 -1
  181. package/dist/runs/ui-event-sink.d.ts +1 -1
  182. package/dist/server/app-type.d.ts +21 -0
  183. package/dist/server/app-type.js +2 -0
  184. package/dist/server/app-type.js.map +1 -0
  185. package/dist/server/capabilities.d.ts +21 -6
  186. package/dist/server/capabilities.js +27 -1
  187. package/dist/server/capabilities.js.map +1 -1
  188. package/dist/server/forge/github.d.ts +58 -151
  189. package/dist/server/forge/github.js +530 -6
  190. package/dist/server/forge/github.js.map +1 -1
  191. package/dist/server/forge/index.d.ts +19 -3
  192. package/dist/server/forge/index.js +28 -1
  193. package/dist/server/forge/index.js.map +1 -1
  194. package/dist/server/forge/types.d.ts +86 -1
  195. package/dist/server/git-changes.d.ts +10 -8
  196. package/dist/server/git-changes.js +19 -17
  197. package/dist/server/git-changes.js.map +1 -1
  198. package/dist/server/git.d.ts +2 -0
  199. package/dist/server/git.js +9 -0
  200. package/dist/server/git.js.map +1 -1
  201. package/dist/server/github.d.ts +3 -3
  202. package/dist/server/github.js +1 -1
  203. package/dist/server/github.js.map +1 -1
  204. package/dist/server/open-in-app.d.ts +2 -1
  205. package/dist/server/open-in-app.js +3 -1
  206. package/dist/server/open-in-app.js.map +1 -1
  207. package/dist/server/open-in-terminal.d.ts +46 -1
  208. package/dist/server/open-in-terminal.js +72 -13
  209. package/dist/server/open-in-terminal.js.map +1 -1
  210. package/dist/server/pr.d.ts +2 -2
  211. package/dist/server/project-context.d.ts +20 -3
  212. package/dist/server/project-context.js +30 -1
  213. package/dist/server/project-context.js.map +1 -1
  214. package/dist/server/provider-action-gate.d.ts +8 -0
  215. package/dist/server/provider-action-gate.js +56 -0
  216. package/dist/server/provider-action-gate.js.map +1 -0
  217. package/dist/server/provider-auth-runtime.d.ts +21 -0
  218. package/dist/server/provider-auth-runtime.js +66 -0
  219. package/dist/server/provider-auth-runtime.js.map +1 -0
  220. package/dist/server/server.d.ts +12802 -47
  221. package/dist/server/server.js +2857 -949
  222. package/dist/server/server.js.map +1 -1
  223. package/dist/server/validators.d.ts +97 -0
  224. package/dist/server/validators.js +86 -0
  225. package/dist/server/validators.js.map +1 -0
  226. package/dist/server/ws.d.ts +2 -2
  227. package/dist/server/ws.js +2 -2
  228. package/dist/server/ws.js.map +1 -1
  229. package/dist/server-install/engine.d.ts +1 -1
  230. package/dist/server-install/engine.js +5 -18
  231. package/dist/server-install/engine.js.map +1 -1
  232. package/dist/server-install/platforms/macosx-ngrok.d.ts +1 -1
  233. package/dist/server-install/platforms/ubuntu-vps.d.ts +16 -1
  234. package/dist/server-install/platforms/ubuntu-vps.js +83 -1
  235. package/dist/server-install/platforms/ubuntu-vps.js.map +1 -1
  236. package/dist/server-install/state.d.ts +1 -1
  237. package/dist/server-install/steps.d.ts +2 -2
  238. package/dist/server-install/steps.js +6 -2
  239. package/dist/server-install/steps.js.map +1 -1
  240. package/dist/server-install/strategies.d.ts +1 -1
  241. package/dist/server-install/types.d.ts +38 -424
  242. package/dist/server-install/ui.d.ts +1 -1
  243. package/dist/skills-banner.d.ts +7 -6
  244. package/dist/skills-banner.js +7 -6
  245. package/dist/skills-banner.js.map +1 -1
  246. package/dist/skills-remote.d.ts +2 -2
  247. package/dist/skills-update.d.ts +88 -0
  248. package/dist/skills-update.js +392 -0
  249. package/dist/skills-update.js.map +1 -0
  250. package/dist/skills.d.ts +2 -0
  251. package/dist/skills.js +7 -2
  252. package/dist/skills.js.map +1 -1
  253. package/dist/todos.d.ts +2 -28
  254. package/dist/todos.js +1 -1
  255. package/dist/ui-state.d.ts +16 -2
  256. package/dist/ui-state.js +14 -1
  257. package/dist/ui-state.js.map +1 -1
  258. package/dist/workflows/load.d.ts +1 -1
  259. package/dist/workflows/run.d.ts +276 -15
  260. package/dist/workflows/run.js +1261 -159
  261. package/dist/workflows/run.js.map +1 -1
  262. package/dist/workflows/types.d.ts +62 -224
  263. package/dist/workflows/types.js +25 -2
  264. package/dist/workflows/types.js.map +1 -1
  265. package/dist/workspace/agent-accounts.d.ts +153 -0
  266. package/dist/workspace/agent-accounts.js +304 -0
  267. package/dist/workspace/agent-accounts.js.map +1 -0
  268. package/dist/workspace/agent-profiles.d.ts +78 -0
  269. package/dist/workspace/agent-profiles.js +115 -0
  270. package/dist/workspace/agent-profiles.js.map +1 -0
  271. package/dist/workspace/config.d.ts +94 -206
  272. package/dist/workspace/config.js +226 -14
  273. package/dist/workspace/config.js.map +1 -1
  274. package/dist/workspace/migrations.d.ts +1 -1
  275. package/dist/workspace/migrations.js +19 -4
  276. package/dist/workspace/migrations.js.map +1 -1
  277. package/dist/workspace/projects-cli.js +54 -4
  278. package/dist/workspace/projects-cli.js.map +1 -1
  279. package/dist/workspace/projects.d.ts +26 -2
  280. package/dist/workspace/projects.js +42 -3
  281. package/dist/workspace/projects.js.map +1 -1
  282. package/dist/workspace/semaphore.d.ts +51 -0
  283. package/dist/workspace/semaphore.js +53 -3
  284. package/dist/workspace/semaphore.js.map +1 -1
  285. package/dist/workspace/ui-state.d.ts +16 -5
  286. package/dist/workspace/ui-state.js +18 -7
  287. package/dist/workspace/ui-state.js.map +1 -1
  288. package/package.json +17 -39
  289. package/scripts/inline-contract.mjs +112 -0
  290. package/scripts/mock-claude.mjs +59 -1
  291. package/scripts/mock-pi-rpc.mjs +83 -0
  292. package/scripts/sync-readme.mjs +20 -0
  293. package/web/dist/assets/alert-dialog-BVs3QSmP.js +1 -0
  294. package/web/dist/assets/arrow-down-D7T7XuF6.js +1 -0
  295. package/web/dist/assets/arrow-left-B1dRFd8y.js +1 -0
  296. package/web/dist/assets/bundle-mjs-BT31bpU6.js +1 -0
  297. package/web/dist/assets/centered-state-DdRLYi9u.js +43 -0
  298. package/web/dist/assets/chevron-right-Dh0t3AL8.js +1 -0
  299. package/web/dist/assets/{chunk-BO2N2NFS-DtrdTCWa.js → chunk-BO2N2NFS-DE6qKn3r.js} +8 -8
  300. package/web/dist/assets/circle-check-4FDOlh9u.js +1 -0
  301. package/web/dist/assets/circle-x-CgTVbqX5.js +1 -0
  302. package/web/dist/assets/collapsible-BoADzTok.js +1 -0
  303. package/web/dist/assets/commit-list-BCcCkRbU.js +1 -0
  304. package/web/dist/assets/compare-variants-B7gTgGqR.js +1 -0
  305. package/web/dist/assets/{core-DePtBHcl.js → core-BCsw8oQw.js} +1 -1
  306. package/web/dist/assets/diff-ecfV3-op.js +3 -0
  307. package/web/dist/assets/diff-stat-C2KGLVnZ.js +1 -0
  308. package/web/dist/assets/{diff-view-DCeSegKk.js → diff-view-CQtonQ4L.js} +4 -4
  309. package/web/dist/assets/dropdown-menu-WcGoirf2.js +1 -0
  310. package/web/dist/assets/editable-title-SqNK-wuI.js +1 -0
  311. package/web/dist/assets/{ellipsis-vertical-CNnSLn5a.js → ellipsis-vertical-ClTFrwit.js} +1 -1
  312. package/web/dist/assets/{file-D4GBh1ao.js → file-BU0mWida.js} +1 -1
  313. package/web/dist/assets/folder-rsgCF0aw.js +1 -0
  314. package/web/dist/assets/{git-pull-request-DnR8Xh4_.js → git-pull-request-BFhIKb83.js} +1 -1
  315. package/web/dist/assets/git-toolbar-CF1_tzqz.js +1 -0
  316. package/web/dist/assets/github-CyjPz-Ks.js +1 -0
  317. package/web/dist/assets/highlighted-body-OFNGDK62-BL-MfFgl.js +1 -0
  318. package/web/dist/assets/highlighter-CdHqIwFr.js +3 -0
  319. package/web/dist/assets/image-preview-iEzCyEmz.js +1 -0
  320. package/web/dist/assets/index-BN09RpYY.css +2 -0
  321. package/web/dist/assets/index-CyG7aE1W.js +7 -0
  322. package/web/dist/assets/lib-BQXq3kEf.js +1 -0
  323. package/web/dist/assets/lib-BxQXEXDF.js +1 -0
  324. package/web/dist/assets/markdown-CNAa22LB.js +2 -0
  325. package/web/dist/assets/mermaid-GHXKKRXX-C4jxqUUb.js +1 -0
  326. package/web/dist/assets/new-task-form-CWhQZbsX.js +1 -0
  327. package/web/dist/assets/pill-BO5s2x3N.js +1 -0
  328. package/web/dist/assets/project-router-Dm4OhAPE.js +1 -0
  329. package/web/dist/assets/prompt-templates-CP__OCDQ.js +15 -0
  330. package/web/dist/assets/react-runtime-CCIEwYL0.js +9 -0
  331. package/web/dist/assets/{refresh-cw-BT8E96Tm.js → refresh-cw-DyiysCoP.js} +1 -1
  332. package/web/dist/assets/repo-git-B1WM6N8T.js +1 -0
  333. package/web/dist/assets/rolldown-runtime-QTnfLwEv.js +1 -0
  334. package/web/dist/assets/run-diff-CKx4d9Oo.js +3 -0
  335. package/web/dist/assets/run-header-DpbfOtNi.js +1 -0
  336. package/web/dist/assets/{search-x-BDjaMrzG.js → search-x-DRvk-6x4.js} +1 -1
  337. package/web/dist/assets/skill-empty-hint-D5vsHfMr.js +1 -0
  338. package/web/dist/assets/skills-BiWfHmCR.js +1 -0
  339. package/web/dist/assets/skills-XGltyIJ_.js +1 -0
  340. package/web/dist/assets/sparkles-BugkDxWO.js +1 -0
  341. package/web/dist/assets/{square-terminal-Ckjjn0vb.js → square-terminal-Drp2h-o8.js} +1 -1
  342. package/web/dist/assets/tab-link-CiRLRlnY.js +1 -0
  343. package/web/dist/assets/task-changes-C2hKkEtc.js +1 -0
  344. package/web/dist/assets/task-commits-CwGs_Opa.js +1 -0
  345. package/web/dist/assets/task-files-5KUgFzX3.js +2 -0
  346. package/web/dist/assets/task-thread-B3AFO3SS.js +9 -0
  347. package/web/dist/assets/textarea-Dn90Eun6.js +1 -0
  348. package/web/dist/assets/thread-loading-_1hPuk76.js +1 -0
  349. package/web/dist/assets/{trash-2-DAyZ0VSi.js → trash-2-BKEc5Sp2.js} +1 -1
  350. package/web/dist/assets/{triangle-alert-Uy8rokUh.js → triangle-alert-BGGPY2C2.js} +1 -1
  351. package/web/dist/assets/{upload-CDdyPPo_.js → upload-B0AQw-mO.js} +1 -1
  352. package/web/dist/assets/use-desktop-CegyTp3X.js +1 -0
  353. package/web/dist/assets/use-submit-shortcut-Mle-9uJp.js +1 -0
  354. package/web/dist/assets/utils-D9GHDNza.js +64 -0
  355. package/web/dist/assets/workflows-3PCz57Z6.js +11 -0
  356. package/web/dist/assets/zoomable-image-DTq7s8CZ.js +1 -0
  357. package/web/dist/index.html +33 -13
  358. package/scripts/dev.mjs +0 -74
  359. package/scripts/release-snapshot.mjs +0 -130
  360. package/scripts/release.mjs +0 -119
  361. package/web/dist/assets/arrow-left-CnSdp92h.js +0 -1
  362. package/web/dist/assets/bundle-mjs-BegPhL5c.js +0 -1
  363. package/web/dist/assets/centered-state-DOsTcJZF.js +0 -43
  364. package/web/dist/assets/commit-list-BrxBEzRK.js +0 -1
  365. package/web/dist/assets/compare-variants-Bv2c9ORF.js +0 -1
  366. package/web/dist/assets/dist-B6XQOhgM.js +0 -1
  367. package/web/dist/assets/git-toolbar-pIC1ubPM.js +0 -1
  368. package/web/dist/assets/github-DTTSG0ht.js +0 -1
  369. package/web/dist/assets/highlighted-body-OFNGDK62-BuFJwunK.js +0 -1
  370. package/web/dist/assets/image-preview-DEhW0TFz.js +0 -1
  371. package/web/dist/assets/index-Cijmlz7q.js +0 -30
  372. package/web/dist/assets/index-DzroxqBG.css +0 -2
  373. package/web/dist/assets/lib-DPEZDBUN.js +0 -1
  374. package/web/dist/assets/lib-uHpeUPzK.js +0 -1
  375. package/web/dist/assets/mermaid-GHXKKRXX-CN2zQue0.js +0 -1
  376. package/web/dist/assets/open-mercato-toBr6SOa.svg +0 -11
  377. package/web/dist/assets/project-router-BMx4e8m-.js +0 -1
  378. package/web/dist/assets/repo-git-BusYfa3t.js +0 -1
  379. package/web/dist/assets/run-diff-wOJ3odA-.js +0 -3
  380. package/web/dist/assets/run-header-Cg5incil.js +0 -1
  381. package/web/dist/assets/skill-empty-hint-DTUSp6Vl.js +0 -1
  382. package/web/dist/assets/skills-PpP2owbM.js +0 -1
  383. package/web/dist/assets/tab-link-F3uQrdm2.js +0 -1
  384. package/web/dist/assets/task-changes-iD9kS79I.js +0 -1
  385. package/web/dist/assets/task-commits-COkLaUri.js +0 -1
  386. package/web/dist/assets/task-files-Ckttz7XH.js +0 -2
  387. package/web/dist/assets/task-thread-CQD91VPt.js +0 -9
  388. package/web/dist/assets/textarea-Bj_LCreg.js +0 -1
  389. package/web/dist/assets/use-desktop-DUh0STzq.js +0 -3
  390. package/web/dist/assets/utils-B8s5qIcK.js +0 -1
  391. package/web/dist/assets/workflows-BFk8C0co.js +0 -11
  392. package/web/dist/assets/zoomable-image-PEDOqyLQ.js +0 -1
  393. /package/web/{open-mercato.svg → dist/open-mercato.svg} +0 -0
@@ -6,15 +6,14 @@
6
6
  * thing that ever moves the `latest` dist-tag (spec
7
7
  * `.ai/specs/2026-07-18-npm-preview-publish.md`, #482).
8
8
  *
9
- * Two decisions live here so they stay unit-testable, side-effect-free, and
10
- * name-agnostic (names come from the checked-out manifests, never constants):
11
- * the next stable version for a given bump, and how both manifests are stamped.
12
- * Crucially, the alias keeps a **caret** range on its scoped dependency — the
13
- * opposite of the snapshot stamper's exact pin — so a stable `cezar-cli` picks
14
- * up compatible patch releases of the implementation package.
9
+ * Two decisions live here so they stay unit-testable and side-effect-free: the next stable
10
+ * version for a given bump, and the pin style the release set is stamped with. Crucially,
11
+ * stable releases use a **caret** range — the opposite of the snapshot stamper's exact pin —
12
+ * so a stable `cezar-cli` picks up compatible patch releases of the implementation package.
15
13
  */
14
+ import { type ReleaseManifests as ReleaseManifestSet } from './manifests.ts';
16
15
  /** The version-bump modes the Release workflow offers. `existing` publishes the
17
- * version already committed to the root manifest (for hand-prepared releases);
16
+ * version already committed to the service manifest (for hand-prepared releases);
18
17
  * the rest increment semver from the current base. */
19
18
  export type ReleaseBump = 'patch' | 'minor' | 'major' | 'existing';
20
19
  export declare const RELEASE_BUMPS: readonly ReleaseBump[];
@@ -27,26 +26,13 @@ export declare function isReleaseBump(value: string): value is ReleaseBump;
27
26
  * `npm version` does. Returns `null` for an unparseable base so the caller can
28
27
  * fail loudly instead of publishing a garbage version. */
29
28
  export declare function computeStableVersion(bump: ReleaseBump, base: string): string | null;
30
- /** The minimal manifest shape the stamper touches; everything else passes through. */
31
- export interface ManifestLike {
32
- name: string;
33
- version: string;
34
- dependencies?: Record<string, string>;
35
- [key: string]: unknown;
36
- }
37
- /** Stamp both manifests to a stable version.
29
+ export type { ManifestLike, ReleaseManifests } from './manifests.ts';
30
+ /** Stamp the release set to a stable version.
38
31
  *
39
- * Mirror of `stampManifests` in `snapshot.ts`, but the alias's dependency on
40
- * the scoped package is a **caret** range (`^0.1.6`), not an exact pin — a
41
- * stable `cezar-cli` should follow compatible releases of the implementation
42
- * package, whereas a snapshot must pin the one exact build it was cut from.
43
- *
44
- * Like the snapshot stamper, the alias inherits `repository`/`homepage`/`bugs`
45
- * from the root manifest: `--provenance` publishes are rejected (E422) unless
46
- * the manifest's `repository.url` matches the building repo, and the alias file
47
- * carries none of its own. The git URL already matches and survives any
48
- * npm-name rename. */
49
- export declare function stampStableManifests(rootPkg: ManifestLike, aliasPkg: ManifestLike, version: string): {
50
- root: ManifestLike;
51
- alias: ManifestLike;
52
- };
32
+ * Mirror of `stampSnapshotManifests`, differing in exactly one decision: intra-release
33
+ * dependencies get a **caret** range (`^0.1.6`), not an exact pin. A stable `cezar-cli` should
34
+ * follow compatible releases of the implementation package, and a stable service should follow
35
+ * compatible releases of the api-client; a snapshot must pin the one exact build it was cut
36
+ * from. Everything else — which manifests exist, which sections carry the pin, what the alias
37
+ * inherits — lives in `manifests.ts` so the two channels cannot drift apart. */
38
+ export declare function stampStableManifests(manifests: ReleaseManifestSet, version: string): ReleaseManifestSet;
@@ -6,13 +6,12 @@
6
6
  * thing that ever moves the `latest` dist-tag (spec
7
7
  * `.ai/specs/2026-07-18-npm-preview-publish.md`, #482).
8
8
  *
9
- * Two decisions live here so they stay unit-testable, side-effect-free, and
10
- * name-agnostic (names come from the checked-out manifests, never constants):
11
- * the next stable version for a given bump, and how both manifests are stamped.
12
- * Crucially, the alias keeps a **caret** range on its scoped dependency — the
13
- * opposite of the snapshot stamper's exact pin — so a stable `cezar-cli` picks
14
- * up compatible patch releases of the implementation package.
9
+ * Two decisions live here so they stay unit-testable and side-effect-free: the next stable
10
+ * version for a given bump, and the pin style the release set is stamped with. Crucially,
11
+ * stable releases use a **caret** range — the opposite of the snapshot stamper's exact pin —
12
+ * so a stable `cezar-cli` picks up compatible patch releases of the implementation package.
15
13
  */
14
+ import { stampManifestSet } from './manifests.js';
16
15
  export const RELEASE_BUMPS = ['patch', 'minor', 'major', 'existing'];
17
16
  export function isReleaseBump(value) {
18
17
  return RELEASE_BUMPS.includes(value);
@@ -42,27 +41,15 @@ export function computeStableVersion(bump, base) {
42
41
  return null;
43
42
  }
44
43
  }
45
- /** Stamp both manifests to a stable version.
44
+ /** Stamp the release set to a stable version.
46
45
  *
47
- * Mirror of `stampManifests` in `snapshot.ts`, but the alias's dependency on
48
- * the scoped package is a **caret** range (`^0.1.6`), not an exact pin — a
49
- * stable `cezar-cli` should follow compatible releases of the implementation
50
- * package, whereas a snapshot must pin the one exact build it was cut from.
51
- *
52
- * Like the snapshot stamper, the alias inherits `repository`/`homepage`/`bugs`
53
- * from the root manifest: `--provenance` publishes are rejected (E422) unless
54
- * the manifest's `repository.url` matches the building repo, and the alias file
55
- * carries none of its own. The git URL already matches and survives any
56
- * npm-name rename. */
57
- export function stampStableManifests(rootPkg, aliasPkg, version) {
58
- const inherited = {};
59
- for (const field of ['repository', 'homepage', 'bugs']) {
60
- if (rootPkg[field] !== undefined)
61
- inherited[field] = rootPkg[field];
62
- }
63
- return {
64
- root: { ...rootPkg, version },
65
- alias: { ...aliasPkg, ...inherited, version, dependencies: { [rootPkg.name]: `^${version}` } },
66
- };
46
+ * Mirror of `stampSnapshotManifests`, differing in exactly one decision: intra-release
47
+ * dependencies get a **caret** range (`^0.1.6`), not an exact pin. A stable `cezar-cli` should
48
+ * follow compatible releases of the implementation package, and a stable service should follow
49
+ * compatible releases of the api-client; a snapshot must pin the one exact build it was cut
50
+ * from. Everything else — which manifests exist, which sections carry the pin, what the alias
51
+ * inherits — lives in `manifests.ts` so the two channels cannot drift apart. */
52
+ export function stampStableManifests(manifests, version) {
53
+ return stampManifestSet(manifests, version, (v) => `^${v}`);
67
54
  }
68
55
  //# sourceMappingURL=stable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stable.js","sourceRoot":"","sources":["../../src/release/stable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAOH,MAAM,CAAC,MAAM,aAAa,GAA2B,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AAE7F,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,OAAQ,aAAmC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC9D,CAAC;AAED;;;;;;2DAM2D;AAC3D,MAAM,UAAU,oBAAoB,CAAC,IAAiB,EAAE,IAAY;IAClE,MAAM,CAAC,GAAG,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACpD,IAAI,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IACpB,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,C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C9D,CAAC"}
@@ -0,0 +1,41 @@
1
+ /** Where a run's agent-scoped temp directory lives. */
2
+ export declare function agentTmpDir(dataDir: string, runId: string): string;
3
+ /**
4
+ * The preflight's failure. Named so the spawn path can tell it apart from an
5
+ * ordinary crash and turn it into the run's `error` — the same treatment
6
+ * `ModelIdentityError` gets, and the same channel the thread footer renders.
7
+ */
8
+ export declare class AgentTempDirError extends Error {
9
+ readonly path: string;
10
+ constructor(path: string, reason: unknown);
11
+ }
12
+ /** Opt-out spelling matches the house style for default-on behaviour
13
+ * (`CEZ_AUTONAME=0`, `CEZ_SKILLS_AUTO_UPDATE=0`): only an exact `0` disables. */
14
+ export declare function agentTmpDirEnabled(env?: NodeJS.ProcessEnv): boolean;
15
+ /**
16
+ * The `TMPDIR`/`TEMP`/`TMP` overrides for this run, after proving the resolved
17
+ * directory actually accepts writes. Throws `AgentTempDirError` when it does
18
+ * not — callers turn that into the run's error rather than spawning.
19
+ *
20
+ * All three spellings are set, on every platform: a tool that reads `TMP` (or
21
+ * `TEMP`) would otherwise keep following the host value straight back to the
22
+ * exhausted directory this exists to escape.
23
+ *
24
+ * Returns `{}` under the opt-out, without probing anything: the hatch turns the
25
+ * whole feature off, preflight included, so it stays an escape someone can
26
+ * actually take.
27
+ */
28
+ export declare function agentTmpEnv(dataDir: string, runId: string, env?: NodeJS.ProcessEnv): Record<string, string>;
29
+ /**
30
+ * Reap one run's directory. Scratch, not an artifact: nothing reads it once the
31
+ * agent is gone, and a Continue re-creates it through `agentTmpEnv`. Never
32
+ * throws — reaping must not break a terminal transition.
33
+ */
34
+ export declare function removeAgentTmpDir(dataDir: string, runId: string): void;
35
+ /**
36
+ * Remove every per-run directory that is not in `keepRunIds` — the startup
37
+ * sweep, so a crash (which never reaches the terminal-transition reap) cannot
38
+ * accumulate them forever. Confined to `<dataDir>/tmp`; sibling run state is
39
+ * never enumerated, let alone touched. Returns the ids actually reaped.
40
+ */
41
+ export declare function sweepAgentTmpDirs(dataDir: string, keepRunIds: Iterable<string>): string[];
@@ -0,0 +1,183 @@
1
+ /**
2
+ * Task-scoped temp directory for spawned agents (#785).
3
+ *
4
+ * Every agent used to inherit the host's `TMPDIR`/`TEMP`/`TMP` verbatim — they
5
+ * ride in on `buildChildEnv`'s base allowlist — so every run on the machine
6
+ * shared one directory. On a box that runs agents continuously and never
7
+ * reboots, that directory is a tmpfs nobody reaps, and once it hits its quota
8
+ * the failure is *silent*: the Claude Code CLI roots its scratch tree at
9
+ * `os.tmpdir()` and round-trips each `Bash` command's stdout/stderr through a
10
+ * file there. Under `EDQUOT` the inode is still allocated, so the file is
11
+ * created and the write fails — the command runs, its side effects land, and
12
+ * the agent reads back an empty result with a bogus exit status. Nothing in the
13
+ * cockpit says anything is wrong.
14
+ *
15
+ * Two properties fix that, and this module owns both:
16
+ *
17
+ * 1. **Isolation** — each run gets `<dataDir>/tmp/<runId>`, on the same disk
18
+ * as the run's own state rather than a shared tmpfs, reaped when the run
19
+ * ends. `buildChildEnv` applies the per-run env last, so these values win
20
+ * over the host's without any allowlist change.
21
+ * 2. **Fail loud** — the directory is write-probed before the backend spawns.
22
+ * A run that cannot get a working temp directory fails immediately with a
23
+ * named, actionable error instead of spawning an agent that will run blind.
24
+ *
25
+ * `CEZ_AGENT_TMPDIR=0` opts out of BOTH — cezar keeps its hands off the temp
26
+ * directory entirely and the pre-#785 behaviour is back, byte for byte. That is
27
+ * deliberate: an escape hatch that still imposed the preflight would be a hatch
28
+ * you cannot actually escape through, and this repo's graceful-degradation rule
29
+ * says a new check must never become the only way to run.
30
+ */
31
+ import { existsSync, mkdirSync, readdirSync, rmSync, writeFileSync } from 'node:fs';
32
+ import { join } from 'node:path';
33
+ /** Run ids are uuids; anything else must never reach a recursive `rmSync`.
34
+ *
35
+ * `.` and `..` are excluded explicitly, not as pedantry: they match the
36
+ * character class, and `join(dataDir, 'tmp', '..')` resolves to `<dataDir>`
37
+ * itself — a recursive removal of every run's state. A guard that admits the
38
+ * one input capable of turning this helper into data loss is not a guard. */
39
+ function safeRunId(id) {
40
+ return /^[A-Za-z0-9._-]+$/.test(id) && id !== '.' && id !== '..';
41
+ }
42
+ /** Where a run's agent-scoped temp directory lives. */
43
+ export function agentTmpDir(dataDir, runId) {
44
+ return join(dataDir, 'tmp', runId);
45
+ }
46
+ /** The root every per-run directory hangs off — the ONLY tree this module
47
+ * removes anything from (`runs/`, `runs.json` and `worktrees/` are siblings). */
48
+ function agentTmpRoot(dataDir) {
49
+ return join(dataDir, 'tmp');
50
+ }
51
+ /** `errno` → the phrasing a human recognises from their shell. */
52
+ const REASONS = {
53
+ EDQUOT: 'Disk quota exceeded',
54
+ ENOSPC: 'No space left on device',
55
+ EACCES: 'Permission denied',
56
+ EPERM: 'Operation not permitted',
57
+ EROFS: 'Read-only file system',
58
+ };
59
+ /**
60
+ * The preflight's failure. Named so the spawn path can tell it apart from an
61
+ * ordinary crash and turn it into the run's `error` — the same treatment
62
+ * `ModelIdentityError` gets, and the same channel the thread footer renders.
63
+ */
64
+ export class AgentTempDirError extends Error {
65
+ path;
66
+ constructor(path, reason) {
67
+ const code = reason?.code;
68
+ const why = (code && REASONS[code])
69
+ ?? code
70
+ ?? (reason instanceof Error ? reason.message : String(reason));
71
+ super(`agent temp directory is not writable: ${path} (${why}) — free disk space, `
72
+ + 'or set CEZ_AGENT_TMPDIR=0 to fall back to the host TMPDIR');
73
+ this.name = 'AgentTempDirError';
74
+ this.path = path;
75
+ }
76
+ }
77
+ /** Opt-out spelling matches the house style for default-on behaviour
78
+ * (`CEZ_AUTONAME=0`, `CEZ_SKILLS_AUTO_UPDATE=0`): only an exact `0` disables. */
79
+ export function agentTmpDirEnabled(env = process.env) {
80
+ return env.CEZ_AGENT_TMPDIR !== '0';
81
+ }
82
+ /** Distinguishes concurrent probes from one process; the pid alone would let two
83
+ * spawns racing on the same directory delete each other's file mid-probe. */
84
+ let probeSeq = 0;
85
+ /**
86
+ * Write-probe `dir`. Creating the file is not enough to prove the directory
87
+ * works — a quota-exhausted tmpfs still allocates the inode and only fails the
88
+ * `write(2)` — so the probe writes real bytes and removes them again. A
89
+ * directory that is merely *full but writable* passes, by design.
90
+ */
91
+ function probeWritable(dir) {
92
+ const probe = join(dir, `.cez-tmp-probe-${process.pid}-${(probeSeq += 1)}`);
93
+ try {
94
+ writeFileSync(probe, 'cez');
95
+ }
96
+ catch (err) {
97
+ throw new AgentTempDirError(dir, err);
98
+ }
99
+ finally {
100
+ try {
101
+ rmSync(probe, { force: true });
102
+ }
103
+ catch {
104
+ // best-effort: a probe we could not remove is not a reason to fail a run.
105
+ }
106
+ }
107
+ }
108
+ /**
109
+ * The `TMPDIR`/`TEMP`/`TMP` overrides for this run, after proving the resolved
110
+ * directory actually accepts writes. Throws `AgentTempDirError` when it does
111
+ * not — callers turn that into the run's error rather than spawning.
112
+ *
113
+ * All three spellings are set, on every platform: a tool that reads `TMP` (or
114
+ * `TEMP`) would otherwise keep following the host value straight back to the
115
+ * exhausted directory this exists to escape.
116
+ *
117
+ * Returns `{}` under the opt-out, without probing anything: the hatch turns the
118
+ * whole feature off, preflight included, so it stays an escape someone can
119
+ * actually take.
120
+ */
121
+ export function agentTmpEnv(dataDir, runId, env = process.env) {
122
+ if (!agentTmpDirEnabled(env))
123
+ return {};
124
+ const dir = agentTmpDir(dataDir, runId);
125
+ try {
126
+ mkdirSync(dir, { recursive: true });
127
+ }
128
+ catch (err) {
129
+ throw new AgentTempDirError(dir, err);
130
+ }
131
+ probeWritable(dir);
132
+ return { TMPDIR: dir, TEMP: dir, TMP: dir };
133
+ }
134
+ /**
135
+ * Reap one run's directory. Scratch, not an artifact: nothing reads it once the
136
+ * agent is gone, and a Continue re-creates it through `agentTmpEnv`. Never
137
+ * throws — reaping must not break a terminal transition.
138
+ */
139
+ export function removeAgentTmpDir(dataDir, runId) {
140
+ if (!safeRunId(runId))
141
+ return;
142
+ try {
143
+ rmSync(agentTmpDir(dataDir, runId), { recursive: true, force: true });
144
+ }
145
+ catch {
146
+ // best-effort; the startup sweep picks up whatever survives.
147
+ }
148
+ }
149
+ /**
150
+ * Remove every per-run directory that is not in `keepRunIds` — the startup
151
+ * sweep, so a crash (which never reaches the terminal-transition reap) cannot
152
+ * accumulate them forever. Confined to `<dataDir>/tmp`; sibling run state is
153
+ * never enumerated, let alone touched. Returns the ids actually reaped.
154
+ */
155
+ export function sweepAgentTmpDirs(dataDir, keepRunIds) {
156
+ const root = agentTmpRoot(dataDir);
157
+ if (!existsSync(root))
158
+ return [];
159
+ const keep = new Set(keepRunIds);
160
+ const reaped = [];
161
+ let entries;
162
+ try {
163
+ entries = readdirSync(root, { withFileTypes: true })
164
+ .filter((e) => e.isDirectory())
165
+ .map((e) => e.name);
166
+ }
167
+ catch {
168
+ return [];
169
+ }
170
+ for (const name of entries) {
171
+ if (keep.has(name) || !safeRunId(name))
172
+ continue;
173
+ try {
174
+ rmSync(join(root, name), { recursive: true, force: true });
175
+ reaped.push(name);
176
+ }
177
+ catch {
178
+ // best-effort: a locked directory is retried on the next boot.
179
+ }
180
+ }
181
+ return reaped;
182
+ }
183
+ //# sourceMappingURL=agent-tmpdir.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-tmpdir.js","sourceRoot":"","sources":["../../src/runs/agent-tmpdir.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACpF,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC;;;;;8EAK8E;AAC9E,SAAS,SAAS,CAAC,EAAU;IAC3B,OAAO,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,IAAI,CAAC;AACnE,CAAC;AAED,uDAAuD;AACvD,MAAM,UAAU,WAAW,CAAC,OAAe,EAAE,KAAa;IACxD,OAAO,IAAI,CAAC,OAAO,E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-shot LLM namer (spec 2026-07-17-task-auto-naming): turns a task's
4
4
  * INTENT — skill + arguments + prompt + PR/issue context, never the agent's
@@ -2,6 +2,7 @@ import { z } from 'zod';
2
2
  import { loadConfig } from '../config.js';
3
3
  import { createRunner } from '../core/runner-factory.js';
4
4
  import { parseStructured } from '../planner.js';
5
+ import { resolveProfileEnvForRoot } from '../workspace/agent-profiles.js';
5
6
  import { extractTaskRefs, refineTaskRefs, titleRefNumber } from './task-refs.js';
6
7
  /**
7
8
  * The one-shot LLM namer (spec 2026-07-17-task-auto-naming): turns a task's
@@ -126,6 +127,10 @@ export async function generateRunName(repoRoot, ctx) {
126
127
  const config = await loadConfig(repoRoot);
127
128
  const runner = createRunner(config.defaultRunner);
128
129
  const model = config.defaultRunner === 'claude' ? config.namerModel : undefined;
130
+ // Name under the project's own agent account (spec 2026-07-29-agent-profiles) — naming is
131
+ // a model call like any other, and billing it to the personal subscription for a work
132
+ // project is the exact confusion accounts exist to remove.
133
+ const { env: profileEnv } = await resolveProfileEnvForRoot(repoRoot, config.defaultRunner);
129
134
  for (let attempt = 0; attempt < 2; attempt++) {
130
135
  const result = await runner.run({
131
136
  systemPrompt: NAMER_SYSTEM_PROMPT,
@@ -137,7 +142,7 @@ export async function generateRunName(repoRoot, ctx) {
137
142
  // Shadow the argv-capture hook: dry-run tests capture the AGENT's argv
138
143
  // through CEZ_MOCK_ARGS_FILE; the namer's bookkeeping call must not
139
144
  // interleave lines into that file.
140
- env: { CEZ_MOCK_ARGS_FILE: '' },
145
+ env: { ...profileEnv, CEZ_MOCK_ARGS_FILE: '' },
141
146
  });
142
147
  const composed = composeNameResult(result.text, ctx);
143
148
  if (composed)
@@ -1 +1 @@
1
- {"version":3,"file":"auto-name.js","sourceRoot":"","sources":["../../src/runs/auto-name.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,E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AAiB,CAAC,OAAe,EAAE,GAAiB;IAClE,MAAM,MAAM,GAAG,eAAe,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;IAC7D,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACzB,iFAAiF;IACjF,2EAA2E;IAC3E,wEAAwE;IACxE,gDAAgD;IAChD,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACjD,MAAM,IAAI,GAAG,cAAc,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC;IACtE,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACvD,MAAM,SAAS,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,WAAW,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;IAClF,MAAM,YAAY,GAAG,iBAAiB,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAChE,IAAI,CAAC,YAAY,IAAI,YAAY,KAAK,MAAM,CAAC,SAAS,IAAI,EAAE,CAAC;QAAE,OAAO,IAAI,CAAC;IAC3E,OAAO,EAAE,YAAY,EAAE,GAAG,OAAO,EAAE,CAAC;AACtC,CAAC"}
@@ -0,0 +1,50 @@
1
+ import { z } from 'zod';
2
+ import { type RunEvent, type RunHistoryContext, type RunHistoryEvent, type RunHistoryPage } from '../contract/index.js';
3
+ declare const pageCursorSchema: z.ZodObject<{
4
+ v: z.ZodLiteral<1>;
5
+ kind: z.ZodLiteral<"page">;
6
+ direction: z.ZodEnum<{
7
+ newer: "newer";
8
+ older: "older";
9
+ }>;
10
+ fileSize: z.ZodNumber;
11
+ boundarySeq: z.ZodNumber;
12
+ }, z.core.$strip>;
13
+ declare const liveCursorSchema: z.ZodObject<{
14
+ v: z.ZodLiteral<1>;
15
+ kind: z.ZodLiteral<"live">;
16
+ offset: z.ZodNumber;
17
+ boundarySeq: z.ZodNumber;
18
+ }, z.core.$strip>;
19
+ export declare class HistoryCursorError extends Error {
20
+ readonly status: 400 | 409;
21
+ constructor(status: 400 | 409, message: string);
22
+ }
23
+ export declare function decodePageCursor(cursor: string): z.infer<typeof pageCursorSchema>;
24
+ export declare function decodeLiveCursor(cursor: string): z.infer<typeof liveCursorSchema>;
25
+ interface CanonicalItem {
26
+ key: string;
27
+ firstSeq: number;
28
+ lastSeq: number;
29
+ }
30
+ /**
31
+ * Classify the source events into the same protocol-level item units the cockpit renders.
32
+ *
33
+ * Projection always operates on complete collected turns. A v2-covered turn suppresses its v1
34
+ * tool twins; lifecycle snapshots sharing a step/item identity collapse to one item.
35
+ */
36
+ export declare function canonicalSessionItems(events: readonly RunEvent[]): CanonicalItem[];
37
+ export interface HistoryReadInstrumentation {
38
+ fileSize: number;
39
+ bytesRead: number;
40
+ retainedEvents: number;
41
+ }
42
+ export declare function readRunHistoryPage(filePath: string, cursor?: string, onRead?: (instrumentation: HistoryReadInstrumentation) => void): Promise<RunHistoryPage>;
43
+ /** One forward pass retaining the latest Plan snapshot and only the selector-equivalent agent episode. */
44
+ export declare function deriveRunContextEvents(filePath: string): Promise<RunHistoryContext>;
45
+ export declare function readEventsAfterLiveCursor(filePath: string, cursor: string): Promise<{
46
+ events: RunHistoryEvent[];
47
+ boundarySeq: number;
48
+ }>;
49
+ export declare function validateLiveCursor(filePath: string, cursor: string): Promise<void>;
50
+ export {};