Preview reversible AST patch as source edits
carve_apply_reversible_ast_patchVerify a reversible AST patch against source, then apply or undo it to return a minimal stale-guarded UTF-8 edit without writing files.
Instructions
Verify a reversible AST patch against source, apply or undo it, and return a minimal stale-guarded UTF-8 source edit without writing files.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| patch | Yes | Version 1 reversible AST patch (maximum 1000000 JSON bytes and 1000 operations per direction) | |
| source | Yes | Document source (maximum 1000000 UTF-8 bytes) | |
| inverse | No | Apply inverse operations to undo the patch. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ast | Yes | ||
| source | Yes | ||
| direction | Yes | ||
| sourcePatch | Yes |