@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
package/dist/config.js CHANGED
@@ -2,6 +2,7 @@ import { readFile } from 'node:fs/promises';
2
2
  import { join } from 'node:path';
3
3
  import { z } from 'zod';
4
4
  import { loadWorkspaceConfig } from './workspace/config.js';
5
+ import { RUNNER_IDS } from './core/agent-runner.js';
5
6
  /**
6
7
  * Optional advanced config at `.ai/cezar/config.json`. Zero-config rule:
7
8
  * a missing file behaves exactly like the default below, an unreadable or
@@ -46,7 +47,7 @@ const configSchema = z.object({
46
47
  * step (workflow). The GUI only offers runners actually installed; this is
47
48
  * the preselected default. Also the runner the chain planner uses.
48
49
  */
49
- defaultRunner: z.enum(['claude', 'codex', 'opencode']).default('claude'),
50
+ defaultRunner: z.enum(RUNNER_IDS).default('claude'),
50
51
  /** Model for the chain planner (spec 008) — cheap but reliable at JSON. */
51
52
  plannerModel: z.string().min(1).default('sonnet'),
52
53
  /** Model for the task namer (spec 2026-07-17-task-auto-naming) — the cheapest
@@ -87,28 +88,70 @@ const configSchema = z.object({
87
88
  claude: z.string().trim().min(1).max(200).optional(),
88
89
  codex: z.string().trim().min(1).max(200).optional(),
89
90
  opencode: z.string().trim().min(1).max(200).optional(),
91
+ pi: z.string().trim().min(1).max(200).optional(),
90
92
  })
91
93
  .optional()
92
94
  .catch(undefined),
95
+ /**
96
+ * Make each coding agent's native model setting authoritative. This is an
97
+ * optional repo-level counterpart to `CEZ_AGENT_MODELS_LOCKED=1`; absent or
98
+ * false preserves the ordinary per-runner model selector.
99
+ */
100
+ modelsLocked: z.boolean().optional().catch(undefined),
93
101
  });
94
- /** Read `.ai/cezar/config.json` on demand — never cached, never throws. */
102
+ /**
103
+ * Fold the machine-wide agent defaults under a repo's own config (spec 2026-07-29-agent-profiles).
104
+ *
105
+ * Applied to the RAW object, before parsing, for the reason `ownWorktreeRetention` documents just
106
+ * below: `defaultRunner`'s `.default('claude')` materializes the key, so after a parse there is no
107
+ * telling "the user chose claude" from "the user said nothing". Merging first keeps the wire shape
108
+ * exactly as it has always been — `defaultRunner` and the model presets stay always-present — while
109
+ * making an absent key mean "ask the machine".
110
+ *
111
+ * A repo key always wins, and `models` merges per RUNNER rather than wholesale: pinning claude's
112
+ * model in one repo must not silently discard the machine's codex preset.
113
+ */
114
+ function withMachineDefaults(raw, machine) {
115
+ if (!raw || typeof raw !== 'object' || Array.isArray(raw))
116
+ raw = {};
117
+ const own = raw;
118
+ const ownModels = own.defaultModels && typeof own.defaultModels === 'object'
119
+ ? own.defaultModels
120
+ : undefined;
121
+ const models = { ...machine.models, ...ownModels };
122
+ return {
123
+ ...own,
124
+ ...(own.defaultRunner === undefined && machine.runner !== undefined
125
+ ? { defaultRunner: machine.runner }
126
+ : {}),
127
+ ...(Object.keys(models).length > 0 ? { defaultModels: models } : {}),
128
+ };
129
+ }
130
+ /**
131
+ * Read `.ai/cezar/config.json` on demand — never cached, never throws.
132
+ *
133
+ * Also reads the machine-wide defaults, which is one more small JSON read and deliberately not
134
+ * cached for the same reason this one is not: `~/.cezar/` is shared by every cezar process on the
135
+ * machine, so a snapshot is a staleness bug.
136
+ */
95
137
  export async function loadConfig(repoRoot) {
138
+ const machine = (await loadWorkspaceConfig()).agentDefaults;
96
139
  let raw;
97
140
  try {
98
141
  raw = await readFile(join(repoRoot, '.ai/cezar', 'config.json'), 'utf8');
99
142
  }
100
143
  catch {
101
- return configSchema.parse({});
144
+ return configSchema.parse(withMachineDefaults({}, machine));
102
145
  }
103
146
  try {
104
- const parsed = configSchema.safeParse(JSON.parse(raw));
147
+ const parsed = configSchema.safeParse(withMachineDefaults(JSON.parse(raw), machine));
105
148
  if (parsed.success)
106
149
  return parsed.data;
107
150
  }
108
151
  catch {
109
152
  // fall through — malformed JSON degrades to the default
110
153
  }
111
- return configSchema.parse({});
154
+ return configSchema.parse(withMachineDefaults({}, machine));
112
155
  }
