pub enum AgentStatus {
Pending,
Running {
iter: u8,
},
Cancelled,
Completed {
summary: String,
},
Errored {
error: String,
},
}Expand description
Lifecycle of a single background sub-agent task.
The bg-agent future drives transitions through watch::Sender<AgentStatus>.
Initial value is AgentStatus::Pending; the future flips to Running
when execution actually starts and to one of the terminal variants
(Completed, Errored, Cancelled) when it finishes.
Running.iter reflects the current inference iteration (1..=20).
Background agents emit live updates via Layer 4 (#1058); 0 is
the entry-point placeholder before the first iteration fires.
Variants§
Pending
Reserved but the spawned future hasn’t started yet.
Running
Actively executing. iter is the current inference iteration
(1..=20); 0 means “started, no iter info yet” (Layer 0 default).
Fields
Cancelled
User or parent fired the cancel token. Terminal.
Completed
Sub-agent returned a final answer. Terminal.
Fields
Errored
Sub-agent returned an error. Terminal.
Trait Implementations§
Source§impl Clone for AgentStatus
impl Clone for AgentStatus
Source§fn clone(&self) -> AgentStatus
fn clone(&self) -> AgentStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AgentStatus
impl Debug for AgentStatus
Source§impl<'de> Deserialize<'de> for AgentStatus
impl<'de> Deserialize<'de> for AgentStatus
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>,
Source§impl PartialEq for AgentStatus
impl PartialEq for AgentStatus
Source§impl Serialize for AgentStatus
impl Serialize for AgentStatus
impl Eq for AgentStatus
impl StructuralPartialEq for AgentStatus
Auto Trait Implementations§
impl Freeze for AgentStatus
impl RefUnwindSafe for AgentStatus
impl Send for AgentStatus
impl Sync for AgentStatus
impl Unpin for AgentStatus
impl UnsafeUnpin for AgentStatus
impl UnwindSafe for AgentStatus
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,
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more