import type { PortableTool } from "../portable-tool.js";
export declare const EDIT_TOOL_NAME: "edit";
export interface EditToolParams {
    path: string;
    oldText: string;
    newText: string;
}
export declare const EDIT_TOOL_SCHEMA: {
    readonly type: "object";
    readonly properties: {
        readonly path: {
            readonly type: "string";
            readonly description: "Path to the file to edit (relative or absolute).";
        };
        readonly oldText: {
            readonly type: "string";
            readonly description: "Exact text to find and replace (must match exactly, including whitespace).";
        };
        readonly newText: {
            readonly type: "string";
            readonly description: "New text to replace the old text with.";
        };
    };
    readonly required: readonly ["path", "oldText", "newText"];
};
/** Deps injected by the host runtime for file editing. */
export interface EditToolDeps {
    /** Read file content as text. */
    readFile(path: string): Promise<string>;
    /** Write content back. */
    writeFile(path: string, content: string): Promise<void>;
    /** Resolve a relative path to absolute. */
    resolvePath(input: string): string;
    /**
     * Check for concurrent modification before writing.
     * The host tracks when each file was last read vs last modified on disk.
     * Returns null if safe to write, or a descriptive warning if the file
     * has been modified since last read (by user, another tool, or external process).
     * If not provided, no concurrent modification check is performed.
     */
    checkConcurrentModification?(path: string): string | null;
}
export declare function createEditTool(deps: EditToolDeps): PortableTool<EditToolParams>;
