import { CacheEntry, SemanticMatch } from '../types'; /** * Subconscious Semantic Engine * Provides semantic caching using ChromaDB and Ollama embeddings * Implements the "short-circuit" logic for instant task resolution */ export declare class SubconsciousEngine { private client; private collection; private isInitialized; private cacheHits; private cacheMisses; private dashboardWebSocket; constructor(); /** * Initialize the engine and create/get collection */ initialize(): Promise; /** * Link dashboard websocket server for emitting cache events */ setDashboardWebSocket(server: any): void; /** * Generate embedding using Ollama */ private generateEmbedding; /** * Search for semantically similar cached responses * Returns the best match if similarity exceeds threshold */ search(query: string): Promise; /** * Store a new response in the semantic cache */ store(entry: CacheEntry): Promise; /** * Prune old entries if cache exceeds max size */ private pruneIfNeeded; /** * Get cache statistics */ getStats(): { cacheHits: number; cacheMisses: number; totalQueries: number; hitRate: string; }; /** * Return cache entries for dashboard reporting. */ getCacheEntries(limit?: number): Promise<{ queryHash: string; query: string; hitCount: any; totalTokens: any; costSaved: number; lastHit: string; }[]>; /** * Get total cached entry count. */ getCacheCount(): Promise; /** * Record a cache hit in the stored metadata. */ private recordCacheHit; /** * Clear all cache entries */ clear(): Promise; /** * Shutdown the engine */ shutdown(): Promise; } //# sourceMappingURL=SubconsciousEngine.d.ts.map