/** * Hybrid semantic recall — merges FTS keyword results with vector KNN using * reciprocal-rank fusion, then applies the trust (status) penalty so VERIFIED * memories outrank STALE ones regardless of similarity. * * Degrades gracefully: no provider / no vec extension → plain FTS search. */ import type { MemoryStore } from "../db/store.js"; import type { MemoryEntry, MemorySearchOptions } from "../types.js"; import { type EmbeddingProvider } from "./provider.js"; /** Embed and index one memory (call after write/approve). No-op without a provider. */ export declare function indexMemory(store: MemoryStore, entry: MemoryEntry): Promise; /** Backfill embeddings for all memories missing one. Returns count indexed. */ export declare function reindexAll(store: MemoryStore): Promise<{ indexed: number; provider: EmbeddingProvider | null; }>; /** Hybrid search: FTS + KNN fused, status-aware. Falls back to FTS-only. */ export declare function hybridSearch(store: MemoryStore, opts: MemorySearchOptions): Promise<{ results: MemoryEntry[]; semantic: boolean; }>;