pub enum AgentEvent {
Show 19 variants
RunStarted {
thread_name: Option<String>,
prompt_preview: String,
},
ModelCallStarted {
thread_name: Option<String>,
iteration: usize,
},
ToolCallStarted {
thread_name: Option<String>,
call_id: String,
name: String,
args_preview: String,
args_detail: Option<String>,
},
ToolCallFinished {
thread_name: Option<String>,
call_id: String,
name: String,
content_preview: String,
content: Option<String>,
is_error: bool,
},
ThreadStarted {
name: String,
action: String,
source_threads: Vec<String>,
},
ThreadSpawned {
name: String,
executable: String,
cwd: String,
sandboxed: bool,
},
ThreadLog {
name: String,
line: String,
},
TerminalSnapshot {
thread_name: Option<String>,
terminals: Vec<TerminalInfo>,
},
ThreadFinished {
name: String,
exit_code: i32,
timed_out: bool,
timeout_reason: Option<String>,
},
AssistantMessage {
thread_name: Option<String>,
content: String,
},
Error {
thread_name: Option<String>,
message: String,
},
RunFinished {
thread_name: Option<String>,
},
ModelIterationUsage {
thread_name: Option<String>,
iteration: usize,
prompt_tokens: Option<u32>,
completion_tokens: Option<u32>,
total_tokens: Option<u32>,
cached_tokens: Option<u32>,
cumulative_usage: Usage,
},
StreamTextDelta {
thread_name: Option<String>,
text: Option<String>,
},
StreamComplete {
thread_name: Option<String>,
},
GoalContinuation {
continuation_turn: usize,
},
GoalTurnAccounted {
token_delta: i64,
time_delta_seconds: i64,
},
GoalErrorTransition {
new_status: String,
error_message: String,
},
LeanResumeTriggered {
thread_name: Option<String>,
reason: String,
},
}Variants§
RunStarted
ModelCallStarted
ToolCallStarted
Fields
ToolCallFinished
Fields
ThreadStarted
ThreadSpawned
ThreadLog
TerminalSnapshot
ThreadFinished
AssistantMessage
Error
RunFinished
ModelIterationUsage
Emitted after each model iteration with per-iteration and cumulative token usage. Allows the TUI to perform incremental goal-budget accounting and inject mid-turn steering messages when the budget is exceeded.
Fields
StreamTextDelta
StreamComplete
GoalContinuation
Emitted by the agent when it auto-continues for an active goal. The agent handles continuation internally (engine-level), and this event lets the TUI track each continuation turn for display.
Fields
GoalTurnAccounted
Emitted by the agent after each inner turn within a goal-driven send to report token/time usage for that turn, so the TUI can update its goal accounting.
GoalErrorTransition
Emitted when the agent encounters a turn error during goal continuation and transitions the goal to an error state.
LeanResumeTriggered
Trait Implementations§
Source§impl Clone for AgentEvent
impl Clone for AgentEvent
Source§fn clone(&self) -> AgentEvent
fn clone(&self) -> AgentEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AgentEvent
impl Debug for AgentEvent
Source§impl<'de> Deserialize<'de> for AgentEvent
impl<'de> Deserialize<'de> for AgentEvent
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 AgentEvent
Source§impl PartialEq for AgentEvent
impl PartialEq for AgentEvent
Source§impl Serialize for AgentEvent
impl Serialize for AgentEvent
impl StructuralPartialEq for AgentEvent
Auto Trait Implementations§
impl Freeze for AgentEvent
impl RefUnwindSafe for AgentEvent
impl Send for AgentEvent
impl Sync for AgentEvent
impl Unpin for AgentEvent
impl UnsafeUnpin for AgentEvent
impl UnwindSafe for AgentEvent
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
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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§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> ⓘ
Converts
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> ⓘ
Converts
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