/** * transcript-reader.ts * * Reads Claude Code session transcripts (.jsonl files) from disk. * Uses head+tail strategy so it handles 100MB+ files without loading them fully. * * Discovery order: * 1. File paths in tool calls → project slug (most reliable) * 2. First real user message → task description * 3. Recent tail exchanges → what was accomplished */ export interface SessionInfo { /** Absolute path to the .jsonl file */ file: string; /** UUID from the filename */ sessionId: string; /** File size in MB */ sizeMb: number; /** Last write time */ lastModified: Date; /** Best-guess project slug from file path patterns (e.g. "cdance-eu") */ projectGuess: string | null; /** cwd field from first record (usually just home dir) */ cwdGuess: string | null; /** First non-system user message (<300 chars) */ firstUserMessage: string | null; /** Last N user+assistant exchanges formatted as text, for agent summarization */ recentExchanges: string; } /** A parsed session plus its verbatim head+tail bytes (the lossless dump). */ export interface TranscriptByPath extends SessionInfo { /** head + "\n…\n" + tail of the transcript, capped at ~80KB. */ rawTail: string; } /** * Wave 2: parse a SINGLE transcript by its absolute path (from the Stop hook's * `transcript_path`), reusing the same head/tail reader as readTodaySessions — * no second reader. Returns the parsed SessionInfo PLUS a verbatim `rawTail` * for the lossless archive tier. Returns null if the path is missing/unreadable. */ export declare function readTranscriptByPath(filePath: string): TranscriptByPath | null; /** * Locate and parse all Claude Code sessions modified today. * * @param claudeDir Directory containing the .jsonl files. * Defaults to ~/.claude/projects/-Users-{username} */ export declare function readTodaySessions(claudeDir?: string): SessionInfo[]; //# sourceMappingURL=transcript-reader.d.ts.map