@wjarka/cezarion 0.17.0-pr2020.3067 → 0.17.0-pr2020.3107
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 +15 -13
- package/dist/ci-wait/controller.d.ts +4 -4
- package/dist/contract/discovery.d.ts +87 -0
- package/dist/contract/events.d.ts +1 -1
- package/dist/contract/github.d.ts +3 -3
- package/dist/contract/health.d.ts +1 -1
- package/dist/contract/index.js +78 -59
- package/dist/contract/workspace.d.ts +1 -1
- package/dist/core/omp-runner.js +40 -110
- package/dist/core/omp-runner.js.map +1 -1
- package/dist/core/pi-rpc-turn.d.ts +63 -2
- package/dist/core/pi-rpc-turn.js +129 -2
- package/dist/core/pi-rpc-turn.js.map +1 -1
- package/dist/core/pi-runner.js +149 -175
- package/dist/core/pi-runner.js.map +1 -1
- package/dist/delegation/cli.d.ts +1 -0
- package/dist/delegation/cli.js +253 -187
- package/dist/delegation/cli.js.map +1 -1
- package/dist/delegation/conversations.js +1 -1
- package/dist/delegation/conversations.js.map +1 -1
- package/dist/delegation/park-notice.js +1 -1
- package/dist/delegation/park-notice.js.map +1 -1
- package/dist/delegation/policy.js +1 -1
- package/dist/delegation/policy.js.map +1 -1
- package/dist/delegation/provision.d.ts +1 -1
- package/dist/delegation/provision.js +11 -10
- package/dist/delegation/provision.js.map +1 -1
- package/dist/delegation/questions.js +1 -1
- package/dist/delegation/questions.js.map +1 -1
- package/dist/delegation/routes.d.ts +20 -4
- package/dist/delegation/service.js +5 -2
- package/dist/delegation/service.js.map +1 -1
- package/dist/delegation/task-discovery.d.ts +6 -0
- package/dist/delegation/task-discovery.js +23 -0
- package/dist/delegation/task-discovery.js.map +1 -0
- package/dist/delegation/transport.d.ts +27 -11
- package/dist/discovery/cli.js +1 -1
- package/dist/discovery/cli.js.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/runs/run-database-peer-page.d.ts +12 -0
- package/dist/runs/run-database-peer-page.js +25 -0
- package/dist/runs/run-database-peer-page.js.map +1 -0
- package/dist/runs/run-database.d.ts +3 -0
- package/dist/runs/run-database.js +5 -9
- package/dist/runs/run-database.js.map +1 -1
- package/dist/runs/run-summary-page.d.ts +36 -0
- package/dist/runs/run-summary-page.js +46 -0
- package/dist/runs/run-summary-page.js.map +1 -0
- package/dist/runs/store-open-error.js +1 -1
- package/dist/runs/store-open-error.js.map +1 -1
- package/dist/runs/store.d.ts +7 -9
- package/dist/runs/store.js +11 -26
- package/dist/runs/store.js.map +1 -1
- package/dist/server/forge/github.d.ts +1 -1
- package/dist/server/forge/github.js +2 -2
- package/dist/server/forge/github.js.map +1 -1
- package/dist/server/forge/types.d.ts +2 -2
- package/dist/server/github.d.ts +1 -1
- package/dist/server/github.js +1 -1
- package/dist/server/server.d.ts +1200 -1200
- package/dist/server/server.js +8 -10
- package/dist/server/server.js.map +1 -1
- package/dist/server/upgrade-router.d.ts +1 -1
- package/dist/server/validators.js +1 -1
- package/dist/subcommands.d.ts +1 -1
- package/dist/subcommands.js +2 -1
- package/dist/subcommands.js.map +1 -1
- package/dist/task-cli/cli.d.ts +1 -1
- package/dist/task-cli/cli.js +1 -1
- package/dist/task-cli/cli.js.map +1 -1
- package/dist/ui-state.d.ts +1 -1
- package/dist/ui-state.js +1 -1
- package/dist/workflows/completion-policy.d.ts +2 -0
- package/dist/workflows/completion-policy.js +9 -1
- package/dist/workflows/completion-policy.js.map +1 -1
- package/dist/workflows/outcome-batches.d.ts +14 -2
- package/dist/workflows/outcome-batches.js +33 -3
- package/dist/workflows/outcome-batches.js.map +1 -1
- package/dist/workflows/run-states.js +1 -1
- package/dist/workflows/run-states.js.map +1 -1
- package/dist/workflows/run.d.ts +6 -8
- package/dist/workflows/run.js +47 -45
- package/dist/workflows/run.js.map +1 -1
- package/dist/workspace/ui-state.d.ts +1 -1
- package/dist/workspace/ui-state.js +1 -1
- package/dist/workspace/ui-state.js.map +1 -1
- package/package.json +3 -3
- package/web/dist/assets/{centered-state-CcaeSgsH.js → centered-state-DLxUJpDV.js} +1 -1
- package/web/dist/assets/{diff-GUVWyaxQ2.js → diff-C161H2Up2.js} +2 -2
- package/web/dist/assets/{diff-controls-Bf8SF3OS.js → diff-controls-CQSTbiA0.js} +1 -1
- package/web/dist/assets/{diff-view-CETibnc4.js → diff-view-DulOJt6W.js} +1 -1
- package/web/dist/assets/{dropdown-menu-DLtOu0Us.js → dropdown-menu-rR8zCbbc.js} +1 -1
- package/web/dist/assets/{git-toolbar-lMZoY2tS.js → git-toolbar-BkMHBBs_.js} +1 -1
- package/web/dist/assets/{github-BVCO5BCG.js → github-MZyPS-IG.js} +1 -1
- package/web/dist/assets/{index-Dy9TfjA4.js → index-6yzThwbw.js} +4 -4
- package/web/dist/assets/{index-D9HpsmdW.css → index-CKYbxrnX.css} +1 -1
- package/web/dist/assets/{live-protocol-D7Q-V86-.js → live-protocol-BnaZEd6_.js} +1 -1
- package/web/dist/assets/{popover-bqS8evCB.js → popover-BZKlYg9k.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-B9JMEiHO.js → preview-pane-connected-10j77X6t.js} +1 -1
- package/web/dist/assets/{reference-chip-Cd7wXkVM.js → reference-chip-DEmhZ9PX.js} +1 -1
- package/web/dist/assets/{repo-git-DWsiGkq6.js → repo-git-D7WKOJdI.js} +1 -1
- package/web/dist/assets/{run-header-DlLJ1_HW.js → run-header-p3OXHATk.js} +1 -1
- package/web/dist/assets/{skills-C3MyB0Wr.js → skills-CUfojtAj.js} +1 -1
- package/web/dist/assets/{status-dot-BUEedrCa.js → status-dot-D_C66jvG.js} +1 -1
- package/web/dist/assets/{tab-link-CO6qFRTc.js → tab-link-B8TPxyFo.js} +1 -1
- package/web/dist/assets/{task-changes-BmfUvXnC.js → task-changes-DBYJLnxY.js} +1 -1
- package/web/dist/assets/{task-commits-DuD2Utbu.js → task-commits-CqQUIIK-.js} +1 -1
- package/web/dist/assets/{task-files-BTPv0kSM.js → task-files-pzWVidti.js} +1 -1
- package/web/dist/assets/{task-github-item-CeniF1Im.js → task-github-item-CquX_jnB.js} +1 -1
- package/web/dist/assets/{task-thread-Cp3tfoUe.js → task-thread-D8zSYmhj.js} +9 -9
- package/web/dist/assets/{thread-state-DqsyA2AE.js → thread-state-CIYvo5cY.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-DfQpDRnC.js → use-hand-to-agent-state--CjMQAK0.js} +1 -1
- package/web/dist/assets/{workflows-DU4SXuI9.js → workflows-C0lK2d0X.js} +1 -1
- package/web/dist/index.html +8 -8
- package/web/dist/live-worker.js +1 -1
package/README.md
CHANGED
|
@@ -88,7 +88,7 @@ cp .ai/cezar/todos.json ./cezar-followups-export.json
|
|
|
88
88
|
```
|
|
89
89
|
Old Inbox URLs show this guidance. Create an ordinary task with **New task**, or use
|
|
90
90
|
an issue-authoring skill to record work in your tracker. Task **Notes**, the rolling
|
|
91
|
-
handoff journal, **Continue**, live follow-up messages, and `cez
|
|
91
|
+
handoff journal, **Continue**, live follow-up messages, and `cez message inbox` remain
|
|
92
92
|
available.
|
|
93
93
|
## What Cezarion does best 🏆
|
|
94
94
|
|
|
@@ -761,20 +761,22 @@ cez worker wait <worker-id> --mode one --timeout-seconds 600
|
|
|
761
761
|
cez worker wait <first-id> <second-id> --mode any --timeout-seconds 600
|
|
762
762
|
cez worker wait <first-id> <second-id> --mode all --timeout-seconds 600
|
|
763
763
|
cez worker cancel-wait <wait-id>
|
|
764
|
-
cez
|
|
765
|
-
cez worker
|
|
766
|
-
cez
|
|
767
|
-
cez
|
|
768
|
-
cez
|
|
769
|
-
cez
|
|
770
|
-
cez
|
|
771
|
-
cez
|
|
772
|
-
cez
|
|
764
|
+
cez message request <recipient-run-id> 'Please check this decision' --id <message-UUID>
|
|
765
|
+
cez worker resume <worker-id> 'Correct the returned result' --id <new-message-UUID>
|
|
766
|
+
cez message progress <recipient-run-id> 'Parser tests pass' --id <message-UUID>
|
|
767
|
+
cez message follow-up <recipient-run-id> 'Include empty input' --id <message-UUID> --request-id <request-UUID>
|
|
768
|
+
cez message reply <recipient-run-id> 'Checked; empty input is covered' --id <message-UUID> --request-id <request-UUID>
|
|
769
|
+
cez message conversation <recipient-run-id>
|
|
770
|
+
cez message wait --request <request-UUID> --request <another-request-UUID> --mode all
|
|
771
|
+
cez message inbox
|
|
772
|
+
cez message tasks --all
|
|
773
|
+
cez message cancel-wait <wait-id>
|
|
774
|
+
cez message cancel-request <request-UUID>
|
|
773
775
|
cez worker stop <worker-id>
|
|
774
776
|
cez worker destroy <worker-id>
|
|
775
777
|
```
|
|
776
778
|
|
|
777
|
-
Use `cez worker --help` to list operations and flags, or `cez worker <operation> --help` for one operation. Explicit help prints human-readable text and exits successfully without an active delegation session. Commands otherwise return bounded JSON and a nonzero exit on failure or incomplete cleanup. Spawn requires a committed baseline (`parent-head` or an explicit ref) and pins its SHA at acceptance; dirty parent edits are excluded. Optional `--context '<text>'` or `--context-file <UTF-8-file>` supplies selected context, not the parent's conversation. The two flags are mutually exclusive, and combined task/context text is limited to 100,000 characters. The API also accepts up to 32 pinned-baseline file or parent-attachment references, with at most 8 MiB of copied attachments. Inspect reports worker-local input locations. Reuse a request ID only with the same task, baseline, context, runner, model, effort and workflow when retrying a lost response. `--runner` and its alias `--backend` count as the same field, so a retry may switch spelling. A parent holds at most 32 outstanding workers: accepted, live, or not yet verifiably destroyed. A verified destroy (`cez worker destroy`, or **Clean up** on a finished worker in the cockpit's Workers list) frees a slot; incomplete cleanup keeps its slot until a retry completes. A parent can create at most 1,024 workers in total; past that, start a new task. These limits bound disk resources and runaway spawning, not spending: a worker can be resumed with Continue, and destroying it does not undo charges already made. Cost stays bounded by `maxParallel` and by stopping the parent. There are at most 32 undelivered steering messages per worker.
|
|
779
|
+
Use `cez message --help` for messaging commands. Use `cez worker --help` to list worker operations and flags, or `cez worker <operation> --help` for one operation. Explicit help prints human-readable text and exits successfully without an active delegation session. Commands otherwise return bounded JSON and a nonzero exit on failure or incomplete cleanup. Spawn requires a committed baseline (`parent-head` or an explicit ref) and pins its SHA at acceptance; dirty parent edits are excluded. Optional `--context '<text>'` or `--context-file <UTF-8-file>` supplies selected context, not the parent's conversation. The two flags are mutually exclusive, and combined task/context text is limited to 100,000 characters. The API also accepts up to 32 pinned-baseline file or parent-attachment references, with at most 8 MiB of copied attachments. Inspect reports worker-local input locations. Reuse a request ID only with the same task, baseline, context, runner, model, effort and workflow when retrying a lost response. `--runner` and its alias `--backend` count as the same field, so a retry may switch spelling. A parent holds at most 32 outstanding workers: accepted, live, or not yet verifiably destroyed. A verified destroy (`cez worker destroy`, or **Clean up** on a finished worker in the cockpit's Workers list) frees a slot; incomplete cleanup keeps its slot until a retry completes. A parent can create at most 1,024 workers in total; past that, start a new task. These limits bound disk resources and runaway spawning, not spending: a worker can be resumed with Continue, and destroying it does not undo charges already made. Cost stays bounded by `maxParallel` and by stopping the parent. There are at most 32 undelivered steering messages per worker.
|
|
778
780
|
|
|
779
781
|
An incomplete destroy reports the remaining resources and a reason. Cezarion retries that recorded request after a delay, including after the project's context recovers on server restart. It removes the owned checkout only after process termination and ownership are verified. If the reason persists, inspect the worker process, Git worktree lock and ownership receipt; correct the blocker and use `cez worker destroy <worker-id>` or the cockpit Destroy action to retry immediately. Cezarion leaves ambiguous or replaced resources in place for operator review.
|
|
780
782
|
|
|
@@ -792,7 +794,7 @@ Messages allow 100,000 characters each, with at most 32 undelivered inputs per r
|
|
|
792
794
|
|
|
793
795
|
Messages reach a live recipient as soon as they are accepted, including mid-turn: Claude, Codex, Pi, OMP and OpenCode steer them into the running turn, and the model reads them at its next step. Cursor delivers at the turn boundary, because a second prompt would cancel its running turn. Pending conversations go together, in order, up to 32 messages and 100,000 formatted characters per batch; a single valid message is never split. Every message keeps its ID, sender, delivery receipt and request outcome; receipts show queued, delivered and read (when the agent's harness can tell) separately. A pending human question holds messages until it is answered, then they follow right behind the answer. The thread's Details distinguish creation, delivery confirmation and event-recording times.
|
|
794
796
|
|
|
795
|
-
Sending to a review or terminal participant
|
|
797
|
+
Sending a message to a review or terminal participant reports `not-delivered` and `continuation-required`, with the reason and next command; the CLI exits 1. An active parent can use `cez worker resume` to continue its settled done/review/failed worker with that message as the new instruction. No human Continue is needed for this parent-controlled action. A retry with the same payload and ID never creates another continuation; resuming after a rejected message requires a new ID. Stopped or destroyed workers need a new worker. Workers cannot resume parents, and conversation never answers a pending human question. Durable IDs deduplicate accepted queue entries and event replay, but a crash between provider acceptance and its durable delivery checkpoint can leave transport delivery ambiguous; this is not an exactly-once execution guarantee.
|
|
796
798
|
|
|
797
799
|
Collect returns the worker's execution revision, status/outcome, `settled` and `partial` flags, and typed availability for assistant summary, HEAD, bounded diff and artifact descriptors. Missing evidence is explicit; running output is partial. An available `diff.path` points to a **JSON result file** containing `{ result, diffSnapshot }`; its `diffSnapshot` field holds the patch. Read and review that field before applying any changes. The latest collected result is stored under the parent and survives restart. Collection acknowledges observation, not Git integration or successful work. Review desired worker commits and deliberately integrate them into the parent before destroying their worktrees/branches; there is no automatic merge.
|
|
798
800
|
|
|
@@ -1445,7 +1447,7 @@ itself remains selectable.
|
|
|
1445
1447
|
|
|
1446
1448
|
Run data (`runs.db` and its `-wal`/`-shm` files, the `runs.json.pre-sqlite*.bak`
|
|
1447
1449
|
backups, NDJSON event logs, worktrees, `todos.json`) is git-ignored
|
|
1448
|
-
automatically; your workflows and skills stay committable.
|
|
1450
|
+
automatically; your workflows and skills stay committable. See [run history recovery](https://github.com/hearsay-tools/cezarion/blob/main/docs/run-history-recovery.md) for backup and repair steps.
|
|
1449
1451
|
|
|
1450
1452
|
Settings that belong to *you* rather than to a repo — the parallel cap
|
|
1451
1453
|
(`maxParallel`, default **2**), the per-task memory ceiling and the checkout
|
|
@@ -568,10 +568,6 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
568
568
|
};
|
|
569
569
|
} | {
|
|
570
570
|
output: {
|
|
571
|
-
ok: false;
|
|
572
|
-
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
573
|
-
message: string;
|
|
574
|
-
} | {
|
|
575
571
|
ok: true;
|
|
576
572
|
task: {
|
|
577
573
|
id: string;
|
|
@@ -585,6 +581,10 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
585
581
|
url?: string | undefined;
|
|
586
582
|
};
|
|
587
583
|
note: string;
|
|
584
|
+
} | {
|
|
585
|
+
ok: false;
|
|
586
|
+
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
587
|
+
message: string;
|
|
588
588
|
};
|
|
589
589
|
outputFormat: "json";
|
|
590
590
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
/** Host default-account discovery; delegation credentials select the controller, not an account. */
|
|
3
|
+
export declare const hostDiscoveryRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
|
+
kind: z.ZodLiteral<"runners">;
|
|
5
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
6
|
+
kind: z.ZodLiteral<"models">;
|
|
7
|
+
runner: z.ZodEnum<{
|
|
8
|
+
claude: "claude";
|
|
9
|
+
codex: "codex";
|
|
10
|
+
cursor: "cursor";
|
|
11
|
+
omp: "omp";
|
|
12
|
+
opencode: "opencode";
|
|
13
|
+
pi: "pi";
|
|
14
|
+
}>;
|
|
15
|
+
}, z.core.$strict>], "kind">;
|
|
3
16
|
export declare const discoveryRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
17
|
kind: z.ZodLiteral<"runners">;
|
|
5
18
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -12,6 +25,10 @@ export declare const discoveryRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
12
25
|
opencode: "opencode";
|
|
13
26
|
pi: "pi";
|
|
14
27
|
}>;
|
|
28
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
29
|
+
kind: z.ZodLiteral<"tasks">;
|
|
30
|
+
all: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
15
32
|
}, z.core.$strict>], "kind">;
|
|
16
33
|
export type DiscoveryRequest = z.infer<typeof discoveryRequestSchema>;
|
|
17
34
|
export declare const discoveredRunnerSchema: z.ZodObject<{
|
|
@@ -56,6 +73,42 @@ export declare const discoveredRunnersSchema: z.ZodObject<{
|
|
|
56
73
|
}, z.core.$strip>>;
|
|
57
74
|
}, z.core.$strip>;
|
|
58
75
|
export type DiscoveredRunners = z.infer<typeof discoveredRunnersSchema>;
|
|
76
|
+
export declare const discoveredTasksSchema: z.ZodObject<{
|
|
77
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
78
|
+
id: z.ZodString;
|
|
79
|
+
title: z.ZodString;
|
|
80
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
81
|
+
claude: "claude";
|
|
82
|
+
codex: "codex";
|
|
83
|
+
cursor: "cursor";
|
|
84
|
+
omp: "omp";
|
|
85
|
+
opencode: "opencode";
|
|
86
|
+
pi: "pi";
|
|
87
|
+
}>>;
|
|
88
|
+
status: z.ZodEnum<{
|
|
89
|
+
cancelled: "cancelled";
|
|
90
|
+
done: "done";
|
|
91
|
+
failed: "failed";
|
|
92
|
+
queued: "queued";
|
|
93
|
+
review: "review";
|
|
94
|
+
running: "running";
|
|
95
|
+
waiting: "waiting";
|
|
96
|
+
}>;
|
|
97
|
+
attention: z.ZodEnum<{
|
|
98
|
+
error: "error";
|
|
99
|
+
none: "none";
|
|
100
|
+
permission: "permission";
|
|
101
|
+
running: "running";
|
|
102
|
+
unseen: "unseen";
|
|
103
|
+
waiting: "waiting";
|
|
104
|
+
}>;
|
|
105
|
+
attentionLabel: z.ZodString;
|
|
106
|
+
accepts: z.ZodBoolean;
|
|
107
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
108
|
+
}, z.core.$strip>>;
|
|
109
|
+
nextOffset: z.ZodOptional<z.ZodNumber>;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
export type DiscoveredTasks = z.infer<typeof discoveredTasksSchema>;
|
|
59
112
|
export declare const discoveryResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
60
113
|
scope: z.ZodLiteral<"host-default-account">;
|
|
61
114
|
runners: z.ZodArray<z.ZodObject<{
|
|
@@ -105,6 +158,40 @@ export declare const discoveryResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
105
158
|
}>;
|
|
106
159
|
stale: z.ZodBoolean;
|
|
107
160
|
reason: z.ZodOptional<z.ZodString>;
|
|
161
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
162
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
163
|
+
id: z.ZodString;
|
|
164
|
+
title: z.ZodString;
|
|
165
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
166
|
+
claude: "claude";
|
|
167
|
+
codex: "codex";
|
|
168
|
+
cursor: "cursor";
|
|
169
|
+
omp: "omp";
|
|
170
|
+
opencode: "opencode";
|
|
171
|
+
pi: "pi";
|
|
172
|
+
}>>;
|
|
173
|
+
status: z.ZodEnum<{
|
|
174
|
+
cancelled: "cancelled";
|
|
175
|
+
done: "done";
|
|
176
|
+
failed: "failed";
|
|
177
|
+
queued: "queued";
|
|
178
|
+
review: "review";
|
|
179
|
+
running: "running";
|
|
180
|
+
waiting: "waiting";
|
|
181
|
+
}>;
|
|
182
|
+
attention: z.ZodEnum<{
|
|
183
|
+
error: "error";
|
|
184
|
+
none: "none";
|
|
185
|
+
permission: "permission";
|
|
186
|
+
running: "running";
|
|
187
|
+
unseen: "unseen";
|
|
188
|
+
waiting: "waiting";
|
|
189
|
+
}>;
|
|
190
|
+
attentionLabel: z.ZodString;
|
|
191
|
+
accepts: z.ZodBoolean;
|
|
192
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
193
|
+
}, z.core.$strip>>;
|
|
194
|
+
nextOffset: z.ZodOptional<z.ZodNumber>;
|
|
108
195
|
}, z.core.$strip>]>;
|
|
109
196
|
export type DiscoveryResponse = z.infer<typeof discoveryResponseSchema>;
|
|
110
197
|
export declare const modelChoicesSchema: z.ZodObject<{
|
|
@@ -13,7 +13,7 @@ import { z } from 'zod';
|
|
|
13
13
|
* One line of a run transcript.
|
|
14
14
|
*
|
|
15
15
|
* Open by design: `type` is a plain string and unknown keys pass through, because the event
|
|
16
|
-
* vocabulary is an APPEND-ONLY on-disk format (BACKWARD_COMPATIBILITY.md
|
|
16
|
+
* vocabulary is an APPEND-ONLY on-disk format (BACKWARD_COMPATIBILITY.md) that old NDJSON
|
|
17
17
|
* recordings must keep replaying forever. Closing this schema would make a recording written by
|
|
18
18
|
* a newer cezar unreadable by an older one — the opposite of what the format promises.
|
|
19
19
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
/**
|
|
3
3
|
* One issue or pull request, flattened for the cockpit (`ForgeItem` server-side).
|
|
4
|
-
* A protected shape —
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* A protected shape — changes require an explanation and migration path. The `body` field is
|
|
5
|
+
* deprecated (hearsay-tools/cezarion#1183): optional, still sent by list routes, and hydrated
|
|
6
|
+
* from `detail.body` on the comments route by new consumers.
|
|
7
7
|
*/
|
|
8
8
|
export declare const githubItemSchema: z.ZodObject<{
|
|
9
9
|
kind: z.ZodEnum<{
|
|
@@ -52,7 +52,7 @@ export declare const capabilitiesSchema: z.ZodObject<{
|
|
|
52
52
|
}, z.core.$strip>;
|
|
53
53
|
export type Capabilities = z.infer<typeof capabilitiesSchema>;
|
|
54
54
|
/**
|
|
55
|
-
* `GET /api/v1/health` — the CORS-open discovery endpoint (BACKWARD_COMPATIBILITY.md
|
|
55
|
+
* `GET /api/v1/health` — the CORS-open discovery endpoint (BACKWARD_COMPATIBILITY.md).
|
|
56
56
|
*
|
|
57
57
|
* Additive fields only: this is the most externally-depended-on JSON in the app.
|
|
58
58
|
*/
|
package/dist/contract/index.js
CHANGED
|
@@ -117,50 +117,35 @@ var requestWaitRequestSchema = z2.object({
|
|
|
117
117
|
// ../contract/src/discovery.ts
|
|
118
118
|
import { z as z8 } from "zod";
|
|
119
119
|
|
|
120
|
-
// ../contract/src/workspace.ts
|
|
121
|
-
import { z as z7 } from "zod";
|
|
122
|
-
|
|
123
|
-
// ../contract/src/effort.ts
|
|
124
|
-
import { z as z3 } from "zod";
|
|
125
|
-
var EFFORT_LEVELS = ["low", "medium", "high", "xhigh", "max"];
|
|
126
|
-
var effortLevelSchema = z3.enum(EFFORT_LEVELS);
|
|
127
|
-
var effortFieldSchema = z3.string().max(32).optional();
|
|
128
|
-
function parseEffort(value) {
|
|
129
|
-
const trimmed = value?.trim().toLowerCase();
|
|
130
|
-
if (!trimmed || trimmed === "auto") return void 0;
|
|
131
|
-
const parsed = effortLevelSchema.safeParse(trimmed);
|
|
132
|
-
return parsed.success ? parsed.data : void 0;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
120
|
// ../contract/src/health.ts
|
|
136
|
-
import { z as
|
|
121
|
+
import { z as z4 } from "zod";
|
|
137
122
|
|
|
138
123
|
// ../contract/src/application-update.ts
|
|
139
|
-
import { z as
|
|
140
|
-
var applicationUpdateStateSchema =
|
|
141
|
-
status:
|
|
142
|
-
supported:
|
|
143
|
-
targetVersion:
|
|
144
|
-
message:
|
|
145
|
-
});
|
|
146
|
-
var applicationUpdateInputSchema =
|
|
147
|
-
var applicationUpdateResponseSchema =
|
|
124
|
+
import { z as z3 } from "zod";
|
|
125
|
+
var applicationUpdateStateSchema = z3.object({
|
|
126
|
+
status: z3.enum(["idle", "preparing", "ready", "restarting", "error"]),
|
|
127
|
+
supported: z3.boolean(),
|
|
128
|
+
targetVersion: z3.string().optional(),
|
|
129
|
+
message: z3.string().optional()
|
|
130
|
+
});
|
|
131
|
+
var applicationUpdateInputSchema = z3.record(z3.string(), z3.never());
|
|
132
|
+
var applicationUpdateResponseSchema = z3.object({ state: applicationUpdateStateSchema });
|
|
148
133
|
|
|
149
134
|
// ../contract/src/health.ts
|
|
150
|
-
var runnerSchema =
|
|
151
|
-
var repoInfoSchema =
|
|
152
|
-
root:
|
|
153
|
-
branch:
|
|
154
|
-
remote:
|
|
155
|
-
});
|
|
156
|
-
var backendCheckSchema =
|
|
157
|
-
name:
|
|
158
|
-
available:
|
|
159
|
-
version:
|
|
160
|
-
hint:
|
|
161
|
-
});
|
|
162
|
-
var forgeInfoSchema =
|
|
163
|
-
kind:
|
|
135
|
+
var runnerSchema = z4.enum(["claude", "codex", "opencode", "pi", "cursor", "omp"]);
|
|
136
|
+
var repoInfoSchema = z4.object({
|
|
137
|
+
root: z4.string(),
|
|
138
|
+
branch: z4.string(),
|
|
139
|
+
remote: z4.string().optional()
|
|
140
|
+
});
|
|
141
|
+
var backendCheckSchema = z4.object({
|
|
142
|
+
name: z4.enum(["claude", "codex", "opencode", "pi", "cursor", "omp", "gh", "git"]),
|
|
143
|
+
available: z4.boolean(),
|
|
144
|
+
version: z4.string().optional(),
|
|
145
|
+
hint: z4.string().optional()
|
|
146
|
+
});
|
|
147
|
+
var forgeInfoSchema = z4.object({
|
|
148
|
+
kind: z4.literal("github"),
|
|
164
149
|
/**
|
|
165
150
|
* Whether the forge is reachable — **absent until the availability probe has warmed**.
|
|
166
151
|
*
|
|
@@ -168,12 +153,12 @@ var forgeInfoSchema = z5.object({
|
|
|
168
153
|
* "not determined yet", which is not the same as `false`, and the cockpit renders the two
|
|
169
154
|
* differently. Declaring it required is what made an earlier hand-written mirror wrong.
|
|
170
155
|
*/
|
|
171
|
-
available:
|
|
172
|
-
reason:
|
|
156
|
+
available: z4.boolean().optional(),
|
|
157
|
+
reason: z4.string().optional()
|
|
173
158
|
});
|
|
174
|
-
var capabilitiesSchema =
|
|
175
|
-
localHandoff:
|
|
176
|
-
singleProject:
|
|
159
|
+
var capabilitiesSchema = z4.object({
|
|
160
|
+
localHandoff: z4.boolean(),
|
|
161
|
+
singleProject: z4.boolean(),
|
|
177
162
|
/**
|
|
178
163
|
* `true` means `CEZ_AUTOMATIONS=1` opted this server into GitHub automations (#801). Off — the
|
|
179
164
|
* default — the whole feature is absent: no `Automations` nav item anywhere it is rendered, the
|
|
@@ -181,7 +166,7 @@ var capabilitiesSchema = z5.object({
|
|
|
181
166
|
*
|
|
182
167
|
* REQUIRED for the same reason as `tokenMetrics` below: this server always sends it.
|
|
183
168
|
*/
|
|
184
|
-
automations:
|
|
169
|
+
automations: z4.boolean(),
|
|
185
170
|
/**
|
|
186
171
|
* `true` means `CEZ_PREVIEW=1` opted this server into live preview (#781): the `cezar_preview_serve`
|
|
187
172
|
* tool is listed, its route answers, the preview WebSocket upgrades and the cockpit offers the
|
|
@@ -189,7 +174,7 @@ var capabilitiesSchema = z5.object({
|
|
|
189
174
|
*
|
|
190
175
|
* REQUIRED for the same reason as `tokenMetrics` below: this server always sends it.
|
|
191
176
|
*/
|
|
192
|
-
preview:
|
|
177
|
+
preview: z4.boolean(),
|
|
193
178
|
/**
|
|
194
179
|
* `true` means `CEZ_VOICE=1` opted this server into voice mode and a way to decide exists:
|
|
195
180
|
* `TYPESAFE_API_KEY` is set, or `CEZ_DRY_RUN=1` supplies the fake engine. Off — the default —
|
|
@@ -197,7 +182,7 @@ var capabilitiesSchema = z5.object({
|
|
|
197
182
|
*
|
|
198
183
|
* REQUIRED for the same reason as `tokenMetrics` below: this server always sends it.
|
|
199
184
|
*/
|
|
200
|
-
voice:
|
|
185
|
+
voice: z4.boolean(),
|
|
201
186
|
/**
|
|
202
187
|
* `false` means `CEZ_HIDE_TOKEN_METRICS=1` asks the browser to omit token counts and monetary
|
|
203
188
|
* cost (#481). The telemetry itself still rides in run/event payloads — this is presentation
|
|
@@ -210,30 +195,45 @@ var capabilitiesSchema = z5.object({
|
|
|
210
195
|
* `web/src/lib/token-metrics.ts`, whose `!== false` read still treats an absent field as
|
|
211
196
|
* visible.
|
|
212
197
|
*/
|
|
213
|
-
tokenMetrics:
|
|
198
|
+
tokenMetrics: z4.boolean(),
|
|
214
199
|
/** Current token-count presentation policy. Required on current servers;
|
|
215
200
|
* older payload tolerance belongs in the browser resolver. */
|
|
216
|
-
tokenUsageMetrics:
|
|
201
|
+
tokenUsageMetrics: z4.boolean(),
|
|
217
202
|
/** Current backend-reported-cost presentation policy. */
|
|
218
|
-
costMetrics:
|
|
203
|
+
costMetrics: z4.boolean()
|
|
219
204
|
});
|
|
220
|
-
var healthResponseSchema =
|
|
221
|
-
version:
|
|
222
|
-
latestVersion:
|
|
223
|
-
repoRoot:
|
|
205
|
+
var healthResponseSchema = z4.object({
|
|
206
|
+
version: z4.string(),
|
|
207
|
+
latestVersion: z4.string().optional(),
|
|
208
|
+
repoRoot: z4.string(),
|
|
224
209
|
repo: repoInfoSchema.nullable(),
|
|
225
|
-
checks:
|
|
210
|
+
checks: z4.array(backendCheckSchema),
|
|
226
211
|
defaultRunner: runnerSchema,
|
|
227
212
|
forge: forgeInfoSchema.nullable(),
|
|
228
213
|
capabilities: capabilitiesSchema,
|
|
229
214
|
// Always sent: `workspaceSummary()` returns both unconditionally, and an unreadable workspace
|
|
230
215
|
// degrades to `projects: []` rather than to an absent key. The hand-written DTO declared them
|
|
231
216
|
// optional, which was wider than the server has ever been.
|
|
232
|
-
projects:
|
|
233
|
-
bootProject:
|
|
217
|
+
projects: z4.array(z4.object({ id: z4.string(), name: z4.string() })),
|
|
218
|
+
bootProject: z4.string(),
|
|
234
219
|
applicationUpdate: applicationUpdateStateSchema.optional()
|
|
235
220
|
});
|
|
236
221
|
|
|
222
|
+
// ../contract/src/workspace.ts
|
|
223
|
+
import { z as z7 } from "zod";
|
|
224
|
+
|
|
225
|
+
// ../contract/src/effort.ts
|
|
226
|
+
import { z as z5 } from "zod";
|
|
227
|
+
var EFFORT_LEVELS = ["low", "medium", "high", "xhigh", "max"];
|
|
228
|
+
var effortLevelSchema = z5.enum(EFFORT_LEVELS);
|
|
229
|
+
var effortFieldSchema = z5.string().max(32).optional();
|
|
230
|
+
function parseEffort(value) {
|
|
231
|
+
const trimmed = value?.trim().toLowerCase();
|
|
232
|
+
if (!trimmed || trimmed === "auto") return void 0;
|
|
233
|
+
const parsed = effortLevelSchema.safeParse(trimmed);
|
|
234
|
+
return parsed.success ? parsed.data : void 0;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
237
|
// ../contract/src/team-skill-ref.ts
|
|
238
238
|
import { z as z6 } from "zod";
|
|
239
239
|
var teamSkillRefSchema = z6.object({ repo: z6.string().min(1).max(500), name: z6.string().min(1).max(200) }).strict();
|
|
@@ -596,16 +596,33 @@ var openProjectInResponseSchema = z7.object({
|
|
|
596
596
|
});
|
|
597
597
|
|
|
598
598
|
// ../contract/src/discovery.ts
|
|
599
|
-
var
|
|
599
|
+
var hostDiscoveryRequestSchema = z8.discriminatedUnion("kind", [
|
|
600
600
|
z8.object({ kind: z8.literal("runners") }).strict(),
|
|
601
601
|
z8.object({ kind: z8.literal("models"), runner: modelDiscoveryRunnerSchema }).strict()
|
|
602
602
|
]);
|
|
603
|
+
var discoveryRequestSchema = z8.discriminatedUnion("kind", [
|
|
604
|
+
...hostDiscoveryRequestSchema.options,
|
|
605
|
+
z8.object({ kind: z8.literal("tasks"), all: z8.boolean().optional(), offset: z8.number().int().min(0).max(Number.MAX_SAFE_INTEGER).optional() }).strict()
|
|
606
|
+
]);
|
|
603
607
|
var discoveredRunnerSchema = providerStatusSchema.omit({ provider: true, profileId: true }).extend({ runner: modelDiscoveryRunnerSchema });
|
|
604
608
|
var discoveredRunnersSchema = z8.object({
|
|
605
609
|
scope: z8.literal("host-default-account"),
|
|
606
610
|
runners: z8.array(discoveredRunnerSchema)
|
|
607
611
|
});
|
|
608
|
-
var
|
|
612
|
+
var discoveredTasksSchema = z8.object({
|
|
613
|
+
tasks: z8.array(z8.object({
|
|
614
|
+
id: z8.string(),
|
|
615
|
+
title: z8.string(),
|
|
616
|
+
runner: runnerSchema.optional(),
|
|
617
|
+
status: z8.enum(["queued", "running", "waiting", "review", "done", "failed", "cancelled"]),
|
|
618
|
+
attention: z8.enum(["permission", "error", "waiting", "running", "unseen", "none"]),
|
|
619
|
+
attentionLabel: z8.string(),
|
|
620
|
+
accepts: z8.boolean(),
|
|
621
|
+
reason: z8.string().optional()
|
|
622
|
+
})).max(32),
|
|
623
|
+
nextOffset: z8.number().int().nonnegative().optional()
|
|
624
|
+
});
|
|
625
|
+
var discoveryResponseSchema = z8.union([discoveredRunnersSchema, runnerModelCatalogResponseSchema, discoveredTasksSchema]);
|
|
609
626
|
var modelChoicesSchema = z8.object({
|
|
610
627
|
runner: modelDiscoveryRunnerSchema,
|
|
611
628
|
requestedModel: z8.string(),
|
|
@@ -5523,6 +5540,7 @@ export {
|
|
|
5523
5540
|
diffStatSchema,
|
|
5524
5541
|
discoveredRunnerSchema,
|
|
5525
5542
|
discoveredRunnersSchema,
|
|
5543
|
+
discoveredTasksSchema,
|
|
5526
5544
|
discoveryRequestSchema,
|
|
5527
5545
|
discoveryResponseSchema,
|
|
5528
5546
|
doneErrorCodeSchema,
|
|
@@ -5577,6 +5595,7 @@ export {
|
|
|
5577
5595
|
hasWorkerDeadline,
|
|
5578
5596
|
healthResponseSchema,
|
|
5579
5597
|
hm,
|
|
5598
|
+
hostDiscoveryRequestSchema,
|
|
5580
5599
|
humanAskClosedEventSchema,
|
|
5581
5600
|
humanInputDeliveredEventSchema,
|
|
5582
5601
|
humanWaitEntrySchema,
|
|
@@ -123,7 +123,7 @@ export declare function normalizeSidebarLimits(value: unknown): Required<Sidebar
|
|
|
123
123
|
/**
|
|
124
124
|
* `GET/PUT /api/v1/ui-state` — the per-repo GUI prefs in `.ai/cezar/ui-state.json`.
|
|
125
125
|
*
|
|
126
|
-
* An OPEN bag on purpose (BACKWARD_COMPATIBILITY.md
|
|
126
|
+
* An OPEN bag on purpose (BACKWARD_COMPATIBILITY.md): unknown keys round-trip untouched, so a
|
|
127
127
|
* newer cockpit's prefs survive an older server and a future pref needs no server change. Hence
|
|
128
128
|
* `z.looseObject`, not a closed object — the keys below are the ones the server's schema *names*,
|
|
129
129
|
* never the ones it *permits*. The write side caps the TOP-LEVEL key count at 200 (#429); that cap
|