Skip to content

Releases: rianprei/snapedit

v1.0.0 — Snapshot-based editing for AI agents

Choose a tag to compare

@rianprei rianprei released this 09 Aug 01:11

snapedit v1.0.0

Snapshot-based editing for AI agents — send only the NEW content over stdio MCP, never the old block.

Highlights

  • Immutable, content-addressed snapshots (blob_id = sha256(bytes)) — the agent carries an id, not content.
  • 3-way merge on apply — base = snapshot, ours = live; earlier edits above the hunk are preserved; the patch lands exactly where the snapshot said.
  • Ambiguity-safe applies — hunk text duplicated in the live file → mode: "ambiguity", zero writes (byte-identity proven in tests).
  • Explicit conflicts — live change inside the hunk → structured conflict with both-side previews, no write.
  • Cross-process locking — parallel edits on disjoint ranges compose; same range serializes or conflicts; stale locks from dead processes are recovered automatically (T1–T7, 30 processes).
  • Structured errors everywhere — snapshot_missing, corrupt_snapshot, bad_blob, lock_unwritable, range_out_of_snapshot… never a crash, never a silent corruption.
  • store prune — explicit GC of unreferenced/old blobs (--days, --dry-run).

Docs

Install

git clone https://github.com/rianprei/snapedit.git
cd snapedit
npm link   # optional: `snapedit` on PATH
node --test test/*.test.js   # 55/55

MCP with Claude Code / OpenCode

{
  "mcpServers": {
    "snapedit": {
      "command": "/abs/path/to/snapedit/bin/snapedit",
      "args": ["mcp"]
    }
  }
}