OverviewFilesCommitsIssuesDocsReleasesPeers

atproto-room commits / ff48392

README: presence elects the signer, not the lease; add Install and Test
The README described "a single lease-elected signer" and listed lease.js as the election mechanism. signer-presence.js -- in this very package -- replaced it: the __lease__ ts-heartbeat wrote a wall-clock timestamp to an append-only log every ~8s forever, ~20MB/day unreclaimable. Same correction already made in hyper-proto-peer, whose swarm-device.js marks the lease LEGACY in as many words. Lease kept in the table, marked legacy, because it still exists and diag still reports it. Also documented signer-presence-channel.js and pairing.js, which were unlisted, and added Install, Test and License. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ff483922f6cd44ea105be4fc5e35fb8f3b9cb6c1
by plankatron <fleeky@gmail.com> · 2026-09-10T16:56:14.000Z

Changed files (1) +28 -4

README.md +28 -4
……@@ -3,19 +3,39 @@
33The **shared room engine** for co-owned atproto identities — the substrate behind a multi-device
44[hyper-proto-peer](../hyper-proto-peer) and a co-owned Favela community
55([favela-node](../favela-node)). This is the **multiswarm-PDS pattern**: N attested writers co-own one
6autobase; a single lease-elected signer produces byte-identical signed output, so authority is shared with
6autobase; a single presence-elected signer produces byte-identical signed output, so authority is shared with
77no single point of key custody and no fork on failover.
88
9## Install
10
11```sh
12npm install atproto-room
13```
14
15Consumed as a sibling `file:` dependency by [hyper-proto-peer](../hyper-proto-peer) and
16[favela-node](../favela-node) rather than from a registry.
17
18## Test
19
20```sh
21npm test # bare test/all.js
22npm run test:units
23```
24
25Bare runtime — `postinstall` runs `scripts/bare-deps.mjs`.
26
927## Pieces (`lib/`)
1028
1129| Module | Role |
1230|---|---|
1331| `state-base.js` (`StateBaseV3`) | attestation-gated, **encrypted** multi-writer room (Autobase + HyperDB view). Admission is cryptographic + in-apply: a joiner proves it's a device attested to the room's root identity, then is `addWriter`ed. |
1432| `membership.js` | binary attestation admission (keet-identity-key root→device chains) — the N devices of ONE DID, all role-equal. |
15| `lease.js` (`Lease`) | one active signer at a time; TTL failover-safe. |
16| `signer.js` | the lease-holder materializes the linearized record view into ONE canonical signed atproto commit under the shared `#atproto` key (RFC6979-deterministic → byte-identical across holders). |
33| `signer-presence.js` (`SignerPresence`) | **elects the signer.** Lowest-keyed device among currently-CONNECTED co-owners, computed in RAM, appending nothing. A `graceMs` window (15 s) absorbs blips; a currency filter stops a behind co-owner winning, which would freeze the chain against the forward-only sign gate. |
34| `lease.js` (`Lease`) | **legacy.** The `__lease__` ts-heartbeat wrote a wall-clock timestamp to the append-only log every ~8 s forever (~20 MB/day, unreclaimable) — which is why it was replaced. Still present and still reported by diag, but it does not gate signing. |
35| `pairing.js` | device pairing. |
36| `signer.js` | the elected signer materializes the linearized record view into ONE canonical signed atproto commit under the shared `#atproto` key (RFC6979-deterministic → byte-identical across holders). |
1737| `repo-base.js` (`RepoBase`) | the atproto repo op layer over the shared state (put/del/list records). |
18| `label-base.js` / `label-room.js` / `label-signer.js` | the **co-authored labeler**: N mods append label intents; the lease-holder signs them into a shared `__label__` log; `projectTo` serves a byte-identical `com.atproto.label` feed from any node. |
38| `label-base.js` / `label-room.js` / `label-signer.js` | the **co-authored labeler**: N mods append label intents; the elected signer signs them into a shared `__label__` log; `projectTo` serves a byte-identical `com.atproto.label` feed from any node. |
1939| `serve-membrane.js` | project the shared `__commit__` log + records into served cores (what the keyless membrane fronts). |
2040
2141## Design invariants
……@@ -30,3 +50,7 @@ no single point of key custody and no fork on failover.
3050
3151Lineage: reskinned from keet-daemon / hyper-tps per-room `StateBaseV3`; extracted here as the engine
3252consumed by hyper-proto-peer (repo devices) and the co-authored labeler.
53
54## License
55
56Not yet declared.