@hearsay-tools/squawk 0.18.0-pr3661.6630 → 0.18.0-pr3663.6631
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/tool-catalog.js +1 -1
- package/dist/ci-wait/tool-catalog.js.map +1 -1
- package/dist/ci-wait/tools.d.ts +4 -4
- package/dist/delegation/routes.d.ts +62 -62
- package/dist/delegation/scratch-cleanup.js +3 -6
- package/dist/delegation/scratch-cleanup.js.map +1 -1
- package/dist/delegation/transport.d.ts +78 -78
- package/dist/jobs/cli.js +2 -4
- package/dist/jobs/cli.js.map +1 -1
- package/dist/jobs/job.d.ts +0 -7
- package/dist/jobs/job.js +3 -32
- package/dist/jobs/job.js.map +1 -1
- package/dist/runs/agent-tmpdir.d.ts +2 -3
- package/dist/runs/agent-tmpdir.js +4 -11
- package/dist/runs/agent-tmpdir.js.map +1 -1
- package/dist/runs/store.js +4 -4
- package/dist/runs/store.js.map +1 -1
- package/dist/serve-boot.d.ts +1 -2
- package/dist/serve-command.js +25 -15
- package/dist/serve-command.js.map +1 -1
- package/dist/serve-stop.d.ts +41 -0
- package/dist/serve-stop.js +42 -0
- package/dist/serve-stop.js.map +1 -0
- package/dist/server/activity-routes.d.ts +23 -23
- package/dist/workflows/run/run-settlement.d.ts +0 -1
- package/dist/workflows/run/run-settlement.js +2 -6
- package/dist/workflows/run/run-settlement.js.map +1 -1
- package/package.json +4 -4
|
@@ -58,7 +58,7 @@ export const waitToolDefinition = {
|
|
|
58
58
|
'`hsq job start <name> -- <command> [args...]` (your instructions give the full command for this session under "Long commands") ' +
|
|
59
59
|
'and pass the `pid` and `exitFile` it prints as `pid` and `exit_file`, so the wake reports the exit code. ' +
|
|
60
60
|
`It writes the command's output to the \`log\` file it prints, refuses a name that still runs, and the job outlives this session; ${productName('Cezar')} does not stop it. ` +
|
|
61
|
-
`Its files are in $TMPDIR,
|
|
61
|
+
`Its files are in $TMPDIR, which ${productName('Cezar')} removes when the task ends: for a job that must outlive the task, add \`--dir <a git-ignored directory in the worktree>\` before \`--\`. ` +
|
|
62
62
|
'Do not start a long command with `&`, `nohup`, `setsid` or your own background-task tool: it can end with the shell call or the session, or leave you a PID that is not the command\'s. ' +
|
|
63
63
|
// A batch that writes its exit file outside $TMPDIR made agents start a watcher to copy it in.
|
|
64
64
|
'For a command that is already running, or that writes its own status file somewhere else, pass only its `pid` and leave `exit_file` out. ' +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-catalog.js","sourceRoot":"","sources":["../../src/ci-wait/tool-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7J,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAC3G,OAAO,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AACtH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,2FAA2F;AAC3F,MAAM,UAAU,kBAAkB,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG;IACrE,OAAO,UAAU,CAAC,SAAS,EAAE,GAAG,CAAC,KAAK,GAAG,CAAC;AAC5C,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,sBAAsB,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG;IACzE,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC;AACjC,CAAC;AAED;;;;GAIG;AACH,SAAS,mBAAmB;IAC1B,MAAM,UAAU,GAA4B,EAAE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;
|
|
250
250
|
details: {
|
|
251
|
+
ok: false;
|
|
252
|
+
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
253
|
+
message: string;
|
|
254
|
+
} | {
|
|
251
255
|
ok: true;
|
|
252
256
|
task: {
|
|
253
257
|
id: string;
|
|
@@ -259,10 +263,6 @@ export declare function invokeScheduleTaskTool(input: unknown): Promise<{
|
|
|
259
263
|
url?: string | undefined;
|
|
260
264
|
};
|
|
261
265
|
note: string;
|
|
262
|
-
} | {
|
|
263
|
-
ok: false;
|
|
264
|
-
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
265
|
-
message: string;
|
|
266
266
|
};
|
|
267
267
|
}>;
|
|
268
268
|
export declare function invokeScheduledTasksTool(input: unknown): Promise<{
|
|
@@ -27,18 +27,6 @@ export declare function delegationFailure(error: unknown): {
|
|
|
27
27
|
export declare function createDelegationRoutes(service: DelegationService, credentials: CredentialRegistry): import("hono/hono-base").HonoBase<Env, {
|
|
28
28
|
"/list": {
|
|
29
29
|
$get: {
|
|
30
|
-
output: {
|
|
31
|
-
error: string;
|
|
32
|
-
code?: "invalid_input" | undefined;
|
|
33
|
-
};
|
|
34
|
-
outputFormat: "json";
|
|
35
|
-
status: 400;
|
|
36
|
-
input: {
|
|
37
|
-
query: {
|
|
38
|
-
offset?: string | undefined;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
} | {
|
|
42
30
|
output: {
|
|
43
31
|
workers: {
|
|
44
32
|
workerId: string;
|
|
@@ -76,6 +64,18 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
76
64
|
offset?: string | undefined;
|
|
77
65
|
};
|
|
78
66
|
};
|
|
67
|
+
} | {
|
|
68
|
+
output: {
|
|
69
|
+
error: string;
|
|
70
|
+
code?: "invalid_input" | undefined;
|
|
71
|
+
};
|
|
72
|
+
outputFormat: "json";
|
|
73
|
+
status: 400;
|
|
74
|
+
input: {
|
|
75
|
+
query: {
|
|
76
|
+
offset?: string | undefined;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
81
|
} & {
|
|
@@ -613,18 +613,6 @@ 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
|
-
} | {
|
|
628
616
|
output: {
|
|
629
617
|
workerId: string;
|
|
630
618
|
parentRunId: string;
|
|
@@ -728,11 +716,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
728
716
|
workerId: string;
|
|
729
717
|
};
|
|
730
718
|
};
|
|
731
|
-
}
|
|
732
|
-
};
|
|
733
|
-
} & {
|
|
734
|
-
"/:workerId/collect": {
|
|
735
|
-
$post: {
|
|
719
|
+
} | {
|
|
736
720
|
output: {
|
|
737
721
|
error: string;
|
|
738
722
|
code?: "invalid_input" | undefined;
|
|
@@ -743,10 +727,12 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
743
727
|
param: {
|
|
744
728
|
workerId: string;
|
|
745
729
|
};
|
|
746
|
-
} & {
|
|
747
|
-
json: Record<string, never>;
|
|
748
730
|
};
|
|
749
|
-
}
|
|
731
|
+
};
|
|
732
|
+
};
|
|
733
|
+
} & {
|
|
734
|
+
"/:workerId/collect": {
|
|
735
|
+
$post: {
|
|
750
736
|
output: {
|
|
751
737
|
workerId: string;
|
|
752
738
|
parentRunId: string;
|
|
@@ -848,11 +834,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
848
834
|
} & {
|
|
849
835
|
json: Record<string, never>;
|
|
850
836
|
};
|
|
851
|
-
}
|
|
852
|
-
};
|
|
853
|
-
} & {
|
|
854
|
-
"/:workerId/steer": {
|
|
855
|
-
$post: {
|
|
837
|
+
} | {
|
|
856
838
|
output: {
|
|
857
839
|
error: string;
|
|
858
840
|
code?: "invalid_input" | undefined;
|
|
@@ -864,11 +846,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
864
846
|
workerId: string;
|
|
865
847
|
};
|
|
866
848
|
} & {
|
|
867
|
-
json:
|
|
868
|
-
text: string;
|
|
869
|
-
};
|
|
849
|
+
json: Record<string, never>;
|
|
870
850
|
};
|
|
871
|
-
}
|
|
851
|
+
};
|
|
852
|
+
};
|
|
853
|
+
} & {
|
|
854
|
+
"/:workerId/steer": {
|
|
855
|
+
$post: {
|
|
872
856
|
output: {
|
|
873
857
|
workerId: string;
|
|
874
858
|
state: "delivered" | "queued";
|
|
@@ -884,11 +868,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
884
868
|
text: string;
|
|
885
869
|
};
|
|
886
870
|
};
|
|
887
|
-
}
|
|
888
|
-
};
|
|
889
|
-
} & {
|
|
890
|
-
"/:workerId/stop": {
|
|
891
|
-
$post: {
|
|
871
|
+
} | {
|
|
892
872
|
output: {
|
|
893
873
|
error: string;
|
|
894
874
|
code?: "invalid_input" | undefined;
|
|
@@ -900,9 +880,15 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
900
880
|
workerId: string;
|
|
901
881
|
};
|
|
902
882
|
} & {
|
|
903
|
-
json:
|
|
883
|
+
json: {
|
|
884
|
+
text: string;
|
|
885
|
+
};
|
|
904
886
|
};
|
|
905
|
-
}
|
|
887
|
+
};
|
|
888
|
+
};
|
|
889
|
+
} & {
|
|
890
|
+
"/:workerId/stop": {
|
|
891
|
+
$post: {
|
|
906
892
|
output: {
|
|
907
893
|
workerId: string;
|
|
908
894
|
state: "stopping" | "terminated";
|
|
@@ -916,11 +902,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
916
902
|
} & {
|
|
917
903
|
json: Record<string, never>;
|
|
918
904
|
};
|
|
919
|
-
}
|
|
920
|
-
};
|
|
921
|
-
} & {
|
|
922
|
-
"/:workerId/destroy": {
|
|
923
|
-
$post: {
|
|
905
|
+
} | {
|
|
924
906
|
output: {
|
|
925
907
|
error: string;
|
|
926
908
|
code?: "invalid_input" | undefined;
|
|
@@ -934,7 +916,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
934
916
|
} & {
|
|
935
917
|
json: Record<string, never>;
|
|
936
918
|
};
|
|
937
|
-
}
|
|
919
|
+
};
|
|
920
|
+
};
|
|
921
|
+
} & {
|
|
922
|
+
"/:workerId/destroy": {
|
|
923
|
+
$post: {
|
|
938
924
|
output: {
|
|
939
925
|
workerId: string;
|
|
940
926
|
state: "complete" | "incomplete";
|
|
@@ -957,6 +943,20 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
957
943
|
} & {
|
|
958
944
|
json: Record<string, never>;
|
|
959
945
|
};
|
|
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
960
|
} | {
|
|
961
961
|
output: {
|
|
962
962
|
workerId: string;
|
|
@@ -986,11 +986,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
986
986
|
"/:workerId/diff": {
|
|
987
987
|
$get: {
|
|
988
988
|
output: {
|
|
989
|
-
|
|
990
|
-
|
|
989
|
+
workerId: string;
|
|
990
|
+
baselineSha: string;
|
|
991
|
+
diff: string;
|
|
992
|
+
truncated: boolean;
|
|
991
993
|
};
|
|
992
994
|
outputFormat: "json";
|
|
993
|
-
status:
|
|
995
|
+
status: 200;
|
|
994
996
|
input: {
|
|
995
997
|
param: {
|
|
996
998
|
workerId: string;
|
|
@@ -998,13 +1000,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
998
1000
|
};
|
|
999
1001
|
} | {
|
|
1000
1002
|
output: {
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
diff: string;
|
|
1004
|
-
truncated: boolean;
|
|
1003
|
+
error: string;
|
|
1004
|
+
code?: "invalid_input" | undefined;
|
|
1005
1005
|
};
|
|
1006
1006
|
outputFormat: "json";
|
|
1007
|
-
status:
|
|
1007
|
+
status: 400;
|
|
1008
1008
|
input: {
|
|
1009
1009
|
param: {
|
|
1010
1010
|
workerId: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { autosaveCleanupIds } from '../autosave-cleanup.js';
|
|
2
|
-
import {
|
|
3
|
-
import { jobRunsIn } from '../jobs/job.js';
|
|
2
|
+
import { agentTmpDirMayExist, removeAgentTmpDir, sweepAgentTmpDirs } from '../runs/agent-tmpdir.js';
|
|
4
3
|
import { workerEvidenceRunIds } from '../runs/worker-execution.js';
|
|
5
4
|
import { sharedCwdScan } from './process-liveness.js';
|
|
6
5
|
import { noJitter, retryDelayMs, SCRATCH_BACKOFF } from './retry-backoff.js';
|
|
@@ -54,7 +53,7 @@ export class WorkerScratchCleanup {
|
|
|
54
53
|
// their scratch is theirs.
|
|
55
54
|
if (autosaves)
|
|
56
55
|
sweepAgentTmpDirs(this.dataDir, [...new Set([...live.filter(run => this.busy(run.id) || ['queued', 'running', 'waiting'].includes(run.status)).map(run => run.id), ...owners,
|
|
57
|
-
...this.store.listForeignClaimedRunIds(), ...(autosaves ?? [])])]
|
|
56
|
+
...this.store.listForeignClaimedRunIds(), ...(autosaves ?? [])])]);
|
|
58
57
|
if (!retained || !autosaves) { // failed enumeration must not permanently lose a wake source
|
|
59
58
|
this.recoveryTimer = setTimeout(() => this.recover(), 60_000);
|
|
60
59
|
this.recoveryTimer.unref?.();
|
|
@@ -145,9 +144,7 @@ export class WorkerScratchCleanup {
|
|
|
145
144
|
// shared snapshot is this synchronous tick's: it never outlives a yield.
|
|
146
145
|
try {
|
|
147
146
|
if (generation && resourceId && execution?.generation === generation && !this.busy(id) &&
|
|
148
|
-
this.store.workerScratchResourcesSafe(id, generation, resourceId, cwds)
|
|
149
|
-
// A job started in the scratch keeps it until the job ends (hearsay-tools/squawk#3138).
|
|
150
|
-
!jobRunsIn(agentTmpDirLocations(this.dataDir, id)))
|
|
147
|
+
this.store.workerScratchResourcesSafe(id, generation, resourceId, cwds))
|
|
151
148
|
removeAgentTmpDir(this.dataDir, id);
|
|
152
149
|
}
|
|
153
150
|
catch { /* Transient evidence/read failures retain the durable intent for another wake. */ }
|
|
@@ -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;AAC5D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"scratch-cleanup.js","sourceRoot":"","sources":["../../src/delegation/scratch-cleanup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACpG,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,OAAO,EAAE,aAAa,EAAkB,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,eAAe,EAAgB,MAAM,oBAAoB,CAAC;AAI3F;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IAUX,KAAK;IAAoB,OAAO;IAAkB,IAAI;IATlE,GAAG,GAAG,IAAI,GAAG,EAAmB,CAAC;IACjC,KAAK,CAA8B;IAC3C,sFAAsF;IAC9E,QAAQ,GAAG,CAAC,CAAC;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AC;gBAAE,iBAAiB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QACjH,CAAC;QAAC,MAAM,CAAC,CAAC,kFAAkF,CAAC,CAAC;QAC9F,2EAA2E;QAC3E,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,QAAQ,GAAG,CAAC,EAAE,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,GAAG,CAAC,CAAC;IAClF,CAAC;CACF"}
|
|
@@ -2,6 +2,18 @@ import type { DelegationRoutes } from './routes.ts';
|
|
|
2
2
|
export declare function createDelegationApp(routes: DelegationRoutes): import("hono/hono-base").HonoBase<import("hono/types").BlankEnv, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
|
|
3
3
|
"/list": {
|
|
4
4
|
$get: {
|
|
5
|
+
output: {
|
|
6
|
+
error: string;
|
|
7
|
+
code?: "invalid_input" | undefined;
|
|
8
|
+
};
|
|
9
|
+
outputFormat: "json";
|
|
10
|
+
status: 400;
|
|
11
|
+
input: {
|
|
12
|
+
query: {
|
|
13
|
+
offset?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
} | {
|
|
5
17
|
output: {
|
|
6
18
|
workers: {
|
|
7
19
|
workerId: string;
|
|
@@ -39,24 +51,24 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
39
51
|
offset?: string | undefined;
|
|
40
52
|
};
|
|
41
53
|
};
|
|
42
|
-
} | {
|
|
43
|
-
output: {
|
|
44
|
-
error: string;
|
|
45
|
-
code?: "invalid_input" | undefined;
|
|
46
|
-
};
|
|
47
|
-
outputFormat: "json";
|
|
48
|
-
status: 400;
|
|
49
|
-
input: {
|
|
50
|
-
query: {
|
|
51
|
-
offset?: string | undefined;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
56
|
} & {
|
|
57
57
|
"/discover": {
|
|
58
58
|
$post: {
|
|
59
59
|
output: {
|
|
60
|
+
tasks: {
|
|
61
|
+
id: string;
|
|
62
|
+
title: string;
|
|
63
|
+
runner?: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi" | undefined;
|
|
64
|
+
status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
|
|
65
|
+
attention: "error" | "none" | "permission" | "running" | "unseen" | "waiting";
|
|
66
|
+
attentionLabel: string;
|
|
67
|
+
accepts: boolean;
|
|
68
|
+
reason?: string | undefined;
|
|
69
|
+
}[];
|
|
70
|
+
nextOffset?: number | undefined;
|
|
71
|
+
} | {
|
|
60
72
|
scope: "host-default-account";
|
|
61
73
|
runners: {
|
|
62
74
|
status: "connected" | "disconnected" | "not-installed" | "unknown";
|
|
@@ -76,18 +88,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
76
88
|
source: "cache" | "live" | "unavailable";
|
|
77
89
|
stale: boolean;
|
|
78
90
|
reason?: string | undefined;
|
|
79
|
-
} | {
|
|
80
|
-
tasks: {
|
|
81
|
-
id: string;
|
|
82
|
-
title: string;
|
|
83
|
-
runner?: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi" | undefined;
|
|
84
|
-
status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
|
|
85
|
-
attention: "error" | "none" | "permission" | "running" | "unseen" | "waiting";
|
|
86
|
-
attentionLabel: string;
|
|
87
|
-
accepts: boolean;
|
|
88
|
-
reason?: string | undefined;
|
|
89
|
-
}[];
|
|
90
|
-
nextOffset?: number | undefined;
|
|
91
91
|
};
|
|
92
92
|
outputFormat: "json";
|
|
93
93
|
status: 200;
|
|
@@ -196,13 +196,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
196
196
|
status: 200;
|
|
197
197
|
input: {
|
|
198
198
|
json: {
|
|
199
|
-
workerIds: string[];
|
|
200
|
-
timeoutSeconds?: number | undefined;
|
|
201
|
-
mode?: "all" | "any" | "one" | undefined;
|
|
202
|
-
} | {
|
|
203
199
|
requestIds: string[];
|
|
204
200
|
mode?: "all" | "any" | "one" | undefined;
|
|
205
201
|
timeoutSeconds?: number | undefined;
|
|
202
|
+
} | {
|
|
203
|
+
workerIds: string[];
|
|
204
|
+
timeoutSeconds?: number | undefined;
|
|
205
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
206
206
|
} | {
|
|
207
207
|
peerIds: string[];
|
|
208
208
|
timeoutSeconds?: number | undefined;
|
|
@@ -588,6 +588,18 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
588
588
|
} & {
|
|
589
589
|
"/:workerId": {
|
|
590
590
|
$get: {
|
|
591
|
+
output: {
|
|
592
|
+
error: string;
|
|
593
|
+
code?: "invalid_input" | undefined;
|
|
594
|
+
};
|
|
595
|
+
outputFormat: "json";
|
|
596
|
+
status: 400;
|
|
597
|
+
input: {
|
|
598
|
+
param: {
|
|
599
|
+
workerId: string;
|
|
600
|
+
};
|
|
601
|
+
};
|
|
602
|
+
} | {
|
|
591
603
|
output: {
|
|
592
604
|
workerId: string;
|
|
593
605
|
parentRunId: string;
|
|
@@ -691,7 +703,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
691
703
|
workerId: string;
|
|
692
704
|
};
|
|
693
705
|
};
|
|
694
|
-
}
|
|
706
|
+
};
|
|
707
|
+
};
|
|
708
|
+
} & {
|
|
709
|
+
"/:workerId/collect": {
|
|
710
|
+
$post: {
|
|
695
711
|
output: {
|
|
696
712
|
error: string;
|
|
697
713
|
code?: "invalid_input" | undefined;
|
|
@@ -702,12 +718,10 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
702
718
|
param: {
|
|
703
719
|
workerId: string;
|
|
704
720
|
};
|
|
721
|
+
} & {
|
|
722
|
+
json: Record<string, never>;
|
|
705
723
|
};
|
|
706
|
-
}
|
|
707
|
-
};
|
|
708
|
-
} & {
|
|
709
|
-
"/:workerId/collect": {
|
|
710
|
-
$post: {
|
|
724
|
+
} | {
|
|
711
725
|
output: {
|
|
712
726
|
workerId: string;
|
|
713
727
|
parentRunId: string;
|
|
@@ -809,7 +823,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
809
823
|
} & {
|
|
810
824
|
json: Record<string, never>;
|
|
811
825
|
};
|
|
812
|
-
}
|
|
826
|
+
};
|
|
827
|
+
};
|
|
828
|
+
} & {
|
|
829
|
+
"/:workerId/steer": {
|
|
830
|
+
$post: {
|
|
813
831
|
output: {
|
|
814
832
|
error: string;
|
|
815
833
|
code?: "invalid_input" | undefined;
|
|
@@ -821,13 +839,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
821
839
|
workerId: string;
|
|
822
840
|
};
|
|
823
841
|
} & {
|
|
824
|
-
json:
|
|
842
|
+
json: {
|
|
843
|
+
text: string;
|
|
844
|
+
};
|
|
825
845
|
};
|
|
826
|
-
}
|
|
827
|
-
};
|
|
828
|
-
} & {
|
|
829
|
-
"/:workerId/steer": {
|
|
830
|
-
$post: {
|
|
846
|
+
} | {
|
|
831
847
|
output: {
|
|
832
848
|
workerId: string;
|
|
833
849
|
state: "delivered" | "queued";
|
|
@@ -843,7 +859,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
843
859
|
text: string;
|
|
844
860
|
};
|
|
845
861
|
};
|
|
846
|
-
}
|
|
862
|
+
};
|
|
863
|
+
};
|
|
864
|
+
} & {
|
|
865
|
+
"/:workerId/stop": {
|
|
866
|
+
$post: {
|
|
847
867
|
output: {
|
|
848
868
|
error: string;
|
|
849
869
|
code?: "invalid_input" | undefined;
|
|
@@ -855,15 +875,9 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
855
875
|
workerId: string;
|
|
856
876
|
};
|
|
857
877
|
} & {
|
|
858
|
-
json:
|
|
859
|
-
text: string;
|
|
860
|
-
};
|
|
878
|
+
json: Record<string, never>;
|
|
861
879
|
};
|
|
862
|
-
}
|
|
863
|
-
};
|
|
864
|
-
} & {
|
|
865
|
-
"/:workerId/stop": {
|
|
866
|
-
$post: {
|
|
880
|
+
} | {
|
|
867
881
|
output: {
|
|
868
882
|
workerId: string;
|
|
869
883
|
state: "stopping" | "terminated";
|
|
@@ -877,7 +891,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
877
891
|
} & {
|
|
878
892
|
json: Record<string, never>;
|
|
879
893
|
};
|
|
880
|
-
}
|
|
894
|
+
};
|
|
895
|
+
};
|
|
896
|
+
} & {
|
|
897
|
+
"/:workerId/destroy": {
|
|
898
|
+
$post: {
|
|
881
899
|
output: {
|
|
882
900
|
error: string;
|
|
883
901
|
code?: "invalid_input" | undefined;
|
|
@@ -891,11 +909,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
891
909
|
} & {
|
|
892
910
|
json: Record<string, never>;
|
|
893
911
|
};
|
|
894
|
-
}
|
|
895
|
-
};
|
|
896
|
-
} & {
|
|
897
|
-
"/:workerId/destroy": {
|
|
898
|
-
$post: {
|
|
912
|
+
} | {
|
|
899
913
|
output: {
|
|
900
914
|
workerId: string;
|
|
901
915
|
state: "complete" | "incomplete";
|
|
@@ -918,20 +932,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
918
932
|
} & {
|
|
919
933
|
json: Record<string, never>;
|
|
920
934
|
};
|
|
921
|
-
} | {
|
|
922
|
-
output: {
|
|
923
|
-
error: string;
|
|
924
|
-
code?: "invalid_input" | undefined;
|
|
925
|
-
};
|
|
926
|
-
outputFormat: "json";
|
|
927
|
-
status: 400;
|
|
928
|
-
input: {
|
|
929
|
-
param: {
|
|
930
|
-
workerId: string;
|
|
931
|
-
};
|
|
932
|
-
} & {
|
|
933
|
-
json: Record<string, never>;
|
|
934
|
-
};
|
|
935
935
|
} | {
|
|
936
936
|
output: {
|
|
937
937
|
workerId: string;
|
|
@@ -961,13 +961,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
961
961
|
"/:workerId/diff": {
|
|
962
962
|
$get: {
|
|
963
963
|
output: {
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
diff: string;
|
|
967
|
-
truncated: boolean;
|
|
964
|
+
error: string;
|
|
965
|
+
code?: "invalid_input" | undefined;
|
|
968
966
|
};
|
|
969
967
|
outputFormat: "json";
|
|
970
|
-
status:
|
|
968
|
+
status: 400;
|
|
971
969
|
input: {
|
|
972
970
|
param: {
|
|
973
971
|
workerId: string;
|
|
@@ -975,11 +973,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
975
973
|
};
|
|
976
974
|
} | {
|
|
977
975
|
output: {
|
|
978
|
-
|
|
979
|
-
|
|
976
|
+
workerId: string;
|
|
977
|
+
baselineSha: string;
|
|
978
|
+
diff: string;
|
|
979
|
+
truncated: boolean;
|
|
980
980
|
};
|
|
981
981
|
outputFormat: "json";
|
|
982
|
-
status:
|
|
982
|
+
status: 200;
|
|
983
983
|
input: {
|
|
984
984
|
param: {
|
|
985
985
|
workerId: string;
|
package/dist/jobs/cli.js
CHANGED
|
@@ -15,10 +15,8 @@ status Print JSON: "state" is "running" or "exited", with "pid", "log",
|
|
|
15
15
|
"exitFile", and "exitCode" when the exit file holds one.
|
|
16
16
|
|
|
17
17
|
--dir <dir> Where the job's files live. Default: $TMPDIR, the task's temp
|
|
18
|
-
directory
|
|
19
|
-
|
|
20
|
-
task's next end, its archive or ${productName('Cezar')}'s next start, once no job
|
|
21
|
-
in it runs, and at once when the task's history is deleted.
|
|
18
|
+
directory, which ${productName('Cezar')} removes when the task ends. For a job that
|
|
19
|
+
must outlive the task, name a git-ignored directory in the worktree.
|
|
22
20
|
-h, --help Show this help.
|
|
23
21
|
|
|
24
22
|
The command runs without a shell. For a pipeline, pass: -- sh -c '<pipeline>'.`);
|
package/dist/jobs/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/jobs/cli.ts"],"names":[],"mappings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,MAAM,QAAQ,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;QACzE,OAAO,CAAC,CAAC;IACX,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,wBAAwB,EAAE,CAAC,CAAC,CAAC;QAC5G,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC"}
|
package/dist/jobs/job.d.ts
CHANGED
|
@@ -29,13 +29,6 @@ export declare class JobError extends Error {
|
|
|
29
29
|
export declare function jobDirectory(dir: string | undefined, env: NodeJS.ProcessEnv): string;
|
|
30
30
|
export declare function jobPaths(dir: string, name: string): JobPaths;
|
|
31
31
|
export declare function jobStatus(dir: string, name: string): JobStatus;
|
|
32
|
-
/**
|
|
33
|
-
* Whether a job recorded directly in one of `dirs` still runs (hearsay-tools/squawk#3138). Squawk
|
|
34
|
-
* keeps a task's temp directory while one does, so the job's log and exit code outlive the task. A
|
|
35
|
-
* record that cannot be read counts as running: it may belong to a supervisor that still runs. A
|
|
36
|
-
* directory that cannot be listed holds no job this can find.
|
|
37
|
-
*/
|
|
38
|
-
export declare function jobRunsIn(dirs: readonly string[]): boolean;
|
|
39
32
|
/** What the supervisor tells its starter: it holds the name, or another supervisor does. */
|
|
40
33
|
export type ClaimAnswer = {
|
|
41
34
|
claimed: true;
|