@open-mercato/cezar 0.9.1 → 0.9.2
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 +19 -11
- package/dist/agent-config/catalog.d.ts +1 -1
- package/dist/agent-config/files.d.ts +1 -1
- package/dist/agent-config/service.d.ts +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 +9 -111
- package/dist/contract/agent-config.d.ts +151 -0
- package/dist/contract/automations.d.ts +911 -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 +15 -0
- package/dist/contract/index.js +1421 -0
- package/dist/contract/projects.d.ts +182 -0
- package/dist/contract/repo.d.ts +234 -0
- package/dist/contract/runs.d.ts +1226 -0
- package/dist/contract/skills.d.ts +225 -0
- package/dist/contract/workflows.d.ts +212 -0
- package/dist/contract/workspace.d.ts +442 -0
- package/dist/core/agent-env.d.ts +1 -1
- 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/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 +55 -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 +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 +62 -0
- package/dist/core/provider-auth.js +290 -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 +13 -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/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/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 +16 -1
- package/dist/paths.js +24 -1
- package/dist/paths.js.map +1 -1
- package/dist/planner.d.ts +2 -2
- package/dist/planner.js +1 -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/retention.d.ts +1 -1
- package/dist/runs/store.d.ts +142 -336
- package/dist/runs/store.js +136 -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/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 +11142 -47
- package/dist/server/server.js +1714 -806
- 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 +3 -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 +53 -12
- package/dist/workflows/run.js +436 -64
- 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/config.d.ts +68 -206
- package/dist/workspace/config.js +145 -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 +6 -0
- package/dist/workspace/semaphore.js +14 -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 +39 -1
- package/scripts/sync-readme.mjs +20 -0
- package/web/dist/assets/alert-dialog-ghffK6g9.js +1 -0
- package/web/dist/assets/arrow-down-Cz8qb71e.js +1 -0
- package/web/dist/assets/arrow-left-wcYKQXI_.js +1 -0
- package/web/dist/assets/bundle-mjs-BT31bpU6.js +1 -0
- package/web/dist/assets/centered-state-ZtnFHA-n.js +43 -0
- package/web/dist/assets/chevron-right-G4caF2QV.js +1 -0
- package/web/dist/assets/{chunk-BO2N2NFS-DtrdTCWa.js → chunk-BO2N2NFS-DE6qKn3r.js} +8 -8
- package/web/dist/assets/circle-check--KvBxXWp.js +1 -0
- package/web/dist/assets/circle-x-C3EFZ3xf.js +1 -0
- package/web/dist/assets/collapsible-B0JVzd0B.js +1 -0
- package/web/dist/assets/commit-list-wm6DPHNs.js +1 -0
- package/web/dist/assets/compare-variants-DbdP4Y5T.js +1 -0
- package/web/dist/assets/{core-DePtBHcl.js → core-BCsw8oQw.js} +1 -1
- package/web/dist/assets/diff-Bizc96qe.js +3 -0
- package/web/dist/assets/diff-stat-Dyfg3ltF.js +1 -0
- package/web/dist/assets/{diff-view-DCeSegKk.js → diff-view-CG8ek6tC.js} +4 -4
- package/web/dist/assets/dropdown-menu-C1Dlf35P.js +1 -0
- package/web/dist/assets/editable-title-5rC_QRBZ.js +1 -0
- package/web/dist/assets/{ellipsis-vertical-CNnSLn5a.js → ellipsis-vertical-DpGTRqC2.js} +1 -1
- package/web/dist/assets/{file-D4GBh1ao.js → file-DlUGpUlb.js} +1 -1
- package/web/dist/assets/folder-BAY6Vddy.js +1 -0
- package/web/dist/assets/{git-pull-request-DnR8Xh4_.js → git-pull-request-agOG0iGM.js} +1 -1
- package/web/dist/assets/git-toolbar-DGiNMmtY.js +1 -0
- package/web/dist/assets/github-Vp7lxYGQ.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-BWGk5fPX.js +1 -0
- package/web/dist/assets/index-DSxyJpuK.css +2 -0
- package/web/dist/assets/index-DiawI6RX.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-BGBOGCA_.js +2 -0
- package/web/dist/assets/mermaid-GHXKKRXX-C4jxqUUb.js +1 -0
- package/web/dist/assets/new-task-form-BpAw_Dks.js +1 -0
- package/web/dist/assets/pill-Dvs-P0xy.js +1 -0
- package/web/dist/assets/project-router-Cx8NPoqn.js +1 -0
- package/web/dist/assets/prompt-templates-CSBYBR1I.js +15 -0
- package/web/dist/assets/react-runtime-CCIEwYL0.js +9 -0
- package/web/dist/assets/{refresh-cw-BT8E96Tm.js → refresh-cw-BoGdAykg.js} +1 -1
- package/web/dist/assets/repo-git-PmX-BNMo.js +1 -0
- package/web/dist/assets/rolldown-runtime-QTnfLwEv.js +1 -0
- package/web/dist/assets/run-diff-EcOkf3ti.js +3 -0
- package/web/dist/assets/run-header-BGiv6_qX.js +1 -0
- package/web/dist/assets/{search-x-BDjaMrzG.js → search-x-X3EpVhgs.js} +1 -1
- package/web/dist/assets/skill-empty-hint-CZLALx6l.js +1 -0
- package/web/dist/assets/skills-BiWfHmCR.js +1 -0
- package/web/dist/assets/skills-CC91ouGH.js +1 -0
- package/web/dist/assets/sparkles-Dt4q7pbG.js +1 -0
- package/web/dist/assets/{square-terminal-Ckjjn0vb.js → square-terminal-hwBL8XsC.js} +1 -1
- package/web/dist/assets/tab-link-DIlR5T07.js +1 -0
- package/web/dist/assets/task-changes-XkHDxzQA.js +1 -0
- package/web/dist/assets/task-commits-BTTA5k5T.js +1 -0
- package/web/dist/assets/task-files-Da8_4C9g.js +2 -0
- package/web/dist/assets/task-thread-DoNXUsHr.js +9 -0
- package/web/dist/assets/textarea-CUdokhkv.js +1 -0
- package/web/dist/assets/thread-loading-B8q8ukXJ.js +1 -0
- package/web/dist/assets/{trash-2-DAyZ0VSi.js → trash-2-DhVIdWv8.js} +1 -1
- package/web/dist/assets/{triangle-alert-Uy8rokUh.js → triangle-alert-XYT0DGCI.js} +1 -1
- package/web/dist/assets/{upload-CDdyPPo_.js → upload-BKjN59-1.js} +1 -1
- package/web/dist/assets/use-desktop-Bf5LS_P4.js +1 -0
- package/web/dist/assets/use-submit-shortcut-CzVyoAMd.js +1 -0
- package/web/dist/assets/utils-DsLuRXwV.js +64 -0
- package/web/dist/assets/workflows-o2QU_pvU.js +11 -0
- package/web/dist/assets/zoomable-image-7WyUiaVD.js +1 -0
- package/web/dist/index.html +32 -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/dist/config.d.ts
CHANGED
|
@@ -6,140 +6,38 @@ import { z } from 'zod';
|
|
|
6
6
|
* can be overridden or emptied (`"skillsRepos": []` disables team skills).
|
|
7
7
|
*/
|
|
8
8
|
declare const skillsRepoSchema: z.ZodObject<{
|
|
9
|
-
/** `owner/name` (GitHub shorthand), a full git URL, or a local/file:// path. */
|
|
10
9
|
repo: z.ZodString;
|
|
11
10
|
ref: z.ZodDefault<z.ZodString>;
|
|
12
|
-
},
|
|
13
|
-
repo: string;
|
|
14
|
-
ref: string;
|
|
15
|
-
}, {
|
|
16
|
-
repo: string;
|
|
17
|
-
ref?: string | undefined;
|
|
18
|
-
}>;
|
|
11
|
+
}, z.core.$strip>;
|
|
19
12
|
export type SkillsRepoSource = z.infer<typeof skillsRepoSchema>;
|
|
20
13
|
export declare const DEFAULT_SKILLS_REPOS: SkillsRepoSource[];
|
|
21
14
|
/** Last-resort retention when neither the repo nor the workspace says anything. */
|
|
22
15
|
export declare const DEFAULT_WORKTREE_RETENTION = 10;
|
|
23
16
|
declare const configSchema: z.ZodObject<{
|
|
24
17
|
skillsRepos: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
25
|
-
/** `owner/name` (GitHub shorthand), a full git URL, or a local/file:// path. */
|
|
26
18
|
repo: z.ZodString;
|
|
27
19
|
ref: z.ZodDefault<z.ZodString>;
|
|
28
|
-
},
|
|
29
|
-
repo: string;
|
|
30
|
-
ref: string;
|
|
31
|
-
}, {
|
|
32
|
-
repo: string;
|
|
33
|
-
ref?: string | undefined;
|
|
34
|
-
}>, "many">>;
|
|
35
|
-
/** How many tasks may run at once (spec 006). Non-git dirs always run 1. */
|
|
20
|
+
}, z.core.$strip>>>;
|
|
36
21
|
maxParallel: z.ZodDefault<z.ZodNumber>;
|
|
37
|
-
/**
|
|
38
|
-
* Count-based worktree retention (#483): keep the last N *finished*
|
|
39
|
-
* worktrees materialized on disk; reclaim older ones (directory only — the
|
|
40
|
-
* `cez/<id8>` branch is kept, so the work stays recoverable). 0 = unlimited
|
|
41
|
-
* (never auto-reclaim). Default 10. `.catch(10)` keeps it additive-safe: a
|
|
42
|
-
* bad value degrades to the default instead of discarding the rest.
|
|
43
|
-
*/
|
|
44
22
|
worktreeRetention: z.ZodCatch<z.ZodDefault<z.ZodNumber>>;
|
|
45
|
-
/**
|
|
46
|
-
* Per-task memory ceiling in MiB (whole process tree). When a running task's
|
|
47
|
-
* RSS crosses this the engine pauses it with a warning and lets the queue
|
|
48
|
-
* advance (#memory-guard). 0 / unset = no limit. `.catch(undefined)` keeps
|
|
49
|
-
* the key additive-safe: a bad value degrades to "no limit".
|
|
50
|
-
*/
|
|
51
23
|
memoryLimitMb: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
defaultRunner: z.ZodDefault<z.ZodEnum<["claude", "codex", "opencode"]>>;
|
|
58
|
-
/** Model for the chain planner (spec 008) — cheap but reliable at JSON. */
|
|
24
|
+
defaultRunner: z.ZodDefault<z.ZodEnum<{
|
|
25
|
+
claude: "claude";
|
|
26
|
+
codex: "codex";
|
|
27
|
+
opencode: "opencode";
|
|
28
|
+
}>>;
|
|
59
29
|
plannerModel: z.ZodDefault<z.ZodString>;
|
|
60
|
-
/** Model for the task namer (spec 2026-07-17-task-auto-naming) — the cheapest
|
|
61
|
-
* alias that answers strict JSON; naming is fire-and-forget and never blocks. */
|
|
62
30
|
namerModel: z.ZodDefault<z.ZodString>;
|
|
63
|
-
/** Live title updates: refresh the display title through the namer on each
|
|
64
|
-
* turn end. Absent = the `CEZ_TITLE_UPDATES` env decides (default ON — owner
|
|
65
|
-
* decision on PR #479). */
|
|
66
31
|
liveTitleUpdates: z.ZodOptional<z.ZodBoolean>;
|
|
67
|
-
/** Optional diff-first review gate (#489): when a successful run with changes
|
|
68
|
-
* should park at `review` for a human. Absent = the `CEZ_REVIEW_GATE` env
|
|
69
|
-
* decides (default OFF — the deliberate inverse of `liveTitleUpdates`).
|
|
70
|
-
* Autonomous runs always skip the gate regardless of this. */
|
|
71
32
|
reviewGate: z.ZodOptional<z.ZodBoolean>;
|
|
72
|
-
/**
|
|
73
|
-
* Branch task worktrees fork from and draft PRs target (e.g. `develop`).
|
|
74
|
-
* Unset = the branch currently checked out. Settable from the Repo tab.
|
|
75
|
-
*/
|
|
76
33
|
baseBranch: z.ZodOptional<z.ZodString>;
|
|
77
|
-
/**
|
|
78
|
-
* Default extra system prompt applied to every run's agent steps (claude:
|
|
79
|
-
* `--append-system-prompt`; codex/opencode: prepended to the opening user
|
|
80
|
-
* message — the AgentRunSpec seam handles the per-backend delivery).
|
|
81
|
-
* Settings is the single edit place; `POST /api/runs` can override it per
|
|
82
|
-
* run (`systemPrompt`). `.catch(undefined)` keeps the key additive-safe: a
|
|
83
|
-
* bad value degrades to unset without discarding the rest of the config.
|
|
84
|
-
*/
|
|
85
34
|
systemPrompt: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
86
|
-
/**
|
|
87
|
-
* Per-runner default model preset (Settings → Agents, redesign R6 1.5): the
|
|
88
|
-
* model id the composer preselects for that runner. Missing = auto (the
|
|
89
|
-
* runner decides). A capability (`model`), never a vendor config format.
|
|
90
|
-
* `.catch(undefined)` keeps the key additive-safe like `systemPrompt`: a
|
|
91
|
-
* bad value degrades to unset without discarding the rest of the config.
|
|
92
|
-
*/
|
|
93
35
|
defaultModels: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
94
36
|
claude: z.ZodOptional<z.ZodString>;
|
|
95
37
|
codex: z.ZodOptional<z.ZodString>;
|
|
96
38
|
opencode: z.ZodOptional<z.ZodString>;
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
codex?: string | undefined;
|
|
100
|
-
opencode?: string | undefined;
|
|
101
|
-
}, {
|
|
102
|
-
claude?: string | undefined;
|
|
103
|
-
codex?: string | undefined;
|
|
104
|
-
opencode?: string | undefined;
|
|
105
|
-
}>>>;
|
|
106
|
-
}, "strip", z.ZodTypeAny, {
|
|
107
|
-
skillsRepos: {
|
|
108
|
-
repo: string;
|
|
109
|
-
ref: string;
|
|
110
|
-
}[];
|
|
111
|
-
maxParallel: number;
|
|
112
|
-
worktreeRetention: number;
|
|
113
|
-
memoryLimitMb?: number | undefined;
|
|
114
|
-
defaultRunner: "claude" | "codex" | "opencode";
|
|
115
|
-
plannerModel: string;
|
|
116
|
-
namerModel: string;
|
|
117
|
-
liveTitleUpdates?: boolean | undefined;
|
|
118
|
-
reviewGate?: boolean | undefined;
|
|
119
|
-
baseBranch?: string | undefined;
|
|
120
|
-
systemPrompt?: string | undefined;
|
|
121
|
-
defaultModels?: {
|
|
122
|
-
claude?: string | undefined;
|
|
123
|
-
codex?: string | undefined;
|
|
124
|
-
opencode?: string | undefined;
|
|
125
|
-
} | undefined;
|
|
126
|
-
}, {
|
|
127
|
-
skillsRepos?: {
|
|
128
|
-
repo: string;
|
|
129
|
-
ref?: string | undefined;
|
|
130
|
-
}[] | undefined;
|
|
131
|
-
maxParallel?: number | undefined;
|
|
132
|
-
worktreeRetention?: unknown;
|
|
133
|
-
memoryLimitMb?: unknown;
|
|
134
|
-
defaultRunner?: "claude" | "codex" | "opencode" | undefined;
|
|
135
|
-
plannerModel?: string | undefined;
|
|
136
|
-
namerModel?: string | undefined;
|
|
137
|
-
liveTitleUpdates?: boolean | undefined;
|
|
138
|
-
reviewGate?: boolean | undefined;
|
|
139
|
-
baseBranch?: string | undefined;
|
|
140
|
-
systemPrompt?: unknown;
|
|
141
|
-
defaultModels?: unknown;
|
|
142
|
-
}>;
|
|
39
|
+
}, z.core.$strip>>>;
|
|
40
|
+
}, z.core.$strip>;
|
|
143
41
|
export type CezConfig = z.infer<typeof configSchema>;
|
|
144
42
|
/** Read `.ai/cezar/config.json` on demand — never cached, never throws. */
|
|
145
43
|
export declare function loadConfig(repoRoot: string): Promise<CezConfig>;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The agent-config surface (spec #404): the settings / memory / MCP files the installed agent
|
|
4
|
+
* CLIs read, listed and edited through `GET/PUT /agent-config[/:id]`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const agentConfigFormatSchema: z.ZodEnum<{
|
|
7
|
+
json: "json";
|
|
8
|
+
jsonc: "jsonc";
|
|
9
|
+
markdown: "markdown";
|
|
10
|
+
toml: "toml";
|
|
11
|
+
}>;
|
|
12
|
+
export type AgentConfigFormat = z.infer<typeof agentConfigFormatSchema>;
|
|
13
|
+
export declare const agentConfigScopeSchema: z.ZodEnum<{
|
|
14
|
+
local: "local";
|
|
15
|
+
project: "project";
|
|
16
|
+
user: "user";
|
|
17
|
+
}>;
|
|
18
|
+
export type AgentConfigScope = z.infer<typeof agentConfigScopeSchema>;
|
|
19
|
+
/** `settings` = behavior knobs; `memory` = instruction/markdown; `mcp` = a dedicated MCP file. */
|
|
20
|
+
export declare const agentConfigKindSchema: z.ZodEnum<{
|
|
21
|
+
mcp: "mcp";
|
|
22
|
+
memory: "memory";
|
|
23
|
+
settings: "settings";
|
|
24
|
+
}>;
|
|
25
|
+
export type AgentConfigKind = z.infer<typeof agentConfigKindSchema>;
|
|
26
|
+
/** Git status BY CONVENTION — it drives the honest label; it is not read from git. */
|
|
27
|
+
export declare const agentConfigTrackedSchema: z.ZodEnum<{
|
|
28
|
+
gitignored: "gitignored";
|
|
29
|
+
"outside-repo": "outside-repo";
|
|
30
|
+
tracked: "tracked";
|
|
31
|
+
}>;
|
|
32
|
+
export type AgentConfigTracked = z.infer<typeof agentConfigTrackedSchema>;
|
|
33
|
+
/** One catalog file plus its current on-disk state. */
|
|
34
|
+
export declare const agentConfigFileSchema: z.ZodObject<{
|
|
35
|
+
id: z.ZodString;
|
|
36
|
+
runners: z.ZodArray<z.ZodEnum<{
|
|
37
|
+
claude: "claude";
|
|
38
|
+
codex: "codex";
|
|
39
|
+
opencode: "opencode";
|
|
40
|
+
}>>;
|
|
41
|
+
kind: z.ZodEnum<{
|
|
42
|
+
mcp: "mcp";
|
|
43
|
+
memory: "memory";
|
|
44
|
+
settings: "settings";
|
|
45
|
+
}>;
|
|
46
|
+
scope: z.ZodEnum<{
|
|
47
|
+
local: "local";
|
|
48
|
+
project: "project";
|
|
49
|
+
user: "user";
|
|
50
|
+
}>;
|
|
51
|
+
label: z.ZodString;
|
|
52
|
+
path: z.ZodString;
|
|
53
|
+
format: z.ZodEnum<{
|
|
54
|
+
json: "json";
|
|
55
|
+
jsonc: "jsonc";
|
|
56
|
+
markdown: "markdown";
|
|
57
|
+
toml: "toml";
|
|
58
|
+
}>;
|
|
59
|
+
tracked: z.ZodEnum<{
|
|
60
|
+
gitignored: "gitignored";
|
|
61
|
+
"outside-repo": "outside-repo";
|
|
62
|
+
tracked: "tracked";
|
|
63
|
+
}>;
|
|
64
|
+
seeded: z.ZodBoolean;
|
|
65
|
+
holdsMcp: z.ZodBoolean;
|
|
66
|
+
precedence: z.ZodString;
|
|
67
|
+
hotReload: z.ZodOptional<z.ZodString>;
|
|
68
|
+
docsUrl: z.ZodString;
|
|
69
|
+
exists: z.ZodBoolean;
|
|
70
|
+
size: z.ZodNumber;
|
|
71
|
+
version: z.ZodNullable<z.ZodString>;
|
|
72
|
+
writable: z.ZodBoolean;
|
|
73
|
+
readOnlyReason: z.ZodOptional<z.ZodString>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
export type AgentConfigFile = z.infer<typeof agentConfigFileSchema>;
|
|
76
|
+
/** Read-only listing of the MCP servers Claude keeps in `~/.claude.json`. */
|
|
77
|
+
export declare const userMcpListingSchema: z.ZodObject<{
|
|
78
|
+
path: z.ZodString;
|
|
79
|
+
servers: z.ZodArray<z.ZodString>;
|
|
80
|
+
readable: z.ZodBoolean;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
export type UserMcpListing = z.infer<typeof userMcpListingSchema>;
|
|
83
|
+
/** `GET /agent-config` — the whole panel in one read. */
|
|
84
|
+
export declare const agentConfigListingSchema: z.ZodObject<{
|
|
85
|
+
editable: z.ZodBoolean;
|
|
86
|
+
files: z.ZodArray<z.ZodObject<{
|
|
87
|
+
id: z.ZodString;
|
|
88
|
+
runners: z.ZodArray<z.ZodEnum<{
|
|
89
|
+
claude: "claude";
|
|
90
|
+
codex: "codex";
|
|
91
|
+
opencode: "opencode";
|
|
92
|
+
}>>;
|
|
93
|
+
kind: z.ZodEnum<{
|
|
94
|
+
mcp: "mcp";
|
|
95
|
+
memory: "memory";
|
|
96
|
+
settings: "settings";
|
|
97
|
+
}>;
|
|
98
|
+
scope: z.ZodEnum<{
|
|
99
|
+
local: "local";
|
|
100
|
+
project: "project";
|
|
101
|
+
user: "user";
|
|
102
|
+
}>;
|
|
103
|
+
label: z.ZodString;
|
|
104
|
+
path: z.ZodString;
|
|
105
|
+
format: z.ZodEnum<{
|
|
106
|
+
json: "json";
|
|
107
|
+
jsonc: "jsonc";
|
|
108
|
+
markdown: "markdown";
|
|
109
|
+
toml: "toml";
|
|
110
|
+
}>;
|
|
111
|
+
tracked: z.ZodEnum<{
|
|
112
|
+
gitignored: "gitignored";
|
|
113
|
+
"outside-repo": "outside-repo";
|
|
114
|
+
tracked: "tracked";
|
|
115
|
+
}>;
|
|
116
|
+
seeded: z.ZodBoolean;
|
|
117
|
+
holdsMcp: z.ZodBoolean;
|
|
118
|
+
precedence: z.ZodString;
|
|
119
|
+
hotReload: z.ZodOptional<z.ZodString>;
|
|
120
|
+
docsUrl: z.ZodString;
|
|
121
|
+
exists: z.ZodBoolean;
|
|
122
|
+
size: z.ZodNumber;
|
|
123
|
+
version: z.ZodNullable<z.ZodString>;
|
|
124
|
+
writable: z.ZodBoolean;
|
|
125
|
+
readOnlyReason: z.ZodOptional<z.ZodString>;
|
|
126
|
+
}, z.core.$strip>>;
|
|
127
|
+
userMcp: z.ZodNullable<z.ZodObject<{
|
|
128
|
+
path: z.ZodString;
|
|
129
|
+
servers: z.ZodArray<z.ZodString>;
|
|
130
|
+
readable: z.ZodBoolean;
|
|
131
|
+
}, z.core.$strip>>;
|
|
132
|
+
}, z.core.$strip>;
|
|
133
|
+
export type AgentConfigListing = z.infer<typeof agentConfigListingSchema>;
|
|
134
|
+
/** `GET /agent-config/:id` and the `PUT` echo — one file's bytes plus its stale-write token. */
|
|
135
|
+
export declare const agentConfigFileContentSchema: z.ZodObject<{
|
|
136
|
+
id: z.ZodString;
|
|
137
|
+
path: z.ZodString;
|
|
138
|
+
exists: z.ZodBoolean;
|
|
139
|
+
content: z.ZodString;
|
|
140
|
+
version: z.ZodNullable<z.ZodString>;
|
|
141
|
+
}, z.core.$strip>;
|
|
142
|
+
export type AgentConfigFileContent = z.infer<typeof agentConfigFileContentSchema>;
|
|
143
|
+
/**
|
|
144
|
+
* `PUT /agent-config/:id` body. `version` is the token from the read that produced `content` —
|
|
145
|
+
* `null` means "I expect no file to exist yet" (the create path); a mismatch is a 409.
|
|
146
|
+
*/
|
|
147
|
+
export declare const setAgentConfigInputSchema: z.ZodObject<{
|
|
148
|
+
content: z.ZodString;
|
|
149
|
+
version: z.ZodNullable<z.ZodString>;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
export type SetAgentConfigInput = z.infer<typeof setAgentConfigInputSchema>;
|