/** * Transcript Parser for Claude JSONL files * * Parses Claude's conversation transcript files (~/.claude/projects/.../session.jsonl) * and converts them to a format suitable for display in the dashboard. */ import { Effect } from "effect"; export interface ChatMessage { role: "user" | "assistant" | "system"; content: string | unknown; type?: "tool_use" | "tool_result" | "text" | "thinking"; tool_name?: string; timestamp?: string; } /** * Validate that a transcript path is under an allowed directory. * Prevents arbitrary file reads via path traversal. * * Allowed directories: ~/.claude/ and any .tx/ directory. */ export declare const isAllowedTranscriptPath: (filePath: string) => boolean; /** * Parse a Claude transcript JSONL file and extract conversation messages */ export declare const parseTranscript: (path: string) => Effect.Effect; /** * Check if a transcript file exists */ export declare const transcriptExists: (path: string) => boolean; /** * Find a transcript file that matches a run's time window. * Looks in ~/.claude/projects// for JSONL files modified during the run. * * @param cwd - The working directory (used to find Claude's project directory) * @param startedAt - When the run started * @param endedAt - When the run ended (optional, uses now if not set) * @returns Path to the matching transcript, or null if none found */ export declare const findMatchingTranscript: (cwd: string, startedAt: Date, endedAt?: Date | null) => Promise; //# sourceMappingURL=transcript-parser.d.ts.map