/** * PgVectorProvider - Postgres + pgvector implementation of MemoryProvider */ import { MemoryProvider, MemoryChunk, IngestResult, SearchResult, ProjectInfo } from './memory-provider.interface.js'; export declare class PgVectorProvider implements MemoryProvider { private pool; private embedding; private chunking; private categoryInference; private cache?; constructor(databaseUrl?: string, redisUrl?: string); /** * Generate SHA256 hash of text for deduplication */ private hashContent; /** * Get or create project by root_path */ private getOrCreateProject; /** * Ingest text content into vector store */ ingest(project_root: string, path: string, text: string, meta?: Record): Promise; /** * Search for similar chunks with filters * * Uses hybrid search combining: * - Vector similarity (semantic search) - 60% * - BM25 text search (keyword matching) - 30% * - Time decay (recency boost) - 10% * * Plus outcome bonus: +10% for success outcomes */ search(project_root: string | null, query: string, k?: number, global?: boolean, component?: string, category?: string, tags?: string[]): Promise; /** * Calculate outcome bonus based on metadata * +10% for success outcomes, -5% for failures, 0% otherwise */ private calculateOutcomeBonus; /** * Delete all chunks for a specific path */ deleteByPath(project_root: string, path: string): Promise<{ deleted: number; }>; /** * Reindex entire project (delete all + re-ingest) */ reindexProject(project_root: string): Promise<{ indexed: number; }>; /** * List all indexed projects with stats */ listProjects(): Promise; /** * Record feedback on memory helpfulness */ recordFeedback(chunk_id: number, helpful: boolean, context?: string | null): Promise; /** * Get top helpful memories across projects */ getTopHelpfulMemories(limit?: number): Promise; /** * Get cache metrics (if cache enabled) */ getCacheMetrics(): import("../services/redis-cache.service.js").CacheMetrics | undefined; /** * Close database connection pool and Redis connection */ close(): Promise; } //# sourceMappingURL=pgvector.provider.d.ts.map