pub enum SessionEvent {
SessionStart,
UserPromptSubmit,
PreToolUse,
PostToolUse,
Stop,
Notification(NotificationKind),
TranscriptGrew,
TranscriptDiscovered,
StreamState(SessionState),
}Expand description
A sighting of a session, from a hook event or the transcript watcher.
Drives the SessionState::for_event inference and refreshes liveness.
Serialized on the wire as part of an ObserveRequest; snake_case, with
the notification kind nested ({"notification":"permission_prompt"}).
Variants§
SessionStart
SessionStart hook.
UserPromptSubmit
UserPromptSubmit hook — a prompt was submitted.
PreToolUse
PreToolUse hook — about to run a tool.
PostToolUse
PostToolUse hook — a tool finished.
Stop
Stop hook — the turn finished.
Notification(NotificationKind)
Notification hook, classified into a NotificationKind.
TranscriptGrew
The transcript watcher saw this session’s .jsonl grow (the
“thinking-window” backstop, where no hook fires).
TranscriptDiscovered
The transcript watcher discovered a session’s .jsonl it had not seen —
a session that started before the daemon, or before hooks were installed.
StreamState(SessionState)
An authoritative state reported directly by a stream-json observer —
the omni-dev claude-wrap wrapper reading Claude’s --output-format stream-json stdout, where the exact state is first-class (init →
working, result → idle, can_use_tool → waiting-for-permission). Unlike
every other variant this is not inferred: SessionState::for_event
returns the carried state verbatim. Serialized as
{"stream_state":"waiting_for_permission"} (ADR-0057).
Trait Implementations§
Source§impl Clone for SessionEvent
impl Clone for SessionEvent
Source§fn clone(&self) -> SessionEvent
fn clone(&self) -> SessionEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SessionEvent
Source§impl Debug for SessionEvent
impl Debug for SessionEvent
Source§impl<'de> Deserialize<'de> for SessionEvent
impl<'de> Deserialize<'de> for SessionEvent
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>,
impl Eq for SessionEvent
Source§impl PartialEq for SessionEvent
impl PartialEq for SessionEvent
Source§impl Serialize for SessionEvent
impl Serialize for SessionEvent
impl StructuralPartialEq for SessionEvent
Auto Trait Implementations§
impl Freeze for SessionEvent
impl RefUnwindSafe for SessionEvent
impl Send for SessionEvent
impl Sync for SessionEvent
impl Unpin for SessionEvent
impl UnsafeUnpin for SessionEvent
impl UnwindSafe for SessionEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.