@hearsay-tools/squawk 0.18.0-pr4230.8174 → 0.18.0-pr4231.8178
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/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/reports-api.d.ts +2 -2
- 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,MAAM,0BAA0B,CAAC;AAGpE;;;GAGG;AACH,MAAM,UAAU,WAAW;IACzB,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,CAAC,mCAAmC,CAAC,CAAC;IAC7G,MAAM,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC,CAAC;IACvF,MAAM,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,GAAG,MAAM,MAAM,CAAC,0BAA0B,CAAC,CAAC;IACpG,MAAM,EAAE,yBAAyB,EAAE,GAAG,MAAM,MAAM,CAAC,8BAA8B,CAAC,CAAC;IACnF,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,MAAM,CAAC,2BAA2B,CAAC,CAAC;IAClE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,oBAAoB,CAAC,CAAC;IAClD,uBAAuB,EAAE,CAAC;IAC1B,wBAAwB,EAAE,CAAC;IAC3B,oBAAoB,EAAE,CAAC;IACvB,wBAAwB,EAAE,CAAC;IAC3B,MAAM,CAAC,kBAAkB,KAAK,MAAM,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAC3D,IAAI,UAAU,KAAK,SAAS,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACnD,iBAAiB,GAAG,IAAI,CAAC;QACzB,MAAM,MAAM,CAAC,gBAAgB,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACrE,CAAC;IACD,MAAM,UAAU,EAAE,EAAE,CAAC;IACrB,sBAAsB,EAAE,CAAC;IACzB,WAAW,EAAE,CAAC;IACd,mBAAmB,EAAE,CAAC;IACtB,oBAAoB,EAAE,CAAC;IACvB,gBAAgB,EAAE,CAAC;IACnB,oBAAoB,EAAE,CAAC;IACvB,yBAAyB,EAAE,CAAC;AAC9B,CAAC"}
|
|
@@ -4,7 +4,7 @@ export declare const BUILT_IN_RUN_SLOTS: RunSlots;
|
|
|
4
4
|
/**
|
|
5
5
|
* Register 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,UAAU,WAAW,KAAW,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AAEvD,iDAAiD;AACjD,MAAM,UAA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,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"}
|
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;AAED,SAAS,cAAc,CAAC,KAAa;IACnC,MAAM,MAAM,GAAG,CAAC,GAAG,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACvG,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,KAAK,8FAA8F,MAAM,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,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,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,yBAAy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I,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.
|
package/dist/plugin/loader.js
CHANGED
|
@@ -10,6 +10,7 @@ import { readdirSync, statSync } from 'node:fs';
|
|
|
10
10
|
import { join } from 'node:path';
|
|
11
11
|
import { pathToFileURL } from 'node:url';
|
|
12
12
|
import { runPluginSetup } from './api.js';
|
|
13
|
+
import { bundledRunnerFolders, bundledRunnersDir } from './bundled-runners.js';
|
|
13
14
|
import { installPluginResolveHook } from './resolve-hook.js';
|
|
14
15
|
class PluginLoadFailure extends Error {
|
|
15
16
|
reason;
|
|
@@ -79,6 +80,10 @@ async function loadOne(path) {
|
|
|
79
80
|
const entry = PLUGIN_ENTRY_FILES.map(file => join(path, file)).find(isFile);
|
|
80
81
|
if (!entry)
|
|
81
82
|
throw new PluginLoadFailure('missing-entry', `missing ${PLUGIN_ENTRY_FILES.join(' or ')}`);
|
|
83
|
+
return loadEntry(path, entry);
|
|
84
|
+
}
|
|
85
|
+
/** Import `entry`, the entry file of the plugin folder `path`, and run its setup. */
|
|
86
|
+
async function loadEntry(path, entry) {
|
|
82
87
|
const entryModule = await import(__rewriteRelativeImportExtension(pathToFileURL(entry).href)).catch((error) => {
|
|
83
88
|
throw new PluginLoadFailure('import', errorText(error));
|
|
84
89
|
});
|
|
@@ -110,6 +115,9 @@ export async function loadPluginFolder({ dir, source, warn = line => { process.s
|
|
|
110
115
|
warn(`[hsq] plugin "${name}" skipped: ${failure.error}`);
|
|
111
116
|
}
|
|
112
117
|
}
|
|
118
|
+
return addToReport(dir, loaded, failed);
|
|
119
|
+
}
|
|
120
|
+
function addToReport(dir, loaded, failed) {
|
|
113
121
|
report = Object.freeze({
|
|
114
122
|
folders: Object.freeze([...report.folders, dir]),
|
|
115
123
|
loaded: Object.freeze([...report.loaded, ...loaded]),
|
|
@@ -117,6 +125,29 @@ export async function loadPluginFolder({ dir, source, warn = line => { process.s
|
|
|
117
125
|
});
|
|
118
126
|
return report;
|
|
119
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* Load the bundled runners under `dir` (default: the `runners/` folder of this Squawk copy) in
|
|
130
|
+
* display order, each through `runPluginSetup` like a host plugin, and add them to the report as
|
|
131
|
+
* `bundled`. A folder with no bundled runner, or a bundled runner that fails to import or to register, throws: Squawk shipped it, so
|
|
132
|
+
* the cockpit would miss a runner it promises, and boot stops instead of hiding the defect.
|
|
133
|
+
*/
|
|
134
|
+
export async function loadBundledRunners(dir = bundledRunnersDir()) {
|
|
135
|
+
const folders = bundledRunnerFolders(dir);
|
|
136
|
+
// Squawk always ships its runners: none found means a broken build, never an empty cockpit.
|
|
137
|
+
if (folders.length === 0)
|
|
138
|
+
throw new Error(`No bundled runner was found in ${dir}: Squawk ships runners/<id>/index.js for each runner; rebuild it.`);
|
|
139
|
+
installPluginResolveHook();
|
|
140
|
+
const loaded = [];
|
|
141
|
+
for (const { id, path, entry } of folders) {
|
|
142
|
+
try {
|
|
143
|
+
loaded.push(Object.freeze({ name: id, source: 'bundled', path, contributions: await loadEntry(path, entry) }));
|
|
144
|
+
}
|
|
145
|
+
catch (error) {
|
|
146
|
+
throw new Error(`Bundled runner "${id}" failed to load: ${errorText(error)}`, { cause: error });
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return addToReport(dir, loaded, []);
|
|
150
|
+
}
|
|
120
151
|
/**
|
|
121
152
|
* The text health sends for each reason. A plugin's own message can name host paths or carry a
|
|
122
153
|
* secret, and health is CORS-open, so health never sends it; `hsq plugins` on the host does.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../../src/plugin/loader.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAe,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAA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AC,mBAAmB,EAAE,qBAAqB,SAAS,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;QAClG,CAAC;IACH,CAAC;IACD,OAAO,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;AACtC,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAkD;IAChF,eAAe,EAAE,+BAA+B;IAChD,UAAU,EAAE,kDAAkD;IAC9D,MAAM,EAAE,yEAAyE;IACjF,KAAK,EAAE,yFAAyF;CACjG,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,MAAwB,EAAE,EAAE,SAAS,EAA0B;IAC1F,MAAM,KAAK,GAAG,CAAC,MAAmC,EAAqB,EAAE,CACvE,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;IAC7H,OAAO;QACL,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;QAChC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,mBAAmB,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;KACvG,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SquawkPlugin } from '../../plugin/index.js';
|
|
2
|
+
/** Where the antigravity runner sits among the bundled runners: lower comes first. `plugin/bundled-runners.ts` reads this line as text. */
|
|
3
|
+
export declare const displayOrder = 60;
|
|
4
|
+
/** The antigravity runner's plugin entry. Boot loads it through the plugin loader. */
|
|
5
|
+
declare const plugin: SquawkPlugin;
|
|
6
|
+
export default plugin;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { antigravityRunner } from './definition.js';
|
|
2
|
+
/** Where the antigravity runner sits among the bundled runners: lower comes first. `plugin/bundled-runners.ts` reads this line as text. */
|
|
3
|
+
export const displayOrder = 60;
|
|
4
|
+
/** The antigravity runner's plugin entry. Boot loads it through the plugin loader. */
|
|
5
|
+
const plugin = (api) => {
|
|
6
|
+
api.registerRunner(antigravityRunner);
|
|
7
|
+
};
|
|
8
|
+
export default plugin;
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runners/antigravity/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,2IAA2I;AAC3I,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;AAE/B,sFAAsF;AACtF,MAAM,MAAM,GAAiB,CAAC,GAAG,EAAE,EAAE;IACnC,GAAG,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;AACxC,CAAC,CAAC;AACF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SquawkPlugin } from '../../plugin/index.js';
|
|
2
|
+
/** Where the claude runner sits among the bundled runners: lower comes first. `plugin/bundled-runners.ts` reads this line as text. */
|
|
3
|
+
export declare const displayOrder = 10;
|
|
4
|
+
/** The claude runner's plugin entry. Boot loads it through the plugin loader. */
|
|
5
|
+
declare const plugin: SquawkPlugin;
|
|
6
|
+
export default plugin;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { claudeRunner } from './definition.js';
|
|
2
|
+
/** Where the claude runner sits among the bundled runners: lower comes first. `plugin/bundled-runners.ts` reads this line as text. */
|
|
3
|
+
export const displayOrder = 10;
|
|
4
|
+
/** The claude runner's plugin entry. Boot loads it through the plugin loader. */
|
|
5
|
+
const plugin = (api) => {
|
|
6
|
+
api.registerRunner(claudeRunner);
|
|
7
|
+
};
|
|
8
|
+
export default plugin;
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runners/claude/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,sIAAsI;AACtI,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;AAE/B,iFAAiF;AACjF,MAAM,MAAM,GAAiB,CAAC,GAAG,EAAE,EAAE;IACnC,GAAG,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;AACnC,CAAC,CAAC;AACF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SquawkPlugin } from '../../plugin/index.js';
|
|
2
|
+
/** Where the codex runner sits among the bundled runners: lower comes first. `plugin/bundled-runners.ts` reads this line as text. */
|
|
3
|
+
export declare const displayOrder = 20;
|
|
4
|
+
/** The codex runner's plugin entry. Boot loads it through the plugin loader. */
|
|
5
|
+
declare const plugin: SquawkPlugin;
|
|
6
|
+
export default plugin;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { codexRunner } from './definition.js';
|
|
2
|
+
/** Where the codex runner sits among the bundled runners: lower comes first. `plugin/bundled-runners.ts` reads this line as text. */
|
|
3
|
+
export const displayOrder = 20;
|
|
4
|
+
/** The codex runner's plugin entry. Boot loads it through the plugin loader. */
|
|
5
|
+
const plugin = (api) => {
|
|
6
|
+
api.registerRunner(codexRunner);
|
|
7
|
+
};
|
|
8
|
+
export default plugin;
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runners/codex/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,qIAAqI;AACrI,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;AAE/B,gFAAgF;AAChF,MAAM,MAAM,GAAiB,CAAC,GAAG,EAAE,EAAE;IACnC,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;AAClC,CAAC,CAAC;AACF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SquawkPlugin } from '../../plugin/index.js';
|
|
2
|
+
/** Where the omp runner sits among the bundled runners: lower comes first. `plugin/bundled-runners.ts` reads this line as text. */
|
|
3
|
+
export declare const displayOrder = 50;
|
|
4
|
+
/** The omp runner's plugin entry. Boot loads it through the plugin loader. */
|
|
5
|
+
declare const plugin: SquawkPlugin;
|
|
6
|
+
export default plugin;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ompRunner } from './definition.js';
|
|
2
|
+
/** Where the omp runner sits among the bundled runners: lower comes first. `plugin/bundled-runners.ts` reads this line as text. */
|
|
3
|
+
export const displayOrder = 50;
|
|
4
|
+
/** The omp runner's plugin entry. Boot loads it through the plugin loader. */
|
|
5
|
+
const plugin = (api) => {
|
|
6
|
+
api.registerRunner(ompRunner);
|
|
7
|
+
};
|
|
8
|
+
export default plugin;
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runners/omp/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,mIAAmI;AACnI,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;AAE/B,8EAA8E;AAC9E,MAAM,MAAM,GAAiB,CAAC,GAAG,EAAE,EAAE;IACnC,GAAG,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;AAChC,CAAC,CAAC;AACF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SquawkPlugin } from '../../plugin/index.js';
|
|
2
|
+
/** Where the opencode runner sits among the bundled runners: lower comes first. `plugin/bundled-runners.ts` reads this line as text. */
|
|
3
|
+
export declare const displayOrder = 30;
|
|
4
|
+
/** The opencode runner's plugin entry. Boot loads it through the plugin loader. */
|
|
5
|
+
declare const plugin: SquawkPlugin;
|
|
6
|
+
export default plugin;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { opencodeRunner } from './definition.js';
|
|
2
|
+
/** Where the opencode runner sits among the bundled runners: lower comes first. `plugin/bundled-runners.ts` reads this line as text. */
|
|
3
|
+
export const displayOrder = 30;
|
|
4
|
+
/** The opencode runner's plugin entry. Boot loads it through the plugin loader. */
|
|
5
|
+
const plugin = (api) => {
|
|
6
|
+
api.registerRunner(opencodeRunner);
|
|
7
|
+
};
|
|
8
|
+
export default plugin;
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runners/opencode/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,wIAAwI;AACxI,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;AAE/B,mFAAmF;AACnF,MAAM,MAAM,GAAiB,CAAC,GAAG,EAAE,EAAE;IACnC,GAAG,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AACrC,CAAC,CAAC;AACF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SquawkPlugin } from '../../plugin/index.js';
|
|
2
|
+
/** Where the pi runner sits among the bundled runners: lower comes first. `plugin/bundled-runners.ts` reads this line as text. */
|
|
3
|
+
export declare const displayOrder = 40;
|
|
4
|
+
/** The pi runner's plugin entry. Boot loads it through the plugin loader. */
|
|
5
|
+
declare const plugin: SquawkPlugin;
|
|
6
|
+
export default plugin;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { piRunner } from './definition.js';
|
|
2
|
+
/** Where the pi runner sits among the bundled runners: lower comes first. `plugin/bundled-runners.ts` reads this line as text. */
|
|
3
|
+
export const displayOrder = 40;
|
|
4
|
+
/** The pi runner's plugin entry. Boot loads it through the plugin loader. */
|
|
5
|
+
const plugin = (api) => {
|
|
6
|
+
api.registerRunner(piRunner);
|
|
7
|
+
};
|
|
8
|
+
export default plugin;
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runners/pi/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,kIAAkI;AAClI,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;AAE/B,6EAA6E;AAC7E,MAAM,MAAM,GAAiB,CAAC,GAAG,EAAE,EAAE;IACnC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;AAC/B,CAAC,CAAC;AACF,eAAe,MAAM,CAAC"}
|
|
@@ -40,7 +40,7 @@ export declare const reportsRoutes: import("hono/hono-base").HonoBase<ProjectApi
|
|
|
40
40
|
error: string;
|
|
41
41
|
};
|
|
42
42
|
outputFormat: "json";
|
|
43
|
-
status:
|
|
43
|
+
status: 409;
|
|
44
44
|
input: {
|
|
45
45
|
query: {
|
|
46
46
|
q?: string | undefined;
|
|
@@ -53,7 +53,7 @@ export declare const reportsRoutes: import("hono/hono-base").HonoBase<ProjectApi
|
|
|
53
53
|
error: string;
|
|
54
54
|
};
|
|
55
55
|
outputFormat: "json";
|
|
56
|
-
status:
|
|
56
|
+
status: 400;
|
|
57
57
|
input: {
|
|
58
58
|
query: {
|
|
59
59
|
q?: string | undefined;
|
package/dist/server/server.d.ts
CHANGED
|
@@ -182,68 +182,6 @@ export declare class WorkspaceEventBus {
|
|
|
182
182
|
on(listener: (event: WorkspaceEventName, data: unknown) => void): () => void;
|
|
183
183
|
}
|
|
184
184
|
export declare function createApp(deps: ServerDeps): import("hono/hono-base").HonoBase<import("hono/types").BlankEnv, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
|
|
185
|
-
"/models": {
|
|
186
|
-
$get: {
|
|
187
|
-
output: {
|
|
188
|
-
error: string;
|
|
189
|
-
code?: "invalid_input" | undefined;
|
|
190
|
-
};
|
|
191
|
-
outputFormat: "json";
|
|
192
|
-
status: 400;
|
|
193
|
-
input: {
|
|
194
|
-
query: {
|
|
195
|
-
runner: string | string[];
|
|
196
|
-
profileId?: string | undefined;
|
|
197
|
-
};
|
|
198
|
-
};
|
|
199
|
-
} | {
|
|
200
|
-
output: {
|
|
201
|
-
runner: string;
|
|
202
|
-
models: {
|
|
203
|
-
id: string;
|
|
204
|
-
label: string;
|
|
205
|
-
description: string;
|
|
206
|
-
effortLevels?: import('../contract/index.js').EffortLevel[];
|
|
207
|
-
}[];
|
|
208
|
-
source: import("../core/runner-model-catalog.ts").ModelCatalogSource;
|
|
209
|
-
stale: boolean;
|
|
210
|
-
reason?: string;
|
|
211
|
-
};
|
|
212
|
-
outputFormat: "json";
|
|
213
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
214
|
-
input: {
|
|
215
|
-
query: {
|
|
216
|
-
runner: string | string[];
|
|
217
|
-
profileId?: string | undefined;
|
|
218
|
-
};
|
|
219
|
-
};
|
|
220
|
-
} | {
|
|
221
|
-
output: {
|
|
222
|
-
error: string;
|
|
223
|
-
};
|
|
224
|
-
outputFormat: "json";
|
|
225
|
-
status: 409;
|
|
226
|
-
input: {
|
|
227
|
-
query: {
|
|
228
|
-
runner: string | string[];
|
|
229
|
-
profileId?: string | undefined;
|
|
230
|
-
};
|
|
231
|
-
};
|
|
232
|
-
} | {
|
|
233
|
-
output: {
|
|
234
|
-
error: string;
|
|
235
|
-
};
|
|
236
|
-
outputFormat: "json";
|
|
237
|
-
status: 400;
|
|
238
|
-
input: {
|
|
239
|
-
query: {
|
|
240
|
-
runner: string | string[];
|
|
241
|
-
profileId?: string | undefined;
|
|
242
|
-
};
|
|
243
|
-
};
|
|
244
|
-
};
|
|
245
|
-
};
|
|
246
|
-
}, "/"> | import("hono/types").MergeSchemaPath<{
|
|
247
185
|
"/health": {
|
|
248
186
|
$get: {
|
|
249
187
|
output: {
|
|
@@ -408,6 +346,68 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
408
346
|
};
|
|
409
347
|
};
|
|
410
348
|
};
|
|
349
|
+
}, "/"> | import("hono/types").MergeSchemaPath<{
|
|
350
|
+
"/models": {
|
|
351
|
+
$get: {
|
|
352
|
+
output: {
|
|
353
|
+
error: string;
|
|
354
|
+
code?: "invalid_input" | undefined;
|
|
355
|
+
};
|
|
356
|
+
outputFormat: "json";
|
|
357
|
+
status: 400;
|
|
358
|
+
input: {
|
|
359
|
+
query: {
|
|
360
|
+
runner: string | string[];
|
|
361
|
+
profileId?: string | undefined;
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
} | {
|
|
365
|
+
output: {
|
|
366
|
+
runner: string;
|
|
367
|
+
models: {
|
|
368
|
+
id: string;
|
|
369
|
+
label: string;
|
|
370
|
+
description: string;
|
|
371
|
+
effortLevels?: import('../contract/index.js').EffortLevel[];
|
|
372
|
+
}[];
|
|
373
|
+
source: import("../core/runner-model-catalog.ts").ModelCatalogSource;
|
|
374
|
+
stale: boolean;
|
|
375
|
+
reason?: string;
|
|
376
|
+
};
|
|
377
|
+
outputFormat: "json";
|
|
378
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
379
|
+
input: {
|
|
380
|
+
query: {
|
|
381
|
+
runner: string | string[];
|
|
382
|
+
profileId?: string | undefined;
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
} | {
|
|
386
|
+
output: {
|
|
387
|
+
error: string;
|
|
388
|
+
};
|
|
389
|
+
outputFormat: "json";
|
|
390
|
+
status: 409;
|
|
391
|
+
input: {
|
|
392
|
+
query: {
|
|
393
|
+
runner: string | string[];
|
|
394
|
+
profileId?: string | undefined;
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
} | {
|
|
398
|
+
output: {
|
|
399
|
+
error: string;
|
|
400
|
+
};
|
|
401
|
+
outputFormat: "json";
|
|
402
|
+
status: 400;
|
|
403
|
+
input: {
|
|
404
|
+
query: {
|
|
405
|
+
runner: string | string[];
|
|
406
|
+
profileId?: string | undefined;
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
|
+
};
|
|
410
|
+
};
|
|
411
411
|
}, "/"> | import("hono/types").MergeSchemaPath<{
|
|
412
412
|
"/workspace/activity": {
|
|
413
413
|
$get: {
|
|
@@ -8659,11 +8659,22 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
8659
8659
|
"/runs/:id/worker-destroy": {
|
|
8660
8660
|
$post: {
|
|
8661
8661
|
output: {
|
|
8662
|
-
|
|
8663
|
-
|
|
8662
|
+
readonly code: "capacity_limit" | "denied_scope" | "incompatible_state" | "incomplete_cleanup" | "invalid_baseline" | "invalid_input" | "unauthenticated" | "unavailable_diff" | "unavailable_transport";
|
|
8663
|
+
readonly error: string;
|
|
8664
|
+
readonly modelChoices?: {
|
|
8665
|
+
runner: string;
|
|
8666
|
+
requestedModel: string;
|
|
8667
|
+
availableModels: {
|
|
8668
|
+
id: string;
|
|
8669
|
+
label: string;
|
|
8670
|
+
description: string;
|
|
8671
|
+
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
8672
|
+
}[];
|
|
8673
|
+
otherRunners: string[];
|
|
8674
|
+
} | undefined;
|
|
8664
8675
|
};
|
|
8665
8676
|
outputFormat: "json";
|
|
8666
|
-
status: 400;
|
|
8677
|
+
status: 400 | 401 | 403 | 409 | 503;
|
|
8667
8678
|
input: {
|
|
8668
8679
|
query: {
|
|
8669
8680
|
[x: string]: string | string[];
|
|
@@ -8679,22 +8690,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
8679
8690
|
};
|
|
8680
8691
|
} | {
|
|
8681
8692
|
output: {
|
|
8682
|
-
|
|
8683
|
-
|
|
8684
|
-
readonly modelChoices?: {
|
|
8685
|
-
runner: string;
|
|
8686
|
-
requestedModel: string;
|
|
8687
|
-
availableModels: {
|
|
8688
|
-
id: string;
|
|
8689
|
-
label: string;
|
|
8690
|
-
description: string;
|
|
8691
|
-
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
8692
|
-
}[];
|
|
8693
|
-
otherRunners: string[];
|
|
8694
|
-
} | undefined;
|
|
8693
|
+
error: string;
|
|
8694
|
+
code?: "invalid_input" | undefined;
|
|
8695
8695
|
};
|
|
8696
8696
|
outputFormat: "json";
|
|
8697
|
-
status: 400
|
|
8697
|
+
status: 400;
|
|
8698
8698
|
input: {
|
|
8699
8699
|
query: {
|
|
8700
8700
|
[x: string]: string | string[];
|
|
@@ -25313,11 +25313,22 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
25313
25313
|
"/runs/:id/worker-destroy": {
|
|
25314
25314
|
$post: {
|
|
25315
25315
|
output: {
|
|
25316
|
-
|
|
25317
|
-
|
|
25316
|
+
readonly code: "capacity_limit" | "denied_scope" | "incompatible_state" | "incomplete_cleanup" | "invalid_baseline" | "invalid_input" | "unauthenticated" | "unavailable_diff" | "unavailable_transport";
|
|
25317
|
+
readonly error: string;
|
|
25318
|
+
readonly modelChoices?: {
|
|
25319
|
+
runner: string;
|
|
25320
|
+
requestedModel: string;
|
|
25321
|
+
availableModels: {
|
|
25322
|
+
id: string;
|
|
25323
|
+
label: string;
|
|
25324
|
+
description: string;
|
|
25325
|
+
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
25326
|
+
}[];
|
|
25327
|
+
otherRunners: string[];
|
|
25328
|
+
} | undefined;
|
|
25318
25329
|
};
|
|
25319
25330
|
outputFormat: "json";
|
|
25320
|
-
status: 400;
|
|
25331
|
+
status: 400 | 401 | 403 | 409 | 503;
|
|
25321
25332
|
input: {
|
|
25322
25333
|
query: {
|
|
25323
25334
|
[x: string]: string | string[];
|
|
@@ -25333,22 +25344,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
25333
25344
|
};
|
|
25334
25345
|
} | {
|
|
25335
25346
|
output: {
|
|
25336
|
-
|
|
25337
|
-
|
|
25338
|
-
readonly modelChoices?: {
|
|
25339
|
-
runner: string;
|
|
25340
|
-
requestedModel: string;
|
|
25341
|
-
availableModels: {
|
|
25342
|
-
id: string;
|
|
25343
|
-
label: string;
|
|
25344
|
-
description: string;
|
|
25345
|
-
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
25346
|
-
}[];
|
|
25347
|
-
otherRunners: string[];
|
|
25348
|
-
} | undefined;
|
|
25347
|
+
error: string;
|
|
25348
|
+
code?: "invalid_input" | undefined;
|
|
25349
25349
|
};
|
|
25350
25350
|
outputFormat: "json";
|
|
25351
|
-
status: 400
|
|
25351
|
+
status: 400;
|
|
25352
25352
|
input: {
|
|
25353
25353
|
query: {
|
|
25354
25354
|
[x: string]: string | string[];
|
|
@@ -7,12 +7,6 @@ export declare function createWorkspaceLiveRoutes(live: Parameters<typeof create
|
|
|
7
7
|
output: {
|
|
8
8
|
generation: string;
|
|
9
9
|
results: ({
|
|
10
|
-
projectId: string;
|
|
11
|
-
runId: string;
|
|
12
|
-
type: "error" | "reset";
|
|
13
|
-
status: 400 | 404 | 409 | 413 | 503;
|
|
14
|
-
error: string;
|
|
15
|
-
} | {
|
|
16
10
|
projectId: string;
|
|
17
11
|
runId: string;
|
|
18
12
|
type: "batch";
|
|
@@ -26,6 +20,12 @@ export declare function createWorkspaceLiveRoutes(live: Parameters<typeof create
|
|
|
26
20
|
cursor: string;
|
|
27
21
|
afterSeq: number;
|
|
28
22
|
hasMore: boolean;
|
|
23
|
+
} | {
|
|
24
|
+
projectId: string;
|
|
25
|
+
runId: string;
|
|
26
|
+
type: "error" | "reset";
|
|
27
|
+
status: 400 | 404 | 409 | 413 | 503;
|
|
28
|
+
error: string;
|
|
29
29
|
})[];
|
|
30
30
|
};
|
|
31
31
|
outputFormat: "json";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hearsay-tools/squawk",
|
|
3
|
-
"version": "0.18.0-
|
|
3
|
+
"version": "0.18.0-pr4231.8178",
|
|
4
4
|
"description": "Local cockpit for running and tracking AI agent tasks in your repo. Uses your logged-in `claude` CLI and `gh` — zero config, zero database.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@babel/parser": "^8.0.8",
|
|
70
70
|
"@babel/types": "^8.0.8",
|
|
71
|
-
"@open-mercato/cezar-api-client": "0.18.0-
|
|
72
|
-
"@open-mercato/cezar-contract": "0.18.0-
|
|
71
|
+
"@open-mercato/cezar-api-client": "0.18.0-pr4231.8178",
|
|
72
|
+
"@open-mercato/cezar-contract": "0.18.0-pr4231.8178",
|
|
73
73
|
"@types/node": "^24.19.1",
|
|
74
74
|
"@types/ws": "^8.18.1",
|
|
75
75
|
"esbuild": "^0.28.1",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "6f42f15807a87999850229ba70171155bc6ab06b"
|
|
90
90
|
}
|
|
@@ -6,14 +6,16 @@ import { installPluginResolveHook } from '../src/plugin/resolve-hook.ts';
|
|
|
6
6
|
import { registerBuiltInRunSlots, sealBuiltInRunSlots } from '../src/built-in-run-slots.ts';
|
|
7
7
|
|
|
8
8
|
installPluginResolveHook();
|
|
9
|
-
const {
|
|
9
|
+
const { loadBundledRunners } = await import('../src/plugin/loader.ts');
|
|
10
|
+
const { sealRunners } = await import('../src/core/runner-registry.ts');
|
|
11
|
+
// The bundled runners load at import, so prepareBenchmarkRuntime stays synchronous.
|
|
12
|
+
await loadBundledRunners();
|
|
10
13
|
|
|
11
14
|
/** Boot the process services used by benchmarks that open a run store. */
|
|
12
15
|
export function prepareBenchmarkRuntime(): void {
|
|
13
16
|
// Workspace receipts and markers use the host's identity store (ADR 0032).
|
|
14
17
|
installWindowsIdentityStore();
|
|
15
|
-
|
|
16
|
-
sealBuiltInRunners();
|
|
18
|
+
sealRunners();
|
|
17
19
|
registerBuiltInRunSlots();
|
|
18
20
|
sealBuiltInRunSlots();
|
|
19
21
|
registerBuiltInStepKinds();
|
package/scripts/check-pack.mjs
CHANGED
|
@@ -15,6 +15,7 @@ import { execFileSync } from 'node:child_process';
|
|
|
15
15
|
import path from 'node:path';
|
|
16
16
|
import { fileURLToPath } from 'node:url';
|
|
17
17
|
import { findPackGaps } from '../dist/pack-check.js';
|
|
18
|
+
import { bundledRunnerIds } from '../dist/plugin/bundled-runners.js';
|
|
18
19
|
|
|
19
20
|
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
20
21
|
|
|
@@ -37,7 +38,9 @@ if (files.length === 0) {
|
|
|
37
38
|
process.exit(1);
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
// The bundled runners the source declares: each must ship its built plugin entry.
|
|
42
|
+
const runnerIds = bundledRunnerIds(path.join(repoRoot, 'src/runners'));
|
|
43
|
+
const gaps = findPackGaps(files, runnerIds);
|
|
41
44
|
if (gaps.length > 0) {
|
|
42
45
|
console.error('check:pack: the npm tarball would ship a broken cockpit:');
|
|
43
46
|
for (const gap of gaps) console.error(` - ${gap}`);
|
|
@@ -45,4 +48,4 @@ if (gaps.length > 0) {
|
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
const uiFiles = files.filter((f) => f.startsWith('web/dist/')).length;
|
|
48
|
-
console.log(`check:pack ok — ${files.length} files, ${uiFiles} under web/dist (shell + assets present)`);
|
|
51
|
+
console.log(`check:pack ok — ${files.length} files, ${uiFiles} under web/dist (shell + assets present), bundled runners ${runnerIds.join(', ')}`);
|
|
@@ -32,11 +32,12 @@ try {
|
|
|
32
32
|
const { startServer } = await import(new URL('server/start-server.js', runtime.url));
|
|
33
33
|
const { installPluginResolveHook } = await import(new URL('plugin/resolve-hook.js', runtime.url));
|
|
34
34
|
installPluginResolveHook();
|
|
35
|
-
const {
|
|
35
|
+
const { loadBundledRunners } = await import(new URL('plugin/loader.js', runtime.url));
|
|
36
|
+
const { sealRunners } = await import(new URL('core/runner-registry.js', runtime.url));
|
|
36
37
|
// This measurement is a process entry like index.ts: the server reads every registered runner,
|
|
37
38
|
// and a reclaim or a deletion asks the removal slots.
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
await loadBundledRunners();
|
|
40
|
+
sealRunners();
|
|
40
41
|
const { registerBuiltInRunSlots, sealBuiltInRunSlots } = await import(new URL('built-in-run-slots.js', runtime.url));
|
|
41
42
|
registerBuiltInRunSlots();
|
|
42
43
|
sealBuiltInRunSlots();
|
package/scripts/parity-rows.ts
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { RunnerDefinition } from '../core/runner-definition.ts';
|
|
2
|
-
/** The runners that ship with Squawk, in display order. A new built-in runner adds one line. */
|
|
3
|
-
export declare const BUILT_IN_RUNNERS: readonly RunnerDefinition[];
|
|
4
|
-
/**
|
|
5
|
-
* Register every built-in runner. Each process entry calls it before it reads config or runs a
|
|
6
|
-
* task. A second call registers the same objects again, which the registry ignores.
|
|
7
|
-
*/
|
|
8
|
-
export declare function registerBuiltInRunners(): void;
|
|
9
|
-
/** Seal after all built-in and additional runner registrations. */
|
|
10
|
-
export { sealRunners as sealBuiltInRunners } from '../core/runner-registry.ts';
|
package/dist/runners/built-in.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { registerRunner } from '../core/runner-registry.js';
|
|
2
|
-
import { claudeRunner } from './claude/definition.js';
|
|
3
|
-
import { codexRunner } from './codex/definition.js';
|
|
4
|
-
import { opencodeRunner } from './opencode/definition.js';
|
|
5
|
-
import { piRunner } from './pi/definition.js';
|
|
6
|
-
import { ompRunner } from './omp/definition.js';
|
|
7
|
-
import { antigravityRunner } from './antigravity/definition.js';
|
|
8
|
-
/** The runners that ship with Squawk, in display order. A new built-in runner adds one line. */
|
|
9
|
-
export const BUILT_IN_RUNNERS = [claudeRunner, codexRunner, opencodeRunner, piRunner, ompRunner, antigravityRunner];
|
|
10
|
-
/**
|
|
11
|
-
* Register every built-in runner. Each process entry calls it before it reads config or runs a
|
|
12
|
-
* task. A second call registers the same objects again, which the registry ignores.
|
|
13
|
-
*/
|
|
14
|
-
export function registerBuiltInRunners() {
|
|
15
|
-
for (const definition of BUILT_IN_RUNNERS)
|
|
16
|
-
registerRunner(definition);
|
|
17
|
-
}
|
|
18
|
-
/** Seal after all built-in and additional runner registrations. */
|
|
19
|
-
export { sealRunners as sealBuiltInRunners } from '../core/runner-registry.js';
|
|
20
|
-
//# sourceMappingURL=built-in.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"built-in.js","sourceRoot":"","sources":["../../src/runners/built-in.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,gGAAgG;AAChG,MAAM,CAAC,MAAM,gBAAgB,GAAgC,CAAC,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,CAAC,CAAC;AAGjJ;;;GAGG;AACH,MAAM,UAAU,sBAAsB;IACpC,KAAK,MAAM,UAAU,IAAI,gBAAgB;QAAE,cAAc,CAAC,UAAU,CAAC,CAAC;AACxE,CAAC;AAED,mEAAmE;AACnE,OAAO,EAAE,WAAW,IAAI,kBAAkB,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/runners/ids.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The ids of the runners Squawk ships, in display order: plain data, the one roster of runner
|
|
3
|
-
* ids (spec 2026-11-18-runner-definitions, decision 5). `runners/built-in.ts` holds the
|
|
4
|
-
* definitions these ids name and checks the two lists match; importing this module loads no
|
|
5
|
-
* definition and no adapter, which is why the global test setup reads it (`vitest.setup.ts`)
|
|
6
|
-
* and why the closure guard (`core/runner-closure.test.ts`) keeps it free of runner code.
|
|
7
|
-
*/
|
|
8
|
-
export declare const BUILT_IN_RUNNER_IDS: readonly string[];
|
package/dist/runners/ids.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The ids of the runners Squawk ships, in display order: plain data, the one roster of runner
|
|
3
|
-
* ids (spec 2026-11-18-runner-definitions, decision 5). `runners/built-in.ts` holds the
|
|
4
|
-
* definitions these ids name and checks the two lists match; importing this module loads no
|
|
5
|
-
* definition and no adapter, which is why the global test setup reads it (`vitest.setup.ts`)
|
|
6
|
-
* and why the closure guard (`core/runner-closure.test.ts`) keeps it free of runner code.
|
|
7
|
-
*/
|
|
8
|
-
export const BUILT_IN_RUNNER_IDS = ['claude', 'codex', 'opencode', 'pi', 'omp', 'antigravity'];
|
|
9
|
-
//# sourceMappingURL=ids.js.map
|
package/dist/runners/ids.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ids.js","sourceRoot":"","sources":["../../src/runners/ids.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAsB,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC"}
|