import { CompressionGuidelineOptimizerEventCounts, CompressionGuidelineOptimizerActionSummary, CompressionGuidelineOptimizerRuleUpdate, MemoryActionType, MemoryActionEvent, CompressionGuidelineOptimizerState } from './types.js';

interface CompressionGuidelineCandidate {
    generatedAt: string;
    sourceWindow: {
        from: string;
        to: string;
    };
    eventCounts: CompressionGuidelineOptimizerEventCounts;
    actionSummaries: CompressionGuidelineOptimizerActionSummary[];
    ruleUpdates: CompressionGuidelineOptimizerRuleUpdate[];
    guidelineVersion: number;
    optimizerVersion: number;
}
interface CompressionSemanticRuleRefinement {
    action: MemoryActionType;
    delta?: number;
    confidence?: "low" | "medium" | "high";
    note?: string;
}
interface CompressionSemanticRefinementResult {
    updates: CompressionSemanticRuleRefinement[];
}
interface CompressionSemanticRefinementOptions {
    enabled: boolean;
    timeoutMs: number;
    runRefinement?: (candidate: CompressionGuidelineCandidate) => Promise<CompressionSemanticRefinementResult | null>;
}
declare function computeCompressionGuidelineCandidate(events: MemoryActionEvent[], options?: {
    generatedAtIso?: string;
    previousState?: CompressionGuidelineOptimizerState | null;
}): CompressionGuidelineCandidate;
declare function refineCompressionGuidelineCandidateSemantically(baseline: CompressionGuidelineCandidate, options: CompressionSemanticRefinementOptions): Promise<CompressionGuidelineCandidate>;
declare function renderCompressionGuidelinesMarkdown(candidate: CompressionGuidelineCandidate): string;
declare function buildCompressionGuidelinesMarkdown(events: MemoryActionEvent[], generatedAtIso?: string, previousState?: CompressionGuidelineOptimizerState | null): string;

export { type CompressionGuidelineCandidate, type CompressionSemanticRefinementOptions, type CompressionSemanticRefinementResult, type CompressionSemanticRuleRefinement, buildCompressionGuidelinesMarkdown, computeCompressionGuidelineCandidate, refineCompressionGuidelineCandidateSemantically, renderCompressionGuidelinesMarkdown };
