Revert one block
geml_revertRevert one block to a previous version while leaving every other block unchanged, so you can fix a bad edit without losing surrounding good changes.
Instructions
Undo ONE block, leaving every other block byte-for-byte unchanged — recover a single block after a bad edit without losing the good edits around it. rev defaults to undoing this block's LAST change (its previous distinct version), which holds even when other blocks were edited afterwards; or pass 0 for the tip, a -N offset, or a revision id from geml_history. Reverting across a revision where the block was deleted restores it; across one where it did not exist removes it. A rev that matches no revision, or a document with no history yet, is refused. Returns {ok, file, diagnostics, revision}, with notes when the write did something to say out loud (a block it dropped, an address it changed); a refusal is ok: false with a hint, and the file is unchanged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Block id to revert | |
| rev | No | Revision selector: 0 (the tip) | -N (N revisions back) | id prefix. Omit to undo this block's last change (robust to edits of other blocks since). | |
| file | Yes | Document path relative to the server's --root directory, e.g. notes/spec.geml |