Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/rulvar / InProcessRunner

Class: InProcessRunner

Defined in: packages/core/dist/index.d.ts

The mode (a) runner for human-authored closures. Determinism is enforced by convention, lint, and the ctx shims, NOT by a VM: only the sequence of keys must be stable. Bare-nondeterminism detection is ENGINE-owned since RV-209: the engine wraps its execute call in withDeterminismDetection (runner/determinism.ts), which classifies bare Date.now/Math.random callers, emits the structured determinism:warning event on the run's stream, and under determinism.mode: 'error' rejects the run with a typed DeterminismError. The runner itself is a pure executor, so the frozen ScriptRunner seam carries no detection surface; a standalone execute outside an engine runs without detection.

Implements

Constructors

Constructor

ts
new InProcessRunner(o?): InProcessRunner;

Defined in: packages/core/dist/index.d.ts

Parameters

ParameterType
o?{ onEscalation?: OnEscalation; }
o.onEscalation?OnEscalation

Returns

InProcessRunner

Accessors

escalationHook

Get Signature

ts
get escalationHook(): 
  | OnEscalation
  | undefined;

Defined in: packages/core/dist/index.d.ts

The hook is read by the escalation delivery path from M3 onward.

Returns

| OnEscalation | undefined

Methods

execute()

ts
execute<A, R>(
   wf, 
   ctx, 
args): Promise<R>;

Defined in: packages/core/dist/index.d.ts

Type Parameters

Type Parameter
A
R

Parameters

ParameterType
wf| CompiledWorkflow | Workflow&lt;A, R&gt;
ctxCtx&lt;never&gt;
argsA

Returns

Promise&lt;R&gt;

Implementation of

ScriptRunner.execute