@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
@@ -0,0 +1,577 @@
1
+ import { z } from 'zod';
2
+ import { type Runner } from './health.ts';
3
+ /**
4
+ * The workspace + settings families: `~/.cezar/config.json`'s settings slice, both GUI-pref bags
5
+ * (per-repo and workspace), the per-repo agent knobs, provider auth status, the host model
6
+ * catalog, the skills-update state, and the "Open in…" targets.
7
+ *
8
+ * Node-free by construction (see README rule 1) — `zod` and the sibling contract modules only.
9
+ */
10
+ /**
11
+ * `GET/PUT /api/v1/workspace/config` — the settings slice of `~/.cezar/config.json` (step 2.7).
12
+ *
13
+ * Global knobs only: the registry itself is `GET /api/v1/projects`, and `schemaVersion` (a
14
+ * migration cursor, not a setting) is deliberately absent. `resources` is the workspace's
15
+ * host-protection budget — the ONLY effective `maxParallel`/`memoryLimitMb` since Phase 2;
16
+ * `worktreeRetentionDefault` seeds projects that set none.
17
+ *
18
+ * `composerDefaults` and every `resources` key are REQUIRED: `workspaceConfigBody`
19
+ * (src/server/server.ts:1888) materializes all of them from schema defaults on every answer,
20
+ * including the degraded path. The hand-written DTO declared `composerDefaults`,
21
+ * `resources.maxMonitoringSessions` and `resources.monitoringWakeIntervalMinutes` optional, which
22
+ * was wider than the server has ever been.
23
+ */
24
+ export declare const workspaceConfigResponseSchema: z.ZodObject<{
25
+ browseRoot: z.ZodString;
26
+ projectsDir: z.ZodString;
27
+ skillsAutoUpdate: z.ZodNullable<z.ZodBoolean>;
28
+ effectiveSkillsAutoUpdate: z.ZodBoolean;
29
+ composerDefaults: z.ZodObject<{
30
+ autonomous: z.ZodNullable<z.ZodBoolean>;
31
+ worktree: z.ZodNullable<z.ZodBoolean>;
32
+ inheritedAutonomous: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"source-dependent">]>;
33
+ inheritedWorktree: z.ZodBoolean;
34
+ }, z.core.$strip>;
35
+ resources: z.ZodObject<{
36
+ maxParallel: z.ZodNumber;
37
+ maxMonitoringSessions: z.ZodNumber;
38
+ monitoringWakeIntervalMinutes: z.ZodNullable<z.ZodNumber>;
39
+ autoResumeOnUsageLimit: z.ZodBoolean;
40
+ memoryLimitMb: z.ZodNullable<z.ZodNumber>;
41
+ worktreeRetentionDefault: z.ZodNumber;
42
+ }, z.core.$strip>;
43
+ agentDefaults: z.ZodObject<{
44
+ runner: z.ZodOptional<z.ZodEnum<{
45
+ claude: "claude";
46
+ codex: "codex";
47
+ opencode: "opencode";
48
+ pi: "pi";
49
+ }>>;
50
+ models: z.ZodOptional<z.ZodObject<{
51
+ claude: z.ZodOptional<z.ZodString>;
52
+ codex: z.ZodOptional<z.ZodString>;
53
+ opencode: z.ZodOptional<z.ZodString>;
54
+ pi: z.ZodOptional<z.ZodString>;
55
+ }, z.core.$strip>>;
56
+ }, z.core.$strip>;
57
+ }, z.core.$strip>;
58
+ export type WorkspaceConfigResponse = z.infer<typeof workspaceConfigResponseSchema>;
59
+ /**
60
+ * `PUT /api/v1/workspace/config` body — partial: absent keys stay untouched. A rejected workspace
61
+ * root (not writable) 400s with the reason and persists NOTHING, resources included, so callers
62
+ * may send both in one request only if they want that atomicity. Bounds mirror
63
+ * `src/workspace/config.ts` exactly, so a value this schema accepts can never be degraded away by
64
+ * the next load's `.catch`.
65
+ */
66
+ export declare const setWorkspaceConfigInputSchema: z.ZodObject<{
67
+ browseRoot: z.ZodOptional<z.ZodString>;
68
+ projectsDir: z.ZodOptional<z.ZodString>;
69
+ skillsAutoUpdate: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
70
+ composerDefaults: z.ZodOptional<z.ZodObject<{
71
+ autonomous: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
72
+ worktree: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
73
+ }, z.core.$strip>>;
74
+ agentDefaults: z.ZodOptional<z.ZodObject<{
75
+ runner: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
76
+ claude: "claude";
77
+ codex: "codex";
78
+ opencode: "opencode";
79
+ pi: "pi";
80
+ }>>>;
81
+ models: z.ZodOptional<z.ZodObject<{
82
+ claude: z.ZodOptional<z.ZodNullable<z.ZodString>>;
83
+ codex: z.ZodOptional<z.ZodNullable<z.ZodString>>;
84
+ opencode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
85
+ pi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
86
+ }, z.core.$strip>>;
87
+ }, z.core.$strip>>;
88
+ resources: z.ZodOptional<z.ZodObject<{
89
+ maxParallel: z.ZodOptional<z.ZodNumber>;
90
+ maxMonitoringSessions: z.ZodOptional<z.ZodNumber>;
91
+ monitoringWakeIntervalMinutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
92
+ autoResumeOnUsageLimit: z.ZodOptional<z.ZodBoolean>;
93
+ memoryLimitMb: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
94
+ worktreeRetentionDefault: z.ZodOptional<z.ZodNumber>;
95
+ }, z.core.$strip>>;
96
+ }, z.core.$strip>;
97
+ export type SetWorkspaceConfigInput = z.infer<typeof setWorkspaceConfigInputSchema>;
98
+ /**
99
+ * `GET/PUT /api/v1/ui-state` — the per-repo GUI prefs in `.ai/cezar/ui-state.json`.
100
+ *
101
+ * An OPEN bag on purpose (BACKWARD_COMPATIBILITY.md §3): unknown keys round-trip untouched, so a
102
+ * newer cockpit's prefs survive an older server and a future pref needs no server change. Hence
103
+ * `z.looseObject`, not a closed object — the keys below are the ones the server's schema *names*,
104
+ * never the ones it *permits*. The write side caps the TOP-LEVEL key count at 200 (#429); that cap
105
+ * is a request-body refinement in `src/server/server.ts` (`capUiStateKeys`, :756) and is not part
106
+ * of the response shape.
107
+ *
108
+ * `notifications` is deliberately NOT here: it moved to `WorkspaceUiState` at step 3.5 and the
109
+ * per-repo schema (src/server/server.ts:550) has not named it since. The hand-written DTO still
110
+ * listed it, which made it wider than the route.
111
+ */
112
+ export declare const uiStateSchema: z.ZodObject<{
113
+ lastTask: z.ZodOptional<z.ZodObject<{
114
+ source: z.ZodEnum<{
115
+ skill: "skill";
116
+ workflow: "workflow";
117
+ }>;
118
+ ref: z.ZodString;
119
+ }, z.core.$strip>>;
120
+ recentSources: z.ZodOptional<z.ZodArray<z.ZodObject<{
121
+ source: z.ZodEnum<{
122
+ skill: "skill";
123
+ workflow: "workflow";
124
+ }>;
125
+ ref: z.ZodString;
126
+ }, z.core.$strip>>>;
127
+ lastWorktree: z.ZodOptional<z.ZodBoolean>;
128
+ lastAutonomous: z.ZodOptional<z.ZodBoolean>;
129
+ lastGenerateFollowups: z.ZodOptional<z.ZodBoolean>;
130
+ skillUsage: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
131
+ runsView: z.ZodOptional<z.ZodEnum<{
132
+ list: "list";
133
+ table: "table";
134
+ }>>;
135
+ githubView: z.ZodOptional<z.ZodEnum<{
136
+ issues: "issues";
137
+ prs: "prs";
138
+ }>>;
139
+ appearance: z.ZodOptional<z.ZodObject<{
140
+ accent: z.ZodOptional<z.ZodEnum<{
141
+ lime: "lime";
142
+ violet: "violet";
143
+ }>>;
144
+ density: z.ZodOptional<z.ZodEnum<{
145
+ comfortable: "comfortable";
146
+ compact: "compact";
147
+ ultra: "ultra";
148
+ }>>;
149
+ width: z.ZodOptional<z.ZodEnum<{
150
+ narrow: "narrow";
151
+ wide: "wide";
152
+ }>>;
153
+ }, z.core.$strip>>;
154
+ promptTemplates: z.ZodOptional<z.ZodArray<z.ZodObject<{
155
+ id: z.ZodString;
156
+ label: z.ZodString;
157
+ text: z.ZodString;
158
+ skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
159
+ }, z.core.$strip>>>;
160
+ dismissedSkillsBanner: z.ZodOptional<z.ZodBoolean>;
161
+ }, z.core.$loose>;
162
+ export type UiState = z.infer<typeof uiStateSchema>;
163
+ /**
164
+ * `GET/PUT /api/v1/workspace/ui-state` — cross-project GUI prefs in `~/.cezar/ui-state.json`
165
+ * (multi-project spec, step 2.7).
166
+ *
167
+ * The same open bag as its per-repo twin above, and open for the same reason. The PUT merges
168
+ * SHALLOWLY at the top level server-side, so a writer must send the whole `sidebar` object (or the
169
+ * whole `importedSkills` array), never a leaf.
170
+ */
171
+ export declare const workspaceLastLocationSchema: z.ZodObject<{
172
+ projectId: z.ZodString;
173
+ pathname: z.ZodString;
174
+ search: z.ZodOptional<z.ZodString>;
175
+ hash: z.ZodOptional<z.ZodString>;
176
+ }, z.core.$strict>;
177
+ export type WorkspaceLastLocation = z.infer<typeof workspaceLastLocationSchema>;
178
+ export declare const workspaceUiStateSchema: z.ZodObject<{
179
+ sidebar: z.ZodOptional<z.ZodObject<{
180
+ collapsed: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
181
+ }, z.core.$loose>>;
182
+ dismissedProviderAuthFailures: z.ZodOptional<z.ZodObject<{
183
+ claude: z.ZodOptional<z.ZodString>;
184
+ codex: z.ZodOptional<z.ZodString>;
185
+ opencode: z.ZodOptional<z.ZodString>;
186
+ pi: z.ZodOptional<z.ZodString>;
187
+ }, z.core.$strip>>;
188
+ appearance: z.ZodOptional<z.ZodObject<{
189
+ accent: z.ZodOptional<z.ZodEnum<{
190
+ lime: "lime";
191
+ violet: "violet";
192
+ }>>;
193
+ density: z.ZodOptional<z.ZodEnum<{
194
+ comfortable: "comfortable";
195
+ compact: "compact";
196
+ ultra: "ultra";
197
+ }>>;
198
+ width: z.ZodOptional<z.ZodEnum<{
199
+ narrow: "narrow";
200
+ wide: "wide";
201
+ }>>;
202
+ }, z.core.$strip>>;
203
+ notifications: z.ZodOptional<z.ZodObject<{
204
+ enabled: z.ZodOptional<z.ZodBoolean>;
205
+ }, z.core.$loose>>;
206
+ taskTable: z.ZodOptional<z.ZodObject<{
207
+ expandedColumns: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
208
+ }, z.core.$loose>>;
209
+ lastLocation: z.ZodOptional<z.ZodObject<{
210
+ projectId: z.ZodString;
211
+ pathname: z.ZodString;
212
+ search: z.ZodOptional<z.ZodString>;
213
+ hash: z.ZodOptional<z.ZodString>;
214
+ }, z.core.$strict>>;
215
+ importedSkills: z.ZodOptional<z.ZodArray<z.ZodString>>;
216
+ }, z.core.$loose>;
217
+ export type WorkspaceUiState = z.infer<typeof workspaceUiStateSchema>;
218
+ /**
219
+ * `PUT /api/v1/workspace/ui-state` body. The response remains an open, tolerant bag so data from
220
+ * a newer cockpit survives an older server; this write-side schema adds bounded known fields so
221
+ * the current cockpit cannot grow the user-owned file without limit.
222
+ */
223
+ export declare const setWorkspaceUiStateInputSchema: z.ZodObject<{
224
+ appearance: z.ZodOptional<z.ZodObject<{
225
+ accent: z.ZodOptional<z.ZodEnum<{
226
+ lime: "lime";
227
+ violet: "violet";
228
+ }>>;
229
+ density: z.ZodOptional<z.ZodEnum<{
230
+ comfortable: "comfortable";
231
+ compact: "compact";
232
+ ultra: "ultra";
233
+ }>>;
234
+ width: z.ZodOptional<z.ZodEnum<{
235
+ narrow: "narrow";
236
+ wide: "wide";
237
+ }>>;
238
+ }, z.core.$strip>>;
239
+ notifications: z.ZodOptional<z.ZodObject<{
240
+ enabled: z.ZodOptional<z.ZodBoolean>;
241
+ }, z.core.$loose>>;
242
+ lastLocation: z.ZodOptional<z.ZodObject<{
243
+ projectId: z.ZodString;
244
+ pathname: z.ZodString;
245
+ search: z.ZodOptional<z.ZodString>;
246
+ hash: z.ZodOptional<z.ZodString>;
247
+ }, z.core.$strict>>;
248
+ sidebar: z.ZodOptional<z.ZodObject<{
249
+ collapsed: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
250
+ }, z.core.$loose>>;
251
+ dismissedProviderAuthFailures: z.ZodOptional<z.ZodObject<{
252
+ claude: z.ZodOptional<z.ZodString>;
253
+ codex: z.ZodOptional<z.ZodString>;
254
+ opencode: z.ZodOptional<z.ZodString>;
255
+ pi: z.ZodOptional<z.ZodString>;
256
+ }, z.core.$strict>>;
257
+ importedSkills: z.ZodOptional<z.ZodArray<z.ZodString>>;
258
+ taskTable: z.ZodOptional<z.ZodObject<{
259
+ expandedColumns: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
260
+ }, z.core.$loose>>;
261
+ }, z.core.$loose>;
262
+ export type SetWorkspaceUiStateInput = z.infer<typeof setWorkspaceUiStateInputSchema>;
263
+ /** Per-runner default model preset (Settings → Agents): the composer preselects this model id for
264
+ * the runner. Absent = auto (the runner decides). Keyed by runner name rather than derived from
265
+ * `runnerSchema` because the server's own `defaultModels` object (src/config.ts:92) is spelled
266
+ * the same way — one key per runner, each independently optional. */
267
+ export declare const runnerModelsSchema: z.ZodObject<{
268
+ claude: z.ZodOptional<z.ZodString>;
269
+ codex: z.ZodOptional<z.ZodString>;
270
+ opencode: z.ZodOptional<z.ZodString>;
271
+ pi: z.ZodOptional<z.ZodString>;
272
+ }, z.core.$strip>;
273
+ export type RunnerModels = z.infer<typeof runnerModelsSchema>;
274
+ /** `GET /api/v1/config` — every Settings → Agents knob in one read. */
275
+ export declare const configResponseSchema: z.ZodObject<{
276
+ baseBranch: z.ZodNullable<z.ZodString>;
277
+ defaultRunner: z.ZodEnum<{
278
+ claude: "claude";
279
+ codex: "codex";
280
+ opencode: "opencode";
281
+ pi: "pi";
282
+ }>;
283
+ systemPrompt: z.ZodNullable<z.ZodString>;
284
+ defaultModels: z.ZodObject<{
285
+ claude: z.ZodOptional<z.ZodString>;
286
+ codex: z.ZodOptional<z.ZodString>;
287
+ opencode: z.ZodOptional<z.ZodString>;
288
+ pi: z.ZodOptional<z.ZodString>;
289
+ }, z.core.$strip>;
290
+ modelsLocked: z.ZodBoolean;
291
+ maxParallel: z.ZodNumber;
292
+ memoryLimitMb: z.ZodNullable<z.ZodNumber>;
293
+ worktreeRetention: z.ZodNumber;
294
+ liveTitleUpdates: z.ZodNullable<z.ZodBoolean>;
295
+ reviewGate: z.ZodNullable<z.ZodBoolean>;
296
+ }, z.core.$strip>;
297
+ export type ConfigResponse = z.infer<typeof configResponseSchema>;
298
+ /** The `PUT /api/v1/config` answer: the same shape GET serves (`configAnswer` builds both). */
299
+ export declare const setConfigResponseSchema: z.ZodObject<{
300
+ baseBranch: z.ZodNullable<z.ZodString>;
301
+ defaultRunner: z.ZodEnum<{
302
+ claude: "claude";
303
+ codex: "codex";
304
+ opencode: "opencode";
305
+ pi: "pi";
306
+ }>;
307
+ systemPrompt: z.ZodNullable<z.ZodString>;
308
+ defaultModels: z.ZodObject<{
309
+ claude: z.ZodOptional<z.ZodString>;
310
+ codex: z.ZodOptional<z.ZodString>;
311
+ opencode: z.ZodOptional<z.ZodString>;
312
+ pi: z.ZodOptional<z.ZodString>;
313
+ }, z.core.$strip>;
314
+ modelsLocked: z.ZodBoolean;
315
+ maxParallel: z.ZodNumber;
316
+ memoryLimitMb: z.ZodNullable<z.ZodNumber>;
317
+ worktreeRetention: z.ZodNumber;
318
+ liveTitleUpdates: z.ZodNullable<z.ZodBoolean>;
319
+ reviewGate: z.ZodNullable<z.ZodBoolean>;
320
+ }, z.core.$strip>;
321
+ export type SetConfigResponse = z.infer<typeof setConfigResponseSchema>;
322
+ /**
323
+ * `PUT /api/v1/config` body (Settings → Agents; the Repo tab's base-branch picker).
324
+ * `baseBranch: null` clears the setting back to "follow checked-out branch"; `systemPrompt` and
325
+ * per-runner `defaultModels` entries clear on `null` (or `''`) too. Merged into the raw
326
+ * config.json server-side — `defaultModels` merges per runner, so one write never clobbers
327
+ * another runner's preset.
328
+ */
329
+ export declare const setConfigInputSchema: z.ZodObject<{
330
+ baseBranch: z.ZodOptional<z.ZodNullable<z.ZodString>>;
331
+ defaultRunner: z.ZodOptional<z.ZodEnum<{
332
+ claude: "claude";
333
+ codex: "codex";
334
+ opencode: "opencode";
335
+ pi: "pi";
336
+ }>>;
337
+ systemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
338
+ defaultModels: z.ZodOptional<z.ZodObject<{
339
+ claude: z.ZodOptional<z.ZodNullable<z.ZodString>>;
340
+ codex: z.ZodOptional<z.ZodNullable<z.ZodString>>;
341
+ opencode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
342
+ pi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
343
+ }, z.core.$strip>>;
344
+ maxParallel: z.ZodOptional<z.ZodNumber>;
345
+ memoryLimitMb: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
346
+ worktreeRetention: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
347
+ liveTitleUpdates: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
348
+ reviewGate: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
349
+ }, z.core.$strip>;
350
+ export type SetConfigInput = z.infer<typeof setConfigInputSchema>;
351
+ export declare const skillsUpdateStatusSchema: z.ZodEnum<{
352
+ available: "available";
353
+ checking: "checking";
354
+ current: "current";
355
+ error: "error";
356
+ idle: "idle";
357
+ unavailable: "unavailable";
358
+ updating: "updating";
359
+ }>;
360
+ export type SkillsUpdateStatus = z.infer<typeof skillsUpdateStatusSchema>;
361
+ export declare const skillsUpdateScopeStateSchema: z.ZodObject<{
362
+ scope: z.ZodEnum<{
363
+ global: "global";
364
+ project: "project";
365
+ }>;
366
+ status: z.ZodEnum<{
367
+ available: "available";
368
+ checking: "checking";
369
+ current: "current";
370
+ error: "error";
371
+ idle: "idle";
372
+ unavailable: "unavailable";
373
+ updating: "updating";
374
+ }>;
375
+ available: z.ZodBoolean;
376
+ skills: z.ZodArray<z.ZodString>;
377
+ checkedAt: z.ZodNullable<z.ZodString>;
378
+ updatedAt: z.ZodNullable<z.ZodString>;
379
+ reason: z.ZodOptional<z.ZodString>;
380
+ }, z.core.$strip>;
381
+ export type SkillsUpdateScopeState = z.infer<typeof skillsUpdateScopeStateSchema>;
382
+ /** `GET /api/v1/workspace/skills-update` (and the check/apply POSTs) — the merged project+global
383
+ * skills-update state. `autoUpdateEnabled`/`inherited` are re-stamped from the workspace config
384
+ * on the way out (`skillsUpdateResponse`, src/server/server.ts:1818). */
385
+ export declare const skillsUpdateStateSchema: z.ZodObject<{
386
+ status: z.ZodEnum<{
387
+ available: "available";
388
+ checking: "checking";
389
+ current: "current";
390
+ error: "error";
391
+ idle: "idle";
392
+ unavailable: "unavailable";
393
+ updating: "updating";
394
+ }>;
395
+ available: z.ZodBoolean;
396
+ autoUpdateEnabled: z.ZodBoolean;
397
+ inherited: z.ZodBoolean;
398
+ checkedAt: z.ZodNullable<z.ZodString>;
399
+ updatedAt: z.ZodNullable<z.ZodString>;
400
+ scopes: z.ZodArray<z.ZodObject<{
401
+ scope: z.ZodEnum<{
402
+ global: "global";
403
+ project: "project";
404
+ }>;
405
+ status: z.ZodEnum<{
406
+ available: "available";
407
+ checking: "checking";
408
+ current: "current";
409
+ error: "error";
410
+ idle: "idle";
411
+ unavailable: "unavailable";
412
+ updating: "updating";
413
+ }>;
414
+ available: z.ZodBoolean;
415
+ skills: z.ZodArray<z.ZodString>;
416
+ checkedAt: z.ZodNullable<z.ZodString>;
417
+ updatedAt: z.ZodNullable<z.ZodString>;
418
+ reason: z.ZodOptional<z.ZodString>;
419
+ }, z.core.$strip>>;
420
+ needsUpgradeNotes: z.ZodBoolean;
421
+ }, z.core.$strip>;
422
+ export type SkillsUpdateState = z.infer<typeof skillsUpdateStateSchema>;
423
+ /** The agent backends are the providers — one alias, never a second enum. */
424
+ export declare const providerIdSchema: z.ZodEnum<{
425
+ claude: "claude";
426
+ codex: "codex";
427
+ opencode: "opencode";
428
+ pi: "pi";
429
+ }>;
430
+ export type ProviderId = Runner;
431
+ /** Coarse host authentication state. Credentials, account identity, and raw CLI output never
432
+ * cross this boundary. */
433
+ export declare const providerConnectionStateSchema: z.ZodEnum<{
434
+ connected: "connected";
435
+ disconnected: "disconnected";
436
+ "not-installed": "not-installed";
437
+ unknown: "unknown";
438
+ }>;
439
+ export type ProviderConnectionState = z.infer<typeof providerConnectionStateSchema>;
440
+ /**
441
+ * One provider row.
442
+ *
443
+ * `enabled` is OPTIONAL: `ProviderAuth.status()` (src/core/provider-auth.ts:12) builds rows
444
+ * without it and only `applyProviderEnablement` stamps it in, so the type the routes answer keeps
445
+ * the key optional. The hand-written DTO declared it required — narrower than the route.
446
+ */
447
+ export declare const providerStatusSchema: z.ZodObject<{
448
+ provider: z.ZodEnum<{
449
+ claude: "claude";
450
+ codex: "codex";
451
+ opencode: "opencode";
452
+ pi: "pi";
453
+ }>;
454
+ status: z.ZodEnum<{
455
+ connected: "connected";
456
+ disconnected: "disconnected";
457
+ "not-installed": "not-installed";
458
+ unknown: "unknown";
459
+ }>;
460
+ enabled: z.ZodOptional<z.ZodBoolean>;
461
+ hint: z.ZodOptional<z.ZodString>;
462
+ authFailureId: z.ZodOptional<z.ZodString>;
463
+ profileId: z.ZodOptional<z.ZodString>;
464
+ }, z.core.$strip>;
465
+ export type ProviderStatus = z.infer<typeof providerStatusSchema>;
466
+ /** `GET /api/v1/providers/status`, and the answer of the enabled/retry mutators. */
467
+ export declare const providerStatusResponseSchema: z.ZodObject<{
468
+ providers: z.ZodArray<z.ZodObject<{
469
+ provider: z.ZodEnum<{
470
+ claude: "claude";
471
+ codex: "codex";
472
+ opencode: "opencode";
473
+ pi: "pi";
474
+ }>;
475
+ status: z.ZodEnum<{
476
+ connected: "connected";
477
+ disconnected: "disconnected";
478
+ "not-installed": "not-installed";
479
+ unknown: "unknown";
480
+ }>;
481
+ enabled: z.ZodOptional<z.ZodBoolean>;
482
+ hint: z.ZodOptional<z.ZodString>;
483
+ authFailureId: z.ZodOptional<z.ZodString>;
484
+ profileId: z.ZodOptional<z.ZodString>;
485
+ }, z.core.$strip>>;
486
+ }, z.core.$strip>;
487
+ export type ProviderStatusResponse = z.infer<typeof providerStatusResponseSchema>;
488
+ /** `POST /api/v1/providers/connect` — either a terminal was handed the login command, or the
489
+ * provider turned out to be connected already. Every other outcome is a 409/500 carrying the
490
+ * same `command` for the clipboard fallback. */
491
+ export declare const providerConnectResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
492
+ opened: z.ZodLiteral<true>;
493
+ command: z.ZodString;
494
+ }, z.core.$strip>, z.ZodObject<{
495
+ opened: z.ZodLiteral<false>;
496
+ connected: z.ZodLiteral<true>;
497
+ command: z.ZodString;
498
+ }, z.core.$strip>], "opened">;
499
+ export type ProviderConnectResponse = z.infer<typeof providerConnectResponseSchema>;
500
+ /**
501
+ * The runners whose model list is discovered from the host rather than hard-coded: Codex
502
+ * through its app-server protocol, OpenCode through its own `models` listing (#794). Claude has
503
+ * no equivalent local source, so its picker keeps static presets and `GET /api/v1/models`
504
+ * rejects it. One definition, used by the route's query validator and by the cockpit's picker.
505
+ */
506
+ export declare const modelDiscoveryRunnerSchema: z.ZodEnum<{
507
+ codex: "codex";
508
+ opencode: "opencode";
509
+ }>;
510
+ export type ModelDiscoveryRunner = z.infer<typeof modelDiscoveryRunnerSchema>;
511
+ export declare const MODEL_DISCOVERY_RUNNERS: readonly ModelDiscoveryRunner[];
512
+ /** True when `runner` has a host-discovered catalog (and therefore a `/models` answer). */
513
+ export declare function runnerDiscoversModels(runner: Runner): runner is ModelDiscoveryRunner;
514
+ export declare const runnerModelOptionSchema: z.ZodObject<{
515
+ id: z.ZodString;
516
+ label: z.ZodString;
517
+ description: z.ZodString;
518
+ }, z.core.$strip>;
519
+ export type RunnerModelOption = z.infer<typeof runnerModelOptionSchema>;
520
+ /** `GET /api/v1/models?runner=codex|opencode` — the models discovered from that runner's own
521
+ * host installation, plus how fresh the answer is. Never an error: an unavailable CLI degrades
522
+ * to `source: 'unavailable'` with a `reason`. Claude has no host-local catalog and is rejected. */
523
+ export declare const runnerModelCatalogResponseSchema: z.ZodObject<{
524
+ runner: z.ZodEnum<{
525
+ claude: "claude";
526
+ codex: "codex";
527
+ opencode: "opencode";
528
+ pi: "pi";
529
+ }>;
530
+ models: z.ZodArray<z.ZodObject<{
531
+ id: z.ZodString;
532
+ label: z.ZodString;
533
+ description: z.ZodString;
534
+ }, z.core.$strip>>;
535
+ source: z.ZodEnum<{
536
+ cache: "cache";
537
+ live: "live";
538
+ unavailable: "unavailable";
539
+ }>;
540
+ stale: z.ZodBoolean;
541
+ reason: z.ZodOptional<z.ZodString>;
542
+ }, z.core.$strip>;
543
+ export type RunnerModelCatalogResponse = z.infer<typeof runnerModelCatalogResponseSchema>;
544
+ /** A local app a worktree can be opened in (#open-in): editor, file manager, or terminal. */
545
+ export declare const openTargetSchema: z.ZodObject<{
546
+ id: z.ZodString;
547
+ label: z.ZodString;
548
+ icon: z.ZodOptional<z.ZodString>;
549
+ }, z.core.$strip>;
550
+ export type OpenTarget = z.infer<typeof openTargetSchema>;
551
+ /** `GET /api/v1/open-targets` — the detected local apps; empty in hosted mode (CEZ_REMOTE). */
552
+ export declare const openTargetsResponseSchema: z.ZodObject<{
553
+ targets: z.ZodArray<z.ZodObject<{
554
+ id: z.ZodString;
555
+ label: z.ZodString;
556
+ icon: z.ZodOptional<z.ZodString>;
557
+ }, z.core.$strip>>;
558
+ }, z.core.$strip>;
559
+ export type OpenTargetsResponse = z.infer<typeof openTargetsResponseSchema>;
560
+ /**
561
+ * `POST /api/v1/open-in` — open THIS PROJECT'S root in a detected app (Settings → the project
562
+ * folder row). The path is never sent: it is the scoped project's own registered root, resolved
563
+ * server-side, so the route has no traversal surface at all. `target` is an
564
+ * `/api/v1/open-targets` id; unlike the run route there is no `default`/`cli:` handling, because
565
+ * a repo root is a directory and an agent CLI belongs in a task worktree.
566
+ */
567
+ export declare const openProjectInSchema: z.ZodObject<{
568
+ target: z.ZodString;
569
+ }, z.core.$strip>;
570
+ export type OpenProjectInRequest = z.infer<typeof openProjectInSchema>;
571
+ /** The 200 for the above — `opened` is a literal because every failure is a 409 with `{ error }`,
572
+ * so a `false` would be unreachable and would only invite a client to branch on it. */
573
+ export declare const openProjectInResponseSchema: z.ZodObject<{
574
+ opened: z.ZodLiteral<true>;
575
+ path: z.ZodString;
576
+ }, z.core.$strip>;
577
+ export type OpenProjectInResponse = z.infer<typeof openProjectInResponseSchema>;
@@ -15,7 +15,7 @@
15
15
  * - `CEZ_ENV_PASSTHROUGH=A,B,C` forwards those extra named vars;
