@open-mercato/cezar 0.9.1 → 0.9.2-pr710.1256
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +157 -32
- 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/pi.d.ts +12 -0
- package/dist/agent-config/model-settings/pi.js +18 -0
- package/dist/agent-config/model-settings/pi.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 +32 -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 +255 -0
- package/dist/automations/types.js +159 -0
- package/dist/automations/types.js.map +1 -0
- package/dist/config.d.ts +19 -112
- package/dist/config.js +48 -5
- package/dist/config.js.map +1 -1
- package/dist/contract/agent-config.d.ts +153 -0
- package/dist/contract/agent-profiles.d.ts +347 -0
- package/dist/contract/automations.d.ts +935 -0
- package/dist/contract/events.d.ts +104 -0
- package/dist/contract/github.d.ts +467 -0
- package/dist/contract/health.d.ts +102 -0
- package/dist/contract/index.d.ts +16 -0
- package/dist/contract/index.js +1830 -0
- package/dist/contract/projects.d.ts +210 -0
- package/dist/contract/repo.d.ts +234 -0
- package/dist/contract/runs.d.ts +1407 -0
- package/dist/contract/skills.d.ts +232 -0
- package/dist/contract/workflows.d.ts +218 -0
- package/dist/contract/workspace.d.ts +577 -0
- package/dist/core/agent-env.d.ts +1 -1
- package/dist/core/agent-env.js +41 -16
- package/dist/core/agent-env.js.map +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 +62 -0
- package/dist/core/agent-profiles.js +90 -0
- package/dist/core/agent-profiles.js.map +1 -0
- package/dist/core/agent-runner.d.ts +49 -7
- package/dist/core/agent-runner.js +48 -3
- 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.d.ts +5 -5
- package/dist/core/backend-detect.js +44 -7
- 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 +61 -13
- 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 +65 -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 +17 -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 +24 -12
- package/dist/core/model-identity.js +41 -24
- package/dist/core/model-identity.js.map +1 -1
- package/dist/core/model-presets.d.ts +10 -4
- package/dist/core/model-presets.js +52 -9
- package/dist/core/model-presets.js.map +1 -1
- package/dist/core/opencode-model-catalog.d.ts +30 -0
- package/dist/core/opencode-model-catalog.js +126 -0
- package/dist/core/opencode-model-catalog.js.map +1 -0
- 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/pi-runner.d.ts +24 -0
- package/dist/core/pi-runner.js +349 -0
- package/dist/core/pi-runner.js.map +1 -0
- package/dist/core/pi-ui-mapper.d.ts +34 -0
- package/dist/core/pi-ui-mapper.js +270 -0
- package/dist/core/pi-ui-mapper.js.map +1 -0
- package/dist/core/provider-auth.d.ts +154 -0
- package/dist/core/provider-auth.js +509 -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-factory.js +3 -0
- package/dist/core/runner-factory.js.map +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 +2 -2
- 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 +85 -0
- package/dist/git-diff-base.js +180 -0
- package/dist/git-diff-base.js.map +1 -0
- package/dist/git-worktree.d.ts +46 -6
- package/dist/git-worktree.js +46 -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 +66 -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/agent-tmpdir.d.ts +41 -0
- package/dist/runs/agent-tmpdir.js +183 -0
- package/dist/runs/agent-tmpdir.js.map +1 -0
- 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/event-history.d.ts +50 -0
- package/dist/runs/event-history.js +613 -0
- package/dist/runs/event-history.js.map +1 -0
- package/dist/runs/retention.d.ts +1 -1
- package/dist/runs/run-index.d.ts +19 -0
- package/dist/runs/run-index.js +43 -0
- package/dist/runs/run-index.js.map +1 -0
- package/dist/runs/store.d.ts +209 -344
- package/dist/runs/store.js +298 -39
- 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 +21 -6
- package/dist/server/capabilities.js +27 -1
- 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 +19 -3
- package/dist/server/forge/index.js +28 -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 +10 -8
- package/dist/server/git-changes.js +19 -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-app.d.ts +2 -1
- package/dist/server/open-in-app.js +3 -1
- package/dist/server/open-in-app.js.map +1 -1
- package/dist/server/open-in-terminal.d.ts +46 -1
- package/dist/server/open-in-terminal.js +72 -13
- 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 +56 -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 +12802 -47
- package/dist/server/server.js +2857 -949
- 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/engine.js +5 -18
- package/dist/server-install/engine.js.map +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/steps.js +6 -2
- package/dist/server-install/steps.js.map +1 -1
- 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 +276 -15
- package/dist/workflows/run.js +1261 -159
- package/dist/workflows/run.js.map +1 -1
- package/dist/workflows/types.d.ts +62 -224
- package/dist/workflows/types.js +25 -2
- package/dist/workflows/types.js.map +1 -1
- package/dist/workspace/agent-accounts.d.ts +153 -0
- package/dist/workspace/agent-accounts.js +304 -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 +94 -206
- package/dist/workspace/config.js +226 -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-cli.js +54 -4
- package/dist/workspace/projects-cli.js.map +1 -1
- package/dist/workspace/projects.d.ts +26 -2
- package/dist/workspace/projects.js +42 -3
- package/dist/workspace/projects.js.map +1 -1
- package/dist/workspace/semaphore.d.ts +51 -0
- package/dist/workspace/semaphore.js +53 -3
- package/dist/workspace/semaphore.js.map +1 -1
- package/dist/workspace/ui-state.d.ts +16 -5
- package/dist/workspace/ui-state.js +18 -7
- 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/mock-pi-rpc.mjs +83 -0
- package/scripts/sync-readme.mjs +20 -0
- package/web/dist/assets/alert-dialog-BVs3QSmP.js +1 -0
- package/web/dist/assets/arrow-down-D7T7XuF6.js +1 -0
- package/web/dist/assets/arrow-left-B1dRFd8y.js +1 -0
- package/web/dist/assets/bundle-mjs-BT31bpU6.js +1 -0
- package/web/dist/assets/centered-state-DdRLYi9u.js +43 -0
- package/web/dist/assets/chevron-right-Dh0t3AL8.js +1 -0
- package/web/dist/assets/{chunk-BO2N2NFS-DtrdTCWa.js → chunk-BO2N2NFS-DE6qKn3r.js} +8 -8
- package/web/dist/assets/circle-check-4FDOlh9u.js +1 -0
- package/web/dist/assets/circle-x-CgTVbqX5.js +1 -0
- package/web/dist/assets/collapsible-BoADzTok.js +1 -0
- package/web/dist/assets/commit-list-BCcCkRbU.js +1 -0
- package/web/dist/assets/compare-variants-B7gTgGqR.js +1 -0
- package/web/dist/assets/{core-DePtBHcl.js → core-BCsw8oQw.js} +1 -1
- package/web/dist/assets/diff-ecfV3-op.js +3 -0
- package/web/dist/assets/diff-stat-C2KGLVnZ.js +1 -0
- package/web/dist/assets/{diff-view-DCeSegKk.js → diff-view-CQtonQ4L.js} +4 -4
- package/web/dist/assets/dropdown-menu-WcGoirf2.js +1 -0
- package/web/dist/assets/editable-title-SqNK-wuI.js +1 -0
- package/web/dist/assets/{ellipsis-vertical-CNnSLn5a.js → ellipsis-vertical-ClTFrwit.js} +1 -1
- package/web/dist/assets/{file-D4GBh1ao.js → file-BU0mWida.js} +1 -1
- package/web/dist/assets/folder-rsgCF0aw.js +1 -0
- package/web/dist/assets/{git-pull-request-DnR8Xh4_.js → git-pull-request-BFhIKb83.js} +1 -1
- package/web/dist/assets/git-toolbar-CF1_tzqz.js +1 -0
- package/web/dist/assets/github-CyjPz-Ks.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-iEzCyEmz.js +1 -0
- package/web/dist/assets/index-BN09RpYY.css +2 -0
- package/web/dist/assets/index-CyG7aE1W.js +7 -0
- package/web/dist/assets/lib-BQXq3kEf.js +1 -0
- package/web/dist/assets/lib-BxQXEXDF.js +1 -0
- package/web/dist/assets/markdown-CNAa22LB.js +2 -0
- package/web/dist/assets/mermaid-GHXKKRXX-C4jxqUUb.js +1 -0
- package/web/dist/assets/new-task-form-CWhQZbsX.js +1 -0
- package/web/dist/assets/pill-BO5s2x3N.js +1 -0
- package/web/dist/assets/project-router-Dm4OhAPE.js +1 -0
- package/web/dist/assets/prompt-templates-CP__OCDQ.js +15 -0
- package/web/dist/assets/react-runtime-CCIEwYL0.js +9 -0
- package/web/dist/assets/{refresh-cw-BT8E96Tm.js → refresh-cw-DyiysCoP.js} +1 -1
- package/web/dist/assets/repo-git-B1WM6N8T.js +1 -0
- package/web/dist/assets/rolldown-runtime-QTnfLwEv.js +1 -0
- package/web/dist/assets/run-diff-CKx4d9Oo.js +3 -0
- package/web/dist/assets/run-header-DpbfOtNi.js +1 -0
- package/web/dist/assets/{search-x-BDjaMrzG.js → search-x-DRvk-6x4.js} +1 -1
- package/web/dist/assets/skill-empty-hint-D5vsHfMr.js +1 -0
- package/web/dist/assets/skills-BiWfHmCR.js +1 -0
- package/web/dist/assets/skills-XGltyIJ_.js +1 -0
- package/web/dist/assets/sparkles-BugkDxWO.js +1 -0
- package/web/dist/assets/{square-terminal-Ckjjn0vb.js → square-terminal-Drp2h-o8.js} +1 -1
- package/web/dist/assets/tab-link-CiRLRlnY.js +1 -0
- package/web/dist/assets/task-changes-C2hKkEtc.js +1 -0
- package/web/dist/assets/task-commits-CwGs_Opa.js +1 -0
- package/web/dist/assets/task-files-5KUgFzX3.js +2 -0
- package/web/dist/assets/task-thread-B3AFO3SS.js +9 -0
- package/web/dist/assets/textarea-Dn90Eun6.js +1 -0
- package/web/dist/assets/thread-loading-_1hPuk76.js +1 -0
- package/web/dist/assets/{trash-2-DAyZ0VSi.js → trash-2-BKEc5Sp2.js} +1 -1
- package/web/dist/assets/{triangle-alert-Uy8rokUh.js → triangle-alert-BGGPY2C2.js} +1 -1
- package/web/dist/assets/{upload-CDdyPPo_.js → upload-B0AQw-mO.js} +1 -1
- package/web/dist/assets/use-desktop-CegyTp3X.js +1 -0
- package/web/dist/assets/use-submit-shortcut-Mle-9uJp.js +1 -0
- package/web/dist/assets/utils-D9GHDNza.js +64 -0
- package/web/dist/assets/workflows-3PCz57Z6.js +11 -0
- package/web/dist/assets/zoomable-image-DTq7s8CZ.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
|
@@ -23,234 +23,113 @@ export declare const PROJECT_ID_RE: RegExp;
|
|
|
23
23
|
* degrade per-key so one bad value never evicts the project.
|
|
24
24
|
*/
|
|
25
25
|
declare const workspaceProjectSchema: z.ZodObject<{
|
|
26
|
-
/** Unique slug — URL segment, sidebar key, worktree namespace. */
|
|
27
26
|
id: z.ZodString;
|
|
28
|
-
|
|
29
|
-
* job — `registerProject` in step 1.3; the schema only demands absolute). */
|
|
30
|
-
root: z.ZodEffects<z.ZodString, string, string>;
|
|
31
|
-
/** Display name (basename by default). `''` = caller derives a fallback. */
|
|
27
|
+
root: z.ZodString;
|
|
32
28
|
name: z.ZodCatch<z.ZodString>;
|
|
33
29
|
addedAt: z.ZodCatch<z.ZodString>;
|
|
34
30
|
lastOpenedAt: z.ZodCatch<z.ZodString>;
|
|
35
|
-
source: z.ZodCatch<z.ZodEnum<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
* default, and `.passthrough()` preserves the key across cezar round-trips. */
|
|
31
|
+
source: z.ZodCatch<z.ZodEnum<{
|
|
32
|
+
checkout: "checkout";
|
|
33
|
+
local: "local";
|
|
34
|
+
}>>;
|
|
40
35
|
maxParallel: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
id: z.ZodString;
|
|
44
|
-
/** Absolute, realpath-normalized repo root (normalization is the writer's
|
|
45
|
-
* job — `registerProject` in step 1.3; the schema only demands absolute). */
|
|
46
|
-
root: z.ZodEffects<z.ZodString, string, string>;
|
|
47
|
-
/** Display name (basename by default). `''` = caller derives a fallback. */
|
|
48
|
-
name: z.ZodCatch<z.ZodString>;
|
|
49
|
-
addedAt: z.ZodCatch<z.ZodString>;
|
|
50
|
-
lastOpenedAt: z.ZodCatch<z.ZodString>;
|
|
51
|
-
source: z.ZodCatch<z.ZodEnum<["local", "checkout"]>>;
|
|
52
|
-
/** Per-project cap on concurrently running tasks. Absent = inherit the
|
|
53
|
-
* workspace `resources.maxParallel`. Bounded like the workspace cap; a bad
|
|
54
|
-
* value degrades to "inherit" (`.catch(undefined)`) rather than a hard
|
|
55
|
-
* default, and `.passthrough()` preserves the key across cezar round-trips. */
|
|
56
|
-
maxParallel: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
57
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
58
|
-
/** Unique slug — URL segment, sidebar key, worktree namespace. */
|
|
59
|
-
id: z.ZodString;
|
|
60
|
-
/** Absolute, realpath-normalized repo root (normalization is the writer's
|
|
61
|
-
* job — `registerProject` in step 1.3; the schema only demands absolute). */
|
|
62
|
-
root: z.ZodEffects<z.ZodString, string, string>;
|
|
63
|
-
/** Display name (basename by default). `''` = caller derives a fallback. */
|
|
64
|
-
name: z.ZodCatch<z.ZodString>;
|
|
65
|
-
addedAt: z.ZodCatch<z.ZodString>;
|
|
66
|
-
lastOpenedAt: z.ZodCatch<z.ZodString>;
|
|
67
|
-
source: z.ZodCatch<z.ZodEnum<["local", "checkout"]>>;
|
|
68
|
-
/** Per-project cap on concurrently running tasks. Absent = inherit the
|
|
69
|
-
* workspace `resources.maxParallel`. Bounded like the workspace cap; a bad
|
|
70
|
-
* value degrades to "inherit" (`.catch(undefined)`) rather than a hard
|
|
71
|
-
* default, and `.passthrough()` preserves the key across cezar round-trips. */
|
|
72
|
-
maxParallel: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
73
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
36
|
+
tags: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
37
|
+
}, z.core.$loose>;
|
|
74
38
|
export type WorkspaceProject = z.infer<typeof workspaceProjectSchema>;
|
|
39
|
+
/**
|
|
40
|
+
* Zero-config cadence, in minutes, for re-checking a run parked with
|
|
41
|
+
* `CEZ:MONITORING` (#810). The single source of truth for that default — the
|
|
42
|
+
* schema below and `WorkspaceSemaphore`'s fallback both read it, so an install
|
|
43
|
+
* with no `~/.cezar/config.json` and a semaphore built without boot wiring
|
|
44
|
+
* agree. `null` (explicit park) is a user choice and is never replaced by it.
|
|
45
|
+
*/
|
|
46
|
+
export declare const DEFAULT_MONITORING_WAKE_MINUTES = 5;
|
|
75
47
|
declare const workspaceConfigSchema: z.ZodObject<{
|
|
76
|
-
/** Migration cursor (src/workspace/migrations.ts). Absent/bad → 0, which
|
|
77
|
-
* means "run every migration" — each one is idempotent, so that is safe. */
|
|
78
48
|
schemaVersion: z.ZodCatch<z.ZodDefault<z.ZodNumber>>;
|
|
79
|
-
/** Root exposed by the Add project folder browser. Environment supplies
|
|
80
|
-
* the zero-config default; an explicit workspace value wins thereafter. */
|
|
81
49
|
browseRoot: z.ZodCatch<z.ZodDefault<z.ZodString>>;
|
|
82
|
-
/** Checkout root for GUI-cloned projects. Stored as written (a literal
|
|
83
|
-
* `~` is expanded by the checkout flow, not here); validated writable
|
|
84
|
-
* when *changed*, never at load. */
|
|
85
50
|
projectsDir: z.ZodCatch<z.ZodDefault<z.ZodString>>;
|
|
86
|
-
|
|
87
|
-
|
|
51
|
+
skillsAutoUpdate: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
52
|
+
modelsLocked: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
53
|
+
resources: z.ZodCatch<z.ZodPrefault<z.ZodObject<{
|
|
88
54
|
maxParallel: z.ZodCatch<z.ZodDefault<z.ZodNumber>>;
|
|
89
|
-
|
|
90
|
-
|
|
55
|
+
maxMonitoringSessions: z.ZodCatch<z.ZodDefault<z.ZodNumber>>;
|
|
56
|
+
monitoringWakeIntervalMinutes: z.ZodCatch<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
57
|
+
autoResumeOnUsageLimit: z.ZodCatch<z.ZodDefault<z.ZodBoolean>>;
|
|
91
58
|
memoryLimitMb: z.ZodCatch<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
92
|
-
/** Default worktree retention for projects that don't override it. */
|
|
93
59
|
worktreeRetentionDefault: z.ZodCatch<z.ZodDefault<z.ZodNumber>>;
|
|
94
|
-
},
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
projects: z.
|
|
115
|
-
|
|
116
|
-
id:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
* workspace `resources.maxParallel`. Bounded like the workspace cap; a bad
|
|
127
|
-
* value degrades to "inherit" (`.catch(undefined)`) rather than a hard
|
|
128
|
-
* default, and `.passthrough()` preserves the key across cezar round-trips. */
|
|
129
|
-
maxParallel: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
130
|
-
}, z.ZodTypeAny, "passthrough">[], unknown>;
|
|
131
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
132
|
-
/** Migration cursor (src/workspace/migrations.ts). Absent/bad → 0, which
|
|
133
|
-
* means "run every migration" — each one is idempotent, so that is safe. */
|
|
134
|
-
schemaVersion: z.ZodCatch<z.ZodDefault<z.ZodNumber>>;
|
|
135
|
-
/** Root exposed by the Add project folder browser. Environment supplies
|
|
136
|
-
* the zero-config default; an explicit workspace value wins thereafter. */
|
|
137
|
-
browseRoot: z.ZodCatch<z.ZodDefault<z.ZodString>>;
|
|
138
|
-
/** Checkout root for GUI-cloned projects. Stored as written (a literal
|
|
139
|
-
* `~` is expanded by the checkout flow, not here); validated writable
|
|
140
|
-
* when *changed*, never at load. */
|
|
141
|
-
projectsDir: z.ZodCatch<z.ZodDefault<z.ZodString>>;
|
|
142
|
-
resources: z.ZodCatch<z.ZodDefault<z.ZodObject<{
|
|
143
|
-
/** Workspace-wide parallel-task cap (moved from per-repo config.json). */
|
|
144
|
-
maxParallel: z.ZodCatch<z.ZodDefault<z.ZodNumber>>;
|
|
145
|
-
/** Per-task memory ceiling in MiB; null = no limit (matches the file's
|
|
146
|
-
* literal `"memoryLimitMb": null` in the spec's Data Model). */
|
|
147
|
-
memoryLimitMb: z.ZodCatch<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
148
|
-
/** Default worktree retention for projects that don't override it. */
|
|
149
|
-
worktreeRetentionDefault: z.ZodCatch<z.ZodDefault<z.ZodNumber>>;
|
|
150
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
151
|
-
/** Workspace-wide parallel-task cap (moved from per-repo config.json). */
|
|
152
|
-
maxParallel: z.ZodCatch<z.ZodDefault<z.ZodNumber>>;
|
|
153
|
-
/** Per-task memory ceiling in MiB; null = no limit (matches the file's
|
|
154
|
-
* literal `"memoryLimitMb": null` in the spec's Data Model). */
|
|
155
|
-
memoryLimitMb: z.ZodCatch<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
156
|
-
/** Default worktree retention for projects that don't override it. */
|
|
157
|
-
worktreeRetentionDefault: z.ZodCatch<z.ZodDefault<z.ZodNumber>>;
|
|
158
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
159
|
-
/** Workspace-wide parallel-task cap (moved from per-repo config.json). */
|
|
160
|
-
maxParallel: z.ZodCatch<z.ZodDefault<z.ZodNumber>>;
|
|
161
|
-
/** Per-task memory ceiling in MiB; null = no limit (matches the file's
|
|
162
|
-
* literal `"memoryLimitMb": null` in the spec's Data Model). */
|
|
163
|
-
memoryLimitMb: z.ZodCatch<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
164
|
-
/** Default worktree retention for projects that don't override it. */
|
|
165
|
-
worktreeRetentionDefault: z.ZodCatch<z.ZodDefault<z.ZodNumber>>;
|
|
166
|
-
}, z.ZodTypeAny, "passthrough">>>>;
|
|
167
|
-
/** Per-entry salvage: a corrupt entry is dropped, the rest of the registry
|
|
168
|
-
* survives (a whole-array `.catch([])` would evict every project over one
|
|
169
|
-
* bad row). */
|
|
170
|
-
projects: z.ZodEffects<z.ZodCatch<z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>>, z.objectOutputType<{
|
|
171
|
-
/** Unique slug — URL segment, sidebar key, worktree namespace. */
|
|
172
|
-
id: z.ZodString;
|
|
173
|
-
/** Absolute, realpath-normalized repo root (normalization is the writer's
|
|
174
|
-
* job — `registerProject` in step 1.3; the schema only demands absolute). */
|
|
175
|
-
root: z.ZodEffects<z.ZodString, string, string>;
|
|
176
|
-
/** Display name (basename by default). `''` = caller derives a fallback. */
|
|
177
|
-
name: z.ZodCatch<z.ZodString>;
|
|
178
|
-
addedAt: z.ZodCatch<z.ZodString>;
|
|
179
|
-
lastOpenedAt: z.ZodCatch<z.ZodString>;
|
|
180
|
-
source: z.ZodCatch<z.ZodEnum<["local", "checkout"]>>;
|
|
181
|
-
/** Per-project cap on concurrently running tasks. Absent = inherit the
|
|
182
|
-
* workspace `resources.maxParallel`. Bounded like the workspace cap; a bad
|
|
183
|
-
* value degrades to "inherit" (`.catch(undefined)`) rather than a hard
|
|
184
|
-
* default, and `.passthrough()` preserves the key across cezar round-trips. */
|
|
185
|
-
maxParallel: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
186
|
-
}, z.ZodTypeAny, "passthrough">[], unknown>;
|
|
187
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
188
|
-
/** Migration cursor (src/workspace/migrations.ts). Absent/bad → 0, which
|
|
189
|
-
* means "run every migration" — each one is idempotent, so that is safe. */
|
|
190
|
-
schemaVersion: z.ZodCatch<z.ZodDefault<z.ZodNumber>>;
|
|
191
|
-
/** Root exposed by the Add project folder browser. Environment supplies
|
|
192
|
-
* the zero-config default; an explicit workspace value wins thereafter. */
|
|
193
|
-
browseRoot: z.ZodCatch<z.ZodDefault<z.ZodString>>;
|
|
194
|
-
/** Checkout root for GUI-cloned projects. Stored as written (a literal
|
|
195
|
-
* `~` is expanded by the checkout flow, not here); validated writable
|
|
196
|
-
* when *changed*, never at load. */
|
|
197
|
-
projectsDir: z.ZodCatch<z.ZodDefault<z.ZodString>>;
|
|
198
|
-
resources: z.ZodCatch<z.ZodDefault<z.ZodObject<{
|
|
199
|
-
/** Workspace-wide parallel-task cap (moved from per-repo config.json). */
|
|
200
|
-
maxParallel: z.ZodCatch<z.ZodDefault<z.ZodNumber>>;
|
|
201
|
-
/** Per-task memory ceiling in MiB; null = no limit (matches the file's
|
|
202
|
-
* literal `"memoryLimitMb": null` in the spec's Data Model). */
|
|
203
|
-
memoryLimitMb: z.ZodCatch<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
204
|
-
/** Default worktree retention for projects that don't override it. */
|
|
205
|
-
worktreeRetentionDefault: z.ZodCatch<z.ZodDefault<z.ZodNumber>>;
|
|
206
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
207
|
-
/** Workspace-wide parallel-task cap (moved from per-repo config.json). */
|
|
208
|
-
maxParallel: z.ZodCatch<z.ZodDefault<z.ZodNumber>>;
|
|
209
|
-
/** Per-task memory ceiling in MiB; null = no limit (matches the file's
|
|
210
|
-
* literal `"memoryLimitMb": null` in the spec's Data Model). */
|
|
211
|
-
memoryLimitMb: z.ZodCatch<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
212
|
-
/** Default worktree retention for projects that don't override it. */
|
|
213
|
-
worktreeRetentionDefault: z.ZodCatch<z.ZodDefault<z.ZodNumber>>;
|
|
214
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
215
|
-
/** Workspace-wide parallel-task cap (moved from per-repo config.json). */
|
|
216
|
-
maxParallel: z.ZodCatch<z.ZodDefault<z.ZodNumber>>;
|
|
217
|
-
/** Per-task memory ceiling in MiB; null = no limit (matches the file's
|
|
218
|
-
* literal `"memoryLimitMb": null` in the spec's Data Model). */
|
|
219
|
-
memoryLimitMb: z.ZodCatch<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
220
|
-
/** Default worktree retention for projects that don't override it. */
|
|
221
|
-
worktreeRetentionDefault: z.ZodCatch<z.ZodDefault<z.ZodNumber>>;
|
|
222
|
-
}, z.ZodTypeAny, "passthrough">>>>;
|
|
223
|
-
/** Per-entry salvage: a corrupt entry is dropped, the rest of the registry
|
|
224
|
-
* survives (a whole-array `.catch([])` would evict every project over one
|
|
225
|
-
* bad row). */
|
|
226
|
-
projects: z.ZodEffects<z.ZodCatch<z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>>, z.objectOutputType<{
|
|
227
|
-
/** Unique slug — URL segment, sidebar key, worktree namespace. */
|
|
228
|
-
id: z.ZodString;
|
|
229
|
-
/** Absolute, realpath-normalized repo root (normalization is the writer's
|
|
230
|
-
* job — `registerProject` in step 1.3; the schema only demands absolute). */
|
|
231
|
-
root: z.ZodEffects<z.ZodString, string, string>;
|
|
232
|
-
/** Display name (basename by default). `''` = caller derives a fallback. */
|
|
233
|
-
name: z.ZodCatch<z.ZodString>;
|
|
234
|
-
addedAt: z.ZodCatch<z.ZodString>;
|
|
235
|
-
lastOpenedAt: z.ZodCatch<z.ZodString>;
|
|
236
|
-
source: z.ZodCatch<z.ZodEnum<["local", "checkout"]>>;
|
|
237
|
-
/** Per-project cap on concurrently running tasks. Absent = inherit the
|
|
238
|
-
* workspace `resources.maxParallel`. Bounded like the workspace cap; a bad
|
|
239
|
-
* value degrades to "inherit" (`.catch(undefined)`) rather than a hard
|
|
240
|
-
* default, and `.passthrough()` preserves the key across cezar round-trips. */
|
|
241
|
-
maxParallel: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
242
|
-
}, z.ZodTypeAny, "passthrough">[], unknown>;
|
|
243
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
60
|
+
}, z.core.$loose>>>;
|
|
61
|
+
composerDefaults: z.ZodCatch<z.ZodDefault<z.ZodObject<{
|
|
62
|
+
autonomous: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
63
|
+
worktree: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
64
|
+
}, z.core.$loose>>>;
|
|
65
|
+
disabledProviders: z.ZodPipe<z.ZodCatch<z.ZodDefault<z.ZodArray<z.ZodUnknown>>>, z.ZodTransform<("claude" | "codex" | "opencode" | "pi")[], unknown[]>>;
|
|
66
|
+
agentDefaults: z.ZodCatch<z.ZodDefault<z.ZodObject<{
|
|
67
|
+
runner: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
68
|
+
claude: "claude";
|
|
69
|
+
codex: "codex";
|
|
70
|
+
opencode: "opencode";
|
|
71
|
+
pi: "pi";
|
|
72
|
+
}>>>;
|
|
73
|
+
models: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
74
|
+
claude: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
75
|
+
codex: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
76
|
+
opencode: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
77
|
+
pi: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
78
|
+
}, z.core.$loose>>>;
|
|
79
|
+
}, z.core.$loose>>>;
|
|
80
|
+
projects: z.ZodPipe<z.ZodCatch<z.ZodDefault<z.ZodArray<z.ZodUnknown>>>, z.ZodTransform<{
|
|
81
|
+
[x: string]: unknown;
|
|
82
|
+
id: string;
|
|
83
|
+
root: string;
|
|
84
|
+
name: string;
|
|
85
|
+
addedAt: string;
|
|
86
|
+
lastOpenedAt: string;
|
|
87
|
+
source: "checkout" | "local";
|
|
88
|
+
maxParallel?: number | undefined;
|
|
89
|
+
tags?: string[] | undefined;
|
|
90
|
+
}[], unknown[]>>;
|
|
91
|
+
}, z.core.$loose>;
|
|
244
92
|
export type WorkspaceConfig = z.infer<typeof workspaceConfigSchema>;
|
|
93
|
+
/** Resolve the auto-update preference without mutating or materializing it. */
|
|
94
|
+
export declare function effectiveSkillsAutoUpdate(config: Pick<WorkspaceConfig, 'skillsAutoUpdate'>, env?: NodeJS.ProcessEnv): boolean;
|
|
95
|
+
export declare function effectiveComposerDefault(stored: boolean | undefined, envValue: string | undefined, fallback: boolean): boolean;
|
|
245
96
|
/** The in-memory default — what a missing/corrupt file behaves like. */
|
|
246
97
|
export declare function defaultWorkspaceConfig(): WorkspaceConfig;
|
|
98
|
+
/**
|
|
99
|
+
* The last-known-good copy of a NON-EMPTY registry, written beside the config
|
|
100
|
+
* by every successful merge-write. The registry is cheap to rebuild in theory
|
|
101
|
+
* ("open the project again"), but in practice it is a hand-curated list, and a
|
|
102
|
+
* single bad write — a crash between `writeFileSync` and `rename`, a full
|
|
103
|
+
* disk, a stray process — costs the user every entry. One extra file, no
|
|
104
|
+
* configuration, and `loadWorkspaceConfig` falls back to it.
|
|
105
|
+
*
|
|
106
|
+
* Removing `~/.cezar` still resets cezar completely; removing only
|
|
107
|
+
* `config.json` no longer does, because this snapshot restores it.
|
|
108
|
+
*
|
|
109
|
+
* A cezar older than this change does not refresh the snapshot, so on a machine
|
|
110
|
+
* that alternates between versions it can lag behind the registry — which only
|
|
111
|
+
* shows if the config file is also lost, and the worst case is a project the
|
|
112
|
+
* user unregistered reappearing. Cheap next to losing the whole list.
|
|
113
|
+
*/
|
|
114
|
+
export declare function workspaceConfigBackupPath(path?: string): string;
|
|
247
115
|
/**
|
|
248
116
|
* Read `~/.cezar/config.json` on demand — never cached, never throws. A
|
|
249
117
|
* missing file is the zero-config default (silent); an unreadable or
|
|
250
118
|
* malformed one degrades to the same default with a one-line warning and is
|
|
251
119
|
* left on disk untouched (the next successful merge-write replaces it).
|
|
120
|
+
*
|
|
121
|
+
* Before degrading, a missing, empty, or corrupt file is restored from the
|
|
122
|
+
* `config.json.bak` snapshot when that still holds projects. The restore is
|
|
123
|
+
* read-only: the recovered registry is handed back in memory and lands on disk
|
|
124
|
+
* again through the next merge-write, so a read never writes. A file that
|
|
125
|
+
* parses and simply has no projects is NOT restored — that is a user who
|
|
126
|
+
* removed their last project, not a lost registry.
|
|
127
|
+
*
|
|
128
|
+
* `path` defaults to the current `workspaceConfigPath()`, but a caller that
|
|
129
|
+
* will also WRITE passes the path it resolved itself — see
|
|
130
|
+
* `mergeWriteWorkspaceConfig` for why resolving it twice is a data-loss bug.
|
|
252
131
|
*/
|
|
253
|
-
export declare function loadWorkspaceConfig(): Promise<WorkspaceConfig>;
|
|
132
|
+
export declare function loadWorkspaceConfig(path?: string): Promise<WorkspaceConfig>;
|
|
254
133
|
/**
|
|
255
134
|
* The tmp path an atomic write stages through — UNIQUE PER WRITE, never a
|
|
256
135
|
* fixed `${path}.tmp`. `~/.cezar/` is shared by every cezar process on the
|
|
@@ -276,6 +155,15 @@ export declare function atomicWriteJsonSync(path: string, value: unknown): void;
|
|
|
276
155
|
* boot). The mutator may mutate its argument in place or return a replacement.
|
|
277
156
|
* Returns the config that was written. Throws on write failure (e.g. a
|
|
278
157
|
* read-only home) — degrading is the caller's policy, per house rules.
|
|
158
|
+
*
|
|
159
|
+
* The path is resolved ONCE, before the `await`, and the same value feeds the
|
|
160
|
+
* read and the write. Resolving it twice used to lose the whole registry:
|
|
161
|
+
* `workspaceConfigPath()` re-reads `CEZ_HOME` on every call, so if the variable
|
|
162
|
+
* changed while the read was in flight — a test's `afterEach` dropping its pin
|
|
163
|
+
* after a timeout is the way this happens in practice — the read came from one
|
|
164
|
+
* home and the write landed in another, replacing that file's registry with a
|
|
165
|
+
* config it never held. One resolution keeps a merge-write inside exactly one
|
|
166
|
+
* file, whatever the environment does mid-flight.
|
|
279
167
|
*/
|
|
280
168
|
export declare function mergeWriteWorkspaceConfig(mutator: (config: WorkspaceConfig) => WorkspaceConfig | void): Promise<WorkspaceConfig>;
|
|
281
169
|
export {};
|