/** * Claude Code session reader * * Reads Claude Code's sessions-index.json and individual .jsonl session files * to extract session metadata and last assistant responses. */ /** Entry in Claude Code's sessions-index.json */ export interface SessionIndexEntry { sessionId: string; firstPrompt: string; modified: string; messageCount: number; gitBranch: string; isSidechain: boolean; fullPath: string; } /** * Load the session index for a project directory. * * Reads ~/.claude/projects/{encoded-path}/sessions-index.json, * filters out sidechain sessions, and sorts by modified descending. */ export declare function loadSessionIndex(projectDir: string): SessionIndexEntry[]; /** * Extract the last assistant text response from a session JSONL file. * * Reads the file and scans from the end to find the last `type: "assistant"` * record with a text content block. Returns the truncated text. */ export declare function extractLastAssistantResponse(sessionFilePath: string, maxLength: number): string | null; //# sourceMappingURL=session-reader.d.ts.map