/**
 * Precision helpers for the edit tool. None of these change the default
 * behaviour of an edit — they kick in only on the recovery / preservation
 * paths:
 *
 *  - {@link preserveQuoteStyle} re-applies a file's curly-quote typography to
 *    replacement text when the match was found only after folding curly quotes
 *    to straight ones, so an edit doesn't quietly downgrade `"` → `“`.
 *  - {@link desanitizeMatchString} repairs the handful of tag tokens an API
 *    transport may mangle (`<o>` → `<output>`, `\n\nH:` → `\n\nHuman:`, …) so a
 *    snippet that lost its angle-bracket words can still be located. It is only
 *    ever used as a *fallback* (try the literal text first) because several of
 *    the rules collide with ordinary code.
 *  - {@link findSimilarFile} and {@link suggestPathUnderCwd} build the "did you
 *    mean …?" hint when a path doesn't resolve.
 *  - {@link replaceAllLiteral} swaps every non-overlapping literal occurrence of
 *    a needle, used for the `replaceAll` edit mode.
 *
 * Everything here is pure / node-fs only and carries no dependency on the rest
 * of the edit pipeline.
 */
export declare const LEFT_SINGLE_CURLY_QUOTE = "\u2018";
export declare const RIGHT_SINGLE_CURLY_QUOTE = "\u2019";
export declare const LEFT_DOUBLE_CURLY_QUOTE = "\u201C";
export declare const RIGHT_DOUBLE_CURLY_QUOTE = "\u201D";
/**
 * When `oldText` only matched the file after curly quotes were folded to
 * straight quotes, re-apply the file's curly typography to `newString` so the
 * edit preserves the original quote style. A no-op when `oldString` already
 * equals the matched text (no folding happened) or when the matched text holds
 * no curly quotes.
 *
 * @param oldString The text the model supplied (straight quotes).
 * @param actualOldString The text actually located in the file (may be curly).
 * @param newString The replacement text the model supplied (straight quotes).
 */
export declare function preserveQuoteStyle(oldString: string, actualOldString: string, newString: string): string;
/**
 * Tag tokens an API transport sometimes mangles, mapped back to their full
 * form. Several of these (`<n>`, `\n\nH:`) appear in ordinary source, so the
 * table must only ever be consulted as a *fallback* after a literal match
 * misses — never preemptively.
 */
export declare const DESANITIZATIONS: Record<string, string>;
/**
 * Expand any mangled tag tokens in `matchString`, reporting which replacements
 * fired so the caller can mirror them onto the replacement text.
 */
export declare function desanitizeMatchString(matchString: string): {
    result: string;
    appliedReplacements: Array<{
        from: string;
        to: string;
    }>;
};
/**
 * Look in `filePath`'s directory for a file that shares its base name but has a
 * different extension (e.g. `foo.ts` when `foo.js` was requested). Returns the
 * sibling's bare filename, or `undefined` when there is no such neighbour.
 */
export declare function findSimilarFile(filePath: string): string | undefined;
/**
 * Marker embedded in file-not-found messages that carry a cwd note. A UI
 * renderer can key off this to collapse the long message into a short
 * "File not found" badge.
 */
export declare const FILE_NOT_FOUND_CWD_NOTE = "Note: your current working directory is";
/**
 * Suggest a corrected path under `cwd` when an absolute path doesn't resolve.
 * Catches the "dropped repo folder" pattern: the model builds an absolute path
 * that sits beside the repo rather than inside it.
 *
 *   cwd           = /Users/x/src/currentRepo
 *   requestedPath = /Users/x/src/foobar           (missing)
 *   returns         /Users/x/src/currentRepo/foobar (when it exists)
 *
 * @param requestedPath The absolute path that was not found.
 * @param cwd The working directory to re-root the suggestion under.
 */
export declare function suggestPathUnderCwd(requestedPath: string, cwd: string): Promise<string | undefined>;
/**
 * Replace every non-overlapping literal occurrence of `needle` in `haystack`
 * with `value`. Ported verbatim from the kernel `edit` capability so the
 * `replaceAll` edit mode shares one definition of "replace all".
 */
export declare function replaceAllLiteral(haystack: string, needle: string, value: string): string;
