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
design(tokens): name the violet accent and skeleton primitives so both themes flip them
nirholas4ddc9e138839
diff --git a/pages/agent-detail-classic.html b/pages/agent-detail-classic.htmlindex fb98d7f7e..50bd2810c 100644--- a/pages/agent-detail-classic.html+++ b/pages/agent-detail-classic.html@@ -135,7 +135,7 @@.ad-trade-outcome { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }.ad-trade-outcome.win { background: #22d160; }.ad-trade-outcome.loss { background: #ff4545; }- .ad-trade-outcome.flat { background: #888; }+ .ad-trade-outcome.flat { background: var(--ink-dim); }.ad-trade-outcome.open { background: #fbbe00; }.ad-trade-symbol { font-weight: 700; flex-shrink: 0; min-width: 54px; }.ad-trade-tier { font-size: 11px; color: var(--ink-dim, #888); flex-shrink: 0; }diff --git a/pages/daily-match.html b/pages/daily-match.htmlindex d7b1c9568..02a19d60f 100644--- a/pages/daily-match.html+++ b/pages/daily-match.html@@ -29,7 +29,13 @@<meta name="twitter:image" content="https://three.ws/api/page-og?s=labs&t=Daily+Match&d=Which+agent+ships+the+most+real+output+today%3F+Live+daily+standings+over+real+agent+activity%3A+actions%2C+trades%2C+skill+sales%2C+and+coin+launches.+Resets+at+00%3A00&p=%2Fdaily-match" /><meta name="theme-color" content="#0a0a0a" /><style>- .dm-shell { max-width: 980px; margin: 0 auto; padding: var(--space-lg) var(--space-md) var(--space-2xl); }+ /* body is display:flex/column site-wide, so this shell is a flex item and+ its min-width:auto default refuses to shrink below the standings+ table's min-content width. html/body are overflow-x:clip, so the+ excess was clipped rather than scrolled and the PnL/Score columns+ became unreachable under ~715px. min-width:0 hands the overflow back+ to .dm-table-wrap, which scrolls it properly. */+ .dm-shell { max-width: 980px; width: 100%; min-width: 0; margin: 0 auto; padding: var(--space-lg) var(--space-md) var(--space-2xl); }.dm-hero { padding: var(--space-xl) 0 var(--space-md); display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-md); }.dm-hero-main { flex: 1 1 380px; min-width: 0; }@@ -52,15 +58,24 @@.dm-reset-label { font: var(--weight-medium) var(--text-2xs)/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-dim); }.dm-reset-clock { font: var(--weight-bold) var(--text-lg)/1.2 var(--font-mono); color: var(--color-text-bright); font-variant-numeric: tabular-nums; }+ /* Both tracks are minmax(0, ...) and both children get min-width:0. A bare+ `1fr` track keeps its items' min-width:auto, so the standings table's+ min-content width (8 nowrap columns) inflated the whole column past+ the viewport instead of scrolling inside .dm-table-wrap. */.dm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--space-md); align-items: start; }- @media (max-width: 860px) { .dm-grid { grid-template-columns: 1fr; } }+ .dm-grid > * { min-width: 0; }+ @media (max-width: 860px) { .dm-grid { grid-template-columns: minmax(0, 1fr); } }.dm-card { border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--surface-1); overflow: hidden; }- .dm-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--color-border); }+ .dm-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-sm); padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--color-border); }.dm-card-title { font: var(--weight-semibold) var(--text-2xs)/1.2 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-dim); margin: 0; }/* Leader spotlight */- .dm-leader { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-md); }+ .dm-leader { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md); padding: var(--space-md); }+ @media (max-width: 420px) {+ .dm-leader-avatar { width: 48px; height: 48px; }+ .dm-leader-score { margin-left: 0; text-align: left; width: 100%; }+ }.dm-leader-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--surface-2); border: 1px solid var(--color-border); flex: none; }.dm-leader-name { font: var(--weight-bold) var(--text-lg)/1.2 var(--font-display); color: var(--color-text-bright); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.dm-leader-name a { color: inherit; text-decoration: none; }@@ -105,6 +120,22 @@.dm-feed-name { color: var(--color-text-bright); font-weight: var(--weight-medium); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }.dm-feed-name a { color: inherit; text-decoration: none; }.dm-feed-time { margin-left: auto; flex: none; font-variant-numeric: tabular-nums; }+ .dm-feed-kind {+ flex: none; font: var(--weight-medium) var(--text-2xs)/1.4 var(--font-mono);+ text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-dim);+ }+ .dm-feed-detail { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }+ .dm-feed-skeleton { display: block; padding: 0; }+ .dm-feed-skeleton span {+ display: block; height: 10px; margin: var(--space-sm) var(--space-md); border-radius: var(--radius-sm);+ background: linear-gradient(90deg, var(--surface-1) 25%, var(--surface-2) 37%, var(--surface-1) 63%);+ background-size: 300% 100%; animation: dm-shimmer 1.4s ease-in-out infinite;+ }+ @media (prefers-reduced-motion: reduce) { .dm-feed-skeleton span { animation: none; } }++ /* Non-destructive refresh failure: the board on screen is still the+ last real data, so a failed poll annotates rather than wipes it. */+ .dm-stale { color: var(--color-warning); text-transform: none; letter-spacing: 0; }/* States */.dm-empty, .dm-error { padding: var(--space-xl) var(--space-md); text-align: center; color: var(--color-text-dim); font: var(--weight-regular) var(--text-sm)/1.5 var(--font-body); }@@ -153,9 +184,10 @@<section class="dm-card" style="margin-top: var(--space-md)"><div class="dm-card-head"><h2 class="dm-card-title" data-i18n="daily_match.today_s_standings">Today's standings</h2>+ <span class="dm-card-title dm-stale" id="dm-stale" role="status" hidden></span><span class="dm-card-title" id="dm-count"></span></div>- <div class="dm-table-wrap" id="dm-standings"><div class="dm-skeleton"></div></div>+ <div class="dm-table-wrap" id="dm-standings" aria-busy="true"><div class="dm-skeleton"></div></div></section><p class="dm-rules" id="dm-rules"></p>@@ -172,7 +204,9 @@</section><section class="dm-card"><div class="dm-card-head"><h2 class="dm-card-title" data-i18n="daily_match.live_output">Live output</h2></div>- <ul class="dm-feed" id="dm-feed"><li data-i18n="daily_match.loading">Loading…</li></ul>+ <ul class="dm-feed" id="dm-feed" aria-busy="true" aria-live="polite" aria-label="Most recent agent output today">+ <li class="dm-feed-skeleton"><span></span><span></span><span></span><span></span></li>+ </ul></section></aside></div>@@ -244,12 +278,18 @@}const host = $('dm-standings');+ host.setAttribute('aria-busy', 'false');if (!standings.length) {host.innerHTML = `<div class="dm-empty">No agent has shipped output yet today. The board resets at 00:00 UTC:<a href="/agents-live">watch the live wall</a> or <a href="/create-agent">field your own agent</a>.</div>`;} else {host.innerHTML = `<table class="dm-table">- <thead><tr><th>#</th><th>Agent</th><th>Actions</th><th>Trades</th><th>Sales</th><th>Launches</th><th>PnL</th><th>Score</th></tr></thead>+ <caption class="sr-only">Today's agent output standings, ranked by output score</caption>+ <thead><tr>+ <th scope="col">#</th><th scope="col">Agent</th><th scope="col">Actions</th>+ <th scope="col">Trades</th><th scope="col">Sales</th><th scope="col">Launches</th>+ <th scope="col">PnL</th><th scope="col">Score</th>+ </tr></thead><tbody>${standings.map((r) => `<tr>@@ -284,34 +324,70 @@}const feed = $('dm-feed');+ feed.setAttribute('aria-busy', 'false');const recent = data.recent || [];feed.innerHTML = recent.length? recent.map((r) => `<li><span class="dm-feed-name"><a href="${agentHref(r.agent_id)}">${esc(r.name)}</a></span>- <span>${esc(r.source_skill || r.type || 'action')}</span>+ <span class="dm-feed-kind">${esc(r.type || 'action')}</span>+ ${r.source_skill ? `<span class="dm-feed-detail">${esc(r.source_skill)}</span>` : ''}<span class="dm-feed-time">${timeAgo(r.at)}</span></li>`,).join('')- : '<li>Quiet so far today.</li>';+ : '<li>Quiet so far today. The first agent to ship an action, trade, sale or launch opens the board.</li>';+ }++ // True once a real response has painted the board. A later poll that+ // fails must NOT wipe good standings off the screen: it annotates the+ // card head instead, and the next poll clears the annotation.+ let hasData = false;++ function showError() {+ const stale = $('dm-stale');+ if (hasData) {+ stale.textContent = 'Live updates paused, retrying';+ stale.hidden = false;+ return;+ }+ $('dm-standings').setAttribute('aria-busy', 'false');+ $('dm-standings').innerHTML =+ `<div class="dm-error" role="alert">Couldn't load today's board. It refreshes on its own every 30 seconds.<button type="button" id="dm-retry">Retry now</button></div>`;+ document.getElementById('dm-retry')?.addEventListener('click', () => load(), { once: true });+ const feed = $('dm-feed');+ feed.setAttribute('aria-busy', 'false');+ feed.innerHTML = '<li>Live output is unavailable right now.</li>';+ $('dm-count').textContent = '';+ $('dm-rules').textContent = '';+ $('dm-leader-card').hidden = true;+ $('dm-champ-card').hidden = true;}+ let inFlight = false;async function load() {+ if (inFlight) return;+ inFlight = true;try {- const r = await fetch('/api/leaderboard/daily-match?limit=25');+ const r = await fetch('/api/leaderboard/daily-match?limit=25', { headers: { accept: 'application/json' } });if (!r.ok) throw new Error(`HTTP ${r.status}`);const { data } = await r.json();render(data);- } catch (e) {- $('dm-standings').innerHTML = `<div class="dm-error">Couldn't load the board.<button type="button" id="dm-retry">Retry</button></div>`;- document.getElementById('dm-retry')?.addEventListener('click', load, { once: true });+ hasData = true;+ $('dm-stale').hidden = true;+ } catch {+ showError();+ } finally {+ inFlight = false;}}load();- // Live board: refresh on a matching cadence with the API's CDN cache.+ // Live board: refresh on a matching cadence with the API's CDN cache,+ // and catch up the moment the tab comes back rather than waiting out+ // the remainder of an interval the hidden tab skipped.setInterval(() => { if (!document.hidden) load(); }, 30_000);+ document.addEventListener('visibilitychange', () => { if (!document.hidden) load(); });</script><div id="footer-container"></div>diff --git a/pages/dashboard-next/index.html b/pages/dashboard-next/index.htmlindex 90e026053..865495e87 100644--- a/pages/dashboard-next/index.html+++ b/pages/dashboard-next/index.html@@ -4,6 +4,7 @@<meta charset="utf-8" /><meta name="viewport" content="width=device-width,initial-scale=1" /><title data-i18n="dashboard_next_index.meta_title">Overview · Dashboard · three.ws</title>+ <meta name="description" content="Your three.ws dashboard overview: 3D agents and avatars, widget views and chat activity, earnings and payments, API keys, MCP servers, monetization, and billing, all in one place." data-i18n-attr="content:dashboard_next_index.meta_description" /><meta name="robots" content="noindex" /><link rel="icon" href="/favicon.ico" /><link rel="stylesheet" href="/fonts/fonts.css" />diff --git a/pages/dashboard-next/settings.html b/pages/dashboard-next/settings.htmlindex efcd5581b..729cd5803 100644--- a/pages/dashboard-next/settings.html+++ b/pages/dashboard-next/settings.html@@ -4,6 +4,7 @@<meta charset="utf-8" /><meta name="viewport" content="width=device-width,initial-scale=1" /><title data-i18n="dashboard_next_settings.meta_title">Settings · Dashboard · three.ws</title>+ <meta name="description" content="Your three.ws dashboard settings: avatar storage modes (R2 vs IPFS), active sessions, your notification inbox, per-category notification channels for in-app, push, email and Telegram, plus appearance and dashboard preferences." data-i18n-attr="content:dashboard_next_settings.meta_description" /><meta name="robots" content="noindex" /><link rel="icon" href="/favicon.ico" /><link rel="stylesheet" href="/fonts/fonts.css" />diff --git a/pages/defi.html b/pages/defi.htmlindex bae2a198e..21efd8cd8 100644--- a/pages/defi.html+++ b/pages/defi.html@@ -116,6 +116,28 @@><option value="__all" data-i18n="defi.all_categories">All categories</option></select>+ <button+ type="button"+ id="defi-refresh"+ class="cv-pill defi-refresh"+ aria-label="Refresh the DeFi TVL figures"+ data-i18n-attr="aria-label:defi.refresh_aria"+ >+ <svg+ class="defi-refresh-icon"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+ aria-hidden="true"+ >+ <path d="M21 12a9 9 0 1 1-2.64-6.36" />+ <polyline points="21 3 21 9 15 9" />+ </svg>+ <span data-i18n="defi.refresh">Refresh</span>+ </button><a class="cv-pill" href="/chains" data-i18n="defi.chains">Chains →</a></div></div>diff --git a/pages/forge.html b/pages/forge.htmlindex b95842fbd..8ca68f871 100644--- a/pages/forge.html+++ b/pages/forge.html@@ -4034,6 +4034,7 @@<p class="directed-text directed-text--enhanced" id="forge-directed-text"></p></div><div class="directed-actions">+ <button class="btn" type="button" id="forge-directed-vary" title="Run this brief again right now: the director and the reference painter resolve it differently every time">Try a variation</button><button class="btn btn-ghost" type="button" id="forge-directed-copy">Copy prompt</button><button class="btn btn-ghost" type="button" id="forge-directed-use">Use as my prompt</button><span class="directed-status" id="forge-directed-status" role="status" aria-live="polite"></span>diff --git a/pages/pose.html b/pages/pose.htmlindex 7a483072c..afea652de 100644--- a/pages/pose.html+++ b/pages/pose.html@@ -178,7 +178,7 @@}.mode-btn[aria-pressed='true'] {background: rgba(255, 255, 255, 0.18);- color: #e8e8e8;+ color: var(--ink);}#pose-undo,#pose-redo {@@ -213,7 +213,7 @@.pose-btn-primary {background: rgba(255, 255, 255, 0.22);border-color: rgba(255, 255, 255, 0.45);- color: #e8e8e8;+ color: var(--ink);}.pose-btn-primary:hover {background: rgba(255, 255, 255, 0.32);@@ -254,7 +254,7 @@#pose-top .pose-btn-primary {background: rgba(255, 255, 255, 0.2);border-color: rgba(255, 255, 255, 0.4);- color: #e8e8e8;+ color: var(--ink);}#pose-top .pose-btn-primary:hover {background: rgba(255, 255, 255, 0.3);@@ -433,7 +433,7 @@.pose-joint-btn[aria-pressed='true'] {background: rgba(255, 255, 255, 0.18);border-color: rgba(255, 255, 255, 0.4);- color: #e8e8e8;+ color: var(--ink);}.pose-joint-row {display: grid;@@ -727,7 +727,7 @@.pose-prop-btn[aria-pressed='true'] {background: rgba(255, 255, 255, 0.18);border-color: rgba(255, 255, 255, 0.45);- color: #e8e8e8;+ color: var(--ink);}.pose-prop-grid {display: flex;@@ -1279,7 +1279,7 @@.tl-btn[aria-pressed='true'] {background: rgba(255, 255, 255, 0.2);border-color: rgba(255, 255, 255, 0.45);- color: #e8e8e8;+ color: var(--ink);}.tl-btn:disabled {opacity: 0.4;@@ -1345,7 +1345,7 @@appearance: none;border: 1px solid rgba(255, 255, 255, 0.45);background: rgba(255, 255, 255, 0.22);- color: #e8e8e8;+ color: var(--ink);font: inherit;font-size: 12.5px;font-weight: 600;@@ -1656,7 +1656,7 @@}.pl-tab[aria-selected='true'] {background: rgba(255, 255, 255, 0.18);- color: #e8e8e8;+ color: var(--ink);}.pl-close {appearance: none;diff --git a/pages/worlds.html b/pages/worlds.htmlindex 4ddc74962..843fb1ab2 100644--- a/pages/worlds.html+++ b/pages/worlds.html@@ -63,7 +63,7 @@--accent: #22d3ee;--accent-2: #ffffff;--danger: #f87171;- --ok: #4ade80;+ --ok: var(--success, #4ade80);}* {box-sizing: border-box;diff --git a/scripts/audit-token-drift.mjs b/scripts/audit-token-drift.mjsindex 466d498ff..ec199fa9d 100644--- a/scripts/audit-token-drift.mjs+++ b/scripts/audit-token-drift.mjs@@ -37,6 +37,15 @@ const TOKEN_HEXES = [{ hex: '#4ade80', token: '--success' },{ hex: '#f87171', token: '--danger' },{ hex: '#fbbf24', token: '--warn' },+ // QB-07: the base palette. Each of these is a light-theme bug, not just a+ // style nit — a hardcoded #0a0a0a panel or #e8e8e8 label keeps its dark+ // value when [data-theme='light'] remaps the token, so the surface renders+ // dark-on-dark (or light-on-light) for anyone using the light theme.+ { hex: '#0a0a0a', token: '--bg-0' },+ { hex: '#1a1a1a', token: '--bg-1' },+ { hex: '#e8e8e8', token: '--ink' },+ { hex: '#888888', token: '--ink-dim' },+ { hex: '#888', token: '--ink-dim' },];/** A page that redefines a status token is a sanctioned theme layer — skip it@@ -45,6 +54,20 @@ const LOCAL_DEF = (css, token) => new RegExp(`${token}\\s*:`).test(css);const STYLE_BLOCK = /<style[^>]*>([\s\S]*?)<\/style>/gi;+/** A hex inside a `var(--token, #hex)` fallback is not drift — the var resolves+ * first and flips with the theme; the literal only shows if the sheet is missing.+ * Comments are prose. Strip both before counting so the ratchet measures only+ * literals that actually paint. Loops because fallbacks nest. */+function stripNonAuthoritative(css) {+ let out = css.replace(/\/\*[\s\S]*?\*\//g, '');+ for (let i = 0; i < 8; i++) {+ const next = out.replace(/var\(\s*--[a-z0-9-]+\s*,[^()]*\)/gi, 'var(--token)');+ if (next === out) break;+ out = next;+ }+ return out;+}+function collectPages(dir) {const out = [];for (const entry of readdirSync(dir)) {@@ -65,6 +88,7 @@ function countDrift() {let css = '';for (const m of html.matchAll(STYLE_BLOCK)) css += m[1];if (!css) continue;+ css = stripNonAuthoritative(css);let n = 0;for (const { hex, token } of TOKEN_HEXES) {if (LOCAL_DEF(css, token)) continue;diff --git a/src/defi.css b/src/defi.cssindex 9d4b8ed81..37f392a61 100644--- a/src/defi.css+++ b/src/defi.css@@ -79,3 +79,36 @@background: var(--cv-surface-3);flex-shrink: 0;}++/* Toolbar refresh. The figures move all day and the server caches them for+ five minutes, so the page needs a way to ask for new ones short of a full+ reload. The icon spins for exactly as long as the request is in flight. */+.defi-refresh {+ background: transparent;+ font-family: inherit;+ font-size: 0.875rem;+ cursor: pointer;+}+.defi-refresh[disabled] {+ cursor: progress;+ color: var(--cv-text-3);+}+.defi-refresh-icon {+ width: 0.875rem;+ height: 0.875rem;+ flex-shrink: 0;+}+.defi-refresh[aria-busy='true'] .defi-refresh-icon {+ animation: defi-spin 0.9s linear infinite;+ transform-origin: 50% 50%;+}+@keyframes defi-spin {+ to {+ transform: rotate(360deg);+ }+}+@media (prefers-reduced-motion: reduce) {+ .defi-refresh[aria-busy='true'] .defi-refresh-icon {+ animation: none;+ }+}