import type { CompactionSettings } from "./compaction.js";
export declare const VERBATIM_COMPACTION_PROMPT_VERSION: 3;
export declare const VERBATIM_COMPACTION_STRATEGY: "verbatim-lines";
export declare const DEFAULT_COMPRESSION_RATIO = 0.5;
export declare const DEFAULT_PRESERVE_RECENT = 2;
export declare const MIN_COMPACTABLE_REGION_LINES = 20;
export interface VerbatimCompactionParameters {
    /** Fraction of compactable region lines to keep. */
    compression_ratio: number;
    /** Recent context-eligible messages retained outside the compactable region. */
    preserve_recent: number;
    /** Relevance focus used by the range planner. */
    query: string;
}
export interface LineRange {
    /** One-based inclusive first line. */
    start: number;
    /** One-based inclusive last line. */
    end: number;
}
export type RawLineEndpoint = number | string | boolean | null;
export interface RawLineRange {
    start?: RawLineEndpoint;
    end?: RawLineEndpoint;
}
export interface NumberedRegion {
    readonly __brand: "NumberedRegion";
    lines: string[];
    headerLineNumbers: ReadonlySet<number>;
    priorMarkerNs: ReadonlyMap<number, number>;
    /** Optional future protected spans, expressed as one-based line numbers. */
    protectedLineNumbers?: ReadonlySet<number>;
    tokenEstimate: number;
}
export type ValidatedRanges = readonly LineRange[] & {
    readonly __brand: "ValidatedRanges";
};
export interface CompactedTranscript {
    text: string;
    ranges: LineRange[];
    stats: VerbatimCompactionStats;
}
export interface VerbatimCompactionStats {
    linesBefore: number;
    linesDeleted: number;
    linesKept: number;
    rangeCount: number;
    tokensBefore: number;
    tokensAfter: number;
    percentReduction: number;
}
export interface VerbatimCompactionDetails {
    strategy: typeof VERBATIM_COMPACTION_STRATEGY;
    promptVersion: typeof VERBATIM_COMPACTION_PROMPT_VERSION;
    parameters: VerbatimCompactionParameters;
    stats: VerbatimCompactionStats;
    rung: "planned" | "extension";
    backupPath?: string;
}
export interface VerbatimCompactionPreparation {
    /** First context-visible tail entry, or null when no pre-boundary message is retained. */
    firstKeptEntryId: string | null;
    region: NumberedRegion;
    regionEntryIds: string[];
    keptTailMessageCount: number;
    tokensBefore: number;
    parameters: VerbatimCompactionParameters;
    settings: CompactionSettings;
}
export interface VerbatimCompactionResult {
    compactedText: string;
    firstKeptEntryId: string | null;
    tokensBefore: number;
    stats: VerbatimCompactionStats;
    parameters: VerbatimCompactionParameters;
    promptVersion: typeof VERBATIM_COMPACTION_PROMPT_VERSION;
    rung: VerbatimCompactionDetails["rung"];
    backupPath?: string;
}
//# sourceMappingURL=compaction-types.d.ts.map