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()
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 Parameter | Description |
|---|---|
TPayload | Validated signal payload type. |
Parameters
| Parameter | Type | Description |
|---|---|---|
signal | | string | MaybeBuilder<SignalNode<TPayload>> | P.signal(...) builder, SignalNode, or string signal identifier to trigger. |
payload | TPayload | Signal payload to validate and route. |
Returns
Promise<void>
Resolves once the signal has been routed and processed.
enqueue()
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 Parameter | Default type | Description |
|---|---|---|
TIn | unknown | Validated lane work item input type. |
Parameters
| Parameter | Type | Description |
|---|---|---|
lane | | string | MaybeBuilder<LaneNode<TIn, string>> | Target lane builder, AST node, or lane identifier. |
item | TIn | Work 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()
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.