/** * Reflective memory. When a user accepts or rejects an optimization via * save_outcome, we extract atomic facts from the interaction and write * them back to memory — so future optimizations are informed by accumulated * evidence of what works and what doesn't. * * Synchronous on purpose: the user's save_outcome call waits for extraction * to complete. In practice this is 1–3 seconds on a local LLM; an acceptable * tax for memory that's actually up-to-date when the next optimize fires. */ import type { Verdict } from './types.js'; export interface ReflectionResult { optimizationId: string; verdict: Verdict; factsExtracted: number; factsInvalidated: number; source: 'llm' | 'skipped'; notes?: string; } /** Wrap a single reflection run. Failures are non-fatal. */ export declare function reflectOnOutcome(args: { optimizationId: string; sessionId: string; verdict: Verdict; diff?: string; }): Promise;