๐ Bridge
Lifecycle: CURRENT (typed vocabulary index)
Canonical TypeScript unions live infrontend/src/lib/games/bridge.svelte.ts.
Host routing for many gameโhost messages:frontend/src/lib/games/gameViewport/messageHandlers.ts.
This page is an overview โ not a payload schema dump.
Games talk to the host through namespaced postMessage bridge events instead of importing platform internals.
Host โ Game (HostToGameMessage)
funday:handshake, funday:theme-inject (not theme-set), funday:locale-inject, funday:session-inject, funday:pause, funday:resume, funday:action, funday:match-state, funday:match-error, funday:match-joined, funday:match-start, funday:match-settings, funday:match-left, funday:storage-response, funday:navigate.
Game โ Host (GameToHostMessage)
game:ready, game:error, game:close, game:fullscreen, funday:ack, funday:navigate, funday:nav:set, funday:dock:set, funday:drawer:set, funday:lobby-state, funday:request-match, funday:request-session, funday:lobby-practice, funday:send-match-state, funday:score-submitted, funday:analytics-event, funday:track-activity, funday:storage-write|read|list|delete, funday:game-role, funday:chat-msg, funday:haptic, funday:sound, funday:state:meeting.
Direction notes
funday:lobby-stateis primarily game โ host in the typed union / messageHandlers; the shell also publishes lobby snapshots into games through hostโgame match/session paths โ do not assume one exclusive direction for all lobby UX.- Dock wiring: games emit
funday:dock:set; handlers install action callbacks;GameDockrenders them and postsfunday:actionback. See Game dock.
Related
- Game dock
- Nakama multiplayer
- Source types:
frontend/src/lib/games/bridge.svelte.ts
Proof links (SD20)
| Claim | Proof |
|---|---|
| Typed host/game unions + payloads | frontend/src/lib/games/bridge.svelte.ts (HostToGameMessage, GameToHostMessage) |
| Gameโhost router | frontend/src/lib/games/gameViewport/messageHandlers.ts |
| Theme inject (not theme-set) | bridge.svelte.ts theme-inject helpers |
| Dock action render vs postMessage split | Game dock + messageHandlers.ts |
| Codex vocabulary | funday-codex.yml bridge.host_to_game uses funday:theme-inject (synced SD24) |