pub enum TurnEvent {
Show 17 variants
QueuedWorkStarted {
boundary: QueuedWorkClaimBoundary,
batch_ids: Vec<String>,
causes: Vec<TurnCause>,
},
ModelRequestStarted {
protocol_iteration: usize,
},
AssistantProseDelta {
text: String,
},
ReasoningDelta {
text: String,
},
CodeBlockStarted {
language: String,
code: String,
graph_key: Option<String>,
},
CodeBlockCompleted {
language: String,
output: String,
error: Option<String>,
success: bool,
duration_ms: u64,
tool_call_ids: Vec<String>,
graph_key: Option<String>,
},
ToolCallStarted {
call_id: Option<String>,
name: String,
args: Value,
},
ToolCallCompleted {
call_id: Option<String>,
name: String,
args: Value,
output: ToolCallOutput,
duration_ms: u64,
},
SubmittedValue {
value: Value,
},
ToolValue {
tool_name: String,
value: Value,
},
Usage {
protocol_iteration: usize,
usage: TokenUsage,
cumulative: TokenUsage,
},
ChildUsage {
session_id: String,
source: String,
model: String,
protocol_iteration: usize,
usage: TokenUsage,
cumulative: TokenUsage,
},
RetryStatus {
wait_seconds: u64,
attempt: usize,
max_attempts: usize,
reason: String,
},
PluginRuntime {
plugin_id: String,
event: PluginRuntimeEvent,
},
QueuedInputAccepted {
checkpoint: CheckpointKind,
inputs: Vec<AcceptedInjectedTurnInput>,
},
QueuedMessagesCommitted {
messages: Vec<PluginMessage>,
checkpoint: CheckpointKind,
},
Error {
message: String,
},
}Expand description
App-facing semantic event payload for a turn activity.
Unlike SessionEvent, these events are stable application signals rather
than low-level runtime/debug events. Public streams carry these payloads
inside TurnActivity so every emitted item has identity.
Variants§
QueuedWorkStarted
ModelRequestStarted
AssistantProseDelta
ReasoningDelta
CodeBlockStarted
CodeBlockCompleted
Fields
ToolCallStarted
ToolCallCompleted
SubmittedValue
ToolValue
Usage
ChildUsage
RetryStatus
PluginRuntime
QueuedInputAccepted
QueuedMessagesCommitted
Error
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TurnEvent
impl<'de> Deserialize<'de> for TurnEvent
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
Auto Trait Implementations§
impl Freeze for TurnEvent
impl RefUnwindSafe for TurnEvent
impl Send for TurnEvent
impl Sync for TurnEvent
impl Unpin for TurnEvent
impl UnsafeUnpin for TurnEvent
impl UnwindSafe for TurnEvent
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