/** * Embedding storage and cosine-similarity search for semantic notes. */ import type { Database } from "./schema.js"; import { type SemanticNote } from "./semantic-notes.js"; /** Store a pre-computed embedding vector for a semantic note. */ export declare function saveNoteEmbedding(db: Database, noteId: string, embedding: Float32Array): void; /** * Search semantic notes using embedding cosine similarity. * Returns notes sorted by similarity score, filtered by minimum threshold. */ export declare function searchByEmbedding(db: Database, queryEmbedding: Float32Array, options?: { maxResults?: number; minSimilarity?: number; skipAccessTracking?: boolean; threadId?: number; startTime?: string; endTime?: string; /** * Note IDs that receive `boostAmount` added to their raw cosine score * BEFORE the threshold cut and ranking — so a boosted note can both clear * the threshold on a near-miss and outrank an equally-similar plain note. */ boostNoteIds?: Set; boostAmount?: number; }): (SemanticNote & { similarity: number; })[]; /** Get note IDs that don't have embeddings yet (for backfill). */ export declare function getNotesWithoutEmbeddings(db: Database): { noteId: string; content: string; }[]; //# sourceMappingURL=note-embeddings.d.ts.map