restore_vault
Restore a node to its state right after a commit to repair write damage or bring back a deleted node, recording the restore as a new undoable commit.
Instructions
Put a node back as it was right after commit. Use it to repair a node
that a write damaged, or to bring back a deleted node.
You may call this without asking the user first: a restore is recorded as a new commit, nothing is lost, and it can itself be undone. But:
Read the old version first (read_vault with commit) and check it holds the content you want back.
If the node was changed after the damage, a restore also drops those newer changes. Ask the user first, or use read_vault with commit and patch_vault to put back only the missing part.
Tell the user what you restored: node, commit and why.
To restore a deleted node, pass its UID and the hash of the commit that
deleted it with "1" added (e.g. "a1b2c3d1").
Returns {restored, uid, path, from_commit, was_deleted, commit}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| commit | Yes |