/** @purpose Parsed data from a Claude session JSON file (sessions/PID.json). */ export type SessionJsonData = { /** @purpose Process ID of the Claude session */ pid: number; /** @purpose Unique session identifier */ sessionId: string; /** @purpose Working directory of the session */ cwd: string; /** @purpose Session start timestamp | @invariant Epoch milliseconds */ startedAt: number; }; /** * @purpose Read and parse a Claude session JSON file from ~/.claude/sessions/PID.json. * @invariant Validates presence of required fields (pid, sessionId, cwd, startedAt); returns null on missing fields. * @invariant On parse failure: error-log and return null — does not throw. * @param filePath Absolute path to the session JSON file. * @returns Parsed session data or null when file is invalid or unreadable. * @sideEffect Filesystem: readFileSync on the session JSON file. */ export declare function readSessionJson(filePath: string): SessionJsonData | null; /** * @purpose Extract session title from Claude JSONL project file. * @invariant cwd path encoding: '/' replaced with '-', leading '-' stripped — matches Claude project directory naming. * @invariant Priority: ai-title entry > first user message > 'Unknown' fallback. * @param cwd Working directory of the session. * @param sessionId Unique session identifier. * @returns Session title string; 'Unknown' when JSONL is missing or unparseable. * @sideEffect Filesystem: existsSync + readFileSync on ~/.claude/projects/.../.jsonl. */ export declare function readSessionTitle(cwd: string, sessionId: string): string; /** * @purpose Read active task title from ~/.claude/tasks// as fallback when JSONL is missing. * @invariant Returns the subject of the first in-progress task, or the first task overall. * @param sessionId Unique session identifier. * @returns Active task subject or 'Unknown' when no tasks directory exists. */ export declare function readActiveTaskTitle(sessionId: string): string;