/** * brain-memory — Hybrid recall engine (Graph + Vector fusion) * * Combines graph-based recall (PPR + community) with vector-based recall (RRF). * Deduplicates by node ID and fuses scores for final ranking. */ import { type DatabaseSyncInstance } from "@photostructure/sqlite"; import type { BmConfig, BmNode, BmEdge } from "../types"; import type { EmbedFn } from "../engine/embed"; import type { ScopeFilter } from "../scope/isolation"; export interface HybridRecallResult { nodes: BmNode[]; edges: BmEdge[]; tokenEstimate: number; diagnostics?: { graphCount: number; vectorCount: number; overlapCount: number; fusedCount: number; }; } export declare class HybridRecaller { private db; private cfg; private graphRecaller; private vectorRecaller; constructor(db: DatabaseSyncInstance, cfg: BmConfig); setEmbedFn(fn: EmbedFn): void; recall(query: string, scopeFilter?: ScopeFilter): Promise; /** Compute RRF-based scores from rank position (K=60) */ private computeRRFScores; /** * Compute min-max normalizers for graph and vector scores. * Returns functions that map raw scores to [0,1] range, * enabling fair fusion across different score scales. */ private computeNormalization; private estimateTokens; } //# sourceMappingURL=hybrid-recall.d.ts.map