pub enum ContextEventKind {
TurnStarted,
ToolBatchDispatched {
round_id: RoundId,
calls: Vec<ToolCallPayload>,
},
TurnOutcome {
result: TurnResult,
trace: TurnTrace,
},
TextDelta {
round_id: RoundId,
delta: String,
},
ReasoningDelta {
round_id: RoundId,
delta: String,
},
ToolCallDelta {
round_id: RoundId,
call_index: usize,
name_delta: Option<String>,
arguments_delta: Option<String>,
},
}Expand description
The event payload proper. type is the snake_case discriminator on
the wire ("turn_started" / "tool_batch_dispatched" /
"turn_outcome").
Variants§
TurnStarted
The turn has begun. Emitted exactly once, first in the sequence.
ToolBatchDispatched
A batch of tool calls was dispatched for round_id. calls
carries the pre-execution payloads — the model-emitted tool
calls as committed facts, in draft order. Emitted once per round
that has a tool_batch in the trace; rounds without one
(EndTurn, MaxTokens, Refusal, compaction failure, …) produce no
dispatch event.
Fields
calls: Vec<ToolCallPayload>The pre-execution committed tool calls, in draft order.
TurnOutcome
The turn finished. result is the canonical TurnResult
(Completed | Interrupted { cause }) and trace is the full
TurnTrace (rounds, totals). Consumers can re-walk trace
for finer-grained data. Emitted exactly once, last in the
sequence.
Fields
result: TurnResultThe canonical TurnResult (Completed or Interrupted).
TextDelta
One model text increment in round round_id.
ReasoningDelta
One reasoning increment in round round_id.
ToolCallDelta
One tool-call increment in round round_id: the provider is
appending the name and/or the JSON arguments of the call at
call_index in draft order.
Fields
Trait Implementations§
Source§impl Clone for ContextEventKind
impl Clone for ContextEventKind
Source§fn clone(&self) -> ContextEventKind
fn clone(&self) -> ContextEventKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more