/** * Transcript scanner — locates Claude session JSONL files and lists * sessions pending extraction. * * Claude stores session files at: * `~/.claude/projects//.jsonl` * * The encoded path is the project absolute path with `/` → `-`. * * Functions: * - `findSessionTranscriptPath` — locate a specific session's JSONL * - `scanPendingTranscripts` — list sessions queued for extraction * - `listAllTranscripts` — enumerate all root-level session JSONLs * * @task T732 * @epic T726 */ /** A located Claude session JSONL file. */ export interface TranscriptEntry { /** Absolute path to the JSONL file. */ path: string; /** Session UUID (filename without `.jsonl`). */ sessionId: string; /** Encoded project directory name (e.g. `-mnt-projects-cleocode`). */ projectDir: string; /** Size of the file in bytes. */ sizeBytes: number; /** Last-modified time as ISO string. */ modifiedAt: string; } /** A pending extraction record read from brain_observations. */ export interface PendingExtractionRecord { /** CLEO session ID. */ sessionId: string; /** Recorded file path (may no longer exist if already processed). */ filePath: string; /** When the record was created. */ createdAt: string; } /** * Locate the JSONL file for a specific Claude session ID. * * Searches across all project directories under `~/.claude/projects/` for a * file named `.jsonl`. Returns the absolute path or `null` if not * found. * * This is a best-effort search — if the session is a subagent transcript in a * subdirectory, it is excluded (we only process root-level sessions). * * @param sessionId - The session UUID (e.g. `77edaed6-13e5-4af1-9311-ea94eae114f9`) * @returns Absolute path to the JSONL, or null. */ export declare function findSessionTranscriptPath(sessionId: string): Promise; /** * Read pending extraction records from brain_observations. * * Returns sessions that have been queued (tombstone `transcript_pending_extraction:*`) * but not yet fully processed (no `transcript-extracted:*` tombstone). * * @param projectRoot - CLEO project root for brain.db access. * @returns Array of pending records. */ export declare function scanPendingTranscripts(projectRoot: string): Promise; /** * List all root-level Claude session JSONL files across all project directories. * * This is the discovery function for the migration command (T733). Returns * only root-level sessions (not subagent transcripts in subdirectories) sorted * by last-modified time, oldest first (migration processes oldest first). * * @param options - Optional filters. * @returns Array of transcript entries. */ export declare function listAllTranscripts(options?: { /** Only return files older than this many hours. Default: 0 (all). */ olderThanHours?: number; /** Only return files from this project directory encoding (e.g. `-mnt-projects-cleocode`). */ projectFilter?: string; /** Maximum number of entries to return. */ limit?: number; }): Promise; //# sourceMappingURL=transcript-scanner.d.ts.map