import type { AssistantMessage } from "@earendil-works/pi-ai";
import type { AgentSessionInternalSurface as AgentSession } from "./agent-session-methods.ts";
export declare function _checkCompaction(this: AgentSession, assistantMessage: AssistantMessage, skipAbortedCheck?: boolean): Promise<void>;
export declare function _isCopilotServerCapBelowSelectedContextWindow(this: AgentSession, assistantMessage: AssistantMessage): boolean;
/**
 * Internal: remove the trailing overflow error from retry context if it is still present.
 */
export declare function _dropTrailingOverflowAssistantErrorIfPresent(this: AgentSession): void;
/**
 * Internal: schedule a live post-event continuation probe after compaction_end listeners can flush queues.
 */
export declare function _schedulePostAutoCompactionContinuationProbe(this: AgentSession, reason: "overflow" | "threshold", willRetry: boolean): void;
/**
 * Internal: resume generation after successful auto-compaction only when active work remains.
 */
export declare function _resumeAfterAutoCompaction(this: AgentSession): void;
/**
 * Internal: Run auto-compaction with events.
 */
export declare function _runAutoCompaction(this: AgentSession, reason: "overflow" | "threshold", willRetry: boolean): Promise<void>;
/**
 * Toggle auto-compaction setting.
 */
export declare const agentSessionAutoCompactionMethods: {
    _checkCompaction: typeof _checkCompaction;
    _isCopilotServerCapBelowSelectedContextWindow: typeof _isCopilotServerCapBelowSelectedContextWindow;
    _dropTrailingOverflowAssistantErrorIfPresent: typeof _dropTrailingOverflowAssistantErrorIfPresent;
    _schedulePostAutoCompactionContinuationProbe: typeof _schedulePostAutoCompactionContinuationProbe;
    _resumeAfterAutoCompaction: typeof _resumeAfterAutoCompaction;
    _runAutoCompaction: typeof _runAutoCompaction;
};
//# sourceMappingURL=agent-session-auto-compaction.d.ts.map