Skip to main content

Module history

Module history 

Source
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§

HistoryEntry
One logged device: captured in a restore-family mode, or restored.
SeenDevice
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 path as a spreadsheet-openable CSV.
export_seen_csv
Write the seen-device history to path as 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_seen always advances.