pub struct FlowStack { /* private fields */ }Expand description
The runtime above the DAG: the main flow plus its digressions, with push-on-trigger and resume-on-completion (MVP: nesting depth 1).
While a digression is active, governance — tool admission, postures/grounds,
explain() — delegates to the active layer, and the main flow’s marking is
untouched, so Resume::Previous resumes exactly where it left off. Driven by
State/guards (model-free, deterministic).
Implementations§
Source§impl FlowStack
impl FlowStack
Sourcepub fn current(&self) -> &FlowMonitor
pub fn current(&self) -> &FlowMonitor
The monitor currently driving — the active overlay if any, else the main flow.
Sourcepub fn active_overlay(&self) -> Option<&str>
pub fn active_overlay(&self) -> Option<&str>
The name of the active digression, if one is suspending the main flow.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Whether the conversation is finished (main complete, or a Terminate
digression ran).
Sourcepub fn on_turn(&mut self, state: &State)
pub fn on_turn(&mut self, state: &State)
Advance one turn. Enters a triggered digression (suspending the main flow), advances an active digression and resumes when it completes, or advances the main flow.
Sourcepub fn on_tool_ok(&mut self, tool: &str, state: &State)
pub fn on_tool_ok(&mut self, tool: &str, state: &State)
Record a successful tool call against the active layer.
Sourcepub fn admits_tool(&self, tool: &str, state: &State) -> Result<(), String>
pub fn admits_tool(&self, tool: &str, state: &State) -> Result<(), String>
Whether tool is admitted right now (delegates to the active layer).
Sourcepub fn explain(&self, state: &State) -> FlowExplanation
pub fn explain(&self, state: &State) -> FlowExplanation
Explain the active layer’s control-plane state.