@open-mercato/cezar 0.9.1 → 0.9.2-pr772.1071

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 (355) hide show
  1. package/README.md +36 -17
  2. package/dist/agent-config/account-identity.d.ts +44 -0
  3. package/dist/agent-config/account-identity.js +128 -0
  4. package/dist/agent-config/account-identity.js.map +1 -0
  5. package/dist/agent-config/catalog.d.ts +9 -1
  6. package/dist/agent-config/catalog.js +18 -0
  7. package/dist/agent-config/catalog.js.map +1 -1
  8. package/dist/agent-config/files.d.ts +1 -1
  9. package/dist/agent-config/model-settings/claude.d.ts +2 -0
  10. package/dist/agent-config/model-settings/claude.js +11 -0
  11. package/dist/agent-config/model-settings/claude.js.map +1 -0
  12. package/dist/agent-config/model-settings/codex.d.ts +2 -0
  13. package/dist/agent-config/model-settings/codex.js +16 -0
  14. package/dist/agent-config/model-settings/codex.js.map +1 -0
  15. package/dist/agent-config/model-settings/opencode.d.ts +2 -0
  16. package/dist/agent-config/model-settings/opencode.js +8 -0
  17. package/dist/agent-config/model-settings/opencode.js.map +1 -0
  18. package/dist/agent-config/model-settings/shared.d.ts +9 -0
  19. package/dist/agent-config/model-settings/shared.js +93 -0
  20. package/dist/agent-config/model-settings/shared.js.map +1 -0
  21. package/dist/agent-config/model-settings/types.d.ts +9 -0
  22. package/dist/agent-config/model-settings/types.js +2 -0
  23. package/dist/agent-config/model-settings/types.js.map +1 -0
  24. package/dist/agent-config/models.d.ts +9 -0
  25. package/dist/agent-config/models.js +30 -0
  26. package/dist/agent-config/models.js.map +1 -0
  27. package/dist/agent-config/service.d.ts +1 -1
  28. package/dist/agent-config/service.js +4 -4
  29. package/dist/agent-config/service.js.map +1 -1
  30. package/dist/agent-config/validate.d.ts +1 -1
  31. package/dist/automations/coordinator.d.ts +26 -0
  32. package/dist/automations/coordinator.js +66 -0
  33. package/dist/automations/coordinator.js.map +1 -0
  34. package/dist/automations/github-poller.d.ts +74 -0
  35. package/dist/automations/github-poller.js +234 -0
  36. package/dist/automations/github-poller.js.map +1 -0
  37. package/dist/automations/scheduler.d.ts +42 -0
  38. package/dist/automations/scheduler.js +192 -0
  39. package/dist/automations/scheduler.js.map +1 -0
  40. package/dist/automations/store.d.ts +65 -0
  41. package/dist/automations/store.js +298 -0
  42. package/dist/automations/store.js.map +1 -0
  43. package/dist/automations/task-template.d.ts +18 -0
  44. package/dist/automations/task-template.js +95 -0
  45. package/dist/automations/task-template.js.map +1 -0
  46. package/dist/automations/types.d.ts +251 -0
  47. package/dist/automations/types.js +158 -0
  48. package/dist/automations/types.js.map +1 -0
  49. package/dist/config.d.ts +17 -112
  50. package/dist/config.js +45 -4
  51. package/dist/config.js.map +1 -1
  52. package/dist/contract/agent-config.d.ts +151 -0
  53. package/dist/contract/agent-profiles.d.ts +332 -0
  54. package/dist/contract/automations.d.ts +919 -0
  55. package/dist/contract/events.d.ts +45 -0
  56. package/dist/contract/github.d.ts +467 -0
  57. package/dist/contract/health.d.ts +96 -0
  58. package/dist/contract/index.d.ts +16 -0
  59. package/dist/contract/index.js +1614 -0
  60. package/dist/contract/projects.d.ts +185 -0
  61. package/dist/contract/repo.d.ts +234 -0
  62. package/dist/contract/runs.d.ts +1261 -0
  63. package/dist/contract/skills.d.ts +229 -0
  64. package/dist/contract/workflows.d.ts +212 -0
  65. package/dist/contract/workspace.d.ts +490 -0
  66. package/dist/core/agent-env.d.ts +1 -1
  67. package/dist/core/agent-model-policy.d.ts +10 -0
  68. package/dist/core/agent-model-policy.js +36 -0
  69. package/dist/core/agent-model-policy.js.map +1 -0
  70. package/dist/core/agent-profiles.d.ts +59 -0
  71. package/dist/core/agent-profiles.js +83 -0
  72. package/dist/core/agent-profiles.js.map +1 -0
  73. package/dist/core/agent-runner.d.ts +12 -1
  74. package/dist/core/agent-runner.js +13 -0
  75. package/dist/core/agent-runner.js.map +1 -1
  76. package/dist/core/ask.d.ts +45 -124
  77. package/dist/core/ask.js +103 -13
  78. package/dist/core/ask.js.map +1 -1
  79. package/dist/core/backend-detect.js +7 -2
  80. package/dist/core/backend-detect.js.map +1 -1
  81. package/dist/core/claude-cli-runner.d.ts +2 -2
  82. package/dist/core/claude-cli-runner.js +52 -9
  83. package/dist/core/claude-cli-runner.js.map +1 -1
  84. package/dist/core/claude-ui-mapper.d.ts +1 -1
  85. package/dist/core/codex-app-server-runner.d.ts +1 -1
  86. package/dist/core/codex-app-server-runner.js +60 -3
  87. package/dist/core/codex-app-server-runner.js.map +1 -1
  88. package/dist/core/codex-app-server-transport.d.ts +6 -1
  89. package/dist/core/codex-app-server-transport.js +12 -3
  90. package/dist/core/codex-app-server-transport.js.map +1 -1
  91. package/dist/core/codex-model-catalog.d.ts +1 -1
  92. package/dist/core/codex-ui-mapper.d.ts +5 -1
  93. package/dist/core/codex-ui-mapper.js +74 -17
  94. package/dist/core/codex-ui-mapper.js.map +1 -1
  95. package/dist/core/model-identity.d.ts +13 -6
  96. package/dist/core/model-identity.js +32 -17
  97. package/dist/core/model-identity.js.map +1 -1
  98. package/dist/core/model-presets.d.ts +2 -2
  99. package/dist/core/model-presets.js +1 -1
  100. package/dist/core/opencode-server-runner.d.ts +2 -2
  101. package/dist/core/opencode-ui-mapper.d.ts +4 -1
  102. package/dist/core/opencode-ui-mapper.js +45 -7
  103. package/dist/core/opencode-ui-mapper.js.map +1 -1
  104. package/dist/core/provider-auth.d.ts +154 -0
  105. package/dist/core/provider-auth.js +488 -0
  106. package/dist/core/provider-auth.js.map +1 -0
  107. package/dist/core/provider-availability.d.ts +3 -0
  108. package/dist/core/provider-availability.js +14 -0
  109. package/dist/core/provider-availability.js.map +1 -0
  110. package/dist/core/runner-factory.d.ts +1 -1
  111. package/dist/core/runner-model-catalog.d.ts +1 -1
  112. package/dist/core/shell-env.d.ts +28 -0
  113. package/dist/core/shell-env.js +56 -0
  114. package/dist/core/shell-env.js.map +1 -0
  115. package/dist/core/tool-display.d.ts +1 -1
  116. package/dist/core/ui-events.d.ts +1 -1
  117. package/dist/core/ui-events.js +1 -1
  118. package/dist/core/usage-limit.d.ts +42 -0
  119. package/dist/core/usage-limit.js +209 -0
  120. package/dist/core/usage-limit.js.map +1 -0
  121. package/dist/git-diff-base.d.ts +60 -0
  122. package/dist/git-diff-base.js +54 -0
  123. package/dist/git-diff-base.js.map +1 -0
  124. package/dist/git-worktree.d.ts +37 -6
  125. package/dist/git-worktree.js +39 -9
  126. package/dist/git-worktree.js.map +1 -1
  127. package/dist/handoff.d.ts +2 -2
  128. package/dist/handoff.js +1 -1
  129. package/dist/index.js +65 -8
  130. package/dist/index.js.map +1 -1
  131. package/dist/paths.d.ts +69 -6
  132. package/dist/paths.js +86 -9
  133. package/dist/paths.js.map +1 -1
  134. package/dist/planner.d.ts +2 -2
  135. package/dist/planner.js +7 -1
  136. package/dist/planner.js.map +1 -1
  137. package/dist/release/manifests.d.ts +81 -0
  138. package/dist/release/manifests.js +74 -0
  139. package/dist/release/manifests.js.map +1 -0
  140. package/dist/release/snapshot.d.ts +9 -23
  141. package/dist/release/snapshot.js +9 -22
  142. package/dist/release/snapshot.js.map +1 -1
  143. package/dist/release/stable.d.ts +15 -29
  144. package/dist/release/stable.js +14 -27
  145. package/dist/release/stable.js.map +1 -1
  146. package/dist/runs/auto-name.d.ts +1 -1
  147. package/dist/runs/auto-name.js +6 -1
  148. package/dist/runs/auto-name.js.map +1 -1
  149. package/dist/runs/retention.d.ts +1 -1
  150. package/dist/runs/store.d.ts +149 -336
  151. package/dist/runs/store.js +187 -9
  152. package/dist/runs/store.js.map +1 -1
  153. package/dist/runs/ui-event-sink.d.ts +1 -1
  154. package/dist/server/app-type.d.ts +21 -0
  155. package/dist/server/app-type.js +2 -0
  156. package/dist/server/app-type.js.map +1 -0
  157. package/dist/server/capabilities.d.ts +6 -5
  158. package/dist/server/capabilities.js +11 -0
  159. package/dist/server/capabilities.js.map +1 -1
  160. package/dist/server/forge/github.d.ts +58 -151
  161. package/dist/server/forge/github.js +530 -6
  162. package/dist/server/forge/github.js.map +1 -1
  163. package/dist/server/forge/index.d.ts +10 -3
  164. package/dist/server/forge/index.js +14 -1
  165. package/dist/server/forge/index.js.map +1 -1
  166. package/dist/server/forge/types.d.ts +86 -1
  167. package/dist/server/git-changes.d.ts +8 -8
  168. package/dist/server/git-changes.js +14 -17
  169. package/dist/server/git-changes.js.map +1 -1
  170. package/dist/server/git.d.ts +2 -0
  171. package/dist/server/git.js +9 -0
  172. package/dist/server/git.js.map +1 -1
  173. package/dist/server/github.d.ts +3 -3
  174. package/dist/server/github.js +1 -1
  175. package/dist/server/github.js.map +1 -1
  176. package/dist/server/open-in-terminal.d.ts +8 -1
  177. package/dist/server/open-in-terminal.js +16 -8
  178. package/dist/server/open-in-terminal.js.map +1 -1
  179. package/dist/server/pr.d.ts +2 -2
  180. package/dist/server/project-context.d.ts +20 -3
  181. package/dist/server/project-context.js +30 -1
  182. package/dist/server/project-context.js.map +1 -1
  183. package/dist/server/provider-action-gate.d.ts +8 -0
  184. package/dist/server/provider-action-gate.js +54 -0
  185. package/dist/server/provider-action-gate.js.map +1 -0
  186. package/dist/server/provider-auth-runtime.d.ts +21 -0
  187. package/dist/server/provider-auth-runtime.js +66 -0
  188. package/dist/server/provider-auth-runtime.js.map +1 -0
  189. package/dist/server/server.d.ts +12128 -47
  190. package/dist/server/server.js +2652 -917
  191. package/dist/server/server.js.map +1 -1
  192. package/dist/server/validators.d.ts +97 -0
  193. package/dist/server/validators.js +86 -0
  194. package/dist/server/validators.js.map +1 -0
  195. package/dist/server/ws.d.ts +2 -2
  196. package/dist/server/ws.js +2 -2
  197. package/dist/server/ws.js.map +1 -1
  198. package/dist/server-install/engine.d.ts +1 -1
  199. package/dist/server-install/platforms/macosx-ngrok.d.ts +1 -1
  200. package/dist/server-install/platforms/ubuntu-vps.d.ts +16 -1
  201. package/dist/server-install/platforms/ubuntu-vps.js +83 -1
  202. package/dist/server-install/platforms/ubuntu-vps.js.map +1 -1
  203. package/dist/server-install/state.d.ts +1 -1
  204. package/dist/server-install/steps.d.ts +2 -2
  205. package/dist/server-install/strategies.d.ts +1 -1
  206. package/dist/server-install/types.d.ts +38 -424
  207. package/dist/server-install/ui.d.ts +1 -1
  208. package/dist/skills-banner.d.ts +7 -6
  209. package/dist/skills-banner.js +7 -6
  210. package/dist/skills-banner.js.map +1 -1
  211. package/dist/skills-remote.d.ts +2 -2
  212. package/dist/skills-update.d.ts +88 -0
  213. package/dist/skills-update.js +392 -0
  214. package/dist/skills-update.js.map +1 -0
  215. package/dist/skills.d.ts +2 -0
  216. package/dist/skills.js +7 -2
  217. package/dist/skills.js.map +1 -1
  218. package/dist/todos.d.ts +2 -28
  219. package/dist/todos.js +1 -1
  220. package/dist/ui-state.d.ts +16 -2
  221. package/dist/ui-state.js +14 -1
  222. package/dist/ui-state.js.map +1 -1
  223. package/dist/workflows/load.d.ts +1 -1
  224. package/dist/workflows/run.d.ts +238 -12
  225. package/dist/workflows/run.js +1103 -115
  226. package/dist/workflows/run.js.map +1 -1
  227. package/dist/workflows/types.d.ts +59 -224
  228. package/dist/workflows/types.js +14 -0
  229. package/dist/workflows/types.js.map +1 -1
  230. package/dist/workspace/agent-accounts.d.ts +149 -0
  231. package/dist/workspace/agent-accounts.js +303 -0
  232. package/dist/workspace/agent-accounts.js.map +1 -0
  233. package/dist/workspace/agent-profiles.d.ts +78 -0
  234. package/dist/workspace/agent-profiles.js +115 -0
  235. package/dist/workspace/agent-profiles.js.map +1 -0
  236. package/dist/workspace/config.d.ts +82 -206
  237. package/dist/workspace/config.js +183 -14
  238. package/dist/workspace/config.js.map +1 -1
  239. package/dist/workspace/migrations.d.ts +1 -1
  240. package/dist/workspace/migrations.js +19 -4
  241. package/dist/workspace/migrations.js.map +1 -1
  242. package/dist/workspace/projects.d.ts +8 -2
  243. package/dist/workspace/projects.js +9 -3
  244. package/dist/workspace/projects.js.map +1 -1
  245. package/dist/workspace/semaphore.d.ts +45 -0
  246. package/dist/workspace/semaphore.js +45 -1
  247. package/dist/workspace/semaphore.js.map +1 -1
  248. package/dist/workspace/ui-state.d.ts +13 -3
  249. package/dist/workspace/ui-state.js +15 -5
  250. package/dist/workspace/ui-state.js.map +1 -1
  251. package/package.json +17 -39
  252. package/scripts/inline-contract.mjs +112 -0
  253. package/scripts/mock-claude.mjs +59 -1
  254. package/scripts/sync-readme.mjs +20 -0
  255. package/web/dist/assets/alert-dialog-LMDsWZ8t.js +1 -0
  256. package/web/dist/assets/arrow-down-CDJD8f8N.js +1 -0
  257. package/web/dist/assets/arrow-left-DUirK4gC.js +1 -0
  258. package/web/dist/assets/bundle-mjs-BT31bpU6.js +1 -0
  259. package/web/dist/assets/centered-state-CX0EhxaQ.js +43 -0
  260. package/web/dist/assets/chevron-right-B70aoBYh.js +1 -0
  261. package/web/dist/assets/{chunk-BO2N2NFS-DtrdTCWa.js → chunk-BO2N2NFS-DE6qKn3r.js} +8 -8
  262. package/web/dist/assets/circle-check-C6IhUojk.js +1 -0
  263. package/web/dist/assets/circle-x-hV9f6Ypp.js +1 -0
  264. package/web/dist/assets/collapsible-D2igywSh.js +1 -0
  265. package/web/dist/assets/commit-list-ocsM8XZs.js +1 -0
  266. package/web/dist/assets/compare-variants-CYdYsQBv.js +1 -0
  267. package/web/dist/assets/{core-DePtBHcl.js → core-BCsw8oQw.js} +1 -1
  268. package/web/dist/assets/diff-3y-HnHEH.js +3 -0
  269. package/web/dist/assets/diff-stat-OeTa1MCD.js +1 -0
  270. package/web/dist/assets/{diff-view-DCeSegKk.js → diff-view-D8VBKGxl.js} +4 -4
  271. package/web/dist/assets/dropdown-menu-B9UHiJFv.js +1 -0
  272. package/web/dist/assets/editable-title-C9aK-GCt.js +1 -0
  273. package/web/dist/assets/{ellipsis-vertical-CNnSLn5a.js → ellipsis-vertical-BVp0AyW4.js} +1 -1
  274. package/web/dist/assets/{file-D4GBh1ao.js → file-D1v6Cb9Q.js} +1 -1
  275. package/web/dist/assets/folder-HNaOtP70.js +1 -0
  276. package/web/dist/assets/{git-pull-request-DnR8Xh4_.js → git-pull-request-C6KuSF45.js} +1 -1
  277. package/web/dist/assets/git-toolbar-DpRPWLaM.js +1 -0
  278. package/web/dist/assets/github-UumAmuAM.js +1 -0
  279. package/web/dist/assets/highlighted-body-OFNGDK62-BL-MfFgl.js +1 -0
  280. package/web/dist/assets/highlighter-CdHqIwFr.js +3 -0
  281. package/web/dist/assets/image-preview-M1y8lBCU.js +1 -0
  282. package/web/dist/assets/index-BNgqhk51.js +6 -0
  283. package/web/dist/assets/index-De7KdVHL.css +2 -0
  284. package/web/dist/assets/lib-BQXq3kEf.js +1 -0
  285. package/web/dist/assets/lib-BxQXEXDF.js +1 -0
  286. package/web/dist/assets/markdown-DfljSy6W.js +2 -0
  287. package/web/dist/assets/mermaid-GHXKKRXX-C4jxqUUb.js +1 -0
  288. package/web/dist/assets/new-task-form-CkgsW8GC.js +1 -0
  289. package/web/dist/assets/pill-DWy7Dbv3.js +1 -0
  290. package/web/dist/assets/project-router-BJR_8pfk.js +1 -0
  291. package/web/dist/assets/prompt-templates-CKbMbly-.js +15 -0
  292. package/web/dist/assets/react-runtime-CCIEwYL0.js +9 -0
  293. package/web/dist/assets/{refresh-cw-BT8E96Tm.js → refresh-cw-Bs4wU0JM.js} +1 -1
  294. package/web/dist/assets/repo-git-CBbpvexr.js +1 -0
  295. package/web/dist/assets/rolldown-runtime-QTnfLwEv.js +1 -0
  296. package/web/dist/assets/run-diff-CzrO-R7P.js +3 -0
  297. package/web/dist/assets/run-header-BQDPFKUM.js +1 -0
  298. package/web/dist/assets/{search-x-BDjaMrzG.js → search-x-sxnYXz0H.js} +1 -1
  299. package/web/dist/assets/skill-empty-hint-CMfCEn9L.js +1 -0
  300. package/web/dist/assets/skills-BiWfHmCR.js +1 -0
  301. package/web/dist/assets/skills-DrG0KcAJ.js +1 -0
  302. package/web/dist/assets/sparkles-CL1cbhb_.js +1 -0
  303. package/web/dist/assets/{square-terminal-Ckjjn0vb.js → square-terminal-5JEPtGG-.js} +1 -1
  304. package/web/dist/assets/tab-link-DVT33Q2m.js +1 -0
  305. package/web/dist/assets/task-changes-BuuNjQ_C.js +1 -0
  306. package/web/dist/assets/task-commits-CVjZWXuP.js +1 -0
  307. package/web/dist/assets/task-files-f7USaQD1.js +2 -0
  308. package/web/dist/assets/task-thread-Cc7rMyer.js +9 -0
  309. package/web/dist/assets/textarea-BieGhkR-.js +1 -0
  310. package/web/dist/assets/thread-loading-CwfY_3r7.js +1 -0
  311. package/web/dist/assets/{trash-2-DAyZ0VSi.js → trash-2-Cmbuh3Q9.js} +1 -1
  312. package/web/dist/assets/{triangle-alert-Uy8rokUh.js → triangle-alert-dswtPk4F.js} +1 -1
  313. package/web/dist/assets/{upload-CDdyPPo_.js → upload-BY1qMAxW.js} +1 -1
  314. package/web/dist/assets/use-desktop-DrxT9b31.js +1 -0
  315. package/web/dist/assets/use-submit-shortcut-CULpfw9y.js +1 -0
  316. package/web/dist/assets/utils-C5bzdO9U.js +64 -0
  317. package/web/dist/assets/workflows-D6GsX0A9.js +11 -0
  318. package/web/dist/assets/zoomable-image-CEjRqsuW.js +1 -0
  319. package/web/dist/index.html +33 -13
  320. package/scripts/dev.mjs +0 -74
  321. package/scripts/release-snapshot.mjs +0 -130
  322. package/scripts/release.mjs +0 -119
  323. package/web/dist/assets/arrow-left-CnSdp92h.js +0 -1
  324. package/web/dist/assets/bundle-mjs-BegPhL5c.js +0 -1
  325. package/web/dist/assets/centered-state-DOsTcJZF.js +0 -43
  326. package/web/dist/assets/commit-list-BrxBEzRK.js +0 -1
  327. package/web/dist/assets/compare-variants-Bv2c9ORF.js +0 -1
  328. package/web/dist/assets/dist-B6XQOhgM.js +0 -1
  329. package/web/dist/assets/git-toolbar-pIC1ubPM.js +0 -1
  330. package/web/dist/assets/github-DTTSG0ht.js +0 -1
  331. package/web/dist/assets/highlighted-body-OFNGDK62-BuFJwunK.js +0 -1
  332. package/web/dist/assets/image-preview-DEhW0TFz.js +0 -1
  333. package/web/dist/assets/index-Cijmlz7q.js +0 -30
  334. package/web/dist/assets/index-DzroxqBG.css +0 -2
  335. package/web/dist/assets/lib-DPEZDBUN.js +0 -1
  336. package/web/dist/assets/lib-uHpeUPzK.js +0 -1
  337. package/web/dist/assets/mermaid-GHXKKRXX-CN2zQue0.js +0 -1
  338. package/web/dist/assets/open-mercato-toBr6SOa.svg +0 -11
  339. package/web/dist/assets/project-router-BMx4e8m-.js +0 -1
  340. package/web/dist/assets/repo-git-BusYfa3t.js +0 -1
  341. package/web/dist/assets/run-diff-wOJ3odA-.js +0 -3
  342. package/web/dist/assets/run-header-Cg5incil.js +0 -1
  343. package/web/dist/assets/skill-empty-hint-DTUSp6Vl.js +0 -1
  344. package/web/dist/assets/skills-PpP2owbM.js +0 -1
  345. package/web/dist/assets/tab-link-F3uQrdm2.js +0 -1
  346. package/web/dist/assets/task-changes-iD9kS79I.js +0 -1
  347. package/web/dist/assets/task-commits-COkLaUri.js +0 -1
  348. package/web/dist/assets/task-files-Ckttz7XH.js +0 -2
  349. package/web/dist/assets/task-thread-CQD91VPt.js +0 -9
  350. package/web/dist/assets/textarea-Bj_LCreg.js +0 -1
  351. package/web/dist/assets/use-desktop-DUh0STzq.js +0 -3
  352. package/web/dist/assets/utils-B8s5qIcK.js +0 -1
  353. package/web/dist/assets/workflows-BFk8C0co.js +0 -11
  354. package/web/dist/assets/zoomable-image-PEDOqyLQ.js +0 -1
  355. /package/web/{open-mercato.svg → dist/open-mercato.svg} +0 -0
