import type { EditItem, OccurrenceSpec, EditResult, EditResultStatus } from './types.js'; type EditComputationResult = { newContent: string; occurrencesReplaced: number; warning?: string | undefined; } | { error: string; }; export declare function decodeBase64(value: string): string; export declare function normalizeWhitespace(s: string): string; export declare function escapeRegex(s: string): string; export declare function findFuzzyLineMatch(content: string, findStr: string): { start: number; end: number; similarity: number; candidateLines: string[]; } | null; export declare function findAllPositions(content: string, find: string, mode: 'exact' | 'fuzzy' | 'regex', caseSensitive: boolean, whitespaceSensitive?: boolean, multiline?: boolean): { start: number; end: number; }[]; export declare function applyHints(content: string, positions: { start: number; end: number; }[], hints: EditItem['hints'], nearLine?: number): { positions: { start: number; end: number; }[]; warning?: string | undefined; }; export declare function selectOccurrences(positions: { start: number; end: number; }[], occurrence: OccurrenceSpec | undefined): { selected: { start: number; end: number; }[]; } | { error: string; hint?: string; }; export declare function applyReplacements(content: string, selections: { start: number; end: number; }[], find: string, replace: string, mode: 'exact' | 'fuzzy' | 'regex', caseSensitive: boolean): string; export declare function computeExactEdit(fileContent: string, item: EditItem): { newContent: string; occurrencesReplaced: number; } | { error: string; }; export declare function computeAstEdit(fileContent: string, item: EditItem, filePath: string): Promise; export declare function computeAstPatternEdit(fileContent: string, item: EditItem, filePath: string): Promise; export declare function classifyEditFailure(message: string): EditResultStatus; /** * Classify a successful edit's warning string into which lenient fallback the * matcher used to land it, or null for a warning that is not a fallback notice. * Co-located with the warning phrases produced by computeSingleEdit (see * `usedFallback` above) so the classifier and the strings it reads stay in one * file. Used by tool-format telemetry to count fallback-mode edits per model. */ export declare function classifyEditFallbackWarning(warning: string): 'whitespace' | 'fuzzy-lines' | null; export declare function buildFailedEditResult(item: EditItem, error: string, status: EditResultStatus): EditResult; export declare function computeSingleEdit(fileContent: string, item: EditItem, mode: 'exact' | 'fuzzy' | 'regex', caseSensitive: boolean, whitespaceSensitive?: boolean, multiline?: boolean): { newContent: string; occurrencesReplaced: number; warning?: string | undefined; } | { error: string; hint?: string | undefined; }; export {}; //# sourceMappingURL=match.d.ts.map