import type { SkipCounts } from './types.mts'; export type DiscoverOptions = { /** Root holding Claude project transcripts (`//.jsonl`). */ projectsDir: string; /** Root holding Codex rollouts (`/**\/rollout-*-.jsonl`). */ codexSessionsDir: string; /** Most-recent files kept per root, applied after repo scoping. */ maxFilesPerRoot: number; /** Drops files last modified before `now - sinceDays`, before the cap. */ sinceDays?: number; /** Clock for `sinceDays`; injected so tests use a fixed one. */ now?: number; /** * Narrows discovery to one session's transcripts. An explicit session is already an exact * target, so it bypasses repo scoping: it must never be lost to an unresolved cwd. */ sessionId?: string; /** Roots to scope discovery to. Empty means unscoped (purely mtime-ordered). */ repoRoots: string[]; }; export type DiscoveredFiles = { claudeFiles: string[]; codexFiles: string[]; skippedOtherRepo: SkipCounts; skippedUnknownCwd: SkipCounts; }; type StatEntry = { path: string; mtimeMs: number; }; type ResolveCwd = (path: string) => Promise; type SelectResult = { files: string[]; skippedOtherRepo: number; skippedUnknownCwd: number; }; /** * Walks the newest-first list resolving each file's cwd and keeping in-repo files until `limit`. * The skip counts are lower bounds, because the walk stops at `limit`. A file whose cwd cannot be * resolved is excluded (fail closed) but always counted. */ export declare function selectInRepo(entries: StatEntry[], limit: number, repoRoots: string[], resolveCwd: ResolveCwd): Promise; export declare function discoverTranscriptFiles(options: DiscoverOptions): Promise; export {};