package/README.md CHANGED
@@ -350,17 +350,19 @@ cezar projects remove api # drop the registry entry; the repo is untouch
350
350
  These read and write `~/.cezar/config.json` directly, so they work with the
351
351
  server stopped, and `CEZ_HOME` selects which workspace they operate on.
352
352
 
353
- Settings split along the same line: **Agents**, **Worktrees**, **Bookmarklets**,
354
- **Prompt templates** and **MCP** describe one repo and live under
355
- `/p/<projectId>/settings`; **Appearance**, **Notifications**, **Resources**,
356
- **Projects** and **Keyboard** are yours or the machine's and live at
357
- `/settings/global`.
358
-
359
- **Old URLs keep working.** Every unprefixed path — `/`, `/tasks/<id>`,
360
- `/settings`, and the whole `/api/…` surface still answers exactly as before,
361
- bound to the project cezar was started in; the cockpit redirects flat paths to
362
- their `/p/<boot>/…` twin. Existing bookmarks, bookmarklets and scripts need no
363
- change.
353
+ Settings split along the same line: **General** (the project's folder, its
354
+ registry facts, its parallel-task ceiling, and Remove), **Agents**,
355
+ **Worktrees**, **Bookmarklets**, **Prompt templates** and **MCP** describe one
356
+ repo and live under `/p/<projectId>/settings`; **Appearance**,
357
+ **Notifications**, **Resources**, **Projects** and **Keyboard** are yours or the
358
+ machine's and live at `/settings/global`.
359
+
360
+ **Old page URLs keep working.** Every unprefixed page path `/`, `/tasks/<id>`,
361
+ `/settings` — still answers, bound to the project cezar was started in; the
362
+ cockpit redirects flat paths to their `/p/<boot>/…` twin, so existing bookmarks
363
+ and bookmarklets need no change. The HTTP API is the exception: it moved to
364
+ `/api/v1/…` (see the CHANGELOG), so a script that calls it needs the extra
365
+ segment.
364
366
 
365
367
  > **Hosted cockpit?** The folder picker is confined to the independent browse
366
368
  > root. Set `CEZ_BROWSE_ROOT` narrowly before first boot (or save it in
@@ -426,15 +428,23 @@ Useful environment variables:
426
428
  | Var | Effect |
427
429
  |---|---|
428
430
  | `CEZ_DRY_RUN=1` | Use the bundled mock instead of the real `claude` CLI — the entire cockpit works offline, for demos and development. |
431
+ | `CEZ_AGENT_MODELS_LOCKED=1` | Globally lock each runner to the model configured in its native Claude/Codex/OpenCode settings while keeping runner selection available. Exact `1` also delegates authentication and provider enablement to those native agents, so Cezar skips its credential probes and provider-disable preferences. Existing Cezar presets are preserved but ignored, and an environment change requires a restart. The config-file equivalent is `"modelsLocked": true` in global `~/.cezar/config.json` or one repository's `.ai/cezar/config.json`; config-file locks do not disable provider checks. |
429
432
  | `CEZ_APPROVAL_GATE=1` | Opt into Claude's interactive approval UI; by default, unapproved tools are denied without interrupting the run. |
430
433
  | `CEZ_FOLLOWUPS=1` | Turn on the global follow-up **Inbox**: agents are asked to leave follow-ups in `todos.json` when they finish, and the Inbox view appears. Off by default — each task's own **Notes** handoff journal runs either way. |
431
434
  | `CEZ_AUTOSAVE=1` | Re-enable the periodic (90 s) autosave commit in task worktrees. Off by default (#471) — turn-end and pre-PR flushes always run, so branches still end complete. Every autosave names its trigger in the commit subject (`cezar autosave (periodic)` vs `(turn end)` / `(run finalize)` / `(pre-PR)`), so the flushes you keep are distinguishable from the timer you disabled. |
432
435
  | `CEZ_CLAUDE_BIN=/path/to/claude` | Override which `claude` binary is used. |
433
436
  | `CEZ_CODEX_BIN=/path/to/codex` | Override which `codex` binary is used. |
434
437
  | `CEZ_OPENCODE_BIN=/path/to/opencode` | Override which `opencode` binary is used. |
438
+ | `CLAUDE_CONFIG_DIR`, `CODEX_HOME` | The agents' **own** variables, honoured where the vendor documents one. Setting one moves that agent's **default account** — the config folder cezar discovers. A *second* login of the same CLI is deliberately not an environment setting, since one process-wide value cannot differ per project: add it under **Settings → Agent accounts** and pick it per project. |
435
439
  | `CEZ_BROWSE_ROOT=~/` | Default root for **Add project → Open local folder…**. The picker cannot navigate above it; a saved workspace value overrides the environment default and must name an existing folder. |
436
440
  | `CEZ_PROJECTS_DIR=~/cezar/projects` | Default destination for **Clone from GitHub**. Saved workspace settings override it, and missing directories are created recursively. |
441
+ | `CEZ_SKILLS_AUTO_UPDATE=0` | Disable automatic checks and updates for upstream-CLI-tracked Open Mercato skill installations. On by default; a saved global Skills setting overrides this environment default. Checks are delayed, bounded, cached, and non-blocking. |
442
+ | `CEZ_AUTONOMOUS_DEFAULT=0` | Seed the New Task Autonomous default (`0` or `1`). Without a seed, skills default on and workflows off; a saved global Resources setting overrides it. |
443
+ | `CEZ_WORKTREE_DEFAULT=1` | Seed the New Task Worktree default (`0` or `1`). Without a seed, eligible runs default on; a saved global Resources setting overrides it. |
437
444
  | `CEZ_SINGLE_PROJECT=1` | Opt into a launch-project-only cockpit: only the exact value `1` enables it. Project add, edit, checkout, folder browsing, and removal are refused and only the launch project is shown. Off by default; stored registry rows are retained, so unsetting it and restarting restores the full multi-project workspace without migration or data loss. |
445
+ | `CEZ_HIDE_TOKEN_USAGE=1` | Hide raw input/output token counts throughout the browser cockpit while leaving backend-reported cost visible. Only the exact value `1` enables it; telemetry and API payloads are unchanged, and a restart is required after changing it. |
446
+ | `CEZ_HIDE_COST=1` | Hide backend-reported monetary cost throughout the browser cockpit while leaving raw input/output token counts visible. Only the exact value `1` enables it; telemetry and API payloads are unchanged, and a restart is required after changing it. |
447
+ | `CEZ_HIDE_TOKEN_METRICS=1` | Legacy master switch that hides both token usage and cost. It takes precedence over the two independent flags; only the exact value `1` enables it, payloads are unchanged, and a restart is required. |
438
448
  | `GITHUB_TOKEN` | Fallback for GitHub reads/PRs when `gh` isn't authenticated. |
439
449
  | `CEZ_ENV_PASSTHROUGH=A,B` | Forward these extra host env vars to spawned agents. By default agents get a least-privilege env (safe shell/toolchain vars + the backend's own auth + `GITHUB_TOKEN` + `CEZ_*`), not your full environment — use this to add a var an agent needs. |
440
450
  | `CEZ_AGENT_ENV_FULL=1` | Escape hatch: give spawned agents the full host environment (pre-hardening behavior). Off by default; only set it if you understand that this hands every host secret to the agent process. |
@@ -443,6 +453,7 @@ Useful environment variables:
443
453
  | `CEZ_AUTONAME=0` | Disable ALL LLM task naming (creation + live) — titles stay heuristic (`437: /om-auto-review-pr`). Under `CEZ_DRY_RUN=1` naming is already off unless forced with `CEZ_AUTONAME=1`. |
444
454
  | `CEZ_REVIEW_GATE=1` | Turn ON the optional diff-first review gate (#489): a successful, non-autonomous run with changes parks at `review` (Accept / Send back / Draft PR) instead of finishing. Off by default — changed runs settle to `done` with the diff left in the worktree. Only `1` enables. The Settings → Agents toggle overrides this; autonomous runs always skip it. |
445
455
  | `CEZ_NO_BANNER=1` | Skip the `open-mercato/skills` banner on `cezar serve` startup. (The cockpit no longer shows a banner — its skills now live on the Skills page's Manage panel — so this env var is the terminal banner's only switch.) |
456
+ | `VITE_CEZ_API_BASE=http://localhost:4321` | **Build time only**, and only when the cockpit bundle is deployed apart from the service it talks to. Empty (the default) means "the origin that served this page", which is right for both normal cases: the CLI serves the bundle itself, and `npm run dev` proxies `/api` to the local service. A deployment that must be configured without a rebuild can put `<meta name="cez-api-base" content="…">` in the served HTML instead, which wins over this. |
446
457
 
447
458
  ---
448
459
 
@@ -494,7 +505,7 @@ Parallel variants (×2/×3) of one task share that task's backend — mixing
494
505
  happens per task and per step, not inside a variant group.
495
506
 
496
507
  The seam is deliberately small: a backend is one class implementing the
497
- `AgentRunner` interface (`src/core/agent-runner.ts`) that turns a prompt into
508
+ `AgentRunner` interface (`packages/cezar/src/core/agent-runner.ts`) that turns a prompt into
498
509
  a stream of normalized events. Other CLIs — pi, aider, whatever ships next —
499
510
  can slot in the same way.
500
511
 
@@ -563,11 +574,19 @@ never blocks startup):
563
574
  // exactly that commit, and reports it as `team.commit`.
564
575
  "worktreeRetention": 10, // keep the last N finished worktrees on disk; 0 = unlimited (branch always kept)
565
576
  "defaultRunner": "claude", // agent backend: "claude" (default) · "codex" · "opencode"
577
+ "modelsLocked": true, // optional: native per-runner model is fixed/read-only; runner stays selectable
566
578
  "plannerModel": "sonnet", // model the "Plan first" button uses to draft chains
567
579
  "baseBranch": "develop" // branch worktrees fork from + PRs target (also settable in the Git tab)
568
580
  }
569
581
  ```
570
582
 
583
+ Put the same `"modelsLocked": true` key in `~/.cezar/config.json` to apply it
584
+ to every registered project. When the key is absent or `false` in both config
585
+ files (and `CEZ_AGENT_MODELS_LOCKED` is not `1`), each runner's normal model
586
+ selector uses that runner's discovered model list. While locked, the model is
587
+ shown read-only and follows the selected runner's native settings; the runner
588
+ itself remains selectable.
589
+
571
590
  Run data (`runs.json`, NDJSON event logs, worktrees, `todos.json`) is
572
591
  git-ignored automatically; your workflows and skills stay committable.
573
592
 
@@ -610,8 +629,8 @@ cd cezar
610
629
  npm install
611
630
  ```
612
631
 
613
- **3. Build** — compiles the server (`tsc → dist/`) and the cockpit
614
- (`vite build → web/dist/`), then runs the pack gate:
632
+ **3. Build** — compiles the api-client and the server (`tsc → packages/cezar/dist/`) and the cockpit
633
+ (`vite build → packages/cezar/web/dist/`), then runs the pack gate:
615
634
 
616
635
  ```bash
617
636
  npm run build
@@ -663,9 +682,9 @@ npm run uninstall-as-command # removes cezar / cez / cezar-cli (either flavor
663
682
 
664
683
  ```bash
665
684
  npm run dev # server (API :4321) + Vite dev server, opens the cockpit in the browser
666
- npm run dev:server # tsx src/index.ts — the API server alone
685
+ npm run dev:server # tsx packages/cezar/src/index.ts — the API server alone
667
686
  npm run dev:web # Vite dev server alone (proxies /api to :4321)
668
- npm run build # tsc → dist/, vite build → web/dist/, then the pack gate
687
+ npm run build # tsc → packages/cezar/dist/, vite build → packages/cezar/web/dist/, then the pack gate
669
688
  npm run typecheck # server + web (tsc --noEmit)
670
689
  npm test # vitest — server + cockpit unit suites
671
690
  npm run test:unit # node:test — fast core-module tests
@@ -675,7 +694,7 @@ npm run test:e2e # real-browser cockpit suite (agent-browser)
675
694
 
676
695
  The stack is deliberately small: **TypeScript** (strict, ESM), **Hono** + SSE for
677
696
  the server, **Zod** at every boundary, **YAML** for workflows, and a **React 19 +
678
- Vite + Tailwind v4 + shadcn/ui** cockpit shipped pre-built in `web/dist/` — the
697
+ Vite + Tailwind v4 + shadcn/ui** cockpit shipped pre-built in `packages/cezar/web/dist/` — the
679
698
  published package carries the built app, so `npx` users never run a bundler.
680
699
  Every module is meant to be read in one sitting.
681
700
 
@@ -0,0 +1,44 @@
1
+ import type { ProviderId } from '../core/provider-auth.ts';
2
+ /**
3
+ * Who an agent account is logged in AS — the "Show details" read (spec
4
+ * `2026-07-29-agent-profiles.md`).
5
+ *
6
+ * This is the second place vendor knowledge lives about an agent's home, beside
7
+ * `catalog.ts` (which config FILES exist) and `core/agent-profiles.ts` (which env var relocates
8
+ * the home). This one knows where each agent writes its own identity. Facts verified against the
9
+ * files on disk 2026-07-29; re-verify before changing them.
10
+ *
11
+ * ## Two rules that are not negotiable
12
+ *
13
+ * 1. **Named fields only, never pass-through.** `~/.codex/auth.json` holds `OPENAI_API_KEY`,
14
+ * `access_token` and `refresh_token` right beside the identity claims. Every reader below picks
15
+ * fields by name and builds a fresh object; nothing here spreads, forwards or stringifies a
16
+ * parsed vendor object, so a key the vendor adds tomorrow cannot leak through. The JWT is read
17
+ * for its CLAIMS and its signature is never a credential we hold onto.
18
+ * 2. **Read on demand, answered to exactly one route.** This never joins the accounts listing,
19
+ * never enters `runs.json` or the NDJSON, and is never logged. `provider-auth.ts` keeps account
20
+ * identity out of its own boundary on purpose; this is the deliberate, opt-in exception —
21
+ * localHandoff-gated, and only when the user asks for it — not a widening of that rule.
22
+ */
23
+ /** One labelled row, as the pane renders it. Deliberately not a fixed per-provider shape: what an
24
+ * agent knows about its own login differs, and inventing an empty "Organization" for one that has
25
+ * no concept of it would be a worse answer than omitting the row. */
26
+ export interface AccountIdentityField {
27
+ label: string;
28
+ value: string;
29
+ }
30
+ export interface AccountIdentity {
31
+ /** False when there is nothing to show — not signed in, no file, or a file we cannot parse. */
32
+ available: boolean;
33
+ /** Why, in the user's terms, when `available` is false. */
34
+ reason?: string;
35
+ fields: AccountIdentityField[];
36
+ }
37
+ /**
38
+ * What this account is logged in as, or an honest reason there is nothing to show.
39
+ *
40
+ * Never throws. OpenCode answers "unsupported": its credentials live in a SQLite DB outside the
41
+ * config dir (see `core/agent-profiles.ts`), so there is nothing in a config folder to read — and
42
+ * guessing from the default login would attribute one account's identity to another.
43
+ */
44
+ export declare function readAccountIdentity(provider: ProviderId, configDir: string): Promise<AccountIdentity>;
@@ -0,0 +1,128 @@
1
+ import { readFile } from 'node:fs/promises';
2
+ import { join } from 'node:path';
3
+ import { claudeStateFilePath } from '../paths.js';
4
+ /** `.claude.json` can carry per-project history; cap the read like `readUserMcpServers` does. */
5
+ const READ_CAP = 2 * 1024 * 1024;
6
+ const NOT_SIGNED_IN = 'Not signed in on this account yet — use Connect.';
7
+ const UNREADABLE = 'Could not read this account’s details.';
8
+ /** Read a JSON file under the cap. `null` for absent, unreadable, oversized or malformed. */
9
+ async function readJsonCapped(path) {
10
+ try {
11
+ const raw = await readFile(path, 'utf8');
12
+ if (raw.length > READ_CAP)
13
+ return null;
14
+ const parsed = JSON.parse(raw);
15
+ return parsed && typeof parsed === 'object' ? parsed : null;
16
+ }
17
+ catch {
18
+ return null;
19
+ }
20
+ }
21
+ /** A non-empty display string, or undefined — so a blank vendor value never renders as an empty row. */
22
+ function text(value) {
23
+ if (typeof value === 'string' && value.trim() !== '')
24
+ return value.trim();
25
+ if (typeof value === 'number' && Number.isFinite(value))
26
+ return String(value);
27
+ return undefined;
28
+ }
29
+ /** Push a row only when the value is really there. */
30
+ function push(fields, label, value) {
31
+ const shown = text(value);
32
+ if (shown !== undefined)
33
+ fields.push({ label, value: shown });
34
+ }
35
+ /**
36
+ * Claude Code keeps its login in `.claude.json`'s `oauthAccount` — a *sibling* of `~/.claude` by
37
+ * default, but INSIDE an overridden config dir (`claudeStateFilePath` owns that rule, and getting
38
+ * it wrong is how one account reports another's email).
39
+ */
40
+ async function readClaudeIdentity(configDir) {
41
+ const state = await readJsonCapped(claudeStateFilePath(configDir));
42
+ if (state === null)
43
+ return { available: false, reason: NOT_SIGNED_IN, fields: [] };
44
+ const account = state.oauthAccount;
45
+ if (!account || typeof account !== 'object') {
46
+ return { available: false, reason: NOT_SIGNED_IN, fields: [] };
47
+ }
48
+ const a = account;
49
+ const fields = [];
50
+ push(fields, 'Email', a.emailAddress);
51
+ push(fields, 'Name', a.displayName);
52
+ push(fields, 'Organization', a.organizationName);
53
+ push(fields, 'Role', a.organizationRole);
54
+ // `seatTier`/`billingType` are the closest thing to a plan the file states; neither is
55
+ // documented, so they are shown under a label that promises no more than they are.
56
+ push(fields, 'Seat', a.seatTier);
57
+ push(fields, 'Billing', a.billingType);
58
+ return fields.length > 0
59
+ ? { available: true, fields }
60
+ : { available: false, reason: UNREADABLE, fields: [] };
61
+ }
62
+ /**
63
+ * Codex keeps its login in `auth.json`'s `id_token` — a JWT whose payload carries the identity
64
+ * claims. Read for its claims only: the same file holds `OPENAI_API_KEY`, `access_token` and
65
+ * `refresh_token`, none of which this function so much as names.
66
+ *
67
+ * The signature is NOT verified, and that is correct here: this is a local file the user's own CLI
68
+ * wrote, read to display who they are — not a token cezar is accepting as proof of anything.
69
+ */
70
+ async function readCodexIdentity(configDir) {
71
+ const auth = await readJsonCapped(join(configDir, 'auth.json'));
72
+ if (auth === null)
73
+ return { available: false, reason: NOT_SIGNED_IN, fields: [] };
74
+ const tokens = auth.tokens;
75
+ const idToken = tokens && typeof tokens === 'object'
76
+ ? tokens.id_token
77
+ : undefined;
78
+ const fields = [];
79
+ const claims = typeof idToken === 'string' ? decodeJwtClaims(idToken) : null;
80
+ if (claims !== null) {
81
+ push(fields, 'Email', claims.email);
82
+ push(fields, 'Name', claims.name);
83
+ const openai = claims['https://api.openai.com/auth'];
84
+ if (openai && typeof openai === 'object') {
85
+ push(fields, 'Plan', openai.chatgpt_plan_type);
86
+ }
87
+ }
88
+ // An API-key login has no id_token at all — say which kind of login this is rather than
89
+ // reporting "not signed in" for an account that is perfectly usable.
90
+ if (fields.length === 0 && typeof auth.OPENAI_API_KEY === 'string' && auth.OPENAI_API_KEY !== '') {
91
+ return { available: true, fields: [{ label: 'Login', value: 'API key' }] };
92
+ }
93
+ return fields.length > 0
94
+ ? { available: true, fields }
95
+ : { available: false, reason: NOT_SIGNED_IN, fields: [] };
96
+ }
97
+ /** A JWT's payload claims, or null when it is not a readable three-part token. */
98
+ function decodeJwtClaims(token) {
99
+ const parts = token.split('.');
100
+ if (parts.length !== 3 || !parts[1])
101
+ return null;
102
+ try {
103
+ const parsed = JSON.parse(Buffer.from(parts[1], 'base64url').toString('utf8'));
104
+ return parsed && typeof parsed === 'object' ? parsed : null;
105
+ }
106
+ catch {
107
+ return null;
108
+ }
109
+ }
110
+ /**
111
+ * What this account is logged in as, or an honest reason there is nothing to show.
112
+ *
113
+ * Never throws. OpenCode answers "unsupported": its credentials live in a SQLite DB outside the
114
+ * config dir (see `core/agent-profiles.ts`), so there is nothing in a config folder to read — and
115
+ * guessing from the default login would attribute one account's identity to another.
116
+ */
117
+ export async function readAccountIdentity(provider, configDir) {
118
+ if (provider === 'claude')
119
+ return readClaudeIdentity(configDir);
120
+ if (provider === 'codex')
121
+ return readCodexIdentity(configDir);
122
+ return {
123
+ available: false,
124
+ reason: 'OpenCode keeps its login outside its config folder, so cezar cannot read it.',
125
+ fields: [],
126
+ };
127
+ }
128
+ //# sourceMappingURL=account-identity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account-identity.js","sourceRoot":"","sources":["../../src/agent-config/account-identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAwClD,iGAAiG;AACjG,MAAM,QAAQ,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AAEjC,MAAM,aAAa,GAAG,kDAAkD,CAAC;AACzE,MAAM,UAAU,GAAG,wCAAwC,CAAC;AAE5D,6FAA6F;AAC7F,KAAK,UAAU,cAAc,CAAC,IAAY;IACxC,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACzC,IAAI,GAAG,CAAC,MAAM,GAAG,QAAQ;YAAE,OAAO,IAAI,CAAC;QACvC,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxC,OAAO,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAE,MAAkC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC3F,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,wGAAwG;AACxG,SAAS,IAAI,CAAC,KAAc;IAC1B,IAAI,OAA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ACxF,OAAO,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAE,MAAkC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC3F,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,QAAoB,EACpB,SAAiB;IAEjB,IAAI,QAAQ,KAAK,QAAQ;QAAE,OAAO,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAChE,IAAI,QAAQ,KAAK,OAAO;QAAE,OAAO,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC9D,OAAO;QACL,SAAS,EAAE,KAAK;QAChB,MAAM,EAAE,8EAA8E;QACtF,MAAM,EAAE,EAAE;KACX,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { RunnerId } from '../core/agent-runner.js';
1
+ import type { RunnerId } from '../core/agent-runner.ts';
2
2
  /**
3
3
  * The catalog of coding-agent config files cezar can surface and edit (spec
4
4
  * `.ai/specs/2026-07-16-agent-config-files.md`). This file is the ONLY place
@@ -47,6 +47,14 @@ export interface ConfigFileDef {
47
47
  seeded?: boolean;
48
48
  /** True when this file holds MCP server definitions (drives the MCP section's filter). */
49
49
  holdsMcp?: boolean;
50
+ /** Top-level native setting that supplies the agent's new-session model, when present. */
51
+ modelKey?: string;
52
+ /** Native model keys checked in precedence order, including nested `env.*` settings. */
53
+ modelKeys?: readonly string[];
54
+ /** Native provider key paired with the model, when the vendor separates the two. */
55
+ modelProviderKey?: string;
56
+ /** Higher values win when resolving a native default model across config scopes. */
57
+ modelPriority?: number;
50
58
  /** VERBATIM from the vendor docs. Never computed, never generic. */
51
59
  precedence: string;
52
60
  /** Documented mid-run reload behaviour, or undefined when the vendor is silent. */
@@ -21,6 +21,9 @@ export const CONFIG_FILES = [
21
21
  label: '~/.claude/settings.json',
22
22
  format: 'json',
23
23
  tracked: 'outside-repo',
24
+ modelKey: 'model',
25
+ modelKeys: ['env.ANTHROPIC_MODEL', 'model'],
26
+ modelPriority: 1,
24
27
  precedence: 'Lowest priority. Project and local settings override it key by key — except permission rules, which merge across all scopes.',
25
28
  hotReload: 'Edits to most keys — including permissions and hooks — apply to a running session without a restart.',
26
29
  docsUrl: CLAUDE_SETTINGS_DOCS,
@@ -34,6 +37,9 @@ export const CONFIG_FILES = [
34
37
  label: '.claude/settings.json',
35
38
  format: 'json',
36
39
  tracked: 'tracked',
40
+ modelKey: 'model',
41
+ modelKeys: ['env.ANTHROPIC_MODEL', 'model'],
42
+ modelPriority: 2,
37
43
  precedence: 'Overrides user settings key by key (permission rules merge). Local settings override this.',
38
44
  hotReload: 'Edits to most keys — including permissions and hooks — apply to a running session without a restart.',
39
45
  docsUrl: CLAUDE_SETTINGS_DOCS,
@@ -48,6 +54,9 @@ export const CONFIG_FILES = [
48
54
  format: 'json',
49
55
  tracked: 'gitignored',
50
56
  seeded: true,
57
+ modelKey: 'model',
58
+ modelKeys: ['env.ANTHROPIC_MODEL', 'model'],
59
+ modelPriority: 3,
51
60
  precedence: 'Highest of the file scopes — overrides project and user (permission rules merge). Git-ignored; copied into each run’s worktree so it takes effect immediately.',
52
61
  hotReload: 'Edits to most keys — including permissions and hooks — apply to a running session without a restart.',
53
62
  docsUrl: CLAUDE_SETTINGS_DOCS,
@@ -113,6 +122,9 @@ export const CONFIG_FILES = [
113
122
  format: 'toml',
114
123
  tracked: 'outside-repo',
115
124
  holdsMcp: true,
125
+ modelKey: 'model',
126
+ modelProviderKey: 'model_provider',
127
+ modelPriority: 1,
116
128
  precedence: 'User-level defaults. A trusted project’s .codex/config.toml overrides these; some keys (provider, auth, telemetry) cannot be overridden at project scope. MCP servers live here under [mcp_servers.<id>].',
117
129
  docsUrl: CODEX_CONFIG_DOCS,
118
130
  },
@@ -125,6 +137,8 @@ export const CONFIG_FILES = [
125
137
  label: '.codex/config.toml',
126
138
  format: 'toml',
127
139
  tracked: 'tracked',
140
+ modelKey: 'model',
141
+ modelPriority: 2,
128
142
  holdsMcp: true,
129
143
  precedence: 'Applies only in projects you have trusted. Some keys (provider, auth, telemetry) cannot be overridden here. MCP servers go under [mcp_servers.<id>]. Runs read the committed copy.',
130
144
  docsUrl: CODEX_CONFIG_DOCS,
@@ -152,6 +166,8 @@ export const CONFIG_FILES = [
152
166
  format: 'jsonc',
153
167
  tracked: 'outside-repo',
154
168
  holdsMcp: true,
169
+ modelKey: 'model',
170
+ modelPriority: 1,
155
171
  precedence: 'Global config. Merged with the project config, not replaced — later configs override earlier ones only for conflicting keys. MCP servers live under the "mcp" key.',
156
172
  docsUrl: OPENCODE_CONFIG_DOCS,
157
173
  },
@@ -165,6 +181,8 @@ export const CONFIG_FILES = [
165
181
  format: 'jsonc',
166
182
  tracked: 'tracked',
167
183
  holdsMcp: true,
184
+ modelKey: 'model',
185
+ modelPriority: 2,
168
186
  precedence: 'Merged over the global config per conflicting key (not a wholesale replace). MCP servers live under the "mcp" key. Runs read the committed copy.',
169
187
  docsUrl: OPENCODE_CONFIG_DOCS,
170
188
  },
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/agent-config/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AA6DjC,MAAM,oBAAoB,GAAG,0CAA0C,CAAC;AACxE,MAAM,kBAAkB,GAAG,wCAAwC,CAAC;AACpE,MAAM,eAAe,GAAG,qCAAqC,CAAC;AAC9D,MAAM,iBAAiB,GAAG,sDAAsD,CAAC;AACjF,MAAM,iBAAiB,GAAG,sDAAsD,CAAC;AACjF,MAAM,oBAAoB,GAAG,kCAAkC,CAAC;AAChE,MAAM,mBAAmB,GAAG,iCAAiC,CAAC;AAE9D;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAoB;IAC3C,wBAAwB;IACxB;QACE,EAAE,EAAE,sBAAsB;QAC1B,OAAO,EAAE,CAAC,QAAQ,CAAC;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UAAU,EACR,mHAAmH;QACrH,OAAO,EAAE,mBAAmB;KAC7B;IAED,wEAAwE;IACxE;QACE,EAAE,EAAE,gBAAgB;QACpB,OAAO,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC;QAC9B,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC;QAC1C,KAAK,EAAE,WAAW;QAClB,MAAM,EAAE,UAAU;QAClB,OAAO,EAAE,SAAS;QAClB,UAAU,EACR,6KAA6K;QAC/K,OAAO,EAAE,mBAAmB;KAC7B;CACF,CAAC;AAEF,yBAAyB;AACzB,MAAM,UAAU,eAAe;IAC7B,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,cAAc,CAAC,EAAU;IACvC,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AAC/C,CAAC"}
@@ -1,4 +1,4 @@
1
- import { type ConfigFileDef } from './catalog.js';
1
+ import { type ConfigFileDef } from './catalog.ts';
2
2
  /**
3
3
  * Read and write the coding agents' own config files, addressed by catalog id
4
4
  * (never by a client-supplied path, so traversal is impossible by
@@ -0,0 +1,2 @@
1
+ import type { AgentModelSettingsStrategy } from './types.ts';
2
+ export declare const claudeModelSettingsStrategy: AgentModelSettingsStrategy;
@@ -0,0 +1,11 @@
1
+ import { firstConfiguredModel, readNativeSettingsFiles } from './shared.js';
2
+ export const claudeModelSettingsStrategy = {
3
+ runner: 'claude',
4
+ async read(repoRoot, env) {
5
+ // Claude Code gives ANTHROPIC_MODEL higher priority than settings files.
6
+ if (env.ANTHROPIC_MODEL?.trim())
7
+ return { model: env.ANTHROPIC_MODEL.trim() };
8
+ return { model: firstConfiguredModel(await readNativeSettingsFiles('claude', repoRoot, env)) };
9
+ },
10
+ };
11
+ //# sourceMappingURL=claude.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude.js","sourceRoot":"","sources":["../../../src/agent-config/model-settings/claude.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAG5E,MAAM,CAAC,MAAM,2BAA2B,GAA+B;IACrE,MAAM,EAAE,QAAQ;IAChB,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG;QACtB,yEAAyE;QACzE,IAAI,GAAG,CAAC,eAAe,EAAE,IAAI,EAAE;YAAE,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE,EAAE,CAAC;QAC9E,OAAO,EAAE,KAAK,EAAE,oBAAoB,CAAC,MAAM,uBAAuB,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC;IACjG,CAAC;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { AgentModelSettingsStrategy } from './types.ts';
2
+ export declare const codexModelSettingsStrategy: AgentModelSettingsStrategy;
@@ -0,0 +1,16 @@
1
+ import { firstConfiguredModel, firstConfiguredProvider, readNativeSettingsFiles, } from './shared.js';
2
+ export const codexModelSettingsStrategy = {
3
+ runner: 'codex',
4
+ async read(repoRoot, env) {
5
+ const files = await readNativeSettingsFiles('codex', repoRoot, env);
6
+ const provider = firstConfiguredProvider(files);
7
+ const model = firstConfiguredModel(files);
8
+ return {
9
+ ...(model
10
+ ? { model: provider && provider !== 'openai' && !model.includes('/') ? `${provider}/${model}` : model }
11
+ : {}),
12
+ ...(provider ? { provider } : {}),
13
+ };
14
+ },
15
+ };
16
+ //# sourceMappingURL=codex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex.js","sourceRoot":"","sources":["../../../src/agent-config/model-settings/codex.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAGrB,MAAM,CAAC,MAAM,0BAA0B,GAA+B;IACpE,MAAM,EAAE,OAAO;IACf,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG;QACtB,MAAM,KAAK,GAAG,MAAM,uBAAuB,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;QACpE,MAAM,QAAQ,GAAG,uBAAuB,CAAC,KAAK,CAAC,CAAC;QAChD,MAAM,KAAK,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;QAC1C,OAAO;YACL,GAAG,CAAC,KAAK;gBACP,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,IAAI,QAAQ,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE;gBACvG,CAAC,CAAC,EAAE,CAAC;YACP,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAClC,CAAC;IACJ,CAAC;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { AgentModelSettingsStrategy } from './types.ts';
2
+ export declare const opencodeModelSettingsStrategy: AgentModelSettingsStrategy;
@@ -0,0 +1,8 @@
1
+ import { firstConfiguredModel, readNativeSettingsFiles } from './shared.js';
2
+ export const opencodeModelSettingsStrategy = {
3
+ runner: 'opencode',
4
+ async read(repoRoot, env) {
5
+ return { model: firstConfiguredModel(await readNativeSettingsFiles('opencode', repoRoot, env)) };
6
+ },
7
+ };
8
+ //# sourceMappingURL=opencode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../../src/agent-config/model-settings/opencode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAG5E,MAAM,CAAC,MAAM,6BAA6B,GAA+B;IACvE,MAAM,EAAE,UAAU;IAClB,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG;QACtB,OAAO,EAAE,KAAK,EAAE,oBAAoB,CAAC,MAAM,uBAAuB,CAAC,UAAU,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC;IACnG,CAAC;CACF,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { RunnerId } from '../../core/agent-runner.ts';
2
+ import { type ConfigFileDef } from '../catalog.ts';
3
+ export interface NativeSettingsFile {
4
+ def: ConfigFileDef;
5
+ content: string;
6
+ }
7
+ export declare function readNativeSettingsFiles(runner: RunnerId, repoRoot: string, env: NodeJS.ProcessEnv): Promise<NativeSettingsFile[]>;
8
+ export declare function firstConfiguredModel(files: readonly NativeSettingsFile[]): string | undefined;
9
+ export declare function firstConfiguredProvider(files: readonly NativeSettingsFile[]): string | undefined;
@@ -0,0 +1,93 @@
1
+ import { parse as parseToml } from 'smol-toml';
2
+ import { CONFIG_FILES } from '../catalog.js';
3
+ import { readConfigFile } from '../files.js';
4
+ import { stripJsonComments } from '../validate.js';
5
+ /** Remove JSONC trailing commas without touching commas inside string values. */
6
+ function stripJsonTrailingCommas(input) {
7
+ let out = '';
8
+ let inString = false;
9
+ let escaped = false;
10
+ for (let index = 0; index < input.length; index++) {
11
+ const character = input[index];
12
+ if (inString) {
13
+ out += character;
14
+ if (escaped)
15
+ escaped = false;
16
+ else if (character === '\\')
17
+ escaped = true;
18
+ else if (character === '"')
19
+ inString = false;
20
+ continue;
21
+ }
22
+ if (character === '"') {
23
+ inString = true;
24
+ out += character;
25
+ continue;
26
+ }
27
+ if (character === ',') {
28
+ let next = index + 1;
29
+ while (/\s/.test(input[next] ?? ''))
30
+ next++;
31
+ if (input[next] === '}' || input[next] === ']')
32
+ continue;
33
+ }
34
+ out += character;
35
+ }
36
+ return out;
37
+ }
38
+ function valueAtPath(value, path) {
39
+ return path.split('.').reduce((current, segment) => {
40
+ if (!current || typeof current !== 'object' || Array.isArray(current))
41
+ return undefined;
42
+ return current[segment];
43
+ }, value);
44
+ }
45
+ function parseConfigContent(content, format) {
46
+ return format === 'toml'
47
+ ? parseToml(content)
48
+ : JSON.parse(format === 'jsonc' ? stripJsonTrailingCommas(stripJsonComments(content)) : content);
49
+ }
50
+ function stringAtPath(content, format, path) {
51
+ try {
52
+ const value = valueAtPath(parseConfigContent(content, format), path);
53
+ return typeof value === 'string' && value.trim() ? value.trim() : undefined;
54
+ }
55
+ catch {
56
+ return undefined;
57
+ }
58
+ }
59
+ export async function readNativeSettingsFiles(runner, repoRoot, env) {
60
+ const definitions = CONFIG_FILES.filter((definition) => definition.kind === 'settings' &&
61
+ definition.runners.includes(runner) &&
62
+ definition.modelKey !== undefined &&
63
+ definition.modelPriority !== undefined).sort((left, right) => (right.modelPriority ?? 0) - (left.modelPriority ?? 0));
64
+ const files = [];
65
+ for (const definition of definitions) {
66
+ const file = await readConfigFile(definition.id, repoRoot, env);
67
+ if (!file || 'error' in file || !file.exists)
68
+ continue;
69
+ files.push({ def: definition, content: file.content });
70
+ }
71
+ return files;
72
+ }
73
+ export function firstConfiguredModel(files) {
74
+ for (const { def, content } of files) {
75
+ for (const key of def.modelKeys ?? [def.modelKey]) {
76
+ const model = stringAtPath(content, def.format, key);
77
+ if (model)
78
+ return model;
79
+ }
80
+ }
81
+ return undefined;
82
+ }
83
+ export function firstConfiguredProvider(files) {
84
+ for (const { def, content } of files) {
85
+ if (!def.modelProviderKey)
86
+ continue;
87
+ const provider = stringAtPath(content, def.format, def.modelProviderKey);
88
+ if (provider)
89
+ return provider;
90
+ }
91
+ return undefined;
92
+ }
93
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/agent-config/model-settings/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,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GAAG,CAAC,gBAAgB;YAAE,SAAS;QACpC,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;QACzE,IAAI,QAAQ;YAAE,OAAO,QAAQ,CAAC;IAChC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { RunnerId } from '../../core/agent-runner.ts';
2
+ export interface AgentModelSettings {
3
+ model?: string;
4
+ provider?: string;
5
+ }
6
+ export interface AgentModelSettingsStrategy {
7
+ readonly runner: RunnerId;
8
+ read(repoRoot: string, env: NodeJS.ProcessEnv): Promise<AgentModelSettings>;
9
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/agent-config/model-settings/types.ts"],"names":[],"mappings":""}