Skip to main content

AbstractFlow

Struct AbstractFlow 

Source
pub struct AbstractFlow {
Show 15 fields pub messages: Vec<Value>, pub next_effect_seq: u32, pub pending_tools: BTreeMap<u32, PendingToolCall>, pub round_results: BTreeMap<u32, Value>, pub need: Option<FlowNeed>, pub unknown_strikes: u32, pub last_prompt_tokens: u64, pub folding: Option<FoldInFlight>, pub fold_forced: bool, pub folds: u32, pub deciding: Option<DecideInFlight>, pub decide_fold_tried: bool, pub offer: Option<Value>, pub response_strikes: u32, pub tool_log: Vec<Value>,
}
Expand description

In-flight LLM-loop state for one abstract node at its current attempt (§6.2’s “a workflow with abstract nodes is an agent — same runtime”). Every entry is built from journaled outcomes, so the transcript is replay-stable by construction.

Fields§

§messages: Vec<Value>

Journal-shaped messages: {"role":"user","content":…} · {"role":"assistant","text":…,"tool_calls":[{id,name,arguments}]} · {"role":"tool","tool_call_id":…,"content":…,"is_error":…}.

§next_effect_seq: u32

The next effect ordinal within this attempt (LLM turns and tool calls share the sequence — §5.1).

§pending_tools: BTreeMap<u32, PendingToolCall>

The current tool round: effect_seq → the model call it serves.

§round_results: BTreeMap<u32, Value>

Settled results of the current round, by effect_seq (canonical transcript order regardless of completion order).

§need: Option<FlowNeed>

What the loop should do next (None while waiting on effects).

§unknown_strikes: u32

Unknown-tool corrections issued (§6.11: ONE re-prompt, then the node fails ExecutorError).

§last_prompt_tokens: u64

The provider’s OWN reported prompt-token count for the last completed turn — the transcript’s size at the model’s tokenizer, not an estimate. 0 before the first turn settles, and reset to 0 by a fold so the next real turn measures the spliced transcript rather than the old one.

Every one of the fold fields carries skip_serializing_if at its default: an AbstractFlow in a run that configured no ceiling must serialize to exactly the bytes it did before these existed, or every stored checkpoint diverges on the next verify.

§folding: Option<FoldInFlight>

Set while a summarizer turn is outstanding; taken at its resolution.

§fold_forced: bool

The provider rejected the last turn as too long: fold before trying again, whatever the configured ceiling says.

Separate from the ceiling because it answers a different question. The ceiling is a PREDICTION made from the previous turn’s token count, and it can be unset, or set too high, or right but measuring a transcript that has since grown. This is the provider’s own verdict on the transcript as actually sent, and it has to win over all three.

§folds: u32

Folds performed on this attempt, and the number in the fold message the model reads. A completed node’s flow is gone by the terminal checkpoint, so the durable record of a fold is its journaled intent (input.fold, visible in run-trace) rather than this counter.

§deciding: Option<DecideInFlight>

A decision effect outstanding for this flow (C1/C2); taken at its resolution. Like every field below, absent unless a decision backend is pinned in the manifest, so existing checkpoints are byte-identical.

§decide_fold_tried: bool

A decision-guided fold (C2) has already been tried since the transcript was last measured UNDER its ceiling. While set, the next fold trigger goes straight to the summarizer — the “still too long afterwards” fall-through, and the guard that stops a flow asking the same window twice.

§offer: Option<Value>

The narrowed tool offer (C1) and its provenance — {tools, seq, provider, model, calibrated, latency_ms} — ridden into every turn’s journaled input as offer, which is what the driver filters the offered Definitions by. None = the full pinned set.

§response_strikes: u32

Corrective re-prompts issued for a final answer that failed the node’s response schema (#391): ONE, then the node fails SchemaValidationFailed. Zero — and absent — on every flow whose node asks for no structured output.

§tool_log: Vec<Value>

Every settled tool call of this attempt, in effect_seq order (never arrival order — results of one round land in any order), for a node whose llm block names tool_results_into (#391): {name, tool_call_id, model_call_id, input, result, is_error, effect_seq}. Built from the journaled outcomes as they resolve, so verify rebuilds it byte for byte. Empty — and absent — otherwise.

Trait Implementations§

Source§

impl Clone for AbstractFlow

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AbstractFlow

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for AbstractFlow

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for AbstractFlow

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for AbstractFlow

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for AbstractFlow

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more