pub struct TransitionGate {
pub require_modifications: bool,
pub message: Option<String>,
pub region: Option<String>,
pub tools: Vec<String>,
pub max_attempts: Option<usize>,
}Expand description
Preconditions an edge imposes on the stage it leaves, checked once the edge
has been chosen but before its transform runs. A gate that isn’t satisfied
re-runs the stage with a [System] nudge instead of transitioning.
The motivating case: an agent that reads and reasons about the
codebase entirely through shell and reaches the review stage without ever
having called a file-writing tool, producing a run with no output at all.
Fields§
§require_modifications: boolRequire at least one successful file-modifying tool call in the stage being left.
message: Option<String>Nudge injected when the gate blocks. A default explaining the framework’s change tracking is generated when absent.
region: Option<String>Region whose non-emptiness also satisfies the gate. Per-stage tool-call counters reset on stage entry and are not restored when a run resumes after a daemon restart, but context regions are - so pointing the gate at the region the write tools are routed into keeps a resumed run honest.
tools: Vec<String>Tool names counted as modifying beyond the built-in write_file /
edit_file - for agents whose writes go through MCP or script tools.
max_attempts: Option<usize>How many times the stage is re-run before the gate gives up and lets the
transition through (with a warning). Defaults to
DEFAULT_GATE_ATTEMPTS.
Trait Implementations§
Source§impl Clone for TransitionGate
impl Clone for TransitionGate
Source§fn clone(&self) -> TransitionGate
fn clone(&self) -> TransitionGate
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 TransitionGate
impl Debug for TransitionGate
Source§impl Default for TransitionGate
impl Default for TransitionGate
Source§fn default() -> TransitionGate
fn default() -> TransitionGate
Source§impl<'de> Deserialize<'de> for TransitionGate
impl<'de> Deserialize<'de> for TransitionGate
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 TransitionGate
Source§impl PartialEq for TransitionGate
impl PartialEq for TransitionGate
Source§impl Serialize for TransitionGate
impl Serialize for TransitionGate
impl StructuralPartialEq for TransitionGate
Auto Trait Implementations§
impl Freeze for TransitionGate
impl RefUnwindSafe for TransitionGate
impl Send for TransitionGate
impl Sync for TransitionGate
impl Unpin for TransitionGate
impl UnsafeUnpin for TransitionGate
impl UnwindSafe for TransitionGate
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.