import type Database from 'better-sqlite3';
import type { VectorStore, VectorRecord, VectorSearchResult, VectorMetadata } from '../providers/vector-store.js';
/**
 * VectorStore backed by the sqlite-vec extension loaded into the shared
 * better-sqlite3 cache database.
 *
 * Storage layout (see src/cache/migrations/001-sqlite-vec.sql):
 *   - vec_documents (virtual, vec0)   integer rowid -> float[384] embedding
 *   - vec_id_map                       integer rowid -> external string id
 *   - vec_metadata                     integer rowid -> full VectorMetadata
 *
 * vec0 only accepts integer rowid values, so external string ids (URLs in
 * the legacy world) are mapped to AUTOINCREMENT rowids via vec_id_map.
 *
 * vec0 rejects `INSERT OR REPLACE`, so upsert deletes any existing vector
 * row for an id before inserting the new one (within a single transaction).
 *
 * Search returns sqlite-vec's native L2 distance converted to a similarity
 * score as `1 / (1 + distance)`. Higher score = closer match.
 *
 * Filter semantics match VectorStore: when `filter` is provided we
 * over-fetch from the KNN side (oversample = limit * 5) then post-filter
 * against vec_metadata before truncating to `limit`. Filters never relax
 * — every populated filter field must match.
 */
export declare class SqliteVecStore implements VectorStore {
    private db;
    private upsertSelectStmt;
    private upsertInsertIdMapStmt;
    private upsertDeleteDocStmt;
    private upsertInsertDocStmt;
    private upsertUpsertMetadataStmt;
    private deleteIdMapStmt;
    private deleteDocStmt;
    private sizeStmt;
    constructor(db: Database.Database);
    upsert(records: VectorRecord[]): Promise<void>;
    search(queryVector: Float32Array, limit: number, filter?: Partial<VectorMetadata>): Promise<VectorSearchResult[]>;
    delete(ids: string[]): Promise<void>;
    size(): Promise<number>;
}
//# sourceMappingURL=sqlite-vec-store.d.ts.map