/** * An ingested entry paired with its identity key (`realpathForMatch` of the * stored `filePath`). Only the fields the classifier reads are required, so the * caller's richer row type is consumed structurally. */ export interface KeyedIngestedEntry { entry: { filePath: string; chunkCount: number; timestamp: string; }; key: string; } /** * A classified source: a raw-data entry restored to its original `source`, or a * real-file / orphaned entry keyed by `filePath`. Structurally compatible with * the `SourceEntry` union both surfaces already return (no type-move refactor). */ export type ClassifiedSource = { source: string; chunkCount: number; timestamp: string; } | { filePath: string; chunkCount: number; timestamp: string; }; /** * Classify the ingested entries that matched no scanned file into `sources`. * * Base filter (always): keep only entries whose `key` is absent from * `matchedKeys`. * * When `scope` is present (non-empty): raw-data entries * Managed raw-data entries have no filesystem path under a base directory, so * they are always emitted regardless of scope; real-file entries are kept only * when their stored `filePath` is under scope (`matchesAnyScope`) — a real-file * entry outside scope is dropped so it appears in neither `files[]` (already * pruned from the scan) nor `sources[]` (no orphan misclassification), while an * unmatched real-file entry under scope remains an orphan source. * * When `scope` is absent (or empty): behavior is unchanged from the pre-extraction * inline block — every unmatched entry is emitted, raw-data as `{ source }` when * `extractSourceFromPath` yields one, else as `{ filePath }`. */ export declare function classifyIngestedSources(ingestedKeyed: readonly KeyedIngestedEntry[], matchedKeys: ReadonlySet, dbPath: string, scope?: string[]): ClassifiedSource[]; //# sourceMappingURL=list-sources.d.ts.map