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
feat(why-three-ws): add /why-three-ws, a builder pitch whose proof tiles are read live from the platform analytics API
nirholas62fe9136b430
diff --git a/STRUCTURE.md b/STRUCTURE.mdindex c76852319..66dbd2f86 100644--- a/STRUCTURE.md+++ b/STRUCTURE.md@@ -103,6 +103,7 @@ packages, a generated standalone GitHub mirror). See| The Agent Economy (live, network wide) | [pages/economy.html](pages/economy.html) `→ /economy` + page module [src/economy-live.js](src/economy-live.js), hire panel [src/shared/agent-hire.js](src/shared/agent-hire.js), feeds `GET /api/agents/economy?view=offers` ([api/agents/economy.js](api/agents/economy.js)), `GET /api/marketplace/agents`, `GET /api/agenc/x402-services` ([api/agenc/[action].js](api/agenc/%5Baction%5D.js)) over the shared discovery client [api/_lib/x402/bazaar-client.js](api/_lib/x402/bazaar-client.js) | Live | The wide-angle counterpart to the curated two-agent demo at `/agent-economy`: the real population of agents earning on three.ws, the agent-to-agent service market they hire each other through, and the live x402 bazaar of pay-per-call endpoints across Solana and Base. Three feeds, each owning its own loading / empty / error state so a slow or failing one never blanks the page, each retryable in place, and each polled every 45s while the tab is visible. Service rows name themselves from the facilitator's `metadata` when it publishes one and from the endpoint URL when it does not (most listings carry no name), show the endpoint they charge for, and never render a link to a path template or a rejected URL scheme. The A2A offers feed is empty until an owner prices an agent skill (`agent_paid_services`), which is a real state with a route out of it, not a stub. Tests: [tests/api/bazaar-endpoints.test.js](tests/api/bazaar-endpoints.test.js) || Sell an agent as a paid API | Owner switch on the agent wallet Earn tab [src/agent-wallet-hub/tabs/earn.js](src/agent-wallet-hub/tabs/earn.js) (client [src/agent-economy-hub.js](src/agent-economy-hub.js)), owner API [api/agents/[id]/api-service.js](api/agents/%5Bid%5D/api-service.js) `→ GET/PUT /api/agents/:id/api-service`, paid route [api/x402/agents.js](api/x402/agents.js) `→ POST /api/x402/agents/:id` + free list `GET /api/x402/agents`, rules and ledger [api/_lib/agent-api-service.js](api/_lib/agent-api-service.js), shared turn [api/_lib/agent-turn.js](api/_lib/agent-turn.js), discovery slice `buildSellableAgentItems()` in [api/wk.js](api/wk.js) | Live | An owner flips "Sell this agent as an API", sets a USD price per call (floor $0.001, the smallest settle the facilitator co-signs) and a public description; the agent becomes a stable x402 v2 endpoint that answers one turn with the same persona, custom skills and premium-skill rules as `/api/agents/talk`. The 402 leads with Solana USDC and pays the agent's own payout wallet; the turn runs before settlement so a failed call is never charged; each settled call is written to `agent_revenue_events` (skill `agent-api`, net of `PLATFORM_FEE_BPS`, `settled_to_wallet = true` so it never counts as treasury-withdrawable). Only public agents with a brain and a Solana payout address can be sold, and the switch says why when one cannot. Agents on sale appear in `/.well-known/x402.json` and under Agents on [/x402](public/x402-stripe.html). Docs: [docs/x402.md](docs/x402.md#sell-your-agent-as-an-api), [docs/api-reference.md](docs/api-reference.md#sell-an-agent-as-an-api). Tests: [tests/api/x402-agent-api.test.js](tests/api/x402-agent-api.test.js) || Platform analytics (every platform total, one page) | [pages/analytics.html](pages/analytics.html) `→ /analytics` + page module [src/platform-analytics.js](src/platform-analytics.js), endpoint [api/platform/analytics.js](api/platform/analytics.js) `→ GET /api/platform/analytics?window=30d\|90d\|all`, data layer [api/_lib/platform-analytics.js](api/_lib/platform-analytics.js) | Live | The partner and investor view: agents, agents with a wallet, coins launched, 3D models generated, LLM tokens processed, x402 settlements and volume, marketplace sales and volume, and agent-to-agent hire volume, each with an all-time total, a zero-filled daily series and a `method` string rendered under "How each number is calculated". Counting predicates match the endpoints that already publish the same figure (`/api/home-stats`, the `MARKET_PAID_KINDS` gate, `platformEconomyStats()`), so no two pages disagree. A failing source is `null` plus a named `errors` entry, never a zero; the page shows an unavailable tile for it and a whole-page retry only when nothing could be read. Creator fees (SOL) read the `agent_coin_earnings` snapshot from parity order 015 with the same per-wallet counting rule as `/api/agents/:id/earnings`. Docs: [docs/api-reference.md](docs/api-reference.md#platform-analytics-api). Tests: [tests/platform-analytics.test.js](tests/platform-analytics.test.js) |+| Why three.ws (builder pitch on live numbers) | [pages/why-three-ws.html](pages/why-three-ws.html) `→ /why-three-ws` + page module [src/why-three-ws.js](src/why-three-ws.js) | Live | What a builder gets, the build-get found-earn-reinvest loop as an accessible SVG, and a comparison against categories of platform (never named products) where each cell links to its proof. The five proof tiles are read from `GET /api/platform/analytics?window=all` (nothing numeric is typed into the page); a failed metric renders as Unavailable, never zero. Tests: [tests/why-three-ws.test.js](tests/why-three-ws.test.js) || Experiments (public write-ups of what we tried) | [pages/experiments.html](pages/experiments.html) `→ /experiments` + page module [src/experiments-index.js](src/experiments-index.js), entries [data/experiments.json](data/experiments.json), write-ups `docs/experiments-<slug>.md` (served at `/docs/experiments-<slug>`), validator [scripts/lib/experiments-index.mjs](scripts/lib/experiments-index.mjs) run by `npm run build:pages`, published index `public/experiments.json` | Live | One card per experiment (question, status, spend, published date, headline result) with a URL-synced status filter, each opening a write-up in the six-section template: the question, method, spend, result, what we got wrong, what we changed, plus an appendix of the SELECT queries behind every number. The build fails on a missing field, an unknown status, a missing write-up, or a write-up missing a template section. How to add one: [docs/experiments.md](docs/experiments.md). Tests: [tests/experiments-index.test.js](tests/experiments-index.test.js) || Agent Symphony (economy as generative music) | [pages/symphony.html](pages/symphony.html) `→ /symphony`, engine [src/symphony.js](src/symphony.js), grammar [src/symphony-score.js](src/symphony-score.js) | Live | The live activity bus (`GET /api/feed` + `/api/feed-stream` SSE) rendered as WebAudio generative music: one synthesized note per real platform event, voice by event type (payments pluck, coin buys land as bass, new agents chime, guard refusals play dissonance, jackpots glissando), pitch register by amount (whales sit lower), stable per-actor motif + stereo position via FNV-1a hash, all quantized to one pentatonic scale so arbitrary event streams harmonize. Canvas visualization, live ledger with real click-throughs, and a MediaRecorder tap that exports a shareable audio clip of the master bus. A burst gate collapses event floods (a sniper sweep emitting dozens of identical guard events) into one accented note per actor per 1.5s. Solo mode narrows the stream to one participant client-side (`?agent=<id>` exact, `?actor=<label>` case-insensitive), reachable from the per-row "solo" control and from the "Listen →" link on every agent profile's Wallet Story card. No audio assets, no synthetic events. Tests: [tests/symphony-score.test.js](tests/symphony-score.test.js) || Platform activity feed | [pages/feed.html](pages/feed.html) `→ /feed` + [pages/community.html](pages/community.html) `→ /community`, backend [api/users/me/feed.js](api/users/me/feed.js) | Live | Reverse-chronological creation events (avatars, agents, coins, models, worlds) plus follow activity, merged at read time from `forge_creations`, `dioramas`, and `user_follows` (no separate event log to drift out of sync). `?scope=following` (default; session-gated, anonymous gets 401) vs `?scope=all` (public; powers `/community` and first-visit feeds); `limit` 1..50, `before` ISO cursor. Items deep-link to creator portfolios. Distinct from the Money Pulse ticker `GET /api/feed` ([docs/money-feed.md](docs/money-feed.md)). Docs: [docs/social-layer.md](docs/social-layer.md) |diff --git a/data/pages.json b/data/pages.jsonindex 50ad1016c..1dcfedf74 100644--- a/data/pages.json+++ b/data/pages.json@@ -2855,6 +2855,14 @@"changefreq": "daily","added": "2026-09-30"},+ {+ "path": "/why-three-ws",+ "title": "Why three.ws",+ "description": "Why build an agent on three.ws: a 3D body, a custodial Solana wallet, MCP and CLI access, x402 selling, coin launch and a marketplace, with live platform totals that each link to how they are counted.",+ "priority": 0.7,+ "changefreq": "weekly",+ "added": "2026-10-23"+ },{"path": "/agent-trade","title": "Agent Commerce",diff --git a/pages/why-three-ws.html b/pages/why-three-ws.htmlnew file mode 100644index 000000000..d8760da3c--- /dev/null+++ b/pages/why-three-ws.html@@ -0,0 +1,193 @@+<!DOCTYPE html>+<html lang="en">+<head>+ <style>/* three.ws hidden-guard: make the `hidden` attribute authoritative; see scripts/lib/hidden-guard.mjs */[hidden]{display:none!important}</style>+ <script>/* three.ws theme boot: no-flash */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />+ <title>Why three.ws · three.ws</title>+ <meta name="description" content="Why build an agent on three.ws: a 3D body, a Solana wallet, paid skills, a coin launch and a marketplace in one place, with live platform numbers you can check at the source." />+ <link rel="canonical" href="https://three.ws/why-three-ws" />+ <link rel="icon" href="/favicon.ico" sizes="any" />+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />+ <link rel="apple-touch-icon" href="/apple-touch-icon.png" />+ <link rel="manifest" href="/manifest.webmanifest" />+ <link rel="stylesheet" href="/style.css" />+ <link rel="stylesheet" href="/nav.css" />+ <link rel="stylesheet" href="/mobile.css" />+ <meta property="og:type" content="website" />+ <meta property="og:site_name" content="three.ws" />+ <meta property="og:title" content="Why build on three.ws" />+ <meta property="og:description" content="Build an agent, get found, earn, reinvest. Every number on the page is read live and links to its proof." />+ <meta property="og:url" content="https://three.ws/why-three-ws" />+ <meta property="og:image" content="https://three.ws/api/page-og?s=learn&t=Why+build+on+three.ws&d=Build+an+agent%2C+get+found%2C+earn%2C+reinvest.+Every+number+is+live+and+links+to+its+proof.&p=%2Fwhy-three-ws" />+ <meta property="og:image:alt" content="Why build on three.ws" />+ <meta property="og:locale" content="en_US" />+ <meta name="twitter:card" content="summary_large_image" />+ <meta name="twitter:site" content="@trythreews" />+ <meta name="twitter:title" content="Why build on three.ws" />+ <meta name="twitter:description" content="Build an agent, get found, earn, reinvest. Every number is live and links to its proof." />+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=learn&t=Why+build+on+three.ws&d=Build+an+agent%2C+get+found%2C+earn%2C+reinvest.+Every+number+is+live+and+links+to+its+proof.&p=%2Fwhy-three-ws" />+ <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1" />+ <style>+ :root { --yw-maxw: 1080px; --yw-mark: #8b5cf6; }+ :root[data-theme="light"] { --yw-mark: #5b21b6; }+ * { box-sizing: border-box; }+ html, body { margin: 0; background: var(--bg-0); color: var(--ink); }+ body { font-family: var(--font-body, 'Inter', system-ui, sans-serif); min-height: 100vh; }+ .site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg-0) 82%, transparent); backdrop-filter: blur(10px); }+ a { color: inherit; }+ .yw-wrap { width: 100%; min-width: 0; max-width: var(--yw-maxw); margin: 0 auto; padding: 0 18px 96px; }+ .yw-hero { padding: 44px 0 6px; }+ .yw-eyebrow { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--yw-mark); font-weight: 650; margin: 0 0 10px; }+ .yw-hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); line-height: 1.08; margin: 0 0 14px; letter-spacing: -0.03em; color: var(--ink-bright, var(--ink)); }+ .yw-hero p { margin: 0; max-width: 62ch; color: var(--ink-dim); line-height: 1.6; font-size: 1.05rem; }+ .yw-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }+ .yw-btn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: 10px; font-weight: 650; font-size: 0.92rem; text-decoration: none; border: 1px solid var(--stroke-strong); background: var(--surface-2); color: var(--ink-bright, var(--ink)); transition: background var(--duration-fast) var(--ease-standard), transform var(--duration-instant) var(--ease-standard); }+ .yw-btn:hover { background: var(--surface-3); }+ .yw-btn:active { transform: translateY(1px); }+ .yw-btn:focus-visible { outline: 2px solid var(--yw-mark); outline-offset: 2px; }+ .yw-btn.is-primary { background: var(--yw-mark); border-color: var(--yw-mark); color: #fff; }+ .yw-btn.is-primary:hover { filter: brightness(1.1); background: var(--yw-mark); }+ .yw-section { margin-top: 48px; }+ .yw-section > h2 { font-size: 1.3rem; letter-spacing: -0.015em; margin: 0 0 6px; color: var(--ink-bright, var(--ink)); }+ .yw-section > p.yw-lede { margin: 0 0 18px; color: var(--ink-dim); font-size: 0.95rem; line-height: 1.55; max-width: 70ch; }+ .yw-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }+ .yw-tile { display: block; text-decoration: none; padding: 16px; border-radius: var(--radius-md, 10px); background: var(--surface-1); border: 1px solid var(--stroke); min-height: 118px; transition: border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard); }+ a.yw-tile:hover { border-color: var(--stroke-strong); background: var(--surface-2); }+ a.yw-tile:focus-visible { outline: 2px solid var(--yw-mark); outline-offset: 2px; }+ .yw-tile-label { font-size: 0.8rem; color: var(--ink-dim); font-weight: 550; }+ .yw-tile-value { font-size: 1.7rem; font-weight: 750; letter-spacing: -0.03em; margin-top: 6px; color: var(--ink-bright, var(--ink)); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }+ .yw-tile-value.is-muted { font-size: 1.1rem; font-weight: 650; color: var(--ink-dim); margin-top: 10px; letter-spacing: -0.01em; }+ .yw-tile-sub { font-size: 0.76rem; color: var(--ink-dim); margin-top: 8px; line-height: 1.45; }+ .yw-tile.is-unavailable { border-style: dashed; }+ .yw-sk { display: block; height: 28px; margin-top: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: yw-sh 1.3s linear infinite; }+ @keyframes yw-sh { to { background-position: -200% 0; } }+ @media (prefers-reduced-motion: reduce) { .yw-sk { animation: none; } }+ .yw-proof-note { margin: 12px 0 0; font-size: 0.82rem; color: var(--ink-dim); line-height: 1.5; }+ .yw-proof-note a, .yw-foot a { text-decoration: underline; text-underline-offset: 3px; }+ .yw-error { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin: 0 0 12px; border-radius: 10px; border: 1px solid var(--stroke-strong); background: var(--surface-1); font-size: 0.88rem; }+ .yw-error button { appearance: none; font: inherit; font-size: 0.85rem; font-weight: 600; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--stroke-strong); background: var(--surface-2); color: var(--ink-bright, var(--ink)); cursor: pointer; }+ .yw-error button:hover { background: var(--surface-3); }+ .yw-error button:focus-visible { outline: 2px solid var(--yw-mark); outline-offset: 2px; }+ .yw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }+ .yw-card { display: block; text-decoration: none; padding: 16px; border-radius: var(--radius-md, 10px); background: var(--surface-1); border: 1px solid var(--stroke); transition: border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard); }+ .yw-card:hover { border-color: var(--stroke-strong); background: var(--surface-2); }+ .yw-card:focus-visible { outline: 2px solid var(--yw-mark); outline-offset: 2px; }+ .yw-card h3 { margin: 0 0 6px; font-size: 1rem; color: var(--ink-bright, var(--ink)); }+ .yw-card p { margin: 0; font-size: 0.88rem; line-height: 1.55; color: var(--ink-dim); }+ .yw-card .yw-go { display: inline-block; margin-top: 10px; font-size: 0.82rem; font-weight: 650; color: var(--yw-mark); }+ .yw-loop { display: block; width: 100%; max-width: 760px; height: auto; margin: 0 auto; }+ .yw-loop .node { fill: var(--surface-1); stroke: var(--stroke-strong); stroke-width: 1.5; }+ .yw-loop .arrow { fill: none; stroke: var(--yw-mark); stroke-width: 2; }+ .yw-loop .head { fill: var(--yw-mark); }+ .yw-loop text { fill: var(--ink-bright, var(--ink)); font: 650 15px var(--font-body, system-ui, sans-serif); text-anchor: middle; }+ .yw-loop text.sub { fill: var(--ink-dim); font-weight: 500; font-size: 12px; }+ .yw-loop-list { margin: 16px 0 0; padding-left: 20px; color: var(--ink-dim); font-size: 0.9rem; line-height: 1.7; }+ .yw-loop-list a { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }+ .yw-table-wrap { overflow-x: auto; border: 1px solid var(--stroke); border-radius: 10px; }+ .yw-table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 0.9rem; }+ .yw-table th, .yw-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--stroke); line-height: 1.5; }+ .yw-table tr:last-child th, .yw-table tr:last-child td { border-bottom: 0; }+ .yw-table thead th { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-dim); background: var(--surface-1); }+ .yw-table tbody th { color: var(--ink-bright, var(--ink)); font-weight: 650; width: 24%; }+ .yw-table td { color: var(--ink-dim); }+ .yw-table td a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }+ .yw-foot { margin-top: 40px; color: var(--ink-dim); font-size: 0.88rem; line-height: 1.6; }+ .visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }+ </style>+</head>+<body>+ <header class="site-header"><div id="nav-container"></div></header>+ <script src="/nav.js"></script>++ <main class="yw-wrap" id="main">+ <section class="yw-hero">+ <p class="yw-eyebrow">Why three.ws</p>+ <h1>Build the agent. Give it a body, a wallet and a way to earn.</h1>+ <p>three.ws puts an agent's 3D body, Solana wallet, paid skills, coin launch and marketplace in one place, and publishes how it is doing. Nothing below is typed in: each figure is read live and links to how it is counted.</p>+ <div class="yw-cta">+ <a class="yw-btn is-primary" href="/create">Create an agent</a>+ <a class="yw-btn" href="/connect">Connect your AI client</a>+ <a class="yw-btn" href="/analytics">See every number</a>+ </div>+ </section>++ <section class="yw-section" aria-labelledby="yw-proof-h">+ <h2 id="yw-proof-h">Live proof</h2>+ <p class="yw-lede">All-time totals, read from the ledgers that record the activity. Select a figure to see its chart and the exact query behind it.</p>+ <div class="yw-error" id="yw-error" role="alert" hidden>+ <span><strong>Could not load the platform numbers.</strong> The rest of the page is unaffected.</span>+ <button type="button" id="yw-retry">Retry</button>+ </div>+ <div class="yw-tiles" id="yw-tiles" aria-busy="true">+ <div class="yw-tile" aria-hidden="true"><span class="yw-sk"></span></div>+ <div class="yw-tile" aria-hidden="true"><span class="yw-sk"></span></div>+ <div class="yw-tile" aria-hidden="true"><span class="yw-sk"></span></div>+ <div class="yw-tile" aria-hidden="true"><span class="yw-sk"></span></div>+ <div class="yw-tile" aria-hidden="true"><span class="yw-sk"></span></div>+ </div>+ <p class="yw-proof-note" id="yw-proof-note">Counted by <a href="/analytics#methods">the methods published on /analytics</a>. The same data is open at <a href="/api/platform/analytics?window=all">/api/platform/analytics</a>.</p>+ </section>++ <section class="yw-section" aria-labelledby="yw-get-h">+ <h2 id="yw-get-h">What a builder gets</h2>+ <p class="yw-lede">Each item links to the live surface that does it.</p>+ <div class="yw-grid">+ <a class="yw-card" href="/create"><h3>A 3D body</h3><p>Every agent has a rigged, animated avatar that embeds on any site with one tag.</p><span class="yw-go">Create an agent</span></a>+ <a class="yw-card" href="/agent-wallet"><h3>A custodial Solana wallet</h3><p>Provisioned for the agent, so it can receive payments and pay for services under limits you set.</p><span class="yw-go">Open an agent wallet</span></a>+ <a class="yw-card" href="/connect"><h3>MCP and CLI access</h3><p>One connector URL puts the tools in Claude, ChatGPT, Cursor and VS Code. The CLI creates and launches from a terminal.</p><span class="yw-go">Connect a client</span></a>+ <a class="yw-card" href="/x402"><h3>x402 selling</h3><p>Charge per call for a skill or a whole endpoint, settled on Solana by our own facilitator.</p><span class="yw-go">Browse paid endpoints</span></a>+ <a class="yw-card" href="/launch"><h3>Coin launch</h3><p>Launch the agent's own coin. You review the cost and sign on three.ws; nothing is paid before you do.</p><span class="yw-go">Launch a coin</span></a>+ <a class="yw-card" href="/marketplace"><h3>A marketplace</h3><p>List skills for sale in $THREE or USDC, with free trials and a published author split.</p><span class="yw-go">Browse the marketplace</span></a>+ </div>+ </section>++ <section class="yw-section" aria-labelledby="yw-loop-h">+ <h2 id="yw-loop-h">The loop</h2>+ <p class="yw-lede">Each step feeds the next, and each step is a live page.</p>+ <svg class="yw-loop" viewBox="0 0 760 250" role="img" aria-labelledby="yw-loop-t yw-loop-d">+ <title id="yw-loop-t">Build, get found, earn, reinvest</title>+ <desc id="yw-loop-d">A four step loop. Build an agent, get found on the marketplace and launches feed, earn from skills and coin fees, then reinvest the earnings in the agent, which returns to build.</desc>+ <defs><marker id="yw-ah" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path class="head" d="M0 0 L10 5 L0 10 z"/></marker></defs>+ <rect class="node" x="10" y="85" width="150" height="80" rx="14"/><text x="85" y="122">Build</text><text class="sub" x="85" y="144">body, wallet, skills</text>+ <rect class="node" x="215" y="85" width="150" height="80" rx="14"/><text x="290" y="122">Get found</text><text class="sub" x="290" y="144">marketplace, launches</text>+ <rect class="node" x="395" y="85" width="150" height="80" rx="14"/><text x="470" y="122">Earn</text><text class="sub" x="470" y="144">x402, sales, coin fees</text>+ <rect class="node" x="600" y="85" width="150" height="80" rx="14"/><text x="675" y="122">Reinvest</text><text class="sub" x="675" y="144">credits, upgrades</text>+ <path class="arrow" d="M162 125 H211" marker-end="url(#yw-ah)"/>+ <path class="arrow" d="M367 125 H391" marker-end="url(#yw-ah)"/>+ <path class="arrow" d="M547 125 H596" marker-end="url(#yw-ah)"/>+ <path class="arrow" d="M675 167 V215 H85 V169" marker-end="url(#yw-ah)"/>+ </svg>+ <ol class="yw-loop-list">+ <li><a href="/create">Build</a>: create the agent and its skills.</li>+ <li><a href="/launches">Get found</a>: the <a href="/marketplace">marketplace</a>, the <a href="/leaderboard">leaderboard</a> and the launches feed surface it.</li>+ <li><a href="/x402">Earn</a>: per-call payments, skill sales and creator fees on its coin.</li>+ <li><a href="/credits">Reinvest</a>: spend earnings on credits, models and upgrades for the next version.</li>+ </ol>+ </section>++ <section class="yw-section" aria-labelledby="yw-cmp-h">+ <h2 id="yw-cmp-h">How it compares, by category</h2>+ <p class="yw-lede">We compare against kinds of platform, not named products. Every cell is a fact about three.ws, with the page that proves it.</p>+ <div class="yw-table-wrap">+ <table class="yw-table">+ <thead><tr><th scope="col">If you are using</th><th scope="col">What three.ws adds</th><th scope="col">Proof</th></tr></thead>+ <tbody>+ <tr><th scope="row">A closed agent launchpad</th><td>Agents and skills are exportable and callable over open standards (MCP, x402, glTF), and platform totals are published with the query behind each one.</td><td><a href="/analytics#methods">Methods</a>, <a href="/connect">MCP connect</a></td></tr>+ <tr><th scope="row">An open-source agent framework</th><td>A hosted runtime out of the box: identity, a custodial Solana wallet, a 3D body, billing and a marketplace, with no infrastructure to run.</td><td><a href="/create">Create</a>, <a href="/agent-wallet">Wallet</a></td></tr>+ <tr><th scope="row">A token launchpad without agents</th><td>The coin belongs to an agent that does work: it sells skills over x402 and its creator fees are shown on its public earnings page. Launching signs only from your own browser session.</td><td><a href="/launch">Launch</a>, <a href="/launches">Launches</a></td></tr>+ </tbody>+ </table>+ </div>+ </section>++ <p class="yw-foot">Ready to see it work? <a href="/create">Create an agent</a>, read the <a href="/developers">developer plans</a>, or check where $THREE fits on <a href="/three-token">the token page</a>.</p>+ </main>++ <div id="footer-container"></div>+ <script src="/footer.js"></script>+ <script type="module" src="/src/why-three-ws.js"></script>+ <script type="module" src="/i18n.js"></script>+</body>+</html>diff --git a/public/nav-data.js b/public/nav-data.jsindex 58ab96b54..df012ee97 100644--- a/public/nav-data.js+++ b/public/nav-data.js@@ -400,6 +400,12 @@ export const NAV_GROUPS = [tier: 'advanced',desc: 'Every platform total on one page with a daily growth chart and a note on how each number is counted',},+ {+ title: 'Why three.ws',+ href: '/why-three-ws',+ tier: 'advanced',+ desc: 'What a builder gets, the build-earn-reinvest loop, and live platform proof you can check at the source',+ },{title: 'Agent Economy Volume',href: '/agent-economy-volume',diff --git a/src/why-three-ws.js b/src/why-three-ws.jsnew file mode 100644index 000000000..bbb8eeb35--- /dev/null+++ b/src/why-three-ws.js@@ -0,0 +1,78 @@+/**+ * /why-three-ws: live proof tiles.+ *+ * Every figure, label and method string comes from GET /api/platform/analytics+ * (the same endpoint /analytics renders). Nothing numeric is written in the+ * page or here. A metric that could not be read renders as "Unavailable" and+ * the rest of the page is unaffected.+ */++const ENDPOINT = '/api/platform/analytics?window=all';+const SHOWN = ['agents', 'coins_launched', 'creator_fees', 'x402_settlements', 'models_generated'];+const LINKS = {+ agents: '/analytics#methods',+ coins_launched: '/launches',+ creator_fees: '/leaderboard?tab=earned&window=all',+ x402_settlements: '/x402',+ models_generated: '/forge',+};++const tilesEl = document.getElementById('yw-tiles');+const errorEl = document.getElementById('yw-error');+const retryBtn = document.getElementById('yw-retry');++const nf = new Intl.NumberFormat(undefined);++function fmt(unit, v) {+ const n = Number(v);+ if (v == null || !Number.isFinite(n)) return null;+ if (unit === 'usd') return n.toLocaleString(undefined, { style: 'currency', currency: 'USD', maximumFractionDigits: 2 });+ if (unit === 'sol') return `${n.toLocaleString(undefined, { maximumFractionDigits: 4 })} SOL`;+ if (unit === 'three') return `${n.toLocaleString(undefined, { maximumFractionDigits: 2 })} $THREE`;+ return nf.format(Math.round(n));+}++function tile(key, m) {+ const a = document.createElement('a');+ a.className = 'yw-tile';+ a.href = LINKS[key] || '/analytics';+ const label = document.createElement('div');+ label.className = 'yw-tile-label';+ label.textContent = m?.label || key.replace(/_/g, ' ');+ const value = document.createElement('div');+ value.className = 'yw-tile-value';+ const sub = document.createElement('div');+ sub.className = 'yw-tile-sub';+ const shown = m && m.available ? fmt(m.unit, m.total) : null;+ if (shown == null) {+ a.classList.add('is-unavailable');+ value.classList.add('is-muted');+ value.textContent = 'Unavailable';+ sub.textContent = 'This figure could not be read just now. It is never shown as zero.';+ } else {+ value.textContent = shown;+ sub.textContent = 'All time. How it is counted is on /analytics.';+ }+ a.append(label, value, sub);+ if (m?.method) a.title = m.method;+ return a;+}++async function load() {+ tilesEl.setAttribute('aria-busy', 'true');+ errorEl.hidden = true;+ try {+ const res = await fetch(ENDPOINT, { headers: { accept: 'application/json' } });+ if (!res.ok) throw new Error(`HTTP ${res.status}`);+ const body = await res.json();+ tilesEl.replaceChildren(...SHOWN.map((k) => tile(k, body.metrics?.[k])));+ } catch {+ tilesEl.replaceChildren(...SHOWN.map((k) => tile(k, null)));+ errorEl.hidden = false;+ } finally {+ tilesEl.setAttribute('aria-busy', 'false');+ }+}++retryBtn.addEventListener('click', load);+load();diff --git a/tests/why-three-ws.test.js b/tests/why-three-ws.test.jsnew file mode 100644index 000000000..8c0d4cfa5--- /dev/null+++ b/tests/why-three-ws.test.js@@ -0,0 +1,63 @@+// @vitest-environment jsdom+import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';+import { readFileSync } from 'node:fs';+import { resolve } from 'node:path';++const root = resolve(__dirname, '..');+const read = (p) => readFileSync(resolve(root, p), 'utf8');++describe('/why-three-ws wiring', () => {+ it('is routed, built, indexed and in the nav', () => {+ expect(JSON.parse(read('vercel.json')).routes.some((r) => r.src === '/why-three-ws/?' && r.dest === '/why-three-ws.html')).toBe(true);+ expect(read('vite.config.js')).toContain("'why-three-ws': resolve(__dirname, 'pages/why-three-ws.html')");+ const pages = JSON.parse(read('data/pages.json'));+ expect(pages.sections.flatMap((s) => s.pages).some((p) => p.path === '/why-three-ws')).toBe(true);+ expect(read('public/nav-data.js')).toContain("href: '/why-three-ws'");+ });++ it('types no figures into the page or module and names no platform', () => {+ const html = read('pages/why-three-ws.html');+ const body = html.slice(html.indexOf('<main'), html.indexOf('</main>'));+ const text = body.replace(/<svg[\s\S]*?<\/svg>/g, '').replace(/<[^>]+>/g, ' ').replace(/\b3D\b|x402/g, '');+ expect(text).not.toMatch(/\d/);+ expect(read('src/why-three-ws.js')).not.toMatch(/\b\d{3,}\b/);+ expect(html + read('src/why-three-ws.js')).not.toMatch(/Competitor X|[\u2013\u2014]/);+ });+});++describe('/why-three-ws proof tiles', () => {+ beforeEach(() => {+ vi.resetModules();+ document.body.innerHTML = `<div id="yw-tiles"></div><div id="yw-error" hidden></div><button id="yw-retry"></button>`;+ });+ afterEach(() => vi.unstubAllGlobals());++ const metric = (key, unit, total, available = true) => ({ label: key, unit, total, available, method: 'm' });++ it('renders live values and marks an unreadable metric Unavailable, not zero', async () => {+ vi.stubGlobal('fetch', vi.fn().mockResolvedValue({+ ok: true,+ json: async () => ({ metrics: {+ agents: metric('Agents', 'count', 4321),+ coins_launched: metric('Coins', 'count', 7),+ creator_fees: metric('Fees', 'sol', null, false),+ x402_settlements: metric('Settlements', 'count', 99),+ models_generated: metric('Models', 'count', 12),+ } }),+ }));+ await import('../src/why-three-ws.js');+ await vi.waitFor(() => expect(document.querySelectorAll('.yw-tile').length).toBe(5));+ const tiles = [...document.querySelectorAll('.yw-tile')];+ expect(tiles[0].textContent).toContain((4321).toLocaleString());+ expect(tiles[2].classList.contains('is-unavailable')).toBe(true);+ expect(tiles[2].textContent).toContain('Unavailable');+ expect(document.getElementById('yw-error').hidden).toBe(true);+ });++ it('shows the error banner and Unavailable tiles when the API fails', async () => {+ vi.stubGlobal('fetch', vi.fn().mockResolvedValue({ ok: false, status: 500 }));+ await import('../src/why-three-ws.js');+ await vi.waitFor(() => expect(document.getElementById('yw-error').hidden).toBe(false));+ expect(document.querySelectorAll('.yw-tile.is-unavailable').length).toBe(5);+ });+});diff --git a/vercel.json b/vercel.jsonindex 13c9d2df2..17f0c28ea 100644--- a/vercel.json+++ b/vercel.json@@ -463,6 +463,10 @@"src": "/analytics/?","dest": "/analytics.html"},+ {+ "src": "/why-three-ws/?",+ "dest": "/why-three-ws.html"+ },{"src": "/experiments/?","dest": "/experiments.html"diff --git a/vite.config.js b/vite.config.jsindex 4d262ea4f..db6a7d8eb 100644--- a/vite.config.js+++ b/vite.config.js@@ -937,6 +937,7 @@ const appConfig = {'agent-economy': resolve(__dirname, 'pages/agent-economy.html'),'agent-economy-volume': resolve(__dirname, 'pages/agent-economy-volume.html'),analytics: resolve(__dirname, 'pages/analytics.html'),+ 'why-three-ws': resolve(__dirname, 'pages/why-three-ws.html'),experiments: resolve(__dirname, 'pages/experiments.html'),economy: resolve(__dirname, 'pages/economy.html'),'overlay-control': resolve(__dirname, 'pages/overlay-control.html'),