Skip to content

Changelog

Changesets merged to main and waiting for the next release:

  • WebSocket upgrades to paths Shoehive does not serve no longer hang. listen() answers them with HTTP 404 and closes the socket. attach() keeps leaving them to other upgrade listeners by default, and the new unknownUpgrades server option ('ignore' | 'refuse' | { refuseAfterMs }) can refuse them at once or after a delay when no other listener takes the socket. Refused upgrades (401, 403, 404, 500) now destroy the socket after the response instead of leaving it half open. shoehive (minor)
  • Network security review fixes (docs/security/review-1.0-network.md). A view() that throws no longer stops the process: that viewer misses the update (logged) and the action still succeeds. A connection whose send buffer passes limits.maxBufferedBytes (default 8 MiB) is dropped, and lobby patches now respect backpressure like table patches. table.create from clients is refused with FORBIDDEN past limits.maxTablesPerPlayer (default 10 open tables) or limits.maxTables (default 10 000). Guest session records are deleted when the session expires, and player.rename returns a fresh resume token that shoehive/client stores. A second hello on one connection is refused, act.input and table.create.options must have finite numbers and at most 32 levels of nesting, and display names may not contain line separators or bidirectional overrides. With an auth hook and no origins, production now accepts only same-origin browser connections (development warns instead); origins: ['*'] allows any origin. The client ignores malformed server messages, resyncs on a patch that does not apply, and waits 30 s after close code 4429; applyPatch rejects operations and paths outside RFC 6902 add, remove and replace. shoehive (minor)
  • Platform security review fixes (docs/security/review-1.0-platform.md). Devtools without allowRemote now also refuses requests relayed by a proxy (Forwarded, X-Forwarded-For, X-Real-IP) and requests whose Host is a DNS name other than localhost or an origins entry, which stops DNS rebinding pages. Fixture export replaces player ids inside table options too, and its warning says when ids inside inputs had to be kept. ctx.wallet.reserve rejects amounts that are not non-negative safe integers before calling the wallet, and a reserve or balance failure that the game catches is recorded in the entry (WalletEffect.error, new WalletFailure type) so it replays. TableRuntime.create refuses empty table ids and ids containing :. postgresStore throws for schema or table names Postgres would truncate. The random stream throws instead of wrapping past 2^36 words. Generated projects no longer contain a fixed resume-token secret (npm run dev sets a random SHOEHIVE_SECRET per session), and --shoehive values are escaped in package.json. shoehive (minor), create-shoehive (minor)
  • sqliteStore commits writes made in the same turn of the event loop together (group commit): one transaction and one fsync cover many tables' log appends and snapshots, so synchronous = FULL keeps every acknowledged action durable at far more tables per server. The Store contract is unchanged: each write still resolves only after the commit that holds it, each table's batch is all or nothing, one table's StoreConflictError does not fail another table's append, and reads see every write called before them. A failed transaction (for example a busy lock past the timeout) rejects every write in that group. shoehive (minor)
  • Phase 4 of RFC 0001: shoehive/cards (cards and shoes, hidden-card view helpers, blackjack totals, a 7-card poker evaluator, side pots and payouts) and ctx.wallet (reserve and balance during an action, commit, release and credit after it commits, recorded for replay, with runWalletConformance in shoehive/testing). Also: game ids stay literal so createTable and createAndJoin are typed by id; an optional result schema types ctx.end and meta.result; lobby.sub takes a filter; guests can rename (player.rename, client.rename); and timers can be made visible in meta.timers. shoehive (minor)
  • shoehive/client and shoehive/react (Phase 3 of RFC 0001): a typed, isomorphic client with resume tokens, automatic reconnect, live table and lobby documents and typed act(); and React hooks (ShoehiveProvider, useConnection, useLobby, useTable, useTableEvent, useServerTime) with React as an optional peer. shoehive (minor)
  • create-shoehive (Phase 7 of RFC 0001): npm create shoehive@latest my-game scaffolds a playable game with a game server, a React app, tests and devtools. Templates tic-tac-toe (default) and blank; flags --template, --no-install, --no-git, --package-manager, --shoehive and --yes. It versions with shoehive and pins the generated project to the release it ships with. create-shoehive (major)
  • shoehive/devtools (Phase 6 of RFC 0001): an inspector served by the server when createServer({ devtools: true }) in development (off and not even imported in production unless explicitly allowed with a strong token). It shows live tables read-only, raw and engine state, every seat's view beside the spectator's, the log and rejections, sessions, and offers time travel on replayed copies, forks into dev tables, and fixture export with anonymized players. shoehive/testing adds replayFixture and fixtureStateHash, and TableRuntime.replay takes resendWalletOps. shoehive (minor)
  • Shoehive v1 engine (Phase 1 of RFC 0001): defineGame with typed actions, phases, turns, rounds, timers and per-viewer views; TableRuntime with transactional entries, seeded ChaCha20 randomness, a recorded clock, exact replay and snapshots; and shoehive/testing with createTestTable and a fake clock. Replaces the 0.x API entirely. shoehive (major)
  • shoehive/server (Phase 2 of RFC 0001): createServer with guest sessions and HMAC resume tokens or a custom auth hook, WebSocket and in-memory transports, the v1 wire protocol (lobby, tables, seats, spectators, per-viewer patches, events), reconnect grace, rate and size limits, a Store interface with an in-memory adapter and restart recovery, and the Wallet interface with MemoryWallet. shoehive/testing adds runStoreConformance. shoehive (minor)
  • Store adapters (Phase 5 of RFC 0001): shoehive/store/sqlite (better-sqlite3), shoehive/store/postgres (pg, with migratePostgres) and shoehive/store/redis (ioredis), each taking a client you construct, with the drivers as optional peers. runStoreConformance accepts a reopenable backend and checks durability, atomic batches, concurrent writers and exact round-trips. appendLog now treats an exact retry of stored entries as success, so a driver re-sending after a lost reply does not fault the table. shoehive (minor)

No release yet. The first release will be 1.0.0-next.0 on the next dist-tag.