Skip to content

Add grid, lobby, presence, and API key submodules - #5908

Open
bradleyshep wants to merge 1 commit into
bradley/submodules-agentsfrom
bradley/submodules-extras
Open

Add grid, lobby, presence, and API key submodules#5908
bradleyshep wants to merge 1 commit into
bradley/submodules-agentsfrom
bradley/submodules-extras

Conversation

@bradleyshep

Copy link
Copy Markdown
Contributor

Description of Changes

Adds reusable gameplay, presence, and server-to-server API key modules.

  • Grid: square/hex grids, sparse cell costs, entity state, pathfinding, and movement ranges.
  • Lobby: matchmaking queues, rooms, seats, lifecycle state, and Elo results.
  • Presence: reusable presence state and lifecycle helpers.
  • API keys: creation, hashed secret storage, verification, scopes, rotation, revocation, and usage records.
  • Package documentation, tests, examples, and generated client bindings for each module.

Builds on bradley/submodules-agents, which includes core. The grid example uses auth; the presence example uses auth, files, and rate-limit. API keys uses crypto, and its example uses grid and presence.

Example screenshots

Existing example screenshots from #5823:

Grid

Grid example

Lobby

Lobby example

Presence

Presence example

API Keys

API Keys example

API and ABI breaking changes

No existing SpacetimeDB API or ABI is changed. This adds new TypeScript package APIs that need review before merge.

Rollback safety impact

n/a. This adds opt-in TypeScript packages and examples; it does not change existing server storage formats.

Expected complexity level and risk

3/5

These opt-in packages do not change existing server behavior. Review complexity comes from four APIs and their state transitions. For applications that use them, review entity ownership, matchmaking, presence cleanup, and API key authorization.

Testing

Verified locally on bradley/submodules-extras:

  • Frozen-lockfile install for the root, SDK, and present submodule workspaces.
  • Type checks for the added packages.
  • Existing test scripts for the added packages and examples.
  • Build scripts for the added packages and examples.
  • Regenerate client bindings and verify no tracked changes.
  • Lint and formatting checks for the added packages and examples.
  • Verify workspace dependencies are present in this branch.
  • Review the four public APIs and their authorization and state-lifecycle rules.
  • Exercise the grid, lobby, presence, and API key examples against a running SpacetimeDB instance.

Commands used for this group:

pnpm -r -F "./spacetime-grid-ts/**" -F "./spacetime-lobby-ts/**" -F "./spacetime-presence-ts/**" -F "./spacetime-api-keys-ts/**" run typecheck
pnpm -r -F "./spacetime-grid-ts/**" -F "./spacetime-lobby-ts/**" -F "./spacetime-presence-ts/**" -F "./spacetime-api-keys-ts/**" run test
pnpm -r -F "./spacetime-grid-ts/**" -F "./spacetime-lobby-ts/**" -F "./spacetime-presence-ts/**" -F "./spacetime-api-keys-ts/**" run build
pnpm -r -F "./spacetime-grid-ts/**" -F "./spacetime-lobby-ts/**" -F "./spacetime-presence-ts/**" -F "./spacetime-api-keys-ts/**" run lint

The TypeScript SDK was built first. Live deployment and provider tests were not run during split validation. Existing workspace peer-dependency warnings remain.

@bradleyshep
bradleyshep requested a review from aasoni September 9, 2026 18:52
@bradleyshep bradleyshep mentioned this pull request Sep 9, 2026
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant