Safely replace text
replace_textReplace a specific text block in an existing file using a SHA-256 concurrency guard. Verify the file's expected hash to prevent overwriting concurrent changes.
Instructions
Replace exactly one text block in an existing file using an expected SHA-256 concurrency guard.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| newText | Yes | ||
| oldText | Yes | ||
| project | Yes | ||
| expectedSha256 | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| bytes | Yes | ||
| sha256 | Yes | ||
| project | Yes | ||
| replaced | Yes | ||
| previousSha256 | Yes |