@wjarka/cezarion 0.17.0-pr2017.3079 → 0.17.0-pr2017.3085

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 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 worker inbox` remain
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 worker send <recipient-run-id> 'Please check this decision' --id <message-UUID> --kind request
765
- cez worker send <worker-id> 'Correct the returned result' --id <new-message-UUID> --kind request --resume
766
- cez worker progress <recipient-run-id> 'Parser tests pass' --id <message-UUID>
767
- cez worker follow-up <recipient-run-id> 'Include empty input' --id <message-UUID> --request-id <request-UUID>
768
- cez worker reply <recipient-run-id> 'Checked; empty input is covered' --id <message-UUID> --request-id <request-UUID>
769
- cez worker conversation <recipient-run-id>
770
- cez worker wait --request <request-UUID> --request <another-request-UUID> --mode all
771
- cez worker wait-requests <request-UUID> --mode one
772
- cez worker cancel-request <request-UUID>
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 without `--resume` reports `not-delivered` and `continuation-required`, with the reason and next command; the CLI exits 1. An active parent can use `worker send --resume` (request or progress) 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; changing a rejected send to use `--resume` 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.
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
 
@@ -27,18 +27,6 @@ export declare function delegationFailure(error: unknown): {
27
27
  export declare function createDelegationRoutes(service: DelegationService, credentials: CredentialRegistry): import("hono/hono-base").HonoBase<Env, {
28
28
  "/list": {
29
29
  $get: {
30
- output: {
31
- error: string;
32
- code?: "invalid_input" | undefined;
33
- };
34
- outputFormat: "json";
35
- status: 400;
36
- input: {
37
- query: {
38
- offset?: string | undefined;
39
- };
40
- };
41
- } | {
42
30
  output: {
43
31
  workers: {
44
32
  workerId: string;
@@ -76,6 +64,18 @@ export declare function createDelegationRoutes(service: DelegationService, crede
76
64
  offset?: string | undefined;
77
65
  };
78
66
  };
67
+ } | {
68
+ output: {
69
+ error: string;
70
+ code?: "invalid_input" | undefined;
71
+ };
72
+ outputFormat: "json";
73
+ status: 400;
74
+ input: {
75
+ query: {
76
+ offset?: string | undefined;
77
+ };
78
+ };
79
79
  };
80
80
  };
81
81
  } & {
@@ -572,18 +572,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
572
572
  } & {
573
573
  "/:workerId": {
574
574
  $get: {
575
- output: {
576
- error: string;
577
- code?: "invalid_input" | undefined;
578
- };
579
- outputFormat: "json";
580
- status: 400;
581
- input: {
582
- param: {
583
- workerId: string;
584
- };
585
- };
586
- } | {
587
575
  output: {
588
576
  workerId: string;
589
577
  parentRunId: string;
@@ -687,11 +675,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
687
675
  workerId: string;
688
676
  };
689
677
  };
690
- };
691
- };
692
- } & {
693
- "/:workerId/collect": {
694
- $post: {
678
+ } | {
695
679
  output: {
696
680
  error: string;
697
681
  code?: "invalid_input" | undefined;
@@ -702,10 +686,12 @@ export declare function createDelegationRoutes(service: DelegationService, crede
702
686
  param: {
703
687
  workerId: string;
704
688
  };
705
- } & {
706
- json: Record<string, never>;
707
689
  };
708
- } | {
690
+ };
691
+ };
692
+ } & {
693
+ "/:workerId/collect": {
694
+ $post: {
709
695
  output: {
710
696
  workerId: string;
711
697
  parentRunId: string;
@@ -807,11 +793,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
807
793
  } & {
808
794
  json: Record<string, never>;
809
795
  };
810
- };
811
- };
812
- } & {
813
- "/:workerId/steer": {
814
- $post: {
796
+ } | {
815
797
  output: {
816
798
  error: string;
817
799
  code?: "invalid_input" | undefined;
@@ -823,11 +805,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
823
805
  workerId: string;
824
806
  };
825
807
  } & {
826
- json: {
827
- text: string;
828
- };
808
+ json: Record<string, never>;
829
809
  };
830
- } | {
810
+ };
811
+ };
812
+ } & {
813
+ "/:workerId/steer": {
814
+ $post: {
831
815
  output: {
832
816
  workerId: string;
833
817
  state: "delivered" | "queued";
@@ -843,11 +827,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
843
827
  text: string;
844
828
  };
845
829
  };
846
- };
847
- };
848
- } & {
849
- "/:workerId/stop": {
850
- $post: {
830
+ } | {
851
831
  output: {
852
832
  error: string;
853
833
  code?: "invalid_input" | undefined;
@@ -859,9 +839,15 @@ export declare function createDelegationRoutes(service: DelegationService, crede
859
839
  workerId: string;
860
840
  };
861
841
  } & {
862
- json: Record<string, never>;
842
+ json: {
843
+ text: string;
844
+ };
863
845
  };
864
- } | {
846
+ };
847
+ };
848
+ } & {
849
+ "/:workerId/stop": {
850
+ $post: {
865
851
  output: {
866
852
  workerId: string;
867
853
  state: "stopping" | "terminated";
@@ -875,11 +861,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
875
861
  } & {
876
862
  json: Record<string, never>;
877
863
  };
878
- };
879
- };
880
- } & {
881
- "/:workerId/destroy": {
882
- $post: {
864
+ } | {
883
865
  output: {
884
866
  error: string;
885
867
  code?: "invalid_input" | undefined;
@@ -893,7 +875,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
893
875
  } & {
894
876
  json: Record<string, never>;
895
877
  };
896
- } | {
878
+ };
879
+ };
880
+ } & {
881
+ "/:workerId/destroy": {
882
+ $post: {
897
883
  output: {
898
884
  workerId: string;
899
885
  state: "complete" | "incomplete";
@@ -916,6 +902,20 @@ export declare function createDelegationRoutes(service: DelegationService, crede
916
902
  } & {
917
903
  json: Record<string, never>;
918
904
  };
905
+ } | {
906
+ output: {
907
+ error: string;
908
+ code?: "invalid_input" | undefined;
909
+ };
910
+ outputFormat: "json";
911
+ status: 400;
912
+ input: {
913
+ param: {
914
+ workerId: string;
915
+ };
916
+ } & {
917
+ json: Record<string, never>;
918
+ };
919
919
  } | {
920
920
  output: {
921
921
  workerId: string;
@@ -945,11 +945,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
945
945
  "/:workerId/diff": {
946
946
  $get: {
947
947
  output: {
948
- error: string;
949
- code?: "invalid_input" | undefined;
948
+ workerId: string;
949
+ baselineSha: string;
950
+ diff: string;
951
+ truncated: boolean;
950
952
  };
951
953
  outputFormat: "json";
952
- status: 400;
954
+ status: 200;
953
955
  input: {
954
956
  param: {
955
957
  workerId: string;
@@ -957,13 +959,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
957
959
  };
958
960
  } | {
959
961
  output: {
960
- workerId: string;
961
- baselineSha: string;
962
- diff: string;
963
- truncated: boolean;
962
+ error: string;
963
+ code?: "invalid_input" | undefined;
964
964
  };
965
965
  outputFormat: "json";
966
- status: 200;
966
+ status: 400;
967
967
  input: {
968
968
  param: {
969
969
  workerId: string;
@@ -5,8 +5,10 @@ export function readPeerSummaryPage(db, options) {
5
5
  const selects = archives.map(archived => `SELECT seq, id, created_at, revision, summary FROM runs
