@open-mercato/cezar 0.9.2 → 0.10.0-pr892.1298
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +169 -38
- package/dist/agent-config/account-identity.d.ts +44 -0
- package/dist/agent-config/account-identity.js +128 -0
- package/dist/agent-config/account-identity.js.map +1 -0
- package/dist/agent-config/catalog.d.ts +8 -0
- package/dist/agent-config/catalog.js +18 -0
- package/dist/agent-config/catalog.js.map +1 -1
- package/dist/agent-config/model-settings/claude.d.ts +2 -0
- package/dist/agent-config/model-settings/claude.js +11 -0
- package/dist/agent-config/model-settings/claude.js.map +1 -0
- package/dist/agent-config/model-settings/codex.d.ts +2 -0
- package/dist/agent-config/model-settings/codex.js +16 -0
- package/dist/agent-config/model-settings/codex.js.map +1 -0
- package/dist/agent-config/model-settings/opencode.d.ts +2 -0
- package/dist/agent-config/model-settings/opencode.js +8 -0
- package/dist/agent-config/model-settings/opencode.js.map +1 -0
- package/dist/agent-config/model-settings/pi.d.ts +12 -0
- package/dist/agent-config/model-settings/pi.js +18 -0
- package/dist/agent-config/model-settings/pi.js.map +1 -0
- package/dist/agent-config/model-settings/shared.d.ts +9 -0
- package/dist/agent-config/model-settings/shared.js +93 -0
- package/dist/agent-config/model-settings/shared.js.map +1 -0
- package/dist/agent-config/model-settings/types.d.ts +9 -0
- package/dist/agent-config/model-settings/types.js +2 -0
- package/dist/agent-config/model-settings/types.js.map +1 -0
- package/dist/agent-config/models.d.ts +9 -0
- package/dist/agent-config/models.js +32 -0
- package/dist/agent-config/models.js.map +1 -0
- package/dist/agent-config/service.js +4 -4
- package/dist/agent-config/service.js.map +1 -1
- package/dist/automations/types.d.ts +4 -0
- package/dist/automations/types.js +2 -1
- package/dist/automations/types.js.map +1 -1
- package/dist/config.d.ts +10 -1
- package/dist/config.js +48 -5
- package/dist/config.js.map +1 -1
- package/dist/contract/agent-config.d.ts +2 -0
- package/dist/contract/agent-profiles.d.ts +347 -0
- package/dist/contract/automations.d.ts +24 -0
- package/dist/contract/events.d.ts +59 -0
- package/dist/contract/github.d.ts +88 -0
- package/dist/contract/health.d.ts +7 -1
- package/dist/contract/index.d.ts +1 -0
- package/dist/contract/index.js +1005 -555
- package/dist/contract/projects.d.ts +33 -5
- package/dist/contract/runs.d.ts +247 -0
- package/dist/contract/skills.d.ts +7 -0
- package/dist/contract/workflows.d.ts +6 -0
- package/dist/contract/workspace.d.ts +137 -2
- package/dist/core/agent-env.js +41 -16
- package/dist/core/agent-env.js.map +1 -1
- package/dist/core/agent-model-policy.d.ts +10 -0
- package/dist/core/agent-model-policy.js +36 -0
- package/dist/core/agent-model-policy.js.map +1 -0
- package/dist/core/agent-profiles.d.ts +62 -0
- package/dist/core/agent-profiles.js +90 -0
- package/dist/core/agent-profiles.js.map +1 -0
- package/dist/core/agent-runner.d.ts +37 -6
- package/dist/core/agent-runner.js +35 -3
- package/dist/core/agent-runner.js.map +1 -1
- package/dist/core/backend-detect.d.ts +5 -5
- package/dist/core/backend-detect.js +44 -7
- package/dist/core/backend-detect.js.map +1 -1
- package/dist/core/claude-cli-runner.js +10 -5
- package/dist/core/claude-cli-runner.js.map +1 -1
- package/dist/core/codex-app-server-runner.js +13 -3
- package/dist/core/codex-app-server-runner.js.map +1 -1
- package/dist/core/codex-app-server-transport.js +7 -2
- package/dist/core/codex-app-server-transport.js.map +1 -1
- package/dist/core/model-identity.d.ts +23 -11
- package/dist/core/model-identity.js +41 -24
- package/dist/core/model-identity.js.map +1 -1
- package/dist/core/model-presets.d.ts +8 -2
- package/dist/core/model-presets.js +51 -8
- package/dist/core/model-presets.js.map +1 -1
- package/dist/core/opencode-model-catalog.d.ts +32 -0
- package/dist/core/opencode-model-catalog.js +153 -0
- package/dist/core/opencode-model-catalog.js.map +1 -0
- package/dist/core/opencode-server-runner.d.ts +2 -0
- package/dist/core/opencode-server-runner.js +42 -11
- package/dist/core/opencode-server-runner.js.map +1 -1
- package/dist/core/pi-runner.d.ts +24 -0
- package/dist/core/pi-runner.js +349 -0
- package/dist/core/pi-runner.js.map +1 -0
- package/dist/core/pi-ui-mapper.d.ts +34 -0
- package/dist/core/pi-ui-mapper.js +270 -0
- package/dist/core/pi-ui-mapper.js.map +1 -0
- package/dist/core/provider-auth.d.ts +95 -3
- package/dist/core/provider-auth.js +234 -15
- package/dist/core/provider-auth.js.map +1 -1
- package/dist/core/provider-availability.d.ts +1 -1
- package/dist/core/provider-availability.js +2 -1
- package/dist/core/provider-availability.js.map +1 -1
- package/dist/core/runner-factory.js +3 -0
- package/dist/core/runner-factory.js.map +1 -1
- package/dist/core/shell-env.d.ts +28 -0
- package/dist/core/shell-env.js +56 -0
- package/dist/core/shell-env.js.map +1 -0
- package/dist/core/ui-events.d.ts +1 -1
- package/dist/core/usage-limit.d.ts +42 -0
- package/dist/core/usage-limit.js +209 -0
- package/dist/core/usage-limit.js.map +1 -0
- package/dist/git-diff-base.d.ts +51 -26
- package/dist/git-diff-base.js +163 -37
- package/dist/git-diff-base.js.map +1 -1
- package/dist/git-worktree.d.ts +15 -6
- package/dist/git-worktree.js +10 -3
- package/dist/git-worktree.js.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/paths.d.ts +53 -5
- package/dist/paths.js +63 -9
- package/dist/paths.js.map +1 -1
- package/dist/planner.js +6 -0
- package/dist/planner.js.map +1 -1
- package/dist/release/snapshot.d.ts +13 -2
- package/dist/release/snapshot.js +25 -1
- package/dist/release/snapshot.js.map +1 -1
- package/dist/runs/agent-tmpdir.d.ts +41 -0
- package/dist/runs/agent-tmpdir.js +183 -0
- package/dist/runs/agent-tmpdir.js.map +1 -0
- package/dist/runs/auto-name.js +6 -1
- package/dist/runs/auto-name.js.map +1 -1
- package/dist/runs/event-history.d.ts +50 -0
- package/dist/runs/event-history.js +613 -0
- package/dist/runs/event-history.js.map +1 -0
- package/dist/runs/run-index.d.ts +19 -0
- package/dist/runs/run-index.js +43 -0
- package/dist/runs/run-index.js.map +1 -0
- package/dist/runs/store.d.ts +78 -19
- package/dist/runs/store.js +175 -43
- package/dist/runs/store.js.map +1 -1
- package/dist/server/capabilities.d.ts +15 -1
- package/dist/server/capabilities.js +16 -1
- package/dist/server/capabilities.js.map +1 -1
- package/dist/server/forge/github.d.ts +169 -0
- package/dist/server/forge/github.js +511 -0
- package/dist/server/forge/github.js.map +1 -1
- package/dist/server/forge/index.d.ts +9 -0
- package/dist/server/forge/index.js +14 -0
- package/dist/server/forge/index.js.map +1 -1
- package/dist/server/git-changes.d.ts +7 -5
- package/dist/server/git-changes.js +15 -10
- package/dist/server/git-changes.js.map +1 -1
- package/dist/server/github.d.ts +2 -2
- package/dist/server/github.js +1 -1
- package/dist/server/github.js.map +1 -1
- package/dist/server/open-in-app.d.ts +2 -1
- package/dist/server/open-in-app.js +3 -1
- package/dist/server/open-in-app.js.map +1 -1
- package/dist/server/open-in-terminal.d.ts +46 -1
- package/dist/server/open-in-terminal.js +72 -13
- package/dist/server/open-in-terminal.js.map +1 -1
- package/dist/server/provider-action-gate.js +3 -1
- package/dist/server/provider-action-gate.js.map +1 -1
- package/dist/server/server.d.ts +2206 -434
- package/dist/server/server.js +1219 -136
- package/dist/server/server.js.map +1 -1
- package/dist/server-install/engine.js +5 -18
- package/dist/server-install/engine.js.map +1 -1
- package/dist/server-install/steps.js +6 -2
- package/dist/server-install/steps.js.map +1 -1
- package/dist/skills.js +4 -0
- package/dist/skills.js.map +1 -1
- package/dist/workflows/run.d.ts +229 -9
- package/dist/workflows/run.js +877 -147
- package/dist/workflows/run.js.map +1 -1
- package/dist/workflows/types.d.ts +3 -0
- package/dist/workflows/types.js +11 -2
- package/dist/workflows/types.js.map +1 -1
- package/dist/workspace/agent-accounts.d.ts +153 -0
- package/dist/workspace/agent-accounts.js +304 -0
- package/dist/workspace/agent-accounts.js.map +1 -0
- package/dist/workspace/agent-profiles.d.ts +78 -0
- package/dist/workspace/agent-profiles.js +115 -0
- package/dist/workspace/agent-profiles.js.map +1 -0
- package/dist/workspace/config.d.ts +27 -1
- package/dist/workspace/config.js +83 -2
- package/dist/workspace/config.js.map +1 -1
- package/dist/workspace/projects-cli.js +54 -4
- package/dist/workspace/projects-cli.js.map +1 -1
- package/dist/workspace/projects.d.ts +19 -1
- package/dist/workspace/projects.js +34 -1
- package/dist/workspace/projects.js.map +1 -1
- package/dist/workspace/semaphore.d.ts +46 -1
- package/dist/workspace/semaphore.js +41 -4
- package/dist/workspace/semaphore.js.map +1 -1
- package/dist/workspace/ui-state.d.ts +3 -2
- package/dist/workspace/ui-state.js +3 -2
- package/dist/workspace/ui-state.js.map +1 -1
- package/package.json +3 -3
- package/scripts/mock-claude.mjs +20 -0
- package/scripts/mock-pi-rpc.mjs +83 -0
- package/web/dist/assets/{alert-dialog-ghffK6g9.js → alert-dialog-Byp42_IG.js} +1 -1
- package/web/dist/assets/arrow-down-CGDbDYKD.js +1 -0
- package/web/dist/assets/arrow-left-ESCjr1Hq.js +1 -0
- package/web/dist/assets/centered-state-LfAW-igm.js +43 -0
- package/web/dist/assets/chevron-right-Du-P1IUd.js +1 -0
- package/web/dist/assets/{collapsible-B0JVzd0B.js → collapsible-CBiiqDJM.js} +1 -1
- package/web/dist/assets/{commit-list-wm6DPHNs.js → commit-list-6PPve7PE.js} +1 -1
- package/web/dist/assets/{compare-variants-DbdP4Y5T.js → compare-variants-BDnp6mXJ.js} +1 -1
- package/web/dist/assets/{diff-Bizc96qe.js → diff-_jK0OWpF.js} +2 -2
- package/web/dist/assets/{diff-stat-Dyfg3ltF.js → diff-stat-CIrTu4Ym.js} +1 -1
- package/web/dist/assets/{diff-view-CG8ek6tC.js → diff-view-COA_5IyY.js} +1 -1
- package/web/dist/assets/dropdown-menu-BofYpFFw.js +1 -0
- package/web/dist/assets/editable-title-_J0zFDl-.js +1 -0
- package/web/dist/assets/{ellipsis-vertical-DpGTRqC2.js → ellipsis-vertical-BeMR-l62.js} +1 -1
- package/web/dist/assets/{file-DlUGpUlb.js → file-DY996Pee.js} +1 -1
- package/web/dist/assets/{folder-BAY6Vddy.js → folder-NO3Ec-TY.js} +1 -1
- package/web/dist/assets/git-toolbar-BqJeUWcD.js +1 -0
- package/web/dist/assets/github-C96HPV9E.js +1 -0
- package/web/dist/assets/{image-preview-BWGk5fPX.js → image-preview-D9cCDfKQ.js} +1 -1
- package/web/dist/assets/index-Bx-grqa9.css +2 -0
- package/web/dist/assets/index-DoVvGDfW.js +7 -0
- package/web/dist/assets/{markdown-BGBOGCA_.js → markdown-DDzk11zj.js} +1 -1
- package/web/dist/assets/new-task-form-BNLLgC6P.js +1 -0
- package/web/dist/assets/pill-CVM1EmV4.js +1 -0
- package/web/dist/assets/{project-router-Cx8NPoqn.js → project-router-LRCtP48W.js} +1 -1
- package/web/dist/assets/prompt-templates-DFOvYgtW.js +15 -0
- package/web/dist/assets/{refresh-cw-BoGdAykg.js → refresh-cw-D1ys6QY2.js} +1 -1
- package/web/dist/assets/repo-git-CzUnsgWY.js +1 -0
- package/web/dist/assets/{run-diff-EcOkf3ti.js → run-diff-BlnqwfSS.js} +2 -2
- package/web/dist/assets/run-header-Bn7cN0Z1.js +1 -0
- package/web/dist/assets/{search-x-X3EpVhgs.js → search-x-D6FSpxId.js} +1 -1
- package/web/dist/assets/{skill-empty-hint-CZLALx6l.js → skill-empty-hint-iwpCcqgI.js} +1 -1
- package/web/dist/assets/skills-CezbOaol.js +1 -0
- package/web/dist/assets/{sparkles-Dt4q7pbG.js → sparkles-MrQrgCI9.js} +1 -1
- package/web/dist/assets/{square-terminal-hwBL8XsC.js → square-terminal-TTH64lO7.js} +1 -1
- package/web/dist/assets/tab-link-FYksz037.js +1 -0
- package/web/dist/assets/task-changes-ClWlnzBL.js +1 -0
- package/web/dist/assets/{task-commits-BTTA5k5T.js → task-commits-Crbrl86b.js} +1 -1
- package/web/dist/assets/{task-files-Da8_4C9g.js → task-files-uSCWyD0-.js} +2 -2
- package/web/dist/assets/task-thread-DPmamBA1.js +9 -0
- package/web/dist/assets/{textarea-CUdokhkv.js → textarea-B9Ahj4E4.js} +1 -1
- package/web/dist/assets/thread-loading-BH_ypQoy.js +1 -0
- package/web/dist/assets/{trash-2-DhVIdWv8.js → trash-2-D8S3V3fu.js} +1 -1
- package/web/dist/assets/{triangle-alert-XYT0DGCI.js → triangle-alert-bB7p9n5E.js} +1 -1
- package/web/dist/assets/{upload-BKjN59-1.js → upload-Bd5oRLPV.js} +1 -1
- package/web/dist/assets/{use-desktop-Bf5LS_P4.js → use-desktop-BNvbRBeZ.js} +1 -1
- package/web/dist/assets/{use-submit-shortcut-CzVyoAMd.js → use-submit-shortcut-B-xhu4Bf.js} +1 -1
- package/web/dist/assets/utils-BhpbVMwN.js +64 -0
- package/web/dist/assets/{workflows-o2QU_pvU.js → workflows-RmfbM9Vy.js} +3 -3
- package/web/dist/assets/{zoomable-image-7WyUiaVD.js → zoomable-image-BCW6ZBV0.js} +1 -1
- package/web/dist/index.html +24 -23
- package/web/dist/assets/arrow-down-Cz8qb71e.js +0 -1
- package/web/dist/assets/arrow-left-wcYKQXI_.js +0 -1
- package/web/dist/assets/centered-state-ZtnFHA-n.js +0 -43
- package/web/dist/assets/chevron-right-G4caF2QV.js +0 -1
- package/web/dist/assets/circle-check--KvBxXWp.js +0 -1
- package/web/dist/assets/circle-x-C3EFZ3xf.js +0 -1
- package/web/dist/assets/dropdown-menu-C1Dlf35P.js +0 -1
- package/web/dist/assets/editable-title-5rC_QRBZ.js +0 -1
- package/web/dist/assets/git-pull-request-agOG0iGM.js +0 -1
- package/web/dist/assets/git-toolbar-DGiNMmtY.js +0 -1
- package/web/dist/assets/github-Vp7lxYGQ.js +0 -1
- package/web/dist/assets/index-DSxyJpuK.css +0 -2
- package/web/dist/assets/index-DiawI6RX.js +0 -6
- package/web/dist/assets/new-task-form-BpAw_Dks.js +0 -1
- package/web/dist/assets/pill-Dvs-P0xy.js +0 -1
- package/web/dist/assets/prompt-templates-CSBYBR1I.js +0 -15
- package/web/dist/assets/repo-git-PmX-BNMo.js +0 -1
- package/web/dist/assets/run-header-BGiv6_qX.js +0 -1
- package/web/dist/assets/skills-CC91ouGH.js +0 -1
- package/web/dist/assets/tab-link-DIlR5T07.js +0 -1
- package/web/dist/assets/task-changes-XkHDxzQA.js +0 -1
- package/web/dist/assets/task-thread-DoNXUsHr.js +0 -9
- package/web/dist/assets/thread-loading-B8q8ukXJ.js +0 -1
- package/web/dist/assets/utils-DsLuRXwV.js +0 -64
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Agent profiles — extra config dirs for a SECOND login of the same agent CLI
|
|
4
|
+
* (`CLAUDE_CONFIG_DIR=~/.claude-klaudiusz claude`), spec `2026-07-29-agent-profiles`.
|
|
5
|
+
*
|
|
6
|
+
* Workspace-level, so single-mount: `/api/v1/workspace/agent-profiles`. Never project-scoped —
|
|
7
|
+
* an account belongs to the person and the machine, and a second scoped spelling would be a
|
|
8
|
+
* second surface to protect with no consumer. Which account a PROJECT uses rides on
|
|
9
|
+
* `PUT …/agent-profiles/selection` in this same family, because it is stored beside the accounts
|
|
10
|
+
* it names rather than on the project registry (see `src/workspace/agent-accounts.ts`).
|
|
11
|
+
*
|
|
12
|
+
* Node-free by construction (see README rule 1) — `zod` and the sibling contract modules only.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* The id of the DISCOVERED account — the one `agentHomePaths()` finds from the environment.
|
|
16
|
+
*
|
|
17
|
+
* Reserved: never allocated to a stored account, never written to `~/.cezar/agent-accounts.json`.
|
|
18
|
+
* It is a real, meaningful value on the wire in two places, and they are not the same thing:
|
|
19
|
+
* `PUT …/agent-profiles/selection` takes it (like `null`) to CLEAR a repo back to the discovered
|
|
20
|
+
* account, and `POST /api/v1/runs` takes it as `agentProfile` to mean "this task uses the
|
|
21
|
+
* discovered account, whatever the repo is set to" — which `selectProfile` honours over the repo's
|
|
22
|
+
* selection. Defined here so the cockpit and the server cannot disagree about the spelling.
|
|
23
|
+
*/
|
|
24
|
+
export declare const DEFAULT_AGENT_ACCOUNT_ID = "default";
|
|
25
|
+
/**
|
|
26
|
+
* One of the agent's OWN config files, resolved against THIS account's folder.
|
|
27
|
+
*
|
|
28
|
+
* Addressed by the catalog's stable, opaque `id` — never a path the client composes, which is what
|
|
29
|
+
* makes the open route traversal-proof by construction (the same rule `/api/v1/agent-config/:id`
|
|
30
|
+
* follows).
|
|
31
|
+
*/
|
|
32
|
+
export declare const agentAccountFileSchema: z.ZodObject<{
|
|
33
|
+
id: z.ZodString;
|
|
34
|
+
label: z.ZodString;
|
|
35
|
+
path: z.ZodString;
|
|
36
|
+
exists: z.ZodBoolean;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
export type AgentAccountFile = z.infer<typeof agentAccountFileSchema>;
|
|
39
|
+
/**
|
|
40
|
+
* One account, as the cockpit sees it.
|
|
41
|
+
*
|
|
42
|
+
* A CLOSED object, on the same terms as `projectListEntrySchema`: `.passthrough()` on the
|
|
43
|
+
* persistence side (`src/workspace/agent-accounts.ts`) is a durability promise about
|
|
44
|
+
* `~/.cezar/agent-accounts.json`, not a promise that the API answers arbitrary keys.
|
|
45
|
+
*/
|
|
46
|
+
export declare const agentProfileSchema: z.ZodObject<{
|
|
47
|
+
id: z.ZodString;
|
|
48
|
+
provider: z.ZodEnum<{
|
|
49
|
+
claude: "claude";
|
|
50
|
+
codex: "codex";
|
|
51
|
+
opencode: "opencode";
|
|
52
|
+
pi: "pi";
|
|
53
|
+
}>;
|
|
54
|
+
label: z.ZodString;
|
|
55
|
+
configDir: z.ZodString;
|
|
56
|
+
path: z.ZodString;
|
|
57
|
+
exists: z.ZodBoolean;
|
|
58
|
+
looksValid: z.ZodBoolean;
|
|
59
|
+
isDefault: z.ZodBoolean;
|
|
60
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
61
|
+
provider: z.ZodEnum<{
|
|
62
|
+
claude: "claude";
|
|
63
|
+
codex: "codex";
|
|
64
|
+
opencode: "opencode";
|
|
65
|
+
pi: "pi";
|
|
66
|
+
}>;
|
|
67
|
+
status: z.ZodEnum<{
|
|
68
|
+
connected: "connected";
|
|
69
|
+
disconnected: "disconnected";
|
|
70
|
+
"not-installed": "not-installed";
|
|
71
|
+
unknown: "unknown";
|
|
72
|
+
}>;
|
|
73
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
74
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
75
|
+
authFailureId: z.ZodOptional<z.ZodString>;
|
|
76
|
+
profileId: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, z.core.$strip>>;
|
|
78
|
+
files: z.ZodArray<z.ZodObject<{
|
|
79
|
+
id: z.ZodString;
|
|
80
|
+
label: z.ZodString;
|
|
81
|
+
path: z.ZodString;
|
|
82
|
+
exists: z.ZodBoolean;
|
|
83
|
+
}, z.core.$strip>>;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
export type AgentProfile = z.infer<typeof agentProfileSchema>;
|
|
86
|
+
/**
|
|
87
|
+
* How to address one account in the per-account routes (`…/:id/details`, `…/:id/open`).
|
|
88
|
+
*
|
|
89
|
+
* Every DISCOVERED account shares `id: "default"` — that spelling is load-bearing in the selection
|
|
90
|
+
* routes, where it means "back to the discovered account" — so it cannot identify which agent's
|
|
91
|
+
* default is meant. These two routes therefore take `default:<provider>` for a discovered account
|
|
92
|
+
* and the stored slug otherwise. Defined once, here, so the client and the server cannot disagree
|
|
93
|
+
* about the encoding; still opaque, still not a path.
|
|
94
|
+
*/
|
|
95
|
+
export declare function agentAccountRouteId(profile: Pick<AgentProfile, 'id' | 'provider' | 'isDefault'>): string;
|
|
96
|
+
/** One project's account choice, per provider. An absent key = the discovered account. */
|
|
97
|
+
export declare const agentAccountSelectionSchema: z.ZodObject<{
|
|
98
|
+
claude: z.ZodOptional<z.ZodString>;
|
|
99
|
+
codex: z.ZodOptional<z.ZodString>;
|
|
100
|
+
opencode: z.ZodOptional<z.ZodString>;
|
|
101
|
+
pi: z.ZodOptional<z.ZodString>;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
export type AgentAccountSelection = z.infer<typeof agentAccountSelectionSchema>;
|
|
104
|
+
/**
|
|
105
|
+
* `GET /api/v1/workspace/agent-profiles` — every account, discovered defaults first.
|
|
106
|
+
*
|
|
107
|
+
* `editable` is false in hosted mode (`CEZ_REMOTE`), where the whole family is refused: defining
|
|
108
|
+
* a profile points an agent at a local directory, and the listing echoes absolute paths carrying
|
|
109
|
+
* the username. Same posture as `PUT /api/v1/agent-config/:id`.
|
|
110
|
+
*/
|
|
111
|
+
export declare const agentProfilesResponseSchema: z.ZodObject<{
|
|
112
|
+
editable: z.ZodBoolean;
|
|
113
|
+
profiles: z.ZodArray<z.ZodObject<{
|
|
114
|
+
id: z.ZodString;
|
|
115
|
+
provider: z.ZodEnum<{
|
|
116
|
+
claude: "claude";
|
|
117
|
+
codex: "codex";
|
|
118
|
+
opencode: "opencode";
|
|
119
|
+
pi: "pi";
|
|
120
|
+
}>;
|
|
121
|
+
label: z.ZodString;
|
|
122
|
+
configDir: z.ZodString;
|
|
123
|
+
path: z.ZodString;
|
|
124
|
+
exists: z.ZodBoolean;
|
|
125
|
+
looksValid: z.ZodBoolean;
|
|
126
|
+
isDefault: z.ZodBoolean;
|
|
127
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
128
|
+
provider: z.ZodEnum<{
|
|
129
|
+
claude: "claude";
|
|
130
|
+
codex: "codex";
|
|
131
|
+
opencode: "opencode";
|
|
132
|
+
pi: "pi";
|
|
133
|
+
}>;
|
|
134
|
+
status: z.ZodEnum<{
|
|
135
|
+
connected: "connected";
|
|
136
|
+
disconnected: "disconnected";
|
|
137
|
+
"not-installed": "not-installed";
|
|
138
|
+
unknown: "unknown";
|
|
139
|
+
}>;
|
|
140
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
141
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
142
|
+
authFailureId: z.ZodOptional<z.ZodString>;
|
|
143
|
+
profileId: z.ZodOptional<z.ZodString>;
|
|
144
|
+
}, z.core.$strip>>;
|
|
145
|
+
files: z.ZodArray<z.ZodObject<{
|
|
146
|
+
id: z.ZodString;
|
|
147
|
+
label: z.ZodString;
|
|
148
|
+
path: z.ZodString;
|
|
149
|
+
exists: z.ZodBoolean;
|
|
150
|
+
}, z.core.$strip>>;
|
|
151
|
+
}, z.core.$strip>>;
|
|
152
|
+
profileCapableProviders: z.ZodArray<z.ZodEnum<{
|
|
153
|
+
claude: "claude";
|
|
154
|
+
codex: "codex";
|
|
155
|
+
opencode: "opencode";
|
|
156
|
+
pi: "pi";
|
|
157
|
+
}>>;
|
|
158
|
+
selections: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
159
|
+
claude: z.ZodOptional<z.ZodString>;
|
|
160
|
+
codex: z.ZodOptional<z.ZodString>;
|
|
161
|
+
opencode: z.ZodOptional<z.ZodString>;
|
|
162
|
+
pi: z.ZodOptional<z.ZodString>;
|
|
163
|
+
}, z.core.$strip>>;
|
|
164
|
+
defaults: z.ZodObject<{
|
|
165
|
+
claude: z.ZodOptional<z.ZodString>;
|
|
166
|
+
codex: z.ZodOptional<z.ZodString>;
|
|
167
|
+
opencode: z.ZodOptional<z.ZodString>;
|
|
168
|
+
pi: z.ZodOptional<z.ZodString>;
|
|
169
|
+
}, z.core.$strip>;
|
|
170
|
+
}, z.core.$strip>;
|
|
171
|
+
export type AgentProfilesResponse = z.infer<typeof agentProfilesResponseSchema>;
|
|
172
|
+
/**
|
|
173
|
+
* `PUT /api/v1/workspace/agent-profiles/selection` — point one project's provider at an account.
|
|
174
|
+
*
|
|
175
|
+
* `profileId: null` (and the reserved `"default"`) clear it back to the discovered account, stored
|
|
176
|
+
* as absence. An id that does not exist, or belongs to another provider, is a 400 — never silently
|
|
177
|
+
* degraded, because a typo the route accepted would quietly run the project on the wrong account.
|
|
178
|
+
*/
|
|
179
|
+
export declare const selectAgentProfileInputSchema: z.ZodObject<{
|
|
180
|
+
projectId: z.ZodNullable<z.ZodString>;
|
|
181
|
+
provider: z.ZodEnum<{
|
|
182
|
+
claude: "claude";
|
|
183
|
+
codex: "codex";
|
|
184
|
+
opencode: "opencode";
|
|
185
|
+
pi: "pi";
|
|
186
|
+
}>;
|
|
187
|
+
profileId: z.ZodNullable<z.ZodString>;
|
|
188
|
+
}, z.core.$strip>;
|
|
189
|
+
export type SelectAgentProfileInput = z.infer<typeof selectAgentProfileInputSchema>;
|
|
190
|
+
/** The selection map after the write — the same shape the listing carries. */
|
|
191
|
+
export declare const agentProfileSelectionsResponseSchema: z.ZodObject<{
|
|
192
|
+
selections: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
193
|
+
claude: z.ZodOptional<z.ZodString>;
|
|
194
|
+
codex: z.ZodOptional<z.ZodString>;
|
|
195
|
+
opencode: z.ZodOptional<z.ZodString>;
|
|
196
|
+
pi: z.ZodOptional<z.ZodString>;
|
|
197
|
+
}, z.core.$strip>>;
|
|
198
|
+
defaults: z.ZodObject<{
|
|
199
|
+
claude: z.ZodOptional<z.ZodString>;
|
|
200
|
+
codex: z.ZodOptional<z.ZodString>;
|
|
201
|
+
opencode: z.ZodOptional<z.ZodString>;
|
|
202
|
+
pi: z.ZodOptional<z.ZodString>;
|
|
203
|
+
}, z.core.$strip>;
|
|
204
|
+
}, z.core.$strip>;
|
|
205
|
+
export type AgentProfileSelectionsResponse = z.infer<typeof agentProfileSelectionsResponseSchema>;
|
|
206
|
+
/** `GET /api/v1/workspace/agent-profiles/:id/status` — one account's auth state, probed for real.
|
|
207
|
+
* `?refresh=1` drops this account's cached answer and re-probes. Kept off the listing so a cold
|
|
208
|
+
* load pays no CLI spawn. */
|
|
209
|
+
export declare const agentAccountStatusResponseSchema: z.ZodObject<{
|
|
210
|
+
status: z.ZodObject<{
|
|
211
|
+
provider: z.ZodEnum<{
|
|
212
|
+
claude: "claude";
|
|
213
|
+
codex: "codex";
|
|
214
|
+
opencode: "opencode";
|
|
215
|
+
pi: "pi";
|
|
216
|
+
}>;
|
|
217
|
+
status: z.ZodEnum<{
|
|
218
|
+
connected: "connected";
|
|
219
|
+
disconnected: "disconnected";
|
|
220
|
+
"not-installed": "not-installed";
|
|
221
|
+
unknown: "unknown";
|
|
222
|
+
}>;
|
|
223
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
224
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
225
|
+
authFailureId: z.ZodOptional<z.ZodString>;
|
|
226
|
+
profileId: z.ZodOptional<z.ZodString>;
|
|
227
|
+
}, z.core.$strip>;
|
|
228
|
+
}, z.core.$strip>;
|
|
229
|
+
export type AgentAccountStatusResponse = z.infer<typeof agentAccountStatusResponseSchema>;
|
|
230
|
+
/**
|
|
231
|
+
* `GET /api/v1/workspace/agent-profiles/:id/details` — who this account is signed in as.
|
|
232
|
+
*
|
|
233
|
+
* A SEPARATE, on-demand route rather than a field on the listing, and that is the whole point of
|
|
234
|
+
* "hidden by default": if the listing carried an email, hiding it in the UI would be theatre — it
|
|
235
|
+
* would already be in the response, the query cache and devtools. It is fetched only when the user
|
|
236
|
+
* asks, is refused in hosted mode, and is never logged or persisted.
|
|
237
|
+
*
|
|
238
|
+
* `fields` is a labelled list rather than a fixed shape because what an agent knows about its own
|
|
239
|
+
* login differs; inventing an empty "Organization" for one that has no such concept would be a
|
|
240
|
+
* worse answer than omitting the row. `available: false` carries a `reason` in the user's terms.
|
|
241
|
+
*/
|
|
242
|
+
export declare const agentAccountDetailsResponseSchema: z.ZodObject<{
|
|
243
|
+
available: z.ZodBoolean;
|
|
244
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
245
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
246
|
+
label: z.ZodString;
|
|
247
|
+
value: z.ZodString;
|
|
248
|
+
}, z.core.$strip>>;
|
|
249
|
+
}, z.core.$strip>;
|
|
250
|
+
export type AgentAccountDetailsResponse = z.infer<typeof agentAccountDetailsResponseSchema>;
|
|
251
|
+
/**
|
|
252
|
+
* `POST /api/v1/workspace/agent-profiles/:id/open` — hand one of this account's config files (or
|
|
253
|
+
* the folder itself) to a local app.
|
|
254
|
+
*
|
|
255
|
+
* `file` is a catalog id from the account's own `files`, or `folder` for the config dir. `target`
|
|
256
|
+
* is an `/api/v1/open-targets` id — an editor, or the file manager for `folder` — and omitted means
|
|
257
|
+
* the OS default handler.
|
|
258
|
+
*
|
|
259
|
+
* Two target families are refused with a 400 rather than silently misbehaving: `terminal` for a
|
|
260
|
+
* FILE (it would `cd` into it) and any `cli:<runner>` handoff (it would start an agent session
|
|
261
|
+
* inside the config folder). An unknown/undetected target is a 400 too.
|
|
262
|
+
*/
|
|
263
|
+
export declare const openAgentAccountFileInputSchema: z.ZodObject<{
|
|
264
|
+
file: z.ZodString;
|
|
265
|
+
target: z.ZodOptional<z.ZodString>;
|
|
266
|
+
}, z.core.$strip>;
|
|
267
|
+
export type OpenAgentAccountFileInput = z.infer<typeof openAgentAccountFileInputSchema>;
|
|
268
|
+
/** `POST …/open` — what was opened, so the UI can say so rather than guess. */
|
|
269
|
+
export declare const openAgentAccountFileResponseSchema: z.ZodObject<{
|
|
270
|
+
opened: z.ZodLiteral<true>;
|
|
271
|
+
path: z.ZodString;
|
|
272
|
+
}, z.core.$strip>;
|
|
273
|
+
export type OpenAgentAccountFileResponse = z.infer<typeof openAgentAccountFileResponseSchema>;
|
|
274
|
+
/** `POST /api/v1/workspace/agent-profiles` — the id is allocated server-side from the label. */
|
|
275
|
+
export declare const createAgentProfileInputSchema: z.ZodObject<{
|
|
276
|
+
provider: z.ZodEnum<{
|
|
277
|
+
claude: "claude";
|
|
278
|
+
codex: "codex";
|
|
279
|
+
opencode: "opencode";
|
|
280
|
+
pi: "pi";
|
|
281
|
+
}>;
|
|
282
|
+
label: z.ZodOptional<z.ZodString>;
|
|
283
|
+
configDir: z.ZodString;
|
|
284
|
+
}, z.core.$strip>;
|
|
285
|
+
export type CreateAgentProfileInput = z.infer<typeof createAgentProfileInputSchema>;
|
|
286
|
+
/**
|
|
287
|
+
* `POST` / `PATCH /api/v1/workspace/agent-profiles/:id` — the affected row.
|
|
288
|
+
*
|
|
289
|
+
* Answered WITHOUT waiting for a probe, like the listing: `status` is absent and the server kicks
|
|
290
|
+
* the re-learn off behind the response, so adding an account does not block on a CLI spawn. The
|
|
291
|
+
* pane's own request for that row joins the same in-flight probe rather than starting a second.
|
|
292
|
+
*/
|
|
293
|
+
export declare const agentProfileResponseSchema: z.ZodObject<{
|
|
294
|
+
profile: z.ZodObject<{
|
|
295
|
+
id: z.ZodString;
|
|
296
|
+
provider: z.ZodEnum<{
|
|
297
|
+
claude: "claude";
|
|
298
|
+
codex: "codex";
|
|
299
|
+
opencode: "opencode";
|
|
300
|
+
pi: "pi";
|
|
301
|
+
}>;
|
|
302
|
+
label: z.ZodString;
|
|
303
|
+
configDir: z.ZodString;
|
|
304
|
+
path: z.ZodString;
|
|
305
|
+
exists: z.ZodBoolean;
|
|
306
|
+
looksValid: z.ZodBoolean;
|
|
307
|
+
isDefault: z.ZodBoolean;
|
|
308
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
309
|
+
provider: z.ZodEnum<{
|
|
310
|
+
claude: "claude";
|
|
311
|
+
codex: "codex";
|
|
312
|
+
opencode: "opencode";
|
|
313
|
+
pi: "pi";
|
|
314
|
+
}>;
|
|
315
|
+
status: z.ZodEnum<{
|
|
316
|
+
connected: "connected";
|
|
317
|
+
disconnected: "disconnected";
|
|
318
|
+
"not-installed": "not-installed";
|
|
319
|
+
unknown: "unknown";
|
|
320
|
+
}>;
|
|
321
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
322
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
323
|
+
authFailureId: z.ZodOptional<z.ZodString>;
|
|
324
|
+
profileId: z.ZodOptional<z.ZodString>;
|
|
325
|
+
}, z.core.$strip>>;
|
|
326
|
+
files: z.ZodArray<z.ZodObject<{
|
|
327
|
+
id: z.ZodString;
|
|
328
|
+
label: z.ZodString;
|
|
329
|
+
path: z.ZodString;
|
|
330
|
+
exists: z.ZodBoolean;
|
|
331
|
+
}, z.core.$strip>>;
|
|
332
|
+
}, z.core.$strip>;
|
|
333
|
+
}, z.core.$strip>;
|
|
334
|
+
export type AgentProfileResponse = z.infer<typeof agentProfileResponseSchema>;
|
|
335
|
+
/** `PATCH /api/v1/workspace/agent-profiles/:id` — partial; absent keys stay untouched. */
|
|
336
|
+
export declare const updateAgentProfileInputSchema: z.ZodObject<{
|
|
337
|
+
label: z.ZodOptional<z.ZodString>;
|
|
338
|
+
configDir: z.ZodOptional<z.ZodString>;
|
|
339
|
+
}, z.core.$strip>;
|
|
340
|
+
export type UpdateAgentProfileInput = z.infer<typeof updateAgentProfileInputSchema>;
|
|
341
|
+
/** `DELETE /api/v1/workspace/agent-profiles/:id` — deregistration only; the directory is never
|
|
342
|
+
* touched. Projects that referenced it fall back to the discovered default. */
|
|
343
|
+
export declare const removeAgentProfileResponseSchema: z.ZodObject<{
|
|
344
|
+
removed: z.ZodLiteral<true>;
|
|
345
|
+
id: z.ZodString;
|
|
346
|
+
}, z.core.$strip>;
|
|
347
|
+
export type RemoveAgentProfileResponse = z.infer<typeof removeAgentProfileResponseSchema>;
|
|
@@ -69,6 +69,7 @@ export declare const automationTaskSchema: z.ZodObject<{
|
|
|
69
69
|
claude: "claude";
|
|
70
70
|
codex: "codex";
|
|
71
71
|
opencode: "opencode";
|
|
72
|
+
pi: "pi";
|
|
72
73
|
}>>;
|
|
73
74
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
74
75
|
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -83,7 +84,9 @@ export declare const automationTaskSchema: z.ZodObject<{
|
|
|
83
84
|
claude: "claude";
|
|
84
85
|
codex: "codex";
|
|
85
86
|
opencode: "opencode";
|
|
87
|
+
pi: "pi";
|
|
86
88
|
}>>;
|
|
89
|
+
agentProfile: z.ZodOptional<z.ZodString>;
|
|
87
90
|
worktree: z.ZodOptional<z.ZodBoolean>;
|
|
88
91
|
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
89
92
|
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -128,6 +131,7 @@ export declare const automationDefinitionSchema: z.ZodObject<{
|
|
|
128
131
|
claude: "claude";
|
|
129
132
|
codex: "codex";
|
|
130
133
|
opencode: "opencode";
|
|
134
|
+
pi: "pi";
|
|
131
135
|
}>>;
|
|
132
136
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
133
137
|
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -142,7 +146,9 @@ export declare const automationDefinitionSchema: z.ZodObject<{
|
|
|
142
146
|
claude: "claude";
|
|
143
147
|
codex: "codex";
|
|
144
148
|
opencode: "opencode";
|
|
149
|
+
pi: "pi";
|
|
145
150
|
}>>;
|
|
151
|
+
agentProfile: z.ZodOptional<z.ZodString>;
|
|
146
152
|
worktree: z.ZodOptional<z.ZodBoolean>;
|
|
147
153
|
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
148
154
|
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -280,6 +286,7 @@ export declare const automationListEntrySchema: z.ZodObject<{
|
|
|
280
286
|
claude: "claude";
|
|
281
287
|
codex: "codex";
|
|
282
288
|
opencode: "opencode";
|
|
289
|
+
pi: "pi";
|
|
283
290
|
}>>;
|
|
284
291
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
285
292
|
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -294,7 +301,9 @@ export declare const automationListEntrySchema: z.ZodObject<{
|
|
|
294
301
|
claude: "claude";
|
|
295
302
|
codex: "codex";
|
|
296
303
|
opencode: "opencode";
|
|
304
|
+
pi: "pi";
|
|
297
305
|
}>>;
|
|
306
|
+
agentProfile: z.ZodOptional<z.ZodString>;
|
|
298
307
|
worktree: z.ZodOptional<z.ZodBoolean>;
|
|
299
308
|
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
300
309
|
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -422,6 +431,7 @@ export declare const automationsResponseSchema: z.ZodObject<{
|
|
|
422
431
|
claude: "claude";
|
|
423
432
|
codex: "codex";
|
|
424
433
|
opencode: "opencode";
|
|
434
|
+
pi: "pi";
|
|
425
435
|
}>>;
|
|
426
436
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
427
437
|
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -436,7 +446,9 @@ export declare const automationsResponseSchema: z.ZodObject<{
|
|
|
436
446
|
claude: "claude";
|
|
437
447
|
codex: "codex";
|
|
438
448
|
opencode: "opencode";
|
|
449
|
+
pi: "pi";
|
|
439
450
|
}>>;
|
|
451
|
+
agentProfile: z.ZodOptional<z.ZodString>;
|
|
440
452
|
worktree: z.ZodOptional<z.ZodBoolean>;
|
|
441
453
|
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
442
454
|
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -549,6 +561,7 @@ export declare const automationResponseSchema: z.ZodObject<{
|
|
|
549
561
|
claude: "claude";
|
|
550
562
|
codex: "codex";
|
|
551
563
|
opencode: "opencode";
|
|
564
|
+
pi: "pi";
|
|
552
565
|
}>>;
|
|
553
566
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
554
567
|
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -563,7 +576,9 @@ export declare const automationResponseSchema: z.ZodObject<{
|
|
|
563
576
|
claude: "claude";
|
|
564
577
|
codex: "codex";
|
|
565
578
|
opencode: "opencode";
|
|
579
|
+
pi: "pi";
|
|
566
580
|
}>>;
|
|
581
|
+
agentProfile: z.ZodOptional<z.ZodString>;
|
|
567
582
|
worktree: z.ZodOptional<z.ZodBoolean>;
|
|
568
583
|
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
569
584
|
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -613,6 +628,7 @@ export declare const automationDetailResponseSchema: z.ZodObject<{
|
|
|
613
628
|
claude: "claude";
|
|
614
629
|
codex: "codex";
|
|
615
630
|
opencode: "opencode";
|
|
631
|
+
pi: "pi";
|
|
616
632
|
}>>;
|
|
617
633
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
618
634
|
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -627,7 +643,9 @@ export declare const automationDetailResponseSchema: z.ZodObject<{
|
|
|
627
643
|
claude: "claude";
|
|
628
644
|
codex: "codex";
|
|
629
645
|
opencode: "opencode";
|
|
646
|
+
pi: "pi";
|
|
630
647
|
}>>;
|
|
648
|
+
agentProfile: z.ZodOptional<z.ZodString>;
|
|
631
649
|
worktree: z.ZodOptional<z.ZodBoolean>;
|
|
632
650
|
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
633
651
|
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -813,6 +831,7 @@ export declare const createAutomationInputSchema: z.ZodObject<{
|
|
|
813
831
|
claude: "claude";
|
|
814
832
|
codex: "codex";
|
|
815
833
|
opencode: "opencode";
|
|
834
|
+
pi: "pi";
|
|
816
835
|
}>>;
|
|
817
836
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
818
837
|
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -827,7 +846,9 @@ export declare const createAutomationInputSchema: z.ZodObject<{
|
|
|
827
846
|
claude: "claude";
|
|
828
847
|
codex: "codex";
|
|
829
848
|
opencode: "opencode";
|
|
849
|
+
pi: "pi";
|
|
830
850
|
}>>;
|
|
851
|
+
agentProfile: z.ZodOptional<z.ZodString>;
|
|
831
852
|
worktree: z.ZodOptional<z.ZodBoolean>;
|
|
832
853
|
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
833
854
|
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -875,6 +896,7 @@ export declare const updateAutomationInputSchema: z.ZodObject<{
|
|
|
875
896
|
claude: "claude";
|
|
876
897
|
codex: "codex";
|
|
877
898
|
opencode: "opencode";
|
|
899
|
+
pi: "pi";
|
|
878
900
|
}>>;
|
|
879
901
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
880
902
|
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -889,7 +911,9 @@ export declare const updateAutomationInputSchema: z.ZodObject<{
|
|
|
889
911
|
claude: "claude";
|
|
890
912
|
codex: "codex";
|
|
891
913
|
opencode: "opencode";
|
|
914
|
+
pi: "pi";
|
|
892
915
|
}>>;
|
|
916
|
+
agentProfile: z.ZodOptional<z.ZodString>;
|
|
893
917
|
worktree: z.ZodOptional<z.ZodBoolean>;
|
|
894
918
|
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
895
919
|
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -24,6 +24,65 @@ export declare const runEventSchema: z.ZodObject<{
|
|
|
24
24
|
type: z.ZodString;
|
|
25
25
|
}, z.core.$loose>;
|
|
26
26
|
export type RunEvent = z.infer<typeof runEventSchema>;
|
|
27
|
+
/** Fixed protocol-level item count for one progressive transcript page. */
|
|
28
|
+
export declare const RUN_HISTORY_PAGE_ITEMS = 100;
|
|
29
|
+
export declare const runIdParamSchema: z.ZodObject<{
|
|
30
|
+
id: z.ZodString;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export type RunIdParam = z.infer<typeof runIdParamSchema>;
|
|
33
|
+
/** Opaque, short-lived cursor returned by the history API. */
|
|
34
|
+
export declare const runHistoryCursorSchema: z.ZodString;
|
|
35
|
+
export type RunHistoryCursor = z.infer<typeof runHistoryCursorSchema>;
|
|
36
|
+
/** Query accepted by the reverse-paged history endpoint. */
|
|
37
|
+
export declare const runHistoryQuerySchema: z.ZodObject<{
|
|
38
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
export type RunHistoryQuery = z.infer<typeof runHistoryQuerySchema>;
|
|
41
|
+
/** Additive resume controls for the existing per-run SSE endpoint. */
|
|
42
|
+
export declare const runEventsQuerySchema: z.ZodObject<{
|
|
43
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
44
|
+
afterSeq: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
export type RunEventsQuery = z.infer<typeof runEventsQuerySchema>;
|
|
47
|
+
/**
|
|
48
|
+
* Persisted history retains the append-only event vocabulary. The required envelope stays
|
|
49
|
+
* strict; additive payload keys remain open for newer protocol events, matching `RunEvent`.
|
|
50
|
+
* `z.any()` is deliberate here: Hono recursively rewrites `unknown` to its JSON union in a
|
|
51
|
+
* response type, making the schema wider than the route even though every value came from
|
|
52
|
+
* `JSON.parse`; `any` is stable on both sides while the required keys remain exact.
|
|
53
|
+
*/
|
|
54
|
+
export declare const runHistoryEventSchema: z.ZodObject<{
|
|
55
|
+
seq: z.ZodNumber;
|
|
56
|
+
ts: z.ZodString;
|
|
57
|
+
stepId: z.ZodOptional<z.ZodString>;
|
|
58
|
+
type: z.ZodString;
|
|
59
|
+
}, z.core.$catchall<z.ZodAny>>;
|
|
60
|
+
export type RunHistoryEvent = z.infer<typeof runHistoryEventSchema>;
|
|
61
|
+
export declare const runHistoryPageSchema: z.ZodObject<{
|
|
62
|
+
events: z.ZodArray<z.ZodObject<{
|
|
63
|
+
seq: z.ZodNumber;
|
|
64
|
+
ts: z.ZodString;
|
|
65
|
+
stepId: z.ZodOptional<z.ZodString>;
|
|
66
|
+
type: z.ZodString;
|
|
67
|
+
}, z.core.$catchall<z.ZodAny>>>;
|
|
68
|
+
itemCount: z.ZodNumber;
|
|
69
|
+
olderCursor: z.ZodOptional<z.ZodString>;
|
|
70
|
+
newerCursor: z.ZodOptional<z.ZodString>;
|
|
71
|
+
liveCursor: z.ZodString;
|
|
72
|
+
asOfSeq: z.ZodNumber;
|
|
73
|
+
hasOlder: z.ZodBoolean;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
export type RunHistoryPage = z.infer<typeof runHistoryPageSchema>;
|
|
76
|
+
export declare const runHistoryContextSchema: z.ZodObject<{
|
|
77
|
+
contextEvents: z.ZodArray<z.ZodObject<{
|
|
78
|
+
seq: z.ZodNumber;
|
|
79
|
+
ts: z.ZodString;
|
|
80
|
+
stepId: z.ZodOptional<z.ZodString>;
|
|
81
|
+
type: z.ZodString;
|
|
82
|
+
}, z.core.$catchall<z.ZodAny>>>;
|
|
83
|
+
asOfSeq: z.ZodNumber;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
export type RunHistoryContext = z.infer<typeof runHistoryContextSchema>;
|
|
27
86
|
/**
|
|
28
87
|
* One `checkout-progress` workspace frame (multi-project spec, step 4.3).
|
|
29
88
|
*
|
|
@@ -101,6 +101,94 @@ export declare const githubChecksDataSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
101
101
|
reason: z.ZodString;
|
|
102
102
|
}, z.core.$strip>], "available">;
|
|
103
103
|
export type GithubChecksData = z.infer<typeof githubChecksDataSchema>;
|
|
104
|
+
/**
|
|
105
|
+
* Where a referenced PR or issue STANDS — the vocabulary a task's tracker chip paints.
|
|
106
|
+
*
|
|
107
|
+
* One flat enum rather than a per-kind union, because the chip renders one status and a union
|
|
108
|
+
* would make every consumer narrow on `kind` before it could pick a color. The kinds share no
|
|
109
|
+
* value on purpose: a closed PR (abandoned — red) and a closed issue (`completed` — done, violet)
|
|
110
|
+
* are opposite outcomes wearing the same English word, and collapsing them is how a merged-looking
|
|
111
|
+
* task turns out to have been dropped.
|
|
112
|
+
*
|
|
113
|
+
* PR values: `merged`, `closed` (closed WITHOUT merging), `draft`, `checks-pending`,
|
|
114
|
+
* `changes-requested`, `checks-failing`, `review-required`, `ready`. Issue values: `open`,
|
|
115
|
+
* `completed`, `not-planned`.
|
|
116
|
+
*
|
|
117
|
+
* Which one a PR gets is `derivePrReferenceStatus`'s ranking (server-side, and documented there):
|
|
118
|
+
* it answers "what is this waiting on right now", so it ranks by how FRESH a signal is rather
|
|
119
|
+
* than by how heavy a blocker it is — running checks mean a commit was just pushed, and a
|
|
120
|
+
* requested change the author has already pushed past is not what the PR is waiting on.
|
|
121
|
+
*
|
|
122
|
+
* `ready` is the honest reading of "nothing is blocking it here": open, not a draft, no failing or
|
|
123
|
+
* running checks, and no review the forge is still waiting on. It is NOT a mergeability probe —
|
|
124
|
+
* that is `githubPrMergeStateResponseSchema`, which costs a request per PR; this is one batched
|
|
125
|
+
* query for a whole table.
|
|
126
|
+
*/
|
|
127
|
+
export declare const referenceStatusSchema: z.ZodEnum<{
|
|
128
|
+
"changes-requested": "changes-requested";
|
|
129
|
+
"checks-failing": "checks-failing";
|
|
130
|
+
"checks-pending": "checks-pending";
|
|
131
|
+
closed: "closed";
|
|
132
|
+
completed: "completed";
|
|
133
|
+
draft: "draft";
|
|
134
|
+
merged: "merged";
|
|
135
|
+
"not-planned": "not-planned";
|
|
136
|
+
open: "open";
|
|
137
|
+
ready: "ready";
|
|
138
|
+
"review-required": "review-required";
|
|
139
|
+
}>;
|
|
140
|
+
export type ReferenceStatus = z.infer<typeof referenceStatusSchema>;
|
|
141
|
+
/**
|
|
142
|
+
* `GET /api/v1/github/ref-status?prs=…&issues=…` — batched status for the PR/issue chips a task
|
|
143
|
+
* table is painting. The additive sibling of `/github/checks`: same cache-behind-the-route shape,
|
|
144
|
+
* same in-payload degrade, same "absent number = nothing known" rule (an unknown or unreachable
|
|
145
|
+
* number is simply missing from the map, and its chip stays neutral).
|
|
146
|
+
*/
|
|
147
|
+
/**
|
|
148
|
+
* How many numbers of ONE kind a single `/github/ref-status` request may name — the route 400s
|
|
149
|
+
* past it, and the cockpit caps its batches to match.
|
|
150
|
+
*
|
|
151
|
+
* It lives in the contract because it is one: a client that believed a larger number would send
|
|
152
|
+
* requests the server rejects outright, costing every chip in the batch its status rather than
|
|
153
|
+
* just the tail. Two constants that must agree, in two packages, with nothing making them, is the
|
|
154
|
+
* drift this export exists to prevent.
|
|
155
|
+
*/
|
|
156
|
+
export declare const REFERENCE_STATUS_MAX = 100;
|
|
157
|
+
export declare const githubRefStatusDataSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
158
|
+
available: z.ZodLiteral<true>;
|
|
159
|
+
prs: z.ZodRecord<z.ZodNumber, z.ZodEnum<{
|
|
160
|
+
"changes-requested": "changes-requested";
|
|
161
|
+
"checks-failing": "checks-failing";
|
|
162
|
+
"checks-pending": "checks-pending";
|
|
163
|
+
closed: "closed";
|
|
164
|
+
completed: "completed";
|
|
165
|
+
draft: "draft";
|
|
166
|
+
merged: "merged";
|
|
167
|
+
"not-planned": "not-planned";
|
|
168
|
+
open: "open";
|
|
169
|
+
ready: "ready";
|
|
170
|
+
"review-required": "review-required";
|
|
171
|
+
}>>;
|
|
172
|
+
issues: z.ZodRecord<z.ZodNumber, z.ZodEnum<{
|
|
173
|
+
"changes-requested": "changes-requested";
|
|
174
|
+
"checks-failing": "checks-failing";
|
|
175
|
+
"checks-pending": "checks-pending";
|
|
176
|
+
closed: "closed";
|
|
177
|
+
completed: "completed";
|
|
178
|
+
draft: "draft";
|
|
179
|
+
merged: "merged";
|
|
180
|
+
"not-planned": "not-planned";
|
|
181
|
+
open: "open";
|
|
182
|
+
ready: "ready";
|
|
183
|
+
"review-required": "review-required";
|
|
184
|
+
}>>;
|
|
185
|
+
recheckAfterMs: z.ZodNullable<z.ZodNumber>;
|
|
186
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
187
|
+
available: z.ZodLiteral<false>;
|
|
188
|
+
reason: z.ZodString;
|
|
189
|
+
recheckAfterMs: z.ZodNullable<z.ZodNumber>;
|
|
190
|
+
}, z.core.$strip>], "available">;
|
|
191
|
+
export type GithubRefStatusData = z.infer<typeof githubRefStatusDataSchema>;
|
|
104
192
|
/** One comment or PR review summary in an issue/PR thread (#499). */
|
|
105
193
|
export declare const githubCommentSchema: z.ZodObject<{
|
|
106
194
|
id: z.ZodNumber;
|