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.mdcurl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/space/nodes/$NODE/versions"
# {"items": [{"id": "ver_01M7GX3M…", "seq": 4, "size": 46, "origin": "restore", "restored_from": "ver_01M7GWV8…",
# "author": {"display_name": "Alice", …}, "created_at": "2026-11-16T00:46:12Z", "label": "Client cut", …}, …]}for (const v of await side.versions("/Ep01/script.md")) console.log(v.seq, v.id, v.size, v.author.display_name);for v in side.versions("/Ep01/script.md"):
print(v["seq"], v["id"], v["size"], v["author"]["display_name"])versions, err := side.Versions(ctx, "/Ep01/script.md")let versions = side.versions("/Ep01/script.md").await?;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:
origin | When | Points back with |
|---|---|---|
put | A whole save: the apps, the mount, the CLI, an SDK upload, S3 PutObject or a multipart upload | |
edit | An in-place edit: …/edits, append_text, MCP edit_text | |
copy | S3 CopyObject onto another key | copied_from: the version copied |
restore | A restore (apps, API, a rewind, or S3 copying an old version onto its own key) | restored_from: the version brought back |
fork | A version carried into a fork | source_version_id: the version in the original |
merge | A version applied back from a fork | source_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:
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.mdTo 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…# Only if nobody saved since the version you looked at (else 412)
curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H 'If-Match: "ver_01M7GX3M…"' \
"$SIDESPACE_URL/v1/space/versions/ver_01M7GWV8…/restore"await side.restoreVersion("ver_01M7GWV8…", { ifVersionId: "ver_01M7GX3M…" });side.restore_version("ver_01M7GWV8…", if_version_id="ver_01M7GX3M…")_, err := side.RestoreVersion(ctx, "ver_01M7GWV8…", "ver_01M7GX3M…") // the last argument is optionalside.restore_version("ver_01M7GWV8…", Some("ver_01M7GX3M…")).await?;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:
| Form | Example | Means |
|---|---|---|
| A time | 2026-11-15T09:30:00Z | The last change at or before that time |
| A duration ago | -2h, -90m | The same, counted back from now |
| A journal seq | 1042 | Exactly 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 -2hcurl -H "Authorization: Bearer $SIDESPACE_TOKEN" \
"$SIDESPACE_URL/v1/space/paths/Ep01/script.md?as_of=-2h"
curl -H "Authorization: Bearer $SIDESPACE_TOKEN" \
"$SIDESPACE_URL/v1/space/nodes/$FOLDER/children?as_of=2026-11-15T09:30:00Z"const then = await side.list("/Ep01", { asOf: "-2h" });
const old = await side.download("/Ep01/script.md", { asOf: "-2h" });then = side.list("/Ep01", as_of="-2h")
with side.open("/Ep01/script.md", as_of="-2h") as r:
old = r.read()?as_of=(or theSidespace-As-Ofheader) works onGET …/paths/{path},GET …/nodes/{nid}andGET …/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 -2hcurl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" \
"$SIDESPACE_URL/v1/space/nodes/$FOLDER/rewind" -d '{"as_of": "-2h", "dry_run": true}'const plan = await side.rewind("/Ep01", "-2h", { dryRun: true });
for (const c of plan.changes) console.log(c.action, c.path, c.from_path ?? "");plan = side.rewind("/Ep01", "-2h", dry_run=True)plan, err := side.Rewind(ctx, "/Ep01", "-2h", true)let plan = side.rewind("/Ep01", "-2h", true).await?;The answer lists each change:
action | What happens |
|---|---|
restore | The file's old content is saved as a new version. Files with the same bytes are left alone. |
undelete | A file or folder that was deleted comes back from the trash |
move | Something moved or renamed since goes back where it was. If the old name is taken, it gets a unique one and note says so. |
trash | Something that wasn't there then goes to the trash |
missing | A 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:writescope. - 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_idbefore 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_ofanswer'sSidespace-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_ofseq, and they all see one consistent state while others keep writing.
Over MCP and S3
- The MCP tools
list_folderandread_texttakeas_of, andrewind_folderrewinds. 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-ofheader (or query parameter, for presigned URLs) lists and reads a bucket as it was.