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(tour): guarantee the boot gate on every page so a multi-page tour never dies
fudjia40190a1655a4
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 0f8e3f4b6..20d3d3a10 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -25,6 +25,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Portfolio risk panel stops crying wolf on fresh wallets** — Every agent wallet holds SOL as its base currency, but the Portfolio tab used to flag a brand-new wallet holding only SOL as "100% concentration risk" in alarming red — a false alarm, since holding the base asset isn't a bet on anything. Concentration is now measured only across volatile memecoin positions, so a wallet parked in SOL or stablecoins reads correctly: a new Reserve tile shows your dry powder, and the panel tells you it's ready to deploy with minimal market risk instead of warning you about a risk that isn't there. A genuine over-concentration in one memecoin is still flagged. Applies to every agent's Portfolio view. `[fix, improvement]`- **Status page no longer reports a phantom outage — and graduation tracking runs clean** — The public status page had been showing the x402 paid-API discovery feed and the 3D viewer as down for days while both were actually healthy: the uptime monitor was probing two URLs that never existed. The probes now hit the real public paths, and the falsely-recorded downtime history is purged so the 90-day uptime bars reflect the services, not the monitor bug. The pump.fun graduation tracker was also timing out on every heartbeat tick because it listened longer than the heartbeat allows — it now fits its budget and reports a clean run. (`/status`) `[fix, infra]`- **The agent economy now watches itself and pages the team** — After weeks of the agent-to-agent economy silently stalling and being diagnosed hours late, the platform now monitors it as a system: every 5 minutes it checks that the per-minute heartbeat is alive, that no engine is failing or stuck on a fixable problem (missing config, an unfundable payment, a full database), and that real on-chain agent activity is still flowing. Any of those pages the ops channel immediately, keeps re-paging hourly until fixed, and announces recovery. The status page's JSON feed also keeps 24 hours of health history so anyone can see exactly when a stall began. `[improvement, infra]`+- **The guided tour no longer breaks partway through** — The site tour walks you across dozens of pages, but it would silently die after the first few — landing on certain pages left it unable to continue, so you'd have to start over. The cause: more than half of the site's pages shipped without the tiny loader that lets the tour pick back up after each page change, so the moment the tour moved to one of them it just stopped. Every page now carries that loader, so the tour runs start to finish across the whole site no matter which pages it visits. `[fix]`- **The sniper engine now pages us when it goes down — and restarts itself** — The on-chain sniper worker went quiet on July 3 and nothing noticed: the status page showed the engine offline and zero launches scored, but no alert fired. The platform's watchdog now checks the sniper's own heartbeat every 5 minutes and pages the ops channel within 10 minutes of a stall, with hourly re-pages until it recovers. The worker also gained a dead-man switch: if it loses its database for 15 minutes straight it restarts itself instead of running as a zombie that scores nothing. (`/status`) `[fix, infra]`- **Tour Builder — design a walking 3D store guide with zero code** — Building a guided 3D tour for your store used to mean hand-writing a JSON file. Now there's a live, Wix-style playground at /tour-builder: a demo storefront on one side, a point-and-click editor on the other. Pick who guides the tour, click the sections you want it to walk to, type what it should say, and hit Preview to watch the real tour run exactly as your visitors will see it. When it looks right, one click gives you the curriculum file plus the exact snippets to paste into Shopify. The Shopify tutorial is rebuilt around it — a ten-minute no-code path — with a new advanced guide for multi-page tours, exact section targeting, real spoken voices, custom avatars, deep links, and the JavaScript API. (`/tour-builder`) `[feature, docs]`- **Trading Copilot no longer freezes after reading your wallet** — When you asked the Copilot about your portfolio, it sometimes read your wallet, then read it again, and got stuck on "Analyzing…" with the typing dots spinning forever — you'd see the same "Portfolio: … 6 tokens" line twice and never get an answer. The Copilot now remembers what it just looked up within a single reply, so a repeated lookup is instant instead of a wasted round, and the moment it starts going in circles it stops and answers with what it already knows. As a backstop, the chat now detects a genuinely dead connection and offers a Retry instead of hanging — so it can never leave you staring at a frozen indicator again. `[fix, improvement]`diff --git a/data/changelog.json b/data/changelog.jsonindex 1bb407a63..822ffcc0b 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,14 @@{"$comment": "Curated changelog entries for three.ws — the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.","entries": [+ {+ "date": "2026-07-05",+ "title": "The guided tour no longer breaks partway through",+ "summary": "The site tour walks you across dozens of pages, but it would silently die after the first few — landing on certain pages left it unable to continue, so you'd have to start over. The cause: more than half of the site's pages shipped without the tiny loader that lets the tour pick back up after each page change, so the moment the tour moved to one of them it just stopped. Every page now carries that loader, so the tour runs start to finish across the whole site no matter which pages it visits.",+ "tags": [+ "fix"+ ]+ },{"date": "2026-07-05","title": "Explore mode — walk the tour yourself, GTA-style checkpoints",diff --git a/package.json b/package.jsonindex 68b473078..222de81f6 100644--- a/package.json+++ b/package.json@@ -141,7 +141,7 @@"build:news": "node scripts/build-news.mjs","prebuild": "(node scripts/build-news.mjs & node scripts/build-skill-metadata.mjs & node scripts/build-local-skill-packs.mjs & npm run build:club-assets & npm run build:walk-environments & wait) && node scripts/inject-blog-seo.mjs --write && node scripts/inject-hidden-guard.mjs --write && (node scripts/build-page-index.mjs && node scripts/audit-page-index.mjs --strict && node scripts/audit-empty-handlers.mjs && node scripts/audit-hidden-guard.mjs) && node scripts/inject-seo-meta.mjs --write && node scripts/inject-theme-boot.mjs --write","seo:meta": "node scripts/inject-blog-seo.mjs --write && node scripts/build-page-index.mjs && node scripts/inject-seo-meta.mjs --write",- "build": "NODE_OPTIONS='--no-deprecation --max-old-space-size=6144' vite build && node scripts/strip-sw-from-embeds.mjs",+ "build": "NODE_OPTIONS='--no-deprecation --max-old-space-size=6144' vite build && node scripts/strip-sw-from-embeds.mjs && node scripts/inject-tour-boot.mjs","build:wasm": "PATH=\"$HOME/.cargo/bin:$PATH\" RUSTFLAGS='-C target-feature=+simd128' wasm-pack build crates/vanity-grinder --target web --release --out-dir ../../src/solana/vanity/wasm && printf '%s\\n' '# wasm-pack writes a default `*` gitignore that excludes everything.' '# Override it: the generated files in this directory ARE checked in so the' '# app builds without requiring a Rust toolchain at install time. Run' '# `npm run build:wasm` after editing /crates/vanity-grinder/src/lib.rs to' '# refresh these artifacts.' '!*' > src/solana/vanity/wasm/.gitignore","build:animations": "node scripts/build-animations.mjs","convert:fbx": "node scripts/fbx-to-glb.mjs",diff --git a/public/changelog.json b/public/changelog.jsonindex 79506fe7b..138c50f98 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-05T13:50:11.928Z",+ "generated_at": "2026-07-05T14:12:26.128Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -208,6 +208,16 @@"infra"]},+ {+ "date": "2026-07-05",+ "type": "update",+ "title": "The guided tour no longer breaks partway through",+ "summary": "The site tour walks you across dozens of pages, but it would silently die after the first few — landing on certain pages left it unable to continue, so you'd have to start over. The cause: more than half of the site's pages shipped without the tiny loader that lets the tour pick back up after each page change, so the moment the tour moved to one of them it just stopped. Every page now carries that loader, so the tour runs start to finish across the whole site no matter which pages it visits.",+ "link": null,+ "tags": [+ "fix"+ ]+ },{"date": "2026-07-05","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex 1d0605eb5..63ff61478 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -158,6 +158,14 @@<category>improvement</category><description>After weeks of the agent-to-agent economy silently stalling and being diagnosed hours late, the platform now monitors it as a system: every 5 minutes it checks that the per-minute heartbeat is alive, that no engine is failing or stuck on a fixable problem (missing config, an unfundable payment, a full database), and that real on-chain agent activity is still flowing. Any of those pages the ops channel immediately, keeps re-paging hourly until fixed, and announces recovery. The status page's JSON feed also keeps 24 hours of health history so anyone can see exactly when a stall began.</description></item>+ <item>+ <title>The guided tour no longer breaks partway through</title>+ <link>https://three.ws/changelog</link>+ <guid isPermaLink="false">2026-07-05:The guided tour no longer breaks partway through</guid>+ <pubDate>Sun, 05 Jul 2026 12:00:00 GMT</pubDate>+ <category>fix</category>+ <description>The site tour walks you across dozens of pages, but it would silently die after the first few — landing on certain pages left it unable to continue, so you'd have to start over. The cause: more than half of the site's pages shipped without the tiny loader that lets the tour pick back up after each page change, so the moment the tour moved to one of them it just stopped. Every page now carries that loader, so the tour runs start to finish across the whole site no matter which pages it visits.</description>+ </item><item><title>The sniper engine now pages us when it goes down — and restarts itself</title><link>https://three.ws/status</link>diff --git a/public/features.json b/public/features.jsonindex 34cc84c1d..3c2a5d7cd 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-05T13:50:11.916Z",+ "generated_at": "2026-07-05T14:12:26.115Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",diff --git a/scripts/build-vercel.mjs b/scripts/build-vercel.mjsindex be226774d..6e24554d5 100644--- a/scripts/build-vercel.mjs+++ b/scripts/build-vercel.mjs@@ -212,7 +212,7 @@ async function buildLib() {}async function buildApp() {- await run('build:app', `node ${binCli('vite')} build && node scripts/strip-sw-from-embeds.mjs`, {+ await run('build:app', `node ${binCli('vite')} build && node scripts/strip-sw-from-embeds.mjs && node scripts/inject-tour-boot.mjs`, {env: { NODE_OPTIONS: '--no-deprecation --max-old-space-size=6144' },});}diff --git a/scripts/inject-tour-boot.mjs b/scripts/inject-tour-boot.mjsnew file mode 100644index 000000000..64f6c1598--- /dev/null+++ b/scripts/inject-tour-boot.mjs@@ -0,0 +1,86 @@+#!/usr/bin/env node+// Guarantee the Guided-Tour boot gate on EVERY built HTML page.+// ============================================================+// The tour navigates the visitor across dozens of pages (full-page loads), and+// on each new page it can only resume if the tiny boot gate is present to+// re-inject /feature-tour.js. That gate is normally added by a Vite+// transformIndexHtml hook (vite.config.js → 'feature-tour-boot') — but that hook+// runs inconsistently across the build: ~55% of built pages (e.g. /discover,+// /studio, /bazaar) shipped WITHOUT it, so the moment the tour navigated onto+// one of them the engine never loaded and the whole tour died, forcing a+// restart. An 88-stop curriculum hit a gateless page within the first few stops.+//+// This post-build step is the belt to that suspenders: it walks dist/ and adds+// the gate to any page missing it, so the tour survives navigation to any page.+// Doing it as a separate script (like strip-sw-from-embeds.mjs) makes it run+// reliably regardless of Vite plugin ordering. Idempotent — a second run is a+// no-op. Embed surfaces are intentionally skipped (they must never run the tour+// inside a third-party iframe).++import { readdirSync, statSync, readFileSync, writeFileSync, existsSync } from 'node:fs';+import { join } from 'node:path';++// Must never run the tour — loaded in third-party iframes.+const EMBED_ENTRIES = new Set([+ 'widget.html',+ 'embed.html',+ 'avatar-embed.html',+ 'agent-embed.html',+ 'a-embed.html',+ 'agent-token-page.html',+]);++// The exact gate string used by vite.config.js → 'feature-tour-boot'. Only pulls+// in the heavy tour module when a tour is starting (?tour=) or already active+// (sessionStorage) — so adding it to a page never in a tour is a harmless no-op.+const GATE =+ "(function(){if(window.top!==window.self)return;var a=false;try{var r=sessionStorage.getItem('tws:tour:state');a=!!r&&JSON.parse(r).active===true}catch(e){}var p=new URLSearchParams(location.search).get('tour');if(!(p==='start'||p==='1'||(p!=='0'&&a)))return;if(document.querySelector('script[src=\"/feature-tour.js\"]'))return;var s=document.createElement('script');s.type='module';s.src='/feature-tour.js';document.head.appendChild(s)})();";++const GATE_TAG = `<script>${GATE}</script>`;+const MARKER = 'tws:tour:state'; // presence means the gate is already there++const distDir = process.argv[2] || 'dist';++if (!existsSync(distDir)) {+ console.error(`[tour-boot] dist directory not found: ${distDir}`);+ process.exit(2);+}++function walk(dir, out = []) {+ for (const name of readdirSync(dir)) {+ const p = join(dir, name);+ const st = statSync(p);+ if (st.isDirectory()) walk(p, out);+ else if (name.endsWith('.html')) out.push(p);+ }+ return out;+}++let injected = 0;+let already = 0;+let skipped = 0;++for (const file of walk(distDir)) {+ const base = file.split('/').pop();+ if (EMBED_ENTRIES.has(base)) {+ skipped++;+ continue;+ }+ const html = readFileSync(file, 'utf8');+ if (html.includes(MARKER)) {+ already++;+ continue;+ }+ // Inject just before </head> (fall back to before </body>, then prepend).+ let out;+ if (html.includes('</head>')) out = html.replace('</head>', `${GATE_TAG}</head>`);+ else if (html.includes('</body>')) out = html.replace('</body>', `${GATE_TAG}</body>`);+ else out = GATE_TAG + html;+ writeFileSync(file, out);+ injected++;+}++console.log(+ `[tour-boot] gate ensured on ${injected + already}/${injected + already + skipped} pages ` ++ `(${injected} injected, ${already} already had it, ${skipped} embed surfaces skipped)`,+);