# User Guide

## Concepts

- A **session** groups a sequence of destructive operations.
- An **operation payload** stores enough information to reconstruct undo behavior.
- An **operation registry** maps operation types to undo factories.

## Typical Flow

1. Create a `HistoryManager` with a storage backend.
2. Start a session and record operations.
3. Register undo factories for operation types.
4. Call `undo_session` to execute undos in reverse order.

## Storage Selection

- `InMemoryStorage`: fast, ephemeral, single-threaded by default.
- `SQLiteStorage`: persistent, multi-process friendly, recommended default.
