@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
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type Runner } from './health.ts';
|
|
3
|
+
/**
|
|
4
|
+
* The workspace + settings families: `~/.cezar/config.json`'s settings slice, both GUI-pref bags
|
|
5
|
+
* (per-repo and workspace), the per-repo agent knobs, provider auth status, the host model
|
|
6
|
+
* catalog, the skills-update state, and the "Open in…" targets.
|
|
7
|
+
*
|
|
8
|
+
* Node-free by construction (see README rule 1) — `zod` and the sibling contract modules only.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* `GET/PUT /api/v1/workspace/config` — the settings slice of `~/.cezar/config.json` (step 2.7).
|
|
12
|
+
*
|
|
13
|
+
* Global knobs only: the registry itself is `GET /api/v1/projects`, and `schemaVersion` (a
|
|
14
|
+
* migration cursor, not a setting) is deliberately absent. `resources` is the workspace's
|
|
15
|
+
* host-protection budget — the ONLY effective `maxParallel`/`memoryLimitMb` since Phase 2;
|
|
16
|
+
* `worktreeRetentionDefault` seeds projects that set none.
|
|
17
|
+
*
|
|
18
|
+
* `composerDefaults` and every `resources` key are REQUIRED: `workspaceConfigBody`
|
|
19
|
+
* (src/server/server.ts:1888) materializes all of them from schema defaults on every answer,
|
|
20
|
+
* including the degraded path. The hand-written DTO declared `composerDefaults`,
|
|
21
|
+
* `resources.maxMonitoringSessions` and `resources.monitoringWakeIntervalMinutes` optional, which
|
|
22
|
+
* was wider than the server has ever been.
|
|
23
|
+
*/
|
|
24
|
+
export declare const workspaceConfigResponseSchema: z.ZodObject<{
|
|
25
|
+
browseRoot: z.ZodString;
|
|
26
|
+
projectsDir: z.ZodString;
|
|
27
|
+
skillsAutoUpdate: z.ZodNullable<z.ZodBoolean>;
|
|
28
|
+
effectiveSkillsAutoUpdate: z.ZodBoolean;
|
|
29
|
+
composerDefaults: z.ZodObject<{
|
|
30
|
+
autonomous: z.ZodNullable<z.ZodBoolean>;
|
|
31
|
+
worktree: z.ZodNullable<z.ZodBoolean>;
|
|
32
|
+
inheritedAutonomous: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"source-dependent">]>;
|
|
33
|
+
inheritedWorktree: z.ZodBoolean;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
resources: z.ZodObject<{
|
|
36
|
+
maxParallel: z.ZodNumber;
|
|
37
|
+
maxMonitoringSessions: z.ZodNumber;
|
|
38
|
+
monitoringWakeIntervalMinutes: z.ZodNullable<z.ZodNumber>;
|
|
39
|
+
memoryLimitMb: z.ZodNullable<z.ZodNumber>;
|
|
40
|
+
worktreeRetentionDefault: z.ZodNumber;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
export type WorkspaceConfigResponse = z.infer<typeof workspaceConfigResponseSchema>;
|
|
44
|
+
/**
|
|
45
|
+
* `PUT /api/v1/workspace/config` body — partial: absent keys stay untouched. A rejected workspace
|
|
46
|
+
* root (not writable) 400s with the reason and persists NOTHING, resources included, so callers
|
|
47
|
+
* may send both in one request only if they want that atomicity. Bounds mirror
|
|
48
|
+
* `src/workspace/config.ts` exactly, so a value this schema accepts can never be degraded away by
|
|
49
|
+
* the next load's `.catch`.
|
|
50
|
+
*/
|
|
51
|
+
export declare const setWorkspaceConfigInputSchema: z.ZodObject<{
|
|
52
|
+
browseRoot: z.ZodOptional<z.ZodString>;
|
|
53
|
+
projectsDir: z.ZodOptional<z.ZodString>;
|
|
54
|
+
skillsAutoUpdate: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
55
|
+
composerDefaults: z.ZodOptional<z.ZodObject<{
|
|
56
|
+
autonomous: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
57
|
+
worktree: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
60
|
+
maxParallel: z.ZodOptional<z.ZodNumber>;
|
|
61
|
+
maxMonitoringSessions: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
monitoringWakeIntervalMinutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
63
|
+
memoryLimitMb: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
64
|
+
worktreeRetentionDefault: z.ZodOptional<z.ZodNumber>;
|
|
65
|
+
}, z.core.$strip>>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
export type SetWorkspaceConfigInput = z.infer<typeof setWorkspaceConfigInputSchema>;
|
|
68
|
+
/**
|
|
69
|
+
* `GET/PUT /api/v1/ui-state` — the per-repo GUI prefs in `.ai/cezar/ui-state.json`.
|
|
70
|
+
*
|
|
71
|
+
* An OPEN bag on purpose (BACKWARD_COMPATIBILITY.md §3): unknown keys round-trip untouched, so a
|
|
72
|
+
* newer cockpit's prefs survive an older server and a future pref needs no server change. Hence
|
|
73
|
+
* `z.looseObject`, not a closed object — the keys below are the ones the server's schema *names*,
|
|
74
|
+
* never the ones it *permits*. The write side caps the TOP-LEVEL key count at 200 (#429); that cap
|
|
75
|
+
* is a request-body refinement in `src/server/server.ts` (`capUiStateKeys`, :756) and is not part
|
|
76
|
+
* of the response shape.
|
|
77
|
+
*
|
|
78
|
+
* `notifications` is deliberately NOT here: it moved to `WorkspaceUiState` at step 3.5 and the
|
|
79
|
+
* per-repo schema (src/server/server.ts:550) has not named it since. The hand-written DTO still
|
|
80
|
+
* listed it, which made it wider than the route.
|
|
81
|
+
*/
|
|
82
|
+
export declare const uiStateSchema: z.ZodObject<{
|
|
83
|
+
lastTask: z.ZodOptional<z.ZodObject<{
|
|
84
|
+
source: z.ZodEnum<{
|
|
85
|
+
skill: "skill";
|
|
86
|
+
workflow: "workflow";
|
|
87
|
+
}>;
|
|
88
|
+
ref: z.ZodString;
|
|
89
|
+
}, z.core.$strip>>;
|
|
90
|
+
recentSources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
91
|
+
source: z.ZodEnum<{
|
|
92
|
+
skill: "skill";
|
|
93
|
+
workflow: "workflow";
|
|
94
|
+
}>;
|
|
95
|
+
ref: z.ZodString;
|
|
96
|
+
}, z.core.$strip>>>;
|
|
97
|
+
lastWorktree: z.ZodOptional<z.ZodBoolean>;
|
|
98
|
+
lastAutonomous: z.ZodOptional<z.ZodBoolean>;
|
|
99
|
+
lastGenerateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
100
|
+
skillUsage: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
101
|
+
runsView: z.ZodOptional<z.ZodEnum<{
|
|
102
|
+
list: "list";
|
|
103
|
+
table: "table";
|
|
104
|
+
}>>;
|
|
105
|
+
githubView: z.ZodOptional<z.ZodEnum<{
|
|
106
|
+
issues: "issues";
|
|
107
|
+
prs: "prs";
|
|
108
|
+
}>>;
|
|
109
|
+
appearance: z.ZodOptional<z.ZodObject<{
|
|
110
|
+
accent: z.ZodOptional<z.ZodEnum<{
|
|
111
|
+
lime: "lime";
|
|
112
|
+
violet: "violet";
|
|
113
|
+
}>>;
|
|
114
|
+
density: z.ZodOptional<z.ZodEnum<{
|
|
115
|
+
comfortable: "comfortable";
|
|
116
|
+
compact: "compact";
|
|
117
|
+
ultra: "ultra";
|
|
118
|
+
}>>;
|
|
119
|
+
}, z.core.$strip>>;
|
|
120
|
+
promptTemplates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
121
|
+
id: z.ZodString;
|
|
122
|
+
label: z.ZodString;
|
|
123
|
+
text: z.ZodString;
|
|
124
|
+
skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
125
|
+
}, z.core.$strip>>>;
|
|
126
|
+
dismissedSkillsBanner: z.ZodOptional<z.ZodBoolean>;
|
|
127
|
+
}, z.core.$loose>;
|
|
128
|
+
export type UiState = z.infer<typeof uiStateSchema>;
|
|
129
|
+
/**
|
|
130
|
+
* `GET/PUT /api/v1/workspace/ui-state` — cross-project GUI prefs in `~/.cezar/ui-state.json`
|
|
131
|
+
* (multi-project spec, step 2.7).
|
|
132
|
+
*
|
|
133
|
+
* The same open bag as its per-repo twin above, and open for the same reason. The PUT merges
|
|
134
|
+
* SHALLOWLY at the top level server-side, so a writer must send the whole `sidebar` object (or the
|
|
135
|
+
* whole `importedSkills` array), never a leaf.
|
|
136
|
+
*/
|
|
137
|
+
export declare const workspaceLastLocationSchema: z.ZodObject<{
|
|
138
|
+
projectId: z.ZodString;
|
|
139
|
+
pathname: z.ZodString;
|
|
140
|
+
search: z.ZodOptional<z.ZodString>;
|
|
141
|
+
hash: z.ZodOptional<z.ZodString>;
|
|
142
|
+
}, z.core.$strict>;
|
|
143
|
+
export type WorkspaceLastLocation = z.infer<typeof workspaceLastLocationSchema>;
|
|
144
|
+
export declare const workspaceUiStateSchema: z.ZodObject<{
|
|
145
|
+
sidebar: z.ZodOptional<z.ZodObject<{
|
|
146
|
+
collapsed: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
147
|
+
}, z.core.$loose>>;
|
|
148
|
+
dismissedProviderAuthFailures: z.ZodOptional<z.ZodObject<{
|
|
149
|
+
claude: z.ZodOptional<z.ZodString>;
|
|
150
|
+
codex: z.ZodOptional<z.ZodString>;
|
|
151
|
+
opencode: z.ZodOptional<z.ZodString>;
|
|
152
|
+
}, z.core.$strip>>;
|
|
153
|
+
appearance: z.ZodOptional<z.ZodObject<{
|
|
154
|
+
accent: z.ZodOptional<z.ZodEnum<{
|
|
155
|
+
lime: "lime";
|
|
156
|
+
violet: "violet";
|
|
157
|
+
}>>;
|
|
158
|
+
density: z.ZodOptional<z.ZodEnum<{
|
|
159
|
+
comfortable: "comfortable";
|
|
160
|
+
compact: "compact";
|
|
161
|
+
ultra: "ultra";
|
|
162
|
+
}>>;
|
|
163
|
+
}, z.core.$strip>>;
|
|
164
|
+
notifications: z.ZodOptional<z.ZodObject<{
|
|
165
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
166
|
+
}, z.core.$loose>>;
|
|
167
|
+
lastLocation: z.ZodOptional<z.ZodObject<{
|
|
168
|
+
projectId: z.ZodString;
|
|
169
|
+
pathname: z.ZodString;
|
|
170
|
+
search: z.ZodOptional<z.ZodString>;
|
|
171
|
+
hash: z.ZodOptional<z.ZodString>;
|
|
172
|
+
}, z.core.$strict>>;
|
|
173
|
+
importedSkills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
174
|
+
}, z.core.$loose>;
|
|
175
|
+
export type WorkspaceUiState = z.infer<typeof workspaceUiStateSchema>;
|
|
176
|
+
/** Per-runner default model preset (Settings → Agents): the composer preselects this model id for
|
|
177
|
+
* the runner. Absent = auto (the runner decides). Keyed by runner name rather than derived from
|
|
178
|
+
* `runnerSchema` because the server's own `defaultModels` object (src/config.ts:92) is spelled
|
|
179
|
+
* the same way — one key per runner, each independently optional. */
|
|
180
|
+
export declare const runnerModelsSchema: z.ZodObject<{
|
|
181
|
+
claude: z.ZodOptional<z.ZodString>;
|
|
182
|
+
codex: z.ZodOptional<z.ZodString>;
|
|
183
|
+
opencode: z.ZodOptional<z.ZodString>;
|
|
184
|
+
}, z.core.$strip>;
|
|
185
|
+
export type RunnerModels = z.infer<typeof runnerModelsSchema>;
|
|
186
|
+
/** `GET /api/v1/config` — every Settings → Agents knob in one read. */
|
|
187
|
+
export declare const configResponseSchema: z.ZodObject<{
|
|
188
|
+
baseBranch: z.ZodNullable<z.ZodString>;
|
|
189
|
+
defaultRunner: z.ZodEnum<{
|
|
190
|
+
claude: "claude";
|
|
191
|
+
codex: "codex";
|
|
192
|
+
opencode: "opencode";
|
|
193
|
+
}>;
|
|
194
|
+
systemPrompt: z.ZodNullable<z.ZodString>;
|
|
195
|
+
defaultModels: z.ZodObject<{
|
|
196
|
+
claude: z.ZodOptional<z.ZodString>;
|
|
197
|
+
codex: z.ZodOptional<z.ZodString>;
|
|
198
|
+
opencode: z.ZodOptional<z.ZodString>;
|
|
199
|
+
}, z.core.$strip>;
|
|
200
|
+
maxParallel: z.ZodNumber;
|
|
201
|
+
memoryLimitMb: z.ZodNullable<z.ZodNumber>;
|
|
202
|
+
worktreeRetention: z.ZodNumber;
|
|
203
|
+
liveTitleUpdates: z.ZodNullable<z.ZodBoolean>;
|
|
204
|
+
reviewGate: z.ZodNullable<z.ZodBoolean>;
|
|
205
|
+
}, z.core.$strip>;
|
|
206
|
+
export type ConfigResponse = z.infer<typeof configResponseSchema>;
|
|
207
|
+
/** The `PUT /api/v1/config` answer: the same shape GET serves (`configAnswer` builds both). */
|
|
208
|
+
export declare const setConfigResponseSchema: z.ZodObject<{
|
|
209
|
+
baseBranch: z.ZodNullable<z.ZodString>;
|
|
210
|
+
defaultRunner: z.ZodEnum<{
|
|
211
|
+
claude: "claude";
|
|
212
|
+
codex: "codex";
|
|
213
|
+
opencode: "opencode";
|
|
214
|
+
}>;
|
|
215
|
+
systemPrompt: z.ZodNullable<z.ZodString>;
|
|
216
|
+
defaultModels: z.ZodObject<{
|
|
217
|
+
claude: z.ZodOptional<z.ZodString>;
|
|
218
|
+
codex: z.ZodOptional<z.ZodString>;
|
|
219
|
+
opencode: z.ZodOptional<z.ZodString>;
|
|
220
|
+
}, z.core.$strip>;
|
|
221
|
+
maxParallel: z.ZodNumber;
|
|
222
|
+
memoryLimitMb: z.ZodNullable<z.ZodNumber>;
|
|
223
|
+
worktreeRetention: z.ZodNumber;
|
|
224
|
+
liveTitleUpdates: z.ZodNullable<z.ZodBoolean>;
|
|
225
|
+
reviewGate: z.ZodNullable<z.ZodBoolean>;
|
|
226
|
+
}, z.core.$strip>;
|
|
227
|
+
export type SetConfigResponse = z.infer<typeof setConfigResponseSchema>;
|
|
228
|
+
/**
|
|
229
|
+
* `PUT /api/v1/config` body (Settings → Agents; the Repo tab's base-branch picker).
|
|
230
|
+
* `baseBranch: null` clears the setting back to "follow checked-out branch"; `systemPrompt` and
|
|
231
|
+
* per-runner `defaultModels` entries clear on `null` (or `''`) too. Merged into the raw
|
|
232
|
+
* config.json server-side — `defaultModels` merges per runner, so one write never clobbers
|
|
233
|
+
* another runner's preset.
|
|
234
|
+
*/
|
|
235
|
+
export declare const setConfigInputSchema: z.ZodObject<{
|
|
236
|
+
baseBranch: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
237
|
+
defaultRunner: z.ZodOptional<z.ZodEnum<{
|
|
238
|
+
claude: "claude";
|
|
239
|
+
codex: "codex";
|
|
240
|
+
opencode: "opencode";
|
|
241
|
+
}>>;
|
|
242
|
+
systemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
243
|
+
defaultModels: z.ZodOptional<z.ZodObject<{
|
|
244
|
+
claude: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
245
|
+
codex: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
246
|
+
opencode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
247
|
+
}, z.core.$strip>>;
|
|
248
|
+
maxParallel: z.ZodOptional<z.ZodNumber>;
|
|
249
|
+
memoryLimitMb: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
250
|
+
worktreeRetention: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
251
|
+
liveTitleUpdates: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
252
|
+
reviewGate: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
253
|
+
}, z.core.$strip>;
|
|
254
|
+
export type SetConfigInput = z.infer<typeof setConfigInputSchema>;
|
|
255
|
+
export declare const skillsUpdateStatusSchema: z.ZodEnum<{
|
|
256
|
+
available: "available";
|
|
257
|
+
checking: "checking";
|
|
258
|
+
current: "current";
|
|
259
|
+
error: "error";
|
|
260
|
+
idle: "idle";
|
|
261
|
+
unavailable: "unavailable";
|
|
262
|
+
updating: "updating";
|
|
263
|
+
}>;
|
|
264
|
+
export type SkillsUpdateStatus = z.infer<typeof skillsUpdateStatusSchema>;
|
|
265
|
+
export declare const skillsUpdateScopeStateSchema: z.ZodObject<{
|
|
266
|
+
scope: z.ZodEnum<{
|
|
267
|
+
global: "global";
|
|
268
|
+
project: "project";
|
|
269
|
+
}>;
|
|
270
|
+
status: z.ZodEnum<{
|
|
271
|
+
available: "available";
|
|
272
|
+
checking: "checking";
|
|
273
|
+
current: "current";
|
|
274
|
+
error: "error";
|
|
275
|
+
idle: "idle";
|
|
276
|
+
unavailable: "unavailable";
|
|
277
|
+
updating: "updating";
|
|
278
|
+
}>;
|
|
279
|
+
available: z.ZodBoolean;
|
|
280
|
+
skills: z.ZodArray<z.ZodString>;
|
|
281
|
+
checkedAt: z.ZodNullable<z.ZodString>;
|
|
282
|
+
updatedAt: z.ZodNullable<z.ZodString>;
|
|
283
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
284
|
+
}, z.core.$strip>;
|
|
285
|
+
export type SkillsUpdateScopeState = z.infer<typeof skillsUpdateScopeStateSchema>;
|
|
286
|
+
/** `GET /api/v1/workspace/skills-update` (and the check/apply POSTs) — the merged project+global
|
|
287
|
+
* skills-update state. `autoUpdateEnabled`/`inherited` are re-stamped from the workspace config
|
|
288
|
+
* on the way out (`skillsUpdateResponse`, src/server/server.ts:1818). */
|
|
289
|
+
export declare const skillsUpdateStateSchema: z.ZodObject<{
|
|
290
|
+
status: z.ZodEnum<{
|
|
291
|
+
available: "available";
|
|
292
|
+
checking: "checking";
|
|
293
|
+
current: "current";
|
|
294
|
+
error: "error";
|
|
295
|
+
idle: "idle";
|
|
296
|
+
unavailable: "unavailable";
|
|
297
|
+
updating: "updating";
|
|
298
|
+
}>;
|
|
299
|
+
available: z.ZodBoolean;
|
|
300
|
+
autoUpdateEnabled: z.ZodBoolean;
|
|
301
|
+
inherited: z.ZodBoolean;
|
|
302
|
+
checkedAt: z.ZodNullable<z.ZodString>;
|
|
303
|
+
updatedAt: z.ZodNullable<z.ZodString>;
|
|
304
|
+
scopes: z.ZodArray<z.ZodObject<{
|
|
305
|
+
scope: z.ZodEnum<{
|
|
306
|
+
global: "global";
|
|
307
|
+
project: "project";
|
|
308
|
+
}>;
|
|
309
|
+
status: z.ZodEnum<{
|
|
310
|
+
available: "available";
|
|
311
|
+
checking: "checking";
|
|
312
|
+
current: "current";
|
|
313
|
+
error: "error";
|
|
314
|
+
idle: "idle";
|
|
315
|
+
unavailable: "unavailable";
|
|
316
|
+
updating: "updating";
|
|
317
|
+
}>;
|
|
318
|
+
available: z.ZodBoolean;
|
|
319
|
+
skills: z.ZodArray<z.ZodString>;
|
|
320
|
+
checkedAt: z.ZodNullable<z.ZodString>;
|
|
321
|
+
updatedAt: z.ZodNullable<z.ZodString>;
|
|
322
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
323
|
+
}, z.core.$strip>>;
|
|
324
|
+
needsUpgradeNotes: z.ZodBoolean;
|
|
325
|
+
}, z.core.$strip>;
|
|
326
|
+
export type SkillsUpdateState = z.infer<typeof skillsUpdateStateSchema>;
|
|
327
|
+
/** The agent backends are the providers — one alias, never a second enum. */
|
|
328
|
+
export declare const providerIdSchema: z.ZodEnum<{
|
|
329
|
+
claude: "claude";
|
|
330
|
+
codex: "codex";
|
|
331
|
+
opencode: "opencode";
|
|
332
|
+
}>;
|
|
333
|
+
export type ProviderId = Runner;
|
|
334
|
+
/** Coarse host authentication state. Credentials, account identity, and raw CLI output never
|
|
335
|
+
* cross this boundary. */
|
|
336
|
+
export declare const providerConnectionStateSchema: z.ZodEnum<{
|
|
337
|
+
connected: "connected";
|
|
338
|
+
disconnected: "disconnected";
|
|
339
|
+
"not-installed": "not-installed";
|
|
340
|
+
unknown: "unknown";
|
|
341
|
+
}>;
|
|
342
|
+
export type ProviderConnectionState = z.infer<typeof providerConnectionStateSchema>;
|
|
343
|
+
/**
|
|
344
|
+
* One provider row.
|
|
345
|
+
*
|
|
346
|
+
* `enabled` is OPTIONAL: `ProviderAuth.status()` (src/core/provider-auth.ts:12) builds rows
|
|
347
|
+
* without it and only `applyProviderEnablement` stamps it in, so the type the routes answer keeps
|
|
348
|
+
* the key optional. The hand-written DTO declared it required — narrower than the route.
|
|
349
|
+
*/
|
|
350
|
+
export declare const providerStatusSchema: z.ZodObject<{
|
|
351
|
+
provider: z.ZodEnum<{
|
|
352
|
+
claude: "claude";
|
|
353
|
+
codex: "codex";
|
|
354
|
+
opencode: "opencode";
|
|
355
|
+
}>;
|
|
356
|
+
status: z.ZodEnum<{
|
|
357
|
+
connected: "connected";
|
|
358
|
+
disconnected: "disconnected";
|
|
359
|
+
"not-installed": "not-installed";
|
|
360
|
+
unknown: "unknown";
|
|
361
|
+
}>;
|
|
362
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
363
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
364
|
+
authFailureId: z.ZodOptional<z.ZodString>;
|
|
365
|
+
}, z.core.$strip>;
|
|
366
|
+
export type ProviderStatus = z.infer<typeof providerStatusSchema>;
|
|
367
|
+
/** `GET /api/v1/providers/status`, and the answer of the enabled/retry mutators. */
|
|
368
|
+
export declare const providerStatusResponseSchema: z.ZodObject<{
|
|
369
|
+
providers: z.ZodArray<z.ZodObject<{
|
|
370
|
+
provider: z.ZodEnum<{
|
|
371
|
+
claude: "claude";
|
|
372
|
+
codex: "codex";
|
|
373
|
+
opencode: "opencode";
|
|
374
|
+
}>;
|
|
375
|
+
status: z.ZodEnum<{
|
|
376
|
+
connected: "connected";
|
|
377
|
+
disconnected: "disconnected";
|
|
378
|
+
"not-installed": "not-installed";
|
|
379
|
+
unknown: "unknown";
|
|
380
|
+
}>;
|
|
381
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
382
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
383
|
+
authFailureId: z.ZodOptional<z.ZodString>;
|
|
384
|
+
}, z.core.$strip>>;
|
|
385
|
+
}, z.core.$strip>;
|
|
386
|
+
export type ProviderStatusResponse = z.infer<typeof providerStatusResponseSchema>;
|
|
387
|
+
/** `POST /api/v1/providers/connect` — either a terminal was handed the login command, or the
|
|
388
|
+
* provider turned out to be connected already. Every other outcome is a 409/500 carrying the
|
|
389
|
+
* same `command` for the clipboard fallback. */
|
|
390
|
+
export declare const providerConnectResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
391
|
+
opened: z.ZodLiteral<true>;
|
|
392
|
+
command: z.ZodString;
|
|
393
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
394
|
+
opened: z.ZodLiteral<false>;
|
|
395
|
+
connected: z.ZodLiteral<true>;
|
|
396
|
+
command: z.ZodString;
|
|
397
|
+
}, z.core.$strip>], "opened">;
|
|
398
|
+
export type ProviderConnectResponse = z.infer<typeof providerConnectResponseSchema>;
|
|
399
|
+
export declare const runnerModelOptionSchema: z.ZodObject<{
|
|
400
|
+
id: z.ZodString;
|
|
401
|
+
label: z.ZodString;
|
|
402
|
+
description: z.ZodString;
|
|
403
|
+
}, z.core.$strip>;
|
|
404
|
+
export type RunnerModelOption = z.infer<typeof runnerModelOptionSchema>;
|
|
405
|
+
/** `GET /api/v1/models?runner=codex` — discovered models, plus how fresh the answer is. Never an
|
|
406
|
+
* error: an unavailable CLI degrades to `source: 'unavailable'` with a `reason`. */
|
|
407
|
+
export declare const runnerModelCatalogResponseSchema: z.ZodObject<{
|
|
408
|
+
runner: z.ZodEnum<{
|
|
409
|
+
claude: "claude";
|
|
410
|
+
codex: "codex";
|
|
411
|
+
opencode: "opencode";
|
|
412
|
+
}>;
|
|
413
|
+
models: z.ZodArray<z.ZodObject<{
|
|
414
|
+
id: z.ZodString;
|
|
415
|
+
label: z.ZodString;
|
|
416
|
+
description: z.ZodString;
|
|
417
|
+
}, z.core.$strip>>;
|
|
418
|
+
source: z.ZodEnum<{
|
|
419
|
+
cache: "cache";
|
|
420
|
+
live: "live";
|
|
421
|
+
unavailable: "unavailable";
|
|
422
|
+
}>;
|
|
423
|
+
stale: z.ZodBoolean;
|
|
424
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
425
|
+
}, z.core.$strip>;
|
|
426
|
+
export type RunnerModelCatalogResponse = z.infer<typeof runnerModelCatalogResponseSchema>;
|
|
427
|
+
/** A local app a worktree can be opened in (#open-in): editor, file manager, or terminal. */
|
|
428
|
+
export declare const openTargetSchema: z.ZodObject<{
|
|
429
|
+
id: z.ZodString;
|
|
430
|
+
label: z.ZodString;
|
|
431
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
432
|
+
}, z.core.$strip>;
|
|
433
|
+
export type OpenTarget = z.infer<typeof openTargetSchema>;
|
|
434
|
+
/** `GET /api/v1/open-targets` — the detected local apps; empty in hosted mode (CEZ_REMOTE). */
|
|
435
|
+
export declare const openTargetsResponseSchema: z.ZodObject<{
|
|
436
|
+
targets: z.ZodArray<z.ZodObject<{
|
|
437
|
+
id: z.ZodString;
|
|
438
|
+
label: z.ZodString;
|
|
439
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
440
|
+
}, z.core.$strip>>;
|
|
441
|
+
}, z.core.$strip>;
|
|
442
|
+
export type OpenTargetsResponse = z.infer<typeof openTargetsResponseSchema>;
|
package/dist/core/agent-env.d.ts
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* - `CEZ_ENV_PASSTHROUGH=A,B,C` forwards those extra named vars;
|
|
16
16
|
* - `CEZ_AGENT_ENV_FULL=1` restores the legacy full-`process.env` behavior.
|
|
17
17
|
*/
|
|
18
|
-
import type { AgentBackend } from './agent-runner.
|
|
18
|
+
import type { AgentBackend } from './agent-runner.ts';
|
|
19
19
|
export declare function looksSecret(name: string): boolean;
|
|
20
20
|
export interface BuildChildEnvOptions {
|
|
21
21
|
backend: AgentBackend;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* - `codex` — `codex app-server`, JSON-RPC 2.0 (JSONL) over stdin/stdout;
|
|
11
11
|
* - `opencode` — `opencode serve`, HTTP + SSE.
|
|
12
12
|
*/
|
|
13
|
-
import type { UiEvent } from './ui-events.
|
|
13
|
+
import type { UiEvent } from './ui-events.ts';
|
|
14
14
|
/** `claude-cli` is the legacy id kept so old run records still parse. */
|
|
15
15
|
export type AgentBackend = 'claude' | 'codex' | 'opencode' | 'claude-cli';
|
|
16
16
|
/** The user-selectable runners (what config/GUI expose). */
|
|
@@ -58,6 +58,17 @@ export interface AgentRunSpec {
|
|
|
58
58
|
* v2: claude = `--append-system-prompt`, codex/opencode = prepended here).
|
|
59
59
|
*/
|
|
60
60
|
export declare function prependSystemPrompt(systemPrompt: string | undefined, userPrompt: string): string;
|
|
61
|
+
/**
|
|
62
|
+
* True for the `128 + signal` exit codes an agent CLI reports when it handles
|
|
63
|
+
* a stop signal itself instead of dying from it (SIGINT/SIGKILL/SIGTERM).
|
|
64
|
+
*
|
|
65
|
+
* Every runner arms a SIGTERM→SIGKILL watchdog on `end()` and signals on
|
|
66
|
+
* `interrupt()` (#703): the CLIs install their own handlers, so a session the
|
|
67
|
+
* runner tore down on purpose comes back as a NON-ZERO exit. Paired with a
|
|
68
|
+
* "we sent the signal" flag, this predicate keeps that teardown out of the
|
|
69
|
+
* error path — an exit cezar caused is never an agent failure.
|
|
70
|
+
*/
|
|
71
|
+
export declare function isSignalTerminationExit(exitCode: number | null): boolean;
|
|
61
72
|
/** One content block of a user message — mirrors the Anthropic wire format
|
|
62
73
|
* so it can be written to the claude CLI's stdin verbatim. */
|
|
63
74
|
export type ContentBlock = {
|
|
@@ -20,4 +20,17 @@ export const RUNNER_IDS = ['claude', 'codex', 'opencode'];
|
|
|
20
20
|
export function prependSystemPrompt(systemPrompt, userPrompt) {
|
|
21
21
|
return systemPrompt ? `${systemPrompt}\n\n---\n\n${userPrompt}` : userPrompt;
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* True for the `128 + signal` exit codes an agent CLI reports when it handles
|
|
25
|
+
* a stop signal itself instead of dying from it (SIGINT/SIGKILL/SIGTERM).
|
|
26
|
+
*
|
|
27
|
+
* Every runner arms a SIGTERM→SIGKILL watchdog on `end()` and signals on
|
|
28
|
+
* `interrupt()` (#703): the CLIs install their own handlers, so a session the
|
|
29
|
+
* runner tore down on purpose comes back as a NON-ZERO exit. Paired with a
|
|
30
|
+
* "we sent the signal" flag, this predicate keeps that teardown out of the
|
|
31
|
+
* error path — an exit cezar caused is never an agent failure.
|
|
32
|
+
*/
|
|
33
|
+
export function isSignalTerminationExit(exitCode) {
|
|
34
|
+
return exitCode === 130 || exitCode === 137 || exitCode === 143;
|
|
35
|
+
}
|
|
23
36
|
//# sourceMappingURL=agent-runner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-runner.js","sourceRoot":"","sources":["../../src/core/agent-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AASH,MAAM,CAAC,MAAM,UAAU,GAAwB,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AAsC/E;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,YAAgC,EAAE,UAAkB;IACtF,OAAO,YAAY,CAAC,CAAC,CAAC,GAAG,YAAY,cAAc,UAAU,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;AAC/E,CAAC"}
|
|
1
|
+
{"version":3,"file":"agent-runner.js","sourceRoot":"","sources":["../../src/core/agent-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AASH,MAAM,CAAC,MAAM,UAAU,GAAwB,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AAsC/E;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,YAAgC,EAAE,UAAkB;IACtF,OAAO,YAAY,CAAC,CAAC,CAAC,GAAG,YAAY,cAAc,UAAU,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;AAC/E,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,uBAAuB,CAAC,QAAuB;IAC7D,OAAO,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC;AAClE,CAAC"}
|