@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
@@ -1 +1 @@
1
- {"version":3,"file":"agent-env.js","sourceRoot":"","sources":["../../src/core/agent-env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;;;GAOG;AACH,SAAS,QAAQ,CAAC,KAAwB;IACxC,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;AACpD,CAAC;AAED,6EAA6E;AAC7E,MAAM,gBAAgB,GAAwB,QAAQ,CAAC;IACrD,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;QACvE,IAAI,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC;QAC3C,IAAI,aAAa,CAAC,GAAG,EAAE,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC;QAC9E,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"agent-env.js","sourceRoot":"","sources":["../../src/core/agent-env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;;;GAOG;AACH,SAAS,QAAQ,CAAC,KAAwB;IACxC,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;AACpD,CAAC;AAED,6EAA6E;AAC7E,MAAM,gBAAgB,GAAwB,QAAQ,CAAC;IACrD,gCAAgC;IAChC,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,SAAS;IACT,OAAO;IACP,KAAK;IACL,QAAQ;IACR,OAAO;IACP,UAAU;IACV,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,KAAK;IACL,IAAI;IACJ,SAAS;IACT,MAAM;IACN,UAAU;IACV,qBAAqB;IACrB,MAAM;IACN,UAAU;IACV,WAAW;IACX,SAAS;IACT,OAAO;IACP,UAAU;IACV,aAAa;IACb,UAAU;IACV,SAAS;IACT,iBAAiB;IACjB,YAAY;IACZ,uEAAuE;IACvE,eAAe;IACf,eAAe;IACf,mBAAmB;IACnB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,MAAM;IACN,SAAS;IACT,UAAU;IACV,oCAAoC;IACpC,WAAW;IACX,YAAY;IACZ,qBAAqB;IACrB,SAAS;IACT,iBAAiB;IACjB,eAAe;IACf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GAAG,EAAE,aAAa,CAAC;YAAE,OAAO,IAAI,CAAC;QAC1E,+BAA+B;QAC/B,IAAI,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC;QACtC,0EAA0E;QAC1E,uEAAuE;QACvE,uEAAuE;QACvE,IAAI,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC;QAC3C,IAAI,aAAa,CAAC,GAAG,EAAE,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC;QAC9E,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
@@ -0,0 +1,10 @@
1
+ /** The server-side switch that makes native agent settings authoritative. */
2
+ export declare const AGENT_MODELS_LOCKED_ENV = "CEZ_AGENT_MODELS_LOCKED";
3
+ /**
4
+ * Only the exact environment value `1` enables the process-wide lock. The
5
+ * global workspace config or one repository may additionally opt in with
6
+ * `"modelsLocked": true`; missing, unreadable, malformed, and false values
7
+ * preserve ordinary model selection unless another source enables the lock.
8
+ */
9
+ export declare function agentModelsLocked(repoRoot?: string, env?: NodeJS.ProcessEnv): boolean;
10
+ export declare const AGENT_MODELS_LOCKED_ERROR = "agent models are locked \u2014 configure the model in the native coding-agent settings";
@@ -0,0 +1,36 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { join } from 'node:path';
3
+ import { z } from 'zod';
4
+ import { workspaceConfigPath } from '../paths.js';
5
+ /** The server-side switch that makes native agent settings authoritative. */
6
+ export const AGENT_MODELS_LOCKED_ENV = 'CEZ_AGENT_MODELS_LOCKED';
7
+ const modelPolicyConfigSchema = z.object({
8
+ modelsLocked: z.boolean().optional(),
9
+ }).passthrough();
10
+ /**
11
+ * Only the exact environment value `1` enables the process-wide lock. The
12
+ * global workspace config or one repository may additionally opt in with
13
+ * `"modelsLocked": true`; missing, unreadable, malformed, and false values
14
+ * preserve ordinary model selection unless another source enables the lock.
15
+ */
16
+ export function agentModelsLocked(repoRoot, env = process.env) {
17
+ if (env[AGENT_MODELS_LOCKED_ENV] === '1')
18
+ return true;
19
+ const paths = [
20
+ workspaceConfigPath(env),
21
+ ...(repoRoot ? [join(repoRoot, '.ai', 'cezar', 'config.json')] : []),
22
+ ];
23
+ for (const path of paths) {
24
+ try {
25
+ const parsed = modelPolicyConfigSchema.safeParse(JSON.parse(readFileSync(path, 'utf8')));
26
+ if (parsed.success && parsed.data.modelsLocked === true)
27
+ return true;
28
+ }
29
+ catch {
30
+ // Each source is optional and independently degradable.
31
+ }
32
+ }
33
+ return false;
34
+ }
35
+ export const AGENT_MODELS_LOCKED_ERROR = 'agent models are locked — configure the model in the native coding-agent settings';
36
+ //# sourceMappingURL=agent-model-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-model-policy.js","sourceRoot":"","sources":["../../src/core/agent-model-policy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,6EAA6E;AAC7E,MAAM,CAAC,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAEjE,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC,WAAW,EAAE,CAAC;AAEjB;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAC/B,QAAiB,EACjB,GAAG,GAAsB,OAAO,CAAC,GAAG;IAEpC,IAAI,GAAG,CAAC,uBAAuB,CAAC,KAAK,GAAG;QAAE,OAAO,IAAI,CAAC;IACtD,MAAM,KAAK,GAAG;QACZ,mBAAmB,CAAC,GAAG,CAAC;QACxB,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KACrE,CAAC;IACF,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,uBAAuB,CAAC,SAAS,CAC9C,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CACvC,CAAC;YACF,IAAI,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,YAAY,KAAK,IAAI;gBAAE,OAAO,IAAI,CAAC;QACvE,CAAC;QAAC,MAAM,CAAC;YACP,wDAAwD;QAC1D,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,CAAC,MAAM,yBAAyB,GACpC,mFAAmF,CAAC"}
@@ -0,0 +1,62 @@
1
+ import type { ProviderId } from './provider-auth.ts';
2
+ /**
3
+ * Agent profiles — a second (third, …) login of the SAME agent CLI.
4
+ *
5
+ * The binary never changes; only the environment does. `CLAUDE_CONFIG_DIR=~/.claude-klaudiusz claude`
6
+ * is the same Claude Code talking to a different account, because that one variable relocates the
7
+ * agent's ENTIRE per-user home: credentials, settings, projects and — the part that bites —
8
+ * `sessions/`, so a session id only means something inside the dir it was created in.
9
+ *
10
+ * This module is the single maintenance surface for that vendor knowledge, and it is deliberately
11
+ * the SIBLING of `src/agent-config/catalog.ts` rather than part of it: the catalog owns config
12
+ * *file* knowledge (paths, formats, verbatim precedence strings), this owns the *home-relocation*
13
+ * variable. Splitting them also keeps the layering honest — `agent-config/` may import `paths.ts`,
14
+ * while this is imported BY the runners, provider auth and the terminal handoff.
15
+ *
16
+ * Pure by construction: no filesystem, no `process.env`, nothing to stub. Resolution against the
17
+ * workspace config lives in `src/workspace/agent-profiles.ts`.
18
+ *
19
+ * Facts verified against the shipped CLIs on 2026-07-29.
20
+ */
21
+ /**
22
+ * Which env var relocates each agent's whole per-user home.
23
+ *
24
+ * `null` means the agent has no such variable and therefore cannot carry profiles:
25
+ *
26
+ * - **claude** → `CLAUDE_CONFIG_DIR`. Documented; moves credentials, settings, projects, sessions.
27
+ * - **codex** → `CODEX_HOME`. Documented; `auth.json` lives inside it, so identity moves too.
28
+ * - **opencode** → nothing usable. `OPENCODE_CONFIG_DIR`/`OPENCODE_CONFIG` move CONFIG ONLY;
29
+ * credentials live in `~/.local/share/opencode/opencode.db`, behind a separate `OPENCODE_DB`.
30
+ * A config-dir-only profile would swap settings while still billing the other account — the UI
31
+ * would say "Work" and the run would not be — so OpenCode is unsupported until it documents a
32
+ * single home variable. `XDG_CONFIG_HOME` is rejected regardless: it is machine-wide and would
33
+ * relocate every other XDG-aware tool the agent's own Bash calls touch.
34
+ * - **pi** → nothing documented. pi ships no per-user home variable of its own, so — exactly like
35
+ * OpenCode — a second account cannot be carried without silently billing the wrong one. `null`
36
+ * until pi documents a single home variable that moves credentials as well as config.
37
+ */
38
+ export declare const PROFILE_ENV_VAR: Record<ProviderId, string | null>;
39
+ /** Providers that can carry more than one account — what the UI offers "Add account" for. */
40
+ export declare const PROFILE_CAPABLE_PROVIDERS: readonly ProviderId[];
41
+ export declare function supportsProfiles(provider: ProviderId): boolean;
42
+ /**
43
+ * The env a spawned agent needs to run under `configDir`, or `{}` for the default profile.
44
+ *
45
+ * `{}` is load-bearing, not a convenience: `buildChildEnv` applies `extraEnv` AFTER its allowlist
46
+ * and so bypasses it entirely, which makes this function the only thing standing between a
47
+ * profile and the child environment. Returning nothing for the zero-config case means the
48
+ * overwhelmingly common path adds literally no variable — the same environment cezar has always
49
+ * spawned. It also means this can never emit one provider's variable for another provider's
50
+ * process: the name comes from `PROFILE_ENV_VAR[provider]` and nowhere else.
51
+ */
52
+ export declare function profileEnv(provider: ProviderId, configDir: string | null | undefined): Record<string, string>;
53
+ /**
54
+ * Does `entries` look like a config dir this provider actually wrote?
55
+ *
56
+ * ADVISORY, never a gate. The honest first-run flow for a second account is *add the profile →
57
+ * Connect → the CLI creates the dir on login*, so refusing an unrecognized directory would break
58
+ * the very case the feature exists for. The answer drives a warning line in the UI, nothing more.
59
+ *
60
+ * Takes the directory listing rather than a path so it stays pure; the caller reads the dir.
61
+ */
62
+ export declare function looksLikeProfileDir(provider: ProviderId, entries: readonly string[]): boolean;
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Agent profiles — a second (third, …) login of the SAME agent CLI.
3
+ *
4
+ * The binary never changes; only the environment does. `CLAUDE_CONFIG_DIR=~/.claude-klaudiusz claude`
5
+ * is the same Claude Code talking to a different account, because that one variable relocates the
6
+ * agent's ENTIRE per-user home: credentials, settings, projects and — the part that bites —
7
+ * `sessions/`, so a session id only means something inside the dir it was created in.
8
+ *
9
+ * This module is the single maintenance surface for that vendor knowledge, and it is deliberately
10
+ * the SIBLING of `src/agent-config/catalog.ts` rather than part of it: the catalog owns config
11
+ * *file* knowledge (paths, formats, verbatim precedence strings), this owns the *home-relocation*
12
+ * variable. Splitting them also keeps the layering honest — `agent-config/` may import `paths.ts`,
13
+ * while this is imported BY the runners, provider auth and the terminal handoff.
14
+ *
15
+ * Pure by construction: no filesystem, no `process.env`, nothing to stub. Resolution against the
16
+ * workspace config lives in `src/workspace/agent-profiles.ts`.
17
+ *
18
+ * Facts verified against the shipped CLIs on 2026-07-29.
19
+ */
20
+ /**
21
+ * Which env var relocates each agent's whole per-user home.
22
+ *
23
+ * `null` means the agent has no such variable and therefore cannot carry profiles:
24
+ *
25
+ * - **claude** → `CLAUDE_CONFIG_DIR`. Documented; moves credentials, settings, projects, sessions.
26
+ * - **codex** → `CODEX_HOME`. Documented; `auth.json` lives inside it, so identity moves too.
27
+ * - **opencode** → nothing usable. `OPENCODE_CONFIG_DIR`/`OPENCODE_CONFIG` move CONFIG ONLY;
28
+ * credentials live in `~/.local/share/opencode/opencode.db`, behind a separate `OPENCODE_DB`.
29
+ * A config-dir-only profile would swap settings while still billing the other account — the UI
30
+ * would say "Work" and the run would not be — so OpenCode is unsupported until it documents a
31
+ * single home variable. `XDG_CONFIG_HOME` is rejected regardless: it is machine-wide and would
32
+ * relocate every other XDG-aware tool the agent's own Bash calls touch.
33
+ * - **pi** → nothing documented. pi ships no per-user home variable of its own, so — exactly like
34
+ * OpenCode — a second account cannot be carried without silently billing the wrong one. `null`
35
+ * until pi documents a single home variable that moves credentials as well as config.
36
+ */
37
+ export const PROFILE_ENV_VAR = {
38
+ claude: 'CLAUDE_CONFIG_DIR',
39
+ codex: 'CODEX_HOME',
40
+ opencode: null,
41
+ pi: null,
42
+ };
43
+ /** Providers that can carry more than one account — what the UI offers "Add account" for. */
44
+ export const PROFILE_CAPABLE_PROVIDERS = Object.keys(PROFILE_ENV_VAR).filter((provider) => PROFILE_ENV_VAR[provider] !== null);
45
+ export function supportsProfiles(provider) {
46
+ return PROFILE_ENV_VAR[provider] !== null;
47
+ }
48
+ /**
49
+ * The env a spawned agent needs to run under `configDir`, or `{}` for the default profile.
50
+ *
51
+ * `{}` is load-bearing, not a convenience: `buildChildEnv` applies `extraEnv` AFTER its allowlist
52
+ * and so bypasses it entirely, which makes this function the only thing standing between a
53
+ * profile and the child environment. Returning nothing for the zero-config case means the
54
+ * overwhelmingly common path adds literally no variable — the same environment cezar has always
55
+ * spawned. It also means this can never emit one provider's variable for another provider's
56
+ * process: the name comes from `PROFILE_ENV_VAR[provider]` and nowhere else.
57
+ */
58
+ export function profileEnv(provider, configDir) {
59
+ const name = PROFILE_ENV_VAR[provider];
60
+ const dir = configDir?.trim();
61
+ if (name === null || !dir)
62
+ return {};
63
+ return { [name]: dir };
64
+ }
65
+ /**
66
+ * Does `entries` look like a config dir this provider actually wrote?
67
+ *
68
+ * ADVISORY, never a gate. The honest first-run flow for a second account is *add the profile →
69
+ * Connect → the CLI creates the dir on login*, so refusing an unrecognized directory would break
70
+ * the very case the feature exists for. The answer drives a warning line in the UI, nothing more.
71
+ *
72
+ * Takes the directory listing rather than a path so it stays pure; the caller reads the dir.
73
+ */
74
+ export function looksLikeProfileDir(provider, entries) {
75
+ const present = new Set(entries);
76
+ const markers = PROFILE_DIR_MARKERS[provider];
77
+ return markers.some((marker) => present.has(marker));
78
+ }
79
+ /** What each agent drops into its home on first login. Any one is enough. */
80
+ const PROFILE_DIR_MARKERS = {
81
+ // `.claude.json` sits INSIDE the dir once it is overridden (see `claudeStateFilePath`), which
82
+ // is exactly the case being probed here.
83
+ claude: ['.claude.json', 'settings.json', 'projects', 'sessions'],
84
+ codex: ['auth.json', 'config.toml'],
85
+ opencode: [],
86
+ // pi cannot carry profiles (`PROFILE_ENV_VAR.pi === null`), so nothing ever probes a pi
87
+ // profile dir; the entry exists to keep this table exhaustive over `ProviderId`.
88
+ pi: [],
89
+ };
90
+ //# sourceMappingURL=agent-profiles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-profiles.js","sourceRoot":"","sources":["../../src/core/agent-profiles.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,eAAe,GAAsC;IAChE,MAAM,EAAE,mBAAmB;IAC3B,KAAK,EAAE,YAAY;IACnB,QAAQ,EAAE,IAAI;IACd,EAAE,EAAE,IAAI;CACT,CAAC;AAEF,6FAA6F;AAC7F,MAAM,CAAC,MAAM,yBAAyB,GACpC,MAAM,CAAC,IAAI,CAAC,eAAe,CAC5B,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,eAAe,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC,CAAC;AAE3D,MAAM,UAAU,gBAAgB,CAAC,QAAoB;IACnD,OAAO,eAAe,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;AAC5C,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,UAAU,CAAC,QAAoB,EAAE,SAAoC;IACnF,MAAM,IAAI,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IACvC,MAAM,GAAG,GAAG,SAAS,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC;IACrC,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;AACzB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,QAAoB,EAAE,OAA0B;IAClF,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;IACjC,MAAM,OAAO,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAC9C,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AACvD,CAAC;AAED,6EAA6E;AAC7E,MAAM,mBAAmB,GAA0C;IACjE,8FAA8F;IAC9F,yCAAyC;IACzC,MAAM,EAAE,CAAC,cAAc,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,CAAC;IACjE,KAAK,EAAE,CAAC,WAAW,EAAE,aAAa,CAAC;IACnC,QAAQ,EAAE,EAAE;IACZ,wFAAwF;IACxF,iFAAiF;IACjF,EAAE,EAAE,EAAE;CACP,CAAC"}
@@ -4,18 +4,28 @@
4
4
  * no token-budget circuit breaker, no zod response schemas — one run is one
5
5
  * agent-CLI session streaming normalized events.
6
6
  *
7
- * Three interchangeable backends implement this seam, each as a persistent
7
+ * Four interchangeable backends implement this seam, each as a persistent
8
8
  * process so multi-turn follow-ups, `waiting`, interrupt and resume all work:
9
9
  * - `claude` — Claude Code CLI, stream-json over stdin/stdout;
10
10
  * - `codex` — `codex app-server`, JSON-RPC 2.0 (JSONL) over stdin/stdout;
11
- * - `opencode` — `opencode serve`, HTTP + SSE.
11
+ * - `opencode` — `opencode serve`, HTTP + SSE;
12
+ * - `pi` — pi coding CLI, RPC over JSONL stdin/stdout, selecting its
13
+ * model with `provider/model`.
12
14
  */
13
- import type { UiEvent } from './ui-events.js';
14
- /** `claude-cli` is the legacy id kept so old run records still parse. */
15
- export type AgentBackend = 'claude' | 'codex' | 'opencode' | 'claude-cli';
15
+ import type { UiEvent } from './ui-events.ts';
16
+ /**
17
+ * The user-selectable runners (what config/GUI expose), in display order — the SINGLE source of
18
+ * truth for the set. Every runtime enumeration derives from this tuple (zod schemas, the
19
+ * server-install "at least one agent CLI" gate, the CLI-handoff registry) rather than repeating
20
+ * the literals, so adding runner #5 is a one-line change here and typecheck finds the rest.
21
+ */
22
+ export declare const RUNNER_IDS: readonly ['claude', 'codex', 'opencode', 'pi'];
16
23
  /** The user-selectable runners (what config/GUI expose). */
17
- export type RunnerId = 'claude' | 'codex' | 'opencode';
18
- export declare const RUNNER_IDS: readonly RunnerId[];
24
+ export type RunnerId = (typeof RUNNER_IDS)[number];
25
+ /** `claude-cli` is the legacy id kept so old run records still parse. */
26
+ export type AgentBackend = RunnerId | 'claude-cli';
27
+ /** Narrow an arbitrary string (a config value, a check name) to a runner id. */
28
+ export declare function isRunnerId(value: string): value is RunnerId;
19
29
  export interface AgentRunSpec {
20
30
  /** Appended to the CLI's default system prompt (`--append-system-prompt`). */
21
31
  systemPrompt?: string;
@@ -58,6 +68,38 @@ export interface AgentRunSpec {
58
68
  * v2: claude = `--append-system-prompt`, codex/opencode = prepended here).
59
69
  */
60
70
  export declare function prependSystemPrompt(systemPrompt: string | undefined, userPrompt: string): string;
71
+ /**
72
+ * True for the `128 + signal` exit codes an agent CLI reports when it handles
73
+ * a stop signal itself instead of dying from it (SIGINT/SIGKILL/SIGTERM).
74
+ *
75
+ * Every runner arms a SIGTERM→SIGKILL watchdog on `end()` and signals on
76
+ * `interrupt()` (#703): the CLIs install their own handlers, so a session the
77
+ * runner tore down on purpose comes back as a NON-ZERO exit. Paired with a
78
+ * "we sent the signal" flag, this predicate keeps that teardown out of the
79
+ * error path — an exit cezar caused is never an agent failure.
80
+ */
81
+ export declare function isSignalTerminationExit(exitCode: number | null): boolean;
82
+ /** The slice of `ChildProcess` a termination tracker needs — keeps the helper
83
+ * usable from the transport layer and from test fakes alike. */
84
+ export interface TrackableChild {
85
+ exitCode: number | null;
86
+ signalCode: NodeJS.Signals | null;
87
+ once(event: 'exit', listener: () => void): unknown;
88
+ }
89
+ /**
90
+ * Returns a predicate that answers "has this child actually terminated?".
91
+ *
92
+ * `ChildProcess.killed` answers a different question — it flips as soon as a
93
+ * signal is *delivered*, whether or not the child dies from it. Every agent CLI
94
+ * installs its own SIGTERM handler, so gating a SIGTERM→SIGKILL watchdog on
95
+ * `!child.killed` disables the escalation for exactly the child it exists for:
96
+ * `killed` is true, `exitCode` stays null, and the process outlives the whole
97
+ * grace window (#844, same defect fixed for the discovery probe in #841).
98
+ *
99
+ * Seeded from `exitCode`/`signalCode` so a child that died before the watchdog
100
+ * was armed is recognized without waiting for an event that already fired.
101
+ */
102
+ export declare function trackChildExit(child: TrackableChild): () => boolean;
61
103
  /** One content block of a user message — mirrors the Anthropic wire format
62
104
  * so it can be written to the claude CLI's stdin verbatim. */
63
105
  export type ContentBlock = {
@@ -4,13 +4,25 @@
4
4
  * no token-budget circuit breaker, no zod response schemas — one run is one
5
5
  * agent-CLI session streaming normalized events.
6
6
  *
7
- * Three interchangeable backends implement this seam, each as a persistent
7
+ * Four interchangeable backends implement this seam, each as a persistent
8
8
  * process so multi-turn follow-ups, `waiting`, interrupt and resume all work:
9
9
  * - `claude` — Claude Code CLI, stream-json over stdin/stdout;
10
10
  * - `codex` — `codex app-server`, JSON-RPC 2.0 (JSONL) over stdin/stdout;
11
- * - `opencode` — `opencode serve`, HTTP + SSE.
11
+ * - `opencode` — `opencode serve`, HTTP + SSE;
12
+ * - `pi` — pi coding CLI, RPC over JSONL stdin/stdout, selecting its
13
+ * model with `provider/model`.
12
14
  */
13
- export const RUNNER_IDS = ['claude', 'codex', 'opencode'];
15
+ /**
16
+ * The user-selectable runners (what config/GUI expose), in display order — the SINGLE source of
17
+ * truth for the set. Every runtime enumeration derives from this tuple (zod schemas, the
18
+ * server-install "at least one agent CLI" gate, the CLI-handoff registry) rather than repeating
19
+ * the literals, so adding runner #5 is a one-line change here and typecheck finds the rest.
20
+ */
21
+ export const RUNNER_IDS = ['claude', 'codex', 'opencode', 'pi'];
22
+ /** Narrow an arbitrary string (a config value, a check name) to a runner id. */
23
+ export function isRunnerId(value) {
24
+ return RUNNER_IDS.includes(value);
25
+ }
14
26
  /**
15
27
  * Backends without a dedicated system-prompt channel (codex app-server,
16
28
  * opencode serve) deliver `spec.systemPrompt` as a leading block of the
@@ -20,4 +32,37 @@ export const RUNNER_IDS = ['claude', 'codex', 'opencode'];
20
32
  export function prependSystemPrompt(systemPrompt, userPrompt) {
21
33
  return systemPrompt ? `${systemPrompt}\n\n---\n\n${userPrompt}` : userPrompt;
22
34
  }
35
+ /**
36
+ * True for the `128 + signal` exit codes an agent CLI reports when it handles
37
+ * a stop signal itself instead of dying from it (SIGINT/SIGKILL/SIGTERM).
38
+ *
39
+ * Every runner arms a SIGTERM→SIGKILL watchdog on `end()` and signals on
40
+ * `interrupt()` (#703): the CLIs install their own handlers, so a session the
41
+ * runner tore down on purpose comes back as a NON-ZERO exit. Paired with a
42
+ * "we sent the signal" flag, this predicate keeps that teardown out of the
43
+ * error path — an exit cezar caused is never an agent failure.
44
+ */
45
+ export function isSignalTerminationExit(exitCode) {
46
+ return exitCode === 130 || exitCode === 137 || exitCode === 143;
47
+ }
48
+ /**
49
+ * Returns a predicate that answers "has this child actually terminated?".
50
+ *
51
+ * `ChildProcess.killed` answers a different question — it flips as soon as a
52
+ * signal is *delivered*, whether or not the child dies from it. Every agent CLI
53
+ * installs its own SIGTERM handler, so gating a SIGTERM→SIGKILL watchdog on
54
+ * `!child.killed` disables the escalation for exactly the child it exists for:
55
+ * `killed` is true, `exitCode` stays null, and the process outlives the whole
56
+ * grace window (#844, same defect fixed for the discovery probe in #841).
57
+ *
58
+ * Seeded from `exitCode`/`signalCode` so a child that died before the watchdog
59
+ * was armed is recognized without waiting for an event that already fired.
60
+ */
61
+ export function trackChildExit(child) {
62
+ let exited = child.exitCode != null || child.signalCode != null;
63
+ child.once('exit', () => {
64
+ exited = true;
65
+ });
66
+ return () => exited;
67
+ }
23
68
  //# sourceMappingURL=agent-runner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-runner.js","sourceRoot":"","sources":["../../src/core/agent-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AASH,MAAM,CAAC,MAAM,UAAU,GAAwB,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AAsC/E;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,YAAgC,EAAE,UAAkB;IACtF,OAAO,YAAY,CAAC,CAAC,CAAC,GAAG,YAAY,cAAc,UAAU,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;AAC/E,CAAC"}
1
+ {"version":3,"file":"agent-runner.js","sourceRoot":"","sources":["../../src/core/agent-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,CAAU,CAAC;AAQzE,gFAAgF;AAChF,MAAM,UAAU,UAAU,CAAC,KAAa;IACtC,OAAQ,UAAgC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC3D,CAAC;AAsCD;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,YAAgC,EAAE,UAAkB;IACtF,OAAO,YAAY,CAAC,CAAC,CAAC,GAAG,YAAY,cAAc,UAAU,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;AAC/E,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,uBAAuB,CAAC,QAAuB;IAC7D,OAAO,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC;AAClE,CAAC;AAUD;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,cAAc,CAAC,KAAqB;IAClD,IAAI,MAAM,GAAG,KAAK,CAAC,QAAQ,IAAI,IAAI,IAAI,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC;IAChE,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE;QACtB,MAAM,GAAG,IAAI,CAAC;IAChB,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC;AACtB,CAAC"}
@@ -17,142 +17,52 @@ import { z } from 'zod';
17
17
  export declare const askOptionSchema: z.ZodObject<{
18
18
  label: z.ZodString;
19
19
  description: z.ZodOptional<z.ZodString>;
20
- }, "strict", z.ZodTypeAny, {
21
- label: string;
22
- description?: string | undefined;
23
- }, {
24
- label: string;
25
- description?: string | undefined;
26
- }>;
20
+ }, z.core.$strict>;
27
21
  export declare const askQuestionSchema: z.ZodObject<{
28
- /** Stable key for the answer; defaults to the array index when omitted. */
29
22
  id: z.ZodOptional<z.ZodString>;
30
- /** ≤12-char chip label (matches AskUserQuestion's `header`). */
31
23
  header: z.ZodString;
32
24
  question: z.ZodString;
33
- options: z.ZodEffects<z.ZodArray<z.ZodObject<{
25
+ options: z.ZodArray<z.ZodObject<{
34
26
  label: z.ZodString;
35
27
  description: z.ZodOptional<z.ZodString>;
36
- }, "strict", z.ZodTypeAny, {
37
- label: string;
38
- description?: string | undefined;
39
- }, {
40
- label: string;
41
- description?: string | undefined;
42
- }>, "many">, {
43
- label: string;
44
- description?: string | undefined;
45
- }[], {
46
- label: string;
47
- description?: string | undefined;
48
- }[]>;
28
+ }, z.core.$strict>>;
49
29
  multiSelect: z.ZodOptional<z.ZodBoolean>;
50
- }, "strict", z.ZodTypeAny, {
51
- id?: string | undefined;
52
- header: string;
53
- question: string;
54
- options: {
55
- label: string;
56
- description?: string | undefined;
57
- }[];
58
- multiSelect?: boolean | undefined;
59
- }, {
60
- id?: string | undefined;
61
- header: string;
62
- question: string;
63
- options: {
64
- label: string;
65
- description?: string | undefined;
66
- }[];
67
- multiSelect?: boolean | undefined;
68
- }>;
30
+ }, z.core.$strict>;
69
31
  export declare const askRequestSchema: z.ZodObject<{
70
- questions: z.ZodEffects<z.ZodArray<z.ZodObject<{
71
- /** Stable key for the answer; defaults to the array index when omitted. */
32
+ questions: z.ZodArray<z.ZodObject<{
72
33
  id: z.ZodOptional<z.ZodString>;
73
- /** ≤12-char chip label (matches AskUserQuestion's `header`). */
74
34
  header: z.ZodString;
75
35
  question: z.ZodString;
76
- options: z.ZodEffects<z.ZodArray<z.ZodObject<{
36
+ options: z.ZodArray<z.ZodObject<{
77
37
  label: z.ZodString;
78
38
  description: z.ZodOptional<z.ZodString>;
79
- }, "strict", z.ZodTypeAny, {
80
- label: string;
81
- description?: string | undefined;
82
- }, {
83
- label: string;
84
- description?: string | undefined;
85
- }>, "many">, {
86
- label: string;
87
- description?: string | undefined;
88
- }[], {
89
- label: string;
90
- description?: string | undefined;
91
- }[]>;
39
+ }, z.core.$strict>>;
92
40
  multiSelect: z.ZodOptional<z.ZodBoolean>;
93
- }, "strict", z.ZodTypeAny, {
94
- id?: string | undefined;
95
- header: string;
96
- question: string;
97
- options: {
98
- label: string;
99
- description?: string | undefined;
100
- }[];
101
- multiSelect?: boolean | undefined;
102
- }, {
103
- id?: string | undefined;
104
- header: string;
105
- question: string;
106
- options: {
107
- label: string;
108
- description?: string | undefined;
109
- }[];
110
- multiSelect?: boolean | undefined;
111
- }>, "many">, {
112
- id?: string | undefined;
113
- header: string;
114
- question: string;
115
- options: {
116
- label: string;
117
- description?: string | undefined;
118
- }[];
119
- multiSelect?: boolean | undefined;
120
- }[], {
121
- id?: string | undefined;
122
- header: string;
123
- question: string;
124
- options: {
125
- label: string;
126
- description?: string | undefined;
127
- }[];
128
- multiSelect?: boolean | undefined;
129
- }[]>;
130
- }, "strict", z.ZodTypeAny, {
131
- questions: {
132
- id?: string | undefined;
133
- header: string;
134
- question: string;
135
- options: {
136
- label: string;
137
- description?: string | undefined;
138
- }[];
139
- multiSelect?: boolean | undefined;
140
- }[];
141
- }, {
142
- questions: {
143
- id?: string | undefined;
144
- header: string;
145
- question: string;
146
- options: {
147
- label: string;
148
- description?: string | undefined;
149
- }[];
150
- multiSelect?: boolean | undefined;
151
- }[];
152
- }>;
41
+ }, z.core.$strict>>;
42
+ }, z.core.$strict>;
153
43
  export type AskOption = z.infer<typeof askOptionSchema>;
154
44
  export type AskQuestion = z.infer<typeof askQuestionSchema>;
155
45
  export type AskRequest = z.infer<typeof askRequestSchema>;
46
+ export interface AskParseIssue {
47
+ code: string;
48
+ path: PropertyKey[];
49
+ message: string;
50
+ }
51
+ /** The diagnostic parse result used at turn-end. The compatibility wrapper
52
+ * below deliberately keeps returning `AskRequest | null`. */
53
+ export type AskMarkerParseResult = {
54
+ kind: 'none';
55
+ } | {
56
+ kind: 'invalid-json';
57
+ message: string;
58
+ } | {
59
+ kind: 'invalid-structure';
60
+ issues: AskParseIssue[];
61
+ } | {
62
+ kind: 'valid';
63
+ request: AskRequest;
64
+ normalized: boolean;
65
+ };
156
66
  /**
157
67
  * Parse a value into a validated `AskRequest`, or `null` when it does not match
158
68
  * (bad counts, over-length header, non-unique labels/questions, extra keys).
@@ -168,17 +78,28 @@ export declare function parseAskRequest(value: unknown): AskRequest | null;
168
78
  * to the last `}` at end-of-text.
169
79
  */
170
80
  export declare const ASK_MARKER_RE: RegExp;
81
+ /**
82
+ * Parse a trailing marker with an actionable result for diagnostics. A
83
+ * parseable near-valid request gets one bounded normalization pass; structural
84
+ * violations remain rejected so the raw fallback stays readable.
85
+ */
86
+ export declare function parseAskMarkerResult(turnText: string): AskMarkerParseResult;
171
87
  /**
172
88
  * Extract and validate a trailing `CEZ:ASK <json>` marker from assembled turn
173
- * text. Returns the validated `AskRequest`, or `null` when there is no marker or
174
- * its payload is not valid JSON / fails the schema (caller degrades to plain
89
+ * text. Returns a strict or safely normalized `AskRequest`, or `null` when
90
+ * there is no marker or its payload remains invalid (caller degrades to plain
175
91
  * text — the prose fallback is never made worse).
176
92
  */
177
93
  export declare function parseAskMarker(turnText: string): AskRequest | null;
178
94
  /**
179
95
  * Strip a trailing `CEZ:ASK <json>` marker from one text event so transcripts
180
- * stay free of protocol noise. Delta backends may split the marker across events
181
- * — then it stays visible; detection on the assembled turn text is unaffected
182
- * (same best-effort caveat as the `CEZ:DONE` / `CEZ:MONITORING` strippers).
96
+ * stay free of protocol noise — but ONLY when the payload actually validates.
97
+ * An invalid payload never becomes an ask card (`parseAskMarker` → `null`), so
98
+ * stripping it would delete the agent's question from the transcript with
99
+ * nothing to replace it; it stays visible as raw text instead — degraded but
100
+ * answerable (the prose fallback is never made worse). Delta backends may split
101
+ * the marker across events — then it stays visible; detection on the assembled
102
+ * turn text is unaffected (same best-effort caveat as the `CEZ:DONE` /
103
+ * `CEZ:MONITORING` strippers).
183
104
  */
184
105
  export declare function stripAskMarker(text: string): string;