@hearsay-tools/squawk 0.18.0-dev.6807 → 0.18.0-dev.6810
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 +4 -4
- package/dist/contract/delegation.d.ts +20 -0
- package/dist/contract/index.js +4 -1
- package/dist/core/agent-runner.d.ts +16 -0
- package/dist/core/agent-runner.js +7 -0
- package/dist/core/agent-runner.js.map +1 -1
- package/dist/core/claude-cli-runner.js +3 -2
- package/dist/core/claude-cli-runner.js.map +1 -1
- package/dist/core/codex-app-server-runner.js +3 -3
- package/dist/core/codex-app-server-runner.js.map +1 -1
- package/dist/core/codex-app-server-transport.d.ts +2 -0
- package/dist/core/codex-app-server-transport.js +1 -1
- package/dist/core/codex-app-server-transport.js.map +1 -1
- package/dist/core/cursor-print-process.d.ts +3 -0
- package/dist/core/cursor-print-process.js +1 -1
- package/dist/core/cursor-print-process.js.map +1 -1
- package/dist/core/cursor-print-runner.js +3 -2
- package/dist/core/cursor-print-runner.js.map +1 -1
- package/dist/core/omp-runner.js +3 -1
- package/dist/core/omp-runner.js.map +1 -1
- package/dist/core/opencode-server-runner.js +3 -3
- package/dist/core/opencode-server-runner.js.map +1 -1
- package/dist/core/pi-runner.js +3 -2
- package/dist/core/pi-runner.js.map +1 -1
- package/dist/core/session-process.d.ts +6 -0
- package/dist/core/session-process.js +53 -2
- package/dist/core/session-process.js.map +1 -1
- package/dist/delegation/family-end.js +2 -4
- package/dist/delegation/family-end.js.map +1 -1
- package/dist/delegation/owned-workspace-release.d.ts +1 -2
- package/dist/delegation/owned-workspace-release.js +2 -2
- package/dist/delegation/owned-workspace-release.js.map +1 -1
- package/dist/delegation/process-liveness.d.ts +8 -58
- package/dist/delegation/process-liveness.js +9 -86
- package/dist/delegation/process-liveness.js.map +1 -1
- package/dist/delegation/routes.d.ts +87 -83
- package/dist/delegation/scratch-cleanup.d.ts +1 -1
- package/dist/delegation/scratch-cleanup.js +7 -10
- package/dist/delegation/scratch-cleanup.js.map +1 -1
- package/dist/delegation/service.js +2 -1
- package/dist/delegation/service.js.map +1 -1
- package/dist/delegation/transport.d.ts +20 -16
- package/dist/delegation/worker-cleanup.d.ts +2 -9
- package/dist/delegation/worker-cleanup.js +44 -86
- package/dist/delegation/worker-cleanup.js.map +1 -1
- package/dist/delegation/workspace-removal.d.ts +4 -12
- package/dist/delegation/workspace-removal.js +18 -51
- package/dist/delegation/workspace-removal.js.map +1 -1
- package/dist/git-worktree.js +2 -6
- package/dist/git-worktree.js.map +1 -1
- package/dist/preview/dev-server.d.ts +3 -0
- package/dist/preview/dev-server.js +40 -1
- package/dist/preview/dev-server.js.map +1 -1
- package/dist/preview/host.d.ts +3 -1
- package/dist/preview/host.js +2 -1
- package/dist/preview/host.js.map +1 -1
- package/dist/runs/private-record-file.d.ts +7 -0
- package/dist/runs/private-record-file.js +55 -0
- package/dist/runs/private-record-file.js.map +1 -0
- package/dist/runs/store.d.ts +18 -6
- package/dist/runs/store.js +43 -99
- package/dist/runs/store.js.map +1 -1
- package/dist/runs/worker-execution.d.ts +1 -0
- package/dist/runs/worker-execution.js +4 -1
- package/dist/runs/worker-execution.js.map +1 -1
- package/dist/runs/worker-resource-holders.d.ts +10 -7
- package/dist/runs/worker-resource-holders.js +9 -25
- package/dist/runs/worker-resource-holders.js.map +1 -1
- package/dist/server/server.d.ts +8 -0
- package/dist/server/workspace-live-routes.d.ts +6 -6
- package/dist/worker-scope/cgroup.d.ts +41 -0
- package/dist/worker-scope/cgroup.js +173 -0
- package/dist/worker-scope/cgroup.js.map +1 -0
- package/dist/worker-scope/groups.d.ts +24 -0
- package/dist/worker-scope/groups.js +60 -0
- package/dist/worker-scope/groups.js.map +1 -0
- package/dist/worker-scope/scope.d.ts +32 -0
- package/dist/worker-scope/scope.js +18 -0
- package/dist/worker-scope/scope.js.map +1 -0
- package/dist/worker-scope/worker-scopes.d.ts +63 -0
- package/dist/worker-scope/worker-scopes.js +181 -0
- package/dist/worker-scope/worker-scopes.js.map +1 -0
- package/dist/workflows/grouped-command.d.ts +3 -0
- package/dist/workflows/grouped-command.js +28 -2
- package/dist/workflows/grouped-command.js.map +1 -1
- package/dist/workflows/run/compose.d.ts +0 -2
- package/dist/workflows/run/compose.js.map +1 -1
- package/dist/workflows/run/continuation-session.js +1 -0
- package/dist/workflows/run/continuation-session.js.map +1 -1
- package/dist/workflows/run/step-loop.d.ts +1 -1
- package/dist/workflows/run/step-loop.js +4 -2
- package/dist/workflows/run/step-loop.js.map +1 -1
- package/dist/workflows/run/step-session.js +1 -0
- package/dist/workflows/run/step-session.js.map +1 -1
- package/dist/workflows/run/worker-executions.d.ts +2 -1
- package/dist/workflows/run/worker-executions.js +8 -4
- package/dist/workflows/run/worker-executions.js.map +1 -1
- package/dist/workflows/run/worker-orphans.d.ts +16 -31
- package/dist/workflows/run/worker-orphans.js +71 -123
- package/dist/workflows/run/worker-orphans.js.map +1 -1
- package/dist/workflows/run.d.ts +0 -2
- package/dist/workflows/run.js +1 -4
- package/dist/workflows/run.js.map +1 -1
- package/dist/worktree-setup.d.ts +3 -0
- package/dist/worktree-setup.js +2 -1
- package/dist/worktree-setup.js.map +1 -1
- package/package.json +4 -4
- package/web/dist/assets/{activity-motion-ankV4z_y.js → activity-motion-AuQA350-.js} +1 -1
- package/web/dist/assets/{activity-route-C7Lo4d_1.js → activity-route-BNZ9bOOZ.js} +1 -1
- package/web/dist/assets/{agent-accounts-BAUPVmTO.js → agent-accounts-D2uZHuiM.js} +1 -1
- package/web/dist/assets/attention-B7icDSLh.js +1 -0
- package/web/dist/assets/{cez-idle-TVRD1sce.js → cez-idle-MToU9Wv_.js} +1 -1
- package/web/dist/assets/{commit-diff-panel-Cmqi-EvU.js → commit-diff-panel-DBW7us79.js} +1 -1
- package/web/dist/assets/{diff-BawymO3F.js → diff-C3Cms5Ep.js} +2 -2
- package/web/dist/assets/{diff-view-DHx_pu8b.js → diff-view-D5zTYOKV.js} +1 -1
- package/web/dist/assets/{file-preview-DV7f2pOk.js → file-preview-FhzIdXZ3.js} +1 -1
- package/web/dist/assets/{git-toolbar-BrVfyYBr.js → git-toolbar-MFjkjDDG.js} +1 -1
- package/web/dist/assets/{github-DVXWmfeu.js → github-CYmdc5Dh.js} +1 -1
- package/web/dist/assets/{global-activity-route-ybR1xgLf.js → global-activity-route-C41ofuHV.js} +1 -1
- package/web/dist/assets/{index-Dc_KmL4Z.js → index-e1OpsDKN.js} +4 -4
- package/web/dist/assets/{live-protocol-aMLJJ0MQ.js → live-protocol-B8boP96Z.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-CT7tXifI.js → preview-pane-connected-Ds209_UZ.js} +1 -1
- package/web/dist/assets/{project-router-CbWELZZ9.js → project-router-F1inY-EB.js} +1 -1
- package/web/dist/assets/{project-scope-context-p1OpXpSJ.js → project-scope-context-0Z0nsheq.js} +1 -1
- package/web/dist/assets/{prompt-template-menu-Ct3m86h1.js → prompt-template-menu-uUjg9v98.js} +1 -1
- package/web/dist/assets/{queries-BAUtqJph.js → queries-7W9tOZsg.js} +1 -1
- package/web/dist/assets/{reference-chip-B2B-Ky7w.js → reference-chip-BqRpnpaI.js} +1 -1
- package/web/dist/assets/{repo-git-DRONt4_i.js → repo-git-BZcRanYE.js} +1 -1
- package/web/dist/assets/{report-reader-BF8rmJRD.js → report-reader-BLlV3dPF.js} +1 -1
- package/web/dist/assets/{reports-Bv91XlcP.js → reports-C--EXqf1.js} +1 -1
- package/web/dist/assets/{run-header-CvJ84kr2.js → run-header-CJg8dyfz.js} +1 -1
- package/web/dist/assets/{skills-Ceg2Y9LM.js → skills-CHWVejdV.js} +1 -1
- package/web/dist/assets/{tab-link-CT5gqdai.js → tab-link-XI9xWLwR.js} +1 -1
- package/web/dist/assets/{task-changes-BplRsiSs.js → task-changes-DFm_EHnj.js} +1 -1
- package/web/dist/assets/{task-commits-CYLy-lg-.js → task-commits-BX-GVdXG.js} +1 -1
- package/web/dist/assets/{task-files-COYxL8mg.js → task-files-Dsn11PYu.js} +1 -1
- package/web/dist/assets/{task-github-item-DAD__wEa.js → task-github-item-3N6jEijR.js} +1 -1
- package/web/dist/assets/{task-thread-CTEobEyX.js → task-thread-VNPhkI8i.js} +1 -1
- package/web/dist/assets/{thread-state-CpdUCQVd.js → thread-state-D1XLo7ab.js} +1 -1
- package/web/dist/assets/{use-desktop-Bok38AjX.js → use-desktop-DdcA0Atl.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-DiBEjj2Y.js → use-hand-to-agent-state-2tzEmCDo.js} +1 -1
- package/web/dist/assets/{useInfiniteQuery-DD7iZHIJ.js → useInfiniteQuery-BmmIZbVY.js} +1 -1
- package/web/dist/assets/useQuery-CBKC2lBX.js +1 -0
- package/web/dist/assets/{workflows-Cq6Fg1ZT.js → workflows-CqqdPBFr.js} +1 -1
- package/web/dist/assets/{ws-CqtLOaJ8.js → ws-BvDSfSVH.js} +1 -1
- package/web/dist/index.html +14 -14
- package/web/dist/live-worker.js +1 -1
- package/dist/delegation/destroy-observation.d.ts +0 -44
- package/dist/delegation/destroy-observation.js +0 -116
- package/dist/delegation/destroy-observation.js.map +0 -1
- package/web/dist/assets/attention-C6XIgMqB.js +0 -1
- package/web/dist/assets/useQuery-DVAeyc_X.js +0 -1
|
@@ -27,6 +27,18 @@ 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
|
+
} | {
|
|
30
42
|
output: {
|
|
31
43
|
workers: {
|
|
32
44
|
workerId: string;
|
|
@@ -64,35 +76,22 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
64
76
|
offset?: string | undefined;
|
|
65
77
|
};
|
|
66
78
|
};
|
|
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
|
} & {
|
|
82
82
|
"/discover": {
|
|
83
83
|
$post: {
|
|
84
84
|
output: {
|
|
85
|
-
|
|
85
|
+
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
86
|
+
models: {
|
|
86
87
|
id: string;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
attention: "error" | "none" | "permission" | "running" | "unseen" | "waiting";
|
|
91
|
-
attentionLabel: string;
|
|
92
|
-
accepts: boolean;
|
|
93
|
-
reason?: string | undefined;
|
|
88
|
+
label: string;
|
|
89
|
+
description: string;
|
|
90
|
+
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
94
91
|
}[];
|
|
95
|
-
|
|
92
|
+
source: "cache" | "live" | "unavailable";
|
|
93
|
+
stale: boolean;
|
|
94
|
+
reason?: string | undefined;
|
|
96
95
|
} | {
|
|
97
96
|
scope: "host-default-account";
|
|
98
97
|
runners: {
|
|
@@ -103,16 +102,17 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
103
102
|
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
104
103
|
}[];
|
|
105
104
|
} | {
|
|
106
|
-
|
|
107
|
-
models: {
|
|
105
|
+
tasks: {
|
|
108
106
|
id: string;
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
107
|
+
title: string;
|
|
108
|
+
runner?: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi" | undefined;
|
|
109
|
+
status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
|
|
110
|
+
attention: "error" | "none" | "permission" | "running" | "unseen" | "waiting";
|
|
111
|
+
attentionLabel: string;
|
|
112
|
+
accepts: boolean;
|
|
113
|
+
reason?: string | undefined;
|
|
112
114
|
}[];
|
|
113
|
-
|
|
114
|
-
stale: boolean;
|
|
115
|
-
reason?: string | undefined;
|
|
115
|
+
nextOffset?: number | undefined;
|
|
116
116
|
};
|
|
117
117
|
outputFormat: "json";
|
|
118
118
|
status: 200;
|
|
@@ -221,13 +221,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
221
221
|
status: 200;
|
|
222
222
|
input: {
|
|
223
223
|
json: {
|
|
224
|
-
requestIds: string[];
|
|
225
|
-
mode?: "all" | "any" | "one" | undefined;
|
|
226
|
-
timeoutSeconds?: number | undefined;
|
|
227
|
-
} | {
|
|
228
224
|
workerIds: string[];
|
|
229
225
|
timeoutSeconds?: number | undefined;
|
|
230
226
|
mode?: "all" | "any" | "one" | undefined;
|
|
227
|
+
} | {
|
|
228
|
+
requestIds: string[];
|
|
229
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
230
|
+
timeoutSeconds?: number | undefined;
|
|
231
231
|
} | {
|
|
232
232
|
peerIds: string[];
|
|
233
233
|
timeoutSeconds?: number | undefined;
|
|
@@ -613,6 +613,18 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
613
613
|
} & {
|
|
614
614
|
"/:workerId": {
|
|
615
615
|
$get: {
|
|
616
|
+
output: {
|
|
617
|
+
error: string;
|
|
618
|
+
code?: "invalid_input" | undefined;
|
|
619
|
+
};
|
|
620
|
+
outputFormat: "json";
|
|
621
|
+
status: 400;
|
|
622
|
+
input: {
|
|
623
|
+
param: {
|
|
624
|
+
workerId: string;
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
} | {
|
|
616
628
|
output: {
|
|
617
629
|
workerId: string;
|
|
618
630
|
parentRunId: string;
|
|
@@ -708,6 +720,10 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
708
720
|
summary?: string | undefined;
|
|
709
721
|
revision?: number | undefined;
|
|
710
722
|
} | undefined;
|
|
723
|
+
scope?: {
|
|
724
|
+
backend: "cgroup" | "groups";
|
|
725
|
+
guarantee: "contained" | "scoped";
|
|
726
|
+
} | undefined;
|
|
711
727
|
};
|
|
712
728
|
outputFormat: "json";
|
|
713
729
|
status: 200;
|
|
@@ -716,7 +732,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
716
732
|
workerId: string;
|
|
717
733
|
};
|
|
718
734
|
};
|
|
719
|
-
}
|
|
735
|
+
};
|
|
736
|
+
};
|
|
737
|
+
} & {
|
|
738
|
+
"/:workerId/collect": {
|
|
739
|
+
$post: {
|
|
720
740
|
output: {
|
|
721
741
|
error: string;
|
|
722
742
|
code?: "invalid_input" | undefined;
|
|
@@ -727,12 +747,10 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
727
747
|
param: {
|
|
728
748
|
workerId: string;
|
|
729
749
|
};
|
|
750
|
+
} & {
|
|
751
|
+
json: Record<string, never>;
|
|
730
752
|
};
|
|
731
|
-
}
|
|
732
|
-
};
|
|
733
|
-
} & {
|
|
734
|
-
"/:workerId/collect": {
|
|
735
|
-
$post: {
|
|
753
|
+
} | {
|
|
736
754
|
output: {
|
|
737
755
|
workerId: string;
|
|
738
756
|
parentRunId: string;
|
|
@@ -834,7 +852,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
834
852
|
} & {
|
|
835
853
|
json: Record<string, never>;
|
|
836
854
|
};
|
|
837
|
-
}
|
|
855
|
+
};
|
|
856
|
+
};
|
|
857
|
+
} & {
|
|
858
|
+
"/:workerId/steer": {
|
|
859
|
+
$post: {
|
|
838
860
|
output: {
|
|
839
861
|
error: string;
|
|
840
862
|
code?: "invalid_input" | undefined;
|
|
@@ -846,13 +868,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
846
868
|
workerId: string;
|
|
847
869
|
};
|
|
848
870
|
} & {
|
|
849
|
-
json:
|
|
871
|
+
json: {
|
|
872
|
+
text: string;
|
|
873
|
+
};
|
|
850
874
|
};
|
|
851
|
-
}
|
|
852
|
-
};
|
|
853
|
-
} & {
|
|
854
|
-
"/:workerId/steer": {
|
|
855
|
-
$post: {
|
|
875
|
+
} | {
|
|
856
876
|
output: {
|
|
857
877
|
workerId: string;
|
|
858
878
|
state: "delivered" | "queued";
|
|
@@ -868,7 +888,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
868
888
|
text: string;
|
|
869
889
|
};
|
|
870
890
|
};
|
|
871
|
-
}
|
|
891
|
+
};
|
|
892
|
+
};
|
|
893
|
+
} & {
|
|
894
|
+
"/:workerId/stop": {
|
|
895
|
+
$post: {
|
|
872
896
|
output: {
|
|
873
897
|
error: string;
|
|
874
898
|
code?: "invalid_input" | undefined;
|
|
@@ -880,15 +904,9 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
880
904
|
workerId: string;
|
|
881
905
|
};
|
|
882
906
|
} & {
|
|
883
|
-
json:
|
|
884
|
-
text: string;
|
|
885
|
-
};
|
|
907
|
+
json: Record<string, never>;
|
|
886
908
|
};
|
|
887
|
-
}
|
|
888
|
-
};
|
|
889
|
-
} & {
|
|
890
|
-
"/:workerId/stop": {
|
|
891
|
-
$post: {
|
|
909
|
+
} | {
|
|
892
910
|
output: {
|
|
893
911
|
workerId: string;
|
|
894
912
|
state: "stopping" | "terminated";
|
|
@@ -902,7 +920,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
902
920
|
} & {
|
|
903
921
|
json: Record<string, never>;
|
|
904
922
|
};
|
|
905
|
-
}
|
|
923
|
+
};
|
|
924
|
+
};
|
|
925
|
+
} & {
|
|
926
|
+
"/:workerId/destroy": {
|
|
927
|
+
$post: {
|
|
906
928
|
output: {
|
|
907
929
|
error: string;
|
|
908
930
|
code?: "invalid_input" | undefined;
|
|
@@ -916,11 +938,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
916
938
|
} & {
|
|
917
939
|
json: Record<string, never>;
|
|
918
940
|
};
|
|
919
|
-
}
|
|
920
|
-
};
|
|
921
|
-
} & {
|
|
922
|
-
"/:workerId/destroy": {
|
|
923
|
-
$post: {
|
|
941
|
+
} | {
|
|
924
942
|
output: {
|
|
925
943
|
workerId: string;
|
|
926
944
|
state: "complete" | "incomplete";
|
|
@@ -943,20 +961,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
943
961
|
} & {
|
|
944
962
|
json: Record<string, never>;
|
|
945
963
|
};
|
|
946
|
-
} | {
|
|
947
|
-
output: {
|
|
948
|
-
error: string;
|
|
949
|
-
code?: "invalid_input" | undefined;
|
|
950
|
-
};
|
|
951
|
-
outputFormat: "json";
|
|
952
|
-
status: 400;
|
|
953
|
-
input: {
|
|
954
|
-
param: {
|
|
955
|
-
workerId: string;
|
|
956
|
-
};
|
|
957
|
-
} & {
|
|
958
|
-
json: Record<string, never>;
|
|
959
|
-
};
|
|
960
964
|
} | {
|
|
961
965
|
output: {
|
|
962
966
|
workerId: string;
|
|
@@ -986,13 +990,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
986
990
|
"/:workerId/diff": {
|
|
987
991
|
$get: {
|
|
988
992
|
output: {
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
diff: string;
|
|
992
|
-
truncated: boolean;
|
|
993
|
+
error: string;
|
|
994
|
+
code?: "invalid_input" | undefined;
|
|
993
995
|
};
|
|
994
996
|
outputFormat: "json";
|
|
995
|
-
status:
|
|
997
|
+
status: 400;
|
|
996
998
|
input: {
|
|
997
999
|
param: {
|
|
998
1000
|
workerId: string;
|
|
@@ -1000,11 +1002,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1000
1002
|
};
|
|
1001
1003
|
} | {
|
|
1002
1004
|
output: {
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
+
workerId: string;
|
|
1006
|
+
baselineSha: string;
|
|
1007
|
+
diff: string;
|
|
1008
|
+
truncated: boolean;
|
|
1005
1009
|
};
|
|
1006
1010
|
outputFormat: "json";
|
|
1007
|
-
status:
|
|
1011
|
+
status: 200;
|
|
1008
1012
|
input: {
|
|
1009
1013
|
param: {
|
|
1010
1014
|
workerId: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RunStore } from '../runs/store.ts';
|
|
2
2
|
/**
|
|
3
3
|
* Keep terminal cleanup intent in the generation checkpoint as well as the index. Retain and
|
|
4
|
-
* retry unknown evidence. One timer
|
|
4
|
+
* retry unknown evidence. One timer serves pending cleanup.
|
|
5
5
|
*/
|
|
6
6
|
export declare class WorkerScratchCleanup {
|
|
7
7
|
private store;
|
|
@@ -2,11 +2,10 @@ import { autosaveCleanupIds } from '../autosave-cleanup.js';
|
|
|
2
2
|
import { agentTmpDirLocations, agentTmpDirMayExist, removeAgentTmpDir, sweepAgentTmpDirs } from '../runs/agent-tmpdir.js';
|
|
3
3
|
import { jobRunsIn } from '../jobs/job.js';
|
|
4
4
|
import { workerEvidenceRunIds } from '../runs/worker-execution.js';
|
|
5
|
-
import { sharedCwdScan } from './process-liveness.js';
|
|
6
5
|
import { noJitter, retryDelayMs, SCRATCH_BACKOFF } from './retry-backoff.js';
|
|
7
6
|
/**
|
|
8
7
|
* Keep terminal cleanup intent in the generation checkpoint as well as the index. Retain and
|
|
9
|
-
* retry unknown evidence. One timer
|
|
8
|
+
* retry unknown evidence. One timer serves pending cleanup.
|
|
10
9
|
*/
|
|
11
10
|
export class WorkerScratchCleanup {
|
|
12
11
|
store;
|
|
@@ -121,31 +120,29 @@ export class WorkerScratchCleanup {
|
|
|
121
120
|
this.timer = undefined;
|
|
122
121
|
if (!this.enabled)
|
|
123
122
|
return;
|
|
124
|
-
// Ids due within 5 % of the fast cadence ride along,
|
|
125
|
-
//
|
|
123
|
+
// Ids due within 5 % of the fast cadence ride along, and every id this tick retains is
|
|
124
|
+
// re-armed from the same instant, so they stay together.
|
|
126
125
|
const now = Date.now();
|
|
127
126
|
const dueBy = Math.max(this.armedFor, now) + this.backoff.fastMs / 20;
|
|
128
|
-
const cwds = sharedCwdScan();
|
|
129
127
|
this.ticking = true;
|
|
130
128
|
try {
|
|
131
129
|
for (const [id, pending] of [...this.due])
|
|
132
130
|
if (pending.at <= dueBy)
|
|
133
|
-
this.probe(id, pending,
|
|
131
|
+
this.probe(id, pending, now);
|
|
134
132
|
}
|
|
135
133
|
finally {
|
|
136
134
|
this.ticking = false;
|
|
137
135
|
}
|
|
138
136
|
this.wake();
|
|
139
137
|
}
|
|
140
|
-
probe(id, { attempts, generation, resourceId },
|
|
138
|
+
probe(id, { attempts, generation, resourceId }, now) {
|
|
141
139
|
this.due.delete(id);
|
|
142
140
|
const execution = this.store.readWorkerExecution(id);
|
|
143
141
|
// No await between ownership/generation + holder proof and rm. Admission is synchronous
|
|
144
|
-
// too, so a queued stale callback can never touch the next generation's scratch.
|
|
145
|
-
// shared snapshot is this synchronous tick's: it never outlives a yield.
|
|
142
|
+
// too, so a queued stale callback can never touch the next generation's scratch.
|
|
146
143
|
try {
|
|
147
144
|
if (generation && resourceId && execution?.generation === generation && !this.busy(id) &&
|
|
148
|
-
this.store.workerScratchResourcesSafe(id, generation, resourceId
|
|
145
|
+
this.store.workerScratchResourcesSafe(id, generation, resourceId) &&
|
|
149
146
|
// A job started in the scratch keeps it until the job ends (hearsay-tools/squawk#3138).
|
|
150
147
|
!jobRunsIn(agentTmpDirLocations(this.dataDir, id)))
|
|
151
148
|
removeAgentTmpDir(this.dataDir, id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scratch-cleanup.js","sourceRoot":"","sources":["../../src/delegation/scratch-cleanup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AA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727,7 +727,8 @@ export class DelegationService {
|
|
|
727
727
|
...(worker.runner === undefined ? {} : { backend: worker.runner }), ...(worker.model === undefined ? {} : { model: worker.model }),
|
|
728
728
|
...(worker.delegation.context === undefined ? {} : { inputs: worker.delegation.context.inputs }),
|
|
729
729
|
...(worker.currentStepId === undefined ? {} : { currentStepId: worker.currentStepId }),
|
|
730
|
-
...(wait ? { wait } : {}), ...(completionWait ? { completionWait } : {}), ...(worker.delegation.destroy ? { destroy: workerDestroyView(worker) } : {}), ...(outcome ? { outcome } : {})
|
|
730
|
+
...(wait ? { wait } : {}), ...(completionWait ? { completionWait } : {}), ...(worker.delegation.destroy ? { destroy: workerDestroyView(worker) } : {}), ...(outcome ? { outcome } : {}),
|
|
731
|
+
scope: project.store.scopes.describe() };
|
|
731
732
|
}
|
|
732
733
|
/** The wait an inspection shows: the newest open or owed list wait naming the worker, in the
|
|
733
734
|
* legacy `WorkerWait` shape (hearsay-tools/cezarion#1235). Squawk's completion wait carries no
|