Skip to main content

Crate undo_core

Crate undo_core 

Source
Expand description

undo-core — the reversible side-effect engine behind undo, “Ctrl-Z for AI agents”.

The model is small on purpose:

  • Effect is a change paired with how to reverse it.
  • Undo is an append-only journal of effects, grouped by checkpoint, plus a rollback executor that replays their inverses — crash-safely, under a cross-process lock, with directory/permission/symlink fidelity and a redo stack.

Filesystem effects are fully reversible today. The same journal is built to carry network, email, and database effects (which know their own inverse) without changing the rollback path — that uniform reversibility is the point.

Structs§

DiffEntry
One changed path in the diff.
HttpCompensator
The request that reverses an HttpMutation.
RedoReport
What a redo did.
RollbackReport
What a rollback did.
Status
What’s changed since the last checkpoint.
Store
Undo
A handle on one project’s undo history.

Enums§

Effect
A reversible (or at least auditable) side effect.
Row
One line in the journal.

Functions§

path_is_ignored
True if any component of path is an ignored directory (e.g. node_modules, .git, .undo). The watcher uses this to filter events with the exact same definition the snapshotter uses, so the two never disagree.