pub enum TransitionCondition {
Always,
Error,
MaxIterations,
LlmChoice,
DeadEnd,
Stuck,
}Expand description
Condition that determines when a transition edge is available.
Variants§
Always
Always available (LLM chooses)
Error
Only on error
MaxIterations
Only when max_iterations hit
LlmChoice
LLM picks from available transitions (default for multi-transition stages)
DeadEnd
Fires when the graph would otherwise strand here: the stage finished, and
every normal (always/llm_choice) edge’s target has spent its
max_revisits.
Exists because the alternatives were both bad. Declaring an ordinary edge
to the output stage silences the dead-end-possible lint by adding a
route the model can take at the end of every visit - measured, that
collapsed pipelines in 10 of 24 runs of one agent and 21 of 36 of
another. Declaring nothing leaves the run to die with everything it
established thrown away. This edge is reachable when stuck and invisible
the rest of the time, which is what “escape” actually means.
Deliberately not max_iterations: that fires when a stage burns its
iteration budget, which is a different event and does not fire here at
all.
Stuck
Fires mid-stage when the stage’s runtime metrics cross this edge’s
StuckConfig thresholds - the agent is burning iterations, wall clock,
or edits to one file without finishing. Unlike every other condition this
interrupts a stage the agent never said it had completed, so when the edge
is unavailable the runtime resumes the stage rather than transitioning.
Trait Implementations§
Source§impl Clone for TransitionCondition
impl Clone for TransitionCondition
Source§fn clone(&self) -> TransitionCondition
fn clone(&self) -> TransitionCondition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TransitionCondition
impl Debug for TransitionCondition
Source§impl Default for TransitionCondition
impl Default for TransitionCondition
Source§fn default() -> TransitionCondition
fn default() -> TransitionCondition
Source§impl<'de> Deserialize<'de> for TransitionCondition
impl<'de> Deserialize<'de> for TransitionCondition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for TransitionCondition
Source§impl PartialEq for TransitionCondition
impl PartialEq for TransitionCondition
Source§impl Serialize for TransitionCondition
impl Serialize for TransitionCondition
impl StructuralPartialEq for TransitionCondition
Auto Trait Implementations§
impl Freeze for TransitionCondition
impl RefUnwindSafe for TransitionCondition
impl Send for TransitionCondition
impl Sync for TransitionCondition
impl Unpin for TransitionCondition
impl UnsafeUnpin for TransitionCondition
impl UnwindSafe for TransitionCondition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.