16
16
  * - `CEZ_AGENT_ENV_FULL=1` restores the legacy full-`process.env` behavior.
17
17
  */
18
- import type { AgentBackend } from './agent-runner.js';
18
+ import type { AgentBackend } from './agent-runner.ts';
19
19
  export declare function looksSecret(name: string): boolean;
20
20
  export interface BuildChildEnvOptions {
21
21
  backend: AgentBackend;
@@ -192,26 +192,36 @@ const BASE_ALLOW_PREFIXES = [
192
192
  'MISE_',
193
193
  'COMPOSER_',
194
194
  ];
195
+ /** The provider credentials a backend that selects models as `provider/model` may need — it can
196
+ * be pointed at any of them, so none can be pruned without breaking a legitimate model id. */
197
+ const MULTI_PROVIDER_PREFIXES = [
198
+ 'OPENAI_',
199
+ 'ANTHROPIC_',
200
+ 'AZURE_OPENAI_',
201
+ 'OPENROUTER_',
202
+ 'GROQ_',
203
+ 'MISTRAL_',
204
+ 'GEMINI_',
205
+ 'GOOGLE_GENERATIVE_AI_',
206
+ 'DEEPSEEK_',
207
+ 'XAI_',
208
+ 'PERPLEXITY_',
209
+ 'TOGETHER_',
210
+ 'FIREWORKS_',
211
+ ];
195
212
  /** Per-backend auth/config the runner genuinely needs, by prefix. */
196
213
  const BACKEND_ALLOW_PREFIXES = {
197
214
  claude: ['ANTHROPIC_', 'CLAUDE_'],
198
215
  'claude-cli': ['ANTHROPIC_', 'CLAUDE_'],
199
216
  codex: ['OPENAI_', 'CODEX_', 'AZURE_OPENAI_'],
200
- opencode: [
201
- 'OPENAI_',
202
- 'ANTHROPIC_',
203
- 'AZURE_OPENAI_',
204
- 'OPENROUTER_',
205
- 'GROQ_',
206
- 'MISTRAL_',
207
- 'GEMINI_',
208
- 'GOOGLE_GENERATIVE_AI_',
209
- 'DEEPSEEK_',
210
- 'XAI_',
211
- 'PERPLEXITY_',
212
- 'TOGETHER_',
213
- 'FIREWORKS_',
214
- ],
217
+ opencode: MULTI_PROVIDER_PREFIXES,
218
+ // pi selects models as `provider/model` (#387), so it needs both its own config and any
219
+ // provider a configured model id can name — the same set OpenCode gets, for the same reason.
220
+ // Deliberately NOT `CLAUDE_`: pi is not Claude Code and reads none of its variables, and the
221
+ // prefix is load-bearing below — it is what unlocks the Bedrock/Vertex cloud credentials, so
222
+ // granting it here handed pi the whole `AWS_*` / `GOOGLE_CLOUD_*` family on any host that had
223
+ // set `CLAUDE_CODE_USE_BEDROCK=1` for Claude Code, plus Claude's own config dir.
224
+ pi: ['PI_', ...MULTI_PROVIDER_PREFIXES],
215
225
  };
216
226
  /** `gh` handoff (draft PRs) works in every backend — the one credential the
217
227
  * project deliberately keeps in the environment (AGENTS.md "No secrets in
@@ -278,12 +288,25 @@ function isTruthy(value) {
278
288
  export function buildChildEnv(opts) {
279
289
  const source = opts.source ?? process.env;
280
290
  const extra = opts.extraEnv ?? {};
291
+ // Names `extra` is about to define, normalized. The host copy of a var the
292
+ // per-run env overrides must be DROPPED, not merely shadowed: env names are
293
+ // matched case-insensitively here (and by Windows itself), so a host `Temp`
294
+ // and a per-run `TEMP` are the same variable spelled two ways — leaving both
295
+ // in the child env hands the backend the host value under one of them. That
296
+ // is exactly the temp-directory bug #785 fixes, so the override has to be
297
+ // total. `extra` is cezar's own, never a host secret, and always wins.
298
+ const overridden = upperSet(Object.keys(extra));
281
299
  // Escape hatch: restore legacy full-inheritance (opt-in, off by default).
282
300
  // Parsed with the same `isTruthy` the Bedrock/Vertex toggles use (#456
283
301
  // review) — an exact `=== '1'` made `CEZ_AGENT_ENV_FULL=true` silently do
284
302
  // nothing, which is a confusing way to fail open-vs-closed.
285
303
  if (isTruthy(readVar(source, 'CEZ_AGENT_ENV_FULL'))) {
286
- return { ...source, ...extra };
304
+ const full = {};
305
+ for (const [name, value] of Object.entries(source)) {
306
+ if (!overridden.has(name.toUpperCase()))
307
+ full[name] = value;
308
+ }
309
+ return { ...full, ...extra };
287
310
  }
288
311
  const backendPrefixes = BACKEND_ALLOW_PREFIXES[opts.backend] ?? BACKEND_ALLOW_PREFIXES.claude;
289
312
  const passthrough = upperSet((readVar(source, 'CEZ_ENV_PASSTHROUGH') ?? '')
@@ -307,6 +330,8 @@ export function buildChildEnv(opts) {
307
330
  for (const [name, value] of Object.entries(source)) {
308
331
  if (value === undefined)
309
332
  continue;
333
+ if (overridden.has(name.toUpperCase()))
334
+ continue; // the per-run value replaces it, whatever the spelling
310
335
  if (allow(name))
311
336
  out[name] = value;
312
337
  }