Skip to main content

Event

Enum Event 

Source
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

Fields

§profile_revision_id: String
§

SessionForked

Fields

§parent_session_id: String
§parent_seq: u64
§

SessionDeleted

Fields

§reason: String
§

InputQueued

Fields

§input_id: String
§run_id: String
§explicit_skill: Option<String>
§

InputClaimed

Fields

§input_id: String
§run_id: String
§

InputCancelled

Fields

§input_id: String
§run_id: String
§error_code: String
§

RunStarted

Fields

§run_id: String
§input_id: String
§

RunWaiting

Fields

§run_id: String
§interaction_id: String
§

RunResumed

Fields

§run_id: String
§interaction_id: String
§

RunFinished

Fields

§run_id: String
§status: RunStatus
§error_code: Option<String>
§

TurnStarted

Fields

§run_id: String
§turn: u32
§

TurnFinished

Fields

§run_id: String
§turn: u32
§

StepStarted

Fields

§run_id: String
§step: u32
§

StepFinished

Fields

§run_id: String
§step: u32
§

UserMessage

Fields

§run_id: String
§

AssistantDelta

Fields

§run_id: String
§step: u32
§attempt: u32
§content: String
§

AssistantMessage

Fields

§run_id: String
§step: u32
§attempt: u32
§

AssistantToolCalls

Fields

§run_id: String
§step: u32
§content: Option<String>
§

ToolCall

Fields

§run_id: String
§step: u32
§call_id: String
§tool: String
§arguments: Value
§

ToolAuthorization

Fields

§run_id: String
§step: u32
§call_id: String
§reason: Option<String>
§

ToolExecutionStarted

Fields

§run_id: String
§step: u32
§call_id: String
§

ToolResult

Fields

§run_id: String
§step: u32
§call_id: String
§result: Value
§is_error: bool
§

UsageRecorded

Fields

§run_id: String
§operation_id: String
§prompt_tokens: u64
§completion_tokens: u64
§cost_units: u64
§

RetryScheduled

Fields

§run_id: String
§attempt: u32
§delay_ms: u64
§reason: String
§

ModelRequestPrepared

Fields

§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

Fields

§run_id: String
§step: u32
§contribution_id: String
§source: String
§version: String
§authority: String
§form: String
§

ModelAttemptFailed

Fields

§run_id: String
§step: u32
§attempt: u32
§error: String
§retryable: bool
§

CompactionStarted

Fields

§run_id: String
§compaction_id: String
§source_through_seq: u64
§

ToolResultsPruned

Fields

§run_id: String
§call_ids: Vec<String>
§

SummaryReplaced

Fields

§run_id: String
§through_seq: u64
§summary: String
§compactor: String
§model: String
§

CompactionFinished

Fields

§run_id: String
§compaction_id: String
§status: String
§

InteractionRequested

Fields

§run_id: String
§interaction_id: String
§payload: Value
§

InteractionResolved

Fields

§run_id: String
§interaction_id: String
§payload: Value
§

ChildSessionLinked

Fields

§run_id: String
§child_session_id: String
§provider: String
§

Extension

Fields

§run_id: String
§plugin_id: String
§event_type: String
§payload: Value
§

Opaque

Fields

§format_version: u32
§event_type: String
§ignorable: bool
§payload: Value

Implementations§

Source§

impl Event

Source

pub fn format_version(&self) -> u32

Source

pub fn event_type(&self) -> &str

Source

pub fn ignorable(&self) -> bool

Trait Implementations§

Source§

impl Clone for Event

Source§

fn clone(&self) -> Event

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Event

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Event

Source§

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 Event

Source§

fn eq(&self, other: &Event) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Event

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.