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.
Auto Trait Implementations§
impl Freeze for FlowStack
impl !RefUnwindSafe for FlowStack
impl Send for FlowStack
impl Sync for FlowStack
impl Unpin for FlowStack
impl !UnwindSafe for FlowStack
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].