Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
fix(registry): stop the public lookup from publishing a private avatar's thumbnail
nirholas772a61df1ba9
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 4779696ce..da9cddc90 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -17,6 +17,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **A vanity bounty or a sealed drop now goes live only after its payment truly clears**: Posting a grind bounty and creating a sealed wallet drop are both paid with x402, which checks a payment and then settles it as two separate steps. Until now the bounty was published, and the drop wallet funded on-chain, before that second step finished. A payment that passed the check but failed to settle therefore left behind a live bounty a worker could be paid out for, or a funded gift wallet a recipient could still open, with nothing collected for either. Both now stay in a pending state that nobody can claim, refund, or reveal until the payment has actually settled: if it never settles, the bounty is voided and the drop's funding is swept straight back to the platform wallet. Separately, the certificate registry answers a certificate-id lookup with wording written for that lookup instead of the address version, and accepts an id pasted in any letter case, and the rarity share card is now rate limited. (`/vanity/bounties`) `[security, fix]`- **A vault download rate-limit hit now tells you when to retry, and a browse outage stops reading as an empty listing**: Two fixes on the BNB vault endpoints. Downloading a purchased vault file is deliberately rate limited, but when you hit that limit the reply came back without a retry-after time and without the limiter's own reason, so a client had no idea how long to wait, and a limiter outage (which deliberately refuses requests rather than letting them through unchecked) was indistinguishable from you genuinely spending your own quota. Both now come back with the refusal, the same way every other vault endpoint already answered. Separately, when browsing the vault, a listing whose stored file details could not be looked up was always reported as "listed on-chain, details missing". That is the honest answer when the storage network really has nothing for it, but the same answer was given when the lookup itself was down, quietly turning an outage into what looks like an incomplete listing. A genuine miss still shows as a listing without details; an outage now says the storage lookup is unavailable. Both endpoints also gained full test coverage, including proof that a download link issued to one buyer cannot fetch another buyer's file. (`/vault`) `[fix]`- **Agent .sol name lookups work again, and the avatar manifest schema now answers at its own address**: The avatar-agent MCP server resolves .eth and .sol names to wallet addresses. Its .sol side went through a hosted name-lookup service that has since been retired: every request came back as "not found", which reads exactly like an unregistered domain, so a working name and a nonexistent one were indistinguishable. Solana names are now read straight from the chain, from the same name-service accounts the three.ws backend already reads, so the lookup depends on nothing but a Solana RPC. Two things were fixed alongside it. The per-lookup time budget was under five seconds, which a cold Ethereum lookup routinely exceeds, so real names were being reported as timeouts; it is now fifteen seconds and adjustable. And a lookup that genuinely fails now says why instead of quietly reporting "not found". Separately, the avatar manifest schema names https://three.ws/schema/avatar.v1.json as its own identifier, but nothing was served there, so any validator that followed the identifier got a 404. The schema is now published at that address, with a test that keeps the served copy identical to the one shipped in the package. `[fix, sdk]`+- **Agent coin pages stop reporting a burn that never happened**: An agent coin page showed a "last burn" time taken from the last moment the buyback job ran at all, including every run where it looked and correctly decided there was nothing to burn. A coin with thousands of those skipped runs and no actual burns therefore read as having burned minutes ago while the burn count and burned total beside it both sat at zero. The burn time now counts confirmed burns only, so it stays blank until a real burn lands and always agrees with the count next to it. Separately, the three pump endpoints that manage a coin's autopilot policy and its invoices now require a request to originate from three.ws before it can act on a signed-in browser session, which is the rule the rest of the pump endpoints already followed. Agent keys and workers are unaffected. `[fix, security]`- **Agent Screen is usable on a phone, and reads correctly to a screen reader**: Watching an agent work on a narrow screen was close to impossible. The row of viewer controls along the top (fit, screenshot, picture-in-picture, fullscreen, ambient, zen, and the link back to the agent) ran off the edge of the page with no way to reach them, the agent name and its live badge painted over the buttons underneath, and the two panels that open by default covered the live screen and the avatar cam completely: the whole point of the page, hidden. The control row now scrolls sideways so every control stays reachable at any width, the name keeps its space, and on a phone the page opens on a bare stage with the panels one tap away. Three fixes for anyone using a keyboard or a screen reader landed with it: the page now has a real heading and a main region for the skip link to jump to, the hidden Skip to content link stopped rendering as visible text at the top of the page, and every text field on the page gained a proper label. Finally, if the agent list fails to load for any reason other than being signed out, the page says what went wrong and offers a retry instead of telling a signed-in owner to go sign in. (`/agent-screen`) `[fix, improvement]`- **Arming an Oracle agent for live trading no longer rounds your trade size up**: The arm page clamps the risk knobs on the server so a bad number can never reach the trading loop, and those clamps have a floor: the smallest trade the loop will place is 0.001 SOL. That floor was being applied in the wrong direction. Ask to arm a live agent with a per-trade size of zero, and instead of being told no, you were armed for real spending at 0.001 SOL a trade with a half-SOL daily ceiling you never asked for. The check meant to catch this looked at the number after the clamp had already raised it, so it could never fire. Arming live now refuses any per-trade size below the floor, and any daily cap smaller than a single trade, and tells you which number to fix; nothing is armed until you do. Clamping a too-large number back down to the ceiling is unchanged, and simulate runs keep the same forgiving behaviour as before. The arm page also shows the reason a save was rejected instead of one generic line, so an ownership problem no longer reads the same as a bad trade size, and a failed Telegram test now prints what Telegram actually said. (`/oracle/arm`) `[fix, security]`- **Asking for a voice that does not exist now tells you so, instead of quietly speaking in a different one**: The voice API accepts a provider and a voice id from the voice catalog. If the id was not one that provider actually has, nothing said so: the request was answered with audio rendered in that lane's default voice, and on the metered lanes it was billed, so a single typo in a voice id came back as a stranger's voice at full price with a success status. A well-formed id for a voice that had been removed took the opposite route and failed as a server error, which reads as our fault and tells a client to retry something that will never work. Both now return a plain rejection that names the id you sent and the catalog address to pick a real one from, and that check runs before anything is charged. Leaving the voice id out still gets you the lane default on purpose. Asking the catalog for a provider that does not exist used to return an empty list that was indistinguishable from a provider being down; it now says which providers exist. ElevenLabs voices, whose catalog grows every time you clone or add one, are still decided by ElevenLabs, but an id it rejects is reported as your request being wrong rather than ours, with any charge refunded first. Voice cloning also now asks who you are before reporting anything about how this server is configured. In the same pass, a key ElevenLabs turns down when you list your voices or browse the public voice library now comes back as your key being rejected, so the page can ask you for a new one, instead of a gateway error that invites a retry which can never succeed. (`/docs/api-reference`) `[fix, improvement]`@@ -31,6 +32,9 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Paying for a skill by Solana Pay QR now shows a real three.ws merchant card**: When a wallet scans a Solana Pay code for a skill purchase, it first asks our server who the merchant is and shows the answer in the sheet you approve before signing. That reply pointed at a logo file that has never existed, so the icon came back as a 404 and the merchant appeared broken at the exact moment you decide whether to pay, under the retired 3D-Agent name rather than three.ws. The probe now returns the live logo and the current name, and answers wallets that ask from a browser, which the Solana Pay spec requires. Confirming a purchase through the off-web webhook also accepts the settlement hash an EVM payment needs, so a card that settled on Base can finish instead of sitting on pending forever, and a confirmation failure now reaches our error tracker rather than disappearing into a generic 500. (`/marketplace`) `[fix]`- **Pinning an avatar to IPFS works for real avatars, not just tiny ones**: Minting an avatar from the Avatar Studio pins the model and its metadata to IPFS, and the whole file is sent through the platform so the storage credential never has to reach your browser. The endpoint said it accepted files up to 10 MB, but it was actually rejecting anything over roughly 730 KB, which is smaller than almost any real avatar. The error it gave back was a bare 'payload too large' that named no limit, so there was nothing to act on. The cause was two size limits that had never been reconciled: files are sent as text, which makes them a third larger in transit, and the transport limit was left at its default while the documented limit was set eight times higher. The limits now agree. Inline uploads are accepted up to 5 MB, which is what the request size can actually carry, and anything larger has a clear path: upload it to storage first and pin it by URL, a lane that has always accepted 50 MB. Over-sized uploads now say which ceiling was crossed. Two smaller fixes came with it: the filename you send is now the filename filed with the storage provider, instead of every avatar being stored as 'avatar.glb' and every metadata file as 'manifest.json', which made a pin list impossible to read; and a request with a genuine mistake in it, such as a file from somewhere the platform does not own, now gets an error explaining the mistake rather than a generic 'service unavailable' that hid it. The endpoint is now documented in the API reference. `[fix, docs]`- **Plan checkout: a paid upgrade can only ever settle on real mainnet, and a late payment is no longer stranded**: Paying for a plan creates a quote, you send the funds, then the server checks the chain before it upgrades you. Three things in that path were wrong. The checkout side has always refused test-network quotes in production, because test-network dollars are free from a faucet, but the confirm side still let a caller name the test network itself, and it is the confirm side that decides which chain it looks at and which dollar it accepts. Both ends now read the same setting, so a production upgrade can only ever be settled by real funds on mainnet. Second, an Ethereum-side payment has to wait twelve blocks before it counts, which meant funds sent near the end of a session could land on-chain and then be refused for arriving late, with the money already gone; that lane now honors the same one-hour grace window the Solana lane has, so an on-chain payment is always claimable. Third, confirming an Ethereum payment could reach a Solana quote and mark it expired, and asking to buy a skill from a malformed agent id answered a generic server error instead of telling you what was wrong with the request. (`/pricing`) `[fix, security]`+- **Portfolio token pages price Base and Arbitrum holdings correctly**: Opening a token from your portfolio asked Ethereum for the price no matter which chain the token was actually on. Almost every agent wallet runs on Base, so the most common holdings came back with no price, no chart and a shortened contract address instead of a ticker, even though the balance was right there in the list. Each token is now priced on its own chain, labelled with its real symbol and decimals, and native gas tokens use the right coin per chain (POL on Polygon, BNB on BNB Chain, AVAX on Avalanche) instead of always quoting ETH. Chains nobody prices, such as testnets, now say so plainly rather than showing another chain's number. `[fix]`+- **Private avatars no longer show their picture in registry lookups**: The registry lookup that turns an agent id, avatar id, slug, or Solana mint into one record already refused to hand out the 3D model of a private avatar, but it still returned the rendered preview image of that same avatar, so anyone holding the id could see what a private creation looked like. The preview is now gated on exactly the same visibility as the model: a private avatar returns its name and identity and no imagery at all. The embeddable widget read did the same thing with its avatar thumbnail and got the same gate. Separately, every read path that turns a stored thumbnail into a URL now goes through the one resolver that drops the old broken image keys, so agent manifests, token metadata, and launch feeds stop publishing image links that answer 404. `[security, fix]`+- **Push notification sign-up now only accepts a real push service address**: Turning on browser notifications hands the platform the address your browser wants alerts delivered to, and that address is one the platform later calls from its own servers. It was stored exactly as given, so a crafted sign-up could point it at an internal address instead of a push service and use the delivery job as a way to knock on doors inside our own network. Sign-up now checks the address before storing it: it has to be an ordinary secure web address on a genuinely public host, or it is refused with a clear reason. If the check cannot finish because name lookup is briefly down, the browser is told to try again rather than being turned away for good. Delivery re-checks every stored address at send time too, so anything registered before this landed can never be dialed, and an address that could never be legal is dropped from the list the way an expired one already was. `[security]`- **Rotating or revoking an x402 API key now requires a proof the request came from you**: The billing page's rotate and revoke buttons destroy a live API credential, but the endpoint behind them accepted any request that carried your session cookie. A page on another site could have posted to it and killed a working key without you ever seeing the response. Both actions now require a single-use token the page fetches for each write, and the page tells you plainly when a token has gone stale or you have tried too often. Rotating also mints the replacement key before retiring the old one, so a failure part way through can no longer leave you with no key at all. (`/billing/keys`) `[security, fix]`- **Saving a big build no longer re-downloads the whole world first**: Every time you saved a world, the service fetched and re-parsed the entire previous version of that world just to check who owns it. On a large build that meant a full extra download and parse on each autosave, for a single ownership field. The check now reads only the small index record, so saves on big worlds are noticeably quicker and the storage layer does half the work. Two error replies also got honest labels: a build that exceeds the size cap now answers "payload too large" and a request sent with the wrong content type answers "unsupported media type", instead of both arriving as a generic validation error that gave a client nothing to act on. `[improvement, fix]`- **Scanning for trade candidates is faster on creator-filtered rules and honest about how much it looked at**: The Trading Brain's "Scan for matches" preview shows the live launches your rule would buy right now, each with a real quote and a real safety verdict, and it never trades on its own. Three fixes. A rule that filters on the creator's track record has to look that record up over the network, and the scan was buying that lookup for every launch in the feed page, including ones it had already rejected for being too old or too small; it now pays for a creator lookup only when the rest of the rule already likes the coin, which is the difference between a scan that returns and one that crawls. The result said it had scanned the whole feed page even though it stops as soon as it has priced six matches, so the count overstated the work behind the answer; it now reports what it actually examined alongside the size of the page it read from. And an agent's Solana address is a field you can edit, so a value that is not a real address turned the preview into a server error rather than a scan; the safety check now resolves that address itself and the scan completes. The scan also gained its own per-owner limit, because every match it prices costs a live on-chain quote and a safety simulation. Separately, when the Trading Brain refuses something, the panel now shows the reason the server sent instead of a generic "Scan failed", so a rate limit, a kill switch, or an unreachable launch feed each read as themselves. `[fix, improvement]`@@ -51,6 +55,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **The embodied AgenC demo hands you a live task, and reacts to the state a claimed task is actually in**: The /agenc/embodied page binds a 3D agent to a real AgenC task on Solana, and until now it opened on an empty input box: it needed a task account address and offered no way anywhere on the page to find one. It now lists real tasks three.ws itself posted, claimed, and settled on-chain, newest first, so the demo works the moment it loads; a new public read, /api/agenc/recent-tasks, serves that list. Two things it showed were also wrong. The scene coloured itself for a state named Claimed, which the chain has never used: a claimed task is In Progress on-chain, so the halo, the badge, and the per-state animation switch all sat inert through the one transition the demo exists to show. And the page named a program address that no read has touched since the protocol's interface moved; it now shows the program each live read actually ran against. Pasting an address that holds something other than a task used to report a server error, as though the platform were broken, rather than saying no such task exists there; that is now a plain not-found, with the page telling you to check the address or switch cluster. The panel has designed loading, empty, and error states throughout, the form fields have real labels, the layout no longer scrolls sideways on a phone, and a task that cannot be read is retried with a backoff instead of being re-requested every four seconds forever. (`/agenc/embodied`) `[fix, improvement, feature]`- **The Granite embeddings endpoint no longer hands back an empty slot where a vector belongs**: The public embeddings endpoint behind the watsonx Constellation turns your texts into vectors, one per input, and falls back to a second provider whenever IBM watsonx is unavailable. If a provider answered with only part of the batch, that counted as success: the fallback never ran, and the reply carried empty slots in place of the missing vectors while still claiming a full count. Anything plotting those vectors could not tell a missing embedding from a real one sitting at the origin. A partly answered batch is now treated as a failure, so the next provider covers the whole batch and a reply never contains an empty vector; if every provider is down you get a clear error naming the upstream cause instead. The IBM integration guide now also documents the batch limits, the real provider fallback order, and the fact that these responses are never cached. (`/constellation`) `[fix]`- **The guard and gesture tutorials stop teaching steps that fail, and one that wiped your clip list**: Two tutorials had drifted away from the code they document, and following either one exactly produced a bad outcome rather than a confusing one. The gesture tutorial's API example padded its request body with an empty clip array, and told readers that field was required; it has not been required for a while, and an empty array is a real value, so anyone who copied that snippet to change one gesture slot silently erased every custom clip on their agent. The endpoint's actual rule is now stated: every field is optional, present replaces it, absent leaves it alone. That page also listed four gestures on the /walk quick keys that are not on them, so pressing 1 through 8 never produced what it described; the eight keys are now named in order, with the wheel and the code call given for the four that have no key. The guard tutorial's registry entry left out the proof block, which the registry auditor has since made mandatory, so a reader who followed every step to the end hit a failure the page never mentioned. It now includes a working proof, shows the exact error you get without one, and adds a step for the command that runs it, which is the difference between a guard that is wired up and a guard anyone has shown still catches anything. Its summary line also described a completely different guard from the one it builds. (`/docs/tutorials/write-a-guard`) `[docs, fix]`+- **The live trade tape now says when live trades are unavailable**: The per-coin trade tape streams from PumpPortal, which gates per-token trade subscriptions behind a funded API key. When that subscription was refused, the connection stayed open and simply never delivered a trade, so the tape showed a lit 'live' indicator above rows that could never arrive, and there was no way for a viewer to tell that apart from a genuinely quiet coin. The stream now forwards the refusal to the browser and the tape reports it plainly, keeping the settled trades it already loaded. A malformed coin address on the stream is also rejected up front with a clear error instead of opening a connection that can never match anything. `[fix]`- **The LLM usage panel in your dashboard settings finally shows your real numbers**: Settings has a panel meant to show how much AI inference your agents have used this month. It always said "No usage yet", no matter how much you had used, because the endpoint behind it never sent the figures the panel was written to read. It does now: calls this month, tokens consumed, what those calls cost, and a per-model table showing which models did the work, busiest first. The same response also had two storage limits going out as text rather than numbers, which is the kind of difference that turns a size comparison into nonsense; both are numbers now. An API key with the profile scope can read all of it, so you can pull your own usage from a script, and the developer guide shows the exact shape. (`/dashboard/settings`) `[fix, improvement]`- **The persona builder stops reporting a model outage as if you had been signed out**: The two routes behind the persona builder (the one that turns your interview answers or a sample of your own writing into a structured persona, and the one that replies to you in that persona's voice) used to hand you whatever status code the model provider returned. If a server-side key expired, the provider answered 401 and so did we, which reads to a browser as an expired session on a request where nothing was wrong with your sign-in. Both now report a provider failure as exactly what it is: a server-side fault, with a plain message and no implication that you need to log back in. Separately, when the platform's daily model-spend ceiling is reached, the builder now says so and tells you when it resets, instead of asking you to retry something that could not have succeeded for the rest of the day. Both routes also now record their model usage against your account, so the spend they generate is visible and capped rather than untracked, and the daily extraction budget now holds across every server instance instead of being counted separately on each one. `[fix, improvement]`- **The persona extraction and preview endpoints are documented in the API reference**: Both routes have been live and usable for a while (turn a short interview or a sample of someone's writing into a structured voice profile, then audition that profile against a test message), but the only way to learn their request shape was to read the demo page's source. The API reference now covers them properly: every field with its limits, a real request and response for each, the exact meaning of every error status, and the per-user call budgets. The demo at /demos/persona-extract.html remains the fastest way to see them work. (`/docs/api-reference`) `[docs]`diff --git a/api/_lib/agent-manifest-publish.js b/api/_lib/agent-manifest-publish.jsindex fad85f0c2..80ffb2db2 100644--- a/api/_lib/agent-manifest-publish.js+++ b/api/_lib/agent-manifest-publish.js@@ -13,7 +13,7 @@import { sql } from './db.js';import { loadAttesterKeypair } from './attest-event.js';import { pinToIPFS, ipfsGatewayUrl, ipfsPinningConfigured, fetchFromGateways, IPFS_READ_GATEWAYS } from './ipfs-pin.js';-import { publicUrl as r2PublicUrl } from './r2.js';+import { publicUrl as r2PublicUrl, thumbnailUrl } from './r2.js';import {buildAgentManifest,signAgentManifest,@@ -86,7 +86,9 @@ export async function buildLiveAgentManifest(agentId) {name: row.name,description: row.description,tags: Array.isArray(row.tags) ? row.tags : [],- image: row.thumbnail_key ? r2PublicUrl(row.thumbnail_key) : '',+ // thumbnailUrl() drops a legacy origin-pointing `*_og.png` key, which the+ // published manifest would otherwise carry as a permanently dead image URL.+ image: thumbnailUrl(row.thumbnail_key) || '',systemPrompt: row.persona_prompt,toneTags: Array.isArray(row.persona_tone_tags) ? row.persona_tone_tags : [],traits,diff --git a/api/_lib/circulation.js b/api/_lib/circulation.jsindex 3def42f94..20c78c870 100644--- a/api/_lib/circulation.js+++ b/api/_lib/circulation.js@@ -32,7 +32,7 @@ import { solanaConnection } from './agent-pumpfun.js';import { createSession } from './auth.js';import { solUsdPrice } from './avatar-wallet.js';import { CHAIN_BY_ID } from './erc8004-chains.js';-import { publicUrl as r2PublicUrl } from './r2.js';+import { publicUrl as r2PublicUrl, thumbnailUrl } from './r2.js';import { claimSeedUsername, seedDisplayName } from './seed-username.js';import { pinToIPFS } from './ipfs-pin.js';import { confirmSkillPurchase, resolvePayoutAddress } from './purchase-confirm.js';@@ -1497,7 +1497,7 @@ async function buildAgentCard(agent, origin) {let glb = null;if (agent.avatarId) {const [av] = await sql`select storage_key, thumbnail_key from avatars where id = ${agent.avatarId} and deleted_at is null limit 1`;- if (av?.thumbnail_key) image = r2PublicUrl(av.thumbnail_key);+ image = thumbnailUrl(av?.thumbnail_key);if (av?.storage_key) glb = r2PublicUrl(av.storage_key);}return {diff --git a/api/_lib/onchain-deploy.js b/api/_lib/onchain-deploy.jsindex 7073e02b0..9f3039055 100644--- a/api/_lib/onchain-deploy.js+++ b/api/_lib/onchain-deploy.js@@ -24,7 +24,7 @@ import {} from '@metaplex-foundation/umi';import { sql } from './db.js';import { env } from './env.js';-import { putObject, publicUrl as r2PublicUrl } from './r2.js';+import { putObject, publicUrl as r2PublicUrl, thumbnailUrl } from './r2.js';import {buildAgentManifest,buildAgentOnchainAttributes,@@ -282,7 +282,10 @@ export async function deployAgentOnce({ umi, authoritySigner, collectionAddr, coconst custody = ownerAddress === authorityAddress;// 2. Media + manifest.- const image = agent.thumbnail_key ? r2PublicUrl(agent.thumbnail_key) : '';+ // thumbnailUrl(), not a bare publicUrl: this image is baked into the token's+ // on-chain metadata, so a legacy origin-pointing `*_og.png` key would mint a+ // permanently dead image URL. Dropping it leaves the field empty instead.+ const image = thumbnailUrl(agent.thumbnail_key) || '';const animationUrl = agent.storage_key ? r2PublicUrl(agent.storage_key) : '';const createdAt = new Date().toISOString();const manifest = buildAgentManifest({diff --git a/api/_lib/pump-agent-launches.js b/api/_lib/pump-agent-launches.jsindex 263044c2e..f5b85472e 100644--- a/api/_lib/pump-agent-launches.js+++ b/api/_lib/pump-agent-launches.js@@ -15,7 +15,7 @@import { sql } from './db.js';import { normalizeGatewayURL } from '../../src/ipfs.js';-import { publicUrl as r2PublicUrl } from './r2.js';+import { thumbnailUrl } from './r2.js';// Tiers ordered by descending conviction: prime > strong > lean > watch > avoid.export const TIER_RANK = { prime: 5, strong: 4, lean: 3, watch: 2, avoid: 1 };@@ -127,9 +127,7 @@ export async function queryAgentLaunches({name: r.agent_name,url: `/agents/${r.agent_id}`,avatar_thumbnail_url:- r.avatar_thumbnail_key && avatarPublic- ? r2PublicUrl(r.avatar_thumbnail_key)- : null,+ avatarPublic ? thumbnailUrl(r.avatar_thumbnail_key) : null,solana_address: r.agent_solana_address || null,solana_vanity_prefix: r.agent_solana_vanity_prefix || null,solana_vanity_suffix: r.agent_solana_vanity_suffix || null,@@ -178,7 +176,7 @@ export async function searchAgentLaunches({ q, network = 'mainnet', limit = 12 }id: r.agent_id,name: r.agent_name,url: `/agents/${r.agent_id}`,- avatar_thumbnail_url: r.avatar_thumbnail_key && avatarPublic ? r2PublicUrl(r.avatar_thumbnail_key) : null,+ avatar_thumbnail_url: avatarPublic ? thumbnailUrl(r.avatar_thumbnail_key) : null,}: null,};diff --git a/api/agents/_id/_sub.js b/api/agents/_id/_sub.jsindex 0089606c1..a495dc0e5 100644--- a/api/agents/_id/_sub.js+++ b/api/agents/_id/_sub.js@@ -14,7 +14,7 @@ import { recoverAgentKey } from '../../_lib/agent-wallet.js';import { readEmbedPolicy, validateEmbedPolicy } from '../../_lib/embed-policy.js';import { resolveAvatarUrl } from '../../_lib/avatars.js';import { buildAgentRegistrationMetadata } from '../../_lib/three-brand.js';-import { publicUrl as r2PublicUrl } from '../../_lib/r2.js';+import { thumbnailUrl } from '../../_lib/r2.js';// The one source of truth for the gesture slot vocabulary. Dependency-free, so// importing the runtime module here keeps the API and the browser in agreement// instead of restating the list.@@ -514,7 +514,10 @@ export const handleRegistration = wrap(async (req, res, id) => {modelUri = u?.url || '';} catch {}}- const image = row.thumbnail_key ? r2PublicUrl(row.thumbnail_key) : '';+ // This document is what the agent's on-chain URI resolves to, so the image has+ // to survive forever: thumbnailUrl() drops a legacy origin-pointing `*_og.png`+ // key rather than publishing a URL that answers 404.+ const image = thumbnailUrl(row.thumbnail_key) || '';const proto = req.headers['x-forwarded-proto'] || 'https';const host = req.headers['x-forwarded-host'] || req.headers.host || 'three.ws';diff --git a/api/native-launch/[action].js b/api/native-launch/[action].jsindex 4a6e3ba23..f2e09aeec 100644--- a/api/native-launch/[action].js+++ b/api/native-launch/[action].js@@ -21,7 +21,7 @@ import { Keypair } from '@solana/web3.js';import { sql } from '../_lib/db.js';import { getSessionUser } from '../_lib/auth.js';import { cors, json, method, readJson, wrap, error, rateLimited } from '../_lib/http.js';-import { publicUrl as r2PublicUrl } from '../_lib/r2.js';+import { thumbnailUrl } from '../_lib/r2.js';import { env } from '../_lib/env.js';import { limits, clientIp } from '../_lib/rate-limit.js';import { resolveOrCreateAgentForAvatar } from '../_lib/agent-identity.js';@@ -401,7 +401,7 @@ async function handleLaunches(req, res) {name: r.agent_name,url: `/agents/${r.agent_id}`,avatar_thumbnail_url:- r.avatar_thumbnail_key && avatarPublic ? r2PublicUrl(r.avatar_thumbnail_key) : null,+ avatarPublic ? thumbnailUrl(r.avatar_thumbnail_key) : null,}: null,};diff --git a/api/pump/[action].js b/api/pump/[action].jsindex 68aaee4a5..274e56035 100644--- a/api/pump/[action].js+++ b/api/pump/[action].js@@ -58,7 +58,7 @@ import { resolveSocialReward } from '../_lib/github-reward.js';import { submitProtected } from '../_lib/execution-engine.js';import { getSessionUser, authenticateBearer, extractBearer, isSameSiteOrigin } from '../_lib/auth.js';import { cors, json, method, readJson, wrap, error, rateLimited, respondError } from '../_lib/http.js';-import { putObject, publicUrl as r2PublicUrl } from '../_lib/r2.js';+import { putObject, publicUrl as r2PublicUrl, thumbnailUrl } from '../_lib/r2.js';import { env } from '../_lib/env.js';import { limits, clientIp } from '../_lib/rate-limit.js';import { resolveOrCreateAgentForAvatar as resolveLaunchAgentId } from '../_lib/agent-identity.js';@@ -1008,8 +1008,11 @@ async function handleBuildMetadata(req, res) {select thumbnail_key from avatarswhere id=${body.avatar_id} and owner_id=${uid} and deleted_at is null limit 1`;- if (av?.thumbnail_key) {- const thumbUrl = r2PublicUrl(av.thumbnail_key);+ // thumbnailUrl() returns null for a legacy origin-pointing `*_og.png` key,+ // whose object does not exist: fetching it would 404 and then the launch+ // would reference that dead URL from its permanent token metadata.+ const thumbUrl = thumbnailUrl(av?.thumbnail_key);+ if (thumbUrl) {// Fetch the stored thumbnail so it too lands on IPFS; if that fails,// fall back to referencing the R2 URL directly (still a valid image).try {@@ -1998,12 +2001,14 @@ async function handleAcceptPaymentPrep(req, res) {if (cors(req, res, { methods: 'POST,OPTIONS', credentials: true })) return;if (!method(req, res, ['POST'])) return;- // Allow both session users (browser) and bearer (MCP / agent) callers.- const session = await getSessionUser(req);- const bearer = session ? null : await authenticateBearer(extractBearer(req));- if (!session && !bearer)- return error(res, 401, 'unauthorized', 'sign in or supply a bearer token');- const userId = session?.id ?? bearer?.userId ?? null;+ // Session users (browser) and bearer (MCP / agent) callers both allowed.+ // Routed through resolveAuth() rather than a bare getSessionUser() so the+ // cookie path has to prove same-site intent: this POST writes a pending+ // invoice row under the caller's identity, which is exactly the cookie-borne+ // write the same-site rule exists for. Bearer callers stay exempt.+ const auth = await resolveAuth(req);+ if (!auth) return error(res, 401, 'unauthorized', 'sign in or supply a bearer token');+ const userId = auth.userId;const rl = await limits.authIp(clientIp(req));if (!rl.success) return rateLimited(res, rl);@@ -2101,9 +2106,11 @@ async function handleAcceptPaymentConfirm(req, res) {if (cors(req, res, { methods: 'POST,OPTIONS', credentials: true })) return;if (!method(req, res, ['POST'])) return;- const session = await getSessionUser(req);- const bearer = session ? null : await authenticateBearer(extractBearer(req));- if (!session && !bearer) return error(res, 401, 'unauthorized', 'auth required');+ // Same same-site rule as accept-payment-prep: this POST settles an invoice+ // and can flip a payment row to 'failed', so the cookie path must prove+ // intent. Bearer callers stay exempt.+ const auth = await resolveAuth(req);+ if (!auth) return error(res, 401, 'unauthorized', 'auth required');const rl = await limits.authIp(clientIp(req));if (!rl.success) return rateLimited(res, rl);@@ -2611,11 +2618,16 @@ async function handleByAgent(req, res) {from pump_agent_payments where mint_id=${row.id}`;+ // Every column here counts CONFIRMED runs only. `last_burn_at` used to take a+ // bare max(created_at), so it reported the last time the buyback cron merely+ // looked: an agent with 12k `skipped` rows and zero burns answered+ // {runs: 0, total_burned: '0', last_burn_at: <minutes ago>}, and the dashboard+ // and passport rendered "last burn" for a burn that never happened.const [burnRow] = await sql`selectcount(*) filter (where status='confirmed')::int as runs,coalesce(sum(burn_amount) filter (where status='confirmed'),0)::text as total_burned,- max(created_at) as last_burn_at+ max(created_at) filter (where status='confirmed') as last_burn_atfrom pump_buyback_runs where mint_id=${row.id}`;diff --git a/api/registry/resolve.js b/api/registry/resolve.jsindex 199f448e5..88ec7c9f0 100644--- a/api/registry/resolve.js+++ b/api/registry/resolve.js@@ -19,7 +19,7 @@ import { cors, json, method, wrap, error, rateLimited } from '../_lib/http.js';import { limits, clientIp } from '../_lib/rate-limit.js';import { isUuid } from '../_lib/validate.js';import { resolveAvatarUrl } from '../_lib/avatars.js';-import { publicUrl as r2PublicUrl } from '../_lib/r2.js';+import { thumbnailUrl } from '../_lib/r2.js';import { solanaConnection } from '../_lib/solana/connection.js';// Solana base58 pubkey — excludes 0/O/I/l, length 32–44. A UUID contains@@ -118,7 +118,22 @@ async function build({ name, description, agentId, meta, avatar, ownerFallback }}}- const imageUrl = avatar?.thumbnail_key ? r2PublicUrl(avatar.thumbnail_key) : null;+ // The thumbnail is a render of the avatar itself, so it is gated on exactly the+ // visibility that gates the GLB above: a private avatar yields identity+ // metadata and no imagery, the same gate api/characters.js, api/trending.js and+ // api/og/agent.js apply. thumbnailUrl() (never a bare publicUrl) is the one+ // resolver every read path uses, so a legacy origin-pointing `*_og.png` key is+ // dropped instead of published as a doomed <img> src; it reads S3_PUBLIC_DOMAIN,+ // which throws when unset, and an unconfigured var must degrade to no image+ // rather than 503 the whole identity lookup.+ let imageUrl = null;+ if (isPublicAvatar && avatar.thumbnail_key) {+ try {+ imageUrl = thumbnailUrl(avatar.thumbnail_key);+ } catch {+ imageUrl = null;+ }+ }let onchain = null;if (coords) {diff --git a/api/widgets/index.js b/api/widgets/index.jsindex 3b5ca5945..f98c82bf7 100644--- a/api/widgets/index.js+++ b/api/widgets/index.js@@ -16,7 +16,7 @@ import { getSessionUser, authenticateBearer, extractBearer, hasScope } from '../import { cors, json, method, readJson, wrap, error, rateLimited } from '../_lib/http.js';import { parse } from '../_lib/validate.js';import { limits, clientIp } from '../_lib/rate-limit.js';-import { publicUrl } from '../_lib/r2.js';+import { publicUrl, thumbnailUrl } from '../_lib/r2.js';import { WIDGET_TYPES } from '../_lib/widget-types.js';const createBody = z.object({@@ -107,15 +107,16 @@ export function decorate(row) {updated_at: row.updated_at,};if (row.avatar_name !== undefined) {+ // The thumbnail is a render of the avatar, so it carries the avatar's+ // visibility exactly like the GLB does: a private avatar exposes neither.+ const avatarPublic =+ row.avatar_visibility === 'public' || row.avatar_visibility === 'unlisted';out.avatar = row.avatar_id? {id: row.avatar_id,name: row.avatar_name,- thumbnail_url: safePublicUrl(row.avatar_thumbnail_key),- model_url:- row.avatar_visibility === 'public' || row.avatar_visibility === 'unlisted'- ? safePublicUrl(row.avatar_storage_key)- : null,+ thumbnail_url: avatarPublic ? safeThumbnailUrl(row.avatar_thumbnail_key) : null,+ model_url: avatarPublic ? safePublicUrl(row.avatar_storage_key) : null,visibility: row.avatar_visibility,}: null;@@ -131,3 +132,15 @@ function safePublicUrl(key) {return null;}}++// thumbnailUrl() additionally drops a legacy origin-pointing `*_og.png` key,+// which resolves to an object that does not exist. Both helpers swallow the+// throw from an unconfigured S3_PUBLIC_DOMAIN so a widget read still returns.+function safeThumbnailUrl(key) {+ if (!key) return null;+ try {+ return thumbnailUrl(key);+ } catch {+ return null;+ }+}diff --git a/data/changelog.json b/data/changelog.jsonindex 6865b69aa..23c4dd3ee 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,14 @@{"$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-15",+ "title": "Portfolio token pages price Base and Arbitrum holdings correctly",+ "summary": "Opening a token from your portfolio asked Ethereum for the price no matter which chain the token was actually on. Almost every agent wallet runs on Base, so the most common holdings came back with no price, no chart and a shortened contract address instead of a ticker, even though the balance was right there in the list. Each token is now priced on its own chain, labelled with its real symbol and decimals, and native gas tokens use the right coin per chain (POL on Polygon, BNB on BNB Chain, AVAX on Avalanche) instead of always quoting ETH. Chains nobody prices, such as testnets, now say so plainly rather than showing another chain's number.",+ "tags": [+ "fix"+ ]+ },{"date": "2026-08-15","title": "Push notification sign-up now only accepts a real push service address",@@ -9,6 +17,32 @@"security"]},+ {+ "date": "2026-08-15",+ "title": "Agent coin pages stop reporting a burn that never happened",+ "summary": "An agent coin page showed a \"last burn\" time taken from the last moment the buyback job ran at all, including every run where it looked and correctly decided there was nothing to burn. A coin with thousands of those skipped runs and no actual burns therefore read as having burned minutes ago while the burn count and burned total beside it both sat at zero. The burn time now counts confirmed burns only, so it stays blank until a real burn lands and always agrees with the count next to it. Separately, the three pump endpoints that manage a coin's autopilot policy and its invoices now require a request to originate from three.ws before it can act on a signed-in browser session, which is the rule the rest of the pump endpoints already followed. Agent keys and workers are unaffected.",+ "tags": [+ "fix",+ "security"+ ]+ },+ {+ "date": "2026-08-15",+ "title": "Private avatars no longer show their picture in registry lookups",+ "summary": "The registry lookup that turns an agent id, avatar id, slug, or Solana mint into one record already refused to hand out the 3D model of a private avatar, but it still returned the rendered preview image of that same avatar, so anyone holding the id could see what a private creation looked like. The preview is now gated on exactly the same visibility as the model: a private avatar returns its name and identity and no imagery at all. The embeddable widget read did the same thing with its avatar thumbnail and got the same gate. Separately, every read path that turns a stored thumbnail into a URL now goes through the one resolver that drops the old broken image keys, so agent manifests, token metadata, and launch feeds stop publishing image links that answer 404.",+ "tags": [+ "security",+ "fix"+ ]+ },+ {+ "date": "2026-08-15",+ "title": "The live trade tape now says when live trades are unavailable",+ "summary": "The per-coin trade tape streams from PumpPortal, which gates per-token trade subscriptions behind a funded API key. When that subscription was refused, the connection stayed open and simply never delivered a trade, so the tape showed a lit 'live' indicator above rows that could never arrive, and there was no way for a viewer to tell that apart from a genuinely quiet coin. The stream now forwards the refusal to the browser and the tape reports it plainly, keeping the settled trades it already loaded. A malformed coin address on the stream is also rejected up front with a clear error instead of opening a connection that can never match anything.",+ "tags": [+ "fix"+ ]+ },{"date": "2026-08-15","title": "Daily usage caps stopped resetting themselves partway through the day",diff --git a/prompts/swarm-100/api-registry-01.md b/prompts/swarm-100/api-registry-01.mddeleted file mode 100644index 19662b39f..000000000--- a/prompts/swarm-100/api-registry-01.md+++ /dev/null@@ -1,101 +0,0 @@-# API audit: api/registry batch 01 (1 files)--How to run: paste this file's repo path into a fresh Claude Code chat in this-repository and say "run this work order". This file is fully self-contained:-it depends on no other prompt file anywhere. If neighboring files in-prompts/swarm-100/ are gone, that work is done; if present, ignore them.-Every claim below rots; step 0 re-measures, and what you measure wins.--## Operating clause (binding)--- Read CLAUDE.md first. Its rules override everything, including this file.-- Finish 100% in this session. Never end the turn with a question, an option- list, or an unexecuted plan. A judgment call goes in one line of the final- report; it never becomes a question that halts work.-- The only permitted stops are the CLAUDE.md stop-and-ask gates: spending real- funds or any irreversible on-chain write, git push or a production deploy,- committing content that references a crypto project other than $THREE, and- destroying unrecoverable data.-- No mocks, no fake data, no placeholder stubs, no unfinished-work markers, no- commented-out code. Real APIs and real integrations only.-- The em-dash and en-dash characters are banned in everything you write.-- Concurrent agents share this worktree: stage explicit paths only (never a- bare add-everything), and commit finished work promptly.-- Before committing, run: npm run check:rules -- --paths <files you touched>.- It must exit 0.--## Step 0: re-derive the current state--1. Confirm each file below still exists; deleted ones are done, skip them.-2. For each, decide routability: grep its path in vercel.json and read how- server/index.mjs maps filesystem handlers. Routed files get an endpoint- audit; internal modules get a code and test audit.-3. Start a local server for endpoint checks: node server/index.mjs with .env- loaded, on a free PORT if 3000 is busy.--## Task: audit these api files, then fix everything found--Files in this batch:--- api/registry/resolve.js--For every routed handler:--1. Exercise it with curl against the local server: the success path returns- real data with the correct status; malformed input returns a 4xx JSON- error, never a stack trace or an HTML error page; auth is enforced where- the code intends it; CORS matches neighboring handlers.-2. Hard-rule scan: no mock fallbacks, no fake-data arrays, no stubbed- responses, no unfinished markers. Errors are handled at the boundary and- internal code trusts itself.-3. Do not spend funds or sign anything on-chain while probing. Payment and- trading handlers get their validation and error paths exercised, never a- live settlement.--For every internal (non-routed) module:--4. Something must import it; if nothing does, delete it as dead code (verify- with a repo-wide grep first).-5. Its main path and one failure path must be covered in tests/; add the- missing test if not.--## Definition of done--- [ ] Every listed file has recorded evidence: a curl transcript for routed- handlers, a passing test or a deletion for internal modules.-- [ ] Zero hard-rule violations remain in these files.-- [ ] vitest run passes; npm run check:rules -- --paths <touched files>- exits 0.--## Never blocked--| Blocker | Resolution (act, do not ask) |-|---|---|-| Missing env var or credential | Check .env and .env.local, then the Cloud Run service env, then Secret Manager (the CLAUDE.md self-unblock playbook has the exact commands). If it truly exists nowhere, wire the code fully behind the env var, prove the wiring with a dry run, and name the single missing var in the report. |-| gcloud not on PATH | Run: export PATH="$HOME/google-cloud-sdk/bin:$PATH" |-| Dev server port 3000 busy | Another agent may be serving this repo; probe it and reuse if so. Otherwise start your own on a free port: npx vite --port 3101 |-| Playwright browser missing | npx playwright install chromium |-| A surface needs a signed-in user | Register a fresh account through the real /register flow against the real API and use it. Never mock the session. |-| A defect sits in code you did not touch | Fix it if it blocks a Definition of done line (root cause it, never mask it). Otherwise note it in the report and continue. |-| An unrelated test is red | Same rule. Never pipe npm test through tail; it masks exit codes. |--## Close out (required)--1. Verify every Definition of done line with the actual command output in- front of you. Never claim a line you did not verify.-2. Commit with explicit paths and a subject that describes the diff (house- style: type(scope): what changed and why a reader cares).-3. Delete this prompt file in that same commit:-- git rm prompts/swarm-100/api-registry-01.md-- The shrinking directory is this campaign's only progress ledger; there is- no progress log to update.-4. Final report: what step 0 measured, what changed (file list), evidence per- Definition of done line, and any one-line judgment calls. No trailing- questions, no unexecuted plans.--If a line genuinely cannot pass inside this session (an external party must-respond, or an owner-gated action is the final step), finish everything else,-leave this file in place, and state exactly which line remains and who owns-it. Never delete this file on a partial.diff --git a/public/changelog.json b/public/changelog.jsonindex b032f70f2..9cb2620f8 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-08-15T16:20:54.817Z",+ "generated_at": "2026-08-15T16:35:13.884Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -124,6 +124,17 @@"sdk"]},+ {+ "date": "2026-08-15",+ "type": "update",+ "title": "Agent coin pages stop reporting a burn that never happened",+ "summary": "An agent coin page showed a \"last burn\" time taken from the last moment the buyback job ran at all, including every run where it looked and correctly decided there was nothing to burn. A coin with thousands of those skipped runs and no actual burns therefore read as having burned minutes ago while the burn count and burned total beside it both sat at zero. The burn time now counts confirmed burns only, so it stays blank until a real burn lands and always agrees with the count next to it. Separately, the three pump endpoints that manage a coin's autopilot policy and its invoices now require a request to originate from three.ws before it can act on a signed-in browser session, which is the rule the rest of the pump endpoints already followed. Agent keys and workers are unaffected.",+ "link": null,+ "tags": [+ "fix",+ "security"+ ]+ },{"date": "2026-08-15","type": "update",@@ -274,6 +285,37 @@"security"]},+ {+ "date": "2026-08-15",+ "type": "update",+ "title": "Portfolio token pages price Base and Arbitrum holdings correctly",+ "summary": "Opening a token from your portfolio asked Ethereum for the price no matter which chain the token was actually on. Almost every agent wallet runs on Base, so the most common holdings came back with no price, no chart and a shortened contract address instead of a ticker, even though the balance was right there in the list. Each token is now priced on its own chain, labelled with its real symbol and decimals, and native gas tokens use the right coin per chain (POL on Polygon, BNB on BNB Chain, AVAX on Avalanche) instead of always quoting ETH. Chains nobody prices, such as testnets, now say so plainly rather than showing another chain's number.",+ "link": null,+ "tags": [+ "fix"+ ]+ },+ {+ "date": "2026-08-15",+ "type": "update",+ "title": "Private avatars no longer show their picture in registry lookups",+ "summary": "The registry lookup that turns an agent id, avatar id, slug, or Solana mint into one record already refused to hand out the 3D model of a private avatar, but it still returned the rendered preview image of that same avatar, so anyone holding the id could see what a private creation looked like. The preview is now gated on exactly the same visibility as the model: a private avatar returns its name and identity and no imagery at all. The embeddable widget read did the same thing with its avatar thumbnail and got the same gate. Separately, every read path that turns a stored thumbnail into a URL now goes through the one resolver that drops the old broken image keys, so agent manifests, token metadata, and launch feeds stop publishing image links that answer 404.",+ "link": null,+ "tags": [+ "security",+ "fix"+ ]+ },+ {+ "date": "2026-08-15",+ "type": "update",+ "title": "Push notification sign-up now only accepts a real push service address",+ "summary": "Turning on browser notifications hands the platform the address your browser wants alerts delivered to, and that address is one the platform later calls from its own servers. It was stored exactly as given, so a crafted sign-up could point it at an internal address instead of a push service and use the delivery job as a way to knock on doors inside our own network. Sign-up now checks the address before storing it: it has to be an ordinary secure web address on a genuinely public host, or it is refused with a clear reason. If the check cannot finish because name lookup is briefly down, the browser is told to try again rather than being turned away for good. Delivery re-checks every stored address at send time too, so anything registered before this landed can never be dialed, and an address that could never be legal is dropped from the list the way an expired one already was.",+ "link": null,+ "tags": [+ "security"+ ]+ },{"date": "2026-08-15","type": "update",@@ -494,6 +536,16 @@"fix"]},+ {+ "date": "2026-08-15",+ "type": "update",+ "title": "The live trade tape now says when live trades are unavailable",+ "summary": "The per-coin trade tape streams from PumpPortal, which gates per-token trade subscriptions behind a funded API key. When that subscription was refused, the connection stayed open and simply never delivered a trade, so the tape showed a lit 'live' indicator above rows that could never arrive, and there was no way for a viewer to tell that apart from a genuinely quiet coin. The stream now forwards the refusal to the browser and the tape reports it plainly, keeping the settled trades it already loaded. A malformed coin address on the stream is also rejected up front with a clear error instead of opening a connection that can never match anything.",+ "link": null,+ "tags": [+ "fix"+ ]+ },{"date": "2026-08-15","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex 2aa5d9941..69bed59b2 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -94,6 +94,14 @@<category>fix</category><description>The avatar-agent MCP server resolves .eth and .sol names to wallet addresses. Its .sol side went through a hosted name-lookup service that has since been retired: every request came back as "not found", which reads exactly like an unregistered domain, so a working name and a nonexistent one were indistinguishable. Solana names are now read straight from the chain, from the same name-service accounts the three.ws backend already reads, so the lookup depends on nothing but a Solana RPC. Two things were fixed alongside it. The per-lookup time budget was under five seconds, which a cold Ethereum lookup routinely exceeds, so real names were being reported as timeouts; it is now fifteen seconds and adjustable. And a lookup that genuinely fails now says why instead of quietly reporting "not found". Separately, the avatar manifest schema names https://three.ws/schema/avatar.v1.json as its own identifier, but nothing was served there, so any validator that followed the identifier got a 404. The schema is now published at that address, with a test that keeps the served copy identical to the one shipped in the package.</description></item>+ <item>+ <title>Agent coin pages stop reporting a burn that never happened</title>+ <link>https://three.ws/changelog</link>+ <guid isPermaLink="false">2026-08-15:Agent coin pages stop reporting a burn that never happened</guid>+ <pubDate>Sat, 15 Aug 2026 12:00:00 GMT</pubDate>+ <category>fix</category>+ <description>An agent coin page showed a "last burn" time taken from the last moment the buyback job ran at all, including every run where it looked and correctly decided there was nothing to burn. A coin with thousands of those skipped runs and no actual burns therefore read as having burned minutes ago while the burn count and burned total beside it both sat at zero. The burn time now counts confirmed burns only, so it stays blank until a real burn lands and always agrees with the count next to it. Separately, the three pump endpoints that manage a coin's autopilot policy and its invoices now require a request to originate from three.ws before it can act on a signed-in browser session, which is the rule the rest of the pump endpoints already followed. Agent keys and workers are unaffected.</description>+ </item><item><title>Agent Screen is usable on a phone, and reads correctly to a screen reader</title><link>https://three.ws/agent-screen</link>@@ -206,6 +214,30 @@<category>fix</category><description>Paying for a plan creates a quote, you send the funds, then the server checks the chain before it upgrades you. Three things in that path were wrong. The checkout side has always refused test-network quotes in production, because test-network dollars are free from a faucet, but the confirm side still let a caller name the test network itself, and it is the confirm side that decides which chain it looks at and which dollar it accepts. Both ends now read the same setting, so a production upgrade can only ever be settled by real funds on mainnet. Second, an Ethereum-side payment has to wait twelve blocks before it counts, which meant funds sent near the end of a session could land on-chain and then be refused for arriving late, with the money already gone; that lane now honors the same one-hour grace window the Solana lane has, so an on-chain payment is always claimable. Third, confirming an Ethereum payment could reach a Solana quote and mark it expired, and asking to buy a skill from a malformed agent id answered a generic server error instead of telling you what was wrong with the request.</description></item>+ <item>+ <title>Portfolio token pages price Base and Arbitrum holdings correctly</title>+ <link>https://three.ws/changelog</link>+ <guid isPermaLink="false">2026-08-15:Portfolio token pages price Base and Arbitrum holdings correctly</guid>+ <pubDate>Sat, 15 Aug 2026 12:00:00 GMT</pubDate>+ <category>fix</category>+ <description>Opening a token from your portfolio asked Ethereum for the price no matter which chain the token was actually on. Almost every agent wallet runs on Base, so the most common holdings came back with no price, no chart and a shortened contract address instead of a ticker, even though the balance was right there in the list. Each token is now priced on its own chain, labelled with its real symbol and decimals, and native gas tokens use the right coin per chain (POL on Polygon, BNB on BNB Chain, AVAX on Avalanche) instead of always quoting ETH. Chains nobody prices, such as testnets, now say so plainly rather than showing another chain's number.</description>+ </item>+ <item>+ <title>Private avatars no longer show their picture in registry lookups</title>+ <link>https://three.ws/changelog</link>+ <guid isPermaLink="false">2026-08-15:Private avatars no longer show their picture in registry lookups</guid>+ <pubDate>Sat, 15 Aug 2026 12:00:00 GMT</pubDate>+ <category>security</category>+ <description>The registry lookup that turns an agent id, avatar id, slug, or Solana mint into one record already refused to hand out the 3D model of a private avatar, but it still returned the rendered preview image of that same avatar, so anyone holding the id could see what a private creation looked like. The preview is now gated on exactly the same visibility as the model: a private avatar returns its name and identity and no imagery at all. The embeddable widget read did the same thing with its avatar thumbnail and got the same gate. Separately, every read path that turns a stored thumbnail into a URL now goes through the one resolver that drops the old broken image keys, so agent manifests, token metadata, and launch feeds stop publishing image links that answer 404.</description>+ </item>+ <item>+ <title>Push notification sign-up now only accepts a real push service address</title>+ <link>https://three.ws/changelog</link>+ <guid isPermaLink="false">2026-08-15:Push notification sign-up now only accepts a real push service address</guid>+ <pubDate>Sat, 15 Aug 2026 12:00:00 GMT</pubDate>+ <category>security</category>+ <description>Turning on browser notifications hands the platform the address your browser wants alerts delivered to, and that address is one the platform later calls from its own servers. It was stored exactly as given, so a crafted sign-up could point it at an internal address instead of a push service and use the delivery job as a way to knock on doors inside our own network. Sign-up now checks the address before storing it: it has to be an ordinary secure web address on a genuinely public host, or it is refused with a clear reason. If the check cannot finish because name lookup is briefly down, the browser is told to try again rather than being turned away for good. Delivery re-checks every stored address at send time too, so anything registered before this landed can never be dialed, and an address that could never be legal is dropped from the list the way an expired one already was.</description>+ </item><item><title>Rotating or revoking an x402 API key now requires a proof the request came from you</title><link>https://three.ws/billing/keys</link>@@ -366,6 +398,14 @@<category>docs</category><description>Two tutorials had drifted away from the code they document, and following either one exactly produced a bad outcome rather than a confusing one. The gesture tutorial's API example padded its request body with an empty clip array, and told readers that field was required; it has not been required for a while, and an empty array is a real value, so anyone who copied that snippet to change one gesture slot silently erased every custom clip on their agent. The endpoint's actual rule is now stated: every field is optional, present replaces it, absent leaves it alone. That page also listed four gestures on the /walk quick keys that are not on them, so pressing 1 through 8 never produced what it described; the eight keys are now named in order, with the wheel and the code call given for the four that have no key. The guard tutorial's registry entry left out the proof block, which the registry auditor has since made mandatory, so a reader who followed every step to the end hit a failure the page never mentioned. It now includes a working proof, shows the exact error you get without one, and adds a step for the command that runs it, which is the difference between a guard that is wired up and a guard anyone has shown still catches anything. Its summary line also described a completely different guard from the one it builds.</description></item>+ <item>+ <title>The live trade tape now says when live trades are unavailable</title>+ <link>https://three.ws/changelog</link>+ <guid isPermaLink="false">2026-08-15:The live trade tape now says when live trades are unavailable</guid>+ <pubDate>Sat, 15 Aug 2026 12:00:00 GMT</pubDate>+ <category>fix</category>+ <description>The per-coin trade tape streams from PumpPortal, which gates per-token trade subscriptions behind a funded API key. When that subscription was refused, the connection stayed open and simply never delivered a trade, so the tape showed a lit 'live' indicator above rows that could never arrive, and there was no way for a viewer to tell that apart from a genuinely quiet coin. The stream now forwards the refusal to the browser and the tape reports it plainly, keeping the settled trades it already loaded. A malformed coin address on the stream is also rejected up front with a clear error instead of opening a connection that can never match anything.</description>+ </item><item><title>The LLM usage panel in your dashboard settings finally shows your real numbers</title><link>https://three.ws/dashboard/settings</link>diff --git a/public/features.json b/public/features.jsonindex 598eb4204..cd78fc72a 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-08-15T15:52:49.588Z",+ "generated_at": "2026-08-15T16:35:13.711Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",diff --git a/tests/registry-resolve-endpoint.test.js b/tests/registry-resolve-endpoint.test.jsnew file mode 100644index 000000000..96ae96da8--- /dev/null+++ b/tests/registry-resolve-endpoint.test.js@@ -0,0 +1,177 @@+/**+ * api/registry/resolve.js, the public agent-registry lookup behind+ * public/lookup.html. One `q` resolves an agent UUID, an avatar UUID, an avatar+ * slug, or a Solana Core mint into a single record.+ *+ * The invariant under test is the visibility gate. The handler's own contract is+ * that a private avatar never leaks its body, and the thumbnail is a render of+ * that same body, so it is gated identically. Before this suite existed, a+ * private avatar resolved by UUID returned a live CDN URL to its rendered PNG.+ *+ * `api/_lib/db.js` and `api/_lib/rate-limit.js` are mocked so every branch runs+ * without a Neon branch or an RPC round trip.+ */++import { describe, it, expect, vi, beforeEach } from 'vitest';++process.env.S3_PUBLIC_DOMAIN ||= 'https://cdn.test';++const sqlMock = vi.fn();+vi.mock('../api/_lib/db.js', () => ({+ sql: (...a) => sqlMock(...a),+ isDbUnavailableError: () => false,+ isDbCapacityError: () => false,+ isStoragePressured: async () => ({ pressured: false }),+}));++const rl = { ok: true };+vi.mock('../api/_lib/rate-limit.js', () => ({+ limits: {+ publicIp: vi.fn(async () => ({+ success: rl.ok,+ limit: 120,+ remaining: 0,+ reset: Date.now() + 60_000,+ })),+ },+ clientIp: () => '127.0.0.1',+}));++const { default: handler } = await import('../api/registry/resolve.js');++const AVATAR_ID = '11111111-2222-4333-8444-555555555555';++function makeReq(q, { method = 'GET' } = {}) {+ return {+ method,+ url: `/api/registry/resolve?q=${encodeURIComponent(q ?? '')}`,+ query: q === undefined ? {} : { q },+ headers: { host: 'three.ws' },+ socket: { remoteAddress: '127.0.0.1' },+ };+}++function makeRes() {+ const r = { statusCode: 200, _h: {}, _b: null, writableEnded: false, headersSent: false };+ r.setHeader = (k, v) => { r._h[k.toLowerCase()] = v; };+ r.getHeader = (k) => r._h[k.toLowerCase()];+ r.writeHead = (c, h) => { r.statusCode = c; Object.assign(r._h, h || {}); return r; };+ r.end = (b) => { r._b = b ?? r._b; r.writableEnded = true; r.headersSent = true; };+ r.json = () => (r._b ? JSON.parse(r._b) : undefined);+ return r;+}++async function call(q, opts) {+ const res = makeRes();+ await handler(makeReq(q, opts), res);+ return res;+}++// One avatar row as resolveAvatarById() selects it: no linked agent, so the+// record's identity fields stay null and only the avatar gates the media.+function avatarRow(visibility) {+ return {+ id: AVATAR_ID,+ name: 'Selfie',+ description: 'a private render',+ slug: 'selfie-3s2x1z',+ storage_key: `u/owner/${AVATAR_ID}.glb`,+ visibility,+ content_type: 'model/gltf-binary',+ thumbnail_key: `thumb/${AVATAR_ID}.png`,+ agent_id: null,+ agent_name: null,+ agent_description: null,+ agent_wallet: null,+ agent_meta: null,+ };+}++beforeEach(() => {+ rl.ok = true;+ sqlMock.mockReset().mockResolvedValue([]);+});++describe('GET /api/registry/resolve validation', () => {+ it('rejects a missing q with a 400 JSON envelope, never a stack trace', async () => {+ const res = await call(undefined);+ expect(res.statusCode).toBe(400);+ expect(res.json()).toMatchObject({ error: 'validation_error' });+ expect(res._b).not.toMatch(/at \w+ \(/);+ });++ it('rejects an over-long q rather than querying with it', async () => {+ const res = await call('a'.repeat(65));+ expect(res.statusCode).toBe(400);+ expect(res.json().error).toBe('validation_error');+ expect(sqlMock).not.toHaveBeenCalled();+ });++ it('answers an unknown input with a 200 not_found record, never a 404 or a 500', async () => {+ const res = await call('no-such-slug');+ expect(res.statusCode).toBe(200);+ expect(res.json()).toEqual({+ name: null,+ description: '',+ agentId: null,+ genesisRank: null,+ modelUrl: null,+ imageUrl: null,+ onchain: null,+ state: 'not_found',+ });+ });++ it('refuses a non-GET method', async () => {+ const res = await call('x', { method: 'POST' });+ expect(res.statusCode).toBe(405);+ });++ it('surfaces a rate-limit rejection as 429', async () => {+ rl.ok = false;+ const res = await call('anything');+ expect(res.statusCode).toBe(429);+ });+});++describe('avatar visibility gates the media', () => {+ it('publishes both the model and the thumbnail for a public avatar', async () => {+ // resolveAgentById (empty), resolveAvatarById (hit), genesisRankFor (skipped:+ // agentId is null), so a single row queue covers the lookup.+ sqlMock.mockResolvedValueOnce([]).mockResolvedValueOnce([avatarRow('public')]);+ const res = await call(AVATAR_ID);+ const body = res.json();+ expect(res.statusCode).toBe(200);+ expect(body.state).toBe('public');+ expect(body.modelUrl).toBe(`https://cdn.test/u/owner/${AVATAR_ID}.glb`);+ expect(body.imageUrl).toBe(`https://cdn.test/thumb/${AVATAR_ID}.png`);+ });++ it('publishes both for an unlisted avatar', async () => {+ sqlMock.mockResolvedValueOnce([]).mockResolvedValueOnce([avatarRow('unlisted')]);+ const body = (await call(AVATAR_ID)).json();+ expect(body.modelUrl).toBe(`https://cdn.test/u/owner/${AVATAR_ID}.glb`);+ expect(body.imageUrl).toBe(`https://cdn.test/thumb/${AVATAR_ID}.png`);+ });++ it('leaks neither the model nor the thumbnail of a private avatar', async () => {+ sqlMock.mockResolvedValueOnce([]).mockResolvedValueOnce([avatarRow('private')]);+ const res = await call(AVATAR_ID);+ const body = res.json();+ expect(res.statusCode).toBe(200);+ expect(body.state).toBe('private');+ expect(body.modelUrl).toBeNull();+ // The thumbnail is a render of the same private body: gated identically.+ expect(body.imageUrl).toBeNull();+ expect(res._b).not.toContain('thumb/');+ });++ it('drops a legacy origin-pointing *_og.png thumbnail key instead of publishing a 404', async () => {+ const row = avatarRow('public');+ row.thumbnail_key = 'https://three.ws/avatars/selfie_og.png';+ sqlMock.mockResolvedValueOnce([]).mockResolvedValueOnce([row]);+ const body = (await call(AVATAR_ID)).json();+ expect(body.imageUrl).toBeNull();+ expect(body.modelUrl).toBe(`https://cdn.test/u/owner/${AVATAR_ID}.glb`);+ });+});diff --git a/tests/thumbnail-url-guard.test.js b/tests/thumbnail-url-guard.test.jsindex e50be4d56..4993b962d 100644--- a/tests/thumbnail-url-guard.test.js+++ b/tests/thumbnail-url-guard.test.js@@ -63,8 +63,11 @@ describe('no read path bypasses thumbnailUrl()', () => {'api/avatars/_actions.js',]);- // Matches publicUrl(<anything containing thumb/Thumb>) — the bug shape.- const BARE = /publicUrl\(\s*[A-Za-z_$][\w$?.]*(?:thumb|Thumb)[\w$]*\s*\)/;+ // Matches publicUrl(<anything containing thumb/Thumb>), the bug shape. The+ // leading `[\w$]*` covers an aliased import (`publicUrl as r2PublicUrl`), which+ // an anchored `publicUrl\(` misses: api/registry/resolve.js imported it exactly+ // that way and published a thumbnail key past this guard for months.+ const BARE = /[\w$]*[Pp]ublicUrl\(\s*[A-Za-z_$][\w$?.]*(?:thumb|Thumb)[\w$]*\s*\)/;function walk(dir, out = []) {for (const name of readdirSync(dir)) {