pub enum AgentMessage {
Show 29 variants
StreamChunk {
text: String,
},
StreamEnd {
finish_reason: Option<String>,
},
ToolCallStart {
id: String,
name: String,
server: Option<String>,
input: Value,
},
ToolProgress {
name: String,
message: String,
progress: Option<f64>,
},
ToolResult {
id: String,
name: String,
output: Option<String>,
error: Option<String>,
},
ConversationSync {
session_id: String,
model: String,
messages: Vec<DisplayMessage>,
status: String,
is_busy: bool,
tool_mode: ToolMode,
mcp_servers: Vec<String>,
},
MessageAdded {
message: DisplayMessage,
},
StatusUpdate {
status: String,
},
TaskUpdate {
task_tree: String,
task_count: usize,
completed_count: usize,
},
Error {
message: String,
fatal: bool,
},
Exiting {
reason: String,
},
Ack {
command: String,
},
SlashCommandResult {
command: String,
success: bool,
output: Option<String>,
action_taken: Option<String>,
error: Option<String>,
blocked: bool,
},
Toast {
message: String,
duration_ms: u64,
},
SealStatus {
enabled: bool,
entity_count: usize,
last_resolution: Option<String>,
quality_score: f32,
},
LockResult {
success: bool,
resource_type: ResourceLockType,
scope: String,
error: Option<String>,
blocking_agent: Option<String>,
},
LockReleased {
resource_type: ResourceLockType,
scope: String,
},
LockStatus {
locks: Vec<LockInfo>,
},
LockChanged {
change: LockChangeType,
lock: LockInfo,
},
AgentSpawned {
new_session_id: String,
parent_session_id: String,
spawn_reason: String,
model: String,
},
AgentList {
agents: Vec<AgentMetadata>,
},
AgentExiting {
session_id: String,
reason: String,
children_notified: Vec<String>,
},
ParentSignalReceived {
signal: ParentSignalType,
parent_session_id: String,
},
PlanModeEntered {
plan_session_id: String,
messages: Vec<DisplayMessage>,
status: String,
},
PlanModeExited {
summary: Option<String>,
},
PlanModeSync {
plan_session_id: String,
main_session_id: String,
messages: Vec<DisplayMessage>,
status: String,
is_busy: bool,
},
PlanModeMessageAdded {
message: DisplayMessage,
},
PlanModeStreamChunk {
text: String,
},
PlanModeStreamEnd {
finish_reason: Option<String>,
},
}Expand description
Messages sent from Agent to Viewer (TUI)
Variants§
StreamChunk
Streaming text chunk from AI response
StreamEnd
Stream completed (full response received)
ToolCallStart
Tool call started
Fields
ToolProgress
Tool execution progress update
Fields
ToolResult
Tool execution completed
Fields
ConversationSync
Full conversation state (sent on attach or sync request)
Fields
messages: Vec<DisplayMessage>Full conversation history (for display)
MessageAdded
New message added to conversation
Fields
message: DisplayMessageThe message that was added
StatusUpdate
Status update (e.g., “Working…”, “Connected to MCP server X”)
TaskUpdate
Task list update
Fields
Error
Error occurred
Exiting
Agent is exiting
Ack
Acknowledgment of viewer command
SlashCommandResult
Result of a slash command execution (for remote control)
Fields
Toast
Toast notification
SealStatus
SEAL status update
Fields
LockResult
Lock acquisition result
Fields
resource_type: ResourceLockTypeResource type
LockReleased
Lock released confirmation
LockStatus
Response to QueryLocks
LockChanged
Lock state changed notification (for other viewers)
AgentSpawned
A new child agent was spawned
Fields
AgentList
Response to ListAgents request
Fields
agents: Vec<AgentMetadata>All active agents with their metadata
AgentExiting
An agent is exiting (sent to TUI and potentially to children)
Fields
ParentSignalReceived
Signal received from parent agent
PlanModeEntered
Plan mode entered successfully
Fields
messages: Vec<DisplayMessage>Display messages from plan mode
PlanModeExited
Plan mode exited
PlanModeSync
Plan mode state sync (response to PlanModeSyncRequest)
Fields
messages: Vec<DisplayMessage>Display messages from plan mode
PlanModeMessageAdded
New message added to plan mode conversation
Fields
message: DisplayMessageThe message that was added
PlanModeStreamChunk
Streaming text chunk in plan mode
PlanModeStreamEnd
Plan mode stream completed
Trait Implementations§
Source§impl Clone for AgentMessage
impl Clone for AgentMessage
Source§fn clone(&self) -> AgentMessage
fn clone(&self) -> AgentMessage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more