pub enum RpcCommand {
Prompt {
id: String,
message: String,
attachments: Vec<RpcAttachment>,
},
FollowUp {
id: String,
message: String,
},
Compact {
id: String,
},
NewSession {
id: String,
},
GetMessages {
id: String,
},
SetModel {
id: String,
model: String,
},
GetAvailableModels {
id: String,
},
Abort {
id: String,
},
GetSessionStats {
id: String,
},
GetState {
id: String,
},
ToolsList {
id: Option<String>,
},
Shutdown,
}Expand description
Commands sent from the parent process to the rpc child over the
child’s stdin.
All variants except RpcCommand::Shutdown carry an id field that the
child echoes back in the matching RpcEvent::Response frame.
Variants§
Prompt
Submit a new user prompt, optionally with file attachments.
Fields
attachments: Vec<RpcAttachment>Zero or more file attachments. Defaults to an empty list when the field is absent from the JSON frame.
FollowUp
Send a follow-up message continuing the current conversation turn.
Compact
Request in-context compaction of the conversation history.
NewSession
Start a fresh conversation session, discarding history.
GetMessages
Retrieve the current conversation message history.
SetModel
Switch the active model for subsequent turns.
Fields
GetAvailableModels
Enumerate models available to the current auth context.
Abort
Abort the currently running prompt / agent turn.
GetSessionStats
Retrieve aggregated token-usage statistics for the session.
GetState
Retrieve the full runtime state snapshot of the rpc child.
ToolsList
Enumerate all tools currently registered in this rpc session’s tool registry (built-ins + any MCP / extension tools loaded at boot).
The id field follows the same optional-correlation convention used by
other commands: when present it is echoed in the Response frame so the
bridge can match the reply to its pending probe. The bridge Phase 8
router sends {"type":"tools_list"} without an id; both forms are
accepted.
Shutdown
Instruct the rpc child to exit cleanly.
No id field — the child does not send a Response for shutdown.
Trait Implementations§
Source§impl Clone for RpcCommand
impl Clone for RpcCommand
Source§fn clone(&self) -> RpcCommand
fn clone(&self) -> RpcCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RpcCommand
impl Debug for RpcCommand
Source§impl<'de> Deserialize<'de> for RpcCommand
impl<'de> Deserialize<'de> for RpcCommand
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 PartialEq for RpcCommand
impl PartialEq for RpcCommand
Source§fn eq(&self, other: &RpcCommand) -> bool
fn eq(&self, other: &RpcCommand) -> bool
self and other values to be equal, and is used by ==.