113
156
  /**
114
157
  * The repo's OWN `worktreeRetention`, or `undefined` when it doesn't set one.
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,gFAAgF;IAChF,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC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,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IAChE,OAAO,SAAS,EAAE,SAAS,CAAC,wBAAwB,IAAI,0BAA0B,CAAC;AACrF,CAAC"}
@@ -0,0 +1,153 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * The agent-config surface (spec #404): the settings / memory / MCP files the installed agent
4
+ * CLIs read, listed and edited through `GET/PUT /agent-config[/:id]`.
5
+ */
6
+ export declare const agentConfigFormatSchema: z.ZodEnum<{
7
+ json: "json";
8
+ jsonc: "jsonc";
9
+ markdown: "markdown";
10
+ toml: "toml";
11
+ }>;
12
+ export type AgentConfigFormat = z.infer<typeof agentConfigFormatSchema>;
13
+ export declare const agentConfigScopeSchema: z.ZodEnum<{
14
+ local: "local";
15
+ project: "project";
16
+ user: "user";
17
+ }>;
18
+ export type AgentConfigScope = z.infer<typeof agentConfigScopeSchema>;
19
+ /** `settings` = behavior knobs; `memory` = instruction/markdown; `mcp` = a dedicated MCP file. */
20
+ export declare const agentConfigKindSchema: z.ZodEnum<{
21
+ mcp: "mcp";
22
+ memory: "memory";
23
+ settings: "settings";
24
+ }>;
25
+ export type AgentConfigKind = z.infer<typeof agentConfigKindSchema>;
26
+ /** Git status BY CONVENTION — it drives the honest label; it is not read from git. */
27
+ export declare const agentConfigTrackedSchema: z.ZodEnum<{
28
+ gitignored: "gitignored";
29
+ "outside-repo": "outside-repo";
30
+ tracked: "tracked";
31
+ }>;
32
+ export type AgentConfigTracked = z.infer<typeof agentConfigTrackedSchema>;
33
+ /** One catalog file plus its current on-disk state. */
34
+ export declare const agentConfigFileSchema: z.ZodObject<{
35
+ id: z.ZodString;
36
+ runners: z.ZodArray<z.ZodEnum<{
37
+ claude: "claude";
38
+ codex: "codex";
39
+ opencode: "opencode";
40
+ pi: "pi";
41
+ }>>;
42
+ kind: z.ZodEnum<{
43
+ mcp: "mcp";
44
+ memory: "memory";
45
+ settings: "settings";
46
+ }>;
47
+ scope: z.ZodEnum<{
48
+ local: "local";
49
+ project: "project";
50
+ user: "user";
51
+ }>;
52
+ label: z.ZodString;
53
+ path: z.ZodString;
54
+ format: z.ZodEnum<{
55
+ json: "json";
56
+ jsonc: "jsonc";
57
+ markdown: "markdown";
58
+ toml: "toml";
59
+ }>;
60
+ tracked: z.ZodEnum<{
61
+ gitignored: "gitignored";
62
+ "outside-repo": "outside-repo";
63
+ tracked: "tracked";
64
+ }>;
65
+ seeded: z.ZodBoolean;
66
+ holdsMcp: z.ZodBoolean;
67
+ precedence: z.ZodString;
68
+ hotReload: z.ZodOptional<z.ZodString>;
69
+ docsUrl: z.ZodString;
70
+ exists: z.ZodBoolean;
71
+ size: z.ZodNumber;
72
+ version: z.ZodNullable<z.ZodString>;
73
+ writable: z.ZodBoolean;
74
+ readOnlyReason: z.ZodOptional<z.ZodString>;
75
+ }, z.core.$strip>;
76
+ export type AgentConfigFile = z.infer<typeof agentConfigFileSchema>;
77
+ /** Read-only listing of the MCP servers Claude keeps in `~/.claude.json`. */
78
+ export declare const userMcpListingSchema: z.ZodObject<{
79
+ path: z.ZodString;
80
+ servers: z.ZodArray<z.ZodString>;
81
+ readable: z.ZodBoolean;
82
+ }, z.core.$strip>;
83
+ export type UserMcpListing = z.infer<typeof userMcpListingSchema>;
84
+ /** `GET /agent-config` — the whole panel in one read. */
85
+ export declare const agentConfigListingSchema: z.ZodObject<{
86
+ editable: z.ZodBoolean;
87
+ files: z.ZodArray<z.ZodObject<{
88
+ id: z.ZodString;
89
+ runners: z.ZodArray<z.ZodEnum<{
90
+ claude: "claude";
91
+ codex: "codex";
92
+ opencode: "opencode";
93
+ pi: "pi";
94
+ }>>;
95
+ kind: z.ZodEnum<{
96
+ mcp: "mcp";
97
+ memory: "memory";
98
+ settings: "settings";
99
+ }>;
100
+ scope: z.ZodEnum<{
101
+ local: "local";
102
+ project: "project";
103
+ user: "user";
104
+ }>;
105
+ label: z.ZodString;
106
+ path: z.ZodString;
107
+ format: z.ZodEnum<{
108
+ json: "json";
109
+ jsonc: "jsonc";
110
+ markdown: "markdown";
111
+ toml: "toml";
112
+ }>;
113
+ tracked: z.ZodEnum<{
114
+ gitignored: "gitignored";
115
+ "outside-repo": "outside-repo";
116
+ tracked: "tracked";
117
+ }>;
118
+ seeded: z.ZodBoolean;
119
+ holdsMcp: z.ZodBoolean;
120
+ precedence: z.ZodString;
121
+ hotReload: z.ZodOptional<z.ZodString>;
122
+ docsUrl: z.ZodString;
123
+ exists: z.ZodBoolean;
124
+ size: z.ZodNumber;
125
+ version: z.ZodNullable<z.ZodString>;
126
+ writable: z.ZodBoolean;
127
+ readOnlyReason: z.ZodOptional<z.ZodString>;
128
+ }, z.core.$strip>>;
129
+ userMcp: z.ZodNullable<z.ZodObject<{
130
+ path: z.ZodString;
131
+ servers: z.ZodArray<z.ZodString>;
132
+ readable: z.ZodBoolean;
133
+ }, z.core.$strip>>;
134
+ }, z.core.$strip>;
135
+ export type AgentConfigListing = z.infer<typeof agentConfigListingSchema>;
136
+ /** `GET /agent-config/:id` and the `PUT` echo — one file's bytes plus its stale-write token. */
137
+ export declare const agentConfigFileContentSchema: z.ZodObject<{
138
+ id: z.ZodString;
139
+ path: z.ZodString;
140
+ exists: z.ZodBoolean;
141
+ content: z.ZodString;
142
+ version: z.ZodNullable<z.ZodString>;
143
+ }, z.core.$strip>;
144
+ export type AgentConfigFileContent = z.infer<typeof agentConfigFileContentSchema>;
145
+ /**
146
+ * `PUT /agent-config/:id` body. `version` is the token from the read that produced `content` —
147
+ * `null` means "I expect no file to exist yet" (the create path); a mismatch is a 409.
148
+ */
149
+ export declare const setAgentConfigInputSchema: z.ZodObject<{
150
+ content: z.ZodString;
151
+ version: z.ZodNullable<z.ZodString>;
152
+ }, z.core.$strip>;
153
+ export type SetAgentConfigInput = z.infer<typeof setAgentConfigInputSchema>;
@@ -0,0 +1,347 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Agent profiles — extra config dirs for a SECOND login of the same agent CLI
4
+ * (`CLAUDE_CONFIG_DIR=~/.claude-klaudiusz claude`), spec `2026-07-29-agent-profiles`.
5
+ *
6
+ * Workspace-level, so single-mount: `/api/v1/workspace/agent-profiles`. Never project-scoped —
7
+ * an account belongs to the person and the machine, and a second scoped spelling would be a
8
+ * second surface to protect with no consumer. Which account a PROJECT uses rides on
9
+ * `PUT …/agent-profiles/selection` in this same family, because it is stored beside the accounts
10
+ * it names rather than on the project registry (see `src/workspace/agent-accounts.ts`).
11
+ *
12
+ * Node-free by construction (see README rule 1) — `zod` and the sibling contract modules only.
13
+ */
14
+ /**
15
+ * The id of the DISCOVERED account — the one `agentHomePaths()` finds from the environment.
16
+ *
17
+ * Reserved: never allocated to a stored account, never written to `~/.cezar/agent-accounts.json`.
18
+ * It is a real, meaningful value on the wire in two places, and they are not the same thing:
19
+ * `PUT …/agent-profiles/selection` takes it (like `null`) to CLEAR a repo back to the discovered
20
+ * account, and `POST /api/v1/runs` takes it as `agentProfile` to mean "this task uses the
21
+ * discovered account, whatever the repo is set to" — which `selectProfile` honours over the repo's
22
+ * selection. Defined here so the cockpit and the server cannot disagree about the spelling.
23
+ */
24
+ export declare const DEFAULT_AGENT_ACCOUNT_ID = "default";
25
+ /**
26
+ * One of the agent's OWN config files, resolved against THIS account's folder.
27
+ *
28
+ * Addressed by the catalog's stable, opaque `id` — never a path the client composes, which is what
29
+ * makes the open route traversal-proof by construction (the same rule `/api/v1/agent-config/:id`
30
+ * follows).
31
+ */
32
+ export declare const agentAccountFileSchema: z.ZodObject<{
33
+ id: z.ZodString;
34
+ label: z.ZodString;
35
+ path: z.ZodString;
36
+ exists: z.ZodBoolean;
37
+ }, z.core.$strip>;
38
+ export type AgentAccountFile = z.infer<typeof agentAccountFileSchema>;
39
+ /**
40
+ * One account, as the cockpit sees it.
41
+ *
42
+ * A CLOSED object, on the same terms as `projectListEntrySchema`: `.passthrough()` on the
43
+ * persistence side (`src/workspace/agent-accounts.ts`) is a durability promise about
44
+ * `~/.cezar/agent-accounts.json`, not a promise that the API answers arbitrary keys.
45
+ */
46
+ export declare const agentProfileSchema: z.ZodObject<{
47
+ id: z.ZodString;
48
+ provider: z.ZodEnum<{
49
+ claude: "claude";
50
+ codex: "codex";
51
+ opencode: "opencode";
52
+ pi: "pi";
53
+ }>;
54
+ label: z.ZodString;
55
+ configDir: z.ZodString;
56
+ path: z.ZodString;
57
+ exists: z.ZodBoolean;
58
+ looksValid: z.ZodBoolean;
59
+ isDefault: z.ZodBoolean;
60
+ status: z.ZodOptional<z.ZodObject<{
61
+ provider: z.ZodEnum<{
62
+ claude: "claude";
63
+ codex: "codex";
64
+ opencode: "opencode";
65
+ pi: "pi";
66
+ }>;
67
+ status: z.ZodEnum<{
68
+ connected: "connected";
69
+ disconnected: "disconnected";
70
+ "not-installed": "not-installed";
71
+ unknown: "unknown";
72
+ }>;
73
+ enabled: z.ZodOptional<z.ZodBoolean>;
74
+ hint: z.ZodOptional<z.ZodString>;
75
+ authFailureId: z.ZodOptional<z.ZodString>;
76
+ profileId: z.ZodOptional<z.ZodString>;
77
+ }, z.core.$strip>>;
78
+ files: z.ZodArray<z.ZodObject<{
79
+ id: z.ZodString;
80
+ label: z.ZodString;
81
+ path: z.ZodString;
82
+ exists: z.ZodBoolean;
83
+ }, z.core.$strip>>;
84
+ }, z.core.$strip>;
85
+ export type AgentProfile = z.infer<typeof agentProfileSchema>;
86
+ /**
87
+ * How to address one account in the per-account routes (`…/:id/details`, `…/:id/open`).
88
+ *
89
+ * Every DISCOVERED account shares `id: "default"` — that spelling is load-bearing in the selection
90
+ * routes, where it means "back to the discovered account" — so it cannot identify which agent's
91
+ * default is meant. These two routes therefore take `default:<provider>` for a discovered account
92
+ * and the stored slug otherwise. Defined once, here, so the client and the server cannot disagree
93
+ * about the encoding; still opaque, still not a path.
94
+ */
95
+ export declare function agentAccountRouteId(profile: Pick<AgentProfile, 'id' | 'provider' | 'isDefault'>): string;
96
+ /** One project's account choice, per provider. An absent key = the discovered account. */
97
+ export declare const agentAccountSelectionSchema: z.ZodObject<{
98
+ claude: z.ZodOptional<z.ZodString>;
99
+ codex: z.ZodOptional<z.ZodString>;
100
+ opencode: z.ZodOptional<z.ZodString>;
101
+ pi: z.ZodOptional<z.ZodString>;
102
+ }, z.core.$strip>;
103
+ export type AgentAccountSelection = z.infer<typeof agentAccountSelectionSchema>;
104
+ /**
105
+ * `GET /api/v1/workspace/agent-profiles` — every account, discovered defaults first.
106
+ *
107
+ * `editable` is false in hosted mode (`CEZ_REMOTE`), where the whole family is refused: defining
108
+ * a profile points an agent at a local directory, and the listing echoes absolute paths carrying
109
+ * the username. Same posture as `PUT /api/v1/agent-config/:id`.
110
+ */
111
+ export declare const agentProfilesResponseSchema: z.ZodObject<{
112
+ editable: z.ZodBoolean;
113
+ profiles: z.ZodArray<z.ZodObject<{
114
+ id: z.ZodString;
115
+ provider: z.ZodEnum<{
116
+ claude: "claude";
117
+ codex: "codex";
118
+ opencode: "opencode";
119
+ pi: "pi";
120
+ }>;
121
+ label: z.ZodString;
122
+ configDir: z.ZodString;
123
+ path: z.ZodString;
124
+ exists: z.ZodBoolean;
125
+ looksValid: z.ZodBoolean;
126
+ isDefault: z.ZodBoolean;
127
+ status: z.ZodOptional<z.ZodObject<{
128
+ provider: z.ZodEnum<{
129
+ claude: "claude";
130
+ codex: "codex";
131
+ opencode: "opencode";
132
+ pi: "pi";
133
+ }>;
134
+ status: z.ZodEnum<{
135
+ connected: "connected";
136
+ disconnected: "disconnected";
137
+ "not-installed": "not-installed";
138
+ unknown: "unknown";
139
+ }>;
140
+ enabled: z.ZodOptional<z.ZodBoolean>;
141
+ hint: z.ZodOptional<z.ZodString>;
142
+ authFailureId: z.ZodOptional<z.ZodString>;
143
+ profileId: z.ZodOptional<z.ZodString>;
144
+ }, z.core.$strip>>;
145
+ files: z.ZodArray<z.ZodObject<{
146
+ id: z.ZodString;
147
+ label: z.ZodString;
148
+ path: z.ZodString;
149
+ exists: z.ZodBoolean;
150
+ }, z.core.$strip>>;
151
+ }, z.core.$strip>>;
152
+ profileCapableProviders: z.ZodArray<z.ZodEnum<{
153
+ claude: "claude";
154
+ codex: "codex";
155
+ opencode: "opencode";
156
+ pi: "pi";
157
+ }>>;
158
+ selections: z.ZodRecord<z.ZodString, z.ZodObject<{
159
+ claude: z.ZodOptional<z.ZodString>;
160
+ codex: z.ZodOptional<z.ZodString>;
161
+ opencode: z.ZodOptional<z.ZodString>;
162
+ pi: z.ZodOptional<z.ZodString>;
163
+ }, z.core.$strip>>;
164
+ defaults: z.ZodObject<{
165
+ claude: z.ZodOptional<z.ZodString>;
166
+ codex: z.ZodOptional<z.ZodString>;
167
+ opencode: z.ZodOptional<z.ZodString>;
168
+ pi: z.ZodOptional<z.ZodString>;
169
+ }, z.core.$strip>;
170
+ }, z.core.$strip>;
171
+ export type AgentProfilesResponse = z.infer<typeof agentProfilesResponseSchema>;
172
+ /**
173
+ * `PUT /api/v1/workspace/agent-profiles/selection` — point one project's provider at an account.
174
+ *
175
+ * `profileId: null` (and the reserved `"default"`) clear it back to the discovered account, stored
176
+ * as absence. An id that does not exist, or belongs to another provider, is a 400 — never silently
177
+ * degraded, because a typo the route accepted would quietly run the project on the wrong account.
178
+ */
179
+ export declare const selectAgentProfileInputSchema: z.ZodObject<{
180
+ projectId: z.ZodNullable<z.ZodString>;
181
+ provider: z.ZodEnum<{
182
+ claude: "claude";
183
+ codex: "codex";
184
+ opencode: "opencode";
185
+ pi: "pi";
186
+ }>;
187
+ profileId: z.ZodNullable<z.ZodString>;
188
+ }, z.core.$strip>;
189
+ export type SelectAgentProfileInput = z.infer<typeof selectAgentProfileInputSchema>;
190
+ /** The selection map after the write — the same shape the listing carries. */
191
+ export declare const agentProfileSelectionsResponseSchema: z.ZodObject<{
192
+ selections: z.ZodRecord<z.ZodString, z.ZodObject<{
193
+ claude: z.ZodOptional<z.ZodString>;
194
+ codex: z.ZodOptional<z.ZodString>;
195
+ opencode: z.ZodOptional<z.ZodString>;
196
+ pi: z.ZodOptional<z.ZodString>;
197
+ }, z.core.$strip>>;
198
+ defaults: z.ZodObject<{
199
+ claude: z.ZodOptional<z.ZodString>;
200
+ codex: z.ZodOptional<z.ZodString>;
201
+ opencode: z.ZodOptional<z.ZodString>;
202
+ pi: z.ZodOptional<z.ZodString>;
203
+ }, z.core.$strip>;
204
+ }, z.core.$strip>;
205
+ export type AgentProfileSelectionsResponse = z.infer<typeof agentProfileSelectionsResponseSchema>;
206
+ /** `GET /api/v1/workspace/agent-profiles/:id/status` — one account's auth state, probed for real.
207
+ * `?refresh=1` drops this account's cached answer and re-probes. Kept off the listing so a cold
208
+ * load pays no CLI spawn. */
209
+ export declare const agentAccountStatusResponseSchema: z.ZodObject<{
210
+ status: z.ZodObject<{
211
+ provider: z.ZodEnum<{
212
+ claude: "claude";
213
+ codex: "codex";
214
+ opencode: "opencode";
215
+ pi: "pi";
216
+ }>;
217
+ status: z.ZodEnum<{
218
+ connected: "connected";
219
+ disconnected: "disconnected";
220
+ "not-installed": "not-installed";
221
+ unknown: "unknown";
222
+ }>;
223
+ enabled: z.ZodOptional<z.ZodBoolean>;
224
+ hint: z.ZodOptional<z.ZodString>;
225
+ authFailureId: z.ZodOptional<z.ZodString>;
226
+ profileId: z.ZodOptional<z.ZodString>;
227
+ }, z.core.$strip>;
228
+ }, z.core.$strip>;
229
+ export type AgentAccountStatusResponse = z.infer<typeof agentAccountStatusResponseSchema>;
230
+ /**
231
+ * `GET /api/v1/workspace/agent-profiles/:id/details` — who this account is signed in as.
232
+ *
233
+ * A SEPARATE, on-demand route rather than a field on the listing, and that is the whole point of
234
+ * "hidden by default": if the listing carried an email, hiding it in the UI would be theatre — it
235
+ * would already be in the response, the query cache and devtools. It is fetched only when the user
236
+ * asks, is refused in hosted mode, and is never logged or persisted.
237
+ *
238
+ * `fields` is a labelled list rather than a fixed shape because what an agent knows about its own
239
+ * login differs; inventing an empty "Organization" for one that has no such concept would be a
240
+ * worse answer than omitting the row. `available: false` carries a `reason` in the user's terms.
241
+ */
242
+ export declare const agentAccountDetailsResponseSchema: z.ZodObject<{
243
+ available: z.ZodBoolean;
244
+ reason: z.ZodOptional<z.ZodString>;
245
+ fields: z.ZodArray<z.ZodObject<{
246
+ label: z.ZodString;
247
+ value: z.ZodString;
248
+ }, z.core.$strip>>;
249
+ }, z.core.$strip>;
250
+ export type AgentAccountDetailsResponse = z.infer<typeof agentAccountDetailsResponseSchema>;
251
+ /**
252
+ * `POST /api/v1/workspace/agent-profiles/:id/open` — hand one of this account's config files (or
253
+ * the folder itself) to a local app.
254
+ *
255
+ * `file` is a catalog id from the account's own `files`, or `folder` for the config dir. `target`
256
+ * is an `/api/v1/open-targets` id — an editor, or the file manager for `folder` — and omitted means
257
+ * the OS default handler.
258
+ *
259
+ * Two target families are refused with a 400 rather than silently misbehaving: `terminal` for a
260
+ * FILE (it would `cd` into it) and any `cli:<runner>` handoff (it would start an agent session
261
+ * inside the config folder). An unknown/undetected target is a 400 too.
262
+ */
263
+ export declare const openAgentAccountFileInputSchema: z.ZodObject<{
264
+ file: z.ZodString;
265
+ target: z.ZodOptional<z.ZodString>;
266
+ }, z.core.$strip>;
267
+ export type OpenAgentAccountFileInput = z.infer<typeof openAgentAccountFileInputSchema>;
268
+ /** `POST …/open` — what was opened, so the UI can say so rather than guess. */
269
+ export declare const openAgentAccountFileResponseSchema: z.ZodObject<{
270
+ opened: z.ZodLiteral<true>;
271
+ path: z.ZodString;
272
+ }, z.core.$strip>;
273
+ export type OpenAgentAccountFileResponse = z.infer<typeof openAgentAccountFileResponseSchema>;
274
+ /** `POST /api/v1/workspace/agent-profiles` — the id is allocated server-side from the label. */
275
+ export declare const createAgentProfileInputSchema: z.ZodObject<{
276
+ provider: z.ZodEnum<{
277
+ claude: "claude";
278
+ codex: "codex";
279
+ opencode: "opencode";
280
+ pi: "pi";
281
+ }>;
282
+ label: z.ZodOptional<z.ZodString>;
283
+ configDir: z.ZodString;
284
+ }, z.core.$strip>;
285
+ export type CreateAgentProfileInput = z.infer<typeof createAgentProfileInputSchema>;
286
+ /**
287
+ * `POST` / `PATCH /api/v1/workspace/agent-profiles/:id` — the affected row.
288
+ *
289
+ * Answered WITHOUT waiting for a probe, like the listing: `status` is absent and the server kicks
290
+ * the re-learn off behind the response, so adding an account does not block on a CLI spawn. The
291
+ * pane's own request for that row joins the same in-flight probe rather than starting a second.
292
+ */
293
+ export declare const agentProfileResponseSchema: z.ZodObject<{
294
+ profile: z.ZodObject<{
295
+ id: z.ZodString;
296
+ provider: z.ZodEnum<{
297
+ claude: "claude";
298
+ codex: "codex";
299
+ opencode: "opencode";
300
+ pi: "pi";
301
+ }>;
302
+ label: z.ZodString;
303
+ configDir: z.ZodString;
304
+ path: z.ZodString;
305
+ exists: z.ZodBoolean;
306
+ looksValid: z.ZodBoolean;
307
+ isDefault: z.ZodBoolean;
308
+ status: z.ZodOptional<z.ZodObject<{
309
+ provider: z.ZodEnum<{
310
+ claude: "claude";
311
+ codex: "codex";
312
+ opencode: "opencode";
313
+ pi: "pi";
314
+ }>;
315
+ status: z.ZodEnum<{
316
+ connected: "connected";
317
+ disconnected: "disconnected";
318
+ "not-installed": "not-installed";
319
+ unknown: "unknown";
320
+ }>;
321
+ enabled: z.ZodOptional<z.ZodBoolean>;
322
+ hint: z.ZodOptional<z.ZodString>;
323
+ authFailureId: z.ZodOptional<z.ZodString>;
324
+ profileId: z.ZodOptional<z.ZodString>;
325
+ }, z.core.$strip>>;
326
+ files: z.ZodArray<z.ZodObject<{
327
+ id: z.ZodString;
328
+ label: z.ZodString;
329
+ path: z.ZodString;
330
+ exists: z.ZodBoolean;
331
+ }, z.core.$strip>>;
332
+ }, z.core.$strip>;
333
+ }, z.core.$strip>;
334
+ export type AgentProfileResponse = z.infer<typeof agentProfileResponseSchema>;
335
+ /** `PATCH /api/v1/workspace/agent-profiles/:id` — partial; absent keys stay untouched. */
336
+ export declare const updateAgentProfileInputSchema: z.ZodObject<{
337
+ label: z.ZodOptional<z.ZodString>;
338
+ configDir: z.ZodOptional<z.ZodString>;
339
+ }, z.core.$strip>;
340
+ export type UpdateAgentProfileInput = z.infer<typeof updateAgentProfileInputSchema>;
341
+ /** `DELETE /api/v1/workspace/agent-profiles/:id` — deregistration only; the directory is never
342
+ * touched. Projects that referenced it fall back to the discovered default. */
343
+ export declare const removeAgentProfileResponseSchema: z.ZodObject<{
344
+ removed: z.ZodLiteral<true>;
345
+ id: z.ZodString;
346
+ }, z.core.$strip>;
347
+ export type RemoveAgentProfileResponse = z.infer<typeof removeAgentProfileResponseSchema>;