OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-social commits / 1424958

Update design doc: room-meta uses _hs pinned messages, not setConfig
keet-core config only supports 5 built-in keys. Custom metadata (topics, type, discoverable, bridgedTo, etc.) stored as pinned _hs:room-meta messages instead. Updated Room Types, Metadata Vocabulary, Migration Step 1, and code estimates sections. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
14249588154f5810611565b42bc65f63de1c75ac
by plankatron <fleeky@gmail.com> · 2026-02-21T14:05:19.000Z

Changed files (1) +37 -18

docs/ROOMS-ARE-THE-COMPUTER.md +37 -18
……@@ -38,8 +38,9 @@ NEW (1 Autobase type, all keet-core):
3838
3939| Capability | How | Multi-writer? |
4040|-----------|-----|--------------|
41| Arbitrary key-value metadata | `setConfig(roomId, key, value)` | Yes (any admin) |
42| Structured data exchange | Messages with JSON payloads | Yes (any member) |
41| Built-in metadata | `setConfig(roomId, key, value)` — 5 keys: title, description, avatar, supportedLanguages, blindPeers | Yes (any moderator+) |
42| Custom metadata | Pinned `_hs:room-meta` message (topics, type, discoverable, etc.) | Yes (any admin can edit) |
43| Structured data exchange | Messages with `_hs` JSON payloads | Yes (any member) |
4344| Access control | Roles: admin, moderator, peer, read-only | Yes (admin manages) |
4445| Identity | Member profiles: name, avatar, username | Yes (each member) |
4546| Replication | Hyperswarm + Autobase | Automatic |
……@@ -47,6 +48,8 @@ NEW (1 Autobase type, all keet-core):
4748| Invites | `createInvitation(roomId)` | Yes (admin) |
4849| Real-time updates | Push events via subscription | Automatic |
4950
51**Note on config:** keet-core's `setConfig` only supports 5 predefined keys. Custom metadata (topics, type, discoverable, bridgedTo, etc.) is stored as a pinned `_hs:room-meta` message in the room. This is consistent with all other hyper-social conventions — everything custom goes through `_hs` messages.
52
5053Every feature that a "discovery registry Autobase" provides is already available through room primitives. The registry was a room with extra steps.
5154
5255## Room Types (Convention, Not Code)
……@@ -56,17 +59,15 @@ A room's purpose is declared by a config key. No new Autobase schemas. No new da
5659### Chat Room (default)
5760
5861```javascript
62// keet-core built-in config (5 keys only):
5963room.config = {
60 type: "chat", // or absent — default behavior
6164 title: "Rust P2P Dev",
6265 description: "Building distributed systems in Rust",
63 topics: ["rust", "p2p", "systems"],
64 discoverable: true, // opt-in to DHT topic announcement
65 bridgedTo: [ // set by bridge bots when they connect
66 { platform: "irc", network: "libera", channel: "#rust-p2p" }
67 ],
68 relatedRooms: ["roomId1", "roomId2"] // admin-curated links
66 avatar: { small: "...", ... }
6967}
68
69// Pinned _hs:room-meta message (custom metadata):
70{"_hs":"room-meta","type":"chat","topics":["rust","p2p","systems"],"discoverable":true,"bridgedTo":[{"platform":"irc","network":"libera","channel":"#rust-p2p"}],"relatedRooms":["roomId1","roomId2"]}
7071```
7172
7273### Registry Room
……@@ -74,15 +75,16 @@ room.config = {
7475A room whose purpose is listing other rooms. Members post structured messages as room listings. The room's membership and roles control who can list rooms.
7576
7677```javascript
78// keet-core built-in config:
7779room.config = {
78 type: "registry",
7980 title: "Berlin P2P Meetup",
8081 description: "Rooms for the Berlin Hypercore community",
81 topics: ["berlin", "p2p", "meetup"],
82 avatar_small: "base64...", // group icon
83 avatar_large: "base64..."
82 avatar: { small: "base64...", ... }
8483}
8584
85// Pinned _hs:room-meta message:
86{"_hs":"room-meta","type":"registry","topics":["berlin","p2p","meetup"]}
87
8688// Listing a room = posting a structured message:
8789{
8890 type: "room-listing",
……@@ -178,7 +180,18 @@ The client provides a "Share Room" action: pick a room, pick contacts from your
178180
179181## Room Metadata Vocabulary
180182
181These are conventions for `setConfig` keys. No code changes to keet-core needed. Any room can use any of these.
183Room metadata lives in two places:
184
185**keet-core config** (5 built-in keys, moderator+ can write):
186```
187title : string — Room title (built-in)
188description : string — Room description (built-in)
189avatar : object — Room avatar with small/large (built-in)
190supportedLanguages : string — Language codes (built-in)
191blindPeers : array — Blind peer mirrors (built-in)
192```
193
194**`_hs:room-meta` pinned message** (unlimited custom keys, admin can edit):
182195
183196### Content Metadata
184197
……@@ -195,7 +208,7 @@ Enables: content-based clustering, DHT topic discovery, search.
195208```
196209relatedRooms : string[] — ["roomId1", "roomId2"] (admin-curated links)
197210parentRoom : string — "roomIdX" (thread/sub-room relationship)
198bridgedTo : object[] — [{platform, network, channel}] (set by bridge bots)
211bridgedTo : object[] — [{platform, network, channel}] (admin sets after bridge announces)
199212```
200213
201214Enables: explicit graph edges, hierarchy, cross-platform topology.
……@@ -203,7 +216,7 @@ Enables: explicit graph edges, hierarchy, cross-platform topology.
203216### Discovery Metadata
204217
205218```
206discoverable : "true" — opt-in to DHT topic announcement
219discoverable : boolean — opt-in to DHT topic announcement
207220invitePolicy : string — "open" | "invite-only" | "approval"
208221publicDescription : string — what non-members see (may differ from description)
209222```
……@@ -213,7 +226,7 @@ Enables: DHT discovery, invite flow, privacy control.
213226### Type Metadata
214227
215228```
216type : string — "chat" | "registry" | "dm" (RoomType=2, set by keet-core)
229type : string — "chat" | "registry" (DMs are RoomType=2, set by keet-core)
217230```
218231
219232Enables: room type conventions, UI behavior switching.
……@@ -551,7 +564,7 @@ Each step is independently deployable. The existing app works at every stage.
551564
552565### Step 1: Add room metadata conventions
553566
554Set `topics`, `discoverable`, `type` on rooms via `setConfig`. No Autobase changes. No UI changes. Just establishing conventions.
567Add `_hs:room-meta` message support to keet-daemon. A room's custom metadata (topics, type, discoverable, etc.) is stored as a pinned `_hs:room-meta` message. keet-core's built-in config (title, description, avatar) stays as-is — only 5 predefined keys are supported by keet-core. New daemon routes: `meta.get(roomId)`, `meta.set(roomId, metadata)`. No Autobase changes. No UI changes yet. Just establishing conventions and the message-based metadata layer.
555568
556569### Step 2: Add DM support to godot-keet
557570
……@@ -629,6 +642,9 @@ Rendering: clients that understand _hs render type-specific UI cards
629642**Message types:**
630643
631644```javascript
645// Room metadata (pinned in any room — the room's custom config)
646{"_hs":"room-meta","type":"chat","topics":["rust","p2p"],"discoverable":true,"category":"development","language":"en","relatedRooms":["roomId1"],"bridgedTo":[{"platform":"irc","network":"libera","channel":"#rust-p2p"}]}
647
632648// Room share (posted in DMs)
633649{"_hs":"room-share","roomId":"abc123","title":"Rust P2P Dev","topics":["rust","p2p"],"inviteToken":"xyz789","sharedAt":1708402400000}
634650
……@@ -640,6 +656,9 @@ Rendering: clients that understand _hs render type-specific UI cards
640656
641657// Wiki entry (posted in any room, pinnable)
642658{"_hs":"wiki","title":"How to set up Hyperswarm","content":"## Step 1\n\nInstall the package...","editedBy":"member:alice0","editedAt":1708402400000}
659
660// Bridge announcement (posted by bridge bot, admin endorses via room-meta)
661{"_hs":"bridge-announce","platform":"irc","network":"libera","channel":"#rust-p2p","botMember":"member:bridge-irc-bot0"}
643662```
644663
645664**Operations map to existing message APIs:**