pub enum RpcEvent {
MessageUpdate {
event: AssistantEvent,
},
SubagentStart {
subagent_id: u64,
agent_name: String,
task_preview: String,
},
SubagentUpdate {
subagent_id: u64,
agent_name: String,
status: String,
},
SubagentDone {
subagent_id: u64,
agent_name: String,
result_preview: String,
duration_secs: f64,
},
AgentEnd {
usage: TurnUsage,
},
Response {
id: String,
command: String,
body: Value,
},
Error {
id: Option<String>,
message: String,
},
Ready {
session_id: String,
model: String,
protocol_version: u32,
},
}Expand description
Events emitted by the rpc child to the parent over the child’s
stdout.
Variants§
MessageUpdate
A streaming update from the assistant (text delta, thinking, tool
call lifecycle, …). One or more of these frames precede each
RpcEvent::AgentEnd.
Fields
event: AssistantEventThe granular assistant event payload.
SubagentStart
A subagent has been spawned to handle a delegated task.
Fields
SubagentUpdate
A running subagent has produced an intermediate status update.
Fields
subagent_id: u64Identifies the subagent (matches a prior RpcEvent::SubagentStart).
SubagentDone
A subagent has finished.
Fields
AgentEnd
The agent turn has completed. Carries final token-usage data.
Response
A response to a specific RpcCommand, correlated by id.
The body is flattened into the enclosing JSON object — its keys
appear at the top level alongside "type", "id", and "command".
Fields
id: StringEchoed from the originating RpcCommand’s id field.
Error
A protocol-level or runtime error.
id is None for errors not attributable to a specific command
(e.g. oversized frame, internal crash).
Fields
Ready
Emitted by the rpc child immediately after startup, before any commands are accepted.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RpcEvent
impl<'de> Deserialize<'de> for RpcEvent
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>,
impl StructuralPartialEq for RpcEvent
Auto Trait Implementations§
impl Freeze for RpcEvent
impl RefUnwindSafe for RpcEvent
impl Send for RpcEvent
impl Sync for RpcEvent
impl Unpin for RpcEvent
impl UnsafeUnpin for RpcEvent
impl UnwindSafe for RpcEvent
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.