pkg:clod/com.clodhub/seating 0.11.0 Seats for a table: random or ordered seating, joining under a checked name, leaving, returning to an existing stack, removing a player and the host's controls, for people and computer players. `seating` decides who sits where. It holds the seat list of a table (people and computer players), joins a person under a name the guest-identity rule accepts, gives the lowest free seat, refuses a full table or a taken name, lets people leave, lets a person who leaves a running game return to the same seat and stack, removes players, tells who may start the game or add a computer, and fixes seat numbers when a game starts (shuffled, or in the order people sat). It knows nothing about the game played at the table. Examples Three people and a computer sit in a nine-seat room: numbers 1 to 4 are given in join order, then fixed at random when the host starts. A person leaves a running game and later returns to the same seat and stack; with `returnToStack` off the way back is shut. The host removes a computer player; with `hostRemovesPeople` on, a person too. Package URL: pkg:clod/com.clodhub/seating@0.11.0 Class: Seating (pkg:clod/com.clodhub/seating-class@1.1.0): Seats at a table: taking, leaving and starting when enough are taken. Any component of this class can fill a recipe slot that asks for it. Category games/tables-and-seating; https://clodhub.com/classes/seating-class.txt; 0 other components of this class: https://clodhub.com/components.txt?class=pkg%3Aclod%2Fcom.clodhub%2Fseating-class Provides (1) - seating (com.clodhub/seating 1.0.0): Seats for a table of people and computer players. Build the component once with createSeating(settings, identity); methods named `Seating.` are members of the object it returns. Every member takes a state and returns a new one, never changing its input. Server: TypeScript `implementation/server/seating.ts` and `implementation/server/migrate.ts` (exportAll, importAll). Client lobby rows: TypeScript `implementation/web/lobby.ts`, Swift `implementation/apple/Sources/SeatRows.swift`, Kotlin `com.clodhub.seating` `SeatRows.kt` (seatRows, canTakeSeat; Swift and Kotlin take the same values as structs and enums). components that use it: https://clodhub.com/components.txt?requires=com.clodhub%2Fseating Requires (1) - guest-identity (com.clodhub/guest-identity 1.0.0): Guests known by the name they type, with private bearer tokens that rotate. Pure functions over a plain book (server/identity.ts, storage belongs to the caller), the same functions with the settings bound once (createIdentityApi, what seating and realtime-rooms call), and a device-side store of the name and per-slot tokens (web/identity-store.ts, Swift and Kotlin IdentityStore with NameRules). Methods are tagged with the languages that provide them. Over the wire a client sends {name}, the server answers {token, playerId}, later requests carry Authorization: Bearer , and a response may carry a rotated token. components that provide it: https://clodhub.com/components.txt?provides=com.clodhub%2Fguest-identity Settings (5) Settings (all optional): `minimumPlayers` (default 2), `maximumPlayers` (default 9, also the number of seats round the table), `seating` (`random` or `order`, default `random`), `returnToStack` (default true) and `hostRemovesPeople` (default false: only computer players can be removed). They map to the house-rules file entries `players.minimum`, `players.maximum`, `players.seating` and `players.return_to_existing_stack_allowed`. - minimumPlayers: integer; optional, default 2 - maximumPlayers: integer; optional, default 9 - seating: string (identifier); optional, default "random" - returnToStack: boolean; optional, default true - hostRemovesPeople: boolean; optional, default false Depends on components: none How to use in a recipe A recipe uses it through a slot of class Seating (pkg:clod/com.clodhub/seating-class 1.1.0), naming pkg:clod/com.clodhub/seating as the slot's preferred component or substituting it for another component of the class. The recipe connects what it provides (seating) to the slots that use it. It fills what the component needs (guest-identity) from slots whose components provide it. The recipe sets minimumPlayers, maximumPlayers, seating, returnToStack and hostRemovesPeople; any it leaves out takes its default. - as a slot in recipe.json components: {"id":"seating","class":{"name":"pkg:clod/com.clodhub/seating-class","version":"1.1.0","digest":"4ba5c61697fc700fc75463e0227907774d7bc4fb2acc6ceec19226a07b0cba0d"},"preferred":{"name":"pkg:clod/com.clodhub/seating","version":"0.11.0"}} - in place of another component of the class: clod fetch seating@0.11.0 --store store --from https://clodhub.com, then clod design RECIPE@VERSION --store store --answers answers.json --substitute SLOT=seating@0.11.0 --out definition.json Used by recipes: pkg:clod/com.clodhub/ourpoker-recipe 0.13.0 (slot seating) For developers: how an application uses it Build it once with `createSeating(settings, identity)` from `implementation/server/seating.ts`; `identity` is guest-identity's `createIdentityApi(settings)`, an object with `validName(name)` that has `nameMinLength` and `nameMaxLength` bound. Every operation takes a state and returns a new one. The turn engine keeps the seat state inside the game state and calls `join`, `leave`, `leaveRunning`, `mayReturn`, `remove`, `canStart`, `canAddComputer`, `assign` and `retain`; computer-players calls `join`, `find`, `findByName`, `isFull` and `canAddComputer`; tournament calls `list`, `find` and `people`. Clients use `seatRows` (web `implementation/web/lobby.ts`, Apple `SeatRows.swift`, Android `SeatRows.kt`) to turn a view's players into lobby rows; screens, icons and language text stay with the recipe. Accounts and services No service is deployed. The seat state is part of the game state the room stores; nothing else is kept. No accounts or keys. How it is checked `node --test tests/web.test.ts` checks settings, joining, names checked by the identity's `validName`, full tables, random and ordered seating (every permutation reachable), returning to a stack, removal rules, start and add-computer checks, retain/compact/ring helpers, seat rows, the runnable consumer and export/import with checksums. `python3 tests/native.py apple` compiles and runs the Swift seat-row checks. `python3 tests/native.py android` is written for Kotlin 2.2 but was not run on the extraction machine (no kotlinc). `authoring/integration.test.ts` (not packaged) runs seating over the real guest-identity sibling. - `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; the seat state shape is `interfaces/seating-state.schema.json` version 1.0.0 and `migration.json` describes export and import of seat assignments as newline-delimited JSON with a checksum per record. Removal deletes the owned sources and the application's imports; the application's stored seat assignments stay in the room's own storage. Tags: games, seating, tables-and-seating Targets: client android, ios, macos, tvos, web, windows; server none Publisher: George McIntyre (george-mcintyre) Guardians: Level N Ltd (guardian key 08775f20) Source: clodhub/seating release v0.11.0; digest sha256:dca922e7df22308a7ac15a0e1faf7bcb23c22535b9c79814463665e401eb2e1c 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/seating/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/seating/0.11.0 Bundle download: GET https://clodhub.com/api/components/seating/0.11.0/bundle returns a link valid for one hour Implements: pkg:clod/com.clodhub/seating-class@1.1.0 4ba5c61697fc700fc75463e0227907774d7bc4fb2acc6ceec19226a07b0cba0d com.clodhub/seating 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, 33 files (listed on the details page) Suitable for jobs: seating profile any: cost none; load none; regions any; compliance none Notes: Pure library; the seat list is part of the room's own stored state, a few hundred bytes. Data migration: stores seat-assignments (com.clodhub/seating-state 1.0.0); formats ndjson; requires stop no; retention 0 days Maintainers: Level N Ltd; https://github.com/clodhub/seating/issues; updates https://github.com/clodhub/seating/releases (manual) What you download seating-0.11.0.tar, from release v0.11.0 of clodhub/seating: 33 files - Documents and manifests (9): CONTRACT.md, INSTRUCTIONS.md, LICENCE, NOTICE, PROVENANCE.md, SOURCE.md, ... - Source code (7): android/ (1), apple/ (1), server/ (3), web/ (2) - Tests (5): android/ (1), apple/ (1), fixtures/ (1), native.py, web.test.ts - Interface documents (3): required-guest-identity.json, seating-state.schema.json, seating.json - Class files: the class's interfaces and shared checks (3): seating-class/ (3) - Examples (1): consumer.ts - Diagrams (5): definition.json, examples/ (1), output/ (3) Installing copies 7 of them into the application under components/seating/: android 1, apple 1, server 3, web 2 Not included: the components that provide what it requires (com.clodhub/guest-identity), 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:32:00.581Z) sha256:dca922e7df22308a7ac15a0e1faf7bcb23c22535b9c79814463665e401eb2e1c Links Details (package foundations, upstream sources, exact dependencies, styles, class inventories, files): https://clodhub.com/components/seating/details.txt?version=0.11.0 Page: https://clodhub.com/components/seating; JSON: https://clodhub.com/api/components/seating/0.11.0; connections diagram: https://clodhub.com/api/components/seating/0.11.0/connections.svg Copyright Level N Ltd 2026