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. Dev mode (NODE_ENV !== 'production') patches Date.now and Math.random for the duration of execute to emit one warning per run pointing at ctx.now()/ctx.random(); the patch preserves behavior and restores the prior functions on exit (nesting-safe by capturing the prior value; concurrent runs may lose the warning, never correctness).

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