/** * `/recall` — cross-session search. * * Distinct from `/search`, which scans only the *current* session's * messages. `/recall` scans every saved session in the active scope * (project sessions under `/.codeep/sessions/` when in a * project, else global `~/.codeep/sessions/`) and surfaces the ones * that match — ranked by how many query terms hit, boosted by recency. * * No FTS index / SQLite dependency: sessions are JSON files, and for * the realistic case (tens to low-hundreds of sessions) an in-memory * scan is fast and dependency-free. If a power user accumulates * thousands of sessions and this gets slow, the natural upgrade is a * cached FTS5 index — but that's premature today. */ import { type SessionInfo } from '../config/index.js'; export interface RecallMatch { session: SessionInfo; /** Composite relevance: term-hit count + recency boost. */ score: number; /** Context snippet from the best-matching message. */ snippet: string; /** How many messages in the session matched at least one term. */ matchedMessages: number; } /** * Search saved sessions for the query. A session matches only if EVERY * query term appears somewhere in its non-system messages (AND * semantics — narrows results to genuinely relevant sessions rather * than any-term noise). Returns up to `limit` matches, best first. */ export declare function recallSessions(query: string, projectPath?: string, limit?: number): RecallMatch[]; /** * LLM-summarize what was accomplished across the matching sessions. * Loads each match's history, builds a compact multi-session transcript, * and asks the model for a short "here's what you did" paragraph. Used * by `/recall --summarize`. Returns null on chat failure. */ export declare function summarizeRecall(query: string, matches: RecallMatch[], projectPath?: string): Promise; /** Render recall results as a Markdown block for TUI / ACP display. */ export declare function formatRecall(query: string, matches: RecallMatch[]): string;