pub enum ExtensionEventName {
Show 29 variants
Startup,
Input,
BeforeAgentStart,
Context,
AgentStart,
AgentEnd,
TurnStart,
TurnEnd,
MessageStart,
MessageUpdate,
MessageEnd,
ToolExecutionStart,
ToolExecutionUpdate,
ToolExecutionEnd,
ToolCall,
ToolResult,
SessionStart,
SessionBeforeSwitch,
SessionSwitch,
SessionBeforeFork,
SessionFork,
SessionBeforeCompact,
SessionCompact,
ResourcesDiscover,
ModelSelect,
UserBash,
SessionBeforeTree,
SessionTree,
SessionShutdown,
}Expand description
Event names for the extension lifecycle.
Variants§
Startup
Agent startup (once per session).
Input
Input from the user.
BeforeAgentStart
Before the agent starts processing.
Context
Before provider call; can modify context messages.
AgentStart
Agent started processing.
AgentEnd
Agent ended processing.
TurnStart
Turn lifecycle start.
TurnEnd
Turn lifecycle end.
MessageStart
Message lifecycle start.
MessageUpdate
Message lifecycle update (assistant streaming).
MessageEnd
Message lifecycle end.
ToolExecutionStart
Tool execution start.
ToolExecutionUpdate
Tool execution update.
ToolExecutionEnd
Tool execution end.
ToolCall
Tool call (pre-exec; can block).
ToolResult
Tool result (post-exec; can modify).
SessionStart
Session start.
SessionBeforeSwitch
Session before switch.
SessionSwitch
Session switched.
SessionBeforeFork
Session before fork.
SessionFork
Session forked.
SessionBeforeCompact
Session before compact.
SessionCompact
Session compacted.
ResourcesDiscover
Resource discovery request.
ModelSelect
Model selection changed.
UserBash
User-initiated bash command.
SessionBeforeTree
Session before tree view.
SessionTree
Session tree navigation.
SessionShutdown
Session shutdown.
Implementations§
Source§impl ExtensionEventName
impl ExtensionEventName
Sourcepub const fn is_informational(self) -> bool
pub const fn is_informational(self) -> bool
Returns true for fire-and-forget lifecycle/telemetry events where
the dispatcher doesn’t consume the handler’s response to block,
cancel, or transform anything.
The per-extension deadline for these events is
EXTENSION_INFO_EVENT_TIMEOUT_MS so one deadlocked extension on
an info-only hook can’t stall the agent for the full
EXTENSION_EVENT_TIMEOUT_MS.
Actionable events (not listed here) still use the longer
budget so handlers have room to do meaningful work before a
decision is made:
BeforeAgentStart, Context, ToolCall, ToolResult (can
modify the tool’s result payload), Input,
SessionBeforeSwitch, SessionBeforeFork, SessionBeforeCompact,
SessionBeforeTree, ResourcesDiscover.
Sourcepub const fn default_timeout_ms(self) -> u64
pub const fn default_timeout_ms(self) -> u64
Deadline this event should be dispatched with when no explicit
caller-provided timeout is in play. See Self::is_informational.
Trait Implementations§
Source§impl Clone for ExtensionEventName
impl Clone for ExtensionEventName
Source§fn clone(&self) -> ExtensionEventName
fn clone(&self) -> ExtensionEventName
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExtensionEventName
impl Debug for ExtensionEventName
Source§impl Display for ExtensionEventName
impl Display for ExtensionEventName
Source§impl PartialEq for ExtensionEventName
impl PartialEq for ExtensionEventName
impl Copy for ExtensionEventName
impl Eq for ExtensionEventName
impl StructuralPartialEq for ExtensionEventName
Auto Trait Implementations§
impl Freeze for ExtensionEventName
impl RefUnwindSafe for ExtensionEventName
impl Send for ExtensionEventName
impl Sync for ExtensionEventName
impl Unpin for ExtensionEventName
impl UnsafeUnpin for ExtensionEventName
impl UnwindSafe for ExtensionEventName
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more