UNPKG

@dollhousemcp/mcp-server

Version:

DollhouseMCP - A Model Context Protocol (MCP) server that enables dynamic AI persona management from markdown files, allowing Claude and other compatible AI assistants to activate and switch between different behavioral personas.

67 lines 1.84 kB
/** * Persistent cache for collection data to support offline/anonymous browsing */ import { IFileOperationsService } from '../services/FileOperationsService.js'; export interface CollectionItem { name: string; path: string; sha: string; content?: string; last_modified?: string; } export interface CollectionCacheEntry { items: CollectionItem[]; timestamp: number; etag?: string; } /** * Persistent cache for collection data that supports offline browsing */ export declare class CollectionCache { private cacheDir; private cacheFile; private readonly CACHE_TTL_MS; private readonly fileOperations; constructor(fileOperations: IFileOperationsService, baseDir?: string); /** * Initialize cache directory */ private ensureCacheDir; /** * Load collection data from persistent cache */ loadCache(): Promise<CollectionCacheEntry | null>; /** * Save collection data to persistent cache */ saveCache(items: CollectionItem[], etag?: string): Promise<void>; /** * Search cached collection items with fuzzy matching */ searchCache(query: string): Promise<CollectionItem[]>; /** * Normalize search terms for better matching (handles spaces, dashes, etc.) */ private normalizeSearchTerm; /** * Get cached collection items by type/path */ getItemsByPath(pathPrefix: string): Promise<CollectionItem[]>; /** * Check if cache exists and is valid */ isCacheValid(): Promise<boolean>; /** * Clear the cache */ clearCache(): Promise<void>; /** * Get cache stats for debugging */ getCacheStats(): Promise<{ itemCount: number; cacheAge: number; isValid: boolean; }>; } //# sourceMappingURL=CollectionCache.d.ts.map