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.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
fix(play): reap a stale play pass on boot and log decorative failures as telemetry
nirholasc2bfd5de10f7
diff --git a/src/game/boot-avatar.js b/src/game/boot-avatar.jsindex d1be6ce71..6c7343982 100644--- a/src/game/boot-avatar.js+++ b/src/game/boot-avatar.js@@ -125,7 +125,11 @@ function boot() {loop(last, target);done();}).catch((err) => {- log.warn('[boot-avatar] avatar load failed:', err?.message);+ // Designed path, logged as telemetry rather than a warning: the loader is+ // released on the line below and the card styles itself for the no-avatar+ // case, so a blocked or missing GLB costs a decoration, never the boot. It+ // is also the normal outcome behind an ad blocker or a venue filter.+ log.info('[boot-avatar] avatar load failed:', err?.message);canvas.parentElement?.classList.add('kx-boot-noavatar');done();});diff --git a/src/game/community-net.js b/src/game/community-net.jsindex 73ce0fbe1..e3e59c639 100644--- a/src/game/community-net.js+++ b/src/game/community-net.js@@ -519,7 +519,14 @@ export class CommunityNet {image: this.room.state.coinImage,});} catch (err) {- const msg = err?.message ?? String(err);+ // Colyseus surfaces a failed matchmaking XHR as the raw ProgressEvent,+ // which has no `message`, so the old `String(err)` fallback logged the+ // literally useless "[object ProgressEvent]" and threw away the one fact+ // worth knowing: which endpoint refused us. Name the target instead.+ const msg = err?.message+ || (err?.code != null ? `code ${err.code}` : '')+ || (err?.target?.responseURL ? `no response from ${err.target.responseURL}` : '')+ || (err?.type ? `${err.type} from the game server` : String(err));// A holder-gate refusal (onAuth threw) is terminal, not a flaky link,// retrying with the same expired/invalid pass just loops. Surface it so// the scene can route the player back to the gate, and stop here.@@ -529,7 +536,13 @@ export class CommunityNet {this._emit('denied', msg);return;}- log.warn('[community-net] connect failed:', msg);+ // Designed failure state, so this is expected-path telemetry rather than+ // a warning: the status drives the HUD's connection pill, the backoff+ // below retries on its own, and retry() offers a manual reconnect after+ // that. An unreachable game server is the normal case on a dev box and+ // behind a venue filter, and announcing our own offline mode as a defect+ // in every visitor's console said nothing they or we could act on.+ log.info('[community-net] connect failed:', msg);this._setStatus('failed', msg);this._scheduleReconnect();}diff --git a/src/game/oracle-ribbon.js b/src/game/oracle-ribbon.jsindex de7c5662d..acc7364b4 100644--- a/src/game/oracle-ribbon.js+++ b/src/game/oracle-ribbon.js@@ -163,7 +163,9 @@ export function mountOracleRibbon(scene, opts = {}) {if (data && data.history) buildSeries(series, data);} catch (err) {if (disposed || abort.signal.aborted) return;- log.warn('[oracle-ribbon] forecast fetch failed:', err?.message);+ // The ribbon is decorative (see the retry note below), so its absence is+ // a designed outcome and this is expected-path telemetry, not a warning.+ log.info('[oracle-ribbon] forecast fetch failed:', err?.message);// One retry ~30s later covers a transient blip / rate limit; beyond that// the world simply renders without the line (decorative, not load-bearing).if (!isRetry) retryTimer = setTimeout(() => load(true), 30_000);diff --git a/src/game/play-gate.js b/src/game/play-gate.jsindex ed4e222ec..a3fd29342 100644--- a/src/game/play-gate.js+++ b/src/game/play-gate.js@@ -50,6 +50,14 @@ class Gate {}async _start() {+ // Read the session cache FIRST, because reading is also how it is reaped:+ // loadStoredPass() drops an entry that is expired or corrupt. Both early+ // exits below (the config probe failing open, and a world whose gate is+ // off) used to return before anything touched sessionStorage, so a dead+ // token outlived the boot that should have retired it and stayed there for+ // the rest of the tab's life, ready for the next reader to hand to a room+ // join the server can only refuse.+ const cached = loadStoredPass();// Probe the gate before mounting anything — no flash when /play is open or a// fresh cached pass exists. Only mount if sign-in is actually required.let cfg;@@ -79,7 +87,6 @@ class Gate {}// A still-fresh cached pass for this exact mint skips the wallet prompt.- const cached = loadStoredPass();if (cached && cached.mint === cfg.mint) {this._finish({ required: true, wallet: cached.wallet, playPass: cached.playPass, balance: cached.balance, symbol: cached.symbol });return;