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: u32The 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: u32Unknown-tool corrections issued (§6.11: ONE re-prompt, then the
node fails ExecutorError).
last_prompt_tokens: u64The 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: boolThe 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: u32Folds 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: boolA 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: u32Corrective 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.