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
improvement(markets): expand news sources and polish markets/coin pages
nirholasd07a277795f9
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex de618fa6f..99a5b1e3c 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -6,12 +6,13 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr## 2026-07-10-- **Crypto News** (`/markets/news`) — Live crypto news aggregated natively from 38 publisher feeds — filter by category (Bitcoin, DeFi, regulation, and more), search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.+- **Crypto News** (`/markets/news`) — Live crypto news aggregated natively from 192 publisher feeds in 18 languages — filter by category (Bitcoin, DeFi, security, regulation, and more), pick a language, search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.- **Crypto News Archive** (`/markets/archive`) — The largest open crypto-news archive: 660,000+ articles from September 2017 to today, refreshed hourly from the live feed, in English and Chinese — searchable by keyword, ticker, source, sentiment, date, and language.- **Crypto News Digest** (`/markets/digest`) — The day's crypto news grouped into the handful of stories that actually matter — each with a plain-language summary, a market stance, the tickers involved, and every outlet that covered it. Clustered from 38 live publisher feeds.- **Crypto News Reader** (`/markets/news/article`) — Rich article reader for crypto news — full story extraction with AI summary, key points, sentiment, detected tickers, and related coverage from across the industry.- **Docs · What Agents Can Do — The Complete Dossier** (`/docs/agent-abilities`) — The complete map of every agent ability, researched from the shipped code: body, motion, mind, voice, identity, skills, screens, economy, the 23-ability wallet, worlds, and the developer platform — 15 chapters plus a per-ability deep dive for the entire Agent Wallet.-- **Markets Hub** (`/markets`) — The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 38 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.+- **Markets Hub** (`/markets`) — The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 192 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.+- **A leftover test file stops loading on every visit** — A one-off test page and the 1.5 MB script it loaded were committed by mistake and had been sitting in the public folder ever since — downloadable by anyone and adding dead weight to the site for no reason. Both are gone, and the project now refuses to accept that kind of leftover again. `[fix, infra]`- **Agents registered on-chain can no longer put a slur on three.ws** — The agent directory lists every agent registered on the public blockchains we index — over 126,000 of them — and it took each one's name, description and picture straight from whatever its owner published on-chain. Whether an agent appeared on our pages was decided by a flag the agent itself set, and nothing ever checked what the name said. One agent's name was a racial slur, and it was being displayed on the marketplace. Names carrying a hate slur are now withheld from every listing, search result and feed, and the agent that was showing has been taken down. The check is deliberately narrow: it looks for slurs, not swearing, and it is careful never to hide a legitimate agent whose name merely contains an ordinary word or a wallet address. (`/marketplace`) `[security, fix]`- **Auto-rigging works again — and the Agent Identity Studio demos are real** — Rigging any generated model into an animation-ready character had been failing since the cloud migration: the rig request was sent to a service that doesn't do rigging, and the GPU rigger itself crashed on a graphics call our cloud GPUs don't support. Both are fixed — rig requests now reach the real UniRig worker, which renders its voxel pass in software instead. Proof: all four Agent Identity Studio demo characters (LedgerLynx, MuseWeaver, Momentum-9, and the three.ws studio's own) were generated, rigged with full skeletons, and photographed in posed renders through the live pipeline — see them on the showcase. (`/agent-identities`) `[fix, feature]`- **Broken links across the site now go where they should** — Nine links pointed at pages that don't exist and quietly landed people on a Not Found screen. The Activity page's "Leaderboard" and "Proven wins" links now open the right section of the Oracle, the dashboard's "Upload .glb" and "Create an agent" buttons reach the real create flow, a token's "3D Agent view" opens the live 3D coin scene, and the Restyle page's MCP tool reference opens the MCP docs. (`/activity`) `[fix]`@@ -20,6 +21,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Coin buybacks and vault balances work again** — A wiring mistake in how the platform opened its connection to Solana meant every automated buyback silently failed — for nearly a month, roughly 40,000 times a day — and the vault-balance view for any agent coin returned an error instead of its numbers. Both are fixed. Buybacks now run against the chain as intended, agent coin pages show real payment, buyback and withdraw vault balances again, and the failed-run log that quietly grew to a quarter-million rows is now pruned automatically while every on-chain burn record is kept. (`/launches`) `[fix]`- **Coin price charts stop dropping out, and the walk demos load fast on phones** — The price chart on coin and trading pages intermittently showed "unavailable" because every refresh asked the upstream price service for a slightly different time window, so nothing could be cached and the free service rate-limited us. Refreshes now share a window, the busiest lookup is remembered, and if both price sources go quiet for a moment the chart keeps showing the most recent real candles with a "delayed" marker instead of an error. A coin that has no liquidity pool now says exactly that. Separately, the walk landing page used to start all eight interactive demos at once — on a phone that exhausted the browser's 3D limit and stalled the page for over twenty seconds. Each demo now starts as you scroll to it. (`/walk`) `[fix, improvement]`- **Crypto news is live: a real-time feed from 38 publishers, a rich article reader, and a 662,047-article archive back to 2017** — Markets grew a full news wing. /markets/news streams live headlines aggregated directly from 38 publisher feeds — filter by category (Bitcoin, DeFi, regulation, and more), search, and open any story in a reader that extracts the full text with a summary, key points, sentiment, and related coverage. Behind it sits the largest open crypto-news archive anywhere: 662,047 articles from September 2017 to today in English and Chinese, searchable by keyword, ticker, source, sentiment, date, and language at /markets/archive. A new /markets hub ties the whole suite together — live global stats, the top 100 coins, breaking news, and every market tool as its own card. (`/markets`) `[feature]`+- **Crypto news now aggregates 192 publisher feeds, in 18 languages** — The news feed grew from 38 sources to 192 — every major newsroom plus research desks, security teams, on-chain analysts, exchanges, regulators, and independent journalists, across 27 categories. 33 of them publish in a language other than English, so /markets/news now has a language picker covering 18 languages; the default feed stays English-only. Every feed was fetched and parsed before being added, so the list holds no dead links: of roughly 450 candidate feeds, about half turned out to be defunct domains, URLs that now serve a web page instead of a feed, or sites that block servers outright. Binance listing announcements are in there too, which no RSS feed carries. (`/markets/news`) `[feature, improvement]`- **Every doc on the site was checked against the code that actually ships** — The documentation had drifted. Guides written early in the project still told you three.ws ran on Vercel, pointed at an old repository that no longer receives updates, named a dev server port we stopped using, and referenced build commands that had since been renamed — and twelve of the services behind the 3D pipeline had no documentation at all. We went through all 339 documents one by one and checked each claim against the running code: every command, every file path, every API endpoint, every link. Guides that were wrong are now right, 27 broken links point somewhere real again, and the background-removal, rigging, texturing, and mesh-generation services each got a proper page explaining what they do, how they run, and how to call them. Tutorials that walk you through deploying your own agent were left alone — those instructions were never the ones that went stale. (`/docs`) `[docs, improvement]`- **Fixed two API endpoints that returned an error for every request** — The $THREE balance check (/api/pump/check-three-balance) and the $THREE price signal (/api/three-signal) crashed on every call because of an incorrect internal call signature. Both now return real data. `[fix]`- **Friends now see you online — and can message you — while you're in /play** — Your account's friends list, presence, and DMs (already live on /walk) now work inside /play's coin worlds too: a Friends button on the HUD (or press J) opens a drawer showing who's online and where, with live direct messages that arrive instantly whether or not the drawer is open. Previously /play never told the server who you were signed in as, so friends saw you as offline no matter how long you played, and any message sent your way was silently lost. (`/play`) `[feature, fix]`diff --git a/STRUCTURE.md b/STRUCTURE.mdindex 1a6c8823c..1ad7d3949 100644--- a/STRUCTURE.md+++ b/STRUCTURE.md@@ -80,7 +80,7 @@ bottom.| Global markets + coin detail pages | [pages/coins.html](pages/coins.html) + [src/coins-index.js](src/coins-index.js) `→ /coins`, [pages/coin.html](pages/coin.html) + [src/coin-page.js](src/coin-page.js) `→ /coin/:id`, backend [api/coin/](api/coin) (detail, ohlc, markets, news, global over [api/_lib/coingecko.js](api/_lib/coingecko.js)) | In-repo | CoinGecko-style markets index (global stats bar, sortable top-coins table, search, sparklines) + a rich detail page per coin (interactive chart, stats grid, related news, links). Design adopted from cryptocurrency.cv; accepts CoinGecko slugs or Solana mints. Docs: [docs/coin-pages.md](docs/coin-pages.md) || Market tools (heatmap, sentiment, gas, compare) | [pages/heatmap.html](pages/heatmap.html) + [src/heatmap.js](src/heatmap.js) `→ /heatmap`, [pages/fear-greed.html](pages/fear-greed.html) + [src/fear-greed.js](src/fear-greed.js) `→ /fear-greed`, [pages/gas.html](pages/gas.html) + [src/gas.js](src/gas.js) `→ /gas`, [pages/compare.html](pages/compare.html) + [src/compare.js](src/compare.js) `→ /compare`; backend [api/coin/fear-greed.js](api/coin/fear-greed.js), [api/coin/gas.js](api/coin/gas.js) | In-repo | Four tools extending Markets, same design system: treemap heatmap (market-cap-sized tiles), Fear & Greed gauge + history, live Ethereum gas tracker (keyless `eth_feeHistory`), and up-to-4-coin compare (overlay perf + stats). All real key-free data; cross-linked from the markets table. Docs: [docs/coin-pages.md](docs/coin-pages.md) || Market tools II (screener, categories, exchanges, derivatives, converter, DeFi, chains, stablecoins) | Pages+JS `→ /screener /categories /exchanges /derivatives /converter /defi /chains /stablecoins`; backend [api/coin/](api/coin) (categories, exchanges, derivatives, rates) over CoinGecko + [api/defi/](api/defi) (protocols, chains, stablecoins) over DeFiLlama | In-repo | Eight more Markets tools, same design system: token screener + category rankings + exchange/derivatives tables + crypto⇄fiat converter (CoinGecko), plus a DeFiLlama trio — DeFi TVL by protocol, chains by TVL, stablecoins with peg health. All real key-free data; cross-linked from the markets table. Docs: [docs/coin-pages.md](docs/coin-pages.md) |-| Crypto news + archive + markets hub | [pages/markets.html](pages/markets.html) + [src/markets-page.js](src/markets-page.js) `→ /markets`, [pages/markets-news.html](pages/markets-news.html) + [src/markets-news.js](src/markets-news.js) `→ /markets/news`, [pages/news-article.html](pages/news-article.html) + [src/news-article.js](src/news-article.js) `→ /markets/news/article`, [pages/news-archive.html](pages/news-archive.html) + [src/news-archive.js](src/news-archive.js) `→ /markets/archive`, [pages/news-digest.html](pages/news-digest.html) + [src/news-digest.js](src/news-digest.js) `→ /markets/digest`; backend [api/news/](api/news) (feed, article, archive, digest, rss) + hourly archiver [api/cron/news-archive-append.js](api/cron/news-archive-append.js) over [api/_lib/news.js](api/_lib/news.js) + [api/_lib/news-sources.js](api/_lib/news-sources.js), corpus on `gs://three-ws-news-archive` | In-repo | The Markets news wing + front door: live news aggregated natively from 38 publisher feeds (category tabs, search, sentiment, ticker chips), a rich article reader (server-side extraction, AI summary/key points with extractive fallback, related coverage), the largest open crypto-news archive (662,047 enriched articles, Sept 2017 → today, EN+中文, GCS-hosted), and the /markets hub aggregating global stats, the top-100 table, breaking news, and every market surface as a hero card. Docs: [docs/coin-pages.md](docs/coin-pages.md), [docs/api-reference.md](docs/api-reference.md) |+| Crypto news + archive + markets hub | [pages/markets.html](pages/markets.html) + [src/markets-page.js](src/markets-page.js) `→ /markets`, [pages/markets-news.html](pages/markets-news.html) + [src/markets-news.js](src/markets-news.js) `→ /markets/news`, [pages/news-article.html](pages/news-article.html) + [src/news-article.js](src/news-article.js) `→ /markets/news/article`, [pages/news-archive.html](pages/news-archive.html) + [src/news-archive.js](src/news-archive.js) `→ /markets/archive`, [pages/news-digest.html](pages/news-digest.html) + [src/news-digest.js](src/news-digest.js) `→ /markets/digest`; backend [api/news/](api/news) (feed, article, archive, digest, rss) + hourly archiver [api/cron/news-archive-append.js](api/cron/news-archive-append.js) over [api/_lib/news.js](api/_lib/news.js) + [api/_lib/news-sources.js](api/_lib/news-sources.js), corpus on `gs://three-ws-news-archive` | In-repo | The Markets news wing + front door: live news aggregated natively from 192 publisher feeds (category tabs, search, sentiment, ticker chips), a rich article reader (server-side extraction, AI summary/key points with extractive fallback, related coverage), the largest open crypto-news archive (662,047 enriched articles, Sept 2017 → today, EN+中文, GCS-hosted), and the /markets hub aggregating global stats, the top-100 table, breaking news, and every market surface as a hero card. Docs: [docs/coin-pages.md](docs/coin-pages.md), [docs/api-reference.md](docs/api-reference.md) || Liquidations pulse (/coins) | Collector [services/liquidation-collector/](services/liquidation-collector) (standalone always-on Node service, ported from SperaxOS), proxy [api/coin/liquidations.js](api/coin/liquidations.js) `→ GET /api/coin/liquidations`, UI strip in [src/coins-index.js](src/coins-index.js) `→ /coins` | Live — collector on Cloud Run (`liquidation-collector`, min-instances 1, unthrottled CPU) since 2026-07-10 | Real-time long/short liquidation pain across Binance, Bybit, and OKX public futures WebSocket streams: dominant-side badge (LONG PAIN / SHORT SQUEEZE / BALANCED), 1h long-vs-short bars, and the 3 largest recent liquidations, polled every 30s (pauses on hidden tab). The collector holds long-lived WebSockets so it can't run as a Vercel function — deploy it separately and point `LIQUIDATION_COLLECTOR_URL` at it. No fallback data: the proxy 503s `collector_offline` (never fabricated numbers) when unset or unreachable, and the strip degrades to a quiet single-line offline state. Docs: [docs/api-reference.md#liquidations](docs/api-reference.md#liquidations) || BNB Chain campaign hub | [pages/bnb.html](pages/bnb.html) + [src/bnb.js](src/bnb.js) `→ /bnb`, pure helpers [src/bnb-hub-helpers.js](src/bnb-hub-helpers.js), live block-time API [api/bnb/block-time.js](api/bnb/block-time.js) over [api/_lib/bnb/chains.js](api/_lib/bnb/chains.js) `probeBlockTime` | In-repo · hub live, tracks rolling out | The campaign's front door: three feature cards (gasless agent onboarding, on-chain-gated 3D vault, real-time on-chain world), each claim traced to `prompts/bnb-chain/00-CONTEXT.md`'s verified facts (0.45s blocks — never 20k TPS or 250ms finality). Embeds a live block-time widget (real RPC measurement on every load). Each card self-detects liveness via a real HTTP probe against its track's route/API on the running deployment — a 404 renders a designed "coming soon" state, never a dead link — so cards auto-light-up as the sibling tracks below ship: gasless registration `→ /create-agent` + `api/bnb/register-agent.js` (prompt 03), vault `→ /vault` (prompt 12), on-chain world `→ /bnb-latency` (prompt 17) + the Explore on-chain toggle (prompt 16). Campaign root: [prompts/bnb-chain/](prompts/bnb-chain) || BABT holder check (BNB Chain) | Lib [api/_lib/bnb/babt.js](api/_lib/bnb/babt.js) `hasBabt()`, free API [api/bnb/babt-check.js](api/bnb/babt-check.js) `→ GET /api/bnb/babt-check?address=` | In-repo · shipped | Free, rate-limited on-chain check for whether a BSC address holds a Binance Account Bound Token (BABT) — a real, live, KYC-backed soulbound token (1.16M+ mainnet holders, verified via `eth_getCode`/`balanceOf` against the real contract `0x2B09d47D...5215D7c8`). Verification writeup + honest comparison vs. Gitcoin Passport/World ID/Coinbase attestations: [docs/bnb-babt-findings.md](docs/bnb-babt-findings.md). Spike prompt: `prompts/bnb-chain/20-babt-verification-spike.md`. |diff --git a/api/_lib/news-sources.js b/api/_lib/news-sources.jsindex 625277d28..8f1f34476 100644--- a/api/_lib/news-sources.js+++ b/api/_lib/news-sources.js@@ -1,5 +1,5 @@-// Crypto-news source registry — 235 live publisher feeds across-// 29 categories, 33 of them international across 17 languages.+// Crypto-news source registry — 192 live publisher feeds across 27 categories,+// 33 of them international across 17 languages.//// Ported from the cryptocurrency.cv aggregator (same team; its Vercel deployment// is retired, so three.ws runs the aggregation natively). Keys and category@@ -7,13 +7,22 @@// and live records line up.//// EVERY feed here was fetched and parsed before being listed. The upstream-// registry carried ~450 feeds, but a large share are no longer real: dead-// domains, feeds replaced by HTML pages, and outlets behind a Cloudflare bot-// challenge (all of substack.com and mirror.xyz — unfetchable server-side).-// Those are omitted rather than shipped as permanently-failing sources.-// Regenerate with the probe in scripts/news-sources-probe.mjs.+// registry carried ~450 feeds and roughly half are no longer real. What was+// dropped, and why://-// Fields: name, url, category. Optional: tier + credibility (upstream editorial+// * ~150 dead outright — 404/410, dead domains, or a feed URL that now serves+// an HTML page. Size is no signal: several returned 700 KB of markup.+// * substack.com and mirror.xyz (28 feeds) — behind a Cloudflare bot+// challenge, so every one answers 403 to a server-side fetch.+// * medium.com (43 feeds) — answers 429 to datacenter egress regardless of+// pacing. They look live in a browser, which is the trap.+//+// A feed that only rate-limited us is not the same as a dead one, so those were+// re-probed slowly before any verdict. Regenerate and re-validate with+// scripts/news-sources-probe.mjs, which exits non-zero when a source has died.+//+// Fields: name, url, category. Optional: kind ('json' — shaped by an adapter in+// news.js rather than parsed as a feed), tier + credibility (upstream editorial// tiering, drives refresh priority), language + region (international feeds).export const NEWS_SOURCES = {@@ -86,7 +95,6 @@ export const NEWS_SOURCES = {zycrypto: { name: 'ZyCrypto', url: 'https://zycrypto.com/feed/', category: 'general' },// ── Bitcoin (11) ─────────────────────────────────────────────────────────- alex_lab_blog: { name: 'ALEX Lab Blog', url: 'https://medium.com/feed/alexgobtc', category: 'bitcoin' },bitcoinblock: { name: 'Bitcoin Block', url: 'https://bitcoinblock.com.br/feed/', category: 'bitcoin', language: 'pt', region: 'latam' },bitcoincom: { name: 'Bitcoin.com News', url: 'https://news.bitcoin.com/feed/', category: 'bitcoin' },bitcoinist: { name: 'Bitcoinist', url: 'https://bitcoinist.com/feed/', category: 'bitcoin', tier: 'tier3', credibility: 0.72 },@@ -101,68 +109,40 @@ export const NEWS_SOURCES = {// ── Ethereum (5) ─────────────────────────────────────────────────────────ef_blog: { name: 'Ethereum Foundation', url: 'https://blog.ethereum.org/feed.xml', category: 'ethereum' },ens_blog: { name: 'ENS Blog', url: 'https://ens.domains/blog/rss.xml', category: 'ethereum' },- ethereum_cat_herders: { name: 'Ethereum Cat Herders', url: 'https://medium.com/feed/ethereum-cat-herders', category: 'ethereum' },lido_dao_blog: { name: 'Lido DAO Governance', url: 'https://research.lido.fi/latest.rss', category: 'ethereum' },- rocketpool_blog: { name: 'Rocket Pool Blog', url: 'https://medium.com/feed/rocket-pool', category: 'ethereum' },// ── Layer 2 (3) ──────────────────────────────────────────────────────────altlayer_blog: { name: 'AltLayer Blog', url: 'https://blog.altlayer.io/feed', category: 'layer2' },- aztec_blog: { name: 'Aztec Blog', url: 'https://medium.com/feed/aztec-protocol', category: 'layer2' },- starknet_blog: { name: 'StarkNet Blog', url: 'https://starkware.medium.com/feed', category: 'layer2' },// ── Solana (7) ───────────────────────────────────────────────────────────- marginfi_blog: { name: 'marginfi Blog', url: 'https://medium.com/feed/marginfi', category: 'solana' },- marinade_blog: { name: 'Marinade Finance Blog', url: 'https://medium.com/feed/marinade-finance', category: 'solana' },- orca_blog: { name: 'Orca Blog', url: 'https://medium.com/feed/orca-so', category: 'solana' },- raydium_blog: { name: 'Raydium Blog', url: 'https://medium.com/feed/@raydium', category: 'solana' },solana_news: { name: 'Solana News', url: 'https://solana.com/news/rss.xml', category: 'solana' },solanafloor: { name: 'SolanaFloor', url: 'https://solanafloor.com/feed.xml', category: 'solana' },- solflare_blog: { name: 'Solflare Blog', url: 'https://medium.com/feed/solflare', category: 'solana' },// ── Alt L1 (13) ──────────────────────────────────────────────────────────- aptos_blog: { name: 'Aptos Blog', url: 'https://medium.com/feed/aptoslabs', category: 'altl1' },avail_blog: { name: 'Avail Blog', url: 'https://blog.availproject.org/rss/', category: 'altl1' },- avalanche_blog: { name: 'Avalanche Blog', url: 'https://medium.com/feed/avalancheavax', category: 'altl1' },celestia_blog: { name: 'Celestia Blog', url: 'https://blog.celestia.org/rss/', category: 'altl1' },- dymension_blog: { name: 'Dymension Blog', url: 'https://medium.com/feed/@dymension', category: 'altl1' },hedera: { name: 'Hedera', url: 'https://hedera.com/feed/', category: 'altl1' },- movement_blog: { name: 'Movement Labs Blog', url: 'https://medium.com/feed/@movementlabsxyz', category: 'altl1' },neonewstoday: { name: 'NEO News Today', url: 'https://neonewstoday.com/feed/', category: 'altl1' },- osmosis_blog: { name: 'Osmosis Blog', url: 'https://medium.com/feed/osmosis', category: 'altl1' },- render_blog: { name: 'Render Network Blog', url: 'https://medium.com/feed/render-token', category: 'altl1' },sei_blog: { name: 'Sei Blog', url: 'https://blog.sei.io/rss/', category: 'altl1' },- stride_blog: { name: 'Stride Blog', url: 'https://medium.com/feed/@stride_zone', category: 'altl1' },sui_blog: { name: 'Sui Blog', url: 'https://blog.sui.io/feed/', category: 'altl1' },// ── DeFi (18) ────────────────────────────────────────────────────────────- across_blog: { name: 'Across Protocol Blog', url: 'https://medium.com/feed/across-protocol', category: 'defi' },- balancer_blog: { name: 'Balancer Blog', url: 'https://medium.com/feed/balancer-protocol', category: 'defi' },bankless: { name: 'Bankless', url: 'https://www.bankless.com/rss/feed', category: 'defi', tier: 'tier3', credibility: 0.78 },- centrifuge_blog: { name: 'Centrifuge Blog', url: 'https://medium.com/feed/centrifuge', category: 'defi' },- compound_blog: { name: 'Compound Blog', url: 'https://medium.com/feed/compound-finance', category: 'defi' },curve_blog: { name: 'Curve Blog', url: 'https://news.curve.fi/rss/', category: 'defi' },defiant: { name: 'The Defiant', url: 'https://thedefiant.io/feed', category: 'defi', tier: 'tier2', credibility: 0.87 },defirate: { name: 'DeFi Rate', url: 'https://defirate.com/feed/', category: 'defi' },eigenlayer_blog: { name: 'EigenLayer Blog', url: 'https://www.blog.eigenlayer.xyz/rss/', category: 'defi' },lido_blog: { name: 'Lido Blog', url: 'https://blog.lido.fi/rss/', category: 'defi' },- maple_v2_blog: { name: 'Maple Finance V2 Blog', url: 'https://medium.com/feed/@maplefinance', category: 'defi' },- morpho_blog: { name: 'Morpho Blog', url: 'https://medium.com/feed/morpho-labs', category: 'defi' },- pendle_blog: { name: 'Pendle Blog', url: 'https://medium.com/feed/pendle', category: 'defi' },- radiant_blog: { name: 'Radiant Capital Blog', url: 'https://medium.com/feed/@radiantcapital', category: 'defi' },- sushi_blog: { name: 'SushiSwap Blog', url: 'https://medium.com/feed/sushiswap-org', category: 'defi' },synthetix_blog: { name: 'Synthetix Blog', url: 'https://blog.synthetix.io/rss/', category: 'defi' },tally_blog: { name: 'Tally Blog', url: 'https://blog.tally.xyz/feed', category: 'defi' },yearn_blog: { name: 'Yearn Finance Blog', url: 'https://blog.yearn.fi/feed', category: 'defi' },// ── NFT (3) ──────────────────────────────────────────────────────────────nftevening: { name: 'NFTevening', url: 'https://nftevening.com/feed/', category: 'nft' },- nifty_gateway_blog: { name: 'Nifty Gateway Blog', url: 'https://medium.com/feed/nifty-gateway', category: 'nft' },- superrare_blog: { name: 'SuperRare Blog', url: 'https://medium.com/feed/superrare', category: 'nft' },// ── Gaming (3) ───────────────────────────────────────────────────────────chiliz: { name: 'Chiliz', url: 'https://www.chiliz.com/feed/', category: 'gaming' },gala_blog: { name: 'Gala Games Blog', url: 'https://blog.gala.games/feed', category: 'gaming' },- gamingguild_blog: { name: 'Yield Guild Games Blog', url: 'https://medium.com/feed/yield-guild-games', category: 'gaming' },// ── Trading (7) ──────────────────────────────────────────────────────────beincrypto: { name: 'BeInCrypto', url: 'https://beincrypto.com/feed/', category: 'trading', tier: 'tier3', credibility: 0.7 },@@ -176,8 +156,6 @@ export const NEWS_SOURCES = {// ── Derivatives (5) ──────────────────────────────────────────────────────amberdata_blog: { name: 'Amberdata Blog', url: 'https://blog.amberdata.io/rss.xml', category: 'derivatives' },deribit_insights: { name: 'Deribit Insights', url: 'https://insights.deribit.com/feed/', category: 'derivatives' },- gains_network_blog: { name: 'gTrade Blog', url: 'https://medium.com/feed/gains-network', category: 'derivatives' },- hyperliquid_blog: { name: 'Hyperliquid Blog', url: 'https://medium.com/feed/@hyperliquid', category: 'derivatives' },paradigm_trading: { name: 'Paradigm (Trading)', url: 'https://www.paradigm.co/blog/rss.xml', category: 'derivatives' },// ── Research (2) ─────────────────────────────────────────────────────────@@ -186,7 +164,6 @@ export const NEWS_SOURCES = {// ── On-chain analytics (3) ───────────────────────────────────────────────dune_blog: { name: 'Dune Analytics Blog', url: 'https://dune.com/blog/feed', category: 'onchain' },- intotheblock: { name: 'IntoTheBlock', url: 'https://medium.com/feed/intotheblock', category: 'onchain' },woobull: { name: 'Willy Woo (Woobull)', url: 'https://woobull.com/feed/', category: 'onchain' },// ── Quant (1) ────────────────────────────────────────────────────────────@@ -195,14 +172,11 @@ export const NEWS_SOURCES = {// ── Institutional (7) ────────────────────────────────────────────────────binance_announcements: { name: 'Binance Announcements', url: 'https://www.binance.com/bapi/composite/v1/public/cms/article/list/query?type=1&pageNo=1&pageSize=20&catalogId=48', category: 'institutional', kind: 'json' },bitfinex_blog: { name: 'Bitfinex Blog', url: 'https://blog.bitfinex.com/feed/', category: 'institutional' },- dragonfly_research: { name: 'Dragonfly Research', url: 'https://medium.com/feed/dragonfly-research', category: 'institutional' },- electric_capital: { name: 'Electric Capital Blog', url: 'https://medium.com/feed/electric-capital', category: 'institutional' },fireblocks_blog: { name: 'Fireblocks Blog', url: 'https://www.fireblocks.com/blog/feed/', category: 'institutional' },kraken_blog: { name: 'Kraken Blog', url: 'https://blog.kraken.com/feed/', category: 'institutional' },placeholder_vc: { name: 'Placeholder VC', url: 'https://www.placeholder.vc/blog?format=rss', category: 'institutional' },// ── TradFi (1) ───────────────────────────────────────────────────────────- backed_finance_blog: { name: 'Backed Finance Blog', url: 'https://medium.com/feed/@backedfi', category: 'tradfi' },// ── ETF / asset managers (2) ─────────────────────────────────────────────ark_invest: { name: 'ARK Invest', url: 'https://www.ark-invest.com/feed', category: 'etf' },@@ -252,19 +226,13 @@ export const NEWS_SOURCES = {// ── Security (9) ─────────────────────────────────────────────────────────chainalysis_blog: { name: 'Chainalysis Blog', url: 'https://www.chainalysis.com/blog/feed/', category: 'security' },elliptic_blog: { name: 'Elliptic Blog', url: 'https://www.elliptic.co/blog/rss.xml', category: 'security' },- immunefi_blog: { name: 'Immunefi Blog', url: 'https://immunefi.medium.com/feed', category: 'security' },openzeppelin_blog: { name: 'OpenZeppelin Blog', url: 'https://www.openzeppelin.com/news/rss.xml', category: 'security' },samczsun: { name: 'samczsun Blog', url: 'https://samczsun.com/rss/', category: 'security' },- slowmist: { name: 'SlowMist Blog', url: 'https://slowmist.medium.com/feed', category: 'security' },trailofbits: { name: 'Trail of Bits Blog', url: 'https://blog.trailofbits.com/feed/', category: 'security' },trezor_blog: { name: 'Trezor Blog', url: 'https://blog.trezor.io/feed', category: 'security' },zcash_blog: { name: 'Zcash Blog', url: 'https://electriccoin.co/blog/feed/', category: 'security' },// ── Developer (5) ────────────────────────────────────────────────────────- api3_blog: { name: 'API3 Blog', url: 'https://medium.com/feed/api3', category: 'developer' },- biconomy_blog: { name: 'Biconomy Blog', url: 'https://medium.com/feed/biconomy', category: 'developer' },- connext_blog: { name: 'Connext Blog', url: 'https://medium.com/feed/connext', category: 'developer' },- layerzero_blog: { name: 'LayerZero Blog', url: 'https://medium.com/feed/layerzero-official', category: 'developer' },particle_network_blog: { name: 'Particle Network Blog', url: 'https://blog.particle.network/rss/', category: 'developer' },// ── DePIN (2) ────────────────────────────────────────────────────────────@@ -272,8 +240,6 @@ export const NEWS_SOURCES = {iotex_blog: { name: 'IoTeX Blog', url: 'https://iotex.io/blog/feed', category: 'depin' },// ── AI x crypto (2) ──────────────────────────────────────────────────────- gensyn_blog: { name: 'Gensyn Blog', url: 'https://medium.com/feed/@gensyn', category: 'ai_crypto' },- sentient_blog: { name: 'Sentient Blog', url: 'https://medium.com/feed/@sentientAGI', category: 'ai_crypto' },// ── Mining (2) ───────────────────────────────────────────────────────────bitcoinmining: { name: 'Bitcoin Mining News', url: 'https://bitcoinmagazine.com/tags/mining/.rss/full/', category: 'mining' },@@ -328,7 +294,6 @@ export const NEWS_CATEGORIES = ['onchain','quant','institutional',- 'tradfi','etf','stablecoin','fintech',@@ -337,7 +302,6 @@ export const NEWS_CATEGORIES = ['security','developer','depin',- 'ai_crypto','mining','macro','journalism',diff --git a/api/_lib/news.js b/api/_lib/news.jsindex 5e9a6bd36..c339fa763 100644--- a/api/_lib/news.js+++ b/api/_lib/news.js@@ -35,6 +35,7 @@ const REFRESH_DEADLINE_MS = 2500; // how long a request will wait on cold sourceconst GLOBAL_CONCURRENCY = 16; // outbound feed fetches in flight, all domainsconst DOMAIN_CONCURRENCY = 3; // outbound feed fetches in flight, per domainconst MAX_ARTICLES_PER_SOURCE = 40; // newest-N per feed keeps the working set bounded+const NARROW_QUERY_SOURCES = 8; // at or below this, wait for the feeds rather than return an empty page// key → { articles, fetchedAt, ok, failures, nextRetryAt }const sourceCache = new Map();@@ -289,9 +290,9 @@ const JSON_ADAPTERS = {};// ── Concurrency control ──────────────────────────────────────────────────────-// Feeds cluster on shared hosts (medium.com, substack.com, mirror.xyz each-// carry many). Firing every feed at once earns a 429 from exactly those hosts,-// so cap globally *and* per domain.+// Feeds cluster on shared hosts, so cap outbound fetches globally *and* per+// domain: a naive Promise.all over the registry earns an instant 429 from+// exactly those hosts and starves slow feeds of their timeout budget.function feedDomain(url) {try {@@ -489,9 +490,12 @@ export async function getNews({ category, source, lang = 'en', q, limit = 30, of}}- // A caller who names one source is asking for that source specifically —- // give it the full feed timeout rather than the shared fan-out deadline.- const deadline = keys.length === 1 ? FEED_TIMEOUT_MS + 500 : REFRESH_DEADLINE_MS;+ // A narrow selection — one source, or a small language/category slice — has+ // no other content to fall back on: truncating its refresh at the fan-out+ // deadline returns an empty page rather than a partial one. Give it the full+ // feed timeout. A broad query keeps the short deadline; it has plenty to show+ // while the stragglers land in cache for the next caller.+ const deadline = keys.length <= NARROW_QUERY_SOURCES ? FEED_TIMEOUT_MS + 500 : REFRESH_DEADLINE_MS;const all = await ensureSources(keys, deadline);let articles = dedupe(all).sort((a, b) => new Date(b.pub_date || 0) - new Date(a.pub_date || 0),diff --git a/data/changelog.json b/data/changelog.jsonindex 36d53fdd4..b60477de5 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,25 @@{"$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-07-10",+ "title": "Crypto news now aggregates 192 publisher feeds, in 18 languages",+ "summary": "The news feed grew from 38 sources to 192 — every major newsroom plus research desks, security teams, on-chain analysts, exchanges, regulators, and independent journalists, across 27 categories. 33 of them publish in a language other than English, so /markets/news now has a language picker covering 18 languages; the default feed stays English-only. Every feed was fetched and parsed before being added, so the list holds no dead links: of roughly 450 candidate feeds, about half turned out to be defunct domains, URLs that now serve a web page instead of a feed, or sites that block servers outright. Binance listing announcements are in there too, which no RSS feed carries.",+ "tags": [+ "feature",+ "improvement"+ ],+ "link": "/markets/news"+ },+ {+ "date": "2026-07-10",+ "title": "A leftover test file stops loading on every visit",+ "summary": "A one-off test page and the 1.5 MB script it loaded were committed by mistake and had been sitting in the public folder ever since — downloadable by anyone and adding dead weight to the site for no reason. Both are gone, and the project now refuses to accept that kind of leftover again.",+ "tags": [+ "fix",+ "infra"+ ]+ },{"date": "2026-07-10","title": "Agents registered on-chain can no longer put a slur on three.ws",diff --git a/data/pages.json b/data/pages.jsonindex afcdf6c4e..83c84d950 100644--- a/data/pages.json+++ b/data/pages.json@@ -1545,7 +1545,7 @@{"path": "/markets","title": "Markets Hub",- "description": "The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 38 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.",+ "description": "The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 192 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.","priority": 0.8,"changefreq": "hourly","added": "2026-07-10"@@ -1553,7 +1553,7 @@{"path": "/markets/news","title": "Crypto News",- "description": "Live crypto news aggregated natively from 38 publisher feeds — filter by category (Bitcoin, DeFi, regulation, and more), search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.",+ "description": "Live crypto news aggregated natively from 192 publisher feeds in 18 languages — filter by category (Bitcoin, DeFi, security, regulation, and more), pick a language, search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.","priority": 0.8,"changefreq": "hourly","added": "2026-07-10"diff --git a/docs/ALL.md b/docs/ALL.mdindex cb1bf916d..ccf5e13e4 100644--- a/docs/ALL.md+++ b/docs/ALL.md@@ -1,7 +1,7 @@<!-- GENERATED by scripts/combine-docs.mjs — do not edit by hand. Edit the source files under docs/ and re-run. --># three.ws — Combined Documentation-> Single-file snapshot of every document under [`docs/`](.). Generated 2026-07-10 from **285 files** (~4150 KB).+> Single-file snapshot of every document under [`docs/`](.). Generated 2026-07-10 from **284 files** (~4060 KB).> The individual source files remain the canonical, editable copies — this file is a read-only aggregate.## Table of contents@@ -65,86 +65,85 @@- [erc8004.md](#sec-115)- [examples.md](#sec-117)- [financial-controls.md](#sec-118)-- [gcp-credits.md](#sec-119)-- [hold-to-access.md](#sec-120)-- [how-it-works.md](#sec-121)-- [i18n.md](#sec-122)-- [ibm-x402-mcp.md](#sec-123)-- [ibm.md](#sec-124)-- [introduction.md](#sec-125)-- [js-api.md](#sec-127)-- [labor-market.md](#sec-128)-- [launch-usecases.md](#sec-129)-- [layers.md](#sec-130)-- [listings.md](#sec-131)-- [make-your-agent.md](#sec-132)-- [marketplace.md](#sec-133)-- [mcp-3d-studio.md](#sec-134)-- [mcp-agent.md](#sec-135)-- [mcp-studio.md](#sec-136)-- [mcp-tools.md](#sec-137)-- [mcp-x402-bazaar.md](#sec-138)-- [mcp.md](#sec-139)-- [memetic-launcher.md](#sec-140)-- [memory.md](#sec-141)-- [mint-mark.md](#sec-142)-- [money-feed.md](#sec-143)-- [money-map.md](#sec-144)-- [multi-agent.md](#sec-145)-- [nvidia-models.md](#sec-146)-- [nvidia-nemotron-spotlight.md](#sec-147)-- [okx-marketplace.md](#sec-148)-- [onchain-agents.md](#sec-149)-- [oracle.md](#sec-150)-- [package-extraction.md](#sec-151)-- [pay-skills-listing.md](#sec-153)-- [permissions.md](#sec-154)-- [persona-hub.md](#sec-155)-- [plan-checkout.md](#sec-156)-- [popular-3d-github-repos.md](#sec-157)-- [provenance.md](#sec-158)-- [pump-fun-mcp-edge.md](#sec-159)-- [pump-launch-repos.md](#sec-160)-- [pump-launcher.md](#sec-161)-- [pump-platform-fee.md](#sec-162)-- [quick-start.md](#sec-182)-- [remix.md](#sec-183)-- [reputation.md](#sec-184)-- [risk-acknowledgment.md](#sec-185)-- [sas-attestations.md](#sec-186)-- [sdk.md](#sec-187)-- [security.md](#sec-188)-- [share-and-embed.md](#sec-189)-- [skills.md](#sec-190)-- [smart-contracts.md](#sec-191)-- [solana-pumpfun.md](#sec-192)-- [solana-reputation.md](#sec-193)-- [solana.md](#sec-194)-- [spatial-mcp.md](#sec-195)-- [start-here.md](#sec-197)-- [syndication.md](#sec-198)-- [token-gated-3d-embeds.md](#sec-199)-- [trader-card.md](#sec-200)-- [trading-arenas.md](#sec-201)-- [trading-copilot.md](#sec-202)-- [trading-experiment.md](#sec-203)-- [trading-surfaces.md](#sec-204)-- [troubleshooting.md](#sec-205)-- [trust-primitives.md](#sec-206)-- [ui-juice.md](#sec-255)-- [validation.md](#sec-268)-- [vanity.md](#sec-269)-- [viewer.md](#sec-270)-- [web-component.md](#sec-271)-- [widget-api.md](#sec-272)-- [widget-studio.md](#sec-273)-- [widgets.md](#sec-274)-- [x402-buyer.md](#sec-275)-- [x402-dev-tools.md](#sec-276)-- [x402-endpoints.md](#sec-277)-- [x402-revenue.md](#sec-278)-- [x402-ring-economy.md](#sec-279)-- [x402.md](#sec-280)+- [hold-to-access.md](#sec-119)+- [how-it-works.md](#sec-120)+- [i18n.md](#sec-121)+- [ibm-x402-mcp.md](#sec-122)+- [ibm.md](#sec-123)+- [introduction.md](#sec-124)+- [js-api.md](#sec-126)+- [labor-market.md](#sec-127)+- [launch-usecases.md](#sec-128)+- [layers.md](#sec-129)+- [listings.md](#sec-130)+- [make-your-agent.md](#sec-131)+- [marketplace.md](#sec-132)+- [mcp-3d-studio.md](#sec-133)+- [mcp-agent.md](#sec-134)+- [mcp-studio.md](#sec-135)+- [mcp-tools.md](#sec-136)+- [mcp-x402-bazaar.md](#sec-137)+- [mcp.md](#sec-138)+- [memetic-launcher.md](#sec-139)+- [memory.md](#sec-140)+- [mint-mark.md](#sec-141)+- [money-feed.md](#sec-142)+- [money-map.md](#sec-143)+- [multi-agent.md](#sec-144)+- [nvidia-models.md](#sec-145)+- [nvidia-nemotron-spotlight.md](#sec-146)+- [okx-marketplace.md](#sec-147)+- [onchain-agents.md](#sec-148)+- [oracle.md](#sec-149)+- [package-extraction.md](#sec-150)+- [pay-skills-listing.md](#sec-152)+- [permissions.md](#sec-153)+- [persona-hub.md](#sec-154)+- [plan-checkout.md](#sec-155)+- [popular-3d-github-repos.md](#sec-156)+- [provenance.md](#sec-157)+- [pump-fun-mcp-edge.md](#sec-158)+- [pump-launch-repos.md](#sec-159)+- [pump-launcher.md](#sec-160)+- [pump-platform-fee.md](#sec-161)+- [quick-start.md](#sec-181)+- [remix.md](#sec-182)+- [reputation.md](#sec-183)+- [risk-acknowledgment.md](#sec-184)+- [sas-attestations.md](#sec-185)+- [sdk.md](#sec-186)+- [security.md](#sec-187)+- [share-and-embed.md](#sec-188)+- [skills.md](#sec-189)+- [smart-contracts.md](#sec-190)+- [solana-pumpfun.md](#sec-191)+- [solana-reputation.md](#sec-192)+- [solana.md](#sec-193)+- [spatial-mcp.md](#sec-194)+- [start-here.md](#sec-196)+- [syndication.md](#sec-197)+- [token-gated-3d-embeds.md](#sec-198)+- [trader-card.md](#sec-199)+- [trading-arenas.md](#sec-200)+- [trading-copilot.md](#sec-201)+- [trading-experiment.md](#sec-202)+- [trading-surfaces.md](#sec-203)+- [troubleshooting.md](#sec-204)+- [trust-primitives.md](#sec-205)+- [ui-juice.md](#sec-254)+- [validation.md](#sec-267)+- [vanity.md](#sec-268)+- [viewer.md](#sec-269)+- [web-component.md](#sec-270)+- [widget-api.md](#sec-271)+- [widget-studio.md](#sec-272)+- [widgets.md](#sec-273)+- [x402-buyer.md](#sec-274)+- [x402-dev-tools.md](#sec-275)+- [x402-endpoints.md](#sec-276)+- [x402-revenue.md](#sec-277)+- [x402-ring-economy.md](#sec-278)+- [x402.md](#sec-279)### agent-abilities@@ -224,111 +223,111 @@### irl-- [irl/THREAT-MODEL.md](#sec-126)+- [irl/THREAT-MODEL.md](#sec-125)### partners-- [partners/sperax-proposal.md](#sec-152)+- [partners/sperax-proposal.md](#sec-151)### pumpfun-program-- [pumpfun-program/README.md](#sec-163)-- [pumpfun-program/UPSTREAM-buy-sell-v2-announcement.md](#sec-164)-- [pumpfun-program/docs/BREAKING_FEE_RECIPIENT.md](#sec-165)-- [pumpfun-program/docs/CPI_README.md](#sec-166)-- [pumpfun-program/docs/FAQ.md](#sec-167)-- [pumpfun-program/docs/FEE_PROGRAM_README.md](#sec-168)-- [pumpfun-program/docs/FEE_RECIPIENTS.md](#sec-169)-- [pumpfun-program/docs/PUMP_CASHBACK_README.md](#sec-170)-- [pumpfun-program/docs/PUMP_CREATOR_FEE_README.md](#sec-171)-- [pumpfun-program/docs/PUMP_PROGRAM_README.md](#sec-172)-- [pumpfun-program/docs/PUMP_SWAP_CREATOR_FEE_README.md](#sec-173)-- [pumpfun-program/docs/PUMP_SWAP_README.md](#sec-174)-- [pumpfun-program/docs/PUMP_SWAP_SDK_README.md](#sec-175)-- [pumpfun-program/docs/instructions/BUY.md](#sec-176)-- [pumpfun-program/docs/instructions/CLAIM_CASHBACK.md](#sec-177)-- [pumpfun-program/docs/instructions/COIN_CREATION.md](#sec-178)-- [pumpfun-program/docs/instructions/COLLECT_CREATOR_FEE.md](#sec-179)-- [pumpfun-program/docs/instructions/CREATOR_FEE_SHARING.md](#sec-180)-- [pumpfun-program/docs/instructions/SELL.md](#sec-181)+- [pumpfun-program/README.md](#sec-162)+- [pumpfun-program/UPSTREAM-buy-sell-v2-announcement.md](#sec-163)+- [pumpfun-program/docs/BREAKING_FEE_RECIPIENT.md](#sec-164)+- [pumpfun-program/docs/CPI_README.md](#sec-165)+- [pumpfun-program/docs/FAQ.md](#sec-166)+- [pumpfun-program/docs/FEE_PROGRAM_README.md](#sec-167)+- [pumpfun-program/docs/FEE_RECIPIENTS.md](#sec-168)+- [pumpfun-program/docs/PUMP_CASHBACK_README.md](#sec-169)+- [pumpfun-program/docs/PUMP_CREATOR_FEE_README.md](#sec-170)+- [pumpfun-program/docs/PUMP_PROGRAM_README.md](#sec-171)+- [pumpfun-program/docs/PUMP_SWAP_CREATOR_FEE_README.md](#sec-172)+- [pumpfun-program/docs/PUMP_SWAP_README.md](#sec-173)+- [pumpfun-program/docs/PUMP_SWAP_SDK_README.md](#sec-174)+- [pumpfun-program/docs/instructions/BUY.md](#sec-175)+- [pumpfun-program/docs/instructions/CLAIM_CASHBACK.md](#sec-176)+- [pumpfun-program/docs/instructions/COIN_CREATION.md](#sec-177)+- [pumpfun-program/docs/instructions/COLLECT_CREATOR_FEE.md](#sec-178)+- [pumpfun-program/docs/instructions/CREATOR_FEE_SHARING.md](#sec-179)+- [pumpfun-program/docs/instructions/SELL.md](#sec-180)### specs-- [specs/agent-trading.md](#sec-196)+- [specs/agent-trading.md](#sec-195)### tutorials-- [tutorials/agent-personality.md](#sec-207)-- [tutorials/agent-reputation.md](#sec-208)-- [tutorials/animate-your-avatar.md](#sec-209)-- [tutorials/build-a-scene.md](#sec-210)-- [tutorials/claim-threews-name.md](#sec-211)-- [tutorials/connect-ai-brain.md](#sec-212)-- [tutorials/create-and-edit-memory.md](#sec-213)-- [tutorials/custom-skill.md](#sec-214)-- [tutorials/customize-appearance.md](#sec-215)-- [tutorials/deploy-to-vercel-custom-domain.md](#sec-216)-- [tutorials/embed-in-30-seconds.md](#sec-217)-- [tutorials/embed-on-website.md](#sec-218)-- [tutorials/emotion-from-data.md](#sec-219)-- [tutorials/first-agent.md](#sec-220)-- [tutorials/generate-3d-api.md](#sec-221)-- [tutorials/getting-started.md](#sec-222)-- [tutorials/greeting-and-first-speech.md](#sec-223)-- [tutorials/image-to-3d.md](#sec-224)-- [tutorials/import-avatar-url.md](#sec-225)-- [tutorials/js-api-events.md](#sec-226)-- [tutorials/mcp-server-for-your-agent.md](#sec-227)-- [tutorials/mine-vanity-address.md](#sec-228)-- [tutorials/mint-pumpfun-token.md](#sec-229)-- [tutorials/multi-agent-coordination.md](#sec-230)-- [tutorials/nvidia-3d-free.md](#sec-231)-- [tutorials/nvidia-nim-self-host.md](#sec-232)-- [tutorials/paid-x402-endpoint.md](#sec-233)-- [tutorials/pay-for-x402-service.md](#sec-234)-- [tutorials/personal-ai-site.md](#sec-235)-- [tutorials/place-agent-irl.md](#sec-236)-- [tutorials/prompts-for-3d.md](#sec-237)-- [tutorials/register-onchain.md](#sec-238)-- [tutorials/self-host-agent-backend.md](#sec-239)-- [tutorials/selfie-to-avatar.md](#sec-240)-- [tutorials/share-your-agent.md](#sec-241)-- [tutorials/shopify-store-guide-advanced.md](#sec-242)-- [tutorials/shopify-store-guide.md](#sec-243)-- [tutorials/skill-with-database-auth.md](#sec-244)-- [tutorials/solana-agent-reputation.md](#sec-245)-- [tutorials/sperax-tour.md](#sec-246)-- [tutorials/swap-avatar-in-studio.md](#sec-247)-- [tutorials/text-to-3d.md](#sec-248)-- [tutorials/trigger-from-page-events.md](#sec-249)-- [tutorials/upload-custom-glb.md](#sec-250)-- [tutorials/view-in-ar.md](#sec-251)-- [tutorials/voice-and-lipsync.md](#sec-252)-- [tutorials/walk-companion.md](#sec-253)-- [tutorials/web-component-end-to-end.md](#sec-254)+- [tutorials/agent-personality.md](#sec-206)+- [tutorials/agent-reputation.md](#sec-207)+- [tutorials/animate-your-avatar.md](#sec-208)+- [tutorials/build-a-scene.md](#sec-209)+- [tutorials/claim-threews-name.md](#sec-210)+- [tutorials/connect-ai-brain.md](#sec-211)+- [tutorials/create-and-edit-memory.md](#sec-212)+- [tutorials/custom-skill.md](#sec-213)+- [tutorials/customize-appearance.md](#sec-214)+- [tutorials/deploy-to-vercel-custom-domain.md](#sec-215)+- [tutorials/embed-in-30-seconds.md](#sec-216)+- [tutorials/embed-on-website.md](#sec-217)+- [tutorials/emotion-from-data.md](#sec-218)+- [tutorials/first-agent.md](#sec-219)+- [tutorials/generate-3d-api.md](#sec-220)+- [tutorials/getting-started.md](#sec-221)+- [tutorials/greeting-and-first-speech.md](#sec-222)+- [tutorials/image-to-3d.md](#sec-223)+- [tutorials/import-avatar-url.md](#sec-224)+- [tutorials/js-api-events.md](#sec-225)+- [tutorials/mcp-server-for-your-agent.md](#sec-226)+- [tutorials/mine-vanity-address.md](#sec-227)+- [tutorials/mint-pumpfun-token.md](#sec-228)+- [tutorials/multi-agent-coordination.md](#sec-229)+- [tutorials/nvidia-3d-free.md](#sec-230)+- [tutorials/nvidia-nim-self-host.md](#sec-231)+- [tutorials/paid-x402-endpoint.md](#sec-232)+- [tutorials/pay-for-x402-service.md](#sec-233)+- [tutorials/personal-ai-site.md](#sec-234)+- [tutorials/place-agent-irl.md](#sec-235)+- [tutorials/prompts-for-3d.md](#sec-236)+- [tutorials/register-onchain.md](#sec-237)+- [tutorials/self-host-agent-backend.md](#sec-238)+- [tutorials/selfie-to-avatar.md](#sec-239)+- [tutorials/share-your-agent.md](#sec-240)+- [tutorials/shopify-store-guide-advanced.md](#sec-241)+- [tutorials/shopify-store-guide.md](#sec-242)+- [tutorials/skill-with-database-auth.md](#sec-243)+- [tutorials/solana-agent-reputation.md](#sec-244)+- [tutorials/sperax-tour.md](#sec-245)+- [tutorials/swap-avatar-in-studio.md](#sec-246)+- [tutorials/text-to-3d.md](#sec-247)+- [tutorials/trigger-from-page-events.md](#sec-248)+- [tutorials/upload-custom-glb.md](#sec-249)+- [tutorials/view-in-ar.md](#sec-250)+- [tutorials/voice-and-lipsync.md](#sec-251)+- [tutorials/walk-companion.md](#sec-252)+- [tutorials/web-component-end-to-end.md](#sec-253)### ux-flows-- [ux-flows/01-onboarding-creation.md](#sec-256)-- [ux-flows/02-forge-text-to-3d.md](#sec-257)-- [ux-flows/03-3d-editing-viewer.md](#sec-258)-- [ux-flows/04-embed-widget-studio.md](#sec-259)-- [ux-flows/05-discovery-social.md](#sec-260)-- [ux-flows/06-marketplace-skills.md](#sec-261)-- [ux-flows/07-crypto-trading-analytics.md](#sec-262)-- [ux-flows/08-coin-launch-wallets.md](#sec-263)-- [ux-flows/09-x402-agent-commerce.md](#sec-264)-- [ux-flows/10-chat-brain-labs.md](#sec-265)-- [ux-flows/11-account-dashboard.md](#sec-266)-- [ux-flows/12-home-and-content.md](#sec-267)+- [ux-flows/01-onboarding-creation.md](#sec-255)+- [ux-flows/02-forge-text-to-3d.md](#sec-256)+- [ux-flows/03-3d-editing-viewer.md](#sec-257)+- [ux-flows/04-embed-widget-studio.md](#sec-258)+- [ux-flows/05-discovery-social.md](#sec-259)+- [ux-flows/06-marketplace-skills.md](#sec-260)+- [ux-flows/07-crypto-trading-analytics.md](#sec-261)+- [ux-flows/08-coin-launch-wallets.md](#sec-262)+- [ux-flows/09-x402-agent-commerce.md](#sec-263)+- [ux-flows/10-chat-brain-labs.md](#sec-264)+- [ux-flows/11-account-dashboard.md](#sec-265)+- [ux-flows/12-home-and-content.md](#sec-266)### zauth-- [zauth/database.md](#sec-281)-- [zauth/index.md](#sec-282)-- [zauth/provider-hub.md](#sec-283)-- [zauth/reposcan.md](#sec-284)-- [zauth/vector.md](#sec-285)+- [zauth/database.md](#sec-280)+- [zauth/index.md](#sec-281)+- [zauth/provider-hub.md](#sec-282)+- [zauth/reposcan.md](#sec-283)+- [zauth/vector.md](#sec-284)---@@ -27122,1569 +27121,6 @@ Ranked by accounting/regulatory risk. Each is a tracked remediation item.<a id="sec-119"></a>-> **Source:** `docs/gcp-credits.md` · [↑ table of contents](#table-of-contents)--# GCP Credits & Vertex AI Runbook--The operational source of truth for three.ws's Google Cloud footprint: the-project, the credit grant, what's enabled, service accounts, env vars, quota,-and how to smoke-test Claude on Vertex. Prompts 02–08 append to this file as-they build on the foundation.--_Historical record — this is a date-stamped runbook from the GCP-credits program-(most sections written 2026-07-07); its per-prompt subsections are point-in-time-work logs, not current setup steps. Production has since moved to Google Cloud Run-(service `three-ws-api`), so every "set in Vercel" / `vercel env add` / `vercel --prod`-instruction below is superseded — the GCP env vars now live on the Cloud Run-service. See the **"Audit + fixes — 2026-07-08"** section at the end of this file for-what was actually wired onto Cloud Run, and the [GCP production runbook](ops/gcp-production.md)-for the live deploy/env procedure._--> **Status: foundation live; one owner console action remains for Claude.**-> `gcloud` is authenticated (`[email protected]`) against `aerial-vehicle-466722-p5`,-> all APIs are enabled, the `vercel-inference` SA is created with-> `roles/aiplatform.user`, and — as of 2026-07-07 — the four GCP env vars-> (`GCP_SERVICE_ACCOUNT_JSON`, `GOOGLE_CLOUD_PROJECT`, `GOOGLE_CLOUD_LOCATION`,-> `GOOGLE_CLOUD_LOCATION_CLAUDE`) are set in Vercel across Production, Preview,-> and Development. The smoke test proves the SA key works: **Gemini on Vertex-> returns 200** with it. **Claude on Vertex returns 404** ("Publisher model …-> not found or your project does not have access") — the sole remaining gate is-> the owner accepting the Anthropic partner-model terms in Model Garden (see-> **Enable Claude in Model Garden** and **Pending human actions**). Credit-> balance/expiry and partner-model coverage are console-only reads still owed.-------## Project--| Field | Value |-|---|---|-| **Project ID** | `aerial-vehicle-466722-p5` |-| Source of truth | Active `gcloud config` default in the dev container; the project the existing worker deploy flow and `api/_mcp3d/vertex-imagen.js` target. |-| Active gcloud account | The project owner's Google account (see team vault; not published here). |-| Known GCS buckets | `three-ws-model-weights`, `three-ws-avatar-reconstructions` |-| Default region | `us-central1` (Cloud Run + Imagen). Claude partner models use `global`. |--> Confirm the buckets live in this project once auth is restored:-> `gcloud storage buckets describe gs://three-ws-model-weights --format='value(name)'`-> If they resolve, the project ID above is correct. If not, run-> `gcloud projects list` and pick the project that owns them.-------## Credits & partner-model coverage — GO/NO-GO (billing confirmed; balance console-only)--**Billing account confirmed live 2026-07-07** (see table below). The remaining-unknowns — credit **balance, expiry, and partner-model coverage** — are not-exposed by the `gcloud billing` CLI and must be read from the console. Commands-used to confirm the account object:--```bash-# Billing account linked to the project-gcloud billing projects describe aerial-vehicle-466722-p5-# → billingAccountName: billingAccounts/01B467-A61905-9A97D2, billingEnabled: true--# The billing account object (open/closed, master)-gcloud billing accounts describe billingAccounts/01B467-A61905-9A97D2-# → displayName: Sperax, open: true, USD, parent org 530103279143-```--Credit **balance and expiry** are not exposed by the `gcloud billing` CLI. Read-them from the console:--- **Credits:** https://console.cloud.google.com/billing → select the account →- **Credits**. Record remaining balance + expiry date (target: ~$100k expiring- ~Sept 2026 — confirm the exact date).--**Critical coverage check (gates prompt 02's chain inversion):** determine-whether the credit grant covers **Vertex AI *partner* models** (Anthropic).-Google-for-Startups credits do; some promotional grants exclude third-party-publisher models.--- Console path: **Billing → Credits → click the credit** → read- **"Eligible products / scope."** If it lists "Vertex AI" broadly it covers- partner models; if it enumerates only Google-first-party services, partner- spend (Claude) falls outside and would bill real money.-- **Owner question if ambiguous:** *"Does our GCP credit grant- (account `<ACCT>`) cover Vertex AI Anthropic partner models, or Google-first-party- services only?"* — answer determines whether prompt 02 can route production- Claude traffic through Vertex credits.--Record here once confirmed:--| Field | Value |-|---|---|-| Billing account | `billingAccounts/01B467-A61905-9A97D2` — displayName **Sperax**, `open: true`, USD, org `530103279143` (verified 2026-07-07) |-| Credits applied | _pending — console Credits page (CLI cannot read it)_ |-| Remaining balance | _pending — console_ |-| Expiry date | _pending — console_ |-| Covers Anthropic partner models? | _pending — console check above_ |-------## APIs to enable (✅ all enabled 2026-07-07)--Idempotent — kept for DR/re-provision:--```bash-gcloud services enable \- aiplatform.googleapis.com \- run.googleapis.com \- cloudbuild.googleapis.com \- storage.googleapis.com \- compute.googleapis.com \- bigquery.googleapis.com \- cloudbilling.googleapis.com \- monitoring.googleapis.com \- --project aerial-vehicle-466722-p5--# Verify-gcloud services list --enabled --project aerial-vehicle-466722-p5 \- --format='value(config.name)' | sort-```--| API | Enabled? |-|---|---|-| aiplatform.googleapis.com | ✅ 2026-07-07 |-| run.googleapis.com | ✅ 2026-07-07 |-| cloudbuild.googleapis.com | ✅ 2026-07-07 |-| storage.googleapis.com | ✅ 2026-07-07 |-| compute.googleapis.com | ✅ 2026-07-07 |-| bigquery.googleapis.com | ✅ 2026-07-07 |-| cloudbilling.googleapis.com | ✅ 2026-07-07 |-| monitoring.googleapis.com | ✅ 2026-07-07 |--Also enabled 2026-07-07: `billingbudgets.googleapis.com`, `pubsub.googleapis.com` (prompt 07 budgets/alerts).-------## Service accounts--### Inventory--| SA | Purpose | Roles | Status |-|---|---|---|---|-| `avatar-reconstruction-sa@aerial-vehicle-466722-p5.iam.gserviceaccount.com` | Cloud Run workers (mesh/rig pipeline), used by `workers/deploy/*.sh` + cloudbuild | run/build identity | ✅ Confirmed valid 2026-07-07 |-| `vercel-inference@aerial-vehicle-466722-p5.iam.gserviceaccount.com` | Vercel functions → Vertex Claude + Imagen | `roles/aiplatform.user` | ✅ Created + role bound; key minted and **pushed to Vercel (all 3 envs) 2026-07-07**. Key proven working (Gemini 200). Rotate with `gcloud iam service-accounts keys create` → re-push if the local key is ever exposed. |--### Create the Vercel inference SA (done — commands kept for rotation/DR)--Check-first, then create only if absent:--```bash-PROJECT=aerial-vehicle-466722-p5-SA=vercel-inference@${PROJECT}.iam.gserviceaccount.com--# Create only if it doesn't exist-gcloud iam service-accounts describe "$SA" --project "$PROJECT" 2>/dev/null \- || gcloud iam service-accounts create vercel-inference \- --project "$PROJECT" \- --display-name "Vercel inference (Vertex Claude + Imagen)"--# Grant Vertex user-gcloud projects add-iam-policy-binding "$PROJECT" \- --member "serviceAccount:$SA" \- --role roles/aiplatform.user--# Mint a JSON key to a path OUTSIDE the repo (never commit it)-gcloud iam service-accounts keys create /tmp/vercel-inference-key.json \- --iam-account "$SA" --project "$PROJECT"-```--### Push credentials to Vercel (✅ done 2026-07-07 — commands kept for rotation)--All four vars are set for **all** environments (production, preview, development)-and verified with `vercel env ls`. To rotate the key or re-provision from scratch-(`npx vercel` is used since the CLI is not globally installed):--```bash-# Mint a fresh key to a path OUTSIDE the repo (scratchpad / /tmp, never commit it)-gcloud iam service-accounts keys create /tmp/vercel-inference-key.json \- --iam-account vercel-inference@aerial-vehicle-466722-p5.iam.gserviceaccount.com--# Value = the raw key file contents. The api/ token parser tolerates the paste.-for E in production preview development; do- cat /tmp/vercel-inference-key.json | npx vercel env add GCP_SERVICE_ACCOUNT_JSON "$E"- printf 'aerial-vehicle-466722-p5' | npx vercel env add GOOGLE_CLOUD_PROJECT "$E"- printf 'us-central1' | npx vercel env add GOOGLE_CLOUD_LOCATION "$E"- printf 'global' | npx vercel env add GOOGLE_CLOUD_LOCATION_CLAUDE "$E"-done--# Then delete the local key file-shred -u /tmp/vercel-inference-key.json 2>/dev/null || rm -f /tmp/vercel-inference-key.json--# Verify-npx vercel env ls | grep -iE 'GCP_SERVICE_ACCOUNT_JSON|GOOGLE_CLOUD'-```--> **Fixes a live production gap:** before this push, `api/_mcp3d/vertex-imagen.js`-> had no `GCP_SERVICE_ACCOUNT_JSON` in the deployed environment, so the Vertex-> image lane could only run locally. It now has real credentials in production.--### Env vars (names only — never values here)--| Name | Value shape | Scope |-|---|---|---|-| `GCP_SERVICE_ACCOUNT_JSON` | Vercel inference SA key JSON | all envs ✅ set 2026-07-07 |-| `GOOGLE_CLOUD_PROJECT` | `aerial-vehicle-466722-p5` | all envs ✅ set 2026-07-07 |-| `GOOGLE_CLOUD_LOCATION` | `us-central1` | all envs ✅ set 2026-07-07 |-| `GOOGLE_CLOUD_LOCATION_CLAUDE` | `global` | all envs ✅ set 2026-07-07 |-------## Enable Claude in Model Garden (owner console action)--Partner-model enablement is a **one-time console terms acceptance** — it cannot-be done from gcloud. Owner opens Model Garden for publisher `anthropic` and-clicks **Enable** on each model:--- Base console: https://console.cloud.google.com/vertex-ai/model-garden?project=aerial-vehicle-466722-p5- (filter by publisher **Anthropic**), then enable:- - `claude-haiku-4-5`- - `claude-sonnet-4-6`- - `claude-opus-4-8`- - `claude-sonnet-5`- - `claude-fable-5` (if listed in the region)--Accept the Anthropic terms once; enablement applies project-wide.--**Model ID mapping (repo default → Vertex):** the repo's default model string-`claude-haiku-4-5-20251001` maps to the Vertex snapshot form-`claude-haiku-4-5@20251001` (dated snapshots use `@`; current-gen bare IDs like-`claude-opus-4-8` work without a date).-------## Quota (open — file after Model Garden enablement)--Partner-model quota can only be inspected/filed once Anthropic is enabled in-Model Garden (the models don't exist for the project until then — see the 404-above). Run this the moment enablement lands, then file increases sized for-production chat:--```bash-# Inspect current online-prediction / partner-model quotas-gcloud alpha services quota list \- --service=aiplatform.googleapis.com \- --consumer=projects/aerial-vehicle-466722-p5 2>/dev/null | less-```--Console (most reliable for partner-model QPM/TPM): **IAM & Admin → Quotas &-System Limits**, filter service `Vertex AI API`, search the Anthropic model-tiers.--**Requested targets** (start; scale after go-live):--| Model tier | Region | QPM | TPM |-|---|---|---|---|-| Haiku 4.5 | `global` | 300 | 2,000,000 |-| Haiku 4.5 | `us-central1` | 300 | 2,000,000 |-| Sonnet (4.6 / 5) | `global` | 300 | 2,000,000 |-| Sonnet (4.6 / 5) | `us-central1` | 300 | 2,000,000 |--| Field | Value |-|---|---|-| Current values | _pending_ |-| Requested | per table above |-| Request IDs / status | _pending_ |-------## Smoke test — is Claude on Vertex live?--`scripts/gcp/vertex-smoke.mjs` sends a real streaming request to a Claude-partner model and prints the reply. It reads `GCP_SERVICE_ACCOUNT_JSON` from the-environment (same var Vercel uses) and needs no SDK. Run it the moment Model-Garden enablement + the SA key are in place:--```bash-export GOOGLE_CLOUD_PROJECT=aerial-vehicle-466722-p5-export GCP_SERVICE_ACCOUNT_JSON="$(cat /path/to/vercel-inference-key.json)"-node scripts/gcp/vertex-smoke.mjs-```--- **PASS** = `HTTP 200 — model replied: "…"`. Enablement, quota, billing all live.-- **403 / 404** = Claude not enabled in Model Garden yet, or the SA lacks- `roles/aiplatform.user`. The script prints the exact Model Garden URL.-- **429** = quota exceeded — file the increase above.--Optional overrides: `GOOGLE_CLOUD_LOCATION_CLAUDE` (default `global`),-`VERTEX_SMOKE_MODEL` (default `claude-haiku-4-5@20251001`), `VERTEX_SMOKE_PROMPT`.--**Last run — 2026-07-07:** `404 NOT_FOUND` — *"Publisher model-`…/publishers/anthropic/models/claude-haiku-4-5@20251001` was not found or your-project does not have access to it."* The **same SA key returns HTTP 200 against-Gemini** (`publishers/google/models/gemini-2.5-flash:generateContent`), proving-auth, billing, and `roles/aiplatform.user` are all good. The 404 is therefore-purely the Anthropic Model Garden enablement gate — re-run this script the-instant the owner accepts the terms; no code change is needed and a PASS is-expected within seconds.-------## Claude Code dev sessions → GCP credits--`scripts/gcp/claude-code-vertex.sh` routes a Claude Code dev session through-Vertex so development spend draws down the credit pool. **Opt in by sourcing**-it — it is deliberately NOT set globally in the devcontainer, so each session-picks its billing lane.--```bash-# One-time per machine (interactive):-gcloud auth application-default login--# Per shell you want on Vertex credits:-source scripts/gcp/claude-code-vertex.sh-claude # this session now bills to GCP credits-```--It exports `CLAUDE_CODE_USE_VERTEX=1`, `ANTHROPIC_VERTEX_PROJECT_ID`,-`CLOUD_ML_REGION=global`, and warns if ADC is missing. Open a fresh shell to opt-back out.-------## Vertex Claude LLM lane (chat & completions) — prompt 02--Routes the platform's Claude/Anthropic LLM traffic through Vertex AI so it bills-the GCP credit pool instead of a paid Anthropic key. Wired across **every** text-inference surface, behind two flags, with automatic fallthrough to the existing-free-first chain on any Vertex failure. Flags off ⇒ behavior is byte-identical to-before (proven by `tests/vertex-claude.test.js`).--### Flags--| Env var | Effect |-|---|---|-| `VERTEX_CLAUDE_ENABLED=1` | Vertex becomes an available Anthropic transport. In `llm.js`/`api/chat.js` it sits in the paid tier **ahead of** first-party Anthropic (GCP credits before a paid key); in `api/llm/anthropic.js` any `provider: anthropic` model streams from Vertex with first-party as the fallback; `/api/brain/chat` gains selectable "· Vertex" Claude rows. |-| `VERTEX_CLAUDE_PRIMARY=1` | Chain inversion: Vertex Claude is tried **first**, before the free lanes — the platform's default brain becomes real Claude on Vertex. Requires `VERTEX_CLAUDE_ENABLED`. A caller BYOK key still leads (their own billing choice). |--Both require `GOOGLE_CLOUD_PROJECT` (config check). Location: `GOOGLE_CLOUD_LOCATION_CLAUDE`-(default `global`). Both unset ⇒ zero code-path change.--### Wire format & model mapping--Vertex speaks the Anthropic Messages API with four differences, all handled in-`api/_lib/vertex-claude.js` (the one shared module — never scatter this):--- Model id in the **URL path**, not the body: `…/publishers/anthropic/models/<id>:streamRawPredict` (stream) / `:rawPredict` (non-stream). Regional endpoints prefix the host (`us-east5-aiplatform.googleapis.com`); `global` uses the bare host.-- Body gains `"anthropic_version": "vertex-2023-10-16"` and drops `model` (+ `stream`).-- Auth: `Authorization: Bearer <oauth>` (via `api/_lib/gcp-auth.js` — shared with Imagen) — no `x-api-key`, no `anthropic-version` header.-- Model id: bare aliases pass through (`claude-sonnet-4-6`); a dated first-party id converts to the `@` form (`claude-haiku-4-5-20251001` → `claude-haiku-4-5@20251001`) via `toVertexModelId()`.--SSE event shapes are identical to first-party, so every existing stream parser works unchanged.--### Surfaces wired--| Surface | Entry point | How Vertex is chosen |-|---|---|---|-| Server one-shot completions (agent talk/delegation, personas, x402, crons, vision) | `api/_lib/llm.js` `providerChain()` | `vertexAnthropicProvider()` inserted per flags |-| Embedded avatar/agent chat widgets (streaming) | `api/llm/anthropic.js` | `provider: anthropic` models routed to Vertex `streamRawPredict`; `x-llm-transport` response header records the transport |-| Main viewer/agent chat (streaming) | `api/chat.js` `providerOrder()` | synthetic `vertex` provider injected into the ladder |-| `/brain` comparison page | `api/brain/chat.js` | "Claude … · Vertex" specs via `streamVertex()` |--### Telemetry marker--Vertex traffic is recorded as provider **`vertex-anthropic`** distinctly from-first-party `anthropic` (in `recordEvent` for `llm.js`/`api/llm/anthropic.js`, and-`meta.provider` for `api/chat.js` via `route.via`), so prompt 07's spend reporting-attributes it. The embed proxy also returns an `x-llm-transport: vertex-anthropic`-response header.--### Smoke test (needs a running dev server + creds)--`scripts/gcp/vertex-llm-smoke.mjs` hits three live surfaces and asserts Vertex served-each. (Distinct from prompt 01's `vertex-smoke.mjs`, which is a single raw Claude call.)--```bash-GOOGLE_CLOUD_PROJECT=aerial-vehicle-466722-p5 \-GCP_SERVICE_ACCOUNT_JSON="$(cat /path/to/vercel-inference-key.json)" \-VERTEX_CLAUDE_ENABLED=1 VERTEX_CLAUDE_PRIMARY=1 npm run dev # terminal 1--node scripts/gcp/vertex-llm-smoke.mjs # terminal 2-# (a) POST /api/forge-enhance → asserts provider=vertex-anthropic-# (b) POST /api/llm/anthropic → asserts x-llm-transport=vertex-anthropic (set SMOKE_AGENT_ID)-# (c) POST /api/chat → asserts done.provider=vertex (set SMOKE_BEARER)-```--Browser verification (definition of done): with the flags on, open an embedded agent-widget page and the main chat, send messages, confirm streamed replies + no console-errors + `vertex-anthropic` in server logs; then unset the flags and confirm today's-behavior is intact.--### Deploy & rollback--- **Preview first:** set `VERTEX_CLAUDE_ENABLED=1` (and optionally `VERTEX_CLAUDE_PRIMARY=1`) in Vercel **preview** only. Production flags stay unset — flipping production changes the billing lane and is the owner's call.-- **Production flip (owner):** `printf '1' | vercel env add VERTEX_CLAUDE_ENABLED production` (+ `VERTEX_CLAUDE_PRIMARY` for chain inversion), then redeploy.-- **Rollback (instant, no code deploy):** unset `VERTEX_CLAUDE_ENABLED` / `VERTEX_CLAUDE_PRIMARY`. Every lane falls through to Groq → OpenRouter → NVIDIA → paid backstop exactly as before.-------## Vertex image lane (text→3D reference images) — prompt 03--The forge text→3D chain synthesizes a reference image, then reconstructs a GLB-from it (TRELLIS / Hunyuan3D). That image step can bill to GCP credits instead of-NVIDIA NIM FLUX / Replicate. Client: `api/_mcp3d/vertex-imagen.js`; selector:-`api/_mcp3d/text-to-image.js`.--### Model landscape — Imagen `:predict` is being retired (verified 2026-07)--The dormant client defaulted to `imagen-3.0-generate-001`. That endpoint is **dead**:-Google is shutting down the entire Imagen `:predict` family.--| Model | API shape | Status (2026-07) |-|---|---|---|-| `imagen-3.0-generate-001` / `-002` | `:predict` | Shut down ~**2026-06-30** (404s now) |-| `imagen-3.0-capability-001` (edit) | `:predict` | Retired ~**2026-06-30**, no mask-edit successor |-| `imagen-4.0-generate-001` / `-fast` / `-ultra` | `:predict` | Deprecated; discontinued **2026-06-30…2026-08-17** |-| **`gemini-2.5-flash-image`** ("Nano Banana") | `:generateContent` | **GA, recommended** — bills to the same GCP credits |--So the client now **defaults to `gemini-2.5-flash-image`** and routes on the model id:-`gemini*` → `:generateContent`; `imagen*` → legacy `:predict` (for an explicit-override while any Imagen endpoint is still callable). It also handles the `global`-location (un-prefixed host).--### Flag & models--| Env var | Default | Meaning |-|---|---|---|-| `VERTEX_IMAGEN_ENABLED` | unset ⇒ **on when `GOOGLE_CLOUD_PROJECT` set** | Explicit lane switch, decoupled from the shared project var (which Vertex Claude + workers also need). Set `0`/`false`/`no`/`off` to force the image lane off without unsetting the project. |-| `VERTEX_IMAGEN_MODEL` | `gemini-2.5-flash-image` | Generation model. An `imagen-*` value uses the legacy `:predict` path. |-| `VERTEX_IMAGEN_EDIT_MODEL` | `gemini-2.5-flash-image` | Edit model (`editImage()`); `imagen-*` routes to `:predict` inpainting. |--Ladder is unchanged and fully preserved: **NIM FLUX → Vertex → Replicate**, with-any Vertex error degrading cleanly to FLUX. Which provider served each image is-logged (`[text-to-image] served by <model>`) and persisted on the forge job as-`text_to_image_model`.--### Verification status--Static verification is **done**: model IDs checked against live Vertex docs; both-request/response shapes and the gate + fallback are covered by unit tests-(`tests/api/vertex-imagen.test.js`, `tests/api/text-to-image.test.js` — green).--**Live E2E passed 2026-07-07**: `generateImage()` against the real project-(`vercel-inference` SA key, `us-central1`) returned a 901 KB on-prompt PNG —-`served by vertex-ai/gemini-2.5-flash-image`, isolated subject on a plain white-background, visually verified. The 3–4-prompt quality gate is now **also done**-(results below). The Vercel env push is **also done** —-`GOOGLE_CLOUD_PROJECT`, `GOOGLE_CLOUD_LOCATION`, and `GCP_SERVICE_ACCOUNT_JSON`-are set in production (commit 28220d673). `VERTEX_IMAGEN_ENABLED` is unset, so the-lane auto-activates as the fallback the moment a deployment carrying those vars-goes live — no separate flag flip needed. Until the next prod deploy propagates-them, `/api/v1/ai/image?health=1` still shows the running deployment as `nim`-only.-The E2E command used:--```bash-export GOOGLE_CLOUD_PROJECT=aerial-vehicle-466722-p5-export GOOGLE_CLOUD_LOCATION=us-central1 # or "global" if the model requires it-export GCP_SERVICE_ACCOUNT_JSON="$(cat /path/to/vercel-inference-key.json)"-export VERTEX_IMAGEN_ENABLED=1-node -e '- import("./api/_mcp3d/vertex-imagen.js").then(async ({ generateImage }) => {- const { imageUrl, model } = await generateImage("a stylized red robot, isolated subject, plain white background", { aspectRatio: "1:1" });- const b64 = imageUrl.split(",")[1];- require("fs").writeFileSync("/tmp/vertex-sample.png", Buffer.from(b64, "base64"));- console.log("served by", model, "→ /tmp/vertex-sample.png");- });-'-```--### Quality gate — results (2026-07-07)--Ran the same 4 prompts through the real `gemini-2.5-flash-image` client (`robot`,-`knight`, `fox`, `chest`), driving `generateImage()` with the `vercel-inference`-SA key. Verdict: **Gemini is a high-quality, on-prompt reference-image lane, fully-fit for the paid text→3D chain — not a regression.** All four came back ~0.9–1.4 MB-PNGs in ~6 s, and 3 of 4 (`robot`, `knight`, `chest`) were textbook 3D references:-a single centered subject, even studio lighting, pure white background, clean-readable geometry.--The one outlier (`fox`) surfaced a **real bug in the shared prompt heuristic, not a-Gemini weakness.** `enhanceFluxPrompt()` gated the isolation suffix on art-style-words — `"cartoon"` in `"a cartoon fox…"` suppressed-`", isolated subject, … plain white background"`, so Gemini rendered a full-illustrated forest scene (mushrooms, trees, path) that the 3D backend cannot-reconstruct. Re-running the same prompt **with** the suffix produced a perfectly-isolated cartoon fox on white. Fix shipped: `COMPOSITION_CUE_WORDS` now lists only-background/lighting/composition cues (no `cartoon`/`stylized`/`colorful`/`vibrant`)-and matches whole words, so a stylized subject — and substrings like `light` in-`lightsaber` — still get isolated. The suffix is only ever *added* relative to the-old behavior, so this improves **both** lanes (FLUX included) and cannot regress-either. Covered by `tests/api/text-to-image.test.js` (`enhanceFluxPrompt` block).--Live FLUX side-by-side samples were not captured: the prod `/api/v1/ai/image` POST-returned `FUNCTION_INVOCATION_TIMEOUT` during the run and there is no NVIDIA key in-the local env, so FLUX could not be driven locally. The verdict rests on the-inspected Gemini outputs plus the known FLUX.1-schnell characteristics; it does not-depend on ranking the two lanes, because Gemini stays the **fallback** (NIM FLUX-still leads the ladder) and its quality clears the bar for that role.--**Recommendation:** quality is not a blocker. Keep **NIM FLUX primary** (free, fast,-already carries prod) and Gemini as the credit-funded fallback that activates-whenever NIM is absent/down. No quality carve-out (draft-lane-only) is needed. The-GCP envs are already in Vercel prod, so the lane goes live on the next deployment;-instant rollback stays available via `VERTEX_IMAGEN_ENABLED=0`.--### Deploy & rollback--- **Preview first:** `printf '1' | vercel env add VERTEX_IMAGEN_ENABLED preview`.- Exercise `/api/forge` (text mode) and confirm the log shows- `served by vertex-ai/gemini-2.5-flash-image`.-- **Production** only after the quality gate passes cleanly:- `printf '1' | vercel env add VERTEX_IMAGEN_ENABLED production`.-- **Rollback (instant, no deploy):** set `VERTEX_IMAGEN_ENABLED=0` in the affected- environment — the lane drops to NIM FLUX → Replicate immediately. Removing- `GOOGLE_CLOUD_PROJECT` also disables it but would break Vertex Claude/workers, so- prefer the flag. To pin a specific model instead, set `VERTEX_IMAGEN_MODEL`.-------## Pending human actions (do these, in order)--**✅ Done 2026-07-07 (no owner action needed — recorded for history):**--- ~~Restore gcloud auth~~ — authenticated `[email protected]` on- `aerial-vehicle-466722-p5`.-- ~~Enable all APIs~~ — 8 required + `billingbudgets` + `pubsub` (tables above).-- ~~Create `vercel-inference` SA + bind `roles/aiplatform.user`~~.-- ~~Push GCP env vars to Vercel~~ — `GCP_SERVICE_ACCOUNT_JSON`,- `GOOGLE_CLOUD_PROJECT`, `GOOGLE_CLOUD_LOCATION`, `GOOGLE_CLOUD_LOCATION_CLAUDE`- set across Production/Preview/Development; verified with `npx vercel env ls`.-- ~~Prove the SA key works~~ — Gemini on Vertex returns 200 with it.--**⏳ Still owed — owner console actions, in order:**--1. **Enable Claude in Model Garden** — the ONE gate for all Vertex Claude- traffic (prompt 02). Console → accept Anthropic partner-model terms → enable- `claude-haiku-4-5`, `claude-sonnet-4-6`, `claude-opus-4-8`, `claude-sonnet-5`,- and `claude-fable-5` (if listed). **Confirmed still missing 2026-07-07:** the- smoke test returns `404 NOT_FOUND` on `publishers/anthropic/models/*` while- the same SA serves Gemini fine — terms acceptance is the only blocker. The- moment it lands, run `node scripts/gcp/vertex-smoke.mjs` for a green PASS- (closes prompt 01's smoke criterion) and then file partner-model quota.-2. **Confirm credits + partner-model coverage** — console Credits page; read the- balance + expiry and confirm the grant covers Vertex AI *partner* (Anthropic)- models. GO/NO-GO for prompt 02's chain inversion. `gcloud billing` cannot- expose balance/expiry — this is console-only.-3. **`gcloud auth application-default login` (ADC)** — only needed for Claude- Code dev sessions on Vertex (`scripts/gcp/claude-code-vertex.sh`) and any- ADC-only script. Production `api/` uses the SA key, not ADC, so this does not- block anything shipped.-4. **Enable the BigQuery billing export** (prompt 07) — console-only:- Billing → Billing export → BigQuery. Confirmed 2026-07-07 no dataset exists- (`bq ls` empty; `burn-report.mjs` → "export not configured").--Update the cells in this file as each step completes.------------# Premium vanity inventory (prompt 06)--Grind long, brandable Solana vanity addresses **ahead of time** on cheap spot CPU-and sell them from stock via a new x402 tier — the durable, near-zero-marginal-cost-"asset factory" use of the credits. The live grinder (`/api/x402/vanity`, the-`vanity_grinder` MCP tool) still handles fresh ≤3-char grinds; this is the 4–5+-char **sell-from-stock** lane.--## Shape--```-targets → workers/vanity-grinder (spot CPU) → seal in-process → vanity_inventory (ciphertext)- │- browse: /vanity/premium ── /api/x402/vanity-premium (list) ─────┤- buy: /api/x402/vanity-premium?address=… (x402) → reserve → settle → reveal ONCE → destroy-```--- **Grinder:** `workers/vanity-grinder/` (Node + the same Rust/WASM ed25519 engine- as the serverless tier, one worker/vCPU). Seals every key with- `api/_lib/vanity-vault.js` **before any write**; writes only ciphertext.- Resumable (checkpoint) and SIGTERM-clean for spot preemption.-- **Store:** `vanity_inventory` (migration `20260706120000_vanity_premium_inventory.sql`),- atomic single-use reveal in `api/_lib/vanity-inventory-store.js`.-- **Sell:** `api/x402/vanity-premium.js` (list + buy + one-time delivery),- browsable at `/vanity/premium`, plus the free `vanity_premium` MCP browse tool.-- **Encryption:** secret-box AES-256-GCM (`WALLET_ENCRYPTION_KEY`) by default —- the platform's custodial-key pattern — with an **optional GCP-KMS envelope**- (`VANITY_KMS_KEY`) that gates decrypt to the delivery identity via IAM.--## Run it (owner) — executed 2026-07-07, see "Measured throughput" below--```bash-export PROJECT_ID=aerial-vehicle-466722-p5--# 1) (recommended) KMS envelope — key-level decrypt granted to the delivery SA,-# encrypt-only to the grinder SA (project owners still inherit decrypt — see-# the threat model's "Insider access" row):-./scripts/gcp/vanity-kms-setup.sh # prints VANITY_KMS_KEY--# 2) Put the vault secrets in Secret Manager (grinder + delivery both need them):-# WALLET_ENCRYPTION_KEY, JWT_SECRET, DATABASE_URL (and VANITY_KMS_KEY as env)--# 3) Build + run the grinder on spot CPU, writing straight to the DB:-VANITY_KMS_KEY=<from step 1> WRITE_DB=1 TASKS=8 CPU=8 \- ./scripts/gcp/vanity-grind-deploy.sh --run # Cloud Run Job (spot)-# …or a GCE spot MIG for very large runs:-# ./scripts/gcp/vanity-grind-deploy.sh --mig --instances 20--# 4) (file path) load an encrypted JSONL a run produced into the DB:-node scripts/vanity-inventory-load.mjs --file workers/vanity-grinder/out/inventory.jsonl-node scripts/vanity-inventory-load.mjs --stats-```--Migration first: `npm run db:migrate` (applies `20260706120000_vanity_premium_inventory.sql`).--## Measured throughput & $/address--**Real production run — 2026-07-07, Cloud Run Job, 4 tasks × 4 vCPU (16 vCPU),-`IGNORE_CASE=1 INCLUDE_5=1`, KMS-envelope sealing.** The full 115-target list-(brandable 3/4/5-char prefixes + suffixes) was ground; every found key was sealed-in-process with the `gcp-kms+aes-256-gcm` scheme and written straight to-`vanity_inventory` — no plaintext ever hit disk, a log, or the DB.--| metric | value |-|---|---|-| Runner | Cloud Run Job (spot-labelled), gen2, 4×4 vCPU |-| Sealing | KMS envelope (`gcp-kms+aes-256-gcm`) — 100% of records |-| Throughput / WASM thread | **~18,000–20,000 keys/sec sustained** on the long grinds (measured: KELP… 34.5M attempts in 1,744s ≈ 19.8k/s; LUNA… 41M in 2,230s ≈ 18.4k/s), single ed25519 WASM worker |-| Inventory loaded | **107 addresses ground** (106 available + 1 consumed by the E2E test): 2 uncommon · 43 rare · 46 epic · 14 legendary · 2 mythic, rarity-priced **$1–$50** |-| Round-trip proof | every delivered key decrypts and its ed25519 pubkey == the stored address |--Cost at c2d **spot** ≈ $0.015 / vCPU-hour. Price is value-based ($1–$50 by rarity),-so the margin is enormous — the entire point of grinding on free credits:--| pattern | expected attempts | vCPU-seconds | **$/address (spot)** | list price |-|---|---:|---:|---:|---:|-| 3-char, case-insensitive | ~36k | 1.4 | $0.000006 | $1 |-| 4-char, case-insensitive | ~1.2M | 47 | $0.0002 | $2–$5 |-| 4-char, case-sensitive | ~11.3M | 452 | $0.0019 | $6–$13 |-| 5-char, case-sensitive | ~656M | 26,244 | $0.11 | $30–$50 |--**Finding — Base58 leading-char bias:** a 32-byte value's *leading* Base58 char is-**not** uniformly distributed, so a case-**sensitive** prefix can be far harder than-the naive 58ⁿ estimate (some leading chars are near-impossible). The grinder caps-per-target attempts (`MAX_ATTEMPTS_PER_TARGET`, default 200M) and gives up on such-targets instead of hanging a worker. **Case-insensitive prefixes and suffixes-(uniform tail) are dramatically cheaper per useful address** — weight target lists-toward them. Revenue math: even 200 addresses cost cents of credits to grind and-list at $1–$50 each — a four-figure sellable asset for a near-zero credit outlay.--**Fix landed this run — worker stop signal.** `grindToCompletion` is a *synchronous*-loop, so a worker mid-target never drains its message queue; the old-`postMessage({type:'stop'})` sat unread until the (possibly hard) target finished,-hanging the process on `MAX_FOUND` and on SIGTERM. The stop signal is now a-`SharedArrayBuffer` atomic the sync loop polls at each 25k-key batch boundary, so-every worker aborts within a fraction of a second — proven by-`tests/vanity-wasm-grinder.test.js` ("grindToCompletion stop signal"). Two Cloud-Build/Run gaps were also fixed: the Dockerfile now copies `src/shared` (the WASM-glue imports `src/shared/log.js` — without it every worker crashed at load and the-job wrote zero rows), and the deploy script builds via a cloudbuild config as the-`three-ws-build` SA (this project has no legacy Cloud Build SA) instead of the-mutually-exclusive `--tag`+`--config`.--**Note — "spot" runner.** The Cloud Run Job path bills cheap per-vCPU-second and is-labelled `billing=spot`, but Cloud Run Jobs are not literally GCE Spot VMs. For true-Spot preemptible pricing on very large runs, use `--mig` (a GCE Spot MIG); the-grinder is preemption-safe either way (SIGTERM → checkpoint → resume skips finished-targets).--## E2E verification (2026-07-07)--The full production delivery pipeline was exercised against the **real Neon DB and-real Cloud KMS**, authenticated as the **actual delivery identity**-(`vercel-inference` SA), on a real inventory row (`navPJe3…GW1`, a `$2` rare):--- **KMS decrypt** as the delivery SA succeeded (`scheme=gcp-kms+aes-256-gcm`); the- decrypted key's ed25519 pubkey **equals the stored address** (delivered key is valid).-- **Single-use:** first `reserveAndReveal` returned `destroyed=true`, status- `destroyed`; a second call was refused (`already_revealed`); the ciphertext is no- longer retrievable at rest (delete-after-reveal, retention 0).-- **Insider isolation (partial):** the **grinder SA has no decrypt binding** (key IAM- verified) so it can never read back what it seals; a project **owner can** decrypt- (see the threat model's honest caveat).--The one leg not driven here is the on-chain **USDC settlement** (`verifyPayment` /-`settlePayment`) — that is the shared x402 rail already live across every paid-three.ws endpoint; a real settlement needs a funded buyer wallet. Everything the-premium tier adds on top of that rail (KMS-sealed inventory, atomic single delivery,-destruction, custody disclosure) is verified above.--## Security review (threat model)--The store holds **real private keys**; the design defends each realistic threat:--| threat | mitigation |-|---|---|-| **DB dump** | Keys are AES-256-GCM (or KMS-envelope) ciphertext with a random per-record salt. A dump yields no spendable key without `WALLET_ENCRYPTION_KEY` (and, under KMS, a live IAM-gated decrypt call). |-| **Log leakage** | No secret is ever logged. The grinder's only "found" line is the public address + attempt count; the endpoint strips secret fields from the idempotency cache; the store's public reads select an explicit column list that omits `secret_ciphertext`. Verified by grep (`git grep -nE 'console.*(secretKey|privateKey|ciphertext)'` over the new files → none). |-| **Delivery replay / double-spend** | Single-use is a server-side atomic CTE (`reserveAndReveal`): the reveal flips status and nulls the ciphertext in one statement guarded by `status IN ('reserved','sold') AND secret_ciphertext IS NOT NULL`. A second call captures zero rows → `already_revealed`. The x402 idempotency cache stores a secret-free copy. |-| **Charge-without-delivery** | The endpoint decrypts (non-destructive peek) **before** settling; a KMS/decrypt outage fails the purchase *before* charging. Settle → reveal(destroy) only after decrypt is proven. |-| **Insider access** | With `VANITY_KMS_KEY` set, the KMS key's own IAM policy grants `cryptoKeyDecrypter` **only** to the delivery SA (`vercel-inference`) and `cryptoKeyEncrypter` **only** to the grinder SA — so **the grinder can seal keys but can never read them back**, and every decrypt is Cloud-Audit-Logged (verified 2026-07-07: `gcloud kms keys get-iam-policy` shows exactly those two key-level bindings). **Honest caveat:** a GCP project **Owner/Editor** inherits `cloudkms.*.decrypt` and *can* decrypt (an owner can always self-grant — verified: `[email protected]` with `roles/owner` decrypted a real wrapped DEK). So KMS raises the floor — a DB dump is useless, a `WALLET_ENCRYPTION_KEY` leak no longer decrypts KMS-scheme records, and no *service* identity except delivery can read keys — but it does **not** wall off a compromised project owner. That tier is covered by owner-account MFA, org-policy, and the Cloud Audit Log, not by the key IAM. |-| **Custody dishonesty** | Every listing + delivery carries the required disclosure: platform-generated keys → use as a token mint or sweep to self-generated custody, not a treasury. Delete-after-reveal (retention 0) is the default. |--## Revert / wind-down--One-shot asset — nothing to revert. The inventory persists in the app DB and sells-down at **zero ongoing GCP cost** after the grind. Tear down the grinder MIG/Job-when a batch finishes (the deploy script prints the command). See the keep/kill-table below.-----------# Expiry revert & keep/kill runbook (prompt 08)--The credits expire (~$100k, target ~Sept 2026 — confirm the exact date on the-console Credits page). This section makes that a non-event: a proven, env-only-path back to the pre-program providers, plus a data-driven keep/kill call per lane.--**Core fact:** every credit-funded reroute is gated by an env var, and each lane-already falls through to the provider it displaced. So the revert is a config-change, never a code migration. Proven at the code level by-`tests/api/gcp-revert.test.js` (7 assertions, green).--## The lanes and how each reverts--| Lane | Gate (present ⇒ GCP lane live) | Reverts to | Code |-|---|---|---|---|-| **Vertex Claude** (chat/LLM) | `VERTEX_CLAUDE_ENABLED` (+`_PRIMARY`), needs `GOOGLE_CLOUD_PROJECT` | Groq → OpenRouter → NVIDIA → paid backstop | `api/_lib/vertex-claude.js`, `api/chat.js` `providerOrder()` |-| **Vertex Imagen** (text→image) | `GOOGLE_CLOUD_PROJECT` (+`GCP_SERVICE_ACCOUNT_JSON`) | free NIM FLUX → Replicate | `api/_mcp3d/vertex-imagen.js`, `text-to-image.js` |-| **Forge TRELLIS self-host** | `MODEL_TRELLIS_URL` + `GCP_RECONSTRUCTION_KEY` | free NIM/HF → Replicate | `api/_lib/forge-tiers.js` |-| **Forge Hunyuan3D self-host** | `GCP_HUNYUAN3D_URL` + `GCP_RECONSTRUCTION_KEY` | free HF Spaces → Replicate | `forge-tiers.js` |-| **Forge TripoSG sketch** | `GCP_TRIPOSG_URL` + `GCP_RECONSTRUCTION_KEY` | none — option hides | `forge-tiers.js` |-| **Game-Ready remesh** | `GCP_REMESH_URL` + `GCP_RECONSTRUCTION_KEY` | none — export hides | `forge-tiers.js` (`OUTPUTS`) |-| **Avatar reconstruct/rerig** | `GCP_RECONSTRUCTION_URL` + `_KEY` | Replicate → HF Spaces | `api/_lib/regen-provider.js` |-| **Editing** (rembg/texture/segment) | `GCP_REMBG_URL` / `GCP_TEXTURE_URL` / `GCP_SEGMENT_URL` | in-lane fallback / off | `workers/deploy/deploy-editing.sh` |-| **Vanity inventory** | — (one-shot; already ground) | n/a — sells down | `api/_lib/vanity-inventory-store.js` |--## Revert runbook (a tired human at 2am can follow this)--Tooling: `scripts/gcp/revert-to-free.sh` (this is the planned revert; the panic-sibling for a runaway bill is `scripts/gcp/emergency-stop.sh`).--**Step 0 — confirm the fallbacks exist before pulling any gate.** The only way-this breaks a feature is removing a GCP gate while its fallback is also unset.-Confirm in Vercel prod: `NVIDIA_API_KEY` (free NIM), `HF_TOKEN` (free HF),-`REPLICATE_API_TOKEN` (paid backstop). The script's pre-flight checks this and-warns per lane:-```bash-scripts/gcp/revert-to-free.sh # dry-run: full plan + per-lane pre-flight, changes nothing-```--**Step 1 — remove the env gates from Vercel** (the script prints the exact-`vercel env rm … production/preview` for every var). Removing the gate *is* the-revert. Groups: the `VERTEX_CLAUDE_*` flags; the Imagen vars; the forge-`GCP_*_URL`/`MODEL_TRELLIS_URL`/`GCP_RECONSTRUCTION_*`; the editing URLs. Then:-```bash-vercel --prod-```--**Step 2 — drop Cloud Run workers to min-instances=0.** The deploy scripts never-set `--min-instances`, so workers are already scale-to-zero; this is an idempotent-confirm:-```bash-scripts/gcp/revert-to-free.sh --apply # min-instances=0 on every worker-```--**Step 3 — verify (2 min):**-- `curl "$SITE/api/forge?catalog=1"` → GCP backends show `"configured": false`; free NIM/HF show `true`.-- text→3D routes to free NIM, photo→3D to free HF, avatar reconstruct to Replicate/HF — all succeed.-- a text→image returns from `nvidia` (not `vertex-ai/*`); a chat completion's `route.via` is a free provider (not `vertex-anthropic`).--## Proving the revert--- **Automated (CI):** `npx vitest run tests/api/gcp-revert.test.js` — flips each- gate and asserts the fallthrough (forge self-host→HF→Replicate; avatar- gcp→replicate→hf→none; Imagen `isConfigured` off; Vertex Claude- `vertexClaudeEnabled`/`vertexClaudePrimary` off). This locks the mechanism.-- **Live preview (owner, needs Vercel+GCP creds):** in a preview, set the gates →- confirm lanes serve from GCP; run the Step-1 removals → confirm every feature- still works on the free/original providers. The `?catalog=1` check makes this a- 2-minute confirmation, not an investigation.-- **Live verification run (2026-07-07, gcloud + Vercel authed):**- - `revert-to-free.sh` dry-run executed against the live project — pre-flight,- the full `vercel env rm` block, and the min-instances loop all render- correctly; idempotent (re-run produces the identical plan).- - `teardown.sh` dry-run enumerated **real** resource state: `model-triposr`- deployed (would delete), `gs://three-ws-model-weights`, the- `avatar-reconstruction-key` secret and its SA present; all other workers and- the Artifact Registry repo not created yet — the script skips them cleanly.- - **Production already runs the revert-target state for chat and forge:**- `https://three.ws/api/forge?catalog=1` shows every GCP self-host lane- (`trellis_selfhost`, `hunyuan3d`, `triposg`) `configured:false` and the free- NIM/HF lanes `configured:true` and leading; `VERTEX_CLAUDE_ENABLED`/`_PRIMARY`- are not set in Vercel, so chat runs the free ladder. The four- `GOOGLE_CLOUD_*`/`GCP_SERVICE_ACCOUNT_JSON` vars landed in prod+preview- 2026-07-07 (arming Imagen as backstop behind free NIM FLUX) — the Step-1- removal block is the exact revert for them.- - Net: the free/original-provider state is not hypothetical — it is what- production serves today, and the flip-on side is what remains gated on the- owner (Model Garden terms for Claude; worker deploys for forge).--## Keep / kill — post-expiry economics--Pull **real per-lane spend and volume** from the burn report (prompt 07):-```bash-node scripts/gcp/burn-report.mjs # human-readable: spend by lane (vertex-claude|imagen|forge-gpu|vanity)-node scripts/gcp/burn-report.mjs --json # machine-readable, for the decision below-```-The decision *math* below is fixed; plug the lane's actual spend/volume into it.--**Cloud Run L4 unit cost** (verify the current L4 rate; worked example at-≈ $0.71/GPU-hr = $0.000197/GPU-sec):--| Lane | Active/asset | Warm | Cold |-|---|---|---|---|-| TRELLIS self-host (standard) | ~60 s | ~$0.012 | ~$0.024 |-| Hunyuan3D self-host (high) | ~120 s | ~$0.024 | ~$0.039 |-| TripoSG sketch | ~45 s | ~$0.009 | ~$0.018 |-| Remesh (Game-Ready) | ~35 s | ~$0.007 | ~$0.010 |--Retail prices (`api/_lib/forge-tiers.js`, source of truth): **draft $0.05,-standard $0.15, high $0.50; Game-Ready $0.10.** (The prompt's "$0.25/$0.45" are stale.)--| Lane | Recommendation | Why (math) |-|---|---|---|-| **Vertex Claude** | **Keep only if Vertex ≤ first-party Anthropic per token AND quality holds; else revert to free lanes** | Chat's free tier (Groq/OpenRouter/NVIDIA) costs $0 and already carries prod. Vertex Claude earns its keep only where quality needs a frontier model AND the Vertex partner-model token price beats calling Anthropic first-party. Compare `burn-report.mjs` vertex-claude spend ÷ tokens vs Anthropic list price. If Vertex ≈ Anthropic, revert to first-party (one less dependency); if free lanes suffice for the traffic, revert to free. |-| **Forge self-host — FREE-tier gens** | **Kill (revert to NIM/HF)** | Self-host serves free-first, so most gens earn **$0**. On credits: ~100% margin. Post-expiry: **$0.012–0.039 GPU for $0 revenue = pure loss.** Free NIM/HF cost $0 and cover these. |-| **Forge self-host — PAID x402 gens** | **Keep iff paid volume clears the floor** | Paid standard: **$0.15 − ~$0.012–0.024 ≈ 6–12× margin.** High: **$0.50 − ~$0.024–0.039 ≈ 13–20×.** Great per-call, but scale-to-zero means cold starts and near-idle GPU at low volume. Keep only if `burn-report.mjs` forge-gpu paid-gen volume beats Replicate (~$0.03–0.05/run, zero idle); else revert paid tiers to Replicate too. |-| **Vertex Imagen** | **Kill (revert)** | Free **NIM FLUX already leads** the chain; Imagen only serves when NIM is absent/down. On credits it was a free quality bump (~$0.02–0.04/img); post-expiry it's real money for a rarely-leading lane. NIM (free) + Replicate ($0.003) cover it. |-| **Avatar reconstruct/rerig** | **Revert to Replicate** | `resolveProviderName()` already prefers Replicate; its pinned reliability at per-run cost beats idle GPU unless reconstruct volume is high (check the report). |-| **Editing workers** | **Revert / delete at teardown** | Auxiliary, low value; degrade to in-lane fallback or hide. No standing cost once min-instances=0. |-| **Vanity inventory** | **Done — keep the assets** | One-shot batch already ground; inventory persists in the app store and sells down at **zero ongoing GCP cost.** |--**Bottom line:** revert everything to free/original providers at expiry. The only-lanes worth keeping on paid GCP are (a) forge **paid-tier** generation if the burn-report shows enough paid volume to beat Replicate, and (b) Vertex Claude only where-its token price beats first-party Anthropic — both numbers to pull on the day.--## Durable-asset audit — nothing user-facing dies with the credits--No committed data or served page references a `gs://` or `*.run.app` URL (grepped-`data/`, `public/`). Every durable output is on R2, independent of GCP:--| Asset | Lives on | Dies with credits? |-|---|---|---|-| Generated GLBs (forge/avatar) | R2 | No — GCS `OUTPUT_BUCKET` is only the pipeline's internal handoff |-| Seeded avatar catalog / animation library | R2 + repo data | No |-| Vanity inventory | app store / R2 | No |-| Model weights | GCS `WEIGHTS_BUCKET` | Yes, **but re-downloadable** (HuggingFace) — safe to delete, re-stage via `workers/deploy/stage-weights.sh` |--**One dependency to watch:** avatar reconstruct routes to `gcp` when *only*-`GCP_RECONSTRUCTION_URL` is set. If a deployment has no `REPLICATE_API_TOKEN` and-no `HF_TOKEN`, reverting turns reconstruction off. Step-0 pre-flight catches this —-ensure a non-GCP reconstruct provider key is in Vercel prod before the revert. No-blocking fixes filed; the fallback chains already exist in code.--## Teardown plan — stop all post-credit billing--Run **after** the revert is verified and traffic has drained.-`scripts/gcp/teardown.sh` is **dry-run by default** — do NOT run it now.-```bash-scripts/gcp/teardown.sh # dry-run: list what it would delete-scripts/gcp/teardown.sh --apply # Cloud Run + Artifact Registry + weights bucket + secret + SA-scripts/gcp/teardown.sh --apply --include-output # ALSO the OUTPUT bucket (confirm R2 copy first)-```-Deletes the GPU/controller Cloud Run services, the docker Artifact Registry repo,-the (re-downloadable) `WEIGHTS_BUCKET`, the worker secret, and the runtime SA.-Keeps the `OUTPUT_BUCKET` unless `--include-output`. Never auto-deletes: the-Firestore `(default)` DB or the GCP project (prints the commands for both).--## Owner one-pager--- **Permanent (survives the credits):** the forge quality/lane system (free-first,- GCP + paid vendors behind env gates), Vertex Imagen path, avatar reconstruct with- a 3-provider chain, the Vertex Claude chat lane (flag-gated), the vanity inventory- (one-shot, sold down), and all generated assets on R2. **None depend on the credits- to keep working** — the GCP lanes were preferred routes, not load-bearing.-- **Total credits used:** `node scripts/gcp/burn-report.mjs` (needs the BigQuery- billing export configured; see its header). Program budget targets: Claude-on-Vertex- $40–60k, GPU fleet $15–25k, Imagen $3–5k, misc ~$5k.-- **Day-of revert:** `scripts/gcp/revert-to-free.sh` (dry-run → read pre-flight →- paste the `vercel env rm` block → `vercel --prod` → `--apply` for min-instances=0 →- verify with `?catalog=1`). ~10 min, zero user-visible breakage.-- **Keep/kill in one line:** revert everything to free/original providers; keep paid- GCP only for (a) forge paid-tier gens if the burn report shows the volume, and- (b) Vertex Claude where its token price beats first-party Anthropic.-- **Then:** `scripts/gcp/teardown.sh --apply` to delete the idle resources and zero the bill.--_Revert section last verified against source: 2026-07-06; scripts dry-run against-live GCP and prod revert-state confirmed 2026-07-07._-------## GPU worker fleet — self-hosted 3D stack (prompt 04)--Deploys the six Cloud Run L4 GPU workers that back the forge lanes so the paid-lane stops paying Replicate and the free lane stops being throttled by hosted-NVIDIA NIM: **TRELLIS** (text/image→3D), **Hunyuan3D**, **TripoSG** (sketch→3D),-**TripoSR** (fast mesh), **UniRig** (auto-rig), **text2motion**. Everything-reverts by unsetting env URLs and the `FORGE_SELFHOST_PRIMARY` flag.--> **Status: code wired & tested; deploy blocked on the same gcloud reauth as the-> foundation above.** The router flag, raised free-lane ceilings, and their tests-> are landed and green. The six `gcloud builds submit` deploys, weight staging,-> Vercel env wiring, and E2E verification all need live GCP auth (**Pending human-> actions**, step 1). Latency/cost cells below are **pre-deploy estimates** — the-> exact command to replace them with measured values is in *Cost per asset*.--### Router wiring (landed, flag-gated, OFF by default)--Self-host was already the health-aware default when its worker URLs are set-(`api/_lib/forge-tiers.js` — `freeLaneCandidates` → `resolveBackendIdWithHealth`).-Prompt 04 adds one flag that makes the fleet *primary* across every tier/path:--- **`FORGE_SELFHOST_PRIMARY=1`** — `freeLaneCandidates` hoists the self-host lanes- (`trellis_selfhost`, `hunyuan3d`, `triposg`) ahead of the hosted free lanes- (NVIDIA NIM, HuggingFace) for **text** prompts too (photos already led with- self-host, since NIM's preview rejects user images). Stable partition — hosted- lanes stay intact as fallthrough. A no-op until the worker URLs are configured- (unconfigured lanes are filtered out anyway). `api/_lib/forge-tiers.js`- `selfHostPrimary()`.-- The **fallback ladder is unchanged**: self-host error → hosted NIM / HuggingFace- / Replicate exactly as today. The flag only reorders *preference*, never removes- a safety net.-- **Revert:** unset `FORGE_SELFHOST_PRIMARY` (and/or the worker URLs) → today's- ordering, no redeploy.--Env vars the router reads for the fleet (all bearer-authed with-`GCP_RECONSTRUCTION_KEY`):--| Env var | Backend | Forge lane |-|---|---|---|-| `MODEL_TRELLIS_URL` | `trellis_selfhost` | free/paid image + text→3D (primary) |-| `GCP_HUNYUAN3D_URL` | `hunyuan3d` | image→3D failover |-| `GCP_TRIPOSG_URL` | `triposg` | sketch→3D |-| `GCP_RECONSTRUCTION_URL` | controller `/reconstruct`, `/rig` | avatar scan + UniRig rigging |-| `GCP_TEXT2MOTION_URL` | text2motion | text→animation clip |-| `GCP_RECONSTRUCTION_KEY` | shared bearer | all of the above |--### Per-service Cloud Run config--From each worker's `cloudbuild.yaml`. All are `--gpu=1 --gpu-type=nvidia-l4---no-gpu-zonal-redundancy --no-cpu-throttling`, region `us-central1` (co-located-with `three-ws-model-weights`). Weights mount read-only at `/weights` from the-bucket; every worker uses the async **`POST` → 202 + poll `GET /tasks/{id}`**-pattern, so the Cloud Run request timeout does **not** gate generation (the long-work runs post-response under `--no-cpu-throttling`) — no timeout bump is needed.--| Service | CPU / Mem | min→max inst | `MAX_CONCURRENT` | req timeout |-|---|---|---|---|---|-| `model-trellis` | 8 / 32Gi | **1**→2 | 1 | 300s |-| `model-hunyuan3d` | 8 / 32Gi | 0→3 | 1 | 300s |-| `model-triposg` | 8 / 32Gi | 0→2 | 1 | 300s |-| `model-triposr` | 4 / 16Gi | 0→2 | 2 | 120s |-| `unirig` | 4 / 16Gi | **1**→2 | 1 | 180s |-| `model-text2motion` | 4 / 16Gi | 0→2 | 2 | 120s |--**Credit-window override — min-instances 1 for `model-trellis` and `unirig`.**-Cold-start on L4 + model load is brutal and instances are ~free on credits, so-pin the two hottest lanes warm. This is a *temporary* deploy-time override, not-baked into `cloudbuild.yaml` (min=1 costs money after the credits expire — prompt-08 reverts it). `deploy-all.sh` does not pass `_MIN_INSTANCES`, so set it after-deploy:--```bash-for S in model-trellis unirig; do- gcloud run services update "$S" --region us-central1 --min-instances=1-done-# Revert at expiry: same loop with --min-instances=0-```--### Cost per asset--Full-instance Cloud Run L4 rate (GPU + always-allocated CPU + memory,-`us-central1`, on-demand): **8 vCPU / 32 GiB + L4 ≈ \$1.69/hr**, **4 vCPU / 16 GiB-+ L4 ≈ \$1.20/hr** (L4 GPU ≈ \$0.71/hr; CPU ≈ \$0.0000240/vCPU·s; mem ≈-\$0.0000025/GiB·s). Per asset:--```-$/asset = instance_$per_hr × (warm_seconds_per_asset / 3600)-```--| Service | instance \$/hr | warm s/asset *(estimate)* | \$/asset *(estimate)* |-|---|---|---|---|-| `model-trellis` (image→3D) | 1.69 | **~50 (measured)** | **\$0.023 (measured)** |-| `model-hunyuan3d` | 1.69 | ~60–120 | \$0.028–0.056 |-| `model-triposg` (sketch) | 1.69 | ~20–40 | \$0.009–0.019 |-| `model-triposr` (fast) | 1.20 | ~5–15 | \$0.002–0.005 |-| `unirig` (rig) | 1.20 | ~20–60 | \$0.007–0.020 |-| `model-text2motion` | 1.20 | ~10–30 | \$0.003–0.010 |--> These s/asset values are **pre-deploy estimates** from each model's profile, not-> measured. Every worker already logs the real figure as `elapsed_ms` on its-> `GET /tasks/{id}` result and in Cloud Logging. Replace the table with measured-> warm + cold latency post-deploy:-> ```bash-> gcloud run services logs read model-trellis --region us-central1 \-> --format='value(textPayload)' | grep -oE 'done in [0-9.]+s'-> ```-> Prompt 08 uses the measured \$/asset × expected volume for the keep/kill-> decision at credit expiry.--### Raised free-lane ceilings (landed, flag-gated)--The per-principal free ceiling is 60/h to protect the **rate-limited hosted NIM**-allocation. With the fleet primary that allocation is out of the path, so-`FORGE_SELFHOST_PRIMARY=1` raises it (`api/_lib/rate-limit.js` — `FREE_HOURLY_BASE`-feeds `mcp3dGenerateFree` + `mcp3dGenerateFreeTiered`):--- **Default raised ceiling: 240/h** per principal (4×), tunable via- `FORGE_FREE_HOURLY_SELFHOST`.-- **Math:** credit-window free-image fleet = `trellis_selfhost` (max 2) +- `hunyuan3d` (max 3) = **5 concurrent L4 slots** at `MAX_CONCURRENT=1`. At a- blended ~60 s/asset that is `5 × 3600/60 ≈ 300 assets/h` global throughput, so a- single heavy iterator at 240/h stays under the fleet ceiling while the- hosted-NIM-era throttle is removed. **Re-tune `FORGE_FREE_HOURLY_SELFHOST` from- the measured s/asset once the fleet is live.**-- **Untouched — abuse/per-IP gates stay intact regardless of the flag:**- `mcp3dGenerate` (30/h per-IP paid, fail-closed), `paidDailyPerClient` (60/day),- and the global paid envelope `FORGE_PAID_GLOBAL_HOURLY`.-- **Revert:** unset `FORGE_SELFHOST_PRIMARY` → back to 60/h.--### Deploy runbook (gcloud auth is live as of 2026-07-07 — ready to run)--```bash-# 0. Generate + set the shared worker bearer key (Cloud Run reads it from the-# avatar-reconstruction-key secret; deploy-all.sh creates that secret).-# Set the SAME value in Vercel as GCP_RECONSTRUCTION_KEY (step 4).--# 1. Stage weights into gs://three-ws-model-weights (once; ~80 GB, gcsfuse mode).-cd workers/deploy-HF_TOKEN=hf_xxx SERVICES="hunyuan3d trellis triposr triposg unirig" ./stage-weights.sh--# 2. Check L4 quota FIRST (approval can take days). Need >= 4 concurrent for the-# warm fleet; deploy what fits now and file an increase for the rest.-gcloud run regions describe us-central1 2>/dev/null # or Console -> Quotas -> nvidia_l4_gpu_allocation--# 3. Build + deploy the mesh/rig fleet, then text2motion (CPU-path helper script).-PROJECT_ID=aerial-vehicle-466722-p5 \- SERVICES="hunyuan3d trellis triposr triposg unirig" ./deploy-all.sh-PROJECT_ID=aerial-vehicle-466722-p5 SERVICES="text2motion" ./deploy-editing.sh--# 4. Pin the two hot lanes warm for the credit window (see override above).-for S in model-trellis unirig; do- gcloud run services update "$S" --region us-central1 --min-instances=1; done--# 5. Health-check each service directly with the bearer key.-KEY=$(gcloud secrets versions access latest --secret=avatar-reconstruction-key)-for S in model-trellis model-hunyuan3d model-triposg model-triposr unirig model-text2motion; do- U=$(gcloud run services describe "$S" --region us-central1 --format='value(status.url)')- printf '%s: ' "$S"; curl -fsS -H "authorization: Bearer $KEY" "$U/health" || echo "cold - retry"; echo-done--# 6. Wire Vercel env (PREVIEW first, then production after E2E passes). Use the-# URLs printed by deploy-all.sh + the key from step 5.-for E in preview production; do- printf '%s' "$MODEL_TRELLIS_URL" | vercel env add MODEL_TRELLIS_URL $E- printf '%s' "$GCP_HUNYUAN3D_URL" | vercel env add GCP_HUNYUAN3D_URL $E- printf '%s' "$GCP_TRIPOSG_URL" | vercel env add GCP_TRIPOSG_URL $E- printf '%s' "$GCP_RECONSTRUCTION_URL" | vercel env add GCP_RECONSTRUCTION_URL $E- printf '%s' "$GCP_TEXT2MOTION_URL" | vercel env add GCP_TEXT2MOTION_URL $E- printf '%s' "$KEY" | vercel env add GCP_RECONSTRUCTION_KEY $E-done-# Flip self-host primary + raised ceilings ONLY after E2E on preview is green:-printf '1' | vercel env add FORGE_SELFHOST_PRIMARY preview-```--### E2E verification (definition of done — real outputs, not 200s)--Run against the preview deploy with the URLs set; inspect the actual GLB/clip.--1. **Text→3D free lane** → `trellis_selfhost` → GLB in R2, opens in the viewer.-2. **Image→3D** with a real photo (what hosted NIM rejects) → GLB.-3. **Paid `mesh_forge` chain** (reference image → reconstruction) → GLB, with- Cloud Logging showing **no Replicate call** (`FORGE_SELFHOST_PRIMARY=1`).-4. **Rig** a generated GLB through UniRig `/rig` → animation-ready GLB; load it and- confirm the skeleton drives the canonical clips (`src/glb-canonicalize.js`).-5. **text2motion** → one text→motion generation → clip JSON.--Record measured cold + warm latency per path back into *Cost per asset* above, and-raise `FORGE_FREE_HOURLY_SELFHOST` from the measured throughput before flipping the-flag in production.--| Path | cold s | warm s | output verified |-|---|---|---|---|-| image→3D (trellis) | ~1020¹ | **~50** | ✅ **1.97 MB glTF v2, 10,306 verts, UVs + indices, 1 material w/ baked baseColorTexture** (robot-crab input) |-| text→3D (trellis) | ~1020¹ | **~50**² | ✅ reconstruct half proven (same `/infer`); full path = FLUX view → this worker |-| mesh_forge (no Replicate) | — | — | ⏳ routing **code-verified** (`trellis_selfhost` hoisted by `FORGE_SELFHOST_PRIMARY`); needs a preview *deploy* to exercise end-to-end |-| rig (unirig) | — | — | ⛔ **BLOCKED** — worker stubbed against a non-existent `UniRigModel` API (see status below); needs a real implementation |-| text2motion | — | — | ⛔ **BLOCKED** — `mdm` weights not staged in `three-ws-model-weights` |--¹ Not per-asset — this is the **one-time per-instance** model load (3 GB weights streamed from the gcsfuse-mounted bucket + spconv/CUDA init). `min-instances=1` keeps `model-trellis` warm so real traffic never pays it. The worker now loads the pipeline in a **background task** so uvicorn binds the port immediately and Cloud Run's startup TCP probe passes at once (a blocking load in the FastAPI lifespan exceeded the startup window and failed the revision — fixed 2026-07-07).-² Warm text→3D adds the upstream FLUX text→image synthesis (~2–6 s) ahead of the ~50 s reconstruct; the ~50 s figure is the reconstruct step measured directly.--### Prompt-04 deploy status (2026-07-07)--**Live:** `model-trellis` (`https://model-trellis-lp642k3kpa-uc.a.run.app`, revision 00003,-`min-instances=1`, 1×L4, 8 vCPU / 32 GiB). Image→3D proven end-to-end with a real-input image → textured GLB (above). Preview env wired: `MODEL_TRELLIS_URL`,-`GCP_RECONSTRUCTION_KEY`, `FORGE_SELFHOST_PRIMARY=1` (preview only; production flip-pending a full platform preview E2E).--**Build/config fixes required to ship it** (the workers were written a while ago):-- **All 6 cloudbuilds** lacked a `timeout:` → Cloud Build's 10-min default killed the- CUDA image builds. Added `timeout: 3600s`. Also raised Cloud Run request `--timeout`- to 900 s (was 120–300) per the long-running inference requirement.-- **`model-trellis` Dockerfile:** the compiled TRELLIS extensions- (nvdiffrast / diffoctreerast / diff-gaussian-rasterization) need- `pip install --no-build-isolation` (their `setup.py` imports the already-installed- torch); and the TRELLIS clone needs `--recurse-submodules` (FlexiCubes, its mesh- extractor, is a git submodule — a plain clone left it a bare gitlink and the worker- crashed on load). The GLB export call was also wrong (`_pipeline.to_glb` →- `trellis.utils.postprocessing_utils.to_glb`).-- **`model-triposr`:** `from tsr import TSR` → `from tsr.system import TSR` (empty- top-level package).--**Blocked (documented for the owner / next session):**-- **GPU quota = 3** L4 (`nvidia_l4_gpu_allocation_no_zonal_redundancy`, us-central1) —- can't run all six warm at once. File an increase to ≥ 6 for the full warm fleet.-- **`unirig`** — `requirements.txt` pins `unirig @ git+…/UniRig.git@main` (no- `setup.py`/`pyproject.toml`, not pip-installable) and `main.py` calls- `UniRigModel.from_pretrained().rig(vertices=, faces=)`, an API the real UniRig repo- (Blender + hydra CLI pipeline) does not expose. `rig_glb.py` (GLB assembly) is real;- the model driver is a stub. Needs a genuine UniRig adapter (adds `bpy`/Blender to the- image) — a multi-hour worker rewrite, not a config fix. **Rig E2E is gated on this.**-- **`model-hunyuan3d`** — weights not staged; needs `HF_TOKEN` (Hunyuan3D-2.1 license-gated).-- **`model-triposg` / `model-text2motion`** — weights not staged- (`triposg`/`triposg-scribble`/`rmbg-1.4`, and `mdm` respectively).-------## Spend observability & burn-rate control (prompt 07)--$100k over ~2 months is ~$1,600/day. This section is how we **see** the burn in-real time, **attribute** it to each lane, **alert** before any lane runs away-(especially the GPU fleet and Vertex Claude if flipped to primary), and guard the-opposite failure — credits sitting **unused** at expiry. Everything here is code-that is live and runnable now; gcloud auth is restored and the budget→webhook path-is wired and tested (below). The only steps left are two owner actions: selecting-the pre-created `billing_export` dataset in the console and setting the Telegram ops-creds in Vercel.--### The burn report — `scripts/gcp/burn-report.mjs`--Reads the BigQuery billing export and prints an attributed report: credit-consumed to date, spend by service and by lane label, 7d/30d daily burn, runway,-projected exhaustion vs expiry, and the under-utilization guard.--```bash-node scripts/gcp/burn-report.mjs # human-readable-node scripts/gcp/burn-report.mjs --json # machine-readable (dashboard/cron)-```--Exit codes: `0` on-track/idle, `2` runaway (for CI/cron alerting), `3` billing-export not wired, `1` unexpected error. Auth: `GCP_SERVICE_ACCOUNT_JSON` if set,-else the local `gcloud auth print-access-token` (works after `gcloud auth login`).--Config (env or `.env`):--| Env var | Meaning |-|---|---|-| `GOOGLE_CLOUD_PROJECT` | project holding the billing dataset |-| `GCP_BILLING_DATASET` | BigQuery dataset the export writes to (e.g. `billing_export`) |-| `GCP_BILLING_TABLE` | full export table — **or** derive it from ↓ |-| `GCP_BILLING_ACCOUNT_ID` | billing account id; derives `gcp_billing_export_v1_<acct>` |-| `GCP_BILLING_EXPORT_KIND` | `standard` (default) or `resource` (detailed export) |-| `GCP_CREDIT_TOTAL_USD` | grant size, e.g. `100000` — enables runway + projection |-| `GCP_CREDIT_EXPIRY` | ISO date the credits expire — enables the exhaustion-vs-expiry check |-| `GCP_CREDIT_TYPES` | optional override of the credit-type filter (default: `PROMOTION,FREE_TRIAL,COMMITTED_USAGE_DISCOUNT,SUBSCRIPTION_BENEFIT`) |--Shared implementation: `api/_lib/gcp-billing.js` (BigQuery REST + pure projection-math, covered by `tests/gcp-billing.test.js`). The cron and the dashboard import-the same module — one source of truth.--### Enable the BigQuery billing export (owner console action — one time)--The CLI **cannot** enable this; it's console-only.--1. **Billing → Billing export → BigQuery export → Edit settings.**-2. Enable **Standard usage cost** (and optionally **Detailed usage cost** for- resource-level rows). Pick/create a dataset in `aerial-vehicle-466722-p5`- (e.g. `billing_export`, location `US`).-3. Data starts flowing within a few hours (no backfill — it's forward-only).-4. Set `GCP_BILLING_DATASET` + `GCP_BILLING_ACCOUNT_ID` (or `GCP_BILLING_TABLE`),- `GCP_CREDIT_TOTAL_USD=100000`, and `GCP_CREDIT_EXPIRY=<date>` in Vercel (for- the cron/dashboard) and locally (for the CLI). Verify: `node scripts/gcp/burn-report.mjs`.--### Resource labeling — `scripts/gcp/label-resources.sh`--Attribution only works if every credit-consuming resource carries-`program=gcp-credits` + `lane=<name>`. This discovers the Cloud Run fleet, jobs,-and GCS buckets and (retro-)labels them. Dry-run by default.--```bash-scripts/gcp/label-resources.sh # dry run — prints the plan-scripts/gcp/label-resources.sh --apply # write the labels (additive, idempotent)-```--Lanes: `vertex-claude`, `imagen`, `forge-gpu` (the Cloud Run GPU fleet — default-for every discovered service), `vanity`. Vertex Claude + Imagen are API-billed-(no Cloud Run service), so they're attributed by `service.description` in the-report instead of a label. Edit `LANE_OVERRIDES` in the script for exceptions.--### Budgets & alerts — `scripts/gcp/create-budgets.mjs` + the webhook--```bash-node scripts/gcp/create-budgets.mjs # dry run — prints the plan-node scripts/gcp/create-budgets.mjs --apply # create/update budgets (idempotent)-```--Creates an **overall program budget** (= `GCP_CREDIT_TOTAL_USD`, default $100k)-with threshold alerts at **25 / 50 / 75 / 90 / 100 %** measured on GROSS spend-(credits excluded, so it tracks grant consumption), plus **per-service** budgets-for Vertex AI / Cloud Run / Compute Engine (sized from `GCP_SERVICE_BUDGETS` or-defaults, service ids resolved live from the billing catalog). All publish to one-Pub/Sub topic (`GCP_BUDGET_PUBSUB_TOPIC`, default `gcp-budget-alerts`).--**Routing to the team:** the topic pushes to `POST /api/webhooks/gcp-budget-alert`,-which turns each threshold crossing into a Telegram ping via `sendOpsAlert` — the-PRIVATE ops chat (`TELEGRAM_ALERTS_CHAT_ID`), **never** the holders' channel.-Deduped per budget+threshold so each crossing pings once/hour.--Wire the push subscription (**done 2026-07-07** — commands kept for rotation/DR;-the live subscription is `gcp-budget-alerts-webhook`, `ACTIVE`):--```bash-# 1. shared secret the handler checks (constant-time)-printf '<random-secret>' | vercel env add GCP_BUDGET_WEBHOOK_SECRET production-# 2. (optional) let the budgets SA publish to the topic — GCP's budget notifier-# provisions its own publisher on the first real threshold, so this manual grant-# is not required; it currently fails "does not exist" (org DRS / lazy SA).-gcloud pubsub topics add-iam-policy-binding gcp-budget-alerts \- --project=aerial-vehicle-466722-p5 \- --member=serviceAccount:billing-budgets.iam.gserviceaccount.com --role=roles/pubsub.publisher-# 3. push subscription → the webhook (secret in the query string)-gcloud pubsub subscriptions create gcp-budget-alerts-webhook \- --project=aerial-vehicle-466722-p5 --topic=gcp-budget-alerts \- --ack-deadline=30 \- --push-endpoint="https://three.ws/api/webhooks/gcp-budget-alert?token=<random-secret>"-```--**Test the alert path** (no live budget needed): publish a synthetic notification —--```bash-gcloud pubsub topics publish gcp-budget-alerts --project=aerial-vehicle-466722-p5 \- --message='{"budgetDisplayName":"gcp-credits — program","alertThresholdExceeded":0.9,"costAmount":90000,"budgetAmount":100000,"currencyCode":"USD"}'-# → a 🔴 ping lands in the ops chat within seconds.-```--Handler contract (auth 503/401, threshold gate, dedup) is locked by-`tests/api/gcp-budget-alert.test.js`.--### Internal spend dashboard — `/dashboard/spend`--Admin-gated page (dashboard-next → nav "GCP Spend", `src/dashboard-next/pages/spend.js`),-backed by `GET /api/admin/gcp-burn` (session-admin **or** `Bearer $CRON_SECRET`).-Two cross-referenced views:--- **App-side telemetry** (always live, from `usage_events` + `forge_creations`):- per-lane LLM cost/tokens (14d), Vertex Claude spend estimate (30d + 24h, by- model), forge generations per backend (self-host flagged), and a daily LLM-cost- bar chart. This renders even before the billing export is wired.-- **Billing ground truth** (best-effort, from `buildBurnReport`): credit consumed,- runway, projection vs expiry, credit spend by lane label. Degrades to a designed- "not wired" panel when the export is absent — the app-side view still shows.--All states designed (loading skeleton, empty, 401/403 lock, error, populated);-auto-refreshes every 60s.--### Kill-switches (verified no-deploy env flips)--The GPU fleet and Vertex Claude are the two runaway risks. Each reverts by env-flag alone — no code deploy:--| Lane | Kill switch | Effect |-|---|---|---|-| Vertex Claude | `vercel env rm VERTEX_CLAUDE_PRIMARY production` | chat falls back to free/BYOK lanes instantly (see prompt 02 section) |-| Forge GPU fleet | `vercel env rm FORGE_SELFHOST_PRIMARY production` | routing stops preferring the self-host GPU workers |-| Imagen | `vercel env add VERTEX_IMAGEN_ENABLED production` = `0` | text→image drops to the free NIM FLUX lane |--**Fast "stop the bleed now" — `scripts/gcp/emergency-stop.sh`** (dry-run by-default): drops **every** Cloud Run service + job to `--min-instances=0`, cancels-in-flight job executions, and prints the flag flips above + the spot/batch stop-commands. Use this for a runaway during the program; use `revert-to-free.sh`-(prompt 08) for the planned end-of-program teardown.--```bash-scripts/gcp/emergency-stop.sh # dry run — shows what it would do-scripts/gcp/emergency-stop.sh --apply # drop min-instances to 0 across the fleet-```--### Under-utilization guard + daily cron--The projection flags **`underutilized`** when >30% of the grant is projected to-expire unused (and **`idle`** when there's no burn at all), with per-lane scale-up-prompts (flip `VERTEX_CLAUDE_PRIMARY` for production chat, raise seed-batch-volume, bigger vanity runs). Wasting the credits is a tracked failure mode, not-just overspend.--**`api/cron/gcp-burn-report.js`** runs daily (`0 14 * * *`, registered in-`vercel.json`) and pings the ops channel with the day's status — runaway and-under-utilization get distinct, un-deduped signatures so they always land; an-on-track day posts a quiet one-line status. If the export isn't wired it says so-once/day rather than erroring.--### Current status (2026-07-07, later session)--Live progress after the 2026-07-07 reauth:--- **Budgets: created** (billing account `01B467-A61905-9A97D2`): "gcp-credits — program" $100k- + per-service Vertex AI $55k / Cloud Run $20k / Compute Engine $15k, thresholds- 25/50/75/90/100%. Pub/Sub topic `gcp-budget-alerts` created. Budget **email**- alerts to billing admins are active now.-- **Pub/Sub → webhook leg: WIRED & TESTED.** `GCP_BUDGET_WEBHOOK_SECRET` pushed to- Vercel prod; push subscription `gcp-budget-alerts-webhook` created against- `https://three.ws/api/webhooks/gcp-budget-alert?token=…` (state `ACTIVE`). Auth- verified live against prod: no/invalid token → `401`, valid token → `200` ACK. A- synthetic budget notification published to the topic delivers through the- subscription to the handler. **Last hop still owner-gated:** `sendOpsAlert`- no-ops because `TELEGRAM_BOT_TOKEN` + `TELEGRAM_ALERTS_CHAT_ID` are **not** set in- Vercel prod (owner secrets — same missing creds as `agent-sniper` below). Set both- in Vercel and the ops ping goes live with zero code change. The- `[email protected]` publisher grant still returns- "does not exist" (org DRS or lazy system-SA creation) — GCP's budget notifier- provisions its own publisher on the first real threshold crossing, so the- end-to-end path does not depend on that manual grant; the synthetic-publish test- above already proves subscription → webhook.-- **BigQuery billing export: dataset pre-created.** `billing_export` (location `US`)- now exists in `aerial-vehicle-466722-p5` — the owner's remaining step is only to- **select it** in Billing → Billing export → BigQuery export (still console-only;- no gcloud/API path exists, confirmed this session). Once selected, BigQuery- auto-creates `gcp_billing_export_v1_01B467_A61905_9A97D2` and the burn report /- dashboard / cron begin reporting. `burn-report.mjs` currently degrades correctly- to "billing export table not found" against the empty dataset.-- **Attribution labels: applied** (`label-resources.sh --apply`): all 9 Cloud Run- services + both buckets carry `program=gcp-credits` and a lane- (`forge-gpu` for the model/editing workers, `platform` for agent-sniper /- hyperfy-world / three-ws-multiplayer).-- **Findings from the label sweep:** (a) `model-triposr` has **no healthy revision** —- container crashes on boot with `ImportError: cannot import name 'TSR' from 'tsr'`;- the image itself is broken, fix in the prompt-04 fleet deploy. (b) `agent-sniper`- references three Secret Manager secrets that **do not exist**- (`sniper-solana-rpc-url`, `telegram-bot-token`, `telegram-alerts-chat-id`) — the- serving revision still runs, but any redeploy will fail until the owner recreates- them.--Burn rate, exhaustion projection, and full/unused-credit tracking remain **wired-but not reporting** — they need the owner to select the pre-created `billing_export`-dataset in the console (one click; dataset now exists) and set `GCP_CREDIT_TOTAL_USD` /-`GCP_CREDIT_EXPIRY`. The moment the export starts flowing, `node scripts/gcp/burn-report.mjs`-prints the live burn rate and days-of-runway, the dashboard fills in, and the daily-cron begins posting. Until then the app-side lane telemetry on `/dashboard/spend` is-the live view. Program budget targets for the alerts: Claude-on-Vertex $40–60k, GPU-fleet $15–25k, Imagen $3–5k, vanity/observability/misc ~$5k.--**Two remaining owner actions to fully activate prompt-07 ops:**-1. Billing → Billing export → BigQuery export → select the `billing_export` dataset- (already created); then set `GCP_BILLING_DATASET=billing_export`,- `GCP_BILLING_ACCOUNT_ID=01B467-A61905-9A97D2`, `GCP_CREDIT_TOTAL_USD=100000`,- `GCP_CREDIT_EXPIRY=<date>` in Vercel + `.env`.-2. Set `TELEGRAM_BOT_TOKEN` + `TELEGRAM_ALERTS_CHAT_ID` in Vercel prod so budget- alerts (subscription already delivering) and the daily cron actually ping the ops- chat instead of no-op'ing.--_Spend-observability section last verified against source: 2026-07-07 (later session)._-------## Audit + fixes — 2026-07-08 (post Vercel→Cloud Run migration)--Re-verified every prompt (01–08) against live `gcloud`/`bq`/Cloud Run state rather than-trusting this file. Headline finding: **every "set in Vercel" instruction above is now-stale.** Production moved off Vercel to Cloud Run (`three-ws-api`, see-`docs/ops/gcp-production.md`) the same day most of this file was written, and none of-the GCP-credits env vars that were pushed to Vercel ever made it onto the Cloud Run-service — `gcloud run services describe three-ws-api ... --format='value(...env...)'`-showed **zero** of them present. Every lane documented as "live in prod" above (Vertex-Claude available-but-not-primary, Vertex Imagen fallback, the trellis self-host URL,-the billing-report env, the budget-webhook secret) was actually inert in production-until today.--**Fixed today (no owner action, no billing-lane change):**-- Wired onto `three-ws-api` (Cloud Run, `--update-env-vars`/`--update-secrets`, additive- — the service's other ~100 env vars were left untouched):- `GOOGLE_CLOUD_PROJECT`, `GOOGLE_CLOUD_LOCATION`, `GOOGLE_CLOUD_LOCATION_CLAUDE`,- `VERTEX_CLAUDE_ENABLED=1` (available, **not** primary — chain inversion stays the- owner's call per prompt 02), `MODEL_TRELLIS_URL`, `GCP_BILLING_DATASET=billing_export`,- `GCP_BILLING_ACCOUNT_ID`, `GCP_CREDIT_TOTAL_USD=100000`, and as Secret Manager refs:- `GCP_SERVICE_ACCOUNT_JSON` (fresh key minted for `vercel-inference@`, stored as secret- `gcp-vercel-inference-sa-key`), `GCP_RECONSTRUCTION_KEY` (points at the existing- `avatar-reconstruction-key` secret — same bearer key `model-trellis` already uses),- `GCP_BUDGET_WEBHOOK_SECRET` (secret `gcp-budget-webhook-secret`, value matches the- token already baked into the live Pub/Sub push subscription so no subscription edit- was needed). Granted `three-ws@` (runtime SA) `secretAccessor` on all three secrets,- and `vercel-inference@` `roles/bigquery.jobUser` + `roles/bigquery.dataViewer` (the- burn-report script had never actually been able to query — proven by running it: it- now gets exactly as far as "export not configured", the documented owner-console gate,- instead of a permission error).- `VERTEX_IMAGEN_ENABLED` was **not** explicitly set — `text-to-image.js` already- defaults it on whenever `GOOGLE_CLOUD_PROJECT` is set (prompt 03's own design), so- setting `GOOGLE_CLOUD_PROJECT` alone activates the Imagen fallback lane; the prompt-03- quality gate already passed (see above), so this is live now, fallback-only, NIM FLUX- still leads.- **Not set** (matches every prompt's explicit fail-safe/owner-gate guardrail):- `VERTEX_CLAUDE_PRIMARY`, `FORGE_SELFHOST_PRIMARY`, and the four other worker URLs- (`GCP_HUNYUAN3D_URL`/`GCP_TRIPOSG_URL`/`GCP_RECONSTRUCTION_URL`/`GCP_TEXT2MOTION_URL`)- — those services aren't deployed (see below), there is nothing to point at yet.-- **Re-verified the console-only gates are still actually blocked**, not just- documented-stale: `node scripts/gcp/vertex-smoke.mjs` with a live SA key still 404s- (Model Garden Claude enablement genuinely not done); `bq ls billing_export` still has- zero tables (BigQuery billing export genuinely not configured). Both need the exact- owner console actions already listed above — nothing changed there.-- **GPU quota increased**: `NVIDIA_L4_GPUS` in `us-central1` is now **8** (the doc above- says "quota = 3" from the 2026-07-07 session — that request evidently landed). Headroom- exists to bring up more of the fleet warm; the remaining blockers below are code/weights- gaps, not quota.-- **`model-triposr` rebuilt and redeployed.** The doc above already diagnosed the crash- (`ImportError: cannot import name 'TSR' from 'tsr'`) and the source fix- (`from tsr.system import TSR`) was already committed — it had just never been rebuilt.- Rebuilt via `gcloud builds submit --config=workers/model-triposr/cloudbuild.yaml`- (had to run from a clean `git worktree`, not the shared repo root — see hazard note- below — and pass `--service-account=three-ws-build@…` + `--substitutions=SHORT_SHA=…`,- neither of which the bare command from the doc's deploy runbook supplies for a local- submit; also needed `roles/iam.serviceAccountUser` for `three-ws-build@` on- `avatar-reconstruction-sa@`, missing until this session). **Healthy and inference-- tested**: `/health` returns `model_loaded:true, gpu_available:true` on an L4; a real- `/infer` call (HTTPS image → background removal → mesh) hit a **second real bug**,- also fixed this session — TripoSR's tokenizer normalizes with a 3-channel mean/std- and the rembg background-removal step was handing it a 4-channel RGBA image- (`RuntimeError: size of tensor a (4) must match ... b (3)`). Fixed in- `workers/model-triposr/main.py`: matte the cutout onto mid-gray (127,127,127) and- flatten to RGB before the model call, matching upstream TripoSR's own demo- preprocessing. Rebuilt + redeployed; re-verify with a fresh `/infer` call once the- redeploy in flight lands. **Not wired into the router**: `api/forge.js` /- `api/_providers/gcp.js` have no `MODEL_TRIPOSR_URL`/`GCP_TRIPOSR_URL` reference at- all — this worker isn't part of any lane `forge.js` selects (the prompt-04 context's- "TripoSG/TripoSR" pairing reads as one conceptual role; `GCP_TRIPOSG_URL` is the one- actually wired, for TripoSG). Fixing and deploying it was still worth doing (proves- the CUDA build pipeline and the L4 fleet both work end-to-end, and it's a real,- healthy, inference-capable service now), but it does not change user-facing behavior- until/unless a lane is added to point at it — flag this to the owner as a scope- question for prompt 04/05 rather than assuming and wiring a new lane unasked.-- **Found and fixed a real production bug while wiring the budget-webhook path**:- `api/webhooks/gcp-budget-alert.js` (and `api/webhooks/replicate.js`, same pattern)- called `readJson()`/`readBody()` past their auth check and **hung until the request- timeout** on live Cloud Run traffic — reproduced directly against- `https://three-ws-api-*.run.app` with curl and raw Node `https.request`, independent- of HTTP/1.1 vs HTTP/2, query-string vs header auth, and body content. Root cause: the- fallback branch in `readBody()` (`api/_lib/http.js`) attached `'data'`/`'end'`- listeners unconditionally; if the stream had already ended before the handler started- listening, those events never re-fire and the promise hangs forever — a variant of the- exact hazard the `req.rawBody` fast-path comment above already warns about, reached a- different way. **This means every real budget-alert notification since the webhook was- wired has silently never reached the ops chat** — Pub/Sub kept retrying against a- handler that never responded, which is also why the queued retries kept showing 401 in- logs (stale token from before the secret was fixed today) rather than any 200s.- Fixed in `api/_lib/http.js`: resolve immediately with an empty buffer when- `req.complete` is already true (can't recover already-drained bytes, but can stop- hanging on them), and cap the listener path with a `READ_BODY_TIMEOUT_MS` (default- 15s) timeout so any future stream stall fails fast and diagnosably instead of pinning- a Cloud Run concurrency slot for the full request timeout. Committed- (`ba37182f3`), covered by the existing `tests/api/gcp-budget-alert.test.js` +- `tests/api-validate.test.js` (both green). **Deployed and confirmed live** —- `three-ws-api-00017-kgs`: direct curl with the correct token now returns `200` in- ~0.1s (was an unconditional hang before); `api/webhooks/replicate.js` (same- `readBody` fallback) now returns its normal `401` fast instead of hanging too.-- Verified the synthetic-notification test from the prompt-07 section above end to end- against the *current* infra, post-fix: `gcloud pubsub topics publish gcp-budget-alerts- …` → delivered to the webhook → **`200` in the Cloud Run request log** (was 401 →- then hung → now clean). The budget-alert pipe is genuinely live end to end as of this- session; the only remaining gap is the last hop, `sendOpsAlert` no-op'ing because- `TELEGRAM_BOT_TOKEN`/`TELEGRAM_ALERTS_CHAT_ID` aren't set (owner credentials, listed- above).--**Confirmed still genuinely blocked (owner console action or missing credentials —-no workaround attempted):**-- Model Garden Claude partner-model enablement (prompt 01/02) — console-only terms- acceptance, `vertex-smoke.mjs` still 404s.-- BigQuery billing export (prompt 07) — console-only, dataset exists but has zero- tables; `burn-report.mjs` correctly reports "export not configured" now that the IAM- permission gap is fixed.-- `TELEGRAM_BOT_TOKEN` / `TELEGRAM_ALERTS_CHAT_ID` — not present anywhere (not Cloud Run- env, not Secret Manager); the budget-webhook and daily cron both no-op on the final- Telegram hop without these. Owner credentials, no workaround.-- Credit balance + expiry date — still console-only, never obtained; `GCP_CREDIT_EXPIRY`- intentionally left unset (a wrong guess would silently corrupt the exhaustion- projection).--**Prompt 04 remaining gaps — re-verified, unchanged conclusions:**-- `unirig` — still a stub (`main.py` calls a `UniRigModel.from_pretrained().rig(...)`- API the real UniRig repo doesn't expose); a real adapter needs Blender/`bpy` in the- image and is a genuine multi-hour rewrite, not a config fix. Not attempted this- session — out of proportion for a verification pass, and rigging is a hard- dependency for prompt 05's "catalog entries must be animation-ready" bar, so- shipping a half-real rig adapter would violate the no-mocks rule worse than leaving- it blocked.-- `model-hunyuan3d` — weights not staged, needs `HF_TOKEN` (present in the platform's- own env already, but the license-gated Hunyuan3D-2.1 weights themselves still need a- human to accept the gate on huggingface.co before download works) — not attempted.-- `model-triposg` / `model-text2motion` — weights not staged (`triposg`,- `triposg-scribble`, `rmbg-1.4`, `mdm`) — not attempted; each is a genuine multi-GB- download + storage-cost decision, not a quota or code fix, so left for a session with- explicit budget for it.--**Prompt 05 (catalog & animation seeding): confirmed not started.** No-`scripts/gcp/seed-avatars.mjs`, no `SEED_CRON_BATCH` env-tunability in-`api/cron/forge-seed-cron.js`, no doc section — matches the prompt's own-prerequisite ("prompt 04 live... text2motion service deployed") not being met: only-`model-trellis` is live, UniRig and text2motion are not, and prompt 05's acceptance-criteria explicitly require rigged, animation-ready catalog entries and a generated-motion library. Attempting a partial version (unrigged catalog avatars, no motion-library) would ship exactly the "catalog avatar that T-poses is half-built" outcome-the prompt calls out as unacceptable. Correctly blocked on prompt 04, not attempted.--**Hazard discovered this session — record for the next agent:** the shared working-tree had ~170 files of uncommitted, unrelated in-progress work from other concurrent-agents (material studio, embodiment, provenance, persona-identity, animation registry).-`gcloud builds submit … .` from the shared repo root packages the working directory-*as-is*, uncommitted changes included — building/deploying from it would have shipped-unreviewed, unrelated work to production. Also hit mid-tar file-churn from a concurrent-agent (`FileNotFoundError` on a file another agent deleted mid-build) when building from-the shared root. **Always build from a clean `git worktree add --detach <path> <commit>`**-(symlink `node_modules` from the shared tree to skip a full reinstall; regenerate `dist/`-inside the worktree with `npm run build && npm run build:lib:full && npm run publish:lib`-since `dist/` is gitignored and the Docker image only contains what's physically present-at build time) when deploying anything from this repo while other agents may be active.-Separately hit — and this one was a real, already-fixed-by-another-agent bug, not-something to route around — a `main` HEAD that briefly couldn't `npm ci` at all-(`packages/defi-utils`/`packages/tool-sdk` present on disk but missing from-`package-lock.json`); resolved upstream by commit `bc60fb2de` before this session's-redeploy needed it. Also observed a second agent deploy a new `three-ws-api` revision-(`00018-kh7`) to the same service mid-session, independent of this work.--**Separate finding, NOT diagnosed to root cause — flag for the next session, do not-assume it's this program's doing:** every `vercel.json` route whose `dest` differs from-its `src` and that isn't one of the handful already proven live (home `/` →-`/home.html`, `/gallery` → `/gallery/index.html`) appears to 404 in production right-now — reproduced on `/dashboard/*` (all of it, including the bare `/dashboard/`-entry point and the prompt-07 `/dashboard/spend` page), `/pump-dashboard`, confirmed-against **both** `https://three.ws/...` and the Cloud Run origin directly (rules out a-CDN-only cause for this revision). The destination files exist in a from-source-worktree build (`dist/dashboard-next/*.html`, `dist/pump-dashboard.html`, timestamps-matching a clean `npm ci` + `npm run build`), and the server's route-matching code-(`server/index.mjs` `compileRoute`/`resolveStatic`) reads as correct on inspection —-but the 404 response's `content-length` (8350 bytes) does not match this session's-locally-built `dist/404.html` (8951 bytes), meaning **the currently-serving container's-`dist/` does not fully match what this session built and submitted**, for reasons not-resolved before time ran out (candidates not yet ruled out: a stale Docker layer-cache-hit on `COPY . .` despite content changing, a `vite build`/`emptyOutDir` interaction-with the two build attempts in the same worktree this session, or the concurrent-`00018-kh7` deploy from another agent superseding/interleaving with this one). This-predates and is independent of this program's own changes (`api/_lib/http.js`,-`workers/model-triposr/main.py` touch neither routing nor `dist/` generation) — it was-found while smoke-testing `/dashboard/spend` for prompt 07, not caused by testing it.-**Action for the next session:** confirm whether this is new (Cloud Run migration-artifact) or has been silently broken since 2026-07-07, with a stable environment (no-concurrent deploys), before attempting a fix — the evidence above rules out several-easy explanations already.-------<a id="sec-120"></a>-> **Source:** `docs/hold-to-access.md` · [↑ table of contents](#table-of-contents)# Hold-to-Access — the $THREE demand lever@@ -28902,7 +27338,7 @@ worlds unaffected.----<a id="sec-121"></a>+<a id="sec-120"></a>> **Source:** `docs/how-it-works.md` · [↑ table of contents](#table-of-contents)@@ -29073,7 +27509,7 @@ Quick lookup for "I want to ship X":----<a id="sec-122"></a>+<a id="sec-121"></a>> **Source:** `docs/i18n.md` · [↑ table of contents](#table-of-contents)@@ -29224,7 +27660,7 @@ round-trips, lint rules, runtime resolution/fallback, and catalog merge/prune.----<a id="sec-123"></a>+<a id="sec-122"></a>> **Source:** `docs/ibm-x402-mcp.md` · [↑ table of contents](#table-of-contents)@@ -29582,7 +28018,7 @@ Catalog/listing copy is maintained in----<a id="sec-124"></a>+<a id="sec-123"></a>> **Source:** `docs/ibm.md` · [↑ table of contents](#table-of-contents)@@ -29892,7 +28328,7 @@ Unit tests for the same paths live in [`tests/`](../tests/) (`granite-oracle`, `----<a id="sec-125"></a>+<a id="sec-124"></a>> **Source:** `docs/introduction.md` · [↑ table of contents](#table-of-contents)@@ -30118,7 +28554,7 @@ If you want to look at what's already in the hosted platform — browsing agents----<a id="sec-126"></a>+<a id="sec-125"></a>> **Source:** `docs/irl/THREAT-MODEL.md` · [↑ table of contents](#table-of-contents)@@ -30253,7 +28689,7 @@ in a way that drops legitimate discovery, update this file in the same change.----<a id="sec-127"></a>+<a id="sec-126"></a>> **Source:** `docs/js-api.md` · [↑ table of contents](#table-of-contents)@@ -30867,7 +29303,7 @@ window.VIEWER.app.viewer.updateDisplay();----<a id="sec-128"></a>+<a id="sec-127"></a>> **Source:** `docs/labor-market.md` · [↑ table of contents](#table-of-contents)@@ -30972,7 +29408,7 @@ economy move:----<a id="sec-129"></a>+<a id="sec-128"></a>> **Source:** `docs/launch-usecases.md` · [↑ table of contents](#table-of-contents)@@ -31108,7 +29544,7 @@ GET /api/pump/launch-studio?action=preview&id=github-fresh-breakouts&limit=6----<a id="sec-130"></a>+<a id="sec-129"></a>> **Source:** `docs/layers.md` · [↑ table of contents](#table-of-contents)@@ -31270,7 +29706,7 @@ Versioned CDN bundles are published at `/agent-3d/<version>/agent-3d.js`. Use `l----<a id="sec-131"></a>+<a id="sec-130"></a>> **Source:** `docs/listings.md` · [↑ table of contents](#table-of-contents)@@ -31341,7 +29777,7 @@ Subscribe via RSS to track new listings, integrations, and protocol updates.----<a id="sec-132"></a>+<a id="sec-131"></a>> **Source:** `docs/make-your-agent.md` · [↑ table of contents](#table-of-contents)@@ -31432,7 +29868,7 @@ Changes take effect immediately — no republishing needed for most settings.----<a id="sec-133"></a>+<a id="sec-132"></a>> **Source:** `docs/marketplace.md` · [↑ table of contents](#table-of-contents)@@ -31523,7 +29959,7 @@ their chosen `currency_mint`; the platform promotes no coin other than $THREE.----<a id="sec-134"></a>+<a id="sec-133"></a>> **Source:** `docs/mcp-3d-studio.md` · [↑ table of contents](#table-of-contents)@@ -31761,7 +30197,7 @@ npx @modelcontextprotocol/inspector http://localhost:3000/api/mcp-3d----<a id="sec-135"></a>+<a id="sec-134"></a>> **Source:** `docs/mcp-agent.md` · [↑ table of contents](#table-of-contents)@@ -31837,7 +30273,7 @@ npx @modelcontextprotocol/inspector http://localhost:3000/api/mcp-agent----<a id="sec-136"></a>+<a id="sec-135"></a>> **Source:** `docs/mcp-studio.md` · [↑ table of contents](#table-of-contents)@@ -32041,7 +30477,7 @@ All optional — sensible production defaults:----<a id="sec-137"></a>+<a id="sec-136"></a>> **Source:** `docs/mcp-tools.md` · [↑ table of contents](#table-of-contents)@@ -32174,7 +30610,7 @@ promote no specific token.----<a id="sec-138"></a>+<a id="sec-137"></a>> **Source:** `docs/mcp-x402-bazaar.md` · [↑ table of contents](#table-of-contents)@@ -32249,7 +30685,7 @@ npx @modelcontextprotocol/inspector http://localhost:3000/api/mcp-bazaar----<a id="sec-139"></a>+<a id="sec-138"></a>> **Source:** `docs/mcp.md` · [↑ table of contents](#table-of-contents)@@ -32967,7 +31403,7 @@ Restart Claude Code after editing `.mcp.json` so the new server config is picked----<a id="sec-140"></a>+<a id="sec-139"></a>> **Source:** `docs/memetic-launcher.md` · [↑ table of contents](#table-of-contents)@@ -33058,7 +31494,7 @@ POST /api/launcher/me { "action": "resume" } → clear a tripped circuit brea----<a id="sec-141"></a>+<a id="sec-140"></a>> **Source:** `docs/memory.md` · [↑ table of contents](#table-of-contents)@@ -33449,7 +31885,7 @@ In `ipfs` mode without encryption, treat the memory as semi-public. Don't store----<a id="sec-142"></a>+<a id="sec-141"></a>> **Source:** `docs/mint-mark.md` · [↑ table of contents](#table-of-contents)@@ -33581,7 +32017,7 @@ No other mint should appear in tests, fixtures, or documentation.----<a id="sec-143"></a>+<a id="sec-142"></a>> **Source:** `docs/money-feed.md` · [↑ table of contents](#table-of-contents)@@ -33684,7 +32120,7 @@ and millisecond `ts`.----<a id="sec-144"></a>+<a id="sec-143"></a>> **Source:** `docs/money-map.md` · [↑ table of contents](#table-of-contents)@@ -33877,7 +32313,7 @@ that set `auto_fund_enabled = true` (default off). See----<a id="sec-145"></a>+<a id="sec-144"></a>> **Source:** `docs/multi-agent.md` · [↑ table of contents](#table-of-contents)@@ -34206,7 +32642,7 @@ To extend this into a full turn-based scene, add a `brain` attribute to Mira wit----<a id="sec-146"></a>+<a id="sec-145"></a>> **Source:** `docs/nvidia-models.md` · [↑ table of contents](#table-of-contents)@@ -34399,7 +32835,7 @@ Probe transcripts for every lane — request/response shapes, limits, verified b----<a id="sec-147"></a>+<a id="sec-146"></a>> **Source:** `docs/nvidia-nemotron-spotlight.md` · [↑ table of contents](#table-of-contents)@@ -34553,7 +32989,7 @@ Build the small stuff. Put it in front. The generator was never the hard part.----<a id="sec-148"></a>+<a id="sec-147"></a>> **Source:** `docs/okx-marketplace.md` · [↑ table of contents](#table-of-contents)@@ -34820,7 +33256,7 @@ USDC rails. The wire format OKX buyers use (headers `PAYMENT-REQUIRED` /----<a id="sec-149"></a>+<a id="sec-148"></a>> **Source:** `docs/onchain-agents.md` · [↑ table of contents](#table-of-contents)@@ -35117,7 +33553,7 @@ A confirmed canary asset shows `inCollection=true`, `royalty=500bps`, `attrs=11`----<a id="sec-150"></a>+<a id="sec-149"></a>> **Source:** `docs/oracle.md` · [↑ table of contents](#table-of-contents)@@ -35500,7 +33936,7 @@ The more data we watch, the sharper every score. Oracle is live now.----<a id="sec-151"></a>+<a id="sec-150"></a>> **Source:** `docs/package-extraction.md` · [↑ table of contents](#table-of-contents)@@ -35619,7 +34055,7 @@ part of the extraction itself — extract and publish first, swap the import lat----<a id="sec-152"></a>+<a id="sec-151"></a>> **Source:** `docs/partners/sperax-proposal.md` · [↑ table of contents](#table-of-contents)@@ -35667,7 +34103,7 @@ Both sides already ship for a living — this proposal only asks each of us to d----<a id="sec-153"></a>+<a id="sec-152"></a>> **Source:** `docs/pay-skills-listing.md` · [↑ table of contents](#table-of-contents)@@ -35768,7 +34204,7 @@ are supported.----<a id="sec-154"></a>+<a id="sec-153"></a>> **Source:** `docs/permissions.md` · [↑ table of contents](#table-of-contents)@@ -36149,7 +34585,7 @@ Set `SMOKE_SKIP_REVOKE=1` to skip the on-chain revocation step if the test walle----<a id="sec-155"></a>+<a id="sec-154"></a>> **Source:** `docs/persona-hub.md` · [↑ table of contents](#table-of-contents)@@ -36546,7 +34982,7 @@ JWT claims:----<a id="sec-156"></a>+<a id="sec-155"></a>> **Source:** `docs/plan-checkout.md` · [↑ table of contents](#table-of-contents)@@ -36673,7 +35109,7 @@ Plan prices live in [api/payments/_config.js](../api/payments/_config.js) (`PLAN----<a id="sec-157"></a>+<a id="sec-156"></a>> **Source:** `docs/popular-3d-github-repos.md` · [↑ table of contents](#table-of-contents)@@ -36936,7 +35372,7 @@ Apply a 3D-signal regex filter over `description + topics` and a denylist of non----<a id="sec-158"></a>+<a id="sec-157"></a>> **Source:** `docs/provenance.md` · [↑ table of contents](#table-of-contents)@@ -37003,7 +35439,7 @@ Real hashing, real ed25519 signature, real on-chain write. Requires the issuer k----<a id="sec-159"></a>+<a id="sec-158"></a>> **Source:** `docs/pump-fun-mcp-edge.md` · [↑ table of contents](#table-of-contents)@@ -37059,7 +35495,7 @@ Both runtimes import `TOOLS` from `src/pump/mcp-tools.js`, so the tool list expo----<a id="sec-160"></a>+<a id="sec-159"></a>> **Source:** `docs/pump-launch-repos.md` · [↑ table of contents](#table-of-contents)@@ -37158,7 +35594,7 @@ rate-limits under the ~450 txs a full run makes. Pass a dedicated `--rpc`----<a id="sec-161"></a>+<a id="sec-160"></a>> **Source:** `docs/pump-launcher.md` · [↑ table of contents](#table-of-contents)@@ -37309,7 +35745,7 @@ token itself always deploys on **Solana mainnet** — pump.fun is mainnet-only.----<a id="sec-162"></a>+<a id="sec-161"></a>> **Source:** `docs/pump-platform-fee.md` · [↑ table of contents](#table-of-contents)@@ -37370,7 +35806,7 @@ The fee is **never** charged silently. When `platform_fee_bps > 0`:----<a id="sec-163"></a>+<a id="sec-162"></a>> **Source:** `docs/pumpfun-program/README.md` · [↑ table of contents](#table-of-contents)@@ -37428,7 +35864,7 @@ tracked in `tasks/pumpfun-upstream/01-v2-trade-instructions-usdc-audit.md`.----<a id="sec-164"></a>+<a id="sec-163"></a>> **Source:** `docs/pumpfun-program/UPSTREAM-buy-sell-v2-announcement.md` · [↑ table of contents](#table-of-contents)@@ -37532,7 +35968,7 @@ Currently, no quote mint other than native SOL can be used to create or trade co----<a id="sec-165"></a>+<a id="sec-164"></a>> **Source:** `docs/pumpfun-program/docs/BREAKING_FEE_RECIPIENT.md` · [↑ table of contents](#table-of-contents)@@ -37606,7 +36042,7 @@ The new accounts can be passed before the program upgrade happens on Monday. The----<a id="sec-166"></a>+<a id="sec-165"></a>> **Source:** `docs/pumpfun-program/docs/CPI_README.md` · [↑ table of contents](#table-of-contents)@@ -37710,7 +36146,7 @@ pump-rust-client = { version = "...", path = "..." }----<a id="sec-167"></a>+<a id="sec-166"></a>> **Source:** `docs/pumpfun-program/docs/FAQ.md` · [↑ table of contents](#table-of-contents)@@ -37748,7 +36184,7 @@ is recommended to use a static big enough CU limit like `100_000`.----<a id="sec-168"></a>+<a id="sec-167"></a>> **Source:** `docs/pumpfun-program/docs/FEE_PROGRAM_README.md` · [↑ table of contents](#table-of-contents)@@ -37963,7 +36399,7 @@ If you implement the fee logic correctly, any future change to the fee tiers str----<a id="sec-169"></a>+<a id="sec-168"></a>> **Source:** `docs/pumpfun-program/docs/FEE_RECIPIENTS.md` · [↑ table of contents](#table-of-contents)@@ -38026,7 +36462,7 @@ Use one of these as `buybackFeeRecipient` for any coin.----<a id="sec-170"></a>+<a id="sec-169"></a>> **Source:** `docs/pumpfun-program/docs/PUMP_CASHBACK_README.md` · [↑ table of contents](#table-of-contents)@@ -38143,7 +36579,7 @@ To read unclaimed cashback for pump swap / Pump AMM program:----<a id="sec-171"></a>+<a id="sec-170"></a>> **Source:** `docs/pumpfun-program/docs/PUMP_CREATOR_FEE_README.md` · [↑ table of contents](#table-of-contents)@@ -38278,7 +36714,7 @@ we update the programs on Mainnet.----<a id="sec-172"></a>+<a id="sec-171"></a>> **Source:** `docs/pumpfun-program/docs/PUMP_PROGRAM_README.md` · [↑ table of contents](#table-of-contents)@@ -38479,7 +36915,7 @@ at https://solscan.io/account/EsmVk4MTsoT71JFaRM5DWFZboKpMQjfY6EYzAgUuksXw#accou----<a id="sec-173"></a>+<a id="sec-172"></a>> **Source:** `docs/pumpfun-program/docs/PUMP_SWAP_CREATOR_FEE_README.md` · [↑ table of contents](#table-of-contents)@@ -38588,7 +37024,7 @@ PumpSwap program on Mainnet to the coin creator fee update.----<a id="sec-174"></a>+<a id="sec-173"></a>> **Source:** `docs/pumpfun-program/docs/PUMP_SWAP_README.md` · [↑ table of contents](#table-of-contents)@@ -38822,7 +37258,7 @@ Each Anchor instruction has a set of corresponding autocomplete methods that can----<a id="sec-175"></a>+<a id="sec-174"></a>> **Source:** `docs/pumpfun-program/docs/PUMP_SWAP_SDK_README.md` · [↑ table of contents](#table-of-contents)@@ -38902,7 +37338,7 @@ to autocomplete the `base` and `quote` displayed amounts based on the `lpToken`----<a id="sec-176"></a>+<a id="sec-175"></a>> **Source:** `docs/pumpfun-program/docs/instructions/BUY.md` · [↑ table of contents](#table-of-contents)@@ -39080,7 +37516,7 @@ ixs.extend(----<a id="sec-177"></a>+<a id="sec-176"></a>> **Source:** `docs/pumpfun-program/docs/instructions/CLAIM_CASHBACK.md` · [↑ table of contents](#table-of-contents)@@ -39190,7 +37626,7 @@ let ix = sdk.claim_cashback_v2_instruction(----<a id="sec-178"></a>+<a id="sec-177"></a>> **Source:** `docs/pumpfun-program/docs/instructions/COIN_CREATION.md` · [↑ table of contents](#table-of-contents)@@ -39345,7 +37781,7 @@ let ixs = sdk----<a id="sec-179"></a>+<a id="sec-178"></a>> **Source:** `docs/pumpfun-program/docs/instructions/COLLECT_CREATOR_FEE.md` · [↑ table of contents](#table-of-contents)@@ -39447,7 +37883,7 @@ ixs.extend(sdk.collect_creator_fee_v2_instructions(----<a id="sec-180"></a>+<a id="sec-179"></a>> **Source:** `docs/pumpfun-program/docs/instructions/CREATOR_FEE_SHARING.md` · [↑ table of contents](#table-of-contents)@@ -39801,7 +38237,7 @@ ixs.extend(sdk.distribute_creator_fees_v2_instructions(----<a id="sec-181"></a>+<a id="sec-180"></a>> **Source:** `docs/pumpfun-program/docs/instructions/SELL.md` · [↑ table of contents](#table-of-contents)@@ -39978,7 +38414,7 @@ ixs.extend(----<a id="sec-182"></a>+<a id="sec-181"></a>> **Source:** `docs/quick-start.md` · [↑ table of contents](#table-of-contents)@@ -40271,7 +38707,7 @@ If you're embedding inside a sandboxed iframe, make sure the parent grants `allo----<a id="sec-183"></a>+<a id="sec-182"></a>> **Source:** `docs/remix.md` · [↑ table of contents](#table-of-contents)@@ -40473,7 +38909,7 @@ still recorded — the royalty leg reports `payout_unconfigured` instead of payi----<a id="sec-184"></a>+<a id="sec-183"></a>> **Source:** `docs/reputation.md` · [↑ table of contents](#table-of-contents)@@ -40672,7 +39108,7 @@ See the [Validation](./validation.md) documentation for details.----<a id="sec-185"></a>+<a id="sec-184"></a>> **Source:** `docs/risk-acknowledgment.md` · [↑ table of contents](#table-of-contents)@@ -40784,7 +39220,7 @@ the same change.----<a id="sec-186"></a>+<a id="sec-185"></a>> **Source:** `docs/sas-attestations.md` · [↑ table of contents](#table-of-contents)@@ -41003,7 +39439,7 @@ Closing (revoking) an attestation is done server-side via `sasClose()` in [api/_----<a id="sec-187"></a>+<a id="sec-186"></a>> **Source:** `docs/sdk.md` · [↑ table of contents](#table-of-contents)@@ -41438,7 +39874,7 @@ python3 -m http.server 8080----<a id="sec-188"></a>+<a id="sec-187"></a>> **Source:** `docs/security.md` · [↑ table of contents](#table-of-contents)@@ -41787,7 +40223,7 @@ For validator misconduct (biased or falsified on-chain attestations), open a pub----<a id="sec-189"></a>+<a id="sec-188"></a>> **Source:** `docs/share-and-embed.md` · [↑ table of contents](#table-of-contents)@@ -41884,7 +40320,7 @@ To customize the preview image, change the agent's thumbnail in the editor.----<a id="sec-190"></a>+<a id="sec-189"></a>> **Source:** `docs/skills.md` · [↑ table of contents](#table-of-contents)@@ -42596,7 +41032,7 @@ For IPFS publishing, the CID of the directory becomes the stable URI. Agents can----<a id="sec-191"></a>+<a id="sec-190"></a>> **Source:** `docs/smart-contracts.md` · [↑ table of contents](#table-of-contents)@@ -43189,7 +41625,7 @@ On Base at typical gas prices (~0.001 gwei base fee), an agent registration runs----<a id="sec-192"></a>+<a id="sec-191"></a>> **Source:** `docs/solana-pumpfun.md` · [↑ table of contents](#table-of-contents)@@ -43363,7 +41799,7 @@ The MCP client and cron crawler are unit-tested with mocked `fetch` and `sql`. E----<a id="sec-193"></a>+<a id="sec-192"></a>> **Source:** `docs/solana-reputation.md` · [↑ table of contents](#table-of-contents)@@ -43559,7 +41995,7 @@ The shapes differ; the purpose is identical — let an agent decide, before it p----<a id="sec-194"></a>+<a id="sec-193"></a>> **Source:** `docs/solana.md` · [↑ table of contents](#table-of-contents)@@ -43783,7 +42219,7 @@ A full ERC-8004-equivalent on Solana would mean writing three Anchor programs (I----<a id="sec-195"></a>+<a id="sec-194"></a>> **Source:** `docs/spatial-mcp.md` · [↑ table of contents](#table-of-contents)@@ -43893,7 +42329,7 @@ Free 3D Studio (`structuredContent.spatial`): `forge_free`, `text_to_avatar`, `m----<a id="sec-196"></a>+<a id="sec-195"></a>> **Source:** `docs/specs/agent-trading.md` · [↑ table of contents](#table-of-contents)@@ -43980,7 +42416,7 @@ Real routes (no mocks), server-side guards with tests (including the $THREE-sell----<a id="sec-197"></a>+<a id="sec-196"></a>> **Source:** `docs/start-here.md` · [↑ table of contents](#table-of-contents)@@ -44072,7 +42508,7 @@ If you're here to create and share agents rather than write code, follow this pa----<a id="sec-198"></a>+<a id="sec-197"></a>> **Source:** `docs/syndication.md` · [↑ table of contents](#table-of-contents)@@ -44194,7 +42630,7 @@ updated feed.----<a id="sec-199"></a>+<a id="sec-198"></a>> **Source:** `docs/token-gated-3d-embeds.md` · [↑ table of contents](#table-of-contents)@@ -44312,7 +42748,7 @@ Every check that matters happens on the server:----<a id="sec-200"></a>+<a id="sec-199"></a>> **Source:** `docs/trader-card.md` · [↑ table of contents](#table-of-contents)@@ -44370,7 +42806,7 @@ Returns the identity summary, KPI aggregates, and the per-coin ledger — `known----<a id="sec-201"></a>+<a id="sec-200"></a>> **Source:** `docs/trading-arenas.md` · [↑ table of contents](#table-of-contents)@@ -44439,7 +42875,7 @@ Prove yourself solo (the [trading surfaces](trading-surfaces.md) → the [leader----<a id="sec-202"></a>+<a id="sec-201"></a>> **Source:** `docs/trading-copilot.md` · [↑ table of contents](#table-of-contents)@@ -44578,7 +43014,7 @@ plumbing — and never suggests, shills, or names another token on its own initi----<a id="sec-203"></a>+<a id="sec-202"></a>> **Source:** `docs/trading-experiment.md` · [↑ table of contents](#table-of-contents)@@ -44734,7 +43170,7 @@ much — and tune the next run. That is the whole point of the experiment.----<a id="sec-204"></a>+<a id="sec-203"></a>> **Source:** `docs/trading-surfaces.md` · [↑ table of contents](#table-of-contents)@@ -44879,7 +43315,7 @@ Agents wanting the same intel over MCP: see [docs/mcp.md](mcp.md) (`@three-ws/in----<a id="sec-205"></a>+<a id="sec-204"></a>> **Source:** `docs/troubleshooting.md` · [↑ table of contents](#table-of-contents)@@ -45525,7 +43961,7 @@ This is a known open issue. The `IdleAnimation` class is implemented in `src/idl----<a id="sec-206"></a>+<a id="sec-205"></a>> **Source:** `docs/trust-primitives.md` · [↑ table of contents](#table-of-contents)@@ -45765,7 +44201,7 @@ See also: [x402 paid endpoints](./x402.md) · [Agent Bouncer](./api-reference.md----<a id="sec-207"></a>+<a id="sec-206"></a>> **Source:** `docs/tutorials/agent-personality.md` · [↑ table of contents](#table-of-contents)@@ -46217,7 +44653,7 @@ The system prompt is the cheapest, highest-leverage thing you can change about a----<a id="sec-208"></a>+<a id="sec-207"></a>> **Source:** `docs/tutorials/agent-reputation.md` · [↑ table of contents](#table-of-contents)@@ -46521,7 +44957,7 @@ A read costs nothing and asks no one's permission. That's the property that lets----<a id="sec-209"></a>+<a id="sec-208"></a>> **Source:** `docs/tutorials/animate-your-avatar.md` · [↑ table of contents](#table-of-contents)@@ -46746,7 +45182,7 @@ Primary call to action: open **[/pose](/pose)**, load an avatar, and apply your----<a id="sec-210"></a>+<a id="sec-209"></a>> **Source:** `docs/tutorials/build-a-scene.md` · [↑ table of contents](#table-of-contents)@@ -46965,7 +45401,7 @@ The leverage of [Scene Studio](/scene) is that it's a *real* editor producing a----<a id="sec-211"></a>+<a id="sec-210"></a>> **Source:** `docs/tutorials/claim-threews-name.md` · [↑ table of contents](#table-of-contents)@@ -47273,7 +45709,7 @@ See also:----<a id="sec-212"></a>+<a id="sec-211"></a>> **Source:** `docs/tutorials/connect-ai-brain.md` · [↑ table of contents](#table-of-contents)@@ -47595,7 +46031,7 @@ The brain is the part of the agent you'll iterate on most after the system promp----<a id="sec-213"></a>+<a id="sec-212"></a>> **Source:** `docs/tutorials/create-and-edit-memory.md` · [↑ table of contents](#table-of-contents)@@ -47916,7 +46352,7 @@ The leverage is in *enhancement*: the right type, one fact per memory, tags, del----<a id="sec-214"></a>+<a id="sec-213"></a>> **Source:** `docs/tutorials/custom-skill.md` · [↑ table of contents](#table-of-contents)@@ -48429,7 +46865,7 @@ The skill installs via a URI in the agent manifest, runs entirely client-side, a----<a id="sec-215"></a>+<a id="sec-214"></a>> **Source:** `docs/tutorials/customize-appearance.md` · [↑ table of contents](#table-of-contents)@@ -48854,7 +47290,7 @@ Most production embeds use four or five of these together. The combination is wh----<a id="sec-216"></a>+<a id="sec-215"></a>> **Source:** `docs/tutorials/deploy-to-vercel-custom-domain.md` · [↑ table of contents](#table-of-contents)@@ -49369,7 +47805,7 @@ In rough order of likelihood:----<a id="sec-217"></a>+<a id="sec-216"></a>> **Source:** `docs/tutorials/embed-in-30-seconds.md` · [↑ table of contents](#table-of-contents)@@ -49642,7 +48078,7 @@ A working embedded agent is the foundation everything else builds on. From here,----<a id="sec-218"></a>+<a id="sec-217"></a>> **Source:** `docs/tutorials/embed-on-website.md` · [↑ table of contents](#table-of-contents)@@ -50144,7 +48580,7 @@ Squarespace's developer preview and published output can differ. Try adding the----<a id="sec-219"></a>+<a id="sec-218"></a>> **Source:** `docs/tutorials/emotion-from-data.md` · [↑ table of contents](#table-of-contents)@@ -50372,7 +48808,7 @@ function reactIfConfident(clipOrEmoteName, { confident, useExactClip = false } =----<a id="sec-220"></a>+<a id="sec-219"></a>> **Source:** `docs/tutorials/first-agent.md` · [↑ table of contents](#table-of-contents)@@ -50889,7 +49325,7 @@ Now that you have a working agent, here's what to explore next:----<a id="sec-221"></a>+<a id="sec-220"></a>> **Source:** `docs/tutorials/generate-3d-api.md` · [↑ table of contents](#table-of-contents)@@ -51098,7 +49534,7 @@ If you've never made an x402 call, start with [Build a paid x402 endpoint](/tuto----<a id="sec-222"></a>+<a id="sec-221"></a>> **Source:** `docs/tutorials/getting-started.md` · [↑ table of contents](#table-of-contents)@@ -51269,7 +49705,7 @@ Everything is editable forever — swap the body, rewrite the prompt, add capabi----<a id="sec-223"></a>+<a id="sec-222"></a>> **Source:** `docs/tutorials/greeting-and-first-speech.md` · [↑ table of contents](#table-of-contents)@@ -51637,7 +50073,7 @@ A working greeting moves the embed from "decoration" to "interaction", which is----<a id="sec-224"></a>+<a id="sec-223"></a>> **Source:** `docs/tutorials/image-to-3d.md` · [↑ table of contents](#table-of-contents)@@ -51740,7 +50176,7 @@ Everything you generate is kept in **Your creations** at the bottom of the page,----<a id="sec-225"></a>+<a id="sec-224"></a>> **Source:** `docs/tutorials/import-avatar-url.md` · [↑ table of contents](#table-of-contents)@@ -51908,7 +50344,7 @@ The URL path and the file-upload path converge on the same avatar record and the----<a id="sec-226"></a>+<a id="sec-225"></a>> **Source:** `docs/tutorials/js-api-events.md` · [↑ table of contents](#table-of-contents)@@ -52386,7 +50822,7 @@ The `whenReady`, `speakAndWait`, and try/catch patterns are small but they remov----<a id="sec-227"></a>+<a id="sec-226"></a>> **Source:** `docs/tutorials/mcp-server-for-your-agent.md` · [↑ table of contents](#table-of-contents)@@ -52997,7 +51433,7 @@ Things that look right but bite you:----<a id="sec-228"></a>+<a id="sec-227"></a>> **Source:** `docs/tutorials/mine-vanity-address.md` · [↑ table of contents](#table-of-contents)@@ -53266,7 +51702,7 @@ The protocol itself is fully specified in [docs/PROTOCOL-vanity.md](../PROTOCOL-----<a id="sec-229"></a>+<a id="sec-228"></a>> **Source:** `docs/tutorials/mint-pumpfun-token.md` · [↑ table of contents](#table-of-contents)@@ -53618,7 +52054,7 @@ If you have a lawyer, talk to them before launching. If you don't, default to th----<a id="sec-230"></a>+<a id="sec-229"></a>> **Source:** `docs/tutorials/multi-agent-coordination.md` · [↑ table of contents](#table-of-contents)@@ -54185,7 +52621,7 @@ async function safeHandoff(targetEl, brief, fallbackEl, originalQuestion) {----<a id="sec-231"></a>+<a id="sec-230"></a>> **Source:** `docs/tutorials/nvidia-3d-free.md` · [↑ table of contents](#table-of-contents)@@ -54302,7 +52738,7 @@ It talks **directly** to a TRELLIS NIM and returns the GLB **synchronously** in----<a id="sec-232"></a>+<a id="sec-231"></a>> **Source:** `docs/tutorials/nvidia-nim-self-host.md` · [↑ table of contents](#table-of-contents)@@ -54478,7 +52914,7 @@ The proxy normalizes every documented artifact shape (inline `base64`, a bare st----<a id="sec-233"></a>+<a id="sec-232"></a>> **Source:** `docs/tutorials/paid-x402-endpoint.md` · [↑ table of contents](#table-of-contents)@@ -55170,7 +53606,7 @@ Both work. Choose based on whether your endpoint is part of an agent platform yo----<a id="sec-234"></a>+<a id="sec-233"></a>> **Source:** `docs/tutorials/pay-for-x402-service.md` · [↑ table of contents](#table-of-contents)@@ -55434,7 +53870,7 @@ package family is listed under [x402 → Open-source packages](/x402#open-source----<a id="sec-235"></a>+<a id="sec-234"></a>> **Source:** `docs/tutorials/personal-ai-site.md` · [↑ table of contents](#table-of-contents)@@ -55970,7 +54406,7 @@ The technical investment is one HTML file, a GLB avatar, and a system prompt. Th----<a id="sec-236"></a>+<a id="sec-235"></a>> **Source:** `docs/tutorials/place-agent-irl.md` · [↑ table of contents](#table-of-contents)@@ -56215,7 +54651,7 @@ This is fundamentally different from viewing a single model in AR. If you only n----<a id="sec-237"></a>+<a id="sec-236"></a>> **Source:** `docs/tutorials/prompts-for-3d.md` · [↑ table of contents](#table-of-contents)@@ -56351,7 +54787,7 @@ The tiers are explained in detail in [the text-to-3D tutorial](/tutorials/text-t----<a id="sec-238"></a>+<a id="sec-237"></a>> **Source:** `docs/tutorials/register-onchain.md` · [↑ table of contents](#table-of-contents)@@ -56681,7 +55117,7 @@ Your agent's URL will keep working as long as Base exists and IPFS gateways serv----<a id="sec-239"></a>+<a id="sec-238"></a>> **Source:** `docs/tutorials/self-host-agent-backend.md` · [↑ table of contents](#table-of-contents)@@ -57261,7 +55697,7 @@ A self-hosted instance with light traffic runs at $20–50/month all-in. The dom----<a id="sec-240"></a>+<a id="sec-239"></a>> **Source:** `docs/tutorials/selfie-to-avatar.md` · [↑ table of contents](#table-of-contents)@@ -57509,7 +55945,7 @@ The result is a standard `.glb` that animates in the [Animation Studio](/pose),----<a id="sec-241"></a>+<a id="sec-240"></a>> **Source:** `docs/tutorials/share-your-agent.md` · [↑ table of contents](#table-of-contents)@@ -57835,7 +56271,7 @@ The agent's URL is the durable handle. Embed it, link it, print it. The agent sh----<a id="sec-242"></a>+<a id="sec-241"></a>> **Source:** `docs/tutorials/shopify-store-guide-advanced.md` · [↑ table of contents](#table-of-contents)@@ -58145,7 +56581,7 @@ The clip URLs inside the manifest resolve **relative to the manifest**, so a sel----<a id="sec-243"></a>+<a id="sec-242"></a>> **Source:** `docs/tutorials/shopify-store-guide.md` · [↑ table of contents](#table-of-contents)@@ -58234,7 +56670,7 @@ It's powered by the open-source [`@three-ws/tour`](https://www.npmjs.com/package----<a id="sec-244"></a>+<a id="sec-243"></a>> **Source:** `docs/tutorials/skill-with-database-auth.md` · [↑ table of contents](#table-of-contents)@@ -58972,7 +57408,7 @@ Before this skill faces a real visitor:----<a id="sec-245"></a>+<a id="sec-244"></a>> **Source:** `docs/tutorials/solana-agent-reputation.md` · [↑ table of contents](#table-of-contents)@@ -59155,7 +57591,7 @@ A read costs nothing and asks no one's permission — which is exactly what lets----<a id="sec-246"></a>+<a id="sec-245"></a>> **Source:** `docs/tutorials/sperax-tour.md` · [↑ table of contents](#table-of-contents)@@ -59326,7 +57762,7 @@ This is covered by an automated test — [`tour-sdk/test/director.test.mjs`](htt----<a id="sec-247"></a>+<a id="sec-246"></a>> **Source:** `docs/tutorials/swap-avatar-in-studio.md` · [↑ table of contents](#table-of-contents)@@ -59588,7 +58024,7 @@ The key insight is the snippet's stability. Once embedded, your customers' pages----<a id="sec-248"></a>+<a id="sec-247"></a>> **Source:** `docs/tutorials/text-to-3d.md` · [↑ table of contents](#table-of-contents)@@ -59710,7 +58146,7 @@ This is normal — prompt, generate, adjust, repeat is the workflow, not a failu----<a id="sec-249"></a>+<a id="sec-248"></a>> **Source:** `docs/tutorials/trigger-from-page-events.md` · [↑ table of contents](#table-of-contents)@@ -60214,7 +58650,7 @@ The pattern under all of these is the same: every recipe starts with `whenReady(----<a id="sec-250"></a>+<a id="sec-249"></a>> **Source:** `docs/tutorials/upload-custom-glb.md` · [↑ table of contents](#table-of-contents)@@ -60610,7 +59046,7 @@ Once the body is on the platform, the embed snippet doesn't change. The same `<a----<a id="sec-251"></a>+<a id="sec-250"></a>> **Source:** `docs/tutorials/view-in-ar.md` · [↑ table of contents](#table-of-contents)@@ -60785,7 +59221,7 @@ AR surface detection needs a moment to work. Move the phone slowly over the targ----<a id="sec-252"></a>+<a id="sec-251"></a>> **Source:** `docs/tutorials/voice-and-lipsync.md` · [↑ table of contents](#table-of-contents)@@ -61016,7 +59452,7 @@ The leverage is that the avatar drives its mouth from the *audio it actually pla----<a id="sec-253"></a>+<a id="sec-252"></a>> **Source:** `docs/tutorials/walk-companion.md` · [↑ table of contents](#table-of-contents)@@ -61369,7 +59805,7 @@ The leverage is composability: the same engine renders the corner mascot, the fu----<a id="sec-254"></a>+<a id="sec-253"></a>> **Source:** `docs/tutorials/web-component-end-to-end.md` · [↑ table of contents](#table-of-contents)@@ -61968,7 +60404,7 @@ The web component is the most robust integration point the platform offers. Buil----<a id="sec-255"></a>+<a id="sec-254"></a>> **Source:** `docs/ui-juice.md` · [↑ table of contents](#table-of-contents)@@ -62130,7 +60566,7 @@ should reach for these primitives rather than re-rolling RAF loops.----<a id="sec-256"></a>+<a id="sec-255"></a>> **Source:** `docs/ux-flows/01-onboarding-creation.md` · [↑ table of contents](#table-of-contents)@@ -62336,7 +60772,7 @@ should reach for these primitives rather than re-rolling RAF loops.----<a id="sec-257"></a>+<a id="sec-256"></a>> **Source:** `docs/ux-flows/02-forge-text-to-3d.md` · [↑ table of contents](#table-of-contents)@@ -62506,7 +60942,7 @@ Routing facts (from `vercel.json`):----<a id="sec-258"></a>+<a id="sec-257"></a>> **Source:** `docs/ux-flows/03-3d-editing-viewer.md` · [↑ table of contents](#table-of-contents)@@ -62712,7 +61148,7 @@ Routing summary (from `vite.config.js`):----<a id="sec-259"></a>+<a id="sec-258"></a>> **Source:** `docs/ux-flows/04-embed-widget-studio.md` · [↑ table of contents](#table-of-contents)@@ -62886,7 +61322,7 @@ Routing recap (from `vercel.json`):----<a id="sec-260"></a>+<a id="sec-259"></a>> **Source:** `docs/ux-flows/05-discovery-social.md` · [↑ table of contents](#table-of-contents)@@ -63157,7 +61593,7 @@ Routing recap (from `vercel.json`):----<a id="sec-261"></a>+<a id="sec-260"></a>> **Source:** `docs/ux-flows/06-marketplace-skills.md` · [↑ table of contents](#table-of-contents)@@ -63371,7 +61807,7 @@ Routing facts confirmed in `vercel.json`:----<a id="sec-262"></a>+<a id="sec-261"></a>> **Source:** `docs/ux-flows/07-crypto-trading-analytics.md` · [↑ table of contents](#table-of-contents)@@ -63720,7 +62156,7 @@ coin-intel, pump-visualizer and pump-live — adding a coin on any surface shows----<a id="sec-263"></a>+<a id="sec-262"></a>> **Source:** `docs/ux-flows/08-coin-launch-wallets.md` · [↑ table of contents](#table-of-contents)@@ -63993,7 +62429,7 @@ real Solana/EVM RPC, pump.fun, and x402 — no mocks.----<a id="sec-264"></a>+<a id="sec-263"></a>> **Source:** `docs/ux-flows/09-x402-agent-commerce.md` · [↑ table of contents](#table-of-contents)@@ -64335,7 +62771,7 @@ choreographed two-agent narrative driven by Server-Sent Events.----<a id="sec-265"></a>+<a id="sec-264"></a>> **Source:** `docs/ux-flows/10-chat-brain-labs.md` · [↑ table of contents](#table-of-contents)@@ -64577,7 +63013,7 @@ modules. Routes resolved via `vercel.json` rewrites.----<a id="sec-266"></a>+<a id="sec-265"></a>> **Source:** `docs/ux-flows/11-account-dashboard.md` · [↑ table of contents](#table-of-contents)@@ -64796,7 +63232,7 @@ Shared auth concepts:----<a id="sec-267"></a>+<a id="sec-266"></a>> **Source:** `docs/ux-flows/12-home-and-content.md` · [↑ table of contents](#table-of-contents)@@ -64984,7 +63420,7 @@ All `/.well-known/*` and `/openapi.json` / `/sitemap.xml` responses are JSON/XML----<a id="sec-268"></a>+<a id="sec-267"></a>> **Source:** `docs/validation.md` · [↑ table of contents](#table-of-contents)@@ -65332,7 +63768,7 @@ The toggle's CSS class reflects the highest severity: `level-0` (errors), `level----<a id="sec-269"></a>+<a id="sec-268"></a>> **Source:** `docs/vanity.md` · [↑ table of contents](#table-of-contents)@@ -65563,7 +63999,7 @@ challenges and the discovery doc stay in parity.----<a id="sec-270"></a>+<a id="sec-269"></a>> **Source:** `docs/viewer.md` · [↑ table of contents](#table-of-contents)@@ -65933,7 +64369,7 @@ State is persisted to `localStorage` per agent ID when `attachScenePrefs(agentId----<a id="sec-271"></a>+<a id="sec-270"></a>> **Source:** `docs/web-component.md` · [↑ table of contents](#table-of-contents)@@ -66877,7 +65313,7 @@ defineElement('my-agent');----<a id="sec-272"></a>+<a id="sec-271"></a>> **Source:** `docs/widget-api.md` · [↑ table of contents](#table-of-contents)@@ -67076,7 +65512,7 @@ If you have multiple widgets and want to coordinate them (sync camera, broadcast----<a id="sec-273"></a>+<a id="sec-272"></a>> **Source:** `docs/widget-studio.md` · [↑ table of contents](#table-of-contents)@@ -67329,7 +65765,7 @@ You can override these freely in the iframe `width` and `height` attributes. Add----<a id="sec-274"></a>+<a id="sec-273"></a>> **Source:** `docs/widgets.md` · [↑ table of contents](#table-of-contents)@@ -67838,7 +66274,7 @@ Need to drive a widget from the parent page — change the camera, play an anima----<a id="sec-275"></a>+<a id="sec-274"></a>> **Source:** `docs/x402-buyer.md` · [↑ table of contents](#table-of-contents)@@ -67940,7 +66376,7 @@ set) back into the payment so attribution survives the round trip.----<a id="sec-276"></a>+<a id="sec-275"></a>> **Source:** `docs/x402-dev-tools.md` · [↑ table of contents](#table-of-contents)@@ -68134,7 +66570,7 @@ implementation against a live server.----<a id="sec-277"></a>+<a id="sec-276"></a>> **Source:** `docs/x402-endpoints.md` · [↑ table of contents](#table-of-contents)@@ -68346,7 +66782,7 @@ input and do not promote any specific token.----<a id="sec-278"></a>+<a id="sec-277"></a>> **Source:** `docs/x402-revenue.md` · [↑ table of contents](#table-of-contents)@@ -68704,7 +67140,7 @@ settled activity (include it), and label it as such.----<a id="sec-279"></a>+<a id="sec-278"></a>> **Source:** `docs/x402-ring-economy.md` · [↑ table of contents](#table-of-contents)@@ -69430,7 +67866,7 @@ curl -s -H "Authorization: Bearer $CRON_SECRET" \----<a id="sec-280"></a>+<a id="sec-279"></a>> **Source:** `docs/x402.md` · [↑ table of contents](#table-of-contents)@@ -69606,7 +68042,7 @@ Each package has its own repository with a full README, API reference, and examp----<a id="sec-281"></a>+<a id="sec-280"></a>> **Source:** `docs/zauth/database.md` · [↑ table of contents](#table-of-contents)@@ -69752,7 +68188,7 @@ Use this endpoint to browse all known x402 endpoints before your agents commit t----<a id="sec-282"></a>+<a id="sec-281"></a>> **Source:** `docs/zauth/index.md` · [↑ table of contents](#table-of-contents)@@ -69776,7 +68212,7 @@ zauth is the security and trust layer that allows agents to act with confidence,----<a id="sec-283"></a>+<a id="sec-282"></a>> **Source:** `docs/zauth/provider-hub.md` · [↑ table of contents](#table-of-contents)@@ -69878,7 +68314,7 @@ Supply your EVM or Solana private keys to enable automatic refunds when your end----<a id="sec-284"></a>+<a id="sec-283"></a>> **Source:** `docs/zauth/reposcan.md` · [↑ table of contents](#table-of-contents)@@ -70204,7 +68640,7 @@ TypeScript -@x402/fetch----<a id="sec-285"></a>+<a id="sec-284"></a>> **Source:** `docs/zauth/vector.md` · [↑ table of contents](#table-of-contents)diff --git a/docs/api-reference.md b/docs/api-reference.mdindex 6b9338a8f..a286c9396 100644--- a/docs/api-reference.md+++ b/docs/api-reference.md@@ -2575,7 +2575,7 @@ GET /api/coin/news?q=<coin name>&limit=8Returns `{ "articles": [{ title, link, description, image, source,published_at }], "source": "three.ws" }`. Served by the native three.ws-aggregator (`api/_lib/news.js` — 38 publisher feeds, per-source 5-minute cache+aggregator (`api/_lib/news.js` — 192 publisher feeds, per-source 5-minute cachewith serve-stale-on-error).---diff --git a/docs/coin-pages.md b/docs/coin-pages.mdindex c26a39767..55a9e54d5 100644--- a/docs/coin-pages.md+++ b/docs/coin-pages.md@@ -43,7 +43,7 @@ editorial serif headings, hairline borders, mono numerals, light/dark themes.- **Market stats** — market cap, 24h volume, circulating/total supply,all-time high and low (dated), 24h high/low.- **Related news** — live articles mentioning the coin, from the native- three.ws aggregator (38 publisher feeds, `api/_lib/news.js`).+ three.ws aggregator (192 publisher feeds, `api/_lib/news.js`).- **About + links** — plain-text description, official site / social /explorer pills, and per-chain contract addresses with one-click copy.- **three.ws integration** — coins with a Solana contract cross-link into@@ -212,7 +212,7 @@ All data is real and fetched at runtime — nothing is hardcoded or sampled:| `/api/coin/global` | CoinGecko `/global` + alternative.me Fear & Greed | 120 s || `/api/coin/fear-greed` | alternative.me `/fng` (current + history) | 300 s || `/api/coin/gas` | public Ethereum RPC `eth_feeHistory` + CoinGecko ETH price | 15 s |-| `/api/coin/news` | native aggregator (`api/_lib/news.js`, 38 publisher feeds) | 300 s |+| `/api/coin/news` | native aggregator (`api/_lib/news.js`, 192 publisher feeds) | 300 s || `/api/news/feed` | native aggregator — 38 publisher RSS/Atom feeds, per-source cache + serve-stale | 120 s || `/api/news/article` | publisher page fetch (SSRF-guarded) → publisher feed body → preview; LLM analysis via Groq/OpenRouter with extractive fallback | 1800 s || `/api/news/archive` | `gs://three-ws-news-archive` (662k-article JSONL corpus + indexes on GCS) | 300 s / 3600 s |diff --git a/pages/markets-news.html b/pages/markets-news.htmlindex ac2f4c59c..279195e20 100644--- a/pages/markets-news.html+++ b/pages/markets-news.html@@ -21,7 +21,7 @@<title>Crypto News · three.ws</title><metaname="description"- content="Live crypto news aggregated from 38 publisher feeds — CoinDesk, The Block, Decrypt, CoinTelegraph and more. Filter by category, search headlines, and open any story in a rich reader."+ content="Live crypto news aggregated from 192 publisher feeds — CoinDesk, The Block, Decrypt, CoinTelegraph and more. Filter by category, search headlines, and open any story in a rich reader."/><meta property="og:type" content="website" /><meta property="og:site_name" content="three.ws" />@@ -29,11 +29,11 @@<meta property="og:title" content="Crypto News · three.ws" /><metaproperty="og:description"- content="Live crypto news aggregated from 38 publisher feeds, filterable by category and searchable — with a rich reader for every story."+ content="Live crypto news aggregated from 192 publisher feeds, filterable by category and searchable — with a rich reader for every story."/><metaproperty="og:image"- content="https://three.ws/api/page-og?s=crypto&t=Crypto+News&d=Live+crypto+news+aggregated+natively+from+38+publisher+feeds+%E2%80%94+filter+by+category+%28Bitcoin%2C+DeFi%2C+regulation%2C+and+more%29%2C+search+headlines%2C+and+open+any+story+in&p=%2Fmarkets%2Fnews"+ content="https://three.ws/api/page-og?s=crypto&t=Crypto+News&d=Live+crypto+news+aggregated+natively+from+192+publisher+feeds+%E2%80%94+filter+by+category+%28Bitcoin%2C+DeFi%2C+regulation%2C+and+more%29%2C+search+headlines%2C+and+open+any+story+in&p=%2Fmarkets%2Fnews"/><meta property="og:image:width" content="1200" /><meta property="og:image:height" content="630" />@@ -42,11 +42,11 @@<meta name="twitter:title" content="Crypto News · three.ws" /><metaname="twitter:description"- content="Live crypto news aggregated from 38 publisher feeds, filterable by category and searchable."+ content="Live crypto news aggregated from 192 publisher feeds, filterable by category and searchable."/><metaname="twitter:image"- content="https://three.ws/api/page-og?s=crypto&t=Crypto+News&d=Live+crypto+news+aggregated+natively+from+38+publisher+feeds+%E2%80%94+filter+by+category+%28Bitcoin%2C+DeFi%2C+regulation%2C+and+more%29%2C+search+headlines%2C+and+open+any+story+in&p=%2Fmarkets%2Fnews"+ content="https://three.ws/api/page-og?s=crypto&t=Crypto+News&d=Live+crypto+news+aggregated+natively+from+192+publisher+feeds+%E2%80%94+filter+by+category+%28Bitcoin%2C+DeFi%2C+regulation%2C+and+more%29%2C+search+headlines%2C+and+open+any+story+in&p=%2Fmarkets%2Fnews"/><meta name="theme-color" content="#09090b" /><link rel="icon" href="/favicon.ico" sizes="any" />@@ -67,7 +67,7 @@<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1" /><meta property="og:locale" content="en_US" /><meta property="og:image:alt" content="Crypto News — three.ws" />- <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Crypto News","description":"Live crypto news aggregated from 38 publisher feeds — filterable by category, searchable, with a rich reader for every story.","url":"https://three.ws/markets/news","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"}}]}</script>+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Crypto News","description":"Live crypto news aggregated from 192 publisher feeds — filterable by category, searchable, with a rich reader for every story.","url":"https://three.ws/markets/news","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"}}]}</script></head><body><header><div id="nav-container"></div></header>@@ -79,7 +79,7 @@</nav><h1 class="cv-h1">Crypto News</h1><p class="cv-sub">- Live headlines aggregated from 38 publisher feeds across the industry — majors,+ Live headlines aggregated from 192 publisher feeds across the industry — majors,research desks, on-chain analysts, exchanges, and regulators. Click any story for arich reader with summary, key points, and related coverage.</p>diff --git a/pages/markets.html b/pages/markets.htmlindex a3f7dec67..8fd6c8d75 100644--- a/pages/markets.html+++ b/pages/markets.html@@ -21,7 +21,7 @@<title>Markets — live crypto prices, news & tools · three.ws</title><metaname="description"- content="The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 38 publisher feeds, a 662k-article news archive, and the full markets toolset: heatmap, screener, fear & greed, gas, DeFi TVL, and more."+ content="The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 192 publisher feeds, a 662k-article news archive, and the full markets toolset: heatmap, screener, fear & greed, gas, DeFi TVL, and more."/><meta property="og:type" content="website" /><meta property="og:site_name" content="three.ws" />@@ -33,7 +33,7 @@/><metaproperty="og:image"- content="https://three.ws/api/page-og?s=crypto&t=Markets+Hub&d=The+three.ws+markets+hub+%E2%80%94+live+global+stats%2C+the+top+100+coins%2C+breaking+crypto+news+from+38+publisher+feeds%2C+a+662k-article+news+archive%2C+and+hero+links+to+th&p=%2Fmarkets"+ content="https://three.ws/api/page-og?s=crypto&t=Markets+Hub&d=The+three.ws+markets+hub+%E2%80%94+live+global+stats%2C+the+top+100+coins%2C+breaking+crypto+news+from+192+publisher+feeds%2C+a+662k-article+news+archive%2C+and+hero+links+to+th&p=%2Fmarkets"/><meta property="og:image:width" content="1200" /><meta property="og:image:height" content="630" />@@ -46,7 +46,7 @@/><metaname="twitter:image"- content="https://three.ws/api/page-og?s=crypto&t=Markets+Hub&d=The+three.ws+markets+hub+%E2%80%94+live+global+stats%2C+the+top+100+coins%2C+breaking+crypto+news+from+38+publisher+feeds%2C+a+662k-article+news+archive%2C+and+hero+links+to+th&p=%2Fmarkets"+ content="https://three.ws/api/page-og?s=crypto&t=Markets+Hub&d=The+three.ws+markets+hub+%E2%80%94+live+global+stats%2C+the+top+100+coins%2C+breaking+crypto+news+from+192+publisher+feeds%2C+a+662k-article+news+archive%2C+and+hero+links+to+th&p=%2Fmarkets"/><meta name="theme-color" content="#09090b" /><link rel="icon" href="/favicon.ico" sizes="any" />@@ -61,7 +61,7 @@<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1" /><meta property="og:locale" content="en_US" /><meta property="og:image:alt" content="Markets hub — three.ws" />- <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Markets","description":"The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 38 publisher feeds, a 662k-article news archive, and the full markets toolset.","url":"https://three.ws/markets","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"}}]}</script>+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Markets","description":"The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 192 publisher feeds, a 662k-article news archive, and the full markets toolset.","url":"https://three.ws/markets","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"}}]}</script></head><body><header><div id="nav-container"></div></header>@@ -71,7 +71,7 @@<h1 class="cv-h1">Markets</h1><p class="cv-sub">Everything the market is doing, in one place — live global stats, the top 100- coins, breaking news from 38 publisher feeds, a 660,000+-article archive back to+ coins, breaking news from 192 publisher feeds, a 660,000+-article archive back to2017, and the full markets toolset.</p>diff --git a/pages/news-digest.html b/pages/news-digest.htmlindex 1c8b4d1aa..3bf880606 100644--- a/pages/news-digest.html+++ b/pages/news-digest.html@@ -70,7 +70,7 @@</nav><h1 class="cv-h1">News Digest</h1><p class="cv-sub">- The day in stories, not headlines. Coverage from 38 publisher feeds, grouped into+ The day in stories, not headlines. Coverage from 192 publisher feeds, grouped intothe handful of narratives that actually moved — each with a summary, a marketstance, the tickers involved, and every outlet that reported it.</p>diff --git a/public/changelog.json b/public/changelog.jsonindex c7e064282..2e8ab1f4e 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-10T13:03:08.253Z",+ "generated_at": "2026-07-10T13:20:50.739Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -10,7 +10,7 @@"date": "2026-07-10","type": "launch","title": "Crypto News",- "summary": "Live crypto news aggregated natively from 38 publisher feeds — filter by category (Bitcoin, DeFi, regulation, and more), search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.",+ "summary": "Live crypto news aggregated natively from 192 publisher feeds in 18 languages — filter by category (Bitcoin, DeFi, security, regulation, and more), pick a language, search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.","link": "/markets/news","tags": ["launch"@@ -60,12 +60,23 @@"date": "2026-07-10","type": "launch","title": "Markets Hub",- "summary": "The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 38 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.",+ "summary": "The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 192 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.","link": "/markets","tags": ["launch"]},+ {+ "date": "2026-07-10",+ "type": "update",+ "title": "A leftover test file stops loading on every visit",+ "summary": "A one-off test page and the 1.5 MB script it loaded were committed by mistake and had been sitting in the public folder ever since — downloadable by anyone and adding dead weight to the site for no reason. Both are gone, and the project now refuses to accept that kind of leftover again.",+ "link": null,+ "tags": [+ "fix",+ "infra"+ ]+ },{"date": "2026-07-10","type": "update",@@ -149,6 +160,17 @@"feature"]},+ {+ "date": "2026-07-10",+ "type": "update",+ "title": "Crypto news now aggregates 192 publisher feeds, in 18 languages",+ "summary": "The news feed grew from 38 sources to 192 — every major newsroom plus research desks, security teams, on-chain analysts, exchanges, regulators, and independent journalists, across 27 categories. 33 of them publish in a language other than English, so /markets/news now has a language picker covering 18 languages; the default feed stays English-only. Every feed was fetched and parsed before being added, so the list holds no dead links: of roughly 450 candidate feeds, about half turned out to be defunct domains, URLs that now serve a web page instead of a feed, or sites that block servers outright. Binance listing announcements are in there too, which no RSS feed carries.",+ "link": "/markets/news",+ "tags": [+ "feature",+ "improvement"+ ]+ },{"date": "2026-07-10","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex ecb65d7e5..565bdeac7 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -12,7 +12,7 @@<guid isPermaLink="false">2026-07-10:Crypto News</guid><pubDate>Fri, 10 Jul 2026 12:00:00 GMT</pubDate><category>launch</category>- <description>Live crypto news aggregated natively from 38 publisher feeds — filter by category (Bitcoin, DeFi, regulation, and more), search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.</description>+ <description>Live crypto news aggregated natively from 192 publisher feeds in 18 languages — filter by category (Bitcoin, DeFi, security, regulation, and more), pick a language, search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.</description></item><item><title>Crypto News Archive</title>@@ -52,7 +52,15 @@<guid isPermaLink="false">2026-07-10:Markets Hub</guid><pubDate>Fri, 10 Jul 2026 12:00:00 GMT</pubDate><category>launch</category>- <description>The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 38 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.</description>+ <description>The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 192 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.</description>+ </item>+ <item>+ <title>A leftover test file stops loading on every visit</title>+ <link>https://three.ws/changelog</link>+ <guid isPermaLink="false">2026-07-10:A leftover test file stops loading on every visit</guid>+ <pubDate>Fri, 10 Jul 2026 12:00:00 GMT</pubDate>+ <category>fix</category>+ <description>A one-off test page and the 1.5 MB script it loaded were committed by mistake and had been sitting in the public folder ever since — downloadable by anyone and adding dead weight to the site for no reason. Both are gone, and the project now refuses to accept that kind of leftover again.</description></item><item><title>Agents registered on-chain can no longer put a slur on three.ws</title>@@ -118,6 +126,14 @@<category>feature</category><description>Markets grew a full news wing. /markets/news streams live headlines aggregated directly from 38 publisher feeds — filter by category (Bitcoin, DeFi, regulation, and more), search, and open any story in a reader that extracts the full text with a summary, key points, sentiment, and related coverage. Behind it sits the largest open crypto-news archive anywhere: 662,047 articles from September 2017 to today in English and Chinese, searchable by keyword, ticker, source, sentiment, date, and language at /markets/archive. A new /markets hub ties the whole suite together — live global stats, the top 100 coins, breaking news, and every market tool as its own card.</description></item>+ <item>+ <title>Crypto news now aggregates 192 publisher feeds, in 18 languages</title>+ <link>https://three.ws/markets/news</link>+ <guid isPermaLink="false">2026-07-10:Crypto news now aggregates 192 publisher feeds, in 18 languages</guid>+ <pubDate>Fri, 10 Jul 2026 12:00:00 GMT</pubDate>+ <category>feature</category>+ <description>The news feed grew from 38 sources to 192 — every major newsroom plus research desks, security teams, on-chain analysts, exchanges, regulators, and independent journalists, across 27 categories. 33 of them publish in a language other than English, so /markets/news now has a language picker covering 18 languages; the default feed stays English-only. Every feed was fetched and parsed before being added, so the list holds no dead links: of roughly 450 candidate feeds, about half turned out to be defunct domains, URLs that now serve a web page instead of a feed, or sites that block servers outright. Binance listing announcements are in there too, which no RSS feed carries.</description>+ </item><item><title>Every doc on the site was checked against the code that actually ships</title><link>https://three.ws/docs</link>diff --git a/public/features.json b/public/features.jsonindex d56672a87..0a6d54e0a 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-10T13:03:08.224Z",+ "generated_at": "2026-07-10T13:20:50.725Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",@@ -1889,7 +1889,7 @@{"path": "/markets","title": "Markets Hub",- "description": "The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 38 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.",+ "description": "The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 192 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.","added": "2026-07-10","auth": null,"indexable": true,@@ -1899,7 +1899,7 @@{"path": "/markets/news","title": "Crypto News",- "description": "Live crypto news aggregated natively from 38 publisher feeds — filter by category (Bitcoin, DeFi, regulation, and more), search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.",+ "description": "Live crypto news aggregated natively from 192 publisher feeds in 18 languages — filter by category (Bitcoin, DeFi, security, regulation, and more), pick a language, search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.","added": "2026-07-10","auth": null,"indexable": true,diff --git a/public/llms-full.txt b/public/llms-full.txtindex 7082d57a7..ecdc12bd2 100644--- a/public/llms-full.txt+++ b/public/llms-full.txt@@ -1148,13 +1148,13 @@ Grind a custom Ethereum / EVM wallet address with the prefix or suffix of your cURL: https://three.ws/markets-The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 38 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.+The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 192 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.### Crypto NewsURL: https://three.ws/markets/news-Live crypto news aggregated natively from 38 publisher feeds — filter by category (Bitcoin, DeFi, regulation, and more), search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.+Live crypto news aggregated natively from 192 publisher feeds in 18 languages — filter by category (Bitcoin, DeFi, security, regulation, and more), pick a language, search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.### Crypto News Readerdiff --git a/public/llms.txt b/public/llms.txtindex 97c977897..c610e7e7f 100644--- a/public/llms.txt+++ b/public/llms.txt@@ -206,8 +206,8 @@ On-chain features: pay-per-call, token launches, vanity wallets.- [Token in 3D](https://three.ws/coin3d): Any pump.fun token as a live 3D scene — a spinning coin medallion with the token's logo, top holders as a galaxy sized by balance, and a graduation ring tracking bonding-curve progress.- [Hero Stage](https://three.ws/hero-demo): A cinematic 3D hero stage for three.ws agents — a lit avatar centered in deep space over concentric glowing rings, a drifting starfield, and soft bloom, with pointer parallax and a live avatar switcher. Motion-safe.- [EVM Vanity Wallet](https://three.ws/evm-wallet): Grind a custom Ethereum / EVM wallet address with the prefix or suffix of your choice. A real secp256k1 keypair, generated entirely in your browser — the private key never leaves your device.-- [Markets Hub](https://three.ws/markets): The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 38 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.-- [Crypto News](https://three.ws/markets/news): Live crypto news aggregated natively from 38 publisher feeds — filter by category (Bitcoin, DeFi, regulation, and more), search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.+- [Markets Hub](https://three.ws/markets): The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 192 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.+- [Crypto News](https://three.ws/markets/news): Live crypto news aggregated natively from 192 publisher feeds in 18 languages — filter by category (Bitcoin, DeFi, security, regulation, and more), pick a language, search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.- [Crypto News Reader](https://three.ws/markets/news/article): Rich article reader for crypto news — full story extraction with AI summary, key points, sentiment, detected tickers, and related coverage from across the industry.- [Crypto News Archive](https://three.ws/markets/archive): The largest open crypto-news archive: 660,000+ articles from September 2017 to today, refreshed hourly from the live feed, in English and Chinese — searchable by keyword, ticker, source, sentiment, date, and language.- [Crypto News Digest](https://three.ws/markets/digest): The day's crypto news grouped into the handful of stories that actually matter — each with a plain-language summary, a market stance, the tickers involved, and every outlet that covered it. Clustered from 38 live publisher feeds.diff --git a/public/sitemap/index.html b/public/sitemap/index.htmlindex 671e32942..d1be26a28 100644--- a/public/sitemap/index.html+++ b/public/sitemap/index.html@@ -1426,14 +1426,14 @@<a href="/markets"><span class="sm-title">Markets Hub</span><span class="sm-path">/markets</span>- <span class="sm-desc">The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 38 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.</span>+ <span class="sm-desc">The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 192 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.</span></a></li><li><a href="/markets/news"><span class="sm-title">Crypto News</span><span class="sm-path">/markets/news</span>- <span class="sm-desc">Live crypto news aggregated natively from 38 publisher feeds — filter by category (Bitcoin, DeFi, regulation, and more), search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.</span>+ <span class="sm-desc">Live crypto news aggregated natively from 192 publisher feeds in 18 languages — filter by category (Bitcoin, DeFi, security, regulation, and more), pick a language, search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.</span></a></li><li>diff --git a/src/markets-page.js b/src/markets-page.jsindex 621201aad..8ff693232 100644--- a/src/markets-page.js+++ b/src/markets-page.js@@ -126,7 +126,7 @@ const G = {const SUITE = [{ href: '/coins', glyph: 'table', title: 'Coins', desc: 'Sortable markets table for hundreds of assets with a rich detail page each.', stat: 'coins' },- { href: '/markets/news', glyph: 'news', title: 'Crypto News', desc: 'Live headlines from 38 publisher feeds, filterable and searchable.', stat: 'news' },+ { href: '/markets/news', glyph: 'news', title: 'Crypto News', desc: 'Live headlines from 192 publisher feeds, filterable and searchable.', stat: 'news' },{ href: '/markets/digest', glyph: 'digest', title: 'News Digest', desc: 'The day in stories, not headlines — coverage clustered into what moved.', stat: 'digest' },{ href: '/markets/archive', glyph: 'archive', title: 'News Archive', desc: 'The largest open crypto-news archive, back to September 2017.', stat: 'archive' },{ href: '/heatmap', glyph: 'grid', title: 'Heatmap', desc: 'The whole market in one view — tiles sized by cap, colored by move.', stat: 'mover' },diff --git a/tests/news-sources.test.js b/tests/news-sources.test.jsindex 8fe318508..5b3291e11 100644--- a/tests/news-sources.test.js+++ b/tests/news-sources.test.js@@ -58,8 +58,16 @@ describe('hosts we must not regress onto', () => {// feed on them answers 403 to server-side fetches, so they can never be// served from Cloud Run. They read as plausible sources, which is exactly// why this guard exists.- it('lists no substack.com or mirror.xyz feeds', () => {- const blocked = entries.filter(([, s]) => /(^|\.)(substack\.com|mirror\.xyz)$/.test(new URL(s.url).hostname));+ //+ // medium.com joined the list on 2026-07-10: 43 medium.com/feed/* sources were+ // added to the registry and every one answers 429 to a server-side fetch+ // (probed 5/5 from Cloud Run's egress, spaced seconds apart — it is a blanket+ // block on datacenter IPs, not per-feed throttling). They looked live in a+ // browser, which is the trap.+ it('lists no substack.com, mirror.xyz, or medium.com feeds', () => {+ const blocked = entries.filter(([, s]) =>+ /(^|\.)(substack\.com|mirror\.xyz|medium\.com)$/.test(new URL(s.url).hostname),+ );expect(blocked.map(([k]) => k)).toEqual([]);});