@hearsay-tools/squawk 0.18.0-pr4164.8025 → 0.18.0-pr4165.8028

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.
@@ -2,9 +2,11 @@ import { type RunSlots } from './runs/removal-slots.ts';
2
2
  /** The removal slots that ship with Squawk, in the order each path asks them. */
3
3
  export declare const BUILT_IN_RUN_SLOTS: RunSlots;
4
4
  /**
5
- * Register the built-in removal slots and seal the registry, and register the worker executions
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
  * `registerBuiltInRunners()`, 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;
11
+ /** Seal after every built-in and extension registration at the boot boundary. */
12
+ export declare function sealBuiltInRunSlots(): void;
@@ -3,7 +3,7 @@ import { autosaveDeletionGate, autosaveRemovalCleanup } from './autosave-removal
3
3
  import { artifactsRemovalCleanup } from './artifacts/removal-slot.js';
4
4
  import { jobsDeletionGate } from './jobs/removal-slot.js';
5
5
  import { workerEvidencePreparation } from './delegation/removal-slot.js';
6
- import { registerWorkerExecutions } from './runs/worker-executions-registry.js';
6
+ import { registerWorkerExecutions, sealWorkerExecutions } from './runs/worker-executions-registry.js';
7
7
  import { createWorkerExecutions } from './delegation/worker-executions.js';
8
8
  /** The removal slots that ship with Squawk, in the order each path asks them. */
