actions & signals
use actions for changes that must be saved and signals for temporary updates such as typing previews.
actions and retries
game.action(name, data, { id, revision, signal }) returns the acknowledged session. reuse the same id after a lost response. the last 256 committed IDs per room are deduplicated. include a round/turn/row token for correctness beyond that window. revision conflicts leave state unchanged.
ephemeral signals
declare signals, then send bounded JSON on a named channel. signal(state, channel, data, ctx) validates and redacts it before joined peers receive it. return null to drop it. signals are not saved or replayed; ignore old sequences and expired values.
await game.signals.send("typing", { round: 1, row: 0, count: 3 });
const unsubscribe = game.signals.subscribe(signal => showPreview(signal));recovery and limits
Sometimes's room and Inbox infrastructure delivers snapshots after committed changes. send at most one signal every 120ms by combining frequent updates; signals expire after four seconds. reconnecting retrieves the current state without replaying every earlier event. the transport does not provide the update rate or latency guarantees required for real-time physics replication.