/** One completed index: when, and the workspace fingerprint it saw. */ export interface CursorEntry { at: number; fp?: string; } /** workspace path → the last COMPLETED index. */ export type CodeIndexCursor = Record; export declare function readCursor(): CodeIndexCursor; /** Record a COMPLETED index. Never called for a failure — see the header. */ export declare function noteIndexed(workspace: string, now?: number, fp?: string | null): void; /** * What the code in a git workspace is right now: HEAD, plus each changed or * untracked file with its size and mtime, plus the collector's own version so * a new result format rescans everything. Null when the workspace is not a git * repository or git does not answer; such a workspace is scanned every pass. */ export declare function workspaceFingerprint(workspace: string, collectorVersion: number): string | null; /** An unchanged workspace is still sent again after this long. The collector * cannot see the server's copy, and a server that lost it gets it back. */ export declare const UNCHANGED_RESEND_MS: number; /** True when the last completed index saw this same fingerprint recently. */ export declare function isUnchangedSinceIndexed(workspace: string, fp: string | null, cursor: CodeIndexCursor, now?: number): boolean; /** * Order workspaces least-recently-indexed first, so a sweep that keeps getting * interrupted still eventually covers everything. * * Never-indexed workspaces sort before indexed ones — a repo the collector has * never looked at is more valuable than refreshing one done an hour ago. Ties * keep the caller's order, which is recency, so a first run behaves exactly as * it did before this existed. */ export declare function orderByStaleness(workspaces: string[], cursor?: CodeIndexCursor): string[]; /** Drop entries for paths that are no longer candidates. */ export declare function pruneCursor(known: string[]): void; //# sourceMappingURL=code-index-cursor.d.ts.map