{"id":94435,"plugin_id":"plugin_asdk_app_6a91e4895594819184be7d56ec39bd54","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-11-13T06:08:53.280Z","digest":"1b46bd37628c8f4e6d6a5d8ca27b5b47107fb1693f63b5d2748933dac0fc9d36","against":null,"payload":{"description":"Build a real-time page on Tessryx, such as a multiplayer browser game, a live chat room, a collaborative whiteboard with live cursors, a live poll or live scores, with presence and instant updates and no WebSocket server to run. Use when the user asks for multiplayer, real-time, live updates, a chat room, live cursors or a page several people use at once.","included_files":[],"name":"realtime-multiplayer","skill_md_contents":"---\nname: realtime-multiplayer\ndescription: Build a real-time page on Tessryx, such as a multiplayer browser game, a live chat room, a collaborative whiteboard with live cursors, a live poll or live scores, with presence and instant updates and no WebSocket server to run. Use when the user asks for multiplayer, real-time, live updates, a chat room, live cursors or a page several people use at once.\n---\n\n# Real-time and multiplayer pages\n\nA live endpoint keeps a page connected. Workflows `publish` events to a stream and every open page updates within a second. Relay channels pass each viewer's messages (cursors, strokes, chat) to everyone else at the edge, and presence shows who's here. Follow `build-small-first` for the build order; this skill adds the real-time parts.\n\nThe user's explicit instructions always take priority over this skill.\n\n## Read first (only these)\n\n- `whoami`, then the `build-a-page` guide.\n- The `endpoints` guide, section \"Live pages\" (live block, `initial`, `join`, presence, relay and screened channels, room state, costs).\n- The `workflows` guide, section \"Publish\", if a route or schedule sends events.\n- The `live-handlers` guide only if relay messages must be checked before they're passed on.\n\n## First version (one sitting)\n\n1. The **page** (a normal endpoint) loads the site runtime, `<script src=\"/_tessryx/site-1.js\"></script>`, and calls `tessryx.live('<live-endpoint-slug>', { onEvent, onRelay, onPresence, onStatus })`.\n2. A **live endpoint** with a `live` block. For cursors, strokes or chat, add a relay channel and `presence: true`. Use an `initial` workflow so a new viewer sees the current state.\n3. For things that must be checked or stored (a move, a score, a message that's kept), a POST route that validates, saves and `publish`es.\n4. Preview, publish, and open the page in two browser windows to show it working.\n\n## Keep in mind\n\n- **Look:** playful and alive: colors per person for cursors and names, a visible \"who's here\" list, small motion when something arrives, and a clear state when the connection drops.\n- Design for up to 100 people on one page at once.\n- Show the `onStatus` reason to the visitor (for example, the page is full or paused).\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}