@hearsay-tools/squawk 0.18.0-dev.6083 → 0.18.0-dev.6087
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/artifacts/store.js +1 -1
- package/dist/artifacts/store.js.map +1 -1
- package/dist/automations/store.js +1 -1
- package/dist/automations/store.js.map +1 -1
- package/dist/ci-wait/controller.d.ts +41 -41
- package/dist/ci-wait/tools.d.ts +4 -4
- package/dist/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/core/process-stat.d.ts +36 -0
- package/dist/core/process-stat.js +101 -0
- package/dist/core/process-stat.js.map +1 -0
- package/dist/delegation/process-liveness.d.ts +2 -10
- package/dist/delegation/process-liveness.js +3 -42
- package/dist/delegation/process-liveness.js.map +1 -1
- package/dist/delegation/routes.d.ts +71 -71
- package/dist/delegation/transport.d.ts +66 -66
- package/dist/detached-process.d.ts +2 -23
- package/dist/detached-process.js +2 -61
- package/dist/detached-process.js.map +1 -1
- package/dist/home/leases.js +1 -1
- package/dist/home/leases.js.map +1 -1
- package/dist/home/migrate.js +1 -1
- package/dist/home/migrate.js.map +1 -1
- package/dist/home/migration-accounts.js +1 -1
- package/dist/home/migration-accounts.js.map +1 -1
- package/dist/home/migration-claim.js +1 -1
- package/dist/home/migration-claim.js.map +1 -1
- package/dist/home/private-files.js +1 -1
- package/dist/home/private-files.js.map +1 -1
- package/dist/home/process-identity.js +1 -1
- package/dist/home/process-identity.js.map +1 -1
- package/dist/home/write-lock.js +1 -1
- package/dist/home/write-lock.js.map +1 -1
- package/dist/project-fence.d.ts +63 -0
- package/dist/project-fence.js +146 -0
- package/dist/project-fence.js.map +1 -0
- package/dist/server/activity-routes.d.ts +23 -23
- package/dist/server/cockpit-ownership.d.ts +2 -59
- package/dist/server/cockpit-ownership.js +4 -143
- package/dist/server/cockpit-ownership.js.map +1 -1
- package/dist/server/server.d.ts +58 -58
- package/dist/server/workspace-live-routes.d.ts +6 -6
- package/dist/ui-state.js +1 -1
- package/dist/ui-state.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { spawnSync } from 'node:child_process';
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
/** Windows PowerShell 5.1, the one PowerShell every supported Windows host has. */
|
|
4
|
+
export const POWERSHELL = 'powershell.exe';
|
|
5
|
+
/**
|
|
6
|
+
* The environment for a Windows PowerShell 5.1 child. PowerShell 7 exports its own `PSModulePath`,
|
|
7
|
+
* and a 5.1 child that inherits it finds PowerShell 7's built-in modules first, so autoloading
|
|
8
|
+
* cmdlets such as `Set-Acl` or `Get-CimInstance` fails. Without the variable, 5.1 builds its
|
|
9
|
+
* default module path. Windows environment names ignore case, so every spelling goes.
|
|
10
|
+
*/
|
|
11
|
+
export function powershellEnv(env = process.env) {
|
|
12
|
+
return Object.fromEntries(Object.entries(env).filter(([name]) => name.toUpperCase() !== 'PSMODULEPATH'));
|
|
13
|
+
}
|
|
14
|
+
/** The fields after `comm` in a `/proc/<pid>/stat` line; `comm` may hold spaces and `)`, so the split is after the LAST `)`. */
|
|
15
|
+
export function statFields(stat) {
|
|
16
|
+
return stat.slice(stat.lastIndexOf(')') + 1).trim().split(/\s+/);
|
|
17
|
+
}
|
|
18
|
+
/** Whether the `/proc/<pid>/stat` fields are of an exited process. A leader whose main thread
|
|
19
|
+
* exited reads Z while its other threads run and keep its files open, a listening port among them,
|
|
20
|
+
* so it is exited only once `num_threads` (field 20) counts no thread but its own. */
|
|
21
|
+
export function exitedStat(fields) {
|
|
22
|
+
return /^[ZX]$/.test(fields[0] ?? '') && Number(fields[17]) <= 1;
|
|
23
|
+
}
|
|
24
|
+
/** `/proc/<pid>/stat` field 3 (`state`) and field 22 (`starttime`). */
|
|
25
|
+
export function parseProcStat(stat) {
|
|
26
|
+
const fields = statFields(stat);
|
|
27
|
+
return stat.includes(')') && fields.length >= 20 && /^\d+$/.test(fields[19])
|
|
28
|
+
? { state: fields[0], startToken: fields[19] } : undefined;
|
|
29
|
+
}
|
|
30
|
+
let bootId;
|
|
31
|
+
/** `starttime` counts ticks since boot, so it repeats across reboots; the boot id scopes it. */
|
|
32
|
+
export function linuxBootId() {
|
|
33
|
+
if (bootId === undefined) {
|
|
34
|
+
try {
|
|
35
|
+
bootId = readFileSync('/proc/sys/kernel/random/boot_id', 'utf8').trim() || null;
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
bootId = null;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return bootId ?? undefined;
|
|
42
|
+
}
|
|
43
|
+
/** One process incarnation, so a reused PID never matches. Absent when the platform cannot say. */
|
|
44
|
+
export function processStartToken(pid, platform = process.platform) {
|
|
45
|
+
if (!Number.isSafeInteger(pid) || pid <= 0)
|
|
46
|
+
return undefined;
|
|
47
|
+
if (platform === 'linux') {
|
|
48
|
+
let start;
|
|
49
|
+
try {
|
|
50
|
+
start = parseProcStat(readFileSync(`/proc/${pid}/stat`, 'utf8'))?.startToken;
|
|
51
|
+
}
|
|
52
|
+
catch { /* gone or unreadable */ }
|
|
53
|
+
const boot = linuxBootId();
|
|
54
|
+
return start && boot ? `${boot}:${start}` : start;
|
|
55
|
+
}
|
|
56
|
+
if (platform !== 'darwin')
|
|
57
|
+
return undefined;
|
|
58
|
+
// `lstart` is locale- and zone-formatted; pin both so the token is stable across cezar processes.
|
|
59
|
+
const ps = spawnSync('ps', ['-o', 'lstart=', '-p', String(pid)], { encoding: 'utf8', timeout: 2_000, env: { ...process.env, LC_ALL: 'C', TZ: 'UTC' } });
|
|
60
|
+
const token = ps.status === 0 ? ps.stdout.trim() : '';
|
|
61
|
+
return token || undefined;
|
|
62
|
+
}
|
|
63
|
+
export function pidExists(pid) {
|
|
64
|
+
if (!Number.isSafeInteger(pid) || pid <= 0)
|
|
65
|
+
return false;
|
|
66
|
+
try {
|
|
67
|
+
process.kill(pid, 0);
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
return error.code === 'EPERM';
|
|
71
|
+
}
|
|
72
|
+
if (process.platform !== 'linux')
|
|
73
|
+
return true;
|
|
74
|
+
// A zombie leader can still have live threads. Unreadable stat is not proof of exit.
|
|
75
|
+
try {
|
|
76
|
+
const stat = readFileSync(`/proc/${pid}/stat`, 'utf8');
|
|
77
|
+
return !exitedStat(stat.slice(stat.lastIndexOf(')') + 1).trim().split(/\s+/));
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const LINUX_TOKEN = /^(?:[0-9a-f-]{36}:)?(\d+)$/;
|
|
84
|
+
/** Liveness-only comparison: when exactly one Linux token lacks the boot id (it was unreadable on one
|
|
85
|
+
* side), the `starttime` suffix decides. Reaping still requires an exact match. */
|
|
86
|
+
export function sameIncarnation(recorded, current) {
|
|
87
|
+
if (recorded === current)
|
|
88
|
+
return true;
|
|
89
|
+
const a = LINUX_TOKEN.exec(recorded), b = LINUX_TOKEN.exec(current);
|
|
90
|
+
return !!a && !!b && recorded.includes(':') !== current.includes(':') && a[1] === b[1];
|
|
91
|
+
}
|
|
92
|
+
/** Live and the same incarnation. A token-less entry (or an unreadable current token) counts while the PID exists. */
|
|
93
|
+
export function recordedProcessLive(entry) {
|
|
94
|
+
if (!pidExists(entry.pid))
|
|
95
|
+
return false;
|
|
96
|
+
if (entry.startToken === undefined)
|
|
97
|
+
return true;
|
|
98
|
+
const current = processStartToken(entry.pid);
|
|
99
|
+
return current === undefined || sameIncarnation(entry.startToken, current);
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=process-stat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-stat.js","sourceRoot":"","sources":["../../src/core/process-stat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,mFAAmF;AACnF,MAAM,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C,IAAI,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACzF,CAAC;AAED,sHAAsH;AACtH,MAAM,UAAU,mBAAmB,CAAC,KAAsB;IACxD,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IACxC,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IAChD,MAAM,OAAO,GAAG,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC7C,OAAO,OAAO,KAAK,SAAS,IAAI,eAAe,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAC7E,CAAC"}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type RecordedProcess } from '../core/process-stat.ts';
|
|
2
2
|
/**
|
|
3
3
|
* Synchronous process evidence for worker recovery and resource cleanup. Unreadable cwd is no
|
|
4
4
|
* evidence; other uncertainty stays alive or unknown, never proven gone.
|
|
5
5
|
*/
|
|
6
|
-
export { parseProcStat, processStartToken };
|
|
7
|
-
/** `pgid`: the session leader leads its own process group (hearsay-tools/cezarion#890). */
|
|
8
|
-
export type RecordedProcess = {
|
|
9
|
-
pid: number;
|
|
10
|
-
startToken?: string | undefined;
|
|
11
|
-
pgid?: number | undefined;
|
|
12
|
-
};
|
|
6
|
+
export { parseProcStat, processStartToken, recordedProcessLive, type RecordedProcess } from '../core/process-stat.ts';
|
|
13
7
|
export type WorkerProcessRecord = {
|
|
14
8
|
generation: string;
|
|
15
9
|
controller: RecordedProcess;
|
|
@@ -18,8 +12,6 @@ export type WorkerProcessRecord = {
|
|
|
18
12
|
export type GenerationLiveness = 'gone' | 'alive' | 'unknown';
|
|
19
13
|
/** A different recorded Linux boot proves every original process group ended. */
|
|
20
14
|
export declare function processPredatesCurrentBoot(entry: RecordedProcess): boolean;
|
|
21
|
-
/** Live and the same incarnation. A token-less entry (or an unreadable current token) counts while the PID exists. */
|
|
22
|
-
export declare function recordedProcessLive(entry: RecordedProcess): boolean;
|
|
23
15
|
/** Whether a recorded session leader's group may be signalled (hearsay-tools/cezarion#890). A live
|
|
24
16
|
* leader must be the exact recorded incarnation; a different one means the group emptied and its
|
|
25
17
|
* number was reused. A dead leader proves nothing: its number may since have been reused, and a
|
|
@@ -1,34 +1,12 @@
|
|
|
1
1
|
import { spawnSync } from 'node:child_process';
|
|
2
|
-
import { readdirSync,
|
|
2
|
+
import { readdirSync, readlinkSync, realpathSync } from 'node:fs';
|
|
3
3
|
import { resolve, sep } from 'node:path';
|
|
4
|
-
import {
|
|
4
|
+
import { linuxBootId, processStartToken, pidExists, sameIncarnation, recordedProcessLive } from '../core/process-stat.js';
|
|
5
5
|
/**
|
|
6
6
|
* Synchronous process evidence for worker recovery and resource cleanup. Unreadable cwd is no
|
|
7
7
|
* evidence; other uncertainty stays alive or unknown, never proven gone.
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
|
-
export { parseProcStat, processStartToken };
|
|
11
|
-
function pidExists(pid) {
|
|
12
|
-
if (!Number.isSafeInteger(pid) || pid <= 0)
|
|
13
|
-
return false;
|
|
14
|
-
try {
|
|
15
|
-
process.kill(pid, 0);
|
|
16
|
-
}
|
|
17
|
-
catch (error) {
|
|
18
|
-
return error.code === 'EPERM';
|
|
19
|
-
}
|
|
20
|
-
if (process.platform !== 'linux')
|
|
21
|
-
return true;
|
|
22
|
-
// A zombie leader can still have live threads. Unreadable stat is not proof of exit.
|
|
23
|
-
try {
|
|
24
|
-
const stat = readFileSync(`/proc/${pid}/stat`, 'utf8');
|
|
25
|
-
return !exitedStat(stat.slice(stat.lastIndexOf(')') + 1).trim().split(/\s+/));
|
|
26
|
-
}
|
|
27
|
-
catch {
|
|
28
|
-
return true;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
const LINUX_TOKEN = /^(?:[0-9a-f-]{36}:)?(\d+)$/;
|
|
9
|
+
export { parseProcStat, processStartToken, recordedProcessLive } from '../core/process-stat.js';
|
|
32
10
|
const LINUX_BOOT_ID = /^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/;
|
|
33
11
|
/** A known different boot proves that no descendant of this controller can still exist. */
|
|
34
12
|
function controllerPredatesBoot(token, boot) {
|
|
@@ -39,23 +17,6 @@ function controllerPredatesBoot(token, boot) {
|
|
|
39
17
|
export function processPredatesCurrentBoot(entry) {
|
|
40
18
|
return process.platform === 'linux' && controllerPredatesBoot(entry.startToken, linuxBootId());
|
|
41
19
|
}
|
|
42
|
-
/** Liveness-only comparison: when exactly one Linux token lacks the boot id (it was unreadable on one
|
|
43
|
-
* side), the `starttime` suffix decides. Reaping still requires an exact match. */
|
|
44
|
-
function sameIncarnation(recorded, current) {
|
|
45
|
-
if (recorded === current)
|
|
46
|
-
return true;
|
|
47
|
-
const a = LINUX_TOKEN.exec(recorded), b = LINUX_TOKEN.exec(current);
|
|
48
|
-
return !!a && !!b && recorded.includes(':') !== current.includes(':') && a[1] === b[1];
|
|
49
|
-
}
|
|
50
|
-
/** Live and the same incarnation. A token-less entry (or an unreadable current token) counts while the PID exists. */
|
|
51
|
-
export function recordedProcessLive(entry) {
|
|
52
|
-
if (!pidExists(entry.pid))
|
|
53
|
-
return false;
|
|
54
|
-
if (entry.startToken === undefined)
|
|
55
|
-
return true;
|
|
56
|
-
const current = processStartToken(entry.pid);
|
|
57
|
-
return current === undefined || sameIncarnation(entry.startToken, current);
|
|
58
|
-
}
|
|
59
20
|
/** Whether a recorded session leader's group may be signalled (hearsay-tools/cezarion#890). A live
|
|
60
21
|
* leader must be the exact recorded incarnation; a different one means the group emptied and its
|
|
61
22
|
* number was reused. A dead leader proves nothing: its number may since have been reused, and a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-liveness.js","sourceRoot":"","sources":["../../src/delegation/process-liveness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"process-liveness.js","sourceRoot":"","sources":["../../src/delegation/process-liveness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,SAAS,EAAE,eAAe,EAAE,mBAAmB,EAAwB,MAAM,yBAAyB,CAAC;AAEhJ;;;GAGG;AACH,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAwB,MAAM,yBAAyB,CAAC;AAItH,MAAM,aAAa,GAAG,+CAA+C,CAAC;AACtE,2FAA2F;AAC3F,SAAS,sBAAsB,CAAC,KAAyB,EAAE,IAAwB;IACjF,MAAM,YAAY,GAAG,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACrD,OAAO,YAAY,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,IAAI,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,YAAY,KAAK,IAAI,CAAC;AACnJ,CAAC;AACD,iFAAiF;AACjF,MAAM,UAAU,0BAA0B,CAAC,KAAsB;IAC/D,OAAO,OAAO,CAAC,QAAQ,KAAK,OAAO,IAAI,sBAAsB,CAAC,KAAK,CAAC,UAAU,EAAE,WAAW,EAAE,CAAC,CAAC;AACjG,CAAC;AAED;;;;4FAI4F;AAC5F,MAAM,UA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,CAAC;QAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IAChJ,MAAM,KAAK,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;IACvC,uFAAuF;IACvF,6FAA6F;IAC7F,OAAO,KAAK,CAAC,QAAQ,KAAK,MAAM,IAAI,KAAK,CAAC,aAAa,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;AAChH,CAAC"}
|
|
@@ -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,12 +64,33 @@ 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
|
} & {
|
|
82
82
|
"/discover": {
|
|
83
83
|
$post: {
|
|
84
84
|
output: {
|
|
85
|
+
scope: "host-default-account";
|
|
86
|
+
runners: {
|
|
87
|
+
status: "connected" | "disconnected" | "not-installed" | "unknown";
|
|
88
|
+
enabled?: boolean | undefined;
|
|
89
|
+
hint?: string | undefined;
|
|
90
|
+
authFailureId?: string | undefined;
|
|
91
|
+
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
92
|
+
}[];
|
|
93
|
+
} | {
|
|
85
94
|
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
86
95
|
models: {
|
|
87
96
|
id: string;
|
|
@@ -92,15 +101,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
92
101
|
source: "cache" | "live" | "unavailable";
|
|
93
102
|
stale: boolean;
|
|
94
103
|
reason?: string | undefined;
|
|
95
|
-
} | {
|
|
96
|
-
scope: "host-default-account";
|
|
97
|
-
runners: {
|
|
98
|
-
status: "connected" | "disconnected" | "not-installed" | "unknown";
|
|
99
|
-
enabled?: boolean | undefined;
|
|
100
|
-
hint?: string | undefined;
|
|
101
|
-
authFailureId?: string | undefined;
|
|
102
|
-
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
103
|
-
}[];
|
|
104
104
|
} | {
|
|
105
105
|
tasks: {
|
|
106
106
|
id: string;
|
|
@@ -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;
|