import type { PortableTool } from "../portable-tool.js";
export declare const WRITE_TOOL_NAME: "write";
export interface WriteToolParams {
    path: string;
    content: string;
}
export declare const WRITE_TOOL_SCHEMA: {
    readonly type: "object";
    readonly properties: {
        readonly path: {
            readonly type: "string";
            readonly description: "Absolute path to the file to write.";
        };
        readonly content: {
            readonly type: "string";
            readonly description: "Content to write to the file.";
        };
    };
    readonly required: readonly ["path", "content"];
};
/** Deps injected by the host runtime for file writing. */
export interface WriteToolDeps {
    /** Write content to a file. Create parent dirs as needed. */
    writeFile(path: string, content: string): Promise<void>;
    /** Resolve a relative path to absolute. */
    resolvePath(input: string): string;
    /**
     * Check if file has been read before writing (first-read-then-write protection).
     * Returns null if write is allowed, or a warning message.
     * If not provided, no protection is applied.
     */
    checkReadBeforeWrite?(path: string): string | null;
    /**
     * Validate write access for the given path.
     * Returns null if allowed, or an error message if blocked.
     */
    validatePath?(path: string): string | null;
    /**
     * Check for concurrent modification before overwriting an existing file.
     * Returns null if safe to write, or a warning if modified since last read.
     * If not provided, no concurrent modification check is performed.
     */
    checkConcurrentModification?(path: string): string | null;
}
export declare function createWriteTool(deps: WriteToolDeps): PortableTool<WriteToolParams>;
