import { type SessionTranscriptOptions } from './transcript.js'; export type TimelineKindFilter = 'all' | 'tools' | 'turns' | 'compactions'; export type ToolStatus = 'completed' | 'failed' | 'incomplete'; export interface SessionTimelineOptions extends SessionTranscriptOptions { kind?: TimelineKindFilter; tool?: string; namespace?: string; status?: ToolStatus; minDurationMs?: number; sort?: 'chronological' | 'duration'; offset?: number; limit?: number; } interface EventLocation { line_number: number; timestamp: string | null; } export interface TimelineToolEvent extends EventLocation { kind: 'tool'; name: string | null; namespace: string | null; call_id: string | null; status: ToolStatus; result_line_number: number | null; completed_at: string | null; duration_ms: number | null; exit_code: number | null; } export type SessionTimelineEvent = TimelineToolEvent | (EventLocation & ({ kind: 'turn_start' | 'turn_complete' | 'turn_aborted'; turn_id: string | null; } | { kind: 'compaction'; } | { kind: 'orphan_output'; call_id: string | null; status: 'completed' | 'failed'; exit_code: number | null; })); export interface TimelineToolSummary { name: string | null; namespace: string | null; calls: number; completed: number; failed: number; incomplete: number; measured_calls: number; total_duration_ms: number | null; max_duration_ms: number | null; } export interface SessionTimelineReport { schema_version: 1; session_id: string; archived: boolean; started_at: string | null; last_activity_at: string | null; duration_ms: number | null; privacy: { mode: 'metadata-only'; excludes: string[]; }; summary: { events: number; tool_calls: number; completed: number; failed: number; incomplete: number; orphan_outputs: number; turns_started: number; turns_completed: number; turns_aborted: number; compactions: number; tools: TimelineToolSummary[]; }; diagnostics: { malformed_records: number; invalid_timestamps: number; reversed_tool_timestamps: number; ambiguous_call_ids: number; }; selection: { kind: TimelineKindFilter; tool: string | null; status: ToolStatus | null; min_duration_ms: number | null; sort: 'chronological' | 'duration'; offset: number; limit: number; matched_events: number; has_more: boolean; namespace: string | null; }; events: SessionTimelineEvent[]; } export declare function buildSessionTimeline(options: SessionTimelineOptions): Promise; export {}; //# sourceMappingURL=timeline.d.ts.map