History and rewind

Every save is a version. List a file's history, read or restore any version, read a whole folder as it was at a moment, and put it back with one call that can itself be undone.

這一頁還沒有翻譯,所以先以英文顯示。

Every save is a version and every change is written to the journal, so a drive remembers how it looked at any moment. You can read a folder as it was before an Agent ran, get back a file that has since been renamed or deleted, and put a whole folder back.

Every save is a version

Versioning is always on, not a setting. Each save, edit, restore or S3 write makes exactly one new version, and nothing rewrites or deletes past versions while the file exists. History belongs to the file, not its path, so it follows a file through renames and moves.

side versions Ep01/script.md

Versions come newest first, numbered per file (seq), with who saved them (an Agent shows as one) and any name someone gave them. Over S3, ListObjectVersions lists the same history.

Each version also says how it came to be:

originWhenPoints back with
putA whole save: the apps, the mount, the CLI, an SDK upload, S3 PutObject or a multipart upload
editAn in-place edit: …/edits, append_text, MCP edit_text
copyS3 CopyObject onto another keycopied_from: the version copied
restoreA restore (apps, API, a rewind, or S3 copying an old version onto its own key)restored_from: the version brought back
forkA version carried into a forksource_version_id: the version in the original
mergeA version applied back from a forksource_version_id: the version in the fork

source_version_id is set for copy, restore, fork and merge; restored_from and copied_from are its names for those two. side versions marks such versions with [restore of ver_…].

Read one version

Read a version by id with --version (the CLI also takes its number or name), versionId in the SDKs' download and open, or versionId over S3:

Shell
side get Ep01/script.md ./v2.md --version 2
aws s3api get-object --bucket film-a --key Ep01/script.md --version-id ver_01M7GWV8… v2.md

To read what a path held at a moment instead, use as_of below.

Restore one file

Restoring makes an old version current again by saving it as a new version (origin: "restore", with restored_from). The versions in between stay, so a restore can itself be undone. No bytes are copied: the new version points at the same stored chunks, so restoring a 100 GB file costs the same as a 1 KB one. Pass the version you looked at, and the restore happens only if nobody saved since; otherwise it fails with 412.

side restore ver_01M7GWV8…

Over S3, copy the old version onto its own key: copy-object --copy-source "film-a/Ep01/script.md?versionId=ver_…".

Moments

Anywhere that takes as_of, a moment can be:

FormExampleMeans
A time2026-11-15T09:30:00ZThe last change at or before that time
A duration ago-2h, -90mThe same, counted back from now
A journal seq1042Exactly after that change

Answers carry Sidespace-As-Of-Seq, the journal seq the moment resolved to. Ask again with that seq and you get exactly the same result, even if more changes happened at the same second.

Read the past

side ls /Ep01 --as-of -2h                            # what the folder held two hours ago
side get /Ep01/script.md ./old.md --as-of -2h
  • ?as_of= (or the Sidespace-As-Of header) works on GET …/paths/{path}, GET …/nodes/{nid} and GET …/nodes/{nid}/children. A path is looked up as it was then, so an old name still finds the file.
  • A node shows the version that was current then; download it as usual with that head_version_id.
  • A file deleted for good has no past. Everything else, including files in the trash, can be read.

Rewind a folder

Rewind puts a folder back the way it was at a moment. Always look first with a dry run:

side rewind /Ep01 --to -2h --dry-run            # what would change
side rewind /Ep01 --to -2h

The answer lists each change:

actionWhat happens
restoreThe file's old content is saved as a new version. Files with the same bytes are left alone.
undeleteA file or folder that was deleted comes back from the trash
moveSomething moved or renamed since goes back where it was. If the old name is taken, it gets a unique one and note says so.
trashSomething that wasn't there then goes to the trash
missingA file that was there but has been deleted for good; it can't come back
  • A rewind runs in one transaction, and every step is an ordinary journaled change. So nothing is lost, and a rewind can itself be rewound.
  • A dry run does the same work and rolls back, so it reports exactly what a real run would do.
  • It needs the editor role on the folder and on everything it changes, and the files:write scope.
  • Sidecars travel with their versions. Comments are not part of the folder and are not rewound.

Patterns

  • Undo an Agent's edit. Note the file's head_version_id before a risky change. If the result is wrong, restore that version; the bad one stays in history for review.
  • Undo an Agent's whole session. Note the journal seq before it starts (from any as_of answer's Sidespace-As-Of-Seq, or the journal), then rewind the folder to it with a dry run first. Better still, let the Agent work in a fork and apply only what you keep.
  • Audit. Versions say who saved what and when, Agents included, and the journal is the ordered list of every change in a drive. There is nothing to turn on and nothing a writer can skip.
  • Reproducible reads. Pin a batch of reads to one moment with the same as_of seq, and they all see one consistent state while others keep writing.

Over MCP and S3

  • The MCP tools list_folder and read_text take as_of, and rewind_folder rewinds. Its description tells the Agent to dry run first and show you. See Use it in Claude.
  • Over the S3 gateway, every bucket is versioned, and the x-sidespace-as-of header (or query parameter, for presigned URLs) lists and reads a bucket as it was.