import type { ChatMessage } from "../types.js"; export declare const COMPACTION_RETRY_COOLDOWN_MS = 60000; export declare const COMPACTION_MAX_ATTEMPTS = 3; export interface CompactionAttemptKeyInput { readonly messages: readonly ChatMessage[]; readonly provider: string; readonly model: string; readonly dialect: string; readonly triggerTokens: number; readonly schemaHash: string; readonly durableEnvelope?: string | undefined; } export declare function compactionAttemptKey(input: CompactionAttemptKeyInput): string; export declare class CompactionAttemptLedger { private readonly cooldownMs; private readonly now; private readonly maxAttempts; private readonly failures; constructor(cooldownMs?: number, now?: () => number, maxAttempts?: number); isSuppressed(key: string): boolean; recordFailure(key: string): void; recordSuccess(key: string): void; attemptCount(key: string): number; isExhausted(key: string): boolean; clear(): void; }