batch_apply_edits
Apply multiple file edits with validation and partial rollback on failure. Preview changes via dryRun before writing.
Instructions
Apply multiple file edits with partial rollback on failure. Validates all edits first — if validation fails, response says explicitly how many edits were applied and which files were written/reverted (NO files are modified). On failure during application, only the failed edit and later edits are reverted; earlier successful edits are preserved. Every response includes message, appliedEdits, written, and per-preview-entry applied. Use dryRun: true (default) to preview changes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working dir for resolving relative file paths (default: primary project root) | |
| edits | Yes | List of edits to apply | |
| dryRun | No | Preview all changes without writing (default: true) |