/**
 * Multi-stage Compaction Module
 *
 * Provides context compaction through parallel summarization,
 * adaptive chunking, memory flushing, and progressive fallback.
 */
export type { CompactionConfig, MessageChunk, ChunkSummary, CompactionResult, FlushableMemory, AdaptiveChunkConfig, MessageStats, CompactionEvents, } from './types.js';
export { DEFAULT_COMPACTION_CONFIG } from './types.js';
export { calculateMessageStats, calculateOptimalChunkCount, chunkMessages, balanceChunks, } from './adaptive-chunker.js';
export type { Summarizer } from './parallel-summarizer.js';
export { LocalSummarizer, summarizeChunksParallel, mergeSummaries, truncateText, defaultSummarizer, } from './parallel-summarizer.js';
export { extractFlushableMemories, flushToMemory, flushMessagesToMemory, } from './memory-flush.js';
export type { FallbackStrategy, FallbackResult } from './progressive-fallback.js';
export { applyTruncation, removeMiddle, extractKeyInfo, aggressiveTruncate, applyProgressiveFallback, applyMessageFallback, } from './progressive-fallback.js';
import type { ChatMessage } from '../../types/index.js';
import type { CompactionConfig, CompactionResult } from './types.js';
import { type Summarizer } from './parallel-summarizer.js';
/**
 * Compact messages using multi-stage approach
 *
 * Algorithm:
 * 1. Optionally flush important context to EnhancedMemory
 * 2. Split messages into adaptive chunks
 * 3. Summarize each chunk in parallel
 * 4. Merge summaries
 * 5. If oversized, apply progressive fallback
 */
export declare function compactMessages(messages: ChatMessage[], targetTokens: number, options?: {
    config?: Partial<CompactionConfig>;
    summarizer?: Summarizer;
    model?: string;
    projectId?: string;
    sessionId?: string;
}): Promise<CompactionResult>;
