import { AstGrepBinaryManager } from "../core/binary-manager.js"; import { WorkspaceManager } from "../core/workspace-manager.js"; interface ChangeEntry { file: string; matches: number; preview?: string; applied: boolean; } interface ReplaceResult { changes: ChangeEntry[]; skippedLines: number; summary: { totalChanges: number; filesModified: number; skippedLines: number; dryRun: boolean; warnings?: string[]; }; } /** * Direct replace tool that calls ast-grep run --rewrite with minimal overhead */ export declare class ReplaceTool { private binaryManager; private workspaceManager; constructor(binaryManager: AstGrepBinaryManager, workspaceManager: WorkspaceManager); execute(paramsRaw: Record): Promise; /** * Resolves file paths to absolute paths. * Since input paths are absolute, ast-grep returns absolute paths. * STDIN and empty strings are returned as-is. */ private resolveFilePath; private parseResults; static getSchema(): { name: string; description: string; inputSchema: { type: string; properties: { pattern: { oneOf: ({ type: string; description: string; properties?: undefined; } | { type: string; properties: { context: { type: string; description: string; }; selector: { type: string; description: string; }; strictness: { type: string; enum: string[]; description: string; }; }; description: string; })[]; description: string; }; replacement: { type: string; description: string; }; code: { type: string; description: string; }; paths: { type: string; items: { type: string; }; description: string; }; language: { type: string; description: string; }; dryRun: { type: string; description: string; }; timeoutMs: { type: string; description: string; }; verbose: { type: string; description: string; }; strictness: { type: string; enum: string[]; description: string; }; context: { type: string; description: string; }; before: { type: string; description: string; }; after: { type: string; description: string; }; globs: { type: string; items: { type: string; }; description: string; }; noIgnore: { type: string; items: { type: string; enum: string[]; }; description: string; }; followSymlinks: { type: string; description: string; }; threads: { type: string; description: string; }; inspect: { type: string; enum: string[]; description: string; }; jsonStyle: { type: string; enum: string[]; description: string; }; selector: { type: string; description: string; }; maxDepth: { type: string; description: string; }; }; required: string[]; additionalProperties: boolean; }; }; } export {}; //# sourceMappingURL=replace.d.ts.map