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.

Agent detail, oracle stats, onboard scripts, and changelog updates

nirholasd5fd12671fbd
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9427d7717..6cd6bd8ba 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Forge checkout no longer dead-ends when generation is briefly busy** — When the 3D generator was momentarily rate-limited mid-checkout, Forge could show a raw technical error and look like the payment had failed for good. Now a brief upstream slowdown shows a clear message — your payment was not taken, and the generation retries in a few seconds — and the checkout auto-retries on its own before ever asking you to try again. Your payment only settles once the model is actually produced, so a busy moment never costs you anything. (`/forge`) `[fix]`
- **Graduated coins show a live price on agent and community cards** — The bonding-curve card — the compact one on agent profiles, community coin pages, and embeddable widgets — used to go blank with a “No active bonding curve” message the moment a coin graduated to a DEX. Now it reads the coin's live on-chain price instead, marks it “Graduated” at 100%, and shows a real market cap, so $THREE and any other migrated coin display a refreshing price rather than empty space. Those cards also stopped opening a background websocket that could never connect — it had been silently retrying and logging errors on every load. Vault balances now refresh by polling directly and update within seconds. `[improvement, fix]`
- **Holding $THREE now unlocks a premium feature** — $THREE gets its first hard utility: High-quality 3D generation on Forge — the 200k-polygon, PBR-textured tier — is now reserved for $THREE holders. Reach the Bronze holder tier (the entry tier) by holding $THREE and the High tier unlocks automatically, with no payment step. Draft and Standard generation stay free forever, and bring-your-own-key generation is unaffected. Sign in, link your Solana wallet, and the economy page shows your live holder tier and exactly what it unlocks. (`/three`) `[feature]`
+- **Leaving a review on an agent profile works again** — Submitting or updating a star rating on an agent's profile was quietly failing for signed-in users — the form said “Save failed” no matter what, because the security token that protects the save was being read incorrectly and never attached. Reviews now save on the first try. Signed-out visitors who tap Submit get a clear “Sign in to leave a review” prompt instead of a dead button, and agent profiles no longer log errors for agents that have no on-chain trading record — the track-record card simply stays hidden. `[fix]`
- **Pay $THREE per High generation — no holding required** — Don't hold $THREE yet but want a High-quality model? You can now pay in $THREE for a single High generation instead. Pick High in Forge, choose "Pay" on the holder panel, and a clean payment flow prices it in $THREE, takes one wallet approval, verifies it on-chain, and runs your generation automatically. The platform now genuinely accepts $THREE for compute. One payment buys exactly one High generation, and if a generation fails before it runs your payment stays usable — you're never charged for a model you didn't get. Draft and Standard remain free, and holders still generate High straight away. (`/forge`) `[feature]`
- **Play is movable on phones again — and avatars load instead of a placeholder** — Two fixes for Play. On phones, the item hotbar had drifted on top of the on-screen movement joystick in the bottom-left corner, so taps meant to steer the stick landed on the hotbar instead and your character wouldn't move at all — with no keyboard to fall back on, you were stuck. The hotbar now sits in a clear band above the joystick, leaving the whole stick tappable. Separately, every avatar — yours, other players', and the loading-screen preview — had started appearing as a plain capsule stand-in because the app was missing the decoder for the compression format the avatars ship in; that decoder is now wired in, so real, animated avatars load everywhere in Play again. `[fix]`
- **Play loads reliably in private windows and embeds, and explains itself if 3D can't start** — Two ways Play could fail silently are fixed. First: if your browser couldn't start 3D graphics — hardware acceleration switched off, an older device, or some in-app browsers — Play used to sit on the loading screen forever with no explanation. It now shows a clear recovery card that tells you what happened and how to fix it, with a one-tap “Try again”. Second: opening Play in a private/incognito window, or where it's embedded inside another page, could stop it loading at all because the browser blocks saved settings there. Play now treats blocked storage gracefully — it falls back to a default name and avatar and loads normally instead of breaking. `[fix]`
diff --git a/api/oracle/agent-stats.js b/api/oracle/agent-stats.js
index 538247bae..69fc366d6 100644
--- a/api/oracle/agent-stats.js
+++ b/api/oracle/agent-stats.js
@@ -9,6 +9,11 @@
* trading: followers can see exactly which conviction calls were made and how
* they resolved before choosing to mirror a leader.
*
+ * An agent with no oracle activity returns 200 with an empty summary
+ * (summary.total === 0), not a 404 — "no track record yet" is a valid state the
+ * widget hides, and most agents never trade through the oracle. Only a malformed
+ * agent_id is a 400.
+ *
* Cache: 60s public CDN (the data changes only when the settle-loop runs).
*/
@@ -37,16 +42,17 @@ export default async function handleAgentStats(req, res) {
return json(res, 400, { error: 'invalid_agent_id', message: 'agent_id must be a UUID' });
}
- // Load agent name so callers don't need a separate /api/agents fetch.
- const [agentRow] = await sql`
- select name, description, image_url from agent_identities where id = ${agentId}
- `.catch(() => []);
-
- if (!agentRow) {
- return json(res, 404, { error: 'agent_not_found', message: 'No agent with that ID' });
- }
-
- const [summary, actions] = await Promise.all([
+ // The track record lives in oracle_watch_actions, keyed by agent_id alone.
+ // The agent_identities row only enriches the response with a name/avatar so
+ // callers don't need a separate /api/agents fetch. Most agents never trade
+ // through the oracle, so a missing identity row is the common case — not an
+ // error: return an empty record (summary.total === 0) and let the caller hide
+ // the widget rather than 404'ing every agent page. All three reads are
+ // independent, so run them concurrently.
+ const [agentRow, summary, actions] = await Promise.all([
+ sql`select name, description, image_url from agent_identities where id = ${agentId}`
+ .then((rows) => rows[0] || null)
+ .catch(() => null),
actionsSummary(agentId, network),
recentActions(agentId, network, limit),
]);
@@ -68,9 +74,9 @@ export default async function handleAgentStats(req, res) {
return json(res, 200, {
agent: {
id: agentId,
- name: agentRow.name,
- description: agentRow.description || null,
- image_url: agentRow.image_url || null,
+ name: agentRow?.name || null,
+ description: agentRow?.description || null,
+ image_url: agentRow?.image_url || null,
},
network,
summary,
diff --git a/data/changelog.json b/data/changelog.json
index 8c9b77ba1..73d9066f3 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,14 @@
{
"$comment": "Curated changelog entries for three.ws \u2014 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-06-18",
+ "title": "Leaving a review on an agent profile works again",
+ "summary": "Submitting or updating a star rating on an agent's profile was quietly failing for signed-in users — the form said “Save failed” no matter what, because the security token that protects the save was being read incorrectly and never attached. Reviews now save on the first try. Signed-out visitors who tap Submit get a clear “Sign in to leave a review” prompt instead of a dead button, and agent profiles no longer log errors for agents that have no on-chain trading record — the track-record card simply stays hidden.",
+ "tags": [
+ "fix"
+ ]
+ },
{
"date": "2026-06-18",
"title": "Pole Club avatar swaps now actually stick",
diff --git a/pages/agent-detail.html b/pages/agent-detail.html
index 172e53496..f9d38cf89 100644
--- a/pages/agent-detail.html
+++ b/pages/agent-detail.html
@@ -145,6 +145,32 @@
integrity="sha384-sr9b4Ux0WhAUGclJ0ym0FSY2zSOMmNSn0bP/SA0e6bNCrpn/5W3QL8mm+LdlQMKw"
crossorigin="anonymous"
></script>
+ <script>
+ // Optimistic auth probe so the reviews widget can prompt sign-in on
+ // submit instead of firing a csrf/POST round-trip the server would
+ // only 401. /api/auth/me answers 200 with { user: null } for guests,
+ // so this adds no console noise. Authoritative answer dispatched via
+ // the three-ws:auth-resolved event for any late listeners.
+ window.__authed = null;
+ fetch('/api/auth/me', { credentials: 'include' })
+ .then((r) => (r.ok ? r.json() : null))
+ .then((data) => {
+ window.__authed = !!(data && data.user);
+ document.dispatchEvent(
+ new CustomEvent('three-ws:auth-resolved', {
+ detail: { authed: window.__authed, user: data?.user || null },
+ }),
+ );
+ })
+ .catch(() => {
+ window.__authed = false;
+ document.dispatchEvent(
+ new CustomEvent('three-ws:auth-resolved', {
+ detail: { authed: false, user: null },
+ }),
+ );
+ });
+ </script>
</head>
<body>
<header><div id="nav-container"></div></header>
diff --git a/public/changelog.json b/public/changelog.json
index a9157e646..1e3397a65 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-06-18T03:57:44.946Z",
+ "generated_at": "2026-06-18T04:13:28.939Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -57,6 +57,16 @@
"feature"
]
},
+ {
+ "date": "2026-06-18",
+ "type": "update",
+ "title": "Leaving a review on an agent profile works again",
+ "summary": "Submitting or updating a star rating on an agent's profile was quietly failing for signed-in users — the form said “Save failed” no matter what, because the security token that protects the save was being read incorrectly and never attached. Reviews now save on the first try. Signed-out visitors who tap Submit get a clear “Sign in to leave a review” prompt instead of a dead button, and agent profiles no longer log errors for agents that have no on-chain trading record — the track-record card simply stays hidden.",
+ "link": null,
+ "tags": [
+ "fix"
+ ]
+ },
{
"date": "2026-06-18",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index e074bf922..a5691bd18 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -46,6 +46,14 @@
<category>feature</category>
<description>$THREE gets its first hard utility: High-quality 3D generation on Forge — the 200k-polygon, PBR-textured tier — is now reserved for $THREE holders. Reach the Bronze holder tier (the entry tier) by holding $THREE and the High tier unlocks automatically, with no payment step. Draft and Standard generation stay free forever, and bring-your-own-key generation is unaffected. Sign in, link your Solana wallet, and the economy page shows your live holder tier and exactly what it unlocks.</description>
</item>
+ <item>
+ <title>Leaving a review on an agent profile works again</title>
+ <link>https://three.ws/changelog</link>
+ <guid isPermaLink="false">2026-06-18:Leaving a review on an agent profile works again</guid>
+ <pubDate>Thu, 18 Jun 2026 12:00:00 GMT</pubDate>
+ <category>fix</category>
+ <description>Submitting or updating a star rating on an agent's profile was quietly failing for signed-in users — the form said “Save failed” no matter what, because the security token that protects the save was being read incorrectly and never attached. Reviews now save on the first try. Signed-out visitors who tap Submit get a clear “Sign in to leave a review” prompt instead of a dead button, and agent profiles no longer log errors for agents that have no on-chain trading record — the track-record card simply stays hidden.</description>
+ </item>
<item>
<title>Pay $THREE per High generation — no holding required</title>
<link>https://three.ws/forge</link>
diff --git a/public/features.json b/public/features.json
index 7bf56c226..30ce687f1 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-06-18T03:57:44.932Z",
+ "generated_at": "2026-06-18T04:13:28.922Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/scripts/play-onboard-verify.mjs b/scripts/play-onboard-verify.mjs
new file mode 100644
index 000000000..16a586622
--- /dev/null
+++ b/scripts/play-onboard-verify.mjs
@@ -0,0 +1,56 @@
+import { chromium } from 'playwright';
+
+const URL = process.env.PROBE_URL || 'http://localhost:3000/play';
+const browser = await chromium.launch();
+const ctx = await browser.newContext({ viewport: { width: 390, height: 780 }, hasTouch: true, isMobile: true });
+const page = await ctx.newPage();
+await page.goto(URL, { waitUntil: 'domcontentloaded' });
+await page.waitForSelector('.cc-card', { timeout: 15000 });
+await page.tap('.cc-card');
+const phase = await page.waitForFunction(() => window.__CC__?.phase === 'world', { timeout: 60000 }).then(() => 'world').catch(() => 'TIMEOUT');
+
+// Force the onboarding overlay visible immediately (deterministic — bypasses the
+// 650ms timer + flaky connect timing). _showOverlay is idempotent.
+const forced = await page.evaluate(() => {
+ const ob = window.__CC__?._onboard;
+ if (!ob) return 'no-onboard';
+ ob._showOverlay();
+ const ov = document.getElementById('po-overlay');
+ if (ov) ov.classList.add('po-show');
+ return ov ? 'shown' : 'failed';
+});
+await page.waitForTimeout(150);
+
+const r = await page.evaluate(() => {
+ const ov = document.getElementById('po-overlay');
+ const card = document.querySelector('.po-card');
+ const joy = document.getElementById('cc-joystick');
+ const cs = (e) => e ? getComputedStyle(e) : null;
+ const hit = (el) => {
+ const b = el.getBoundingClientRect();
+ const t = document.elementFromPoint(b.left + b.width / 2, b.top + b.height / 2);
+ return t ? (t.id ? '#' + t.id : t.tagName + '.' + String(t.className).split(' ').filter(Boolean)[0]) : null;
+ };
+ const primaryBtn = document.querySelector('#po-overlay .po-btn-primary') || document.querySelector('#po-overlay .po-close');
+ return {
+ bodyOnboarding: document.body.classList.contains('po-onboarding'),
+ overlayPE: cs(ov)?.pointerEvents,
+ cardPE: cs(card)?.pointerEvents,
+ joyZ: cs(joy)?.zIndex,
+ hitAtJoystick: hit(joy),
+ primaryBtnInCard: primaryBtn ? !!primaryBtn.closest('.po-card') : false,
+ };
+});
+
+console.log('phase :', phase);
+console.log('forced overlay :', forced);
+console.log('body.po-onboarding :', r.bodyOnboarding);
+console.log('#po-overlay pointerEv :', r.overlayPE, '(want none)');
+console.log('.po-card pointerEv :', r.cardPE, '(want auto)');
+console.log('#cc-joystick z-index :', r.joyZ, '(want 60 while onboarding)');
+console.log('hit @ joystick centre :', r.hitAtJoystick, '(want #cc-joystick)');
+console.log('primary btn in card :', r.primaryBtnInCard);
+
+const pass = r.overlayPE === 'none' && r.cardPE === 'auto' && r.joyZ === '60' && r.hitAtJoystick === '#cc-joystick' && r.primaryBtnInCard;
+console.log('\nRESULT:', pass ? 'PASS' : 'FAIL');
+await browser.close();
diff --git a/scripts/play-phase-debug.mjs b/scripts/play-phase-debug.mjs
new file mode 100644
index 000000000..9d3389271
--- /dev/null
+++ b/scripts/play-phase-debug.mjs
@@ -0,0 +1,27 @@
+import { chromium } from 'playwright';
+const URL = process.env.PROBE_URL || 'http://localhost:3100/play';
+const browser = await chromium.launch();
+const ctx = await browser.newContext({ viewport: { width: 390, height: 780 }, hasTouch: true, isMobile: true });
+const page = await ctx.newPage();
+const errs = [];
+page.on('console', (m) => { if (m.type() === 'error') errs.push(m.text()); });
+page.on('pageerror', (e) => errs.push('PAGEERROR: ' + e.message));
+await page.goto(URL, { waitUntil: 'domcontentloaded' });
+await page.waitForSelector('.cc-card', { timeout: 15000 });
+const cardInfo = await page.evaluate(() => {
+ const c = document.querySelector('.cc-card');
+ return { count: document.querySelectorAll('.cc-card').length, firstText: c?.textContent?.slice(0, 60) };
+});
+await page.tap('.cc-card');
+for (let i = 0; i < 16; i++) {
+ await page.waitForTimeout(1500);
+ const s = await page.evaluate(() => {
+ const g = window.__CC__;
+ return { phase: g?.phase, net: g?.net?.status, hasRig: !!g?.localRig };
+ });
+ console.log(`t+${((i + 1) * 1.5).toFixed(1)}s phase=${s.phase} net=${s.net} rig=${s.hasRig}`);
+ if (s.phase === 'world') break;
+}
+console.log('cards:', JSON.stringify(cardInfo));
+console.log('errors:', errs.slice(0, 8).join(' | ') || 'none');
+await browser.close();
diff --git a/src/agent-detail.js b/src/agent-detail.js
index cf3a67f41..4d581db3a 100644
--- a/src/agent-detail.js
+++ b/src/agent-detail.js
@@ -35,6 +35,7 @@ import { enrichAgentDetail, renderEmbed as renderAgentEmbed } from './agent-deta
import { log } from './shared/log.js';
import { mountViewSwitcher } from './view-switcher.js';
import { mountCoinStatus } from './pump/coin-status-card.js';
+import { consumeCsrfToken } from './api.js';
// Live coin-status widgets mounted on this page (token chip + launch-history
// rows). Tracked so a re-render (e.g. avatar refresh) tears down their refresh
@@ -846,12 +847,13 @@ function reviewAvatarEl(author) {
return el('div', { class: 'ad-review-avatar', text: initial });
}
+// Single-use CSRF token for review writes. Delegates to the shared client so we
+// inherit the correct response shape ({ data: { token } }) — a local copy here
+// previously read d.token and always got undefined, sending writes without the
+// header and tripping a server 403 for signed-in users.
async function getCsrfToken() {
try {
- const r = await fetch('/api/csrf-token', { credentials: 'include' });
- if (!r.ok) return null;
- const d = await r.json();
- return d.token || null;
+ return await consumeCsrfToken();
} catch {
return null;
}
@@ -1029,6 +1031,18 @@ function buildReviewForm(agentId, existing, onSuccess) {
submitBtn.addEventListener('click', async () => {
if (submitting || selectedRating === 0) return;
+
+ // Guests can't review — prompt sign-in without firing a csrf/POST pair the
+ // server would only 401. window.__authed is resolved by the page's inline
+ // /api/auth/me probe; unknown (null/undefined) means the probe is still in
+ // flight, so let the request go and the POST's own 401 handle it.
+ if (window.__authed === false) {
+ statusEl.innerHTML =
+ '<a href="/login" style="color:var(--ad-violet)">Sign in</a> to leave a review';
+ statusEl.style.color = 'var(--ad-muted)';
+ return;
+ }
+
submitting = true;
submitBtn.disabled = true;
submitBtn.textContent = 'Saving…';
@@ -1055,7 +1069,7 @@ function buildReviewForm(agentId, existing, onSuccess) {
if (!r.ok) {
if (r.status === 401) {
statusEl.innerHTML =
- '<a href="/sign-in" style="color:var(--ad-violet)">Sign in</a> to leave a review';
+ '<a href="/login" style="color:var(--ad-violet)">Sign in</a> to leave a review';
} else {
statusEl.textContent = json.error?.message || 'Save failed';
}