@hearsay-tools/squawk 0.18.0-dev.8176 → 0.18.0-dev.8180
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/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/transport.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/activity-routes.d.ts +23 -23
- package/dist/server/provider-sign-in-routes.d.ts +2 -2
- package/dist/server/runners-routes.d.ts +10 -10
- package/dist/server/server.d.ts +154 -154
- 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,OAA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the built-in removal slots and the worker executions
|
|
6
6
|
* (`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() {
|
|
@@ -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,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEvE,+EAA+E;AAC/E,MAAM,OAAO,GAAG,mBAAmB,CAA2B;IAC5D,IAAI,EAAE,iBAAiB;IACvB,QAAQ,EAAE
|
|
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,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEvE,+EAA+E;AAC/E,MAAM,OAAO,GAAG,mBAAmB,CAA2B;IAC5D,IAAI,EAAE,iBAAiB;IACvB,QAAQ,EAAE,0EAA0E;IACpF,YAAY,EAAE,CAAC,GAAG,iBAAiB,CAAC,IAAI,EAAE,CAAC;CAC5C,CAAC,CAAC;AAEH,wDAAwD;AACxD,MAAM,UAA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AAU;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"}
|
|
@@ -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;
|
|
@@ -54,18 +66,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
54
66
|
offset?: string | undefined;
|
|
55
67
|
};
|
|
56
68
|
};
|
|
57
|
-
} | {
|
|
58
|
-
output: {
|
|
59
|
-
error: string;
|
|
60
|
-
code?: "invalid_input" | undefined;
|
|
61
|
-
};
|
|
62
|
-
outputFormat: "json";
|
|
63
|
-
status: 400;
|
|
64
|
-
input: {
|
|
65
|
-
query: {
|
|
66
|
-
offset?: string | undefined;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
69
|
};
|
|
70
70
|
};
|
|
71
71
|
} & {
|
|
@@ -652,6 +652,18 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
652
652
|
} & {
|
|
653
653
|
"/:workerId": {
|
|
654
654
|
$get: {
|
|
655
|
+
output: {
|
|
656
|
+
error: string;
|
|
657
|
+
code?: "invalid_input" | undefined;
|
|
658
|
+
};
|
|
659
|
+
outputFormat: "json";
|
|
660
|
+
status: 400;
|
|
661
|
+
input: {
|
|
662
|
+
param: {
|
|
663
|
+
workerId: string;
|
|
664
|
+
};
|
|
665
|
+
};
|
|
666
|
+
} | {
|
|
655
667
|
output: {
|
|
656
668
|
workerId: string;
|
|
657
669
|
settled: boolean;
|
|
@@ -776,7 +788,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
776
788
|
workerId: string;
|
|
777
789
|
};
|
|
778
790
|
};
|
|
779
|
-
}
|
|
791
|
+
};
|
|
792
|
+
};
|
|
793
|
+
} & {
|
|
794
|
+
"/:workerId/collect": {
|
|
795
|
+
$post: {
|
|
780
796
|
output: {
|
|
781
797
|
error: string;
|
|
782
798
|
code?: "invalid_input" | undefined;
|
|
@@ -787,12 +803,10 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
787
803
|
param: {
|
|
788
804
|
workerId: string;
|
|
789
805
|
};
|
|
806
|
+
} & {
|
|
807
|
+
json: Record<string, never>;
|
|
790
808
|
};
|
|
791
|
-
}
|
|
792
|
-
};
|
|
793
|
-
} & {
|
|
794
|
-
"/:workerId/collect": {
|
|
795
|
-
$post: {
|
|
809
|
+
} | {
|
|
796
810
|
output: {
|
|
797
811
|
workerId: string;
|
|
798
812
|
parentRunId: string;
|
|
@@ -915,7 +929,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
915
929
|
} & {
|
|
916
930
|
json: Record<string, never>;
|
|
917
931
|
};
|
|
918
|
-
}
|
|
932
|
+
};
|
|
933
|
+
};
|
|
934
|
+
} & {
|
|
935
|
+
"/:workerId/steer": {
|
|
936
|
+
$post: {
|
|
919
937
|
output: {
|
|
920
938
|
error: string;
|
|
921
939
|
code?: "invalid_input" | undefined;
|
|
@@ -927,13 +945,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
927
945
|
workerId: string;
|
|
928
946
|
};
|
|
929
947
|
} & {
|
|
930
|
-
json:
|
|
948
|
+
json: {
|
|
949
|
+
text: string;
|
|
950
|
+
};
|
|
931
951
|
};
|
|
932
|
-
}
|
|
933
|
-
};
|
|
934
|
-
} & {
|
|
935
|
-
"/:workerId/steer": {
|
|
936
|
-
$post: {
|
|
952
|
+
} | {
|
|
937
953
|
output: {
|
|
938
954
|
workerId: string;
|
|
939
955
|
state: "delivered" | "queued";
|
|
@@ -949,7 +965,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
949
965
|
text: string;
|
|
950
966
|
};
|
|
951
967
|
};
|
|
952
|
-
}
|
|
968
|
+
};
|
|
969
|
+
};
|
|
970
|
+
} & {
|
|
971
|
+
"/:workerId/stop": {
|
|
972
|
+
$post: {
|
|
953
973
|
output: {
|
|
954
974
|
error: string;
|
|
955
975
|
code?: "invalid_input" | undefined;
|
|
@@ -961,15 +981,9 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
961
981
|
workerId: string;
|
|
962
982
|
};
|
|
963
983
|
} & {
|
|
964
|
-
json:
|
|
965
|
-
text: string;
|
|
966
|
-
};
|
|
984
|
+
json: Record<string, never>;
|
|
967
985
|
};
|
|
968
|
-
}
|
|
969
|
-
};
|
|
970
|
-
} & {
|
|
971
|
-
"/:workerId/stop": {
|
|
972
|
-
$post: {
|
|
986
|
+
} | {
|
|
973
987
|
output: {
|
|
974
988
|
workerId: string;
|
|
975
989
|
state: "stopping" | "terminated";
|
|
@@ -983,7 +997,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
983
997
|
} & {
|
|
984
998
|
json: Record<string, never>;
|
|
985
999
|
};
|
|
986
|
-
}
|
|
1000
|
+
};
|
|
1001
|
+
};
|
|
1002
|
+
} & {
|
|
1003
|
+
"/:workerId/destroy": {
|
|
1004
|
+
$post: {
|
|
987
1005
|
output: {
|
|
988
1006
|
error: string;
|
|
989
1007
|
code?: "invalid_input" | undefined;
|
|
@@ -995,13 +1013,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
995
1013
|
workerId: string;
|
|
996
1014
|
};
|
|
997
1015
|
} & {
|
|
998
|
-
json:
|
|
1016
|
+
json: {
|
|
1017
|
+
discardWork?: true | undefined;
|
|
1018
|
+
};
|
|
999
1019
|
};
|
|
1000
|
-
}
|
|
1001
|
-
};
|
|
1002
|
-
} & {
|
|
1003
|
-
"/:workerId/destroy": {
|
|
1004
|
-
$post: {
|
|
1020
|
+
} | {
|
|
1005
1021
|
output: {
|
|
1006
1022
|
workerId: string;
|
|
1007
1023
|
state: "complete" | "incomplete";
|
|
@@ -1030,22 +1046,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
1030
1046
|
discardWork?: true | undefined;
|
|
1031
1047
|
};
|
|
1032
1048
|
};
|
|
1033
|
-
} | {
|
|
1034
|
-
output: {
|
|
1035
|
-
error: string;
|
|
1036
|
-
code?: "invalid_input" | undefined;
|
|
1037
|
-
};
|
|
1038
|
-
outputFormat: "json";
|
|
1039
|
-
status: 400;
|
|
1040
|
-
input: {
|
|
1041
|
-
param: {
|
|
1042
|
-
workerId: string;
|
|
1043
|
-
};
|
|
1044
|
-
} & {
|
|
1045
|
-
json: {
|
|
1046
|
-
discardWork?: true | undefined;
|
|
1047
|
-
};
|
|
1048
|
-
};
|
|
1049
1049
|
} | {
|
|
1050
1050
|
output: {
|
|
1051
1051
|
workerId: string;
|
|
@@ -1081,13 +1081,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
1081
1081
|
"/:workerId/diff": {
|
|
1082
1082
|
$get: {
|
|
1083
1083
|
output: {
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
diff: string;
|
|
1087
|
-
truncated: boolean;
|
|
1084
|
+
error: string;
|
|
1085
|
+
code?: "invalid_input" | undefined;
|
|
1088
1086
|
};
|
|
1089
1087
|
outputFormat: "json";
|
|
1090
|
-
status:
|
|
1088
|
+
status: 400;
|
|
1091
1089
|
input: {
|
|
1092
1090
|
param: {
|
|
1093
1091
|
workerId: string;
|
|
@@ -1095,11 +1093,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
1095
1093
|
};
|
|
1096
1094
|
} | {
|
|
1097
1095
|
output: {
|
|
1098
|
-
|
|
1099
|
-
|
|
1096
|
+
workerId: string;
|
|
1097
|
+
baselineSha: string;
|
|
1098
|
+
diff: string;
|
|
1099
|
+
truncated: boolean;
|
|
1100
1100
|
};
|
|
1101
1101
|
outputFormat: "json";
|
|
1102
|
-
status:
|
|
1102
|
+
status: 200;
|
|
1103
1103
|
input: {
|
|
1104
1104
|
param: {
|
|
1105
1105
|
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,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;;;;;;GASG;AAEH,iIAAiI;AACjI,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,WAAW,EAAE,UAAU,EAAE,UAAU,CAAU,CAAC;AAUzF,MAAM,aAAa,GAAG,wCAAwC,CAAC;AAE/D,iGAAiG;AACjG,MAAM,UAAU,iBAAiB;IAC/B,OAAO,aAAa,CAAC,IAAI,GAAG,CAAC,aAAa,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAChE,CAAC;AAED,SAAS,MAAM,CAAC,IAAY;IAC1B,IAAI,CAAC;QACH,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;IACjC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AA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Y,GAAG,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACpG,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,CAAC,IAAI,OAAO,CAAC,KAAK,GAAG,CAAC,CAAE,CAAC,YAAY,KAAK,MAAM,CAAC,YAAY,CAAC,CAAC;IACxH,IAAI,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,YAAY,KAAK,QAAQ,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,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,a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,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,QAAQ,CAAC,CAAC;IACrD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,qBAAqB,OAAO,CAAC,CAAC,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC;QACtE,OAAO,CAAC,CAAC;IACX,CAAC;IACD,MAAM,MAAM,GAAG,gBAAgB,EAAE,CAAC;IAClC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;IAChG,OAAO,CAAC,CAAC;AACX,CAAC"}
|
package/dist/plugin/loader.d.ts
CHANGED
|
@@ -4,7 +4,9 @@ import { type PluginContributions } from './api.ts';
|
|
|
4
4
|
* The plugin loader (spec 2026-11-24-plugin-loader-and-runner-kit § 4). A plugin is one folder
|
|
5
5
|
* whose `index.mjs` or `index.js` default-exports a setup function. The loader runs each folder's
|
|
6
6
|
* setup through `runPluginSetup`, so a plugin that throws or collides commits nothing. A broken
|
|
7
|
-
* plugin is skipped with one stderr warning and never stops boot.
|
|
7
|
+
* host plugin is skipped with one stderr warning and never stops boot. The bundled runners
|
|
8
|
+
* (`runners/<id>/index.ts`) load through the same setup first; a bundled runner that fails stops
|
|
9
|
+
* boot, because it is a defect of Squawk itself.
|
|
8
10
|
*/
|
|
9
11
|
/** `bundled` ships inside Squawk; `host` comes from `<config>/plugins/`. */
|
|
10
12
|
export type PluginSource = 'bundled' | 'host';
|
|
@@ -46,6 +48,13 @@ export interface LoadPluginFolderOptions {
|
|
|
46
48
|
* the process report. Installs the `@hearsay-tools/squawk/plugin` resolve hook first.
|
|
47
49
|
*/
|
|
48
50
|
export declare function loadPluginFolder({ dir, source, warn }: LoadPluginFolderOptions): Promise<PluginLoadReport>;
|
|
51
|
+
/**
|
|
52
|
+
* Load the bundled runners under `dir` (default: the `runners/` folder of this Squawk copy) in
|
|
53
|
+
* display order, each through `runPluginSetup` like a host plugin, and add them to the report as
|
|
54
|
+
* `bundled`. A folder with no bundled runner, or a bundled runner that fails to import or to register, throws: Squawk shipped it, so
|
|
55
|
+
* the cockpit would miss a runner it promises, and boot stops instead of hiding the defect.
|
|
56
|
+
*/
|
|
57
|
+
export declare function loadBundledRunners(dir?: string): Promise<PluginLoadReport>;
|
|
49
58
|
/**
|
|
50
59
|
* The text health sends for each reason. A plugin's own message can name host paths or carry a
|
|
51
60
|
* secret, and health is CORS-open, so health never sends it; `hsq plugins` on the host does.
|