/**
 * Edit-tool helpers (0.13.59) — line-ending detection + fuzzy match.
 *
 * Background. Pre-0.13.59 the edit tool returned `Error: oldStr not
 * found in <path>` with no further information. The model couldn't
 * tell whether the miss was due to whitespace, surrounding context,
 * or — the case that bit us in the sieracMes-AI dogfood — a CRLF
 * file read against an LF oldStr. The model then made several edits
 * with slightly varied oldStr, all silently mismatching the same
 * way, until the soft loop intercept kicked in.
 *
 * 0.13.59 enriches the error message with two diagnostics:
 *   1. Line-ending mismatch: if the file uses CRLF and oldStr appears
 *      to use LF (or has no newline), state that explicitly and tell
 *      the model how to fix.
 *   2. Closest-match candidates: top-3 lines from the file with the
 *      smallest Levenshtein distance to oldStr's first non-empty
 *      line. Caps both line length and search length at 80 chars to
 *      stay cheap on big files.
 *
 * 'C-non-aggressive': we do NOT silently normalize line endings in
 * the edit tool itself. The diagnostic is enough; if the operator
 * wants normalization they re-read the file (which now annotates
 * line endings) and emit a CRLF-aware oldStr.
 */
export type LineEndingKind = 'LF' | 'CRLF' | 'mixed' | 'none';
/** Detect the dominant line ending in a string. */
export declare function detectLineEnding(content: string): LineEndingKind;
export interface FuzzyMatch {
    /** 1-based line number in the original content. */
    lineNumber: number;
    /** Levenshtein distance between needle (truncated) and line (truncated). */
    distance: number;
    /** Truncated preview of the line, ≤80 chars. */
    preview: string;
}
/**
 * Find the top-N lines in `content` that look most like `oldStr`'s
 * first non-empty line. Returns at most `topN` results sorted by
 * distance ascending. Empty array if no candidates pass the
 * similarity threshold (>50% relative distance is rejected).
 *
 * Caps:
 *   - oldStr's first-non-empty line is truncated to 80 chars before
 *     comparison (full Levenshtein on long oldStrs would be slow).
 *   - Each file line is similarly truncated.
 *   - Files with millions of lines are still O(N×80²) per call;
 *     practical files (<100K lines) finish in well under 100ms.
 */
export declare function findFuzzyMatches(content: string, oldStr: string, topN: number): FuzzyMatch[];
/**
 * Build the structured "oldStr not found" error message with
 * line-ending diagnostic + fuzzy-match suggestions.
 */
export declare function buildOldStrNotFoundError(filePath: string, fileContent: string, oldStr: string): string;
