How it behaves
In a Web profile, each direct user message receives an icon-only Rewind action. The dialog resolves the selected user/message sequence, previews affected files, and mints an expiring, session-bound plan without changing files. The plan supports restoring files only, or restoring files and creating a new Session ending before the message while returning its text to the composer. A running Agent using the same worktree blocks restoration.
When the DSH Agent service is available, the first agent/pre-step waterfall in a session captures a hidden checkpoint before the opening user message. A capture failure is reported but does not reject the turn. The Web /turn-rewind endpoint delegates child creation to DSH’s official Host create/fork lifecycle.
Change Ledger
The ctx.changeLedger service owns content-addressed restore-point manifests and durable recovery state. Before mutation it creates a rescue point, rechecks the reviewed paths and Git state, restores the selected files, and verifies hashes afterwards. Failed restores can roll back, and interrupted restore journals are reconciled at startup. The format is documented in docs/FORMAT.md; the security and failure model is in SECURITY.md.
Package integration
The package is a DSH Profile Bundle. package.json declares dsh.bundle.patch, while cordis.patch.yml mounts @anionex/dsh-turn-rewind without a DSH core patch. Add the bundle to each profile that should expose the service, then restart a running profile after changing its bundle list.
Supported scope and limits
Version 0.1 supports normal Git worktrees, including tracked files, missing tracked paths, non-ignored untracked files, regular text or binary files, symbolic links, and portable permission bits. It rejects sparse checkouts, submodule gitlinks, ignored files, special files, non-Git directories, and unsupported replacement paths. It does not snapshot the Git index or repository metadata, extended attributes, ACLs, ownership, timestamps, or hard-link topology. Git commits, branches, HEAD, the index, and stashes remain untouched.
Written from the project's own documentation and kept in sync with it. Where the two disagree, the source is authoritative — read the README on GitHub