/** * SQLite-based Vector Store * * Provides vector similarity search using better-sqlite3 with: * - Vector embeddings stored as BLOBs * - Cosine similarity computed in JavaScript * - Full-text search using MiniSearch (replaces FTS5 for reliability) * - Hybrid search with RRF (Reciprocal Rank Fusion) * - Automatic disk persistence * * Zero external dependencies - works immediately after npm install. */ import { IVectorStore, VectorDocument, VectorSearchResult } from '../interfaces'; import { MiniSearchTextStore } from './minisearch-text-store'; export declare class SQLiteVectorStore implements IVectorStore { private flushIntervalSeconds; private db; private textStore; private isDirty; private flushTimer; private dataDir; constructor(dataDir: string, flushIntervalSeconds?: number); private initializeSchema; private startFlushTimer; private serializeEmbedding; private deserializeEmbedding; private cosineSimilarity; upsert(doc: Omit): Promise; upsertMany(docs: Array>): Promise; searchByVector(embedding: number[], projectId: string, limit?: number): Promise; searchByText(query: string, projectId: string, limit?: number): Promise; searchHybrid(query: string, embedding: number[], projectId: string, limit?: number): Promise; deleteByProject(projectId: string): Promise; deleteByFiles(projectId: string, filePaths: string[]): Promise; delete(id: string): Promise; count(projectId: string): Promise; countFiles(projectId: string): Promise; getFileMetadata(projectId: string, filePath: string): Promise<{ fileHash: string; indexedAt: string; } | null>; getFileHashes(projectId: string): Promise>; getById(id: string): Promise; getFileEmbeddings(projectId: string, filePaths: string[]): Promise>; getFilePathsForDir(projectId: string, dirPath: string): Promise; deleteByFilePathPrefix(projectId: string, prefix: string): Promise; flush(): Promise; close(): Promise; /** * Get the underlying text store for synonym management */ getTextStore(): MiniSearchTextStore; } //# sourceMappingURL=sqlite-vector-store.d.ts.map