/**
 * File and directory fingerprinting primitives shared by every resource
 * checker. Two-tier comparison: stat (mtime+size) first for the hot path,
 * sha256 only on miss.
 */
/** Fingerprint of a single source file. */
export interface Fingerprint {
    path: string;
    mtime: number;
    size: number;
    sha256: string;
}
export declare function sha256(content: string): string;
/** Fingerprint a single file. Returns null when the file is unreadable. */
export declare function fingerprintFile(filePath: string): Fingerprint | null;
/**
 * Fingerprint all files in a directory recursively. Returned sorted by
 * absolute path so ordering is deterministic regardless of readdir order.
 * Noise entries (see `FINGERPRINT_SKIP`) are excluded.
 */
export declare function fingerprintDir(dirPath: string): Fingerprint[];
/** Hot-path file staleness: stat-only when mtime+size match, sha256 on miss. */
export declare function isFileStale(stored: Fingerprint, currentPath: string): boolean;
/**
 * Hot-path directory staleness. Compares sorted paths first (catches add /
 * remove / rename), then stat each file (skips reads when mtime+size match),
 * sha256 only on stat mismatch.
 */
export declare function isDirStale(storedDirPath: string, storedFiles: Fingerprint[], currentDirPath: string): boolean;
/**
 * Walk a directory and return sorted absolute paths of every regular file.
 * No content reads. Uses the same FINGERPRINT_SKIP allowlist as
 * `fingerprintDir` so both produce the same path set (required for the
 * dir-stale path comparison to work).
 */
export declare function walkDirPaths(dirPath: string): string[];
/** True if two sorted-or-unsorted name sets differ. */
export declare function nameSetDiffers(a: string[], b: string[]): boolean;
