/** * Edit Tool - Perform targeted string replacements in files */ import type { Tool } from '../types.js'; /** * Input parameters for edit tool */ export interface EditInput { /** * Path to the file to edit */ filePath: string; /** * The text to search for (must be unique in the file) */ oldString: string; /** * The replacement text */ newString: string; /** * Replace all occurrences (default: false, requires unique match) */ replaceAll?: boolean; /** * Create the file if it doesn't exist (default: false) */ createIfMissing?: boolean; } /** * Edit tool definition */ export declare const editTool: Tool; /** * Factory function to create an edit tool with custom options */ export declare function createEditTool(options?: { /** * Base directory to resolve relative paths against */ baseDir?: string; /** * Allowed file extensions (if specified, only these can be edited) */ allowedExtensions?: string[]; /** * Disallowed paths (files that cannot be edited) */ disallowedPaths?: string[]; }): Tool;