pub enum WsMessageType {
Show 34 variants
ToolCall,
ToolResult,
ApprovalRequired,
ApprovalResolved,
AskUserRequired,
AskUserResolved,
PlanContent,
PlanApprovalRequired,
PlanApprovalResolved,
StatusUpdate,
TaskCompleted,
SubagentStart,
SubagentComplete,
ParallelAgentsStart,
ParallelAgentsDone,
ThinkingBlock,
Progress,
NestedToolCall,
NestedToolResult,
MessageChunk,
MessageStart,
MessageComplete,
SessionActivity,
UserMessage,
McpStatusChanged,
McpServersUpdated,
Error,
Pong,
Query,
Approve,
AskUserResponse,
PlanApprovalResponse,
Ping,
Interrupt,
}Expand description
All known WebSocket message types, matching the Python WSMessageType enum.
Variants are grouped into server-to-client and client-to-server.
Variants§
ToolCall
A tool call is being made by the agent.
ToolResult
Result of a tool call.
ApprovalRequired
An approval is required before executing a tool.
ApprovalResolved
An approval request has been resolved.
AskUserRequired
The agent needs user input via ask-user.
AskUserResolved
An ask-user request has been resolved.
PlanContent
Plan content from the planning agent.
PlanApprovalRequired
A plan requires user approval.
PlanApprovalResolved
A plan approval request has been resolved.
StatusUpdate
Status update (mode, autonomy, thinking, etc.).
TaskCompleted
The agent has completed its task.
SubagentStart
A subagent has started execution.
SubagentComplete
A subagent has completed execution.
ParallelAgentsStart
Parallel agent execution started.
ParallelAgentsDone
Parallel agent execution completed.
ThinkingBlock
A thinking/reasoning block from the model.
Progress
Progress update during a long-running operation.
NestedToolCall
A tool call within a nested/subagent context.
NestedToolResult
Result of a nested tool call.
MessageChunk
Streaming message chunk.
MessageStart
Start of a new assistant message.
MessageComplete
Completion of an assistant message.
SessionActivity
Session activity event.
UserMessage
User message (echoed back or broadcast).
McpStatusChanged
MCP server status changed.
McpServersUpdated
MCP servers list updated.
Error
Error message.
Pong
Pong response to a ping.
Query
Query / user message from the client.
Approve
Approval response from the client.
AskUserResponse
Ask-user response from the client.
PlanApprovalResponse
Plan approval response from the client.
Ping
Ping keepalive.
Interrupt
Interrupt request.
Implementations§
Source§impl WsMessageType
impl WsMessageType
Trait Implementations§
Source§impl Clone for WsMessageType
impl Clone for WsMessageType
Source§fn clone(&self) -> WsMessageType
fn clone(&self) -> WsMessageType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WsMessageType
impl Debug for WsMessageType
Source§impl<'de> Deserialize<'de> for WsMessageType
impl<'de> Deserialize<'de> for WsMessageType
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 Display for WsMessageType
impl Display for WsMessageType
Source§impl Hash for WsMessageType
impl Hash for WsMessageType
Source§impl PartialEq for WsMessageType
impl PartialEq for WsMessageType
Source§impl Serialize for WsMessageType
impl Serialize for WsMessageType
impl Copy for WsMessageType
impl Eq for WsMessageType
impl StructuralPartialEq for WsMessageType
Auto Trait Implementations§
impl Freeze for WsMessageType
impl RefUnwindSafe for WsMessageType
impl Send for WsMessageType
impl Sync for WsMessageType
impl Unpin for WsMessageType
impl UnsafeUnpin for WsMessageType
impl UnwindSafe for WsMessageType
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§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<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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.