Architecture decisions

Short records of the decisions that shaped this project, and the evidence behind them. Each is one page: context, decision, consequences, and what would change our mind.

Most of these rest on research that would otherwise be lost — measured throughput figures, NAT prevalence data, source-level findings in nwaku. Where a number appears, its source is named.

#DecisionStatus
001WireGuard for the data plane, not libp2p streamsaccepted
002Userspace WireGuard, not the kernel moduleaccepted
003Waku as rendezvous, not a live control planeaccepted
004The public logos.dev fleet, not our own clusteraccepted
005Overlay addresses derived from keys, no IPAMaccepted
006Rotating rendezvous topics on a stable shardaccepted
007Separate device and WireGuard keysaccepted
008A bearer network key for v1accepted, temporary
009Probe candidates before setting a WireGuard endpointaccepted
010Ship a container image, not a binaryaccepted
011No mixnet in the data pathaccepted
012Who runs the relay (you may not need a VPS)accepted
013Name resolution: hosts file now, DNS server nextaccepted
014Relay discovery: a flag on the announce, not a separate messageaccepted
015Multiple meshes in one daemonaccepted
016Android reuses the Go coreaccepted
017Invite tokensaccepted, built
018Credentials instead of a shared keyaccepted, mostly built
019An address per serviceproposed; the name router is built
020Membership is a seamaccepted
021A synthetic IPv4 address per peeraccepted; translator built
022A Keycard for the admin keyaccepted; built and proven against a physical card
023Announcing servicesaccepted; built
024Ask the router for a way inaccepted; built and proven
025Control from a desktop appaccepted; settings, mesh on/off, joining and leaving built
026Announce what is bound to the mesh addressaccepted; built, off by default
027Punch through the relay we already haveproposed; reviewed 2026-11-08 — conditions recorded; probe bounds, the two-way roam rule and NAT diagnostics built ahead of the decision, which waits on measuring
028When the fleet turns on RLNproposed; nothing to build yet, two questions to ask
029Disco proves the device, not just the meshaccepted; the first half of Phase 4
030Tailscale-shaped, not Tor-shapedaccepted; scopes four design notes
031Bootstrap from the mesh itselfproposed; after five of six fleet entry nodes refused
032A suffix that cannot be taken awayaccepted; .mesh was never reserved and ICANN's 2026 round has closed; the CLI's hosts file and status follow the daemon's suffix (amended 2026-10-13)
033The card is the admin, not the uidaccepted, built; tiers by what protects an operation
034The admin names the blind relaysaccepted; built
035An Edge node's port is nobody's contractaccepted; built — a tethering phone stranded the old one
036Agents grow out of the meshaccepted; built — Shrooms Agents, a separate app over the mesh; voice by ADR-053, harnesses by ADR-054
037Agents in cages, and off the machineaccepted; cages on the agent's machine built 2026-10-08 (rootless podman, a container per session); krun, Akash and spawning not yet
038Usage is counted by the mesh addressaccepted; built — who asked, where it ran, which model
039On a phone, the app tells the core what it cannot seeaccepted; built — its addresses, and when its node is deaf
040Read-aloud uses the system's voice, set up rather than bundledaccepted; built
041Agents talk A2A, and the mesh is the authenticationaccepted; built — every session an A2A agent, its tools in every session; "a task is a turn" amended by 042
042A task is open until the worker finishes itaccepted; built — supervised by a watchdog, queued, acknowledged
043Peers are probed on evidence, not only on announcesaccepted; built — remembered, answering, after a move, or probing us; roaming without the bus
044Cages reach agents only through their own, which says soaccepted; built — agent port closed in cages, a socket to their own agent, receivers choose (accept_caged); no shrooms control socket in a cage (amended 2026-10-09)
045Sealed cages, for code nobody vouches foraccepted; built — internet only (nothing local, DNS included: amended 2026-10-13), its own token, asks nothing, results in an outbox; the boundary a test that can fail (amended 2026-10-13)
046Metrics on the mesh addressesaccepted; built — tunnels, delivery and interfaces per node; Prometheus + Grafana via deploy/metrics; amended 2026-10-25: each mesh's listener shows only that mesh, the machine's own scraper sees all, first keeps machine series once
047The tasks board lives in the agents' own view, read from the agentsaccepted; built 2026-10-10 — links carry their tasks, cards carry their load, a panel grouped as a person needs it, ACK to the worker's agent
048Files between agentsaccepted; built — push into per-sender folders, allow list empty by default, sealed cages receive only
049Sessions per meshaccepted; built — a session limited to some of its machine's meshes is absent from the others; an unnamed caller is no one
050Basecamp at parity with the phoneaccepted; built — services per mesh, joins off the view's thread, a first join by invite open to the socket group, blind relays with the token never read back; Keycard invites through keycard-basecamp (a real-card run still owed)
051A card lets the socket group renew and revokeaccepted; built — drafts the card signs, finished and verified by the daemon; card-only meshes only; members carry sealing keys
052Backups on our own Logos Storage nodes, encrypted to a Keycardsuperseded by 077 (--block-ttl 0 expires at once) — VPS, proteus and scribe on the office mesh, twice a day, age to a key the card derives; public storage with dispersal when it exists
053Voice notes by Parakeet, a long one in pieces at its pausesaccepted; built — Parakeet v3 at 6-8× real time, no language to pick; over 90 s cut at pauses into minute pieces run at once (406 s in 40 s, not 99 s)
054Harnesses are pluggable, and speak Claude Code's eventsaccepted; built — pi the second, by its RPC mode and its own mcp.json; pinned at 1.1.0 in cages
055Releases go through the publisher, and public ones wait for the owneraccepted; in use — LAN repos first, public ones on a code from the owner's phone, the publisher never signs, Basecamp packages amd64 + arm64
056Agents without a mesh, and Shrooms as the upgradeaccepted; built — the agent always on a socket of its user's, alone on it with no daemon; meshes taken up when they appear, no restart; Basecamp finds it at local; the installer no longer needs shrooms
057A folder caged sessions shareaccepted; built — a cage option: a podman volume at /shared, read-write, one per set of meshes, never in a sealed cage; a volume defined as a bind is refused
058The core tells the Agents view what changedaccepted; built — agentChanged events from shrooms_core 0.26, a 3 s safety-net poll, a stream grows its row only, no infinite animations; ~0.8 core calls/s with a session open, from ~8
059Cages reach their models through the agent, and hold no keysaccepted; built — the agent forwards /llm/<upstream>/ on the cage's socket and adds the credentials; an in-cage forwarder with no secret; harnesses plug in by environment and files (Claude Code in sealed cages, pi in caged ones)
060Caged is your agent, kept in its folderaccepted; built — a cage's harness home is private, with the owner's settings read-only and only its own conversations read-write; one sentence each for not caged, caged and sealed
061OpenCode is a harness, over its ACP serveraccepted; built — opencode acp, streamed turns, the mesh's tools over MCP; no auto-approve (it never asks — measured), no takeover yet; the codec may write while decoding, which is what ACP needs
062A harness comes with everything a session has, cages includedaccepted; built — Cageable is the interface, Claude Code and pi moved behind it unchanged, and OpenCode implements it, CageEnv and Gatewayed; a caged OpenCode session gets a data directory of its own, since its conversations are one database for every project
063What each agent is for: skills and responsibilities, set by the owneraccepted; step 1 being built — A2A skills and a responsibilities extension on each session's card, set per session by the owner, shown by list_agents; step 2 (replies continue tasks, results close once read, evidence it ran) not built
064An agent's schedule is its own Scala calendar, co-owned with the owneraccepted; being built — Scala on each machine syncs over the mesh (a shrooms_mesh bearer for Loam, no delivery node), the VPS bridges to the Logos network; a calendar per session, the owner and that session its only editors; routines in custom fields, checks run without the model and wake it only on a change; runs written back; the agent signs for the session and refuses any other calendar; a change notifies the owner
065The mesh's delivery node is infrastructure: applications run their ownaccepted — the daemon's node serves the mesh alone; an application runs its own (Edge where it can) or reaches one elsewhere over the mesh; no publish or subscribe offered to local programs
066A device name is held by the key that claimed it firstaccepted; built — online or not, until forgotten or revoked; a later claimant answers to name-xxxx; on a mesh with an admin the name is the credential's; without one, names stay first come, first served (audit F-18)
067A Core node relays its own mesh's shard, not the whole networkaccepted; being built — shards set to the mesh's shard for Core, relay_all_shards to relay them all; the pinned library patched (upstream #4513) until the pin moves
068A member can speak for a named LAN host, never for a LANaccepted; built — one LAN device at a time behind a gateway trusted for its LAN, <host>.lan.<gateway>.<mesh>, a derived address (the LAN address on no wire), a separate admin-signed grant members verify (shrooms admin lan), a per-port TCP proxy in a userspace stack; sealed cages can't reach hosts, normal cages can (ADR-060); services now forward to this machine only; amended after the implementation audit: every node's kernel takes only packets addressed to it, a withdrawal closes open connections, a stale serial is refused, and a member may alias a LAN address to a host (lan_aliases); after the re-check, private host addresses only, --name needs a signed name, a gateway stops with its own credential
069The task list takes history=0/since/limit, and a bad one is a 400proposed — measured 589,776 B per poll cycle on the hub; history=0 is 55.3% less on the real reviewer payload
070The owner allows tasks from each cage, not from all of them or noneaccepted; being built — accept_caged_from per session (MACHINE/SESSION or MACHINE/*); a task from any other caged agent is held in A2A auth-required as a request, allowed (standing rule, releases its tasks) or declined (rejected, asker told); amends ADR-044
071Delivery moves to v0.40 one node at a time, behind a build tagaccepted; being built — v0.40.0 (release branch 1a3b6c7d until tagged); internal/waku builds the July binding by default and v0.40's with -tags ld040, one API; QUIC off and kernel-picked ports unless set; payloads read in every encoding; metrics keep their names; one Android library shared with Loam; July and v0.40 tested against each other both ways before any node moves
072A session can start fresh: by its owner always, by other agents only where allowedaccepted; built — "new conversation" in the apps and POST /v1/sessions/{name}/new; another agent asks with a task marked shrooms/fresh, honoured only with the owner's fresh_by_agents (off by default) and nothing else open; a caged session's working directory cleared into a 30-day archive, dot-entries, AGENTS.md and .keep kept, its cage untouched; an uncaged one's never touched
074The delivery node resolves names the way the machine doesaccepted; built — name_servers handed to the library as dnsAddrsNameServers; unset, what /etc/resolv.conf names; a VPN such as Mullvad is a network the machine is on, run over rather than around; settles dns-the-library-insists-on.md
075Shrooms' listeners don't offer multipath TCPaccepted; built — godebug multipathtcp=0 in go.mod and mobile/go.mod; CVE-2026-98432's published exploit went through an MPTCP listener; Shrooms' own listeners were IPv6-only and nothing used MPTCP; the kernel is still the fix
077Shrooms Backup lives in its own repositoryaccepted — github.com/vpavlin/shrooms-backup (restic over Logos Storage, mirrors per source, held deletions, a Keycard key per source); it uses only the daemon's status over the control socket, which is now a contract for applications; supersedes 052
078Files sent to sessions are kept two weeksaccepted; built — uploads/ (uploads and send_file drops) pruned by age at start and hourly, empty folders too; --uploads-keep (0 keeps them); 1.1 GB on five machines on 2026-11-01
079Sessions publish files: a link on the mesh, in a fixed set of placesaccepted; built — publish_file, --files-url or the agent serves them at /files/
080The daemon starts on the last config that did, when an edit is refusedaccepted; built — <config>.last-good after a clean start; refused at load or at startup, it runs on that copy, says so first in shrooms status, and leaves the edit alone
082Daemons update themselves daily, and roll backaccepted; built — install.sh adds shrooms-update.timer (random time per machine): pull, restart only on a new image, roll back to a rollback-<date> tag if shrooms status does not answer within two minutes, skip a refused image