@hearsay-tools/squawk 0.18.0-pr4213.8116 → 0.18.0-pr4215.8117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ci-wait/tool-registry.d.ts +2 -0
- package/dist/ci-wait/tool-registry.js +2 -0
- package/dist/ci-wait/tool-registry.js.map +1 -1
- package/dist/core/cli-registry.d.ts +2 -0
- package/dist/core/cli-registry.js +2 -0
- package/dist/core/cli-registry.js.map +1 -1
- package/dist/core/registry.d.ts +3 -0
- package/dist/core/registry.js +20 -9
- package/dist/core/registry.js.map +1 -1
- package/dist/core/runner-registry.d.ts +2 -0
- package/dist/core/runner-registry.js +4 -0
- package/dist/core/runner-registry.js.map +1 -1
- package/dist/delegation/routes.d.ts +65 -65
- package/dist/plugin/api.d.ts +32 -0
- package/dist/plugin/api.js +146 -0
- package/dist/plugin/api.js.map +1 -0
- package/dist/plugin/index.d.ts +12 -0
- package/dist/plugin/index.js +2 -0
- package/dist/plugin/index.js.map +1 -0
- package/dist/runs/lifecycle-registry.d.ts +16 -0
- package/dist/runs/lifecycle-registry.js +30 -0
- package/dist/runs/lifecycle-registry.js.map +1 -0
- package/dist/runs/removal-slots.d.ts +2 -0
- package/dist/runs/removal-slots.js +9 -0
- package/dist/runs/removal-slots.js.map +1 -1
- package/dist/runs/store.d.ts +2 -0
- package/dist/runs/store.js +5 -0
- package/dist/runs/store.js.map +1 -1
- 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 +2876 -2876
- package/dist/server/workspace-live-routes.d.ts +6 -6
- package/dist/workflows/run/wait-kind-registry.d.ts +2 -0
- package/dist/workflows/run/wait-kind-registry.js +6 -1
- package/dist/workflows/run/wait-kind-registry.js.map +1 -1
- package/dist/workflows/step-kind-registry.d.ts +2 -0
- package/dist/workflows/step-kind-registry.js +6 -1
- package/dist/workflows/step-kind-registry.js.map +1 -1
- package/package.json +5 -4
|
@@ -41,6 +41,8 @@ export interface AgentToolDefinition {
|
|
|
41
41
|
invoke(input: unknown): Promise<AgentToolResult>;
|
|
42
42
|
}
|
|
43
43
|
export declare const registerAgentTool: (tool: AgentToolDefinition) => void;
|
|
44
|
+
/** Throws what `registerAgentTool` would throw for this tool, without registering it. */
|
|
45
|
+
export declare const checkAgentToolRegistration: (tool: AgentToolDefinition) => void;
|
|
44
46
|
export declare const sealAgentTools: () => void;
|
|
45
47
|
export declare const agentToolsSealed: () => boolean;
|
|
46
48
|
export declare const registeredAgentTools: () => AgentToolDefinition[];
|
|
@@ -3,6 +3,8 @@ const registry = createKeyedRegistry({
|
|
|
3
3
|
name: 'Agent tool registry', reservedKeys: ['ci-wait'], bootHint: 'Call registerBuiltInTools(), then sealAgentTools() at boot.',
|
|
4
4
|
});
|
|
5
5
|
export const registerAgentTool = (tool) => registry.register(tool.name, tool);
|
|
6
|
+
/** Throws what `registerAgentTool` would throw for this tool, without registering it. */
|
|
7
|
+
export const checkAgentToolRegistration = (tool) => registry.check(tool.name, tool);
|
|
6
8
|
export const sealAgentTools = registry.seal;
|
|
7
9
|
export const agentToolsSealed = registry.isSealed;
|
|
8
10
|
export const registeredAgentTools = registry.values;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-registry.js","sourceRoot":"","sources":["../../src/ci-wait/tool-registry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AA6B1D,MAAM,QAAQ,GAAG,mBAAmB,CAA8B;IAChE,IAAI,EAAE,qBAAqB,EAAE,YAAY,EAAE,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,6DAA6D;CAChI,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAAyB,EAAQ,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,C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AI,CAAC,WAAW,EAAE,CAAC;IAClC,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,MAAM;QAC1C,WAAW,EAAE,qBAAqB,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC;AACvD,CAAC;AACD,MAAM,UAAU,qBAAqB,CAAC,IAAyB,EAAE,MAAe;IAC9E,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;AAC5H,CAAC"}
|
|
@@ -40,6 +40,8 @@ export type CliCommandDefinition = CommandMetadata & ({
|
|
|
40
40
|
load: () => Promise<(context: RootCommandContext) => Promise<void>>;
|
|
41
41
|
});
|
|
42
42
|
export declare const registerCliCommand: (command: CliCommandDefinition) => void;
|
|
43
|
+
/** Throws what `registerCliCommand` would throw for this command, without registering it. */
|
|
44
|
+
export declare const checkCliCommandRegistration: (command: CliCommandDefinition) => void;
|
|
43
45
|
export declare const sealCliCommands: () => void;
|
|
44
46
|
export declare const cliCommandsSealed: () => boolean;
|
|
45
47
|
export declare const cliCommand: (key: string) => CliCommandDefinition | undefined;
|
|
@@ -3,6 +3,8 @@ const commands = createKeyedRegistry({
|
|
|
3
3
|
name: 'CLI commands', bootHint: 'Register CLI commands, then call sealCliCommands() before dispatch.',
|
|
4
4
|
});
|
|
5
5
|
export const registerCliCommand = (command) => commands.register(command.name, command);
|
|
6
|
+
/** Throws what `registerCliCommand` would throw for this command, without registering it. */
|
|
7
|
+
export const checkCliCommandRegistration = (command) => commands.check(command.name, command);
|
|
6
8
|
export const sealCliCommands = commands.seal;
|
|
7
9
|
export const cliCommandsSealed = commands.isSealed;
|
|
8
10
|
export const cliCommand = commands.get;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-registry.js","sourceRoot":"","sources":["../../src/core/cli-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AA8BpD,MAAM,QAAQ,GAAG,mBAAmB,CAA+B;IACjE,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,qEAAqE;CACtG,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAA6B,EAAQ,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACpH,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC,IAAI,CAAC;AAC7C,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,QAAQ,CAAC;AACnD,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,GAAG,CAAC;AACvC,MAAM,CAAC,MAAM,qBAAqB,GAAG,QAAQ,CAAC,MAAM,CAAC;AACrD,MAAM,CAAC,MAAM,aAAa,GAAG,QAAQ,CAAC,GAAG,CAAC;AAC1C,qEAAqE;AACrE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAY,EAAoC,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"cli-registry.js","sourceRoot":"","sources":["../../src/core/cli-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AA8BpD,MAAM,QAAQ,GAAG,mBAAmB,CAA+B;IACjE,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,qEAAqE;CACtG,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAA6B,EAAQ,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACpH,6FAA6F;AAC7F,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,OAA6B,EAAQ,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC1H,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC,IAAI,CAAC;AAC7C,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,QAAQ,CAAC;AACnD,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,GAAG,CAAC;AACvC,MAAM,CAAC,MAAM,qBAAqB,GAAG,QAAQ,CAAC,MAAM,CAAC;AACrD,MAAM,CAAC,MAAM,aAAa,GAAG,QAAQ,CAAC,GAAG,CAAC;AAC1C,qEAAqE;AACrE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAY,EAAoC,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC"}
|
package/dist/core/registry.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export declare function createKeyedRegistry<K extends string, V>(options: Regist
|
|
|
9
9
|
}): {
|
|
10
10
|
seal: () => void;
|
|
11
11
|
isSealed: () => boolean;
|
|
12
|
+
check(key: K, value: V): void;
|
|
12
13
|
register(key: K, value: V): void;
|
|
13
14
|
get(key: K): V | undefined;
|
|
14
15
|
has(key: K): boolean;
|
|
@@ -22,6 +23,8 @@ export declare function createKeyedRegistry<K extends string, V>(options: Regist
|
|
|
22
23
|
export declare function createListRegistry<V>(options: RegistryOptions): {
|
|
23
24
|
seal: () => void;
|
|
24
25
|
isSealed: () => boolean;
|
|
26
|
+
/** Throws what `register` would throw, without writing. */
|
|
27
|
+
check(item: V): void;
|
|
25
28
|
register(item: V): void;
|
|
26
29
|
values(): V[];
|
|
27
30
|
};
|
package/dist/core/registry.js
CHANGED
|
@@ -18,19 +18,25 @@ export function createKeyedRegistry(options) {
|
|
|
18
18
|
const state = lifecycle(options);
|
|
19
19
|
const entries = new Map();
|
|
20
20
|
const reserved = new Set(options.reservedKeys);
|
|
21
|
+
/** Throws what `register` would throw, without writing. True when the entry is new. */
|
|
22
|
+
function check(key, value) {
|
|
23
|
+
if (reserved.has(key))
|
|
24
|
+
throw new Error(`${options.name}: reserved legacy key '${key}'.`);
|
|
25
|
+
if (entries.has(key)) {
|
|
26
|
+
if (entries.get(key) === value)
|
|
27
|
+
return false;
|
|
28
|
+
throw new Error(`${options.name}: conflicting registration for '${key}'.`);
|
|
29
|
+
}
|
|
30
|
+
state.assertWritable();
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
21
33
|
return {
|
|
22
34
|
seal: state.seal,
|
|
23
35
|
isSealed: state.isSealed,
|
|
36
|
+
check(key, value) { check(key, value); },
|
|
24
37
|
register(key, value) {
|
|
25
|
-
if (
|
|
26
|
-
|
|
27
|
-
if (entries.has(key)) {
|
|
28
|
-
if (entries.get(key) === value)
|
|
29
|
-
return;
|
|
30
|
-
throw new Error(`${options.name}: conflicting registration for '${key}'.`);
|
|
31
|
-
}
|
|
32
|
-
state.assertWritable();
|
|
33
|
-
entries.set(key, value);
|
|
38
|
+
if (check(key, value))
|
|
39
|
+
entries.set(key, value);
|
|
34
40
|
},
|
|
35
41
|
get(key) { state.assertReadable(); return entries.get(key); },
|
|
36
42
|
has(key) { state.assertReadable(); return entries.has(key); },
|
|
@@ -48,6 +54,11 @@ export function createListRegistry(options) {
|
|
|
48
54
|
return {
|
|
49
55
|
seal: state.seal,
|
|
50
56
|
isSealed: state.isSealed,
|
|
57
|
+
/** Throws what `register` would throw, without writing. */
|
|
58
|
+
check(item) {
|
|
59
|
+
if (!items.some(value => value === item))
|
|
60
|
+
state.assertWritable();
|
|
61
|
+
},
|
|
51
62
|
register(item) {
|
|
52
63
|
if (items.some(value => value === item))
|
|
53
64
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/core/registry.ts"],"names":[],"mappings":"AAMA,SAAS,SAAS,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAmB;IACpD,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,OAAO;QACL,IAAI,KAAK,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;QACzB,QAAQ,EAAE,GAAG,EAAE,CAAC,MAAM;QACtB,cAAc;YACZ,IAAI,CAAC,MAAM;gBAAE,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,iBAAiB,QAAQ,EAAE,CAAC,CAAC;QACnE,CAAC;QACD,cAAc;YACZ,IAAI,MAAM;gBAAE,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,oDAAoD,QAAQ,EAAE,CAAC,CAAC;QACrG,CAAC;KACF,CAAC;AACJ,CAAC;AAED,gGAAgG;AAChG,MAAM,UAAU,mBAAmB,CAAsB,OAAqF;IAC5I,MAAM,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;IACjC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAQ,CAAC;IAChC,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IAC/C,
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/core/registry.ts"],"names":[],"mappings":"AAMA,SAAS,SAAS,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAmB;IACpD,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,OAAO;QACL,IAAI,KAAK,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;QACzB,QAAQ,EAAE,GAAG,EAAE,CAAC,MAAM;QACtB,cAAc;YACZ,IAAI,CAAC,MAAM;gBAAE,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,iBAAiB,QAAQ,EAAE,CAAC,CAAC;QACnE,CAA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20
20
|
* map resolves it for saved runs, so no runner may take it.
|
|
21
21
|
*/
|
|
22
22
|
export declare function registerRunner(definition: RunnerDefinition): void;
|
|
23
|
+
/** Throws what `registerRunner` would throw for this definition, without registering it. */
|
|
24
|
+
export declare function checkRunnerRegistration(definition: RunnerDefinition): void;
|
|
23
25
|
/** The registered runners, in registration order. */
|
|
24
26
|
export declare function registeredRunners(): RunnerDefinition[];
|
|
25
27
|
/** Whether a runner with this id is registered. */
|
|
@@ -37,6 +37,10 @@ export function savedRunnerId(id) {
|
|
|
37
37
|
export function registerRunner(definition) {
|
|
38
38
|
runners.register(definition.id, definition);
|
|
39
39
|
}
|
|
40
|
+
/** Throws what `registerRunner` would throw for this definition, without registering it. */
|
|
41
|
+
export function checkRunnerRegistration(definition) {
|
|
42
|
+
runners.check(definition.id, definition);
|
|
43
|
+
}
|
|
40
44
|
/** The registered runners, in registration order. */
|
|
41
45
|
export function registeredRunners() {
|
|
42
46
|
return runners.values();
|
|
@@ -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,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEvE,+EAA+E;AAC/E,MAAM,OAAO,GAAG,mBAAmB,CAA2B;IAC5D,IAAI,EAAE,iBAAiB;IACvB,QAAQ,EAAE,+GAA+G;IACzH,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,UAAU,aAAa,KAAc,OAAO,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;AAEvE;;;;GAIG;AACH,MAAM,UAAU,e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AAC;AACzB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,EAAU;IAC3C,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAC;IAChF,OAAO,EAAE,CAAC;AACZ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,EAAU;IAChD,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC3D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAClD,CAAC;AAED,6CAA6C;AAC7C,MAAM,UAAU,gBAAgB,CAAC,EAAU;IACzC,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACnC,IAAI,CAAC,UAAU;QAAE,MAAM,IAAI,KAAK,CAAC,UAAU,EAAE,wDAAwD,EAAE,qCAAqC,CAAC,CAAC;IAC9I,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAA2B;IAC5D,OAAO,gBAAgB,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AAClE,CAAC"}
|
|
@@ -27,18 +27,6 @@ export declare function delegationFailure(error: unknown): {
|
|
|
27
27
|
export declare function createDelegationRoutes(service: DelegationService, credentials: CredentialRegistry): import("hono/hono-base").HonoBase<Env, {
|
|
28
28
|
"/list": {
|
|
29
29
|
$get: {
|
|
30
|
-
output: {
|
|
31
|
-
error: string;
|
|
32
|
-
code?: "invalid_input" | undefined;
|
|
33
|
-
};
|
|
34
|
-
outputFormat: "json";
|
|
35
|
-
status: 400;
|
|
36
|
-
input: {
|
|
37
|
-
query: {
|
|
38
|
-
offset?: string | undefined;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
} | {
|
|
42
30
|
output: {
|
|
43
31
|
workers: {
|
|
44
32
|
workerId: string;
|
|
@@ -91,6 +79,18 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
91
79
|
offset?: string | undefined;
|
|
92
80
|
};
|
|
93
81
|
};
|
|
82
|
+
} | {
|
|
83
|
+
output: {
|
|
84
|
+
error: string;
|
|
85
|
+
code?: "invalid_input" | undefined;
|
|
86
|
+
};
|
|
87
|
+
outputFormat: "json";
|
|
88
|
+
status: 400;
|
|
89
|
+
input: {
|
|
90
|
+
query: {
|
|
91
|
+
offset?: string | undefined;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
94
|
};
|
|
95
95
|
};
|
|
96
96
|
} & {
|
|
@@ -641,18 +641,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
641
641
|
} & {
|
|
642
642
|
"/:workerId": {
|
|
643
643
|
$get: {
|
|
644
|
-
output: {
|
|
645
|
-
error: string;
|
|
646
|
-
code?: "invalid_input" | undefined;
|
|
647
|
-
};
|
|
648
|
-
outputFormat: "json";
|
|
649
|
-
status: 400;
|
|
650
|
-
input: {
|
|
651
|
-
param: {
|
|
652
|
-
workerId: string;
|
|
653
|
-
};
|
|
654
|
-
};
|
|
655
|
-
} | {
|
|
656
644
|
output: {
|
|
657
645
|
workerId: string;
|
|
658
646
|
settled: boolean;
|
|
@@ -777,11 +765,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
777
765
|
workerId: string;
|
|
778
766
|
};
|
|
779
767
|
};
|
|
780
|
-
}
|
|
781
|
-
};
|
|
782
|
-
} & {
|
|
783
|
-
"/:workerId/collect": {
|
|
784
|
-
$post: {
|
|
768
|
+
} | {
|
|
785
769
|
output: {
|
|
786
770
|
error: string;
|
|
787
771
|
code?: "invalid_input" | undefined;
|
|
@@ -792,10 +776,12 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
792
776
|
param: {
|
|
793
777
|
workerId: string;
|
|
794
778
|
};
|
|
795
|
-
} & {
|
|
796
|
-
json: Record<string, never>;
|
|
797
779
|
};
|
|
798
|
-
}
|
|
780
|
+
};
|
|
781
|
+
};
|
|
782
|
+
} & {
|
|
783
|
+
"/:workerId/collect": {
|
|
784
|
+
$post: {
|
|
799
785
|
output: {
|
|
800
786
|
workerId: string;
|
|
801
787
|
parentRunId: string;
|
|
@@ -918,11 +904,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
918
904
|
} & {
|
|
919
905
|
json: Record<string, never>;
|
|
920
906
|
};
|
|
921
|
-
}
|
|
922
|
-
};
|
|
923
|
-
} & {
|
|
924
|
-
"/:workerId/steer": {
|
|
925
|
-
$post: {
|
|
907
|
+
} | {
|
|
926
908
|
output: {
|
|
927
909
|
error: string;
|
|
928
910
|
code?: "invalid_input" | undefined;
|
|
@@ -934,11 +916,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
934
916
|
workerId: string;
|
|
935
917
|
};
|
|
936
918
|
} & {
|
|
937
|
-
json:
|
|
938
|
-
text: string;
|
|
939
|
-
};
|
|
919
|
+
json: Record<string, never>;
|
|
940
920
|
};
|
|
941
|
-
}
|
|
921
|
+
};
|
|
922
|
+
};
|
|
923
|
+
} & {
|
|
924
|
+
"/:workerId/steer": {
|
|
925
|
+
$post: {
|
|
942
926
|
output: {
|
|
943
927
|
workerId: string;
|
|
944
928
|
state: "delivered" | "queued";
|
|
@@ -954,11 +938,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
954
938
|
text: string;
|
|
955
939
|
};
|
|
956
940
|
};
|
|
957
|
-
}
|
|
958
|
-
};
|
|
959
|
-
} & {
|
|
960
|
-
"/:workerId/stop": {
|
|
961
|
-
$post: {
|
|
941
|
+
} | {
|
|
962
942
|
output: {
|
|
963
943
|
error: string;
|
|
964
944
|
code?: "invalid_input" | undefined;
|
|
@@ -970,9 +950,15 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
970
950
|
workerId: string;
|
|
971
951
|
};
|
|
972
952
|
} & {
|
|
973
|
-
json:
|
|
953
|
+
json: {
|
|
954
|
+
text: string;
|
|
955
|
+
};
|
|
974
956
|
};
|
|
975
|
-
}
|
|
957
|
+
};
|
|
958
|
+
};
|
|
959
|
+
} & {
|
|
960
|
+
"/:workerId/stop": {
|
|
961
|
+
$post: {
|
|
976
962
|
output: {
|
|
977
963
|
workerId: string;
|
|
978
964
|
state: "stopping" | "terminated";
|
|
@@ -986,11 +972,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
986
972
|
} & {
|
|
987
973
|
json: Record<string, never>;
|
|
988
974
|
};
|
|
989
|
-
}
|
|
990
|
-
};
|
|
991
|
-
} & {
|
|
992
|
-
"/:workerId/destroy": {
|
|
993
|
-
$post: {
|
|
975
|
+
} | {
|
|
994
976
|
output: {
|
|
995
977
|
error: string;
|
|
996
978
|
code?: "invalid_input" | undefined;
|
|
@@ -1002,11 +984,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1002
984
|
workerId: string;
|
|
1003
985
|
};
|
|
1004
986
|
} & {
|
|
1005
|
-
json:
|
|
1006
|
-
discardWork?: true | undefined;
|
|
1007
|
-
};
|
|
987
|
+
json: Record<string, never>;
|
|
1008
988
|
};
|
|
1009
|
-
}
|
|
989
|
+
};
|
|
990
|
+
};
|
|
991
|
+
} & {
|
|
992
|
+
"/:workerId/destroy": {
|
|
993
|
+
$post: {
|
|
1010
994
|
output: {
|
|
1011
995
|
workerId: string;
|
|
1012
996
|
state: "complete" | "incomplete";
|
|
@@ -1035,6 +1019,22 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1035
1019
|
discardWork?: true | undefined;
|
|
1036
1020
|
};
|
|
1037
1021
|
};
|
|
1022
|
+
} | {
|
|
1023
|
+
output: {
|
|
1024
|
+
error: string;
|
|
1025
|
+
code?: "invalid_input" | undefined;
|
|
1026
|
+
};
|
|
1027
|
+
outputFormat: "json";
|
|
1028
|
+
status: 400;
|
|
1029
|
+
input: {
|
|
1030
|
+
param: {
|
|
1031
|
+
workerId: string;
|
|
1032
|
+
};
|
|
1033
|
+
} & {
|
|
1034
|
+
json: {
|
|
1035
|
+
discardWork?: true | undefined;
|
|
1036
|
+
};
|
|
1037
|
+
};
|
|
1038
1038
|
} | {
|
|
1039
1039
|
output: {
|
|
1040
1040
|
workerId: string;
|
|
@@ -1070,11 +1070,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1070
1070
|
"/:workerId/diff": {
|
|
1071
1071
|
$get: {
|
|
1072
1072
|
output: {
|
|
1073
|
-
|
|
1074
|
-
|
|
1073
|
+
workerId: string;
|
|
1074
|
+
baselineSha: string;
|
|
1075
|
+
diff: string;
|
|
1076
|
+
truncated: boolean;
|
|
1075
1077
|
};
|
|
1076
1078
|
outputFormat: "json";
|
|
1077
|
-
status:
|
|
1079
|
+
status: 200;
|
|
1078
1080
|
input: {
|
|
1079
1081
|
param: {
|
|
1080
1082
|
workerId: string;
|
|
@@ -1082,13 +1084,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1082
1084
|
};
|
|
1083
1085
|
} | {
|
|
1084
1086
|
output: {
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
diff: string;
|
|
1088
|
-
truncated: boolean;
|
|
1087
|
+
error: string;
|
|
1088
|
+
code?: "invalid_input" | undefined;
|
|
1089
1089
|
};
|
|
1090
1090
|
outputFormat: "json";
|
|
1091
|
-
status:
|
|
1091
|
+
status: 400;
|
|
1092
1092
|
input: {
|
|
1093
1093
|
param: {
|
|
1094
1094
|
workerId: string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The plugin API object and its transactional setup (spec 2026-11-24-plugin-loader-and-runner-kit
|
|
3
|
+
* § 2). A plugin is a setup function. `runPluginSetup` hands it a `SquawkPluginApi` that only
|
|
4
|
+
* stages each call. When setup ends without an error and every staged entry passes the checks
|
|
5
|
+
* its live registry applies, all entries commit. Otherwise nothing commits and the error throws.
|
|
6
|
+
*/
|
|
7
|
+
import { type AgentToolDefinition } from '../ci-wait/tool-registry.ts';
|
|
8
|
+
import { type CliCommandDefinition } from '../core/cli-registry.ts';
|
|
9
|
+
import type { RunnerDefinition } from '../core/runner-definition.ts';
|
|
10
|
+
import type { RunLifecycleHandlers } from '../runs/lifecycle.ts';
|
|
11
|
+
import { type RunSlots } from '../runs/removal-slots.ts';
|
|
12
|
+
import { type WaitKindRow } from '../workflows/run/wait-kind-registry.ts';
|
|
13
|
+
import { type StepKindDefinition } from '../workflows/step-kind-registry.ts';
|
|
14
|
+
/** The register calls a plugin's setup function receives. Each call stages; nothing is live until setup ends. */
|
|
15
|
+
export interface SquawkPluginApi {
|
|
16
|
+
registerRunner(definition: RunnerDefinition): void;
|
|
17
|
+
registerAgentTool(tool: AgentToolDefinition): void;
|
|
18
|
+
registerWaitKind(row: WaitKindRow): void;
|
|
19
|
+
registerStepKind(step: StepKindDefinition): void;
|
|
20
|
+
registerCliCommand(command: CliCommandDefinition): void;
|
|
21
|
+
registerRemovalSlots(slots: Partial<RunSlots>): void;
|
|
22
|
+
onRunLifecycle(handlers: RunLifecycleHandlers): void;
|
|
23
|
+
}
|
|
24
|
+
/** A plugin module's default export. */
|
|
25
|
+
export type SquawkPlugin = (api: SquawkPluginApi) => void | Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Run one plugin's setup and commit what it registered, all or nothing. A setup that throws or
|
|
28
|
+
* rejects, or a staged entry that a live registry would refuse (a taken or reserved key, a
|
|
29
|
+
* duplicate within the plugin, an invalid shape, a sealed registry), commits no entry anywhere and
|
|
30
|
+
* rethrows that error. The api refuses calls once setup has ended.
|
|
31
|
+
*/
|
|
32
|
+
export declare function runPluginSetup(plugin: SquawkPlugin): Promise<void>;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The plugin API object and its transactional setup (spec 2026-11-24-plugin-loader-and-runner-kit
|
|
3
|
+
* § 2). A plugin is a setup function. `runPluginSetup` hands it a `SquawkPluginApi` that only
|
|
4
|
+
* stages each call. When setup ends without an error and every staged entry passes the checks
|
|
5
|
+
* its live registry applies, all entries commit. Otherwise nothing commits and the error throws.
|
|
6
|
+
*/
|
|
7
|
+
import { checkAgentToolRegistration, registerAgentTool } from '../ci-wait/tool-registry.js';
|
|
8
|
+
import { checkCliCommandRegistration, registerCliCommand } from '../core/cli-registry.js';
|
|
9
|
+
import { checkRunnerRegistration, registerRunner } from '../core/runner-registry.js';
|
|
10
|
+
import { checkRunLifecycleListenerRegistration, registerRunLifecycleListener } from '../runs/lifecycle-registry.js';
|
|
11
|
+
import { checkRunSlotsRegistration, registerRunSlots } from '../runs/removal-slots.js';
|
|
12
|
+
import { checkWaitKindRegistration, registerWaitKind } from '../workflows/run/wait-kind-registry.js';
|
|
13
|
+
import { checkStepKindRegistration, registerStepKind } from '../workflows/step-kind-registry.js';
|
|
14
|
+
/** The longest runner id a stored setting keeps (spec § 6, `storedRunnerIdSchema`). */
|
|
15
|
+
const MAX_RUNNER_ID_LENGTH = 64;
|
|
16
|
+
function isControlCharacter(character) {
|
|
17
|
+
const code = character.codePointAt(0) ?? 0;
|
|
18
|
+
return code < 0x20 || (code >= 0x7f && code <= 0x9f);
|
|
19
|
+
}
|
|
20
|
+
function checkRunnerId(id) {
|
|
21
|
+
if (typeof id !== 'string' || id.length === 0 || id !== id.trim() || id.length > MAX_RUNNER_ID_LENGTH || [...id].some(isControlCharacter)) {
|
|
22
|
+
throw new Error(`Invalid runner id ${JSON.stringify(id)}: use a trimmed, non-empty string of at most ${MAX_RUNNER_ID_LENGTH} characters with no control characters.`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function checkKey(registry, key) {
|
|
26
|
+
if (typeof key !== 'string' || key.length === 0)
|
|
27
|
+
throw new Error(`${registry}: invalid key ${JSON.stringify(key)}.`);
|
|
28
|
+
}
|
|
29
|
+
const runners = {
|
|
30
|
+
name: 'Runner registry', key: value => value.id, shape: value => checkRunnerId(value.id),
|
|
31
|
+
check: checkRunnerRegistration, commit: registerRunner,
|
|
32
|
+
};
|
|
33
|
+
const tools = {
|
|
34
|
+
name: 'Agent tool registry', key: value => value.name, check: checkAgentToolRegistration, commit: registerAgentTool,
|
|
35
|
+
};
|
|
36
|
+
const waitKinds = {
|
|
37
|
+
name: 'wait-kind registry', key: value => value.kind,
|
|
38
|
+
shape: value => { if (!Array.isArray(value.requestKinds))
|
|
39
|
+
throw new Error(`wait-kind registry: '${String(value.kind)}' needs a requestKinds array.`); },
|
|
40
|
+
check: checkWaitKindRegistration, commit: registerWaitKind,
|
|
41
|
+
};
|
|
42
|
+
const stepKinds = {
|
|
43
|
+
name: 'Workflow step kinds', key: value => value.kind, check: checkStepKindRegistration, commit: registerStepKind,
|
|
44
|
+
};
|
|
45
|
+
const cliCommands = {
|
|
46
|
+
name: 'CLI commands', key: value => value.name, check: checkCliCommandRegistration, commit: registerCliCommand,
|
|
47
|
+
};
|
|
48
|
+
function checkKeyed(table, values) {
|
|
49
|
+
const staged = new Map();
|
|
50
|
+
for (const value of values) {
|
|
51
|
+
const key = table.key(value);
|
|
52
|
+
table.shape?.(value);
|
|
53
|
+
table.check(value);
|
|
54
|
+
checkKey(table.name, key);
|
|
55
|
+
const earlier = staged.get(key);
|
|
56
|
+
if (earlier !== undefined && earlier !== value)
|
|
57
|
+
throw new Error(`${table.name}: the plugin registers '${String(key)}' twice.`);
|
|
58
|
+
staged.set(key, value);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/** Two staged wait kinds may not answer the same request kind. The live owners are `checkWaitKindRegistration`'s. */
|
|
62
|
+
function checkStagedRequestKinds(rows) {
|
|
63
|
+
const owners = new Map();
|
|
64
|
+
for (const row of rows) {
|
|
65
|
+
for (const kind of row.requestKinds) {
|
|
66
|
+
const owner = owners.get(kind);
|
|
67
|
+
if (owner && owner !== row)
|
|
68
|
+
throw new Error(`wait-kind registry: the plugin registers request kind '${kind}' twice.`);
|
|
69
|
+
owners.set(kind, row);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function checkSlots(slots) {
|
|
74
|
+
for (const name of ['gates', 'preparations', 'cleanups']) {
|
|
75
|
+
const list = slots[name];
|
|
76
|
+
if (list !== undefined && !Array.isArray(list))
|
|
77
|
+
throw new Error(`The removal slots: '${name}' must be an array.`);
|
|
78
|
+
}
|
|
79
|
+
checkRunSlotsRegistration(slots);
|
|
80
|
+
}
|
|
81
|
+
function checkStaged(staged) {
|
|
82
|
+
checkKeyed(runners, staged.runners);
|
|
83
|
+
checkKeyed(tools, staged.tools);
|
|
84
|
+
checkKeyed(waitKinds, staged.waitKinds);
|
|
85
|
+
checkStagedRequestKinds(staged.waitKinds);
|
|
86
|
+
checkKeyed(stepKinds, staged.stepKinds);
|
|
87
|
+
checkKeyed(cliCommands, staged.cliCommands);
|
|
88
|
+
for (const slots of staged.removalSlots)
|
|
89
|
+
checkSlots(slots);
|
|
90
|
+
for (const handlers of staged.lifecycle) {
|
|
91
|
+
if (typeof handlers !== 'object' || handlers === null)
|
|
92
|
+
throw new Error('Run lifecycle listeners: handlers must be an object.');
|
|
93
|
+
checkRunLifecycleListenerRegistration(handlers);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function commitStaged(staged) {
|
|
97
|
+
for (const value of staged.runners)
|
|
98
|
+
runners.commit(value);
|
|
99
|
+
for (const value of staged.tools)
|
|
100
|
+
tools.commit(value);
|
|
101
|
+
for (const value of staged.waitKinds)
|
|
102
|
+
waitKinds.commit(value);
|
|
103
|
+
for (const value of staged.stepKinds)
|
|
104
|
+
stepKinds.commit(value);
|
|
105
|
+
for (const value of staged.cliCommands)
|
|
106
|
+
cliCommands.commit(value);
|
|
107
|
+
for (const slots of staged.removalSlots)
|
|
108
|
+
registerRunSlots(slots);
|
|
109
|
+
for (const handlers of staged.lifecycle)
|
|
110
|
+
registerRunLifecycleListener(handlers);
|
|
111
|
+
}
|
|
112
|
+
function stagingApi(staged, open) {
|
|
113
|
+
const stage = (list) => (value) => {
|
|
114
|
+
if (!open())
|
|
115
|
+
throw new Error('A plugin may register only while its setup function runs.');
|
|
116
|
+
list.push(value);
|
|
117
|
+
};
|
|
118
|
+
return {
|
|
119
|
+
registerRunner: stage(staged.runners),
|
|
120
|
+
registerAgentTool: stage(staged.tools),
|
|
121
|
+
registerWaitKind: stage(staged.waitKinds),
|
|
122
|
+
registerStepKind: stage(staged.stepKinds),
|
|
123
|
+
registerCliCommand: stage(staged.cliCommands),
|
|
124
|
+
registerRemovalSlots: stage(staged.removalSlots),
|
|
125
|
+
onRunLifecycle: stage(staged.lifecycle),
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Run one plugin's setup and commit what it registered, all or nothing. A setup that throws or
|
|
130
|
+
* rejects, or a staged entry that a live registry would refuse (a taken or reserved key, a
|
|
131
|
+
* duplicate within the plugin, an invalid shape, a sealed registry), commits no entry anywhere and
|
|
132
|
+
* rethrows that error. The api refuses calls once setup has ended.
|
|
133
|
+
*/
|
|
134
|
+
export async function runPluginSetup(plugin) {
|
|
135
|
+
const staged = { runners: [], tools: [], waitKinds: [], stepKinds: [], cliCommands: [], removalSlots: [], lifecycle: [] };
|
|
136
|
+
let open = true;
|
|
137
|
+
try {
|
|
138
|
+
await plugin(stagingApi(staged, () => open));
|
|
139
|
+
}
|
|
140
|
+
finally {
|
|
141
|
+
open = false;
|
|
142
|
+
}
|
|
143
|
+
checkStaged(staged);
|
|
144
|
+
commitStaged(staged);
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/plugin/api.ts"],"names":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KAAK,CAAC,MAAM,CAAC,SAAS,CAAC;KACxC,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,MAAoB;IACvD,MAAM,MAAM,GAAiB,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;IACxI,IAAI,IAAI,GAAG,IAAI,CAAC;IAChB,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/C,CAAC;YAAS,CAAC;QACT,IAAI,GAAG,KAAK,CAAC;IACf,CAAC;IACD,WAAW,CAAC,MAAM,CAAC,CAAC;IACpB,YAAY,CAAC,MAAM,CAAC,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The public plugin entry, `@hearsay-tools/squawk/plugin` (spec 2026-11-24-plugin-loader-and-runner-kit).
|
|
3
|
+
* Unstable: it may change in any release until Squawk installs plugins from npm or git.
|
|
4
|
+
*/
|
|
5
|
+
export type { SquawkPlugin, SquawkPluginApi } from './api.ts';
|
|
6
|
+
export type { RunnerDefinition } from '../core/runner-definition.ts';
|
|
7
|
+
export type { AgentToolDefinition, AgentToolResult } from '../ci-wait/tool-registry.ts';
|
|
8
|
+
export type { WaitKindRow, WaitKindRegistration, WaitLifecycle, WaitInputDescriptor } from '../workflows/run/wait-kind-registry.ts';
|
|
9
|
+
export type { StepKindDefinition, StepKindContext, StepKindOutcome } from '../workflows/step-kind-registry.ts';
|
|
10
|
+
export type { CliCommandDefinition, RootCommandContext, SubcommandRunner } from '../core/cli-registry.ts';
|
|
11
|
+
export type { RunSlots, DeletionGate, DeletionKind, ReclaimPreparation, ReclaimContext, RemovalCleanup } from '../runs/removal-slots.ts';
|
|
12
|
+
export type { RunLifecycleHandlers, RunLifecycleHandler, RunLifecycleEvents, RunLifecycleEventType } from '../runs/lifecycle.ts';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { RunLifecycleHandlers, RunLifecycleSource } from './lifecycle.ts';
|
|
2
|
+
/** Add one listener. Registering the same handlers object again does nothing. */
|
|
3
|
+
export declare function registerRunLifecycleListener(handlers: RunLifecycleHandlers): void;
|
|
4
|
+
/** Throws what `registerRunLifecycleListener` would throw, without registering. */
|
|
5
|
+
export declare function checkRunLifecycleListenerRegistration(handlers: RunLifecycleHandlers): void;
|
|
6
|
+
/** Finish registration at the process boot boundary. */
|
|
7
|
+
export declare function sealRunLifecycleListeners(): void;
|
|
8
|
+
/** Whether the registry is sealed. Never throws. */
|
|
9
|
+
export declare function runLifecycleListenersSealed(): boolean;
|
|
10
|
+
/** The registered listeners, in registration order. Throws until sealed. */
|
|
11
|
+
export declare function registeredRunLifecycleListeners(): RunLifecycleHandlers[];
|
|
12
|
+
/**
|
|
13
|
+
* Subscribe every registered listener to one store's lifecycle and return their unsubscribe
|
|
14
|
+
* handles. An unsealed registry (a test that never boots the runtime) attaches nothing.
|
|
15
|
+
*/
|
|
16
|
+
export declare function attachRunLifecycleListeners(lifecycle: RunLifecycleSource): Array<() => void>;
|