pub enum SseEvent {
Message {
role: String,
content: Vec<SseContentBlock>,
},
PartialMessage {
text: String,
step: usize,
},
ToolCall {
name: String,
step: usize,
},
ToolResult {
name: String,
success: bool,
},
Done {
finish_reason: String,
total_steps: usize,
},
Error {
message: String,
},
PlanProposed {
plan: String,
},
GoalContinuing {
reason: String,
turns: u32,
},
GoalAchieved {
condition: String,
turns: u32,
},
ToolProgress {
tool_use_id: String,
tool_name: String,
elapsed_ms: u64,
},
}Expand description
Server-Sent Event payload emitted during an agent session run.
Variants§
Message
A full role-tagged message, with content broken into typed blocks.
Modeled on Claude Agent SDK’s AssistantMessage / UserMessage
streaming shape so the TS / Python SDKs can yield typed messages
without falling back to the session detail endpoint.
PartialMessage
A partial text delta during streaming. Concatenate text deltas
keyed by step to reconstruct the eventual Message::Text block.
ToolCall
A tool is being called.
ToolResult
A tool call completed.
Done
The agent run completed.
Error
An error occurred.
PlanProposed
Agent proposed a plan and is waiting for human review.
GoalContinuing
Goal-168: judge found condition not yet met; loop continues.
GoalAchieved
Goal-168: judge confirmed condition met.
ToolProgress
SDK Phase B: a tool call just completed; elapsed_ms is wall-clock time
from when the ToolCall event was received to when ToolResult arrived.
Emitted in addition to (and after) the tool_result event.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SseEvent
impl<'de> Deserialize<'de> for SseEvent
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 SseEvent
Auto Trait Implementations§
impl Freeze for SseEvent
impl RefUnwindSafe for SseEvent
impl Send for SseEvent
impl Sync for SseEvent
impl Unpin for SseEvent
impl UnsafeUnpin for SseEvent
impl UnwindSafe for SseEvent
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>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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