Expand description
Sharing the seat’s memory across machines through the tracker repository that already travels between them.
Each tracker repository names one scope in .ljos/sync.toml: the scope’s
name and the age recipients allowed to read it. Every machine writes only
its own log, .ljos/atoms/<host>.jsonl.age, sealed to those recipients,
so two machines never touch one file and git never has to merge a log.
A log carries the machine’s live atoms of that scope without their
vectors; the receiving pack encodes them again. An atom’s scope is its
scope:NAME entity, else the machine’s default scope.
Import posts every atom of every other machine’s log to this seat’s pack, which answers a text it already holds with the claim it has, so an import twice is an import once. Retirement travels by difference: the texts an import took from a host are remembered, and a text that host no longer sends retires the local copy that came from it, never a claim this machine wrote itself.
Structs§
- Incoming
- What one host’s log asks of this pack: the atoms to post, and the texts it sent last time and sends no longer.
- Scope
- The scope a tracker repository shares:
.ljos/sync.toml.
Functions§
- atom_
scope - The scope an atom belongs to: its
scope:NAMEentity, elsedefault. - exchange_
user_ rules - Share user rules through a tracker checkout. Nothing leaves this
machine unless the tracker’s
.ljos/sync.tomlnames a scope: then the tracker is fetched, every host’s rules are merged with the local file by id, and this machine’s rules are sealed with age to the scope’s recipients, committed as.ljos/user-rules/<host>.json.ageand pushed. A plaintext<host>.jsonthis machine wrote before is removed in the same commit. Plaintext files from other hosts are still read. With no scope, orLJOS_TRACKER_GIT=offin passing, the rules already in the checkout are read and the tracker is not touched.LJOS_TRACKER_GIT=commitcommits and pushes nothing.askedisljos prefer --user --sync, which pushes whateverLJOS_TRACKER_GITsays.budgetbounds every git call. A fetch that does not return leaves the local file as it was. - export
- Write this machine’s log for the repository’s scope when its atoms
changed since the last write. Returns the line that says what happened.
A missing
ageskips the seal and is not an error. - host
- This machine’s short host name.
- identity_
path - This machine’s age identity, made on first use.
- import
- Import every other machine’s log of the repository’s scope into this seat’s pack. Returns one line per host.
- incoming
- Read one host’s log against the texts taken from it last time
(
before, for what it retired) and the texts from it this pack already holds (held, which are not posted again). - is_own
- Whether this machine holds an atom as its own rather than as an import.
- log_
plaintext - The plaintext of this machine’s log for a scope: its own live atoms of that scope, sorted by id, one JSON object a line.
- public_
key - The public key of this machine’s identity, making the identity first when
there is none. This is what goes into a scope’s
recipients. - scope_
for_ issue - The scope of the repository that holds an issue, when it declares one.
- scope_
of_ repo - The scope a tracker repository declares, when it declares one.
- sender_
entity - The entity an imported atom carries: which machine sent it.
- sync_
repo - One pass over the tracker repository’s scope: pull, take every other
machine’s log, write and push this machine’s.
pull_importandexportpick the halves; the sitting takes the first, finish the second. - sync_
repo_ in_ passing sync_repoas the sitting and finish run it: a repository with no scope file is skipped without a word. Sync is opt-in, and a hint on every sitting pointed agents at a remote the person had not asked for.ljos syncby hand still names the missing file.- travelling
- An atom as it travels: without its vector, and without a sender tag of another machine, since a host sends only what it holds as its own.
- user_
rule_ trackers - Tracker checkouts that carry user rules. A guessed working directory is
not one: that is the tree the seat was started in, not the repository
that travels between machines.
LJOS_USER_RULES_SYNC=offnames none. In tests the variable has to be set to something other thanoffbefore a tracker is read, so an unset shell does not sync the login’s rules.