pub enum EventKind {
Show 25 variants
Any,
RunStarted,
ContextBuilt,
ModelStarted,
TextDelta,
ToolCallStarted,
ToolCallDelta,
ToolCallCompleted,
ToolExecutionStarted,
ToolExecutionFinished,
AssistantMessageCommitted,
ToolMessageCommitted,
UsageRecorded,
CacheMetrics,
RunCompleted,
RunFailed,
RunCancelled,
DoomLoopDetected,
CompactionCircuitOpened,
ChatStarted,
ChatTextDelta,
ChatToolCallStarted,
ChatToolCallArgumentsDelta,
ChatToolCallCompleted,
ChatFinished,
}Expand description
Kind of event a caller can subscribe to via RuntimeInvocation::on.
Variants are partitioned into agent-runtime events (mirroring AgentEvent)
and chat-stream events (mirroring ChatStreamEvent). EventKind::Any
matches every event.
Variants§
Any
Matches any event.
RunStarted
Agent run started.
ContextBuilt
Context built.
ModelStarted
Model call started.
TextDelta
Text delta from model.
ToolCallStarted
Tool call started.
ToolCallDelta
Tool call arguments delta.
ToolCallCompleted
Tool call completed.
ToolExecutionStarted
Tool execution started.
ToolExecutionFinished
Tool execution finished.
AssistantMessageCommitted
Assistant message committed to store.
ToolMessageCommitted
Tool message committed to store.
UsageRecorded
Usage recorded.
CacheMetrics
Prompt cache metrics from a single model call.
RunCompleted
Run completed successfully.
RunFailed
Run failed.
RunCancelled
Run cancelled.
DoomLoopDetected
Doom loop detected.
CompactionCircuitOpened
Compaction circuit breaker opened.
ChatStarted
Chat stream started.
ChatTextDelta
Chat stream text delta.
ChatToolCallStarted
Chat stream tool call started.
ChatToolCallArgumentsDelta
Chat stream tool call arguments delta.
ChatToolCallCompleted
Chat stream tool call completed.
ChatFinished
Chat stream finished.
Implementations§
Source§impl EventKind
impl EventKind
Sourcepub fn matches_agent(self, event: &AgentEvent) -> bool
pub fn matches_agent(self, event: &AgentEvent) -> bool
Returns true when event matches this kind.
Sourcepub fn matches(self, event: &InvocationEvent) -> bool
pub fn matches(self, event: &InvocationEvent) -> bool
Returns true when event matches this kind.
Trait Implementations§
impl Copy for EventKind
impl Eq for EventKind
impl StructuralPartialEq for EventKind
Auto Trait Implementations§
impl Freeze for EventKind
impl RefUnwindSafe for EventKind
impl Send for EventKind
impl Sync for EventKind
impl Unpin for EventKind
impl UnsafeUnpin for EventKind
impl UnwindSafe for EventKind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.