OverviewFilesCommitsIssuesDocsReleasesPeers

favela-peer commits / 451506d

README: a daemon that answers 92 RPCs described itself as not working yet
The file said "Nothing works yet." while lib/ was 22 modules and ~6.3k lines, lib/rpc.js answered 92 methods over the UDS, 342/342 tests (813 asserts) passed, and the daemon was installed and running on tabertron under pgh next to favela-surface and favela-web. The stale part was not only the status line — two design claims had been overtaken. "Two primitives: feed and document" and "a room is not a primitive" were both written before rooms existed. There is no document type anywhere in lib/; grep finds the word once, in a comment about SVG. Meanwhile lib/room.js is 517 lines carrying keet's role vocabulary on autobee, and case 'dm' in rpc.js is literally createRoom() plus one member. The room IS the container and membership IS the audience, so the README now names three primitives — feed, room, namespace — and says what each one's roster means, because feed's is device-flat and room's is two-level and confusing them is how a role ends up belonging to a laptop. namespace.js is 946 lines and had no mention at all. It is a subscription rather than an authority, which is the part worth stating: two people on different namespaces resolve the same string to different feeds, and that is correct. The boundary section is unchanged and still true. test/boundary.test.js enforces it over lib/ and the dependency list, and it passes as part of the 342. Added the operational facts a reader needs first: runs under Bare via pgh, storage ~/.favela, socket ~/.favela/favela.sock, bin/favela.js is the client. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
451506d12e1f9e8248255f90902d81d7100f26ea
by plankatron <fleeky@gmail.com> · 2026-09-09T17:48:00.000Z

Changed files (1) +44 -11

README.md +44 -11
……@@ -1,31 +1,47 @@
11# favela-peer
22
3The favela daemon. Feeds and documents of markdown records over Hypercore.
3The favela daemon. Feeds, rooms and namespaces of markdown records over Hypercore.
44
55**A clean break from atproto and ActivityPub.** Bridges come after the MVP, and they are
66*downstream* — they read this, this never reads them.
77
8Runs under Bare: `bare index.js`. pgh installs it and the launcher runs it; there is no `pear run`
9path and never was. Storage is `~/.favela` and the control socket `~/.favela/favela.sock`
10(`FAVELA_STORAGE` / `FAVELA_SOCK` override both). `bin/favela.js` is the CLI that speaks to it.
11
812## The boundary
913
1014⛔ **This package must not import `atproto-*` or `ap-*`, and must not encode DAG-CBOR, build an MST,
1115mint a DID or sign a commit.** That is the acceptance criterion, not an aspiration
12(`hyper-social` #61 §10). A test asserts it over the resolved import closure.
16(`hyper-social` #61 §10). `test/boundary.test.js` enforces it over `lib/` and the dependency list,
17and it passes.
1318
14Legitimate dependencies: `favela-markdown` (the codec — a library with no storage and no network),
15Hypercore, and hyper-overlay.
19Dependencies of substance: `favela-markdown` (the codec — a library with no storage and no
20network), `favela-identity`, `hyper-identity2`, `hyper-overlay`, Hypercore/corestore/Hyperswarm,
21`autobee`, `keet-identity-key`.
1622
17## Two primitives
23## The primitives
1824
19- **feed** — one identity's log. Its writers are that identity's devices. You have exactly one.
20- **document** — a log with several deliberate writers and a key. Wiki page, DM, private group.
25- **feed** (`lib/feed.js`, `lib/feed-base.js`) — one identity's log. Its roster is DEVICE-FLAT:
26 the writers are that identity's devices. You have exactly one.
27- **room** (`lib/room.js`) — many MEMBERS, each with devices, and membership is the audience.
28 Two levels, so every authorisation question has to be asked at the right one — a role belongs to
29 a person, not to a laptop. The vocabulary is keet's (admin / moderator / peer / read-only); the
30 engine is **autobee**, not autobase, because autobase's `floor(N/2)+1` quorum freezes at N=2 and
31 a person's two devices make N=2 the ordinary posture. A DM is a room with one other member.
32- **namespace** (`lib/namespace.js`) — human names that resolve to feeds. Not an authority, a
33 SUBSCRIPTION: two people on different namespaces resolve the same string to different feeds, and
34 that is correct. Resolution order is handle → self-label → key.
2135
22A *room* is not a primitive. It is the name someone gives a dense cluster of interactions once it is
23obvious there is a thing there — and naming it is a human act, never an automatic one.
36⚠ The earlier model here named a *document* as the second primitive and said a room was never one.
37That was superseded: the room is the container, membership is the audience, and no separate
38document type was ever built.
2439
2540## The record
2641
2742A markdown file: JSON frontmatter plus a body. Mutable, edited in place. Bytes are content-addressed
28in hyper-overlay; the log holds a pointer.
43in hyper-overlay; the log holds a pointer. Because it is mutable, **the rkey is the stable identity,
44never the hash** — see `favela-markdown`.
2945
3046## Interactions
3147
……@@ -33,6 +49,23 @@ A like or a reply is a record in **your own** feed naming a target. Nobody becom
3349someone else's feed to interact with it, so a feed's writer set never grows beyond its owner's
3450devices — and counts are per-observer, never summed.
3551
52The timeline is likewise LOCAL: a pure function of the feeds this node happens to hold. There is no
53relay and no aggregator, so two peers legitimately compute different timelines from the same follow
54list. A feed you follow but have not replicated contributes nothing — which is why `missing()`
55exists: a gap you can name is a different thing from a gap that is silently empty.
56
3657## Status
3758
38Nothing works yet. See `hyper-social` #61 §10 for the build order and §11.2 for what would falsify it.
59**Working.** 0.0.48, installed and running on tabertron under pgh alongside `favela-surface` (the
60renderer) and `favela-web`.
61
62- `lib/` is 22 modules / ~6.3k lines; `lib/rpc.js` answers **92 methods** over the UDS.
63- `npm test` — **342/342 tests, 813 asserts pass** (brittle-bare, ~35s, run 2026-09-09).
64- Covered by tests: feeds, rooms, namespaces, names/handles, device pairing and attestation,
65 browser sessions, files and avatars, the mirror, the follow graph, search, notifications,
66 overlay seeding and replication.
67
68⚠ **10 commits are unpushed.** The forge repo `favela-peer` is at 0.0.38 (`eb3a41d`); local master
69is 0.0.48. `git push pear master`.
70
71See `hyper-social` #61 §10 for the build order and §11.2 for what would falsify it.