import { InMemoryPgVectorRagStore, type RagVectorStoreKind, type RagVectorStoreSnapshot, type RagVectorStoreUpsert } from './rag-embedding.js'; import type { RagChunkInput, RetrieveOptions, RetrieveResult } from './rag-runtime.js'; export interface LocalPersistentRagVectorStoreOptions { readonly directory: string; readonly fingerprint: string; readonly dims: number; readonly fileName?: string; /** * Open a stale-fingerprint snapshot as an empty in-memory store so callers can * rebuild it. The stale disk snapshot is preserved until the rebuild flushes. */ readonly rebuildOnFingerprintMismatch?: boolean; } /** * Directory-backed vector store for local runner-native RAG. * * This adapter is intentionally single-writer within the current process and * fails closed on incompatible snapshots. Use `upsertMany` for bulk indexing so * persistence flushes once per batch; `upsert` flushes to local disk per call. */ export declare class LocalPersistentRagVectorStoreAdapter extends InMemoryPgVectorRagStore { readonly kind: RagVectorStoreKind; private readonly filePath; private readonly lockPath; private lockFd; private closed; constructor(options: LocalPersistentRagVectorStoreOptions); upsert(chunk: RagChunkInput, vector: Float64Array, fingerprint?: string): void; upsertMany(entries: Iterable): void; clear(): void; replaceAll(entries: Iterable): void; search(query: string, queryVector: Float64Array, options?: RetrieveOptions, fingerprint?: string): RetrieveResult; snapshot(): RagVectorStoreSnapshot; close(): void; private loadFromDisk; private readSnapshotFile; private flushToDisk; private restoreSnapshot; private assertOpen; }