Skip to main content

Module sync_capture

Module sync_capture 

Source
Expand description

The Vault’s entries as records in the sync layer’s log (docs/specs/SPEC_VAULT_SHARED_ACROSS_MACHINES_LAN_AND_CLOUD_2026_11_01.md section 6): what a machine writes into a Vault’s collection when its entries change.

capture reads one Vault’s entries from the store and writes whatever changed since the last capture into the Vault’s collection, one record per entry, named by the entry’s link id (the id that is the same on every machine). A record’s body is the entry’s EntryBody sealed with the Vault’s key at the epoch the record carries, so the log, a LAN peer, the relay and the cloud see only the clear header. An entry that is gone, or moved to another Vault, ends its record with a tombstone. It sends nothing and changes no entry: taking a record from another machine into the store is the next step.

What this machine keeps to itself does not go: a sign-in that stays_here, the agents an entry is shared with, and when it was last used (EntryBody leaves those out).

Re-exports§

pub use crate::backend::user_sync::seal::sealer;

Structs§

Captured
What a capture did.

Constants§

KIND
The kind of a Vault’s collection.

Functions§

capture
Writes what changed in vault_id‘s entries into its collection. key is this machine’s own key, which opens the entries’ values; ring holds the Vault’s keys; profiles names the person’s browser profiles here.
init
Creates the log’s tables and this module’s.