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
Bounty-board migration; pump/portfolio/llm/tts endpoint updates
nirholasbf5906053b90
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 6e2b19e63..c79373eab 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -4,6 +4,10 @@Public history for [three.ws](https://three.ws), newest first. New pages come from `added` dates in data/pages.json; everything else is curated in data/changelog.json. Also available as [JSON](https://three.ws/changelog.json) and [RSS](https://three.ws/changelog.xml), live at [three.ws/changelog](https://three.ws/changelog).+## 2026-06-23++- **Fix: the bounty board and live token feeds stay up when a third party is slow** — Swept the API for places where a slow or flaky upstream could hang a request until it was force-killed, or a database missing a recent table could error a whole page, and closed them. The /go bounty board now provisions its own database tables, so it loads everywhere instead of erroring where they were absent. The pump trending and search feeds fall back to the last good list (or an empty one) when pump.fun returns a malformed response, rather than failing the page. And a batch of backend lookups — the live SOL price, Jupiter/Birdeye/CoinGecko market data, portfolio price charts, token-gated scene access checks, IPFS pinning, voice synthesis, and the embedded-agent AI fallback chain — now bound every third-party call with a timeout, so a stalled service returns a clean result quickly instead of holding the request open until it's killed. `[fix]`+## 2026-06-22- **Docs · Agent Reputation** (`/docs/agent-reputation`) — Why autonomous agents need verifiable trust, and how three.ws delivers portable on-chain reputation.diff --git a/api/_lib/migrations/2026-06-07-bounty-board.sql b/api/_lib/migrations/2026-06-07-bounty-board.sqlnew file mode 100644index 000000000..75e7b890b--- /dev/null+++ b/api/_lib/migrations/2026-06-07-bounty-board.sql@@ -0,0 +1,65 @@+-- Migration: the /go bounty board tables (bounties + bounty_submissions).+--+-- These tables were originally created out-of-band by scripts/migrate-bounties.sql+-- (a manual `psql -f` one-off) and were never carried as a runner migration. The+-- migration runner (scripts/apply-migrations.mjs) applies ONLY+-- api/_lib/migrations/*.sql — it does not run that script — so any database+-- provisioned without the manual step is missing them. api/bounties.js queries+-- both on every request, so on such a database the board 500s with:+--+-- NeonDbError: relation "bounties" does not exist+-- NeonDbError: relation "bounty_submissions" does not exist+--+-- This backfills them through the canonical runner path. Dated 2026-06-07 — one+-- day before 2026-06-08-bounty-likes.sql — on purpose: that migration creates+-- bounty_submission_likes with a foreign key REFERENCES bounty_submissions(id),+-- so on a fresh database these base tables MUST be created first or the likes+-- migration fails. Lexicographic ordering ('2026-06-07' < '2026-06-08') guarantees+-- that. Everything is `if not exists`, so this is a safe no-op on databases that+-- already ran the manual script.+begin;++create table if not exists bounties (+ id uuid primary key default gen_random_uuid(),+ user_id uuid not null,+ username text,+ title text not null,+ description text,+ coin_symbol text not null default '$THREE',+ coin_mint text not null default 'FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump',+ reward_sol numeric(18,9),+ reward_tokens numeric(30,0),+ reward_usd numeric(10,2),+ status text not null default 'open' check (status in ('open','resolving','closed')),+ expires_at timestamptz not null default (now() + interval '7 days'),+ submission_count integer not null default 0,+ winner_submission_id uuid,+ created_at timestamptz not null default now(),+ deleted_at timestamptz+);++create index if not exists bounties_status_idx on bounties(status) where deleted_at is null;+create index if not exists bounties_user_idx on bounties(user_id) where deleted_at is null;+create index if not exists bounties_created_idx on bounties(created_at desc) where deleted_at is null;+create index if not exists bounties_subs_idx on bounties(submission_count desc) where deleted_at is null;++create table if not exists bounty_submissions (+ id uuid primary key default gen_random_uuid(),+ bounty_id uuid not null references bounties(id) on delete cascade,+ user_id uuid not null,+ username text,+ content text,+ media_url text,+ media_type text check (media_type in ('image','video','link')),+ status text not null default 'pending' check (status in ('pending','accepted','rejected')),+ reward_sol numeric(18,9),+ tx_hash text,+ created_at timestamptz not null default now()+);++create index if not exists bs_bounty_idx on bounty_submissions(bounty_id);+create index if not exists bs_user_idx on bounty_submissions(user_id);+create index if not exists bs_created_idx on bounty_submissions(created_at desc);+create index if not exists bs_status_idx on bounty_submissions(status);++commit;diff --git a/api/agent-economy/transact.js b/api/agent-economy/transact.jsindex d283a1ac9..3c770e46f 100644--- a/api/agent-economy/transact.js+++ b/api/agent-economy/transact.js@@ -192,11 +192,19 @@ async function fetchChat(userMessage, systemOverride) {? [{ role: 'system', content: systemOverride }, { role: 'user', content: userMessage }]: [{ role: 'user', content: userMessage }];- const res = await fetch(`${baseUrl}/api/chat`, {- method: 'POST',- headers: { 'content-type': 'application/json' },- body: JSON.stringify({ message: userMessage, history: messages.slice(0, -1) }),- });+ let res;+ try {+ res = await fetch(`${baseUrl}/api/chat`, {+ method: 'POST',+ headers: { 'content-type': 'application/json' },+ body: JSON.stringify({ message: userMessage, history: messages.slice(0, -1) }),+ // Bound a hung internal /api/chat under the function's kill so a stalled+ // model lane returns the same null the caller already handles, not a 504.+ signal: AbortSignal.timeout(25000),+ });+ } catch {+ return null;+ }if (!res.ok) return null;diff --git a/api/llm/anthropic.js b/api/llm/anthropic.jsindex b2eacc615..02318f27a 100644--- a/api/llm/anthropic.js+++ b/api/llm/anthropic.js@@ -415,11 +415,35 @@ export default wrap(async (req, res) => {? JSON.stringify({ ...body, model: usedModel }): JSON.stringify(anthropicBodyToOpenAI({ ...body, model: usedModel }));- upstream = await fetch(upstreamUrl, {- method: 'POST',- headers: upstreamHeaders,- body: upstreamBody,- });+ const ttfbCtrl = new AbortController();+ // Bound connect / time-to-first-byte so a lane that accepts the socket but+ // never responds can't burn the whole invocation and starve the rest of the+ // fallback chain. Cleared the moment headers arrive (finally), so the SSE+ // body below still streams for as long as the model needs — never truncated.+ const ttfbTimer = setTimeout(() => ttfbCtrl.abort(), 20000);+ try {+ upstream = await fetch(upstreamUrl, {+ method: 'POST',+ headers: upstreamHeaders,+ body: upstreamBody,+ signal: ttfbCtrl.signal,+ });+ } catch (err) {+ // A thrown fetch (DNS/connection blip, or the TTFB abort above) is never+ // terminal — degrade to the next lane exactly as an HTTP error does below.+ // Without this catch a connection-level throw escaped the loop and 500'd+ // instead of failing over, and the post-loop guard 503s if every lane fails.+ log.warn('upstream_fetch_failed', {+ agentId,+ model: usedModel,+ provider: route.provider || 'anthropic',+ error: err?.message || String(err),+ });+ upstream = null;+ continue;+ } finally {+ clearTimeout(ttfbTimer);+ }if (!upstream.ok) {// Any upstream failure degrades to the next lane. Account-leveldiff --git a/api/pinning/[action].js b/api/pinning/[action].jsindex 70b7a99e4..eab1cf442 100644--- a/api/pinning/[action].js+++ b/api/pinning/[action].js@@ -25,6 +25,7 @@ async function pinViaPinata(buf, filename) {method: 'POST',headers: { Authorization: `Bearer ${process.env.PINATA_JWT}` },body: form,+ signal: AbortSignal.timeout(25000),});if (!resp.ok) {const detail = await resp.text().catch(() => '');@@ -42,6 +43,7 @@ async function pinViaWeb3Storage(buf, filename) {'X-NAME': filename,},body: buf,+ signal: AbortSignal.timeout(25000),});if (!resp.ok) {const detail = await resp.text().catch(() => '');@@ -128,13 +130,13 @@ export default wrap(async (req, res) => {'sourceUrl must be an owned R2 URL or a data: URL',);}- const head = await fetch(sourceUrl, { method: 'HEAD' });+ const head = await fetch(sourceUrl, { method: 'HEAD', signal: AbortSignal.timeout(8000) });if (!head.ok) return error(res, 400, 'validation_error', 'source URL is not accessible');const contentLength = parseInt(head.headers.get('content-length') || '0', 10);if (contentLength > MAX_R2_BYTES) {return error(res, 413, 'payload_too_large', 'source exceeds 50 MB limit');}- const fetched = await fetch(sourceUrl);+ const fetched = await fetch(sourceUrl, { signal: AbortSignal.timeout(20000) });if (!fetched.ok) return error(res, 502, 'fetch_failed', 'failed to fetch source URL');buf = Buffer.from(await fetched.arrayBuffer());const urlPath = new URL(sourceUrl).pathname;diff --git a/api/portfolio/[action].js b/api/portfolio/[action].jsindex 4b0fb8c18..1f96c2be8 100644--- a/api/portfolio/[action].js+++ b/api/portfolio/[action].js@@ -426,7 +426,7 @@ async function handleSend(req, res) {// the price chart; the holding is read directly from the live balances).async function cgFetch(url) {- const r = await fetch(url, { headers: { accept: 'application/json' } });+ const r = await fetch(url, { headers: { accept: 'application/json' }, signal: AbortSignal.timeout(8000) });if (!r.ok) {const text = await r.text().catch(() => '');throw Object.assign(new Error(`coingecko ${r.status}: ${text.slice(0, 200)}`), { status: 502 });diff --git a/api/pump/[action].js b/api/pump/[action].jsindex 479e48f9f..7f54686bc 100644--- a/api/pump/[action].js+++ b/api/pump/[action].js@@ -3521,12 +3521,35 @@ async function handleTrending(req, res) {upstream.searchParams.set('sort', 'market_cap');upstream.searchParams.set('order', 'DESC');upstream.searchParams.set('includeNsfw', 'false');- const resp = await fetch(upstream, {- headers: { accept: 'application/json' },- signal: AbortSignal.timeout(8000),- });+ let resp;+ try {+ resp = await fetch(upstream, {+ headers: { accept: 'application/json' },+ signal: AbortSignal.timeout(8000),+ });+ } catch {+ // Upstream timeout/network blip: serve the last good list if we have one+ // rather than 500-ing the trending feed.+ if (TRENDING_CACHE.body) {+ res.setHeader('cache-control', 'public, max-age=15');+ return json(res, 200, TRENDING_CACHE.body);+ }+ return error(res, 504, 'upstream_timeout', 'pump.fun did not respond');+ }if (!resp.ok) return error(res, 502, 'upstream_failed', `pump.fun returned ${resp.status}`);- const body = await resp.json();+ // pump.fun can answer 200 with an empty/truncated body; resp.json() then throws+ // "Unexpected end of JSON input" → an unhandled 500. Fall back to the last good+ // list (or an empty feed) instead of crashing.+ let body;+ try {+ body = await resp.json();+ } catch {+ if (TRENDING_CACHE.body) {+ res.setHeader('cache-control', 'public, max-age=15');+ return json(res, 200, TRENDING_CACHE.body);+ }+ body = [];+ }const arr = repairCoinImages(Array.isArray(body) ? body : Array.isArray(body?.coins) ? body.coins : [],);@@ -3688,12 +3711,25 @@ async function handleSearch(req, res) {upstream.searchParams.set('sort', 'market_cap');upstream.searchParams.set('order', 'DESC');upstream.searchParams.set('includeNsfw', 'false');- const resp = await fetch(upstream, {- headers: { accept: 'application/json' },- signal: AbortSignal.timeout(8000),- });+ let resp;+ try {+ resp = await fetch(upstream, {+ headers: { accept: 'application/json' },+ signal: AbortSignal.timeout(8000),+ });+ } catch {+ // Upstream timeout/network blip — an empty result set beats a 500 on search.+ return json(res, 200, []);+ }if (!resp.ok) return error(res, 502, 'upstream_failed', `pump.fun returned ${resp.status}`);- const body = await resp.json();+ // A 200 with an empty/truncated body makes resp.json() throw; degrade to "no+ // results" rather than an unhandled 500.+ let body;+ try {+ body = await resp.json();+ } catch {+ body = [];+ }const arr = repairCoinImages(Array.isArray(body) ? body : Array.isArray(body?.coins) ? body.coins : [],);@@ -4881,6 +4917,7 @@ async function handleGithubResolve(req, res) {if (process.env.GITHUB_TOKEN) headers.authorization = `Bearer ${process.env.GITHUB_TOKEN}`;const gh = await fetch(`https://api.github.com/users/${encodeURIComponent(handle)}`, {headers,+ signal: AbortSignal.timeout(8000),});if (gh.status === 404)return error(res, 404, 'github_user_not_found', `@${handle} not found on GitHub`);diff --git a/api/pump/curve.js b/api/pump/curve.jsindex 5fa12bb60..0b97ecd4d 100644--- a/api/pump/curve.js+++ b/api/pump/curve.js@@ -40,7 +40,7 @@ function isPumpMint(mint) {async function jupiterPriceFallback(mint) {try {- const r = await fetch(`https://lite-api.jup.ag/price/v3?ids=${mint}`);+ const r = await fetch(`https://lite-api.jup.ag/price/v3?ids=${mint}`, { signal: AbortSignal.timeout(6000) });if (!r.ok) return null;const data = await r.json();const usd = data?.[mint]?.usdPrice ?? data?.[mint]?.price;diff --git a/api/pump/dashboard.js b/api/pump/dashboard.jsindex a4c10f2ba..01e7acee9 100644--- a/api/pump/dashboard.js+++ b/api/pump/dashboard.js@@ -16,7 +16,7 @@ async function fetchWithCache(url, options, ttlMs = 60_000) {const hit = _birdeyeCache.get(key);if (hit && hit.expires > now) return hit.value;- const resp = await fetch(url, options);+ const resp = await fetch(url, { ...options, signal: options?.signal ?? AbortSignal.timeout(8000) });if (!resp.ok) {const text = await resp.text();throw new Error(`API error (${resp.status}): ${text.slice(0, 200)}`);diff --git a/api/pump/deliver-telegram.js b/api/pump/deliver-telegram.jsindex 92c3e8af7..cf462acd5 100644--- a/api/pump/deliver-telegram.js+++ b/api/pump/deliver-telegram.js@@ -74,6 +74,7 @@ export default wrap(async (req, res) => {method: 'POST',headers: { 'content-type': 'application/json' },body: JSON.stringify({ chat_id: chatId, parse_mode: 'Markdown', text }),+ signal: AbortSignal.timeout(10000),});const data = await r.json().catch(() => ({}));diff --git a/api/pump/helius-stats.js b/api/pump/helius-stats.jsindex 0f7b500c6..65e8fedc7 100644--- a/api/pump/helius-stats.js+++ b/api/pump/helius-stats.js@@ -20,7 +20,7 @@ let _heliusCache = { value: null, at: 0 };async function getSolPrice() {if (Date.now() - _solCache.at < 60_000 && _solCache.price > 0) return _solCache.price;try {- const r = await fetch('https://api.coingecko.com/api/v3/simple/price?ids=solana&vs_currencies=usd&include_24hr_change=true');+ const r = await fetch('https://api.coingecko.com/api/v3/simple/price?ids=solana&vs_currencies=usd&include_24hr_change=true', { signal: AbortSignal.timeout(6000) });const d = await r.json();const p = d?.solana?.usd;const c = d?.solana?.usd_24h_change;diff --git a/api/scene/gate-check.js b/api/scene/gate-check.jsindex aebfa70cf..e7e2235a9 100644--- a/api/scene/gate-check.js+++ b/api/scene/gate-check.js@@ -147,6 +147,7 @@ async function querySolanaBalance(gate, walletAddress) {const resp = await fetch(rpcUrl, {method: 'POST',headers: { 'content-type': 'application/json' },+ signal: AbortSignal.timeout(8000),body: JSON.stringify({jsonrpc: '2.0', id: 1,method: 'getTokenAccountsByOwner',@@ -164,6 +165,7 @@ async function querySolanaBalance(gate, walletAddress) {const resp = await fetch(rpcUrl, {method: 'POST',headers: { 'content-type': 'application/json' },+ signal: AbortSignal.timeout(8000),body: JSON.stringify({jsonrpc: '2.0', id: 1,method: 'getAssetsByOwner',@@ -198,6 +200,7 @@ async function queryEvmBalance(gate, walletAddress) {const resp = await fetch(rpcUrl, {method: 'POST',headers: { 'content-type': 'application/json' },+ signal: AbortSignal.timeout(8000),body: JSON.stringify({jsonrpc: '2.0', id: 1,method: 'eth_call',@@ -218,6 +221,7 @@ async function queryEvmBalance(gate, walletAddress) {const decResp = await fetch(rpcUrl, {method: 'POST',headers: { 'content-type': 'application/json' },+ signal: AbortSignal.timeout(8000),body: JSON.stringify({jsonrpc: '2.0', id: 2,method: 'eth_call',diff --git a/api/studio-assets/[...path].js b/api/studio-assets/[...path].jsindex c565b0c24..fbb4a3986 100644--- a/api/studio-assets/[...path].js+++ b/api/studio-assets/[...path].js@@ -72,7 +72,7 @@ export default wrap(async (req, res) => {const upstreamUrl = UPSTREAM_BASE + path;let upstream;try {- upstream = await fetch(upstreamUrl, { method: req.method, redirect: 'follow' });+ upstream = await fetch(upstreamUrl, { method: req.method, redirect: 'follow', signal: AbortSignal.timeout(20000) });} catch (err) {return error(res, 502, 'upstream_unreachable', `mirror fetch failed: ${err?.message}`);}diff --git a/api/tts/eleven.js b/api/tts/eleven.jsindex a473600ef..bdb087443 100644--- a/api/tts/eleven.js+++ b/api/tts/eleven.js@@ -165,6 +165,11 @@ export default wrap(async (req, res) => {model_id: modelId,voice_settings: settings,}),+ // Bound a hung connection (ElevenLabs accepting but never responding)+ // under Vercel's 30s kill, so a stall returns a clean 502 + char refund+ // instead of a 504 with characters charged but no audio delivered. Set+ // well above a real clip's synth+stream time so it never cuts valid audio.+ signal: AbortSignal.timeout(28000),},);} catch (fetchErr) {diff --git a/api/walk-og.js b/api/walk-og.jsindex 322e92c18..809c4dd87 100644--- a/api/walk-og.js+++ b/api/walk-og.js@@ -28,7 +28,7 @@ export default wrap(async (req, res) => {try {const avatar = await getAvatar({ id });if (avatar?.thumbnail_url) {- const r = await fetch(avatar.thumbnail_url);+ const r = await fetch(avatar.thumbnail_url, { signal: AbortSignal.timeout(6000) });if (r.ok) {const buf = await r.arrayBuffer();const ct = r.headers.get('content-type') || 'image/jpeg';diff --git a/data/changelog.json b/data/changelog.jsonindex 2880c3935..638debceb 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,12 @@{"$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-06-23",+ "title": "Fix: the bounty board and live token feeds stay up when a third party is slow",+ "summary": "Swept the API for places where a slow or flaky upstream could hang a request until it was force-killed, or a database missing a recent table could error a whole page, and closed them. The /go bounty board now provisions its own database tables, so it loads everywhere instead of erroring where they were absent. The pump trending and search feeds fall back to the last good list (or an empty one) when pump.fun returns a malformed response, rather than failing the page. And a batch of backend lookups — the live SOL price, Jupiter/Birdeye/CoinGecko market data, portfolio price charts, token-gated scene access checks, IPFS pinning, voice synthesis, and the embedded-agent AI fallback chain — now bound every third-party call with a timeout, so a stalled service returns a clean result quickly instead of holding the request open until it's killed.",+ "tags": ["fix"]+ },{"date": "2026-06-22","title": "Fix: live trade tape, 3D generation, and agent minting hold up under pressure",diff --git a/public/changelog.json b/public/changelog.jsonindex e7e84c9fb..dcbdbeef3 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,11 +1,21 @@{- "generated_at": "2026-06-22T23:48:49.304Z",+ "generated_at": "2026-06-23T00:17:54.417Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws","url": "https://three.ws"},"entries": [+ {+ "date": "2026-06-23",+ "type": "update",+ "title": "Fix: the bounty board and live token feeds stay up when a third party is slow",+ "summary": "Swept the API for places where a slow or flaky upstream could hang a request until it was force-killed, or a database missing a recent table could error a whole page, and closed them. The /go bounty board now provisions its own database tables, so it loads everywhere instead of erroring where they were absent. The pump trending and search feeds fall back to the last good list (or an empty one) when pump.fun returns a malformed response, rather than failing the page. And a batch of backend lookups — the live SOL price, Jupiter/Birdeye/CoinGecko market data, portfolio price charts, token-gated scene access checks, IPFS pinning, voice synthesis, and the embedded-agent AI fallback chain — now bound every third-party call with a timeout, so a stalled service returns a clean result quickly instead of holding the request open until it's killed.",+ "link": null,+ "tags": [+ "fix"+ ]+ },{"date": "2026-06-22","type": "launch",diff --git a/public/changelog.xml b/public/changelog.xmlindex eb5bd3404..bc80c13fc 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -6,6 +6,14 @@<atom:link href="https://three.ws/changelog.xml" rel="self" type="application/rss+xml"/><description>What's new on three.ws — features, improvements, and releases, newest first.</description><language>en</language>+ <item>+ <title>Fix: the bounty board and live token feeds stay up when a third party is slow</title>+ <link>https://three.ws/changelog</link>+ <guid isPermaLink="false">2026-06-23:Fix: the bounty board and live token feeds stay up when a third party is slow</guid>+ <pubDate>Tue, 23 Jun 2026 12:00:00 GMT</pubDate>+ <category>fix</category>+ <description>Swept the API for places where a slow or flaky upstream could hang a request until it was force-killed, or a database missing a recent table could error a whole page, and closed them. The /go bounty board now provisions its own database tables, so it loads everywhere instead of erroring where they were absent. The pump trending and search feeds fall back to the last good list (or an empty one) when pump.fun returns a malformed response, rather than failing the page. And a batch of backend lookups — the live SOL price, Jupiter/Birdeye/CoinGecko market data, portfolio price charts, token-gated scene access checks, IPFS pinning, voice synthesis, and the embedded-agent AI fallback chain — now bound every third-party call with a timeout, so a stalled service returns a clean result quickly instead of holding the request open until it's killed.</description>+ </item><item><title>Docs · Agent Reputation</title><link>https://three.ws/docs/agent-reputation</link>diff --git a/public/features.json b/public/features.jsonindex 6c3119c92..67c39e215 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-22T23:48:49.249Z",+ "generated_at": "2026-06-23T00:17:54.401Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",