Skip to content

Function: createRuntime() ​

ts
function createRuntime(harness, options?): HarnessRuntime;

Defined in: runtime/engine/create-runtime.ts:37

Instantiates a HarnessRuntime from a declarative HarnessNode AST (or P.harness builder) (SPEC.md §3.1 & §3.10).

Binds the RuntimeExecutorRegistry, initializes per-lane LaneScheduler instances, subscribes inbound StreamSource adapters, starts exposed ControlPlaneAdapter servers, and routes signals across .notify(), commitOverlayWhen, compactWhen, and .onSignal() lane rewinds.

Parameters ​

ParameterTypeDescription
harness| HarnessNode | AstBuilder<HarnessNode>Compiled HarnessNode or P.harness(...) builder.
options?HarnessRuntimeOptions & objectOptional executor registry, environment map, and runtime stores.

Returns ​

HarnessRuntime

Lifecycle handle with start(), stop(), and controller.

Released under the MIT License.