/**
 * Deterministic line-based parser for compaction planner deletion records.
 *
 * Record grammar: `<uint>,<uint>\n` where each `<uint>` is a canonical unsigned
 * decimal integer (no sign, no decimals, no exponent, no leading zero except
 * the integer zero itself). Exactly one comma separates start and end.
 *
 * Normal completion: the final valid record may omit a trailing newline.
 * Length-truncated recovery: only complete newline-terminated records before
 * the final EOF fragment are accepted. A final non-newline-terminated record is
 * NEVER accepted on a length stop because EOF may have cut a multi-digit integer
 * (e.g. `300,30` could have intended `300,305`).
 *
 * Invalid syntax in any completed line (i.e. any line followed by a newline)
 * causes full rejection — records are never selectively skipped.
 */
import type { RawLineRange } from "./compaction-types.js";
/** Recovery result for diagnostics. */
export interface TruncatedRecoveryResult {
    ranges: RawLineRange[];
    /** Category for sidecar diagnostics. */
    category: "partial_length_recovery";
    /** Number of ranges recovered from the truncated response. */
    recoveredCount: number;
}
/**
 * Parse the complete planner response into deletion ranges.
 * Returns undefined if the text contains zero valid records or any syntax error.
 *
 * For a normal (non-length) completion, the final record may omit a trailing newline.
 * Every record must pass strict grammar validation.
 */
export declare function parseRangeRecords(text: string): RawLineRange[] | undefined;
/**
 * Recover complete newline-terminated records from a length-truncated response.
 *
 * Only lines that are followed by a newline (i.e. completed lines) are accepted.
 * The final fragment after the last newline is always discarded, even if it looks
 * syntactically valid, because EOF may have cut a multi-digit integer.
 *
 * Every completed line must be valid; invalid syntax in any completed line
 * causes full rejection (returns undefined).
 *
 * Returns undefined if zero usable records are recovered.
 */
export declare function recoverTruncatedRecords(text: string): TruncatedRecoveryResult | undefined;
//# sourceMappingURL=truncated-range-recovery.d.ts.map