pub enum AgentEvent {
Show 15 variants
Status(SessionStatus),
Output(String),
OutputAppend(String),
ToolCall {
name: String,
input: String,
ok: Option<bool>,
output: Option<String>,
},
Permission(PermissionRequest),
Question(UserQuestion),
Cost(Cost),
Model(String),
Commands(Vec<String>),
NativeId(String),
Limited(String),
Note(String),
Context {
used: u64,
window: Option<u64>,
},
Quota(Quota),
Exited(Option<i32>),
}Expand description
Events sent upward after normalization by the adapter.
Variants§
Status(SessionStatus)
Output(String)
Text output from the agent (may contain newlines).
OutputAppend(String)
Continues the last unterminated output line (the first segment of the text is appended to it), so a mid-line stream pause does not split Markdown constructs.
ToolCall
Permission(PermissionRequest)
Question(UserQuestion)
Cost(Cost)
Model(String)
Commands(Vec<String>)
Native slash command names of the agent (without /).
NativeId(String)
Native session ID of the agent (for resumption). Sent only when resumption is possible with this ID.
Limited(String)
Quota exhausted / rate limited.
Note(String)
Sets a status note for the session (e.g. failure reason).
Context
Session context usage.
Quota(Quota)
Account quota status update.
Exited(Option<i32>)
Process exited.
Trait Implementations§
Source§impl Clone for AgentEvent
impl Clone for AgentEvent
Auto Trait Implementations§
impl Forget for AgentEvent
impl Freeze for AgentEventwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<QuestionOption>: Freeze,
PhantomData<String>: Freeze,
PhantomData<QuotaWindow>: Freeze,
impl Move for AgentEvent
impl RefUnwindSafe for AgentEvent
impl Send for AgentEventwhere
RawVecInner: Send,
impl Sync for AgentEventwhere
RawVecInner: Sync,
impl Unpin for AgentEvent
impl UnsafeUnpin for AgentEventwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<QuestionOption>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<QuotaWindow>: UnsafeUnpin,
impl UnwindSafe for AgentEventwhere
RawVecInner: UnwindSafe,
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,
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.