pub struct Goal {
pub statement: Option<String>,
pub check: GoalCheck,
pub stuck_after: Option<u32>,
pub on_achieved: Option<GoalAction>,
pub on_stuck: Option<GoalAction>,
}Expand description
The self-correcting goal watchdog. A supervisor-level periodic check of
whether the configured statement is achieved (or the agent is stuck),
with a configurable disposition. It runs beside the agent loop and never
blocks it, so a slow judge cannot stall real work.
Fields§
§statement: Option<String>The goal in natural language (the LLM judge reads it).
check: GoalCheck§stuck_after: Option<u32>N consecutive no-progress checks ⇒ self-correct (default 3).
on_achieved: Option<GoalAction>What to do when the goal is achieved (default: finish).
on_stuck: Option<GoalAction>What to do when stuck (default: replan).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Goal
impl<'de> Deserialize<'de> for Goal
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>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Goal
Auto Trait Implementations§
impl Freeze for Goal
impl RefUnwindSafe for Goal
impl Send for Goal
impl Sync for Goal
impl Unpin for Goal
impl UnsafeUnpin for Goal
impl UnwindSafe for Goal
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
Mutably borrows from an owned value. Read more