import type { SemanticMemoryPort } from "../ports/brain.js";
import type { CompactionLLMFn } from "./context.js";
/**
 * Wraps a local CompactionLLMFn to additionally archive compaction summaries
 * to Brain (SemanticMemoryPort) after each compact() call.
 *
 * Brain archival is always fail-soft: if Brain is unavailable, the summary
 * is still returned to the caller — the compact never fails due to Brain.
 *
 * @param semanticMemory - Brain SemanticMemoryPort implementation
 * @param localLlmFn - Local LLM function (always called first)
 * @param sessionTag - Tag used to group summaries per session (e.g. runId)
 */
export declare function createBrainCompactionLlmFn(semanticMemory: SemanticMemoryPort, localLlmFn: CompactionLLMFn, sessionTag: string): CompactionLLMFn;
/**
 * Restore prior session context from Brain.
 * Queries Brain for recent compaction summaries tagged with sessionTag or
 * the generic "session-compaction" category. Returns a formatted string
 * suitable for injection as a system prompt prefix, or null if nothing found.
 *
 * Always fail-soft: returns null on any error.
 *
 * @param semanticMemory - Brain SemanticMemoryPort implementation
 * @param sessionTag - Tag to filter summaries (e.g. agent runId or project slug)
 * @param limit - Max number of prior summaries to include (default: 5)
 */
export declare function restoreSessionContext(semanticMemory: SemanticMemoryPort, sessionTag: string, limit?: number): Promise<string | null>;
//# sourceMappingURL=brain-connector.d.ts.map