Repository navigation
v0.2.0 — restore files from the archive
Adds the undo half of archiving.
Added
md_restore_files — moves files back out of .archiveMD/ to where they came from, using the manifest. A file can be named by either the path it was archived to or the path it came from; both resolve to the same entry.
"restore docs/plans/billing-rework.md"
".archiveMD/docs/plans/billing-rework.md" # equivalent
Three behaviors worth knowing:
- Called with no
paths, it lists rather than restores. Defaulting a malformed call to "restore everything" would be the worst possible failure mode for an undo tool. The listing shows each archived file's original path, why it was archived, when, and whether something now occupies its old location. - A file already at the original path is never overwritten. The restore is skipped by default; pass
on_conflict: "suffix"to bring the archived copy back alongside the current one. - Files moved into
.archiveMD/by hand still restore. Without a manifest entry, the original location is derived by stripping the archive prefix.
Restores append to the manifest too, so the audit trail records both directions.
Changed
Manifest entries now carry event ("archive" or "restore") and a canonical at timestamp. Reading is backward compatible — entries written by 0.1.0 have no event and are treated as archives.
Shared move helpers moved to src/lib/move.ts so archive and restore cannot drift on collision handling or the no-copy-then-delete rule.
Known limitation
Empty directories are left behind in .archiveMD/ after a restore. Removing them would require a delete call, and the no-delete guarantee is worth more than the tidiness.
Updating
The server is a subprocess your MCP client spawns at startup, so restart the client to pick this up. With the npx install, that is all you need.
Full changelog: v0.1.0...v0.2.0