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,
},
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.
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 ==.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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.