import type { IDatabaseAdapter } from '../../database/core/interfaces.js'; import type { JournalEntry } from '../../types/index.js'; import type { ProgressContext } from '../../utils/progress-utils.js'; import { type SemanticSearchResult } from './types.js'; export declare class VectorSearchManager { private dbAdapter; private modelName; private dimensions; private pipeline; private transformers; private initializationPromise; constructor(dbAdapter: IDatabaseAdapter, options?: { modelName?: string; }); /** * Get the active model name */ getModelName(): string; /** * Get the detected dimensions for the current model */ getDimensions(): number | null; /** * Check if the vector search manager is initialized */ isInitialized(): boolean; /** * Initialize the vector search manager. * This loads the huggingface transformer model and creates the virtual table. */ initialize(): Promise; private _initialize; /** * Verify the vec_journal_entries table exists and has the correct dimensions. * If the model or dimensions changed, drops the old table and creates a new one. */ private verifyAndCreateVecTable; /** * Generate an embedding for text */ generateEmbedding(text: string): Promise; addEntry(entry: JournalEntry): Promise; /** * Remove an entry from the vector index */ removeEntry(entryId: number): boolean; /** * Search for similar entries by text query */ search(query: string, limit?: number, threshold?: number, workspaceId?: string): Promise; /** * Search for similar entries using an existing entry as the query */ searchByEntryId(entryId: number, limit?: number, threshold?: number, workspaceId?: string): Promise; /** * Helper to get vector search statistics */ getStats(): { itemCount: number; dimensions: number; modelName: string; isReady: boolean; }; rebuildIndex(progress?: ProgressContext, options?: { force?: boolean; batchSize?: number; pageSize?: number; }): Promise<{ success: boolean; indexed: number; failed: number; firstError: string | null; }>; } //# sourceMappingURL=manager.d.ts.map