pkg:clod/com.clodhub/round-history 0.11.0 A bounded record of rounds and who won what in each, with voided rounds, per-player totals, and a portable ndjson export. Server, Apple and Android. Players want to see how the last rounds went. This component keeps a list of rounds, each `{no, level, winners: [{playerId, amount}], voided}`, bounded to the newest `maxRounds` (the oldest fall off). A cancelled round is recorded as voided with no winners. It answers who won how much over the rounds held, finds a round by number, and exports and imports the list as ndjson with a checksum per line. It knows nothing about the game: `level` is simply the stage the round was played at. A game that records its own fields beside the result (the pot, the showdown kind) pushes a plain object and gets the same object back from `list`. Examples A hold'em tournament shows the last 50 hands. A short party game keeps 10 rounds. A support engineer exports the history of a disputed game. A new game clears the list. Package URL: pkg:clod/com.clodhub/round-history@0.11.0 Class: Round history (pkg:clod/com.clodhub/round-history-class@1.1.0): A bounded record of completed rounds with totals, exportable and checked. Any component of this class can fill a recipe slot that asks for it. Category data-and-storage/history-and-audit; https://clodhub.com/classes/round-history-class.txt; 0 other components of this class: https://clodhub.com/components.txt?class=pkg%3Aclod%2Fcom.clodhub%2Fround-history-class Provides (1) - round-history (com.clodhub/round-history 1.0.0): A bounded record of rounds and their results: the oldest rounds fall off the end. No game knowledge. Two forms of the same history: typed (appendRound with a RoundEntry) and the engine's (push a plain object, list plain objects) for a game that records its own fields beside the result; those fields are stored in RoundEntry.extra and flattened again by list. Every function returns a new history. Server: TypeScript `implementation/server/history.ts`; methods named `HistoryApi.` are members of the object createHistoryApi returns. Clients: Swift `RoundHistory` (`implementation/apple/Sources/RoundHistory.swift`) and Kotlin `com.clodhub.history.RoundHistory` hold HistoryEntry values decoded from a view's `history` list (no, level, winners, voided; game fields ignored); methods named `RoundHistory.` are theirs. components that use it: https://clodhub.com/components.txt?requires=com.clodhub%2Fround-history Requires (0) - none Settings (1) The installer collects one setting: `maxRounds`, how many rounds to keep (whole number, at least 1; default 50, as in the recipe). - maxRounds: integer; optional, default 50 Depends on components: none How to use in a recipe A recipe uses it through a slot of class Round history (pkg:clod/com.clodhub/round-history-class 1.1.0), naming pkg:clod/com.clodhub/round-history as the slot's preferred component or substituting it for another component of the class. The recipe connects what it provides (round-history) to the slots that use it. The recipe sets maxRounds; any it leaves out takes its default. - as a slot in recipe.json components: {"id":"round-history","class":{"name":"pkg:clod/com.clodhub/round-history-class","version":"1.1.0","digest":"be35662dd6da7fc948179a69999ad353c479754eb694a9f57ac95803bd8e3b58"},"preferred":{"name":"pkg:clod/com.clodhub/round-history","version":"0.11.0"}} - in place of another component of the class: clod fetch round-history@0.11.0 --store store --from https://clodhub.com, then clod design RECIPE@VERSION --store store --answers answers.json --substitute SLOT=round-history@0.11.0 --out definition.json Used by recipes: pkg:clod/com.clodhub/ourpoker-recipe 0.13.0 (slot round-history) For developers: how an application uses it The server appends an entry when a round ends (the recipe does this where a hand is settled and where a hand is cancelled) and puts `history.rounds` in the view it sends. Round numbers must rise within one history, so a new game starts a new history with `clearHistory`. Apple and Android clients use `HistoryEntry` to read the list from the view and `RoundHistory` to keep a bounded copy; the Apple type is `Decodable` like the recipe's, the Kotlin classes are plain data classes to which `@Serializable` is added where the wire format is decoded. `turn-engine` requires this interface. The engine form is `create()`, `push(history, {no, level, voided, ...game fields})` and `list(history)` (oldest first); `createHistoryApi({maxRounds})` binds the setting. Game fields are kept in `extra` and must be plain JSON; Apple and Android read the four typed fields and ignore `extra`. Accounts and services No deployed service and no accounts. The history is plain data kept in the game state; export and import move it between hosts. How it is checked `tests/web.test.ts` (required-local) checks bounds, validation, rising round numbers, voided rounds, totals, queries, ndjson round trip with a tampered line rejected, the engine form (create, push, list with game fields, rising numbers, plain-JSON check, copies, export and import with game fields) and the consumer example. `tests/native.py apple` compiles `RoundHistory.swift` with swiftc, decodes `tests/fixtures/rounds.json` as JSON and checks the bound and totals (run and passed on this machine). `tests/native.py android` does the same with kotlinc; kotlinc is not installed here, so it was written but not run. - `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 the files only. The ndjson record layout is in `interfaces/round.schema.json` and `migration.json`. After removal, exported files are described by the schema. Tags: data-and-storage, history, history-and-audit, round Targets: client android, ios, macos, tvos; server none Publisher: George McIntyre (george-mcintyre) Guardians: Level N Ltd (guardian key 08775f20) Source: clodhub/round-history release v0.11.0; digest sha256:d3e4692e4ad31a9d7e56cfc83c52a5382f0cbe345c444864d42fdc8ced1a4167 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/round-history/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/round-history/0.11.0 Bundle download: GET https://clodhub.com/api/components/round-history/0.11.0/bundle returns a link valid for one hour Implements: pkg:clod/com.clodhub/round-history-class@1.1.0 be35662dd6da7fc948179a69999ad353c479754eb694a9f57ac95803bd8e3b58 com.clodhub/round-history 1.0.0 entry modules: android android/src/main/java, ios apple/Sources, macos apple/Sources, server server/index.ts, tvos apple/Sources shared behaviour suites: shared Platforms: android, ios, macos, server, tvos 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, 29 files (listed on the details page) Suitable for jobs: round-history profile any: cost none; load none; regions any; compliance none Notes: Pure library; no provider limits apply. 50 rounds is a few kilobytes. Data migration: stores rounds (com.clodhub/round-history-records 1.0.0); formats ndjson; requires stop no; retention 30 days Maintainers: Level N Ltd; https://github.com/clodhub/round-history/issues; updates https://github.com/clodhub/round-history/releases (manual) What you download round-history-0.11.0.tar, from release v0.11.0 of clodhub/round-history: 29 files - Documents and manifests (9): CONTRACT.md, INSTRUCTIONS.md, LICENCE, NOTICE, PROVENANCE.md, SOURCE.md, ... - Source code (4): android/ (1), apple/ (1), server/ (2) - Tests (5): android/ (1), apple/ (1), fixtures/ (1), native.py, web.test.ts - Interface documents (2): round-history.json, round.schema.json - Class files: the class's interfaces and shared checks (3): round-history-class/ (3) - Examples (1): consumer.ts - Diagrams (5): definition.json, examples/ (1), output/ (3) Installing copies 4 of them into the application under components/round-history/: android 1, apple 1, server 2 Not included: 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:36.850Z) sha256:d3e4692e4ad31a9d7e56cfc83c52a5382f0cbe345c444864d42fdc8ced1a4167 Links Details (package foundations, upstream sources, exact dependencies, styles, class inventories, files): https://clodhub.com/components/round-history/details.txt?version=0.11.0 Page: https://clodhub.com/components/round-history; JSON: https://clodhub.com/api/components/round-history/0.11.0; connections diagram: https://clodhub.com/api/components/round-history/0.11.0/connections.svg Copyright Level N Ltd 2026