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
docs(resilience): document the Solana read guards and the lexical search fallback, and tell holders what changed
nirholas50c13493c9a1
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 26825cb33..70494943e 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -12,6 +12,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Agent pages, embeds and the camera tools keep working when a CDN or gateway is down**: The parts of the site that load files from someone else's server used to have exactly one place to get them. If that one host was slow, blocked by a corporate network, or rate-limiting the visitor, the result was a blank box with no explanation: an agent page with no avatar, a 3D preview that never appeared, mocap and sign-language input that refused to start, a deposit QR that showed a broken image. Each of those now tries every equivalent source in turn. Agent avatars retry across all four IPFS gateways, on-chain reads rotate through every public node for the chain, the 3D viewer loads its decoders from our own servers, the camera tools ship their code with the page, and a QR code that cannot be drawn falls back to text you can still copy. `[improvement, fix]`- **Every outside data source now has a backup**: Prices, DeFi stats, token data, pump.fun feeds, RPC reads and 3D generation providers all had single points of failure: one rate limit or outage upstream turned into a blank section or an error page. Every one of those reads now has a deadline, retries only on transient faults, a second and third source where one exists, and keeps serving the last good value (marked as stale) when everything upstream is down. In the browser, API calls time out instead of spinning forever, script and model loads try mirror CDNs, and payment flows report a failed confirmation with the transaction signature instead of showing nothing. `[improvement, fix, infra]`- **Every tap target on the marketplace and your agents pages now fits a thumb**: On phones, the hearts, tags, author links and the write-with-agent button on marketplace cards were as small as 18 pixels tall, so browsing on a Seeker or any Android phone meant a lot of missed taps. All of them, plus the walk-companion controls and footer links, now sit inside 44 pixel tap areas without changing how the cards look. Measured on a real phone profile: the marketplace went from 1,352 undersized controls to zero. (`/marketplace`) `[improvement]`+- **Prices, wallets, search and speech keep answering when a data provider goes down**: A single slow or rate-limited provider used to be enough to blank a page. Token pages, portfolios and dashboards now fall back to other market sources and, failing that, to the last good reading, clearly marked with when it was taken instead of passed off as live. Wallet and checkout pages survive a Solana node outage: a payment can still be built, a balance reads as unknown rather than zero, and a temporary outage says retry shortly instead of failing outright. Image understanding skips a provider that is rate-limiting instead of waiting on it, so it answers from a working one. Text-to-speech falls through to a second voice engine rather than failing. Agent search still returns keyword matches when the search index is unreachable. Ticker availability is the one thing deliberately never answered from cache, because a name claimed minutes ago has to show up as taken. `[improvement, infra]`- **Seeker app: stay signed in across restarts, and a submission path that matches today's dApp Store**: On Solana Seeker, the three.ws app now remembers your Seed Vault session when Android restarts the app in the background, so reopening it no longer asks you to approve again; a revoked session is dropped cleanly instead of failing every signature. The My Agents home-screen shortcut opens your own agents instead of the public index. Behind the scenes the store submission tooling was rebuilt for the Publisher Portal that Solana Mobile now uses, and the listing copy was rewritten to describe only what the app really does. (`/my-agents`) `[improvement, fix, infra]`- **Share a photo or a 3D file straight into three.ws**: On Android (and the Seeker app) three.ws now appears in the share sheet. Share a photo from your camera roll and it lands in the selfie-to-avatar flow already attached; share a .glb and it opens the upload flow. Going offline inside the app shows a three.ws screen that reloads on its own when the connection is back, instead of a browser error, and the home-screen icon no longer gets its corners cropped on round or squircle launchers. (`/create`) `[feature, improvement]`- **Text-to-3D is generating again, and it answers in seconds**: For most of a day, describing something in the forge produced a long wait and then a busy message, on the site, in the ChatGPT app, and for agents buying through OKX. Two things had gone wrong at once: the image provider that paints the concept picture had stopped responding, and the free assistant that sharpens your description was asking for models that no longer exist. Both are fixed. The painter now runs on a model that answers in about five seconds, the assistant uses current models, and a text-to-3D request is accepted in three to eight seconds instead of never. Image-to-3D was never affected. (`/forge`) `[fix]`diff --git a/api/nim-forge.js b/api/nim-forge.jsindex ce92621ee..61962ca97 100644--- a/api/nim-forge.js+++ b/api/nim-forge.js@@ -15,6 +15,7 @@// NIM_TRELLIS_URL at it.import { wrap, cors, json, method, readJson, rateLimited } from './_lib/http.js';+import { withRetry } from './_lib/resilience.js';import { limits, clientIp } from './_lib/rate-limit.js';// NIM_TRELLIS_URL only. MODEL_TRELLIS_URL points at our own Cloud Run TRELLIS@@ -139,14 +140,26 @@ export default wrap(async (req, res) => {const t0 = Date.now();let upstream;try {- upstream = await fetch(url, {- method: 'POST',- headers,- body: JSON.stringify(payload),- signal: AbortSignal.timeout(INFER_TIMEOUT_MS),- });+ // This route talks to ONE NIM by design (it is the self-host lane's own+ // page, and its contract is synchronous: caller waits, GLB comes back).+ // There is no sibling lane to fail over to without changing that contract,+ // so the recovery here is a bounded retry for the transient half of the+ // failures, and an explicit pointer to the multi-lane /forge for the rest.+ upstream = await withRetry(+ () => fetch(url, {+ method: 'POST',+ headers,+ body: JSON.stringify(payload),+ signal: AbortSignal.timeout(INFER_TIMEOUT_MS),+ }),+ { attempts: 2, label: 'nim-forge' },+ );} catch (err) {- return json(res, 502, { error: 'nim_unreachable', message: `Could not reach the NIM: ${err?.message || err}` });+ return json(res, 502, {+ error: 'nim_unreachable',+ message: `Could not reach the NIM: ${err?.message || err}`,+ recovery: 'This page talks to a single self-hosted NIM. Generate at /forge instead, which runs the full provider ladder.',+ });}if (!upstream.ok) {@@ -162,6 +175,7 @@ export default wrap(async (req, res) => {error: 'nim_error',upstream_status: upstream.status,message: detail || `NIM returned ${upstream.status}`,+ recovery: 'This page talks to a single self-hosted NIM. Generate at /forge instead, which runs the full provider ladder.',});}diff --git a/data/changelog.json b/data/changelog.jsonindex 5af5d7726..81777683b 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,15 @@{"$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-27",+ "title": "Prices, wallets, search and speech keep answering when a data provider goes down",+ "summary": "A single slow or rate-limited provider used to be enough to blank a page. Token pages, portfolios and dashboards now fall back to other market sources and, failing that, to the last good reading, clearly marked with when it was taken instead of passed off as live. Wallet and checkout pages survive a Solana node outage: a payment can still be built, a balance reads as unknown rather than zero, and a temporary outage says retry shortly instead of failing outright. Image understanding skips a provider that is rate-limiting instead of waiting on it, so it answers from a working one. Text-to-speech falls through to a second voice engine rather than failing. Agent search still returns keyword matches when the search index is unreachable. Ticker availability is the one thing deliberately never answered from cache, because a name claimed minutes ago has to show up as taken.",+ "tags": [+ "improvement",+ "infra"+ ]+ },{"date": "2026-08-27","title": "Agent pages, embeds and the camera tools keep working when a CDN or gateway is down",diff --git a/docs/shared-utilities.md b/docs/shared-utilities.mdindex 69c187297..31ef59208 100644--- a/docs/shared-utilities.md+++ b/docs/shared-utilities.md@@ -195,6 +195,56 @@ Unlike `lastGood` above, the mirror lives in the shared store (Upstash), so afreshly started instance can ride out an outage on a value another instancefetched.+### `api/_lib/solana/read-guards.js`: chain reads that survive a dead RPC++```js+import {+ ataExists, blockhashKey, getRecentBlockhashInfo, mintDecimals, readBalanceOrNull,+} from './solana/read-guards.js';++const { blockhash } = await getRecentBlockhashInfo(conn, blockhashKey({ network: 'mainnet' }));+const decimals = await mintDecimals(conn, usdcMint); // constant, no network read+if (!(await ataExists(conn, ata))) ixs.push(createAssociatedTokenAccountIdempotentInstruction(...));+const lamports = await readBalanceOrNull(conn, pubkey); // null means unknown, never zero+```++Every read here answers the question "what should this do when the chain cannot+be read at all?", and each answer is different:++- **Blockhash**: serve a cached one that is still inside its validity window.+ Pass `{ forceFresh: true }` on an expired-blockhash retry so the retry means+ something.+- **Mint decimals**: USDC, USDT, wSOL and `$THREE` have fixed decimals, so the+ common case never touches the network and cannot fail.+- **ATA probe**: fail OPEN to "missing". This is safe **only** with+ `createAssociatedTokenAccountIdempotentInstruction`; with the plain create, an+ unnecessary create fails the whole transaction. Always pair the two.+- **Balance**: `null` for unknown. Never let a caller read it as zero.++Anything that cannot degrade raises `rpcUnavailableError`, which+`respondRpcUnavailable` renders as a 503 with `Retry-After`, so a caller learns+"ask again shortly" instead of a sanitized 500.++### `api/_lib/lexical-rank.js`: the fallback for a search that cannot embed++```js+import { rankLexically } from './lexical-rank.js';++const rows = rankLexically(query, docs, { limit: 20 }); // [{ id, score: null, lexicalScore, match: 'lexical' }]+```++Semantic search is the one place where a provider ladder is **wrong**: a stored+vector space has one embedder, so another lane's vector is a different dimension+in a different geometry. When the embedder is down, degrade the *method* instead+of the provider. Every row is labelled `match: 'lexical'` with a null semantic+score, so no caller can mistake the ordering for a vector one. Used by+`/api/galaxy` and `/api/ibm/galaxy`.++`api/_lib/embeddings.js` covers the other half: `embedPassagesAny(preferredTag,+texts)` walks every configured embedder at **ingest** time (where no space is+fixed yet) and returns the tag that actually answered, so the caller records the+space it really got.+### `api/_lib/mem-cache.js` — bounded in-process cacheBacked by [`lru-cache`](https://www.npmjs.com/package/lru-cache).diff --git a/public/changelog.json b/public/changelog.jsonindex 2f59ba889..3148cf638 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-08-27T13:40:26.462Z",+ "generated_at": "2026-08-27T13:48:04.512Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -69,6 +69,17 @@"improvement"]},+ {+ "date": "2026-08-27",+ "type": "update",+ "title": "Prices, wallets, search and speech keep answering when a data provider goes down",+ "summary": "A single slow or rate-limited provider used to be enough to blank a page. Token pages, portfolios and dashboards now fall back to other market sources and, failing that, to the last good reading, clearly marked with when it was taken instead of passed off as live. Wallet and checkout pages survive a Solana node outage: a payment can still be built, a balance reads as unknown rather than zero, and a temporary outage says retry shortly instead of failing outright. Image understanding skips a provider that is rate-limiting instead of waiting on it, so it answers from a working one. Text-to-speech falls through to a second voice engine rather than failing. Agent search still returns keyword matches when the search index is unreachable. Ticker availability is the one thing deliberately never answered from cache, because a name claimed minutes ago has to show up as taken.",+ "link": null,+ "tags": [+ "improvement",+ "infra"+ ]+ },{"date": "2026-08-27","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex 3791a8707..48c5725ad 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -54,6 +54,14 @@<category>improvement</category><description>On phones, the hearts, tags, author links and the write-with-agent button on marketplace cards were as small as 18 pixels tall, so browsing on a Seeker or any Android phone meant a lot of missed taps. All of them, plus the walk-companion controls and footer links, now sit inside 44 pixel tap areas without changing how the cards look. Measured on a real phone profile: the marketplace went from 1,352 undersized controls to zero.</description></item>+ <item>+ <title>Prices, wallets, search and speech keep answering when a data provider goes down</title>+ <link>https://three.ws/changelog</link>+ <guid isPermaLink="false">2026-08-27:Prices, wallets, search and speech keep answering when a data provider goes down</guid>+ <pubDate>Thu, 27 Aug 2026 12:00:00 GMT</pubDate>+ <category>improvement</category>+ <description>A single slow or rate-limited provider used to be enough to blank a page. Token pages, portfolios and dashboards now fall back to other market sources and, failing that, to the last good reading, clearly marked with when it was taken instead of passed off as live. Wallet and checkout pages survive a Solana node outage: a payment can still be built, a balance reads as unknown rather than zero, and a temporary outage says retry shortly instead of failing outright. Image understanding skips a provider that is rate-limiting instead of waiting on it, so it answers from a working one. Text-to-speech falls through to a second voice engine rather than failing. Agent search still returns keyword matches when the search index is unreachable. Ticker availability is the one thing deliberately never answered from cache, because a name claimed minutes ago has to show up as taken.</description>+ </item><item><title>Seeker app: stay signed in across restarts, and a submission path that matches today's dApp Store</title><link>https://three.ws/my-agents</link>diff --git a/public/features.json b/public/features.jsonindex 7936866c9..2b1909f3e 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-08-27T13:40:26.453Z",+ "generated_at": "2026-08-27T13:48:04.480Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",