Interface: FlowExecutionContext<TIn, THandle>
Defined in: runtime/flow/flow-execution-context.ts:29
Mutable runtime state and dependency context for executing a single FlowNode run (SPEC.md §3.9).
Holds the root scopeHandle, completedStepOutputs map, pinned wire prefixes, AbortController for active step drain barriers, and runtime store/manager references.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TIn | unknown | Validated flow input payload type. |
THandle | unknown | Runtime handle type of the active isolation scope. |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
activeReplacementExecutable? | public | StepASTNode<unknown, unknown, THandle> | Currently executing replacement StepASTNode promoted via .replaceWith(), if any. | runtime/flow/flow-execution-context.ts:85 |
activeStepAbortController | public | AbortController | AbortController governing the currently executing step for rewind/cancel drain barriers. | runtime/flow/flow-execution-context.ts:89 |
activeStepExecId | public | string | null | Currently executing stepExecId (or null between steps). | runtime/flow/flow-execution-context.ts:83 |
activeStepId | public | string | null | Currently executing stepId (or null between steps). | runtime/flow/flow-execution-context.ts:81 |
completedStepOutputs | readonly | Map<string, unknown> | Completed step outputs keyed by FlowStepNode.id or outer FlowBranchNode.id. | runtime/flow/flow-execution-context.ts:71 |
continuationQueue | readonly | StepContinuationQueue | Per-stepExecId continuation stack serialization queue. | runtime/flow/flow-execution-context.ts:59 |
currentInput | public | TIn | Latest validated flow input payload (mutable across .replaceWith() and .onSignal().update()). | runtime/flow/flow-execution-context.ts:39 |
enforceRunBudget? | readonly | (addedCostUsd) => Promise<{ allowed: boolean; newLimitUsd?: number; }> | Optional callback enforcing enclosing lane maxCostUsd budget after each model turn (SPEC.md §1.18 & §3.6). | runtime/flow/flow-execution-context.ts:99 |
env | readonly | Readonly<Record<string, string | undefined>> | Explicit environment variable map for resolving symbolic P.env(key) references. | runtime/flow/flow-execution-context.ts:47 |
flow | readonly | FlowNode<TIn, THandle> | Passive FlowNode AST definition being executed. | runtime/flow/flow-execution-context.ts:37 |
humanAdaptersById | readonly | ReadonlyMap<string, HumanAdapter> | Map of HumanNode.id to runtime HumanAdapter. | runtime/flow/flow-execution-context.ts:65 |
itemKey | readonly | string | Deduplication key (itemKey) of the work item. | runtime/flow/flow-execution-context.ts:35 |
laneId | readonly | string | Identifier of the enclosing LaneNode (defaults to 'default-lane'). | runtime/flow/flow-execution-context.ts:33 |
ledgerStore | readonly | LedgerStore | Durable state ledger store. | runtime/flow/flow-execution-context.ts:49 |
lessonStore? | readonly | LessonStore | Optional lesson store for empirical lesson recall and outcome attribution. | runtime/flow/flow-execution-context.ts:55 |
lockManager | readonly | ScopeLockManager | Per-handle read/write lock manager. | runtime/flow/flow-execution-context.ts:57 |
observedRunEffects | readonly | ToolEffect[] | Accumulated ToolEffect entries observed across all steps in the flow run. | runtime/flow/flow-execution-context.ts:79 |
pendingRewindToStepId? | public | string | Target stepId queued by .rewindTo() to jump the flow loop to after draining. | runtime/flow/flow-execution-context.ts:91 |
poolManager | readonly | PoolManager | Stateful pool manager for model and account seat selection. | runtime/flow/flow-execution-context.ts:61 |
prefixGroups? | readonly | readonly PrefixGroupNode[] | Optional prefix groups to compile and pin at run start. | runtime/flow/flow-execution-context.ts:67 |
registry | readonly | RuntimeExecutorRegistry | Composite runtime executor registry. | runtime/flow/flow-execution-context.ts:45 |
resumeContinuationStack? | public | readonly ContinuationFrame[] | Persisted continuation stack restored during reboot recovery for the first resumed step execution. | runtime/flow/flow-execution-context.ts:87 |
retryConfig? | readonly | object | Optional step retry configuration inherited from the enclosing LaneNode. | runtime/flow/flow-execution-context.ts:93 |
retryConfig.exponentialBaseMs | readonly | number | - | runtime/flow/flow-execution-context.ts:95 |
retryConfig.orFailState | readonly | string | - | runtime/flow/flow-execution-context.ts:96 |
retryConfig.tries | readonly | number | - | runtime/flow/flow-execution-context.ts:94 |
runId | readonly | string | Unique identifier of the flow run. | runtime/flow/flow-execution-context.ts:31 |
scopeDriver | readonly | IsolationScope<THandle, Record<string, unknown>> & Partial<CheckpointableScope<THandle, Record<string, unknown>>> | Resolved IsolationScope (and optional CheckpointableScope / BranchableScope) driver. | runtime/flow/flow-execution-context.ts:43 |
scopeHandle | public | THandle | Active root isolation scope handle for the run. | runtime/flow/flow-execution-context.ts:41 |
serviceRegistry | readonly | ServiceSessionRegistry | Lifecycle registry for 'scope', 'fork', and 'skill' ServiceSession daemons. | runtime/flow/flow-execution-context.ts:63 |
stepBaseCheckpointsByStepId? | readonly | Map<string, string> | Optional map of initial base scope checkpoints keyed by FlowStepNode.id. | runtime/flow/flow-execution-context.ts:73 |
stepContinuationStacks? | readonly | Map<string, readonly ContinuationFrame[]> | Optional map of latest ContinuationFrame[] stacks keyed by stepExecId for step telemetry attribution. | runtime/flow/flow-execution-context.ts:75 |
stepObservedEffectsByStepExecId? | readonly | Map<string, ToolEffect[]> | Optional map of step-scoped ToolEffect arrays keyed by stepExecId. | runtime/flow/flow-execution-context.ts:77 |
topologyNode? | readonly | TopologyNode<string> | Optional declarative TopologyNode AST for commitOverlayWhen correlation. | runtime/flow/flow-execution-context.ts:51 |
topologyStore? | readonly | TopologyStore | Optional topology store for run-scoped partition contract overlays. | runtime/flow/flow-execution-context.ts:53 |
wirePrefixesByGroupId | public | ReadonlyMap<string, CompiledWirePrefix> | Pinned CompiledWirePrefix records keyed by PrefixGroupNode.id. | runtime/flow/flow-execution-context.ts:69 |