/** * Vector Storage using LanceDB * High-performance embedded vector database */ /** * Vector Document */ export interface VectorDocument { readonly id: string; readonly embedding: readonly number[]; readonly metadata: { readonly type: 'code' | 'knowledge'; readonly language?: string; readonly content?: string; readonly category?: string; readonly path?: string; readonly [key: string]: unknown; }; } /** * Vector Search Result */ export interface VectorSearchResult { readonly doc: VectorDocument; readonly similarity: number; readonly distance: number; } /** * Vector Storage Options */ export interface VectorStorageOptions { readonly dimensions: number; readonly dbPath?: string; readonly tableName?: string; } /** * Vector Storage Statistics */ export interface VectorStorageStats { readonly totalDocuments: number; readonly dimensions: number; readonly indexSize: number; } /** * Vector Storage with LanceDB */ export declare class VectorStorage { private db; private table; private dimensions; private dbPath; private tableName; private initialized; constructor(options: VectorStorageOptions); /** * Initialize the database connection */ private ensureInitialized; /** * Create table if it doesn't exist */ private ensureTable; /** * Convert VectorDocument to LanceDB record */ private docToRecord; /** * Convert LanceDB record to VectorDocument */ private recordToDoc; /** * Add document to vector storage */ addDocument(doc: VectorDocument): Promise; /** * Add multiple documents in batch */ addDocuments(docs: readonly VectorDocument[]): Promise; /** * Update document (delete + add) */ updateDocument(doc: VectorDocument): Promise; /** * Delete document */ deleteDocument(docId: string): Promise; /** * Search for similar vectors */ search(queryVector: readonly number[], options?: { readonly k?: number; readonly minScore?: number; readonly filter?: (doc: VectorDocument) => boolean; }): Promise; /** * Get document by ID */ getDocument(docId: string): Promise; /** * Get all documents */ getAllDocuments(): Promise; /** * Check if document exists */ hasDocument(docId: string): Promise; /** * Get statistics */ getStats(): Promise; /** * Clear all data */ clear(): Promise; /** * Close database connection and release resources */ close(): Promise; } //# sourceMappingURL=vector-storage.d.ts.map