@hearsay-tools/squawk 0.18.0-pr4153.8018 → 0.18.0-pr4165.8028
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/built-in-run-slots.d.ts +3 -1
- package/dist/built-in-run-slots.js +6 -2
- package/dist/built-in-run-slots.js.map +1 -1
- package/dist/ci-wait/client.js.map +1 -1
- package/dist/ci-wait/controller.d.ts +6 -5
- package/dist/ci-wait/controller.js.map +1 -1
- package/dist/ci-wait/tool-catalog.js.map +1 -1
- package/dist/contract/index.d.ts +1 -0
- package/dist/contract/index.js +622 -615
- package/dist/contract/wait-limits.d.ts +3 -0
- package/dist/contract/wait-tools.d.ts +440 -0
- package/dist/contract/waits.d.ts +2 -441
- package/dist/core/registry.d.ts +36 -0
- package/dist/core/registry.js +85 -0
- package/dist/core/registry.js.map +1 -0
- package/dist/delegation/routes.d.ts +4 -4
- package/dist/delegation/transport.d.ts +15 -15
- package/dist/runs/removal-slots.js +27 -20
- package/dist/runs/removal-slots.js.map +1 -1
- package/dist/runs/run-archive.d.ts +72 -72
- package/dist/runs/run-decode.d.ts +72 -72
- package/dist/runs/run-exits.d.ts +352 -352
- package/dist/runs/worker-executions-registry.d.ts +5 -3
- package/dist/runs/worker-executions-registry.js +13 -15
- package/dist/runs/worker-executions-registry.js.map +1 -1
- package/dist/subcommands.js +2 -1
- package/dist/subcommands.js.map +1 -1
- package/dist/workflows/continuation-admission.d.ts +72 -72
- package/dist/workflows/run/compose.d.ts +2 -1
- package/dist/workflows/run/compose.js.map +1 -1
- package/dist/workflows/run/run-finish.js.map +1 -1
- package/dist/workflows/run/squawk-tools.d.ts +2 -1
- package/dist/workflows/run/squawk-tools.js.map +1 -1
- package/dist/workflows/run/wait-registration-tool.js +2 -1
- package/dist/workflows/run/wait-registration-tool.js.map +1 -1
- package/dist/workflows/run/wait-registration.d.ts +2 -1
- package/dist/workflows/run/wait-registration.js.map +1 -1
- package/dist/workflows/run/wait-registry.d.ts +2 -1
- package/dist/workflows/run/wait-registry.js.map +1 -1
- package/dist/workflows/run.d.ts +2 -1
- package/dist/workflows/run.js.map +1 -1
- package/package.json +4 -4
- package/scripts/benchmark-family-reconcile.ts +2 -1
- package/scripts/benchmark-run-store.ts +2 -1
- package/scripts/benchmark-stuck-destroys.ts +2 -1
- package/scripts/benchmark-worker-lifecycle.ts +2 -1
- package/scripts/benchmark-workspace-events.ts +2 -1
- package/scripts/benchmark-worktree-retention.ts +2 -1
- package/scripts/measure-transcript-facts-health.mjs +2 -1
- package/web/dist/assets/{accounts-section-CJ1xR0FN.js → accounts-section-Lxa13E8O.js} +1 -1
- package/web/dist/assets/{activity-motion-C01GEN0y.js → activity-motion-D-8GF_WP.js} +1 -1
- package/web/dist/assets/{activity-route-BZ1NIKSY.js → activity-route-Bo-Cyzsz.js} +1 -1
- package/web/dist/assets/{agent-config-section-DvFcRRLD.js → agent-config-section-BE239EYo.js} +1 -1
- package/web/dist/assets/{agent-defaults-section-BE88c2RN.js → agent-defaults-section-Bj5dO6F3.js} +1 -1
- package/web/dist/assets/{appearance-B9Z6lNEm.js → appearance-C2v7z5MF.js} +1 -1
- package/web/dist/assets/{archive-on-merge-field-DtR7twJI.js → archive-on-merge-field-Ta3WlY1p.js} +1 -1
- package/web/dist/assets/attention-B1Ei1IW6.js +1 -0
- package/web/dist/assets/{automations-route-Dpa01C3j.js → automations-route-DPpaFR0Q.js} +1 -1
- package/web/dist/assets/{commit-diff-panel-CGjhxIPJ.js → commit-diff-panel-CzY8bO3p.js} +1 -1
- package/web/dist/assets/{diff-DQ18_bA-.js → diff-3jSM3IH7.js} +2 -2
- package/web/dist/assets/{diff-view-CMwe_Rx7.js → diff-view-C3cwyYRv.js} +1 -1
- package/web/dist/assets/{file-preview-_lAUlt5u.js → file-preview-B71T62DU.js} +1 -1
- package/web/dist/assets/{folder-browser-Cy26Y6YK.js → folder-browser-BTYMFLBY.js} +1 -1
- package/web/dist/assets/{git-toolbar-BJM3pWHY.js → git-toolbar-Dng31AhK.js} +1 -1
- package/web/dist/assets/{github-aO7y0526.js → github-Cft2RNHM.js} +1 -1
- package/web/dist/assets/{global-activity-route-BWOfw2C5.js → global-activity-route-CngRjBlD.js} +1 -1
- package/web/dist/assets/{index-D-Y1olb1.js → index-MG3T7zFQ.js} +5 -5
- package/web/dist/assets/{label-CbEJ99h4.js → label-C9IGG0mW.js} +1 -1
- package/web/dist/assets/{markdown-BDWII3gy.js → markdown-BDWm6oGX.js} +1 -1
- package/web/dist/assets/{notifications-section-Z_4IW83J.js → notifications-section-BxIKJ1NF.js} +1 -1
- package/web/dist/assets/{open-in-menu-21vcjK3t.js → open-in-menu-LbTu2sP4.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-CxwvH4pt.js → preview-pane-connected-CGQngtTw.js} +1 -1
- package/web/dist/assets/{project-location-CvJMe_Vp.js → project-location-B-18C392.js} +1 -1
- package/web/dist/assets/{project-router-hhGBPlav.js → project-router-DImKA81z.js} +1 -1
- package/web/dist/assets/project-scope-context-D3_4Nfjk.js +4 -0
- package/web/dist/assets/{projects-section-CQ34YFnT.js → projects-section-DQ1LxJ3A.js} +1 -1
- package/web/dist/assets/{prompt-templates-section-UIxQCLJq.js → prompt-templates-section-C5AYB6Ig.js} +1 -1
- package/web/dist/assets/{queries-D6ioEk6c.js → queries-BaHOUYn4.js} +1 -1
- package/web/dist/assets/{reference-chip-B5br2cfV.js → reference-chip-CdOqXRll.js} +1 -1
- package/web/dist/assets/{remote-settings-notice-BWDpTH5W.js → remote-settings-notice-BTdflMqO.js} +1 -1
- package/web/dist/assets/{repo-git-U12bPaG-.js → repo-git-DChiMWrS.js} +1 -1
- package/web/dist/assets/{report-reader-B5vipU-m.js → report-reader-nV2G6iRk.js} +1 -1
- package/web/dist/assets/{reports-Cdk8Dc-w.js → reports-CoQqVEy4.js} +1 -1
- package/web/dist/assets/{resources-section-BCLu3v1Z.js → resources-section-CVaIlicS.js} +1 -1
- package/web/dist/assets/{run-header-gOqc0BKa.js → run-header-xPtXOBkm.js} +1 -1
- package/web/dist/assets/{runners-5cgs0qUY.js → runners-DccsyraI.js} +1 -1
- package/web/dist/assets/{settings-agent-picker-CB7l8AW-.js → settings-agent-picker-ixlEQ-MP.js} +1 -1
- package/web/dist/assets/{settings-shell-BUHHoCDs.js → settings-shell-BwknM_fs.js} +1 -1
- package/web/dist/assets/{sidebar-section-8dTKLdQw.js → sidebar-section-BNy-fRPU.js} +1 -1
- package/web/dist/assets/{skills-thuBrq2s.js → skills-CKceHo5J.js} +1 -1
- package/web/dist/assets/{tab-link-DaFUyEhe.js → tab-link-VCVNqxFc.js} +1 -1
- package/web/dist/assets/{task-changes-DSpeg6sX.js → task-changes-D4H5YbMo.js} +1 -1
- package/web/dist/assets/{task-commits-DRDRswBh.js → task-commits-BNu0VTTf.js} +1 -1
- package/web/dist/assets/{task-files-Cevz9Mex.js → task-files-C8q8GHYK.js} +1 -1
- package/web/dist/assets/{task-github-item-DpLkKSKy.js → task-github-item-D5kHfnwY.js} +1 -1
- package/web/dist/assets/{task-groups-CafTiSSz.js → task-groups-C7yO8nMy.js} +1 -1
- package/web/dist/assets/{task-thread-BvM4rEQe.js → task-thread-Dhts8Nbu.js} +1 -1
- package/web/dist/assets/{tasks-table-DYjfmofR.js → tasks-table-I_z4e7uI.js} +1 -1
- package/web/dist/assets/{thread-state-A3TSuI5v.js → thread-state-DV19z3BD.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-IepoiFbj.js → use-hand-to-agent-state-C6e6Mgi1.js} +1 -1
- package/web/dist/assets/{useInfiniteQuery-B20OnjTe.js → useInfiniteQuery-DR5UfhCS.js} +1 -1
- package/web/dist/assets/useQuery-BMyCehPp.js +1 -0
- package/web/dist/assets/{workflows-B0TaHAzz.js → workflows-BNHmFZRc.js} +1 -1
- package/web/dist/assets/{workspace-tools-B8sP_p5c.js → workspace-tools-UHJAnHEN.js} +1 -1
- package/web/dist/assets/{worktrees-section-BDfwadB6.js → worktrees-section-B4XPx6R5.js} +1 -1
- package/web/dist/assets/{ws-ExzR2_Yn.js → ws-CH3zNFKR.js} +1 -1
- package/web/dist/index.html +15 -15
- package/web/dist/assets/attention-B6NEiTGm.js +0 -1
- package/web/dist/assets/project-scope-context-BiijuuWU.js +0 -4
- package/web/dist/assets/useQuery-BTg3x78A.js +0 -1
package/dist/contract/waits.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { z } from 'zod';
|
|
|
2
2
|
import type { PeerWaitView, WorkerCompletionWait, WorkerWait } from './delegation.ts';
|
|
3
3
|
import type { RunRecord } from './runs.ts';
|
|
4
4
|
import { isUsageLimitHold } from './usage-limit-hold.ts';
|
|
5
|
-
import { WAIT_LIMIT, LAST_WAITS_LIMIT, TIMER_MIN_SECONDS, TIMER_MAX_SECONDS, PROCESS_TIMEOUT_DEFAULT_SECONDS, PROCESS_TIMEOUT_MAX_SECONDS, PROCESS_EXIT_FILE_MAX, PEER_WAIT_DEFAULT_SECONDS, PEER_WAIT_MAX_SECONDS, SUBAGENT_WAIT_DEADLINE_SECONDS, SUBAGENT_WAIT_GRACE_SECONDS, SUBAGENT_WAIT_CHILD_LIMIT, WAIT_MESSAGE_MAX } from './wait-limits.ts';
|
|
5
|
+
import { WAIT_LIMIT, LAST_WAITS_LIMIT, TIMER_MIN_SECONDS, TIMER_MAX_SECONDS, PROCESS_TIMEOUT_DEFAULT_SECONDS, PROCESS_TIMEOUT_MAX_SECONDS, PROCESS_EXIT_FILE_MAX, PEER_WAIT_DEFAULT_SECONDS, PEER_WAIT_MAX_SECONDS, SUBAGENT_WAIT_DEADLINE_SECONDS, SUBAGENT_WAIT_GRACE_SECONDS, SUBAGENT_WAIT_CHILD_LIMIT, WAIT_MESSAGE_MAX, NOTE_MAX, PID_MIN } from './wait-limits.ts';
|
|
6
6
|
export { withRootLedger, requestsToPeers, workerWaitTargets, computeWaitingOn, asksHuman, asksQuestion, hasResolvedWait, resolveWaitingOn, type WaitingOnInput, type WorkerWaitTarget, } from './waiting-on.ts';
|
|
7
|
-
export { isUsageLimitHold, WAIT_LIMIT, LAST_WAITS_LIMIT, TIMER_MIN_SECONDS, TIMER_MAX_SECONDS, PROCESS_TIMEOUT_DEFAULT_SECONDS, PROCESS_TIMEOUT_MAX_SECONDS, PROCESS_EXIT_FILE_MAX, PEER_WAIT_DEFAULT_SECONDS, PEER_WAIT_MAX_SECONDS, SUBAGENT_WAIT_DEADLINE_SECONDS, SUBAGENT_WAIT_GRACE_SECONDS, SUBAGENT_WAIT_CHILD_LIMIT, WAIT_MESSAGE_MAX, };
|
|
7
|
+
export { isUsageLimitHold, WAIT_LIMIT, LAST_WAITS_LIMIT, TIMER_MIN_SECONDS, TIMER_MAX_SECONDS, PROCESS_TIMEOUT_DEFAULT_SECONDS, PROCESS_TIMEOUT_MAX_SECONDS, PROCESS_EXIT_FILE_MAX, PEER_WAIT_DEFAULT_SECONDS, PEER_WAIT_MAX_SECONDS, SUBAGENT_WAIT_DEADLINE_SECONDS, SUBAGENT_WAIT_GRACE_SECONDS, SUBAGENT_WAIT_CHILD_LIMIT, WAIT_MESSAGE_MAX, NOTE_MAX, PID_MIN, };
|
|
8
8
|
/** `open` → `resolved` (its event fired or its deadline passed) → `delivered`, or `cancelled`. */
|
|
9
9
|
export declare const waitPhaseSchema: z.ZodEnum<{
|
|
10
10
|
cancelled: "cancelled";
|
|
@@ -931,63 +931,6 @@ export declare const waitSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
931
931
|
}, z.core.$strict>>;
|
|
932
932
|
}, z.core.$strict>], "kind">;
|
|
933
933
|
export type Wait = z.infer<typeof waitSchema>;
|
|
934
|
-
export declare const squawkWaitRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
935
|
-
pr: z.ZodString;
|
|
936
|
-
until: z.ZodDefault<z.ZodEnum<{
|
|
937
|
-
checks: "checks";
|
|
938
|
-
merge: "merge";
|
|
939
|
-
merge_or_blocked: "merge_or_blocked";
|
|
940
|
-
}>>;
|
|
941
|
-
wake_on_conflict: z.ZodDefault<z.ZodBoolean>;
|
|
942
|
-
timeout_seconds: z.ZodDefault<z.ZodNumber>;
|
|
943
|
-
head_sha: z.ZodOptional<z.ZodString>;
|
|
944
|
-
operation_id: z.ZodOptional<z.ZodUUID>;
|
|
945
|
-
kind: z.ZodLiteral<"pr">;
|
|
946
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
947
|
-
operation_id: z.ZodOptional<z.ZodUUID>;
|
|
948
|
-
kind: z.ZodLiteral<"worker">;
|
|
949
|
-
worker_ids: z.ZodArray<z.ZodUUID>;
|
|
950
|
-
mode: z.ZodOptional<z.ZodEnum<{
|
|
951
|
-
all: "all";
|
|
952
|
-
any: "any";
|
|
953
|
-
one: "one";
|
|
954
|
-
}>>;
|
|
955
|
-
timeout_seconds: z.ZodDefault<z.ZodNumber>;
|
|
956
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
957
|
-
operation_id: z.ZodOptional<z.ZodUUID>;
|
|
958
|
-
kind: z.ZodLiteral<"request">;
|
|
959
|
-
request_ids: z.ZodArray<z.ZodUUID>;
|
|
960
|
-
mode: z.ZodOptional<z.ZodEnum<{
|
|
961
|
-
all: "all";
|
|
962
|
-
any: "any";
|
|
963
|
-
one: "one";
|
|
964
|
-
}>>;
|
|
965
|
-
timeout_seconds: z.ZodDefault<z.ZodNumber>;
|
|
966
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
967
|
-
operation_id: z.ZodOptional<z.ZodUUID>;
|
|
968
|
-
kind: z.ZodLiteral<"peer">;
|
|
969
|
-
peer_ids: z.ZodArray<z.ZodUUID>;
|
|
970
|
-
timeout_seconds: z.ZodDefault<z.ZodNumber>;
|
|
971
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
972
|
-
operation_id: z.ZodOptional<z.ZodUUID>;
|
|
973
|
-
kind: z.ZodLiteral<"timer">;
|
|
974
|
-
seconds: z.ZodNumber;
|
|
975
|
-
note: z.ZodOptional<z.ZodString>;
|
|
976
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
977
|
-
operation_id: z.ZodOptional<z.ZodUUID>;
|
|
978
|
-
kind: z.ZodLiteral<"process">;
|
|
979
|
-
pid: z.ZodNumber;
|
|
980
|
-
exit_file: z.ZodOptional<z.ZodString>;
|
|
981
|
-
timeout_seconds: z.ZodDefault<z.ZodNumber>;
|
|
982
|
-
note: z.ZodOptional<z.ZodString>;
|
|
983
|
-
}, z.core.$strict>], "kind">;
|
|
984
|
-
export type SquawkWaitRequest = z.infer<typeof squawkWaitRequestSchema>;
|
|
985
|
-
/** What a caller may send: the defaults (`until`, `wake_on_conflict`, `timeout_seconds`) still unset. */
|
|
986
|
-
export type SquawkWaitRequestInput = z.input<typeof squawkWaitRequestSchema>;
|
|
987
|
-
export declare const squawkCancelWaitRequestSchema: z.ZodObject<{
|
|
988
|
-
wait_id: z.ZodUUID;
|
|
989
|
-
}, z.core.$strict>;
|
|
990
|
-
export type SquawkCancelWaitRequest = z.infer<typeof squawkCancelWaitRequestSchema>;
|
|
991
934
|
export declare const openWaitSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
992
935
|
wait_id: z.ZodUUID;
|
|
993
936
|
summary: z.ZodString;
|
|
@@ -1451,154 +1394,6 @@ export declare const waitRegistrationReceiptSchema: z.ZodObject<{
|
|
|
1451
1394
|
deduplicated: z.ZodBoolean;
|
|
1452
1395
|
}, z.core.$strict>;
|
|
1453
1396
|
export type WaitRegistrationReceipt = z.infer<typeof waitRegistrationReceiptSchema>;
|
|
1454
|
-
export declare const squawkWaitAnswerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1455
|
-
operation_id: z.ZodOptional<z.ZodUUID>;
|
|
1456
|
-
ok: z.ZodLiteral<true>;
|
|
1457
|
-
effect: z.ZodOptional<z.ZodEnum<{
|
|
1458
|
-
applied: "applied";
|
|
1459
|
-
unchanged: "unchanged";
|
|
1460
|
-
}>>;
|
|
1461
|
-
deduplicated: z.ZodOptional<z.ZodBoolean>;
|
|
1462
|
-
replayed: z.ZodOptional<z.ZodBoolean>;
|
|
1463
|
-
wait_phase: z.ZodOptional<z.ZodEnum<{
|
|
1464
|
-
cancelled: "cancelled";
|
|
1465
|
-
delivered: "delivered";
|
|
1466
|
-
open: "open";
|
|
1467
|
-
resolved: "resolved";
|
|
1468
|
-
unavailable: "unavailable";
|
|
1469
|
-
}>>;
|
|
1470
|
-
wait_id: z.ZodUUID;
|
|
1471
|
-
kind: z.ZodEnum<{
|
|
1472
|
-
peer: "peer";
|
|
1473
|
-
pr: "pr";
|
|
1474
|
-
process: "process";
|
|
1475
|
-
request: "request";
|
|
1476
|
-
timer: "timer";
|
|
1477
|
-
worker: "worker";
|
|
1478
|
-
}>;
|
|
1479
|
-
deadline: z.ZodISODateTime;
|
|
1480
|
-
open_waits: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1481
|
-
wait_id: z.ZodUUID;
|
|
1482
|
-
summary: z.ZodString;
|
|
1483
|
-
kind: z.ZodEnum<{
|
|
1484
|
-
peer: "peer";
|
|
1485
|
-
pr: "pr";
|
|
1486
|
-
process: "process";
|
|
1487
|
-
subagent: "subagent";
|
|
1488
|
-
timer: "timer";
|
|
1489
|
-
worker: "worker";
|
|
1490
|
-
}>;
|
|
1491
|
-
deadline: z.ZodISODateTime;
|
|
1492
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1493
|
-
wait_id: z.ZodUUID;
|
|
1494
|
-
summary: z.ZodString;
|
|
1495
|
-
kind: z.ZodLiteral<"human">;
|
|
1496
|
-
}, z.core.$strict>], "kind">>;
|
|
1497
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1498
|
-
operation_id: z.ZodOptional<z.ZodUUID>;
|
|
1499
|
-
ok: z.ZodLiteral<false>;
|
|
1500
|
-
effect: z.ZodOptional<z.ZodEnum<{
|
|
1501
|
-
refused: "refused";
|
|
1502
|
-
unknown: "unknown";
|
|
1503
|
-
}>>;
|
|
1504
|
-
retained_wait: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1505
|
-
wait_id: z.ZodUUID;
|
|
1506
|
-
summary: z.ZodString;
|
|
1507
|
-
kind: z.ZodEnum<{
|
|
1508
|
-
peer: "peer";
|
|
1509
|
-
pr: "pr";
|
|
1510
|
-
process: "process";
|
|
1511
|
-
subagent: "subagent";
|
|
1512
|
-
timer: "timer";
|
|
1513
|
-
worker: "worker";
|
|
1514
|
-
}>;
|
|
1515
|
-
deadline: z.ZodISODateTime;
|
|
1516
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1517
|
-
wait_id: z.ZodUUID;
|
|
1518
|
-
summary: z.ZodString;
|
|
1519
|
-
kind: z.ZodLiteral<"human">;
|
|
1520
|
-
}, z.core.$strict>], "kind">>;
|
|
1521
|
-
code: z.ZodEnum<{
|
|
1522
|
-
authentication: "authentication";
|
|
1523
|
-
capability_revoked: "capability_revoked";
|
|
1524
|
-
capacity: "capacity";
|
|
1525
|
-
command_failed: "command_failed";
|
|
1526
|
-
denied_scope: "denied_scope";
|
|
1527
|
-
duplicate_deadline: "duplicate_deadline";
|
|
1528
|
-
exit_file_outside: "exit_file_outside";
|
|
1529
|
-
finish_requested: "finish_requested";
|
|
1530
|
-
generation_mismatch: "generation_mismatch";
|
|
1531
|
-
gh_missing: "gh_missing";
|
|
1532
|
-
inaccessible_pr: "inaccessible_pr";
|
|
1533
|
-
invalid_request: "invalid_request";
|
|
1534
|
-
malformed_data: "malformed_data";
|
|
1535
|
-
manager_disposed: "manager_disposed";
|
|
1536
|
-
messaging_off: "messaging_off";
|
|
1537
|
-
operation_conflict: "operation_conflict";
|
|
1538
|
-
outcome_unknown: "outcome_unknown";
|
|
1539
|
-
output_limit: "output_limit";
|
|
1540
|
-
persistence: "persistence";
|
|
1541
|
-
process_not_allowed: "process_not_allowed";
|
|
1542
|
-
process_not_owned: "process_not_owned";
|
|
1543
|
-
query_timeout: "query_timeout";
|
|
1544
|
-
registration_aborted: "registration_aborted";
|
|
1545
|
-
root_finish_pending: "root_finish_pending";
|
|
1546
|
-
run_cancelled: "run_cancelled";
|
|
1547
|
-
run_missing: "run_missing";
|
|
1548
|
-
run_not_running: "run_not_running";
|
|
1549
|
-
run_stopping: "run_stopping";
|
|
1550
|
-
session_closed: "session_closed";
|
|
1551
|
-
session_replaced: "session_replaced";
|
|
1552
|
-
timers_disabled: "timers_disabled";
|
|
1553
|
-
turn_changed: "turn_changed";
|
|
1554
|
-
unauthorized: "unauthorized";
|
|
1555
|
-
unavailable: "unavailable";
|
|
1556
|
-
unsupported_host: "unsupported_host";
|
|
1557
|
-
wait_conflict: "wait_conflict";
|
|
1558
|
-
wake_budget_spent: "wake_budget_spent";
|
|
1559
|
-
worker_execution_stopped: "worker_execution_stopped";
|
|
1560
|
-
worker_wait_pending: "worker_wait_pending";
|
|
1561
|
-
}>;
|
|
1562
|
-
message: z.ZodString;
|
|
1563
|
-
open_waits: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1564
|
-
wait_id: z.ZodUUID;
|
|
1565
|
-
summary: z.ZodString;
|
|
1566
|
-
kind: z.ZodEnum<{
|
|
1567
|
-
peer: "peer";
|
|
1568
|
-
pr: "pr";
|
|
1569
|
-
process: "process";
|
|
1570
|
-
subagent: "subagent";
|
|
1571
|
-
timer: "timer";
|
|
1572
|
-
worker: "worker";
|
|
1573
|
-
}>;
|
|
1574
|
-
deadline: z.ZodISODateTime;
|
|
1575
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1576
|
-
wait_id: z.ZodUUID;
|
|
1577
|
-
summary: z.ZodString;
|
|
1578
|
-
kind: z.ZodLiteral<"human">;
|
|
1579
|
-
}, z.core.$strict>], "kind">>>;
|
|
1580
|
-
}, z.core.$strict>], "ok">;
|
|
1581
|
-
export type SquawkWaitAnswer = z.infer<typeof squawkWaitAnswerSchema>;
|
|
1582
|
-
/**
|
|
1583
|
-
* `cezar_ask` (hearsay-tools/cezarion#1234): the user's answer, asked with a card. A question
|
|
1584
|
-
* without options is open, and the user types its answer. The wait it opens has no deadline.
|
|
1585
|
-
* `context` is required here (hearsay-tools/cezarion#1458), optional in every stored shape.
|
|
1586
|
-
*/
|
|
1587
|
-
export declare const squawkAskRequestSchema: z.ZodObject<{
|
|
1588
|
-
questions: z.ZodArray<z.ZodObject<{
|
|
1589
|
-
id: z.ZodOptional<z.ZodString>;
|
|
1590
|
-
header: z.ZodString;
|
|
1591
|
-
question: z.ZodString;
|
|
1592
|
-
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1593
|
-
label: z.ZodString;
|
|
1594
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1595
|
-
}, z.core.$strict>>>;
|
|
1596
|
-
multiSelect: z.ZodOptional<z.ZodBoolean>;
|
|
1597
|
-
allowFreeText: z.ZodOptional<z.ZodBoolean>;
|
|
1598
|
-
}, z.core.$strict>>;
|
|
1599
|
-
context: z.ZodString;
|
|
1600
|
-
}, z.core.$strict>;
|
|
1601
|
-
export type SquawkAskRequest = z.infer<typeof squawkAskRequestSchema>;
|
|
1602
1397
|
/** The refusals a question can meet: the session's, the run's capacity, and an autonomous run. */
|
|
1603
1398
|
export declare const askErrorCodeSchema: z.ZodEnum<{
|
|
1604
1399
|
autonomous_run: "autonomous_run";
|
|
@@ -1623,126 +1418,6 @@ export declare const askErrorCodeSchema: z.ZodEnum<{
|
|
|
1623
1418
|
worker_wait_pending: "worker_wait_pending";
|
|
1624
1419
|
}>;
|
|
1625
1420
|
export type AskErrorCode = z.infer<typeof askErrorCodeSchema>;
|
|
1626
|
-
export declare const squawkAskAnswerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1627
|
-
ok: z.ZodLiteral<true>;
|
|
1628
|
-
wait_id: z.ZodUUID;
|
|
1629
|
-
open_waits: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1630
|
-
wait_id: z.ZodUUID;
|
|
1631
|
-
summary: z.ZodString;
|
|
1632
|
-
kind: z.ZodEnum<{
|
|
1633
|
-
peer: "peer";
|
|
1634
|
-
pr: "pr";
|
|
1635
|
-
process: "process";
|
|
1636
|
-
subagent: "subagent";
|
|
1637
|
-
timer: "timer";
|
|
1638
|
-
worker: "worker";
|
|
1639
|
-
}>;
|
|
1640
|
-
deadline: z.ZodISODateTime;
|
|
1641
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1642
|
-
wait_id: z.ZodUUID;
|
|
1643
|
-
summary: z.ZodString;
|
|
1644
|
-
kind: z.ZodLiteral<"human">;
|
|
1645
|
-
}, z.core.$strict>], "kind">>;
|
|
1646
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1647
|
-
ok: z.ZodLiteral<false>;
|
|
1648
|
-
code: z.ZodEnum<{
|
|
1649
|
-
autonomous_run: "autonomous_run";
|
|
1650
|
-
capability_revoked: "capability_revoked";
|
|
1651
|
-
capacity: "capacity";
|
|
1652
|
-
finish_requested: "finish_requested";
|
|
1653
|
-
generation_mismatch: "generation_mismatch";
|
|
1654
|
-
invalid_request: "invalid_request";
|
|
1655
|
-
manager_disposed: "manager_disposed";
|
|
1656
|
-
persistence: "persistence";
|
|
1657
|
-
root_finish_pending: "root_finish_pending";
|
|
1658
|
-
run_cancelled: "run_cancelled";
|
|
1659
|
-
run_missing: "run_missing";
|
|
1660
|
-
run_not_running: "run_not_running";
|
|
1661
|
-
run_stopping: "run_stopping";
|
|
1662
|
-
session_closed: "session_closed";
|
|
1663
|
-
session_replaced: "session_replaced";
|
|
1664
|
-
supervisor_is_worker: "supervisor_is_worker";
|
|
1665
|
-
unauthorized: "unauthorized";
|
|
1666
|
-
unavailable: "unavailable";
|
|
1667
|
-
worker_execution_stopped: "worker_execution_stopped";
|
|
1668
|
-
worker_wait_pending: "worker_wait_pending";
|
|
1669
|
-
}>;
|
|
1670
|
-
message: z.ZodString;
|
|
1671
|
-
open_waits: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1672
|
-
wait_id: z.ZodUUID;
|
|
1673
|
-
summary: z.ZodString;
|
|
1674
|
-
kind: z.ZodEnum<{
|
|
1675
|
-
peer: "peer";
|
|
1676
|
-
pr: "pr";
|
|
1677
|
-
process: "process";
|
|
1678
|
-
subagent: "subagent";
|
|
1679
|
-
timer: "timer";
|
|
1680
|
-
worker: "worker";
|
|
1681
|
-
}>;
|
|
1682
|
-
deadline: z.ZodISODateTime;
|
|
1683
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1684
|
-
wait_id: z.ZodUUID;
|
|
1685
|
-
summary: z.ZodString;
|
|
1686
|
-
kind: z.ZodLiteral<"human">;
|
|
1687
|
-
}, z.core.$strict>], "kind">>>;
|
|
1688
|
-
}, z.core.$strict>], "ok">;
|
|
1689
|
-
export type SquawkAskAnswer = z.infer<typeof squawkAskAnswerSchema>;
|
|
1690
|
-
/** `already_resolved`: the result is owed and arrives with the next wake; cancelling is a no-op.
|
|
1691
|
-
* `human_question`: the question already reached the user, so only their answer ends it. */
|
|
1692
|
-
export declare const squawkCancelWaitAnswerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1693
|
-
cancelled: z.ZodLiteral<true>;
|
|
1694
|
-
wait_id: z.ZodUUID;
|
|
1695
|
-
open_waits: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1696
|
-
wait_id: z.ZodUUID;
|
|
1697
|
-
summary: z.ZodString;
|
|
1698
|
-
kind: z.ZodEnum<{
|
|
1699
|
-
peer: "peer";
|
|
1700
|
-
pr: "pr";
|
|
1701
|
-
process: "process";
|
|
1702
|
-
subagent: "subagent";
|
|
1703
|
-
timer: "timer";
|
|
1704
|
-
worker: "worker";
|
|
1705
|
-
}>;
|
|
1706
|
-
deadline: z.ZodISODateTime;
|
|
1707
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1708
|
-
wait_id: z.ZodUUID;
|
|
1709
|
-
summary: z.ZodString;
|
|
1710
|
-
kind: z.ZodLiteral<"human">;
|
|
1711
|
-
}, z.core.$strict>], "kind">>;
|
|
1712
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1713
|
-
cancelled: z.ZodLiteral<false>;
|
|
1714
|
-
code: z.ZodEnum<{
|
|
1715
|
-
already_resolved: "already_resolved";
|
|
1716
|
-
human_question: "human_question";
|
|
1717
|
-
invalid_request: "invalid_request";
|
|
1718
|
-
not_found: "not_found";
|
|
1719
|
-
unavailable: "unavailable";
|
|
1720
|
-
}>;
|
|
1721
|
-
message: z.ZodString;
|
|
1722
|
-
open_waits: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1723
|
-
wait_id: z.ZodUUID;
|
|
1724
|
-
summary: z.ZodString;
|
|
1725
|
-
kind: z.ZodEnum<{
|
|
1726
|
-
peer: "peer";
|
|
1727
|
-
pr: "pr";
|
|
1728
|
-
process: "process";
|
|
1729
|
-
subagent: "subagent";
|
|
1730
|
-
timer: "timer";
|
|
1731
|
-
worker: "worker";
|
|
1732
|
-
}>;
|
|
1733
|
-
deadline: z.ZodISODateTime;
|
|
1734
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1735
|
-
wait_id: z.ZodUUID;
|
|
1736
|
-
summary: z.ZodString;
|
|
1737
|
-
kind: z.ZodLiteral<"human">;
|
|
1738
|
-
}, z.core.$strict>], "kind">>>;
|
|
1739
|
-
}, z.core.$strict>], "cancelled">;
|
|
1740
|
-
export type SquawkCancelWaitAnswer = z.infer<typeof squawkCancelWaitAnswerSchema>;
|
|
1741
|
-
/** `cezar_done`: the run finishes when this turn ends. The summary becomes the closing note. */
|
|
1742
|
-
export declare const squawkDoneRequestSchema: z.ZodObject<{
|
|
1743
|
-
summary: z.ZodOptional<z.ZodString>;
|
|
1744
|
-
}, z.core.$strict>;
|
|
1745
|
-
export type SquawkDoneRequest = z.infer<typeof squawkDoneRequestSchema>;
|
|
1746
1421
|
export declare const doneErrorCodeSchema: z.ZodEnum<{
|
|
1747
1422
|
capability_revoked: "capability_revoked";
|
|
1748
1423
|
finish_requested: "finish_requested";
|
|
@@ -1788,120 +1463,6 @@ export declare const doneOwedInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1788
1463
|
input_id: z.ZodString;
|
|
1789
1464
|
}, z.core.$strict>], "kind">;
|
|
1790
1465
|
export type DoneOwedInput = z.infer<typeof doneOwedInputSchema>;
|
|
1791
|
-
/** An accepted done finishes the task, or, in a workflow step that is not the last, completes that
|
|
1792
|
-
* step and starts `next_step`, named as the run's rail names it (hearsay-tools/cezarion#1620). */
|
|
1793
|
-
export declare const squawkDoneAnswerSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1794
|
-
ok: z.ZodLiteral<true>;
|
|
1795
|
-
finishes: z.ZodLiteral<"at_turn_end">;
|
|
1796
|
-
open_waits: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1797
|
-
wait_id: z.ZodUUID;
|
|
1798
|
-
summary: z.ZodString;
|
|
1799
|
-
kind: z.ZodEnum<{
|
|
1800
|
-
peer: "peer";
|
|
1801
|
-
pr: "pr";
|
|
1802
|
-
process: "process";
|
|
1803
|
-
subagent: "subagent";
|
|
1804
|
-
timer: "timer";
|
|
1805
|
-
worker: "worker";
|
|
1806
|
-
}>;
|
|
1807
|
-
deadline: z.ZodISODateTime;
|
|
1808
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1809
|
-
wait_id: z.ZodUUID;
|
|
1810
|
-
summary: z.ZodString;
|
|
1811
|
-
kind: z.ZodLiteral<"human">;
|
|
1812
|
-
}, z.core.$strict>], "kind">>;
|
|
1813
|
-
completes: z.ZodLiteral<"task">;
|
|
1814
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1815
|
-
ok: z.ZodLiteral<true>;
|
|
1816
|
-
finishes: z.ZodLiteral<"at_turn_end">;
|
|
1817
|
-
open_waits: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1818
|
-
wait_id: z.ZodUUID;
|
|
1819
|
-
summary: z.ZodString;
|
|
1820
|
-
kind: z.ZodEnum<{
|
|
1821
|
-
peer: "peer";
|
|
1822
|
-
pr: "pr";
|
|
1823
|
-
process: "process";
|
|
1824
|
-
subagent: "subagent";
|
|
1825
|
-
timer: "timer";
|
|
1826
|
-
worker: "worker";
|
|
1827
|
-
}>;
|
|
1828
|
-
deadline: z.ZodISODateTime;
|
|
1829
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1830
|
-
wait_id: z.ZodUUID;
|
|
1831
|
-
summary: z.ZodString;
|
|
1832
|
-
kind: z.ZodLiteral<"human">;
|
|
1833
|
-
}, z.core.$strict>], "kind">>;
|
|
1834
|
-
completes: z.ZodLiteral<"step">;
|
|
1835
|
-
next_step: z.ZodString;
|
|
1836
|
-
}, z.core.$strict>], "completes">, z.ZodObject<{
|
|
1837
|
-
ok: z.ZodLiteral<false>;
|
|
1838
|
-
code: z.ZodEnum<{
|
|
1839
|
-
capability_revoked: "capability_revoked";
|
|
1840
|
-
finish_requested: "finish_requested";
|
|
1841
|
-
generation_mismatch: "generation_mismatch";
|
|
1842
|
-
human_question_pending: "human_question_pending";
|
|
1843
|
-
input_pending: "input_pending";
|
|
1844
|
-
invalid_request: "invalid_request";
|
|
1845
|
-
manager_disposed: "manager_disposed";
|
|
1846
|
-
not_final_step: "not_final_step";
|
|
1847
|
-
requests_outstanding: "requests_outstanding";
|
|
1848
|
-
requests_unanswered: "requests_unanswered";
|
|
1849
|
-
root_finish_pending: "root_finish_pending";
|
|
1850
|
-
run_cancelled: "run_cancelled";
|
|
1851
|
-
run_missing: "run_missing";
|
|
1852
|
-
run_not_running: "run_not_running";
|
|
1853
|
-
run_stopping: "run_stopping";
|
|
1854
|
-
session_closed: "session_closed";
|
|
1855
|
-
session_replaced: "session_replaced";
|
|
1856
|
-
unavailable: "unavailable";
|
|
1857
|
-
worker_questions: "worker_questions";
|
|
1858
|
-
worker_wait_pending: "worker_wait_pending";
|
|
1859
|
-
workers_outstanding: "workers_outstanding";
|
|
1860
|
-
workers_uncollected: "workers_uncollected";
|
|
1861
|
-
}>;
|
|
1862
|
-
message: z.ZodString;
|
|
1863
|
-
workers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1864
|
-
worker_id: z.ZodString;
|
|
1865
|
-
reason: z.ZodEnum<{
|
|
1866
|
-
outstanding: "outstanding";
|
|
1867
|
-
question: "question";
|
|
1868
|
-
uncollected: "uncollected";
|
|
1869
|
-
}>;
|
|
1870
|
-
}, z.core.$strict>>>;
|
|
1871
|
-
open_waits: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1872
|
-
wait_id: z.ZodUUID;
|
|
1873
|
-
summary: z.ZodString;
|
|
1874
|
-
kind: z.ZodEnum<{
|
|
1875
|
-
peer: "peer";
|
|
1876
|
-
pr: "pr";
|
|
1877
|
-
process: "process";
|
|
1878
|
-
subagent: "subagent";
|
|
1879
|
-
timer: "timer";
|
|
1880
|
-
worker: "worker";
|
|
1881
|
-
}>;
|
|
1882
|
-
deadline: z.ZodISODateTime;
|
|
1883
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1884
|
-
wait_id: z.ZodUUID;
|
|
1885
|
-
summary: z.ZodString;
|
|
1886
|
-
kind: z.ZodLiteral<"human">;
|
|
1887
|
-
}, z.core.$strict>], "kind">>>;
|
|
1888
|
-
owed: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1889
|
-
kind: z.ZodLiteral<"wait_result">;
|
|
1890
|
-
wait_id: z.ZodString;
|
|
1891
|
-
wait_kind: z.ZodString;
|
|
1892
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1893
|
-
kind: z.ZodLiteral<"queued">;
|
|
1894
|
-
input_id: z.ZodOptional<z.ZodString>;
|
|
1895
|
-
source: z.ZodString;
|
|
1896
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1897
|
-
kind: z.ZodLiteral<"in_flight">;
|
|
1898
|
-
input_id: z.ZodString;
|
|
1899
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1900
|
-
kind: z.ZodLiteral<"unread">;
|
|
1901
|
-
input_id: z.ZodString;
|
|
1902
|
-
}, z.core.$strict>], "kind">>>;
|
|
1903
|
-
}, z.core.$strict>], "ok">;
|
|
1904
|
-
export type SquawkDoneAnswer = z.infer<typeof squawkDoneAnswerSchema>;
|
|
1905
1466
|
/** Stored summaries written before hearsay-tools/cezarion#1425 carry `{ kind: 'ci' }`: a checks wait. */
|
|
1906
1467
|
export declare const waitingOnSchema: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1907
1468
|
kind: z.ZodLiteral<"human">;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** Process-wide registries register first, seal at boot, then allow normal reads. */
|
|
2
|
+
interface RegistryOptions {
|
|
3
|
+
name: string;
|
|
4
|
+
bootHint: string;
|
|
5
|
+
}
|
|
6
|
+
/** A keyed registry with passive inspection for cold callers. Returned arrays are snapshots. */
|
|
7
|
+
export declare function createKeyedRegistry<K extends string, V>(options: RegistryOptions & {
|
|
8
|
+
reservedKeys?: ReadonlySet<string> | readonly string[];
|
|
9
|
+
}): {
|
|
10
|
+
seal: () => void;
|
|
11
|
+
isSealed: () => boolean;
|
|
12
|
+
register(key: K, value: V): void;
|
|
13
|
+
get(key: K): V | undefined;
|
|
14
|
+
has(key: K): boolean;
|
|
15
|
+
values(): V[];
|
|
16
|
+
keys(): K[];
|
|
17
|
+
entries(): [K, V][];
|
|
18
|
+
peekKeys: () => K[];
|
|
19
|
+
peekHas: (key: K) => boolean;
|
|
20
|
+
};
|
|
21
|
+
/** An ordered list that ignores repeated registration of the same reference. */
|
|
22
|
+
export declare function createListRegistry<V>(options: RegistryOptions): {
|
|
23
|
+
seal: () => void;
|
|
24
|
+
isSealed: () => boolean;
|
|
25
|
+
register(item: V): void;
|
|
26
|
+
values(): V[];
|
|
27
|
+
};
|
|
28
|
+
/** A single registration. Even a sealed slot fails closed when it is empty. */
|
|
29
|
+
export declare function createSingleRegistry<V>(options: RegistryOptions): {
|
|
30
|
+
seal: () => void;
|
|
31
|
+
isSealed: () => boolean;
|
|
32
|
+
register(value: V): void;
|
|
33
|
+
has(): boolean;
|
|
34
|
+
get(): V;
|
|
35
|
+
};
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
function lifecycle({ name, bootHint }) {
|
|
2
|
+
let sealed = false;
|
|
3
|
+
return {
|
|
4
|
+
seal() { sealed = true; },
|
|
5
|
+
isSealed: () => sealed,
|
|
6
|
+
assertReadable() {
|
|
7
|
+
if (!sealed)
|
|
8
|
+
throw new Error(`${name} is unsealed: ${bootHint}`);
|
|
9
|
+
},
|
|
10
|
+
assertWritable() {
|
|
11
|
+
if (sealed)
|
|
12
|
+
throw new Error(`${name} is sealed: register every entry before sealing. ${bootHint}`);
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/** A keyed registry with passive inspection for cold callers. Returned arrays are snapshots. */
|
|
17
|
+
export function createKeyedRegistry(options) {
|
|
18
|
+
const state = lifecycle(options);
|
|
19
|
+
const entries = new Map();
|
|
20
|
+
const reserved = new Set(options.reservedKeys);
|
|
21
|
+
return {
|
|
22
|
+
seal: state.seal,
|
|
23
|
+
isSealed: state.isSealed,
|
|
24
|
+
register(key, value) {
|
|
25
|
+
if (reserved.has(key))
|
|
26
|
+
throw new Error(`${options.name}: reserved legacy key '${key}'.`);
|
|
27
|
+
if (entries.has(key)) {
|
|
28
|
+
if (entries.get(key) === value)
|
|
29
|
+
return;
|
|
30
|
+
throw new Error(`${options.name}: conflicting registration for '${key}'.`);
|
|
31
|
+
}
|
|
32
|
+
state.assertWritable();
|
|
33
|
+
entries.set(key, value);
|
|
34
|
+
},
|
|
35
|
+
get(key) { state.assertReadable(); return entries.get(key); },
|
|
36
|
+
has(key) { state.assertReadable(); return entries.has(key); },
|
|
37
|
+
values() { state.assertReadable(); return [...entries.values()]; },
|
|
38
|
+
keys() { state.assertReadable(); return [...entries.keys()]; },
|
|
39
|
+
entries() { state.assertReadable(); return [...entries.entries()]; },
|
|
40
|
+
peekKeys: () => [...entries.keys()],
|
|
41
|
+
peekHas: (key) => entries.has(key),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/** An ordered list that ignores repeated registration of the same reference. */
|
|
45
|
+
export function createListRegistry(options) {
|
|
46
|
+
const state = lifecycle(options);
|
|
47
|
+
const items = [];
|
|
48
|
+
return {
|
|
49
|
+
seal: state.seal,
|
|
50
|
+
isSealed: state.isSealed,
|
|
51
|
+
register(item) {
|
|
52
|
+
if (items.some(value => value === item))
|
|
53
|
+
return;
|
|
54
|
+
state.assertWritable();
|
|
55
|
+
items.push(item);
|
|
56
|
+
},
|
|
57
|
+
values() { state.assertReadable(); return [...items]; },
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
/** A single registration. Even a sealed slot fails closed when it is empty. */
|
|
61
|
+
export function createSingleRegistry(options) {
|
|
62
|
+
const state = lifecycle(options);
|
|
63
|
+
let entry;
|
|
64
|
+
return {
|
|
65
|
+
seal: state.seal,
|
|
66
|
+
isSealed: state.isSealed,
|
|
67
|
+
register(value) {
|
|
68
|
+
if (entry) {
|
|
69
|
+
if (entry.value === value)
|
|
70
|
+
return;
|
|
71
|
+
throw new Error(`${options.name}: a different value is already registered.`);
|
|
72
|
+
}
|
|
73
|
+
state.assertWritable();
|
|
74
|
+
entry = { value };
|
|
75
|
+
},
|
|
76
|
+
has() { state.assertReadable(); return entry !== undefined; },
|
|
77
|
+
get() {
|
|
78
|
+
state.assertReadable();
|
|
79
|
+
if (!entry)
|
|
80
|
+
throw new Error(`${options.name}: missing registration. ${options.bootHint}`);
|
|
81
|
+
return entry.value;
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
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
234
|
json: {
|
|
235
|
-
workerIds: string[];
|
|
236
|
-
timeoutSeconds?: number | undefined;
|
|
237
|
-
mode?: "all" | "any" | "one" | undefined;
|
|
238
|
-
} | {
|
|
239
235
|
requestIds: string[];
|
|
240
236
|
mode?: "all" | "any" | "one" | undefined;
|
|
241
237
|
timeoutSeconds?: number | undefined;
|
|
238
|
+
} | {
|
|
239
|
+
workerIds: string[];
|
|
240
|
+
timeoutSeconds?: number | undefined;
|
|
241
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
242
242
|
} | {
|
|
243
243
|
peerIds: string[];
|
|
244
244
|
timeoutSeconds?: number | undefined;
|
|
@@ -66,6 +66,17 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
66
66
|
"/discover": {
|
|
67
67
|
$post: {
|
|
68
68
|
output: {
|
|
69
|
+
runner: string;
|
|
70
|
+
models: {
|
|
71
|
+
id: string;
|
|
72
|
+
label: string;
|
|
73
|
+
description: string;
|
|
74
|
+
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
75
|
+
}[];
|
|
76
|
+
source: "cache" | "live" | "unavailable";
|
|
77
|
+
stale: boolean;
|
|
78
|
+
reason?: string | undefined;
|
|
79
|
+
} | {
|
|
69
80
|
scope: "host-default-account";
|
|
70
81
|
runners: {
|
|
71
82
|
requiresAccountHome?: boolean | undefined;
|
|
@@ -87,17 +98,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
87
98
|
reason?: string | undefined;
|
|
88
99
|
}[];
|
|
89
100
|
nextOffset?: number | undefined;
|
|
90
|
-
} | {
|
|
91
|
-
runner: string;
|
|
92
|
-
models: {
|
|
93
|
-
id: string;
|
|
94
|
-
label: string;
|
|
95
|
-
description: string;
|
|
96
|
-
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
97
|
-
}[];
|
|
98
|
-
source: "cache" | "live" | "unavailable";
|
|
99
|
-
stale: boolean;
|
|
100
|
-
reason?: string | undefined;
|
|
101
101
|
};
|
|
102
102
|
outputFormat: "json";
|
|
103
103
|
status: 200;
|
|
@@ -207,13 +207,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
207
207
|
status: 200;
|
|
208
208
|
input: {
|
|
209
209
|
json: {
|
|
210
|
-
workerIds: string[];
|
|
211
|
-
timeoutSeconds?: number | undefined;
|
|
212
|
-
mode?: "all" | "any" | "one" | undefined;
|
|
213
|
-
} | {
|
|
214
210
|
requestIds: string[];
|
|
215
211
|
mode?: "all" | "any" | "one" | undefined;
|
|
216
212
|
timeoutSeconds?: number | undefined;
|
|
213
|
+
} | {
|
|
214
|
+
workerIds: string[];
|
|
215
|
+
timeoutSeconds?: number | undefined;
|
|
216
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
217
217
|
} | {
|
|
218
218
|
peerIds: string[];
|
|
219
219
|
timeoutSeconds?: number | undefined;
|