pub enum RpcCommand {
Show 32 variants
Prompt {
id: Option<String>,
message: String,
images: Option<Vec<ImageContent>>,
streaming_behavior: Option<StreamingBehavior>,
},
Steer {
id: Option<String>,
message: String,
images: Option<Vec<ImageContent>>,
},
FollowUp {
id: Option<String>,
message: String,
images: Option<Vec<ImageContent>>,
},
Abort {
id: Option<String>,
},
NewSession {
id: Option<String>,
parent_session: Option<String>,
},
GetState {
id: Option<String>,
},
SetModel {
id: Option<String>,
provider: String,
model_id: String,
},
CycleModel {
id: Option<String>,
},
GetAvailableModels {
id: Option<String>,
},
SetThinkingLevel {
id: Option<String>,
level: ModelThinkingLevel,
},
CycleThinkingLevel {
id: Option<String>,
},
SetSteeringMode {
id: Option<String>,
mode: QueueMode,
},
SetFollowUpMode {
id: Option<String>,
mode: QueueMode,
},
Compact {
id: Option<String>,
custom_instructions: Option<String>,
},
SetAutoCompaction {
id: Option<String>,
enabled: bool,
},
SetAutoRetry {
id: Option<String>,
enabled: bool,
},
AbortRetry {
id: Option<String>,
},
Bash {
id: Option<String>,
command: String,
exclude_from_context: Option<bool>,
},
AbortBash {
id: Option<String>,
},
GetSessionStats {
id: Option<String>,
},
ExportHtml {
id: Option<String>,
output_path: Option<String>,
},
SwitchSession {
id: Option<String>,
session_path: String,
},
Fork {
id: Option<String>,
entry_id: String,
},
Clone {
id: Option<String>,
},
GetForkMessages {
id: Option<String>,
},
GetEntries {
id: Option<String>,
since: Option<String>,
},
GetTree {
id: Option<String>,
},
GetLastAssistantText {
id: Option<String>,
},
SetSessionName {
id: Option<String>,
name: String,
},
GetMessages {
id: Option<String>,
},
GetCommands {
id: Option<String>,
},
Unknown {
id: Option<String>,
command_type: String,
payload: Map<String, Value>,
},
}Expand description
All 31 known RPC commands, plus an unknown catch-all.
Each known variant carries an optional correlation id. The unknown arm
preserves the raw type string and remaining fields so the server can echo
id/type on error without serde hard-failing the line.
Variants§
Prompt
Submit a user prompt (async — events follow; response at preflight).
Fields
images: Option<Vec<ImageContent>>Optional inline images.
streaming_behavior: Option<StreamingBehavior>How to handle the prompt while streaming.
Steer
Steer into the current turn.
Fields
images: Option<Vec<ImageContent>>Optional inline images.
FollowUp
Queue a follow-up after the current turn.
Fields
images: Option<Vec<ImageContent>>Optional inline images.
Abort
Abort the current agent turn.
NewSession
Start a new session, optionally forked from a parent session file.
Fields
GetState
Snapshot current session state.
SetModel
Select a model by provider + id.
Fields
CycleModel
Cycle to the next available model.
GetAvailableModels
List available models.
SetThinkingLevel
Set the reasoning/thinking level.
CycleThinkingLevel
Cycle to the next thinking level.
SetSteeringMode
Set the steering queue drain mode.
SetFollowUpMode
Set the follow-up queue drain mode.
Compact
Compact the session.
Fields
SetAutoCompaction
Enable or disable auto-compaction.
SetAutoRetry
Enable or disable auto-retry.
AbortRetry
Abort an in-flight auto-retry.
Bash
Execute a bash command via the session.
Fields
AbortBash
Abort a running bash command.
GetSessionStats
Return session statistics.
ExportHtml
Export the session to HTML.
SwitchSession
Switch to another session file.
Fork
Fork the session before entry_id.
Clone
Clone the session at the current leaf.
GetForkMessages
List user messages available for forking.
GetEntries
List session entries, optionally after since.
Fields
GetTree
Return the session tree.
GetLastAssistantText
Return the last assistant text content, if any.
SetSessionName
Set the display name of the current session.
GetMessages
Return all agent messages in the current session.
GetCommands
List available slash commands (extension/prompt/skill).
Unknown
Unknown command discriminant preserved for error echo.
Implementations§
Source§impl RpcCommand
impl RpcCommand
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§impl Serialize for RpcCommand
impl Serialize for RpcCommand
impl StructuralPartialEq for RpcCommand
Auto Trait Implementations§
impl Freeze for RpcCommand
impl RefUnwindSafe for RpcCommand
impl Send for RpcCommand
impl Sync for RpcCommand
impl Unpin for RpcCommand
impl UnsafeUnpin for RpcCommand
impl UnwindSafe for RpcCommand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more