Skip to main content

Module exec_context

Module exec_context 

Source
Expand description

Execution context — runtime variables accessible between steps.

Provides $variable interpolation in user prompts and system prompts. Variables are populated automatically by the runner as steps execute.

Built-in variables: $result — output of the most recent step $step_name — name of the current step $step_type — type of the current step $flow_name — name of the current flow $persona_name — name of the current persona $unit_index — 1-based index of the current execution unit $step_index — 1-based index of the current step within the unit ${StepName} — result of a specific named step (e.g., ${Analyze})

Variable syntax: $name or ${name} (braces for disambiguation).

Structs§

ExecContext
Execution context — holds runtime variables for a single execution unit.

Functions§

interpolate_vars
§Fase 35.o — Interpolate ${name} / $name references in text against an arbitrary variable map. Extracted from ExecContext::interpolate so both execution paths — the sync runner (ExecContext.vars) and the streaming dispatcher (DispatchCtx.let_bindings) — interpolate persist field values with byte-identical semantics (D5: the two paths never diverge). Unknown variables are left literal.
resolve_named_arg_value
§Fase 60 — resolve a use Tool(k = v) keyword-argument VALUE against the runtime bindings, by its frontend-classified value_kind: