/** * Helpers for loading cached graph data from the local codeprism.db * for incremental re-index (--repo flag with multi-repo workspace). * * When re-indexing a single repo, we load cached graph_edges and file_index * for the OTHER repos so cross-service card generation still sees all repos. */ import type Database from "better-sqlite3"; export interface CachedGraphEdge { source_file: string; target_file: string; relation: string; metadata: string; repo: string; } export interface CachedFileEntry { path: string; repo: string; branch: string; file_role: string; parsed_data: string; heat_score: number; updated_at: string | null; } /** * Load graph_edges for the given repos from the existing DB. * Returns edges whose `repo` column matches any of the provided repo names. */ export declare function loadCachedGraphEdges(db: Database.Database, repos: string[]): CachedGraphEdge[]; /** * Load file_index entries for the given repos from the existing DB. */ export declare function loadCachedFileIndex(db: Database.Database, repos: string[]): CachedFileEntry[]; /** * Check if cached data for a set of repos is stale (older than maxAgeDays). * Returns repo names whose most recent file_index.updated_at is beyond the threshold. */ export declare function checkCacheStaleness(db: Database.Database, repos: string[], maxAgeDays?: number): string[]; //# sourceMappingURL=cached-data.d.ts.map