multi_edit
Perform atomic batch file modifications with parallel processing, AI validation, and automatic rollback for enterprise multi-file editing operations.
Instructions
๐ ENHANCED Atomic batch operations - FileModificationManager orchestrator with parallel processing and smart AI routing. Enterprise-grade multi-file editing with NVIDIA cloud escalation for complex operations, AI validation, and automatic rollback.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_operations | Yes | ||
| parallel_processing | No | ||
| transaction_mode | No | all_or_nothing | |
| validation_level | No | strict |
Input Schema (JSON Schema)
{
"properties": {
"file_operations": {
"items": {
"properties": {
"edits": {
"items": {
"properties": {
"description": {
"type": "string"
},
"find": {
"type": "string"
},
"replace": {
"type": "string"
}
},
"required": [
"find",
"replace"
],
"type": "object"
},
"type": "array"
},
"file_path": {
"type": "string"
}
},
"required": [
"file_path",
"edits"
],
"type": "object"
},
"type": "array"
},
"parallel_processing": {
"default": true,
"type": "boolean"
},
"transaction_mode": {
"default": "all_or_nothing",
"enum": [
"all_or_nothing",
"best_effort",
"dry_run"
],
"type": "string"
},
"validation_level": {
"default": "strict",
"enum": [
"strict",
"lenient",
"none"
],
"type": "string"
}
},
"required": [
"file_operations"
],
"type": "object"
}
Implementation Reference
- smart-ai-bridge-v1.1.0.js:384-427 (registration)Registration of the multi_edit tool including its name, description, handler reference, and full input schema in the coreToolDefinitions array.{ name: 'multi_edit', description: '๐ ENHANCED Atomic batch operations - FileModificationManager orchestrator with parallel processing and smart AI routing. Enterprise-grade multi-file editing with NVIDIA cloud escalation for complex operations, AI validation, and automatic rollback.', handler: 'handleMultiEdit', schema: { type: 'object', properties: { file_operations: { type: 'array', items: { type: 'object', properties: { file_path: { type: 'string' }, edits: { type: 'array', items: { type: 'object', properties: { find: { type: 'string' }, replace: { type: 'string' }, description: { type: 'string' } }, required: ['find', 'replace'] } } }, required: ['file_path', 'edits'] } }, transaction_mode: { type: 'string', enum: ['all_or_nothing', 'best_effort', 'dry_run'], default: 'all_or_nothing' }, validation_level: { type: 'string', enum: ['strict', 'lenient', 'none'], default: 'strict' }, parallel_processing: { type: 'boolean', default: true } }, required: ['file_operations'] } },
- smart-ai-bridge-v1.1.0.js:1025-1027 (handler)Primary handler function for the multi_edit tool in SmartAIBridgeServer. Delegates execution to FileModificationManager.orchestrateOperation with operation type 'multi_edit'.async handleMultiEdit(args) { return await this.fileManager.orchestrateOperation('multi_edit', args); }
- smart-ai-bridge-v1.1.0.js:693-700 (helper)Switch case in FileModificationManager.orchestrateOperation that handles 'multi_edit' by calling MultiAIRouter.performMultiFileEdit with relevant parameters.case 'multi_edit': result = await this.router.performMultiFileEdit( params.file_operations, params.transaction_mode, params.validation_level, params.parallel_processing ); break;
- smart-ai-bridge-v1.1.0.js:811-813 (handler)Core execution logic for multi-file edits in MultiAIRouter (currently a placeholder implementation that simulates success). This is the deepest point of execution for multi_edit operations.async performMultiFileEdit(fileOperations, transactionMode, validationLevel, parallelProcessing) { // Placeholder implementation return { success: true, files_modified: fileOperations.length };