pub enum ClientMessage {
Show 16 variants
CreateSession {
cwd: PathBuf,
location: Option<RemoteName>,
model: Option<ModelRef>,
keeps_session_alive: bool,
},
Connect {
root_thread_id: ThreadRef,
thread_id: Option<ThreadRef>,
keeps_session_alive: bool,
},
UserInput {
thread_id: ThreadRef,
text: String,
},
Disconnect,
SoftDetach {
root_thread_id: ThreadRef,
},
ShutdownSession {
root_thread_id: ThreadRef,
},
ArchiveSession {
root_thread_id: ThreadRef,
},
SwitchModel {
thread_id: ThreadRef,
model: ModelRef,
},
UserChoiceAnswered {
choice_id: ChoiceId,
selected: usize,
},
TriggerCompaction {
root_thread_id: ThreadRef,
},
RequestMigrate {
root_thread_id: ThreadRef,
to: Option<RemoteName>,
dest_cwd: PathBuf,
},
Emigrate {
root_thread_id: ThreadId,
dest_rap_urls: HashMap<String, String>,
},
EmigrateDone {
root_thread_id: ThreadId,
},
ImportSession {
root_thread_id: ThreadId,
cwd: PathBuf,
session_data: String,
},
BootRapServers {
cwd: PathBuf,
},
ListDirectory {
path: String,
on: Option<RemoteName>,
},
}Variants§
CreateSession
Create a new session with the given working directory.
Fields
location: Option<RemoteName>Optional target location. None means local.
Otherwise, the name of a remote.
Connect
Connect to an existing session (optionally a specific thread).
Fields
UserInput
Disconnect
Disconnect from the session while letting the agent continue to run in the background.
SoftDetach
Immediately attempt to detach. If the agent is idle, the daemon shuts
down the session (closing the display channel). If not idle, the daemon
responds with DisconnectNotIdle so the client can show a picker.
ShutdownSession
Disconnects from the session and shuts down the agent so that it can only be woken bu new user inputs.
ArchiveSession
Archive a session (shut it down and hide from the main list).
SwitchModel
Switch the model used for future requests on a thread. thread_id
may be any thread (root or subthread); the switch affects only that
specific thread — it does not propagate to child threads. If a
completion is currently in flight on the thread, it finishes on the
old model and the switch applies to subsequent requests.
UserChoiceAnswered
Notify the daemon that a user choice was answered so it can be removed from the pending replay list.
TriggerCompaction
Trigger compaction for the given session.
RequestMigrate
Request migration of a session to a different host.
Fields
to: Option<RemoteName>None means local, Some(name) means a remote.
Emigrate
Daemon-to-daemon: request a session to emigrate. Includes destination RAP URLs so source RAP servers can migrate their state.
EmigrateDone
Daemon-to-daemon: immigration is complete, source can clean up.
ImportSession
Daemon-to-daemon: import a serialized session at the given cwd.
BootRapServers
Daemon-to-daemon: boot RAP servers at the given cwd and return their ports.
ListDirectory
Request directory listing for path completion.
Fields
on: Option<RemoteName>Target remote name. None means list on the local filesystem.