Skip to content

Interface: HarnessRuntimeController ​

Defined in: ports/harness-runtime-controller.ts:11

Programmatic control surface exposed to control-plane adapters and host processes for interacting with a live runtime.

Supports emitting typed external signals into active runs, enqueuing work items onto lanes, and querying in-flight run summaries.

Methods ​

emitSignal() ​

ts
emitSignal<TPayload>(signal, payload): Promise<void>;

Defined in: ports/harness-runtime-controller.ts:25

Emits an external signal payload to all lanes and runs correlated with signal.

Validates payload against the target SignalNode schema and routes the event to matching harness notification handlers, topology overlay commit hooks, ledger compaction triggers, and lane rewind handlers.

Type Parameters ​

Type ParameterDescription
TPayloadValidated signal payload type.

Parameters ​

ParameterTypeDescription
signal| string | MaybeBuilder<SignalNode<TPayload>>P.signal(...) builder, SignalNode, or string signal identifier to trigger.
payloadTPayloadSignal payload to validate and route.

Returns ​

Promise<void>

Resolves once the signal has been routed and processed.


enqueue() ​

ts
enqueue<TIn>(lane, item): Promise<void>;

Defined in: ports/harness-runtime-controller.ts:44

Validates item against the target lane's inputSchema, enqueues it on lane, and schedules ready runs (SPEC.md §2.8 & §3.10).

Accepts a P.lane(...) builder, a compiled LaneNode, or a string lane identifier registered on the harness.

Type Parameters ​

Type ParameterDefault typeDescription
TInunknownValidated lane work item input type.

Parameters ​

ParameterTypeDescription
lane| string | MaybeBuilder<LaneNode<TIn, string>>Target lane builder, AST node, or lane identifier.
itemTInWork item payload to validate and enqueue.

Returns ​

Promise<void>

Resolves once the item is enqueued and any ready runs in the lane have settled.

Throws ​

If lane is not registered on the enclosing HarnessNode or item fails lane.inputSchema.


getActiveRuns() ​

ts
getActiveRuns(): Promise<readonly ActiveRunSummary[]>;

Defined in: ports/harness-runtime-controller.ts:56

Returns a snapshot of all currently queued, running, or suspended runs across all lanes.

Queries the active scheduler and ledger state without mutating in-flight execution.

Returns ​

Promise<readonly ActiveRunSummary[]>

Active run summaries.

Released under the MIT License.