#[non_exhaustive]pub enum AgentSessionEvent {
Agent {
event: AgentEvent,
},
QueueUpdate {
steering: Vec<String>,
follow_up: Vec<String>,
},
CompactionStart {
reason: CompactionReason,
},
CompactionEnd {
reason: CompactionReason,
result: Option<CompactionResult>,
aborted: bool,
will_retry: bool,
error_message: Option<String>,
},
AutoRetryStart {
attempt: u32,
max_attempts: u32,
delay_ms: u64,
error_message: String,
},
AutoRetryEnd {
success: bool,
attempt: u32,
final_error: Option<String>,
},
SessionInfoChanged {
session_id: String,
name: Option<String>,
},
ThinkingLevelChanged {
level: ThinkingLevel,
},
SessionSummary {
session_id: String,
model: String,
turns: u32,
tokens: SessionTokenTotals,
cost_usd: Option<SessionCostTotals>,
},
}Expand description
Events emitted during a session’s lifetime (S7.5).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Agent
Fields
§
event: AgentEventQueueUpdate
CompactionStart
Fields
§
reason: CompactionReasonCompactionEnd
AutoRetryStart
AutoRetryEnd
SessionInfoChanged
ThinkingLevelChanged
Fields
§
level: ThinkingLevelSessionSummary
Cumulative token usage and (when known) cost breakdown for the
session. Emitted at the end of a non-interactive run, but may also be
emitted on demand. The wire type is session_summary to preserve
the ad-hoc shape that was used before this variant existed.
Trait Implementations§
Source§impl Clone for AgentSessionEvent
impl Clone for AgentSessionEvent
Source§fn clone(&self) -> AgentSessionEvent
fn clone(&self) -> AgentSessionEvent
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 AgentSessionEvent
impl Debug for AgentSessionEvent
Source§impl<'de> Deserialize<'de> for AgentSessionEvent
impl<'de> Deserialize<'de> for AgentSessionEvent
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 AgentSessionEvent
impl RefUnwindSafe for AgentSessionEvent
impl Send for AgentSessionEvent
impl Sync for AgentSessionEvent
impl Unpin for AgentSessionEvent
impl UnsafeUnpin for AgentSessionEvent
impl UnwindSafe for AgentSessionEvent
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