Expand description
Persistent capture/restore history.
Every Mac that passes through this host — captured in recovery/booted, or
restored — is logged to a bundled-SQLite database at <config_dir>/ history.db. Schema migrations are embedded in the binary (see
../migrations), so nothing is read from disk at startup and the whole store
ships in a single binary. The CLI and desktop app share the same file.
Structs§
- History
Entry - One logged device: captured in a restore-family mode, or restored.
- Seen
Device - One device ever seen by this host, deduped by ECID and enriched across the modes it passes through (a serial appears in recovery, the model in DFU, …).
Functions§
- clear
- Delete all history.
- export_
csv - Write the whole history to
pathas a spreadsheet-openable CSV. - export_
seen_ csv - Write the seen-device history to
pathas CSV. - list
- Every logged device, newest first.
- list_
seen - Every device ever seen, most-recently-seen first.
- record
- Append a device to the history log.
- record_
seen - Upsert a batch of currently-seen devices, keyed by ECID. Richer data (a
serial or model that appears in a later mode) fills in blanks without
clobbering what’s already known;
last_seenalways advances.