@hearsay-tools/squawk 0.18.0-pr4230.8174 → 0.18.0-pr4234.8181
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/boot.d.ts +4 -2
- package/dist/boot.js +9 -5
- package/dist/boot.js.map +1 -1
- package/dist/built-in-run-slots.d.ts +1 -1
- package/dist/built-in-run-slots.js +1 -1
- package/dist/ci-wait/controller.d.ts +7 -7
- package/dist/core/agent-runner.d.ts +1 -1
- package/dist/core/agent-runner.js +1 -1
- package/dist/core/runner-registry.js +1 -1
- package/dist/core/runner-registry.js.map +1 -1
- package/dist/delegation/routes.d.ts +65 -65
- package/dist/pack-check.d.ts +8 -1
- package/dist/pack-check.js +25 -1
- package/dist/pack-check.js.map +1 -1
- package/dist/plugin/bundled-runners.d.ts +28 -0
- package/dist/plugin/bundled-runners.js +56 -0
- package/dist/plugin/bundled-runners.js.map +1 -0
- package/dist/plugin/cli.js +5 -4
- package/dist/plugin/cli.js.map +1 -1
- package/dist/plugin/loader.d.ts +10 -1
- package/dist/plugin/loader.js +31 -0
- package/dist/plugin/loader.js.map +1 -1
- package/dist/runners/antigravity/index.d.ts +6 -0
- package/dist/runners/antigravity/index.js +9 -0
- package/dist/runners/antigravity/index.js.map +1 -0
- package/dist/runners/claude/index.d.ts +6 -0
- package/dist/runners/claude/index.js +9 -0
- package/dist/runners/claude/index.js.map +1 -0
- package/dist/runners/codex/index.d.ts +6 -0
- package/dist/runners/codex/index.js +9 -0
- package/dist/runners/codex/index.js.map +1 -0
- package/dist/runners/omp/index.d.ts +6 -0
- package/dist/runners/omp/index.js +9 -0
- package/dist/runners/omp/index.js.map +1 -0
- package/dist/runners/opencode/index.d.ts +6 -0
- package/dist/runners/opencode/index.js +9 -0
- package/dist/runners/opencode/index.js.map +1 -0
- package/dist/runners/pi/index.d.ts +6 -0
- package/dist/runners/pi/index.js +9 -0
- package/dist/runners/pi/index.js.map +1 -0
- package/dist/server/runner-install-routes.d.ts +10 -10
- package/dist/server/server.d.ts +96 -96
- package/dist/server/workspace-live-routes.d.ts +6 -6
- package/package.json +4 -4
- package/scripts/benchmark-runtime.ts +5 -3
- package/scripts/check-pack.mjs +5 -2
- package/scripts/measure-transcript-facts-health.mjs +4 -3
- package/scripts/parity-rows.ts +1 -1
- package/dist/runners/built-in.d.ts +0 -10
- package/dist/runners/built-in.js +0 -20
- package/dist/runners/built-in.js.map +0 -1
- package/dist/runners/ids.d.ts +0 -8
- package/dist/runners/ids.js +0 -9
- package/dist/runners/ids.js.map +0 -1
package/dist/boot.d.ts
CHANGED
|
@@ -8,7 +8,8 @@ export declare function bootColdCli(): void;
|
|
|
8
8
|
export declare function hostPluginsDir(home: () => Home, warn?: (line: string) => void): string | undefined;
|
|
9
9
|
export interface BootRuntimeOptions {
|
|
10
10
|
/**
|
|
11
|
-
* The host plugin folder, `<config>/plugins/`. Its child folders load after the built-ins
|
|
11
|
+
* The host plugin folder, `<config>/plugins/`. Its child folders load after the built-ins and
|
|
12
|
+
* the bundled runners.
|
|
12
13
|
* Absent: no host plugin loads, so a test boot never reads the operator's folder.
|
|
13
14
|
*/
|
|
14
15
|
pluginsDir?: string | undefined;
|
|
@@ -16,7 +17,8 @@ export interface BootRuntimeOptions {
|
|
|
16
17
|
beforeSeal?: () => void | Promise<void>;
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
|
-
* Register every built-in extension table, load the
|
|
20
|
+
* Register every built-in extension table, load the bundled runners and then the host plugins
|
|
21
|
+
* through the plugin loader, run the optional hook, then seal
|
|
20
22
|
* all eight registries in this one place. A second call returns the same boot and does not load
|
|
21
23
|
* plugins or run the hook again.
|
|
22
24
|
*/
|
package/dist/boot.js
CHANGED
|
@@ -20,10 +20,13 @@ export function hostPluginsDir(home, warn = line => console.error(line)) {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
let runtimeBoot;
|
|
23
|
+
/** One load per process: a retry after a failed hook reuses it, and a failed bundled runner fails every retry. */
|
|
24
|
+
let bundledRunnersLoad;
|
|
23
25
|
/** A retry after a failed hook keeps what the plugins committed and does not load them twice. */
|
|
24
26
|
let hostPluginsLoaded = false;
|
|
25
27
|
/**
|
|
26
|
-
* Register every built-in extension table, load the
|
|
28
|
+
* Register every built-in extension table, load the bundled runners and then the host plugins
|
|
29
|
+
* through the plugin loader, run the optional hook, then seal
|
|
27
30
|
* all eight registries in this one place. A second call returns the same boot and does not load
|
|
28
31
|
* plugins or run the hook again.
|
|
29
32
|
*/
|
|
@@ -42,24 +45,25 @@ async function sealRuntime({ pluginsDir, beforeSeal }) {
|
|
|
42
45
|
// A test may seal a custom command table before dispatch asks for a full boot.
|
|
43
46
|
if (!cliCommandsSealed())
|
|
44
47
|
registerBuiltInCliCommands();
|
|
45
|
-
const { registerBuiltInRunners, sealBuiltInRunners } = await import('./runners/built-in.js');
|
|
46
48
|
const { registerBuiltInRunSlots, sealBuiltInRunSlots } = await import('./built-in-run-slots.js');
|
|
47
49
|
const { registerBuiltInStepKinds, sealBuiltInStepKinds } = await import('./workflows/step-kind-registry.js');
|
|
48
50
|
const { registerBuiltInTools, sealBuiltInTools } = await import('./built-in-tools.js');
|
|
49
51
|
const { registerBuiltInWaitKinds, sealBuiltInWaitKinds } = await import('./built-in-wait-kinds.js');
|
|
50
52
|
const { sealRunLifecycleListeners } = await import('./runs/lifecycle-registry.js');
|
|
51
|
-
|
|
53
|
+
const { sealRunners } = await import('./core/runner-registry.js');
|
|
54
|
+
const loader = await import('./plugin/loader.js');
|
|
52
55
|
registerBuiltInRunSlots();
|
|
53
56
|
registerBuiltInStepKinds();
|
|
54
57
|
registerBuiltInTools();
|
|
55
58
|
registerBuiltInWaitKinds();
|
|
59
|
+
await (bundledRunnersLoad ??= loader.loadBundledRunners());
|
|
56
60
|
if (pluginsDir !== undefined && !hostPluginsLoaded) {
|
|
57
61
|
hostPluginsLoaded = true;
|
|
58
|
-
await
|
|
62
|
+
await loader.loadPluginFolder({ dir: pluginsDir, source: 'host' });
|
|
59
63
|
}
|
|
60
64
|
await beforeSeal?.();
|
|
61
65
|
sealBuiltInCliCommands();
|
|
62
|
-
|
|
66
|
+
sealRunners();
|
|
63
67
|
sealBuiltInRunSlots();
|
|
64
68
|
sealBuiltInStepKinds();
|
|
65
69
|
sealBuiltInTools();
|
package/dist/boot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boot.js","sourceRoot":"","sources":["../src/boot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAChG,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAGpE;;;GAGG;AACH,MAAM,UAAU,WAAW;IACzB,0BAA0B,EAAE,CAAC;IAC7B,sBAAsB,EAAE,CAAC;AAC3B,CAAC;AAED,oGAAoG;AACpG,MAAM,UAAU,cAAc,CAAC,IAAgB,EAAE,IAAI,GAA2B,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;IACzG,IAAI,CAAC;QACH,OAAO,IAAI,EAAE,CAAC,OAAO,CAAC;IACxB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,oCAAoC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;QACjI,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;
|
|
1
|
+
{"version":3,"file":"boot.js","sourceRoot":"","sources":["../src/boot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAChG,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAA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
|
* (`runs/worker-executions-registry.ts`). Each process entry calls it once, beside
|
|
7
|
-
*
|
|
7
|
+
* the bundled runner load, before it can delete, reclaim or archive a run or start a worker. A
|
|
8
8
|
* second call registers the same objects again, which the registries ignore.
|
|
9
9
|
*/
|
|
10
10
|
export declare function registerBuiltInRunSlots(): void;
|
|
@@ -14,7 +14,7 @@ export const BUILT_IN_RUN_SLOTS = {
|
|
|
14
14
|
/**
|
|
15
15
|
* Register the built-in removal slots and the worker executions
|
|
16
16
|
* (`runs/worker-executions-registry.ts`). Each process entry calls it once, beside
|
|
17
|
-
*
|
|
17
|
+
* the bundled runner load, before it can delete, reclaim or archive a run or start a worker. A
|
|
18
18
|
* second call registers the same objects again, which the registries ignore.
|
|
19
19
|
*/
|
|
20
20
|
export function registerBuiltInRunSlots() {
|
|
@@ -119,9 +119,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
119
119
|
} & {
|
|
120
120
|
"/api/v1/tools/:name": {
|
|
121
121
|
$post: {
|
|
122
|
-
output:
|
|
122
|
+
output: {
|
|
123
|
+
code: string;
|
|
124
|
+
message: string;
|
|
125
|
+
};
|
|
123
126
|
outputFormat: "json";
|
|
124
|
-
status:
|
|
127
|
+
status: 401;
|
|
125
128
|
input: {
|
|
126
129
|
json: unknown;
|
|
127
130
|
} & {
|
|
@@ -144,12 +147,9 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
144
147
|
};
|
|
145
148
|
};
|
|
146
149
|
} | {
|
|
147
|
-
output:
|
|
148
|
-
code: string;
|
|
149
|
-
message: string;
|
|
150
|
-
};
|
|
150
|
+
output: never;
|
|
151
151
|
outputFormat: "json";
|
|
152
|
-
status:
|
|
152
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
153
153
|
input: {
|
|
154
154
|
json: unknown;
|
|
155
155
|
} & {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Backend-neutral logical sessions for task execution, follow-ups, waiting, interrupt and
|
|
3
3
|
* resume. Adapters own native process lifetimes and emit normalized events behind this seam.
|
|
4
4
|
* A runner id is an open string (spec 2026-11-18-runner-definitions, decision 5): the registry
|
|
5
|
-
* (`core/runner-registry.ts`) resolves it, and
|
|
5
|
+
* (`core/runner-registry.ts`) resolves it, and boot fills it from the bundled runner folders and the plugins.
|
|
6
6
|
*/
|
|
7
7
|
import type { UiEvent } from './ui-events.ts';
|
|
8
8
|
import type { RunnerTimings } from './runner-runtime.ts';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Backend-neutral logical sessions for task execution, follow-ups, waiting, interrupt and
|
|
3
3
|
* resume. Adapters own native process lifetimes and emit normalized events behind this seam.
|
|
4
4
|
* A runner id is an open string (spec 2026-11-18-runner-definitions, decision 5): the registry
|
|
5
|
-
* (`core/runner-registry.ts`) resolves it, and
|
|
5
|
+
* (`core/runner-registry.ts`) resolves it, and boot fills it from the bundled runner folders and the plugins.
|
|
6
6
|
*/
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=agent-runner.js.map
|
|
@@ -4,7 +4,7 @@ import { DEFAULT_RUNNER_ID, LEGACY_RUNNER_IDS } from './runner-ids.js';
|
|
|
4
4
|
/** Register definitions first; the process entry seals before normal reads. */
|
|
5
5
|
const runners = createKeyedRegistry({
|
|
6
6
|
name: 'Runner registry',
|
|
7
|
-
bootHint: 'call
|
|
7
|
+
bootHint: 'call bootRuntime() at the process entry, or sealTestRunners() in a test.',
|
|
8
8
|
reservedKeys: [...LEGACY_RUNNER_IDS.keys()],
|
|
9
9
|
});
|
|
10
10
|
/** Finish registration at the process boot boundary. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner-registry.js","sourceRoot":"","sources":["../../src/core/runner-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAGpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,iB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,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAC;IAChF,OAAO,EAAE,CAAC;AACZ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,EAAU;IAChD,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC3D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAClD,CAAC;AAED,6CAA6C;AAC7C,MAAM,UAAU,gBAAgB,CAAC,EAAU;IACzC,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACnC,IAAI,CAAC,UAAU;QAAE,MAAM,IAAI,KAAK,CAAC,UAAU,EAAE,wDAAwD,EAAE,qCAAqC,CAAC,CAAC;IAC9I,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAA2B;IAC5D,OAAO,gBAAgB,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AAClE,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;
|
|
@@ -91,6 +79,18 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
91
79
|
offset?: string | undefined;
|
|
92
80
|
};
|
|
93
81
|
};
|
|
82
|
+
} | {
|
|
83
|
+
output: {
|
|
84
|
+
error: string;
|
|
85
|
+
code?: "invalid_input" | undefined;
|
|
86
|
+
};
|
|
87
|
+
outputFormat: "json";
|
|
88
|
+
status: 400;
|
|
89
|
+
input: {
|
|
90
|
+
query: {
|
|
91
|
+
offset?: string | undefined;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
94
|
};
|
|
95
95
|
};
|
|
96
96
|
} & {
|
|
@@ -677,18 +677,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
677
677
|
} & {
|
|
678
678
|
"/:workerId": {
|
|
679
679
|
$get: {
|
|
680
|
-
output: {
|
|
681
|
-
error: string;
|
|
682
|
-
code?: "invalid_input" | undefined;
|
|
683
|
-
};
|
|
684
|
-
outputFormat: "json";
|
|
685
|
-
status: 400;
|
|
686
|
-
input: {
|
|
687
|
-
param: {
|
|
688
|
-
workerId: string;
|
|
689
|
-
};
|
|
690
|
-
};
|
|
691
|
-
} | {
|
|
692
680
|
output: {
|
|
693
681
|
workerId: string;
|
|
694
682
|
settled: boolean;
|
|
@@ -813,11 +801,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
813
801
|
workerId: string;
|
|
814
802
|
};
|
|
815
803
|
};
|
|
816
|
-
}
|
|
817
|
-
};
|
|
818
|
-
} & {
|
|
819
|
-
"/:workerId/collect": {
|
|
820
|
-
$post: {
|
|
804
|
+
} | {
|
|
821
805
|
output: {
|
|
822
806
|
error: string;
|
|
823
807
|
code?: "invalid_input" | undefined;
|
|
@@ -828,10 +812,12 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
828
812
|
param: {
|
|
829
813
|
workerId: string;
|
|
830
814
|
};
|
|
831
|
-
} & {
|
|
832
|
-
json: Record<string, never>;
|
|
833
815
|
};
|
|
834
|
-
}
|
|
816
|
+
};
|
|
817
|
+
};
|
|
818
|
+
} & {
|
|
819
|
+
"/:workerId/collect": {
|
|
820
|
+
$post: {
|
|
835
821
|
output: {
|
|
836
822
|
workerId: string;
|
|
837
823
|
parentRunId: string;
|
|
@@ -954,11 +940,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
954
940
|
} & {
|
|
955
941
|
json: Record<string, never>;
|
|
956
942
|
};
|
|
957
|
-
}
|
|
958
|
-
};
|
|
959
|
-
} & {
|
|
960
|
-
"/:workerId/steer": {
|
|
961
|
-
$post: {
|
|
943
|
+
} | {
|
|
962
944
|
output: {
|
|
963
945
|
error: string;
|
|
964
946
|
code?: "invalid_input" | undefined;
|
|
@@ -970,11 +952,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
970
952
|
workerId: string;
|
|
971
953
|
};
|
|
972
954
|
} & {
|
|
973
|
-
json:
|
|
974
|
-
text: string;
|
|
975
|
-
};
|
|
955
|
+
json: Record<string, never>;
|
|
976
956
|
};
|
|
977
|
-
}
|
|
957
|
+
};
|
|
958
|
+
};
|
|
959
|
+
} & {
|
|
960
|
+
"/:workerId/steer": {
|
|
961
|
+
$post: {
|
|
978
962
|
output: {
|
|
979
963
|
workerId: string;
|
|
980
964
|
state: "delivered" | "queued";
|
|
@@ -990,11 +974,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
990
974
|
text: string;
|
|
991
975
|
};
|
|
992
976
|
};
|
|
993
|
-
}
|
|
994
|
-
};
|
|
995
|
-
} & {
|
|
996
|
-
"/:workerId/stop": {
|
|
997
|
-
$post: {
|
|
977
|
+
} | {
|
|
998
978
|
output: {
|
|
999
979
|
error: string;
|
|
1000
980
|
code?: "invalid_input" | undefined;
|
|
@@ -1006,9 +986,15 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1006
986
|
workerId: string;
|
|
1007
987
|
};
|
|
1008
988
|
} & {
|
|
1009
|
-
json:
|
|
989
|
+
json: {
|
|
990
|
+
text: string;
|
|
991
|
+
};
|
|
1010
992
|
};
|
|
1011
|
-
}
|
|
993
|
+
};
|
|
994
|
+
};
|
|
995
|
+
} & {
|
|
996
|
+
"/:workerId/stop": {
|
|
997
|
+
$post: {
|
|
1012
998
|
output: {
|
|
1013
999
|
workerId: string;
|
|
1014
1000
|
state: "stopping" | "terminated";
|
|
@@ -1022,11 +1008,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1022
1008
|
} & {
|
|
1023
1009
|
json: Record<string, never>;
|
|
1024
1010
|
};
|
|
1025
|
-
}
|
|
1026
|
-
};
|
|
1027
|
-
} & {
|
|
1028
|
-
"/:workerId/destroy": {
|
|
1029
|
-
$post: {
|
|
1011
|
+
} | {
|
|
1030
1012
|
output: {
|
|
1031
1013
|
error: string;
|
|
1032
1014
|
code?: "invalid_input" | undefined;
|
|
@@ -1038,11 +1020,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1038
1020
|
workerId: string;
|
|
1039
1021
|
};
|
|
1040
1022
|
} & {
|
|
1041
|
-
json:
|
|
1042
|
-
discardWork?: true | undefined;
|
|
1043
|
-
};
|
|
1023
|
+
json: Record<string, never>;
|
|
1044
1024
|
};
|
|
1045
|
-
}
|
|
1025
|
+
};
|
|
1026
|
+
};
|
|
1027
|
+
} & {
|
|
1028
|
+
"/:workerId/destroy": {
|
|
1029
|
+
$post: {
|
|
1046
1030
|
output: {
|
|
1047
1031
|
workerId: string;
|
|
1048
1032
|
state: "complete" | "incomplete";
|
|
@@ -1071,6 +1055,22 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1071
1055
|
discardWork?: true | undefined;
|
|
1072
1056
|
};
|
|
1073
1057
|
};
|
|
1058
|
+
} | {
|
|
1059
|
+
output: {
|
|
1060
|
+
error: string;
|
|
1061
|
+
code?: "invalid_input" | undefined;
|
|
1062
|
+
};
|
|
1063
|
+
outputFormat: "json";
|
|
1064
|
+
status: 400;
|
|
1065
|
+
input: {
|
|
1066
|
+
param: {
|
|
1067
|
+
workerId: string;
|
|
1068
|
+
};
|
|
1069
|
+
} & {
|
|
1070
|
+
json: {
|
|
1071
|
+
discardWork?: true | undefined;
|
|
1072
|
+
};
|
|
1073
|
+
};
|
|
1074
1074
|
} | {
|
|
1075
1075
|
output: {
|
|
1076
1076
|
workerId: string;
|
|
@@ -1106,11 +1106,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1106
1106
|
"/:workerId/diff": {
|
|
1107
1107
|
$get: {
|
|
1108
1108
|
output: {
|
|
1109
|
-
|
|
1110
|
-
|
|
1109
|
+
workerId: string;
|
|
1110
|
+
baselineSha: string;
|
|
1111
|
+
diff: string;
|
|
1112
|
+
truncated: boolean;
|
|
1111
1113
|
};
|
|
1112
1114
|
outputFormat: "json";
|
|
1113
|
-
status:
|
|
1115
|
+
status: 200;
|
|
1114
1116
|
input: {
|
|
1115
1117
|
param: {
|
|
1116
1118
|
workerId: string;
|
|
@@ -1118,13 +1120,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1118
1120
|
};
|
|
1119
1121
|
} | {
|
|
1120
1122
|
output: {
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
diff: string;
|
|
1124
|
-
truncated: boolean;
|
|
1123
|
+
error: string;
|
|
1124
|
+
code?: "invalid_input" | undefined;
|
|
1125
1125
|
};
|
|
1126
1126
|
outputFormat: "json";
|
|
1127
|
-
status:
|
|
1127
|
+
status: 400;
|
|
1128
1128
|
input: {
|
|
1129
1129
|
param: {
|
|
1130
1130
|
workerId: string;
|
package/dist/pack-check.d.ts
CHANGED
|
@@ -7,11 +7,18 @@
|
|
|
7
7
|
* side-effect-free so the decision is unit-testable; the script owns the
|
|
8
8
|
* `npm pack` invocation and the exit code.
|
|
9
9
|
*/
|
|
10
|
+
/** The plugin entry and the runner kit subpaths `package.json` exports
|
|
11
|
+
* (spec 2026-11-24-plugin-loader-and-runner-kit § 2 and § 3). A host plugin imports them. */
|
|
12
|
+
export declare const PLUGIN_ENTRY_FILES: readonly string[];
|
|
10
13
|
/** Human-readable problems with a would-be tarball; empty array = publishable.
|
|
11
14
|
*
|
|
12
15
|
* Requirements (spec `.ai/specs/2026-07-14-cockpit-ui-redesign.md`, Serving):
|
|
13
16
|
* - `web/dist/index.html` — the built shell every GET serves.
|
|
14
17
|
* - at least one `web/dist/assets/*` file — the hashed JS/CSS bundles; an
|
|
15
18
|
* index.html alone renders a blank page.
|
|
19
|
+
* And (spec 2026-11-24-plugin-loader-and-runner-kit § 5):
|
|
20
|
+
* - every file of `PLUGIN_ENTRY_FILES`;
|
|
21
|
+
* - `dist/runners/<id>/index.js` for each id of `bundledRunnerIds`: boot loads each bundled
|
|
22
|
+
* runner from that entry, so a runner without one is missing from the cockpit.
|
|
16
23
|
*/
|
|
17
|
-
export declare function findPackGaps(packedFiles: readonly string[]): string[];
|
|
24
|
+
export declare function findPackGaps(packedFiles: readonly string[], bundledRunnerIds: readonly string[]): string[];
|
package/dist/pack-check.js
CHANGED
|
@@ -7,14 +7,27 @@
|
|
|
7
7
|
* side-effect-free so the decision is unit-testable; the script owns the
|
|
8
8
|
* `npm pack` invocation and the exit code.
|
|
9
9
|
*/
|
|
10
|
+
/** The plugin entry and the runner kit subpaths `package.json` exports
|
|
11
|
+
* (spec 2026-11-24-plugin-loader-and-runner-kit § 2 and § 3). A host plugin imports them. */
|
|
12
|
+
export const PLUGIN_ENTRY_FILES = [
|
|
13
|
+
'dist/plugin/index.js',
|
|
14
|
+
'dist/plugin/runtime.js',
|
|
15
|
+
'dist/plugin/model-settings.js',
|
|
16
|
+
'dist/plugin/managed-cli.js',
|
|
17
|
+
'dist/plugin/pi-rpc.js',
|
|
18
|
+
];
|
|
10
19
|
/** Human-readable problems with a would-be tarball; empty array = publishable.
|
|
11
20
|
*
|
|
12
21
|
* Requirements (spec `.ai/specs/2026-07-14-cockpit-ui-redesign.md`, Serving):
|
|
13
22
|
* - `web/dist/index.html` — the built shell every GET serves.
|
|
14
23
|
* - at least one `web/dist/assets/*` file — the hashed JS/CSS bundles; an
|
|
15
24
|
* index.html alone renders a blank page.
|
|
25
|
+
* And (spec 2026-11-24-plugin-loader-and-runner-kit § 5):
|
|
26
|
+
* - every file of `PLUGIN_ENTRY_FILES`;
|
|
27
|
+
* - `dist/runners/<id>/index.js` for each id of `bundledRunnerIds`: boot loads each bundled
|
|
28
|
+
* runner from that entry, so a runner without one is missing from the cockpit.
|
|
16
29
|
*/
|
|
17
|
-
export function findPackGaps(packedFiles) {
|
|
30
|
+
export function findPackGaps(packedFiles, bundledRunnerIds) {
|
|
18
31
|
const gaps = [];
|
|
19
32
|
if (!packedFiles.includes('web/dist/index.html')) {
|
|
20
33
|
gaps.push('web/dist/index.html is missing — the tarball would ship no UI shell (run `npm run build:web`)');
|
|
@@ -22,6 +35,17 @@ export function findPackGaps(packedFiles) {
|
|
|
22
35
|
if (!packedFiles.some((f) => f.startsWith('web/dist/assets/') && f.length > 'web/dist/assets/'.length)) {
|
|
23
36
|
gaps.push('no web/dist/assets/* bundle in the tarball — the shell would load with no JS/CSS');
|
|
24
37
|
}
|
|
38
|
+
for (const file of PLUGIN_ENTRY_FILES) {
|
|
39
|
+
if (!packedFiles.includes(file))
|
|
40
|
+
gaps.push(`${file} is missing — a plugin could not import Squawk's plugin API (run \`npm run build\`)`);
|
|
41
|
+
}
|
|
42
|
+
if (bundledRunnerIds.length === 0)
|
|
43
|
+
gaps.push('no bundled runner was found — the cockpit would have no runner');
|
|
44
|
+
for (const id of bundledRunnerIds) {
|
|
45
|
+
const entry = `dist/runners/${id}/index.js`;
|
|
46
|
+
if (!packedFiles.includes(entry))
|
|
47
|
+
gaps.push(`${entry} is missing — boot would not load the ${id} runner (run \`npm run build\`)`);
|
|
48
|
+
}
|
|
25
49
|
return gaps;
|
|
26
50
|
}
|
|
27
51
|
//# sourceMappingURL=pack-check.js.map
|
package/dist/pack-check.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pack-check.js","sourceRoot":"","sources":["../src/pack-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH
|
|
1
|
+
{"version":3,"file":"pack-check.js","sourceRoot":"","sources":["../src/pack-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;8FAC8F;AAC9F,MAAM,CAAC,MAAM,kBAAkB,GAAsB;IACnD,sBAAsB;IACtB,wBAAwB;IACxB,+BAA+B;IAC/B,4BAA4B;IAC5B,uBAAuB;CACxB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,UAAU,YAAY,CAAC,WAA8B,EAAE,gBAAmC;IAC9F,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,CAAC;QACjD,IAAI,CAAC,IAAI,CAAC,+FAA+F,CAAC,CAAC;IAC7G,CAAC;IACD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC;QACvG,IAAI,CAAC,IAAI,CAAC,kFAAkF,CAAC,CAAC;IAChG,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,kBAAkB,EAAE,CAAC;QACtC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC;YAAE,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,qFAAqF,CAAC,CAAC;IAC3I,CAAC;IACD,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC;QAAE,IAAI,CAAC,IAAI,CAAC,gEAAgE,CAAC,CAAC;IAC/G,KAAK,MAAM,EAAE,IAAI,gBAAgB,EAAE,CAAC;QAClC,MAAM,KAAK,GAAG,gBAAgB,EAAE,WAAW,CAAC;QAC5C,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,yCAAyC,EAAE,iCAAiC,CAAC,CAAC;IACpI,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The bundled runners: each child folder of `runners/` with a plugin entry file (spec
|
|
3
|
+
* 2026-11-24-plugin-loader-and-runner-kit § 5). This module reads folders and entry text only. It
|
|
4
|
+
* imports no runner code, so the global test setup, the lint plugin and plain-Node scripts can
|
|
5
|
+
* read the bundled runner ids without loading a runner.
|
|
6
|
+
*
|
|
7
|
+
* A folder without an entry file (`runners/fixture/`, the test-only runner) is not a bundled
|
|
8
|
+
* runner. Each entry declares `export const displayOrder = <integer>;` on one line; the runners
|
|
9
|
+
* load and list in that order, lowest first.
|
|
10
|
+
*/
|
|
11
|
+
/** The entry files of a bundled runner folder, in lookup order: built `dist/` has `index.js`, the source checkout `index.ts`. */
|
|
12
|
+
export declare const BUNDLED_RUNNER_ENTRY_FILES: readonly ['index.mjs', 'index.js', 'index.ts'];
|
|
13
|
+
export interface BundledRunnerFolder {
|
|
14
|
+
/** The folder name, which is the runner id. */
|
|
15
|
+
readonly id: string;
|
|
16
|
+
readonly path: string;
|
|
17
|
+
readonly entry: string;
|
|
18
|
+
readonly displayOrder: number;
|
|
19
|
+
}
|
|
20
|
+
/** The `runners/` folder next to this module's folder, in the source checkout and in `dist/`. */
|
|
21
|
+
export declare function bundledRunnersDir(): string;
|
|
22
|
+
/**
|
|
23
|
+
* The bundled runner folders under `dir`, in display order. Throws when an entry declares no
|
|
24
|
+
* display order or two entries declare the same one: either is a defect of the bundle itself.
|
|
25
|
+
*/
|
|
26
|
+
export declare function bundledRunnerFolders(dir?: string): BundledRunnerFolder[];
|
|
27
|
+
/** The ids of the bundled runners, in display order. */
|
|
28
|
+
export declare function bundledRunnerIds(dir?: string): string[];
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { readdirSync, readFileSync, statSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
/**
|
|
5
|
+
* The bundled runners: each child folder of `runners/` with a plugin entry file (spec
|
|
6
|
+
* 2026-11-24-plugin-loader-and-runner-kit § 5). This module reads folders and entry text only. It
|
|
7
|
+
* imports no runner code, so the global test setup, the lint plugin and plain-Node scripts can
|
|
8
|
+
* read the bundled runner ids without loading a runner.
|
|
9
|
+
*
|
|
10
|
+
* A folder without an entry file (`runners/fixture/`, the test-only runner) is not a bundled
|
|
11
|
+
* runner. Each entry declares `export const displayOrder = <integer>;` on one line; the runners
|
|
12
|
+
* load and list in that order, lowest first.
|
|
13
|
+
*/
|
|
14
|
+
/** The entry files of a bundled runner folder, in lookup order: built `dist/` has `index.js`, the source checkout `index.ts`. */
|
|
15
|
+
export const BUNDLED_RUNNER_ENTRY_FILES = ['index.mjs', 'index.js', 'index.ts'];
|
|
16
|
+
const DISPLAY_ORDER = /^export const displayOrder = (\d+);$/gm;
|
|
17
|
+
/** The `runners/` folder next to this module's folder, in the source checkout and in `dist/`. */
|
|
18
|
+
export function bundledRunnersDir() {
|
|
19
|
+
return fileURLToPath(new URL('../runners/', import.meta.url));
|
|
20
|
+
}
|
|
21
|
+
function isFile(path) {
|
|
22
|
+
try {
|
|
23
|
+
return statSync(path).isFile();
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function displayOrderOf(entry) {
|
|
30
|
+
const orders = [...readFileSync(entry, 'utf8').matchAll(DISPLAY_ORDER)].map(match => Number(match[1]));
|
|
31
|
+
if (orders.length !== 1)
|
|
32
|
+
throw new Error(`Bundled runner entry ${entry} must declare \`export const displayOrder = <integer>;\` on one line, once; it declares it ${orders.length} times.`);
|
|
33
|
+
return orders[0];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The bundled runner folders under `dir`, in display order. Throws when an entry declares no
|
|
37
|
+
* display order or two entries declare the same one: either is a defect of the bundle itself.
|
|
38
|
+
*/
|
|
39
|
+
export function bundledRunnerFolders(dir = bundledRunnersDir()) {
|
|
40
|
+
const folders = readdirSync(dir, { withFileTypes: true }).filter(entry => entry.isDirectory()).flatMap((folder) => {
|
|
41
|
+
const path = join(dir, folder.name);
|
|
42
|
+
const entry = BUNDLED_RUNNER_ENTRY_FILES.map(file => join(path, file)).find(isFile);
|
|
43
|
+
return entry ? [{ id: folder.name, path, entry, displayOrder: displayOrderOf(entry) }] : [];
|
|
44
|
+
});
|
|
45
|
+
// Folder-name code-point order breaks a tie, so the order and the error below never depend on readdir.
|
|
46
|
+
folders.sort((a, b) => a.displayOrder - b.displayOrder || (a.id < b.id ? -1 : a.id > b.id ? 1 : 0));
|
|
47
|
+
const repeated = folders.find((folder, index) => index > 0 && folders[index - 1].displayOrder === folder.displayOrder);
|
|
48
|
+
if (repeated)
|
|
49
|
+
throw new Error(`Bundled runners ${folders.filter(folder => folder.displayOrder === repeated.displayOrder).map(folder => folder.id).join(' and ')} declare the same displayOrder ${repeated.displayOrder}.`);
|
|
50
|
+
return folders;
|
|
51
|
+
}
|
|
52
|
+
/** The ids of the bundled runners, in display order. */
|
|
53
|
+
export function bundledRunnerIds(dir) {
|
|
54
|
+
return bundledRunnerFolders(dir).map(folder => folder.id);
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=bundled-runners.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundled-runners.js","sourceRoot":"","sources":["../../src/plugin/bundled-runners.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC9D,OA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,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,kCAAkC,QAAQ,CAAC,YAAY,GAAG,CAAC,CAAC;IAC3N,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,wDAAwD;AACxD,MAAM,UAAU,gBAAgB,CAAC,GAAY;IAC3C,OAAO,oBAAoB,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAC5D,CAAC"}
|
package/dist/plugin/cli.js
CHANGED
|
@@ -2,8 +2,9 @@ import { commandText } from '../home/command.js';
|
|
|
2
2
|
import { pluginLoadReport } from './loader.js';
|
|
3
3
|
const USAGE = `usage: cez plugins [--json]
|
|
4
4
|
|
|
5
|
-
Lists the plugins this process loaded
|
|
6
|
-
|
|
5
|
+
Lists the plugins this process loaded, what each one registered, and the plugins it skipped with
|
|
6
|
+
the reason: first the runners bundled with Squawk (source "bundled"), then the plugins in
|
|
7
|
+
<config>/plugins/ (source "host"). --json prints the same report as JSON.`;
|
|
7
8
|
const CONTRIBUTION_LABELS = [
|
|
8
9
|
['cliCommands', 'commands'], ['runners', 'runners'], ['agentTools', 'agent tools'],
|
|
9
10
|
['waitKinds', 'wait kinds'], ['stepKinds', 'step kinds'],
|
|
@@ -26,13 +27,13 @@ export function formatPluginReport(report) {
|
|
|
26
27
|
if (report.loaded.length === 0)
|
|
27
28
|
lines.push(' none');
|
|
28
29
|
for (const plugin of report.loaded) {
|
|
29
|
-
lines.push(` ${plugin.name} ${plugin.path}`, ...contributionLines(plugin.contributions));
|
|
30
|
+
lines.push(` ${plugin.name} ${plugin.source} ${plugin.path}`, ...contributionLines(plugin.contributions));
|
|
30
31
|
}
|
|
31
32
|
lines.push('', `Skipped (${report.failed.length}):`);
|
|
32
33
|
if (report.failed.length === 0)
|
|
33
34
|
lines.push(' none');
|
|
34
35
|
for (const plugin of report.failed)
|
|
35
|
-
lines.push(` ${plugin.name} ${plugin.path}`, ` error: ${plugin.error}`);
|
|
36
|
+
lines.push(` ${plugin.name} ${plugin.source} ${plugin.path}`, ` error: ${plugin.error}`);
|
|
36
37
|
return lines.join('\n');
|
|
37
38
|
}
|
|
38
39
|
/** `hsq plugins`: full boot has run, so the report holds this process's plugins. */
|
package/dist/plugin/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/plugin/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAyB,MAAM,aAAa,CAAC;AAEtE,MAAM,KAAK,GAAG
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/plugin/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAyB,MAAM,aAAa,CAAC;AAEtE,MAAM,KAAK,GAAG;;;;0EAI4D,CAAC;AAE3E,MAAM,mBAAmB,GAAuD;IAC9E,CAAC,aAAa,EAAE,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;IAClF,CAAC,WAAW,EAAE,YAAY,CAAC,EAAE,CAAC,WAAW,EAAE,YAAY,CAAC;IACxD,CAAC,cAAc,EAAE,eAAe,CAAC,EAAE,CAAC,uBAAuB,EAAE,yBAAyB,CAAC;CACxF,CAAC;AAEF,SAAS,iBAAiB,CAAC,aAAkC;IAC3D,OAAO,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAClD,MAAM,KAAK,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,O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