import type { PortableTool } from "../portable-tool.js";
export declare const PATCH_TOOL_NAME: "patch";
export interface PatchToolParams {
    /** V4A unified diff or simple find-replace */
    input: string;
    /** When true, replace all occurrences in each file (default: false) */
    replaceAll?: boolean;
}
export declare const PATCH_TOOL_SCHEMA: {
    readonly type: "object";
    readonly properties: {
        readonly input: {
            readonly type: "string";
            readonly description: string;
        };
        readonly replaceAll: {
            readonly type: "boolean";
            readonly description: "Replace all occurrences instead of first only (default: false).";
        };
    };
    readonly required: readonly ["input"];
};
export interface PatchResult {
    filesModified: string[];
    filesAdded: string[];
    filesDeleted: string[];
    strategies: Record<string, string>;
    errors: string[];
}
export interface PatchToolDeps {
    readFile(path: string): Promise<string>;
    writeFile(path: string, content: string): Promise<void>;
    deleteFile(path: string): Promise<void>;
    fileExists(path: string): Promise<boolean>;
    resolvePath(input: string): string;
}
export type MatchStrategy = "exact" | "line_trimmed" | "whitespace_normalized" | "indentation_flexible" | "escape_normalized" | "trimmed_boundary" | "unicode_normalized" | "block_anchor" | "context_aware";
interface MatchResult {
    start: number;
    end: number;
    strategy: MatchStrategy;
}
declare function fuzzyFind(content: string, search: string, replaceAll: boolean): MatchResult[];
export interface PatchTargets {
    /** Every file path the patch adds, updates, deletes, or moves (source + destination). */
    paths: string[];
    /** Paths removed via a *** Delete File: directive. */
    deletes: string[];
}
export declare function extractPatchTargets(input: string): PatchTargets;
export declare function createPatchTool(deps: PatchToolDeps): PortableTool<PatchToolParams>;
export { fuzzyFind, type MatchResult };
