/**
 * Session catalog index — persistent metadata index for faster session search.
 * Index file: ~/.owlcoda/sessions/.index.json
 */
import type { SessionMeta } from './sessions.js';
interface CatalogIndex {
    version: 1;
    builtAt: string;
    entries: Record<string, SessionMeta>;
}
/**
 * Build or rebuild the full catalog index by scanning all session files.
 */
export declare function buildIndex(): Promise<CatalogIndex>;
/**
 * Load index from disk if available and not stale.
 */
export declare function loadIndex(): Promise<CatalogIndex>;
/**
 * Update a single entry in the index.
 */
export declare function updateIndexEntry(id: string, meta: SessionMeta): Promise<void>;
/**
 * Remove an entry from the index.
 */
export declare function removeIndexEntry(id: string): Promise<void>;
/**
 * Search index by metadata fields (fast — no file I/O per session).
 */
export declare function searchIndex(query: string, limit?: number): Promise<SessionMeta[]>;
/**
 * Get all entries from the index as sorted array.
 */
export declare function getAllIndexed(limit?: number): Promise<SessionMeta[]>;
/**
 * Get index stats.
 */
export declare function getIndexStats(): Promise<{
    count: number;
    builtAt: string;
}>;
/**
 * Clear cached index (for testing).
 */
export declare function clearIndexCache(): void;
export {};
