Expand description
Folder remotes (SPEC 9.6): a local or network directory holding one subfolder per machine, written only by that machine:
<path>/<store_id>/<machine_id>/
machine.json written last
store.git/ repo-per-machine: a bare repository
latest/ mirror: the HEAD tree and EXPORT.json
archives/ archive: surjection-<yyyymmdd-hhmmss>-<shortsha>.zipReaders accept only names of that grammar (ULID store and machine
folders, the files above) and only the ids machine.json lists;
everything else is skipped, and names that match a sync tool’s conflict
or temp pattern, or refs machine.json does not list, are reported as
sync_artifact_ignored. Nothing a reader skips is ever deleted.
A remote that is not there (remote_unreachable) never blocks local
work; Surjection never creates the remote’s own folder or mounts anything.
Structs§
- Export
- The store files of an exported tree (mirror or zip), without
EXPORT.json, and the sync tool artifacts skipped on the way (adesktop.inior a conflicted copy inlatest/is not a store file). Paths that are not plain store-relative paths (absolute,..,.git) are refused (zip-slip). - Listing
- What a folder remote holds.
- Machine
Entry - One machine of a folder remote, from its
machine.json. - Pull
Report - What a pull did.
- Push
Outcome - What a push wrote.
- Sibling
Pull - What merging one incoming head did: a sibling machine of a folder
remote, or a git remote’s
main(no machine).
Enums§
- Source
- Where a restore takes a store from (
surject restore --from). - Source
Choice - A path given to
restore --from: one source, or a folder remote whose machines the user picks from.
Functions§
- export_
files - export_
zip - The store at
revas a zip withEXPORT.json(whatrestore --fromreads, SPEC 10 item 5), and its namesurjection-<ts>-<shortsha>.zip. - list
- Lists the machines under
root(of storestore_id, or of every store), reporting sync artifacts on the way. - open_
source - Opens
pathfor a restore: a zip, a bare repository, a mirror, a machine subfolder, or a folder remote (machinepicks by id or exact label; an ambiguous label fails and names the ids). - pull
- Pulls every sibling machine of this store from a folder remote and
merges each head (SPEC 9.9). Conflicts go to
state/merge/MERGE_STATE.json; HEAD stays where it was for them. - push
- Pushes the store to a folder remote, in its mode.
- reachable_
root - The directory a folder remote resolves to now, or
remote_unreachable.