pub enum RemoteEvent {
Show 13 variants
UiDialogRequest {
request_id: String,
tool_call_id: Option<String>,
ui: Value,
},
UiDialogClosed {
request_id: String,
},
AgentStart,
AgentEnd {
message_count: usize,
messages: Value,
},
RetryScheduled {
attempt: u32,
max_retries: u32,
delay_ms: u64,
error: String,
},
TurnStart,
TurnEnd {
message: Value,
tool_result_count: usize,
tool_results: Value,
},
MessageStart {
message: Value,
},
MessageEnd {
message: Value,
},
MessageUpdate {
message: Value,
assistant_message_event: Value,
event_type: String,
content_index: Option<u64>,
delta: Option<String>,
},
ToolExecutionStart {
tool_call_id: String,
tool_name: String,
args: Value,
},
ToolExecutionUpdate {
tool_call_id: String,
tool_name: String,
args: Value,
partial_result: Value,
},
ToolExecutionEnd {
tool_call_id: String,
tool_name: String,
is_error: bool,
result: Value,
},
}Expand description
A fine-grained lifecycle event streamed from the server to the client.
Mirrors the shape produced by the previous hand-rolled projection in
modes.rs; kept field-for-field compatible so existing clients keep working.
Variants§
UiDialogRequest
UiDialogClosed
AgentStart
AgentEnd
RetryScheduled
TurnStart
TurnEnd
MessageStart
MessageEnd
MessageUpdate
Fields
ToolExecutionStart
ToolExecutionUpdate
ToolExecutionEnd
Implementations§
Source§impl RemoteEvent
impl RemoteEvent
Sourcepub fn type_tag(&self) -> &'static str
pub fn type_tag(&self) -> &'static str
The wire type tag (kept in sync with the serde rename_all).
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
True for the terminal AgentEnd event.
Sourcepub fn from_agent_event(event: &AgentEvent) -> Self
pub fn from_agent_event(event: &AgentEvent) -> Self
Project a process-local AgentEvent onto the wire shape.
Trait Implementations§
Source§impl Clone for RemoteEvent
impl Clone for RemoteEvent
Source§impl Debug for RemoteEvent
impl Debug for RemoteEvent
Source§impl<'de> Deserialize<'de> for RemoteEvent
impl<'de> Deserialize<'de> for RemoteEvent
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for RemoteEvent
impl PartialEq for RemoteEvent
Source§impl Serialize for RemoteEvent
impl Serialize for RemoteEvent
impl StructuralPartialEq for RemoteEvent
Auto Trait Implementations§
impl Freeze for RemoteEvent
impl RefUnwindSafe for RemoteEvent
impl Send for RemoteEvent
impl Sync for RemoteEvent
impl Unpin for RemoteEvent
impl UnsafeUnpin for RemoteEvent
impl UnwindSafe for RemoteEvent
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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