pub mod claude;
pub mod cursor;
pub mod normalize;
pub mod openclaw;
pub mod vibe;
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct HookEvent {
pub kind: EventKind,
pub session_id: String,
pub ts_ms: u64,
pub payload: serde_json::Value,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum EventKind {
PreToolUse,
PostToolUse,
Stop,
SessionStart,
Unknown(String),
}
impl EventKind {
pub fn parse(s: &str) -> Self {
match s {
"PreToolUse" | "pre_tool_use" => Self::PreToolUse,
"PostToolUse" | "post_tool_use" => Self::PostToolUse,
"Stop" | "stop" => Self::Stop,
"SessionStart" | "session_start" => Self::SessionStart,
other => Self::Unknown(other.to_string()),
}
}
}