/** * Memory tool handlers extracted from index.ts. * * All memory_* tools are dispatched through `handleMemoryTool`. */ import { type initMemoryDb } from "../data/memory/index.js"; import type { ToolResult } from "../lib/types.js"; /** Closure-bound helpers passed by the caller (index.ts createMcpServer). */ export interface ToolContext { resolveThreadId: (args: Record) => number | undefined; getShortReminder: (threadId: number | undefined) => string; getMemoryDb: () => ReturnType; errorResult: (msg: string) => ToolResult & { isError: true; }; /** OpenAI API key from config (used for embeddings). */ apiKey: string | undefined; /** Called when consolidation completes so the caller can update its timestamp. */ onConsolidation?: () => void; } /** * Backfill embeddings for any semantic notes that don't have them yet. * Used after consolidation to ensure all notes are searchable by embedding. */ export declare function backfillEmbeddings(db: ReturnType, apiKey?: string, threadId?: number): Promise; export declare function handleMemoryTool(name: string, args: Record, ctx: ToolContext): Promise; //# sourceMappingURL=memory-tools.d.ts.map