pub enum Event {
Show 36 variants
SessionCreated {
profile_revision_id: String,
},
SessionForked {
parent_session_id: String,
parent_seq: u64,
},
SessionDeleted {
reason: String,
},
InputQueued {
input_id: String,
run_id: String,
mode: DeliveryMode,
content: Vec<ContentBlock>,
explicit_skill: Option<String>,
},
InputClaimed {
input_id: String,
run_id: String,
},
InputCancelled {
input_id: String,
run_id: String,
error_code: String,
},
RunStarted {
run_id: String,
input_id: String,
},
RunWaiting {
run_id: String,
interaction_id: String,
},
RunResumed {
run_id: String,
interaction_id: String,
},
RunFinished {
run_id: String,
status: RunStatus,
error_code: Option<String>,
},
TurnStarted {
run_id: String,
turn: u32,
},
TurnFinished {
run_id: String,
turn: u32,
},
StepStarted {
run_id: String,
step: u32,
},
StepFinished {
run_id: String,
step: u32,
},
UserMessage {
run_id: String,
content: Vec<ContentBlock>,
},
AssistantDelta {
run_id: String,
step: u32,
attempt: u32,
content: String,
},
AssistantMessage {
run_id: String,
step: u32,
attempt: u32,
content: Vec<ContentBlock>,
},
AssistantToolCalls {
run_id: String,
step: u32,
content: Option<String>,
calls: Vec<RecordedToolCall>,
},
ToolCall {
run_id: String,
step: u32,
call_id: String,
tool: String,
arguments: Value,
},
ToolAuthorization {
run_id: String,
step: u32,
call_id: String,
status: ToolAuthorizationStatus,
reason: Option<String>,
},
ToolExecutionStarted {
run_id: String,
step: u32,
call_id: String,
},
ToolResult {
run_id: String,
step: u32,
call_id: String,
result: Value,
is_error: bool,
},
UsageRecorded {
run_id: String,
operation_id: String,
prompt_tokens: u64,
completion_tokens: u64,
cost_units: u64,
},
RetryScheduled {
run_id: String,
attempt: u32,
delay_ms: u64,
reason: String,
},
ModelRequestPrepared {
run_id: String,
step: u32,
attempt: u32,
provider_attempt_id: String,
operation_id: String,
reserved_prompt_tokens: u64,
reserved_completion_tokens: u64,
request: Value,
prompt_sections: Value,
},
ContextInjected {
run_id: String,
step: u32,
contribution_id: String,
source: String,
version: String,
authority: String,
form: String,
content: Vec<ContentBlock>,
},
ModelAttemptFailed {
run_id: String,
step: u32,
attempt: u32,
error: String,
retryable: bool,
},
CompactionStarted {
run_id: String,
compaction_id: String,
source_through_seq: u64,
},
ToolResultsPruned {
run_id: String,
call_ids: Vec<String>,
},
SummaryReplaced {
run_id: String,
through_seq: u64,
summary: String,
compactor: String,
model: String,
},
CompactionFinished {
run_id: String,
compaction_id: String,
status: String,
error: Option<String>,
},
InteractionRequested {
run_id: String,
interaction_id: String,
kind: InteractionKind,
payload: Value,
},
InteractionResolved {
run_id: String,
interaction_id: String,
resolution: InteractionResolution,
payload: Value,
},
ChildSessionLinked {
run_id: String,
child_session_id: String,
provider: String,
},
Extension {
run_id: String,
plugin_id: String,
event_type: String,
payload: Value,
},
Opaque {
format_version: u32,
event_type: String,
ignorable: bool,
payload: Value,
},
}Variants§
SessionCreated
SessionForked
SessionDeleted
InputQueued
InputClaimed
InputCancelled
RunStarted
RunWaiting
RunResumed
RunFinished
TurnStarted
TurnFinished
StepStarted
StepFinished
UserMessage
AssistantDelta
AssistantMessage
AssistantToolCalls
ToolCall
ToolAuthorization
Fields
§
status: ToolAuthorizationStatusToolExecutionStarted
ToolResult
UsageRecorded
Fields
RetryScheduled
ModelRequestPrepared
Fields
ContextInjected
ModelAttemptFailed
CompactionStarted
ToolResultsPruned
SummaryReplaced
CompactionFinished
InteractionRequested
InteractionResolved
ChildSessionLinked
Extension
Opaque
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
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
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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