Skip to content

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.

feat: introduce Market Data API with 17 new endpoints for market intelligence

fudjia6d8f60d55d20
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 918596fb8..403887d18 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,10 +16,13 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Trending Crypto** (`/markets/trending`) — The most-searched coins, categories, and NFTs on CoinGecko over the last 24 hours — trending rank, price, 24h change, market cap, and volume, each coin and category linking to its detail page. Auto-refreshing.
- **Detail pages for protocols, chains, and stablecoins — plus fees, DEX volumes, hacks, and trending** — Every DeFiLlama list now opens into a full detail page. A protocol page charts its whole TVL history with funding-round and event markers, breaks TVL down per chain, and shows its fees, revenue, and methodology. A chain page charts TVL, stablecoin supply, and DEX volume side by side with the top protocols on that chain. A stablecoin page charts circulating supply over time, shows the per-chain distribution, and flags how far off-peg it is in basis points. On top of the detail pages there are four new market surfaces: protocol fees and revenue ranked and charted, the DEX-volume leaderboard with market share, a searchable database of every major DeFi hack ($16.7B stolen all-time), and a trending page of the most-searched coins, categories, and NFTs on CoinGecko. Everything is real, key-free data, and the yields, DeFi, chains, and stablecoin tables now link straight into the new detail pages. (`/fees`) `[feature]`
- **Documentation accuracy pass: every tutorial verified against the shipped platform** — We cross-referenced all 300+ docs and specs against the actual codebase and fixed everything that had drifted. The embed snippet in ten tutorials now uses the real two-line form that works on any site, four tutorials that demonstrated retired or never-shipped APIs were rewritten against the live component, the troubleshooting guide now reflects the current Cloud Run production stack with the correct session and storage details, and the manifest, quick-start, and API references now list exactly the providers, attributes, and endpoints that exist today. Every code sample in the affected docs runs as written. (`/docs/tutorials/embed-in-30-seconds`) `[docs, fix]`
+- **Eight new market-intelligence APIs join the x402 catalog** — Agents can now pay fractions of a cent for answers, not just data: a one-call DeFi radar (TVL movers, top fee earners, top DEX volumes), a yield scanner with per-pool risk flags across 15,000+ live pools, a stablecoin peg monitor with depeg alerts, an exploit-history check for any protocol, a top-coins momentum heatmap with market-breadth stats, a multi-chain gas oracle covering Ethereum, Base, and Solana in one call, a market-mood index that blends Fear & Greed with live sentiment from 192 news feeds, and a per-ticker news pulse measuring coverage velocity. Prices run $0.001–$0.005 USDC per call, settled instantly via x402 on Solana or Base, and every endpoint refuses payment when its live data source is down — you are never charged for a missing answer. (`/docs/x402-endpoints`) `[feature]`
- **Market data no longer rides on a single source** — The numbers on the markets pages used to blank out whenever CoinGecko rate-limited us. Now every core datapoint fails over across free, keyless backup APIs before it ever shows an error. The global stats bar falls back CoinGecko → CoinPaprika → CoinLore, the coins table backs up on CoinLore, the ETH price on the gas tracker and the BTC price on the exchanges page fail over to DefiLlama, the SOL price now draws on seven independent feeds, and the Solana token panels gained DefiLlama as a fourth source. Same numbers, same pages — they just stay up through an upstream outage instead of going blank. (`/coins`) `[improvement, infra]`
- **Premium: one monthly pass instead of paying per call** — Go Premium for $9.99/30 days and stop paying the Data API per search: one Solana payment — in $THREE at 20% off, SOL, or USDC — mints an API key with unmetered archive search and lets your wallet sign in on the archive page instead of paying. Two new dashboard surfaces ship with it: a developer console at /dashboard/data-api (buy or renew the pass, manage and rotate API keys, live usage, copy-paste quickstarts) and Billing & Passes at /dashboard/billing (pass status, on-chain payment history, your subscriptions and paid services in one place). Renewals stack — renewing early adds 30 days to the end, never losing time. (`/docs/premium`) `[feature]`
- **Richer coin pages, plus new exchange, category, and DeFi-yields detail pages** — Every coin page now shows far more of what the data already offers: a 1h-to-1y price-performance matrix, a circulating-vs-max supply bar with the market-cap/FDV ratio, all-time high and low with the drawdown and recovery multiple, the community bullish/bearish sentiment split, GitHub and social activity, and a full exchange-listings table with spread, order-book depth, and a trust rating for each venue. Exchanges and crypto categories, which used to only send you off-site or filter a table, now have their own detail pages — an exchange page with a trust badge, wash-volume-adjusted volume, a volume-history chart, and its markets, and a category page with the sector's rank, stats, and full coin list. And a brand-new DeFi Yields explorer covers roughly 15,000 live pools across every chain and protocol, filterable and sortable, each with its own APY and TVL history chart. All of it is real, key-free data. (`/yields`) `[feature, improvement]`
+- **The Market Data API: every market feed, now buyable per call** — All the live data behind the /markets pages — coin prices and profiles, price history, sector rankings, exchanges, derivatives, the global snapshot with Fear & Greed, ETH gas, trending assets, DeFi TVL by protocol and chain, 15,000 yield pools, stablecoin pegs, protocol fees and revenue, DEX volumes, and the full exploit database — is now a 17-endpoint paid API that agents can discover and buy autonomously. Each call costs $0.001 USDC over x402 on Solana or Base (the one-call market-pulse bundle is $0.005), with no API key or account needed, and a failed fetch never charges the buyer. The browser pages stay free for people; the paid endpoints are listed in the public x402 discovery catalog, and the free index at /api/x402/market documents everything with runnable examples. (`/docs/market-data-api`) `[feature]`
- **The news page becomes Your Briefing** — /markets/news is redesigned as a daily briefing: a breaking-news ticker for stories under 45 minutes old, a collapsible Today's AI Briefing card built from the digest engine, a Featured tab covering the major outlets, a Trending tab ranking the day's most-covered narratives, a Top-stories hero with a compact headline rail, and a star on every story that saves it to a personal Saved tab. Article preview images were also overhauled — thumbnails blocked by publishers now load through a same-origin proxy, and stories whose feed ships no image pull the publisher's own social preview automatically, so cards no longer show blank tiles. (`/markets/news`) `[feature, improvement]`
+- **three.ws plants its flag across the x402 ecosystem** — Every agent-facing discovery surface now advertises the full 70+ paid-service catalog instead of a stale one-endpoint stub: the ERC-8004 registration card, the A2A agent card, and the AI-plugin manifest are regenerated from the live service catalog on every build, so they can never drift again. Registration with external x402 directories has begun — the first services are already listed on 402index.io — and a new distribution playbook documents exactly how x402scan, the Coinbase Bazaar, and agentic.market index and rank providers, so the platform can climb those leaderboards deliberately. (`/docs/x402-distribution`) `[improvement, docs]`
## 2026-07-10
diff --git a/STRUCTURE.md b/STRUCTURE.md
index 50bb95f10..a0a728043 100644
--- a/STRUCTURE.md
+++ b/STRUCTURE.md
@@ -29,6 +29,7 @@ bottom.
| Free Crypto Data API + discovery | [api/crypto/index.js](api/crypto/index.js) `→ /api/crypto`, [api/crypto/openapi.js](api/crypto/openapi.js) `→ /api/crypto/openapi.json`, docs [docs/crypto-api.md](docs/crypto-api.md) `→ /docs/crypto-api` | Live · docs surface | Front door + OpenAPI 3.1 for the free, keyless Crypto Data API. Catalog assembler [api/_lib/crypto-catalog/index.js](api/_lib/crypto-catalog/index.js) merges `api/_lib/crypto-catalog/*.js` self-describing descriptors (currently `bonding`, `launches`, `symbol`, `token`, `trending`, `wallet`, `whales`) via a static import barrel — the production source of truth, since Vercel's bundler only ships what static imports reach — plus an additive dev-time directory glob; skips malformed/throwing entries, never throws, valid-empty when zero. New descriptor = drop the file AND add its import line to the barrel. OpenAPI built from the same catalog via [api/_lib/crypto-catalog/openapi.js](api/_lib/crypto-catalog/openapi.js). Index does HTML/JSON content negotiation. Endpoint handlers live in `api/crypto/*.js`. Spec: [prompts/x402-overhaul/](prompts/x402-overhaul) |
| Unified Crypto API aggregator — storefront + OpenAPI | Registry [api/v1/_providers.js](api/v1/_providers.js) (`providerCatalog()`), front door [api/v1/x/[...slug].js](api/v1/x/%5B...slug%5D.js) `→ /api/v1/x/<provider>/<endpoint>`, discovery `→ GET /api/v1/x`, storefront [pages/crypto-api.html](pages/crypto-api.html) `→ /crypto-api`, OpenAPI 3.1 [api/openapi-json.js](api/openapi-json.js) `→ /openapi.json`, docs § in [docs/api-reference.md](docs/api-reference.md#unified-api--apiv1x-aggregator), dir guide [api/v1/README.md](api/v1/README.md) | Live | Third-party crypto/DeFi/on-chain APIs (CoinGecko, DefiLlama × 2, Jupiter, DexScreener, Solana RPC, OpenAI-compatible) re-offered as one bill: free per-IP tier → BYOK pass-through → three.ws plan → x402 pay-per-call, in that order. Everything (OpenAPI paths, the `/crypto-api` live table, the docs quota table) renders from `providerCatalog()` at request/page-load time — no hand-enumeration, so a new provider descriptor shows up everywhere with zero page edits. Test: [tests/openapi-aggregator.test.js](tests/openapi-aggregator.test.js). Not to be confused with the separate `/api/crypto/*` bundle below (different campaign, different registry). Spec: [prompts/x402-catalog/](prompts/x402-catalog) |
| Free 3D API + docs | [api/3d/index.js](api/3d/index.js) `→ /api/3d`, [api/3d/openapi.js](api/3d/openapi.js) `→ /api/3d/openapi.json`, docs [public/3d.html](public/3d.html) `→ /3d` (alias `/docs/3d-api`) | Live · docs surface | Front door + OpenAPI 3.1 for the free, keyless 3D API. Catalog assembler [api/_lib/3d-catalog/index.js](api/_lib/3d-catalog/index.js) merges `api/_lib/3d-catalog/*.js` descriptors (currently `generate`, `inspect`) via a static import barrel (production source of truth) plus an additive dev-time directory glob; new descriptor = drop the file AND add its barrel import line; skips malformed, never throws; OpenAPI built from the same catalog via [api/_lib/3d-catalog/openapi.js](api/_lib/3d-catalog/openapi.js). Index does HTML/JSON content negotiation and advertises the paid ladder (Forge Pro, Rigged Avatars). Docs page: hero, live endpoint table, runnable quickstart with a live "Run inspect" console, embedded `<model-viewer>` GLB preview, and the free→paid ladder. Free endpoints: [api/3d/generate.js](api/3d/generate.js) (prompt 12), [api/3d/inspect.js](api/3d/inspect.js) (prompt 13). GPT Store Actions surface: [api/3d/studio.js](api/3d/studio.js) `→ /api/3d/studio` — a store-compliant twin of `generate` that strips the x402/upgrade block, drops internal ids, and runs the [api/_mcp-studio/safety.js](api/_mcp-studio/safety.js) age-13+ content gate before any GPU work; backs the "three.ws 3D Studio" custom GPT ([prompts/store-submissions/_generated/openai-actions.yaml](prompts/store-submissions/_generated/openai-actions.yaml) + [openai-gpt-config.md](prompts/store-submissions/_generated/openai-gpt-config.md), store-submission prompt 12). Spec: [prompts/x402-overhaul/](prompts/x402-overhaul) |
+| Paid Market Data API (x402, 17 endpoints) | Registry [api/_lib/market-data/registry.js](api/_lib/market-data/registry.js), fetchers [api/_lib/market-data/fetch.js](api/_lib/market-data/fetch.js), factory [api/_lib/market-data/endpoint.js](api/_lib/market-data/endpoint.js), routes `api/x402/market-*.js` `→ /api/x402/market-<category>`, free index [api/x402/market.js](api/x402/market.js) `→ /api/x402/market`, catalog projection [api/_lib/service-catalog/services/market-data.js](api/_lib/service-catalog/services/market-data.js), docs [docs/market-data-api.md](docs/market-data-api.md) `→ /docs/market-data-api` | Live | Every free /markets feed (coins, coin profile, price history, categories, exchanges, derivatives, global+Fear&Greed, ETH gas, trending, DeFi TVL, chains, ~15k yield pools, stablecoins, fees/revenue, DEX volumes, hacks) wrapped as pay-per-call x402 endpoints at $0.001 USDC (Solana/Base), plus the $0.005 one-call `market-pulse` bundle. One registry drives the live 402s, the discovery-doc listings, and the free index — zero drift by construction; the fetchers delegate to the SAME exported builders the free pages use (`api/coin/*`, `api/defi/*`), so paid data always matches the site. Params rejected pre-settle (422) and upstream outages (503) never charge the buyer. Tests: [tests/market-data-api.test.js](tests/market-data-api.test.js). |
| Unified service catalog (one source, two storefronts) | [api/_lib/service-catalog/index.js](api/_lib/service-catalog/index.js), descriptors [api/_lib/service-catalog/services/](api/_lib/service-catalog/services/index.js) | Live | The canonical written-once record of every service (paid x402 + free crypto/3D bundles + OKX.AI rows). `toBazaarDiscovery()` generates every static `/api/x402/*` entry in the [api/wk.js](api/wk.js) discovery doc (replacing ~1,400 lines of hand-mirrored blocks); `toOkxCatalog()` reproduces the OKX `catalogIndex()` payload exactly, with an `include:'all'` projection ready for listing expansion. New paid service = drop `services/<slug>.js` + add its barrel import row. No-drift guards: [tests/service-catalog.test.js](tests/service-catalog.test.js). Spec: [specs/SERVICE_CATALOG.md](specs/SERVICE_CATALOG.md) |
| Conversational refinement + remix economy | Iterate: [api/_mcp-studio/tools.js](api/_mcp-studio/tools.js) `refine_model` (free, on `/api/mcp-studio`) + [mcp-server/src/tools/refine-model.js](mcp-server/src/tools/refine-model.js) (paid stdio, $0.25); shared lineage core [mcp-server/src/tools/_lineage.js](mcp-server/src/tools/_lineage.js). Remix (paid track): feed [api/remix-feed.js](api/remix-feed.js) `→ /api/remix-feed` (free browse/publish/lineage), settlement [api/x402/remix-asset.js](api/x402/remix-asset.js) `→ /api/x402/remix-asset` + core [api/_lib/remix-settlement.js](api/_lib/remix-settlement.js) + split math [api/_lib/remix-royalty.js](api/_lib/remix-royalty.js). Docs [docs/remix.md](docs/remix.md), [docs/mcp-studio.md](docs/mcp-studio.md). | Live | Talk to a model to iterate it ("make it metallic") — real anchored re-generation with a revertable/branchable version lineage rendered as a viewer version strip; free on both the OpenAI 3D Studio and the paid MCP server. Creators publish a finished model as remixable (provenance + license + royalty on the existing `forge_creations` rows — no parallel store); another agent pays $0.25 USDC to remix it and a creator-set royalty (≤20%, capped) routes on-chain to the original creator via the audited `transferSolanaUSDC` rail. Split/caps/payout unit-tested ([tests/remix-settlement.test.js](tests/remix-settlement.test.js), [tests/remix-royalty.test.js](tests/remix-royalty.test.js), [tests/refine-lineage.test.js](tests/refine-lineage.test.js)). Free track stays crypto-free. Prompt 09. |
| Restyle Studio (material/PBR editor + AI restyle + variants) | [pages/restyle.html](pages/restyle.html) `→ /restyle`, [src/restyle.js](src/restyle.js). PBR preset/variant library [packages/viewer-presets/src/materials.js](packages/viewer-presets/src/materials.js) (`@three-ws/viewer-presets`). AI restyle + persistence core [api/_lib/material-studio-store.js](api/_lib/material-studio-store.js), free hosted endpoint [api/material-studio.js](api/material-studio.js) `→ /api/material-studio`; paid agent twin [mcp-server/src/tools/restyle-material.js](mcp-server/src/tools/restyle-material.js) (`restyle_material`, $0.05 stdio MCP), thin core [mcp-server/src/tools/_material-core.js](mcp-server/src/tools/_material-core.js). Shares the `refine_model` lineage core ([mcp-server/src/tools/_lineage.js](mcp-server/src/tools/_lineage.js)) so a restyle/variant is just another kind of version, feeding prompt 09 remix. Docs: [docs/mcp-tools.md](docs/mcp-tools.md). | Live | Re-skin any GLB without regenerating its mesh: live PBR editing (color/metalness/roughness/emissive/texture) with a one-click preset library (14 looks — chrome, gold, glass, wood…), seeded reproducible colorway variants (mulberry32 PRNG — same base+seed → same set), and free-text AI restyle ("make it chrome", "cyberpunk neon") via IBM Granite-proposed PBR factors applied + re-exported server-side. Every AI restyle / saved checkpoint mints a real, `gltf-validator`-checked, durably-stored GLB recorded in an immutable parent→child lineage — non-destructive in the durable sense, not just an in-browser Reset. Roadmap prompt 06. |
diff --git a/api/_lib/x402/pipelines/volume-shared.js b/api/_lib/x402/pipelines/volume-shared.js
index a8ac0d674..9bd8753d3 100644
--- a/api/_lib/x402/pipelines/volume-shared.js
+++ b/api/_lib/x402/pipelines/volume-shared.js
@@ -28,11 +28,14 @@ export const ASSET = USDC_MINT || 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
export const VOLUME_PER_RUN_CAP_ATOMIC = volumePerRunCapAtomic();
// How many endpoints the 5-minute volume loop sweeps per run (cursor advances by
-// this each tick). With the catalog below a batch of 4 covers the full set in
-// ~3 runs.
+// this each tick). Sized so the default cadence (AUTONOMOUS_TICKS_PER_HOUR × this)
+// covers the FULL autobuy rotation every hour — tests/x402-ring-catalog.test.js
+// enforces it — because trailing-30-day settle activity is what keeps endpoints
+// ranked on the x402 discovery surfaces. Spend per tick stays bounded by
+// VOLUME_PER_RUN_CAP_ATOMIC and the daily cap regardless of batch size.
export const VOLUME_BATCH_PER_RUN = Math.max(
1,
- Number(process.env.X402_VOLUME_BATCH_PER_RUN || 4),
+ Number(process.env.X402_VOLUME_BATCH_PER_RUN || 6),
);
// The catalog of paid self x402 endpoints the ring drivers round-robin is now the
diff --git a/api/_lib/x402/ring-catalog.js b/api/_lib/x402/ring-catalog.js
index 19512adaa..227abe018 100644
--- a/api/_lib/x402/ring-catalog.js
+++ b/api/_lib/x402/ring-catalog.js
@@ -76,6 +76,42 @@ const SILENT_WAV_B64 =
const NO_BODY = () => null;
+// Paid Market Data API family (api/_lib/market-data/) — 17 read-only GET
+// endpoints built by one paidEndpoint factory. Every entry shares the same
+// shape (intel tier, USDC-atomics default from the registry), so a local
+// builder keeps this block honest instead of ~300 hand-copied lines. Queries
+// here are the cheapest valid canary per endpoint — a rotation call must
+// never 4xx. Rotation budget: only the two family representatives
+// (market-pulse, market-global) are autobuy — all 17 share one construction
+// rail (endpoint.js) and one fetcher module, so two hourly settles prove the
+// whole family's payment path without blowing the ring's calls-per-hour cap;
+// the rest get their one-time settle proof from the coverage sweep.
+const MARKET_FAMILY_NOTE =
+ 'Family representative coverage: market-pulse + market-global keep the shared ' +
+ 'api/_lib/market-data/endpoint.js rail settling hourly; rotating all 17 would ' +
+ 'exceed the ring hour budget. One-time settle proof via the coverage sweep.';
+const marketData = (
+ slug,
+ businessEffect,
+ { query, priceAtomicDefault = 1_000, autobuy = false } = {},
+) => ({
+ slug,
+ sourceFile: 'api/_lib/market-data/endpoint.js',
+ path: `/api/x402/${slug}`,
+ method: 'GET',
+ ...(query ? { query } : {}),
+ body: NO_BODY,
+ priceAtomicDefault,
+ priceSlug: slug,
+ tier: 'intel',
+ kind: 'intel',
+ network: null,
+ autobuy,
+ weight: 1,
+ businessEffect,
+ ...(autobuy ? {} : { note: MARKET_FAMILY_NOTE }),
+});
+
/** @type {CatalogEntry[]} */
export const RING_CATALOG = [
// ── settle ────────────────────────────────────────────────────────────────
@@ -378,6 +414,23 @@ export const RING_CATALOG = [
weight: 1,
businessEffect: 'Measures live news coverage for one ticker: mentions, velocity, sentiment, headlines (read-only).',
},
+ marketData('market-coins', 'Returns the ranked coin market table with sparklines (CoinGecko→CoinLore failover, read-only).', { query: { per_page: '10' } }),
+ marketData('market-coin', 'Returns the full single-coin profile: market stats, links, dev/community metrics (read-only).', { query: { id: 'bitcoin' } }),
+ marketData('market-chart', 'Returns a historical USD price series for one coin (read-only).', { query: { id: 'bitcoin', days: '7' } }),
+ marketData('market-categories', 'Returns every crypto sector ranked by market cap with 24h change (read-only).'),
+ marketData('market-exchanges', 'Returns the top spot exchanges by trust score with USD volume (read-only).'),
+ marketData('market-derivatives', 'Returns perpetual futures tickers: funding, open interest, volume (read-only).'),
+ marketData('market-global', 'Returns total market cap, volume, dominance + the Fear & Greed index (read-only).', { autobuy: true }),
+ marketData('market-gas', 'Returns live ETH gas tiers from on-chain fee history with USD action costs (read-only).'),
+ marketData('market-trending', 'Returns the most-searched coins, categories, and NFTs of the last 24h (read-only).'),
+ marketData('market-defi', 'Returns the top DeFi protocols by TVL with market totals (DeFiLlama, read-only).'),
+ marketData('market-chains', 'Returns every chain ranked by DeFi TVL with market share (DeFiLlama, read-only).'),
+ marketData('market-yields', 'Queries ~15k DeFi yield pools with filters and APY history (DeFiLlama, read-only).', { query: { limit: '3' } }),
+ marketData('market-stablecoins', 'Returns the top stablecoins by supply with peg health (DeFiLlama, read-only).'),
+ marketData('market-fees', 'Returns protocol fee/revenue rankings with market totals (DeFiLlama, read-only).'),
+ marketData('market-dex-volumes', 'Returns the top DEXs by 24h volume with market share (DeFiLlama, read-only).'),
+ marketData('market-hacks', 'Returns the searchable DeFi exploit database with loss stats (DeFiLlama, read-only).', { query: { limit: '3' } }),
+ marketData('market-pulse', 'Returns the one-call market bundle: global, F&G, top coins, gas, TVL, stables, DEX, fees (read-only).', { priceAtomicDefault: 5_000, autobuy: true }),
{
slug: 'agent-reputation',
sourceFile: 'api/x402/agent-reputation.js',
diff --git a/data/changelog.json b/data/changelog.json
index 4e61c466e..b368dede0 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,15 @@
{
"$comment": "Curated changelog entries for three.ws — the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.",
"entries": [
+ {
+ "date": "2026-07-11",
+ "title": "The Market Data API: every market feed, now buyable per call",
+ "summary": "All the live data behind the /markets pages — coin prices and profiles, price history, sector rankings, exchanges, derivatives, the global snapshot with Fear & Greed, ETH gas, trending assets, DeFi TVL by protocol and chain, 15,000 yield pools, stablecoin pegs, protocol fees and revenue, DEX volumes, and the full exploit database — is now a 17-endpoint paid API that agents can discover and buy autonomously. Each call costs $0.001 USDC over x402 on Solana or Base (the one-call market-pulse bundle is $0.005), with no API key or account needed, and a failed fetch never charges the buyer. The browser pages stay free for people; the paid endpoints are listed in the public x402 discovery catalog, and the free index at /api/x402/market documents everything with runnable examples.",
+ "tags": [
+ "feature"
+ ],
+ "link": "/docs/market-data-api"
+ },
{
"date": "2026-07-11",
"title": "Market data no longer rides on a single source",
@@ -13101,6 +13110,25 @@
"feature"
],
"link": "/docs/premium"
+ },
+ {
+ "date": "2026-07-11",
+ "title": "Eight new market-intelligence APIs join the x402 catalog",
+ "summary": "Agents can now pay fractions of a cent for answers, not just data: a one-call DeFi radar (TVL movers, top fee earners, top DEX volumes), a yield scanner with per-pool risk flags across 15,000+ live pools, a stablecoin peg monitor with depeg alerts, an exploit-history check for any protocol, a top-coins momentum heatmap with market-breadth stats, a multi-chain gas oracle covering Ethereum, Base, and Solana in one call, a market-mood index that blends Fear & Greed with live sentiment from 192 news feeds, and a per-ticker news pulse measuring coverage velocity. Prices run $0.001–$0.005 USDC per call, settled instantly via x402 on Solana or Base, and every endpoint refuses payment when its live data source is down — you are never charged for a missing answer.",
+ "tags": [
+ "feature"
+ ],
+ "link": "/docs/x402-endpoints"
+ },
+ {
+ "date": "2026-07-11",
+ "title": "three.ws plants its flag across the x402 ecosystem",
+ "summary": "Every agent-facing discovery surface now advertises the full 70+ paid-service catalog instead of a stale one-endpoint stub: the ERC-8004 registration card, the A2A agent card, and the AI-plugin manifest are regenerated from the live service catalog on every build, so they can never drift again. Registration with external x402 directories has begun — the first services are already listed on 402index.io — and a new distribution playbook documents exactly how x402scan, the Coinbase Bazaar, and agentic.market index and rank providers, so the platform can climb those leaderboards deliberately.",
+ "tags": [
+ "improvement",
+ "docs"
+ ],
+ "link": "/docs/x402-distribution"
}
]
}
diff --git a/docs/autonomous-x402.md b/docs/autonomous-x402.md
index f61eb4d7e..0316172a7 100644
--- a/docs/autonomous-x402.md
+++ b/docs/autonomous-x402.md
@@ -43,7 +43,7 @@ Payments are real on chain — no mocks, no simulations.
| `X402_AUTONOMOUS_ENABLED` | enabled | Set to `false` to pause without removing entries. |
| `X402_AUTONOMOUS_MAX_PER_TICK` | `12` | Max calls per cron tick. Raised from the original demo curve (8) to serve more of the ready backlog each tick; per-endpoint cooldowns still gate how often any one endpoint is hit. |
| `X402_AUTONOMOUS_DAILY_CAP_ATOMIC` | `15000000` ($15) | Daily USDC cap across the whole loop, in 6-decimal atomics. Raised from $5 so the higher per-tick throughput isn't money-starved mid-day; still a hard, env-tunable ceiling enforced per tick. |
-| `X402_VOLUME_BATCH_PER_RUN` | `4` | Volume Bootstrap Loop: endpoints swept per run (cursor advances by this). |
+| `X402_VOLUME_BATCH_PER_RUN` | `6` | Volume Bootstrap Loop: endpoints swept per run (cursor advances by this). Default sized so a default-cadence hour covers the full autobuy rotation — trailing-30-day settle activity is what keeps endpoints ranked on the x402 discovery surfaces. |
| `X402_VOLUME_PER_RUN_CAP_ATOMIC` | `50000` ($0.05) | Volume Bootstrap Loop: self-imposed per-run cap, on top of the daily cap, so one tick can't drain the day. |
| `CRON_SECRET` | _(required)_ | Shared secret authorizing cron invocations (Cloud Scheduler). |
| `X402_ASSET_MINT_SOLANA` | USDC mint | The asset paid with (Solana USDC). |
diff --git a/docs/start-here.md b/docs/start-here.md
index 35d1faceb..c368d8d44 100644
--- a/docs/start-here.md
+++ b/docs/start-here.md
@@ -70,6 +70,7 @@ If you're here to create and share agents rather than write code, follow this pa
- **Trusting an agent with money?** → [Custody you can verify](./custody.md) — spend limits, freeze, Merkle proof-of-custody, and social recovery; [claim your wallet](./trader-card.md) turns any pump.fun track record into a public, provable Trader Card. Every real-funds feature sits behind the [risk acknowledgment](./risk-acknowledgment.md) — read the [Risk Disclosure](https://three.ws/legal/risk) before committing anything
- **Vetting a counterparty before you pay it?** → [Trust primitives](./trust-primitives.md) — the cross-chain Agent Reputation endpoint scores ANY wallet, mint, or agent id (Solana or EVM) 0–100 from real on-chain evidence, in one paid call, before your agent transacts
- **Your agent needs market data?** → [Market Data API](./market-data-api.md) — the live feeds behind every /markets page (prices, TVL, yields, stablecoins, gas, derivatives, exploits) as 17 pay-per-call x402 endpoints from $0.001 USDC, plus the one-call `market-pulse` bundle; start at the free index [/api/x402/market](https://three.ws/api/x402/market)
+- **Listing our services across the x402 ecosystem?** → [x402 distribution](./x402-distribution.md) — the operating playbook for x402scan, the CDP Bazaar, agentic.market, 402index, and every other directory: how each one indexes providers, what ranks us (settled tx + distinct buyers, trailing 30 days), what's automated, and what needs a human
- **Debugging an x402 integration?** → [x402 developer tools](./x402-dev-tools.md) — a free test bench: echo your payment envelope (signatures redacted), debug a failed 402 exchange into an ordered fix list, and verify a receipt's attestation and on-chain settlement, all against a live server without spending anything
- **Paying from the BNB ecosystem?** → [BNB Chain payments](./bnb-payments.md) — three.ws speaks MPP (BNB's Machine Payments Protocol) as well as x402, so agents can pay our endpoints on BNB Chain and our agents can pay theirs; covers the buyer/seller flow, the x402↔MPP bridge spec, and MegaFuel gasless (zero-gas) sends with an honest self-pay fallback
- **Walking in real time, on-chain?** → [The on-chain world](./bnb-world.md) — `/agora`'s Play mode has an opt-in toggle that commits your walk to a real BNB Chain contract at its live ~0.45s block cadence, gaslessly, and renders every other on-chain player as a live ghost marker; covers why this only works on BNB Chain, the architecture, and a reproducible two-wallet proof
diff --git a/docs/x402-distribution.md b/docs/x402-distribution.md
new file mode 100644
index 000000000..925ba682e
--- /dev/null
+++ b/docs/x402-distribution.md
@@ -0,0 +1,144 @@
+# x402 Distribution — getting listed and ranked everywhere
+
+three.ws sells 70+ pay-per-call services over [x402](x402.md). Building them is
+half the job; the other half is making sure every x402 directory, crawler, and
+agent marketplace can find them — and ranks us at the top. This page is the
+operating playbook for that distribution: how each surface indexes providers,
+what we automate, and what needs a human.
+
+> Source: catalog [`api/_lib/service-catalog/`](../api/_lib/service-catalog/),
+> discovery doc `/.well-known/x402.json` (rendered live by
+> [`api/wk.js`](../api/wk.js)), static cards regenerated by
+> [`scripts/build-discovery-cards.mjs`](../scripts/build-discovery-cards.mjs),
+> directory registrar
+> [`scripts/x402-register-directories.mjs`](../scripts/x402-register-directories.mjs).
+
+---
+
+## The one rule of ranking
+
+Every major surface ranks the same way: **settled transaction count and
+distinct buyers in the trailing 30 days**. Metadata quality gets us *found*
+(semantic search embeds our `description` fields); paid traffic gets us
+*ranked*. The [autonomous x402 loop](autonomous-x402.md) already drives real
+settled canary purchases against every `autobuy: true` entry in
+[`api/_lib/x402/ring-catalog.js`](../api/_lib/x402/ring-catalog.js) — that loop
+is also our 30-day-activity keeper: the CDP Bazaar **drops resources from
+search results after 30 days without a settle**.
+
+## Surface-by-surface
+
+### CDP Bazaar (feeds agentic.market)
+
+- **Mechanism:** settlement-triggered. The CDP facilitator catalogs an endpoint
+ the first time it **settles** (not just verifies) a payment for it. There is
+ no registration form.
+- **Metadata:** the Bazaar discovery extension in the 402 challenge —
+ `description` (< 500 chars, embedded for semantic search), `input` +
+ `inputSchema` (the example **must** validate against the schema or indexing
+ is rejected), and an output example. Our shared handler emits all of this
+ from each service-catalog descriptor.
+- **Ranking:** relevance × quality = distinct buyers (30 d), settled volume
+ (30 d), recency, metadata completeness. Recomputed every 6 hours.
+- **Ops required:** `CDP_API_KEY_ID`/`CDP_API_KEY_SECRET` on the Cloud Run
+ service so Base settles through the CDP facilitator, then ≥1 settled payment
+ per endpoint (point one ring rotation at the CDP rail). Verify presence via
+ `GET https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources` —
+ do **not** trust the `EXTENSION-RESPONSES` header alone (known upstream bug:
+ x402-foundation/x402#2112 — it is sometimes never emitted).
+- **agentic.market** (Coinbase's public directory, ~1,700 services) has no
+ submission form — it auto-indexes from Bazaar + payment activity. Getting
+ Bazaar-listed IS getting agentic.market-listed. Its ~70-service "curated"
+ tier is editorial: the lever is volume + clean metadata + BD outreach.
+
+### x402scan (x402scan.com)
+
+- **Mechanism:** three ingestion paths — (1) crawls known facilitators'
+ resource lists (incl. the CDP Bazaar), (2) attributes on-chain USDC
+ settlements on Base + Solana to sellers, (3) manual registration at
+ `https://www.x402scan.com/resources/register` (probes the URL; a valid x402
+ challenge auto-lists it; one-time SIWX wallet signature, no funds move).
+- **Ranking:** activity — tx count, volume, recency per origin/seller. No
+ pay-to-rank.
+- **Ops required:** a human with a wallet registers each top resource once
+ (start with the flagship services, not health canaries). Our origin metadata
+ (og-tags, favicon) renders on the resource page — already good.
+
+### 402index.io — automated ✅
+
+- **Mechanism:** open API, `POST https://402index.io/api/v1/register` with
+ `{ url, name, protocol: 'x402', description }`. No auth. The service probes
+ the URL for a valid 402 challenge; some listings go live instantly, others
+ are "pending review — verify your domain for instant approval". Rate limit:
+ 10 registrations/hour/IP.
+- **Automation:** `node scripts/x402-register-directories.mjs` submits a batch
+ of 8 per run, pre-probes production for a real 402 first (registering a
+ not-yet-deployed route burns a slot), and records results in
+ [`data/x402-directory-registrations.json`](../data/x402-directory-registrations.json).
+ Re-run hourly until it reports 0 remaining, and after every deploy that adds
+ endpoints. `--dry-run` previews.
+
+### x402-list.com
+
+- **Mechanism:** web form at `https://x402-list.com/submit` — first submission
+ free, endpoint auto-probed for a live 402 handshake, human-reviewed, then
+ monitored (5–15 min uptime checks, "verified" badges). Updates via one-time
+ domain proof.
+- **Ops required:** human submits the origin + flagship endpoints once.
+
+### PR-based directories
+
+- **x402.org ecosystem page** — partner metadata PR to the x402 repo
+ (`typescript/site/app/ecosystem/`): logo + description JSON.
+- **awesome-x402** — PRs to `xpaysh/awesome-x402` and
+ `Merit-Systems/awesome-x402`.
+
+### A2A / AP2 (Google agentic commerce)
+
+- No central registry. Discovery is our A2A agent card at
+ `/.well-known/agent-card.json` declaring the a2a-x402 extension URI under
+ `capabilities.extensions` — already present, and the card now carries the
+ generated `x402-service-catalog` skill. Featuring in Google's AI Agent
+ Marketplace is BD, not crawl.
+
+### B402 (Binance BNB-chain Bazaar)
+
+- Same extension-declaration + settle-through-their-facilitator model as CDP,
+ on BSC. We already have a BSC direct-settlement rail
+ (`api/_lib/x402-bsc-direct.js`); listing there means routing BSC settles
+ through Binance's facilitator. Evaluate after the CDP lane is proven.
+
+## What we publish (kept fresh automatically)
+
+| Surface | Where | Freshness |
+| --- | --- | --- |
+| x402 discovery doc | `/.well-known/x402.json` | rendered live from the service catalog on every request |
+| ERC-8004 registration card | `/.well-known/agent-registration.json` | regenerated by `npm run build:discovery` (runs in `prebuild`) — full `x402Endpoints` list |
+| A2A agent card | `/.well-known/agent-card.json` | same generator — description + `x402-service-catalog` skill |
+| ai-plugin manifest | `/.well-known/ai-plugin.json` | same generator |
+| Human catalog | `/discover`, `/x402/studio`, `/pricing`, `/x402-revenue` | live |
+| LLM-readable index | `/llms.txt` | build-time |
+
+**Adding a paid endpoint?** Drop the service-catalog descriptor + barrel row +
+ring-catalog entry (tests enforce all three), deploy, then run the registrar
+script. Everything else above updates itself.
+
+## Known listing blockers
+
+- **Zero-amount auth-hint accepts break external validators.** Endpoints that
+ declare `authHints` (currently `agent-reputation`, `agent-bouncer`) append
+ USE-21 zero-amount placeholder entries to `accepts[]`. 402index's validator
+ rejects the whole challenge ("no valid x402 challenge detected"), and other
+ crawlers likely apply the same amount-must-be-positive rule. The auth-hints
+ **extension** already carries the same information — the candidate fix is to
+ stop mirroring hints into `accepts[]` (or gate that behind an env flag) so
+ the challenge advertises only payable entries. Owner/USE-21 decision; until
+ then these two endpoints cannot be listed on validator-gated directories.
+- **Bazaar indexing needs the CDP facilitator.** Solana-only settles through
+ the self-hosted facilitator never reach the Bazaar catalog. The Base rail
+ must settle via CDP at least once per endpoint.
+
+## Related
+
+- [x402 overview](x402.md) · [Paid endpoints reference](x402-endpoints.md) ·
+ [Autonomous loop](autonomous-x402.md) · [Buyer client](x402-buyer.md)
diff --git a/docs/x402-endpoints.md b/docs/x402-endpoints.md
index bc44e4cb9..b2fb517be 100644
--- a/docs/x402-endpoints.md
+++ b/docs/x402-endpoints.md
@@ -106,6 +106,29 @@ for to feed the oracle and sniper.
| `/api/x402/symbol-availability` | $0.001 | Whether a ticker symbol is taken; `-batch` variant $0.005. |
| `/api/x402/bazaar-feed` | $0.001 | x402 bazaar service listings feed. |
+## Market intelligence endpoints
+
+Agent-ready answers composed over live market data — composites, verdicts, and
+risk flags rather than raw category feeds (the raw feeds stay free at
+`/api/defi/*`, `/api/coin/*`, and `/api/news/*`; these paid surfaces are the
+loss-leader funnel's paid tier). Every one refuses before settlement when its
+upstream is down — a buyer is never charged for missing data.
+
+| Endpoint | Default | Returns |
+| ------------------------------- | ------- | ------------------------------------------------------------------------------------------------ |
+| `/api/x402/defi-radar` | $0.005 | One-call DeFi composite: total TVL, 24 h TVL gainers/losers, top fee earners, top DEX volumes. |
+| `/api/x402/yield-scan` | $0.005 | Screens 15k+ live yield pools by chain/TVL/stablecoin with APY breakdown + per-pool risk flags. |
+| `/api/x402/stablecoin-health` | $0.005 | Peg deviation (bps) + on-peg/drifting/depegged verdict + supply flow per stablecoin, depeg alerts. |
+| `/api/x402/hack-check` | $0.002 | Protocol name → clean / incident-history verdict over the full DeFi exploit database. |
+| `/api/x402/market-heatmap` | $0.002 | Top coins with 1 h/24 h/7 d momentum + breadth stats (CoinGecko→CoinPaprika failover). |
+| `/api/x402/gas-oracle` | $0.001 | Live fee tiers for Ethereum + Base (real `eth_feeHistory`) and Solana priority-fee percentiles. |
+| `/api/x402/market-mood` | $0.002 | Fear & Greed × 192-feed news sentiment composite (0–100) with divergence flag + driver headlines. |
+| `/api/x402/news-pulse` | $0.002 | Per-ticker news coverage: mentions, velocity vs prior window, sentiment split, top headlines. |
+
+There is also a registry-derived `market-*` family (`/api/x402/market-coins`,
+`market-chart`, `market-yields`, …) — one endpoint per raw data category,
+projected from `api/_lib/market-data/registry.js`.
+
## Agent & reputation endpoints
| Endpoint | Default | Returns |
diff --git a/pages/coins.html b/pages/coins.html
index 206f7c02e..e9f1cad07 100644
--- a/pages/coins.html
+++ b/pages/coins.html
@@ -1,5 +1,5 @@
<!doctype html>
-<html lang="en" class="cv-page">
+<html lang="en" class="cv-page" data-shell>
<head>
<script>
/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */ (function () {
diff --git a/public/changelog.json b/public/changelog.json
index a5fda1171..11bdd6c49 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-11T21:12:39.982Z",
+ "generated_at": "2026-07-11T21:30:10.459Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -107,6 +107,16 @@
"fix"
]
},
+ {
+ "date": "2026-07-11",
+ "type": "update",
+ "title": "Eight new market-intelligence APIs join the x402 catalog",
+ "summary": "Agents can now pay fractions of a cent for answers, not just data: a one-call DeFi radar (TVL movers, top fee earners, top DEX volumes), a yield scanner with per-pool risk flags across 15,000+ live pools, a stablecoin peg monitor with depeg alerts, an exploit-history check for any protocol, a top-coins momentum heatmap with market-breadth stats, a multi-chain gas oracle covering Ethereum, Base, and Solana in one call, a market-mood index that blends Fear & Greed with live sentiment from 192 news feeds, and a per-ticker news pulse measuring coverage velocity. Prices run $0.001–$0.005 USDC per call, settled instantly via x402 on Solana or Base, and every endpoint refuses payment when its live data source is down — you are never charged for a missing answer.",
+ "link": "/docs/x402-endpoints",
+ "tags": [
+ "feature"
+ ]
+ },
{
"date": "2026-07-11",
"type": "update",
@@ -139,6 +149,16 @@
"improvement"
]
},
+ {
+ "date": "2026-07-11",
+ "type": "update",
+ "title": "The Market Data API: every market feed, now buyable per call",
+ "summary": "All the live data behind the /markets pages — coin prices and profiles, price history, sector rankings, exchanges, derivatives, the global snapshot with Fear & Greed, ETH gas, trending assets, DeFi TVL by protocol and chain, 15,000 yield pools, stablecoin pegs, protocol fees and revenue, DEX volumes, and the full exploit database — is now a 17-endpoint paid API that agents can discover and buy autonomously. Each call costs $0.001 USDC over x402 on Solana or Base (the one-call market-pulse bundle is $0.005), with no API key or account needed, and a failed fetch never charges the buyer. The browser pages stay free for people; the paid endpoints are listed in the public x402 discovery catalog, and the free index at /api/x402/market documents everything with runnable examples.",
+ "link": "/docs/market-data-api",
+ "tags": [
+ "feature"
+ ]
+ },
{
"date": "2026-07-11",
"type": "update",
@@ -150,6 +170,17 @@
"improvement"
]
},
+ {
+ "date": "2026-07-11",
+ "type": "update",
+ "title": "three.ws plants its flag across the x402 ecosystem",
+ "summary": "Every agent-facing discovery surface now advertises the full 70+ paid-service catalog instead of a stale one-endpoint stub: the ERC-8004 registration card, the A2A agent card, and the AI-plugin manifest are regenerated from the live service catalog on every build, so they can never drift again. Registration with external x402 directories has begun — the first services are already listed on 402index.io — and a new distribution playbook documents exactly how x402scan, the Coinbase Bazaar, and agentic.market index and rank providers, so the platform can climb those leaderboards deliberately.",
+ "link": "/docs/x402-distribution",
+ "tags": [
+ "improvement",
+ "docs"
+ ]
+ },
{
"date": "2026-07-10",
"type": "launch",
diff --git a/public/changelog.xml b/public/changelog.xml
index 020d7497d..426f2c5e3 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -86,6 +86,14 @@
<category>docs</category>
<description>We cross-referenced all 300+ docs and specs against the actual codebase and fixed everything that had drifted. The embed snippet in ten tutorials now uses the real two-line form that works on any site, four tutorials that demonstrated retired or never-shipped APIs were rewritten against the live component, the troubleshooting guide now reflects the current Cloud Run production stack with the correct session and storage details, and the manifest, quick-start, and API references now list exactly the providers, attributes, and endpoints that exist today. Every code sample in the affected docs runs as written.</description>
</item>
+ <item>
+ <title>Eight new market-intelligence APIs join the x402 catalog</title>
+ <link>https://three.ws/docs/x402-endpoints</link>
+ <guid isPermaLink="false">2026-07-11:Eight new market-intelligence APIs join the x402 catalog</guid>
+ <pubDate>Sat, 11 Jul 2026 12:00:00 GMT</pubDate>
+ <category>feature</category>
+ <description>Agents can now pay fractions of a cent for answers, not just data: a one-call DeFi radar (TVL movers, top fee earners, top DEX volumes), a yield scanner with per-pool risk flags across 15,000+ live pools, a stablecoin peg monitor with depeg alerts, an exploit-history check for any protocol, a top-coins momentum heatmap with market-breadth stats, a multi-chain gas oracle covering Ethereum, Base, and Solana in one call, a market-mood index that blends Fear &amp; Greed with live sentiment from 192 news feeds, and a per-ticker news pulse measuring coverage velocity. Prices run $0.001–$0.005 USDC per call, settled instantly via x402 on Solana or Base, and every endpoint refuses payment when its live data source is down — you are never charged for a missing answer.</description>
+ </item>
<item>
<title>Market data no longer rides on a single source</title>
<link>https://three.ws/coins</link>
@@ -110,6 +118,14 @@
<category>feature</category>
<description>Every coin page now shows far more of what the data already offers: a 1h-to-1y price-performance matrix, a circulating-vs-max supply bar with the market-cap/FDV ratio, all-time high and low with the drawdown and recovery multiple, the community bullish/bearish sentiment split, GitHub and social activity, and a full exchange-listings table with spread, order-book depth, and a trust rating for each venue. Exchanges and crypto categories, which used to only send you off-site or filter a table, now have their own detail pages — an exchange page with a trust badge, wash-volume-adjusted volume, a volume-history chart, and its markets, and a category page with the sector's rank, stats, and full coin list. And a brand-new DeFi Yields explorer covers roughly 15,000 live pools across every chain and protocol, filterable and sortable, each with its own APY and TVL history chart. All of it is real, key-free data.</description>
</item>
+ <item>
+ <title>The Market Data API: every market feed, now buyable per call</title>
+ <link>https://three.ws/docs/market-data-api</link>
+ <guid isPermaLink="false">2026-07-11:The Market Data API: every market feed, now buyable per call</guid>
+ <pubDate>Sat, 11 Jul 2026 12:00:00 GMT</pubDate>
+ <category>feature</category>
+ <description>All the live data behind the /markets pages — coin prices and profiles, price history, sector rankings, exchanges, derivatives, the global snapshot with Fear &amp; Greed, ETH gas, trending assets, DeFi TVL by protocol and chain, 15,000 yield pools, stablecoin pegs, protocol fees and revenue, DEX volumes, and the full exploit database — is now a 17-endpoint paid API that agents can discover and buy autonomously. Each call costs $0.001 USDC over x402 on Solana or Base (the one-call market-pulse bundle is $0.005), with no API key or account needed, and a failed fetch never charges the buyer. The browser pages stay free for people; the paid endpoints are listed in the public x402 discovery catalog, and the free index at /api/x402/market documents everything with runnable examples.</description>
+ </item>
<item>
<title>The news page becomes Your Briefing</title>
<link>https://three.ws/markets/news</link>
@@ -118,6 +134,14 @@
<category>feature</category>
<description>/markets/news is redesigned as a daily briefing: a breaking-news ticker for stories under 45 minutes old, a collapsible Today's AI Briefing card built from the digest engine, a Featured tab covering the major outlets, a Trending tab ranking the day's most-covered narratives, a Top-stories hero with a compact headline rail, and a star on every story that saves it to a personal Saved tab. Article preview images were also overhauled — thumbnails blocked by publishers now load through a same-origin proxy, and stories whose feed ships no image pull the publisher's own social preview automatically, so cards no longer show blank tiles.</description>
</item>
+ <item>
+ <title>three.ws plants its flag across the x402 ecosystem</title>
+ <link>https://three.ws/docs/x402-distribution</link>
+ <guid isPermaLink="false">2026-07-11:three.ws plants its flag across the x402 ecosystem</guid>
+ <pubDate>Sat, 11 Jul 2026 12:00:00 GMT</pubDate>
+ <category>improvement</category>
+ <description>Every agent-facing discovery surface now advertises the full 70+ paid-service catalog instead of a stale one-endpoint stub: the ERC-8004 registration card, the A2A agent card, and the AI-plugin manifest are regenerated from the live service catalog on every build, so they can never drift again. Registration with external x402 directories has begun — the first services are already listed on 402index.io — and a new distribution playbook documents exactly how x402scan, the Coinbase Bazaar, and agentic.market index and rank providers, so the platform can climb those leaderboards deliberately.</description>
+ </item>
<item>
<title>Crypto News</title>
<link>https://three.ws/markets/news</link>
diff --git a/public/feature-discovery.js b/public/feature-discovery.js
index fc8be44ad..c9f1a1a3e 100644
--- a/public/feature-discovery.js
+++ b/public/feature-discovery.js
@@ -362,6 +362,10 @@
function showPassivePrompt() {
if (_card) return; // a contextual card already took the slot
if (alreadyPromptedThisSession()) return;
+ // When the companion agent is live it owns ambient discovery (it greets,
+ // narrates, and reacts to ⌘K commands) — don't stack a competing toast in
+ // the same corner. Contextual after-action cross-links still show.
+ try { if (localStorage.getItem('walk:companion:enabled') === '1') return; } catch (_) {}
var route = pickSuggestion();
if (!route) return;
var f = FEATURES[route];
diff --git a/public/features.json b/public/features.json
index e55c85fa7..e21c82c54 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-11T21:12:39.969Z",
+ "generated_at": "2026-07-11T21:30:10.446Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/public/fonts/source-serif-4-latin-ext.woff2 b/public/fonts/source-serif-4-latin-ext.woff2
deleted file mode 100644
index f40a64e03..000000000
Binary files a/public/fonts/source-serif-4-latin-ext.woff2 and /dev/null differ
diff --git a/public/fonts/source-serif-4-latin.woff2 b/public/fonts/source-serif-4-latin.woff2
deleted file mode 100644
index 30dbe2d62..000000000
Binary files a/public/fonts/source-serif-4-latin.woff2 and /dev/null differ
diff --git a/public/nav.js b/public/nav.js
index fc5151930..33b3b4a91 100644
--- a/public/nav.js
+++ b/public/nav.js
@@ -549,15 +549,23 @@ function initDrawer(root) {
// ── Active page highlighting ────────────────────────────────────────────────
function initActivePage(root) {
- const path = location.pathname.replace(/\/$/, '') || '/';
- root.querySelectorAll('a[href]').forEach((a) => {
- const raw = a.getAttribute('href');
- if (!raw || !raw.startsWith('/')) return;
- const href = raw.split('#')[0].replace(/\/$/, '') || '/';
- if (href === path || (href !== '/' && path.startsWith(href + '/'))) {
- a.setAttribute('aria-current', 'page');
- }
- });
+ const apply = () => {
+ const path = location.pathname.replace(/\/$/, '') || '/';
+ root.querySelectorAll('a[href]').forEach((a) => {
+ const raw = a.getAttribute('href');
+ if (!raw || !raw.startsWith('/')) return;
+ const href = raw.split('#')[0].replace(/\/$/, '') || '/';
+ if (href === path || (href !== '/' && path.startsWith(href + '/'))) {
+ a.setAttribute('aria-current', 'page');
+ } else if (a.hasAttribute('aria-current')) {
+ a.removeAttribute('aria-current');
+ }
+ });
+ };
+ apply();
+ // Persistent-shell navigations swap <main> without reloading — the header
+ // survives, so re-derive the highlight when the URL changes under it.
+ document.addEventListener('shell:navigated', apply);
}
// ── Auth-aware CTAs ──────────────────────────────────────────────────────────
diff --git a/src/coin-pages.css b/src/coin-pages.css
index 1bf940a7a..6fb0ed94d 100644
--- a/src/coin-pages.css
+++ b/src/coin-pages.css
@@ -1,37 +1,18 @@
/*
- * Global coin pages (/coins, /coin/:id) — literal port of the cryptocurrency.cv
- * design system ("The Block-inspired editorial"): Source Serif 4 headings,
- * Inter body, JetBrains Mono numerals, blue accent, hairline borders, tight
- * editorial radii. Light is the design's default; dark maps its .dark tokens.
- * Both are driven by three.ws's data-theme attribute so the site-wide theme
- * toggle works here like everywhere else.
+ * Global coin pages (/coins, /coin/:id) — adopted from the cryptocurrency.cv
+ * design system ("The Block-inspired editorial"): Inter body, JetBrains Mono
+ * numerals, blue accent, hairline borders, tight editorial radii. Light is the
+ * design's default; dark maps its .dark tokens. Both are driven by three.ws's
+ * data-theme attribute so the site-wide theme toggle works here like
+ * everywhere else. Headings use the sitewide Space Grotesk display face — the
+ * port's Source Serif 4 was retired 2026-07 to unify the site on one voice.
*/
-/* Source Serif 4 — variable weight 400–700, self-hosted like the other fonts. */
-@font-face {
- font-family: 'Source Serif 4';
- font-style: normal;
- font-weight: 200 900;
- font-display: swap;
- src: url('/fonts/source-serif-4-latin.woff2') format('woff2');
- unicode-range:
- U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074,
- U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
-}
-@font-face {
- font-family: 'Source Serif 4';
- font-style: normal;
- font-weight: 200 900;
- font-display: swap;
- src: url('/fonts/source-serif-4-latin-ext.woff2') format('woff2');
- unicode-range:
- U+0100-02AF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1E00-1EFF, U+2020,
- U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
-}
-
:root {
--cv-font-sans: 'Inter', system-ui, -apple-system, sans-serif;
- --cv-font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
+ /* Legacy token name from the cv port; now maps to the sitewide display
+ family (loaded by /fonts/fonts.css on every cv page). */
+ --cv-font-serif: 'Space Grotesk', 'Inter', system-ui, sans-serif;
--cv-font-mono: 'JetBrains Mono', ui-monospace, monospace;
--cv-radius-sm: 4px;
diff --git a/tests/agent-names.test.js b/tests/agent-names.test.js
new file mode 100644
index 000000000..a483ad9e4
--- /dev/null
+++ b/tests/agent-names.test.js
@@ -0,0 +1,23 @@
+import { describe, it, expect } from 'vitest';
+import { randomAgentName, ADJECTIVES, NOUNS } from '../src/shared/agent-names.js';
+
+describe('agent-names', () => {
+ it('produces "Adjective Noun" from the wordlists', () => {
+ const name = randomAgentName();
+ const [adj, noun] = name.split(' ');
+ expect(ADJECTIVES).toContain(adj);
+ expect(NOUNS).toContain(noun);
+ });
+
+ it('is deterministic under an injected RNG', () => {
+ expect(randomAgentName(() => 0)).toBe(`${ADJECTIVES[0]} ${NOUNS[0]}`);
+ expect(randomAgentName(() => 0.999999)).toBe(
+ `${ADJECTIVES[ADJECTIVES.length - 1]} ${NOUNS[NOUNS.length - 1]}`,
+ );
+ });
+
+ it('never returns an out-of-range pick even when rand returns 1', () => {
+ const name = randomAgentName(() => 1);
+ expect(name).not.toContain('undefined');
+ });
+});
diff --git a/tests/guest-agent.test.js b/tests/guest-agent.test.js
new file mode 100644
index 000000000..a13529fa8
--- /dev/null
+++ b/tests/guest-agent.test.js
@@ -0,0 +1,65 @@
+// @vitest-environment jsdom
+import { describe, it, expect, beforeEach } from 'vitest';
+import {
+ ensureGuestAgent,
+ peekGuestAgent,
+ updateGuestAgent,
+ clearGuestAgent,
+} from '../src/agents/guest-agent.js';
+import { ADJECTIVES, NOUNS } from '../src/shared/agent-names.js';
+
+const KEY = '3dagent:guest-agent';
+const WALK_AVATAR_KEY = 'walk:companion:avatar';
+
+describe('guest-agent draft store', () => {
+ beforeEach(() => {
+ localStorage.clear();
+ });
+
+ it('mints a named draft on first ensure and is idempotent after', () => {
+ const first = ensureGuestAgent();
+ expect(first.id).toMatch(/^[0-9a-f]{16}$/);
+ const [adj, noun] = first.name.split(' ');
+ expect(ADJECTIVES).toContain(adj);
+ expect(NOUNS).toContain(noun);
+ expect(first.avatarId).toBeTruthy();
+ expect(first.createdAt).toBeGreaterThan(0);
+
+ const second = ensureGuestAgent();
+ expect(second).toEqual(first);
+ });
+
+ it('seeds the companion avatar key without clobbering an existing choice', () => {
+ localStorage.setItem(WALK_AVATAR_KEY, 'my-custom-avatar');
+ ensureGuestAgent();
+ expect(localStorage.getItem(WALK_AVATAR_KEY)).toBe('my-custom-avatar');
+
+ localStorage.clear();
+ const rec = ensureGuestAgent();
+ expect(localStorage.getItem(WALK_AVATAR_KEY)).toBe(rec.avatarId);
+ });
+
+ it('peek returns null before minting and the record after', () => {
+ expect(peekGuestAgent()).toBeNull();
+ const rec = ensureGuestAgent();
+ expect(peekGuestAgent()).toEqual(rec);
+ });
+
+ it('update merges a patch; clear drops the draft', () => {
+ ensureGuestAgent();
+ const renamed = updateGuestAgent({ name: 'Chrome Koi' });
+ expect(renamed.name).toBe('Chrome Koi');
+ expect(peekGuestAgent().name).toBe('Chrome Koi');
+
+ clearGuestAgent();
+ expect(peekGuestAgent()).toBeNull();
+ expect(localStorage.getItem(KEY)).toBeNull();
+ });
+
+ it('rejects a corrupted record instead of returning garbage', () => {
+ localStorage.setItem(KEY, '{not json');
+ expect(peekGuestAgent()).toBeNull();
+ localStorage.setItem(KEY, JSON.stringify({ id: 'x' })); // missing name
+ expect(peekGuestAgent()).toBeNull();
+ });
+});
diff --git a/tests/search-commands.test.js b/tests/search-commands.test.js
new file mode 100644
index 000000000..e159ab13d
--- /dev/null
+++ b/tests/search-commands.test.js
@@ -0,0 +1,51 @@
+// @vitest-environment jsdom
+//
+// The ⌘K palette's command grammar (public/search.js). The file is a
+// self-mounting classic-script IIFE, so we import it once in a jsdom document
+// and exercise the parseCommand seam it exposes on window.__twsSearch.
+import { describe, it, expect, beforeAll } from 'vitest';
+
+let parseCommand;
+
+beforeAll(async () => {
+ await import('../public/search.js');
+ parseCommand = window.__twsSearch.parseCommand;
+ expect(typeof parseCommand).toBe('function');
+});
+
+describe('palette command grammar', () => {
+ it('parses forge with every verb alias and preserves the prompt', () => {
+ for (const verb of ['forge', 'make', 'generate', 'imagine']) {
+ const m = parseCommand(`${verb} a bronze dragon statue`);
+ expect(m?.def.id).toBe('forge');
+ expect(m.args.prompt).toBe('a bronze dragon statue');
+ }
+ });
+
+ it('parses digest triggers', () => {
+ for (const q of ['digest', 'briefing', 'what happened today?', 'today']) {
+ expect(parseCommand(q)?.def.id).toBe('digest');
+ }
+ });
+
+ it('parses price with a verb or a $ticker', () => {
+ expect(parseCommand('price btc')).toMatchObject({ args: { query: 'btc' } });
+ expect(parseCommand('price btc').def.id).toBe('price');
+ expect(parseCommand('$sol')).toMatchObject({ args: { query: 'sol' } });
+ });
+
+ it('parses ask with an explicit verb and offers it for natural questions', () => {
+ expect(parseCommand('ask what is x402?')).toMatchObject({
+ args: { question: 'what is x402?' },
+ });
+ expect(parseCommand('how do agents pay each other?')?.def.id).toBe('ask');
+ });
+
+ it('never hijacks a plain search query', () => {
+ for (const q of ['marketplace', 'oracle', 'turbo otter', 'forge', 'make', 'price']) {
+ // Bare verbs with no argument are searches, not commands.
+ expect(parseCommand(q)).toBeNull();
+ }
+ expect(parseCommand('')).toBeNull();
+ });
+});
diff --git a/tests/x402-ring-catalog.test.js b/tests/x402-ring-catalog.test.js
index a46e3afe8..42fef8978 100644
--- a/tests/x402-ring-catalog.test.js
+++ b/tests/x402-ring-catalog.test.js
@@ -185,8 +185,9 @@ describe('rotation covers every autobuy endpoint within an hour', () => {
const plan = rotationPlan();
// Match volume-shared.reserveWindow: a cursor advances by the batch each
// tick, indices taken modulo the rotation length. Default cadence:
- // AUTONOMOUS_TICKS_PER_HOUR ticks × batch selections/tick.
- const BATCH = Number(process.env.X402_VOLUME_BATCH_PER_RUN || 4);
+ // AUTONOMOUS_TICKS_PER_HOUR ticks × batch selections/tick. The fallback
+ // mirrors VOLUME_BATCH_PER_RUN's default in pipelines/volume-shared.js.
+ const BATCH = Number(process.env.X402_VOLUME_BATCH_PER_RUN || 6);
const callsPerHour = AUTONOMOUS_TICKS_PER_HOUR * BATCH;
expect(callsPerHour, 'calls/hour >= rotation length').toBeGreaterThanOrEqual(plan.length);