export type SessionOutcome = 'completed' | 'interrupted' | 'error' | 'unknown' export interface SessionMeta { session_id: string project_path: string project_slug: string jsonl_path: string started_at: string ended_at: string | null duration_sec: number | null event_count: number user_messages: number assistant_msgs: number tool_calls: number first_prompt: string | null tools_used: string[] skills_invoked: string[] outcome: SessionOutcome permission_mode: string | null file_size: number indexed_at: string } export type SessionEventType = | 'user' | 'assistant' | 'system' | 'attachment' | 'permission-mode' | 'file-history-snapshot' | 'unknown' export interface SessionEvent { index: number type: SessionEventType timestamp: string | null raw: Record text: string | null tool_name: string | null tool_input: Record | null tool_result: unknown skill_invoked: string | null hook_name: string | null } export interface ParseResult { meta: SessionMeta events: SessionEvent[] }