@open-mercato/cezar 0.9.2-pr820.1159 → 0.9.3
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 +5 -46
- package/dist/agent-config/catalog.d.ts +0 -8
- package/dist/agent-config/catalog.js +0 -18
- package/dist/agent-config/catalog.js.map +1 -1
- package/dist/agent-config/service.js +4 -4
- package/dist/agent-config/service.js.map +1 -1
- package/dist/config.d.ts +1 -8
- package/dist/config.js +4 -45
- package/dist/config.js.map +1 -1
- package/dist/contract/automations.d.ts +0 -8
- package/dist/contract/index.d.ts +0 -1
- package/dist/contract/index.js +94 -324
- package/dist/contract/projects.d.ts +0 -3
- package/dist/contract/runs.d.ts +0 -121
- package/dist/contract/skills.d.ts +0 -4
- package/dist/contract/workspace.d.ts +0 -48
- package/dist/core/agent-env.js +1 -16
- package/dist/core/agent-env.js.map +1 -1
- package/dist/core/backend-detect.js +2 -7
- package/dist/core/backend-detect.js.map +1 -1
- package/dist/core/codex-app-server-runner.js +0 -5
- package/dist/core/codex-app-server-runner.js.map +1 -1
- package/dist/core/model-identity.d.ts +5 -12
- package/dist/core/model-identity.js +17 -32
- package/dist/core/model-identity.js.map +1 -1
- package/dist/core/provider-auth.d.ts +2 -94
- package/dist/core/provider-auth.js +14 -212
- package/dist/core/provider-auth.js.map +1 -1
- package/dist/core/provider-availability.d.ts +1 -1
- package/dist/core/provider-availability.js +1 -2
- package/dist/core/provider-availability.js.map +1 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/paths.d.ts +5 -53
- package/dist/paths.js +9 -63
- package/dist/paths.js.map +1 -1
- package/dist/planner.js +0 -6
- package/dist/planner.js.map +1 -1
- package/dist/runs/auto-name.js +1 -6
- package/dist/runs/auto-name.js.map +1 -1
- package/dist/runs/store.d.ts +7 -41
- package/dist/runs/store.js +33 -117
- package/dist/runs/store.js.map +1 -1
- package/dist/server/open-in-terminal.d.ts +1 -29
- package/dist/server/open-in-terminal.js +13 -49
- package/dist/server/open-in-terminal.js.map +1 -1
- package/dist/server/server.d.ts +44 -1336
- package/dist/server/server.js +40 -956
- package/dist/server/server.js.map +1 -1
- package/dist/skills.js +0 -4
- package/dist/skills.js.map +1 -1
- package/dist/workflows/run.d.ts +2 -202
- package/dist/workflows/run.js +115 -782
- package/dist/workflows/run.js.map +1 -1
- package/dist/workspace/config.d.ts +0 -14
- package/dist/workspace/config.js +2 -41
- package/dist/workspace/config.js.map +1 -1
- package/dist/workspace/semaphore.d.ts +0 -39
- package/dist/workspace/semaphore.js +0 -31
- package/dist/workspace/semaphore.js.map +1 -1
- package/package.json +3 -3
- package/scripts/mock-claude.mjs +0 -20
- package/web/dist/assets/{alert-dialog-C5aKXola.js → alert-dialog-V9cigyAO.js} +1 -1
- package/web/dist/assets/arrow-down-DflHdNlN.js +1 -0
- package/web/dist/assets/arrow-left-IIL4uR-C.js +1 -0
- package/web/dist/assets/centered-state-BkAJVLJE.js +43 -0
- package/web/dist/assets/chevron-right-CxAoD1eD.js +1 -0
- package/web/dist/assets/circle-check-CdwcIbkx.js +1 -0
- package/web/dist/assets/{circle-x-DnhMmLIh.js → circle-x-Cnc43xJ2.js} +1 -1
- package/web/dist/assets/{collapsible-Cv14Op1V.js → collapsible-BlF-7CeC.js} +1 -1
- package/web/dist/assets/{commit-list-CHaY839F.js → commit-list-D2mKElUx.js} +1 -1
- package/web/dist/assets/{compare-variants-xY1GOJfe.js → compare-variants-CFBY16Rc.js} +1 -1
- package/web/dist/assets/{diff-BzWY7dRb.js → diff-DE6u5dTe.js} +2 -2
- package/web/dist/assets/{diff-stat-B8MNvQOB.js → diff-stat-B1j6L7C6.js} +1 -1
- package/web/dist/assets/{diff-view-DqXG6Bek.js → diff-view-Gb2kk3Le.js} +1 -1
- package/web/dist/assets/dropdown-menu-Ns-rY6sm.js +1 -0
- package/web/dist/assets/editable-title-BGuiDxFT.js +1 -0
- package/web/dist/assets/{ellipsis-vertical-ChkRfoVK.js → ellipsis-vertical-BbxtXb6s.js} +1 -1
- package/web/dist/assets/{file-cXHquZMt.js → file-j5O4NryU.js} +1 -1
- package/web/dist/assets/{folder-CwEU_wb0.js → folder-w9Lwj9x9.js} +1 -1
- package/web/dist/assets/{git-pull-request-B586NpZE.js → git-pull-request-DlSop3Ch.js} +1 -1
- package/web/dist/assets/git-toolbar-BdJ8XSxI.js +1 -0
- package/web/dist/assets/github-CCLn2OAU.js +1 -0
- package/web/dist/assets/{image-preview-DNIPh4Jt.js → image-preview-CcFdkZXW.js} +1 -1
- package/web/dist/assets/index-BmHHLbwc.js +6 -0
- package/web/dist/assets/index-u8OAnq0r.css +2 -0
- package/web/dist/assets/{markdown-CEdJQw0O.js → markdown-q9lm7kQ2.js} +1 -1
- package/web/dist/assets/new-task-form-BuYxAWN7.js +1 -0
- package/web/dist/assets/pill-t97MvPW_.js +1 -0
- package/web/dist/assets/{project-router-DyN3gb5D.js → project-router-DudOmkHf.js} +1 -1
- package/web/dist/assets/prompt-templates-C5iO3Lda.js +15 -0
- package/web/dist/assets/{refresh-cw-C9oetysY.js → refresh-cw-_C2EGJK5.js} +1 -1
- package/web/dist/assets/{repo-git-BxkcrlAG.js → repo-git-DqQzj33d.js} +1 -1
- package/web/dist/assets/{run-diff-B-KFvpc7.js → run-diff-BLoKEnTx.js} +2 -2
- package/web/dist/assets/run-header-Dho4eurS.js +1 -0
- package/web/dist/assets/{search-x-Bc6EBi8Q.js → search-x-BgxaJgro.js} +1 -1
- package/web/dist/assets/{skill-empty-hint-CIWGqZBa.js → skill-empty-hint-D5MOmycv.js} +1 -1
- package/web/dist/assets/skills-B5g064CC.js +1 -0
- package/web/dist/assets/{sparkles-BKeMsERe.js → sparkles-ANSka5bH.js} +1 -1
- package/web/dist/assets/{square-terminal-DEylVn1U.js → square-terminal-qojq20cH.js} +1 -1
- package/web/dist/assets/tab-link-CIcwFJtC.js +1 -0
- package/web/dist/assets/task-changes-yRfsEsnh.js +1 -0
- package/web/dist/assets/{task-commits-BVKwuZDP.js → task-commits-yXmDrCoE.js} +1 -1
- package/web/dist/assets/{task-files-CYC569Mb.js → task-files-BDRmCCPN.js} +2 -2
- package/web/dist/assets/task-thread-C9AnIz4Z.js +9 -0
- package/web/dist/assets/{textarea-kMozHr4E.js → textarea-DVO7pg8Y.js} +1 -1
- package/web/dist/assets/thread-loading-DJDl701Z.js +1 -0
- package/web/dist/assets/{trash-2-DVw4BStd.js → trash-2-DKcnmg6e.js} +1 -1
- package/web/dist/assets/{triangle-alert-AdCkFnoo.js → triangle-alert-CPUEVSZ3.js} +1 -1
- package/web/dist/assets/{upload-qHgd9Mii.js → upload-D5Jrq7QK.js} +1 -1
- package/web/dist/assets/{use-desktop-CJdk4Bq0.js → use-desktop-CXae6uyk.js} +1 -1
- package/web/dist/assets/{use-submit-shortcut-C9zw01ln.js → use-submit-shortcut-RKJLKdsW.js} +1 -1
- package/web/dist/assets/utils-Wtkd5E6j.js +64 -0
- package/web/dist/assets/{workflows-CaULw9uy.js → workflows-CGyTdyds.js} +3 -3
- package/web/dist/assets/{zoomable-image-DIijxnNj.js → zoomable-image-hcqwUIlQ.js} +1 -1
- package/web/dist/index.html +22 -23
- package/dist/agent-config/account-identity.d.ts +0 -44
- package/dist/agent-config/account-identity.js +0 -128
- package/dist/agent-config/account-identity.js.map +0 -1
- package/dist/agent-config/model-settings/claude.d.ts +0 -2
- package/dist/agent-config/model-settings/claude.js +0 -11
- package/dist/agent-config/model-settings/claude.js.map +0 -1
- package/dist/agent-config/model-settings/codex.d.ts +0 -2
- package/dist/agent-config/model-settings/codex.js +0 -16
- package/dist/agent-config/model-settings/codex.js.map +0 -1
- package/dist/agent-config/model-settings/opencode.d.ts +0 -2
- package/dist/agent-config/model-settings/opencode.js +0 -8
- package/dist/agent-config/model-settings/opencode.js.map +0 -1
- package/dist/agent-config/model-settings/shared.d.ts +0 -9
- package/dist/agent-config/model-settings/shared.js +0 -93
- package/dist/agent-config/model-settings/shared.js.map +0 -1
- package/dist/agent-config/model-settings/types.d.ts +0 -9
- package/dist/agent-config/model-settings/types.js +0 -2
- package/dist/agent-config/model-settings/types.js.map +0 -1
- package/dist/agent-config/models.d.ts +0 -9
- package/dist/agent-config/models.js +0 -30
- package/dist/agent-config/models.js.map +0 -1
- package/dist/contract/agent-profiles.d.ts +0 -332
- package/dist/core/agent-model-policy.d.ts +0 -10
- package/dist/core/agent-model-policy.js +0 -36
- package/dist/core/agent-model-policy.js.map +0 -1
- package/dist/core/agent-profiles.d.ts +0 -59
- package/dist/core/agent-profiles.js +0 -83
- package/dist/core/agent-profiles.js.map +0 -1
- package/dist/core/shell-env.d.ts +0 -28
- package/dist/core/shell-env.js +0 -56
- package/dist/core/shell-env.js.map +0 -1
- package/dist/core/usage-limit.d.ts +0 -42
- package/dist/core/usage-limit.js +0 -209
- package/dist/core/usage-limit.js.map +0 -1
- package/dist/runs/agent-tmpdir.d.ts +0 -41
- package/dist/runs/agent-tmpdir.js +0 -183
- package/dist/runs/agent-tmpdir.js.map +0 -1
- package/dist/runs/run-index.d.ts +0 -19
- package/dist/runs/run-index.js +0 -43
- package/dist/runs/run-index.js.map +0 -1
- package/dist/workspace/agent-accounts.d.ts +0 -149
- package/dist/workspace/agent-accounts.js +0 -303
- package/dist/workspace/agent-accounts.js.map +0 -1
- package/dist/workspace/agent-profiles.d.ts +0 -78
- package/dist/workspace/agent-profiles.js +0 -115
- package/dist/workspace/agent-profiles.js.map +0 -1
- package/web/dist/assets/arrow-down-fAG9sdOu.js +0 -1
- package/web/dist/assets/arrow-left-EnCCWx_d.js +0 -1
- package/web/dist/assets/centered-state-B3RG9aIF.js +0 -43
- package/web/dist/assets/chevron-right-VXLir8YK.js +0 -1
- package/web/dist/assets/circle-check-Bg-lnIox.js +0 -1
- package/web/dist/assets/dropdown-menu-Wyy_f28G.js +0 -1
- package/web/dist/assets/editable-title-DWAMZIXG.js +0 -1
- package/web/dist/assets/git-toolbar-CBwc7kh8.js +0 -1
- package/web/dist/assets/github-CXawp2c2.js +0 -1
- package/web/dist/assets/index-1Mkozois.js +0 -6
- package/web/dist/assets/index-YplrRHTH.css +0 -2
- package/web/dist/assets/new-task-form-D-ycQE1W.js +0 -1
- package/web/dist/assets/pill-Bxaenwiq.js +0 -1
- package/web/dist/assets/prompt-templates-zk_MwADX.js +0 -15
- package/web/dist/assets/run-header-B26dd4vL.js +0 -1
- package/web/dist/assets/skills-BGHHEXY_.js +0 -1
- package/web/dist/assets/tab-link-DMuBO_nl.js +0 -1
- package/web/dist/assets/task-changes-DhzLc3xp.js +0 -1
- package/web/dist/assets/task-thread-DmvdNT_U.js +0 -9
- package/web/dist/assets/thread-loading-QHcwivOl.js +0 -1
- package/web/dist/assets/utils-BMkaqkTd.js +0 -64
package/README.md
CHANGED
|
@@ -350,12 +350,11 @@ 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: **
|
|
354
|
-
|
|
355
|
-
**
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
machine's and live at `/settings/global`.
|
|
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`.
|
|
359
358
|
|
|
360
359
|
**Old page URLs keep working.** Every unprefixed page path — `/`, `/tasks/<id>`,
|
|
361
360
|
`/settings` — still answers, bound to the project cezar was started in; the
|
|
@@ -428,7 +427,6 @@ Useful environment variables:
|
|
|
428
427
|
| Var | Effect |
|
|
429
428
|
|---|---|
|
|
430
429
|
| `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. |
|
|
432
430
|
| `CEZ_APPROVAL_GATE=1` | Opt into Claude's interactive approval UI; by default, unapproved tools are denied without interrupting the run. |
|
|
433
431
|
| `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. |
|
|
434
432
|
| `CEZ_AUTOMATIONS=1` | Turn on **GitHub automations**: the Automations view appears and cezar polls GitHub on each enabled automation's interval, launching tasks from what it finds. Off by default, and only the exact value `1` enables it — without it nothing polls GitHub, the automations endpoints answer `409`, and the nav item is absent. Read at boot, so restart after changing it; definitions, receipts and high-watermarks are retained, so unsetting it and restarting restores the feature without migration or data loss. |
|
|
@@ -436,7 +434,6 @@ Useful environment variables:
|
|
|
436
434
|
| `CEZ_CLAUDE_BIN=/path/to/claude` | Override which `claude` binary is used. |
|
|
437
435
|
| `CEZ_CODEX_BIN=/path/to/codex` | Override which `codex` binary is used. |
|
|
438
436
|
| `CEZ_OPENCODE_BIN=/path/to/opencode` | Override which `opencode` binary is used. |
|
|
439
|
-
| `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. |
|
|
440
437
|
| `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. |
|
|
441
438
|
| `CEZ_PROJECTS_DIR=~/cezar/projects` | Default destination for **Clone from GitHub**. Saved workspace settings override it, and missing directories are created recursively. |
|
|
442
439
|
| `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. |
|
|
@@ -450,7 +447,6 @@ Useful environment variables:
|
|
|
450
447
|
| `GITHUB_TOKEN` | Fallback for GitHub reads/PRs when `gh` isn't authenticated. |
|
|
451
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. |
|
|
452
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. |
|
|
453
|
-
| `CEZ_AGENT_TMPDIR=0` | Stop giving each task its own temp directory and hand agents the host `TMPDIR` again (pre-#785 behavior). On by default: every run gets `TMPDIR`/`TEMP`/`TMP` pointing at `.ai/cezar/tmp/<task-id>`, created and write-probed before the agent spawns and reaped when the run ends, so concurrent tasks stop sharing one directory and a task refuses to start rather than run against a temp directory that silently swallows its shell output (see Troubleshooting below). Only an exact `0` disables it, and it disables the whole thing — the pre-spawn check included, so this stays an escape hatch you can actually take. |
|
|
454
450
|
| `CEZ_REDACT_SECRETS=0` | Disable scrubbing of credential values/token shapes from the on-disk state (the NDJSON transcript and the free-text fields of `runs.json`). On by default; leave it on. Best-effort defense-in-depth, not a guarantee: it catches known token shapes and the values of your own secret-named env vars, so a credential in neither category can still get through. |
|
|
455
451
|
| `CEZ_TITLE_UPDATES=0` | Turn off the live task-title refresh (namer re-runs on each turn end). The Settings → Agents toggle overrides this default. |
|
|
456
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`. |
|
|
@@ -458,35 +454,6 @@ Useful environment variables:
|
|
|
458
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.) |
|
|
459
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. |
|
|
460
456
|
|
|
461
|
-
### Troubleshooting: the agent's shell returns nothing
|
|
462
|
-
|
|
463
|
-
**Symptom.** A task on the Claude backend keeps working, but every shell command
|
|
464
|
-
comes back with no output and a spurious non-zero exit status — `echo hello`
|
|
465
|
-
included. Redirecting into a file inside the worktree still produces the right
|
|
466
|
-
content, so the commands genuinely run; only the *capture* is lost. Codex tasks
|
|
467
|
-
on the same machine are unaffected, because that backend streams over stdio
|
|
468
|
-
pipes instead of round-tripping a command's output through a temp file.
|
|
469
|
-
|
|
470
|
-
**Diagnosis.** The temp directory the agent was given is out of space or out of
|
|
471
|
-
quota. One line tells you:
|
|
472
|
-
|
|
473
|
-
```bash
|
|
474
|
-
echo probe > "${TMPDIR:-/tmp}/probe" # "Disk quota exceeded" / "No space left on device"
|
|
475
|
-
df -i "${TMPDIR:-/tmp}" # a tmpfs can exhaust inodes long before bytes
|
|
476
|
-
```
|
|
477
|
-
|
|
478
|
-
Under quota the file is *created* and the write then fails, so the backend reads
|
|
479
|
-
back a zero-byte capture file and hands the agent an empty result.
|
|
480
|
-
|
|
481
|
-
**Fix.** Since #785 cezar gives each task its own `TMPDIR` under
|
|
482
|
-
`.ai/cezar/tmp/<task-id>` and write-probes it before spawning, so a broken temp
|
|
483
|
-
directory fails the task with `agent temp directory is not writable: …` on the
|
|
484
|
-
task thread instead of corrupting its work. If you see that error, free space on
|
|
485
|
-
the disk holding the repo. `CEZ_AGENT_TMPDIR=0` turns the whole mechanism off —
|
|
486
|
-
per-task directory and pre-spawn check alike — and hands agents the host
|
|
487
|
-
`TMPDIR` again, which is the way out if the check itself is wrong on your
|
|
488
|
-
platform.
|
|
489
|
-
|
|
490
457
|
---
|
|
491
458
|
|
|
492
459
|
## Coding agent backends
|
|
@@ -606,19 +573,11 @@ never blocks startup):
|
|
|
606
573
|
// exactly that commit, and reports it as `team.commit`.
|
|
607
574
|
"worktreeRetention": 10, // keep the last N finished worktrees on disk; 0 = unlimited (branch always kept)
|
|
608
575
|
"defaultRunner": "claude", // agent backend: "claude" (default) · "codex" · "opencode"
|
|
609
|
-
"modelsLocked": true, // optional: native per-runner model is fixed/read-only; runner stays selectable
|
|
610
576
|
"plannerModel": "sonnet", // model the "Plan first" button uses to draft chains
|
|
611
577
|
"baseBranch": "develop" // branch worktrees fork from + PRs target (also settable in the Git tab)
|
|
612
578
|
}
|
|
613
579
|
```
|
|
614
580
|
|
|
615
|
-
Put the same `"modelsLocked": true` key in `~/.cezar/config.json` to apply it
|
|
616
|
-
to every registered project. When the key is absent or `false` in both config
|
|
617
|
-
files (and `CEZ_AGENT_MODELS_LOCKED` is not `1`), each runner's normal model
|
|
618
|
-
selector uses that runner's discovered model list. While locked, the model is
|
|
619
|
-
shown read-only and follows the selected runner's native settings; the runner
|
|
620
|
-
itself remains selectable.
|
|
621
|
-
|
|
622
581
|
Run data (`runs.json`, NDJSON event logs, worktrees, `todos.json`) is
|
|
623
582
|
git-ignored automatically; your workflows and skills stay committable.
|
|
624
583
|
|
|
@@ -47,14 +47,6 @@ 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;
|
|
58
50
|
/** VERBATIM from the vendor docs. Never computed, never generic. */
|
|
59
51
|
precedence: string;
|
|
60
52
|
/** Documented mid-run reload behaviour, or undefined when the vendor is silent. */
|
|
@@ -21,9 +21,6 @@ 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,
|
|
27
24
|
precedence: 'Lowest priority. Project and local settings override it key by key — except permission rules, which merge across all scopes.',
|
|
28
25
|
hotReload: 'Edits to most keys — including permissions and hooks — apply to a running session without a restart.',
|
|
29
26
|
docsUrl: CLAUDE_SETTINGS_DOCS,
|
|
@@ -37,9 +34,6 @@ export const CONFIG_FILES = [
|
|
|
37
34
|
label: '.claude/settings.json',
|
|
38
35
|
format: 'json',
|
|
39
36
|
tracked: 'tracked',
|
|
40
|
-
modelKey: 'model',
|
|
41
|
-
modelKeys: ['env.ANTHROPIC_MODEL', 'model'],
|
|
42
|
-
modelPriority: 2,
|
|
43
37
|
precedence: 'Overrides user settings key by key (permission rules merge). Local settings override this.',
|
|
44
38
|
hotReload: 'Edits to most keys — including permissions and hooks — apply to a running session without a restart.',
|
|
45
39
|
docsUrl: CLAUDE_SETTINGS_DOCS,
|
|
@@ -54,9 +48,6 @@ export const CONFIG_FILES = [
|
|
|
54
48
|
format: 'json',
|
|
55
49
|
tracked: 'gitignored',
|
|
56
50
|
seeded: true,
|
|
57
|
-
modelKey: 'model',
|
|
58
|
-
modelKeys: ['env.ANTHROPIC_MODEL', 'model'],
|
|
59
|
-
modelPriority: 3,
|
|
60
51
|
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.',
|
|
61
52
|
hotReload: 'Edits to most keys — including permissions and hooks — apply to a running session without a restart.',
|
|
62
53
|
docsUrl: CLAUDE_SETTINGS_DOCS,
|
|
@@ -122,9 +113,6 @@ export const CONFIG_FILES = [
|
|
|
122
113
|
format: 'toml',
|
|
123
114
|
tracked: 'outside-repo',
|
|
124
115
|
holdsMcp: true,
|
|
125
|
-
modelKey: 'model',
|
|
126
|
-
modelProviderKey: 'model_provider',
|
|
127
|
-
modelPriority: 1,
|
|
128
116
|
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>].',
|
|
129
117
|
docsUrl: CODEX_CONFIG_DOCS,
|
|
130
118
|
},
|
|
@@ -137,8 +125,6 @@ export const CONFIG_FILES = [
|
|
|
137
125
|
label: '.codex/config.toml',
|
|
138
126
|
format: 'toml',
|
|
139
127
|
tracked: 'tracked',
|
|
140
|
-
modelKey: 'model',
|
|
141
|
-
modelPriority: 2,
|
|
142
128
|
holdsMcp: true,
|
|
143
129
|
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.',
|
|
144
130
|
docsUrl: CODEX_CONFIG_DOCS,
|
|
@@ -166,8 +152,6 @@ export const CONFIG_FILES = [
|
|
|
166
152
|
format: 'jsonc',
|
|
167
153
|
tracked: 'outside-repo',
|
|
168
154
|
holdsMcp: true,
|
|
169
|
-
modelKey: 'model',
|
|
170
|
-
modelPriority: 1,
|
|
171
155
|
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.',
|
|
172
156
|
docsUrl: OPENCODE_CONFIG_DOCS,
|
|
173
157
|
},
|
|
@@ -181,8 +165,6 @@ export const CONFIG_FILES = [
|
|
|
181
165
|
format: 'jsonc',
|
|
182
166
|
tracked: 'tracked',
|
|
183
167
|
holdsMcp: true,
|
|
184
|
-
modelKey: 'model',
|
|
185
|
-
modelPriority: 2,
|
|
186
168
|
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.',
|
|
187
169
|
docsUrl: OPENCODE_CONFIG_DOCS,
|
|
188
170
|
},
|
|
@@ -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;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;QACnB,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,MAAM;QACb,OAAO,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,eAAe,CAAC;QAC5D,KAAK,EAAE,yBAAyB;QAChC,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,cAAc;QACvB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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,5 +1,6 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
|
-
import {
|
|
2
|
+
import { dirname, join } from 'node:path';
|
|
3
|
+
import { agentHomePaths } from '../paths.js';
|
|
3
4
|
import { CONFIG_FILES } from './catalog.js';
|
|
4
5
|
import { hashBytes, statConfigPath } from './files.js';
|
|
5
6
|
const HOSTED_REASON = 'agent config is edited from the machine that owns the checkout (this cockpit runs in hosted mode)';
|
|
@@ -17,9 +18,8 @@ async function versionOf(path, exists) {
|
|
|
17
18
|
}
|
|
18
19
|
/** Read the user-scope MCP server *names* from ~/.claude.json — never its contents, never for writing. */
|
|
19
20
|
export async function readUserMcpServers(env) {
|
|
20
|
-
// Claude's own MCP state file.
|
|
21
|
-
|
|
22
|
-
const path = claudeStateFilePath(agentHomePaths(env).claude, env);
|
|
21
|
+
// ~/.claude.json is a sibling of ~/.claude/ — Claude's own MCP state file.
|
|
22
|
+
const path = join(dirname(agentHomePaths(env).claude), '.claude.json');
|
|
23
23
|
try {
|
|
24
24
|
const { size } = await statConfigPath(path);
|
|
25
25
|
if (size > CLAUDE_JSON_CAP)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../src/agent-config/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../src/agent-config/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM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AAG,CAAC,UAAU;YAC1B,SAAS,EAAE,GAAG,CAAC,SAAS;YACxB,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,MAAM;YACN,IAAI;YACJ,OAAO,EAAE,MAAM,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC;YACtC,QAAQ,EAAE,QAAQ;YAClB,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa;SACrD,CAAC;IACJ,CAAC,CAAC,CACH,CAAC;IACF,OAAO;QACL,QAAQ;QACR,KAAK;QACL,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI;KACzD,CAAC;AACJ,CAAC"}
|
package/dist/config.d.ts
CHANGED
|
@@ -37,16 +37,9 @@ declare const configSchema: z.ZodObject<{
|
|
|
37
37
|
codex: z.ZodOptional<z.ZodString>;
|
|
38
38
|
opencode: z.ZodOptional<z.ZodString>;
|
|
39
39
|
}, z.core.$strip>>>;
|
|
40
|
-
modelsLocked: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
41
40
|
}, z.core.$strip>;
|
|
42
41
|
export type CezConfig = z.infer<typeof configSchema>;
|
|
43
|
-
/**
|
|
44
|
-
* Read `.ai/cezar/config.json` on demand — never cached, never throws.
|
|
45
|
-
*
|
|
46
|
-
* Also reads the machine-wide defaults, which is one more small JSON read and deliberately not
|
|
47
|
-
* cached for the same reason this one is not: `~/.cezar/` is shared by every cezar process on the
|
|
48
|
-
* machine, so a snapshot is a staleness bug.
|
|
49
|
-
*/
|
|
42
|
+
/** Read `.ai/cezar/config.json` on demand — never cached, never throws. */
|
|
50
43
|
export declare function loadConfig(repoRoot: string): Promise<CezConfig>;
|
|
51
44
|
/**
|
|
52
45
|
* The default skills repos that are *opt-in per skill* (the "import OM skills"
|
package/dist/config.js
CHANGED
|
@@ -90,66 +90,25 @@ const configSchema = z.object({
|
|
|
90
90
|
})
|
|
91
91
|
.optional()
|
|
92
92
|
.catch(undefined),
|
|
93
|
-
/**
|
|
94
|
-
* Make each coding agent's native model setting authoritative. This is an
|
|
95
|
-
* optional repo-level counterpart to `CEZ_AGENT_MODELS_LOCKED=1`; absent or
|
|
96
|
-
* false preserves the ordinary per-runner model selector.
|
|
97
|
-
*/
|
|
98
|
-
modelsLocked: z.boolean().optional().catch(undefined),
|
|
99
93
|
});
|
|
100
|
-
/**
|
|
101
|
-
* Fold the machine-wide agent defaults under a repo's own config (spec 2026-07-29-agent-profiles).
|
|
102
|
-
*
|
|
103
|
-
* Applied to the RAW object, before parsing, for the reason `ownWorktreeRetention` documents just
|
|
104
|
-
* below: `defaultRunner`'s `.default('claude')` materializes the key, so after a parse there is no
|
|
105
|
-
* telling "the user chose claude" from "the user said nothing". Merging first keeps the wire shape
|
|
106
|
-
* exactly as it has always been — `defaultRunner` and the model presets stay always-present — while
|
|
107
|
-
* making an absent key mean "ask the machine".
|
|
108
|
-
*
|
|
109
|
-
* A repo key always wins, and `models` merges per RUNNER rather than wholesale: pinning claude's
|
|
110
|
-
* model in one repo must not silently discard the machine's codex preset.
|
|
111
|
-
*/
|
|
112
|
-
function withMachineDefaults(raw, machine) {
|
|
113
|
-
if (!raw || typeof raw !== 'object' || Array.isArray(raw))
|
|
114
|
-
raw = {};
|
|
115
|
-
const own = raw;
|
|
116
|
-
const ownModels = own.defaultModels && typeof own.defaultModels === 'object'
|
|
117
|
-
? own.defaultModels
|
|
118
|
-
: undefined;
|
|
119
|
-
const models = { ...machine.models, ...ownModels };
|
|
120
|
-
return {
|
|
121
|
-
...own,
|
|
122
|
-
...(own.defaultRunner === undefined && machine.runner !== undefined
|
|
123
|
-
? { defaultRunner: machine.runner }
|
|
124
|
-
: {}),
|
|
125
|
-
...(Object.keys(models).length > 0 ? { defaultModels: models } : {}),
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Read `.ai/cezar/config.json` on demand — never cached, never throws.
|
|
130
|
-
*
|
|
131
|
-
* Also reads the machine-wide defaults, which is one more small JSON read and deliberately not
|
|
132
|
-
* cached for the same reason this one is not: `~/.cezar/` is shared by every cezar process on the
|
|
133
|
-
* machine, so a snapshot is a staleness bug.
|
|
134
|
-
*/
|
|
94
|
+
/** Read `.ai/cezar/config.json` on demand — never cached, never throws. */
|
|
135
95
|
export async function loadConfig(repoRoot) {
|
|
136
|
-
const machine = (await loadWorkspaceConfig()).agentDefaults;
|
|
137
96
|
let raw;
|
|
138
97
|
try {
|
|
139
98
|
raw = await readFile(join(repoRoot, '.ai/cezar', 'config.json'), 'utf8');
|
|
140
99
|
}
|
|
141
100
|
catch {
|
|
142
|
-
return configSchema.parse(
|
|
101
|
+
return configSchema.parse({});
|
|
143
102
|
}
|
|
144
103
|
try {
|
|
145
|
-
const parsed = configSchema.safeParse(
|
|
104
|
+
const parsed = configSchema.safeParse(JSON.parse(raw));
|
|
146
105
|
if (parsed.success)
|
|
147
106
|
return parsed.data;
|
|
148
107
|
}
|
|
149
108
|
catch {
|
|
150
109
|
// fall through — malformed JSON degrades to the default
|
|
151
110
|
}
|
|
152
|
-
return configSchema.parse(
|
|
111
|
+
return configSchema.parse({});
|
|
153
112
|
}
|
|
154
113
|
/**
|
|
155
114
|
* The repo's OWN `worktreeRetention`, or `undefined` when it doesn't set one.
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CA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AC;QACD,2EAA2E;QAC3E,0EAA0E;QAC1E,IAAK,MAAkC,CAAC,WAAW,KAAK,SAAS;YAAE,OAAO,IAAI,CAAC;QAC/E,OAAO,IAAI,GAAG,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAC1D,CAAC;IAAC,MAAM,CAAC;QACP,uEAAuE;QACvE,OAAO,IAAI,GAAG,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAC1D,CAAC;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,QAAgB;IAC7D,MAAM,GAAG,GAAG,MAAM,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IACjD,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,GAAG,CAAC;IAClC,MAAM,SAAS,GAAG,MAAM,mBAAmB,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IAChE,OAAO,SAAS,EAAE,SAAS,CAAC,wBAAwB,IAAI,0BAA0B,CAAC;AACrF,CAAC"}
|
|
@@ -84,7 +84,6 @@ export declare const automationTaskSchema: z.ZodObject<{
|
|
|
84
84
|
codex: "codex";
|
|
85
85
|
opencode: "opencode";
|
|
86
86
|
}>>;
|
|
87
|
-
agentProfile: z.ZodOptional<z.ZodString>;
|
|
88
87
|
worktree: z.ZodOptional<z.ZodBoolean>;
|
|
89
88
|
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
90
89
|
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -144,7 +143,6 @@ export declare const automationDefinitionSchema: z.ZodObject<{
|
|
|
144
143
|
codex: "codex";
|
|
145
144
|
opencode: "opencode";
|
|
146
145
|
}>>;
|
|
147
|
-
agentProfile: z.ZodOptional<z.ZodString>;
|
|
148
146
|
worktree: z.ZodOptional<z.ZodBoolean>;
|
|
149
147
|
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
150
148
|
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -297,7 +295,6 @@ export declare const automationListEntrySchema: z.ZodObject<{
|
|
|
297
295
|
codex: "codex";
|
|
298
296
|
opencode: "opencode";
|
|
299
297
|
}>>;
|
|
300
|
-
agentProfile: z.ZodOptional<z.ZodString>;
|
|
301
298
|
worktree: z.ZodOptional<z.ZodBoolean>;
|
|
302
299
|
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
303
300
|
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -440,7 +437,6 @@ export declare const automationsResponseSchema: z.ZodObject<{
|
|
|
440
437
|
codex: "codex";
|
|
441
438
|
opencode: "opencode";
|
|
442
439
|
}>>;
|
|
443
|
-
agentProfile: z.ZodOptional<z.ZodString>;
|
|
444
440
|
worktree: z.ZodOptional<z.ZodBoolean>;
|
|
445
441
|
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
446
442
|
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -568,7 +564,6 @@ export declare const automationResponseSchema: z.ZodObject<{
|
|
|
568
564
|
codex: "codex";
|
|
569
565
|
opencode: "opencode";
|
|
570
566
|
}>>;
|
|
571
|
-
agentProfile: z.ZodOptional<z.ZodString>;
|
|
572
567
|
worktree: z.ZodOptional<z.ZodBoolean>;
|
|
573
568
|
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
574
569
|
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -633,7 +628,6 @@ export declare const automationDetailResponseSchema: z.ZodObject<{
|
|
|
633
628
|
codex: "codex";
|
|
634
629
|
opencode: "opencode";
|
|
635
630
|
}>>;
|
|
636
|
-
agentProfile: z.ZodOptional<z.ZodString>;
|
|
637
631
|
worktree: z.ZodOptional<z.ZodBoolean>;
|
|
638
632
|
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
639
633
|
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -834,7 +828,6 @@ export declare const createAutomationInputSchema: z.ZodObject<{
|
|
|
834
828
|
codex: "codex";
|
|
835
829
|
opencode: "opencode";
|
|
836
830
|
}>>;
|
|
837
|
-
agentProfile: z.ZodOptional<z.ZodString>;
|
|
838
831
|
worktree: z.ZodOptional<z.ZodBoolean>;
|
|
839
832
|
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
840
833
|
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -897,7 +890,6 @@ export declare const updateAutomationInputSchema: z.ZodObject<{
|
|
|
897
890
|
codex: "codex";
|
|
898
891
|
opencode: "opencode";
|
|
899
892
|
}>>;
|
|
900
|
-
agentProfile: z.ZodOptional<z.ZodString>;
|
|
901
893
|
worktree: z.ZodOptional<z.ZodBoolean>;
|
|
902
894
|
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
903
895
|
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|