/**
 * A file entry in the flat in-memory index.
 */
export interface FileEntry {
    /** Path relative to project root, using forward slashes. */
    path: string;
    /** Estimated LLM token count. */
    tokens: number;
}
/**
 * ProjectIndex — In-memory project file index with token counts.
 *
 * Singleton per process. Loaded at startup from disk in the background.
 * Mutations are debounced: flush happens 5 seconds after last write.
 *
 * Disk format: v4 tree (see DiskFormat above).
 */
export declare class ProjectIndex {
    private readonly indexPath;
    private readonly projectRoot;
    readonly baseDir: string;
    private files;
    private flushTimer;
    private createdAt;
    private loaded;
    constructor(baseDir: string);
    /**
     * Load the index from disk.
     * Non-blocking: called at startup, safe to call multiple times.
     */
    load(): Promise<void>;
    /**
     * Flush to disk immediately, bypassing debounce.
     */
    forceFlush(): Promise<void>;
    getFiles(): FileEntry[];
    getFile(path: string): FileEntry | null;
    getFilesByPrefix(prefix: string): FileEntry[];
    /** Return count of files by extension (e.g. { ts: 42, json: 5 }). */
    getTypeCounts(): Record<string, number>;
    getTotalTokens(): number;
    /**
     * Insert or update a file entry.
     * If tokens is not provided, attempts to estimate from disk.
     */
    upsertFile(path: string, tokens?: number): void;
    /**
     * Touch an existing file entry (update token count from disk if possible).
     * No-op if file not in index.
     */
    touchFile(path: string): void;
    removeFile(path: string): void;
    private normalizePath;
    dispose(): Promise<void>;
    private scheduleFlush;
    private flush;
}
//# sourceMappingURL=project-index.d.ts.map