import type { CortexStore } from '../db/store.js'; import { type RetrievedMemoryItem } from './retrieval.js'; export interface RecallOptions { /** Estimated-token cap for the rendered output; evidence drops from the bottom. */ budget?: number; /** 'scores' appends a compact per-line rank breakdown for quality debugging. */ detail?: 'none' | 'scores'; limit?: number; } export declare const DEFAULT_RECALL_BUDGET = 600; export declare function renderScoreDetail(item: RetrievedMemoryItem): string; export declare function buildLeadLine(top: RetrievedMemoryItem): string; /** * One rendered result under the budget: the line that must survive if the entry * survives at all, plus an optional lower-priority continuation. */ export interface BudgetedEvidence { line: string; /** Supporting detail, dropped before any `line` is dropped (FR-3). */ continuation?: string; } /** * Assemble lead + evidence lines under a token budget, dropping evidence from * the bottom and appending a trimmed marker. Always keeps at least one * evidence line so the budget can never silence the top result. * * Two passes, and the split is the mechanism behind FR-3's "the alternatives * line drops before the decision itself drops". Dropping from the bottom alone * would not deliver it: with `[d1, alt1, d2, alt2]` a cut landing on `d2` drops * that decision *and* its continuation together, and `alt1` has already spent * budget `d2` needed. Charging continuations only after every affordable `line` * is kept makes the guarantee hold at every budget instead of most of them. * * When no entry carries a continuation, pass two is a no-op and the output is * byte-for-byte what pass one alone produced — which is how "decisions without * alternatives render exactly as they do today" is satisfied structurally. */ export declare function assembleBudgeted(lead: string | null, evidence: BudgetedEvidence[], budget: number, trimmedHint: (dropped: number) => string): string; export declare function recall(store: CortexStore, topic: string, options?: RecallOptions): string; //# sourceMappingURL=recall.d.ts.map