@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,182 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The project-registry family: `GET/POST/PATCH/DELETE /api/v1/projects`, the folder picker
|
|
4
|
+
* (`GET /api/v1/fs/browse`) that feeds it, and the launch-key read.
|
|
5
|
+
*
|
|
6
|
+
* Node-free by construction (see README rule 1) — `zod` and nothing else.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* One `GET /api/v1/projects` registry entry (multi-project spec, step 1.6).
|
|
10
|
+
*
|
|
11
|
+
* Unlike health's id+name pairs this carries the absolute `root`: the registry routes are
|
|
12
|
+
* same-origin, the CORS-open health route is not, and that difference is the reason the two
|
|
13
|
+
* project shapes are deliberately NOT the same type.
|
|
14
|
+
*
|
|
15
|
+
* Deliberately a CLOSED object even though the server's persistence schema
|
|
16
|
+
* (`src/workspace/config.ts`, `workspaceProjectSchema.passthrough()`) keeps unknown keys in the
|
|
17
|
+
* file: passthrough is a durability promise about `~/.cezar/config.json`, not a promise that the
|
|
18
|
+
* API answers arbitrary keys. Modelling it as a loose object here would also be unprovable — see
|
|
19
|
+
* the note on the index signature in `src/server/contract-parity.workspace.test.ts`.
|
|
20
|
+
*/
|
|
21
|
+
export declare const projectListEntrySchema: z.ZodObject<{
|
|
22
|
+
id: z.ZodString;
|
|
23
|
+
name: z.ZodString;
|
|
24
|
+
root: z.ZodString;
|
|
25
|
+
addedAt: z.ZodString;
|
|
26
|
+
lastOpenedAt: z.ZodString;
|
|
27
|
+
source: z.ZodEnum<{
|
|
28
|
+
checkout: "checkout";
|
|
29
|
+
local: "local";
|
|
30
|
+
}>;
|
|
31
|
+
status: z.ZodEnum<{
|
|
32
|
+
missing: "missing";
|
|
33
|
+
"not-git": "not-git";
|
|
34
|
+
ok: "ok";
|
|
35
|
+
}>;
|
|
36
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
37
|
+
forge: z.ZodOptional<z.ZodLiteral<"github">>;
|
|
38
|
+
maxParallel: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
export type ProjectListEntry = z.infer<typeof projectListEntrySchema>;
|
|
41
|
+
/** `GET /api/v1/projects` — the workspace registry. Workspace-level: never 404s, never scoped.
|
|
42
|
+
* An unreadable workspace degrades to `projects: []` plus the default `projectsDir`, so all
|
|
43
|
+
* three keys are always present. */
|
|
44
|
+
export declare const projectsResponseSchema: z.ZodObject<{
|
|
45
|
+
projects: z.ZodArray<z.ZodObject<{
|
|
46
|
+
id: z.ZodString;
|
|
47
|
+
name: z.ZodString;
|
|
48
|
+
root: z.ZodString;
|
|
49
|
+
addedAt: z.ZodString;
|
|
50
|
+
lastOpenedAt: z.ZodString;
|
|
51
|
+
source: z.ZodEnum<{
|
|
52
|
+
checkout: "checkout";
|
|
53
|
+
local: "local";
|
|
54
|
+
}>;
|
|
55
|
+
status: z.ZodEnum<{
|
|
56
|
+
missing: "missing";
|
|
57
|
+
"not-git": "not-git";
|
|
58
|
+
ok: "ok";
|
|
59
|
+
}>;
|
|
60
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
61
|
+
forge: z.ZodOptional<z.ZodLiteral<"github">>;
|
|
62
|
+
maxParallel: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
bootProject: z.ZodString;
|
|
65
|
+
projectsDir: z.ZodString;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
export type ProjectsResponse = z.infer<typeof projectsResponseSchema>;
|
|
68
|
+
/**
|
|
69
|
+
* `POST /api/v1/projects` (multi-project spec, step 4.2) — what the folder-browser dialog gets
|
|
70
|
+
* back. `error` is present ONLY on the 409 (already registered), where `project` is the EXISTING
|
|
71
|
+
* entry: the dialog navigates to it rather than dead-ending on a duplicate.
|
|
72
|
+
*/
|
|
73
|
+
export declare const registerProjectResponseSchema: z.ZodObject<{
|
|
74
|
+
project: z.ZodObject<{
|
|
75
|
+
id: z.ZodString;
|
|
76
|
+
name: z.ZodString;
|
|
77
|
+
root: z.ZodString;
|
|
78
|
+
addedAt: z.ZodString;
|
|
79
|
+
lastOpenedAt: z.ZodString;
|
|
80
|
+
source: z.ZodEnum<{
|
|
81
|
+
checkout: "checkout";
|
|
82
|
+
local: "local";
|
|
83
|
+
}>;
|
|
84
|
+
status: z.ZodEnum<{
|
|
85
|
+
missing: "missing";
|
|
86
|
+
"not-git": "not-git";
|
|
87
|
+
ok: "ok";
|
|
88
|
+
}>;
|
|
89
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
90
|
+
forge: z.ZodOptional<z.ZodLiteral<"github">>;
|
|
91
|
+
maxParallel: z.ZodOptional<z.ZodNumber>;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
error: z.ZodOptional<z.ZodString>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
export type RegisterProjectResponse = z.infer<typeof registerProjectResponseSchema>;
|
|
96
|
+
/**
|
|
97
|
+
* `DELETE /api/v1/projects/:projectId` (multi-project spec, step 4.4) — Settings → Projects'
|
|
98
|
+
* per-row Remove. Deregistration ONLY: the server never touches anything under the project root,
|
|
99
|
+
* so this is a registry edit and nothing else. The interesting failures are 409s (the project has
|
|
100
|
+
* running tasks, or it is the project this server booted in), whose `{ error }` the pane shows
|
|
101
|
+
* verbatim.
|
|
102
|
+
*/
|
|
103
|
+
export declare const removeProjectResponseSchema: z.ZodObject<{
|
|
104
|
+
removed: z.ZodLiteral<true>;
|
|
105
|
+
id: z.ZodString;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
export type RemoveProjectResponse = z.infer<typeof removeProjectResponseSchema>;
|
|
108
|
+
/** `PATCH /api/v1/projects/:projectId` — the updated entry, the same shape `GET /api/v1/projects`
|
|
109
|
+
* attaches (the handler re-probes `status`/`branch` so one project has one shape). */
|
|
110
|
+
export declare const updateProjectResponseSchema: z.ZodObject<{
|
|
111
|
+
project: z.ZodObject<{
|
|
112
|
+
id: z.ZodString;
|
|
113
|
+
name: z.ZodString;
|
|
114
|
+
root: z.ZodString;
|
|
115
|
+
addedAt: z.ZodString;
|
|
116
|
+
lastOpenedAt: z.ZodString;
|
|
117
|
+
source: z.ZodEnum<{
|
|
118
|
+
checkout: "checkout";
|
|
119
|
+
local: "local";
|
|
120
|
+
}>;
|
|
121
|
+
status: z.ZodEnum<{
|
|
122
|
+
missing: "missing";
|
|
123
|
+
"not-git": "not-git";
|
|
124
|
+
ok: "ok";
|
|
125
|
+
}>;
|
|
126
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
127
|
+
forge: z.ZodOptional<z.ZodLiteral<"github">>;
|
|
128
|
+
maxParallel: z.ZodOptional<z.ZodNumber>;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
}, z.core.$strip>;
|
|
131
|
+
export type UpdateProjectResponse = z.infer<typeof updateProjectResponseSchema>;
|
|
132
|
+
/**
|
|
133
|
+
* `PATCH /api/v1/projects/:projectId` body (spec 2026-07-22-per-project-concurrency) — set or
|
|
134
|
+
* clear a project's per-project concurrency ceiling. `null` clears the override back to "inherit
|
|
135
|
+
* the workspace cap"; an integer `1..16` pins it. The bounds mirror `workspaceProjectSchema`
|
|
136
|
+
* exactly, so a value this schema accepts can never be degraded away by the next load's `.catch`.
|
|
137
|
+
*/
|
|
138
|
+
export declare const updateProjectInputSchema: z.ZodObject<{
|
|
139
|
+
maxParallel: z.ZodNullable<z.ZodNumber>;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
export type UpdateProjectInput = z.infer<typeof updateProjectInputSchema>;
|
|
142
|
+
/**
|
|
143
|
+
* `POST /api/v1/projects/checkout` (multi-project spec, step 4.3) — the clone-from-GitHub body.
|
|
144
|
+
* `name` defaults server-side to the repo name; `checkoutId` is the cockpit's own correlation
|
|
145
|
+
* token, echoed on every `checkout-progress` event so two tabs cloning at once never render each
|
|
146
|
+
* other's progress.
|
|
147
|
+
*/
|
|
148
|
+
export declare const checkoutProjectInputSchema: z.ZodObject<{
|
|
149
|
+
url: z.ZodString;
|
|
150
|
+
name: z.ZodOptional<z.ZodString>;
|
|
151
|
+
checkoutId: z.ZodOptional<z.ZodString>;
|
|
152
|
+
}, z.core.$strip>;
|
|
153
|
+
export type CheckoutProjectInput = z.infer<typeof checkoutProjectInputSchema>;
|
|
154
|
+
/** One directory in a `GET /api/v1/fs/browse` listing (multi-project spec, step 4.1). `path` is
|
|
155
|
+
* absolute — same-origin route, like `ProjectListEntry.root`. */
|
|
156
|
+
export declare const fsBrowseDirSchema: z.ZodObject<{
|
|
157
|
+
name: z.ZodString;
|
|
158
|
+
path: z.ZodString;
|
|
159
|
+
isRepo: z.ZodBoolean;
|
|
160
|
+
}, z.core.$strip>;
|
|
161
|
+
export type FsBrowseDir = z.infer<typeof fsBrowseDirSchema>;
|
|
162
|
+
/** `GET /api/v1/fs/browse?path=` — the folder picker's listing. Rooted at the independently
|
|
163
|
+
* configured browse root, directories only. */
|
|
164
|
+
export declare const fsBrowseResponseSchema: z.ZodObject<{
|
|
165
|
+
path: z.ZodString;
|
|
166
|
+
parent: z.ZodNullable<z.ZodString>;
|
|
167
|
+
dirs: z.ZodArray<z.ZodObject<{
|
|
168
|
+
name: z.ZodString;
|
|
169
|
+
path: z.ZodString;
|
|
170
|
+
isRepo: z.ZodBoolean;
|
|
171
|
+
}, z.core.$strip>>;
|
|
172
|
+
truncated: z.ZodBoolean;
|
|
173
|
+
}, z.core.$strip>;
|
|
174
|
+
export type FsBrowseResponse = z.infer<typeof fsBrowseResponseSchema>;
|
|
175
|
+
/** `GET /api/v1/launch-key` — the bookmarklet auto-start secret (spec 011). Fetched to COMPARE
|
|
176
|
+
* against the `?key=` query param and to bake into the `javascript:` links the Settings → Skills
|
|
177
|
+
* bookmarklet panel generates. The value never renders as text, never logs, and never goes back
|
|
178
|
+
* into the address bar. */
|
|
179
|
+
export declare const launchKeyResponseSchema: z.ZodObject<{
|
|
180
|
+
key: z.ZodString;
|
|
181
|
+
}, z.core.$strip>;
|
|
182
|
+
export type LaunchKeyResponse = z.infer<typeof launchKeyResponseSchema>;
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The repo / git family of `/api/v1` — the Repo view, the structured diff shapes the Changes and
|
|
4
|
+
* Files tabs read, and the worktree-retention panel.
|
|
5
|
+
*
|
|
6
|
+
* `RepoInfo` is NOT redeclared here: health already owns it (`./health.ts`), and the Repo view
|
|
7
|
+
* serves the very same record.
|
|
8
|
+
*/
|
|
9
|
+
/** One `git status --porcelain` row. */
|
|
10
|
+
export declare const statusEntrySchema: z.ZodObject<{
|
|
11
|
+
status: z.ZodString;
|
|
12
|
+
path: z.ZodString;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export type StatusEntry = z.infer<typeof statusEntrySchema>;
|
|
15
|
+
/** One `git log` row; `when` is git's relative `%cr` ("3 hours ago"), not a timestamp. */
|
|
16
|
+
export declare const logEntrySchema: z.ZodObject<{
|
|
17
|
+
hash: z.ZodString;
|
|
18
|
+
subject: z.ZodString;
|
|
19
|
+
author: z.ZodString;
|
|
20
|
+
when: z.ZodString;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export type LogEntry = z.infer<typeof logEntrySchema>;
|
|
23
|
+
/**
|
|
24
|
+
* `GET /api/v1/repo` — the Repo view's one read.
|
|
25
|
+
*
|
|
26
|
+
* A union, and deliberately so: the handler answers a DIFFERENT object when the project root is
|
|
27
|
+
* not a repository (`server.ts:3481`) than when it is (`server.ts:3494`), and the empty branch's
|
|
28
|
+
* `[]` literals make its arrays `never[]` in the route type. Modelling this as the flat
|
|
29
|
+
* `{ info: RepoInfo | null; status: StatusEntry[]; … }` the hand-written DTO used would be WIDER
|
|
30
|
+
* than the route — the parity guard rejects it. Both members still parse the real wire bytes
|
|
31
|
+
* (an empty array satisfies `z.array(z.never())`), so nothing is lost at runtime; it is the
|
|
32
|
+
* compile-time shape that is oddly precise. See the report note on `server.ts:3481`.
|
|
33
|
+
*/
|
|
34
|
+
export declare const repoResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
35
|
+
info: z.ZodNull;
|
|
36
|
+
status: z.ZodArray<z.ZodNever>;
|
|
37
|
+
log: z.ZodArray<z.ZodNever>;
|
|
38
|
+
branches: z.ZodArray<z.ZodNever>;
|
|
39
|
+
baseBranch: z.ZodNull;
|
|
40
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
41
|
+
info: z.ZodObject<{
|
|
42
|
+
root: z.ZodString;
|
|
43
|
+
branch: z.ZodString;
|
|
44
|
+
remote: z.ZodOptional<z.ZodString>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
status: z.ZodArray<z.ZodObject<{
|
|
47
|
+
status: z.ZodString;
|
|
48
|
+
path: z.ZodString;
|
|
49
|
+
}, z.core.$strip>>;
|
|
50
|
+
log: z.ZodArray<z.ZodObject<{
|
|
51
|
+
hash: z.ZodString;
|
|
52
|
+
subject: z.ZodString;
|
|
53
|
+
author: z.ZodString;
|
|
54
|
+
when: z.ZodString;
|
|
55
|
+
}, z.core.$strip>>;
|
|
56
|
+
branches: z.ZodArray<z.ZodString>;
|
|
57
|
+
baseBranch: z.ZodNullable<z.ZodString>;
|
|
58
|
+
}, z.core.$strip>]>;
|
|
59
|
+
export type RepoResponse = z.infer<typeof repoResponseSchema>;
|
|
60
|
+
/** `POST /api/v1/repo/branch` — switch to an existing branch, or create one and switch. Every
|
|
61
|
+
* predictable git failure (invalid name, unknown `from`, dirty-tree conflict) is a 409. */
|
|
62
|
+
export declare const repoBranchResponseSchema: z.ZodObject<{
|
|
63
|
+
branch: z.ZodString;
|
|
64
|
+
created: z.ZodBoolean;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
export type RepoBranchResponse = z.infer<typeof repoBranchResponseSchema>;
|
|
67
|
+
/** One changed file of a structured diff (`/runs/:id/changes`, `/repo/changes`, the commit
|
|
68
|
+
* routes). Assignable to the diff facade's `DiffFileChange` by construction. */
|
|
69
|
+
export declare const changedFileSchema: z.ZodObject<{
|
|
70
|
+
path: z.ZodString;
|
|
71
|
+
oldPath: z.ZodOptional<z.ZodString>;
|
|
72
|
+
status: z.ZodEnum<{
|
|
73
|
+
added: "added";
|
|
74
|
+
copied: "copied";
|
|
75
|
+
deleted: "deleted";
|
|
76
|
+
modified: "modified";
|
|
77
|
+
renamed: "renamed";
|
|
78
|
+
}>;
|
|
79
|
+
adds: z.ZodNumber;
|
|
80
|
+
dels: z.ZodNumber;
|
|
81
|
+
binary: z.ZodBoolean;
|
|
82
|
+
image: z.ZodOptional<z.ZodBoolean>;
|
|
83
|
+
patch: z.ZodString;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
export type ChangedFile = z.infer<typeof changedFileSchema>;
|
|
86
|
+
/** `GET /api/v1/runs/:id/changes` and `GET /api/v1/repo/changes` — the structured diff.
|
|
87
|
+
* 409 (+ reason) when the run's backing directory is unavailable or git itself refuses; never HTML. */
|
|
88
|
+
export declare const changesPayloadSchema: z.ZodObject<{
|
|
89
|
+
files: z.ZodArray<z.ZodObject<{
|
|
90
|
+
path: z.ZodString;
|
|
91
|
+
oldPath: z.ZodOptional<z.ZodString>;
|
|
92
|
+
status: z.ZodEnum<{
|
|
93
|
+
added: "added";
|
|
94
|
+
copied: "copied";
|
|
95
|
+
deleted: "deleted";
|
|
96
|
+
modified: "modified";
|
|
97
|
+
renamed: "renamed";
|
|
98
|
+
}>;
|
|
99
|
+
adds: z.ZodNumber;
|
|
100
|
+
dels: z.ZodNumber;
|
|
101
|
+
binary: z.ZodBoolean;
|
|
102
|
+
image: z.ZodOptional<z.ZodBoolean>;
|
|
103
|
+
patch: z.ZodString;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
stat: z.ZodObject<{
|
|
106
|
+
adds: z.ZodNumber;
|
|
107
|
+
dels: z.ZodNumber;
|
|
108
|
+
files: z.ZodNumber;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
repointedHead: z.ZodOptional<z.ZodObject<{
|
|
111
|
+
headBranch: z.ZodString;
|
|
112
|
+
taskBranch: z.ZodString;
|
|
113
|
+
}, z.core.$strip>>;
|
|
114
|
+
}, z.core.$strip>;
|
|
115
|
+
export type ChangesPayload = z.infer<typeof changesPayloadSchema>;
|
|
116
|
+
/** `GET /api/v1/repo/commit/:sha?structured=1` (and `/runs/:id/commit/:sha`) — one commit's
|
|
117
|
+
* metadata plus the same `{files, stat}` shape the /changes routes serve. A merge commit
|
|
118
|
+
* honestly answers zero files. The bare (unstructured) route keeps its legacy text shape. */
|
|
119
|
+
export declare const repoCommitPayloadSchema: z.ZodObject<{
|
|
120
|
+
sha: z.ZodString;
|
|
121
|
+
subject: z.ZodString;
|
|
122
|
+
author: z.ZodString;
|
|
123
|
+
when: z.ZodString;
|
|
124
|
+
files: z.ZodArray<z.ZodObject<{
|
|
125
|
+
path: z.ZodString;
|
|
126
|
+
oldPath: z.ZodOptional<z.ZodString>;
|
|
127
|
+
status: z.ZodEnum<{
|
|
128
|
+
added: "added";
|
|
129
|
+
copied: "copied";
|
|
130
|
+
deleted: "deleted";
|
|
131
|
+
modified: "modified";
|
|
132
|
+
renamed: "renamed";
|
|
133
|
+
}>;
|
|
134
|
+
adds: z.ZodNumber;
|
|
135
|
+
dels: z.ZodNumber;
|
|
136
|
+
binary: z.ZodBoolean;
|
|
137
|
+
image: z.ZodOptional<z.ZodBoolean>;
|
|
138
|
+
patch: z.ZodString;
|
|
139
|
+
}, z.core.$strip>>;
|
|
140
|
+
stat: z.ZodObject<{
|
|
141
|
+
adds: z.ZodNumber;
|
|
142
|
+
dels: z.ZodNumber;
|
|
143
|
+
files: z.ZodNumber;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
}, z.core.$strip>;
|
|
146
|
+
export type RepoCommitPayload = z.infer<typeof repoCommitPayloadSchema>;
|
|
147
|
+
/** One row of a `GET /api/v1/runs/:id/files` directory listing. */
|
|
148
|
+
export declare const worktreeDirEntrySchema: z.ZodObject<{
|
|
149
|
+
name: z.ZodString;
|
|
150
|
+
type: z.ZodEnum<{
|
|
151
|
+
dir: "dir";
|
|
152
|
+
file: "file";
|
|
153
|
+
}>;
|
|
154
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
155
|
+
}, z.core.$strip>;
|
|
156
|
+
export type WorktreeDirEntry = z.infer<typeof worktreeDirEntrySchema>;
|
|
157
|
+
/**
|
|
158
|
+
* `GET /api/v1/runs/:id/files?path=` — a directory listing or one file (size-capped, binary
|
|
159
|
+
* flagged). `content` is absent exactly when `binary` or `tooLarge`.
|
|
160
|
+
*
|
|
161
|
+
* A discriminated union on `type`. Both handlers now build their literal with `as const`; without
|
|
162
|
+
* it the property widened to `string` during Hono's route-type inference and the route lost the
|
|
163
|
+
* discriminant, so a consumer narrowing on `entry.type === 'dir'` was left with `never`.
|
|
164
|
+
*/
|
|
165
|
+
export declare const worktreeEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
166
|
+
type: z.ZodLiteral<"dir">;
|
|
167
|
+
path: z.ZodString;
|
|
168
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
169
|
+
name: z.ZodString;
|
|
170
|
+
type: z.ZodEnum<{
|
|
171
|
+
dir: "dir";
|
|
172
|
+
file: "file";
|
|
173
|
+
}>;
|
|
174
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
175
|
+
}, z.core.$strip>>;
|
|
176
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
177
|
+
type: z.ZodLiteral<"file">;
|
|
178
|
+
path: z.ZodString;
|
|
179
|
+
size: z.ZodNumber;
|
|
180
|
+
binary: z.ZodBoolean;
|
|
181
|
+
tooLarge: z.ZodBoolean;
|
|
182
|
+
content: z.ZodOptional<z.ZodString>;
|
|
183
|
+
}, z.core.$strip>], "type">;
|
|
184
|
+
export type WorktreeEntry = z.infer<typeof worktreeEntrySchema>;
|
|
185
|
+
/** One materialized task worktree in the management panel (#483). `sizeBytes` is null when `du`
|
|
186
|
+
* is unavailable (Windows / missing). `reclaimable` = finished, has a directory, not yet
|
|
187
|
+
* reclaimed (retention's rule). */
|
|
188
|
+
export declare const worktreeInfoSchema: z.ZodObject<{
|
|
189
|
+
runId: z.ZodString;
|
|
190
|
+
title: z.ZodString;
|
|
191
|
+
status: z.ZodEnum<{
|
|
192
|
+
cancelled: "cancelled";
|
|
193
|
+
done: "done";
|
|
194
|
+
failed: "failed";
|
|
195
|
+
queued: "queued";
|
|
196
|
+
review: "review";
|
|
197
|
+
running: "running";
|
|
198
|
+
waiting: "waiting";
|
|
199
|
+
}>;
|
|
200
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
201
|
+
sizeBytes: z.ZodNullable<z.ZodNumber>;
|
|
202
|
+
finishedAt: z.ZodNullable<z.ZodString>;
|
|
203
|
+
reclaimable: z.ZodBoolean;
|
|
204
|
+
}, z.core.$strip>;
|
|
205
|
+
export type WorktreeInfo = z.infer<typeof worktreeInfoSchema>;
|
|
206
|
+
/** `GET /api/v1/worktrees` (#483): the worktrees on disk, their total size (null when any
|
|
207
|
+
* degraded), and the current keep-limit (0 = unlimited). */
|
|
208
|
+
export declare const worktreesResponseSchema: z.ZodObject<{
|
|
209
|
+
worktrees: z.ZodArray<z.ZodObject<{
|
|
210
|
+
runId: z.ZodString;
|
|
211
|
+
title: z.ZodString;
|
|
212
|
+
status: z.ZodEnum<{
|
|
213
|
+
cancelled: "cancelled";
|
|
214
|
+
done: "done";
|
|
215
|
+
failed: "failed";
|
|
216
|
+
queued: "queued";
|
|
217
|
+
review: "review";
|
|
218
|
+
running: "running";
|
|
219
|
+
waiting: "waiting";
|
|
220
|
+
}>;
|
|
221
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
222
|
+
sizeBytes: z.ZodNullable<z.ZodNumber>;
|
|
223
|
+
finishedAt: z.ZodNullable<z.ZodString>;
|
|
224
|
+
reclaimable: z.ZodBoolean;
|
|
225
|
+
}, z.core.$strip>>;
|
|
226
|
+
totalBytes: z.ZodNullable<z.ZodNumber>;
|
|
227
|
+
keep: z.ZodNumber;
|
|
228
|
+
}, z.core.$strip>;
|
|
229
|
+
export type WorktreesResponse = z.infer<typeof worktreesResponseSchema>;
|
|
230
|
+
/** `POST /api/v1/worktrees/reclaim` (#483): the run ids whose directory was reclaimed. */
|
|
231
|
+
export declare const reclaimWorktreesResponseSchema: z.ZodObject<{
|
|
232
|
+
reclaimed: z.ZodArray<z.ZodString>;
|
|
233
|
+
}, z.core.$strip>;
|
|
234
|
+
export type ReclaimWorktreesResponse = z.infer<typeof reclaimWorktreesResponseSchema>;
|