Interface: ExecutionContext<THandle>
Defined in: ports/execution-context.ts:20
Step-level execution context carrying isolation scope handles, leases, observed effects, and environment resolution.
Passed to step executors, checks, policy guards, tripwires, and hooks during flow execution.
Extended by
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
THandle | unknown | Runtime handle type of the active isolation scope. |
Methods
getRunner()
getRunner(node): RunnerDriver;Defined in: ports/execution-context.ts:71
Returns the runtime's memoized RunnerDriver instance keyed by node.id.
Instantiates the runner driver on first access via RuntimeExecutorRegistry.runners[node.type] and caches it per node.id.
Parameters
| Parameter | Type | Description |
|---|---|---|
node | NodeRunnerNode | Passive runner pool AST node. |
Returns
Memoized runner driver instance.
recordEffects()
recordEffects(effects): void;Defined in: ports/execution-context.ts:80
Appends newly observed tool effects to the active step's effect log and telemetry collector.
Triggers incremental quota tripwire checks and records effect attributes for step telemetry folding.
Parameters
| Parameter | Type | Description |
|---|---|---|
effects | readonly ToolEffect[] | Tool effects emitted by a tool execution or post-flight diff. |
Returns
void
resolveEnv()
resolveEnv(value): string | undefined;Defined in: ports/execution-context.ts:60
Resolves a literal string or symbolic P.env(key) reference against the runtime environment map.
Returns literal strings unchanged and looks up EnvRef.key in the explicit runtime env record.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | string | EnvRef | Literal string or symbolic environment variable reference. |
Returns
string | undefined
Resolved environment variable value, or undefined if unset.
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
activeLeases | readonly | readonly LeaseDelta[] | Capability lease deltas currently granted to the active actor or loop. | ports/execution-context.ts:41 |
activePartitions | readonly | readonly string[] | Partition identifiers unlocked for the active step. | ports/execution-context.ts:39 |
activeServiceSessions? | readonly | ReadonlyMap<string, ServiceSession<THandle>> | Optional map of active background daemon service sessions keyed by service ID. | ports/execution-context.ts:37 |
candidateHandles? | readonly | ReadonlyMap<number, THandle> | Optional map of surviving speculative candidate branch indices to their live scope handles. | ports/execution-context.ts:35 |
observedEffects | readonly | readonly ToolEffect[] | Tool effects observed so far within the active step execution. | ports/execution-context.ts:43 |
resumeContinuationStack? | readonly | readonly ContinuationFrame[] | Optional continuation frame stack used when resuming a suspended or interrupted step. | ports/execution-context.ts:49 |
runId | readonly | string | Unique identifier of the enclosing harness run. | ports/execution-context.ts:22 |
scope? | readonly | | IsolationScope<THandle, Record<string, unknown>> | CheckpointableScope<THandle, Record<string, unknown>> | BranchableScope<THandle, Record<string, unknown>, Record<string, unknown>> | Optional active isolation scope runtime driver instance. | ports/execution-context.ts:30 |
scopeHandle | readonly | THandle | Active isolation scope handle for the current step or branch. | ports/execution-context.ts:26 |
scopeNode? | readonly | IsolationScopeASTNode<THandle, Record<string, unknown>, Record<string, unknown>> | Optional passive AST node of the active isolation scope. | ports/execution-context.ts:28 |
seededHistory? | readonly | readonly WireFrameRecord[] | Optional pre-seeded wire transcript frames inherited from a parent or aborted fast-path attempt. | ports/execution-context.ts:47 |
signal? | readonly | AbortSignal | Optional cancellation signal for aborting in-flight operations. | ports/execution-context.ts:45 |
stepExecId | readonly | string | Unique execution identifier of the active step invocation. | ports/execution-context.ts:24 |