/**
 * Progressive Fallback
 *
 * Handles cases where summarization produces oversized results.
 * Uses progressive strategies to reduce content size while
 * preserving as much information as possible.
 */
import type { ChatMessage } from '../../types/index.js';
import type { CompactionConfig, CompactionResult } from './types.js';
/**
 * Strategy for reducing content size
 */
export type FallbackStrategy = 'truncate' | 'remove-middle' | 'extract-key' | 'aggressive-truncate';
/**
 * Fallback result
 */
export interface FallbackResult {
    content: string;
    tokenCount: number;
    strategy: FallbackStrategy;
    originalTokens: number;
    compressionRatio: number;
}
/**
 * Apply truncation fallback
 */
export declare function applyTruncation(content: string, targetTokens: number, config?: Partial<CompactionConfig>, model?: string): FallbackResult;
/**
 * Remove middle content (keep head and tail with more aggressive ratios)
 */
export declare function removeMiddle(content: string, targetTokens: number, model?: string): FallbackResult;
/**
 * Extract only key information (most aggressive)
 */
export declare function extractKeyInfo(content: string, targetTokens: number, model?: string): FallbackResult;
/**
 * Aggressive truncation (last resort)
 */
export declare function aggressiveTruncate(content: string, targetTokens: number, model?: string): FallbackResult;
/**
 * Apply progressive fallback strategies until target is met
 */
export declare function applyProgressiveFallback(content: string, targetTokens: number, config?: Partial<CompactionConfig>, model?: string): FallbackResult;
/**
 * Apply fallback to messages if summarization failed
 */
export declare function applyMessageFallback(messages: ChatMessage[], targetTokens: number, config?: Partial<CompactionConfig>, model?: string): CompactionResult;
