Skip to content

Interface: RunnerDriver ​

Defined in: ports/runner-driver.ts:7

Runtime concurrency limiter for one-shot subprocess slots and background daemon sessions.

Resolved from RunnerPoolASTNode via RuntimeExecutorRegistry.runners[node.type] and memoized per node.id inside the active runtime.

Methods ​

withDaemonSlot() ​

ts
withDaemonSlot<T>(fn, signal?): Promise<T>;

Defined in: ports/runner-driver.ts:37

Acquires a long-lived background daemon slot until releaseDaemonSlot() is invoked.

Holds the concurrency slot beyond the startup promise resolution until the service session stops or is quiesced.

Type Parameters ​

Type ParameterDescription
TReturn value type of fn.

Parameters ​

ParameterTypeDescription
fn(releaseDaemonSlot) => Promise<T>Startup callback receiving the explicit release handle.
signal?AbortSignalOptional abort signal that cancels daemon slot acquisition.

Returns ​

Promise<T>

Result produced by fn().


withSlot() ​

ts
withSlot<T>(fn, signal?): Promise<T>;

Defined in: ports/runner-driver.ts:23

Acquires a one-shot command execution slot for the duration of fn().

Queues the caller when all pool slots are occupied and releases the slot automatically in a finally block.

Type Parameters ​

Type ParameterDescription
TReturn value type of fn.

Parameters ​

ParameterTypeDescription
fn() => Promise<T>Asynchronous work callback executed while holding the slot.
signal?AbortSignalOptional abort signal that cancels slot acquisition or execution.

Returns ​

Promise<T>

Result produced by fn().

Properties ​

PropertyModifierTypeDescriptionDefined in
idreadonlystringLogical identifier of the runner pool.ports/runner-driver.ts:9

Released under the MIT License.