pub enum SessionEvent {
Show 20 variants
SessionCreated {
config: Box<SessionConfig>,
metadata: HashMap<String, String>,
parent_session_id: Option<SessionId>,
},
SessionConfigUpdated {
config: Box<SessionConfig>,
primary_agent_id: String,
},
AssistantMessageAdded {
message: Message,
model: ModelId,
},
UserMessageAdded {
message: Message,
},
ToolMessageAdded {
message: Message,
},
MessageUpdated {
message: Message,
},
ToolCallStarted {
id: ToolCallId,
name: String,
parameters: Value,
model: ModelId,
},
ToolCallCompleted {
id: ToolCallId,
name: String,
result: ToolResult,
model: ModelId,
},
ToolCallFailed {
id: ToolCallId,
name: String,
error: String,
model: ModelId,
},
ApprovalRequested {
request_id: RequestId,
tool_call: ToolCall,
},
ApprovalDecided {
request_id: RequestId,
decision: ApprovalDecision,
remember: Option<ApprovalMemory>,
},
OperationStarted {
op_id: OpId,
kind: OperationKind,
},
OperationCompleted {
op_id: OpId,
},
OperationCancelled {
op_id: OpId,
info: CancellationInfo,
},
CompactResult {
result: CompactResult,
},
ConversationCompacted {
record: CompactionRecord,
},
WorkspaceChanged,
QueueUpdated {
queue: Vec<QueuedWorkItemSnapshot>,
},
Error {
message: String,
},
McpServerStateChanged {
server_name: String,
state: McpServerState,
},
}Variants§
SessionCreated
Session was created. For sub-agent sessions, parent_session_id links
to the parent session for auditability.
Fields
§
config: Box<SessionConfig>SessionConfigUpdated
AssistantMessageAdded
Assistant-authored message; includes the model that produced it.
UserMessageAdded
User-authored message; no model attribution.
ToolMessageAdded
Tool result message; no model attribution.
MessageUpdated
ToolCallStarted
ToolCallCompleted
ToolCallFailed
ApprovalRequested
ApprovalDecided
OperationStarted
OperationCompleted
OperationCancelled
CompactResult
Fields
§
result: CompactResultConversationCompacted
Fields
§
record: CompactionRecordWorkspaceChanged
QueueUpdated
Fields
§
queue: Vec<QueuedWorkItemSnapshot>Error
McpServerStateChanged
Implementations§
Source§impl SessionEvent
impl SessionEvent
pub fn is_error(&self) -> bool
pub fn operation_id(&self) -> Option<OpId>
pub fn tool_call_id(&self) -> Option<&ToolCallId>
Trait Implementations§
Source§impl Clone for SessionEvent
impl Clone for SessionEvent
Source§fn clone(&self) -> SessionEvent
fn clone(&self) -> SessionEvent
Returns a duplicate of the value. Read more
1.0.0 · 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 SessionEvent
impl Debug for SessionEvent
Source§impl<'de> Deserialize<'de> for SessionEvent
impl<'de> Deserialize<'de> for SessionEvent
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 SessionEvent
impl RefUnwindSafe for SessionEvent
impl Send for SessionEvent
impl Sync for SessionEvent
impl Unpin for SessionEvent
impl UnwindSafe for SessionEvent
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> 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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request