Owner: Nathan. A TypeScript SpacetimeDB 2.10.2 module in services/realtime is the source of truth for a session. It holds:
  • sessions, invite codes, roles and presence
  • the exercise state and events the headset publishes
  • the Scalpal transcript and status
  • app commands and their acknowledgements
  • artifact metadata and transfer grants
  • motion jobs with leases
  • replay transport and WebRTC signaling
Every table is private. Clients read through views that only return their own sessions, and writes go through reducers that check the caller’s role. Only service identities, like the gateway, can issue URLs, verify uploads or drive jobs. Reducers do no network or file I/O; the gateway does that and reports back.

Commands

Regenerate bindings after any schema change and commit them, so nobody else needs the CLI to build. Register the gateway as a service identity: