@open-mercato/cezar 0.9.1 → 0.9.2-pr778.1064
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.
- package/README.md +29 -11
- package/dist/agent-config/account-identity.d.ts +44 -0
- package/dist/agent-config/account-identity.js +128 -0
- package/dist/agent-config/account-identity.js.map +1 -0
- package/dist/agent-config/catalog.d.ts +9 -1
- package/dist/agent-config/catalog.js +18 -0
- package/dist/agent-config/catalog.js.map +1 -1
- package/dist/agent-config/files.d.ts +1 -1
- package/dist/agent-config/model-settings/claude.d.ts +2 -0
- package/dist/agent-config/model-settings/claude.js +11 -0
- package/dist/agent-config/model-settings/claude.js.map +1 -0
- package/dist/agent-config/model-settings/codex.d.ts +2 -0
- package/dist/agent-config/model-settings/codex.js +16 -0
- package/dist/agent-config/model-settings/codex.js.map +1 -0
- package/dist/agent-config/model-settings/opencode.d.ts +2 -0
- package/dist/agent-config/model-settings/opencode.js +8 -0
- package/dist/agent-config/model-settings/opencode.js.map +1 -0
- package/dist/agent-config/model-settings/shared.d.ts +9 -0
- package/dist/agent-config/model-settings/shared.js +93 -0
- package/dist/agent-config/model-settings/shared.js.map +1 -0
- package/dist/agent-config/model-settings/types.d.ts +9 -0
- package/dist/agent-config/model-settings/types.js +2 -0
- package/dist/agent-config/model-settings/types.js.map +1 -0
- package/dist/agent-config/models.d.ts +9 -0
- package/dist/agent-config/models.js +30 -0
- package/dist/agent-config/models.js.map +1 -0
- package/dist/agent-config/service.d.ts +1 -1
- package/dist/agent-config/service.js +4 -4
- package/dist/agent-config/service.js.map +1 -1
- package/dist/agent-config/validate.d.ts +1 -1
- package/dist/automations/coordinator.d.ts +26 -0
- package/dist/automations/coordinator.js +66 -0
- package/dist/automations/coordinator.js.map +1 -0
- package/dist/automations/github-poller.d.ts +74 -0
- package/dist/automations/github-poller.js +234 -0
- package/dist/automations/github-poller.js.map +1 -0
- package/dist/automations/scheduler.d.ts +42 -0
- package/dist/automations/scheduler.js +192 -0
- package/dist/automations/scheduler.js.map +1 -0
- package/dist/automations/store.d.ts +65 -0
- package/dist/automations/store.js +298 -0
- package/dist/automations/store.js.map +1 -0
- package/dist/automations/task-template.d.ts +18 -0
- package/dist/automations/task-template.js +95 -0
- package/dist/automations/task-template.js.map +1 -0
- package/dist/automations/types.d.ts +251 -0
- package/dist/automations/types.js +158 -0
- package/dist/automations/types.js.map +1 -0
- package/dist/config.d.ts +17 -112
- package/dist/config.js +45 -4
- package/dist/config.js.map +1 -1
- package/dist/contract/agent-config.d.ts +151 -0
- package/dist/contract/agent-profiles.d.ts +332 -0
- package/dist/contract/automations.d.ts +919 -0
- package/dist/contract/events.d.ts +45 -0
- package/dist/contract/github.d.ts +467 -0
- package/dist/contract/health.d.ts +96 -0
- package/dist/contract/index.d.ts +16 -0
- package/dist/contract/index.js +1604 -0
- package/dist/contract/projects.d.ts +185 -0
- package/dist/contract/repo.d.ts +234 -0
- package/dist/contract/runs.d.ts +1261 -0
- package/dist/contract/skills.d.ts +229 -0
- package/dist/contract/workflows.d.ts +212 -0
- package/dist/contract/workspace.d.ts +472 -0
- package/dist/core/agent-env.d.ts +1 -1
- package/dist/core/agent-model-policy.d.ts +10 -0
- package/dist/core/agent-model-policy.js +36 -0
- package/dist/core/agent-model-policy.js.map +1 -0
- package/dist/core/agent-profiles.d.ts +59 -0
- package/dist/core/agent-profiles.js +83 -0
- package/dist/core/agent-profiles.js.map +1 -0
- package/dist/core/agent-runner.d.ts +12 -1
- package/dist/core/agent-runner.js +13 -0
- package/dist/core/agent-runner.js.map +1 -1
- package/dist/core/ask.d.ts +45 -124
- package/dist/core/ask.js +103 -13
- package/dist/core/ask.js.map +1 -1
- package/dist/core/backend-detect.js +7 -2
- package/dist/core/backend-detect.js.map +1 -1
- package/dist/core/claude-cli-runner.d.ts +2 -2
- package/dist/core/claude-cli-runner.js +52 -9
- package/dist/core/claude-cli-runner.js.map +1 -1
- package/dist/core/claude-ui-mapper.d.ts +1 -1
- package/dist/core/codex-app-server-runner.d.ts +1 -1
- package/dist/core/codex-app-server-runner.js +60 -3
- package/dist/core/codex-app-server-runner.js.map +1 -1
- package/dist/core/codex-app-server-transport.d.ts +6 -1
- package/dist/core/codex-app-server-transport.js +12 -3
- package/dist/core/codex-app-server-transport.js.map +1 -1
- package/dist/core/codex-model-catalog.d.ts +1 -1
- package/dist/core/codex-ui-mapper.d.ts +5 -1
- package/dist/core/codex-ui-mapper.js +74 -17
- package/dist/core/codex-ui-mapper.js.map +1 -1
- package/dist/core/model-identity.d.ts +13 -6
- package/dist/core/model-identity.js +32 -17
- package/dist/core/model-identity.js.map +1 -1
- package/dist/core/model-presets.d.ts +2 -2
- package/dist/core/model-presets.js +1 -1
- package/dist/core/opencode-server-runner.d.ts +2 -2
- package/dist/core/opencode-ui-mapper.d.ts +4 -1
- package/dist/core/opencode-ui-mapper.js +45 -7
- package/dist/core/opencode-ui-mapper.js.map +1 -1
- package/dist/core/provider-auth.d.ts +154 -0
- package/dist/core/provider-auth.js +488 -0
- package/dist/core/provider-auth.js.map +1 -0
- package/dist/core/provider-availability.d.ts +3 -0
- package/dist/core/provider-availability.js +14 -0
- package/dist/core/provider-availability.js.map +1 -0
- package/dist/core/runner-factory.d.ts +1 -1
- package/dist/core/runner-model-catalog.d.ts +1 -1
- package/dist/core/shell-env.d.ts +28 -0
- package/dist/core/shell-env.js +56 -0
- package/dist/core/shell-env.js.map +1 -0
- package/dist/core/tool-display.d.ts +1 -1
- package/dist/core/ui-events.d.ts +1 -1
- package/dist/core/ui-events.js +1 -1
- package/dist/core/usage-limit.d.ts +42 -0
- package/dist/core/usage-limit.js +209 -0
- package/dist/core/usage-limit.js.map +1 -0
- package/dist/git-diff-base.d.ts +60 -0
- package/dist/git-diff-base.js +54 -0
- package/dist/git-diff-base.js.map +1 -0
- package/dist/git-worktree.d.ts +37 -6
- package/dist/git-worktree.js +39 -9
- package/dist/git-worktree.js.map +1 -1
- package/dist/handoff.d.ts +2 -2
- package/dist/handoff.js +1 -1
- package/dist/index.js +65 -8
- package/dist/index.js.map +1 -1
- package/dist/paths.d.ts +69 -6
- package/dist/paths.js +86 -9
- package/dist/paths.js.map +1 -1
- package/dist/planner.d.ts +2 -2
- package/dist/planner.js +7 -1
- package/dist/planner.js.map +1 -1
- package/dist/release/manifests.d.ts +81 -0
- package/dist/release/manifests.js +74 -0
- package/dist/release/manifests.js.map +1 -0
- package/dist/release/snapshot.d.ts +9 -23
- package/dist/release/snapshot.js +9 -22
- package/dist/release/snapshot.js.map +1 -1
- package/dist/release/stable.d.ts +15 -29
- package/dist/release/stable.js +14 -27
- package/dist/release/stable.js.map +1 -1
- package/dist/runs/auto-name.d.ts +1 -1
- package/dist/runs/auto-name.js +6 -1
- package/dist/runs/auto-name.js.map +1 -1
- package/dist/runs/retention.d.ts +1 -1
- package/dist/runs/store.d.ts +149 -336
- package/dist/runs/store.js +187 -9
- package/dist/runs/store.js.map +1 -1
- package/dist/runs/ui-event-sink.d.ts +1 -1
- package/dist/server/app-type.d.ts +21 -0
- package/dist/server/app-type.js +2 -0
- package/dist/server/app-type.js.map +1 -0
- package/dist/server/capabilities.d.ts +6 -5
- package/dist/server/capabilities.js +11 -0
- package/dist/server/capabilities.js.map +1 -1
- package/dist/server/forge/github.d.ts +58 -151
- package/dist/server/forge/github.js +530 -6
- package/dist/server/forge/github.js.map +1 -1
- package/dist/server/forge/index.d.ts +10 -3
- package/dist/server/forge/index.js +14 -1
- package/dist/server/forge/index.js.map +1 -1
- package/dist/server/forge/types.d.ts +86 -1
- package/dist/server/git-changes.d.ts +8 -8
- package/dist/server/git-changes.js +14 -17
- package/dist/server/git-changes.js.map +1 -1
- package/dist/server/git.d.ts +2 -0
- package/dist/server/git.js +9 -0
- package/dist/server/git.js.map +1 -1
- package/dist/server/github.d.ts +3 -3
- package/dist/server/github.js +1 -1
- package/dist/server/github.js.map +1 -1
- package/dist/server/open-in-terminal.d.ts +8 -1
- package/dist/server/open-in-terminal.js +16 -8
- package/dist/server/open-in-terminal.js.map +1 -1
- package/dist/server/pr.d.ts +2 -2
- package/dist/server/project-context.d.ts +20 -3
- package/dist/server/project-context.js +30 -1
- package/dist/server/project-context.js.map +1 -1
- package/dist/server/provider-action-gate.d.ts +8 -0
- package/dist/server/provider-action-gate.js +54 -0
- package/dist/server/provider-action-gate.js.map +1 -0
- package/dist/server/provider-auth-runtime.d.ts +21 -0
- package/dist/server/provider-auth-runtime.js +66 -0
- package/dist/server/provider-auth-runtime.js.map +1 -0
- package/dist/server/server.d.ts +12052 -47
- package/dist/server/server.js +2626 -918
- package/dist/server/server.js.map +1 -1
- package/dist/server/validators.d.ts +97 -0
- package/dist/server/validators.js +86 -0
- package/dist/server/validators.js.map +1 -0
- package/dist/server/ws.d.ts +2 -2
- package/dist/server/ws.js +2 -2
- package/dist/server/ws.js.map +1 -1
- package/dist/server-install/engine.d.ts +1 -1
- package/dist/server-install/platforms/macosx-ngrok.d.ts +1 -1
- package/dist/server-install/platforms/ubuntu-vps.d.ts +16 -1
- package/dist/server-install/platforms/ubuntu-vps.js +83 -1
- package/dist/server-install/platforms/ubuntu-vps.js.map +1 -1
- package/dist/server-install/state.d.ts +1 -1
- package/dist/server-install/steps.d.ts +2 -2
- package/dist/server-install/strategies.d.ts +1 -1
- package/dist/server-install/types.d.ts +38 -424
- package/dist/server-install/ui.d.ts +1 -1
- package/dist/skills-banner.d.ts +7 -6
- package/dist/skills-banner.js +7 -6
- package/dist/skills-banner.js.map +1 -1
- package/dist/skills-remote.d.ts +2 -2
- package/dist/skills-update.d.ts +88 -0
- package/dist/skills-update.js +392 -0
- package/dist/skills-update.js.map +1 -0
- package/dist/skills.d.ts +2 -0
- package/dist/skills.js +7 -2
- package/dist/skills.js.map +1 -1
- package/dist/todos.d.ts +2 -28
- package/dist/todos.js +1 -1
- package/dist/ui-state.d.ts +16 -2
- package/dist/ui-state.js +14 -1
- package/dist/ui-state.js.map +1 -1
- package/dist/workflows/load.d.ts +1 -1
- package/dist/workflows/run.d.ts +238 -12
- package/dist/workflows/run.js +1103 -115
- package/dist/workflows/run.js.map +1 -1
- package/dist/workflows/types.d.ts +59 -224
- package/dist/workflows/types.js +14 -0
- package/dist/workflows/types.js.map +1 -1
- package/dist/workspace/agent-accounts.d.ts +149 -0
- package/dist/workspace/agent-accounts.js +303 -0
- package/dist/workspace/agent-accounts.js.map +1 -0
- package/dist/workspace/agent-profiles.d.ts +78 -0
- package/dist/workspace/agent-profiles.js +115 -0
- package/dist/workspace/agent-profiles.js.map +1 -0
- package/dist/workspace/config.d.ts +82 -206
- package/dist/workspace/config.js +183 -14
- package/dist/workspace/config.js.map +1 -1
- package/dist/workspace/migrations.d.ts +1 -1
- package/dist/workspace/migrations.js +19 -4
- package/dist/workspace/migrations.js.map +1 -1
- package/dist/workspace/projects.d.ts +8 -2
- package/dist/workspace/projects.js +9 -3
- package/dist/workspace/projects.js.map +1 -1
- package/dist/workspace/semaphore.d.ts +45 -0
- package/dist/workspace/semaphore.js +45 -1
- package/dist/workspace/semaphore.js.map +1 -1
- package/dist/workspace/ui-state.d.ts +13 -3
- package/dist/workspace/ui-state.js +15 -5
- package/dist/workspace/ui-state.js.map +1 -1
- package/package.json +17 -39
- package/scripts/inline-contract.mjs +112 -0
- package/scripts/mock-claude.mjs +59 -1
- package/scripts/sync-readme.mjs +20 -0
- package/web/dist/assets/alert-dialog-DDkrFSNo.js +1 -0
- package/web/dist/assets/arrow-down-6yITIPsm.js +1 -0
- package/web/dist/assets/arrow-left-ClFtONFn.js +1 -0
- package/web/dist/assets/bundle-mjs-BT31bpU6.js +1 -0
- package/web/dist/assets/centered-state-B6eNyY9K.js +43 -0
- package/web/dist/assets/chevron-right-DU1ld4lK.js +1 -0
- package/web/dist/assets/{chunk-BO2N2NFS-DtrdTCWa.js → chunk-BO2N2NFS-DE6qKn3r.js} +8 -8
- package/web/dist/assets/circle-check-CrpGUTuT.js +1 -0
- package/web/dist/assets/circle-x-BswQ4rx0.js +1 -0
- package/web/dist/assets/collapsible-Cv8ki6G4.js +1 -0
- package/web/dist/assets/commit-list-Bwor0g70.js +1 -0
- package/web/dist/assets/compare-variants-BA3qQSVU.js +1 -0
- package/web/dist/assets/{core-DePtBHcl.js → core-BCsw8oQw.js} +1 -1
- package/web/dist/assets/diff-CV5qDJ7S.js +3 -0
- package/web/dist/assets/diff-stat-C96SW0xK.js +1 -0
- package/web/dist/assets/{diff-view-DCeSegKk.js → diff-view-9Qw79-f1.js} +4 -4
- package/web/dist/assets/dropdown-menu-Bnk-hg8y.js +1 -0
- package/web/dist/assets/editable-title-veprAEpy.js +1 -0
- package/web/dist/assets/{ellipsis-vertical-CNnSLn5a.js → ellipsis-vertical-C8LP-M9x.js} +1 -1
- package/web/dist/assets/{file-D4GBh1ao.js → file-DnCwXidV.js} +1 -1
- package/web/dist/assets/folder-BBBuunLT.js +1 -0
- package/web/dist/assets/{git-pull-request-DnR8Xh4_.js → git-pull-request-BuHs3KJ6.js} +1 -1
- package/web/dist/assets/git-toolbar-CPt4JoOj.js +1 -0
- package/web/dist/assets/github-Cz2tagoB.js +1 -0
- package/web/dist/assets/highlighted-body-OFNGDK62-BL-MfFgl.js +1 -0
- package/web/dist/assets/highlighter-CdHqIwFr.js +3 -0
- package/web/dist/assets/image-preview-B-UiFJKd.js +1 -0
- package/web/dist/assets/index-B84F80Q8.css +2 -0
- package/web/dist/assets/index-CkXaC99i.js +6 -0
- package/web/dist/assets/lib-BQXq3kEf.js +1 -0
- package/web/dist/assets/lib-BxQXEXDF.js +1 -0
- package/web/dist/assets/markdown-B0APBJCK.js +2 -0
- package/web/dist/assets/mermaid-GHXKKRXX-C4jxqUUb.js +1 -0
- package/web/dist/assets/new-task-form-BjNLkW4w.js +1 -0
- package/web/dist/assets/pill-DF3ZRiuk.js +1 -0
- package/web/dist/assets/project-router-DMinES4q.js +1 -0
- package/web/dist/assets/prompt-templates-CKnyW-ae.js +15 -0
- package/web/dist/assets/react-runtime-CCIEwYL0.js +9 -0
- package/web/dist/assets/{refresh-cw-BT8E96Tm.js → refresh-cw-BTiJYD2N.js} +1 -1
- package/web/dist/assets/repo-git-BovGLcYW.js +1 -0
- package/web/dist/assets/rolldown-runtime-QTnfLwEv.js +1 -0
- package/web/dist/assets/run-diff-BVWjG5af.js +3 -0
- package/web/dist/assets/run-header-CEr8j77z.js +1 -0
- package/web/dist/assets/{search-x-BDjaMrzG.js → search-x--hctwQW4.js} +1 -1
- package/web/dist/assets/skill-empty-hint-DXlK1qF5.js +1 -0
- package/web/dist/assets/skills-BiWfHmCR.js +1 -0
- package/web/dist/assets/skills-DpxiSJPs.js +1 -0
- package/web/dist/assets/sparkles-BSB94GWf.js +1 -0
- package/web/dist/assets/{square-terminal-Ckjjn0vb.js → square-terminal-DI9vN2oU.js} +1 -1
- package/web/dist/assets/tab-link-xE17QWo3.js +1 -0
- package/web/dist/assets/task-changes-DzQ0clq-.js +1 -0
- package/web/dist/assets/task-commits-BRvrT2AH.js +1 -0
- package/web/dist/assets/task-files-Bw84_sPi.js +2 -0
- package/web/dist/assets/task-thread-BT4gX0y6.js +9 -0
- package/web/dist/assets/textarea-CxwpSdn4.js +1 -0
- package/web/dist/assets/thread-loading-lFlqLRN5.js +1 -0
- package/web/dist/assets/{trash-2-DAyZ0VSi.js → trash-2-COvilYIt.js} +1 -1
- package/web/dist/assets/{triangle-alert-Uy8rokUh.js → triangle-alert-BVqzlcpl.js} +1 -1
- package/web/dist/assets/{upload-CDdyPPo_.js → upload-Ctrt-DXu.js} +1 -1
- package/web/dist/assets/use-desktop-BzoSqrBi.js +1 -0
- package/web/dist/assets/use-submit-shortcut-C-M46aas.js +1 -0
- package/web/dist/assets/utils-Dfe0KwV2.js +64 -0
- package/web/dist/assets/workflows-B1wIdn-o.js +11 -0
- package/web/dist/assets/zoomable-image-D0J9qb-_.js +1 -0
- package/web/dist/index.html +33 -13
- package/scripts/dev.mjs +0 -74
- package/scripts/release-snapshot.mjs +0 -130
- package/scripts/release.mjs +0 -119
- package/web/dist/assets/arrow-left-CnSdp92h.js +0 -1
- package/web/dist/assets/bundle-mjs-BegPhL5c.js +0 -1
- package/web/dist/assets/centered-state-DOsTcJZF.js +0 -43
- package/web/dist/assets/commit-list-BrxBEzRK.js +0 -1
- package/web/dist/assets/compare-variants-Bv2c9ORF.js +0 -1
- package/web/dist/assets/dist-B6XQOhgM.js +0 -1
- package/web/dist/assets/git-toolbar-pIC1ubPM.js +0 -1
- package/web/dist/assets/github-DTTSG0ht.js +0 -1
- package/web/dist/assets/highlighted-body-OFNGDK62-BuFJwunK.js +0 -1
- package/web/dist/assets/image-preview-DEhW0TFz.js +0 -1
- package/web/dist/assets/index-Cijmlz7q.js +0 -30
- package/web/dist/assets/index-DzroxqBG.css +0 -2
- package/web/dist/assets/lib-DPEZDBUN.js +0 -1
- package/web/dist/assets/lib-uHpeUPzK.js +0 -1
- package/web/dist/assets/mermaid-GHXKKRXX-CN2zQue0.js +0 -1
- package/web/dist/assets/open-mercato-toBr6SOa.svg +0 -11
- package/web/dist/assets/project-router-BMx4e8m-.js +0 -1
- package/web/dist/assets/repo-git-BusYfa3t.js +0 -1
- package/web/dist/assets/run-diff-wOJ3odA-.js +0 -3
- package/web/dist/assets/run-header-Cg5incil.js +0 -1
- package/web/dist/assets/skill-empty-hint-DTUSp6Vl.js +0 -1
- package/web/dist/assets/skills-PpP2owbM.js +0 -1
- package/web/dist/assets/tab-link-F3uQrdm2.js +0 -1
- package/web/dist/assets/task-changes-iD9kS79I.js +0 -1
- package/web/dist/assets/task-commits-COkLaUri.js +0 -1
- package/web/dist/assets/task-files-Ckttz7XH.js +0 -2
- package/web/dist/assets/task-thread-CQD91VPt.js +0 -9
- package/web/dist/assets/textarea-Bj_LCreg.js +0 -1
- package/web/dist/assets/use-desktop-DUh0STzq.js +0 -3
- package/web/dist/assets/utils-B8s5qIcK.js +0 -1
- package/web/dist/assets/workflows-BFk8C0co.js +0 -11
- package/web/dist/assets/zoomable-image-PEDOqyLQ.js +0 -1
- /package/web/{open-mercato.svg → dist/open-mercato.svg} +0 -0
package/README.md
CHANGED
|
@@ -356,11 +356,12 @@ Settings split along the same line: **Agents**, **Worktrees**, **Bookmarklets**,
|
|
|
356
356
|
**Projects** and **Keyboard** are yours or the machine's and live at
|
|
357
357
|
`/settings/global`.
|
|
358
358
|
|
|
359
|
-
**Old URLs keep working.** Every unprefixed path — `/`, `/tasks/<id>`,
|
|
360
|
-
`/settings
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
359
|
+
**Old page URLs keep working.** Every unprefixed page path — `/`, `/tasks/<id>`,
|
|
360
|
+
`/settings` — still answers, bound to the project cezar was started in; the
|
|
361
|
+
cockpit redirects flat paths to their `/p/<boot>/…` twin, so existing bookmarks
|
|
362
|
+
and bookmarklets need no change. The HTTP API is the exception: it moved to
|
|
363
|
+
`/api/v1/…` (see the CHANGELOG), so a script that calls it needs the extra
|
|
364
|
+
segment.
|
|
364
365
|
|
|
365
366
|
> **Hosted cockpit?** The folder picker is confined to the independent browse
|
|
366
367
|
> root. Set `CEZ_BROWSE_ROOT` narrowly before first boot (or save it in
|
|
@@ -426,15 +427,23 @@ Useful environment variables:
|
|
|
426
427
|
| Var | Effect |
|
|
427
428
|
|---|---|
|
|
428
429
|
| `CEZ_DRY_RUN=1` | Use the bundled mock instead of the real `claude` CLI — the entire cockpit works offline, for demos and development. |
|
|
430
|
+
| `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
431
|
| `CEZ_APPROVAL_GATE=1` | Opt into Claude's interactive approval UI; by default, unapproved tools are denied without interrupting the run. |
|
|
430
432
|
| `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
433
|
| `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
434
|
| `CEZ_CLAUDE_BIN=/path/to/claude` | Override which `claude` binary is used. |
|
|
433
435
|
| `CEZ_CODEX_BIN=/path/to/codex` | Override which `codex` binary is used. |
|
|
434
436
|
| `CEZ_OPENCODE_BIN=/path/to/opencode` | Override which `opencode` binary is used. |
|
|
437
|
+
| `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
438
|
| `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
439
|
| `CEZ_PROJECTS_DIR=~/cezar/projects` | Default destination for **Clone from GitHub**. Saved workspace settings override it, and missing directories are created recursively. |
|
|
440
|
+
| `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. |
|
|
441
|
+
| `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. |
|
|
442
|
+
| `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
443
|
| `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. |
|
|
444
|
+
| `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. |
|
|
445
|
+
| `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. |
|
|
446
|
+
| `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
447
|
| `GITHUB_TOKEN` | Fallback for GitHub reads/PRs when `gh` isn't authenticated. |
|
|
439
448
|
| `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
449
|
| `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 +452,7 @@ Useful environment variables:
|
|
|
443
452
|
| `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
453
|
| `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
454
|
| `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.) |
|
|
455
|
+
| `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
456
|
|
|
447
457
|
---
|
|
448
458
|
|
|
@@ -494,7 +504,7 @@ Parallel variants (×2/×3) of one task share that task's backend — mixing
|
|
|
494
504
|
happens per task and per step, not inside a variant group.
|
|
495
505
|
|
|
496
506
|
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
|
|
507
|
+
`AgentRunner` interface (`packages/cezar/src/core/agent-runner.ts`) that turns a prompt into
|
|
498
508
|
a stream of normalized events. Other CLIs — pi, aider, whatever ships next —
|
|
499
509
|
can slot in the same way.
|
|
500
510
|
|
|
@@ -563,11 +573,19 @@ never blocks startup):
|
|
|
563
573
|
// exactly that commit, and reports it as `team.commit`.
|
|
564
574
|
"worktreeRetention": 10, // keep the last N finished worktrees on disk; 0 = unlimited (branch always kept)
|
|
565
575
|
"defaultRunner": "claude", // agent backend: "claude" (default) · "codex" · "opencode"
|
|
576
|
+
"modelsLocked": true, // optional: native per-runner model is fixed/read-only; runner stays selectable
|
|
566
577
|
"plannerModel": "sonnet", // model the "Plan first" button uses to draft chains
|
|
567
578
|
"baseBranch": "develop" // branch worktrees fork from + PRs target (also settable in the Git tab)
|
|
568
579
|
}
|
|
569
580
|
```
|
|
570
581
|
|
|
582
|
+
Put the same `"modelsLocked": true` key in `~/.cezar/config.json` to apply it
|
|
583
|
+
to every registered project. When the key is absent or `false` in both config
|
|
584
|
+
files (and `CEZ_AGENT_MODELS_LOCKED` is not `1`), each runner's normal model
|
|
585
|
+
selector uses that runner's discovered model list. While locked, the model is
|
|
586
|
+
shown read-only and follows the selected runner's native settings; the runner
|
|
587
|
+
itself remains selectable.
|
|
588
|
+
|
|
571
589
|
Run data (`runs.json`, NDJSON event logs, worktrees, `todos.json`) is
|
|
572
590
|
git-ignored automatically; your workflows and skills stay committable.
|
|
573
591
|
|
|
@@ -610,8 +628,8 @@ cd cezar
|
|
|
610
628
|
npm install
|
|
611
629
|
```
|
|
612
630
|
|
|
613
|
-
**3. Build** — compiles the server (`tsc → dist/`) and the cockpit
|
|
614
|
-
(`vite build → web/dist/`), then runs the pack gate:
|
|
631
|
+
**3. Build** — compiles the api-client and the server (`tsc → packages/cezar/dist/`) and the cockpit
|
|
632
|
+
(`vite build → packages/cezar/web/dist/`), then runs the pack gate:
|
|
615
633
|
|
|
616
634
|
```bash
|
|
617
635
|
npm run build
|
|
@@ -663,9 +681,9 @@ npm run uninstall-as-command # removes cezar / cez / cezar-cli (either flavor
|
|
|
663
681
|
|
|
664
682
|
```bash
|
|
665
683
|
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
|
|
684
|
+
npm run dev:server # tsx packages/cezar/src/index.ts — the API server alone
|
|
667
685
|
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
|
|
686
|
+
npm run build # tsc → packages/cezar/dist/, vite build → packages/cezar/web/dist/, then the pack gate
|
|
669
687
|
npm run typecheck # server + web (tsc --noEmit)
|
|
670
688
|
npm test # vitest — server + cockpit unit suites
|
|
671
689
|
npm run test:unit # node:test — fast core-module tests
|
|
@@ -675,7 +693,7 @@ npm run test:e2e # real-browser cockpit suite (agent-browser)
|
|
|
675
693
|
|
|
676
694
|
The stack is deliberately small: **TypeScript** (strict, ESM), **Hono** + SSE for
|
|
677
695
|
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
|
|
696
|
+
Vite + Tailwind v4 + shadcn/ui** cockpit shipped pre-built in `packages/cezar/web/dist/` — the
|
|
679
697
|
published package carries the built app, so `npx` users never run a bundler.
|
|
680
698
|
Every module is meant to be read in one sitting.
|
|
681
699
|
|
|
@@ -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;AAE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|
/**
|
|
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;
|
|
1
|
+
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/agent-config/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAqEjC,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,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,kJAAkJ;QACpJ,OAAO,EAAE,oBAAoB;KAC9B;IACD;QACE,EAAE,EAAE,sBAAsB;QAC1B,OAAO,EAAE,CAAC,UAAU,CAAC;QACrB,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,MAAM;QACb,OAAO,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,WAAW,CAAC;QAChE,KAAK,EAAE,8BAA8B;QACrC,MAAM,EAAE,UAAU;QAClB,OAAO,EAAE,cAAc;QACvB,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"}
|
|
@@ -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,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,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,YAAY,EAAyC,MAAM,eAAe,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAOnD,iFAAiF;AACjF,SAAS,uBAAuB,CAAC,KAAa;IAC5C,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,IAAI,QAAQ,GAAG,KAAK,CAAC;IAC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
|
|
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 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/agent-config/model-settings/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type RunnerId } from '../core/agent-runner.ts';
|
|
2
|
+
import type { AgentModelSettings } from './model-settings/types.ts';
|
|
3
|
+
/** The model defaults exposed by the coding agents' own settings files. */
|
|
4
|
+
export type AgentModelDefaults = Partial<Record<RunnerId, string>>;
|
|
5
|
+
export declare function readAgentModelSettings(runner: RunnerId, repoRoot: string, env?: NodeJS.ProcessEnv): Promise<AgentModelSettings>;
|
|
6
|
+
/** Read the current default model for each installed/configured coding agent. */
|
|
7
|
+
export declare function readAgentModelDefaults(repoRoot: string, env?: NodeJS.ProcessEnv): Promise<AgentModelDefaults>;
|
|
8
|
+
/** Read the provider that the agent itself will use for a bare model id. */
|
|
9
|
+
export declare function readAgentModelProvider(runner: RunnerId, repoRoot: string, env?: NodeJS.ProcessEnv): Promise<string | undefined>;
|