/** * Local file-based cache for agent content. * * Default location: ~/.cursell/cache/agents/.json * Each entry includes metadata (version, sizeTag) + full content. * Version checking: if the hub reports a newer version, the cache is stale. * * The cache directory is injectable for testing. */ export interface CachedAgent { slug: string; name: string; version: string; sizeWords: number; sizeTag: "lightweight" | "medium" | "large"; content: string; cachedAt: string; category?: string; description?: string; /** * Visibility at the time of caching. Required for offline fallback to know * whether content can be safely served without re-checking auth. Optional * here so cache files written by older builds don't fail to parse — but * such entries are treated as private (the safe default) at offline time. */ visibility?: "public" | "private"; } export interface CacheStats { totalAgents: number; agents: Array<{ slug: string; name: string; version: string; sizeTag: string; cachedAt: string; }>; } export declare function createCache(cacheDir?: string): { getCached: (slug: string) => Promise; putCache: (agent: CachedAgent) => Promise; getCacheStats: () => Promise; };