import { ToolResult, EditorCommand } from "../types/index.js";
import { Disposable } from "../utils/disposable.js";
/**
 * Text Editor Tool
 *
 * Provides safe file viewing and editing operations with:
 * - Path validation and resolution via VFS router
 * - User confirmation for write operations
 * - Fuzzy matching for string replacements (90% similarity threshold)
 * - Edit history with undo capability
 * - Unified diff output for all modifications
 *
 * All write operations (create, strReplace, insert, replaceLines) require
 * user confirmation unless session-level file operation approval is granted.
 */
export declare class TextEditorTool implements Disposable {
    private editHistory;
    private confirmationService;
    private baseDirectory;
    private vfs;
    constructor();
    /**
     * Clean up resources
     */
    dispose(): void;
    /**
     * Set the base directory for path validation
     */
    setBaseDirectory(dir: string): void;
    /**
     * View file contents or directory listing
     *
     * @param filePath - Absolute or relative path to file/directory
     * @param viewRange - Optional [startLine, endLine] tuple for partial view (1-indexed)
     * @returns File contents with line numbers, or directory listing, or error
     *
     * @example
     * // View entire file (first 10 lines shown, rest summarized)
     * await editor.view('src/index.ts');
     *
     * // View specific line range
     * await editor.view('src/index.ts', [10, 25]);
     */
    view(filePath: string, viewRange?: [number, number]): Promise<ToolResult>;
    /**
     * Replace text in a file using exact or fuzzy matching
     *
     * Uses a 90% similarity threshold for fuzzy matching when exact match fails,
     * allowing tolerance for minor whitespace differences.
     *
     * @param filePath - Path to the file to edit
     * @param oldStr - Text to find and replace
     * @param newStr - Replacement text
     * @param replaceAll - If true, replaces all occurrences; otherwise only first
     * @returns Unified diff showing the changes, or error with suggestions
     *
     * @example
     * // Replace single occurrence
     * await editor.strReplace('file.ts', 'oldText', 'newText');
     *
     * // Replace all occurrences
     * await editor.strReplace('file.ts', 'oldText', 'newText', true);
     */
    strReplace(filePath: string, oldStr: string, newStr: string, replaceAll?: boolean): Promise<ToolResult>;
    /**
     * Create a new file with the specified content
     *
     * Will fail if the file already exists (use strReplace to modify existing files).
     * Creates parent directories if they don't exist.
     *
     * @param filePath - Path where the new file should be created
     * @param content - Content to write to the file
     * @returns Unified diff showing the file creation, or error
     */
    create(filePath: string, content: string): Promise<ToolResult>;
    /**
     * Replace a range of lines in a file
     *
     * @param filePath - Path to the file to edit
     * @param startLine - First line to replace (1-indexed, inclusive)
     * @param endLine - Last line to replace (1-indexed, inclusive)
     * @param newContent - Content to insert (can be multiple lines)
     * @returns Unified diff showing the changes, or error
     */
    replaceLines(filePath: string, startLine: number, endLine: number, newContent: string): Promise<ToolResult>;
    /**
     * Insert content at a specific line in a file
     *
     * @param filePath - Path to the file to edit
     * @param insertLine - Line number where content will be inserted (1-indexed)
     * @param content - Content to insert (can be multiple lines)
     * @returns Success message or error
     */
    insert(filePath: string, insertLine: number, content: string): Promise<ToolResult>;
    /**
     * Undo the last edit operation
     *
     * Supports undoing: str_replace, create, and insert operations.
     * Note: Undo is best-effort and may fail if the file was modified externally.
     *
     * @returns Success message or error if no edits to undo
     */
    undoEdit(): Promise<ToolResult>;
    /**
     * Generate unified diff between old and new content
     * Uses shared diff-generator utility for consistent diff output across tools
     */
    private generateDiff;
    getEditHistory(): EditorCommand[];
}
