api/internal/gamification/game_bridge_session library

Classes

GameBridgeSession
Typed dispatch for skin bridge messages. Owns request/reply pairing (result/error by id), the motion streams, and the native→skin pushes (viewport, device, lifecycle, motionSample). The host supplies the platform-bound effects; every branch degrades to a log or an error reply, never a throw.

Typedefs

GameAsyncRunner = void Function(Future<void> task())
Runs async work (only http and action ops); tests pass a collecting runner.
GameWatchdogCancel = void Function(Object? handle)
Cancels a watchdog armed by GameWatchdogSchedule.
GameWatchdogSchedule = Object? Function(Duration delay, void fire())
Arms the http watchdog: returns a handle whose cancel disarms it. Tests inject a fake to fire the watchdog on demand; production posts a Timer.