apply_patch
Apply JSON patch operations to a file in a session repository, with SHA-256 hash validation to ensure integrity before modifications.
Instructions
Apply JSON patch operations to a file within a Direct session's repo_path. Validates expected_sha256 before applying. Supports replace_exact, insert_before, insert_after, replace_whole_file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Relative file path within the session repo | |
| operations | Yes | ||
| session_id | Yes | Session ID | |
| expected_sha256 | Yes | Expected SHA-256 hash of the current file content |