import type { AgentLoopEvent } from "../loop.js"; import type { CompactConversationResult } from "./compactConversation.js"; export declare function runCompactionWithEvents(options: { compact: (onCompactionStart: (event: { compactionId: string; estimatedTokensBefore: number; }) => void | Promise) => Promise; idFactory: () => string; now: () => number; onEvent: (event: AgentLoopEvent) => void | Promise; reason: "context_window" | "manual" | "threshold"; signal?: AbortSignal; }): Promise;