/** * Catalog State Management - Handles monotonic tracking for downgrade detection */ import { CatalogState, CatalogCache } from '../types.js'; /** * Get snapshot file path by hash */ export declare function getSnapshotPath(hash: string): string; /** * Load catalog state from disk */ export declare function loadCatalogState(catalogUrl: string): Promise; /** * Save catalog state to disk */ export declare function saveCatalogState(state: CatalogState): Promise; /** * Save snapshot to disk (by content hash) */ export declare function saveSnapshot(hash: string, cache: CatalogCache): Promise; /** * Load snapshot from disk (by content hash) */ export declare function loadSnapshot(hash: string): Promise; /** * Check if a snapshot time is older than the latest seen */ export declare function isOlderSnapshot(snapshotTime: string, latestSeenTime: string | null): boolean; /** * Update the monotonic tracking with a new snapshot */ export declare function updateMonotonicTracking(state: CatalogState, snapshotHash: string, snapshotTime: string): CatalogState; /** * Load monotonic tracking (persisted separately from clearable cache) */ export declare function loadMonotonicTracking(): Promise<{ latestSeenHash: string | null; latestSeenTime: string | null; }>; /** * Save monotonic tracking (persisted separately for security) */ export declare function saveMonotonicTracking(data: { latestSeenHash: string | null; latestSeenTime: string | null; }): Promise; /** * Clear all catalog state and snapshots * NOTE: Does NOT clear monotonic tracking to prevent downgrade attacks */ export declare function clearCatalogState(): Promise; /** * List cached snapshot hashes */ export declare function listCachedSnapshots(): Promise; //# sourceMappingURL=state.d.ts.map