Expand description
The NibKeep engine: everything an app needs to work with a library, its keys, who it belongs to, and its spaces.
The library’s files are specified in docs/spec/storage.md, and the reasons for the
engine’s shape in docs/Technical-design.md.
Re-exports§
pub use backup::BackupDrive;pub use backup::BackupFolder;pub use backup::named_at as backup_named_at;pub use backup::named_in as backup_named_in;pub use place::Drive;pub use place::Whereabouts;pub use place::declare_phone;pub use place::declare_phone_with_disk;pub use place::serial_disk_name;
Modules§
- at_
login - Syncing from login (technical design):
nibkeep-sync, a program without a window that starts when the person logs in, holds the sync role of the libraries they chose, as an app holds it while unlocked. Every NibKeep program reads and writes the list of those libraries alike, in the person’s folder of settings; the service follows it, and writes beside it what it does for each. - pointer
- The
.nibfile in the folder of a tree outside its library’s folder, which names the library, as a worktree’s.gitfile names its repository, so that commands run there find it; and none in the folder of a tree inside it, where the commands find the library without one, and a file left there would take them over.niband the apps that start trees settle it alike (technical design: trees).
Structs§
- Added
Backup - A backup just made.
- Added
File - What adding a file did.
- Added
Secret File - What adding a secret file did.
- Answered
- A sync that another replica started.
- Author
- Who made a change, as far as the space knows.
- Backed
Up - An update of a backup that the holder of the sync role found.
- Background
- A thread that holds the sync role of a replica in the background, or waits for it, until this is stopped or dropped.
- Background
Options - How a program holds the sync role in the background: as
Holdingsays, with what it keeps of its own. - Background
State - What the thread that holds the sync role in the background does now.
- Backup
- One of the person’s backups, as their personal space records it.
- Backup
Drive - What the drive or share that holds a backup’s folder is, as copies count it.
- Backup
Edit - What to change of a backup: each value given replaces what it had.
- Backup
Moved - How many things went one way in an update of a backup.
- Backup
State - What a backup’s folder says of it, without an update: read from its record.
- Backup
Update - What an update of a backup did.
- Blame
Line - A line of a file of a tree, with what last changed it.
- Borrowed
- The network, borrowed from the holder of the sync role to pair, until this goes: the
lock on
sync.lent, and the role itself if no program held it. - Carried
- What a move noted of a value that it carried from another space, as its mover’s account of it, not as proof (technical design: spaces and moves).
- Census
- What a space holds, counted:
Library::census. - Change
Copies - How the space’s changes are held, as a check counts them against the space’s Critical policy.
- Check
Run - What one run of the regular check did.
- Check
Status - Where this replica’s checks stand, for the person.
- Checked
File - How the copies of a file meet the policy chosen for it, as
Library::check_policiescounts them. - Checked
Out - What checking out a file did.
- Checkout
- A checkout on this device.
- Choice
- The policy chosen for a file.
- Claim
InSpace - A claim to the admin role in a space, as a program shows it.
- Clone
Folder - The folder that a clone goes into, made empty, with the folders made for it: what to remove, from the innermost, if the clone fails.
- Closed
- A library that was closed, with its replica’s keys still unlocked, and its secrets if they were.
- Commit
- What to commit to a tree.
- Committed
- What a commit recorded.
- Compartment
Key - The key of an unlocked compartment: kept while the compartment stays unlocked, so that changing its keys needs no new passphrase or confirmation. It is wiped when dropped and never printed.
- Conditions
- The conditions of a rule, which must all hold for it to choose. A rule without any chooses for every file.
- Connection
- A connection to another replica: one stream of messages each way.
- Copies
Removed - What removing files from a tree’s copy did, as Git’s rm does: the copies deleted, for the next commit to record as deleted.
- Counts
- How many things of a space went one way.
- CutShort
- A commit that was cut short.
- Damaged
Copy - What checks found damaged in a space, for the person.
- Dated
Value - A value with when it held:
Library::dated_values. - Dating
- The time of an edit or a view: the day a person sees, and when they write.
- Described
- An entity and its name.
- Device
Marks - How a person marked a device, in the personal space.
- Disk
- A disk that holds copies of a space’s files or changes, as this replica holds them now and the other replicas’ accounts say.
- Disk
Backup - A backup on a disk (technical design: backups).
- Disk
Replica - A replica on a disk.
- Drive
- A drive, as the system reports it.
- Drop
Refusals - The reasons a drop is refused.
- Dropping
- How far a drop of a space on this device has come.
- Edits
Recorded - What recording the edits of a checkout’s copy did.
- Ended
- What ending a checkout did.
- Entity
View - An entity as a person sees it: its name, types, and the values of its fields.
- Export
Check - An export, compared with the library it came from.
- Exported
- What an export wrote.
- Field
History - Every value of one field of an entity, in the order they were recorded.
- Field
View - A field of an entity, and its values.
- File
Copy - A disk that holds a copy of a file, and how.
- File
Diff - How one file or link of a tree differs between two points.
- File
From - Where a file to add came from, beyond the folder it is read from: the source it was imported from, and its path and name there; where it was found, if it is read from a copy that is no original, as one unpacked from an archive; values that replace what it says of itself, as an archive’s metadata; and the folders to put it in.
- Folder
- A folder on a device, which a rule names.
- Found
Backup - Where the holder of the sync role found one of the person’s backups on this computer.
- Found
Elsewhere - Where a file was found, when the file that is read is a copy of it, as one unpacked from an archive.
- GitRepository
- What Git says of a repository in a tree’s copy: what
nibreads from the person’s Git, and gives a commit to record. - Group
InSpace - A group that a space’s governing changes add, as a program shows it.
- Group
Join Request - A request, in a group, that the group join a space.
- Group
Member - A member of a group, with their role in the group.
- Held
Elsewhere - A space of the user’s that this device does not hold, with the devices of theirs that do.
- History
- Every value an entity has had, by field.
- Holder
Record - What the holder of the sync role records of itself.
- Holding
- How the holder of the sync role runs.
- Imported
- What an import brought in.
- InTree
- Where a secret file of a tree is: the tree whose commit made it, which it belongs to for good, and its path there (technical design: secrets in trees).
- Invitation
- What an invitation is to: a shared space, the role it gives, and the person in the space
whom it names the new user, which the user agrees to after joining
(
Library::link_member). - Invited
- A member that an invitation added.
- Invitee
- Who asks to join a space, as the admin’s device shows them before the person confirms: the user, by ID and name, the names of the device and app that ask, the members whose records name the same user ID, and whether the user was a member before.
- Joined
- A library made by pairing with a sponsor, and its first sync.
- Joined
Space - A space that this library joined by an invitation, and its first sync.
- Joining
- A new replica that is joining a library: its keys, and the names of its device and app, before the sponsor grants it the space keys.
- Known
Space - A space of the user’s, whether this device holds it or not, as the personal space knows it.
- Lacks
- What the copies of a file lack of what its policy needs.
- Language
Settings - The ranked languages of the user, this device and this replica, where set.
- Library
- A library, opened: its replica’s keys unlocked, and its spaces open.
- Linking
- An entity that links to another.
- Links
- The entities that link to an entity through one field.
- Listed
- An entity in a list.
- Listing
- What
Library::listlists: the things of a space, or of a type, that meet every condition, ordered by name or by a field. - Made
Secret - What purging the versions of an ordinary file that a commit made secret takes, and what it leaves.
- Member
- One item of a list.
- Member
Replica - A replica that a shared space lists for a member.
- Move
Preview - What a move would take, for an app to show before it moves.
- Needs
- What a policy asks of the copies of a file.
- Network
- This replica’s endpoint on the network, which connects to others and takes their connections.
- Network
Options - How an endpoint starts.
- NewBackup
- What a new backup holds.
- NewDevice
- What the person chose for a new device of theirs, on the device that shows the code: a computer takes every space of this device’s, and the spaces given to it later; a phone takes the personal space alone, and asks before it takes a space given to it later.
- NewLibrary
- Who and where a new library starts: the user’s name, and the person’s, the user’s own entity among the people, if it differs; this device’s name, and the name of the app that keeps the replica; and the languages the user reads, ranked.
- NewRule
- A rule to add.
- NewValue
- A value of a new entity: in a language, if given, and with other forms, each in its language, if given.
- NotA
Code - Why text is not a pairing code.
- Opened
Recovery - What a recovery file gives a code that opens it.
- Opening
- How long opening a library took.
- Other
Form - Another form of a value shown, in another language or script.
- Pace
- How the holder of the sync role paces its checks.
- Paired
- A replica that pairing added.
- Pairing
Code - A code that pairs two replicas once: eight decimal digits, the first two from 10 to 99,
which find the sponsor on the network, and six more that are secret. It is shown as
37-482-177, and never printed in full byDebug. - Part
- Where one kind of copies stands in a round.
- Passphrase
Params - How much work deriving a key from a passphrase takes: the memory, iterations and lanes of Argon2id.
- Past
Value - A value an entity had, or has.
- Person
Link - A member’s link to a person in a shared space: it holds when an admin’s statement and the member’s own name the same person; an admin’s own statement counts for both while they are an admin (users and people).
- Policy
- A storage policy of a space.
- Policy
Check - What a policy needs, in policy check order, and the files that do not meet it, with copies counted by disk across devices (technical design: where the copies are).
- Policy
Count - How a policy is met for the files it is chosen for.
- Policy
Edit - Changes to a policy: each value given replaces what the policy has.
- Purge
- What a purge takes away: the statements of the values, current or past, and how many changes lose their keys and payloads; the content they refer to, with its sealed copies and this device’s checkouts of it; and the originals of that content that NibKeep knows of, which it leaves where they are.
- Purge
Request - An entity that a move left behind, whose mover asked that the rest of it be purged, as an admin’s replica lists it: where the new entity counts with the same values.
- Purged
Checkout - A copy on this device of content that a purge takes away: a checkout’s, or a tree’s file’s.
- Question
- A file large enough for the rule that would choose its policy to ask whether it can be
got again, if it is lost: the answer counts for its folder, as
Library::answertakes it. - Recorded
Repository - A Git repository that a tree records.
- Records
- The records of the sync role, in
sync.sqlitebeside its lock, encrypted under a key of the replica’s: who holds the role, what other programs ask it, and what it did. - Recovered
- What a recovery did.
- Recovering
- A recovery under way, which
Library::start_recoverybegan: the new replica, which nobody knows yet, holds what the backup holds of the personal space, and the keys sealed to the code there.Recovering::holds_secretssays whether the code holds the secrets, so that the person is asked how to protect them only then;Recovering::otherslists the person’s other devices, whichRecovering::keepkeeps some of; andRecovering::finishdoes the rest. One dropped before it finishes removes the new replica. - Recovery
Check - What a check of a recovery code on a device that works found.
- Recovery
Code Info - A recovery code of the person’s, as their personal space names it.
- Recovery
File - The recovery file. In CBOR, the array
[1, codes, check]: for each code, sorted by its record,[record, entry, signature], the code’s record in the personal space, the personal space’s entry for it, as the personal space gives a space to a replica, and the code’s signature of what the entry names, which the personal space states on the code’s record (RecoveryEntry); and the BLAKE3 hash of the canonical encoding ofcodes, so that a file damaged on its drive reads as damaged, and is written again. - Recovery
Keys - The keys of a space that a recovery code opens, of those that this replica holds and that were given out. The first key is never given out: it reaches a code another way.
- Removal
Pass - A pass of removals, and the syncs that it ran for proofs.
- Removals
- A pass of removals, as
Library::plan_removalsplans it: the copies to remove, and what to ask the replicas that are to prove theirs, which a sync with each ofRemovals::proversputs to them (crate::Syncing::proving). - Removed
- What a pass of removals did.
- Replica
- A replica of the library, as its personal space lists it.
- Replica
Copy - A copy of a replica made elsewhere, in a library’s directory.
- Replica
Record - What the holder of the sync role records of another replica.
- Report
- What checking a library found.
- Reverted
- What undoing a revision wrote into the copy.
- Role
- The sync role of a replica, held: the lock on its
sync.lock, which the system lets go of when the program ends, even by a crash. - Round
- Where a round of checks stands, as the sync records keep it.
- Rule
- A rule of a space, which chooses a policy for the files that it holds for.
- Searched
- The first entities that a search finds, and how many more there are, as
Library::search_firstlists them. - SetAside
- A change that was set aside: its author was revoked by a replica that did not have it, or nobody listed its key; or, in a space with members, its author’s member left, was removed or lost a role before they knew of it, or their role never allowed it.
- Showing
- How a code that this device shows waits for the device that types it: for up to
timeoutfrom when it is shown, tellingwrong_tryof each try that fails before it matches. - Shown
Value - A value as it is shown.
- Source
- A source of files, as a space records it.
- Space
Holder - A device of the user’s that holds a space.
- Space
Member - A member of a shared space, as its counting governing changes say: a user, with a role, and the replicas listed for them there.
- Space
Report - What checking a space found.
- Space
Request - A device of the user’s that asks for a space this device holds, which the person
approves here with
Library::allow_space. - Space
Status - What a space holds.
- Space
Synced - What a space’s sync sent and received.
- Sponsor
- The library as pairing changes it: what grants a new replica the space keys, and records it once it has joined.
- Start
Preview - How much a tree would take in if it started in a folder.
- State
Mark - Where a space’s state stands:
Library::state_mark. Two marks of one library are the same only while neither space took in anything between them. - Status
- What a library holds, as a person would want to know.
- Synced
- What a sync did.
- Synced
With - A sync with one of the user’s other replicas.
- Syncing
- The library as a sync reads and changes it.
- TakenIn
- What taking in copies brought.
- Thumbnail
- A thumbnail that a
Thumbnailermade: a JPEG, its size in pixels, and the picture hash of what it shows, if the thumbnailer makes one. - Thumbnail
Counts - How many of a space’s files are pictures or videos, as their media types say, and how many of those have a thumbnail.
- Thumbnail
Of - A thumbnail of a content, as a device shows it.
- Thumbnails
Made - What making thumbnails did.
- Ticks
- Where a stored log reads the time that tells the changes of a burst from changes made one by one: the system’s monotonic clock, unless a test sets another, so that the same changes form the same bursts on every machine, however fast.
- ToClone
- A repository that this device’s copy of a tree does not hold: what a clone would take, and where it comes from, or why it may not be cloned.
- Tree
- A tree of a space, and where its folder is on this device, if it has a root here.
- Tree
Change - What a path of a tree’s copy holds that the tree does not, as a commit records it.
- Tree
Entry - A file or a link of a tree, as the library has it now.
- Tree
LogEntry - A change to a tree, as its log lists it.
- Tree
Secrets - The secret files of a tree, and its ordinary files that look secret (technical design: secrets in trees).
- Tree
Started - What starting a tree did.
- Tree
Status - What a tree’s copy on this device holds that the tree does not, and what the tree holds that the copy does not.
- Updated
- What updating a tree’s copy did.
- Waiting
- How pairing with a closed library waits: as
showingsays, untilstopis set; whether it gives the secrets to a new replica that asks for them, and what the new device is, a computer or a phone, and which spaces it gets, as the person chose. - Waiting
Copy - A copy that waits before destroying what a purge destroys, as a purge names them before the person confirms: the person’s archive nodes and backups, and other members’.
- Waiting
On - A backup that a purge waits on.
- Waiting
Purge - A purge whose destruction this replica keeps apart while it waits.
- Whereabouts
- Where a folder is now.
- Written
- What writing a tree, or part of one, wrote.
Enums§
- Asked
For - What a new replica asked for, besides the library, as it paired.
- Behind
- Whether a move purges what it leaves behind in the old space (technical design: spaces and moves).
- Change
- What changed at a path of a tree’s copy.
- Chosen
By - What chose a file’s policy.
- Copy
Held - How a disk holds a copy of a file.
- Copy
State - Whether a checkout’s copy is as it was written, or as its edits were recorded.
- Damaged
- A copy that checks found damaged.
- Device
Role - What a device does with the files of its spaces, as its user marked it (technical design).
- Drop
Refusal - Why a drop of a space is refused now.
- Drop
Stage - How far a drop has come.
- Drop
Wait - What a drop waits for before this device states its choice.
- Edit
- A change to an entity.
- Export
Kind - What an export holds.
- Export
Problem - What is wrong with an export, compared with the library it came from.
- Held
- What the holder of the sync role did, for the program to show.
- Here
- What a device did with a space of the user’s.
- Kept
- Where devices keep the files of a policy. The store is the stricter.
- Keys
Error - Why keys could not be unlocked or saved.
- Languages
For - Whose ranked languages: the user’s own, this device’s, for every app on it, or this replica’s, for this app alone. The most specific list counts.
- Member
Role - A member’s role in a space with members, lowest first:
nonefor a member who left or was removed. - More
- How many more entities a search finds than it lists.
- Move
History - Whether a move brings the history of what it moves (technical design: spaces and moves).
- Move
Secrets - Whether a move takes the secret values of what it moves (technical design: sharing): the values of fields secret in the old space.
- NetError
- Why networking failed.
- NewProtection
- How to protect a compartment that is being written.
- Node
Error - Why the engine could not do something.
- Place
- Where a rule goes among the rules of a space.
- Problem
- Something wrong with a space.
- Protection
- How a compartment’s key is found.
- Reason
- Why a side ended a connection, as
[0, reason]says. - Recovered
From - What a recovery took the library from.
- Recovered
Secrets - What became of the library’s secrets in a recovery, which takes those that the code holds.
- Secrets
State - Where a library’s secrets are, as this replica sees them.
- Sync
Error - Why pairing or syncing failed.
- Taking
- What taking a space did.
- Tree
Entry Kind - What a file or a link of a tree holds.
- Tree
Point - A point of a tree’s history to read it at.
- Unlocker
- What unlocks a compartment.
Constants§
- CODE_
TRIES - How many tries a code takes (Sync): the one in which it matches spends it, and so does the last of those that fail before it matches, whatever made them fail. Two pairings at once whose codes share their first two digits may each reach the other’s device first, and a person may mistype a code.
- CONFIRMED_
KEYSTORE_ SERVICE - The service under which a phone’s keystore holds keys that it releases only after the person confirms, with a fingerprint or the screen lock, each time: the secrets’ keys (technical design).
- COUNTS_
FOR_ MILLIS - How long a copy counts after its last check: 8 weeks, two rounds.
- DAY
- A day, in milliseconds.
- DEFAULT_
PORT - The UDP port that replicas take connections on unless told otherwise, so that a firewall can let them through with one rule.
- DEFAULT_
WAIT_ DAYS - How many days an archive node, or a backup, waits unless its owner says otherwise: 30.
- ENGINE_
VERSION - The engine’s version, which the engines file records of each program, and a copy of
nibkeep-synctells, so that the newest runs. - KEYSTORE_
SERVICE - The service under which the platform’s keystore holds the keys of libraries: the same for every app, so that each opens the libraries that the others protect with it.
- MOST_
PICTURE_ BYTES - The most bytes of a picture read to make its thumbnail: larger pictures get none.
- MOST_
WAIT_ DAYS - The longest wait an owner may set, in days: 365.
- OWN_
RECORDS - The types of NibKeep’s own records of who uses a library, recovery codes among them: an export of current values leaves them out, a merge refuses them, and edits neither give them nor take them away.
- POLICY
- A file’s own choice of policy: a reference to it.
- PORTS
- How many ports from the one asked for an endpoint tries, before it takes any: from 53300 to 53309 by default, one for each library of a computer that waits at once.
- RECOVERY_
FILE - The recovery file’s name, in a replica’s folder and in a backup’s.
- REMOVALS_
AT_ ONCE - How many copies a pass removes at most, so that a device removes a little at a time.
- REPLICA_
VERSION - The version of a replica’s stored files that this engine reads and writes: those of version 1 of the storage specification.
- ROUND_
MILLIS - How long a round of checks takes, in which every copy is read once: 4 weeks.
- STORAGE_
POLICY - The type of storage policies.
- STORAGE_
RULE - The type of the rules that choose a file’s policy.
Traits§
- Backup
Folder - A backup’s folder, as the engine reads and writes it: files and folders under it, named by
their paths from it, with
/between names, such asspaces/<space>/<digest>.pack. On computers, the file system stands behind it; on Android, the folder that the system’s picker gives, which gives files but no paths, never replaces a file in one step, and moves a file only under its own name (technical design: backups). - Thumbnailer
- What reads pictures and makes their thumbnails, which a program brings:
niband apps on a computer bring decoders in memory-safe Rust. An app on Android brings none: it makes thumbnails with the phone’s own decoders and hands them over, throughLibrary::record_thumbnails_made. It runs on several threads at once.
Functions§
- answer
- Waits up to
timeout, or for as long as it takes, for another replica to sync, and answers it, on anetworkthat takes connections: the library is opened for the sync and closed after it, so that other programs can use it in between. A replica that connects while another program has the library open is told to try again later. After a sync, the keys of the spaces are settled, asLibrary::settle_keyssays, and then the checkouts, asLibrary::settle_checkoutssays.Noneif none came in time. - answer_
connection - Answers a connection that another replica opened, as
answerdoes once it accepted one: so that a program can wait for connections without holding its library, and answer each with the library it holds then. Without a library, as when it is locked, the other replica is told to try again later. - ask_
to_ sync - Asks the program that holds the sync role of the replica, whichever it is, to sync with
one other replica, or with all it finds, and waits until it did, for at most
wait: waits first for a program to take the role, if none holds it, and for one that just took it to look for the others on the network, which it connects to at once in its first while (Holding::APPEAR_WAIT). Returns when it asked, after which the holder recorded each sync of the answer (crate::ReplicaRecord::synced); orNoneif no program answered in time.nowis the wall clock, as the holder’s is. - ask_
to_ sync_ each - Asks as
ask_to_syncdoes, for a sync with each of several replicas, as when a file is fetched from the devices that hold it, and waits until the holder answered them all. - backup_
named_ at - The backup that a folder names, if it names one, by its record’s ID.
- backup_
named_ in - The backup that a folder reached through the interface of files names, if it names one, by its record’s ID.
- backup_
wait_ days - How many days a backup waits before purging, as marked: its own number of days, or 30 without one.
- borrow_
network - Borrows the network of a library’s replica, to pair: locks
sync.lent, which tells the holder of the sync role to stop its endpoint, and waits until it records that it runs none, orstopis set; or, if no program holds the role, takes it, so that none starts an endpoint meanwhile. The endpoint starts again once the borrowed network goes. - declare_
phone - Declares that
folderis an app’s own folder on a phone, which no other app reaches, andphonethe phone’s ID, which the app keeps where the system never copies it to another phone: the replicas in it are told from copies by the phone’s ID alone, as the folder’s path may change when the app is updated. - declare_
phone_ with_ disk - Declares an app’s own folder on a phone as
declare_phonedoes, withdisk, a name of the phone that the apps of one developer share, such as Android’s ID for them: replicas of such apps on one phone are on one disk, and count as one copy. - hold
- Holds the sync role of a closed library’s replica, and syncs it, as the technical design’s section on the sync role
says, until
holding.stopis set: runs its endpoint, on which it answers every replica that connects, each sync on a thread of its own, with a library of its own; and connects to the others, one at a time, as it takes the role, when one appears on the network, a while after new changes came, made here or received, and when another program asks. Each change sets off at most one sync with each other replica: one it synced with since the change came is not synced with again. It runs no endpoint while another program borrows the network. Beside the syncs, on a thread of its own, it checks a share of the replica’s copies whenever one is due, asholding.checkpaces it, and after a check that found damage syncs with every replica it finds (Library::check_copies).rngmakes randomness for each thread.toldhears what it does. - holds_
words - Whether a text holds every word of
queryas a search compares them: without regard to case or accents, each a whole word of the text, but the last, which may also start a longer one. A query without words is held by no text. - invite
- Invites a user to a shared space, as a replica of an admin of it: announces the code’s
first two digits on the network, waits as
showingsays for a replica to join with the code, showsconfirmwho asks, and, once it says yes, adds them as a member with the role given, lists the replica that joined, and answers its first sync of the space.networkmust take connections. The code takes tries as inpair. If the first sync fails, the joiner removes the space while the member stays, and a new invitation of the same device makes it that member again; a device listed already comes back so too. Changes are made at the timenowgives when they are made. - invite_
closed - Invites a user to a shared space, as
invitedoes, as a replica of an admin of it whose library is closed: it checks the role before the code is shown, waits asshowingsays, untilstopis set, without the library open, so that other programs use it meanwhile, and opens it once a replica connects, closing it again after a try that failed before the code matched. - is_
safe_ tree_ path - Whether a path is one that a tree may hold, and so one that writing a tree may write:
relative, with
/between its folders, in composed form, at most 4,096 bytes, with no empty name, no.or.., no backslash, which Windows reads as a separator, no zero byte, and no name that any system reads as.gitor.nib, the folders of Git and of the library. - join
- Makes a library in a directory that holds none by pairing a new replica with the
replica that shows
codeon the network, and syncs with it: it tries each that announces the code’s first two digits in turn, waiting up totimeoutto find the first.networkis the new replica’s, started withJoining::network. The keys are protected asprotectionsays. If the first sync fails, the library is removed again, as the sponsor deletes the new replica’s records: the pairing failed. - join_
space - Joins a shared space by the invitation of the replica that shows
codeon the network, and syncs the space with it: it tries each that announces the code’s first two digits in turn, waiting up totimeoutto find the first.networkis this replica’s. If the first sync fails, the space is removed again, and a new invitation makes this replica the same member. The user’s other replicas get the space through the personal space, after their next syncs with this one. - name_
program - Names this program, as the engines file of each replica that it opens records it, such
as
Passwords: once, before it opens a library. A later name, or an empty one, is ignored. A program that names itself nothing is named by its executable’s file name. - pair
- Pairs a new replica, as the sponsor: announces the code’s first two digits on the
network, waits as
showingsays for a replica to pair with the code, records it once it says it made its library, and answers its first sync.networkmust take connections. The code takesCODE_TRIEStries: the one in which it matches spends it, and so does the last of those that fail before it matches;showingis told of the others. If the first sync fails, the new replica’s records are deleted again, as the new replica removes its library: the pairing failed. Changes are made at the timenowgives when they are made. - pair_
ai_ agent - Pairs a new replica of an AI agent named
name, aspairpairs one of the user’s: the change that lists its key marks it as an AI agent’s, for good, and it is named after the AI agent (technical design). - pair_
ai_ agent_ in - Pairs a new replica of an AI agent as
pair_ai_agentdoes, and lists it inspacestoo, besides the personal one, as the person chose (technical design: sharing): its key signs its listing in each as it joins, and it takes each from the personal space, which gives it their first keys. A shared space must allow AI agents, which an admin’s replica says, if it does not yet, once the AI agent’s replica has joined. The AI agent’s replica gets no other space; it is paired anew to change them. - pair_
closed - Pairs a new replica as
pairdoes, with the library closed while it waits for one, so that other programs, and the app itself, can use the library in between: it is opened once a new replica connects to pair, waiting a little for another program to close it, and closed again after a try that failed before the code matched. It stops waiting, as if the time were up, oncestopis set, and gives the secrets aspair_giving_secretsdoes ifwaitingsays so. The caller checks first that this replica may add devices, withLibrary::check_not_ai_agent, before it shows the code. - pair_
device - Pairs a new device of the person’s, as
pairdoes, as they chose: a computer, which gets every space of this device’s, or the spaces chosen, and takes those given to it later; or a phone, which gets the personal space alone, or the spaces chosen, and asks before it takes a space given to it later (technical design). Withgive_secrets, it gives the new device the secrets, aspair_giving_secretsdoes. - pair_
giving_ secrets - Pairs a new replica as
pairdoes, and gives it the secrets, if it asks for them: the person chose to, and they are unlocked. - remove_
unkept - Removes, a little at a time, the copies that this replica no longer keeps, once other
disks have proven theirs (technical design: the planner): plans a pass
(
Library::plan_removals) among the replicas whose endpoints werefoundon the network, syncs with each that is to prove its copies, one after the other, putting the challenges to it, and removes the copies whose proofs came in time (Library::remove_proven), marked inrecordswhile they go; then purges the thumbnails that it made twice (Library::purge_thumbnails_made_twice). First, it destroys what purges destroyed whose wait has ended (Library::destroy_due). - remove_
view_ copies - Removes the copies written for viewers in a program’s folder (
Library::view_copy), as a program does when it starts: the folders named as those copies’ are, with the files in them, and nothing else. Returns how many copies it removed. - resolved_
path - Where
pathis, as the file system resolves it, written as people write it: the form in which a space keeps the path where a file was found, and the folder of a rule. - retry_
in_ use - Calls
open, which opens a library, again while another program has the library open, for up towait:NodeError::in_usesays so. - serial_
disk_ name - What names the disk of a drive known only by its file system’s serial, as Android’s
picker gives it, such as
9CB1-1616for FAT and exFAT: named as a computer names a drive whose serial alone it reads. - sync_
with_ found - Syncs once with each of
peerswhose endpoint is among thosefoundon the network, one after the other, assync_with_othersdoes once it found them: so that a program can look for the others with the library closed, withLibrary::peersandNetwork::find. A peer that was not found is in the result asNodeError::NotFound. - sync_
with_ others - Syncs once with each of the user’s other replicas that it finds on the network within
timeout, one after the other.networkneed not take connections. What is received is checked against the timenowgives when it arrives. - taken_
of - When a photo was taken, of what it says itself,
own, and what where it was found says,given: its own, if it is the same moment, to the second, as given, or the same moment in a time zone of whole quarter hours when it says no offset, which it then gets; else given, as when someone corrected the date where it was found. - tree_
path_ at - The path in the tree at
rootof what is atpath, a full path, whether or not it is there: its folder as the file system resolves the part of it that is there, and the rest as written, relative to the root; empty for the root itself. - tried
- Whether a sync with another replica was tried: those not found are not told of; nor those that refused, as a program there only connects, as one that syncs once connects to this one itself: no sync failed.
- wait_
days - How many days a device waits before purging, as marked: an archive node its own number of days, or 30 without one; an everyday device none.
Type Aliases§
- Wrong
Try - What a device that shows a code is told of each try that failed before the code matched, but the last, which ends the pairing or the invitation with its error instead: why it failed, and how many tries the code has left.