pub enum DaemonMessage {
Show 32 variants
Connected {
session_id: String,
thread_id: String,
model_name: String,
context_window: usize,
title: Option<String>,
total_tokens_used: usize,
provider_id: String,
},
StartOutput {
thread_id: Option<String>,
},
TextChunk {
thread_id: Option<String>,
chunk: String,
},
ToolCall {
name: String,
args: String,
thread_id: Option<String>,
display_as: Option<String>,
},
ToolResult {
segments: Vec<DisplaySegment>,
thread_id: Option<String>,
},
Info {
thread_id: Option<String>,
text: String,
},
ResponseDone {
thread_id: Option<String>,
token_usage: Option<TokenUsage>,
},
UserInputEcho {
thread_id: Option<String>,
text: String,
},
SubscriptionEvent {
name: String,
text: String,
thread_id: Option<String>,
},
OAuthRequired {
thread_id: Option<String>,
auth_url: String,
},
UserChoiceRequired {
thread_id: Option<String>,
id: String,
prompt: String,
choices: Vec<String>,
default: usize,
},
UserChoiceComplete {
choice_id: String,
},
ThinkingStart {
thread_id: Option<String>,
},
ThinkingEnd {
thread_id: Option<String>,
},
ThinkingChunk {
thread_id: Option<String>,
chunk: String,
},
CompactionApplied {
thread_id: Option<String>,
},
ModelSwitched {
thread_id: String,
model_name: String,
context_window: usize,
provider_id: String,
},
Error {
thread_id: Option<String>,
text: String,
},
ViewUpdate {
thread_id: Option<String>,
view_type: String,
content: Value,
},
Replay {
history: Vec<DaemonMessage>,
pending_choices: Vec<DaemonMessage>,
views: HashMap<String, Value>,
in_progress: bool,
},
Welcome {
sessions: HashMap<String, SessionInfo>,
available_models: Vec<ModelInfo>,
default_model_name: String,
default_context_window: usize,
provider_name: String,
remotes: Vec<RemoteInfo>,
},
SessionsUpdated {
sessions: HashMap<String, SessionInfo>,
},
RemotesUpdated {
remotes: Vec<RemoteInfo>,
},
DisconnectNotIdle,
DetachedIdle,
EmigrateResult {
session_id: String,
session_data: String,
},
MigrateStarted {
session_id: String,
},
MigrateComplete {
session_id: String,
new_session_id: String,
},
MigrateError {
session_id: String,
error: String,
},
ImportComplete {
session_id: String,
},
RapServersBooted {
server_ports: HashMap<String, u16>,
},
DirectoryListing {
request_path: String,
entries: Vec<String>,
on: Option<String>,
},
}Variants§
Connected
Fields
StartOutput
TextChunk
ToolCall
ToolResult
Fields
segments: Vec<DisplaySegment>Prioritized display segments. Clients use the first type they support.
Info
ResponseDone
UserInputEcho
SubscriptionEvent
OAuthRequired
UserChoiceRequired
UserChoiceComplete
ThinkingStart
ThinkingEnd
ThinkingChunk
CompactionApplied
ModelSwitched
Confirmation that a thread’s model was switched (via
ClientMessage::SwitchModel). Sent to the requesting client and
broadcast to the thread’s subscribers so every attached UI can update
its model indicator.
Error
ViewUpdate
A view update pushed by a RAP tool server.
Replay
Batch replay of history messages, sent on connect/load.
Fields
history: Vec<DaemonMessage>pending_choices: Vec<DaemonMessage>in_progress: boolWhether a completion is currently in flight for this thread. When false, clients should treat the end of the replay as an implicit ResponseDone (a trailing unresolved ToolCall in the history still implies a “waiting for tool result” state); when true, the spinner state implied by the end of the history is live and more events will follow.
Welcome
Sent immediately on socket connection with session list and default model info.
SessionsUpdated
Broadcast: one or more sessions were created or updated.
Fields
sessions: HashMap<String, SessionInfo>RemotesUpdated
Broadcast: remote connection statuses changed.
Fields
remotes: Vec<RemoteInfo>DisconnectNotIdle
The agent is not idle — the client should show the full quit picker UI.
DetachedIdle
The agent was idle and has been detached — the client can proceed with its pending action (quit, switch, new session) without showing a picker.
EmigrateResult
Response to Emigrate: serialized session data (thread tree as JSON).
MigrateStarted
MigrateComplete
MigrateError
ImportComplete
Response to ImportSession.
RapServersBooted
Response to BootRapServers: maps config ID → local port for servers needing migration.
Fields
DirectoryListing
Response to ListDirectory: directory entries for path completion.
Trait Implementations§
Source§impl Clone for DaemonMessage
impl Clone for DaemonMessage
Source§fn clone(&self) -> DaemonMessage
fn clone(&self) -> DaemonMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more