import { type MetadataFilter } from "../retrieval/filter.js"; import type { IndexMetadata, StoredChunk } from "../types.js"; import type { IndexedChunk, VectorSearchHit, VectorStore } from "./base.js"; /** * Simple in-memory vector store with JSON persistence. * * - Vectors are assumed to be L2-normalized by the embedder, so * similarity is a plain dot product (== cosine similarity). * - Each store lives in its own namespaced directory, so two * `Document` instances cannot collide. */ export declare class MemoryVectorStore implements VectorStore { readonly namespace: string; private readonly storeDir; private readonly chunksPath; private readonly metadataPath; private chunks; constructor(storeDir: string, namespace: string); load(): Promise; reset(): Promise; add(chunks: StoredChunk[]): Promise; search(embedding: number[], topK: number, filter?: MetadataFilter): Promise; count(): number; listChunks(): Promise; saveIndexMetadata(metadata: IndexMetadata): Promise; readIndexMetadata(): Promise; private persist; }