import { EventEmitter } from 'events'; import { Embeddings } from './embeddings.js'; export interface SearchHit { id: string; score: number; text: string; metadata?: Record; } export interface IndexStats { count: number; shards: number; avgNeighbors: number; ollamaModel: string | null; ollamaPullState: 'idle' | 'pulling' | 'complete' | 'failed'; approxBytes: number; } export declare class EmbeddingsV2 extends EventEmitter { private docs; private entryPoint; private nextShard; private currentShardBytes; private initialized; private pullState; private readonly embeddings; private readonly M; private readonly efConstruct; private readonly efSearch; constructor(opts?: { embeddings?: Embeddings; M?: number; efConstruct?: number; efSearch?: number; }); init(): Promise; /** Index a document. Replaces any prior doc with the same id. */ addDocument(id: string, text: string, metadata?: Record): Promise; /** Approximate top-K nearest neighbors by cosine similarity. */ search(query: string, topK?: number): Promise; /** Remove a document from the index. */ delete(id: string): Promise; count(): number; stats(): IndexStats; flush(): Promise; private linkNode; private detachNode; private greedySearch; private dotById; private loadShards; private pickShardFor; private shardCount; private persistShard; private shardBytes; private approxBytes; private maybeAutoPull; } export declare function getEmbeddingsV2(): EmbeddingsV2; export declare function resetEmbeddingsV2ForTests(): void; //# sourceMappingURL=embeddings-v2.d.ts.map