import type { AgentSessionInternalSurface as AgentSession } from "./agent-session-methods.ts";
import type { ContextCompactionApplyOptions } from "./agent-session-methods.ts";
import { type ContextCompactionParameters, type ContextCompactionResult } from "./compaction/index.ts";
export declare function _applyContextVerbatimCompaction(this: AgentSession, options: ContextCompactionApplyOptions): Promise<ContextCompactionResult | undefined>;
/**
 * Manually compact the session context using deletion-only verbatim context compaction.
 * Aborts current agent operation first.
 */
export declare function compact(this: AgentSession, options?: Partial<ContextCompactionParameters>): Promise<ContextCompactionResult>;
/**
 * Manually compact the session context by applying validated logical deletions.
 * Retained transcript entries/content blocks stay verbatim; no user prompt text is accepted.
 */
export declare function contextCompact(this: AgentSession): Promise<ContextCompactionResult>;
/**
 * Cancel in-progress compaction (manual or auto).
 */
export declare function abortCompaction(this: AgentSession): void;
/**
 * Cancel in-progress branch summarization.
 */
export declare function abortBranchSummary(this: AgentSession): void;
/**
 * Check if compaction is needed and run it.
 * Called after agent_end and before prompt submission.
 *
 * Two cases:
 * 1. Overflow: LLM returned context overflow error, remove error message from agent state, compact, auto-retry
 * 2. Threshold: Context over threshold, compact, resume queued active-turn work if present; otherwise wait for user
 *
 * @param assistantMessage The assistant message to check
 * @param skipAbortedCheck If false, include aborted messages (for pre-prompt check). Default: true
 */
export declare function setAutoCompactionEnabled(this: AgentSession, enabled: boolean): void;
/** Whether auto-compaction is enabled */
export declare const agentSessionCompactionMethods: {
    _applyContextVerbatimCompaction: typeof _applyContextVerbatimCompaction;
    compact: typeof compact;
    contextCompact: typeof contextCompact;
    abortCompaction: typeof abortCompaction;
    abortBranchSummary: typeof abortBranchSummary;
    setAutoCompactionEnabled: typeof setAutoCompactionEnabled;
};
//# sourceMappingURL=agent-session-compaction.d.ts.map