6
6
  WHERE parent_run_id IS NULL AND archived = ${archived}
7
7
  AND id NOT IN (SELECT value FROM json_each(?))
8
- AND (json_extract(data, '$.delegation.role') IS NULL OR json_extract(data, '$.delegation.role') = 'root')
9
- AND json_extract(data, '$.delegation.historyDeletion') IS NULL`);
8
+ AND CASE WHEN json_valid(data) THEN
9
+ (json_extract(data, '$.delegation.role') IS NULL OR json_extract(data, '$.delegation.role') = 'root')
10
+ AND json_extract(data, '$.delegation.historyDeletion') IS NULL
11
+ ELSE 0 END`);
10
12
  const excluded = JSON.stringify(options.excluded);
11
13
  return db.prepare(`${selects.join(' UNION ALL ')} ORDER BY created_at DESC, seq LIMIT ? OFFSET ?`)
12
14
  .all(...archives.map(() => excluded), options.limit, options.offset).map(toSummaryRow);
@@ -1 +1 @@
1
- {"version":3,"file":"run-database-peer-page.js","sourceRoot":"","sources":["../../src/runs/run-database-peer-page.ts"],"names":[],"mappings":"AAKA;6FAC6F;AAC7F,MAAM,UAAU,mBAAmB,CAAC,EAAgB,EAAE,OAA6B;IACjF,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAA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/F,GAAG,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AAC3F,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,GAA4B;IACvD,OAAO;QACL,GAAG,EAAE,GAAG,CAAC,GAAa;QACtB,EAAE,EAAE,GAAG,CAAC,EAAY;QACpB,SAAS,EAAE,GAAG,CAAC,UAAoB;QACnC,QAAQ,EAAE,GAAG,CAAC,QAAkB;QAChC,OAAO,EAAE,GAAG,CAAC,OAAiB;KAC/B,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wjarka/cezarion",
3
- "version": "0.17.0-pr2017.3079",
3
+ "version": "0.17.0-pr2017.3085",
4
4
  "description": "Local cockpit for running and tracking AI agent tasks in your repo. Uses your logged-in `claude` CLI and `gh` — zero config, zero database.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -53,8 +53,8 @@
53
53
  "zod": "^4.4.3"
54
54
  },
55
55
  "devDependencies": {
56
- "@open-mercato/cezar-api-client": "0.17.0-pr2017.3079",
57
- "@open-mercato/cezar-contract": "0.17.0-pr2017.3079",
56
+ "@open-mercato/cezar-api-client": "0.17.0-pr2017.3085",
57
+ "@open-mercato/cezar-contract": "0.17.0-pr2017.3085",
58
58
  "@types/node": "^24.19.1",
59
59
  "@types/ws": "^8.18.1",
60
60
  "esbuild": "^0.28.1",