pub enum EventKind {
Show 13 variants
SessionStart,
UserPromptSubmit,
PreToolUse,
PostToolUse,
PostToolUseFailure,
Stop,
SubagentStart,
SubagentStop,
PreCompact,
PostCompact,
SessionEnd,
Notification,
Other(String),
}Expand description
A hook event name. Legion’s lower-case aliases (session-start, pre-effect, …) normalize to
the host names. Unknown names are kept verbatim, never rejected.
Variants§
SessionStart
UserPromptSubmit
PreToolUse
PostToolUse
PostToolUseFailure
Stop
SubagentStart
SubagentStop
PreCompact
PostCompact
SessionEnd
Notification
Other(String)
Implementations§
Source§impl EventKind
impl EventKind
pub fn from_name(name: &str) -> Self
pub fn as_str(&self) -> &str
Sourcepub fn takes_additional_context(&self) -> bool
pub fn takes_additional_context(&self) -> bool
Events whose host schema accepts hookSpecificOutput.additionalContext in shipped
Pulse (SessionStart, UserPromptSubmit, PostToolUse). Other events would make the
host reject the whole response, so the output builders refuse them.
Trait Implementations§
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
Mutably borrows from an owned value. Read more