Skip to main content

DaemonMessage

Enum DaemonMessage 

Source
pub enum DaemonMessage {
Show 32 variants Connected { root_thread_id: ThreadRef, thread_id: ThreadRef, model_name: String, context_window: usize, title: Option<String>, total_tokens_used: usize, provider_id: String, }, StartOutput { thread_id: Option<ThreadRef>, }, TextChunk { thread_id: Option<ThreadRef>, chunk: String, }, ToolCall { name: String, args: String, thread_id: Option<ThreadRef>, display_as: Option<String>, }, ToolResult { segments: Vec<DisplaySegment>, thread_id: Option<ThreadRef>, }, Info { thread_id: Option<ThreadRef>, text: String, }, ResponseDone { thread_id: Option<ThreadRef>, token_usage: Option<TokenUsage>, }, UserInputEcho { thread_id: Option<ThreadRef>, text: String, }, SubscriptionEvent { name: String, text: String, thread_id: Option<ThreadRef>, }, OAuthRequired { thread_id: Option<ThreadRef>, auth_url: String, }, UserChoiceRequired { thread_id: Option<ThreadRef>, id: ChoiceId, prompt: String, choices: Vec<String>, default: usize, }, UserChoiceComplete { choice_id: ChoiceId, }, ThinkingStart { thread_id: Option<ThreadRef>, }, ThinkingEnd { thread_id: Option<ThreadRef>, }, ThinkingChunk { thread_id: Option<ThreadRef>, chunk: String, }, CompactionApplied { thread_id: Option<ThreadRef>, }, ModelSwitched { thread_id: ThreadRef, model_name: String, context_window: usize, provider_id: String, }, Error { thread_id: Option<ThreadRef>, text: String, }, ViewUpdate { thread_id: Option<ThreadRef>, view_type: String, content: Value, }, Replay { history: Vec<DaemonMessage>, pending_choices: Vec<DaemonMessage>, views: HashMap<String, Value>, in_progress: bool, }, Welcome { sessions: HashMap<ThreadRef, SessionInfo>, available_models: Vec<ModelInfo>, default_model_name: String, default_context_window: usize, provider_name: String, remotes: Vec<RemoteInfo>, }, SessionsUpdated { sessions: HashMap<ThreadRef, SessionInfo>, }, RemotesUpdated { remotes: Vec<RemoteInfo>, }, DisconnectNotIdle, DetachedIdle, EmigrateResult { root_thread_id: ThreadId, session_data: String, }, MigrateStarted { root_thread_id: ThreadRef, }, MigrateComplete { root_thread_id: ThreadRef, new_root_thread_id: ThreadRef, }, MigrateError { root_thread_id: ThreadRef, error: String, }, ImportComplete { root_thread_id: ThreadId, }, RapServersBooted { server_ports: HashMap<String, u16>, }, DirectoryListing { request_path: String, entries: Vec<String>, on: Option<RemoteName>, },
}

Variants§

§

Connected

Fields

§root_thread_id: ThreadRef
§thread_id: ThreadRef
§model_name: String
§context_window: usize
§total_tokens_used: usize
§provider_id: String
§

StartOutput

Fields

§thread_id: Option<ThreadRef>
§

TextChunk

Fields

§thread_id: Option<ThreadRef>
§chunk: String
§

ToolCall

Fields

§name: String
§args: String
§thread_id: Option<ThreadRef>
§display_as: Option<String>
§

ToolResult

Fields

§segments: Vec<DisplaySegment>

Prioritized display segments. Clients use the first type they support.

§thread_id: Option<ThreadRef>
§

Info

Fields

§thread_id: Option<ThreadRef>
§text: String
§

ResponseDone

Fields

§thread_id: Option<ThreadRef>
§token_usage: Option<TokenUsage>
§

UserInputEcho

Fields

§thread_id: Option<ThreadRef>
§text: String
§

SubscriptionEvent

Fields

§name: String
§text: String
§thread_id: Option<ThreadRef>
§

OAuthRequired

Fields

§thread_id: Option<ThreadRef>
§auth_url: String
§

UserChoiceRequired

Fields

§thread_id: Option<ThreadRef>
§prompt: String
§choices: Vec<String>
§default: usize
§

UserChoiceComplete

Fields

§choice_id: ChoiceId
§

ThinkingStart

Fields

§thread_id: Option<ThreadRef>
§

ThinkingEnd

Fields

§thread_id: Option<ThreadRef>
§

ThinkingChunk

Fields

§thread_id: Option<ThreadRef>
§chunk: String
§

CompactionApplied

Fields

§thread_id: Option<ThreadRef>
§

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.

Fields

§thread_id: ThreadRef
§model_name: String
§context_window: usize
§provider_id: String
§

Error

Fields

§thread_id: Option<ThreadRef>
§text: String
§

ViewUpdate

A view update pushed by a RAP tool server.

Fields

§thread_id: Option<ThreadRef>
§view_type: String
§content: Value
§

Replay

Batch replay of history messages, sent on connect/load.

Fields

§pending_choices: Vec<DaemonMessage>
§in_progress: bool

Whether 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.

Fields

§available_models: Vec<ModelInfo>
§default_model_name: String
§default_context_window: usize
§provider_name: String
§remotes: Vec<RemoteInfo>
§

SessionsUpdated

Broadcast: one or more sessions were created or updated.

Fields

§

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).

Fields

§root_thread_id: ThreadId
§session_data: String
§

MigrateStarted

Fields

§root_thread_id: ThreadRef
§

MigrateComplete

Fields

§root_thread_id: ThreadRef
§new_root_thread_id: ThreadRef
§

MigrateError

Fields

§root_thread_id: ThreadRef
§error: String
§

ImportComplete

Response to ImportSession.

Fields

§root_thread_id: ThreadId
§

RapServersBooted

Response to BootRapServers: maps config ID → local port for servers needing migration.

Fields

§server_ports: HashMap<String, u16>

config_id → port on the remote host (only servers with needsMigration)

§

DirectoryListing

Response to ListDirectory: directory entries for path completion.

Fields

§request_path: String

The path that was requested (for matching responses to requests).

§entries: Vec<String>

Directory entries (names only, directories have trailing /).

§on: Option<RemoteName>

The remote that was queried, if any.

Trait Implementations§

Source§

impl Clone for DaemonMessage

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DaemonMessage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for DaemonMessage

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for DaemonMessage

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more