@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,1226 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The RUNS family of `/api/v1` — a task's record, its lifecycle mutations, and the artifacts
|
|
4
|
+
* (queued prompt stack, commits, git actions) that hang off one run.
|
|
5
|
+
*
|
|
6
|
+
* The record itself is persisted by `src/runs/store.ts`, so these schemas describe a shape that
|
|
7
|
+
* already has a zod definition server-side; they are the WIRE half of it, and the parity guard in
|
|
8
|
+
* `src/server/contract-parity.runs.test.ts` is what keeps the two from drifting.
|
|
9
|
+
*
|
|
10
|
+
* Two things about the mutation responses are deliberate and were measured, not assumed:
|
|
11
|
+
*
|
|
12
|
+
* - every "did it work" flag is a `z.literal(true)`, not a boolean. Each of those routes answers
|
|
13
|
+
* 409 (or 404) on refusal, so `false` is not a value the 200 branch can carry — the
|
|
14
|
+
* hand-written DTO's `boolean` invited a re-check the server never needs. `cancelled` is the
|
|
15
|
+
* one real boolean: `POST /runs/:id/cancel` answers 200 either way.
|
|
16
|
+
* - `POST /runs/:id/messages` answers a three-way UNION, not one object with three optional
|
|
17
|
+
* keys. The client narrows on which key is present, and the DTO's flattened shape allowed
|
|
18
|
+
* `{}` — a payload the route cannot produce.
|
|
19
|
+
*/
|
|
20
|
+
export declare const runStatusSchema: z.ZodEnum<{
|
|
21
|
+
cancelled: "cancelled";
|
|
22
|
+
done: "done";
|
|
23
|
+
failed: "failed";
|
|
24
|
+
queued: "queued";
|
|
25
|
+
review: "review";
|
|
26
|
+
running: "running";
|
|
27
|
+
waiting: "waiting";
|
|
28
|
+
}>;
|
|
29
|
+
export type RunStatus = z.infer<typeof runStatusSchema>;
|
|
30
|
+
/**
|
|
31
|
+
* Sub-state of `running` (spec 2026-07-18-subagent-monitoring-status, #490): the agent ended its
|
|
32
|
+
* turn still working on its own downstream work (a sub-agent, a monitored command) and said so
|
|
33
|
+
* with the `CEZ:MONITORING` marker — a non-attention state, not "needs you".
|
|
34
|
+
*/
|
|
35
|
+
export declare const runActivitySchema: z.ZodEnum<{
|
|
36
|
+
monitoring: "monitoring";
|
|
37
|
+
}>;
|
|
38
|
+
export type RunActivity = z.infer<typeof runActivitySchema>;
|
|
39
|
+
export declare const stepStatusSchema: z.ZodEnum<{
|
|
40
|
+
cancelled: "cancelled";
|
|
41
|
+
done: "done";
|
|
42
|
+
failed: "failed";
|
|
43
|
+
pending: "pending";
|
|
44
|
+
review: "review";
|
|
45
|
+
running: "running";
|
|
46
|
+
skipped: "skipped";
|
|
47
|
+
waiting: "waiting";
|
|
48
|
+
}>;
|
|
49
|
+
export type StepStatus = z.infer<typeof stepStatusSchema>;
|
|
50
|
+
/** One step of a run's chain. */
|
|
51
|
+
export declare const stepStateSchema: z.ZodObject<{
|
|
52
|
+
id: z.ZodString;
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
kind: z.ZodEnum<{
|
|
55
|
+
agent: "agent";
|
|
56
|
+
check: "check";
|
|
57
|
+
}>;
|
|
58
|
+
status: z.ZodEnum<{
|
|
59
|
+
cancelled: "cancelled";
|
|
60
|
+
done: "done";
|
|
61
|
+
failed: "failed";
|
|
62
|
+
pending: "pending";
|
|
63
|
+
review: "review";
|
|
64
|
+
running: "running";
|
|
65
|
+
skipped: "skipped";
|
|
66
|
+
waiting: "waiting";
|
|
67
|
+
}>;
|
|
68
|
+
iterations: z.ZodNumber;
|
|
69
|
+
tokensUsed: z.ZodNumber;
|
|
70
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
71
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
72
|
+
usageInvocationsStarted: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
usageInvocationsObserved: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
usageTurnsStarted: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
usageTurnsRecorded: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
usageInvocationEpoch: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
78
|
+
finishedAt: z.ZodOptional<z.ZodString>;
|
|
79
|
+
error: z.ZodOptional<z.ZodString>;
|
|
80
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
81
|
+
backend: z.ZodOptional<z.ZodEnum<{
|
|
82
|
+
claude: "claude";
|
|
83
|
+
codex: "codex";
|
|
84
|
+
opencode: "opencode";
|
|
85
|
+
}>>;
|
|
86
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
export type StepState = z.infer<typeof stepStateSchema>;
|
|
89
|
+
/** Aggregate diff numbers of a run's worktree vs its base (#389). */
|
|
90
|
+
export declare const diffStatSchema: z.ZodObject<{
|
|
91
|
+
adds: z.ZodNumber;
|
|
92
|
+
dels: z.ZodNumber;
|
|
93
|
+
files: z.ZodNumber;
|
|
94
|
+
repointed: z.ZodOptional<z.ZodBoolean>;
|
|
95
|
+
}, z.core.$strip>;
|
|
96
|
+
export type DiffStat = z.infer<typeof diffStatSchema>;
|
|
97
|
+
/** One prompt message stacked onto a run while it waits for a free agent slot (#472). */
|
|
98
|
+
export declare const queuedMessageSchema: z.ZodObject<{
|
|
99
|
+
id: z.ZodString;
|
|
100
|
+
text: z.ZodString;
|
|
101
|
+
images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
102
|
+
createdAt: z.ZodString;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
export type QueuedMessage = z.infer<typeof queuedMessageSchema>;
|
|
105
|
+
/** One aggregated sample of a run's live process tree (`src/core/process-usage.ts`). */
|
|
106
|
+
export declare const processUsageSchema: z.ZodObject<{
|
|
107
|
+
cpuPct: z.ZodNumber;
|
|
108
|
+
rssBytes: z.ZodNumber;
|
|
109
|
+
procCount: z.ZodNumber;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
export type ProcessUsage = z.infer<typeof processUsageSchema>;
|
|
112
|
+
/**
|
|
113
|
+
* The stored run record, as `runs.json` holds it (`src/runs/store.ts`).
|
|
114
|
+
*
|
|
115
|
+
* `archived` is required although the store schema defaults it: a default fills on PARSE, so the
|
|
116
|
+
* key is always present in what the server hands out. Everything else optional here is optional
|
|
117
|
+
* there — these are additive fields, and an absent one means "this run predates it".
|
|
118
|
+
*/
|
|
119
|
+
export declare const runRecordSchema: z.ZodObject<{
|
|
120
|
+
id: z.ZodString;
|
|
121
|
+
title: z.ZodString;
|
|
122
|
+
titleSummary: z.ZodOptional<z.ZodString>;
|
|
123
|
+
diffStat: z.ZodOptional<z.ZodObject<{
|
|
124
|
+
adds: z.ZodNumber;
|
|
125
|
+
dels: z.ZodNumber;
|
|
126
|
+
files: z.ZodNumber;
|
|
127
|
+
repointed: z.ZodOptional<z.ZodBoolean>;
|
|
128
|
+
}, z.core.$strip>>;
|
|
129
|
+
workflow: z.ZodString;
|
|
130
|
+
task: z.ZodString;
|
|
131
|
+
queuedMessages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
132
|
+
id: z.ZodString;
|
|
133
|
+
text: z.ZodString;
|
|
134
|
+
images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
135
|
+
createdAt: z.ZodString;
|
|
136
|
+
}, z.core.$strip>>>;
|
|
137
|
+
taskImages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
138
|
+
model: z.ZodOptional<z.ZodString>;
|
|
139
|
+
modelIdentity: z.ZodOptional<z.ZodString>;
|
|
140
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
141
|
+
claude: "claude";
|
|
142
|
+
codex: "codex";
|
|
143
|
+
opencode: "opencode";
|
|
144
|
+
}>>;
|
|
145
|
+
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
146
|
+
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
147
|
+
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
148
|
+
automation: z.ZodOptional<z.ZodObject<{
|
|
149
|
+
automationId: z.ZodString;
|
|
150
|
+
automationRevision: z.ZodNumber;
|
|
151
|
+
receiptId: z.ZodString;
|
|
152
|
+
event: z.ZodString;
|
|
153
|
+
githubUrl: z.ZodString;
|
|
154
|
+
}, z.core.$strip>>;
|
|
155
|
+
status: z.ZodEnum<{
|
|
156
|
+
cancelled: "cancelled";
|
|
157
|
+
done: "done";
|
|
158
|
+
failed: "failed";
|
|
159
|
+
queued: "queued";
|
|
160
|
+
review: "review";
|
|
161
|
+
running: "running";
|
|
162
|
+
waiting: "waiting";
|
|
163
|
+
}>;
|
|
164
|
+
activity: z.ZodOptional<z.ZodEnum<{
|
|
165
|
+
monitoring: "monitoring";
|
|
166
|
+
}>>;
|
|
167
|
+
monitoringWakeAt: z.ZodOptional<z.ZodString>;
|
|
168
|
+
monitoringWakeCapReached: z.ZodOptional<z.ZodBoolean>;
|
|
169
|
+
createdAt: z.ZodString;
|
|
170
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
171
|
+
finishedAt: z.ZodOptional<z.ZodString>;
|
|
172
|
+
tokensUsed: z.ZodNumber;
|
|
173
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
174
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
175
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
176
|
+
pullRequestUrl: z.ZodOptional<z.ZodString>;
|
|
177
|
+
referencedPullRequestUrl: z.ZodOptional<z.ZodString>;
|
|
178
|
+
prNumber: z.ZodOptional<z.ZodNumber>;
|
|
179
|
+
issueNumber: z.ZodOptional<z.ZodNumber>;
|
|
180
|
+
referencedIssueNumberSeeded: z.ZodOptional<z.ZodBoolean>;
|
|
181
|
+
titleOrigin: z.ZodOptional<z.ZodEnum<{
|
|
182
|
+
auto: "auto";
|
|
183
|
+
marker: "marker";
|
|
184
|
+
user: "user";
|
|
185
|
+
}>>;
|
|
186
|
+
markerRefs: z.ZodOptional<z.ZodObject<{
|
|
187
|
+
pr: z.ZodOptional<z.ZodNumber>;
|
|
188
|
+
issue: z.ZodOptional<z.ZodNumber>;
|
|
189
|
+
}, z.core.$strip>>;
|
|
190
|
+
referencedPrCandidates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
191
|
+
referencedIssueUrl: z.ZodOptional<z.ZodString>;
|
|
192
|
+
referencedIssueCandidates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
193
|
+
worktree: z.ZodOptional<z.ZodLiteral<false>>;
|
|
194
|
+
worktreePath: z.ZodOptional<z.ZodString>;
|
|
195
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
196
|
+
baseBranch: z.ZodOptional<z.ZodString>;
|
|
197
|
+
worktreeReclaimedAt: z.ZodOptional<z.ZodString>;
|
|
198
|
+
groupId: z.ZodOptional<z.ZodString>;
|
|
199
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
200
|
+
peakRssBytes: z.ZodOptional<z.ZodNumber>;
|
|
201
|
+
peakProcCount: z.ZodOptional<z.ZodNumber>;
|
|
202
|
+
archived: z.ZodBoolean;
|
|
203
|
+
archivedAt: z.ZodOptional<z.ZodString>;
|
|
204
|
+
seenAt: z.ZodOptional<z.ZodString>;
|
|
205
|
+
currentStepId: z.ZodOptional<z.ZodString>;
|
|
206
|
+
error: z.ZodOptional<z.ZodString>;
|
|
207
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
208
|
+
id: z.ZodString;
|
|
209
|
+
name: z.ZodString;
|
|
210
|
+
kind: z.ZodEnum<{
|
|
211
|
+
agent: "agent";
|
|
212
|
+
check: "check";
|
|
213
|
+
}>;
|
|
214
|
+
status: z.ZodEnum<{
|
|
215
|
+
cancelled: "cancelled";
|
|
216
|
+
done: "done";
|
|
217
|
+
failed: "failed";
|
|
218
|
+
pending: "pending";
|
|
219
|
+
review: "review";
|
|
220
|
+
running: "running";
|
|
221
|
+
skipped: "skipped";
|
|
222
|
+
waiting: "waiting";
|
|
223
|
+
}>;
|
|
224
|
+
iterations: z.ZodNumber;
|
|
225
|
+
tokensUsed: z.ZodNumber;
|
|
226
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
227
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
228
|
+
usageInvocationsStarted: z.ZodOptional<z.ZodNumber>;
|
|
229
|
+
usageInvocationsObserved: z.ZodOptional<z.ZodNumber>;
|
|
230
|
+
usageTurnsStarted: z.ZodOptional<z.ZodNumber>;
|
|
231
|
+
usageTurnsRecorded: z.ZodOptional<z.ZodNumber>;
|
|
232
|
+
usageInvocationEpoch: z.ZodOptional<z.ZodNumber>;
|
|
233
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
234
|
+
finishedAt: z.ZodOptional<z.ZodString>;
|
|
235
|
+
error: z.ZodOptional<z.ZodString>;
|
|
236
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
237
|
+
backend: z.ZodOptional<z.ZodEnum<{
|
|
238
|
+
claude: "claude";
|
|
239
|
+
codex: "codex";
|
|
240
|
+
opencode: "opencode";
|
|
241
|
+
}>>;
|
|
242
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
243
|
+
}, z.core.$strip>>;
|
|
244
|
+
workflowDef: z.ZodOptional<z.ZodObject<{
|
|
245
|
+
name: z.ZodString;
|
|
246
|
+
description: z.ZodOptional<z.ZodString>;
|
|
247
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
248
|
+
id: z.ZodString;
|
|
249
|
+
name: z.ZodOptional<z.ZodString>;
|
|
250
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
251
|
+
skill: z.ZodOptional<z.ZodString>;
|
|
252
|
+
model: z.ZodOptional<z.ZodString>;
|
|
253
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
254
|
+
claude: "claude";
|
|
255
|
+
codex: "codex";
|
|
256
|
+
opencode: "opencode";
|
|
257
|
+
}>>;
|
|
258
|
+
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
259
|
+
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
260
|
+
command: z.ZodOptional<z.ZodString>;
|
|
261
|
+
onFail: z.ZodOptional<z.ZodObject<{
|
|
262
|
+
retry: z.ZodString;
|
|
263
|
+
max: z.ZodDefault<z.ZodNumber>;
|
|
264
|
+
}, z.core.$strip>>;
|
|
265
|
+
}, z.core.$strip>>;
|
|
266
|
+
source: z.ZodEnum<{
|
|
267
|
+
"built-in": "built-in";
|
|
268
|
+
file: "file";
|
|
269
|
+
}>;
|
|
270
|
+
path: z.ZodOptional<z.ZodString>;
|
|
271
|
+
}, z.core.$strip>>;
|
|
272
|
+
}, z.core.$strip>;
|
|
273
|
+
export type RunRecord = z.infer<typeof runRecordSchema>;
|
|
274
|
+
/**
|
|
275
|
+
* What `GET /runs` and `GET /runs/:id` answer: the stored record plus the live `usage` sample the
|
|
276
|
+
* server attaches on the way out (`withUsage`). Absent for finished runs and wherever `ps` yields
|
|
277
|
+
* nothing — never persisted, and never attached by the mutation routes.
|
|
278
|
+
*/
|
|
279
|
+
export declare const apiRunSchema: z.ZodObject<{
|
|
280
|
+
id: z.ZodString;
|
|
281
|
+
title: z.ZodString;
|
|
282
|
+
titleSummary: z.ZodOptional<z.ZodString>;
|
|
283
|
+
diffStat: z.ZodOptional<z.ZodObject<{
|
|
284
|
+
adds: z.ZodNumber;
|
|
285
|
+
dels: z.ZodNumber;
|
|
286
|
+
files: z.ZodNumber;
|
|
287
|
+
repointed: z.ZodOptional<z.ZodBoolean>;
|
|
288
|
+
}, z.core.$strip>>;
|
|
289
|
+
workflow: z.ZodString;
|
|
290
|
+
task: z.ZodString;
|
|
291
|
+
queuedMessages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
292
|
+
id: z.ZodString;
|
|
293
|
+
text: z.ZodString;
|
|
294
|
+
images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
295
|
+
createdAt: z.ZodString;
|
|
296
|
+
}, z.core.$strip>>>;
|
|
297
|
+
taskImages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
298
|
+
model: z.ZodOptional<z.ZodString>;
|
|
299
|
+
modelIdentity: z.ZodOptional<z.ZodString>;
|
|
300
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
301
|
+
claude: "claude";
|
|
302
|
+
codex: "codex";
|
|
303
|
+
opencode: "opencode";
|
|
304
|
+
}>>;
|
|
305
|
+
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
306
|
+
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
307
|
+
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
308
|
+
automation: z.ZodOptional<z.ZodObject<{
|
|
309
|
+
automationId: z.ZodString;
|
|
310
|
+
automationRevision: z.ZodNumber;
|
|
311
|
+
receiptId: z.ZodString;
|
|
312
|
+
event: z.ZodString;
|
|
313
|
+
githubUrl: z.ZodString;
|
|
314
|
+
}, z.core.$strip>>;
|
|
315
|
+
status: z.ZodEnum<{
|
|
316
|
+
cancelled: "cancelled";
|
|
317
|
+
done: "done";
|
|
318
|
+
failed: "failed";
|
|
319
|
+
queued: "queued";
|
|
320
|
+
review: "review";
|
|
321
|
+
running: "running";
|
|
322
|
+
waiting: "waiting";
|
|
323
|
+
}>;
|
|
324
|
+
activity: z.ZodOptional<z.ZodEnum<{
|
|
325
|
+
monitoring: "monitoring";
|
|
326
|
+
}>>;
|
|
327
|
+
monitoringWakeAt: z.ZodOptional<z.ZodString>;
|
|
328
|
+
monitoringWakeCapReached: z.ZodOptional<z.ZodBoolean>;
|
|
329
|
+
createdAt: z.ZodString;
|
|
330
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
331
|
+
finishedAt: z.ZodOptional<z.ZodString>;
|
|
332
|
+
tokensUsed: z.ZodNumber;
|
|
333
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
334
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
335
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
336
|
+
pullRequestUrl: z.ZodOptional<z.ZodString>;
|
|
337
|
+
referencedPullRequestUrl: z.ZodOptional<z.ZodString>;
|
|
338
|
+
prNumber: z.ZodOptional<z.ZodNumber>;
|
|
339
|
+
issueNumber: z.ZodOptional<z.ZodNumber>;
|
|
340
|
+
referencedIssueNumberSeeded: z.ZodOptional<z.ZodBoolean>;
|
|
341
|
+
titleOrigin: z.ZodOptional<z.ZodEnum<{
|
|
342
|
+
auto: "auto";
|
|
343
|
+
marker: "marker";
|
|
344
|
+
user: "user";
|
|
345
|
+
}>>;
|
|
346
|
+
markerRefs: z.ZodOptional<z.ZodObject<{
|
|
347
|
+
pr: z.ZodOptional<z.ZodNumber>;
|
|
348
|
+
issue: z.ZodOptional<z.ZodNumber>;
|
|
349
|
+
}, z.core.$strip>>;
|
|
350
|
+
referencedPrCandidates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
351
|
+
referencedIssueUrl: z.ZodOptional<z.ZodString>;
|
|
352
|
+
referencedIssueCandidates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
353
|
+
worktree: z.ZodOptional<z.ZodLiteral<false>>;
|
|
354
|
+
worktreePath: z.ZodOptional<z.ZodString>;
|
|
355
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
356
|
+
baseBranch: z.ZodOptional<z.ZodString>;
|
|
357
|
+
worktreeReclaimedAt: z.ZodOptional<z.ZodString>;
|
|
358
|
+
groupId: z.ZodOptional<z.ZodString>;
|
|
359
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
360
|
+
peakRssBytes: z.ZodOptional<z.ZodNumber>;
|
|
361
|
+
peakProcCount: z.ZodOptional<z.ZodNumber>;
|
|
362
|
+
archived: z.ZodBoolean;
|
|
363
|
+
archivedAt: z.ZodOptional<z.ZodString>;
|
|
364
|
+
seenAt: z.ZodOptional<z.ZodString>;
|
|
365
|
+
currentStepId: z.ZodOptional<z.ZodString>;
|
|
366
|
+
error: z.ZodOptional<z.ZodString>;
|
|
367
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
368
|
+
id: z.ZodString;
|
|
369
|
+
name: z.ZodString;
|
|
370
|
+
kind: z.ZodEnum<{
|
|
371
|
+
agent: "agent";
|
|
372
|
+
check: "check";
|
|
373
|
+
}>;
|
|
374
|
+
status: z.ZodEnum<{
|
|
375
|
+
cancelled: "cancelled";
|
|
376
|
+
done: "done";
|
|
377
|
+
failed: "failed";
|
|
378
|
+
pending: "pending";
|
|
379
|
+
review: "review";
|
|
380
|
+
running: "running";
|
|
381
|
+
skipped: "skipped";
|
|
382
|
+
waiting: "waiting";
|
|
383
|
+
}>;
|
|
384
|
+
iterations: z.ZodNumber;
|
|
385
|
+
tokensUsed: z.ZodNumber;
|
|
386
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
387
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
388
|
+
usageInvocationsStarted: z.ZodOptional<z.ZodNumber>;
|
|
389
|
+
usageInvocationsObserved: z.ZodOptional<z.ZodNumber>;
|
|
390
|
+
usageTurnsStarted: z.ZodOptional<z.ZodNumber>;
|
|
391
|
+
usageTurnsRecorded: z.ZodOptional<z.ZodNumber>;
|
|
392
|
+
usageInvocationEpoch: z.ZodOptional<z.ZodNumber>;
|
|
393
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
394
|
+
finishedAt: z.ZodOptional<z.ZodString>;
|
|
395
|
+
error: z.ZodOptional<z.ZodString>;
|
|
396
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
397
|
+
backend: z.ZodOptional<z.ZodEnum<{
|
|
398
|
+
claude: "claude";
|
|
399
|
+
codex: "codex";
|
|
400
|
+
opencode: "opencode";
|
|
401
|
+
}>>;
|
|
402
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
403
|
+
}, z.core.$strip>>;
|
|
404
|
+
workflowDef: z.ZodOptional<z.ZodObject<{
|
|
405
|
+
name: z.ZodString;
|
|
406
|
+
description: z.ZodOptional<z.ZodString>;
|
|
407
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
408
|
+
id: z.ZodString;
|
|
409
|
+
name: z.ZodOptional<z.ZodString>;
|
|
410
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
411
|
+
skill: z.ZodOptional<z.ZodString>;
|
|
412
|
+
model: z.ZodOptional<z.ZodString>;
|
|
413
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
414
|
+
claude: "claude";
|
|
415
|
+
codex: "codex";
|
|
416
|
+
opencode: "opencode";
|
|
417
|
+
}>>;
|
|
418
|
+
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
419
|
+
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
420
|
+
command: z.ZodOptional<z.ZodString>;
|
|
421
|
+
onFail: z.ZodOptional<z.ZodObject<{
|
|
422
|
+
retry: z.ZodString;
|
|
423
|
+
max: z.ZodDefault<z.ZodNumber>;
|
|
424
|
+
}, z.core.$strip>>;
|
|
425
|
+
}, z.core.$strip>>;
|
|
426
|
+
source: z.ZodEnum<{
|
|
427
|
+
"built-in": "built-in";
|
|
428
|
+
file: "file";
|
|
429
|
+
}>;
|
|
430
|
+
path: z.ZodOptional<z.ZodString>;
|
|
431
|
+
}, z.core.$strip>>;
|
|
432
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
433
|
+
cpuPct: z.ZodNumber;
|
|
434
|
+
rssBytes: z.ZodNumber;
|
|
435
|
+
procCount: z.ZodNumber;
|
|
436
|
+
}, z.core.$strip>>;
|
|
437
|
+
}, z.core.$strip>;
|
|
438
|
+
export type ApiRun = z.infer<typeof apiRunSchema>;
|
|
439
|
+
/**
|
|
440
|
+
* `POST /runs` (201) — one record for ×1, a group for ×2/×3.
|
|
441
|
+
*
|
|
442
|
+
* The ×1 branch is the STORED record, not `ApiRun`: `startRun` answers before any `ps` sample
|
|
443
|
+
* exists, so the create route never runs a record through `withUsage`.
|
|
444
|
+
*/
|
|
445
|
+
export declare const createRunResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
446
|
+
id: z.ZodString;
|
|
447
|
+
title: z.ZodString;
|
|
448
|
+
titleSummary: z.ZodOptional<z.ZodString>;
|
|
449
|
+
diffStat: z.ZodOptional<z.ZodObject<{
|
|
450
|
+
adds: z.ZodNumber;
|
|
451
|
+
dels: z.ZodNumber;
|
|
452
|
+
files: z.ZodNumber;
|
|
453
|
+
repointed: z.ZodOptional<z.ZodBoolean>;
|
|
454
|
+
}, z.core.$strip>>;
|
|
455
|
+
workflow: z.ZodString;
|
|
456
|
+
task: z.ZodString;
|
|
457
|
+
queuedMessages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
458
|
+
id: z.ZodString;
|
|
459
|
+
text: z.ZodString;
|
|
460
|
+
images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
461
|
+
createdAt: z.ZodString;
|
|
462
|
+
}, z.core.$strip>>>;
|
|
463
|
+
taskImages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
464
|
+
model: z.ZodOptional<z.ZodString>;
|
|
465
|
+
modelIdentity: z.ZodOptional<z.ZodString>;
|
|
466
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
467
|
+
claude: "claude";
|
|
468
|
+
codex: "codex";
|
|
469
|
+
opencode: "opencode";
|
|
470
|
+
}>>;
|
|
471
|
+
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
472
|
+
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
473
|
+
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
474
|
+
automation: z.ZodOptional<z.ZodObject<{
|
|
475
|
+
automationId: z.ZodString;
|
|
476
|
+
automationRevision: z.ZodNumber;
|
|
477
|
+
receiptId: z.ZodString;
|
|
478
|
+
event: z.ZodString;
|
|
479
|
+
githubUrl: z.ZodString;
|
|
480
|
+
}, z.core.$strip>>;
|
|
481
|
+
status: z.ZodEnum<{
|
|
482
|
+
cancelled: "cancelled";
|
|
483
|
+
done: "done";
|
|
484
|
+
failed: "failed";
|
|
485
|
+
queued: "queued";
|
|
486
|
+
review: "review";
|
|
487
|
+
running: "running";
|
|
488
|
+
waiting: "waiting";
|
|
489
|
+
}>;
|
|
490
|
+
activity: z.ZodOptional<z.ZodEnum<{
|
|
491
|
+
monitoring: "monitoring";
|
|
492
|
+
}>>;
|
|
493
|
+
monitoringWakeAt: z.ZodOptional<z.ZodString>;
|
|
494
|
+
monitoringWakeCapReached: z.ZodOptional<z.ZodBoolean>;
|
|
495
|
+
createdAt: z.ZodString;
|
|
496
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
497
|
+
finishedAt: z.ZodOptional<z.ZodString>;
|
|
498
|
+
tokensUsed: z.ZodNumber;
|
|
499
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
500
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
501
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
502
|
+
pullRequestUrl: z.ZodOptional<z.ZodString>;
|
|
503
|
+
referencedPullRequestUrl: z.ZodOptional<z.ZodString>;
|
|
504
|
+
prNumber: z.ZodOptional<z.ZodNumber>;
|
|
505
|
+
issueNumber: z.ZodOptional<z.ZodNumber>;
|
|
506
|
+
referencedIssueNumberSeeded: z.ZodOptional<z.ZodBoolean>;
|
|
507
|
+
titleOrigin: z.ZodOptional<z.ZodEnum<{
|
|
508
|
+
auto: "auto";
|
|
509
|
+
marker: "marker";
|
|
510
|
+
user: "user";
|
|
511
|
+
}>>;
|
|
512
|
+
markerRefs: z.ZodOptional<z.ZodObject<{
|
|
513
|
+
pr: z.ZodOptional<z.ZodNumber>;
|
|
514
|
+
issue: z.ZodOptional<z.ZodNumber>;
|
|
515
|
+
}, z.core.$strip>>;
|
|
516
|
+
referencedPrCandidates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
517
|
+
referencedIssueUrl: z.ZodOptional<z.ZodString>;
|
|
518
|
+
referencedIssueCandidates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
519
|
+
worktree: z.ZodOptional<z.ZodLiteral<false>>;
|
|
520
|
+
worktreePath: z.ZodOptional<z.ZodString>;
|
|
521
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
522
|
+
baseBranch: z.ZodOptional<z.ZodString>;
|
|
523
|
+
worktreeReclaimedAt: z.ZodOptional<z.ZodString>;
|
|
524
|
+
groupId: z.ZodOptional<z.ZodString>;
|
|
525
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
526
|
+
peakRssBytes: z.ZodOptional<z.ZodNumber>;
|
|
527
|
+
peakProcCount: z.ZodOptional<z.ZodNumber>;
|
|
528
|
+
archived: z.ZodBoolean;
|
|
529
|
+
archivedAt: z.ZodOptional<z.ZodString>;
|
|
530
|
+
seenAt: z.ZodOptional<z.ZodString>;
|
|
531
|
+
currentStepId: z.ZodOptional<z.ZodString>;
|
|
532
|
+
error: z.ZodOptional<z.ZodString>;
|
|
533
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
534
|
+
id: z.ZodString;
|
|
535
|
+
name: z.ZodString;
|
|
536
|
+
kind: z.ZodEnum<{
|
|
537
|
+
agent: "agent";
|
|
538
|
+
check: "check";
|
|
539
|
+
}>;
|
|
540
|
+
status: z.ZodEnum<{
|
|
541
|
+
cancelled: "cancelled";
|
|
542
|
+
done: "done";
|
|
543
|
+
failed: "failed";
|
|
544
|
+
pending: "pending";
|
|
545
|
+
review: "review";
|
|
546
|
+
running: "running";
|
|
547
|
+
skipped: "skipped";
|
|
548
|
+
waiting: "waiting";
|
|
549
|
+
}>;
|
|
550
|
+
iterations: z.ZodNumber;
|
|
551
|
+
tokensUsed: z.ZodNumber;
|
|
552
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
553
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
554
|
+
usageInvocationsStarted: z.ZodOptional<z.ZodNumber>;
|
|
555
|
+
usageInvocationsObserved: z.ZodOptional<z.ZodNumber>;
|
|
556
|
+
usageTurnsStarted: z.ZodOptional<z.ZodNumber>;
|
|
557
|
+
usageTurnsRecorded: z.ZodOptional<z.ZodNumber>;
|
|
558
|
+
usageInvocationEpoch: z.ZodOptional<z.ZodNumber>;
|
|
559
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
560
|
+
finishedAt: z.ZodOptional<z.ZodString>;
|
|
561
|
+
error: z.ZodOptional<z.ZodString>;
|
|
562
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
563
|
+
backend: z.ZodOptional<z.ZodEnum<{
|
|
564
|
+
claude: "claude";
|
|
565
|
+
codex: "codex";
|
|
566
|
+
opencode: "opencode";
|
|
567
|
+
}>>;
|
|
568
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
569
|
+
}, z.core.$strip>>;
|
|
570
|
+
workflowDef: z.ZodOptional<z.ZodObject<{
|
|
571
|
+
name: z.ZodString;
|
|
572
|
+
description: z.ZodOptional<z.ZodString>;
|
|
573
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
574
|
+
id: z.ZodString;
|
|
575
|
+
name: z.ZodOptional<z.ZodString>;
|
|
576
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
577
|
+
skill: z.ZodOptional<z.ZodString>;
|
|
578
|
+
model: z.ZodOptional<z.ZodString>;
|
|
579
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
580
|
+
claude: "claude";
|
|
581
|
+
codex: "codex";
|
|
582
|
+
opencode: "opencode";
|
|
583
|
+
}>>;
|
|
584
|
+
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
585
|
+
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
586
|
+
command: z.ZodOptional<z.ZodString>;
|
|
587
|
+
onFail: z.ZodOptional<z.ZodObject<{
|
|
588
|
+
retry: z.ZodString;
|
|
589
|
+
max: z.ZodDefault<z.ZodNumber>;
|
|
590
|
+
}, z.core.$strip>>;
|
|
591
|
+
}, z.core.$strip>>;
|
|
592
|
+
source: z.ZodEnum<{
|
|
593
|
+
"built-in": "built-in";
|
|
594
|
+
file: "file";
|
|
595
|
+
}>;
|
|
596
|
+
path: z.ZodOptional<z.ZodString>;
|
|
597
|
+
}, z.core.$strip>>;
|
|
598
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
599
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
600
|
+
id: z.ZodString;
|
|
601
|
+
title: z.ZodString;
|
|
602
|
+
titleSummary: z.ZodOptional<z.ZodString>;
|
|
603
|
+
diffStat: z.ZodOptional<z.ZodObject<{
|
|
604
|
+
adds: z.ZodNumber;
|
|
605
|
+
dels: z.ZodNumber;
|
|
606
|
+
files: z.ZodNumber;
|
|
607
|
+
repointed: z.ZodOptional<z.ZodBoolean>;
|
|
608
|
+
}, z.core.$strip>>;
|
|
609
|
+
workflow: z.ZodString;
|
|
610
|
+
task: z.ZodString;
|
|
611
|
+
queuedMessages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
612
|
+
id: z.ZodString;
|
|
613
|
+
text: z.ZodString;
|
|
614
|
+
images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
615
|
+
createdAt: z.ZodString;
|
|
616
|
+
}, z.core.$strip>>>;
|
|
617
|
+
taskImages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
618
|
+
model: z.ZodOptional<z.ZodString>;
|
|
619
|
+
modelIdentity: z.ZodOptional<z.ZodString>;
|
|
620
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
621
|
+
claude: "claude";
|
|
622
|
+
codex: "codex";
|
|
623
|
+
opencode: "opencode";
|
|
624
|
+
}>>;
|
|
625
|
+
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
626
|
+
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
627
|
+
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
628
|
+
automation: z.ZodOptional<z.ZodObject<{
|
|
629
|
+
automationId: z.ZodString;
|
|
630
|
+
automationRevision: z.ZodNumber;
|
|
631
|
+
receiptId: z.ZodString;
|
|
632
|
+
event: z.ZodString;
|
|
633
|
+
githubUrl: z.ZodString;
|
|
634
|
+
}, z.core.$strip>>;
|
|
635
|
+
status: z.ZodEnum<{
|
|
636
|
+
cancelled: "cancelled";
|
|
637
|
+
done: "done";
|
|
638
|
+
failed: "failed";
|
|
639
|
+
queued: "queued";
|
|
640
|
+
review: "review";
|
|
641
|
+
running: "running";
|
|
642
|
+
waiting: "waiting";
|
|
643
|
+
}>;
|
|
644
|
+
activity: z.ZodOptional<z.ZodEnum<{
|
|
645
|
+
monitoring: "monitoring";
|
|
646
|
+
}>>;
|
|
647
|
+
monitoringWakeAt: z.ZodOptional<z.ZodString>;
|
|
648
|
+
monitoringWakeCapReached: z.ZodOptional<z.ZodBoolean>;
|
|
649
|
+
createdAt: z.ZodString;
|
|
650
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
651
|
+
finishedAt: z.ZodOptional<z.ZodString>;
|
|
652
|
+
tokensUsed: z.ZodNumber;
|
|
653
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
654
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
655
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
656
|
+
pullRequestUrl: z.ZodOptional<z.ZodString>;
|
|
657
|
+
referencedPullRequestUrl: z.ZodOptional<z.ZodString>;
|
|
658
|
+
prNumber: z.ZodOptional<z.ZodNumber>;
|
|
659
|
+
issueNumber: z.ZodOptional<z.ZodNumber>;
|
|
660
|
+
referencedIssueNumberSeeded: z.ZodOptional<z.ZodBoolean>;
|
|
661
|
+
titleOrigin: z.ZodOptional<z.ZodEnum<{
|
|
662
|
+
auto: "auto";
|
|
663
|
+
marker: "marker";
|
|
664
|
+
user: "user";
|
|
665
|
+
}>>;
|
|
666
|
+
markerRefs: z.ZodOptional<z.ZodObject<{
|
|
667
|
+
pr: z.ZodOptional<z.ZodNumber>;
|
|
668
|
+
issue: z.ZodOptional<z.ZodNumber>;
|
|
669
|
+
}, z.core.$strip>>;
|
|
670
|
+
referencedPrCandidates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
671
|
+
referencedIssueUrl: z.ZodOptional<z.ZodString>;
|
|
672
|
+
referencedIssueCandidates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
673
|
+
worktree: z.ZodOptional<z.ZodLiteral<false>>;
|
|
674
|
+
worktreePath: z.ZodOptional<z.ZodString>;
|
|
675
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
676
|
+
baseBranch: z.ZodOptional<z.ZodString>;
|
|
677
|
+
worktreeReclaimedAt: z.ZodOptional<z.ZodString>;
|
|
678
|
+
groupId: z.ZodOptional<z.ZodString>;
|
|
679
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
680
|
+
peakRssBytes: z.ZodOptional<z.ZodNumber>;
|
|
681
|
+
peakProcCount: z.ZodOptional<z.ZodNumber>;
|
|
682
|
+
archived: z.ZodBoolean;
|
|
683
|
+
archivedAt: z.ZodOptional<z.ZodString>;
|
|
684
|
+
seenAt: z.ZodOptional<z.ZodString>;
|
|
685
|
+
currentStepId: z.ZodOptional<z.ZodString>;
|
|
686
|
+
error: z.ZodOptional<z.ZodString>;
|
|
687
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
688
|
+
id: z.ZodString;
|
|
689
|
+
name: z.ZodString;
|
|
690
|
+
kind: z.ZodEnum<{
|
|
691
|
+
agent: "agent";
|
|
692
|
+
check: "check";
|
|
693
|
+
}>;
|
|
694
|
+
status: z.ZodEnum<{
|
|
695
|
+
cancelled: "cancelled";
|
|
696
|
+
done: "done";
|
|
697
|
+
failed: "failed";
|
|
698
|
+
pending: "pending";
|
|
699
|
+
review: "review";
|
|
700
|
+
running: "running";
|
|
701
|
+
skipped: "skipped";
|
|
702
|
+
waiting: "waiting";
|
|
703
|
+
}>;
|
|
704
|
+
iterations: z.ZodNumber;
|
|
705
|
+
tokensUsed: z.ZodNumber;
|
|
706
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
707
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
708
|
+
usageInvocationsStarted: z.ZodOptional<z.ZodNumber>;
|
|
709
|
+
usageInvocationsObserved: z.ZodOptional<z.ZodNumber>;
|
|
710
|
+
usageTurnsStarted: z.ZodOptional<z.ZodNumber>;
|
|
711
|
+
usageTurnsRecorded: z.ZodOptional<z.ZodNumber>;
|
|
712
|
+
usageInvocationEpoch: z.ZodOptional<z.ZodNumber>;
|
|
713
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
714
|
+
finishedAt: z.ZodOptional<z.ZodString>;
|
|
715
|
+
error: z.ZodOptional<z.ZodString>;
|
|
716
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
717
|
+
backend: z.ZodOptional<z.ZodEnum<{
|
|
718
|
+
claude: "claude";
|
|
719
|
+
codex: "codex";
|
|
720
|
+
opencode: "opencode";
|
|
721
|
+
}>>;
|
|
722
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
723
|
+
}, z.core.$strip>>;
|
|
724
|
+
workflowDef: z.ZodOptional<z.ZodObject<{
|
|
725
|
+
name: z.ZodString;
|
|
726
|
+
description: z.ZodOptional<z.ZodString>;
|
|
727
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
728
|
+
id: z.ZodString;
|
|
729
|
+
name: z.ZodOptional<z.ZodString>;
|
|
730
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
731
|
+
skill: z.ZodOptional<z.ZodString>;
|
|
732
|
+
model: z.ZodOptional<z.ZodString>;
|
|
733
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
734
|
+
claude: "claude";
|
|
735
|
+
codex: "codex";
|
|
736
|
+
opencode: "opencode";
|
|
737
|
+
}>>;
|
|
738
|
+
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
739
|
+
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
740
|
+
command: z.ZodOptional<z.ZodString>;
|
|
741
|
+
onFail: z.ZodOptional<z.ZodObject<{
|
|
742
|
+
retry: z.ZodString;
|
|
743
|
+
max: z.ZodDefault<z.ZodNumber>;
|
|
744
|
+
}, z.core.$strip>>;
|
|
745
|
+
}, z.core.$strip>>;
|
|
746
|
+
source: z.ZodEnum<{
|
|
747
|
+
"built-in": "built-in";
|
|
748
|
+
file: "file";
|
|
749
|
+
}>;
|
|
750
|
+
path: z.ZodOptional<z.ZodString>;
|
|
751
|
+
}, z.core.$strip>>;
|
|
752
|
+
}, z.core.$strip>>;
|
|
753
|
+
}, z.core.$strip>]>;
|
|
754
|
+
export type CreateRunResponse = z.infer<typeof createRunResponseSchema>;
|
|
755
|
+
/** `POST /runs/:id/cancel` — genuinely a boolean: an already-settled run answers 200 + `false`. */
|
|
756
|
+
export declare const cancelResponseSchema: z.ZodObject<{
|
|
757
|
+
cancelled: z.ZodBoolean;
|
|
758
|
+
}, z.core.$strip>;
|
|
759
|
+
export type CancelResponse = z.infer<typeof cancelResponseSchema>;
|
|
760
|
+
/** `POST /runs/archive-finished` — how many runs the sweep archived. */
|
|
761
|
+
export declare const archiveFinishedResponseSchema: z.ZodObject<{
|
|
762
|
+
archived: z.ZodNumber;
|
|
763
|
+
}, z.core.$strip>;
|
|
764
|
+
export type ArchiveFinishedResponse = z.infer<typeof archiveFinishedResponseSchema>;
|
|
765
|
+
/** `POST /runs/read-all` — how many unread finished runs the sweep marked read. */
|
|
766
|
+
export declare const markAllReadResponseSchema: z.ZodObject<{
|
|
767
|
+
read: z.ZodNumber;
|
|
768
|
+
}, z.core.$strip>;
|
|
769
|
+
export type MarkAllReadResponse = z.infer<typeof markAllReadResponseSchema>;
|
|
770
|
+
/** `DELETE /runs/:id` — an active run is a 409 and an unknown one a 404, so this only ever
|
|
771
|
+
* reports success. */
|
|
772
|
+
export declare const deleteRunResponseSchema: z.ZodObject<{
|
|
773
|
+
deleted: z.ZodLiteral<true>;
|
|
774
|
+
}, z.core.$strip>;
|
|
775
|
+
export type DeleteRunResponse = z.infer<typeof deleteRunResponseSchema>;
|
|
776
|
+
/** `POST /runs/:id/finish` — "no open session" is a 409. */
|
|
777
|
+
export declare const finishResponseSchema: z.ZodObject<{
|
|
778
|
+
finished: z.ZodLiteral<true>;
|
|
779
|
+
}, z.core.$strip>;
|
|
780
|
+
export type FinishResponse = z.infer<typeof finishResponseSchema>;
|
|
781
|
+
/** `POST /runs/:id/continue` — a refusal to reopen is a 409 carrying the engine's reason. */
|
|
782
|
+
export declare const continueResponseSchema: z.ZodObject<{
|
|
783
|
+
continued: z.ZodLiteral<true>;
|
|
784
|
+
}, z.core.$strip>;
|
|
785
|
+
export type ContinueResponse = z.infer<typeof continueResponseSchema>;
|
|
786
|
+
/**
|
|
787
|
+
* `POST /runs/:id/pr` (201, spec 009) — the draft PR's URL; `dryRun` marks the CEZ_DRY_RUN fake
|
|
788
|
+
* (no push, no gh). Failure is a 409 whose `ApiError` carries the `manual` merge command instead.
|
|
789
|
+
*
|
|
790
|
+
* `dryRun` is REQUIRED: `createDraftPr`'s success outcome always sets it (`forge/types.ts`), so
|
|
791
|
+
* the key is always on the wire. The hand-written DTO had it optional.
|
|
792
|
+
*/
|
|
793
|
+
export declare const createPrResponseSchema: z.ZodObject<{
|
|
794
|
+
url: z.ZodString;
|
|
795
|
+
dryRun: z.ZodBoolean;
|
|
796
|
+
}, z.core.$strip>;
|
|
797
|
+
export type CreatePrResponse = z.infer<typeof createPrResponseSchema>;
|
|
798
|
+
/**
|
|
799
|
+
* `POST /runs/:id/messages` — one of three shapes (#472), by how far the run has got:
|
|
800
|
+
* `delivered` (a live session took it), `queued` (still waiting for a slot, so it was stacked
|
|
801
|
+
* onto the prompt and the stored entry rides along), `deferred` (mid-spawn, so it was buffered
|
|
802
|
+
* and arrives as an ordinary follow-up turn once the session opens). Anything else is a 409.
|
|
803
|
+
*
|
|
804
|
+
* A union, not one object of optional flags: exactly one of the three keys is ever present, and
|
|
805
|
+
* the flattened DTO shape admitted `{}`. Pre-#472 clients only ever saw `delivered`.
|
|
806
|
+
*/
|
|
807
|
+
export declare const messageResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
808
|
+
delivered: z.ZodLiteral<true>;
|
|
809
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
810
|
+
queued: z.ZodLiteral<true>;
|
|
811
|
+
message: z.ZodObject<{
|
|
812
|
+
id: z.ZodString;
|
|
813
|
+
text: z.ZodString;
|
|
814
|
+
images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
815
|
+
createdAt: z.ZodString;
|
|
816
|
+
}, z.core.$strip>;
|
|
817
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
818
|
+
deferred: z.ZodLiteral<true>;
|
|
819
|
+
}, z.core.$strip>]>;
|
|
820
|
+
export type MessageResponse = z.infer<typeof messageResponseSchema>;
|
|
821
|
+
/** `PATCH /runs/:id/queued-messages/:msgId` (#472) — the replaced entry. */
|
|
822
|
+
export declare const editQueuedMessageResponseSchema: z.ZodObject<{
|
|
823
|
+
message: z.ZodObject<{
|
|
824
|
+
id: z.ZodString;
|
|
825
|
+
text: z.ZodString;
|
|
826
|
+
images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
827
|
+
createdAt: z.ZodString;
|
|
828
|
+
}, z.core.$strip>;
|
|
829
|
+
}, z.core.$strip>;
|
|
830
|
+
export type EditQueuedMessageResponse = z.infer<typeof editQueuedMessageResponseSchema>;
|
|
831
|
+
/** `DELETE /runs/:id/queued-messages/:msgId` (#472) — `409 run already started` otherwise. */
|
|
832
|
+
export declare const removeQueuedMessageResponseSchema: z.ZodObject<{
|
|
833
|
+
removed: z.ZodLiteral<true>;
|
|
834
|
+
}, z.core.$strip>;
|
|
835
|
+
export type RemoveQueuedMessageResponse = z.infer<typeof removeQueuedMessageResponseSchema>;
|
|
836
|
+
/**
|
|
837
|
+
* `POST /runs/:id/open-in-cli` — a terminal was spawned with `command` running in it. With no
|
|
838
|
+
* terminal emulator the server answers 409 and the `ApiError` carries the full `cd … && <command>`
|
|
839
|
+
* for the clipboard fallback.
|
|
840
|
+
*/
|
|
841
|
+
export declare const openInCliResponseSchema: z.ZodObject<{
|
|
842
|
+
opened: z.ZodLiteral<true>;
|
|
843
|
+
command: z.ZodString;
|
|
844
|
+
}, z.core.$strip>;
|
|
845
|
+
export type OpenInCliResponse = z.infer<typeof openInCliResponseSchema>;
|
|
846
|
+
/** `POST /runs/:id/remove-worktree` — per-row delete in the worktrees panel (#483). */
|
|
847
|
+
export declare const removeWorktreeResponseSchema: z.ZodObject<{
|
|
848
|
+
removed: z.ZodLiteral<true>;
|
|
849
|
+
}, z.core.$strip>;
|
|
850
|
+
export type RemoveWorktreeResponse = z.infer<typeof removeWorktreeResponseSchema>;
|
|
851
|
+
/** `POST /runs/:id/git/commit` — `git add -A && git commit` in the run's worktree. */
|
|
852
|
+
export declare const gitCommitResponseSchema: z.ZodObject<{
|
|
853
|
+
committed: z.ZodLiteral<true>;
|
|
854
|
+
sha: z.ZodString;
|
|
855
|
+
}, z.core.$strip>;
|
|
856
|
+
export type GitCommitResponse = z.infer<typeof gitCommitResponseSchema>;
|
|
857
|
+
/** `POST /runs/:id/git/push` — push the worktree's branch, setting upstream if it has none. */
|
|
858
|
+
export declare const gitPushResponseSchema: z.ZodObject<{
|
|
859
|
+
pushed: z.ZodLiteral<true>;
|
|
860
|
+
branch: z.ZodString;
|
|
861
|
+
remote: z.ZodString;
|
|
862
|
+
upstreamSet: z.ZodBoolean;
|
|
863
|
+
}, z.core.$strip>;
|
|
864
|
+
export type GitPushResponse = z.infer<typeof gitPushResponseSchema>;
|
|
865
|
+
/** A commit a run made on its worktree branch. */
|
|
866
|
+
export declare const runCommitSchema: z.ZodObject<{
|
|
867
|
+
sha: z.ZodString;
|
|
868
|
+
subject: z.ZodString;
|
|
869
|
+
author: z.ZodString;
|
|
870
|
+
when: z.ZodString;
|
|
871
|
+
}, z.core.$strip>;
|
|
872
|
+
export type RunCommit = z.infer<typeof runCommitSchema>;
|
|
873
|
+
/** `GET /runs/:id/commits` — `<base>..HEAD` on the worktree branch, newest first. */
|
|
874
|
+
export declare const runCommitsResponseSchema: z.ZodObject<{
|
|
875
|
+
commits: z.ZodArray<z.ZodObject<{
|
|
876
|
+
sha: z.ZodString;
|
|
877
|
+
subject: z.ZodString;
|
|
878
|
+
author: z.ZodString;
|
|
879
|
+
when: z.ZodString;
|
|
880
|
+
}, z.core.$strip>>;
|
|
881
|
+
}, z.core.$strip>;
|
|
882
|
+
export type RunCommitsResponse = z.infer<typeof runCommitsResponseSchema>;
|
|
883
|
+
/**
|
|
884
|
+
* One variant column of the compare view.
|
|
885
|
+
*
|
|
886
|
+
* CAREFUL: `diffStat` here is the raw `git diff --stat` TEXT the server runs in the variant's
|
|
887
|
+
* worktree — a different thing from the numeric `RunRecord.diffStat`. `''` when the worktree
|
|
888
|
+
* is gone.
|
|
889
|
+
*/
|
|
890
|
+
export declare const groupVariantSchema: z.ZodObject<{
|
|
891
|
+
id: z.ZodString;
|
|
892
|
+
variant: z.ZodString;
|
|
893
|
+
title: z.ZodString;
|
|
894
|
+
status: z.ZodEnum<{
|
|
895
|
+
cancelled: "cancelled";
|
|
896
|
+
done: "done";
|
|
897
|
+
failed: "failed";
|
|
898
|
+
queued: "queued";
|
|
899
|
+
review: "review";
|
|
900
|
+
running: "running";
|
|
901
|
+
waiting: "waiting";
|
|
902
|
+
}>;
|
|
903
|
+
archived: z.ZodBoolean;
|
|
904
|
+
tokensUsed: z.ZodNumber;
|
|
905
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
906
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
907
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
908
|
+
diffStat: z.ZodString;
|
|
909
|
+
handoffExcerpt: z.ZodString;
|
|
910
|
+
}, z.core.$strip>;
|
|
911
|
+
export type GroupVariant = z.infer<typeof groupVariantSchema>;
|
|
912
|
+
/** `GET /groups/:groupId` — every run sharing a groupId, side by side. */
|
|
913
|
+
export declare const groupResponseSchema: z.ZodObject<{
|
|
914
|
+
groupId: z.ZodString;
|
|
915
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
916
|
+
id: z.ZodString;
|
|
917
|
+
variant: z.ZodString;
|
|
918
|
+
title: z.ZodString;
|
|
919
|
+
status: z.ZodEnum<{
|
|
920
|
+
cancelled: "cancelled";
|
|
921
|
+
done: "done";
|
|
922
|
+
failed: "failed";
|
|
923
|
+
queued: "queued";
|
|
924
|
+
review: "review";
|
|
925
|
+
running: "running";
|
|
926
|
+
waiting: "waiting";
|
|
927
|
+
}>;
|
|
928
|
+
archived: z.ZodBoolean;
|
|
929
|
+
tokensUsed: z.ZodNumber;
|
|
930
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
931
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
932
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
933
|
+
diffStat: z.ZodString;
|
|
934
|
+
handoffExcerpt: z.ZodString;
|
|
935
|
+
}, z.core.$strip>>;
|
|
936
|
+
}, z.core.$strip>;
|
|
937
|
+
export type GroupResponse = z.infer<typeof groupResponseSchema>;
|
|
938
|
+
/**
|
|
939
|
+
* `POST /groups/:groupId/pick` — the winner (parked at `review` when it has a diff); the losers
|
|
940
|
+
* were cancelled if alive, archived, and their worktrees + branches removed.
|
|
941
|
+
*
|
|
942
|
+
* `winner` is OPTIONAL because that is what the wire says: `store.getRun(id)` can miss, and
|
|
943
|
+
* `JSON.stringify` drops a key whose value is `undefined`. The handler spreads the key in
|
|
944
|
+
* conditionally (`server.ts`, the `/groups/:groupId/pick` route) so its own type says the same
|
|
945
|
+
* thing — the two-way check in `contract-parity.workflows.test.ts` is what pins that.
|
|
946
|
+
*/
|
|
947
|
+
export declare const pickVariantResponseSchema: z.ZodObject<{
|
|
948
|
+
winner: z.ZodOptional<z.ZodObject<{
|
|
949
|
+
id: z.ZodString;
|
|
950
|
+
title: z.ZodString;
|
|
951
|
+
titleSummary: z.ZodOptional<z.ZodString>;
|
|
952
|
+
diffStat: z.ZodOptional<z.ZodObject<{
|
|
953
|
+
adds: z.ZodNumber;
|
|
954
|
+
dels: z.ZodNumber;
|
|
955
|
+
files: z.ZodNumber;
|
|
956
|
+
repointed: z.ZodOptional<z.ZodBoolean>;
|
|
957
|
+
}, z.core.$strip>>;
|
|
958
|
+
workflow: z.ZodString;
|
|
959
|
+
task: z.ZodString;
|
|
960
|
+
queuedMessages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
961
|
+
id: z.ZodString;
|
|
962
|
+
text: z.ZodString;
|
|
963
|
+
images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
964
|
+
createdAt: z.ZodString;
|
|
965
|
+
}, z.core.$strip>>>;
|
|
966
|
+
taskImages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
967
|
+
model: z.ZodOptional<z.ZodString>;
|
|
968
|
+
modelIdentity: z.ZodOptional<z.ZodString>;
|
|
969
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
970
|
+
claude: "claude";
|
|
971
|
+
codex: "codex";
|
|
972
|
+
opencode: "opencode";
|
|
973
|
+
}>>;
|
|
974
|
+
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
975
|
+
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
976
|
+
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
977
|
+
automation: z.ZodOptional<z.ZodObject<{
|
|
978
|
+
automationId: z.ZodString;
|
|
979
|
+
automationRevision: z.ZodNumber;
|
|
980
|
+
receiptId: z.ZodString;
|
|
981
|
+
event: z.ZodString;
|
|
982
|
+
githubUrl: z.ZodString;
|
|
983
|
+
}, z.core.$strip>>;
|
|
984
|
+
status: z.ZodEnum<{
|
|
985
|
+
cancelled: "cancelled";
|
|
986
|
+
done: "done";
|
|
987
|
+
failed: "failed";
|
|
988
|
+
queued: "queued";
|
|
989
|
+
review: "review";
|
|
990
|
+
running: "running";
|
|
991
|
+
waiting: "waiting";
|
|
992
|
+
}>;
|
|
993
|
+
activity: z.ZodOptional<z.ZodEnum<{
|
|
994
|
+
monitoring: "monitoring";
|
|
995
|
+
}>>;
|
|
996
|
+
monitoringWakeAt: z.ZodOptional<z.ZodString>;
|
|
997
|
+
monitoringWakeCapReached: z.ZodOptional<z.ZodBoolean>;
|
|
998
|
+
createdAt: z.ZodString;
|
|
999
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
1000
|
+
finishedAt: z.ZodOptional<z.ZodString>;
|
|
1001
|
+
tokensUsed: z.ZodNumber;
|
|
1002
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
1003
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
1004
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
1005
|
+
pullRequestUrl: z.ZodOptional<z.ZodString>;
|
|
1006
|
+
referencedPullRequestUrl: z.ZodOptional<z.ZodString>;
|
|
1007
|
+
prNumber: z.ZodOptional<z.ZodNumber>;
|
|
1008
|
+
issueNumber: z.ZodOptional<z.ZodNumber>;
|
|
1009
|
+
referencedIssueNumberSeeded: z.ZodOptional<z.ZodBoolean>;
|
|
1010
|
+
titleOrigin: z.ZodOptional<z.ZodEnum<{
|
|
1011
|
+
auto: "auto";
|
|
1012
|
+
marker: "marker";
|
|
1013
|
+
user: "user";
|
|
1014
|
+
}>>;
|
|
1015
|
+
markerRefs: z.ZodOptional<z.ZodObject<{
|
|
1016
|
+
pr: z.ZodOptional<z.ZodNumber>;
|
|
1017
|
+
issue: z.ZodOptional<z.ZodNumber>;
|
|
1018
|
+
}, z.core.$strip>>;
|
|
1019
|
+
referencedPrCandidates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1020
|
+
referencedIssueUrl: z.ZodOptional<z.ZodString>;
|
|
1021
|
+
referencedIssueCandidates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1022
|
+
worktree: z.ZodOptional<z.ZodLiteral<false>>;
|
|
1023
|
+
worktreePath: z.ZodOptional<z.ZodString>;
|
|
1024
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
1025
|
+
baseBranch: z.ZodOptional<z.ZodString>;
|
|
1026
|
+
worktreeReclaimedAt: z.ZodOptional<z.ZodString>;
|
|
1027
|
+
groupId: z.ZodOptional<z.ZodString>;
|
|
1028
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
1029
|
+
peakRssBytes: z.ZodOptional<z.ZodNumber>;
|
|
1030
|
+
peakProcCount: z.ZodOptional<z.ZodNumber>;
|
|
1031
|
+
archived: z.ZodBoolean;
|
|
1032
|
+
archivedAt: z.ZodOptional<z.ZodString>;
|
|
1033
|
+
seenAt: z.ZodOptional<z.ZodString>;
|
|
1034
|
+
currentStepId: z.ZodOptional<z.ZodString>;
|
|
1035
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1036
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
1037
|
+
id: z.ZodString;
|
|
1038
|
+
name: z.ZodString;
|
|
1039
|
+
kind: z.ZodEnum<{
|
|
1040
|
+
agent: "agent";
|
|
1041
|
+
check: "check";
|
|
1042
|
+
}>;
|
|
1043
|
+
status: z.ZodEnum<{
|
|
1044
|
+
cancelled: "cancelled";
|
|
1045
|
+
done: "done";
|
|
1046
|
+
failed: "failed";
|
|
1047
|
+
pending: "pending";
|
|
1048
|
+
review: "review";
|
|
1049
|
+
running: "running";
|
|
1050
|
+
skipped: "skipped";
|
|
1051
|
+
waiting: "waiting";
|
|
1052
|
+
}>;
|
|
1053
|
+
iterations: z.ZodNumber;
|
|
1054
|
+
tokensUsed: z.ZodNumber;
|
|
1055
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
1056
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
1057
|
+
usageInvocationsStarted: z.ZodOptional<z.ZodNumber>;
|
|
1058
|
+
usageInvocationsObserved: z.ZodOptional<z.ZodNumber>;
|
|
1059
|
+
usageTurnsStarted: z.ZodOptional<z.ZodNumber>;
|
|
1060
|
+
usageTurnsRecorded: z.ZodOptional<z.ZodNumber>;
|
|
1061
|
+
usageInvocationEpoch: z.ZodOptional<z.ZodNumber>;
|
|
1062
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
1063
|
+
finishedAt: z.ZodOptional<z.ZodString>;
|
|
1064
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1065
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1066
|
+
backend: z.ZodOptional<z.ZodEnum<{
|
|
1067
|
+
claude: "claude";
|
|
1068
|
+
codex: "codex";
|
|
1069
|
+
opencode: "opencode";
|
|
1070
|
+
}>>;
|
|
1071
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
1072
|
+
}, z.core.$strip>>;
|
|
1073
|
+
workflowDef: z.ZodOptional<z.ZodObject<{
|
|
1074
|
+
name: z.ZodString;
|
|
1075
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1076
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
1077
|
+
id: z.ZodString;
|
|
1078
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1079
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
1080
|
+
skill: z.ZodOptional<z.ZodString>;
|
|
1081
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1082
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
1083
|
+
claude: "claude";
|
|
1084
|
+
codex: "codex";
|
|
1085
|
+
opencode: "opencode";
|
|
1086
|
+
}>>;
|
|
1087
|
+
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1088
|
+
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1089
|
+
command: z.ZodOptional<z.ZodString>;
|
|
1090
|
+
onFail: z.ZodOptional<z.ZodObject<{
|
|
1091
|
+
retry: z.ZodString;
|
|
1092
|
+
max: z.ZodDefault<z.ZodNumber>;
|
|
1093
|
+
}, z.core.$strip>>;
|
|
1094
|
+
}, z.core.$strip>>;
|
|
1095
|
+
source: z.ZodEnum<{
|
|
1096
|
+
"built-in": "built-in";
|
|
1097
|
+
file: "file";
|
|
1098
|
+
}>;
|
|
1099
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1100
|
+
}, z.core.$strip>>;
|
|
1101
|
+
}, z.core.$strip>>;
|
|
1102
|
+
}, z.core.$strip>;
|
|
1103
|
+
export type PickVariantResponse = z.infer<typeof pickVariantResponseSchema>;
|
|
1104
|
+
/** An inline image, base64 — ≤4 per request, ~5 MB each once decoded. */
|
|
1105
|
+
export declare const imageInputSchema: z.ZodObject<{
|
|
1106
|
+
mediaType: z.ZodString;
|
|
1107
|
+
data: z.ZodString;
|
|
1108
|
+
}, z.core.$strip>;
|
|
1109
|
+
export type ImageInput = z.input<typeof imageInputSchema>;
|
|
1110
|
+
/**
|
|
1111
|
+
* The KEYS of `POST /runs`' body, before the XOR refinement that `createRunInputSchema` adds.
|
|
1112
|
+
*
|
|
1113
|
+
* Split out for one reason: `./automations.ts` builds an automation's task on top of this shape
|
|
1114
|
+
* (a task IS a run-creation body minus the three keys an automation supplies itself), and zod
|
|
1115
|
+
* refuses `.omit()` on a schema that carries refinements. Validate with `createRunInputSchema`
|
|
1116
|
+
* below — this half accepts a body naming both `workflow` and `steps`, which the server does not.
|
|
1117
|
+
*/
|
|
1118
|
+
export declare const createRunInputBaseSchema: z.ZodObject<{
|
|
1119
|
+
workflow: z.ZodOptional<z.ZodString>;
|
|
1120
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1121
|
+
id: z.ZodString;
|
|
1122
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1123
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
1124
|
+
skill: z.ZodOptional<z.ZodString>;
|
|
1125
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1126
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
1127
|
+
claude: "claude";
|
|
1128
|
+
codex: "codex";
|
|
1129
|
+
opencode: "opencode";
|
|
1130
|
+
}>>;
|
|
1131
|
+
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1132
|
+
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1133
|
+
command: z.ZodOptional<z.ZodString>;
|
|
1134
|
+
onFail: z.ZodOptional<z.ZodObject<{
|
|
1135
|
+
retry: z.ZodString;
|
|
1136
|
+
max: z.ZodDefault<z.ZodNumber>;
|
|
1137
|
+
}, z.core.$strip>>;
|
|
1138
|
+
}, z.core.$strip>>>;
|
|
1139
|
+
task: z.ZodString;
|
|
1140
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1141
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
1142
|
+
claude: "claude";
|
|
1143
|
+
codex: "codex";
|
|
1144
|
+
opencode: "opencode";
|
|
1145
|
+
}>>;
|
|
1146
|
+
variants: z.ZodOptional<z.ZodNumber>;
|
|
1147
|
+
worktree: z.ZodOptional<z.ZodBoolean>;
|
|
1148
|
+
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
1149
|
+
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
1150
|
+
systemPrompt: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
1151
|
+
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1152
|
+
mediaType: z.ZodString;
|
|
1153
|
+
data: z.ZodString;
|
|
1154
|
+
}, z.core.$strip>>>;
|
|
1155
|
+
todoId: z.ZodOptional<z.ZodString>;
|
|
1156
|
+
}, z.core.$strip>;
|
|
1157
|
+
/**
|
|
1158
|
+
* `POST /runs`. Exactly one of `workflow` / `steps` — the server rejects both or neither.
|
|
1159
|
+
*
|
|
1160
|
+
* Every bound here is the server's own (#429): an unbounded body must never reach a spawned
|
|
1161
|
+
* process, so a client that validates before sending gets the same answer the route would give.
|
|
1162
|
+
*/
|
|
1163
|
+
export declare const createRunInputSchema: z.ZodObject<{
|
|
1164
|
+
workflow: z.ZodOptional<z.ZodString>;
|
|
1165
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1166
|
+
id: z.ZodString;
|
|
1167
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1168
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
1169
|
+
skill: z.ZodOptional<z.ZodString>;
|
|
1170
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1171
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
1172
|
+
claude: "claude";
|
|
1173
|
+
codex: "codex";
|
|
1174
|
+
opencode: "opencode";
|
|
1175
|
+
}>>;
|
|
1176
|
+
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1177
|
+
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1178
|
+
command: z.ZodOptional<z.ZodString>;
|
|
1179
|
+
onFail: z.ZodOptional<z.ZodObject<{
|
|
1180
|
+
retry: z.ZodString;
|
|
1181
|
+
max: z.ZodDefault<z.ZodNumber>;
|
|
1182
|
+
}, z.core.$strip>>;
|
|
1183
|
+
}, z.core.$strip>>>;
|
|
1184
|
+
task: z.ZodString;
|
|
1185
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1186
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
1187
|
+
claude: "claude";
|
|
1188
|
+
codex: "codex";
|
|
1189
|
+
opencode: "opencode";
|
|
1190
|
+
}>>;
|
|
1191
|
+
variants: z.ZodOptional<z.ZodNumber>;
|
|
1192
|
+
worktree: z.ZodOptional<z.ZodBoolean>;
|
|
1193
|
+
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
1194
|
+
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
1195
|
+
systemPrompt: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
1196
|
+
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1197
|
+
mediaType: z.ZodString;
|
|
1198
|
+
data: z.ZodString;
|
|
1199
|
+
}, z.core.$strip>>>;
|
|
1200
|
+
todoId: z.ZodOptional<z.ZodString>;
|
|
1201
|
+
}, z.core.$strip>;
|
|
1202
|
+
export type CreateRunInput = z.input<typeof createRunInputSchema>;
|
|
1203
|
+
/**
|
|
1204
|
+
* `POST /runs/:id/messages` — text and/or pasted screenshots for a live session. Both keys have
|
|
1205
|
+
* server-side defaults, so an omitted `text` is `''` and an omitted `images` is `[]`; the refine
|
|
1206
|
+
* is what rejects a message that is empty in both.
|
|
1207
|
+
*/
|
|
1208
|
+
export declare const messageInputSchema: z.ZodObject<{
|
|
1209
|
+
text: z.ZodDefault<z.ZodString>;
|
|
1210
|
+
images: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1211
|
+
mediaType: z.ZodString;
|
|
1212
|
+
data: z.ZodString;
|
|
1213
|
+
}, z.core.$strip>>>;
|
|
1214
|
+
}, z.core.$strip>;
|
|
1215
|
+
export type MessageInput = z.input<typeof messageInputSchema>;
|
|
1216
|
+
/**
|
|
1217
|
+
* `PATCH /runs/:id` (#389). `title` is trimmed server-side, 1–300 chars, and the edit sets both
|
|
1218
|
+
* `title` and `titleSummary` so it wins over any auto-summary. `task` (#472) is the initial
|
|
1219
|
+
* prompt, editable only while the run is still queued — any other status answers
|
|
1220
|
+
* `409 run already started`, and the folded total across the task and its stack bounds it again.
|
|
1221
|
+
*/
|
|
1222
|
+
export declare const patchRunInputSchema: z.ZodObject<{
|
|
1223
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1224
|
+
task: z.ZodOptional<z.ZodString>;
|
|
1225
|
+
}, z.core.$strip>;
|
|
1226
|
+
export type PatchRunInput = z.input<typeof patchRunInputSchema>;
|