9
9
  export const BUILT_IN_RUN_SLOTS = {
@@ -12,7 +12,7 @@ export const BUILT_IN_RUN_SLOTS = {
12
12
  cleanups: [artifactsRemovalCleanup, autosaveRemovalCleanup],
13
13
  };
14
14
  /**
15
- * Register the built-in removal slots and seal the registry, and register the worker executions
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
  * `registerBuiltInRunners()`, 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.
@@ -20,6 +20,10 @@ export const BUILT_IN_RUN_SLOTS = {
20
20
  export function registerBuiltInRunSlots() {
21
21
  registerWorkerExecutions(createWorkerExecutions);
22
22
  registerRunSlots(BUILT_IN_RUN_SLOTS);
23
+ }
24
+ /** Seal after every built-in and extension registration at the boot boundary. */
25
+ export function sealBuiltInRunSlots() {
23
26
  sealRunSlots();
27
+ sealWorkerExecutions();
24
28
  }
25
29
  //# sourceMappingURL=built-in-run-slots.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"built-in-run-slots.js","sourceRoot":"","sources":["../src/built-in-run-slots.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAiB,MAAM,yBAAyB,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,iFAAiF;AACjF,MAAM,CAAC,MAAM,kBAAkB,GAAa;IAC1C,KAAK,EAAE,CAAC,oBAAoB,EAAE,gBAAgB,CAAC;IAC/C,YAAY,EAAE,CAAC,yBAAyB,CAAC;IACzC,QAAQ,EAAE,CAAC,uBAAuB,EAAE,sBAAsB,CAAC;CAC5D,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB;IACrC,wBAAwB,CAAC,sBAAsB,CAAC,CAAC;IACjD,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;IACrC,YAAY,EAAE,CAAC;AACjB,CAAC"}
1
+ {"version":3,"file":"built-in-run-slots.js","sourceRoot":"","sources":["../src/built-in-run-slots.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAiB,MAAM,yBAAyB,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,iFAAiF;AACjF,MAAM,CAAC,MAAM,kBAAkB,GAAa;IAC1C,KAAK,EAAE,CAAC,oBAAoB,EAAE,gBAAgB,CAAC;IAC/C,YAAY,EAAE,CAAC,yBAAyB,CAAC;IACzC,QAAQ,EAAE,CAAC,uBAAuB,EAAE,sBAAsB,CAAC;CAC5D,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB;IACrC,wBAAwB,CAAC,sBAAsB,CAAC,CAAC;IACjD,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;AACvC,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,mBAAmB;IACjC,YAAY,EAAE,CAAC;IACf,oBAAoB,EAAE,CAAC;AACzB,CAAC"}
@@ -0,0 +1,36 @@
1
+ /** Process-wide registries register first, seal at boot, then allow normal reads. */
2
+ interface RegistryOptions {
3
+ name: string;
4
+ bootHint: string;
5
+ }
6
+ /** A keyed registry with passive inspection for cold callers. Returned arrays are snapshots. */
7
+ export declare function createKeyedRegistry<K extends string, V>(options: RegistryOptions & {
8
+ reservedKeys?: ReadonlySet<string> | readonly string[];
9
+ }): {
10
+ seal: () => void;
11
+ isSealed: () => boolean;
12
+ register(key: K, value: V): void;
13
+ get(key: K): V | undefined;
14
+ has(key: K): boolean;
15
+ values(): V[];
16
+ keys(): K[];
17
+ entries(): [K, V][];
18
+ peekKeys: () => K[];
19
+ peekHas: (key: K) => boolean;
20
+ };
21
+ /** An ordered list that ignores repeated registration of the same reference. */
22
+ export declare function createListRegistry<V>(options: RegistryOptions): {
23
+ seal: () => void;
24
+ isSealed: () => boolean;
25
+ register(item: V): void;
26
+ values(): V[];
27
+ };
28
+ /** A single registration. Even a sealed slot fails closed when it is empty. */
29
+ export declare function createSingleRegistry<V>(options: RegistryOptions): {
30
+ seal: () => void;
31
+ isSealed: () => boolean;
32
+ register(value: V): void;
33
+ has(): boolean;
34
+ get(): V;
35
+ };
36
+ export {};
@@ -0,0 +1,85 @@
1
+ function lifecycle({ name, bootHint }) {
2
+ let sealed = false;
3
+ return {
4
+ seal() { sealed = true; },
5
+ isSealed: () => sealed,
6
+ assertReadable() {
7
+ if (!sealed)
8
+ throw new Error(`${name} is unsealed: ${bootHint}`);
9
+ },
10
+ assertWritable() {
11
+ if (sealed)
12
+ throw new Error(`${name} is sealed: register every entry before sealing. ${bootHint}`);
13
+ },
14
+ };
15
+ }
16
+ /** A keyed registry with passive inspection for cold callers. Returned arrays are snapshots. */
17
+ export function createKeyedRegistry(options) {
18
+ const state = lifecycle(options);
19
+ const entries = new Map();
20
+ const reserved = new Set(options.reservedKeys);
21
+ return {
22
+ seal: state.seal,
23
+ isSealed: state.isSealed,
24
+ register(key, value) {
25
+ if (reserved.has(key))
26
+ throw new Error(`${options.name}: reserved legacy key '${key}'.`);
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);
34
+ },
35
+ get(key) { state.assertReadable(); return entries.get(key); },
36
+ has(key) { state.assertReadable(); return entries.has(key); },
37
+ values() { state.assertReadable(); return [...entries.values()]; },
38
+ keys() { state.assertReadable(); return [...entries.keys()]; },
39
+ entries() { state.assertReadable(); return [...entries.entries()]; },
40
+ peekKeys: () => [...entries.keys()],
41
+ peekHas: (key) => entries.has(key),
42
+ };
43
+ }
44
+ /** An ordered list that ignores repeated registration of the same reference. */
45
+ export function createListRegistry(options) {
46
+ const state = lifecycle(options);
47
+ const items = [];
48
+ return {
49
+ seal: state.seal,
50
+ isSealed: state.isSealed,
51
+ register(item) {
52
+ if (items.some(value => value === item))
53
+ return;
54
+ state.assertWritable();
55
+ items.push(item);
56
+ },
57
+ values() { state.assertReadable(); return [...items]; },
58
+ };
59
+ }
60
+ /** A single registration. Even a sealed slot fails closed when it is empty. */
61
+ export function createSingleRegistry(options) {
62
+ const state = lifecycle(options);
63
+ let entry;
64
+ return {
65
+ seal: state.seal,
66
+ isSealed: state.isSealed,
67
+ register(value) {
68
+ if (entry) {
69
+ if (entry.value === value)
70
+ return;
71
+ throw new Error(`${options.name}: a different value is already registered.`);
72
+ }
73
+ state.assertWritable();
74
+ entry = { value };
75
+ },
76
+ has() { state.assertReadable(); return entry !== undefined; },
77
+ get() {
78
+ state.assertReadable();
79
+ if (!entry)
80
+ throw new Error(`${options.name}: missing registration. ${options.bootHint}`);
81
+ return entry.value;
82
+ },
83
+ };
84
+ }
85
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +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,IA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AI;QAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,QAAQ,CAAC,KAAQ;YACf,IAAI,KAAK,EAAE,CAAC;gBACV,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK;oBAAE,OAAO;gBAClC,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,CAAC,IAAI,4CAA4C,CAAC,CAAC;YAC/E,CAAC;YACD,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,KAAK,GAAG,EAAE,KAAK,EAAE,CAAC;QACpB,CAAC;QACD,GAAG,KAAK,KAAK,CAAC,cAAc,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC;QAC7D,GAAG;YACD,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,IAAI,CAAC,KAAK;gBAAE,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,CAAC,IAAI,2BAA2B,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC1F,OAAO,KAAK,CAAC,KAAK,CAAC;QACrB,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,41 +1,48 @@
1
- const gates = [];
2
- const preparations = [];
3
- const cleanups = [];
4
- let sealed = false;
5
- function add(list, slots) {
6
- for (const slot of slots ?? []) {
7
- if (list.includes(slot))
8
- continue;
9
- if (sealed)
1
+ import { createListRegistry } from '../core/registry.js';
2
+ const options = { name: 'The removal slots', bootHint: 'call registerBuiltInRunSlots(), then sealBuiltInRunSlots().' };
3
+ const gates = createListRegistry(options);
4
+ const preparations = createListRegistry(options);
5
+ const cleanups = createListRegistry(options);
6
+ function registerSlot(registry, slot) {
7
+ try {
8
+ registry.register(slot);
9
+ }
10
+ catch (error) {
11
+ if (runSlotsSealed())
10
12
  throw new Error('The removal slots are sealed: register every slot before sealRunSlots().');
11
- list.push(slot);
13
+ throw error;
12
14
  }
13
15
  }
14
16
  /** Add slots, in call order. Registering the same slot object again does nothing. */
15
17
  export function registerRunSlots(slots) {
16
- add(gates, slots.gates);
17
- add(preparations, slots.preparations);
18
- add(cleanups, slots.cleanups);
18
+ for (const slot of slots.gates ?? [])
19
+ registerSlot(gates, slot);
20
+ for (const slot of slots.preparations ?? [])
21
+ registerSlot(preparations, slot);
22
+ for (const slot of slots.cleanups ?? [])
23
+ registerSlot(cleanups, slot);
19
24
  }
20
25
  /** Close the registry: removals may run, and no new slot may register. */
21
26
  export function sealRunSlots() {
22
- sealed = true;
27
+ gates.seal();
28
+ preparations.seal();
29
+ cleanups.seal();
23
30
  }
24
31
  /** Whether this process sealed its removal slots. Never throws. */
25
32
  export function runSlotsSealed() {
26
- return sealed;
33
+ return gates.isSealed();
27
34
  }
28
35
  /** Throws unless the registry is sealed. A removal path calls it before its first side effect. */
29
36
  export function assertRunSlotsSealed() {
30
- if (!sealed) {
31
- throw new Error('No removal slot is registered: call registerBuiltInRunSlots() from built-in-run-slots.ts at the process entry, '
37
+ if (!runSlotsSealed()) {
38
+ throw new Error('No removal slot is registered: call registerBuiltInRunSlots() then sealBuiltInRunSlots() from built-in-run-slots.ts at the process entry, '
32
39
  + 'or seal the slots this test uses with sealTestRunSlots() from runs/removal-slots.testkit.ts.');
33
40
  }
34
41
  }
35
42
  /** The first gate's reason to refuse this deletion, in registration order. */
36
43
  export function deletionRefusal(runId, kind, dataDir) {
37
44
  assertRunSlotsSealed();
38
- for (const gate of gates) {
45
+ for (const gate of gates.values()) {
39
46
  const reason = gate.refuse(runId, kind, dataDir);
40
47
  if (reason)
41
48
  return reason;
@@ -45,14 +52,14 @@ export function deletionRefusal(runId, kind, dataDir) {
45
52
  /** Run every preparation in registration order; the first rejection stops the rest. */
46
53
  export async function prepareReclaim(run, context) {
47
54
  assertRunSlotsSealed();
48
- for (const preparation of preparations)
55
+ for (const preparation of preparations.values())
49
56
  await preparation.prepare(run, context);
50
57
  }
51
58
  /** Run every cleanup in registration order, then throw the first failure. */
52
59
  export function runRemovalCleanups(runId, dataDir) {
53
60
  assertRunSlotsSealed();
54
61
  const failures = [];
55
- for (const cleanup of cleanups) {
62
+ for (const cleanup of cleanups.values()) {
56
63
  try {
57
64
  cleanup.removed(runId, dataDir);
58
65
  }
@@ -1 +1 @@
1
- {"version":3,"file":"removal-slots.js","sourceRoot":"","sources":["../../src/runs/removal-slots.ts"],"names":[],"mappings":"AAmDA,MAAM,KAAK,GAAmB,EAAE,CAAC;AACjC,MAAM,YAAY,GAAyB,EAAE,CAAC;AAC9C,MAAM,QAAQ,GAAqB,EAAE,CAAC;AACtC,IAAI,MAAM,GAAG,KAAK,CAAC;AAEnB,SAAS,GAAG,CAAI,IAAS,EAAE,KAA+B;IACxD,KAAK,MAAM,IAAI,IAAI,KAAK,IAAI,EAAE,EAAE,CAAC;QAC/B,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;YAAE,SAAS;QAClC,IAAI,MAAM;YAAE,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;QACxG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,qFAAqF;AACrF,MAAM,UAAU,gBAAgB,CAAC,KAAe;IAC9C,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACxB,GAAG,CAAC,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IACtC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,YAAY;IAC1B,MAAM,GAAG,IAAI,CAAC;AAChB,CAAC;AAED,mEAAmE;AACnE,MAAM,UAAU,cAAc;IAC5B,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,oBAAoB;IAClC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,iHAAiH;cAC7H,8FAA8F,CAAC,CAAC;IACtG,CAAC;AACH,CAAC;AAED,8EAA8E;AAC9E,MAA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C;AACH,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,eAAe,CAAC,KAAa,EAAE,IAAkB,EAAE,OAAe;IAChF,oBAAoB,EAAE,CAAC;IACvB,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC;QAClC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QACjD,IAAI,MAAM;YAAE,OAAO,MAAM,CAAC;IAC5B,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,uFAAuF;AACvF,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,GAAc,EAAE,OAAuB;IAC1E,oBAAoB,EAAE,CAAC;IACvB,KAAK,MAAM,WAAW,IAAI,YAAY,CAAC,MAAM,EAAE;QAAE,MAAM,WAAW,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AAC3F,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,kBAAkB,CAAC,KAAa,EAAE,OAAe;IAC/D,oBAAoB,EAAE,CAAC;IACvB,MAAM,QAAQ,GAAc,EAAE,CAAC;IAC/B,KAAK,MAAM,OAAO,IAAI,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC;QACxC,IAAI,CAAC;YAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAAC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAAC,CAAC;IAClF,CAAC;IACD,IAAI,QAAQ,CAAC,MAAM;QAAE,MAAM,QAAQ,CAAC,CAAC,CAAC,CAAC;AACzC,CAAC"}
@@ -23,9 +23,11 @@ export interface WorkerExecutionsState {
23
23
  readonly workerResults: WorkerResults;
24
24
  }
25
25
  export type WorkerExecutionsFactory = (dataDir: string, state: WorkerExecutionsState) => WorkerExecutions & WorkerExecutionRecords;
26
- /** Register this process's factory. Registering the same factory again does nothing; another one throws. */
26
+ /** Register the factory without sealing the registry. */
27
27
  export declare function registerWorkerExecutions(factory: WorkerExecutionsFactory): void;
28
- /** The registered factory. Throws when none is registered. */
28
+ export declare function sealWorkerExecutions(): void;
29
+ export declare function workerExecutionsSealed(): boolean;
30
+ /** Fail closed before boot seals the registry, and when boot supplied no factory. */
29
31
  export declare function workerExecutionsFactory(): WorkerExecutionsFactory;
30
- /** Whether this process registered a factory. Never throws. */
32
+ /** Passive cold inspection: an unsealed factory cannot be used yet. */
31
33
  export declare function workerExecutionsRegistered(): boolean;
@@ -1,20 +1,18 @@
1
- let registered;
2
- /** Register this process's factory. Registering the same factory again does nothing; another one throws. */
1
+ import { createSingleRegistry } from '../core/registry.js';
2
+ const registry = createSingleRegistry({
3
+ name: 'No worker-executions factory is registered (worker-executions registry)',
4
+ bootHint: 'call registerBuiltInRunSlots(), then sealBuiltInRunSlots(), or import delegation/worker-executions.testkit.ts in this test.',
5
+ });
6
+ /** Register the factory without sealing the registry. */
3
7
  export function registerWorkerExecutions(factory) {
4
- if (registered && registered !== factory)
5
- throw new Error('A different worker-executions factory is already registered in this process.');
6
- registered = factory;
8
+ registry.register(factory);
7
9
  }
8
- /** The registered factory. Throws when none is registered. */
9
- export function workerExecutionsFactory() {
10
- if (!registered) {
11
- throw new Error('No worker-executions factory is registered: call registerBuiltInRunSlots() from built-in-run-slots.ts at the process entry, '
12
- + 'or import delegation/worker-executions.testkit.ts in this test.');
13
- }
14
- return registered;
15
- }
16
- /** Whether this process registered a factory. Never throws. */
10
+ export function sealWorkerExecutions() { registry.seal(); }
11
+ export function workerExecutionsSealed() { return registry.isSealed(); }
12
+ /** Fail closed before boot seals the registry, and when boot supplied no factory. */
13
+ export function workerExecutionsFactory() { return registry.get(); }
14
+ /** Passive cold inspection: an unsealed factory cannot be used yet. */
17
15
  export function workerExecutionsRegistered() {
18
- return registered !== undefined;
16
+ return registry.isSealed() && registry.has();
19
17
  }
20
18
  //# sourceMappingURL=worker-executions-registry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"worker-executions-registry.js","sourceRoot":"","sources":["../../src/runs/worker-executions-registry.ts"],"names":[],"mappings":"AA6BA,IAAI,UAA+C,CAAC;AAEpD,4GAA4G;AAC5G,MAAM,UAAU,wBAAwB,CAAC,OAAgC;IACvE,IAAI,UAAU,IAAI,UAAU,KAAK,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,8EAA8E,CAAC,CAAC;IAC1I,UAAU,GAAG,OAAO,CAAC;AACvB,CAAC;AAED,8DAA8D;AAC9D,MAAM,UAAU,uBAAuB;IACrC,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,8HAA8H;cAC1I,iEAAiE,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,+DAA+D;AAC/D,MAAM,UAAU,0BAA0B;IACxC,OAAO,UAAU,KAAK,SAAS,CAAC;AAClC,CAAC"}
1
+ {"version":3,"file":"worker-executions-registry.js","sourceRoot":"","sources":["../../src/runs/worker-executions-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AA8B3D,MAAM,QAAQ,GAAG,oBAAoB,CAA0B;IAC7D,IAAI,EAAE,yEAAyE;IAC/E,QAAQ,EAAE,6HAA6H;CACxI,CAAC,CAAC;AAEH,yDAAyD;AACzD,MAAM,UAAU,wBAAwB,CAAC,OAAgC;IACvE,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,oBAAoB,KAAW,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AACjE,MAAM,UAAU,sBAAsB,KAAc,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;AAEjF,qFAAqF;AACrF,MAAM,UAAU,uBAAuB,KAA8B,OAAO,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AAE7F,uEAAuE;AACvE,MAAM,UAAU,0BAA0B;IACxC,OAAO,QAAQ,CAAC,QAAQ,EAAE,IAAI,QAAQ,CAAC,GAAG,EAAE,CAAC;AAC/C,CAAC"}
@@ -66,8 +66,9 @@ export async function prepareCommandRuntime(command, argv = []) {
66
66
  return;
67
67
  const { registerBuiltInRunners } = await import('./runners/built-in.js');
68
68
  registerBuiltInRunners();
69
- const { registerBuiltInRunSlots } = await import('./built-in-run-slots.js');
69
+ const { registerBuiltInRunSlots, sealBuiltInRunSlots } = await import('./built-in-run-slots.js');
70
70
  registerBuiltInRunSlots();
71
+ sealBuiltInRunSlots();
71
72
  }
72
73
  /** Help must skip both runtime registration and the migrating operator Home factory. */
73
74
  function operatorHelp(command, argv) {
@@ -1 +1 @@
1
- {"version":3,"file":"subcommands.js","sourceRoot":"","sources":["../src/subcommands.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAG7D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,SAAS,EAAE,gBAAgB,EAAE,iBAAiB,CAAU,CAAC;AAE5M,kGAAkG;AAClG,SAAS,gBAAgB,CAAC,IAAY;IACpC,IAAI,CAAC;QAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;IAAC,CAAC;IAAC,MAAM,CAAC;QAAC,OAAO,IAAI,CAAC;IAAC,CAAC;AAC9E,CAAC;AAED,yEAAyE;AACzE,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,IAAwB,EAAE,IAAI,GAAqC,GAAG,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,OAA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e,EAAE,kBAAkB;QAC5H,SAAS,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;QAAE,OAAO;IAChG,MAAM,EAAE,sBAAsB,EAAE,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC,CAAC;IACzE,sBAAsB,EAAE,CAAC;IACzB,MAAM,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,GAAG,MAAM,MAAM,CAAC,yBAAyB,CAAC,CAAC;IACjG,uBAAuB,EAAE,CAAC;IAC1B,mBAAmB,EAAE,CAAC;AACxB,CAAC;AAED,wFAAwF;AACxF,SAAS,YAAY,CAAC,OAAe,EAAE,IAAuB;IAC5D,OAAO,CAAC,QAAQ,EAAE,IAAI,EAAE,GAAG,CAAC,OAAO,KAAK,iBAAiB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AACtG,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hearsay-tools/squawk",
3
- "version": "0.18.0-pr4164.8025",
3
+ "version": "0.18.0-pr4165.8028",
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",
@@ -63,8 +63,8 @@
63
63
  "devDependencies": {
64
64
  "@babel/parser": "^8.0.8",
65
65
  "@babel/types": "^8.0.8",
66
- "@open-mercato/cezar-api-client": "0.18.0-pr4164.8025",
67
- "@open-mercato/cezar-contract": "0.18.0-pr4164.8025",
66
+ "@open-mercato/cezar-api-client": "0.18.0-pr4165.8028",
67
+ "@open-mercato/cezar-contract": "0.18.0-pr4165.8028",
68
68
  "@types/node": "^24.19.1",
69
69
  "@types/ws": "^8.18.1",
70
70
  "esbuild": "^0.28.1",
@@ -81,5 +81,5 @@
81
81
  "publishConfig": {
82
82
  "access": "public"
83
83
  },
84
- "gitHead": "053adf221adfa14d039113907de29f4416396984"
84
+ "gitHead": "b8e0723de9f77ddfee2b4e5e31442a1187c934e2"
85
85
  }
@@ -35,12 +35,13 @@ import type { ConversationMessage } from '@open-mercato/cezar-contract';
35
35
  import { noRunners } from '../src/core/runners-under-test.testkit.ts';
36
36
  import { installWindowsIdentityStore } from '../src/delegation/windows-identity-store.ts';
37
37
  import { registerBuiltInRunners } from '../src/runners/built-in.ts';
38
- import { registerBuiltInRunSlots } from '../src/built-in-run-slots.ts';
38
+ import { registerBuiltInRunSlots, sealBuiltInRunSlots } from '../src/built-in-run-slots.ts';
39
39
 
40
40
  // Workspace receipts and markers use the host's identity store (ADR 0032).
41
41
  installWindowsIdentityStore();
42
42
  registerBuiltInRunners();
43
43
  registerBuiltInRunSlots();
44
+ sealBuiltInRunSlots();
44
45
 
45
46
  process.env.HSQ_PROJECT_WARMUP = process.env.CEZ_PROJECT_WARMUP = '0';
46
47
  const ownHome = prepareBenchmarkEnv();
@@ -72,12 +72,13 @@ import type { RunRecord, RunStore as RunStoreInstance } from '../src/runs/store.
72
72
  import { DEFAULT_FIXTURE_SEED, FIXTURE_PROFILES, generateRunFixture, isLiveRun, pickSaveTarget, type FixtureProfile } from './benchmark-run-store-fixture.ts';
73
73
  import { installWindowsIdentityStore } from '../src/delegation/windows-identity-store.ts';
74
74
  import { registerBuiltInRunners } from '../src/runners/built-in.ts';
75
- import { registerBuiltInRunSlots } from '../src/built-in-run-slots.ts';
75
+ import { registerBuiltInRunSlots, sealBuiltInRunSlots } from '../src/built-in-run-slots.ts';
76
76
 
77
77
  // Workspace receipts and markers use the host's identity store (ADR 0032).
78
78
  installWindowsIdentityStore();
79
79
  registerBuiltInRunners();
80
80
  registerBuiltInRunSlots();
81
+ sealBuiltInRunSlots();
81
82
 
82
83
  const SCRIPT = fileURLToPath(import.meta.url);
83
84
  const WARM_UP = 3;
@@ -38,12 +38,13 @@ import type { RunManager as RunManagerInstance } from '../src/workflows/run.ts';
38
38
  import { noRunners } from '../src/core/runners-under-test.testkit.ts';
39
39
  import { installWindowsIdentityStore } from '../src/delegation/windows-identity-store.ts';
40
40
  import { registerBuiltInRunners } from '../src/runners/built-in.ts';
41
- import { registerBuiltInRunSlots } from '../src/built-in-run-slots.ts';
41
+ import { registerBuiltInRunSlots, sealBuiltInRunSlots } from '../src/built-in-run-slots.ts';
42
42
 
43
43
  // Workspace receipts and markers use the host's identity store (ADR 0032).
44
44
  installWindowsIdentityStore();
45
45
  registerBuiltInRunners();
46
46
  registerBuiltInRunSlots();
47
+ sealBuiltInRunSlots();
47
48
 
48
49
  // The repo's own sandbox for ~/.cezar, so a benchmark never touches the user's registry; one this
49
50
  // run creates is removed with the rest of its teardown.
@@ -30,12 +30,13 @@ import { randomUUID } from 'node:crypto';
30
30
  import { ClaudeCliRunner } from '../src/runners/claude/claude-cli-runner.ts';
31
31
  import { installWindowsIdentityStore } from '../src/delegation/windows-identity-store.ts';
32
32
  import { registerBuiltInRunners } from '../src/runners/built-in.ts';
33
- import { registerBuiltInRunSlots } from '../src/built-in-run-slots.ts';
33
+ import { registerBuiltInRunSlots, sealBuiltInRunSlots } from '../src/built-in-run-slots.ts';
34
34
  import { workerExecutionsOf } from '../src/delegation/worker-executions.ts';
35
35
 
36
36
  installWindowsIdentityStore();
37
37
  registerBuiltInRunners();
38
38
  registerBuiltInRunSlots();
39
+ sealBuiltInRunSlots();
39
40
  const ownHome = prepareBenchmarkEnv();
40
41
  process.env.CEZ_DRY_RUN = '1'; process.env.CEZ_AUTONAME = '0'; process.env.CEZ_MOCK_NUDGE_REPLY = 'plain'; process.env.CEZ_MOCK_NOTES = '0';
41
42
 
@@ -43,12 +43,13 @@ import { pathToFileURL } from 'node:url';
43
43
  import { parseArgs } from 'node:util';
44
44
  import { installWindowsIdentityStore } from '../src/delegation/windows-identity-store.ts';
45
45
  import { registerBuiltInRunners } from '../src/runners/built-in.ts';
46
- import { registerBuiltInRunSlots } from '../src/built-in-run-slots.ts';
46
+ import { registerBuiltInRunSlots, sealBuiltInRunSlots } from '../src/built-in-run-slots.ts';
47
47
 
48
48
  // Workspace receipts and markers use the host's identity store (ADR 0032).
49
49
  installWindowsIdentityStore();
50
50
  registerBuiltInRunners();
51
51
  registerBuiltInRunSlots();
52
+ sealBuiltInRunSlots();
52
53
 
53
54
  type RunManager = import('../src/workflows/run.ts').RunManager;
54
55
  type RunRecord = import('../src/runs/store.ts').RunRecord;
@@ -30,7 +30,7 @@ import { parseArgs } from 'node:util';
30
30
  import { makeRunRecord } from '@open-mercato/cezar-contract/test-factories.testkit';
31
31
  import { benchAt as at, median, runSizes, withSeededStore } from './benchmark-store-fixture.ts';
32
32
  import { reclaimWorktrees } from '../src/runs/retention.ts';
33
- import { registerBuiltInRunSlots } from '../src/built-in-run-slots.ts';
33
+ import { registerBuiltInRunSlots, sealBuiltInRunSlots } from '../src/built-in-run-slots.ts';
34
34
  import type { RunRecord } from '../src/runs/store.ts';
35
35
 
36
36
  export interface RetentionBenchOptions {
@@ -125,6 +125,7 @@ export function formatRetentionTable(base: RetentionBenchArgs['base'], rows: rea
125
125
 
126
126
  async function main(): Promise<void> {
127
127
  registerBuiltInRunSlots();
128
+ sealBuiltInRunSlots();
128
129
  const { sizes, base, out } = parseRetentionBenchArgs(process.argv.slice(2));
129
130
  await runSizes(sizes, out, workers => measureRetention({ ...base, workers }), rows => formatRetentionTable(base, rows));
130
131
  }
@@ -34,8 +34,9 @@ try {
34
34
  // This measurement is a process entry like index.ts: the server reads every registered runner,
35
35
  // and a reclaim or a deletion asks the removal slots.
36
36
  registerBuiltInRunners();
37
- const { registerBuiltInRunSlots } = await import(new URL('built-in-run-slots.js', runtime.url));
37
+ const { registerBuiltInRunSlots, sealBuiltInRunSlots } = await import(new URL('built-in-run-slots.js', runtime.url));
38
38
  registerBuiltInRunSlots();
39
+ sealBuiltInRunSlots();
39
40
  const { RunManager } = await import(new URL('workflows/run.js', runtime.url));
40
41
  const { acquireCiResources } = await import(new URL('ci-wait/resources.js', runtime.url));
41
42
  const { resolveHome } = await import(new URL('home/resolve.js', runtime.url));