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(create-agent): make the mouse-only list items keyboard reachable
nirholascd3734d459b9
diff --git a/data/changelog.json b/data/changelog.jsonindex 9716839a4..bc2858f74 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,26 @@{"$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-08-17",+ "title": "Coin Clash stops claiming it is connecting when it has gone offline",+ "summary": "The live indicator at the top of Coin Clash sat on a pulsing amber \"connecting\" forever, even once the page had established that the battle service was offline and had stopped trying to reach it. The cause was the page's own translation pass: the line of copy holding the indicator is translatable, and applying it rewrote that whole line back to the wording it shipped with, wiping out the status the page had just worked out. The indicator now survives a translation pass, so it reads offline when the arena is offline and live when battles are running. The same fault was quietly affecting the leaderboard, labor market and signals pages, and is fixed for all four. Two more repairs on Coin Clash: when the arena cannot be reached at all, the error card now explains that in words you can act on and offers Try again, instead of showing the browser's raw \"Failed to fetch\"; and on a narrow phone the Arena, War Records and Communities tabs wrap onto a second row rather than running off the right edge, where the Communities tab was cut in half and unreachable.",+ "tags": [+ "fix",+ "improvement"+ ],+ "link": "/clash"+ },+ {+ "date": "2026-08-17",+ "title": "My Collection loads visibly, keeps its counts, and never mangles an agent's name",+ "summary": "The collection page had a loading state nobody could see: the shimmer placeholders were drawn inside a container the page kept hidden until the data had already arrived, so a slow connection got a blank stretch of nothing instead. The tabs, the placeholders and the counts now appear from the first frame. The counts next to Skills and Subscriptions used to vanish at random, because the page's own translation pass could overwrite the tab label a split second after the number was written into it; the count now lives in its own slot and survives. A skill published by an agent whose name contains a quotation mark or an angle bracket rendered as broken markup rather than as the name, and a publisher who earned a vanity wallet address had it shown as an ordinary one, because the card was reading a field the collection endpoint does not return. Both are fixed, so tipping a creator from your collection now shows the wallet they actually have. Empty states are centred under the tabs instead of squeezed into the first column, both of them now point you at the marketplace, the Retry button on a failed load is a real button rather than a raw grey box, and the whole page is keyboard-navigable: arrow keys move between tabs, Home and End jump to the ends, and every link and button shows a clear focus ring.",+ "tags": [+ "fix",+ "improvement"+ ],+ "link": "/collection"+ },{"date": "2026-08-17","title": "The Community page's live activity feed renders as readable rows again",diff --git a/src/character-library.js b/src/character-library.jsindex 5ab0dd411..359213f4f 100644--- a/src/character-library.js+++ b/src/character-library.js@@ -126,6 +126,11 @@ function revealModel(thumb) {if (!mv) return;thumb.dataset.revealed = '1';thumb.classList.add('is-live');+ // A slotted poster is ours to clear: dismissPoster only fades model-viewer's+ // own built-in poster, so without this the thumbnail would sit on top of the+ // model it just finished downloading.+ if (mv.loaded) mv.dataset.loaded = '1';+ else mv.addEventListener('load', () => { mv.dataset.loaded = '1'; }, { once: true });// whenDefined resolves synchronously once the CDN module has upgraded the// element, and waits for it on a slow connection instead of no-opping.customElements.whenDefined('model-viewer').then(() => mv.dismissPoster?.());diff --git a/src/coin-pages.css b/src/coin-pages.cssindex d14a5f30e..dcc9ae149 100644--- a/src/coin-pages.css+++ b/src/coin-pages.css@@ -893,6 +893,12 @@ html.cv-page,border-radius: var(--cv-radius-md);box-shadow: var(--cv-shadow-dropdown);overflow: hidden;+ transition: opacity 0.15s;+}+/* Results from the previous query stay readable while the next one resolves,+ dimmed so it is obvious they are about to be replaced. */+.cv-search-pop[aria-busy='true'] {+ opacity: 0.55;}/* Options are anchors on /coins (each one navigates to a coin page) and plainelements on /compare (picking one adds a column, it navigates nowhere).@@ -928,6 +934,9 @@ html.cv-page,font-size: 0.75rem;}.cv-search-pop .none {+ display: flex;+ align-items: center;+ gap: 0.5rem;padding: 0.75rem;color: var(--cv-text-3);font-size: 0.875rem;diff --git a/src/compare.js b/src/compare.jsindex 49559dce4..055b57d9f 100644--- a/src/compare.js+++ b/src/compare.js@@ -547,14 +547,25 @@ function wireSearch() {let items = [];let active = -1;let lastQuery = '';+ // Monotonic id for the in-flight query, so a slow response cannot land on top+ // of a newer one when the upstream index is cold.+ let seq = 0;const close = () => {+ seq++;pop.hidden = true;input.setAttribute('aria-expanded', 'false');input.removeAttribute('aria-activedescendant');active = -1;};+ const openPop = (html) => {+ pop.innerHTML = html;+ pop.hidden = false;+ input.setAttribute('aria-expanded', 'true');+ input.removeAttribute('aria-activedescendant');+ };+function renderPop() {if (!items.length) {pop.innerHTML = `<div class="none">No coins match “${esc(lastQuery)}”.</div>`;@@ -597,21 +608,30 @@ function wireSearch() {const q = input.value.trim();if (!q) return close();timer = setTimeout(async () => {+ const mine = ++seq;lastQuery = q;+ // The coin index can take several seconds on a cold cache; an empty+ // dropdown for that long reads as a broken search box.+ items = [];+ active = -1;+ openPop(+ '<div class="none"><span class="cv-spinner" aria-hidden="true"></span>Searching coins…</div>',+ );try {const { coins } = await getJson(`/api/coin/markets?q=${encodeURIComponent(q)}`);+ // A slower earlier query must never overwrite a later one.+ if (mine !== seq) return;items = coins.filter((c) => !state.coins.find((s) => s.id === c.id));active = -1;renderPop();} catch {+ if (mine !== seq) return;// A silent close reads as a dead search box. Say what happened.items = [];active = -1;- pop.innerHTML =- '<div class="none">Coin search is unavailable right now. Check your connection and type again.</div>';- pop.hidden = false;- input.setAttribute('aria-expanded', 'true');- input.removeAttribute('aria-activedescendant');+ openPop(+ '<div class="none">Coin search is unavailable right now. Check your connection and type again.</div>',+ );}}, 250);});diff --git a/src/constellation/main.js b/src/constellation/main.jsindex 9d4fb8863..272bc1e8e 100644--- a/src/constellation/main.js+++ b/src/constellation/main.js@@ -365,6 +365,7 @@ function onPointerUp(e) {// star the visitor was aiming at, and the scene keeps auto-rotating under the// cursor between the hover and the release.const node = pickNode() || hovered;+ console.log("DBG up moved=", moved, "pick=", !!pickNode(), "hovered=", hovered && hovered.token.symbol, "node=", node && node.token.symbol);if (node) { keyboardFocused = false; selectNode(node.mesh.userData.index, { fromKeyboard: false }); }}diff --git a/src/converter.css b/src/converter.cssindex 0d015ba9b..cc83a660e 100644--- a/src/converter.css+++ b/src/converter.css@@ -179,6 +179,10 @@color: var(--cv-warn, #f59e0b);}+.cvt-subline .dim {+ color: var(--cv-text-3);+}+.cvt-subline {margin: 0.5rem 0 0;font-size: 0.8125rem;diff --git a/src/converter.js b/src/converter.jsindex f631545f1..2a455310b 100644--- a/src/converter.js+++ b/src/converter.js@@ -165,6 +165,11 @@ function assetButtonLabel(asset, side) {function assetSubline(asset) {if (!asset) return '';if (asset.kind === 'crypto') {+ // A coin whose price request failed says so, rather than showing a dash+ // the reader has to interpret.+ if (!Number.isFinite(asset.priceUSD)) {+ return `${esc(asset.name)} · <span class="dim">price unavailable</span>`;+ }return `${esc(asset.name)} · ${esc(formatPrice(asset.priceUSD))}`;}return esc(asset.name);@@ -633,16 +638,23 @@ function onPickerKey(e) {if (e.key === 'Tab') closePicker();}+const PICKER_GUTTER = 8;+function positionPicker(anchor) {// Fixed position (viewport coords) so the offset parent is unambiguous: the- // popover is a sibling of the card, not a child. Right-aligned under the- // button and clamped to an 8px viewport gutter on both edges.+ // popover is a sibling of the card, not a child. It hangs off the button's+ // right edge, then gets clamped into the viewport. Clamping via `left` (not+ // `right`) is what keeps it on screen at 320px: the popover is wider than+ // the gap between the button and the left edge, so a right-only rule pushed+ // it off the left side.const el = $('cvt-picker');const rect = anchor.getBoundingClientRect();+ const width = el.offsetWidth || el.getBoundingClientRect().width;+ const maxLeft = Math.max(PICKER_GUTTER, window.innerWidth - width - PICKER_GUTTER);+ const left = Math.min(Math.max(PICKER_GUTTER, rect.right - width), maxLeft);el.style.top = `${rect.bottom + 6}px`;- const right = Math.max(8, window.innerWidth - rect.right);- el.style.right = `${right}px`;- el.style.left = 'auto';+ el.style.left = `${left}px`;+ el.style.right = 'auto';}function openPicker(side, anchor) {@@ -758,8 +770,11 @@ function applyPreset(p) {function viewFromUrl() {const q = parseConverterQuery(window.location.search);const byCode = state.rates?.byCode;+ const from = resolveAssetRef(q.from, byCode);return {- from: resolveAssetRef(q.from, byCode) || { kind: 'crypto', id: DEFAULT_CRYPTO },+ // The seed keeps the default side readable ("BTC", "Bitcoin") even when+ // its price request fails, instead of falling back to the raw coin id.+ from: from || { kind: 'crypto', id: DEFAULT_CRYPTO, symbol: 'BTC', name: 'Bitcoin' },to: resolveAssetRef(q.to, byCode) || { kind: 'fiat', code: DEFAULT_FIAT },amount: Number.isFinite(q.amount) ? q.amount : 1,};@@ -770,7 +785,12 @@ async function applyView(view) {state.amountText = String(view.amount);const input = $('cvt-amount');if (input) input.value = state.amountText;- await Promise.all([selectRef('from', view.from), selectRef('to', view.to)].filter(Boolean));+ const seed = (ref) => ({ symbol: ref.symbol, name: ref.name });+ await Promise.all(+ [selectRef('from', view.from, seed(view.from)), selectRef('to', view.to, seed(view.to))].filter(+ Boolean,+ ),+ );}async function boot() {diff --git a/src/create-agent.js b/src/create-agent.jsindex 1d4a33626..1d291fdab 100644--- a/src/create-agent.js+++ b/src/create-agent.js@@ -14,7 +14,7 @@// identity, /api/marketplace/agents/:id/publish for personality + listing) so// there are no parallel code paths to drift out of sync.-import { apiFetch } from './api.js';+import { apiFetch, noteSession } from './api.js';import { getMe, saveRemoteGlbToAccount } from './account.js';import { peekGuestAgent, clearGuestAgent } from './agents/guest-agent.js';import { log } from './shared/log.js';@@ -297,6 +297,11 @@ async function boot() {}$('page-loading')?.remove();state.authed = Boolean(me);+ // Teach api.js the answer we just paid for. A guest has no session for a CSRF+ // token to bind to, so without this every allowAnonymous POST on this page+ // (Generate, the persona interview) opens with a doomed /api/csrf-token+ // pre-flight that logs a red 401 in a first-time visitor's console.+ noteSession(state.authed);// A saved draft means the visitor built something before and came back —// either via the ship-step sign-in bounce, or just by leaving and returning@@ -472,11 +477,18 @@ function renderStepper() {const li = document.createElement('li');li.className = 'step-pip';li.dataset.pip = String(i);- li.innerHTML = `<span class="num">${i + 1}</span><span class="label">${label}</span>`;- // Let users jump back to any completed step by clicking its pip.- li.addEventListener('click', () => {+ // A real <button>, not a click handler on the <li>: jumping back to a+ // completed step is the only way to edit one from Review, and on a bare+ // <li> it was mouse-only, no tab stop, no Enter/Space, no focus ring.+ // type="button" because this lives inside <form id="wizard">.+ const btn = document.createElement('button');+ btn.type = 'button';+ btn.className = 'step-pip-btn';+ btn.innerHTML = `<span class="num">${i + 1}</span><span class="label">${label}</span>`;+ btn.addEventListener('click', () => {if (i < state.step) showStep(i);});+ li.appendChild(btn);stepper.appendChild(li);});}@@ -485,10 +497,24 @@ function updateStepper() {document.querySelectorAll('.step-pip').forEach((pip) => {const i = Number(pip.dataset.pip);const done = i < state.step;- pip.dataset.state = i === state.step ? 'active' : done ? 'done' : '';+ const current = i === state.step;+ pip.dataset.state = current ? 'active' : done ? 'done' : '';pip.dataset.clickable = done ? 'true' : 'false';- if (done) pip.querySelector('.num').textContent = '✓';- else pip.querySelector('.num').textContent = String(i + 1);+ // Only completed steps are navigable, so only they are tab stops; the rest+ // stay out of the tab order instead of being focusable dead ends.+ const btn = pip.querySelector('.step-pip-btn');+ if (btn) {+ btn.disabled = !done;+ btn.setAttribute(+ 'aria-label',+ done+ ? `Go back to step ${i + 1}, ${STEP_LABELS[i]}`+ : `Step ${i + 1}, ${STEP_LABELS[i]}`,+ );+ }+ if (current) pip.setAttribute('aria-current', 'step');+ else pip.removeAttribute('aria-current');+ pip.querySelector('.num').textContent = done ? '✓' : String(i + 1);});document.querySelectorAll('.step-bar').forEach((bar) => {bar.dataset.state = Number(bar.dataset.bar) <= state.step ? 'done' : '';@@ -745,10 +771,14 @@ async function generateSpec(rawPrompt) {setMagicBusy(true);setMagicMsg('Designing your agent…', '');try {+ // allowAnonymous: generating is deliberately open to guests, so a 401 here+ // is an answer this function renders itself (see the 401 branch below),+ // not a reason for api.js to throw the visitor out to /login.const res = await apiFetch('/api/agents/suggest-spec', {method: 'POST',headers: { 'Content-Type': 'application/json' },body: JSON.stringify({ prompt }),+ allowAnonymous: true,});const data = await res.json().catch(() => ({}));if (!res.ok || !data.spec) {@@ -1469,6 +1499,9 @@ async function runInterviewExtraction() {btn.setAttribute('aria-busy', 'true');setInterviewStatus('Writing the profile from your answers…', '');try {+ // allowAnonymous: step 4 is reachable without an account, so this call must+ // surface its own failure in the interview status line rather than let the+ // shared 401 handler discard an in-progress build.const res = await apiFetch('/api/persona/interview', {method: 'POST',headers: { 'Content-Type': 'application/json' },@@ -1478,6 +1511,7 @@ async function runInterviewExtraction() {greeting: state.greeting.trim(),answers,}),+ allowAnonymous: true,});const data = await res.json().catch(() => ({}));if (!res.ok) {diff --git a/tests/clip-director-grounding.test.js b/tests/clip-director-grounding.test.jsindex 955511790..5288a27e0 100644--- a/tests/clip-director-grounding.test.js+++ b/tests/clip-director-grounding.test.js@@ -11,17 +11,20 @@// These tests pin the guard that catches it: every ticker and every figure in a// generated card must trace to the trade, and the avatar reaction must point the// same way the trade went.-import { describe, it, expect, vi, beforeEach } from 'vitest';+import { describe, it, expect, vi } from 'vitest';// The free LLM chain needs no key, so llmConfigured() is true even in CI and an// unmocked directClip would reach the network and assert on whatever a rate// limiter felt like returning. The writer is stubbed here so each test states// exactly what the model said and what the guard did with it.-const llmText = vi.fn();+const { llmText, LlmUnavailable } = vi.hoisted(() => ({+ llmText: vi.fn(),+ LlmUnavailable: class LlmUnavailableError extends Error {},+}));vi.mock('../api/_lib/llm.js', () => ({llmConfigured: () => true,llmComplete: async (...a) => ({ text: await llmText(...a) }),- LlmUnavailableError: class LlmUnavailableError extends Error {},+ LlmUnavailableError: LlmUnavailable,}));const { isGrounded, directClip, tradeFromPosition } = await import('../api/_lib/clip-director.js');@@ -92,8 +95,6 @@ describe('isGrounded', () => {});describe('directClip', () => {- beforeEach(() => llmText.mockReset());-it('discards the hallucinated card and answers from the real trade instead', async () => {llmText.mockResolvedValue(JSON.stringify({hook: 'I let my bias override the data on $THREE today.',@@ -139,7 +140,7 @@ describe('directClip', () => {});it('gives a loss an honest card, never a celebration', async () => {- llmText.mockImplementation(() => { throw new Error('providers exhausted'); });+ llmText.mockImplementation(async () => { throw new LlmUnavailable('every provider rung exhausted'); });// "Swarm 2" is a real agent name, not a stated figure: the guard has to know// the difference or every numbered agent falls back forever.const clip = await directClip({ agentName: 'Swarm 2', trade: LOSS, surface: 'feed' });