/** * Catalog Client - Read-only, fail-closed catalog consumption * Implements hardened catalog discovery with: * - Infinite TTL (no auto-expiry) * - One-shot miss refresh (bounded) * - Downgrade detection * - Strict network boundaries * - Audit logging */ import { CatalogPointer, CatalogSnapshot, CatalogEntry, CatalogCache, RefreshResult } from '../types.js'; export declare class CatalogClient { private readonly catalogUrl; private state; constructor(catalogUrl: string); /** * Load state from disk */ private loadState; /** * Save state to disk */ private saveState; /** * Fetch JSON from URL with ETag support */ private fetchJson; /** * Fetch catalog index */ fetchIndex(): Promise; /** * Fetch catalog snapshot */ fetchSnapshot(snapshotId: string): Promise; /** * Explicit refresh - fetch latest catalog and update cache * This is the primary refresh mechanism */ refresh(): Promise; /** * One-shot miss refresh - bounded single attempt on plugin not found * Returns the result with whether plugin was found after refresh */ oneShotMissRefresh(pluginName: string): Promise<{ refreshed: boolean; oldHash: string | null; newHash: string | null; found: boolean; entry: CatalogEntry | null; }>; /** * Get cached snapshot (no network) */ getCachedSnapshot(): Promise; /** * Get current cache info */ getCurrentCache(): Promise; /** * Get detailed status */ getStatus(): Promise<{ hasCachedCatalog: boolean; snapshotId: string | null; snapshotHash: string | null; fetchedAt: string | null; entryCount: number; schemaVersion: number | null; catalogUrl: string; latestSeenHash: string | null; latestSeenTime: string | null; cachedSnapshots: string[]; }>; /** * Clear cache */ clearCache(): Promise; /** * Find entry by name in current cache */ findEntry(name: string): Promise; /** * Check if cache exists */ hasCache(): Promise; } export declare const MESSAGES: { pluginNotFoundOffline: (name: string, hash: string) => string; pluginNotFoundAfterRefresh: (name: string, oldHash: string, newHash: string) => string; pluginFoundAfterRefresh: (name: string, oldHash: string, newHash: string, version: string) => string; schemaUnsupported: (version: number) => string; networkFailureWithCache: (reason: string, hash: string) => string; networkFailureNoCache: (reason: string) => string; catalogUpToDate: (hash: string) => string; catalogUpdated: (oldHash: string | null, newHash: string, count: number, schemaVersion: number) => string; }; //# sourceMappingURL=client.d.ts.map