pkg:clod/com.clodhub/room-directory 0.11.0 Lists open rooms, announces changes to watching screens and lets a person join by code. `room-directory` keeps one summary of every room (id, status, player count, names, optional join code), tells every watching home screen the whole list again after each change, and answers what the enter button should do (join, rejoin, watch, full) and which room a typed code names. The server part is a directory object class built on an injected runtime base class; the client parts are a list watcher for web and pure list logic for Apple and Android. Examples A home screen shows three rooms; the second is mid-game so its button says watch; a person types a code with spaces and lower case and the right room is selected; the server restarts and the list is restored from storage; the connection drops and the screen says the server cannot be reached until the next list arrives. Package URL: pkg:clod/com.clodhub/room-directory@0.11.0 Class: Room directory (pkg:clod/com.clodhub/room-directory-class@1.1.0): The list of rooms with their status and who is in them, kept current. Any component of this class can fill a recipe slot that asks for it. Category data-and-storage/directories; https://clodhub.com/classes/room-directory-class.txt; 0 other components of this class: https://clodhub.com/components.txt?class=pkg%3Aclod%2Fcom.clodhub%2Froom-directory-class Provides (1) - room-directory (com.clodhub/room-directory 1.0.0): One summary of every room for the home screens. Pure list operations (server/directory-core.ts; the same rules in Swift as static functions of enum RoomDirectory and in Kotlin as top-level functions of package com.clodhub.directory), the Directory Durable Object class (server/directory.ts, platform base class injected), the ndjson export and import of its stored list (server/directory-migration.ts) and the web watcher (web/directory-client.ts). Methods are tagged with the languages that provide them. The object's requests are in interfaces/room-directory-http.json (OpenAPI 3.1.1) and its live list in interfaces/room-directory-live.json (AsyncAPI 3.1.0). components that use it: https://clodhub.com/components.txt?requires=com.clodhub%2Froom-directory Requires (1) - room-session (com.clodhub/room-session 1.0.0): Persistent private game rooms on Cloudflare Durable Objects and the clients that reach them. Server: createRoomClass and createWorker (server/index.ts, server/worker.ts; constants POLL_MS 25000, MAX_DISPLAYS 6, DISPLAY_IDLE_MS 3600000, LIVE_MS 75000). Clients: Live (web/live.ts), LiveConnection (Swift), RoomTransport (Kotlin). The HTTP routes are in interfaces/room-session-http.json (OpenAPI 3.1.1) and the live messages in interfaces/room-session-live.json (AsyncAPI 3.1.0). The directory object is not provided here: rooms call the DIRECTORY namespace, which the application binds to room-directory's createDirectoryClass. components that provide it: https://clodhub.com/components.txt?provides=com.clodhub%2Froom-session Settings (2) Two settings. `roomCapacity` is the number of seats after which an open room shows as full (default 9). `maxConnections` caps the watching connections the directory accepts (default 1000, the recipe's large band; the recipe may lower it from the scale answer). - roomCapacity: integer; optional, default 9 - maxConnections: integer; optional, default 1000 Depends on components: none How to use in a recipe A recipe uses it through a slot of class Room directory (pkg:clod/com.clodhub/room-directory-class 1.1.0), naming pkg:clod/com.clodhub/room-directory as the slot's preferred component or substituting it for another component of the class. The recipe connects what it provides (room-directory) to the slots that use it. It fills what the component needs (room-session) from slots whose components provide it. The recipe sets roomCapacity and maxConnections; any it leaves out takes its default. - as a slot in recipe.json components: {"id":"room-directory","class":{"name":"pkg:clod/com.clodhub/room-directory-class","version":"1.1.0","digest":"cdc42d88ce604cdd24818e5aaf37a0db41483559d34ba4557cfe1caeaa581870"},"preferred":{"name":"pkg:clod/com.clodhub/room-directory","version":"0.11.0"}} - in place of another component of the class: clod fetch room-directory@0.11.0 --store store --from https://clodhub.com, then clod design RECIPE@VERSION --store store --answers answers.json --substitute SLOT=room-directory@0.11.0 --out definition.json Used by recipes: pkg:clod/com.clodhub/ourpoker-recipe 0.13.0 (slot room-directory) For developers: how an application uses it Server: `createDirectoryClass(DurableObjectBase, { roomIds, maxConnections })` returns the directory class; rooms announce themselves with `POST` (upsert) and `DELETE ?id=`. The application can pass `roomIds` for rooms that always exist; each is asked directly the first time it is missing. Web: `watchRooms(connect, onChange)` takes a connector with the shape of the realtime-rooms `Live` class and reports only changed lists and changes of server reachability. Apple and Android: decode the `{type:"rooms"}` message into `RoomInfo` and use `RoomDirectory.entryAction`, `describe`, `findByCode`. `examples/consumer.ts` runs a home screen without the game. The component expects the room-session component to supply the rooms that post their entries and the `/room` summary route used to ask a missing room; it imports nothing from it. Accounts and services The directory object needs a hosting runtime that provides a durable object with storage and WebSocket acceptance (Cloudflare Workers in the recipe). Local tests use fakes and no accounts. Cost and capacity are unmeasured. How it is checked Required-local: `node --test tests/web.test.ts` checks list operations, join by code, entry actions, change detection, the directory object with fake storage and sockets (list, update, announce, remove, restart, upgrade and cap checks, deploy restart), the web watcher and the example. Platform: `python3 tests/native.py apple` compiles and runs the Swift checks against `tests/fixtures/rooms.json`; `python3 tests/native.py android` compiles the Kotlin checks (needs kotlinc, not installed on the authoring machine, so not run there). - `node --test tests/web.test.ts` (web, required-local; tools: node 26.5) - `python3 tests/native.py apple` (apple, platform; tools: python3 3.12, swiftc 6.4) - `python3 tests/native.py android` (android, platform; tools: python3 3.12, kotlinc 2.2, java 26.0) Updates Patch updates replace files. `migration.json` describes store `rooms` (schema `interfaces/room-directory-state.schema.json`, ndjson export and import in `implementation/server/directory-migration.ts`, tested). The stored map is under key `rooms` in the object named `home`; an application binds `DIRECTORY` to this component's class under the class name `Directory`. The stored room list is a rebuildable summary: removal can delete it with no loss. Tags: data-and-storage, directories, directory, room Targets: client android, ios, macos, tvos, web, windows; server hosting-provider, own-hardware Publisher: George McIntyre (george-mcintyre) Guardians: Level N Ltd (guardian key 08775f20) Source: clodhub/room-directory release v0.11.0; digest sha256:1b3408208daf73fc0c72aaf00671783ad3fe88a5cfc3fa26d74d30ac61677695 Release: features Line 0.11: no security releases Quality: Integration-tested, certified Known vulnerabilities: none known (checked 2026-11-26 at OSV); https://clodhub.com/api/components/room-directory/0.11.0/vulnerabilities Downloads: 1 in 30 days; 1 of this version Classes: https://clodhub.com/classes.txt; this component as JSON: https://clodhub.com/api/components/room-directory/0.11.0 Bundle download: GET https://clodhub.com/api/components/room-directory/0.11.0/bundle returns a link valid for one hour Implements: pkg:clod/com.clodhub/room-directory-class@1.1.0 cdc42d88ce604cdd24818e5aaf37a0db41483559d34ba4557cfe1caeaa581870 com.clodhub/room-directory 1.0.0 entry modules: android android/src/main/java, ios apple/Sources, macos apple/Sources, server server/index.ts, tvos apple/Sources, web web/index.ts, windows web/index.ts shared behaviour suites: shared Platforms: android, ios, macos, server, tvos, web, windows Toolchains: android >=8.0.0, ios >=17.0.0, java >=17.0.0 <27.0.0, kotlin =2.4.21, macos >=14.0.0, node >=26.5.0 <27.0.0, swift =6.4.2, tvos >=17.0.0 Frameworks: none Styles: scope none; 0 namespaces; 0 conflicts Licence: Apache-2.0; 0 upstream sources, 0 exact dependencies, 36 files (listed on the details page) Suitable for jobs: room-directory profile any: cost none; load concurrentPeople 1000; regions any; compliance none; any durable-object runtime any Notes: Pure list logic has no cost. The directory object runs wherever the injected runtime base class exists; the recipe uses Cloudflare Durable Objects (see realtime-rooms). Data migration: stores rooms (com.clodhub/room-directory-state 1.0.0); formats ndjson; requires stop no; retention 0 days Maintainers: Level N Ltd; https://github.com/clodhub/room-directory/issues; updates https://github.com/clodhub/room-directory/releases (manual) What you download room-directory-0.11.0.tar, from release v0.11.0 of clodhub/room-directory: 36 files - Documents and manifests (9): CONTRACT.md, INSTRUCTIONS.md, LICENCE, NOTICE, PROVENANCE.md, SOURCE.md, ... - Source code (8): android/ (1), apple/ (1), server/ (4), web/ (2) - Tests (5): android/ (1), apple/ (1), fixtures/ (1), native.py, web.test.ts - Interface documents (5): required-room-session.json, room-directory-http.json, room-directory-live.json, room-directory-state.schema.json, room-directory.json - Class files: the class's interfaces and shared checks (3): room-directory-class/ (3) - Examples (1): consumer.ts - Diagrams (5): definition.json, examples/ (1), output/ (3) Installing copies 8 of them into the application under components/room-directory/: android 1, apple 1, server 4, web 2 Not included: the components that provide what it requires (com.clodhub/room-session), each a separate download; the values of its settings, which the recipe writes; any secret The archive is a release file on the publisher's public GitHub repository; ClodHub keeps this page and a pointer to the release, not the code. clod checks the archive's sha256 fingerprint before anything is copied, and installing runs none of the package's code. Versions - 0.11.0 features (2026-11-26T11:31:23.308Z) sha256:1b3408208daf73fc0c72aaf00671783ad3fe88a5cfc3fa26d74d30ac61677695 Links Details (package foundations, upstream sources, exact dependencies, styles, class inventories, files): https://clodhub.com/components/room-directory/details.txt?version=0.11.0 Page: https://clodhub.com/components/room-directory; JSON: https://clodhub.com/api/components/room-directory/0.11.0; connections diagram: https://clodhub.com/api/components/room-directory/0.11.0/connections.svg Copyright Level N Ltd 2026