/** * Crude substring-overlap scorer shared by `preloadMemoryContext` (automatic * injection) and `search_memory` (explicit query). One scorer, so the same * query against the same string scores the same on both paths — a fact visible * in the prompt that cannot be found by searching for it is the drift two * separately-maintained copies would produce. * * The two paths still *select* differently on the same scores, deliberately: * preload falls back to showing everything when nothing scores, search returns * an empty list. They also score different corpora — preload scores raw facts, * search scores flattened `key: value` entries. Shared scoring, not shared * behaviour. * * **This scorer is not a pure extraction from `preloadMemory.ts`.** It added * the prefix fallback below, which widens what preload injects — see the * changeset. That was a deliberate change, and it is called out here because a * reader who assumes "moved, unchanged" will mis-predict preload's output. */ export declare const QUERY_TOKEN_MIN_LENGTH = 4; /** Fraction of `query`'s tokens (>= QUERY_TOKEN_MIN_LENGTH chars) that appear in `text`, exactly or via a shared long prefix. */ export declare function lexicalScore(query: string, text: string): number;