The Standard Library as Architecture
UUIDv7 newtypes—HistoryId, RecordId, and HostId—prevent identity domains
from mixing while preserving time-ordered generation. RecordIdx expresses
sequence position separately from globally unique identity.
Arc<CapClient> shares negotiated server capabilities; Arc<[...]> and owned
vectors cross async boundaries without borrowing command-local stacks.
Range<RecordIdx> makes packed coverage explicit. Option<RecordIdx> models a
missing stream rather than inventing a sentinel index.
RecordStatus is a nested map from hosts and tags to heads. Comparing two
immutable summaries produces a deterministic plan before mutation. SQLite
transactions then own compound local changes.
Cryptographic keys are owned values loaded from restricted local paths. Each record receives a random content-encryption key wrapped by the master key; metadata becomes authenticated implicit assertion. The server owns ciphertext and ordering metadata, not the ability to inspect shell commands.