@wjarka/cezarion 0.17.0-pr2460.3739 → 0.17.0-pr2464.3752
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/dist/ci-wait/controller.d.ts +51 -51
- package/dist/ci-wait/tools.d.ts +9 -9
- package/dist/contract/attention.d.ts +3 -2
- package/dist/contract/index.js +47 -3
- package/dist/contract/runs.d.ts +255 -0
- package/dist/contract/waits.d.ts +137 -1
- package/dist/core/claude-cli-runner.js +13 -5
- package/dist/core/claude-cli-runner.js.map +1 -1
- package/dist/core/claude-stream.d.ts +7 -0
- package/dist/core/claude-stream.js +9 -0
- package/dist/core/claude-stream.js.map +1 -1
- package/dist/core/claude-ui-mapper.d.ts +7 -0
- package/dist/core/claude-ui-mapper.js +122 -28
- package/dist/core/claude-ui-mapper.js.map +1 -1
- package/dist/core/codex-ui-mapper.d.ts +5 -1
- package/dist/core/codex-ui-mapper.js +37 -12
- package/dist/core/codex-ui-mapper.js.map +1 -1
- package/dist/core/ui-events.d.ts +7 -0
- package/dist/delegation/conversations.d.ts +100 -24
- package/dist/delegation/transport.d.ts +4 -4
- package/dist/handoff.d.ts +5 -2
- package/dist/handoff.js +9 -3
- package/dist/handoff.js.map +1 -1
- package/dist/runs/outcome-commit.d.ts +4 -1
- package/dist/runs/outcome-commit.js +2 -1
- package/dist/runs/outcome-commit.js.map +1 -1
- package/dist/runs/store.d.ts +130 -12
- package/dist/server/server.d.ts +958 -256
- package/dist/workflows/active-run.d.ts +16 -0
- package/dist/workflows/active-run.js +13 -0
- package/dist/workflows/active-run.js.map +1 -1
- package/dist/workflows/continuation-admission.d.ts +50 -12
- package/dist/workflows/input-acknowledgement.d.ts +25 -6
- package/dist/workflows/run/compose.d.ts +7 -0
- package/dist/workflows/run/compose.js +12 -1
- package/dist/workflows/run/compose.js.map +1 -1
- package/dist/workflows/run/continuation-session.js +1 -1
- package/dist/workflows/run/continuation-session.js.map +1 -1
- package/dist/workflows/run/human-waits.d.ts +1 -1
- package/dist/workflows/run/input-delivery.d.ts +1 -1
- package/dist/workflows/run/input-delivery.js +6 -3
- package/dist/workflows/run/input-delivery.js.map +1 -1
- package/dist/workflows/run/session-events.d.ts +6 -0
- package/dist/workflows/run/session-events.js +7 -2
- package/dist/workflows/run/session-events.js.map +1 -1
- package/dist/workflows/run/step-session.js +1 -1
- package/dist/workflows/run/step-session.js.map +1 -1
- package/dist/workflows/run/subagent-waits.d.ts +120 -0
- package/dist/workflows/run/subagent-waits.js +313 -0
- package/dist/workflows/run/subagent-waits.js.map +1 -0
- package/dist/workflows/run/turn-settler.d.ts +4 -1
- package/dist/workflows/run/turn-settler.js +15 -3
- package/dist/workflows/run/turn-settler.js.map +1 -1
- package/dist/workflows/run/wait-registry.d.ts +4 -4
- package/dist/workflows/run/wait-registry.js +5 -4
- package/dist/workflows/run/wait-registry.js.map +1 -1
- package/dist/workflows/run/wait-watches.d.ts +59 -17
- package/dist/workflows/run/wait-watches.js +11 -1
- package/dist/workflows/run/wait-watches.js.map +1 -1
- package/dist/workflows/run/wake-admission.d.ts +1 -1
- package/dist/workflows/run/wake-admission.js +24 -4
- package/dist/workflows/run/wake-admission.js.map +1 -1
- package/dist/workflows/run-scheduling.js +4 -2
- package/dist/workflows/run-scheduling.js.map +1 -1
- package/dist/workflows/run-states.d.ts +3 -2
- package/dist/workflows/run-states.js +23 -7
- package/dist/workflows/run-states.js.map +1 -1
- package/dist/workflows/run.d.ts +2 -0
- package/dist/workflows/run.js +4 -0
- package/dist/workflows/run.js.map +1 -1
- package/dist/workflows/waits.d.ts +12 -8
- package/dist/workflows/waits.js +40 -6
- package/dist/workflows/waits.js.map +1 -1
- package/package.json +3 -3
- package/scripts/mock-claude-subagents.mjs +54 -0
- package/scripts/mock-claude.mjs +1 -1
- package/scripts/mock-codex-app-server.mjs +1 -0
- package/scripts/mock-codex-subagents.mjs +52 -0
- package/web/dist/assets/{agent-accounts-D21x5S_t.js → agent-accounts-DarYJJy4.js} +1 -1
- package/web/dist/assets/{centered-state-B0jAC4E2.js → centered-state-BHbD4n0m.js} +1 -1
- package/web/dist/assets/{commit-diff-panel-Bm_nec25.js → commit-diff-panel-e0V8oxWo.js} +1 -1
- package/web/dist/assets/design-icons-B2t_Qai2.js +4 -0
- package/web/dist/assets/{diff-BmTQotWi2.js → diff-BIt_vrv22.js} +2 -2
- package/web/dist/assets/{diff-controls-DE_Rytm-.js → diff-controls-BITrfFXb.js} +1 -1
- package/web/dist/assets/{diff-view-BzmqRF1e.js → diff-view-C0ZvX-pE.js} +1 -1
- package/web/dist/assets/{dropdown-menu-DCgViIbl.js → dropdown-menu-pO-CmL_Y.js} +1 -1
- package/web/dist/assets/{file-preview-fkDVNMmy.js → file-preview-UXDutXV_.js} +1 -1
- package/web/dist/assets/{git-toolbar-nX9_zQWm.js → git-toolbar-Ba825v5S.js} +1 -1
- package/web/dist/assets/{github-DH-Zj35j.js → github-ehCOQkjv.js} +1 -1
- package/web/dist/assets/{github-sidebar-model-BorJiysD.js → github-sidebar-model-Db4IwMQk.js} +1 -1
- package/web/dist/assets/{index-DeRwy_63.js → index-DvRAjxqk.js} +5 -5
- package/web/dist/assets/{popover-CzbPkN9f.js → popover-BhPFvh7R.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-B7qjCG0E.js → preview-pane-connected-hKY_70Sp.js} +1 -1
- package/web/dist/assets/{reference-chip-DTeuBtmJ.js → reference-chip-CNm9FX6y.js} +1 -1
- package/web/dist/assets/{repo-git-s4C0y-Z4.js → repo-git-CCtHhKo3.js} +1 -1
- package/web/dist/assets/{report-reader-Cw67ud07.js → report-reader-jK5ou3C_.js} +1 -1
- package/web/dist/assets/{run-header-oJ-nWvFD.js → run-header-BH9ooOie.js} +1 -1
- package/web/dist/assets/{skills-Czy9cM5e.js → skills-3lpV9ocM.js} +1 -1
- package/web/dist/assets/{status-dot-DoH5IYEP.js → status-dot-Dp5YkE4V.js} +1 -1
- package/web/dist/assets/{tab-link-CWEgkVfS.js → tab-link-BnnIrU1K.js} +1 -1
- package/web/dist/assets/{task-changes-B1WSTgO0.js → task-changes-ClN16NBc.js} +1 -1
- package/web/dist/assets/{task-commits-Ch5vwGfF.js → task-commits-D7QjrKa9.js} +1 -1
- package/web/dist/assets/{task-files-Khh6RUT0.js → task-files-rWWRRVe7.js} +1 -1
- package/web/dist/assets/{task-github-item-DcwsmAHv.js → task-github-item-QoVszyvF.js} +1 -1
- package/web/dist/assets/{task-thread-F7kFDiI0.js → task-thread-Dv-mABhS.js} +3 -3
- package/web/dist/assets/{textarea-CoZX9hkA.js → textarea-ChFjENaE.js} +1 -1
- package/web/dist/assets/{thread-state-Cl-TBD4L.js → thread-state-CnkJU-vV.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-BHZLyuyI.js → use-hand-to-agent-state-DbkKSAHr.js} +1 -1
- package/web/dist/assets/{workflows-DpRExlTO.js → workflows-O_4d5IR4.js} +1 -1
- package/web/dist/index.html +10 -10
- package/web/dist/assets/design-icons-BUpItAUD.js +0 -4
|
@@ -94,11 +94,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
94
94
|
"/api/v1/tools/wait": {
|
|
95
95
|
$post: {
|
|
96
96
|
output: {
|
|
97
|
-
|
|
97
|
+
ok: false;
|
|
98
|
+
code: "authentication" | "capability_revoked" | "capacity" | "command_failed" | "finish_requested" | "generation_mismatch" | "gh_missing" | "inaccessible_pr" | "invalid_request" | "malformed_data" | "manager_disposed" | "output_limit" | "persistence" | "query_timeout" | "registration_aborted" | "root_finish_pending" | "run_cancelled" | "run_missing" | "run_not_running" | "run_stopping" | "session_closed" | "session_replaced" | "turn_changed" | "unauthorized" | "unavailable" | "unsupported_host" | "wait_conflict" | "worker_execution_stopped" | "worker_wait_pending";
|
|
98
99
|
message: string;
|
|
99
100
|
};
|
|
100
101
|
outputFormat: "json";
|
|
101
|
-
status:
|
|
102
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
102
103
|
input: {
|
|
103
104
|
json: {
|
|
104
105
|
pr: string;
|
|
@@ -134,12 +135,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
134
135
|
};
|
|
135
136
|
} | {
|
|
136
137
|
output: {
|
|
137
|
-
|
|
138
|
-
code: "authentication" | "capability_revoked" | "capacity" | "command_failed" | "finish_requested" | "generation_mismatch" | "gh_missing" | "inaccessible_pr" | "invalid_request" | "malformed_data" | "manager_disposed" | "output_limit" | "persistence" | "query_timeout" | "registration_aborted" | "root_finish_pending" | "run_cancelled" | "run_missing" | "run_not_running" | "run_stopping" | "session_closed" | "session_replaced" | "turn_changed" | "unauthorized" | "unavailable" | "unsupported_host" | "wait_conflict" | "worker_execution_stopped" | "worker_wait_pending";
|
|
138
|
+
code: 'capability_revoked';
|
|
139
139
|
message: string;
|
|
140
140
|
};
|
|
141
141
|
outputFormat: "json";
|
|
142
|
-
status:
|
|
142
|
+
status: 401;
|
|
143
143
|
input: {
|
|
144
144
|
json: {
|
|
145
145
|
pr: string;
|
|
@@ -182,7 +182,7 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
182
182
|
open_waits: ({
|
|
183
183
|
wait_id: string;
|
|
184
184
|
summary: string;
|
|
185
|
-
kind: "peer" | "pr" | "process" | "timer" | "worker";
|
|
185
|
+
kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
186
186
|
deadline: string;
|
|
187
187
|
} | {
|
|
188
188
|
wait_id: string;
|
|
@@ -196,7 +196,7 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
196
196
|
open_waits?: ({
|
|
197
197
|
wait_id: string;
|
|
198
198
|
summary: string;
|
|
199
|
-
kind: "peer" | "pr" | "process" | "timer" | "worker";
|
|
199
|
+
kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
200
200
|
deadline: string;
|
|
201
201
|
} | {
|
|
202
202
|
wait_id: string;
|
|
@@ -245,11 +245,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
245
245
|
"/api/v1/tools/ask": {
|
|
246
246
|
$post: {
|
|
247
247
|
output: {
|
|
248
|
-
|
|
248
|
+
ok: false;
|
|
249
|
+
code: 'unavailable';
|
|
249
250
|
message: string;
|
|
250
251
|
};
|
|
251
252
|
outputFormat: "json";
|
|
252
|
-
status:
|
|
253
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
253
254
|
input: {
|
|
254
255
|
json: {
|
|
255
256
|
questions: {
|
|
@@ -267,12 +268,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
267
268
|
};
|
|
268
269
|
} | {
|
|
269
270
|
output: {
|
|
270
|
-
|
|
271
|
-
code: 'unavailable';
|
|
271
|
+
code: 'capability_revoked';
|
|
272
272
|
message: string;
|
|
273
273
|
};
|
|
274
274
|
outputFormat: "json";
|
|
275
|
-
status:
|
|
275
|
+
status: 401;
|
|
276
276
|
input: {
|
|
277
277
|
json: {
|
|
278
278
|
questions: {
|
|
@@ -295,7 +295,7 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
295
295
|
open_waits: ({
|
|
296
296
|
wait_id: string;
|
|
297
297
|
summary: string;
|
|
298
|
-
kind: "peer" | "pr" | "process" | "timer" | "worker";
|
|
298
|
+
kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
299
299
|
deadline: string;
|
|
300
300
|
} | {
|
|
301
301
|
wait_id: string;
|
|
@@ -309,7 +309,7 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
309
309
|
open_waits?: ({
|
|
310
310
|
wait_id: string;
|
|
311
311
|
summary: string;
|
|
312
|
-
kind: "peer" | "pr" | "process" | "timer" | "worker";
|
|
312
|
+
kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
313
313
|
deadline: string;
|
|
314
314
|
} | {
|
|
315
315
|
wait_id: string;
|
|
@@ -340,11 +340,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
340
340
|
"/api/v1/tools/cancel-wait": {
|
|
341
341
|
$post: {
|
|
342
342
|
output: {
|
|
343
|
-
|
|
343
|
+
cancelled: false;
|
|
344
|
+
code: 'unavailable';
|
|
344
345
|
message: string;
|
|
345
346
|
};
|
|
346
347
|
outputFormat: "json";
|
|
347
|
-
status:
|
|
348
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
348
349
|
input: {
|
|
349
350
|
json: {
|
|
350
351
|
wait_id: string;
|
|
@@ -352,12 +353,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
352
353
|
};
|
|
353
354
|
} | {
|
|
354
355
|
output: {
|
|
355
|
-
|
|
356
|
-
code: 'unavailable';
|
|
356
|
+
code: 'capability_revoked';
|
|
357
357
|
message: string;
|
|
358
358
|
};
|
|
359
359
|
outputFormat: "json";
|
|
360
|
-
status:
|
|
360
|
+
status: 401;
|
|
361
361
|
input: {
|
|
362
362
|
json: {
|
|
363
363
|
wait_id: string;
|
|
@@ -370,7 +370,7 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
370
370
|
open_waits: ({
|
|
371
371
|
wait_id: string;
|
|
372
372
|
summary: string;
|
|
373
|
-
kind: "peer" | "pr" | "process" | "timer" | "worker";
|
|
373
|
+
kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
374
374
|
deadline: string;
|
|
375
375
|
} | {
|
|
376
376
|
wait_id: string;
|
|
@@ -384,7 +384,7 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
384
384
|
open_waits?: ({
|
|
385
385
|
wait_id: string;
|
|
386
386
|
summary: string;
|
|
387
|
-
kind: "peer" | "pr" | "process" | "timer" | "worker";
|
|
387
|
+
kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
388
388
|
deadline: string;
|
|
389
389
|
} | {
|
|
390
390
|
wait_id: string;
|
|
@@ -405,11 +405,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
405
405
|
"/api/v1/tools/done": {
|
|
406
406
|
$post: {
|
|
407
407
|
output: {
|
|
408
|
-
|
|
408
|
+
ok: false;
|
|
409
|
+
code: 'unavailable';
|
|
409
410
|
message: string;
|
|
410
411
|
};
|
|
411
412
|
outputFormat: "json";
|
|
412
|
-
status:
|
|
413
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
413
414
|
input: {
|
|
414
415
|
json: {
|
|
415
416
|
summary?: string | undefined;
|
|
@@ -417,12 +418,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
417
418
|
};
|
|
418
419
|
} | {
|
|
419
420
|
output: {
|
|
420
|
-
|
|
421
|
-
code: 'unavailable';
|
|
421
|
+
code: 'capability_revoked';
|
|
422
422
|
message: string;
|
|
423
423
|
};
|
|
424
424
|
outputFormat: "json";
|
|
425
|
-
status:
|
|
425
|
+
status: 401;
|
|
426
426
|
input: {
|
|
427
427
|
json: {
|
|
428
428
|
summary?: string | undefined;
|
|
@@ -435,7 +435,7 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
435
435
|
open_waits: ({
|
|
436
436
|
wait_id: string;
|
|
437
437
|
summary: string;
|
|
438
|
-
kind: "peer" | "pr" | "process" | "timer" | "worker";
|
|
438
|
+
kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
439
439
|
deadline: string;
|
|
440
440
|
} | {
|
|
441
441
|
wait_id: string;
|
|
@@ -449,7 +449,7 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
449
449
|
open_waits: ({
|
|
450
450
|
wait_id: string;
|
|
451
451
|
summary: string;
|
|
452
|
-
kind: "peer" | "pr" | "process" | "timer" | "worker";
|
|
452
|
+
kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
453
453
|
deadline: string;
|
|
454
454
|
} | {
|
|
455
455
|
wait_id: string;
|
|
@@ -469,7 +469,7 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
469
469
|
open_waits?: ({
|
|
470
470
|
wait_id: string;
|
|
471
471
|
summary: string;
|
|
472
|
-
kind: "peer" | "pr" | "process" | "timer" | "worker";
|
|
472
|
+
kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
473
473
|
deadline: string;
|
|
474
474
|
} | {
|
|
475
475
|
wait_id: string;
|
|
@@ -490,11 +490,13 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
490
490
|
"/api/v1/tools/preview-stop": {
|
|
491
491
|
$post: {
|
|
492
492
|
output: {
|
|
493
|
-
|
|
493
|
+
ok: boolean;
|
|
494
|
+
code: "adopted" | "approval_required" | "headless" | "invalid_input" | "not_registered" | "port_held" | "port_in_use" | "preview_disabled" | "restarted" | "stopped" | "unavailable" | "worktree_missing";
|
|
494
495
|
message: string;
|
|
496
|
+
hint: string;
|
|
495
497
|
};
|
|
496
498
|
outputFormat: "json";
|
|
497
|
-
status:
|
|
499
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
498
500
|
input: {
|
|
499
501
|
json: {
|
|
500
502
|
port: number;
|
|
@@ -503,13 +505,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
503
505
|
};
|
|
504
506
|
} | {
|
|
505
507
|
output: {
|
|
506
|
-
|
|
507
|
-
code: "adopted" | "approval_required" | "headless" | "invalid_input" | "not_registered" | "port_held" | "port_in_use" | "preview_disabled" | "restarted" | "stopped" | "unavailable" | "worktree_missing";
|
|
508
|
+
code: 'capability_revoked';
|
|
508
509
|
message: string;
|
|
509
|
-
hint: string;
|
|
510
510
|
};
|
|
511
511
|
outputFormat: "json";
|
|
512
|
-
status:
|
|
512
|
+
status: 401;
|
|
513
513
|
input: {
|
|
514
514
|
json: {
|
|
515
515
|
port: number;
|
|
@@ -522,11 +522,13 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
522
522
|
"/api/v1/tools/preview-serve": {
|
|
523
523
|
$post: {
|
|
524
524
|
output: {
|
|
525
|
-
|
|
525
|
+
ok: boolean;
|
|
526
|
+
code: "cezar_port" | "cwd_outside_worktree" | "headless" | "invalid_input" | "port_held" | "preview_disabled" | "registered" | "replaced" | "too_many" | "unavailable" | "worktree_missing";
|
|
526
527
|
message: string;
|
|
528
|
+
hint: string;
|
|
527
529
|
};
|
|
528
530
|
outputFormat: "json";
|
|
529
|
-
status:
|
|
531
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
530
532
|
input: {
|
|
531
533
|
json: {
|
|
532
534
|
command: string;
|
|
@@ -538,13 +540,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
538
540
|
};
|
|
539
541
|
} | {
|
|
540
542
|
output: {
|
|
541
|
-
|
|
542
|
-
code: "cezar_port" | "cwd_outside_worktree" | "headless" | "invalid_input" | "port_held" | "preview_disabled" | "registered" | "replaced" | "too_many" | "unavailable" | "worktree_missing";
|
|
543
|
+
code: 'capability_revoked';
|
|
543
544
|
message: string;
|
|
544
|
-
hint: string;
|
|
545
545
|
};
|
|
546
546
|
outputFormat: "json";
|
|
547
|
-
status:
|
|
547
|
+
status: 401;
|
|
548
548
|
input: {
|
|
549
549
|
json: {
|
|
550
550
|
command: string;
|
|
@@ -560,11 +560,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
560
560
|
"/api/v1/tools/schedule-task": {
|
|
561
561
|
$post: {
|
|
562
562
|
output: {
|
|
563
|
-
|
|
563
|
+
ok: false;
|
|
564
|
+
code: import('../contract/index.js').ScheduledTaskRefusalCode;
|
|
564
565
|
message: string;
|
|
565
566
|
};
|
|
566
567
|
outputFormat: "json";
|
|
567
|
-
status:
|
|
568
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
568
569
|
input: {
|
|
569
570
|
json: {
|
|
570
571
|
at?: string | undefined;
|
|
@@ -582,12 +583,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
582
583
|
};
|
|
583
584
|
} | {
|
|
584
585
|
output: {
|
|
585
|
-
|
|
586
|
-
code: import('../contract/index.js').ScheduledTaskRefusalCode;
|
|
586
|
+
code: 'capability_revoked';
|
|
587
587
|
message: string;
|
|
588
588
|
};
|
|
589
589
|
outputFormat: "json";
|
|
590
|
-
status:
|
|
590
|
+
status: 401;
|
|
591
591
|
input: {
|
|
592
592
|
json: {
|
|
593
593
|
at?: string | undefined;
|
|
@@ -646,11 +646,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
646
646
|
"/api/v1/tools/scheduled-tasks": {
|
|
647
647
|
$post: {
|
|
648
648
|
output: {
|
|
649
|
-
|
|
649
|
+
ok: false;
|
|
650
|
+
code: import('../contract/index.js').ScheduledTaskRefusalCode;
|
|
650
651
|
message: string;
|
|
651
652
|
};
|
|
652
653
|
outputFormat: "json";
|
|
653
|
-
status:
|
|
654
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
654
655
|
input: {
|
|
655
656
|
json: {
|
|
656
657
|
at?: string | undefined;
|
|
@@ -684,12 +685,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
684
685
|
};
|
|
685
686
|
} | {
|
|
686
687
|
output: {
|
|
687
|
-
|
|
688
|
-
code: import('../contract/index.js').ScheduledTaskRefusalCode;
|
|
688
|
+
code: 'capability_revoked';
|
|
689
689
|
message: string;
|
|
690
690
|
};
|
|
691
691
|
outputFormat: "json";
|
|
692
|
-
status:
|
|
692
|
+
status: 401;
|
|
693
693
|
input: {
|
|
694
694
|
json: {
|
|
695
695
|
at?: string | undefined;
|
package/dist/ci-wait/tools.d.ts
CHANGED
|
@@ -187,7 +187,7 @@ export declare function invokeAskTool(input: unknown): Promise<{
|
|
|
187
187
|
open_waits: ({
|
|
188
188
|
wait_id: string;
|
|
189
189
|
summary: string;
|
|
190
|
-
kind: "peer" | "pr" | "process" | "timer" | "worker";
|
|
190
|
+
kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
191
191
|
deadline: string;
|
|
192
192
|
} | {
|
|
193
193
|
wait_id: string;
|
|
@@ -201,7 +201,7 @@ export declare function invokeAskTool(input: unknown): Promise<{
|
|
|
201
201
|
open_waits?: ({
|
|
202
202
|
wait_id: string;
|
|
203
203
|
summary: string;
|
|
204
|
-
kind: "peer" | "pr" | "process" | "timer" | "worker";
|
|
204
|
+
kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
205
205
|
deadline: string;
|
|
206
206
|
} | {
|
|
207
207
|
wait_id: string;
|
|
@@ -295,7 +295,7 @@ export declare function invokeWaitTool(input: unknown): Promise<{
|
|
|
295
295
|
open_waits: ({
|
|
296
296
|
wait_id: string;
|
|
297
297
|
summary: string;
|
|
298
|
-
kind: "peer" | "pr" | "process" | "timer" | "worker";
|
|
298
|
+
kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
299
299
|
deadline: string;
|
|
300
300
|
} | {
|
|
301
301
|
wait_id: string;
|
|
@@ -309,7 +309,7 @@ export declare function invokeWaitTool(input: unknown): Promise<{
|
|
|
309
309
|
open_waits?: ({
|
|
310
310
|
wait_id: string;
|
|
311
311
|
summary: string;
|
|
312
|
-
kind: "peer" | "pr" | "process" | "timer" | "worker";
|
|
312
|
+
kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
313
313
|
deadline: string;
|
|
314
314
|
} | {
|
|
315
315
|
wait_id: string;
|
|
@@ -330,7 +330,7 @@ export declare function invokeCancelWaitTool(input: unknown): Promise<{
|
|
|
330
330
|
open_waits: ({
|
|
331
331
|
wait_id: string;
|
|
332
332
|
summary: string;
|
|
333
|
-
kind: "peer" | "pr" | "process" | "timer" | "worker";
|
|
333
|
+
kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
334
334
|
deadline: string;
|
|
335
335
|
} | {
|
|
336
336
|
wait_id: string;
|
|
@@ -344,7 +344,7 @@ export declare function invokeCancelWaitTool(input: unknown): Promise<{
|
|
|
344
344
|
open_waits?: ({
|
|
345
345
|
wait_id: string;
|
|
346
346
|
summary: string;
|
|
347
|
-
kind: "peer" | "pr" | "process" | "timer" | "worker";
|
|
347
|
+
kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
348
348
|
deadline: string;
|
|
349
349
|
} | {
|
|
350
350
|
wait_id: string;
|
|
@@ -437,7 +437,7 @@ export declare function invokeDoneTool(input: unknown): Promise<{
|
|
|
437
437
|
open_waits: ({
|
|
438
438
|
wait_id: string;
|
|
439
439
|
summary: string;
|
|
440
|
-
kind: "peer" | "pr" | "process" | "timer" | "worker";
|
|
440
|
+
kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
441
441
|
deadline: string;
|
|
442
442
|
} | {
|
|
443
443
|
wait_id: string;
|
|
@@ -451,7 +451,7 @@ export declare function invokeDoneTool(input: unknown): Promise<{
|
|
|
451
451
|
open_waits: ({
|
|
452
452
|
wait_id: string;
|
|
453
453
|
summary: string;
|
|
454
|
-
kind: "peer" | "pr" | "process" | "timer" | "worker";
|
|
454
|
+
kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
455
455
|
deadline: string;
|
|
456
456
|
} | {
|
|
457
457
|
wait_id: string;
|
|
@@ -471,7 +471,7 @@ export declare function invokeDoneTool(input: unknown): Promise<{
|
|
|
471
471
|
open_waits?: ({
|
|
472
472
|
wait_id: string;
|
|
473
473
|
summary: string;
|
|
474
|
-
kind: "peer" | "pr" | "process" | "timer" | "worker";
|
|
474
|
+
kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
475
475
|
deadline: string;
|
|
476
476
|
} | {
|
|
477
477
|
wait_id: string;
|
|
@@ -38,9 +38,10 @@ export type AttentionShape = 'filled' | 'ring' | 'workers';
|
|
|
38
38
|
* order (hearsay-tools/cezarion#1496). A rung's label is copy and can carry a count; a reader that
|
|
39
39
|
* decides something reads the id. Rung 8 has an id per PR target (merge since
|
|
40
40
|
* hearsay-tools/cezarion#1425) and the process rung sits between CI and timer
|
|
41
|
-
* (hearsay-tools/cezarion#1446).
|
|
41
|
+
* (hearsay-tools/cezarion#1446). Native subagents a turn left running sit right after workers
|
|
42
|
+
* (hearsay-tools/cezarion#2431). `unseen` is reserved: `isUnseen` never matches.
|
|
42
43
|
*/
|
|
43
|
-
export declare const ATTENTION_RUNGS: readonly ['needs-permission', 'failed', 'needs-you', 'needs-review', 'running', 'usage-limit', 'waiting-on-workers', 'waiting-for-ci', 'waiting-for-merge', 'waiting-for-command', 'monitoring', 'waiting-for-capacity', 'queued', 'done', 'cancelled', 'unseen'];
|
|
44
|
+
export declare const ATTENTION_RUNGS: readonly ['needs-permission', 'failed', 'needs-you', 'needs-review', 'running', 'usage-limit', 'waiting-on-workers', 'waiting-on-subagents', 'waiting-for-ci', 'waiting-for-merge', 'waiting-for-command', 'monitoring', 'waiting-for-capacity', 'queued', 'done', 'cancelled', 'unseen'];
|
|
44
45
|
export type AttentionRung = (typeof ATTENTION_RUNGS)[number];
|
|
45
46
|
export interface Attention {
|
|
46
47
|
/** Which rung the run is on: what a reader compares, never `label`. */
|
package/dist/contract/index.js
CHANGED
|
@@ -1869,6 +1869,9 @@ var PROCESS_TIMEOUT_MAX_SECONDS = 7200;
|
|
|
1869
1869
|
var PROCESS_EXIT_FILE_MAX = 4096;
|
|
1870
1870
|
var PEER_WAIT_DEFAULT_SECONDS = 600;
|
|
1871
1871
|
var PEER_WAIT_MAX_SECONDS = 1800;
|
|
1872
|
+
var SUBAGENT_WAIT_DEADLINE_SECONDS = 1800;
|
|
1873
|
+
var SUBAGENT_WAIT_GRACE_SECONDS = 15;
|
|
1874
|
+
var SUBAGENT_WAIT_CHILD_LIMIT = 32;
|
|
1872
1875
|
var pidSchema = z16.number().int().min(2);
|
|
1873
1876
|
var waitPhaseSchema = z16.enum(["open", "resolved", "delivered", "cancelled"]);
|
|
1874
1877
|
var waitViaSchema = z16.enum([
|
|
@@ -1884,7 +1887,8 @@ var waitViaSchema = z16.enum([
|
|
|
1884
1887
|
"budget",
|
|
1885
1888
|
"cez-worker-wait",
|
|
1886
1889
|
"completion",
|
|
1887
|
-
"cez-message-wait"
|
|
1890
|
+
"cez-message-wait",
|
|
1891
|
+
"native-subagents"
|
|
1888
1892
|
]);
|
|
1889
1893
|
var waitBaseShape = {
|
|
1890
1894
|
id: z16.uuid(),
|
|
@@ -1994,7 +1998,24 @@ var peerWaitEntrySchema = z16.object({
|
|
|
1994
1998
|
function peerWaitView(entry) {
|
|
1995
1999
|
return { id: entry.id, peerIds: entry.peerIds, deadline: entry.deadline, phase: entry.phase, ...entry.result ? { result: entry.result } : {} };
|
|
1996
2000
|
}
|
|
1997
|
-
var
|
|
2001
|
+
var subagentChildSchema = z16.object({
|
|
2002
|
+
id: z16.string().min(1).max(256),
|
|
2003
|
+
status: z16.enum(["running", "completed", "failed", "cancelled"])
|
|
2004
|
+
}).strict();
|
|
2005
|
+
var subagentWaitResultSchema = z16.object({ reason: z16.enum(["settled", "timeout", "interrupted", "superseded"]) }).strict();
|
|
2006
|
+
var subagentWaitEntrySchema = z16.object({
|
|
2007
|
+
...waitBaseShape,
|
|
2008
|
+
kind: z16.literal("subagent"),
|
|
2009
|
+
source: z16.literal("cezar"),
|
|
2010
|
+
via: z16.literal("native-subagents"),
|
|
2011
|
+
deadline: z16.iso.datetime(),
|
|
2012
|
+
children: z16.array(subagentChildSchema).min(1).max(SUBAGENT_WAIT_CHILD_LIMIT),
|
|
2013
|
+
result: subagentWaitResultSchema.optional()
|
|
2014
|
+
}).strict();
|
|
2015
|
+
function runningSubagents(wait) {
|
|
2016
|
+
return wait.children.filter((child) => child.status === "running").length;
|
|
2017
|
+
}
|
|
2018
|
+
var waitSchema = z16.discriminatedUnion("kind", [prWaitEntrySchema, timerWaitEntrySchema, humanWaitEntrySchema, workerWaitEntrySchema, processWaitEntrySchema, peerWaitEntrySchema, subagentWaitEntrySchema]);
|
|
1998
2019
|
var oneModeTakesOneId = (ids, mode, ctx) => {
|
|
1999
2020
|
if (mode === "one" && ids.length !== 1) ctx.addIssue({ code: "custom", message: "one mode requires exactly one id", path: ["mode"] });
|
|
2000
2021
|
};
|
|
@@ -2034,7 +2055,7 @@ var cezarWaitRequestSchema = z16.discriminatedUnion("kind", [
|
|
|
2034
2055
|
var cezarCancelWaitRequestSchema = z16.object({ wait_id: z16.uuid() }).strict();
|
|
2035
2056
|
var openWaitFields = { wait_id: z16.uuid(), summary: z16.string().max(256) };
|
|
2036
2057
|
var openWaitSchema = z16.discriminatedUnion("kind", [
|
|
2037
|
-
z16.object({ ...openWaitFields, kind: z16.enum(["pr", "timer", "worker", "process", "peer"]), deadline: z16.iso.datetime() }).strict(),
|
|
2058
|
+
z16.object({ ...openWaitFields, kind: z16.enum(["pr", "timer", "worker", "process", "peer", "subagent"]), deadline: z16.iso.datetime() }).strict(),
|
|
2038
2059
|
z16.object({ ...openWaitFields, kind: z16.literal("human") }).strict()
|
|
2039
2060
|
]);
|
|
2040
2061
|
var waitErrorCodeSchema = z16.enum([
|
|
@@ -2167,6 +2188,8 @@ var waitingOnUnionSchema = z16.discriminatedUnion("kind", [
|
|
|
2167
2188
|
z16.object({ kind: z16.literal("workers"), count: z16.number().int().nonnegative(), replies: z16.literal(true).optional(), peers: z16.literal(true).optional() }),
|
|
2168
2189
|
/** The peer tasks the open peer waits name, counted once each (hearsay-tools/cezarion#1995). */
|
|
2169
2190
|
z16.object({ kind: z16.literal("peers"), count: z16.number().int().nonnegative() }),
|
|
2191
|
+
/** The native subagents still running, over every open subagent wait (hearsay-tools/cezarion#2431). */
|
|
2192
|
+
z16.object({ kind: z16.literal("subagents"), count: z16.number().int().nonnegative() }),
|
|
2170
2193
|
z16.object({
|
|
2171
2194
|
kind: z16.literal("pr"),
|
|
2172
2195
|
until: prWaitUntilSchema,
|
|
@@ -2237,6 +2260,8 @@ function computeWaitingOn(run) {
|
|
|
2237
2260
|
}
|
|
2238
2261
|
const peerWaits = open.filter((wait) => wait.kind === "peer");
|
|
2239
2262
|
if (peerWaits.length) return { kind: "peers", count: new Set(peerWaits.flatMap((wait) => wait.peerIds)).size };
|
|
2263
|
+
const subagentWaits = open.filter((wait) => wait.kind === "subagent");
|
|
2264
|
+
if (subagentWaits.length) return { kind: "subagents", count: subagentWaits.reduce((sum, wait) => sum + runningSubagents(wait), 0) };
|
|
2240
2265
|
const pr = earliest(open.filter((wait) => wait.kind === "pr"));
|
|
2241
2266
|
if (pr) {
|
|
2242
2267
|
return { kind: "pr", until: pr.until, waitId: pr.id, prUrl: pr.prUrl, repository: pr.repository, prNumber: pr.prNumber, deadline: pr.deadline };
|
|
@@ -3043,6 +3068,7 @@ var ATTENTION_RUNGS = [
|
|
|
3043
3068
|
"running",
|
|
3044
3069
|
"usage-limit",
|
|
3045
3070
|
"waiting-on-workers",
|
|
3071
|
+
"waiting-on-subagents",
|
|
3046
3072
|
"waiting-for-ci",
|
|
3047
3073
|
"waiting-for-merge",
|
|
3048
3074
|
"waiting-for-command",
|
|
@@ -3073,6 +3099,7 @@ var PRESENTATION_OF_RUNG = {
|
|
|
3073
3099
|
running: { bucket: "running", tone: "running", shape: "filled", pulse: true, label: "running" },
|
|
3074
3100
|
"usage-limit": { bucket: "none", tone: "neutral", shape: "ring", pulse: false, label: "usage limit" },
|
|
3075
3101
|
"waiting-on-workers": { bucket: "none", tone: "running", shape: "workers", pulse: false, label: "waiting on workers" },
|
|
3102
|
+
"waiting-on-subagents": { bucket: "none", tone: "running", shape: "workers", pulse: false, label: "waiting for subagents" },
|
|
3076
3103
|
"waiting-for-ci": { bucket: "running", tone: "running", shape: "ring", pulse: true, label: "waiting for CI" },
|
|
3077
3104
|
"waiting-for-merge": { bucket: "running", tone: "running", shape: "ring", pulse: true, label: "waiting for merge" },
|
|
3078
3105
|
"waiting-for-command": { bucket: "running", tone: "running", shape: "ring", pulse: true, label: "waiting for a command" },
|
|
@@ -3101,6 +3128,11 @@ function peerAttention(waitingOn) {
|
|
|
3101
3128
|
const count = waitingOn.count;
|
|
3102
3129
|
return { ...attentionOfRung("waiting-on-workers"), shape: "ring", label: count ? `waiting on ${count} task${count === 1 ? "" : "s"}` : "waiting on tasks" };
|
|
3103
3130
|
}
|
|
3131
|
+
function subagentAttention(waitingOn) {
|
|
3132
|
+
const count = waitingOn.count;
|
|
3133
|
+
const attention = attentionOfRung("waiting-on-subagents");
|
|
3134
|
+
return { ...attention, label: count ? `waiting for ${count} subagent${count === 1 ? "" : "s"}` : attention.label };
|
|
3135
|
+
}
|
|
3104
3136
|
function parkedRung(run, waitingOn) {
|
|
3105
3137
|
if (run.status !== "waiting" && run.status !== "queued") return void 0;
|
|
3106
3138
|
if (waitingOn?.kind === "usage-limit") return "usage-limit";
|
|
@@ -3110,6 +3142,8 @@ function parkedRung(run, waitingOn) {
|
|
|
3110
3142
|
case "workers":
|
|
3111
3143
|
case "peers":
|
|
3112
3144
|
return "waiting-on-workers";
|
|
3145
|
+
case "subagents":
|
|
3146
|
+
return "waiting-on-subagents";
|
|
3113
3147
|
case "pr":
|
|
3114
3148
|
return waitingOn.until === "merge" ? "waiting-for-merge" : "waiting-for-ci";
|
|
3115
3149
|
case "process":
|
|
@@ -3145,6 +3179,7 @@ function deriveAttention(run) {
|
|
|
3145
3179
|
const rung = attentionRung(run, waitingOn);
|
|
3146
3180
|
if (rung === "waiting-on-workers" && waitingOn?.kind === "workers") return workerAttention(run, waitingOn);
|
|
3147
3181
|
if (rung === "waiting-on-workers" && waitingOn?.kind === "peers") return peerAttention(waitingOn);
|
|
3182
|
+
if (rung === "waiting-on-subagents" && waitingOn?.kind === "subagents") return subagentAttention(waitingOn);
|
|
3148
3183
|
return attentionOfRung(rung);
|
|
3149
3184
|
}
|
|
3150
3185
|
var WEBHOOK_TRIGGERS = [
|
|
@@ -3167,6 +3202,8 @@ var WEBHOOK_STATE_OF_RUNG = {
|
|
|
3167
3202
|
running: "running",
|
|
3168
3203
|
"usage-limit": void 0,
|
|
3169
3204
|
"waiting-on-workers": "waiting-workers",
|
|
3205
|
+
// The owner chose the workers trigger for native subagents (hearsay-tools/cezarion#2431).
|
|
3206
|
+
"waiting-on-subagents": "waiting-workers",
|
|
3170
3207
|
"waiting-for-ci": "waiting-ci",
|
|
3171
3208
|
"waiting-for-merge": "waiting-other",
|
|
3172
3209
|
"waiting-for-command": "waiting-other",
|
|
@@ -5601,6 +5638,9 @@ export {
|
|
|
5601
5638
|
SCHEDULED_TASK_NOTE,
|
|
5602
5639
|
SCHEDULE_HOURS_OPTIONS,
|
|
5603
5640
|
SCHEDULE_TYPES,
|
|
5641
|
+
SUBAGENT_WAIT_CHILD_LIMIT,
|
|
5642
|
+
SUBAGENT_WAIT_DEADLINE_SECONDS,
|
|
5643
|
+
SUBAGENT_WAIT_GRACE_SECONDS,
|
|
5604
5644
|
SWEEPABLE_RUN_RULE,
|
|
5605
5645
|
TIMER_MAX_SECONDS,
|
|
5606
5646
|
TIMER_MIN_SECONDS,
|
|
@@ -6049,6 +6089,7 @@ export {
|
|
|
6049
6089
|
runnerModelOptionSchema,
|
|
6050
6090
|
runnerModelsSchema,
|
|
6051
6091
|
runnerSchema,
|
|
6092
|
+
runningSubagents,
|
|
6052
6093
|
runsIndexResponseSchema,
|
|
6053
6094
|
runsSearchQuerySchema,
|
|
6054
6095
|
runsSearchResponseSchema,
|
|
@@ -6105,6 +6146,9 @@ export {
|
|
|
6105
6146
|
storedIsOnceSchedule,
|
|
6106
6147
|
storedIsScheduleAutomation,
|
|
6107
6148
|
strictRefreshQuerySchema,
|
|
6149
|
+
subagentChildSchema,
|
|
6150
|
+
subagentWaitEntrySchema,
|
|
6151
|
+
subagentWaitResultSchema,
|
|
6108
6152
|
teamSkillRefSchema,
|
|
6109
6153
|
testProjectWebhookResponseSchema,
|
|
6110
6154
|
timeZoneOffsetMs,
|