pub struct GoalState {
pub objective: String,
pub status: GoalRuntimeStatus,
pub declared_status: Option<GoalDeclaredStatus>,
pub declared_at_round: Option<u32>,
pub continuation_count: u32,
pub eval_history: Vec<GoalEvalRecord>,
pub created_at: String,
pub updated_at: String,
}Expand description
Durable goal record persisted in session.metadata.
Fields§
§objective: StringThe user’s objective text (copied from the active goal config).
status: GoalRuntimeStatus§declared_status: Option<GoalDeclaredStatus>The agent’s most recent self-report, if any. Cleared once acted upon.
declared_at_round: Option<u32>§continuation_count: u32How many autonomous continuations have fired toward this goal.
eval_history: Vec<GoalEvalRecord>Persisted double-check verdicts (the “评测内容”).
created_at: String§updated_at: StringImplementations§
Source§impl GoalState
impl GoalState
Sourcepub fn declare(&mut self, status: GoalDeclaredStatus, round: u32)
pub fn declare(&mut self, status: GoalDeclaredStatus, round: u32)
Record the agent’s update_goal self-report.
Sourcepub fn clear_declaration(&mut self)
pub fn clear_declaration(&mut self)
Clear any pending self-report (after it has been acted upon).
Sourcepub fn push_eval(&mut self, record: GoalEvalRecord)
pub fn push_eval(&mut self, record: GoalEvalRecord)
Append a double-check verdict, trimming to [MAX_EVAL_HISTORY].
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GoalState
impl<'de> Deserialize<'de> for GoalState
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
Auto Trait Implementations§
impl Freeze for GoalState
impl RefUnwindSafe for GoalState
impl Send for GoalState
impl Sync for GoalState
impl Unpin for GoalState
impl UnsafeUnpin for GoalState
impl UnwindSafe for GoalState
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