hashline_edit
Edit files safely using line:hash references, ensuring changes apply only when the file matches expected content. Supports replace, insert, and delete operations with multi-op atomic-style updates.
Instructions
Edit a file using hashline references from hashline_read. Reference lines by "line:hash" (e.g. "12:a3") — if the hash doesn't match the current file, the edit is rejected (re-read and retry). Supports: replace (single line or range), insert_after, insert_before, delete (single line or range). Multiple operations are applied bottom-to-top to preserve line numbers. Returns a context window around edited lines with updated hashes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute or relative file path to edit | |
| operations | Yes | Edit operations to apply. |