import type { Database } from "./database.js"; export interface EmbeddingWithMeta { chunk_id: number; vector: Float32Array; chunk_type: string; file_id: number; } export declare class EmbeddingStore { private db; private insertStmt; private getStmt; private getAllStmt; private getAllWithMetaStmt; private deleteByChunkStmt; constructor(db: Database); insert(chunkId: number, vector: Float32Array): void; get(chunkId: number): Float32Array | undefined; getAll(): Map; /** * Broadcast scan that JOINs embeddings with chunk metadata in one * SQLite query. Avoids the N+1 pattern in callers that need to * score every vector AND know each chunk's type/file_id (e.g. the * runVectorSplit code/doc split in search/investigate.ts). */ getAllWithMeta(): EmbeddingWithMeta[]; delete(chunkId: number): void; count(): number; /** * Read the dimension of one stored vector (any row). Returns null if * the table is empty. Used by sverklo doctor / status to surface * dim mismatches against the configured provider (#59 / #60). * * Cheap: SELECT … LIMIT 1, then divide blob length by 4 (Float32). */ dimensionsObserved(): number | null; }