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
feat: Implement free Crypto Data API endpoints and 3D generation services
fudjiae9db170f2230
diff --git a/.gitignore b/.gitignoreindex 48eacfa0a..9692221f5 100644--- a/.gitignore+++ b/.gitignore@@ -333,3 +333,6 @@ animation-sources/.library-clips/scripts/mixamo-progress.jsonscripts/mixamo-library.config.jsonscripts/mixamo-upload-state.json++# local prompt-pack workspace (never commit)+_prompts/diff --git a/.vercelignore b/.vercelignoreindex 33d84a54d..81f35ddca 100644--- a/.vercelignore+++ b/.vercelignore@@ -64,3 +64,8 @@ public/skills.mp4vite.config.artifact.jsplaywright.config.*scripts/gitpretty.sh++# Local prompt-pack scratch (git-ignored) — must not ship in the deploy upload;+# the build-time verify:solana scanner walks every uploaded file and reference+# snippets in here carry non-canonical constants by design.+_prompts/diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 74cbd4e5d..cbbd961d6 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -8,11 +8,13 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Agent Identity Studio — 3D avatars for AI agents** (`/agent-identities`) — Every AI agent deserves a face. A brand brief becomes a rigged 3D avatar plus posed studio renders — see the demo identities generated end-to-end by the pipeline.- **Premium Vanity Inventory** (`/vanity/premium`) — Buy a long, brandable Solana vanity address delivered instantly from stock — 4–5+ character prefixes the live grinder can't reach, ground ahead of time on batch CPU and sold via x402. Keys are encrypted at rest, priced by rarity, and delivered exactly once.+- **3D generation, rigging, and export — now individually-priced services for AI agents** — The 3D studio is now sold piece by piece on OKX.AI, OKX's agent marketplace, where AI agents buy from each other. Eight sharply-scoped services, each with its own endpoint and price: text→3D from $0.01, art-directed Pro generation and image→3D at $0.30, auto-rigging at $0.25, a one-call rigged avatar at $0.50, animation retargeting at $0.10, deterministic pose seeds at $0.02, and rig-preserving FBX export for Unity/Unreal at $0.10. Payment settles in stablecoins on X Layer over the OKX Agent Payments Protocol (the existing Solana and Base rails are still accepted), you are only charged once a job is accepted, and discovery, health, job polling, and previews stay free. The full machine-readable catalog lives at /api/okx/3d/catalog. (`/docs/okx-marketplace`) `[feature]`- **Agent Identity Studio — 3D avatars for AI agents, sold agent-to-agent** — Every AI agent on a marketplace shows a profile picture, and almost all of them are flat generated images. The new Agent Identity Studio gives an agent a real 3D identity: send a brand brief (any language) and $1.50 over the x402 rail, and the pipeline designs a character, generates the mesh, rigs a humanoid skeleton, and delivers posed studio renders — a square profile picture that stays sharp at thumbnail size, three full-body shots, and the rigged GLB itself for use in three.ws scenes, games, or any glTF runtime. Job status polling is free, you're only charged when a job is accepted, and failed steps retry at no cost. See the demo identities — generated end-to-end by the pipeline, briefs included — on the new showcase page. (`/agent-identities`) `[feature]`- **Premium vanity inventory — buy a long, brandable Solana address from stock** — The live grinder can only reach short (≤3-character) vanity prefixes on demand. New premium inventory grinds long, brandable 4–5+ character addresses ahead of time on cheap cloud CPU and sells them from stock, delivered instantly. Browse what's available and its rarity-scaled price ($1–$50) at /vanity/premium, then buy over the x402 rail (USDC on Base or Solana) — the private key is delivered exactly once and its stored copy is destroyed on delivery. Every key is encrypted at rest, and the listing is upfront that these are platform-generated keys: use a bought address as a token mint or sweep assets to your own wallet, not as a treasury. The existing $0.05 live-grind tier is unchanged. (`/vanity/premium`) `[feature, security]`## 2026-07-05+- **Sperax on three.ws** (`/sperax`) — Free AI credits for three.ws users on chat.sperax.io — what the integration is and how to claim it.- **Tour Builder — design a 3D store guide, no code** (`/tour-builder`) — A live, no-code playground: point and click on a demo storefront to build a 3D guide that walks and narrates it, preview it instantly, then copy the exact snippet into your Shopify theme.- **Tutorial · Customize Your Shopify 3D Store Guide** (`/tutorials/shopify-store-guide-advanced`) — Hand-tune the store guide: exact section targeting, multi-page tours, real spoken voices, your own avatar, autostart, deep links, and the JavaScript API.- **@three-ws/retarget — the animation engine behind every avatar, now a standalone package** — The rig-agnostic animation system that powers all three.ws avatars is now on npm as @three-ws/retarget. It maps bone names from Mixamo, VRM/VRoid, Avaturn, Daz, MakeHuman, Unreal, and Blender rigs onto one canonical skeleton, retargets any clip onto any humanoid with rest-pose and hip-axis correction, and ships the crossfading runtime that keeps characters from ever freezing in a T-pose. Only dependency: your own copy of Three.js. Same engine, same tests (2,800 lines of them) — now usable in any Three.js project. `[sdk, feature]`diff --git a/api/_okx3d/identity.js b/api/_okx3d/identity.jsindex 2600790e7..485906b33 100644--- a/api/_okx3d/identity.js+++ b/api/_okx3d/identity.js@@ -65,10 +65,6 @@ export const IDENTITY_DIRECTOR_INSTRUCTION ='characters, no text or logos. The brief may be in any language; ALWAYS write the prompt in ' +'English. Output ONLY the rewritten prompt as a single line — no preamble, no quotes.';-function sleep(ms) {- return new Promise((r) => setTimeout(r, ms));-}-function pipelineError(code, message, extra = {}) {return Object.assign(new Error(message), { code, ...extra });}@@ -163,16 +159,34 @@ async function directIdentityPrompt({ base, agentName, brief, styleHints }) {return refined.length >= 3 && refined.length <= 1000 ? refined : null;}+// The generation lane's text→image encoder truncates/chokes on long prompts —+// verified against production /api/forge: ~250-char prompts generate cleanly,+// ~430-char prompts fail. Keep every prompt we send under this budget, cut at+// a word boundary.+export const MAX_GENERATION_PROMPT_CHARS = 300;+function clampPrompt(text, max = MAX_GENERATION_PROMPT_CHARS) {+ const t = String(text ?? '').trim();+ if (t.length <= max) return t;+ const cut = t.slice(0, max);+ const lastSpace = cut.lastIndexOf(' ');+ return (lastSpace > max * 0.6 ? cut.slice(0, lastSpace) : cut).replace(/[,;:\s]+$/, '');+}+// Deterministic fallback when the director is unreachable. Forces the humanoid// framing rigging requires — an identity brief ("a finance data agent") rarely// names a humanoid subject, so unlike forge_avatar there is no humanoid gate// here: the subject is BY CONSTRUCTION a humanoid character embodying the-// brief, in both the director instruction and this template.-export function fallbackIdentityPrompt({ agentName, brief, styleHints }) {- const hints = styleHints ? `, ${styleHints}` : '';+// brief, in both the director instruction and this template. Leads with the+// visual description and stays inside the generation prompt budget: the frame+// text is ~130 chars, so the brief+hints get the remaining ~170.+export function fallbackIdentityPrompt({ brief, styleHints }) {+ // The style hints ARE the visual direction — they get their own budget so a+ // long brief can never crowd them out of the prompt.+ const hints = styleHints ? clampPrompt(styleHints, 70) : '';+ const subject = clampPrompt(brief, MAX_GENERATION_PROMPT_CHARS - 130 - (hints ? hints.length + 2 : 0));return (- `full-body humanoid character avatar embodying the AI agent "${agentName}": ${brief}${hints}, ` +- 'standing in a neutral pose with arms slightly away from the body, plain background'+ `full-body humanoid character: ${subject}${hints ? `, ${hints}` : ''}, standing neutral pose, ` ++ 'arms slightly away from body, plain background');}@@ -180,7 +194,7 @@ export async function shapeIdentityPrompt({ base = BASE, agentName, brief, styleconst directed = await directIdentityPrompt({ base, agentName, brief, styleHints });return {directed,- effective: directed || fallbackIdentityPrompt({ agentName, brief, styleHints }),+ effective: clampPrompt(directed || fallbackIdentityPrompt({ brief, styleHints })),};}@@ -495,6 +509,17 @@ async function beginRig(base, state) {// terminal while attempts remain. Exhausted retries mark the job failed with// the last actionable error.async function failStage(state, stage, err) {+ // Backpressure is not failure: a rate-limited upstream never consumes a+ // retry attempt. Clear the stage handle, honor retry_after (default 30s),+ // and let a later poll resubmit.+ if (err?.code === 'rate_limited') {+ state.error = { stage, code: 'rate_limited', message: String(err?.message || err), retrying: true };+ if (stage === 'generate') state.gen.jobId = null;+ else if (stage === 'rig') state.rig.jobId = null;+ const waitMs = Number(err?.retryAfter) > 0 ? Number(err.retryAfter) * 1000 : 30_000;+ state.nextAttemptAt = Date.now() + Math.min(waitMs, 5 * 60_000);+ return saveState(state);+ }const attempts = state.attempts[stage] ?? 0;if (attempts < MAX_STAGE_ATTEMPTS && err?.code !== 'not_configured') {state.error = { stage, code: err?.code || 'provider_error', message: String(err?.message || err), retrying: true };@@ -514,6 +539,12 @@ export async function advanceIdentityJob(id, { base = BASE } = {}) {const state = await loadState(id);if (!state) return null;+ // Rate-limit backoff window — this poll is a no-op until it elapses.+ if (state.nextAttemptAt && Date.now() < state.nextAttemptAt) return state;+ if (state.nextAttemptAt) {+ delete state.nextAttemptAt;+ }+if (state.stage === 'generate') {if (!state.gen.glbUrl && !state.gen.jobId) {// A previous attempt failed — this poll performs the free retry.@@ -589,14 +620,9 @@ export async function advanceIdentityJob(id, { base = BASE } = {}) {if (state.renderCursor >= state.plan.length) state.stage = 'done';await saveState(state);} catch (err) {- if (err?.code === 'rate_limited') {- // Renderer window exhausted — leave the cursor; the next poll retries.- state.error = { stage: 'render', code: 'rate_limited', message: String(err.message), retrying: true };- await saveState(state);- await sleep(250);- } else {- await failStage(state, 'render', err);- }+ // failStage handles rate_limited as pure backoff (cursor untouched,+ // no attempt consumed) and real failures with bounded retries.+ await failStage(state, 'render', err);}}}diff --git a/data/changelog.json b/data/changelog.jsonindex b7d315ff0..2865eb4b6 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-06",+ "title": "3D generation, rigging, and export — now individually-priced services for AI agents",+ "summary": "The 3D studio is now sold piece by piece on OKX.AI, OKX's agent marketplace, where AI agents buy from each other. Eight sharply-scoped services, each with its own endpoint and price: text→3D from $0.01, art-directed Pro generation and image→3D at $0.30, auto-rigging at $0.25, a one-call rigged avatar at $0.50, animation retargeting at $0.10, deterministic pose seeds at $0.02, and rig-preserving FBX export for Unity/Unreal at $0.10. Payment settles in stablecoins on X Layer over the OKX Agent Payments Protocol (the existing Solana and Base rails are still accepted), you are only charged once a job is accepted, and discovery, health, job polling, and previews stay free. The full machine-readable catalog lives at /api/okx/3d/catalog.",+ "tags": [+ "feature"+ ],+ "link": "/docs/okx-marketplace"+ },{"date": "2026-07-06","title": "Agent Identity Studio — 3D avatars for AI agents, sold agent-to-agent",diff --git a/data/pages.json b/data/pages.jsonindex cd032f6cd..f1700d252 100644--- a/data/pages.json+++ b/data/pages.json@@ -704,6 +704,14 @@"title": "Crypto","description": "On-chain features: pay-per-call, token launches, vanity wallets.","pages": [+ {+ "path": "/sperax",+ "title": "Sperax on three.ws",+ "description": "Free AI credits for three.ws users on chat.sperax.io — what the integration is and how to claim it.",+ "priority": 0.5,+ "changefreq": "monthly",+ "added": "2026-07-05"+ },{"path": "/agi","title": "The AGI — narrow by design",diff --git a/docs/okx-marketplace.md b/docs/okx-marketplace.mdnew file mode 100644index 000000000..cb49a83bc--- /dev/null+++ b/docs/okx-marketplace.md@@ -0,0 +1,248 @@+# OKX.AI Marketplace Services++three.ws sells 3D services to other AI agents on [OKX.AI](https://web3.okx.com), OKX's+on-chain agent marketplace. Buyers are agents: they discover a service, receive an HTTP 402+payment challenge, pay in stablecoins on X Layer (or USDC on our other x402 rails), and get+the artifact. Our marketplace listing is agent **#2632 "three.ws 3D Studio"**.++> Related: [REST API Reference](./api-reference.md) · [MCP servers](./mcp.md) ·+> [x402 payments](./x402.md) · seller-side protocol spec: [`specs/okx-agent-payments.md`](../specs/okx-agent-payments.md)++The **single source of truth** for every service (names, 2-part OKX descriptions, prices,+endpoints, input schemas) is [`api/_lib/okx-catalog.js`](../api/_lib/okx-catalog.js) — the+free catalog endpoint below serves it verbatim, so the docs, the endpoints, and the OKX+listing can never drift apart.++---++## Free discovery lane++No payment, no account, no key.++```bash+# Machine-readable index of every service+curl https://three.ws/api/okx/3d/catalog++# Live health of the lanes behind the paid services (real probes, not a static ok)+curl https://three.ws/api/okx/3d/health+```++---++## Agent Identity Studio — `$1.50` per identity++**The flagship.** Turns an AI agent's brand brief into a complete 3D identity:++- a **square PFP** (1024 px PNG + 128 px preview) framed head-and-shoulders, sized for the+ OKX.AI avatar slot and legible at marketplace thumbnail size;+- a **full-body render set** — three distinct poses from the three.ws pose library, studio+ lighting, consistent backdrop;+- the **rigged, animation-ready GLB** itself (humanoid skeleton + skin weights), usable in+ three.ws scenes, games, and any glTF runtime;+- a live [three.ws viewer](https://three.ws/viewer) link and pose-studio link.++Endpoint: `https://three.ws/api/okx/3d/identity-studio` — an A2MCP service (MCP Streamable+HTTP, JSON-RPC `tools/call`). Demo identities generated end-to-end by this pipeline:+[three.ws/agent-identities](https://three.ws/agent-identities).++### 1 · Create (paid)++An unpaid call returns the 402 challenge; pay it (e.g. `onchainos payment pay --payload …`+on OKX rails, or any x402 client) and replay with the payment header.++```bash+curl -sS -X POST https://three.ws/api/okx/3d/identity-studio \+ -H 'content-type: application/json' \+ -d '{+ "jsonrpc": "2.0", "id": 1, "method": "tools/call",+ "params": {+ "name": "create_identity",+ "arguments": {+ "agent_name": "LedgerLynx",+ "brief": "A meticulous on-chain accounting agent that reconciles wallets and flags anomalies in real time. Calm, precise, incorruptible.",+ "style_hints": "deep navy and silver palette, brushed-metal accents"+ }+ }+ }'+```++Arguments:++| Field | Required | Notes |+| --- | --- | --- |+| `agent_name` | yes | ≤80 chars, rendered into the identity brief |+| `brief` | yes | any language; >2000 chars is truncated and the response flags `brief_truncated` |+| `style_hints` | no | palette / materials / era / mood |+| `reference_image_url` | no | public image guiding the look — validated **before** any charge |++Success returns `{ job_id, status: "queued", poll_tool: "identity_status", eta_seconds }`.++### 2 · Poll (free)++```bash+curl -sS -X POST https://three.ws/api/okx/3d/identity-studio \+ -H 'content-type: application/json' \+ -d '{+ "jsonrpc": "2.0", "id": 2, "method": "tools/call",+ "params": { "name": "identity_status", "arguments": { "job_id": "<job_id>" } }+ }'+```++Each poll advances the pipeline one bounded step (generation → humanoid auto-rig → one+studio render per poll) and reports `stage` + render progress. Poll every ~5 s; typical time+to `done` is 3–6 minutes. When `status` is `"done"`, `deliverables` carries the PFP URLs,+the full-body set, `rigged_glb_url`, `mesh_glb_url`, `viewer_url`, and `pose_studio_url`.++### Payment semantics (verified behavior)++- **You pay only when the job is accepted.** Input validation — including fetching your+ `reference_image_url` — runs before settlement; an invalid brief or unreachable image+ fails the call and **no payment settles**.+- **Failed stages retry free.** Generation and rigging each retry up to 3 total attempts on+ transient upstream failures; renders re-run on the next poll. Only exhausted retries mark+ the job `failed`, with the last actionable error in `last_error`.+- **Status polling is free and unauthenticated** — job tokens are HMAC-signed, so they are+ the only capability needed to read a job.+- One payment ↔ one job: the payment proof is single-use across dispatch + settlement+ (replay-guarded), and the settled amount always equals the advertised price.++### Also on this endpoint (free)++- `getting_started` — overview of the server, tools, prices, and links.+- `GET https://three.ws/api/okx/3d/identity-studio` — SSE / discovery challenge.++---++## Decomposed 3D studio services++Micro-priced, single-capability REST endpoints — plain JSON `POST`, one price each, all+backed by the same engines the [MCP 3D studio](./mcp.md) runs (no separate pipeline).+`GET` on any of them returns its free descriptor (price, description, input schema).++| Service | Price (USDT) | Endpoint | You send |+|---|---|---|---|+| Text → 3D Model (GLB) | $0.01 | `/api/okx/3d/text-to-3d` | `prompt` |+| Text → 3D Model (Pro) | $0.30 | `/api/okx/3d/text-to-3d-pro` | `prompt`, `tier?` |+| Image → 3D Model | $0.30 | `/api/okx/3d/image-to-3d` | `image_urls[]` |+| Auto-Rig a GLB | $0.25 | `/api/okx/3d/rig` | `glb_url` |+| Text → Rigged Avatar | $0.50 | `/api/okx/3d/avatar` | `prompt` or `image_url` |+| Animation Retarget | $0.10 | `/api/okx/3d/retarget` | `model_url`, `animation` |+| Pose Seed | $0.02 | `/api/okx/3d/pose-seed` | `prompt` |+| FBX Export (rig-preserving) | $0.10 | `/api/okx/3d/fbx-export` | `model_url`, `format?` |++The buyer flow is the same for all of them: unpaid `POST` → 402 → sign+(`onchainos payment pay --payload '<402 body>'`) → replay with+`PAYMENT-SIGNATURE`. Generation-grade services reply `{status:"queued", job_id, poll_url}`+— polling `GET https://three.ws/api/forge?job=<job_id>` is free and unlimited; fast+services (`retarget`, `pose-seed`) reply `{status:"done", …}` inline. Settlement happens+**after** the engine accepts the job; invalid input, the avatar humanoid gate, or an+engine failure answers before settlement and never charges.++### Text → 3D Model (GLB) — $0.01++Textured GLB from a text prompt on the fast draft lane (NVIDIA NIM TRELLIS).++```bash+curl -i -X POST https://three.ws/api/okx/3d/text-to-3d \+ -H 'content-type: application/json' \+ -d '{"prompt":"a brass steampunk owl, full body"}'+```++### Text → 3D Model (Pro) — $0.30++An LLM art director refines the prompt, then a higher-quality lane generates the GLB.+`tier:"standard"` (default) or `tier:"high"` (max geometric detail + PBR textures).++```bash+curl -i -X POST https://three.ws/api/okx/3d/text-to-3d-pro \+ -H 'content-type: application/json' \+ -d '{"prompt":"ornate elven longsword","tier":"high"}'+```++### Image → 3D Model — $0.30++Reconstructs a textured GLB from 1–4 public photos of one object.++```bash+curl -i -X POST https://three.ws/api/okx/3d/image-to-3d \+ -H 'content-type: application/json' \+ -d '{"image_urls":["https://example.com/owl-front.jpg","https://example.com/owl-side.jpg"]}'+```++### Auto-Rig a GLB — $0.25++Adds an animation-ready humanoid skeleton and skin weights to a static GLB (UniRig lane).++```bash+curl -i -X POST https://three.ws/api/okx/3d/rig \+ -H 'content-type: application/json' \+ -d '{"glb_url":"https://cdn.three.ws/models/knight.glb"}'+```++### Text → Rigged Avatar — $0.50++Mesh generation + auto-rig in one call. Obvious non-humanoid prompts are refused **before**+payment settles (`allow_non_humanoid: true` overrides). The paid response returns the mesh+GLB immediately (`mesh_glb_url` + viewer link) plus the rig job to poll — a rig hiccup+never loses the paid generation.++```bash+curl -i -X POST https://three.ws/api/okx/3d/avatar \+ -H 'content-type: application/json' \+ -d '{"prompt":"a heroic knight in silver armor, full body"}'+```++### Animation Retarget — $0.10++Retargets a curated clip (idle, walk, dance, …) onto any rigged humanoid GLB — returns the+retargeted AnimationClip JSON keyed to the rig's actual bones plus a bone-coverage report.+Completes inside the request. Clip names are free at+[`/animations/manifest.json`](https://three.ws/animations/manifest.json).++```bash+curl -i -X POST https://three.ws/api/okx/3d/retarget \+ -H 'content-type: application/json' \+ -d '{"model_url":"https://cdn.three.ws/models/knight-rigged.glb","animation":"idle"}'+```++### Pose Seed — $0.02++Deterministic pose resolution: natural-language description → stable seed + full+joint-rotation map for humanoid rigs. Same prompt, same pose, every time. Completes inside+the request.++```bash+curl -i -X POST https://three.ws/api/okx/3d/pose-seed \+ -H 'content-type: application/json' \+ -d '{"prompt":"confident standing pose, arms crossed"}'+```++### FBX Export (rig-preserving) — $0.10++GLB → FBX for Unity/Unreal; a rigged GLB keeps its skeleton, skin weights, and blendshapes.+Other formats: `obj`, `stl`, `ply`, `usdz`, `3mf`.++```bash+curl -i -X POST https://three.ws/api/okx/3d/fbx-export \+ -H 'content-type: application/json' \+ -d '{"model_url":"https://cdn.three.ws/models/knight-rigged.glb","format":"fbx"}'+```++### Guarantees (all decomposed services)++- **Pay only after the job is accepted** — verify runs before the engine, settle after it;+ failure replies state explicitly that the payment was not taken.+- **Retried payments are safe** — the same payment + body replays the same response+ (idempotency cache); a payment proof is single-use across dispatch + settlement.+- **One service, one price** — every rail advertised in a service's 402 quotes the same+ amount, derived from the catalog module.++---++## Rails++Challenges advertise every rail the deployment can settle: **X Layer (`eip155:196`,+USD₮0)** via the OKX facilitator for OKX.AI buyers, plus the existing Solana / Base / BSC+USDC rails. The wire format OKX buyers use (headers `PAYMENT-REQUIRED` /+`PAYMENT-SIGNATURE` / `PAYMENT-RESPONSE`, scheme `exact` EIP-3009) is pinned down in+[`specs/okx-agent-payments.md`](../specs/okx-agent-payments.md).diff --git a/docs/start-here.md b/docs/start-here.mdindex 6fabfbb36..70cf2829d 100644--- a/docs/start-here.md+++ b/docs/start-here.md@@ -69,4 +69,5 @@ 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- **Going Pro?** → [Paid plans](./plan-checkout.md) — upgrade with a single on-chain payment in USDC, SOL, or $THREE (the platform coin takes 20% off); [hold-to-access](./hold-to-access.md) covers the separate hold-$THREE tier ladder- **Developer docs** → Read the [Introduction](./introduction.md) for the full technical picture+- **Your agent needs a face?** → [OKX.AI marketplace services](./okx-marketplace.md) — the Agent Identity Studio and the pay-per-call 3D services other agents buy from us; demo identities at [/agent-identities](/agent-identities)- **Building UI?** → [ui-juice](./ui-juice.md) is the shared game-feel library (count-ups, sparklines, ring gauges, live dots, the "it shipped" ripple) every surface animates withdiff --git a/prompts/okx-ai/PROGRESS.md b/prompts/okx-ai/PROGRESS.mdindex 323840eb6..0ed111ee0 100644--- a/prompts/okx-ai/PROGRESS.md+++ b/prompts/okx-ai/PROGRESS.md@@ -171,3 +171,151 @@ EIP-3009 gas is facilitator-paid).- **Work Order 02: GO (re-affirmed, now double-sourced).** Note for 02: commit`4cfc26ea3` already added `api/_lib/x402-xlayer-okx.js` + env vars — audit that fileagainst spec §1/§4 (esp. G7-G9 as corrected) instead of starting fresh.++---++## 2026-07-06 — Work Order 03 session: COMPLETE — 3D studio decomposed into micro-priced A2MCP services++**Outcome: the full target catalog is implemented, tested, and documented. Eight paid REST+services + the two free discovery services are live in code under `/api/okx/3d/<service>`,+all priced from one catalog module, all running the same engines `/api/mcp-3d` uses.**+This session also independently implemented the WO-02 X Layer rail before discovering the+concurrent sessions' commits — the converged implementation in HEAD+(`api/_lib/x402-xlayer-okx.js` + `x402-spec.js` routing + `@okxweb3/app-x402-core`) was+audited against spec §1/§4 including the Appendix H corrections (`extra.decimals: 6` added).++### What shipped (WO-03 scope)++- **Catalog rows** in [`api/_lib/okx-catalog.js`](../../api/_lib/okx-catalog.js) — 8 paid+ REST services added next to WO-06's identity-studio + free rows. Display-width+ validation (CJK=2/ASCII=1, ≤200 per description part) enforced by `validateCatalog()`+ and CI.+- **Engine adapters** in [`api/_okx3d/rest-services.js`](../../api/_okx3d/rest-services.js)+ — thin dispatch onto the existing engines (forge-client submit/poll, UniRig rig submit,+ `apply_animation` / `pose_model` / `remesh_model` MCP tool handlers). Zero pipeline+ duplication.+- **Routing** in [`api/okx/3d/[service].js`](../../api/okx/3d/%5Bservice%5D.js) — per-service+ OKX-dialect 402 (PAYMENT-REQUIRED header + body, X Layer accept FIRST with that service's+ own atomic amount, existing Solana/Base rails after), verify → engine → settle-on-success+ → PAYMENT-RESPONSE, forge.js-grade idempotency (retried payment replays the same+ response; proof single-use in flight). GET on any paid service = free descriptor.+- **Health** extended with two real probes: `retarget` (live animation-manifest fetch) and+ `payment-rail` (X Layer RPC height + on-chain USD₮0 symbol read + settlement-route+ config).+- **Docs**: [`docs/okx-marketplace.md`](../../docs/okx-marketplace.md) per-service section+ (runnable curl per service); changelog entry in `data/changelog.json` (built + validated+ via `npm run build:pages`); STRUCTURE.md row + start-here link were landed by the+ parallel WO-06 session and cover this surface.+- **Tests**: [`tests/api/okx-3d-services.test.js`](../../tests/api/okx-3d-services.test.js)+ — 26 tests, no sampling: catalog contract + price points, per-service 402 (all 8),+ free GET descriptor, paid dispatch per service, and the never-charge failure paths+ (invalid input, humanoid gate, engine 5xx, rejected payment, settle failure).++### Final catalog table (Work Order 05 submits these rows verbatim)++Descriptions are 2-part per OKX format (① capability ② caller input, both ≤200 display+width — validated). The exact submittable strings live in `api/_lib/okx-catalog.js`+(`describes.capability` + `describes.input`, joined by `listingDescription()`); this table+summarizes them:++| # | Service name | Fee (USDT) | Endpoint | Type |+|---|---|---|---|---|+| 1 | 3D Studio Health (free) | 0 | `https://three.ws/api/okx/3d/health` | A2MCP |+| 2 | 3D Studio Catalog (free) | 0 | `https://three.ws/api/okx/3d/catalog` | A2MCP |+| 3 | Text to 3D Model (GLB) | 0.01 | `https://three.ws/api/okx/3d/text-to-3d` | A2MCP |+| 4 | Text to 3D Model (Pro) | 0.30 | `https://three.ws/api/okx/3d/text-to-3d-pro` | A2MCP |+| 5 | Image to 3D Model | 0.30 | `https://three.ws/api/okx/3d/image-to-3d` | A2MCP |+| 6 | Auto-Rig a GLB | 0.25 | `https://three.ws/api/okx/3d/rig` | A2MCP |+| 7 | Text to Rigged Avatar | 0.50 | `https://three.ws/api/okx/3d/avatar` | A2MCP |+| 8 | Animation Retarget | 0.10 | `https://three.ws/api/okx/3d/retarget` | A2MCP |+| 9 | Pose Seed | 0.02 | `https://three.ws/api/okx/3d/pose-seed` | A2MCP |+| 10 | FBX Export (rig-preserving) | 0.10 | `https://three.ws/api/okx/3d/fbx-export` | A2MCP |+| 11 | Agent Identity Studio | 1.50 | `https://three.ws/api/okx/3d/identity-studio` | A2MCP (WO-06) |++All target rows from the work order shipped; none cut. The free "3D Health & Catalog" row+was split into two endpoints (matching how the reference sellers list discovery), and+WO-06's identity-studio row rides in the same catalog.++### Price vs unit cost (no service sells below cost)++| Service | Fee | Worst-case lane cost per call | Basis |+|---|---|---|---|+| text-to-3d | $0.01 | ~$0 | NVIDIA NIM TRELLIS lane — zero vendor cost (forge-tiers.js: "no vendor cost") |+| text-to-3d-pro | $0.30 | ~$0 normal; a few cents worst-case | NIM/HuggingFace free lanes first; Replicate TRELLIS backstop only when both are down |+| image-to-3d | $0.30 | same as pro | same reconstruct chain |+| rig | $0.25 | ~$0 marginal | self-hosted UniRig GPU worker (fixed infra) |+| avatar | $0.50 | gen + rig above | chain of the two |+| retarget | $0.10 | ~$0 | in-process CPU retarget |+| pose-seed | $0.02 | ~$0 | in-process deterministic lookup |+| fbx-export | $0.10 | ~$0 marginal | remesh worker convert |++Platform-retail prices on the general x402 rails are lower for some capabilities (e.g.+retarget $0.01 on /api/mcp-3d); the OKX-marketplace prices follow the work order's targets+— a deliberate marketplace premium, all above cost.++### Integration evidence (local, real module behind node:http)++Unpaid POST → per-service 402 with the service's own amount (pose-seed, $0.02):++```+HTTP/1.1 402 Payment Required+payment-required: <base64>+{"x402Version":2,"resource":{"url":"https://three.ws/api/okx/3d/pose-seed","mimeType":"application/json"},+ "accepts":[{"scheme":"exact","network":"eip155:196","amount":"20000",+ "payTo":"0x75d00a2713565171f33216e5aa2a375e076ecf69","maxTimeoutSeconds":86400,+ "asset":"0x779ded0c9e1022225f8e0630b35a9b54be713736",+ "extra":{"symbol":"USDT","name":"USD₮0","version":"1","transferMethod":"eip3009","decimals":6}}]}+```++Buyer's-eye check — `onchainos payment pay --payload '<our 402 body>'` ACCEPTED the+challenge and signed it (TEE wallet `0x75d0…cf69`):++```+ok: true header_name: PAYMENT-SIGNATURE scheme: exact+accepted.network: eip155:196 accepted.amount: 20000+auth.to: 0x75d00a2713565171f33216e5aa2a375e076ecf69 auth.value: 20000+```++Replaying that signed header against our endpoint (wallet unfunded) → our verify leg ran+the real on-chain checks and answered exactly like the approved sellers do:++```+HTTP/1.1 402 Payment Required+{"x402Version":2,"error":"insufficient_balance", ... same accepts ...}+```++### Test output++`npx vitest run tests/api/okx-3d-services.test.js tests/api/okx-identity-studio.test.js`:++```+ Test Files 2 passed (2)+ Tests 44 passed (44)+```++Full unit suite: 788/793 files green, 10905+ tests passing. The residual failures are NOT+this work order's: `x402-discovery-parity` red because the parallel session's new+`/api/x402/vanity-premium` endpoint isn't in the wk.js discovery catalog yet (their+follow-up); `token-market-single-flight` (market-cache lock test, unrelated subsystem) and+`x402-modal-dom` (passes in isolation — flake) predate/parallel this change. Playwright+E2E not run in this environment (browsers not installed per install command).++### Paid-leg status (per the anti-laziness gate)++Every lane that can run free ran for real (buyer signing, on-chain verify path, unfunded+settle behavior, engine dispatch under test). The fully-funded paid replay for each+service is Work Order 04's gauntlet and stays blocked on the same two owner items already+logged: **OKX API credentials** (`OKX_API_KEY`/`OKX_SECRET_KEY`/`OKX_PASSPHRASE` → vercel+env; enables the official facilitator verify/settle) and **USD₮0 funding** of+`0x75d0…cf69` on X Layer (≥ $2.98 covers one paid call of every WO-03 service ++identity-studio; ~$5 recommended). Fallback settle without OKX creds:+`X402_XLAYER_RELAYER_KEY` (fresh keypair) + OKB dust for gas — implemented and env-gated,+documented in the spec. Also required in vercel env for the rail to be advertised at all:+`X402_PAY_TO_XLAYER=0x75d00a2713565171f33216e5aa2a375e076ecf69`.++### Next++- **Work Order 04: GO** once the owner sets the env vars + funds above. All preconditions+ it audits now exist.+- **Work Order 05**: submit the catalog table above (strings from `okx-catalog.js`+ verbatim via `listingDescription()`).diff --git a/prompts/x402-catalog/00-CONTEXT.md b/prompts/x402-catalog/00-CONTEXT.mdnew file mode 100644index 000000000..81305277b--- /dev/null+++ b/prompts/x402-catalog/00-CONTEXT.md@@ -0,0 +1,127 @@+# 00 — Shared context for the x402 catalog rebuild (read this first, follow every rule)++Every prompt in `prompts/x402-catalog/` starts by telling you to read this file. It exists so+each work order stays small while you still have everything needed to finish **100% without+asking the owner anything**.++## The mandate++On 2026-07-06 the owner reviewed three.ws's listing on x402scan: 17 resources, **$5.87 volume /+10 buyers / 1.81K transactions in 30 days**. Verdict: most endpoints are internal demos wearing+price tags (dance-tip drives the /club page; crypto-intel is documented in its own header as a+demo for /agent-exchange; token-intel/three-intel are DexScreener passthroughs at $0.01 that+agents can get free at the source; skill-marketplace shipped with an EMPTY description).+Only **forge** (text→3D), **vanity** (WASM grinder), and **pump-launch** pass the test every+resource must pass: *"what can I get here that I can't get anywhere else?"*++The rebuild strategy, owner-approved:+1. **A free aggregated Crypto Data API** (`/api/v1/x/*`) — free tier is the funnel; x402 is+ metered overage. Free listings on x402scan get organic adoption because agents can try them+ with zero wallet setup.+2. **A free/cheap AI inference package** — NVIDIA NIM lanes (TRELLIS text→3D, ASR, TTS,+ Audio2Face) + the GCP Vertex image lane, subsidized by credits we already hold.+3. **The 3D Asset Pipeline as the paid product** — generate → rig → animate → optimize →+ deliver. Nobody else in the x402 ecosystem offers any of this.+4. **A clean storefront** — demos delisted, every remaining listing answers the uniqueness+ question in its first sentence.++## Behavioral rules (these override your defaults)++- **NEVER ask the owner a question. NEVER stop for confirmation. NEVER end with "should I…".**+ Pick the most reasonable interpretation and ship. If two options are defensible, pick one,+ note the choice in your final report, and keep going.+- **Complete 100% of your prompt's tasks.** Do not skip a numbered task. Do not do a "first+ pass". If a task turns out to be impossible (upstream API retired, env var genuinely absent),+ build the graceful-degradation path (clear 503 `not_configured`, health probe), document+ exactly what's missing, and finish everything else.+- **Verify upstreams with `curl` BEFORE wiring them.** Third-party API shapes drift. Curl the+ real endpoint, look at the real response, then write the descriptor/transform against what+ you observed. Never wire from memory.+- **No mocks, no fake data, no TODO comments, no stubs, no placeholder copy.** Real APIs, real+ responses, real errors handled at the boundary.+- **Every error has a root cause; find it.** Don't paper over failures with lazy fallbacks.++## The aggregator (the machine most prompts feed)++- **Registry:** `api/v1/_providers.js` — the single source of truth for every third-party API+ three.ws re-offers. Adding an upstream or endpoint = adding a descriptor object here. No new+ route files. Read the descriptor contract in its header comment before touching it.+- **Engine:** `api/_lib/aggregator.js` — `executeUpstream()` does the real fetch (20s timeout,+ key resolution, transform); `getPaidHandler()` wraps an endpoint in the platform's real+ x402 `paidEndpoint` rail.+- **Front door:** `api/v1/x/[...slug].js` — one catch-all route; per request selects a billing+ lane: **BYOK** (caller's own upstream key via `x-provider-key`, pass-through), **plan**+ (three.ws API key/OAuth), or **x402** (no credentials → pay-per-call USDC).+- **Discovery:** `GET /api/v1/x` returns `providerCatalog()`. `api/v1/_catalog.js` holds the+ wider `/api/v1` catalog (`API_META`); native (non-proxy) v1 routes must be registered there.+- **Free-tier contract:** endpoint descriptors may carry `free: { perMin: <n>, perDay: <n> }`.+ Engine support for this field ships in prompt 01 of this campaign (unauthenticated callers+ get that per-IP quota before the 402 kicks in). **Include the `free` field on your endpoints+ regardless of whether prompt 01 has run** — it's inert extra data until the engine reads it,+ so prompts stay order-independent. Choose honest quotas: generous for cheap cached upstreams+ (e.g. 30/min, 5000/day), tight for expensive ones.+- Existing providers: `coingecko`, `defillama`, `openai`. Match their style exactly (tabs,+ `required()` helper, slim `transform`s that strip multi-MB payloads to the fields agents use).++## The x402 rail (for paid endpoints outside the aggregator)++Every paid endpoint under `api/x402/*.js` follows one pattern — read one (e.g.+`api/x402/token-intel.js`) before writing one:+- `paidEndpoint` from `api/_lib/x402-paid-endpoint.js` (settlement; buyer is never charged if+ the handler throws before settlement — keep it that way).+- `buildBazaarSchema` from `api/_lib/x402-spec.js` + `declareHttpDiscovery` / `THREEWS_SERVICE`+ from `api/_lib/x402/bazaar-helpers.js` (v2 bazaar discovery — serviceName ≤32 ASCII chars,+ ≤5 tags ≤32 chars each; a `discoverable: false` resource keeps working but stops being+ indexed by facilitators).+- `priceFor(slug, defaultAtomics)` from `api/_lib/x402-prices.js` — prices in USDC atomics+ (6 decimals, `"10000"` = $0.01), env-overridable via `X402_PRICE_<UPPER_SNAKE_SLUG>`.+- `installAccessControl` from `api/_lib/x402/access-control.js`.++## Verification & docs duties (Definition of Done, every prompt)++- **Tests:** vitest, in `tests/api/*.test.js` — read a neighboring test for the harness pattern+ first. Run targeted: `npx vitest run tests/api/<your-file>.test.js`. Full `npm test` runs+ vitest + playwright and is slow — targeted runs plus the audits below are sufficient.+- **Audits:** if you touched anything under `api/x402/` or bazaar discovery, run+ `npm run audit:x402-catalog`. If you added a page, run `npm run build:pages` (it validates+ `data/pages.json` and `data/changelog.json` and fails on malformed entries).+- **New public page/route** → entry in `data/pages.json` (path, title, description, `added`+ date — feeds sitemap/llms.txt/changelog automatically).+- **Every user-visible change** → entry in `data/changelog.json` (date, holder-readable title ++ summary, tags from: feature/improvement/fix/sdk/infra/docs/security).+- **New top-level directory or product surface** → `README.md` in that directory + row in+ `STRUCTURE.md`.+- **Developer-facing capability** → update `docs/api-reference.md` / `docs/mcp.md` / the+ relevant `docs/*` file, matching neighboring format. Every code sample must actually run.++## Git rules++- **Concurrent agents share this worktree.** Stage explicit paths only — NEVER `git add -A` or+ `git add .`. Re-check `git status` and `git diff --staged` immediately before committing.+- When your tasks are done and verified: commit immediately (no pre-commit audits beyond what+ your prompt lists) and push to BOTH remotes: `git push threews main` then+ `git push threeD main`. **`threeD` currently fails with "Repository not found"** — attempt it+ once, report the failure in your summary, and do NOT let it block you. NEVER pull/fetch/merge+ from `threeD` (push-only mirror; pulling it has destroyed files before).+- No GitHub Actions — automation lives in Vercel/workers/scripts, never `.github/workflows/`.+- **Vercel build trap:** `npx vercel build` overwrites `api/*.js` sources in place with esbuild+ bundles. Never run it. If you see a huge `api/` diff starting with `__defProp`, recover with+ `git restore -- api/ public/`.++## $THREE rule (commit gate)++`$THREE` is the platform's only promoted coin — CA `FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`.+- **Token-address examples** in code, tests, and docs use the $THREE CA or a clearly-synthetic+ placeholder — never a real third-party mint.+- Generic upstream identifiers as API parameters (`ids=solana,bitcoin`, chain slugs, protocol+ slugs like `uniswap` in a params doc) follow existing committed precedent in+ `api/v1/_providers.js` and are fine — they're infrastructure inputs, not endorsements.+- Never write copy that promotes or recommends any other coin. If a diff would go beyond+ parameter-level references into featuring/endorsing a specific third-party crypto project,+ redesign it to be runtime-parameterized or use $THREE.++## Reporting++End with a short report: what shipped (files + routes), what you verified (commands + results),+the commit hash(es), the threeD push result, and any environment gaps the owner must fill+(exact env var names + where to set them). No questions.diff --git a/prompts/x402-catalog/01-free-tier-lane.md b/prompts/x402-catalog/01-free-tier-lane.mdnew file mode 100644index 000000000..9a2224ee0--- /dev/null+++ b/prompts/x402-catalog/01-free-tier-lane.md@@ -0,0 +1,66 @@+# 01 — Free tier lane for the aggregator (`/api/v1/x/*`)++Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish+100%, never ask questions.++## Mission++The aggregator currently has three billing lanes (BYOK / plan / x402). Add the fourth and most+important one: a **genuine free tier**. An unauthenticated caller with no payment header gets a+per-IP quota on endpoints marked `free`, and only sees the 402 challenge after exhausting it.+This is what makes "the free crypto API" real instead of marketing copy — an agent must be able+to `curl https://three.ws/api/v1/x/coingecko/price?ids=solana` and get data with zero setup.++## Context++- Front door: `api/v1/x/[...slug].js` — read its billing-lane selection logic top to bottom+ before changing it. It already imports `limits`/`clientIp` from `api/_lib/rate-limit.js` and+ helpers from `api/_lib/http.js` (`rateLimited`, `setRateLimitHeaders`).+- Engine: `api/_lib/aggregator.js` (`executeUpstream`, `getPaidHandler`).+- Registry: `api/v1/_providers.js`. The `free` field contract (from 00-CONTEXT):+ `free: { perMin: <n>, perDay: <n> }` on an endpoint descriptor.+- Existing rate-limit plumbing: read `api/_lib/rate-limit.js` fully — reuse its store/limiter+ rather than inventing a second one. If it is purely in-memory per-instance, that is+ acceptable for per-minute quotas; for per-day quotas check whether the repo has a shared+ store (`api/_lib/db.js` has `sql`; grep for existing daily-quota patterns, e.g. in+ `api/_lib/usage.js` / `recordEvent`) and use the same mechanism the platform already uses.++## Tasks++1. **Engine support.** In the front door's lane selection: when the caller has no BYOK key, no+ bearer/session auth, and no x402 payment header, AND the resolved endpoint descriptor has a+ `free` field → serve the request through the free lane: enforce `perMin` and `perDay` per+ client IP per endpoint, execute the upstream, return the payload.+2. **Headers.** Free-lane responses carry `X-RateLimit-Limit`, `X-RateLimit-Remaining`,+ `X-RateLimit-Reset` (reuse `setRateLimitHeaders`) plus `X-Free-Tier: 1`.+3. **Over-quota behavior.** When the free quota is exhausted, fall through to the existing x402+ lane (the 402 challenge). Add a JSON hint field to the 402 response body if the paidEndpoint+ rail allows attaching one (read `api/_lib/x402-paid-endpoint.js` to see; if the challenge+ shape is spec-locked, put the hint in a response header `X-Free-Tier-Reset: <iso>` instead):+ the caller should learn "free quota resets at T; or pay per call; or send a three.ws API+ key."+4. **Mark existing endpoints free.** In `api/v1/_providers.js`, add `free` quotas to every+ `coingecko` and `defillama` endpoint (they're keyless upstreams — suggested:+ `{ perMin: 30, perDay: 2000 }`). Do NOT mark `openai/chat` free (platform key costs real+ money per call).+5. **Discovery.** Extend `providerCatalog()` so each endpoint's entry includes its `free`+ quota (or `free: false`). Verify `GET /api/v1/x` renders it.+6. **Metering.** Free-lane calls still record a usage event (find how the BYOK lane calls+ `recordEvent` in the front door and mirror it with a `billing: 'free'` marker) so adoption+ is measurable — this data is how the owner knows the funnel works.+7. **Tests** in `tests/api/v1-free-tier.test.js`: free endpoint serves without auth; quota+ headers present; over-quota falls through to 402; non-free endpoint (openai/chat) still+ 402s immediately; catalog exposes free quotas. Read a neighboring `tests/api/*.test.js`+ first for the harness pattern (how handlers are imported and req/res are faked). Run+ `npx vitest run tests/api/v1-free-tier.test.js` until green.+8. **Docs.** Update `docs/api-reference.md`'s section on `/api/v1/x` (or add one matching the+ neighboring format): the four lanes, the free-tier quotas, one runnable curl example using+ `ids=solana`. Changelog entry in `data/changelog.json` (tag: `feature`) — holder-readable:+ the three.ws crypto API now has a free tier.+9. Commit (explicit paths) and push per 00-CONTEXT.++## Definition of done++Free lane works end-to-end locally (prove with a real invocation of the handler in tests),+quota falls through to a real 402, catalog + docs + changelog updated, tests green, committed,+pushed to threews (threeD attempted).diff --git a/prompts/x402-catalog/02-provider-dexscreener.md b/prompts/x402-catalog/02-provider-dexscreener.mdnew file mode 100644index 000000000..65b86540a--- /dev/null+++ b/prompts/x402-catalog/02-provider-dexscreener.md@@ -0,0 +1,63 @@+# 02 — Aggregator provider: DexScreener++Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish+100%, never ask questions.++## Mission++Add DexScreener as a provider in `api/v1/_providers.js` so any agent can pull live DEX pair+data (price, liquidity, volume, txns) for any token through the free three.ws crypto API. This+replaces the pointless paid `token-intel`/`three-intel` wrappers with an honest free surface.++## Context++- Registry + descriptor contract: `api/v1/_providers.js` (read the header comment and match the+ existing `coingecko` entry's style exactly — tabs, `required()` helper, slim transforms).+- DexScreener is keyless (`requiresKey: false`, `envVar: null`, `byokHeader: null`).+- Known API surface (VERIFY EVERY PATH WITH CURL BEFORE WIRING — shapes drift):+ - Base `https://api.dexscreener.com`+ - `GET /latest/dex/tokens/{tokenAddresses}` — up to 30 comma-separated addresses; ~300 req/min+ - `GET /latest/dex/search?q=<query>` — ~300 req/min+ - `GET /latest/dex/pairs/{chainId}/{pairId}` — ~300 req/min+ - `GET /token-profiles/latest/v1` and `GET /token-boosts/latest/v1` — ~60 req/min+- The repo already consumes DexScreener elsewhere (`api/_lib/token-market.js`+ `fetchTokenMarket`) — read it for field names the platform already normalizes to.+- Use the $THREE mint `FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump` for every example address+ in params docs, tests, and docs.++## Tasks++1. Curl each endpoint above with a real request (token endpoint: use the $THREE mint). Record+ actual response shapes.+2. Add provider `dexscreener` (category `crypto-market-data`) with endpoints:+ - `token` — pairs for one or more token addresses. Param `addresses` (required, comma-sep,+ cap at 30). **Transform**: DexScreener returns full pair objects (~large); slim each pair+ to: `chainId, dexId, pairAddress, baseToken {address,name,symbol}, quoteToken {symbol},+ priceUsd, priceNative, liquidity.usd, fdv, marketCap, volume.h24, priceChange {h1,h6,h24},+ txns.h24, pairCreatedAt, url`. Sort by `liquidity.usd` desc.+ - `search` — param `q` (required). Same slim transform, cap 20 pairs.+ - `pair` — params `chain` + `pair` (both required), path-param style like defillama's `tvl`.+ Same slim transform.+ - `profiles` — latest token profiles (no params). Slim to+ `chainId, tokenAddress, description, links` per entry, cap 30.+ - `boosts` — latest boosted tokens (no params). Slim similarly, cap 30.+3. Free-tier field on all endpoints per the 00-CONTEXT contract: `token`/`search`/`pair` get+ `free: { perMin: 30, perDay: 3000 }`; `profiles`/`boosts` get+ `free: { perMin: 10, perDay: 500 }` (upstream limit is 60/min shared). Set `priceAtomics`+ `'1000'` ($0.001) on all — the x402 price for above-quota callers. Scope `agents:read`.+4. `summary` lines must be specific and agent-readable (what data, for what input, from where).+ `params` documents every input with an example using the $THREE mint.+5. **Tests** in `tests/api/v1-provider-dexscreener.test.js`: descriptor integrity (every+ endpoint resolvable via `ENDPOINT_INDEX`, transforms handle a recorded real-shaped payload+ AND a malformed/empty payload without throwing), `required()` errors on missing params. Use+ fixtures captured from your real curls (a recorded upstream response used as a test fixture+ is real data, not a mock of our code). Run targeted vitest until green.+6. **Docs:** add the provider to the `/api/v1/x` section of `docs/api-reference.md` with one+ runnable curl per endpoint ($THREE mint example). Changelog entry (`feature`): live DEX+ pair data for any token, free.+7. Commit (explicit paths: the registry, tests, docs, changelog) and push per 00-CONTEXT.++## Definition of done++All five endpoints wired, transforms verified against real captured responses, tests green,+docs + changelog updated, committed, pushed to threews (threeD attempted).diff --git a/prompts/x402-catalog/03-provider-jupiter.md b/prompts/x402-catalog/03-provider-jupiter.mdnew file mode 100644index 000000000..20c24bf5f--- /dev/null+++ b/prompts/x402-catalog/03-provider-jupiter.md@@ -0,0 +1,56 @@+# 03 — Aggregator provider: Jupiter (Solana prices, quotes, token search)++Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish+100%, never ask questions.++## Mission++Add Jupiter as a provider in `api/v1/_providers.js`: Solana token prices, real swap quotes, and+token metadata search through the free three.ws crypto API. A swap **quote** (not execution) is+one of the highest-value free data calls an agent can make — it's the true executable price.++## Context++- Registry + descriptor contract: `api/v1/_providers.js` (match existing entries' style).+- Jupiter's keyless tier lives on `https://lite-api.jup.ag` (their paid/keyed tier is+ `api.jup.ag`). Use the lite base — `requiresKey: false`. Known surface (VERIFY EVERY PATH+ WITH CURL BEFORE WIRING — Jupiter versions endpoints aggressively; if a path 404s, probe the+ adjacent version, e.g. `/price/v2` vs `/price/v3`, `/swap/v1/quote` vs `/v6/quote`, and use+ what actually responds):+ - Price: `GET /price/v3?ids=<comma-sep mints>` (v2 form: `/price/v2?ids=…`)+ - Quote: `GET /swap/v1/quote?inputMint=…&outputMint=…&amount=<atomics>&slippageBps=50`+ - Token search: `GET /tokens/v2/search?query=<text>` (v1 form: `/tokens/v1/token/<mint>`)+- USDC mint for examples: `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` is a real third-party+ reference — acceptable ONLY as a quote-side parameter default documented in `params` (it's+ generic infrastructure, like `ids=solana` precedent). For the token-side examples use the+ $THREE mint `FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`.+- BYOK: Jupiter keys go in an `x-api-key` header against `api.jup.ag`. The descriptor `base` is+ static, so keep the lite base and set `byokHeader: null` — document in the endpoint summaries+ that this is Jupiter's keyless tier. Do not build multi-base plumbing.++## Tasks++1. Curl each candidate path with real mints ($THREE, wrapped SOL `So11111111111111111111111111111111111111112`)+ and record the working versions + response shapes.+2. Add provider `jupiter` (category `crypto-market-data`) with endpoints:+ - `price` — param `ids` (required, comma-sep mints). Transform to a flat+ `{ [mint]: { price_usd, … } }` keeping only stable fields you observed.+ - `quote` — params `inputMint`, `outputMint`, `amount` (all required), `slippageBps`+ (default 50). Transform: keep `inAmount, outAmount, otherAmountThreshold, priceImpactPct,+ routePlan` slimmed to `[{ label, inputMint, outputMint, percent }]`, drop the rest.+ - `token-search` — param `query` (required). Slim each hit to+ `address, name, symbol, decimals, logoURI, tags, daily_volume` (whatever subset the real+ response carries), cap 20.+3. Free-tier field on all three: `free: { perMin: 20, perDay: 2000 }`. `priceAtomics` `'1000'`.+ Scope `agents:read`. Specific `summary` + fully documented `params` with runnable examples.+4. **Tests** in `tests/api/v1-provider-jupiter.test.js`: descriptor integrity via+ `ENDPOINT_INDEX`, transforms against captured real-shaped fixtures + malformed payloads,+ required-param errors. Targeted vitest until green.+5. **Docs:** provider section in `docs/api-reference.md` with one runnable curl per endpoint.+ Changelog entry (`feature`): Solana prices, executable swap quotes, and token search, free.+6. Commit (explicit paths) and push per 00-CONTEXT.++## Definition of done++Three endpoints wired against verified-live paths, transforms tested against captured real+shapes, docs + changelog updated, tests green, committed, pushed to threews (threeD attempted).diff --git a/prompts/x402-catalog/04-provider-coingecko-defillama-expansion.md b/prompts/x402-catalog/04-provider-coingecko-defillama-expansion.mdnew file mode 100644index 000000000..42fc41092--- /dev/null+++ b/prompts/x402-catalog/04-provider-coingecko-defillama-expansion.md@@ -0,0 +1,67 @@+# 04 — Expand CoinGecko + DefiLlama coverage (and add the Llama price/stablecoin bases)++Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish+100%, never ask questions.++## Mission++The `coingecko` and `defillama` providers in `api/v1/_providers.js` each expose only 2+endpoints. Expand them to real coverage, and add DefiLlama's two sibling APIs (coins.llama.fi+prices, stablecoins.llama.fi) as their own providers since they live on different base URLs.++## Context++- Registry + descriptor contract: `api/v1/_providers.js`. Match existing style exactly. Append+ new endpoints INSIDE the existing `coingecko`/`defillama` entries; add the two new providers+ at the end of `PROVIDERS`. Don't reformat existing entries (concurrent agents may be editing+ the same file — keep your diff surgical).+- All of these upstreams are keyless. VERIFY EVERY PATH WITH CURL BEFORE WIRING and slim every+ large payload with a `transform` (see the existing `defillama/protocols` transform for the+ bar: a multi-MB upstream response must not ship through unslimmed).+- Known surfaces to verify:+ - CoinGecko `https://api.coingecko.com/api/v3`: `/coins/{id}` (use+ `localization=false&tickers=false&community_data=false&developer_data=false`),+ `/search/trending`, `/simple/token_price/{platform}?contract_addresses=…&vs_currencies=usd`,+ `/global`, `/coins/{id}/ohlc?vs_currency=usd&days=…`+ - DefiLlama `https://api.llama.fi`: `/v2/chains`, `/protocol/{slug}` (HUGE — slim hard),+ `/v2/historicalChainTvl/{chain}`+ - Llama coins `https://coins.llama.fi`: `/prices/current/{coins}` where `{coins}` is+ comma-sep `chain:address` (e.g. `solana:FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`)+ - Llama stablecoins `https://stablecoins.llama.fi`: `/stablecoins?includePrices=true`++## Tasks++1. Curl everything; record real shapes.+2. **CoinGecko additions** (each: `free: { perMin: 20, perDay: 1500 }`, `priceAtomics '1000'`,+ scope `agents:read`, specific summary, documented params):+ - `coin` — `/coins/{id}` slimmed to name/symbol/market_data essentials (price, ath, atl,+ market_cap, volume, supply, price changes) + description.en truncated to 500 chars.+ - `trending` — `/search/trending`, slim to coins `[{ id, symbol, name, market_cap_rank,+ price_btc }]` and top categories.+ - `token-price` — `/simple/token_price/{platform}` with params `platform` (default+ `solana`), `addresses` (required). Example address: the $THREE mint.+ - `global` — `/global`, slim to total market cap, volume, btc/eth dominance, active coins.+ - `ohlc` — `/coins/{id}/ohlc`, params `id` (required), `days` (default 1, allow 1/7/14/30).+3. **DefiLlama additions** (same pricing/free defaults):+ - `chains` — `/v2/chains` slimmed to `[{ name, tvl, tokenSymbol, chainId }]` sorted by tvl.+ - `protocol` — `/protocol/{slug}` slimmed to name, category, chains, current TVL per chain,+ and the LAST 30 points of the total TVL series only.+ - `chain-tvl` — `/v2/historicalChainTvl/{chain}`, last 90 points.+4. **New provider `llama-prices`** (base coins.llama.fi, category `crypto-market-data`):+ endpoint `current` — param `coins` (required, comma-sep `chain:address`), transform to+ `{ [key]: { price, symbol, decimals, timestamp, confidence } }`.+5. **New provider `llama-stablecoins`** (base stablecoins.llama.fi, category `defi-data`):+ endpoint `list` — slim each to `name, symbol, pegType, price, circulating total`, sorted by+ circulating desc, cap 50.+6. **Tests** in `tests/api/v1-provider-llama-expansion.test.js` ++ `tests/api/v1-provider-coingecko-expansion.test.js`: descriptor integrity via+ `ENDPOINT_INDEX`, every new transform against captured real-shaped fixtures and malformed+ payloads, required-param errors. Targeted vitest until green.+7. **Docs:** extend the provider sections in `docs/api-reference.md` (runnable curl each).+ Changelog entry (`feature`), holder-readable.+8. Commit (explicit paths) and push per 00-CONTEXT.++## Definition of done++CoinGecko 2→7 endpoints, DefiLlama 2→5, two new Llama providers live, everything transformed+slim + tested against real captured shapes, docs + changelog updated, committed, pushed.diff --git a/prompts/x402-catalog/05-provider-solana-reads.md b/prompts/x402-catalog/05-provider-solana-reads.mdnew file mode 100644index 000000000..ae60b87a4--- /dev/null+++ b/prompts/x402-catalog/05-provider-solana-reads.md@@ -0,0 +1,64 @@+# 05 — Aggregator provider: Solana on-chain reads++Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish+100%, never ask questions.++## Mission++Add a `solana` provider to `api/v1/_providers.js` exposing the on-chain reads agents ask for+constantly — balance, token holdings, supply, largest holders, transaction lookup, priority+fees — as simple GET endpoints, so an agent never has to hand-build JSON-RPC.++## Context++- Registry: `api/v1/_providers.js`. The descriptor contract supports POST upstreams with a+ `body` builder — Solana RPC is a single POST endpoint with JSON-RPC bodies, so every+ "endpoint" here is `method: 'POST'` upstream-side. BUT the public aggregator surface should+ stay GET-friendly for these (they're reads). Read `api/v1/x/[...slug].js` to see how+ GET/POST are dispatched; if the front door strictly maps caller method → upstream method,+ extend the endpoint descriptor with an explicit `upstreamMethod` field handled in+ `api/_lib/aggregator.js` (`executeUpstream`) so a caller GET can drive an upstream POST.+ Keep that change minimal and documented in the registry header comment.+- **RPC URL:** the platform already talks to Solana RPC — read `api/solana-rpc.js` and grep+ `api/_lib` for the env var(s) in use (e.g. `SOLANA_RPC_URL` / Helius). Use the SAME env+ resolution the platform already uses; the descriptor `base` may be computed at module load+ from that env with a sensible public fallback (`https://api.mainnet-beta.solana.com`).+- JSON-RPC methods to wrap: `getBalance`, `getTokenAccountsByOwner` (jsonParsed, by owner ++ programId TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA), `getTokenSupply`,+ `getTokenLargestAccounts`, `getTransaction` (jsonParsed, maxSupportedTransactionVersion 0),+ `getAccountInfo` (jsonParsed), `getRecentPrioritizationFees`.+- Example addresses in params/tests/docs: $THREE mint+ `FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`; for wallet examples generate a synthetic+ base58 or use a well-known program id — never a real person's wallet.++## Tasks++1. Curl the platform's configured RPC (or the public fallback) with each JSON-RPC body; record+ real shapes.+2. Add provider `solana` (category `onchain-data`) with endpoints (all GET caller-side):+ - `balance` — param `address` (required) → `{ lamports, sol }`.+ - `token-holdings` — param `owner` (required) → parsed token accounts slimmed to+ `[{ mint, amount, decimals, uiAmount }]`, zero-balances filtered, sorted by uiAmount.+ - `token-supply` — param `mint` (required) → `{ amount, decimals, uiAmount }`.+ - `largest-holders` — param `mint` (required) → top 20 `[{ address, uiAmount }]`.+ - `transaction` — param `signature` (required) → slimmed: slot, blockTime, fee, err,+ signer(s), log messages truncated to first 20 lines, pre/post token balance deltas.+ - `account` — param `address` (required) → owner program, lamports, executable, parsed data+ type when available.+ - `priority-fees` — no params → last 150 slots reduced to `{ p50, p75, p95, max }`+ (compute the percentiles in the transform).+3. Each endpoint: `free: { perMin: 20, perDay: 2000 }`, `priceAtomics '1000'`, scope+ `agents:read`, specific summary, documented params with examples. JSON-RPC `error` in the+ upstream 200 response must surface as a proper HTTP error (status 400/404 with the RPC+ message), not as a payload — handle in the transform or a shared helper.+4. **Tests** in `tests/api/v1-provider-solana.test.js`: descriptor integrity, every transform+ against captured real-shaped fixtures (success AND RPC-error payloads), percentile math,+ required-param errors. Targeted vitest until green.+5. **Docs:** provider section in `docs/api-reference.md` with runnable curls. Changelog entry+ (`feature`): free Solana reads for agents — no RPC endpoint, no JSON-RPC boilerplate.+6. Commit (explicit paths) and push per 00-CONTEXT.++## Definition of done++Seven read endpoints live through the aggregator, RPC errors mapped to HTTP errors, transforms+tested against real captured shapes, docs + changelog updated, committed, pushed.diff --git a/prompts/x402-catalog/06-pump-data-v1.md b/prompts/x402-catalog/06-pump-data-v1.mdnew file mode 100644index 000000000..f63cff600--- /dev/null+++ b/prompts/x402-catalog/06-pump-data-v1.md@@ -0,0 +1,62 @@+# 06 — Pump.fun data as free `/api/v1` endpoints (including honest whale detection)++Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish+100%, never ask questions.++## Mission++three.ws already has real pump.fun plumbing (`api/pump/*.js`, `api/_lib/pump-launch-feed.js`,+`api/_lib/pump-alert-runner.js`, Helius integration). Expose it as clean, FREE, versioned+endpoints under `/api/v1/pump/*` — including the whale-activity detection currently trapped+inside the paid `api/x402/pump-agent-audit.js` "oracle". Free data here is a funnel to the paid+pump-launch product.++## Context++- These are NOT third-party proxies — they're native routes backed by our own modules, so they+ do NOT go in `api/v1/_providers.js`. They go under `api/v1/pump/` and get registered in+ `api/v1/_catalog.js` (read its header: every native v1 route needs a catalog entry — id,+ method, path, auth, scope, summary, params).+- Read before writing: `api/pump/trending.js`, `api/pump/curve.js`, `api/pump/search.js`,+ `api/pump/dashboard.js`, `api/pump/helius-stats.js`, `api/_lib/pump-launch-feed.js`, and the+ whale logic inside `api/x402/pump-agent-audit.js` (lines defining what a "whale" is: wallet+ buying ≥5 SOL in one tx across top bonding-curve coins).+- Look at how `api/v1/sentiment.js` / `api/v1/market/intel.js` are built (auth handling,+ `wrap`/`json`/`error` from `api/_lib/http.js`, rate limiting) — match that pattern.+- If an `api/pump/*.js` route holds logic you need but it isn't importable (logic inline in+ the handler), extract the shared part into `api/_lib/` and have BOTH routes use it — never+ copy-paste and never break the existing route.++## Tasks++1. Create `api/v1/pump/[action].js` (single dynamic route, matching however `api/v1/agents/`+ or `api/portfolio/[action].js` handles actions) exposing:+ - `trending` — reuse the trending module. Slim, cap 25.+ - `curve` — bonding-curve progress for a mint (`mint` param, example: $THREE CA).+ - `search` — text search over pump tokens (`q` param).+ - `launches` — the three.ws platform launch feed from `pump_agent_mints`+ (`api/_lib/pump-launch-feed.js`) — this is the allowed runtime launch-directory surface.+ - `whales` — port the whale-activity detection from `pump-agent-audit.js` as a free read:+ `limit` param (default 5, max 25), returns `{ wallets, whale_count, total_sol_moved }`.+ Drop the decorative "bullish/bearish signal + confidence" fields — report facts only.+2. Every action: public auth (no key needed), per-IP rate limit (reuse+ `api/_lib/rate-limit.js`; 20/min is fine), proper `cache-control` headers for cacheable+ reads (trending/launches: 30–60s), errors surfaced honestly (upstream down = 503 with a+ clear message, never empty-array fakery).+3. Register all five in `api/v1/_catalog.js` with specific summaries + documented params.+4. **Tests** in `tests/api/v1-pump.test.js`: each action responds through the handler with+ real-shaped fixtures at the module boundary you extracted (fixtures captured from real+ calls), rate limit enforced, unknown action 404s, catalog entries exist and match the+ routes. Targeted vitest until green.+5. **Docs:** `docs/api-reference.md` section for `/api/v1/pump/*` with runnable curls+ ($THREE mint for examples). Changelog entry (`feature`): free pump.fun market data —+ trending, curve progress, search, launches, whale activity.+6. Do NOT modify or delist `api/x402/pump-agent-audit.js` — storefront changes belong to+ prompt 18 and prompts must not depend on each other. Just build the free surface.+7. Commit (explicit paths) and push per 00-CONTEXT.++## Definition of done++Five free pump endpoints live under `/api/v1/pump/*`, registered in the catalog, whale logic+shared (not duplicated) with the existing paid route, tests green, docs + changelog updated,+committed, pushed.diff --git a/prompts/x402-catalog/07-name-resolution-v1.md b/prompts/x402-catalog/07-name-resolution-v1.mdnew file mode 100644index 000000000..659797f7c--- /dev/null+++ b/prompts/x402-catalog/07-name-resolution-v1.md@@ -0,0 +1,49 @@+# 07 — Free name resolution: ENS + SNS under `/api/v1/resolve`++Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish+100%, never ask questions.++## Mission++three.ws already resolves ENS and SNS names (the `ens_sns_resolve` MCP tool and `api/sns.js`).+Expose that capability as one free versioned endpoint: `GET /api/v1/resolve?name=vitalik.eth`+or `?name=foo.sol` or reverse (`?address=…&chain=…`). Name resolution is a high-frequency agent+primitive and a perfect zero-friction entry point into the crypto API.++## Context++- Find the existing implementation first — do NOT reimplement resolution: grep for+ `ens_sns_resolve` (MCP tool registration lives under `api/_mcp3d/tools/` or in the MCP+ dispatch; the resolver logic it calls is the thing to reuse), and read `api/sns.js` ++ `api/sns-subdomain.js`. Whatever module those share is your backend.+- Native v1 route → lives at `api/v1/resolve.js`, registered in `api/v1/_catalog.js` (read its+ header for the entry contract). Match the handler style of `api/v1/sentiment.js`+ (`wrap`/`json`/`error` from `api/_lib/http.js`).+- Reverse ENS lookup needs an Ethereum RPC; reverse SNS needs Solana RPC — check what the+ existing resolver already supports and expose exactly that. If reverse lookup is NOT already+ implemented, add forward-only now and document it — do not half-build reverse resolution+ with a placeholder.++## Tasks++1. Locate and read the existing resolver(s). Write down (in your final report) which module you+ reused and what it supports.+2. Create `GET /api/v1/resolve`:+ - `?name=<x>.eth` → `{ name, chain: 'ethereum', address, source: 'ens' }`+ - `?name=<x>.sol` → `{ name, chain: 'solana', address, source: 'sns' }`+ - `?address=…` (+ optional `chain`) → reverse lookup IF the existing resolver supports it.+ - Unknown TLD → 400 with the list of supported suffixes. Unresolvable name → 404 with+ `{ error: 'not_found', name }` (a miss is not a 500).+3. Public, keyless, per-IP rate limit 30/min (reuse `api/_lib/rate-limit.js`), `cache-control`+ ~5 min on hits.+4. Register in `api/v1/_catalog.js` with a specific summary + params.+5. **Tests** in `tests/api/v1-resolve.test.js`: forward .eth and .sol against fixtures captured+ from real resolutions, unknown TLD 400, miss 404, rate limit, catalog entry present.+ Targeted vitest until green.+6. **Docs:** `docs/api-reference.md` entry with runnable curls. Changelog entry (`feature`).+7. Commit (explicit paths) and push per 00-CONTEXT.++## Definition of done++One clean resolve endpoint reusing the platform's existing resolver, honest 400/404 semantics,+tests green, catalog + docs + changelog updated, committed, pushed.diff --git a/prompts/x402-catalog/08-sentiment-narrative-v1.md b/prompts/x402-catalog/08-sentiment-narrative-v1.mdnew file mode 100644index 000000000..f0f4e2bc4--- /dev/null+++ b/prompts/x402-catalog/08-sentiment-narrative-v1.md@@ -0,0 +1,47 @@+# 08 — Harden + free-tier the existing v1 sentiment/intel routes++Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish+100%, never ask questions.++## Mission++`api/v1/sentiment.js`, `api/v1/market/intel.js`, and `api/v1/market/projects.js` already exist+but are undocumented, unadvertised, and their access model predates the free-tier strategy.+Audit them, give them a genuine free lane, and document them so they're a real part of the free+crypto API instead of dead routes.++## Context++- Read all three route files end to end, plus their backing modules (`api/sentiment.js`,+ `api/aixbt/*` — note aixbt is a keyed upstream; check which env var it needs and what+ happens today when it's absent).+- Catalog: `api/v1/_catalog.js` — check whether these routes are registered; fix any drift+ between catalog entries and actual behavior (params, auth, summaries).+- Free-tier pattern: unauthenticated per-IP quota via `api/_lib/rate-limit.js`, then a clear+ upgrade message — mirror however `api/v1/pump` or other public v1 routes gate (read what+ exists at the time you run; if nothing else has a free pattern yet, implement per-IP+ rate-limited public access directly — this prompt must not depend on any other prompt).++## Tasks++1. **Audit.** For each of the three routes: does it respond today? With what auth? What does it+ return when its upstream key is missing? Fix anything broken at the root (a route that 500s+ on missing env must 503 with `not_configured` and name the env var).+2. **Free access.** Make sentiment and any keyless-backed intel data publicly readable with a+ per-IP quota (20/min). For aixbt-backed endpoints that consume a paid upstream key, keep+ auth/x402 required but make the 401/402 response state exactly what a caller can do+ (get a key at /dashboard/developers, or pay per call).+3. **Catalog truth.** Update `api/v1/_catalog.js` entries: accurate summaries, params, auth+ levels. Every entry must match observed behavior — verify by invoking the handlers.+4. **Tests** in `tests/api/v1-sentiment-intel.test.js`: each route's happy path with captured+ real-shaped fixtures, missing-env 503 (not 500), quota enforcement, catalog/behavior+ consistency. Targeted vitest until green.+5. **Docs:** `docs/api-reference.md` section for sentiment + market intel with runnable curls+ (use `$THREE` / generic ids for examples). Changelog entry (`improvement`), holder-readable:+ sentiment and narrative intel are now part of the free API.+6. Commit (explicit paths) and push per 00-CONTEXT.++## Definition of done++All three routes verified working (or degrading with honest 503s), freely readable where the+upstream is free, catalog + docs + changelog accurate, tests green, committed, pushed.diff --git a/prompts/x402-catalog/09-crypto-api-docs-openapi.md b/prompts/x402-catalog/09-crypto-api-docs-openapi.mdnew file mode 100644index 000000000..8b590a7e2--- /dev/null+++ b/prompts/x402-catalog/09-crypto-api-docs-openapi.md@@ -0,0 +1,62 @@+# 09 — Crypto API storefront: OpenAPI, docs page, discovery++Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish+100%, never ask questions.++## Mission++Give the free crypto API a real storefront: a public `/crypto-api` page, OpenAPI coverage for+`/api/v1/x/*`, and docs — all **generated from the live registry** so they stay correct no+matter which provider prompts have or haven't run yet. This is what turns plumbing into a+product agents can discover.++## Context++- The provider registry (`api/v1/_providers.js`) exports `providerCatalog()` — machine-readable+ provider/endpoint/price/params data. The wider catalog is `api/v1/_catalog.js` (`API_META`).+ **Everything you build renders FROM these at runtime/build time** — never hand-enumerate+ endpoints, or this page is stale the day another prompt lands a provider.+- `api/openapi-json.js` already exists — read it fully; extend it to include every+ `/api/v1/x/{provider}/{endpoint}` path (parameters from each descriptor's `params`, the+ billing lanes as description text, `free` quota when the descriptor carries one).+- Pages: `data/pages.json` feeds sitemap/llms.txt/changelog; `npm run build:pages` validates.+ Find how existing marketing/docs pages are built (look at a recent page in `pages.json`, and+ how its HTML/JS lives under the repo root or `public/`) and match that pattern exactly.+- Frontend is vanilla JS + Vite. Design bar: Vercel/Stripe docs quality. Use existing design+ tokens/CSS variables — grep `public/` and `src/` for the token stylesheet other pages share.++## Tasks++1. **OpenAPI.** Extend `api/openapi-json.js` to render every aggregator endpoint from+ `providerCatalog()`. Verify the output parses (`curl | jq` on a local invocation or a unit+ test that imports the handler and validates JSON + a few known paths).+2. **`/crypto-api` page.** A public page that:+ - States the pitch in one line: one free API for crypto data — DEX pairs, prices, quotes,+ TVL, on-chain reads, name resolution — no key, no wallet, generous free tier, pay-per-call+ only above quota.+ - Renders the live provider/endpoint table by fetching `GET /api/v1/x` client-side+ (provider, endpoint, method, summary, free quota, x402 price). Loading state: skeleton+ rows. Error state: actionable message. Empty state: impossible by design but handle it.+ - Shows one copy-paste curl example (use `coingecko/price?ids=solana` — it exists today)+ with a copy button, hover/focus states, keyboard accessible.+ - Links to `/docs`, the OpenAPI JSON, and the x402 docs.+2b. Wire the page into site navigation wherever sibling developer pages are linked (find how+ existing pages appear in nav/footer and match).+3. **pages.json** entry (path, title, description, `added: 2026-07-06` or the date you run).+ Run `npm run build:pages` — must pass.+4. **Docs.** `docs/api-reference.md`: ensure the `/api/v1/x` section exists and explains the+ four billing lanes (free/BYOK/plan/x402) with one runnable curl. Keep it generated-friendly:+ describe the discovery endpoint rather than enumerating providers.+5. **README** at `api/v1/README.md`: what the unified API is, how the registry works, how to+ add a provider (descriptor contract), how billing lanes resolve. This is the doc the next+ contributor reads.+6. **Changelog** entry (`feature`): the three.ws crypto API has a home page and OpenAPI spec.+7. **Verify in a browser:** `npm run dev`, load `/crypto-api`, confirm the live table renders+ from the real endpoint, no console errors, responsive at 320/768/1440.+8. Commit (explicit paths) and push per 00-CONTEXT.++## Definition of done++`/crypto-api` renders the live registry with designed loading/error states, OpenAPI covers the+aggregator dynamically, README + docs + pages.json + changelog shipped, build:pages green,+browser-verified, committed, pushed.diff --git a/prompts/x402-catalog/10-crypto-api-mcp-tools.md b/prompts/x402-catalog/10-crypto-api-mcp-tools.mdnew file mode 100644index 000000000..bbc51ca30--- /dev/null+++ b/prompts/x402-catalog/10-crypto-api-mcp-tools.md@@ -0,0 +1,59 @@+# 10 — Expose the crypto API as MCP tools++Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish+100%, never ask questions.++## Mission++Agents increasingly consume capability through MCP, not raw HTTP. Expose the aggregator+(`/api/v1/x/*`) through the three.ws MCP server as tools — dynamically, from the registry, so+the toolset grows automatically as providers land.++## Context++- MCP server: `api/mcp.js` is the streamable-HTTP entry; the 3D MCP internals live in+ `api/_mcp3d/` (`catalog.js` = tool registry, `dispatch.js` = execution, `discovery.js`).+ Read all three plus 2–3 existing tool implementations under `api/_mcp3d/tools/` to learn the+ exact registration + handler contract (input schema shape, result shape, how paid tools+ declare pricing via `declareMcpDiscovery` from `api/_lib/x402/bazaar-helpers.js`).+- Aggregator: `api/v1/_providers.js` exports `ENDPOINT_INDEX` and `providerCatalog()`;+ `api/_lib/aggregator.js` exports `executeUpstream` and `resolveUpstreamKey`.+- Design decision (made — do not revisit): **one generic tool + a few curated ones**, not one+ tool per endpoint (a 30-tool flood degrades agent tool selection):+ - `crypto_data` — params `{ provider, endpoint, params }`, validated against+ `ENDPOINT_INDEX`; unknown pair → error listing valid pairs. Description enumerates the+ live provider/endpoint ids WITH their one-line summaries (generated from+ `providerCatalog()` at registration time).+ - `token_snapshot` — curated convenience: given a Solana mint (example: the $THREE CA+ `FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`), fan out to whichever registered providers+ can describe it (dexscreener token pairs if registered, coingecko token-price, solana+ token-supply…), tolerate absent providers (skip, note in result), merge into one snapshot.+ Must work with ONLY the providers that exist at runtime — check `ENDPOINT_INDEX` per+ sub-call; degrade gracefully. Note: a `pump_snapshot` tool already exists — read it first+ and reuse/extend rather than duplicating scope.+- Free-tier/pricing: tools backed by free-tier endpoints should be callable without payment+ within the same per-IP quotas; above quota they return the standard MCP PaymentRequired+ structuredContent (see how existing paid tools do this).++## Tasks++1. Read the MCP internals listed above; write the registration for `crypto_data` ++ `token_snapshot` following the existing tool pattern exactly.+2. Implement execution through `executeUpstream` (never re-fetch upstreams directly), with the+ free-quota/payment gate mirroring how existing paid tools gate.+3. Ensure MCP discovery lists the new tools with accurate descriptions (run whatever local+ listing path exists — `npm run test:mcp` and the audits `npm run audit:mcp` /+ `npm run audit:mcp-golden` are in package.json; run them and fix failures they surface for+ your tools).+4. **Tests** in `tests/api/mcp-crypto-data.test.js`: tools/list includes both tools with+ schemas; `crypto_data` validates provider/endpoint and errors helpfully on unknowns;+ `token_snapshot` merges partial provider availability without throwing (fixture-backed at+ the executeUpstream boundary). Targeted vitest until green.+5. **Docs:** `docs/mcp.md` — add both tools with example calls. Changelog entry (`feature`).+6. Commit (explicit paths) and push per 00-CONTEXT.++## Definition of done++Both tools registered and dispatchable, generated from the live registry (no hand-enumerated+endpoint lists in code), MCP audits green, tests green, docs + changelog updated, committed,+pushed.diff --git a/prompts/x402-catalog/11-speech-package.md b/prompts/x402-catalog/11-speech-package.mdnew file mode 100644index 000000000..ddf856802--- /dev/null+++ b/prompts/x402-catalog/11-speech-package.md@@ -0,0 +1,60 @@+# 11 — Speech package: ASR + TTS as products (`/api/v1/ai/asr`, `/api/v1/ai/tts`)++Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish+100%, never ask questions.++## Mission++three.ws already runs NVIDIA NIM speech lanes (`api/_lib/asr-nvidia.js`,+`api/_lib/tts-nvidia.js`, routes `api/asr.js`, `api/tts/speak.js`, `api/tts/voices.js`) but+they exist as internal avatar plumbing. Productize them: versioned `/api/v1/ai/*` endpoints+with a free quota and x402 above it, listed on the bazaar with real descriptions. Nobody else+in the x402 ecosystem sells speech — this is a differentiated listing.++## Context++- Read the four files above end to end first: what the NIM lanes accept (audio formats, size+ caps, voices), which env vars gate them (NVIDIA key names), current error behavior.+- Versioned native routes → `api/v1/ai/asr.js` and `api/v1/ai/tts.js`, registered in+ `api/v1/_catalog.js` (read its entry contract). Match the handler style of existing v1+ routes (`wrap`/`json`/`error` from `api/_lib/http.js`).+- Paid lane: the platform's x402 rail (`paidEndpoint` from `api/_lib/x402-paid-endpoint.js`,+ `declareHttpDiscovery`/`THREEWS_SERVICE` from `api/_lib/x402/bazaar-helpers.js`,+ `priceFor` from `api/_lib/x402-prices.js`). Read `api/x402/tutor.js` as a compact example of+ a paid POST endpoint.+- The NIM lanes cost us real GPU quota — free tier must be tight: suggested+ ASR 5/day per IP (≤60s audio), TTS 10/day per IP (≤500 chars). x402 price above quota:+ ASR `'10000'` ($0.01) per clip, TTS `'5000'` ($0.005) per call (env-overridable via+ `priceFor` slugs `ai-asr` / `ai-tts`).++## Tasks++1. **TTS endpoint.** `POST /api/v1/ai/tts` `{ text, voice? }` → audio (respect however+ `api/tts/speak.js` returns audio today — content-type, encoding; reuse its lane code via a+ shared module, never duplicate). `GET /api/v1/ai/tts?voices=1` (or a `/voices` sibling —+ pick what fits the routing) lists voices free, reusing `api/tts/voices.js` internals.+2. **ASR endpoint.** `POST /api/v1/ai/asr` accepting what the existing lane accepts (read+ `api/asr.js` — likely base64 or multipart audio) → `{ text, confidence?, duration? }`.+3. **Free quota + x402.** Per-IP daily quotas as above (reuse `api/_lib/rate-limit.js` or the+ platform's daily-quota mechanism — find what exists, e.g. in `api/_lib/usage.js`). Above+ quota: the x402 402 challenge with bazaar discovery declared, so both endpoints appear on+ x402scan with REAL descriptions whose first sentence answers "what can I only get here":+ e.g. "Speech-to-text for agents over x402 — the only ASR lane in the x402 ecosystem; pay+ $0.01 USDC per clip, no API key, no account."+4. **Env gating.** Missing NVIDIA env → 503 `not_configured` naming the exact env var (never a+ 500, never a fake response). Add both lanes to whatever health surface exists+ (`api/healthz.js` or `api/_lib/forge-lane-health.js` pattern — read and match).+5. **Tests** in `tests/api/v1-ai-speech.test.js`: routing + validation (bad body 400, oversize+ 413/400 with clear message), quota fall-through to 402, missing-env 503, catalog entries+ present. Mock nothing of OUR code — fixture the NIM boundary with captured real response+ shapes. Targeted vitest until green. Also run `npm run audit:x402-catalog`.+6. **Docs:** `docs/api-reference.md` section for `/api/v1/ai/*` (runnable curls). Changelog+ entry (`feature`): speech-to-text and text-to-speech for agents, free daily quota, USDC+ above it.+7. Commit (explicit paths) and push per 00-CONTEXT.++## Definition of done++Both speech endpoints live with free quota → x402 fall-through, bazaar-discoverable with+uniqueness-first descriptions, env-gated honestly, tests + audit green, docs + changelog+updated, committed, pushed.diff --git a/prompts/x402-catalog/12-image-gen-package.md b/prompts/x402-catalog/12-image-gen-package.mdnew file mode 100644index 000000000..7678ea947--- /dev/null+++ b/prompts/x402-catalog/12-image-gen-package.md@@ -0,0 +1,61 @@+# 12 — Image generation package (`/api/v1/ai/image`)++Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish+100%, never ask questions.++## Mission++Productize the platform's text→image lanes as `POST /api/v1/ai/image`: free daily quota, x402+above it, bazaar-listed. The lanes exist (`api/_mcp3d/text-to-image.js` routes across NIM and+the GCP Vertex/Gemini image lane in `api/_mcp3d/vertex-imagen.js`) but are buried inside MCP+tool plumbing.++## Context++- **The working tree may contain uncommitted, in-flight changes to+ `api/_mcp3d/text-to-image.js` and the Vertex lane** (a GCP-credits campaign runs in+ parallel; recent commits added explicit lane control + provider logging). `git status` and+ `git log --oneline -5 -- api/_mcp3d/` first, read the CURRENT state, and build on top of it.+ Do not revert or fight anything you find; do not commit files you didn't change.+- Read `api/_mcp3d/text-to-image.js` fully: which providers it routes (NIM model(s),+ `vertex-imagen.js` — note Vertex `:predict` for Imagen was retired; the image lane targets+ `gemini-2.5-flash-image`), which env vars select the lane, what it returns (bytes? URL? R2+ upload?).+- **Env reality:** the GCP lane env vars (`GCP_SERVICE_ACCOUNT_JSON`, `GOOGLE_CLOUD_PROJECT`,+ `GOOGLE_CLOUD_LOCATION`) are NOT yet set in Vercel. Your endpoint must work the moment they+ land and degrade honestly until then: if no image lane is configured at all → 503+ `not_configured` naming the env vars; if one lane works → use it.+- Versioned native route → `api/v1/ai/image.js`, registered in `api/v1/_catalog.js`. Paid lane+ via `paidEndpoint` + `declareHttpDiscovery` + `priceFor` (slug `ai-image`) — read+ `api/x402/tutor.js` for the compact paid-POST pattern.+- Pricing suggestion: free 5 images/day per IP; x402 `'20000'` ($0.02) per image above quota.++## Tasks++1. `POST /api/v1/ai/image` `{ prompt, aspect_ratio?, seed? }` → `{ url, provider, width,+ height }` (persist output wherever the existing lane persists — R2/CDN; read how+ `text-to-image.js` callers store results and reuse that path; if the lane returns raw+ bytes, upload via the platform's existing object-storage helper — find it, e.g.+ `api/cdn-object.js` or what forge uses in `api/_lib/forge-store.js`).+2. Free quota → x402 fall-through as specified; bazaar description with uniqueness first:+ "Text-to-image for agents over x402 — pay $0.02 USDC per image, no API key, no account;+ runs on NVIDIA NIM / Google Vertex lanes."+3. Lane health: add an `/api/v1/ai/image?health=1` (or match the platform's existing lane+ health pattern — see `api/_lib/forge-lane-health.js` and `api/granite-health.js`) that+ reports per-lane configured/reachable without burning quota.+4. Content boundaries: reject empty/oversized prompts (400) and pass provider safety refusals+ through as 422 with the provider's reason — never retry-loop a refusal.+5. **Tests** in `tests/api/v1-ai-image.test.js`: validation, quota fall-through to 402,+ no-lane 503 naming env vars, provider-refusal 422, catalog entry present — provider+ boundary fixture-backed with real captured shapes. Targeted vitest until green. Run+ `npm run audit:x402-catalog`.+6. **Docs:** `docs/api-reference.md` section (runnable curl). Changelog entry (`feature`).+7. Commit ONLY your files (explicit paths — the in-flight `_mcp3d` files belong to another+ agent unless you had to modify them; if you did modify shared files, say so in your report)+ and push per 00-CONTEXT.++## Definition of done++Image endpoint live end-to-end on whichever lane is configured, honest 503 until env lands,+health probe real, bazaar-discoverable, tests + audit green, docs + changelog updated,+committed, pushed.diff --git a/prompts/x402-catalog/13-free-3d-lane-productization.md b/prompts/x402-catalog/13-free-3d-lane-productization.mdnew file mode 100644index 000000000..bdb6d3818--- /dev/null+++ b/prompts/x402-catalog/13-free-3d-lane-productization.md@@ -0,0 +1,54 @@+# 13 — Productize the free text→3D lane (`/api/v1/ai/text-to-3d`)++Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish+100%, never ask questions.++## Mission++three.ws runs the ONLY text→3D lane in the x402/MCP ecosystem, and its draft tier is free+(NVIDIA NIM TRELLIS — the `forge_free` MCP tool and `api/nim-forge.js` / `api/forge-nim.js`).+But as an HTTP product it's invisible: buried under forge job plumbing with no clean versioned+route. Ship `POST /api/v1/ai/text-to-3d` — the flagship free endpoint of the AI package.++## Context++- Read first: `api/nim-forge.js`, `api/forge-nim.js`, the `forge_free` MCP tool implementation+ (grep `forge_free` under `api/_mcp3d/`), `api/_lib/forge-tiers.js` (NOTE: has uncommitted+ in-flight changes from a parallel campaign — read current state, build on it, don't fight+ it), `api/_lib/forge-job-token.js`, `api/_lib/forge-store.js`. Understand: how a draft job+ is submitted, whether drafts finish inline or need polling, where the GLB lands (URL), and+ the viewer link format.+- Versioned native route → `api/v1/ai/text-to-3d.js`, registered in `api/v1/_catalog.js`.+ Reuse the existing lane modules — zero duplicated generation logic.+- This endpoint is FREE with a per-IP quota (suggested 10/day — GPU quota is real). Above+ quota, do NOT paywall it silently: return 429 with reset time AND a pointer to the paid+ `/api/x402/forge` tiers for higher quality/volume. (The paid forge remains the upsell; this+ free lane is the funnel.)++## Tasks++1. `POST /api/v1/ai/text-to-3d` `{ prompt }` →+ `{ status: 'done'|'pending', glb_url?, viewer_url?, job? }` mirroring the existing draft+ lane semantics (inline finish when fast; otherwise return the job token + the existing free+ poll URL `GET /api/forge?job=<id>` — reuse, don't rebuild polling).+2. Per-IP daily quota (10/day) via the platform's quota mechanism; 429 with+ `X-RateLimit-Reset` + upsell pointer as above. Missing NVIDIA env → 503 `not_configured`+ naming the var.+3. Register in `api/v1/_catalog.js` with a summary whose first sentence answers uniqueness:+ "Free text→3D — the only text-to-mesh lane in the agent-payments ecosystem; textured GLB+ from a prompt, no key, no wallet."+4. **Generate one real model end-to-end** as verification (prompt: "a small ceramic robot+ figurine"), confirm the GLB URL serves binary glTF (check magic bytes `glTF`) and the+ viewer link renders. Record the URLs in your report.+5. **Tests** in `tests/api/v1-text-to-3d.test.js`: validation (empty prompt 400), quota 429+ shape, missing-env 503, response contract for inline-done and pending paths (lane boundary+ fixture-backed with real captured shapes). Targeted vitest until green.+6. **Docs:** `docs/api-reference.md` entry (runnable curl). Changelog entry (`feature`),+ holder-readable: free text→3D now has a first-class API endpoint.+7. Commit (explicit paths; don't commit the in-flight `forge-tiers.js` changes unless you+ authored changes in it — report if you did) and push per 00-CONTEXT.++## Definition of done++Endpoint live, one real GLB generated and verified end-to-end, quota honest with paid upsell,+tests green, catalog + docs + changelog updated, committed, pushed.diff --git a/prompts/x402-catalog/14-pipeline-x402-products.md b/prompts/x402-catalog/14-pipeline-x402-products.mdnew file mode 100644index 000000000..065caa36e--- /dev/null+++ b/prompts/x402-catalog/14-pipeline-x402-products.md@@ -0,0 +1,65 @@+# 14 — 3D pipeline stages as individually-priced x402 products++Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish+100%, never ask questions.++## Mission++The repo holds a full 3D asset pipeline nobody else in the x402 ecosystem has — rigging,+animation retargeting, remeshing, game-ready conversion, stylization, background removal —+but only generation (forge) is sold. Wrap each working stage as its own x402 resource with an+honest description, so the catalog reads as a coherent "3D Asset Pipeline API".++## Context++- Candidate stage routes — READ EACH ONE FIRST and triage (works end-to-end? env-gated?+ half-built?): `api/forge-remesh.js`, `api/forge-gameready.js`, `api/forge-stylize.js`,+ `api/forge-rembg.js`, `api/forge-segment.js`, `api/forge-motion.js`, plus rigging — find the+ `rig_mesh` MCP tool implementation (grep under `api/_mcp3d/`) and the retarget machinery+ (`src/animation-retarget.js` is client-side; check for a server-side rig/animate lane).+ **Only productize stages that actually work.** A stage that is broken or env-dead gets fixed+ if the fix is contained, or excluded with a written reason in your report — never listed+ broken.+- x402 pattern: read `api/x402/model-check.js` (a working GET stage on a model URL) as the+ template — `paidEndpoint`, `buildBazaarSchema`, `declareHttpDiscovery` + `THREEWS_SERVICE`,+ `priceFor`, `installAccessControl` (all under `api/_lib/`).+- New paid routes live under `api/x402/` with kebab-case slugs: `pipeline-rig`,+ `pipeline-remesh`, `pipeline-gameready`, `pipeline-stylize`, `pipeline-rembg` (skip+ `segment`/`motion` unless triage shows them solid). Input contract: a `glb_url` (or+ image URL for rembg) + stage-specific options; output: the processed asset persisted the+ same way forge persists (see `api/_lib/forge-store.js`) and returned as a URL. Never inline+ multi-MB binaries in JSON.+- Suggested prices (env-overridable): rig `'50000'` ($0.05), remesh/gameready/stylize+ `'30000'` ($0.03), rembg `'10000'` ($0.01).+- Descriptions: first sentence answers "what can I only get here", states input → output ++ price plainly. No "bullish signal" decoration, no fluff.++## Tasks++1. Triage every candidate stage (read + one real local invocation each where feasible). Write+ the works/fixed/excluded table for your report.+2. Implement the x402 wrapper route for each surviving stage, reusing the stage's existing+ module (extract shared logic into `api/_lib/` if it's currently inline in a handler — both+ routes keep working).+3. Verify one REAL end-to-end call per shipped stage: take a real GLB (generate one via the+ free NIM lane or use a small committed test asset if `tests/` has one), run the stage, open+ the output URL, confirm it's a valid GLB (magic bytes) and the transformation actually+ happened (e.g. triangle count dropped for remesh — `api/x402/model-check.js` internals can+ verify). Record evidence in your report.+4. Handler-throws-before-settlement rule: any upstream/env failure must throw BEFORE+ settlement so buyers are never charged for a failed stage (the `paidEndpoint` rail handles+ this if you don't catch-and-continue — don't).+5. **Tests** in `tests/api/x402-pipeline-stages.test.js`: per stage — input validation (bad+ URL 400, non-GLB 415/400), discovery schema present, price resolution via `priceFor`.+ Stage-lane boundaries fixture-backed with real captured shapes. Targeted vitest until+ green. Run `npm run audit:x402-catalog`.+6. **Docs:** new `docs/3d-pipeline.md` (linked from `docs/start-here.md`): the pipeline story+ (generate → rig → animate → optimize → deliver), each stage with a runnable curl + price.+ Changelog entry (`feature`): the 3D pipeline is now purchasable stage-by-stage.+7. Commit (explicit paths) and push per 00-CONTEXT.++## Definition of done++Every working stage is a priced, discoverable x402 resource verified with a real end-to-end+call; broken stages fixed or excluded with reasons; tests + audit green; pipeline doc ++changelog shipped; committed, pushed.diff --git a/prompts/x402-catalog/15-pipeline-orchestrator.md b/prompts/x402-catalog/15-pipeline-orchestrator.mdnew file mode 100644index 000000000..e07d9e3f3--- /dev/null+++ b/prompts/x402-catalog/15-pipeline-orchestrator.md@@ -0,0 +1,70 @@+# 15 — Pipeline orchestrator: one paid call, full asset pipeline++Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish+100%, never ask questions.++## Mission++Ship `POST /api/x402/pipeline` — one x402 call that runs a requested chain of pipeline stages+(generate → rig → optimize → …) as a single job with one price, returning a job token the+caller polls free. This is the "asset factory" call: an agent describes what it wants and gets+back a game-ready asset.++## Context++- Job infrastructure exists — reuse it, don't rebuild: `api/_lib/forge-job-token.js` (signed+ job tokens), `api/_lib/forge-store.js` (persistence), the free poll route `GET+ /api/forge?job=<id>` (read `api/forge.js` to see how status/result polling works today), and+ `api/_lib/forge-events.js`.+- Stage implementations: whatever exists at the time you run. Discover them at runtime by+ reading the modules directly — generation (`api/nim-forge.js` / forge lanes), rigging+ (`rig_mesh` MCP tool internals under `api/_mcp3d/`), optimization/remesh/gameready/stylize+ (`api/forge-*.js`). **This prompt must not depend on prompt 14 having run** — call the+ underlying stage modules, not the x402 wrapper routes.+- x402 pattern: `paidEndpoint`/`buildBazaarSchema`/`declareHttpDiscovery`/`priceFor` — read+ `api/x402/forge.js` end to end first; it already does paid-job-submit + free-poll and is+ your closest template.+- Pricing: per-stage price table inside the route (env-overridable via `priceFor` slugs like+ `pipeline-stage-rig`); the quoted job price = sum of requested stages. The 402 challenge+ must quote the exact total for the requested chain.++## Tasks++1. Request contract:+ `{ stages: [...], prompt?, glb_url?, options?: { per-stage } }` where `stages` is an+ ordered subset of `['generate','rig','remesh','gameready','stylize']`. Validate hard:+ `generate` requires `prompt` and must be first; without `generate`, `glb_url` is required;+ reject unknown stages/invalid orders with a 400 explaining the valid grammar. Only offer+ stages whose backing module you verified working (triage like prompt 14; exclude broken+ ones from the grammar and say so in the description).+2. Execution: on settlement, enqueue/run the chain (mirror how `api/x402/forge.js` handles+ async work on Vercel — if it runs work inline/deferred, follow the same mechanism).+ Persist per-stage progress into the job record: `stages: [{ id, status, started_at,+ finished_at, output_url?, error? }]` so polling shows WHERE the job is.+3. Failure semantics: a stage failure marks the job `failed` at that stage with the completed+ stages' outputs still available in the result (partial value delivered, honestly labeled).+ Anything that can be validated pre-settlement (inputs, lane env availability) throws+ BEFORE payment settles.+4. Poll path: reuse the existing free forge poll route — extend its job-shape handling if the+ pipeline record differs (keep backward compatibility for plain forge jobs; existing tests+ must stay green).+5. Bazaar description, uniqueness first: "One call, full 3D asset pipeline — text or GLB in,+ rigged/optimized game-ready GLB out; the only asset pipeline in the x402 ecosystem. Priced+ per stage, quoted exactly in the 402 challenge."+6. **Verify one real end-to-end job**: `stages: ['generate','rig']` (or the cheapest working+ pair), poll to completion, download the final GLB, confirm magic bytes + rig present+ (inspect for skinned mesh / bones — `api/x402/model-check.js` internals report skeleton+ stats). Record evidence in your report.+7. **Tests** in `tests/api/x402-pipeline.test.js`: grammar validation matrix, price quoting+ per chain, per-stage progress shape, partial-failure semantics, poll compatibility.+ Stage-module boundaries fixture-backed. Targeted vitest + `npm run audit:x402-catalog`+ until green.+8. **Docs:** section in `docs/3d-pipeline.md` if it exists, else `docs/api-reference.md` —+ the chain grammar, one runnable example, pricing. Changelog entry (`feature`).+9. Commit (explicit paths) and push per 00-CONTEXT.++## Definition of done++One paid call runs a validated stage chain to a real verified GLB with per-stage progress,+exact price quoting, honest partial-failure semantics, tests + audit green, docs + changelog+shipped, committed, pushed.diff --git a/prompts/x402-catalog/16-embodiment-endpoint.md b/prompts/x402-catalog/16-embodiment-endpoint.mdnew file mode 100644index 000000000..733187cb5--- /dev/null+++ b/prompts/x402-catalog/16-embodiment-endpoint.md@@ -0,0 +1,72 @@+# 16 — Embodiment: `POST /api/x402/embody` — an agent buys itself a body++Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish+100%, never ask questions.++## Mission++The company thesis — give every AI agent a 3D body — is absent from the x402 catalog. Ship one+paid call: agent description (or selfie URL) in → rigged 3D avatar + voice + one-tag embed+snippet out. An external agent on any framework pays ~$1 USDC and gets an embeddable, animated,+talking presence. This is the flagship listing.++## Context++All the parts exist; this prompt wires them into one purchasable call. Spend real time on+discovery before writing code — read, in order:+- **Avatar generation:** the `forge_avatar` MCP tool implementation (grep under `api/_mcp3d/`)+ — it already chains mesh generation + auto-rigging with a humanoid gate. Also+ `text_to_avatar`. Reuse whichever chain is solid; note its latency profile (job-based?).+- **Agent records:** `api/agents.js` + `api/agents/` — how a three.ws agent is created/stored+ (id, name, personality, model GLB, voice). The embody call should create a real agent record+ so the result plugs into everything agents already get (profile page, chat, embed).+- **Embed:** the one-tag embed surface — `api/embed/`, `public/`/`src/` embed widget code, and+ how existing agent embeds are generated (grep for the embed snippet template / `<script`+ tag with an agent id). `tests/api/agents-embed.test.js` exists — read it.+- **Voice:** how agents get a TTS voice today (`api/tts/voices.js`, agent record fields,+ `tests/api/agents-voice.test.js`).+- **x402 job pattern:** `api/x402/forge.js` (paid submit + free poll via+ `api/_lib/forge-job-token.js`). Avatar generation is slow — embody MUST be job-based:+ paid submit returns a job token; free polling returns progress then the final bundle.++## Tasks++1. Contract: `POST /api/x402/embody`+ `{ name, prompt?, image_url?, personality?, voice? }` — exactly one of `prompt`/`image_url`+ required; `name` required (≤64 chars); `voice` optional (validate against the real voice+ list; default sensibly). 400s with precise messages.+2. On settlement: run the avatar chain (reuse `forge_avatar` internals — humanoid gate+ included; a non-humanoid result follows the platform's existing fallback semantics, never a+ T-pose), create the agent record with the generated GLB + personality + voice, produce the+ embed snippet.+3. Final job result:+ `{ agent_id, glb_url, viewer_url, profile_url, embed_html, voice, chat_url }` — every URL+ must actually resolve (verify in your end-to-end test). `embed_html` is the real one-tag+ embed other agent embeds use.+4. Price: `priceFor('embody', '1000000')` ($1.00). Bazaar description, uniqueness first:+ "Give your agent a 3D body — one x402 call returns a rigged, animated, talking avatar plus+ a one-tag embed for any website. The only embodiment endpoint in the x402 ecosystem.+ $1 USDC, no account."+5. Anything validatable pre-settlement (inputs, lane env, voice id) throws BEFORE payment;+ post-settlement chain failures mark the job failed with a clear stage + reason (and note in+ the description that generation failures are re-runnable via the returned job semantics —+ match whatever retry story forge jobs already have).+6. **Verify one real end-to-end embody**: run the chain (bypass payment the same way existing+ x402 tests/dev flows do — find the dev/test settlement path in `api/_lib/+ x402-paid-endpoint.js` or existing tests), poll to done, open every returned URL, load the+ embed snippet on a blank local page (`npm run dev`) and confirm the avatar renders and+ idles. Record evidence (URLs, agent id) in your report.+7. **Tests** in `tests/api/x402-embody.test.js`: validation matrix, job lifecycle shape,+ agent-record creation, embed snippet correctness (matches the real embed template), voice+ validation. Chain boundaries fixture-backed with real captured shapes. Targeted vitest ++ `npm run audit:x402-catalog` until green.+8. **Docs:** `docs/embody.md` linked from `docs/start-here.md` — the story, the contract, one+ runnable example, what the buyer gets. Changelog entry (`feature`), holder-readable: agents+ can now buy themselves a 3D body in one call.+9. Commit (explicit paths) and push per 00-CONTEXT.++## Definition of done++One paid call produces a real agent with a rendering, embeddable, voiced avatar — verified+end-to-end in a browser; every returned URL live; tests + audit green; docs + changelog+shipped; committed, pushed.diff --git a/prompts/x402-catalog/17-x402-dev-toolkit.md b/prompts/x402-catalog/17-x402-dev-toolkit.mdnew file mode 100644index 000000000..86a7d7d9b--- /dev/null+++ b/prompts/x402-catalog/17-x402-dev-toolkit.md@@ -0,0 +1,63 @@+# 17 — x402 developer toolkit: echo, debugger, receipt verifier++Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish+100%, never ask questions.++## Mission++Make three.ws the test bench every x402 developer uses. Three free tools — a payment echo, a+402-exchange debugger, and an attestation/receipt verifier — plus one docs page consolidating+the half-hidden dev endpoints that already exist (`schema-check`, `rate-limit-probe`,+`permit2-paid-demo`). Every developer who tests against us discovers the paid catalog. This is+the cheapest distribution we can buy.++## Context++- Read first: `api/x402/schema-check.js`, `api/x402/rate-limit-probe.js`,+ `api/x402/permit2-paid-demo.js` (what they already cover — don't duplicate),+ `api/_lib/x402-paid-endpoint.js` (the settlement rail and how a payment envelope is parsed/+ verified), `api/_lib/x402-spec.js` (schema builders/validators), and the attestation scheme+ used by fact-check/tutor (grep `attestation` / `sha-256` under `api/x402/` and `api/_lib/`).+- The platform also runs a facilitator (`api/x402-facilitator/`) — the debugger should reuse+ its verification primitives rather than re-implementing signature checks.+- All three new tools are FREE and must be bazaar-discoverable (facilitators index free+ resources too — see how `dance-tip` declares Free, and how `declareHttpDiscovery` ++ `THREEWS_SERVICE` work in `api/_lib/x402/bazaar-helpers.js`). Rate limit each per-IP+ (30/min) — free ≠ abusable.++## Tasks++1. **Echo** — `POST /api/x402/echo`: returns exactly what the caller's request looked like+ from a server's perspective: method, relevant headers (payment header parsed if present —+ decoded envelope with signature fields REDACTED to prefixes), body, and — when a payment+ payload is present — the rail's verification verdict (valid/invalid + why) WITHOUT+ settling. This is "httpbin for x402".+2. **Debugger** — `POST /api/x402/debug`: caller pastes a JSON blob of their failed exchange+ (`{ challenge?, payment?, response? }` — any subset) and gets a structured diagnosis:+ schema problems (via `x402-spec` validators), network/chain mismatches, amount mismatches,+ expiry issues, common footguns (wrong `x402Version`, base-vs-solana confusion, atomics vs+ decimal). Diagnosis list format: `[{ severity, field, problem, fix }]`. Cover at minimum+ the failure modes our own rail can produce — enumerate them from+ `x402-paid-endpoint.js`'s error paths.+3. **Receipt verifier** — `GET/POST /api/x402/verify-receipt`: given an attestation object+ from any three.ws paid response (fact-check/tutor style SHA-256 attestations), recompute+ and confirm/deny integrity; given a settlement tx reference, check it on the right chain+ (reuse facilitator/x402 lib primitives). Response says exactly what was and wasn't+ verifiable.+4. All three: precise 400s on malformed input, free-tier rate limit, bazaar discovery with+ descriptions whose first sentence targets developers ("Debug your x402 integration+ against a live server — free").+5. **Tests** in `tests/api/x402-dev-toolkit.test.js`: echo redaction (no full signatures in+ output — assert), debugger diagnosis matrix (feed it real captured malformed exchanges —+ generate them by calling our own rail wrongly in the test), receipt verifier+ confirm/deny/partial cases. Targeted vitest + `npm run audit:x402-catalog` until green.+6. **Docs:** new `docs/x402-dev-tools.md` linked from `docs/start-here.md` — all SIX dev+ tools (three new + schema-check + rate-limit-probe + permit2-paid-demo), each with a+ runnable curl and what it's for. Changelog entry (`feature`): free x402 developer toolkit.+7. Commit (explicit paths) and push per 00-CONTEXT.++## Definition of done++Three free dev tools live and discoverable, signatures never echoed whole, diagnosis covers+our rail's real failure modes, docs page unifies all six tools, tests + audit green, changelog+shipped, committed, pushed.diff --git a/prompts/x402-catalog/18-storefront-cleanup.md b/prompts/x402-catalog/18-storefront-cleanup.mdnew file mode 100644index 000000000..abf023621--- /dev/null+++ b/prompts/x402-catalog/18-storefront-cleanup.md@@ -0,0 +1,72 @@+# 18 — Storefront cleanup: delist demos, kill dead weight, rewrite every description++Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish+100%, never ask questions.++## Mission++The x402scan listing currently mixes three real products with fourteen demos and wrappers,+and the junk destroys trust in the whole server. Delist the internal demos (they keep working+for their pages), remove the endpoints with no honest buyer, and rewrite every surviving+description so its FIRST sentence answers "what can I get here that I can't get anywhere+else?" — owner-reviewed strategy, approved 2026-07-06.++## Context++- Discovery mechanics: `api/_lib/x402/bazaar-helpers.js` — `declareHttpDiscovery({...})`+ produces the bazaar extension; a resource with `discoverable: false` keeps settling payments+ but stops being indexed by facilitators. Read the helper to confirm the exact flag shape+ before using it.+- The catalog audit: `npm run audit:x402-catalog` — run it before AND after; it must be green+ after. Tests referencing endpoint descriptions live under `tests/` (grep each endpoint slug)+ and must be updated in the same change.+- Decisions (made by the owner — execute, don't relitigate):+ - **Delist (discoverable: false), keep functioning:** `dance-tip` (drives /club),+ `three-intel` (drives the /play kiosk), `crypto-intel` (drives /agent-exchange). Their+ pages must keep working exactly as before — verify each page's flow still calls its+ endpoint successfully.+ - **Remove entirely:** `api/insights/revenue-vision` and `api/x402/tutor.js` — delete the+ routes, their tests, and every reference (grep the slugs across the repo: docs, catalogs,+ SKU lists like `api/x402-skus.js`, MCP declarations). If something internal genuinely+ consumes tutor (grep first), delist instead of delete and say so in your report.+ - **Delist the paid `pump-agent-audit`** (a free whale surface replaces it in another+ prompt; the paid "oracle" framing is dishonest) — delist, don't delete.+ - **De-decorate:** `symbol-availability` — remove the fake "bullish/bearish oracle signal"+ field from response + description; it's a collision checker, sell it as exactly that.+ - **Keep + rewrite descriptions:** `forge`, `vanity` (+`vanity-premium`,+ `vanity-verifiable` if listed), `pump-launch`, `mint-to-mesh` + `mint-to-mesh-batch`,+ `model-check`, `mcp` (`POST /api/mcp`), `onchain-identity-verify`, `agent-reputation`,+ `skill-marketplace`, `fact-check`, `symbol-availability`.+- Description rules: first sentence = the uniqueness claim, concrete and true. Then input →+ output, price, chain(s). ≤ ~600 chars where the schema allows. No emoji, no hype adjectives,+ no "oracle" unless it reports real derived data. `skill-marketplace` currently ships an+ EMPTY description — read `api/x402/skill-marketplace.js`, understand what it actually does,+ and write the real one. `agent-reputation`'s description must state plainly that it scores+ three.ws-registered agents (scoping honesty).++## Tasks++1. Inventory: list every resource currently declaring bazaar discovery (grep+ `declareHttpDiscovery` / `declareMcpDiscovery` under `api/`). Produce the before-table for+ your report.+2. Apply the delistings, removals, and de-decoration above. For each delisted page-driving+ endpoint, exercise its page flow (`npm run dev`, drive /club tip, /play kiosk, or the+ page's API call path — or its existing test) and confirm unchanged behavior.+3. Rewrite all keeper descriptions per the rules; update the corresponding+ `buildBazaarSchema` metadata and tags (≤5 tags, ≤32 chars each) so tags reflect reality+ (`3d`, `solana`, `x402`, `dev-tools`, …).+4. Update every test that asserted old descriptions/fields; delete tests of removed routes.+5. Run `npm run audit:x402-catalog` + targeted vitest for every touched test file until+ green. Grep the removed slugs repo-wide — zero dangling references (docs, SKUs, catalogs,+ `data/pages.json` if any page linked them).+6. **Docs:** update `docs/api-reference.md` to drop removed endpoints and reflect new+ descriptions. Changelog entry (`improvement`), holder-readable: the x402 catalog was+ curated — every listed resource is now a real product with an honest description.+7. Commit (explicit paths — this touches many files; review `git diff --staged` line by line)+ and push per 00-CONTEXT.++## Definition of done++Catalog shows only honest, uniquely-valuable listings; demo pages still work; removed slugs+have zero dangling references; audit + tests green; docs + changelog updated; committed,+pushed.diff --git a/prompts/x402-catalog/19-vanity-instant-inventory.md b/prompts/x402-catalog/19-vanity-instant-inventory.mdnew file mode 100644index 000000000..0dadf56b4--- /dev/null+++ b/prompts/x402-catalog/19-vanity-instant-inventory.md@@ -0,0 +1,68 @@+# 19 — Instant vanity: serve pre-ground addresses from inventory++Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish+100%, never ask questions.++## Mission++The vanity grinder is one of the catalog's three real products, but grinding happens at+request time. An inventory of pre-ground addresses turns it into INSTANT delivery and unlocks+longer prefixes at premium prices, plus an upsell into pump-launch ("launch with a+`pump`-suffix mint, delivered in seconds").++## Context++- **In-flight work exists — build on it, don't duplicate it.** A parallel GCP-credits campaign+ includes vanity inventory: read `prompts/gcp-credits/06-vanity-inventory.md` (its plan) and+ the working tree's `api/_lib/vanity-inventory-store.js` (possibly uncommitted /+ half-complete — `git status`, `git log --oneline -3 -- api/_lib/vanity-inventory-store.js`).+ Whatever state you find is your starting point: complete the store if incomplete, then do+ the product wiring below. Do not fight or rewrite working in-flight code.+- Current product: `api/x402/vanity.js` (read fully — pricing tiers, keypair vs mnemonic+ formats, `sealTo` ECIES sealing, the never-stored guarantee), plus `api/x402/+ vanity-premium.js` and `api/x402/vanity-verifiable.js`.+- **Security invariants (non-negotiable):** inventory entries' secrets must be stored+ encrypted at rest (the store should already address this — verify; if it doesn't, encrypt+ with a server-side key from env before persisting), each entry is served EXACTLY ONCE+ (atomic claim — no double-sell under concurrent requests), and a served entry is deleted+ immediately. `sealTo` sealing must work for inventory-served results identically to+ ground-on-demand results. State plainly in the endpoint description that inventory+ addresses were pre-generated server-side and never re-served.+- Launch upsell: `api/x402/pump-launch.js` already supports vanity prefix/suffix grinding —+ read how, and route it through inventory when a matching entry exists.++## Tasks++1. Audit the store: schema, encryption at rest, atomic claim semantics. Complete/fix what's+ missing. Add a concurrency test proving no double-claim (two simultaneous claims of the+ last matching entry → exactly one wins).+2. Wire `api/x402/vanity.js`: on a paid request, check inventory for a matching+ prefix/suffix/format entry FIRST → instant delivery (claim + serve + delete); no match →+ grind as today. Response includes `source: 'inventory' | 'ground'` and honest timing.+3. Extend offered patterns: inventory makes longer prefixes viable (4–5 Base58 chars) at+ premium prices — add tiers priced meaningfully above the grind cap (e.g. 4 chars $2.50,+ 5 chars $10, env-overridable via `priceFor`), offered ONLY when inventory holds a match+ (the 402 quote for an unavailable pattern must say "not in stock — grindable range is …").+4. Inventory replenishment: a maintenance path that grinds ahead of demand — check what the+ gcp-credits campaign planned (GPU workers?) and wire the trigger the repo supports today+ (a `scripts/` grinder script + an `api/cron/` hook if a cron surface exists — read+ `api/cron/` to see the platform's pattern). No GitHub Actions.+5. Pump-launch upsell: when `pump-launch` gets vanity params, consult inventory first (shared+ claim path — same atomicity), fall back to grinding. Update its description to advertise+ instant vanity when in stock.+6. **Tests** in `tests/api/vanity-inventory.test.js`: claim atomicity (the concurrency test),+ serve-once + delete, seal-to on inventory results, source field, out-of-stock 402 quote+ messaging, pump-launch inventory path. Targeted vitest + `npm run audit:x402-catalog`+ until green.+7. **Docs:** update the vanity section of `docs/api-reference.md` (tiers table, instant vs+ ground). Changelog entry (`feature`): vanity addresses now deliver instantly from+ pre-ground inventory, with longer patterns available.+8. Commit (explicit paths; coordinate with in-flight files — if `vanity-inventory-store.js`+ was uncommitted when you started, committing your completed version of it is correct;+ note it in your report) and push per 00-CONTEXT.++## Definition of done++Inventory-backed instant delivery live with proven serve-once atomicity and encrypted-at-rest+secrets, premium long-pattern tiers quoted honestly, pump-launch upsell wired, replenishment+path real, tests + audit green, docs + changelog shipped, committed, pushed.diff --git a/prompts/x402-catalog/20-fact-check-v2.md b/prompts/x402-catalog/20-fact-check-v2.mdnew file mode 100644index 000000000..fa0a440c0--- /dev/null+++ b/prompts/x402-catalog/20-fact-check-v2.md@@ -0,0 +1,61 @@+# 20 — Fact-check v2: free sample lane + published accuracy benchmark++Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish+100%, never ask questions.++## Mission++Fact-check is one of the catalog's defensible products — sourced verdicts with SHA-256+attestations ARE useful to agents — but at $0.10 with zero proof of quality, nobody tries it.+Fix the funnel: a free sample lane, and a published accuracy benchmark that makes the quality+claim checkable instead of asserted.++## Context++- Read `api/x402/fact-check.js` end to end: the search + LLM analysis chain, verdict taxonomy+ (supported/contradicted/mixed/insufficient), authority weighting, strictness parameter,+ attestation scheme, cost breakdown, which env vars it needs.+- Free-lane mechanics: per-IP daily quota (suggested 3 free checks/day) via the platform's+ quota mechanism (`api/_lib/rate-limit.js` or the daily pattern used elsewhere — find it);+ above quota → the existing 402. Free-lane responses are complete real checks (same chain),+ marked `lane: 'free'` — never a degraded fake.+- Benchmark: a committed suite of claims with KNOWN verdicts, spanning all four verdict+ classes and difficulty levels. Claims must be time-stable (not "X is the current president"+ — verdicts that won't drift), non-partisan, and include crypto-domain claims where token+ references follow the $THREE rule (use $THREE or protocol-generic facts like "Solana uses+ proof of history", never third-party coin promotion).++## Tasks++1. **Free lane.** Implement the quota + fall-through on the existing route. The 402 for+ over-quota callers states the reset time and the paid price. Response schema gains `lane`.+2. **Benchmark suite.** `tests/fixtures/fact-check-benchmark.json`: ≥40 claims —+ 10 per verdict class — each `{ claim, expected_verdict, rationale, difficulty }`. Write+ them yourself with care; they are the product's quality bar.+3. **Benchmark runner.** `scripts/fact-check-benchmark.mjs`: runs the suite through the REAL+ chain (requires the env vars; exits with a clear message naming them if absent), scores+ accuracy overall + per class + per difficulty, writes+ `data/_generated/fact-check-benchmark.json` (score, per-class table, run date, chain+ config). Run it for real; if env is present, commit the genuine results. If the env+ genuinely isn't available locally, ship the runner + a `not yet run in this environment`+ state on the page (see next task) that renders honestly — never fabricate scores.+4. **Public accuracy page.** `/fact-check` page (follow the repo's page pattern; entry in+ `data/pages.json`; `npm run build:pages` green): what the service does, how the benchmark+ works (link the claims file — transparency is the point), latest scores from the generated+ JSON (designed empty state when unrun), a live "try one free check" box calling the real+ endpoint from the browser (loading/error/result states designed), and the x402 pricing.+5. **Description update.** Rewrite the bazaar description: first sentence = uniqueness+ ("Sourced fact-checking with cryptographic attestations — verdicts you can audit, with a+ published accuracy benchmark"), mention the free daily lane.+6. **Tests** in `tests/api/fact-check-v2.test.js`: quota fall-through, `lane` field, benchmark+ fixture schema validation (all classes covered, ≥40 entries), runner scoring math against+ a synthetic result set. Targeted vitest + `npm run audit:x402-catalog` until green.+7. **Docs:** update fact-check coverage in `docs/api-reference.md`. Changelog entry+ (`improvement`): fact-check now has a free daily lane and a public accuracy benchmark.+8. Commit (explicit paths) and push per 00-CONTEXT.++## Definition of done++Free lane real and quota'd, benchmark suite + runner shipped (real scores committed if env+allows; honest unrun state otherwise), `/fact-check` page live and browser-verified, rewritten+listing, tests + audit green, docs + changelog shipped, committed, pushed.diff --git a/prompts/x402-catalog/README.md b/prompts/x402-catalog/README.mdnew file mode 100644index 000000000..522b9de5c--- /dev/null+++ b/prompts/x402-catalog/README.md@@ -0,0 +1,56 @@+# x402 catalog rebuild — work orders++Owner mandate (2026-07-06): the x402scan listing ($5.87 volume / 10 buyers / 30 days) is mostly+internal demos wearing price tags. Rebuild it around two coherent products — **a free crypto+data API** and **the only 3D/GPU generation lane in the x402 ecosystem** — plus a curated set+of standalone tools.++## How to fire these++Each prompt is a **self-contained work order** designed to be pasted into a fresh Claude Code+session. Every one:+- starts by making the agent read `00-CONTEXT.md` (shared rules + platform facts),+- is independent — **no prompt requires another to have finished** (shared contracts like the+ `free` descriptor field are inert until the engine prompt lands, and dynamic surfaces render+ from whatever exists at runtime),+- is scoped small enough to be completed 100% in one session, with explicit tasks, a+ Definition of Done, and orders to never ask questions and to commit + push when done.++Fire them in any order. The suggested sequence below front-loads the funnel.++## Index++| # | Prompt | Ships | Track |+|---|--------|-------|-------|+| 01 | [free-tier-lane](01-free-tier-lane.md) | Genuine free lane (per-IP quota → 402) in the aggregator | Crypto API |+| 02 | [provider-dexscreener](02-provider-dexscreener.md) | DEX pairs/search/profiles for any token, free | Crypto API |+| 03 | [provider-jupiter](03-provider-jupiter.md) | Solana prices, executable swap quotes, token search | Crypto API |+| 04 | [provider-coingecko-defillama-expansion](04-provider-coingecko-defillama-expansion.md) | 2→7 CoinGecko + 2→5 DefiLlama endpoints, Llama prices/stablecoins | Crypto API |+| 05 | [provider-solana-reads](05-provider-solana-reads.md) | Balance/holdings/supply/holders/tx/fees as simple GETs | Crypto API |+| 06 | [pump-data-v1](06-pump-data-v1.md) | Free pump.fun trending/curve/search/launches/whales | Crypto API |+| 07 | [name-resolution-v1](07-name-resolution-v1.md) | Free ENS + SNS resolve endpoint | Crypto API |+| 08 | [sentiment-narrative-v1](08-sentiment-narrative-v1.md) | Existing v1 sentiment/intel routes hardened + freed | Crypto API |+| 09 | [crypto-api-docs-openapi](09-crypto-api-docs-openapi.md) | `/crypto-api` page, OpenAPI, docs — all registry-generated | Crypto API |+| 10 | [crypto-api-mcp-tools](10-crypto-api-mcp-tools.md) | `crypto_data` + `token_snapshot` MCP tools | Crypto API |+| 11 | [speech-package](11-speech-package.md) | ASR + TTS as free-quota/x402 products | AI package |+| 12 | [image-gen-package](12-image-gen-package.md) | Text→image endpoint over NIM/Vertex lanes | AI package |+| 13 | [free-3d-lane-productization](13-free-3d-lane-productization.md) | `POST /api/v1/ai/text-to-3d` — the flagship free endpoint | AI package |+| 14 | [pipeline-x402-products](14-pipeline-x402-products.md) | Rig/remesh/gameready/stylize/rembg as priced x402 stages | 3D pipeline |+| 15 | [pipeline-orchestrator](15-pipeline-orchestrator.md) | One paid call runs a full stage chain with per-stage progress | 3D pipeline |+| 16 | [embodiment-endpoint](16-embodiment-endpoint.md) | `POST /api/x402/embody` — an agent buys itself a body ($1) | 3D pipeline |+| 17 | [x402-dev-toolkit](17-x402-dev-toolkit.md) | Free echo / debugger / receipt verifier + dev docs page | Storefront |+| 18 | [storefront-cleanup](18-storefront-cleanup.md) | Delist demos, remove dead weight, rewrite every description | Storefront |+| 19 | [vanity-instant-inventory](19-vanity-instant-inventory.md) | Pre-ground inventory → instant delivery + premium tiers | Standalone |+| 20 | [fact-check-v2](20-fact-check-v2.md) | Free sample lane + published accuracy benchmark | Standalone |++## Suggested firing order++1. **Funnel first:** 01 → 02 → 03 → 04 → 05 → 06 → 07 → 08 (each is small; any order among+ 02–08 works)+2. **Storefront:** 09 → 10 → 17 → 18+3. **Products:** 11 → 12 → 13 → 14 → 15 → 16+4. **Standalone:** 19 → 20++Note: 02–05 all append to `api/v1/_providers.js`. They're order-independent, but fire them+**sequentially, not simultaneously** — concurrent edits to one file in a shared worktree will+collide.diff --git a/prompts/x402-overhaul/00-CONTEXT.md b/prompts/x402-overhaul/00-CONTEXT.mdnew file mode 100644index 000000000..fa36c4cc8--- /dev/null+++ b/prompts/x402-overhaul/00-CONTEXT.md@@ -0,0 +1,137 @@+# x402 Overhaul — Shared Context (READ FIRST, every prompt in this folder requires it)++You are rebuilding three.ws's paid-agent offering so it's something crypto users and their AI+agents **actually use**. This file is the single source of truth. It is static reference+written up-front — reading it is NOT a dependency on another agent's work. Every prompt in+this folder is **fully independent**: it can run in its own fresh chat, in any order, in+parallel with the others, and complete 100% on its own. Nothing here waits on another prompt.++---++## Why this exists (the standard every new endpoint must clear)++Our current x402 endpoints are a graveyard: 30 days of live data = **1.81K transactions,+$5.87 volume, 10 buyers.** They're novelties (`dance-tip`, `mint-to-mesh` cube), me-too LLM+wrappers (`fact-check`, `tutor`, `revenue-vision`), or crippled by being three.ws-only+(`agent-reputation`). Nobody pays for them because they don't answer a question an agent has+mid-task.++**The one test every endpoint you build must pass:** *Would an autonomous crypto agent,+in the middle of a real task, use this because it unblocks its goal?* If you can't name the+task and the agent, the endpoint is wrong — stop and rethink it before writing code.++**The strategy:** two free, genuinely-useful loss-leaders (a bundled **Crypto Data API** and+a free **3D API**) that drive adoption, funneling into a small set of paid uniques+(Forge Pro, Rigged Avatars, Pump Launcher, Vanity, cross-chain Trust). Out-usefulness the+competition; don't out-endpoint them. Three or four things people use beats seventeen nobody+does.++---++## The codebase map (so you never have to hunt)++### Paid endpoint pattern — `api/x402/<slug>.js`+Model any new PAID endpoint on `api/x402/three-intel.js` (clean, DexScreener-backed). Every+paid endpoint:+- imports `paidEndpoint` from `../_lib/x402-paid-endpoint.js` — runs the full 8-step dance+ (CORS → method → access-control → SIWX → 402 challenge → verify → handler → settle →+ `X-PAYMENT-RESPONSE`). You only write route metadata + a handler returning JSON.+- prices via `priceFor('<slug>', '<defaultAtomics>')` from `../_lib/x402-prices.js`. USDC has+ 6 decimals: `"1000"` = $0.001, `"10000"` = $0.01, `"100000"` = $0.10, `"1000000"` = $1.00.+ Ops can override with env `X402_PRICE_<SLUG>` (upper-snake of slug).+- networks default to Base mainnet; pass `networks: ['base','solana']` (and `'bsc'`) to+ advertise more. payTo comes from `env.X402_PAY_TO_BASE` / `_SOLANA` / `_BSC`.+- MUST export bazaar discovery metadata (`BAZAAR` object: description, INPUT_SCHEMA,+ OUTPUT_SCHEMA) via `buildBazaarSchema` + `withService` from `../_lib/x402/bazaar-helpers.js`.+ Without a valid discovery extension, agentic.market / x402scan **reject** the entry.++### Free endpoint pattern — `api/<namespace>/<slug>.js`+Free endpoints do NOT use `paidEndpoint`. Use the plain-handler pattern: `cors`, `wrap`,+`error` from `../_lib/http.js`, and rate-limit with `clientIp` + `limits` from+`../_lib/rate-limit.js`. Keyless, no account. Model on any existing plain `api/*.js` route+(e.g. `api/solana-rpc.js`, `api/feed.js`). See each free prompt for its exact namespace.++### How a route appears on x402scan (paid only)+`.well-known/x402.json` is served by `api/wk.js` (name `x402-discovery`). It is a+**manually-mirrored** discovery doc — there are explicit per-route maps in `api/wk.js`+(search `'/api/x402/model-check':`). To publish a NEW paid route you (1) export its `BAZAAR`+block, (2) add its mirror block in `api/wk.js`, (3) run `node scripts/verify-x402-discovery.mjs`+until it passes (it flags any drift between the discovery doc and the live 402). Free+endpoints are discovered via their API index + docs page, not the x402 discovery doc.++### Catalog convention (avoids all cross-prompt file conflicts)+Where a prompt adds an entry to a shared catalog/index, it drops **its own file** in a+catalog directory that the index globs — never edits a shared list. Each prompt says exactly+which directory + filename to create. Because every prompt writes only its own new files+plus localized additions, parallel agents don't collide. (If you must touch a shared file+like `api/wk.js` or `data/changelog.json`, per CLAUDE.md: stage ONLY your explicit paths,+never `git add -A`, re-check `git status` right before commit, and if a concurrent commit+conflicts, re-apply only your hunk.)++### Real data sources (NO MOCKS — CLAUDE.md hard rule)+- **DexScreener** — price/liq/mcap/volume/24h. Public, **no key**. (`three-intel.js` uses it.)+- **Solana RPC** — `api/solana-rpc.js`, `api/_lib/solana/`. Public RPC, no key.+- **pump.fun** — `api/_lib/pump-launch-feed.js`, `pumpfun-ws-feed.js`, `pump-quote.js`,+ `pump-trending-score.js`, `pump-volume-anomaly.js`, `agent-pumpfun.js`. Public feeds.+- **Helius / Birdeye / GMGN** — `api/_lib/helius.js`, `birdeye.js`, `gmgn-feed.js`. These+ MAY need keys (check `api/_lib/env.js` for `HELIUS_*` / `BIRDEYE_*`). See "never blocked".+- **Token meta** — `token-metadata.js`, `solana-token-meta.js`, `token-market.js`, `sol-price.js`.+- **Balances** — `api/_lib/balances.js`.+- **Free 3D** — `api/forge-nim.js`, `api/nim-forge.js`, `api/forge.js`, `_lib/forge-job-token.js`.++---++## You are NEVER blocked — decision defaults (so you never stop to ask)++The owner is tired of agents stalling for input. For EVERY common stop-point, here is the+pre-authorized decision. Apply it and keep going. Do not end your turn with a question.++| Situation | Do this — do NOT ask |+|---|---|+| A data provider needs an API key that's absent in env | Degrade gracefully: return every field you can from the keyless sources (DexScreener + public Solana RPC + pump.fun public feeds). Never fail the whole call, never mock. Note the degraded field as `null` with a `source` note. (CLAUDE.md: ship working fallbacks.) |+| Paid endpoint needs a real payment to fully test | Free endpoints need no payment. For paid ones, test the handler function directly + assert the 402-challenge shape via the endpoint's exported metadata; full funded E2E is owned by the OKX stream's runbook, not you. Prove correctness without a live payment. |+| Commit references crypto (pump.fun, Solana tokens, DexScreener) | Pre-approved for THIS work: generic coin-agnostic plumbing where the mint is supplied at runtime is CLAUDE.md mechanical-exception #1, and `$THREE` is our own coin. In tests/fixtures use `$THREE` (CA `FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`) or a synthetic placeholder (`THREEsynthetic1111…`). Do NOT hardcode a real third-party mint in committed fixtures — use a placeholder. With that, commit freely; no owner ping needed. |+| Unsure what price to set | Use the default in your prompt's table. It's env-overridable later. Move on. |+| Unsure where a helper/pattern lives | It's in the codebase map above. If still unclear, grep; then model on `api/x402/three-intel.js` (paid) or `api/solana-rpc.js` (free). |+| A shared file conflicts with a concurrent agent | Re-run `git status`, re-apply only your hunk, stage your explicit paths, commit. Never revert their work. |+| Something feels out of scope for your prompt | Do exactly your prompt's scope, fully. Note the adjacent gap in your PROGRESS entry for another prompt. Don't half-do two things. |++If you hit a genuine blocker not covered here (rare), implement everything else 100% first,+then state the ONE specific blocker with exactly what's needed — never leave the rest unfinished.++---++## Definition-of-done template (every prompt inherits this)++- [ ] Feature built, wired, reachable; zero mocks/stubs/TODOs/commented-out code (CLAUDE.md).+- [ ] Every state handled: success, empty, error, bad input, rate-limited, upstream-down.+- [ ] Real data verified: hit the live endpoint, paste the real JSON response in your report.+- [ ] `npm test` green; new tests added following `tests/` conventions; output pasted.+- [ ] Docs: per CLAUDE.md — free/dev-facing capability → `docs/` + the API's docs page;+ new public page → `data/pages.json`; new surface → `STRUCTURE.md` row.+- [ ] `data/changelog.json` entry (holder-readable, correct tags) for anything user-visible.+- [ ] `git diff` self-reviewed line-by-line; committed with EXPLICIT paths (never `-A`);+ pushed to BOTH remotes (`git push threeD main` && `git push threews main` — threeD may+ fail "Repository not found"; report it, don't block).+- [ ] `npx vercel build` trap: if you ran it, check `head -1` of changed `api/*.js` for+ `__defProp`; recover with `git restore -- api/ public/`.+- [ ] Append a dated entry to `prompts/x402-overhaul/PROGRESS.md` (create if absent): what+ shipped, the live response you captured, adjacent gaps noticed.++## Anti-laziness gates (every prompt inherits these)++- "Returns 200" is not done. The response must be REAL, correct, and useful to the named+ agent use-case. Paste the proof.+- No endpoint ships without you having answered, in its docs: *which agent, doing what task,+ pays/uses this, and why they'd pick us.* If you can't, the endpoint is wrong.+- Free means free: keyless, no account, generous rate limit. Don't sneak a paywall or a+ required key into a "free" endpoint.+- Match the existing code's style, error handling, and naming. Read the neighbor file first.++## Dev commands+```+npm run dev # Vite, port 3000+npm test # test suite+node scripts/verify-x402-discovery.mjs # validates x402scan discovery doc (paid routes)+npm run build:pages # regenerates + validates changelog / pages+```diff --git a/prompts/x402-overhaul/01-crypto-token-snapshot.md b/prompts/x402-overhaul/01-crypto-token-snapshot.mdnew file mode 100644index 000000000..7503b5b56--- /dev/null+++ b/prompts/x402-overhaul/01-crypto-token-snapshot.md@@ -0,0 +1,47 @@+# 01 — Free Crypto Data API: Token Snapshot++Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.+Independent work order — completes fully on its own.++## Agent use-case (name it in the docs)+A trading/research agent has a token address and needs its current market state in one call+before deciding to buy, alert, or ignore. Today it has to juggle DexScreener + an RPC + a+price API. We give it one clean free call.++## Build — `GET /api/crypto/token`+- New file `api/crypto/token.js`, free plain-handler pattern (00-CONTEXT "Free endpoint+ pattern": `cors`/`wrap`/`error` from `_lib/http.js`, rate-limit via `clientIp`+`limits`).+- Input: `?address=<mint|pair|contract>&chain=<solana|base|...>` (chain optional; infer from+ address shape when omitted — Solana base58 vs 0x EVM).+- Data: DexScreener (keyless) for price/liq/mcap/volume/24h-change; `_lib/sol-price.js` /+ `_lib/token-market.js` / `_lib/token-metadata.js` to enrich name/symbol/decimals. Prefer+ keyless sources; enrich with Helius/Birdeye only if keys exist (else `null`, per+ "never blocked").+- Output (stable schema): `{ address, chain, name, symbol, priceUsd, change24h, marketCapUsd,+ liquidityUsd, volume24hUsd, fdvUsd, pairCreatedAt, dexId, url, ts, sources[] }`.+- Every field that couldn't be resolved = `null`, never omitted, never faked.++## Catalog registration+Drop `api/_lib/crypto-catalog/token.js` exporting `{ slug:'token', method:'GET',+path:'/api/crypto/token', title, summary, inputSchema, outputSchema, example }`. (The+`/api/crypto` index in prompt 10 globs this dir; if it doesn't exist yet, your file still+stands alone — no dependency.)++## States to handle+Unknown/invalid address → 400 with a clear message + example. Token found but thin data+(new launch, no pair) → 200 with the fields you have + the rest `null`. Upstream (DexScreener)+down → 200 from RPC/meta fallback where possible, else 503 with a retry hint. Rate-limited →+429. Never 500 on a well-formed request.++## Tests (`tests/`)+Schema shape always present; address-type inference (Solana vs EVM); graceful-degradation+path (simulate no key → keyless fields still return); use `$THREE` (CA in 00-CONTEXT) or a+synthetic mint in fixtures, never a real third-party mint.++## Definition of done+Inherit 00-CONTEXT's DoD + anti-laziness gates. Additionally:+- [ ] Live call against a real token (use `$THREE`) captured in PROGRESS.md with real JSON.+- [ ] Docs: add this endpoint to `docs/crypto-api.md` (create if absent; prompt 11 expands+ it — your section stands alone) with a runnable `curl` example and the named use-case.+- [ ] `data/changelog.json`: entry (tags: `feature`, `sdk`) — "Free crypto token snapshot API+ for AI agents".diff --git a/prompts/x402-overhaul/02-crypto-token-security.md b/prompts/x402-overhaul/02-crypto-token-security.mdnew file mode 100644index 000000000..71501f24d--- /dev/null+++ b/prompts/x402-overhaul/02-crypto-token-security.md@@ -0,0 +1,41 @@+# 02 — Free Crypto Data API: Token Security / Rug Signals++Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.+Independent work order — completes fully on its own.++## Agent use-case (name it in the docs)+Before an agent buys or LPs into a token, it needs a fast "is this a honeypot / rug?" read:+mint & freeze authority, LP status, top-holder concentration flag, tax/transfer restrictions.+This is the single most-requested pre-trade check in crypto agent workflows — and a free,+honest version is a magnet.++## Build — `GET /api/crypto/security`+- New file `api/crypto/security.js`, free plain-handler pattern (00-CONTEXT).+- Input: `?address=<mint>&chain=<solana|base>`.+- Solana: read mint account via `_lib/solana/*` / `api/solana-rpc.js` — mint authority,+ freeze authority, supply, decimals; `_lib/token-metadata.js` / `solana-token-meta.js` for+ metadata mutability. Pull LP/liquidity from DexScreener. Concentration from prompt-03's+ data source if a key exists, else a coarse keyless flag.+- Output: `{ address, chain, checks: { mintAuthorityRevoked, freezeAuthorityRevoked,+ metadataMutable, lpBurnedOrLocked, liquidityUsd, topHolderPctFlag }, riskLevel:+ 'low'|'medium'|'high'|'unknown', reasons[], ts, sources[] }`. `riskLevel` derived from the+ boolean checks with a documented, deterministic rule — NOT an LLM opinion.+- Be honest: unknowns are `unknown`/`null`, never guessed. Document the exact rule that maps+ checks → riskLevel in the docs.++## Catalog registration+Drop `api/_lib/crypto-catalog/security.js` (same entry shape as 00-CONTEXT / prompt 01).++## States+Invalid mint → 400. New token, no LP yet → 200 with `lpBurnedOrLocked:null`, riskLevel may be+`high`/`unknown` per rule. RPC down → 503 + retry hint. Never fabricate a "safe" verdict.++## Tests+Deterministic riskLevel rule (given checks → expected level); revoked vs live authority+parsing; keyless-only degradation. Fixtures use `$THREE` or synthetic mints.++## Definition of done+Inherit 00-CONTEXT DoD + gates. Plus:+- [ ] Live call on a real token captured in PROGRESS.md.+- [ ] `docs/crypto-api.md` section with the check list, the riskLevel rule, curl example, use-case.+- [ ] `data/changelog.json` (tags: `feature`,`security`) — "Free token safety / rug-signal API".diff --git a/prompts/x402-overhaul/03-crypto-token-holders.md b/prompts/x402-overhaul/03-crypto-token-holders.mdnew file mode 100644index 000000000..51266f4ff--- /dev/null+++ b/prompts/x402-overhaul/03-crypto-token-holders.md@@ -0,0 +1,35 @@+# 03 — Free Crypto Data API: Holders & Concentration++Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.+Independent work order — completes fully on its own.++## Agent use-case (name it in the docs)+An agent sizing a position needs holder distribution: how many holders, what % the top 10+hold, whether the dev/insiders still dominate. High concentration = exit risk. One free call.++## Build — `GET /api/crypto/holders`+- New file `api/crypto/holders.js`, free plain-handler pattern (00-CONTEXT).+- Input: `?address=<mint>&chain=<solana>&limit=<N default 10, max 50>`.+- Data: Helius / Birdeye (`_lib/helius.js`, `_lib/birdeye.js`) for holder lists if keys+ exist; otherwise derive top holders from Solana RPC `getTokenLargestAccounts` + supply+ (keyless) for a coarse-but-real top-N. Never mock — if only keyless is available, return+ the keyless truth and mark `source`.+- Output: `{ address, chain, holderCount, top: [{ owner, amount, pct }], top10Pct,+ concentration: 'low'|'medium'|'high'|'unknown', ts, sources[] }`. `concentration` from a+ documented threshold on `top10Pct`.++## Catalog registration+Drop `api/_lib/crypto-catalog/holders.js` (entry shape per 00-CONTEXT).++## States+Invalid mint → 400. Brand-new token → 200 with whatever holders exist. No key + RPC gives+only largest accounts → 200 with `holderCount:null`, top-N present, noted. Never 500.++## Tests+top10Pct math; concentration thresholds; keyless RPC fallback path. `$THREE`/synthetic fixtures.++## Definition of done+Inherit 00-CONTEXT DoD + gates. Plus:+- [ ] Live call captured in PROGRESS.md.+- [ ] `docs/crypto-api.md` section (thresholds documented) + curl + use-case.+- [ ] `data/changelog.json` (tags: `feature`) — "Free holder distribution / concentration API".diff --git a/prompts/x402-overhaul/04-crypto-pumpfun-launches.md b/prompts/x402-overhaul/04-crypto-pumpfun-launches.mdnew file mode 100644index 000000000..b54f8229d--- /dev/null+++ b/prompts/x402-overhaul/04-crypto-pumpfun-launches.md@@ -0,0 +1,40 @@+# 04 — Free Crypto Data API: Live pump.fun Launches++Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.+Independent work order — completes fully on its own.++## Agent use-case (name it in the docs)+A sniper/discovery agent wants the freshest pump.fun launches with enough signal to filter:+name, symbol, mint, age, current market cap, bonding-curve progress, dev wallet. A free live+feed is exactly what agents poll.++## Build — `GET /api/crypto/launches`+- New file `api/crypto/launches.js`, free plain-handler pattern (00-CONTEXT).+- Input: `?limit=<N default 20, max 100>&minMarketCap=<usd optional>&maxAgeMin=<optional>`.+- Data: reuse the existing pump.fun feed helpers — `_lib/pump-launch-feed.js`,+ `_lib/pumpfun-ws-feed.js`, `_lib/agent-pumpfun.js`, `_lib/pump-trending-score.js`. Do NOT+ build a new scraper; wrap what exists. If those helpers expose more than we surface, surface+ the useful fields.+- Output: `{ launches: [{ mint, name, symbol, createdAt, ageMinutes, marketCapUsd,+ bondingProgressPct, dev, url, imageUrl }], count, ts, source }`. Sorted newest first;+ respect filters.++## Catalog registration+Drop `api/_lib/crypto-catalog/launches.js` (entry shape per 00-CONTEXT).++## States+No launches match filter → 200 `{ launches: [], count: 0 }` with a note, not an error. Feed+source momentarily empty/down → 200 with last-known or empty + `source` note; never 500.+Cap limit at 100.++## Tests+Filter logic (minMarketCap, maxAgeMin, limit cap); field mapping from the feed helper;+empty-result shape. Use synthetic/`$THREE` fixtures — never commit a real third-party mint.++## Definition of done+Inherit 00-CONTEXT DoD + gates. Plus:+- [ ] Live call captured in PROGRESS.md (real recent launches).+- [ ] `docs/crypto-api.md` section + curl + use-case.+- [ ] `data/changelog.json` (tags: `feature`) — "Free live pump.fun launches feed for agents".+- [ ] Note in PROGRESS: this pairs with `/api/crypto/bonding` (05) and `/api/crypto/whales`+ (06) — cross-link them in docs if those pages exist.diff --git a/prompts/x402-overhaul/05-crypto-bonding-status.md b/prompts/x402-overhaul/05-crypto-bonding-status.mdnew file mode 100644index 000000000..5c5706ef0--- /dev/null+++ b/prompts/x402-overhaul/05-crypto-bonding-status.md@@ -0,0 +1,35 @@+# 05 — Free Crypto Data API: Bonding-Curve / Graduation Status++Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.+Independent work order — completes fully on its own.++## Agent use-case (name it in the docs)+An agent holding or watching a pump.fun token needs to know exactly where it is on the+bonding curve: % to graduation, SOL in curve, whether it has migrated to Raydium/PumpSwap.+Timing entries/exits around graduation is a core meme-trading move.++## Build — `GET /api/crypto/bonding`+- New file `api/crypto/bonding.js`, free plain-handler pattern (00-CONTEXT).+- Input: `?mint=<pump.fun mint>`.+- Data: `_lib/pump-quote.js`, `_lib/pump-launch-feed.js`, `_lib/agent-pumpfun.js`, pump curve+ helpers + Solana RPC for the bonding-curve account state. Wrap existing logic; do not+ reimplement the curve math if a helper already computes it.+- Output: `{ mint, onCurve, bondingProgressPct, solInCurve, tokensRemaining,+ marketCapUsd, graduated, migratedTo, ts, source }`. `graduated:true` + `migratedTo` when+ it has left the curve.++## Catalog registration+Drop `api/_lib/crypto-catalog/bonding.js` (entry shape per 00-CONTEXT).++## States+Not a pump.fun mint / never launched → 400 with explanation. Already graduated → 200+`graduated:true`, curve fields `null`/final. RPC down → 503 + retry. Never 500.++## Tests+Progress % math; graduated vs on-curve branch; non-pump mint rejection. Synthetic/`$THREE` fixtures.++## Definition of done+Inherit 00-CONTEXT DoD + gates. Plus:+- [ ] Live call on a real on-curve mint captured in PROGRESS.md.+- [ ] `docs/crypto-api.md` section + curl + use-case; cross-link `/api/crypto/launches`.+- [ ] `data/changelog.json` (tags: `feature`) — "Free bonding-curve status API for pump.fun tokens".diff --git a/prompts/x402-overhaul/06-crypto-whale-activity.md b/prompts/x402-overhaul/06-crypto-whale-activity.mdnew file mode 100644index 000000000..7292766d2--- /dev/null+++ b/prompts/x402-overhaul/06-crypto-whale-activity.md@@ -0,0 +1,39 @@+# 06 — Free Crypto Data API: Whale / Large-Buy Activity++Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.+Independent work order — completes fully on its own.++## Agent use-case (name it in the docs)+An agent wants to know if big money is moving into a token (or the pump.fun market broadly)+before it commits — whale already in = price impact ahead; no whales = thin. A free read of+large buys is high-signal.++## Note on existing code+There is a PAID `api/x402/pump-agent-audit.js` doing "whale activity" for $0.02. Reuse its+data logic (`_lib/pump-volume-anomaly.js`, `_lib/gmgn-feed.js`, `_lib/agent-pumpfun.js`,+Solana RPC) but expose a FREE, cleaner version here. Do NOT delete the paid one in this+prompt (prompt 20 handles retirement decisions) — just build the free `/api/crypto/whales`.++## Build — `GET /api/crypto/whales`+- New file `api/crypto/whales.js`, free plain-handler pattern (00-CONTEXT).+- Input: `?mint=<optional — token-specific>&minSol=<default 5>&limit=<default 10, max 25>`.+ With `mint`: whale buys of that token. Without: top whale wallets active across pump.fun.+- Output: `{ scope:'token'|'market', mint, whales: [{ wallet, solMoved, txHash, ts }],+ whaleCount, totalSolMoved, signal:'bullish'|'bearish'|'neutral', ts, source }`. Signal from+ a documented deterministic rule (buy pressure), not an LLM.++## Catalog registration+Drop `api/_lib/crypto-catalog/whales.js` (entry shape per 00-CONTEXT).++## States+No whales over threshold → 200 empty + `neutral`, not an error. Feed down → 200 last-known/+empty + note. Never 500. Cap limit at 25.++## Tests+Threshold filter; token vs market scope; signal rule; empty case. Synthetic/`$THREE` fixtures.++## Definition of done+Inherit 00-CONTEXT DoD + gates. Plus:+- [ ] Live call captured in PROGRESS.md.+- [ ] `docs/crypto-api.md` section (signal rule documented) + curl + use-case.+- [ ] `data/changelog.json` (tags: `feature`) — "Free whale-activity API for crypto agents".diff --git a/prompts/x402-overhaul/07-crypto-symbol-availability.md b/prompts/x402-overhaul/07-crypto-symbol-availability.mdnew file mode 100644index 000000000..3427958b5--- /dev/null+++ b/prompts/x402-overhaul/07-crypto-symbol-availability.md@@ -0,0 +1,40 @@+# 07 — Free Crypto Data API: Symbol Availability++Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.+Independent work order — completes fully on its own.++## Agent use-case (name it in the docs)+An agent about to launch a token wants to check candidate tickers for collisions (exact ++fuzzy) before committing — so its brand isn't lost among clones. A free batch check is a+natural top-of-funnel for the paid Pump Launcher.++## Note on existing code+There is a PAID `api/x402/symbol-availability.js` (`< $0.01`). Move this capability to a FREE+`/api/crypto/symbol` (it's a discovery utility that should drive launcher adoption, not earn+sub-cent dust). Reuse its collision logic. Leave the retirement of the paid route to prompt+20 — but in THIS prompt, add a one-line deprecation note in the paid file's header pointing+to the free route, and stage only that file + your new files.++## Build — `GET/POST /api/crypto/symbol`+- New file `api/crypto/symbol.js`, free plain-handler pattern (00-CONTEXT).+- Input: `{ symbols: string[] (max 20), chain?: 'solana' }` (POST) or `?symbols=A,B,C` (GET).+- Data: reuse the existing symbol-collision source the paid route uses (token registries /+ DexScreener / pump feed search). Exact + fuzzy match.+- Output: `{ results: [{ symbol, available, exactCollisions, fuzzyCollisions }],+ availableCount, takenCount, ts }`.++## Catalog registration+Drop `api/_lib/crypto-catalog/symbol.js` (entry shape per 00-CONTEXT).++## States+Empty/oversized list → 400 with the cap. No collisions → all `available:true`. Registry+source down → 200 degraded with a note. Never 500. Cap at 20 symbols.++## Tests+Exact vs fuzzy; cap enforcement; available/taken counts. Use made-up tickers in fixtures.++## Definition of done+Inherit 00-CONTEXT DoD + gates. Plus:+- [ ] Live call captured in PROGRESS.md.+- [ ] `docs/crypto-api.md` section + curl + use-case; cross-link the paid Pump Launcher.+- [ ] `data/changelog.json` (tags: `feature`,`improvement`) — "Symbol-availability check is now free".diff --git a/prompts/x402-overhaul/08-crypto-wallet-portfolio.md b/prompts/x402-overhaul/08-crypto-wallet-portfolio.mdnew file mode 100644index 000000000..9dabb3416--- /dev/null+++ b/prompts/x402-overhaul/08-crypto-wallet-portfolio.md@@ -0,0 +1,35 @@+# 08 — Free Crypto Data API: Wallet Portfolio++Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.+Independent work order — completes fully on its own.++## Agent use-case (name it in the docs)+An agent needs to inspect a wallet — its own or a counterparty's — before transacting: token+balances, SOL/native, rough USD value. Useful for treasury agents, copy-trade agents, and+pre-trade counterparty checks.++## Build — `GET /api/crypto/wallet`+- New file `api/crypto/wallet.js`, free plain-handler pattern (00-CONTEXT).+- Input: `?address=<wallet>&chain=<solana|base|...>`.+- Data: `_lib/balances.js`, `_lib/helius.js` (if key) / Solana RPC `getTokenAccountsByOwner`+ (keyless) for SPL balances; `_lib/sol-price.js` + DexScreener for USD valuation. Keyless+ path must return real balances even without Helius.+- Output: `{ address, chain, native: { amount, usd }, tokens: [{ mint, symbol, amount,+ usd }], totalUsd, tokenCount, ts, sources[] }`. Unpriced tokens → `usd:null`, still listed.++## Catalog registration+Drop `api/_lib/crypto-catalog/wallet.js` (entry shape per 00-CONTEXT).++## States+Invalid address → 400. Empty wallet → 200 with zeros/empty arrays. RPC down → 503 + retry.+Never 500. Consider a sane cap on tokens returned (e.g. 200) with a `truncated` flag.++## Tests+Balance parsing; USD valuation with a missing price; keyless RPC path; empty wallet.+Use a known public address or a synthetic one in fixtures (no private keys, ever).++## Definition of done+Inherit 00-CONTEXT DoD + gates. Plus:+- [ ] Live call on a real public address captured in PROGRESS.md.+- [ ] `docs/crypto-api.md` section + curl + use-case.+- [ ] `data/changelog.json` (tags: `feature`) — "Free wallet portfolio API for agents".diff --git a/prompts/x402-overhaul/09-crypto-trending.md b/prompts/x402-overhaul/09-crypto-trending.mdnew file mode 100644index 000000000..96ab0fac3--- /dev/null+++ b/prompts/x402-overhaul/09-crypto-trending.md@@ -0,0 +1,33 @@+# 09 — Free Crypto Data API: Trending / Hot Tokens++Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.+Independent work order — completes fully on its own.++## Agent use-case (name it in the docs)+A discovery agent wants "what's hot right now" — tokens ranked by momentum (volume spike,+buy pressure, holder growth) so it can surface opportunities without scraping five sites.++## Build — `GET /api/crypto/trending`+- New file `api/crypto/trending.js`, free plain-handler pattern (00-CONTEXT).+- Input: `?window=<5m|1h|24h default 1h>&limit=<default 20, max 50>&source=<pumpfun|all>`.+- Data: `_lib/pump-trending-score.js`, `_lib/pump-volume-anomaly.js`, `_lib/gmgn-feed.js`,+ DexScreener trending. Compose a ranked list; document the ranking signal. Wrap existing+ scoring helpers rather than inventing a new score.+- Output: `{ window, tokens: [{ mint, symbol, name, marketCapUsd, volumeUsd,+ change, score, url }], count, ts, sources[] }`. Ranked by `score` desc.++## Catalog registration+Drop `api/_lib/crypto-catalog/trending.js` (entry shape per 00-CONTEXT).++## States+Source down → 200 with whatever ranked data is available + note. Empty → 200 empty. Never+500. Cap limit at 50.++## Tests+Ranking order; window param; limit cap; source filter. Synthetic fixtures.++## Definition of done+Inherit 00-CONTEXT DoD + gates. Plus:+- [ ] Live call captured in PROGRESS.md.+- [ ] `docs/crypto-api.md` section (ranking signal documented) + curl + use-case.+- [ ] `data/changelog.json` (tags: `feature`) — "Free trending-tokens API for crypto agents".diff --git a/prompts/x402-overhaul/10-crypto-api-index.md b/prompts/x402-overhaul/10-crypto-api-index.mdnew file mode 100644index 000000000..be4eacdb9--- /dev/null+++ b/prompts/x402-overhaul/10-crypto-api-index.md@@ -0,0 +1,45 @@+# 10 — Free Crypto Data API: Bundle Index + OpenAPI + Discovery++Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.+Independent work order — completes fully on its own. **Does NOT require prompts 01–09 to have+run** — it globs whatever catalog entries exist and reflects them; with zero entries it still+returns a valid (empty) catalog. As sibling endpoints land, it lists them automatically.++## Agent use-case (name it in the docs)+An agent (or a human wiring one up) hits ONE URL to discover the entire free Crypto Data API:+every endpoint, its inputs/outputs, and a live example. This is the front door that makes the+bundle feel like one product, not nine loose routes.++## Build+1. **The catalog assembler** — `api/_lib/crypto-catalog/index.js` that imports/globs every+ `api/_lib/crypto-catalog/*.js` entry file (excluding itself) and returns the merged array.+ Use a static import map or a build-safe directory read (Vercel functions can't always+ fs-glob at runtime — prefer an explicit `export` barrel that each entry is added to, OR a+ generated manifest; pick the pattern that works in this repo's serverless runtime and+ document it). If an entry is malformed, skip it and log — never throw.+2. **`GET /api/crypto`** — `api/crypto/index.js`, free handler. Returns+ `{ name:'three.ws Crypto Data API', free:true, keyless:true, version, endpoints:[...from+ catalog...], docs:'/docs/crypto-api', ts }`. Human-friendly HTML when `Accept: text/html`,+ JSON otherwise.+3. **`GET /api/crypto/openapi.json`** — a real OpenAPI 3.1 doc generated FROM the catalog+ entries (paths, params, response schemas). Must validate. Wire a rewrite in `vercel.json`+ if needed (stage only your hunk).++## States+Zero catalog entries → valid empty catalog + a "coming soon" note, never an error. Malformed+entry → skipped, rest served.++## Tests+Assembler merges N entries; skips malformed; OpenAPI validates (use a schema validator already+in devDeps if present, else assert required OpenAPI fields); index HTML vs JSON negotiation.++## Definition of done+Inherit 00-CONTEXT DoD + gates. Plus:+- [ ] `curl /api/crypto` and `/api/crypto/openapi.json` outputs captured in PROGRESS.md.+- [ ] `docs/crypto-api.md`: ensure it has an intro + a generated/maintained endpoint table+ (this prompt owns the intro + table; sibling prompts add their own sections).+- [ ] `data/pages.json`: register `/docs/crypto-api` if it's a public page (coordinate: prompt+ 11 builds the page — if it doesn't exist yet, still register the intended path).+- [ ] `STRUCTURE.md`: row for the Crypto Data API surface (`/api/crypto/*`).+- [ ] `data/changelog.json` (tags: `feature`,`sdk`) — "three.ws Crypto Data API: one free,+ keyless crypto data bundle for AI agents".diff --git a/prompts/x402-overhaul/11-crypto-api-docs-page.md b/prompts/x402-overhaul/11-crypto-api-docs-page.mdnew file mode 100644index 000000000..d59abd4e3--- /dev/null+++ b/prompts/x402-overhaul/11-crypto-api-docs-page.md@@ -0,0 +1,43 @@+# 11 — Free Crypto Data API: Public Docs / Landing Page++Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.+Independent work order — completes fully on its own. Does NOT require 01–10; it documents the+whole free Crypto Data API and degrades gracefully for endpoints not yet live (mark them+"live" vs "coming soon" by probing `/api/crypto` at build/runtime, or list the full intended+set — never blank).++## Goal+A screenshot-worthy public page — `three.ws/crypto` (or `/docs/crypto-api`, follow existing+docs/page conventions) — that makes an agent developer go "I'm wiring this in right now."+This is a marketing surface AND the funnel top: free data here, paid uniques (Forge, Vanity,+Pump Launcher) linked as the next step.++## Build+- Follow the repo's existing page system (read `data/pages.json`, an existing docs/landing+ page, and `DESIGN-TOKENS.md` before writing a line — match the design system, don't invent).+- Content: hero ("Free crypto data for AI agents — one keyless API"), a live endpoint table+ (name, one-line purpose, method+path, price=Free), a copy-paste quickstart (curl + a JS+ `fetch` snippet that actually runs), per-endpoint request/response examples using REAL+ responses (call the live endpoints; if one isn't live yet, mark "coming soon"), and a+ "when you're ready to build" CTA linking Forge / Vanity / Pump Launcher.+- Every code sample must run. Every link must resolve.+- All states designed: works at 320px / 768px / 1440px; light + dark; hover/focus states;+ loading skeleton if it fetches live data client-side.++## Register it+- `data/pages.json`: path, title, description, `added` date (feeds sitemap/llms.txt/changelog).+- Link it from the site nav / docs index per existing conventions.+- `STRUCTURE.md`: row if it's a new surface.++## Tests / verification+- `npm run dev`, open the page, exercise it in a real browser: no console errors, live+ examples render, all links resolve. Capture what you verified in PROGRESS.md.+- `npm run build:pages` green.++## Definition of done+Inherit 00-CONTEXT DoD + gates. Plus:+- [ ] Page live in dev, screenshot-worthy, responsive, a11y-clean, zero console errors.+- [ ] Every curl/fetch sample executed and confirmed working (paste one real run in PROGRESS).+- [ ] `data/pages.json` + nav link + `STRUCTURE.md` done.+- [ ] `data/changelog.json` (tags: `feature`,`docs`; `link` = the page path) — "New: three.ws+ Crypto Data API docs".diff --git a/prompts/x402-overhaul/12-3d-free-generate.md b/prompts/x402-overhaul/12-3d-free-generate.mdnew file mode 100644index 000000000..68304749d--- /dev/null+++ b/prompts/x402-overhaul/12-3d-free-generate.md@@ -0,0 +1,46 @@+# 12 — Free 3D API: Text→3D Generate++Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.+Independent work order — completes fully on its own.++## Agent use-case (name it in the docs)+Any agent building a game, a scene, an NFT, or a visual wants a 3D model from a text prompt —+free, no key, no account. No other agent platform gives away 3D generation. This is a magnet+that funnels to paid Forge Pro (quality tiers) and Rigged Avatars.++## Note on existing code+The free NVIDIA NIM / TRELLIS lane already exists: `api/forge-nim.js`, `api/nim-forge.js`,+`api/forge.js`, `_lib/forge-job-token.js`. Do NOT rebuild generation — wrap the existing free+lane behind a clean, agent-first, keyless endpoint. The current `/api/x402/forge` charges;+this one is the FREE draft lane, clearly separated.++## Build — `POST /api/3d/generate` + `GET /api/3d/generate?job=<id>`+- New file `api/3d/generate.js`, free plain-handler pattern (00-CONTEXT) + the job-token poll+ pattern the existing forge routes use (`_lib/forge-job-token.js`).+- Input (POST): `{ prompt: string, format?: 'glb' }`. Returns `{ job, status, poll }` (or the+ GLB inline when the draft finishes fast, matching existing forge behavior).+- Poll (GET `?job=`): `{ status:'pending'|'done'|'error', glbUrl?, viewerUrl?, error? }`.+- Rate-limit generously but protect the GPU lane (per-IP + a global concurrency guard —+ reuse whatever the existing forge routes use; don't invent a new limiter).+- Free = the draft/NIM tier only. Higher quality + rigging = paid Forge (link it in the+ response + docs). Be explicit about the free tier's limits so it's honest.++## Catalog registration+Drop `api/_lib/3d-catalog/generate.js` (same entry shape as the crypto catalog; the `/api/3d`+index in prompt 14 globs this dir).++## States+Empty/oversized prompt → 400. Job pending → 200 pending + poll URL. Generation failed+upstream → 200 `status:error` + actionable message + no charge (it's free). GPU lane+saturated → 429 with retry-after. Never 500 on a well-formed prompt.++## Tests+Job lifecycle (create → pending → done); prompt validation; rate-limit path; that the+returned GLB URL resolves to a real GLB (fetch it, assert it parses / non-zero bytes) for at+least one real generation.++## Definition of done+Inherit 00-CONTEXT DoD + gates. Plus:+- [ ] One real generation run end-to-end; GLB verified real; capture job + glbUrl in PROGRESS.md.+- [ ] `docs/3d-api.md` section (free-tier limits stated) + curl + use-case + link to paid Forge.+- [ ] `data/changelog.json` (tags: `feature`,`sdk`) — "Free text→3D generation API for agents".diff --git a/prompts/x402-overhaul/13-3d-free-inspect.md b/prompts/x402-overhaul/13-3d-free-inspect.mdnew file mode 100644index 000000000..c190738a1--- /dev/null+++ b/prompts/x402-overhaul/13-3d-free-inspect.md@@ -0,0 +1,41 @@+# 13 — Free 3D API: Inspect / Validate / Optimize Report++Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.+Independent work order — completes fully on its own.++## Agent use-case (name it in the docs)+An agent handling 3D assets (from any source) needs to validate a glTF/GLB and get structural+stats + optimization advice before using it: vertices, triangles, materials, textures,+animations, extensions, and a prioritized "make this smaller/faster" list. Free = adoption.++## Note on existing code+`api/x402/model-check.js` already does this for a sub-cent charge. Move the capability to a+FREE `/api/3d/inspect` (a validation utility should be free — it drives trust and funnels to+paid pipelines). Reuse its inspection logic (`_lib/glb-size-optimizer.js`,+`_lib/x402/enrich-model-metadata.js`, existing glTF validators in the repo). Add a one-line+deprecation note to the paid `model-check.js` header pointing here; leave actual retirement to+prompt 20. Stage only your new files + that one-line header edit.++## Build — `GET/POST /api/3d/inspect`+- New file `api/3d/inspect.js`, free plain-handler pattern (00-CONTEXT).+- Input: `?url=<glb/gltf url>` (GET) or `{ url }` / raw upload (POST) — match how model-check+ accepts input.+- Output: `{ url, valid, stats: { vertices, triangles, materials, textures, animations,+ extensions[] }, sizeBytes, recommendations: [{ severity, issue, fix }], ts }`.++## Catalog registration+Drop `api/_lib/3d-catalog/inspect.js` (entry shape per prompt 12 / 00-CONTEXT).++## States+Bad URL / not a model → 400 with reason. Fetch fails → 502 + retry hint. Huge file → enforce a+sane size cap with a clear message. Never 500.++## Tests+Stat extraction on a real GLB; recommendation ordering by severity; invalid-input handling.+Use a repo test GLB or a generated one.++## Definition of done+Inherit 00-CONTEXT DoD + gates. Plus:+- [ ] Live call on a real GLB captured in PROGRESS.md.+- [ ] `docs/3d-api.md` section + curl + use-case.+- [ ] `data/changelog.json` (tags: `feature`,`improvement`) — "3D model inspection is now free".diff --git a/prompts/x402-overhaul/14-3d-api-index-and-docs.md b/prompts/x402-overhaul/14-3d-api-index-and-docs.mdnew file mode 100644index 000000000..44eb8d507--- /dev/null+++ b/prompts/x402-overhaul/14-3d-api-index-and-docs.md@@ -0,0 +1,33 @@+# 14 — Free 3D API: Index + Docs Page++Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.+Independent work order — completes fully on its own. Globs whatever `api/_lib/3d-catalog/*`+entries exist (works with zero); documents the whole free 3D API + links the paid tiers.++## Build+1. **Assembler** — `api/_lib/3d-catalog/index.js` merging every `api/_lib/3d-catalog/*.js`+ entry (skip malformed, never throw). Use the serverless-safe pattern documented in prompt+ 10 (barrel/manifest, not runtime fs-glob if that's unreliable here).+2. **`GET /api/3d`** — `api/3d/index.js`, free handler: `{ name:'three.ws 3D API', free:true,+ keyless:true, endpoints:[...catalog...], paidTiers:[{name:'Forge Pro',...},{name:'Rigged+ Avatar',...}], docs:'/docs/3d-api', ts }`. HTML on `Accept: text/html`, else JSON.+3. **`GET /api/3d/openapi.json`** — real OpenAPI 3.1 from the catalog; validates.+4. **Public docs page** — `three.ws/3d` (or `/docs/3d-api`), following the repo's page system+ + `DESIGN-TOKENS.md`. Hero, endpoint table, runnable quickstart, real request/response+ examples (call live endpoints), an embedded 3D viewer preview of a generated GLB if the+ viewer component is reusable, and a clear free→paid ladder (free draft → Forge Pro tiers →+ Rigged Avatars). Screenshot-worthy, responsive, a11y-clean, zero console errors.++## Register+`data/pages.json` (the docs page), nav link, `STRUCTURE.md` row for `/api/3d/*`.++## Tests / verification+Assembler merge + skip-malformed; OpenAPI validates; index HTML/JSON negotiation; open the+docs page in `npm run dev`, verify live examples + links + no console errors. Capture in PROGRESS.++## Definition of done+Inherit 00-CONTEXT DoD + gates. Plus:+- [ ] `/api/3d`, `/api/3d/openapi.json`, and the docs page all captured/verified in PROGRESS.md.+- [ ] `data/pages.json` + nav + `STRUCTURE.md` done.+- [ ] `data/changelog.json` (tags: `feature`,`docs`; `link` = page path) — "three.ws 3D API:+ free text→3D + inspection for AI agents, with pro tiers".diff --git a/prompts/x402-overhaul/15-generalize-reputation.md b/prompts/x402-overhaul/15-generalize-reputation.mdnew file mode 100644index 000000000..c345a66bb--- /dev/null+++ b/prompts/x402-overhaul/15-generalize-reputation.md@@ -0,0 +1,44 @@+# 15 — Generalize Agent Reputation → any agent, any chain++Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.+Independent work order — completes fully on its own.++## The problem+`api/x402/agent-reputation.js` scores only three.ws agents from pump.fun activity. No outside+agent has a reason to call it — that's why it doesn't sell. A trust primitive is only valuable+if it works on ANY counterparty an agent is about to transact with.++## Agent use-case (name it in the docs)+Before Agent A pays / trades / delegates to Agent B, it calls one endpoint to get B's trust+score from real on-chain evidence — regardless of which platform B was minted on. This is a+genuine pre-transaction primitive agents will pay for.++## Build — upgrade `api/x402/agent-reputation.js` (keep the route + paid model)+- Accept ANY identifier: a wallet address (Solana or EVM), an ERC-8004 agent id, a pump.fun+ mint/creator, or a three.ws agent_id — auto-detect the type.+- Score from REAL on-chain signals available for that identifier: transaction history,+ age, counterparties, holdings, prior settled x402/agent payments, ERC-8004 feedback if+ present. Reuse `_lib/agent-registry.js`, `_lib/solana/*`, `_lib/helius.js`, `_lib/aixbt.js`,+ ERC-8004 helpers, and the existing scoring logic — generalize it, don't fork it.+- Output: `{ subject, subjectType, score, tier, signals: { ... real evidence ... },+ evidence: [{ kind, ref }], caveats[], ts }`. Score rule documented + deterministic.+- Keep the sweep/leaderboard/decay modes but make them work over the generalized subject set.+- Pricing stays (this is a paid unique). Update the `BAZAAR` description + the `api/wk.js`+ discovery mirror + run `node scripts/verify-x402-discovery.mjs`.++## States+Unknown/unscannable subject → 200 with `score:null`, `tier:'unknown'`, explicit caveat — never+a fake score. Chain data unavailable → degrade to what's readable, mark caveats. Never 500.++## Tests+Subject-type detection (Solana wallet vs EVM vs mint vs agent_id); score determinism; unknown+subject path; discovery mirror matches live 402. `$THREE`/synthetic fixtures.++## Definition of done+Inherit 00-CONTEXT DoD + gates. Plus:+- [ ] Real scores for at least 3 different subject types captured in PROGRESS.md.+- [ ] `scripts/verify-x402-discovery.mjs` passes; paste output.+- [ ] `docs/` trust-primitive doc updated (`docs/api-reference.md` or a new+ `docs/trust-primitives.md` linked from `docs/start-here.md`) with the score rule + use-case.+- [ ] `data/changelog.json` (tags: `feature`,`improvement`) — "Agent reputation now scores any+ wallet or agent on any chain".diff --git a/prompts/x402-overhaul/16-generalize-identity-verify.md b/prompts/x402-overhaul/16-generalize-identity-verify.mdnew file mode 100644index 000000000..9ce7532a4--- /dev/null+++ b/prompts/x402-overhaul/16-generalize-identity-verify.md@@ -0,0 +1,44 @@+# 16 — Generalize On-Chain Identity Verify → cross-platform trust primitive++Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.+Independent work order — completes fully on its own.++## The problem+`api/x402/onchain-identity-verify.js` only verifies three.ws agent_ids against three.ws's own+index. Useless to outside agents. A verification primitive must work for any claimed+identity↔address link.++## Agent use-case (name it in the docs)+Agent A is told "I am the deployer of contract/mint X" or "I own wallet W / ENS name / agent+id". Before trusting or paying, A calls one endpoint that returns cryptographic/on-chain+evidence the claim is real: deploy tx, signer, ownership proof, ENS/SNS resolution, ERC-8004+registration. A cross-platform trust check agents will pay for.++## Build — upgrade `api/x402/onchain-identity-verify.js` (keep route + paid model)+- Input: `{ claim: { identity, address, chain } }` where identity may be an agent_id, ENS/SNS+ name, wallet, or ERC-8004 id; address is the mint/contract/wallet the claim asserts control+ of.+- Verify with REAL sources: contract deploy tx + deployer (RPC/explorer), mint+ authority/creator (Solana), ENS/SNS resolution (`_lib/` resolvers or the ens_sns MCP), token+ ownership, ERC-8004 registry, three.ws `meta.onchain` index when relevant. Reuse existing+ helpers; generalize.+- Output: `{ claim, verified:true|false|'unverifiable', evidence: [{ kind, ref, detail }],+ method, ts }`. Never assert `verified:true` without concrete on-chain evidence.+- Update `BAZAAR` description + `api/wk.js` discovery mirror + run the verify script.++## States+Insufficient data → `verified:'unverifiable'` + what's missing, never a false positive.+Chain/explorer down → degrade + caveat. Bad input → 400. Never 500.++## Tests+Each identity type resolves; true vs false vs unverifiable branches; no-evidence never returns+true; discovery mirror matches live. Synthetic/`$THREE` fixtures.++## Definition of done+Inherit 00-CONTEXT DoD + gates. Plus:+- [ ] Real verifications (a true case + a false/unverifiable case) captured in PROGRESS.md.+- [ ] `scripts/verify-x402-discovery.mjs` passes; paste output.+- [ ] `docs/` trust-primitive doc updated (same doc as prompt 15 if present — extend, don't+ duplicate) with the evidence model + use-case.+- [ ] `data/changelog.json` (tags: `feature`,`improvement`) — "On-chain identity verification+ now works cross-platform for any claim".diff --git a/prompts/x402-overhaul/17-elevate-forge-listing.md b/prompts/x402-overhaul/17-elevate-forge-listing.mdnew file mode 100644index 000000000..54a96063e--- /dev/null+++ b/prompts/x402-overhaul/17-elevate-forge-listing.md@@ -0,0 +1,48 @@+# 17 — Elevate the Forge Listing (Forge Pro tiers + discovery)++Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.+Independent work order — completes fully on its own.++## Scope guard (important)+The OKX.AI work stream (`prompts/okx-ai/`) owns the forge **payment integration** and+`api/mcp-3d.js`. This prompt is ONLY about the **x402scan listing quality** of the existing+`api/x402/forge.js`: its description, quality tiers, tags, response polish, and discovery+metadata. **Do NOT modify the payment/settlement handler logic or `api/mcp-3d.js`.** If a+change would touch those, stop at the metadata boundary and note it for the OKX stream.++## Why+Forge (text→3D / image→3D) is our crown jewel and the only real 3D generation on any agent+marketplace — but on x402scan it's buried in the same flat list as `dance-tip`, so it reads+as trivial. Make the listing sell.++## Build+- Rewrite the `BAZAAR` description on `api/x402/forge.js` to lead with the agent use-case+ (game assets, NFTs, scenes, product viz), the quality tiers and prices ($0.05 draft / $0.15+ standard / $0.50 high — confirm against `_lib/x402-prices.js` and the real handler), the+ keyless/no-account pledge, and the free draft lane (`/api/3d/generate`) as the on-ramp.+- Ensure input/output schemas in the discovery metadata are accurate and complete (prompt,+ reference-image mode, job-token poll, GLB output). An agent should understand how to call it+ from the schema alone.+- Verify the tiers in `_lib/x402-prices.js` are coherent and documented; adjust only pricing+ metadata (not settlement) if needed.+- Update the `api/wk.js` discovery mirror for `/api/x402/forge`; run+ `node scripts/verify-x402-discovery.mjs` until clean.+- Tags: ensure it's tagged so it surfaces under 3D / AI / Utility on x402scan.++## States / correctness+The live 402 and the discovery doc must match exactly (the verify script enforces this).+Don't change runtime behavior; if the description promises a field, the handler must already+return it — verify by calling the endpoint, don't assume.++## Tests+Discovery/live-402 parity (verify script); schema completeness assertion. No settlement tests+here (owned by OKX stream).++## Definition of done+Inherit 00-CONTEXT DoD + gates (skip the parts about new endpoints). Plus:+- [ ] New `BAZAAR` description + accurate schemas shipped; `scripts/verify-x402-discovery.mjs`+ passes (paste output).+- [ ] Live 402 captured + confirmed matching the discovery doc, in PROGRESS.md.+- [ ] `docs/3d-api.md` (or Forge doc) updated to describe the paid tiers + free on-ramp.+- [ ] `data/changelog.json` (tags: `improvement`) — "Forge listing sharpened: clear 3D+ generation tiers for agents".diff --git a/prompts/x402-overhaul/18-elevate-vanity-listing.md b/prompts/x402-overhaul/18-elevate-vanity-listing.mdnew file mode 100644index 000000000..edf6c22b0--- /dev/null+++ b/prompts/x402-overhaul/18-elevate-vanity-listing.md@@ -0,0 +1,39 @@+# 18 — Elevate the Vanity Grinder Listing (make it a flagship)++Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.+Independent work order — completes fully on its own.++## Why+`api/x402/vanity.js` (+ `vanity-premium.js`, `vanity-verifiable.js`) is genuinely useful and+hard to copy — a real Rust/WASM ed25519 grinder that returns a custom Solana address, keyless,+pay-per-call. It should be one of our headline products. Make the listing reflect that.++## Build (listing quality — do not break the grinder)+- Audit the three vanity routes; make sure the primary agent-facing one has a crisp `BAZAAR`+ description that leads with the use-case (branded token mint address, branded agent/treasury+ wallet), the format options (keypair vs BIP-39 mnemonic), the char caps + price ladder, the+ security model (nothing stored; served once over TLS; optional `sealTo` ECIES), and the+ keyless/no-account pledge.+- Ensure input/output schemas in discovery are complete and accurate — an agent should grind+ an address from the schema alone.+- Confirm price ladder in `_lib/x402-prices.js` matches the live handler; fix metadata drift.+- Update `api/wk.js` discovery mirror(s) for the vanity routes; run+ `node scripts/verify-x402-discovery.mjs` until clean.+- If `vanity-premium.js` / `vanity-verifiable.js` overlap confusingly, clarify each one's+ distinct purpose in its description (don't merge/remove here — that's a bigger call; note it+ for prompt 21/22 if consolidation is warranted).++## States / correctness+Live 402 ↔ discovery parity (verify script). Don't alter grinding/signing behavior. Verify the+endpoint still returns a real, valid vanity keypair by calling it (short prefix) — capture proof.++## Tests+Discovery/live parity; schema completeness; one real grind (1-char prefix) returns a valid+address matching the prefix.++## Definition of done+Inherit 00-CONTEXT DoD + gates (skip new-endpoint parts). Plus:+- [ ] Sharpened descriptions + accurate schemas; verify script passes (paste output).+- [ ] One real grind captured in PROGRESS.md (address matches requested prefix).+- [ ] Vanity doc in `docs/` created/updated (use-cases, formats, security model, price ladder).+- [ ] `data/changelog.json` (tags: `improvement`) — "Vanity address grinder listing overhauled".diff --git a/prompts/x402-overhaul/19-elevate-pump-launch-listing.md b/prompts/x402-overhaul/19-elevate-pump-launch-listing.mdnew file mode 100644index 000000000..196ce6f9d--- /dev/null+++ b/prompts/x402-overhaul/19-elevate-pump-launch-listing.md@@ -0,0 +1,45 @@+# 19 — Elevate the Pump Launcher Listing++Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.+Independent work order — completes fully on its own.++## Why+`api/x402/pump-launch.js` is a genuinely strong product: deploy a brand-new pump.fun token in+one paid call — the server fronts the SOL and signs the create tx, so the agent needs no SOL+and no account, just USDC. Optional vanity mint. That's real utility. Make the listing sell it+and wire it to the free funnel.++## Scope+Listing quality + discovery + the free→paid funnel — NOT the deploy/signing internals (they+work). Do not change how the SOL fronting or tx signing works.++## Build+- Rewrite the `BAZAAR` description to lead with the use-case ("launch a token autonomously,+ no SOL, no account — pay USDC"), the inputs (name, symbol, metadataUri OR imageUrl we pin,+ creator-rewards wallet, optional vanity prefix/suffix), the output (mint, tx sig, pump.fun+ URL), and networks. Make the schema complete enough to call blind.+- Wire the funnel: reference the FREE `/api/crypto/symbol` (ticker check) and+ `/api/crypto/launches` as pre/post steps in the description + docs, so the free data API+ feeds paid launches.+- Confirm the $5.00 price (or current) in `_lib/x402-prices.js` matches the handler; fix+ metadata drift only.+- Update `api/wk.js` discovery mirror for `/api/x402/pump-launch`; run+ `node scripts/verify-x402-discovery.mjs` until clean.++## States / correctness+Live 402 ↔ discovery parity (verify script). Do NOT execute a real mainnet launch to test+(that costs real SOL and creates a real token — CLAUDE.md: no real third-party mints in+tests). Verify the 402 challenge + input validation + dry-run/validation path without+broadcasting. Confirm the description's promised fields exist in the handler by reading it.++## Tests+Discovery/live parity; input validation (missing name/symbol/image); schema completeness. No+real broadcast.++## Definition of done+Inherit 00-CONTEXT DoD + gates (skip new-endpoint parts). Plus:+- [ ] Sharpened description + accurate schema + funnel links; verify script passes (paste output).+- [ ] 402 challenge + validation path captured in PROGRESS.md (no real launch).+- [ ] Pump Launcher doc in `docs/` created/updated with the full flow + funnel.+- [ ] `data/changelog.json` (tags: `improvement`) — "Pump Launcher listing sharpened + wired to+ free symbol/launches APIs".diff --git a/prompts/x402-overhaul/README.md b/prompts/x402-overhaul/README.mdnew file mode 100644index 000000000..898b3fee7--- /dev/null+++ b/prompts/x402-overhaul/README.md@@ -0,0 +1,59 @@+# x402 Overhaul — Work Orders++Rebuild three.ws's paid-agent offering into things crypto users and their AI agents actually+use. Current state: 17 mostly-useless endpoints, $5.87 revenue / 30 days. Target: two free+loss-leaders (Crypto Data API + 3D API) that funnel into a few paid uniques.++## How to use+Each file is a standalone work order. Open a fresh chat and say:+> Read `prompts/x402-overhaul/00-CONTEXT.md` then `prompts/x402-overhaul/<file>` and execute it 100%.++**Every prompt is fully independent** — any order, any parallelism, no prompt waits on another.+`00-CONTEXT.md` carries all shared facts, the codebase map, the "never blocked" decision+defaults, and the shared definition-of-done. Read it first, every time.++## The work orders++### Free Crypto Data API — `/api/crypto/*` (keyless, free; the adoption wedge)+| File | Endpoint |+|---|---|+| `01-crypto-token-snapshot.md` | `/api/crypto/token` — price, mcap, liquidity, volume, 24h |+| `02-crypto-token-security.md` | `/api/crypto/security` — mint authority, rug/risk signals |+| `03-crypto-token-holders.md` | `/api/crypto/holders` — holder count + concentration |+| `04-crypto-pumpfun-launches.md` | `/api/crypto/launches` — live new pump.fun launches |+| `05-crypto-bonding-status.md` | `/api/crypto/bonding` — bonding-curve / graduation status |+| `06-crypto-whale-activity.md` | `/api/crypto/whales` — large-buy / whale activity |+| `07-crypto-symbol-availability.md` | `/api/crypto/symbol` — ticker collision check (free) |+| `08-crypto-wallet-portfolio.md` | `/api/crypto/wallet` — balances / holdings for an address |+| `09-crypto-trending.md` | `/api/crypto/trending` — trending / hot tokens |+| `10-crypto-api-index.md` | `/api/crypto` — bundle index + OpenAPI + discovery |+| `11-crypto-api-docs-page.md` | public docs/landing page for the Crypto Data API |++### Free 3D API — `/api/3d/*` (keyless, free)+| File | Endpoint |+|---|---|+| `12-3d-free-generate.md` | `/api/3d/generate` — free text→3D (NIM/TRELLIS) |+| `13-3d-free-inspect.md` | `/api/3d/inspect` — free glTF/GLB validate + optimize report |+| `14-3d-api-index-and-docs.md` | `/api/3d` index + docs page |++### Paid uniques — generalize & elevate+| File | Work |+|---|---|+| `15-generalize-reputation.md` | agent-reputation → any agent, any chain |+| `16-generalize-identity-verify.md` | onchain-identity-verify → cross-platform trust primitive |+| `17-elevate-forge-listing.md` | Forge Pro: tiers + description + discovery (not the payment layer) |+| `18-elevate-vanity-listing.md` | Vanity Grinder: make it the flagship listing |+| `19-elevate-pump-launch-listing.md` | Pump Launcher: sharpen listing + discovery |++### Cleanup, unification, marketing+| File | Work |+|---|---|+| `20-deprecate-dead-endpoints.md` | retire dance-tip / fact-check / tutor / revenue-vision / mint-to-mesh from the agent catalog |+| `21-unified-catalog.md` | one catalog module both x402scan + OKX.AI read |+| `22-x402scan-profile-overhaul.md` | rewrite the server-level profile, tags, resource descriptions |++## Ground rules (full detail in 00-CONTEXT.md)+- No mocks, no stubs, no TODOs. Real data only. Every state designed.+- Free = keyless, no account, generous limits. Paid = real 402 + real settlement seams.+- Never stop to ask — 00-CONTEXT has a decision default for every common blocker.+- Commit explicit paths, push both remotes, append to PROGRESS.md.diff --git a/public/changelog.json b/public/changelog.jsonindex 45fefc1a7..fe21fc97a 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-06T20:50:51.841Z",+ "generated_at": "2026-07-06T21:07:37.686Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -26,6 +26,16 @@"launch"]},+ {+ "date": "2026-07-06",+ "type": "update",+ "title": "3D generation, rigging, and export — now individually-priced services for AI agents",+ "summary": "The 3D studio is now sold piece by piece on OKX.AI, OKX's agent marketplace, where AI agents buy from each other. Eight sharply-scoped services, each with its own endpoint and price: text→3D from $0.01, art-directed Pro generation and image→3D at $0.30, auto-rigging at $0.25, a one-call rigged avatar at $0.50, animation retargeting at $0.10, deterministic pose seeds at $0.02, and rig-preserving FBX export for Unity/Unreal at $0.10. Payment settles in stablecoins on X Layer over the OKX Agent Payments Protocol (the existing Solana and Base rails are still accepted), you are only charged once a job is accepted, and discovery, health, job polling, and previews stay free. The full machine-readable catalog lives at /api/okx/3d/catalog.",+ "link": "/docs/okx-marketplace",+ "tags": [+ "feature"+ ]+ },{"date": "2026-07-06","type": "update",@@ -47,6 +57,16 @@"security"]},+ {+ "date": "2026-07-05",+ "type": "launch",+ "title": "Sperax on three.ws",+ "summary": "Free AI credits for three.ws users on chat.sperax.io — what the integration is and how to claim it.",+ "link": "/sperax",+ "tags": [+ "launch"+ ]+ },{"date": "2026-07-05","type": "launch",diff --git a/public/changelog.xml b/public/changelog.xmlindex 5ef3e42aa..65c8ca219 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -22,6 +22,14 @@<category>launch</category><description>Buy a long, brandable Solana vanity address delivered instantly from stock — 4–5+ character prefixes the live grinder can't reach, ground ahead of time on batch CPU and sold via x402. Keys are encrypted at rest, priced by rarity, and delivered exactly once.</description></item>+ <item>+ <title>3D generation, rigging, and export — now individually-priced services for AI agents</title>+ <link>https://three.ws/docs/okx-marketplace</link>+ <guid isPermaLink="false">2026-07-06:3D generation, rigging, and export — now individually-priced services for AI agents</guid>+ <pubDate>Mon, 06 Jul 2026 12:00:00 GMT</pubDate>+ <category>feature</category>+ <description>The 3D studio is now sold piece by piece on OKX.AI, OKX's agent marketplace, where AI agents buy from each other. Eight sharply-scoped services, each with its own endpoint and price: text→3D from $0.01, art-directed Pro generation and image→3D at $0.30, auto-rigging at $0.25, a one-call rigged avatar at $0.50, animation retargeting at $0.10, deterministic pose seeds at $0.02, and rig-preserving FBX export for Unity/Unreal at $0.10. Payment settles in stablecoins on X Layer over the OKX Agent Payments Protocol (the existing Solana and Base rails are still accepted), you are only charged once a job is accepted, and discovery, health, job polling, and previews stay free. The full machine-readable catalog lives at /api/okx/3d/catalog.</description>+ </item><item><title>Agent Identity Studio — 3D avatars for AI agents, sold agent-to-agent</title><link>https://three.ws/agent-identities</link>@@ -38,6 +46,14 @@<category>feature</category><description>The live grinder can only reach short (≤3-character) vanity prefixes on demand. New premium inventory grinds long, brandable 4–5+ character addresses ahead of time on cheap cloud CPU and sells them from stock, delivered instantly. Browse what's available and its rarity-scaled price ($1–$50) at /vanity/premium, then buy over the x402 rail (USDC on Base or Solana) — the private key is delivered exactly once and its stored copy is destroyed on delivery. Every key is encrypted at rest, and the listing is upfront that these are platform-generated keys: use a bought address as a token mint or sweep assets to your own wallet, not as a treasury. The existing $0.05 live-grind tier is unchanged.</description></item>+ <item>+ <title>Sperax on three.ws</title>+ <link>https://three.ws/sperax</link>+ <guid isPermaLink="false">2026-07-05:Sperax on three.ws</guid>+ <pubDate>Sun, 05 Jul 2026 12:00:00 GMT</pubDate>+ <category>launch</category>+ <description>Free AI credits for three.ws users on chat.sperax.io — what the integration is and how to claim it.</description>+ </item><item><title>Tour Builder — design a 3D store guide, no code</title><link>https://three.ws/tour-builder</link>diff --git a/public/features.json b/public/features.jsonindex 70d30b786..33059eb42 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-06T20:50:51.799Z",+ "generated_at": "2026-07-06T21:07:37.673Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",@@ -856,6 +856,16 @@"title": "Crypto","description": "On-chain features: pay-per-call, token launches, vanity wallets.","pages": [+ {+ "path": "/sperax",+ "title": "Sperax on three.ws",+ "description": "Free AI credits for three.ws users on chat.sperax.io — what the integration is and how to claim it.",+ "added": "2026-07-05",+ "auth": null,+ "indexable": true,+ "tags": [],+ "showcase": false+ },{"path": "/agi","title": "The AGI — narrow by design",diff --git a/public/llms-full.txt b/public/llms-full.txtindex d267b654a..7f73fa2e2 100644--- a/public/llms-full.txt+++ b/public/llms-full.txt@@ -522,6 +522,12 @@ Global leaderboard for the walking avatar — distance walked, sites visited, anOn-chain features: pay-per-call, token launches, vanity wallets.+### Sperax on three.ws++URL: https://three.ws/sperax++Free AI credits for three.ws users on chat.sperax.io — what the integration is and how to claim it.+### The AGI — narrow by designURL: https://three.ws/agidiff --git a/public/llms.txt b/public/llms.txtindex 783eddba4..e28ac2046 100644--- a/public/llms.txt+++ b/public/llms.txt@@ -105,6 +105,7 @@ Experimental features actively shipping. Expect fast iteration.On-chain features: pay-per-call, token launches, vanity wallets.+- [Sperax on three.ws](https://three.ws/sperax): Free AI credits for three.ws users on chat.sperax.io — what the integration is and how to claim it.- [The AGI — narrow by design](https://three.ws/agi): The first AGI, narrow by design: a single autonomous agent that is genuinely superhuman at one thing — trading memecoins on pump.fun (Solana) — and deliberately nothing else. Watch its embodied 3D body react to the market in real time, read every decision it makes with its stated confidence, and hold it to a chain-proven track record. Outside that one domain, it claims nothing.- [Oracle — AI Conviction Engine](https://three.ws/oracle): A fused AI conviction engine for every pump.fun launch: pedigree (who's buying), structure (bundle vs organic), narrative (what story is it riding), and momentum — fused into a single 0–100 conviction score with transparent pillar reasoning.- [Oracle Docs — the conviction engine, end to end](https://three.ws/oracle/docs): The complete Oracle reference: the thesis behind fused pump.fun conviction, the four-pillar scoring model and its exact math, the data pipeline and worker loops, the calibration and backtest evidence, the agent action loop, the full API, the data model, limitations, and where it scales next — written for everyone from first-time readers to researchers.diff --git a/public/nav-data.js b/public/nav-data.jsindex 588244494..fdef8ec4c 100644--- a/public/nav-data.js+++ b/public/nav-data.js@@ -82,6 +82,13 @@ export const NAV_GROUPS = [href: '/pose',desc: 'Pose with IK, keyframe a timeline → animated GLB you can sell',},+ {+ title: 'Agent Identity Studio',+ href: '/agent-identities',+ badge: 'Live',+ badgeTone: 'live',+ desc: 'Brand brief → rigged avatar + studio renders for your AI agent',+ },],},{diff --git a/public/sitemap/index.html b/public/sitemap/index.htmlindex 3c9948620..5f77fa900 100644--- a/public/sitemap/index.html+++ b/public/sitemap/index.html@@ -65,7 +65,7 @@<main class="sm-wrap"><div class="sm-hero"><h1>Sitemap</h1>- <p>All 381 pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</p>+ <p>All 382 pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</p><div class="sm-formats"><a href="/sitemap.xml"><code>sitemap.xml</code> · for search engines</a><a href="/llms.txt"><code>llms.txt</code> · for AI agents</a>@@ -77,7 +77,7 @@</div><div class="sm-filter"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></svg>- <input id="sm-filter-input" type="search" placeholder="Filter 381 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" />+ <input id="sm-filter-input" type="search" placeholder="Filter 382 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" /><kbd aria-hidden="true">/</kbd></div><p class="sm-filter-count" id="sm-filter-count" role="status" aria-live="polite"></p>@@ -697,10 +697,17 @@<section class="sm-section" id="crypto"><header>- <h2>Crypto<span class="sm-count" data-count>81</span></h2>+ <h2>Crypto<span class="sm-count" data-count>82</span></h2><p class="sm-section-desc">On-chain features: pay-per-call, token launches, vanity wallets.</p></header><ul class="sm-list">+ <li>+ <a href="/sperax">+ <span class="sm-title">Sperax on three.ws</span>+ <span class="sm-path">/sperax</span>+ <span class="sm-desc">Free AI credits for three.ws users on chat.sperax.io — what the integration is and how to claim it.</span>+ </a>+ </li><li><a href="/agi"><span class="sm-title">The AGI — narrow by design</span>