pub enum AgentState {
Registered,
Starting,
Idle,
Running,
WaitingApproval,
Closing,
Unloaded,
Closed,
Interrupted,
Lost,
}Variants§
Implementations§
Source§impl AgentState
impl AgentState
Sourcepub fn is_resident(self) -> bool
pub fn is_resident(self) -> bool
Starting reserves a slot; closing retains it until cleanup finishes.
pub fn is_executing(self) -> bool
Sourcepub fn is_busy(self) -> bool
pub fn is_busy(self) -> bool
Waiting for a model/tool/retry/approval must not look idle to a reaper.
pub fn validate_for(self, mode: AgentMode) -> HostResult<()>
Sourcepub fn transition(self, next: Self, mode: AgentMode) -> HostResult<Self>
pub fn transition(self, next: Self, mode: AgentMode) -> HostResult<Self>
Backend adapters must apply these only after the actual boundary: e.g. Running -> Idle requires settlement, Closing -> Closed requires cleanup. This helper does not perform execution, cancellation or persistence.
Sourcepub fn after_restart(self, mode: AgentMode) -> HostResult<Self>
pub fn after_restart(self, mode: AgentMode) -> HostResult<Self>
Classify stale observations after host restart. This neither restores a Session nor authorizes replay of a tool whose external effects are unknown.
Trait Implementations§
Source§impl Clone for AgentState
impl Clone for AgentState
impl Copy for AgentState
Source§impl Debug for AgentState
impl Debug for AgentState
Source§impl<'de> Deserialize<'de> for AgentState
impl<'de> Deserialize<'de> for AgentState
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 Eq for AgentState
Source§impl PartialEq for AgentState
impl PartialEq for AgentState
Source§impl Serialize for AgentState
impl Serialize for AgentState
impl StructuralPartialEq for AgentState
Auto Trait Implementations§
impl Forget for AgentState
impl Freeze for AgentState
impl Move for AgentState
impl RefUnwindSafe for AgentState
impl Send for AgentState
impl Sync for AgentState
impl Unpin for AgentState
impl UnsafeUnpin for AgentState
impl UnwindSafe for AgentState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
Compare self to
key and return true if they are equal.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
Compare self to
key and return true if they are equal.