Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

chore(play): retire the finished event config and make no-event the default state

nirholas5616ff9b8746
diff --git a/STRUCTURE.md b/STRUCTURE.md
index adeb00f65..decf43799 100644
--- a/STRUCTURE.md
+++ b/STRUCTURE.md
@@ -89,12 +89,12 @@ bottom.
| `/play` safety & lifecycle invariants | Doc [docs/play-hardening.md](docs/play-hardening.md) `→ /docs/play-hardening`. Guards: `cssBgImage()` + `clampParam()` + `isPlausibleMint()` in [src/game/coincommunities-ui.js](src/game/coincommunities-ui.js) / [src/game/coincommunities.js](src/game/coincommunities.js), avatar template cache + `releaseAvatar()` in [src/game/avatar-rig.js](src/game/avatar-rig.js), reconnect pruning (`_markRemotesStale`/`_pruneStaleRemotes`) and `_disposeObject3D()` in [src/game/coincommunities.js](src/game/coincommunities.js). Harnesses: [scripts/play-desktop-audit.mjs](scripts/play-desktop-audit.mjs), [scripts/play-mobile-repro.mjs](scripts/play-mobile-repro.mjs) | Live | The rules that keep the platform's largest interactive surface safe, honest and phone-survivable, each written against a failure that actually shipped: untrusted display names and coin metadata never become markup or CSS (a tombstone owner's name once ran as HTML for everyone who walked past it; a crafted coin `image_uri` could paint a full-screen overlay across the lobby), a malformed `?coin=` is refused instead of building a convincing world nobody else can join, a reconnect retires the peers who left rather than accumulating frozen ghosts and a tripled headcount, and everything the world loads (crowd/NPC GLBs, the sun's 2048² shadow map, totem, jumbotron, dance floor, district, environment) is genuinely freed on the way out instead of held until the tab is killed. Tests: [tests/play-deeplink-safety.test.js](tests/play-deeplink-safety.test.js) |
| Cinematic rendering (shared 3D quality bar) | [src/shared/cinematic-render.js](src/shared/cinematic-render.js) — `applyCinematicDefaults()`, `loadEnvironment()`, `detectQualityTier()`, `updateGroundContactShadow()`; curated HDRIs in [public/hdri/](public/hdri) (CC0, Poly Haven) | Live, wired into every three.js viewer on the platform (`/irl`, talk mode, `/play`, `/club`, `/ar`, `/xr`, `/walk`, `/coin3d`, marketplace lobby, demo pages, the `<agent-3d>`/`<page-agent>` embeds, and more) | One module every WebGLRenderer-based viewer calls into instead of re-deriving ACES tone mapping, sRGB output color space, HDRI image-based lighting, and soft VSM shadows per file. `detectQualityTier()` picks high/medium/mobile from real device signals and caps pixel ratio + disables shadows/HDRI accordingly; `loadEnvironment()` fetches a real photographic HDRI (`studio`/`outdoor`/`sunset`) and falls back to a procedural room environment on mobile tier or fetch failure (including cross-origin embed contexts where the absolute `/hdri/*.hdr` URL can't resolve). `/walk` keeps its own richer per-biome HDR system ([src/walk-environments.js](src/walk-environments.js)); surfaces already running a postprocessing tone-mapping pass (`/oracle-graph`, `/club-entrance`) only take the sRGB/HDRI half to avoid double-applying the curve. |
| `/play` Wheel of Fortune (Fortune's Folly; free/paid $THREE spins) | Client: [src/game/wheel-station.js](src/game/wheel-station.js) (the plaza landmark, proximity prompt, `E` to spin; lazy-imports the actual UI on first interact), spin UI [src/game/spin-wheel-ui.js](src/game/spin-wheel-ui.js) (20-segment wheel, free/paid flow, wallet signing). Server: [multiplayer/src/spin-wheel.js](multiplayer/src/spin-wheel.js) (paytable, RNG, level/cooldown/pack gates, handlers), split-payment settlement [multiplayer/src/game-token.js](multiplayer/src/game-token.js) (`buildSpinPayment`/`verifySpinPayment`; the same primitives the $THREE boutique uses), wheel location [multiplayer/src/world-features.js](multiplayer/src/world-features.js) `WHEEL`, persisted cooldown field in [multiplayer/src/economy.js](multiplayer/src/economy.js), handlers wired in [multiplayer/src/rooms/WalkRoom.js](multiplayer/src/rooms/WalkRoom.js) | In-repo | W09 of the World Online program (program brief retired to git history). Walk up to the wheel in the plaza and press `E`: one free spin every 12h (a real persisted cooldown; survives a disconnect, unlike the ephemeral per-action cooldowns everything else on this row's neighbors use), or pay $3 in `$THREE`; split 50% to the holder-rewards pool / 50% to the treasury, verified on-chain before any prize is granted, mirroring the boutique's proven settlement pattern exactly. Gated behind an average skill level of 3 (a light anti-farm floor, not a grind) and never lets a won prize get lost to a full pack; room for at least one possible item prize is checked before a spin is even offered, paid or free. All 20 wedges are equal-odds by design, matching the client's fixed-angle wheel rendering exactly (see the header note in `spin-wheel.js` on why that must never drift). Tests: [tests/spin-wheel.test.js](tests/spin-wheel.test.js). |
-| `/play` live events (countdown chip, agenda drawer, synchronized fireworks) | Config [public/event.json](public/event.json) (one file, shared with the lobby countdown and the server-side souvenir grant). Client: in-world layer [src/game/meetup-event.js](src/game/meetup-event.js) + [src/game/meetup-event.css](src/game/meetup-event.css), pure schedule math [src/game/meetup-schedule.js](src/game/meetup-schedule.js), particle show [src/game/fireworks.js](src/game/fireworks.js), lobby banner + wayfinding pill [src/game/event-countdown.js](src/game/event-countdown.js). Mounted from [pages/play.html](pages/play.html) | In-repo | Turns the `$THREE` home town into a place something is *happening* in for the length of a scheduled event, driven entirely by `public/event.json`: delete the file and the world is normal again, with no code change. A countdown chip docks under the King of the Totem card (and stands the generic pill down, so there is only ever one countdown on screen) and opens a right-docked agenda drawer that marks the running segment, dims finished ones, counts the rest down in local time, and carries a live `$THREE` pulse row (`/api/three-signal`) plus one-tap Buy and commemorative-photo actions. Six phases derive from the wall clock (`far → upcoming → preshow → live → afterglow → ended`), so every player agrees on what is on and what is next without a round-trip. **Fireworks are deterministic, not networked:** four-second buckets hashed with the event id give every client the identical sky (`fireworkPlan()`), the same trick [src/shared/world-clock.js](src/shared/world-clock.js) uses for the shared sun; density ramps into a closing barrage, power-saver halves it, at most 14 shells live at once, and a backgrounded tab rejoins the show live instead of replaying the backlog `requestAnimationFrame` paused through. Preview any schedule with `?meetup=now` or `?meetup=<ISO>`. Doc: [docs/play-live-events.md](docs/play-live-events.md). Browser audit: `npm run audit:meetup` ([scripts/meetup-audit.mjs](scripts/meetup-audit.mjs)). Tests: [tests/meetup-schedule.test.js](tests/meetup-schedule.test.js), [tests/meetup-event-ui.test.js](tests/meetup-event-ui.test.js) |
-| `/play` event souvenirs (a free wearable you keep for having been there) | Config [public/event.json](public/event.json) (`souvenir.cosmeticId`, the same file the countdown reads). Server: window/world/item resolution [multiplayer/src/event-drop.js](multiplayer/src/event-drop.js), join-time grant `_grantEventSouvenir` in [multiplayer/src/rooms/WalkRoom.js](multiplayer/src/rooms/WalkRoom.js), `event` tier + catalog entry [multiplayer/src/cosmetics-catalog.js](multiplayer/src/cosmetics-catalog.js), unlock + persistence [multiplayer/src/economy.js](multiplayer/src/economy.js). Client: drop card [src/game/event-souvenir.js](src/game/event-souvenir.js), wardrobe treatment [src/game/cosmetics-wardrobe.js](src/game/cosmetics-wardrobe.js). Asset: [public/accessories/laurel-meetup.glb](public/accessories/laurel-meetup.glb) generated by [scripts/generate-accessory-glbs.mjs](scripts/generate-accessory-glbs.mjs), poster by [scripts/render-accessory-thumbs.mjs](scripts/render-accessory-thumbs.mjs) | In-repo | Everyone who joins the event world between an event's `startsAt` and `endsAt` is granted a free commemorative wearable (the Meetup Laurel), once, forever, wearable in every coin world. After `endsAt` it is never granted again and there is no purchase path at any point: a third catalog tier, `event`, carries `price: 0`, so the boutique's `tier === 'premium' && price > 0` filter excludes it by construction and the x402 purchase ledger is filtered to premium ids so it cannot mint one. Server-authoritative and idempotent: the window and the world both come from the shared event config (never a client option), the grant is a no-op on an account that already owns it, and the one-shot `souvenir` message only fires on the not-owned to owned transition, so a reconnect produces neither a duplicate nor a second announcement. Fails open on every axis (no config, unreachable config, closed window, wrong world all mean grant nothing and never delay a join). Doc: [docs/event-souvenirs.md](docs/event-souvenirs.md). Tests: [tests/event-souvenir.test.js](tests/event-souvenir.test.js); live conformance `node scripts/play-souvenir-conformance.mjs` (real server, no browser) and `node scripts/play-souvenir-e2e.mjs` (real browser) |
+| `/play` live events (countdown chip, agenda drawer, synchronized fireworks) | Config `public/event.json` (one file, shared with the lobby countdown and the server-side souvenir grant). Client: in-world layer [src/game/meetup-event.js](src/game/meetup-event.js) + [src/game/meetup-event.css](src/game/meetup-event.css), pure schedule math [src/game/meetup-schedule.js](src/game/meetup-schedule.js), particle show [src/game/fireworks.js](src/game/fireworks.js), lobby banner + wayfinding pill [src/game/event-countdown.js](src/game/event-countdown.js). Mounted from [pages/play.html](pages/play.html) | In-repo | Turns the `$THREE` home town into a place something is *happening* in for the length of a scheduled event, driven entirely by `public/event.json`: delete the file and the world is normal again, with no code change. A countdown chip docks under the King of the Totem card (and stands the generic pill down, so there is only ever one countdown on screen) and opens a right-docked agenda drawer that marks the running segment, dims finished ones, counts the rest down in local time, and carries a live `$THREE` pulse row (`/api/three-signal`) plus one-tap Buy and commemorative-photo actions. Six phases derive from the wall clock (`far → upcoming → preshow → live → afterglow → ended`), so every player agrees on what is on and what is next without a round-trip. **Fireworks are deterministic, not networked:** four-second buckets hashed with the event id give every client the identical sky (`fireworkPlan()`), the same trick [src/shared/world-clock.js](src/shared/world-clock.js) uses for the shared sun; density ramps into a closing barrage, power-saver halves it, at most 14 shells live at once, and a backgrounded tab rejoins the show live instead of replaying the backlog `requestAnimationFrame` paused through. Preview any schedule with `?meetup=now` or `?meetup=<ISO>`. Doc: [docs/play-live-events.md](docs/play-live-events.md). Browser audit: `npm run audit:meetup` ([scripts/meetup-audit.mjs](scripts/meetup-audit.mjs)). Tests: [tests/meetup-schedule.test.js](tests/meetup-schedule.test.js), [tests/meetup-event-ui.test.js](tests/meetup-event-ui.test.js) |
+| `/play` event souvenirs (a free wearable you keep for having been there) | Config `public/event.json` (`souvenir.cosmeticId`, the same file the countdown reads). Server: window/world/item resolution [multiplayer/src/event-drop.js](multiplayer/src/event-drop.js), join-time grant `_grantEventSouvenir` in [multiplayer/src/rooms/WalkRoom.js](multiplayer/src/rooms/WalkRoom.js), `event` tier + catalog entry [multiplayer/src/cosmetics-catalog.js](multiplayer/src/cosmetics-catalog.js), unlock + persistence [multiplayer/src/economy.js](multiplayer/src/economy.js). Client: drop card [src/game/event-souvenir.js](src/game/event-souvenir.js), wardrobe treatment [src/game/cosmetics-wardrobe.js](src/game/cosmetics-wardrobe.js). Asset: [public/accessories/laurel-meetup.glb](public/accessories/laurel-meetup.glb) generated by [scripts/generate-accessory-glbs.mjs](scripts/generate-accessory-glbs.mjs), poster by [scripts/render-accessory-thumbs.mjs](scripts/render-accessory-thumbs.mjs) | In-repo | Everyone who joins the event world between an event's `startsAt` and `endsAt` is granted a free commemorative wearable (the Meetup Laurel), once, forever, wearable in every coin world. After `endsAt` it is never granted again and there is no purchase path at any point: a third catalog tier, `event`, carries `price: 0`, so the boutique's `tier === 'premium' && price > 0` filter excludes it by construction and the x402 purchase ledger is filtered to premium ids so it cannot mint one. Server-authoritative and idempotent: the window and the world both come from the shared event config (never a client option), the grant is a no-op on an account that already owns it, and the one-shot `souvenir` message only fires on the not-owned to owned transition, so a reconnect produces neither a duplicate nor a second announcement. Fails open on every axis (no config, unreachable config, closed window, wrong world all mean grant nothing and never delay a join). Doc: [docs/event-souvenirs.md](docs/event-souvenirs.md). Tests: [tests/event-souvenir.test.js](tests/event-souvenir.test.js); live conformance `node scripts/play-souvenir-conformance.mjs` (real server, no browser) and `node scripts/play-souvenir-e2e.mjs` (real browser) |
| `/play` Coin Wars portal (in-world war door, league board, spectator screen) | Client: [src/game/war-portal.js](src/game/war-portal.js) + [src/game/war-portal.css](src/game/war-portal.css) (plaza landmark, canvas league board, queue panel, results echo), wired in [src/game/coincommunities.js](src/game/coincommunities.js); arena page [pages/play/war.html](pages/play/war.html) `→ /play/war` → [src/play/war.js](src/play/war.js) + [src/play/war-world.js](src/play/war-world.js) + [src/play/war.css](src/play/war.css). API: [api/wars.js](api/wars.js) `→ /api/wars` over [api/_lib/wars-store.js](api/_lib/wars-store.js) (ledger + queue + live registry) and [api/_lib/war-ticket.js](api/_lib/war-ticket.js) (signs a pairing). Server: [multiplayer/src/rooms/ClashRoom.js](multiplayer/src/rooms/ClashRoom.js) `clash_arena`, pairing math [multiplayer/src/war-matchmaking.js](multiplayer/src/war-matchmaking.js), ticket verify [multiplayer/src/war-ticket.js](multiplayer/src/war-ticket.js), spectator snapshots [multiplayer/src/war-live.js](multiplayer/src/war-live.js), league math [multiplayer/src/war-standings.js](multiplayer/src/war-standings.js), portal location [multiplayer/src/world-features.js](multiplayer/src/world-features.js) `WAR_PORTAL` | In-repo | F18. Coin Wars ran full community-vs-community battles with an Elo league behind it and no door into it from any world. The portal is that door: a plaza landmark whose board shows this coin's real league standing, its last battles, and any war running right now (read from `/api/wars`, folded through the arena's own standings module, never a second implementation). Press `E` to run the coin's holder gate and queue the community; the matchmaker pairs it with another waiting community, seals both sides into an HMAC war ticket, and hands the player to `/play/war` with a return link carrying the full coin identity, so walking back lands in the same world with the result already echoing on the board. While a war is live the board becomes a spectator screen (score, round clock, kill feed) off a cheap poll, and a win takes the board over for a few seconds. Costs nothing when nobody is near it: no poll fires outside `WAR_PORTAL_BOARD_REACH`. Docs: [docs/coin-wars.md](docs/coin-wars.md). Tests: [tests/war-matchmaking.test.js](tests/war-matchmaking.test.js), [tests/clash-match.test.js](tests/clash-match.test.js) |
-| `/play` event countdown (lobby banner + in-world pill) | Self-attaching module [src/game/event-countdown.js](src/game/event-countdown.js) loaded by [pages/play.html](pages/play.html); config [public/event.json](public/event.json) (single source of the event window; the file is the edit surface for scheduling an event), read through the shared parser + state machine in [src/shared/event-config.js](src/shared/event-config.js). Verified end to end in a real browser by `npm run verify:event` ([scripts/verify-event-countdown.mjs](scripts/verify-event-countdown.mjs)). Campaign pack: [prompts/event/](prompts/event/) | In-repo | While `public/event.json` describes an upcoming or live event, the lobby shows a banner (name, tagline, local-time start, ticking countdown, CTA into the event world) and the in-world view gets a dismissible top-center pill (dismissal persisted per event in localStorage). Three explicit states: upcoming, live (pulsing marker, CTA suppressed when already standing in the event world), and over (everything unmounts, the interval stops). Zero edits to `coincommunities*.js` by design (the ambient-crowd pattern): it waits for the lobby DOM and mounts nothing when the config is missing, malformed, or expired. |
-| The event landing page (`/event`) | [pages/event.html](pages/event.html) `→ /event`, page module [src/event-page.js](src/event-page.js); config [public/event.json](public/event.json) (the SAME file the `/play` countdown reads, never a second copy of the times); live population [api/play/population.js](api/play/population.js) `→ /api/play/population`, backed by the multiplayer server's public `/population` aggregate in [multiplayer/src/index.js](multiplayer/src/index.js) | Live | The one link the community shares before and during an event, written for someone with zero context. Hero countdown ticking off `public/event.json`, a single large CTA into the event world, a plain-language "what to expect" built only from what `/play` actually does, and the run of show rendered in the visitor's own timezone with an "Add to calendar" button that builds a real RFC 5545 `.ics` in the browser (no third-party calendar service, so the guest list never leaves the device). Four designed states: upcoming (days/hours/minutes/seconds), live (LIVE marker plus the real number of people standing in the world), ended (says it happened, relabels the agenda to "What happened", and still routes people into `/play`), and no-config (an honest "no event scheduled" with the same door). The live number is real or absent: when the multiplayer server is unreachable the panel keeps the live state and drops the count instead of inventing one. Doc: [docs/api-reference.md](docs/api-reference.md#play-population-api). |
-| Home page event strip (`/`) | Self-attaching module [src/home-event-banner.js](src/home-event-banner.js) loaded by [pages/home.html](pages/home.html); same config [public/event.json](public/event.json) through [src/shared/event-config.js](src/shared/event-config.js) | Live | Puts the live event in front of everyone who lands on three.ws, not just the people who already opened `/play`. A slim announcement bar between the nav and the hero: event name, start time in the visitor's own timezone, a countdown ticking to the second, and one CTA into the $THREE world (suppressed when the visitor is already there). Same three states as the `/play` surfaces and the same auto-unmount at `endsAt`, flipping upcoming to live without a reload. Dismissal shares the `/play` pill's `cc-event-dismissed:<startsAt>` key, so waving the reminder away on the home page also clears it in-world; the `/play` lobby banner stays, because it is lobby content rather than an overlay. Styled from the home page's own tokens (mono kicker, hairline pill CTA) and light-theme aware. Verified with `npm run verify:event`. |
+| `/play` event countdown (lobby banner + in-world pill) | Self-attaching module [src/game/event-countdown.js](src/game/event-countdown.js) loaded by [pages/play.html](pages/play.html); config `public/event.json` (single source of the event window; the file is the edit surface for scheduling an event), read through the shared parser + state machine in [src/shared/event-config.js](src/shared/event-config.js). Verified end to end in a real browser by `npm run verify:event` ([scripts/verify-event-countdown.mjs](scripts/verify-event-countdown.mjs)). Campaign pack: [prompts/event/](prompts/event/) | In-repo | While `public/event.json` describes an upcoming or live event, the lobby shows a banner (name, tagline, local-time start, ticking countdown, CTA into the event world) and the in-world view gets a dismissible top-center pill (dismissal persisted per event in localStorage). Three explicit states: upcoming, live (pulsing marker, CTA suppressed when already standing in the event world), and over (everything unmounts, the interval stops). Zero edits to `coincommunities*.js` by design (the ambient-crowd pattern): it waits for the lobby DOM and mounts nothing when the config is missing, malformed, or expired. |
+| The event landing page (`/event`) | [pages/event.html](pages/event.html) `→ /event`, page module [src/event-page.js](src/event-page.js); config `public/event.json` (the SAME file the `/play` countdown reads, never a second copy of the times); live population [api/play/population.js](api/play/population.js) `→ /api/play/population`, backed by the multiplayer server's public `/population` aggregate in [multiplayer/src/index.js](multiplayer/src/index.js) | Live | The one link the community shares before and during an event, written for someone with zero context. Hero countdown ticking off `public/event.json`, a single large CTA into the event world, a plain-language "what to expect" built only from what `/play` actually does, and the run of show rendered in the visitor's own timezone with an "Add to calendar" button that builds a real RFC 5545 `.ics` in the browser (no third-party calendar service, so the guest list never leaves the device). Four designed states: upcoming (days/hours/minutes/seconds), live (LIVE marker plus the real number of people standing in the world), ended (says it happened, relabels the agenda to "What happened", and still routes people into `/play`), and no-config (an honest "no event scheduled" with the same door). The live number is real or absent: when the multiplayer server is unreachable the panel keeps the live state and drops the count instead of inventing one. Doc: [docs/api-reference.md](docs/api-reference.md#play-population-api). |
+| Home page event strip (`/`) | Self-attaching module [src/home-event-banner.js](src/home-event-banner.js) loaded by [pages/home.html](pages/home.html); same config `public/event.json` through [src/shared/event-config.js](src/shared/event-config.js) | Live | Puts the live event in front of everyone who lands on three.ws, not just the people who already opened `/play`. A slim announcement bar between the nav and the hero: event name, start time in the visitor's own timezone, a countdown ticking to the second, and one CTA into the $THREE world (suppressed when the visitor is already there). Same three states as the `/play` surfaces and the same auto-unmount at `endsAt`, flipping upcoming to live without a reload. Dismissal shares the `/play` pill's `cc-event-dismissed:<startsAt>` key, so waving the reminder away on the home page also clears it in-world; the `/play` lobby banner stays, because it is lobby content rather than an overlay. Styled from the home page's own tokens (mono kicker, hairline pill CTA) and light-theme aware. Verified with `npm run verify:event`. |
| `/play` friends, presence & verified profiles (drawer, cross-world DMs, in-world profile cards) | Client: [src/game/friends-panel.js](src/game/friends-panel.js) (shared with `/walk`), mounted in [src/game/coincommunities.js](src/game/coincommunities.js) `_openFriends()`/`_closeFriends()`, HUD button + unread badge in [src/game/coincommunities-ui.js](src/game/coincommunities-ui.js), account-level state/polling in [src/friends.js](src/friends.js), profile card in the shared inspector [src/shared/avatar-inspector.js](src/shared/avatar-inspector.js) (`renderProfile`). Server: signed ticket verify + `socialHub` registration + verified `username` on the Player schema in [multiplayer/src/rooms/WalkRoom.js](multiplayer/src/rooms/WalkRoom.js) + [multiplayer/src/schemas.js](multiplayer/src/schemas.js), ticket signer [api/_lib/presence-store.js](api/_lib/presence-store.js) / verifier [multiplayer/src/presence-token.js](multiplayer/src/presence-token.js), hub in [multiplayer/src/social-hub.js](multiplayer/src/social-hub.js) | In-repo | W09+W10 of the World Online program (program brief retired to git history). Press `J` or the HUD `Friends` button to open a right-docked drawer showing your account's friend graph; live online/offline presence per coin world, requests, and DM threads; the same graph and threads `/walk` and the standalone `/friends` page already share. `community-net.js` carries a signed presence ticket into every `walk_world` join and forwards the server's `social` push onto its own event bus, which is what makes a `/play` player visible to friends and able to receive a live DM. W10 makes the platform identity first-class in-world: the ticket also carries the account's username + display name (signed, so nobody can wear a handle they don't own), WalkRoom publishes the verified `username` on the Player schema, nameplates show the @handle, the signed-in lobby defaults to the account's display name with an @handle chip, and clicking any verified player (or `I`) opens their real three.ws profile card in the shared avatar inspector: bio, follower counts, follow/unfollow (`/api/users/:username/follow`), the right friends verb (Message → the in-world DM drawer when already friends, Add friend / Accept otherwise), their latest creations, and a link to `/u/<username>`. Works identically in `/walk` (same room, same inspector). Tests: [tests/play-friends-presence.test.js](tests/play-friends-presence.test.js), [tests/play-profile-identity.test.js](tests/play-profile-identity.test.js). |
| Crew HQ (crews, tags, 3D presence room) | Page [pages/crews.html](pages/crews.html) + [src/crews-page.js](src/crews-page.js) + [src/crews.css](src/crews.css) `→ /crews` and `/crews/<TAG>`, data layer [api/_lib/crews-store.js](api/_lib/crews-store.js), endpoints [api/crews/](api/crews) (`index.js`, `[tag].js`, `search.js`, `directory.js`), presence [api/_lib/presence-store.js](api/_lib/presence-store.js), schema `api/_lib/migrations/2026-06-05-crews.sql` | Live | The group half of the social system: a crew is a set of accounts flying one 2-6 character tag, with one owner, one crew per account, and a public headquarters. The HQ renders the roster as a room rather than a list, each member standing as their own agent's 3D avatar (resolved by `standeesFor()`, private models never emitted) and lit by the same Redis presence the friends drawer reads. Crew colour is an FNV-1a hash of the tag, so a crew looks like itself everywhere without stored art. Live `<agent-3d>` figures are capped and lazily mounted so a large crew cannot exhaust the browser's WebGL contexts. The backend shipped with W09 and had no UI at all until this page; the in-world friends drawer now links to it. Docs: [docs/crews.md](docs/crews.md). Tests: [tests/crews-shared.test.js](tests/crews-shared.test.js), [tests/crews-wiring.test.js](tests/crews-wiring.test.js) |
| `/play` Robinhood Chain worlds (NOXA + The Odyssey coins, live-trade animation) | Firehose worker [workers/robinhood-feed/](workers/robinhood-feed) (watches NOXA + Odyssey launchpads + their Uniswap v3 pools, normalizes to the pump-compatible event shape, serves SSE/WS/REST). API bridge: [api/robinhood/coin-trades.js](api/robinhood/coin-trades.js) (the in-world chart-screen's trade feed), [api/robinhood/play-worlds.js](api/robinhood/play-worlds.js) (the `/worlds` lobby's Robinhood Chain tab). Client: chain-flavored biome `hoodchain` in [src/game/world-env.js](src/game/world-env.js) (auto-pinned in [src/game/coincommunities.js](src/game/coincommunities.js) `isRobinhoodCoin()`), trade-feed endpoint routing in [src/game/chart-screen.js](src/game/chart-screen.js), lobby tab + EVM-address support in [src/worlds-lobby.js](src/worlds-lobby.js) (routes Robinhood coins to `/play`, unchanged pump.fun coins stay on `/temporary`) | In-repo | Every Robinhood Chain memecoin (chain 4663) gets the same treatment pump.fun coins already have: a deterministic 3D world seeded by its contract address, in a distinct dark ticker-tape palette, with real launchpad/Uniswap-v3 trades rippling the space live via `MarketReactor`. Multiplayer (`walk_world`, filtered by `coin`+`tier`) needed zero code changes — it already keys rooms by an opaque coin id string. `isValidToken()` in [api/_lib/coin-communities.js](api/_lib/coin-communities.js) was widened to accept EVM addresses (it previously 400'd every EVM-chain world's Town chat, even though the CHAINS list already declared ethereum/base/bsc support). Tests: [workers/robinhood-feed/tests/normalize.test.js](workers/robinhood-feed/tests/normalize.test.js) (against real captured on-chain logs). |
diff --git a/docs/event-souvenirs.md b/docs/event-souvenirs.md
index 482309f23..830db63dd 100644
--- a/docs/event-souvenirs.md
+++ b/docs/event-souvenirs.md
@@ -37,7 +37,7 @@ does not give you a second one and does not show the card again.
## For whoever runs the event
-Everything lives in one file: [`public/event.json`](../public/event.json), the
+Everything lives in one file: `public/event.json`, the
same config that drives the countdown pill, the agenda drawer, and the fireworks
finale. Add a `souvenir` block:
@@ -226,7 +226,7 @@ machine prefer the two above, which cover the same ground between them.
| Unlock + persistence | `grantCosmetic` / `restoreProfile` in [multiplayer/src/economy.js](../multiplayer/src/economy.js) |
| The drop card | [src/game/event-souvenir.js](../src/game/event-souvenir.js) |
| Wardrobe treatment ("New", "Not for sale") | [src/game/cosmetics-wardrobe.js](../src/game/cosmetics-wardrobe.js) |
-| Event config | [public/event.json](../public/event.json) |
+| Event config | `public/event.json` |
| Asset generators | [scripts/generate-accessory-glbs.mjs](../scripts/generate-accessory-glbs.mjs), [scripts/render-accessory-thumbs.mjs](../scripts/render-accessory-thumbs.mjs) |
| Verification | [tests/event-souvenir.test.js](../tests/event-souvenir.test.js), [scripts/play-souvenir-conformance.mjs](../scripts/play-souvenir-conformance.mjs), [scripts/play-souvenir-ui-check.mjs](../scripts/play-souvenir-ui-check.mjs), [scripts/play-souvenir-e2e.mjs](../scripts/play-souvenir-e2e.mjs) |
diff --git a/docs/play-live-events.md b/docs/play-live-events.md
index 34a8f2557..a450d97b2 100644
--- a/docs/play-live-events.md
+++ b/docs/play-live-events.md
@@ -6,7 +6,7 @@ plaza, an agenda that tells you what is on right now and what is next, a banner
when each segment starts, and a synchronized fireworks show everyone watches
together.
-Everything below is driven by one file, [`public/event.json`](../public/event.json).
+Everything below is driven by one file, `public/event.json`.
Edit it, redeploy, and the event exists. Delete it and the world goes back to
normal with no code change and no dead pixels.
diff --git a/public/event.json b/public/event.json
deleted file mode 100644
index 9bb119a98..000000000
--- a/public/event.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "$comment": "The live /play event. Single source of truth for the countdown pill/banner (src/game/event-countdown.js), the in-world meetup experience layer (src/game/meetup-event.js: agenda drawer, go-live moments, synchronized fireworks, commemorative photo), AND the server-side souvenir grant (multiplayer/src/event-drop.js, which fetches this same file). Times are ISO-8601 UTC. agenda[].atMin is minutes after startsAt. Preview locally with ?meetup=now or ?meetup=<ISO> on /play.",
- "id": "three-first-meetup",
- "name": "$THREE First Holders Meetup",
- "tagline": "The first live gathering in the three.ws world. Drop in, hang out, win prizes.",
- "startsAt": "2026-08-09T17:00:00Z",
- "endsAt": "2026-08-09T19:30:00Z",
- "link": "/play?coin=FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump&name=three.ws&symbol=three",
- "linkLabel": "Join the $THREE world",
- "souvenir": {
- "cosmeticId": "laurel-meetup",
- "$comment": "Free commemorative wearable granted once to every player in the world named by `link` between startsAt and endsAt. Must be an id in multiplayer/src/cosmetics-catalog.js with tier 'event', the server refuses to grant anything else, so this field can never hand out a boutique item. Drop the field to run an event with no souvenir."
- },
- "agenda": [
- { "atMin": 0, "title": "Doors open in the plaza", "detail": "Say hi in chat, show off your fit, grab a commemorative photo", "icon": "👋" },
- { "atMin": 20, "title": "King of the Totem showdown", "detail": "Hold the gold ring at the totem to be crowned. Winner takes the round", "icon": "👑" },
- { "atMin": 45, "title": "Fortune's Folly wheel hour", "detail": "Free spin at the plaza wheel, prizes on every wedge", "icon": "🎡" },
- { "atMin": 70, "title": "Plaza dance-off", "detail": "Q opens emotes. Hit the dance floor east of the totem", "icon": "🕺" },
- { "atMin": 105, "title": "Fireworks finale", "detail": "Look up. Grab your event photo while the sky is lit", "icon": "🎆" }
- ]
-}
diff --git a/tests/check-event-window.test.js b/tests/check-event-window.test.js
index 3bf5657f9..0ee50f39f 100644
--- a/tests/check-event-window.test.js
+++ b/tests/check-event-window.test.js
@@ -1,5 +1,5 @@
import { describe, it, expect } from 'vitest';
-import { readFileSync } from 'node:fs';
+import { existsSync, readFileSync } from 'node:fs';
import { validateEventConfig, CONFIG_PATH, isoOf, zoneLines } from '../scripts/check-event-window.mjs';
// The shape of public/event.json, minus the fields the validator ignores. Kept
@@ -124,15 +124,20 @@ describe('validateEventConfig', () => {
// The config that ships is the one that matters; a green suite over fixtures
// while the real file is broken would be the same silent failure in a new place.
-describe('the configured event that ships', () => {
- const doc = JSON.parse(readFileSync(CONFIG_PATH, 'utf8'));
+// Between events there is no file at all (the documented "no event scheduled"
+// state every surface handles), so these run only when one is actually shipping.
+// Read inside the tests rather than in the suite body: vitest still collects a
+// skipped suite's body, so an eager read would throw with no event scheduled.
+const shippedEvent = () => JSON.parse(readFileSync(CONFIG_PATH, 'utf8'));
+describe.skipIf(!existsSync(CONFIG_PATH))('the configured event that ships', () => {
it('is coherent when judged at its own start', () => {
+ const doc = shippedEvent();
const { failures } = validateEventConfig(doc, Date.parse(doc.startsAt));
expect(failures).toEqual([]);
});
it('has not already ended', () => {
- expect(Date.parse(doc.endsAt)).toBeGreaterThan(Date.now());
+ expect(Date.parse(shippedEvent().endsAt)).toBeGreaterThan(Date.now());
});
});
diff --git a/tests/event-souvenir.test.js b/tests/event-souvenir.test.js
index 2000d4296..b0b085d0b 100644
--- a/tests/event-souvenir.test.js
+++ b/tests/event-souvenir.test.js
@@ -30,7 +30,7 @@ import {
mergeOwnedFromLedger, serializeProfile, restoreProfile,
} from '../multiplayer/src/economy.js';
import { boutiqueListings, boutiquePrice } from '../multiplayer/src/shop.js';
-import { readFileSync } from 'node:fs';
+import { existsSync, readFileSync } from 'node:fs';
import { fileURLToPath } from 'node:url';
const SOUVENIR_ID = 'laurel-meetup';
@@ -192,23 +192,26 @@ describe('the souvenir stays out of the shop economy', () => {
});
});
-describe('the shipped event config', () => {
- // The server reads this exact file over HTTP at runtime. A typo in it is a
- // silent no-drop on the night of the event, which is the worst possible time
- // to find out.
- const doc = JSON.parse(
- readFileSync(fileURLToPath(new URL('../public/event.json', import.meta.url)), 'utf8'),
- );
+const EVENT_CONFIG = fileURLToPath(new URL('../public/event.json', import.meta.url));
+// Between events the file is absent on purpose (every surface reads that as "no
+// event" and mounts nothing), so there is no shipped config to hold to account.
+// The server reads this exact file over HTTP at runtime. A typo in it is a
+// silent no-drop on the night of the event, which is the worst possible time to
+// find out. Read inside the tests, not in the suite body: a skipped suite still
+// has its body collected, so an eager read would throw with no event scheduled.
+const shippedEvent = () => JSON.parse(readFileSync(EVENT_CONFIG, 'utf8'));
+
+describe.skipIf(!existsSync(EVENT_CONFIG))('the shipped event config', () => {
it('declares a souvenir the server will actually grant', () => {
- const drop = parseEventDrop(doc);
+ const drop = parseEventDrop(shippedEvent());
expect(drop).not.toBeNull();
expect(isEventCosmetic(drop.cosmeticId)).toBe(true);
expect(drop.coin).toBeTruthy();
});
it('points at a cosmetic whose asset paths are declared', () => {
- const item = getCosmetic(parseEventDrop(doc).cosmeticId);
+ const item = getCosmetic(parseEventDrop(shippedEvent()).cosmeticId);
expect(item.visual?.prop).toMatch(/^\/accessories\/.+\.glb$/);
expect(item.thumb).toMatch(/^\/accessories\/thumbs\/.+\.png$/);
});