Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
fix(okx-x402): re-issue the quotation when a payment header will not decode
nirholasf895336bb593
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 809e91a1d..e362f7d9c 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -6,6 +6,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr## 2026-09-07+- **A payment we cannot read now comes back with the price list, not a bare error**: When an agent pays one of our x402 endpoints and the payment header arrives mangled (truncated in transit, double-encoded, wrapped by a proxy), the answer used to be a plain 400 error with no prices in it, so the agent had nothing left to work from and no way to retry. Every rejected payment now returns the ordinary 402 with the full list of accepted rails, tokens and amounts attached, exactly as it does when a payment is simply missing. That is what the x402 spec and the OKX seller SDK both do, and it means a paying agent can always read the quote again and try once more. Only a real server fault answers without a quote. (`/docs/okx-marketplace`) `[fix, improvement]`- **Point an AI agent at the Blender on your own machine**: A new MCP server drives the Blender you already have installed, with no GUI open and no add-on to install first. An assistant can now read a 3D file and tell you what is actually in it (objects, triangle counts, materials, bones, animations, real-world size), convert between GLB, glTF, FBX, OBJ, STL, PLY, Collada, Alembic, USD and .blend in either direction, render a preview image of a bare asset file that arrives with no camera or lighting of its own, and run a Blender Python script to do the things no single tool covers, like halving a mesh's triangle count and exporting the result in one step. It also reaches back into three.ws: describe something in a sentence and the free text-to-3D lane generates it and opens it in Blender. Blender runs in the background, one process per request, so it works the same on a laptop, a server, or in CI. `[feature, sdk]`## 2026-09-05diff --git a/api/_mcp/payments.js b/api/_mcp/payments.jsindex e42a26417..792b40405 100644--- a/api/_mcp/payments.js+++ b/api/_mcp/payments.js@@ -16,7 +16,16 @@ export { reservePaymentProof } from '../_lib/x402/payment-identifier-server.js';// server's description and no serviceName/tags/iconUrl.export async function sendX402Error(res, { resourceUrl, accepts, challenge }, err) {if (err instanceof X402Error) {- if (err.status === 402)+ // Every rejected payment re-issues the quotation, including a payment+ // header we could not even decode. OKX's own seller SDK+ // (@okxweb3/x402-core) treats an undecodable PAYMENT-SIGNATURE as "no+ // payment presented" and answers 402 with a fresh challenge; ours+ // answered a bare 400 whose body carried no accepts[] at all. A+ // marketplace validator that replays a payment reads that response as+ // "x402 quotation cannot be parsed", which is verbatim what OKX's+ // listing review reported (rejection 2026-09-04, internal note). Only a+ // genuine server fault may answer without a quotation.+ if (err.status === 402 || err.code === 'invalid_payment')return await send402(res, { resourceUrl, accepts, ...(challenge || {}), error: err.message });res.statusCode = err.status;res.setHeader('content-type', 'application/json; charset=utf-8');diff --git a/api/okx/3d/[service].js b/api/okx/3d/[service].jsindex 2680aea8b..e2359278f 100644--- a/api/okx/3d/[service].js+++ b/api/okx/3d/[service].js@@ -329,7 +329,13 @@ async function handleRestService(req, res, entry) {try {verified = await verifyPayment({ paymentHeader, requirements });} catch (err) {- if (err instanceof X402Error && err.status === 402) {+ // A rejected payment always leaves with the quotation attached, an+ // undecodable PAYMENT-SIGNATURE included (that one used to answer a+ // bare 400 carrying no accepts[], which a marketplace validator+ // replaying a payment reads as "the x402 quotation cannot be+ // parsed"). Same rule as sendX402Error on the A2MCP branch, and the+ // same rule OKX's own seller SDK follows.+ if (err instanceof X402Error && (err.status === 402 || err.code === 'invalid_payment')) {return sendOkx402(res, { resourceUrl, accepts: requirements, error: err.message });}return error(res, err.status || 502, err.code || 'verify_failed', err.message);diff --git a/data/changelog.json b/data/changelog.jsonindex 33215ea91..004f2da97 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,16 @@{"$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-09-07",+ "title": "A payment we cannot read now comes back with the price list, not a bare error",+ "summary": "When an agent pays one of our x402 endpoints and the payment header arrives mangled (truncated in transit, double-encoded, wrapped by a proxy), the answer used to be a plain 400 error with no prices in it, so the agent had nothing left to work from and no way to retry. Every rejected payment now returns the ordinary 402 with the full list of accepted rails, tokens and amounts attached, exactly as it does when a payment is simply missing. That is what the x402 spec and the OKX seller SDK both do, and it means a paying agent can always read the quote again and try once more. Only a real server fault answers without a quote.",+ "tags": [+ "fix",+ "improvement"+ ],+ "link": "/docs/okx-marketplace"+ },{"date": "2026-09-05","title": "The VS Code extension now animates, refines, optimizes and reviews your models, and checks your embeds",diff --git a/prompts/finish/okx-ai-PROGRESS.md b/prompts/finish/okx-ai-PROGRESS.mdindex 92fbdb997..e05d3d6d7 100644--- a/prompts/finish/okx-ai-PROGRESS.md+++ b/prompts/finish/okx-ai-PROGRESS.md@@ -6,6 +6,75 @@ Work Order 04 session, no earlier entries existed because no earlier work order---+## 2026-09-07, the new rejection email is the OLD verdict: the listing state never moved, and OKX's own validator now passes us++An OKX rejection mail landed naming all four paid rows plus the internal note *"x402 quotation+cannot be parsed or is non-compliant (parsing failed / no exact / missing amount), and has not+entered the payment stage."* Read live before touching anything: **that is rejection #3's+verdict, not a new one.**++- `agent get-my-agents` reads `approvalDisplayStatus: 5`, `approvalLabel: "Listing rejected"`,+ the same state as 2026-09-05. Nothing was resubmitted, so nothing was re-reviewed. The+ 4109-character `approvalRemark` is the same text the 2026-09-04 session root-caused+ (the internal note included, quoted verbatim in the entry below).+- Both defects that verdict describes have been live-fixed since the 2026-09-05 release, and+ both gates are green again today against production: `okx-compliance-probe.mjs` →+ `PASS 20 probes` (capture `85-2026-09-07-compliance-probe.json`),+ `okx-payment-leg-probe.mjs` → `PASS 4 paid rows accepted a signed authorization`.++### OKX's own validator was pointed at the endpoints, and it passes++`onchainos agent x402-check` is the tool behind the review's quotation stage. All four paid+rows answer `"valid": true` with the rail resolved exactly as the service row registers it+(`eip155:196`, `exact`, USD₮0, `payTo 0x4022de2D…f402`, `amountMinimal` 10000 / 50000 /+250000 / 250000). Capture: `prompts/okx-ai/e2e-evidence/84-2026-09-07-okx-x402-check.json`.+This is now a third pre-resubmission check in RUNBOOK §5.5.++The live challenge was also run through OKX's published seller SDK+(`@okxweb3/[email protected]`, the package the rejection mail's SDK guide points at). Its+`PaymentRequiredSchema` (zod) accepts our envelope from all eleven request shapes probed+(bodyless POST, `{}`, `initialize`, `tools/list`, `tools/call`, text/plain, form-encoded,+GET, GET+HTML, and a garbage payment header), and its `Base64EncodedRegex` accepts our+`PAYMENT-REQUIRED` header. There is no shape left in which a compliant reader fails to parse+what we serve.++### One real divergence found and fixed: the rejection with no quotation++The SDK's `extractPayment` catches a `PAYMENT-SIGNATURE` it cannot base64/JSON-decode and+treats the request as unpaid, so the caller gets the ordinary 402 with the whole `accepts`+back. Ours answered that single case with a bare `HTTP 400 {"error":"invalid_payment"}` and+no `accepts` at all (long-standing, captured in `53-case5d-garbage.json` back in July). It is+the only response on the paid path with nothing to parse, and it is what an audit agent+replaying a payment would collect if its header ever arrived mangled. Both branches now+re-issue the quotation:++- A2MCP rows: `sendX402Error()` in `api/_mcp/payments.js` re-quotes on `err.status === 402`+ **or** `err.code === 'invalid_payment'`. Only a genuine 5xx fault still answers bare.+- REST rows: the same condition in `handleRestService()` (`api/okx/3d/[service].js`).+- Covered by new cases in `tests/api/okx-forge.test.js` (43 pass) and+ `tests/api/okx-3d-services.test.js`; `specs/okx-agent-payments.md` §1.1 states the rule.++### Two chain facts worth not re-deriving++- The audit address `0xbc59eb75…2033` holds **19.550213 USD₮0**, unchanged since 2026-09-04.+ It was always funded, so no funding story explains any rejection.+- No USD₮0 has moved INTO the seller `0x4022de2D…f402` between 2026-08-03 and 2026-09-07+ (3.4 M blocks swept in 10 k chunks via `xlayer.drpc.org`; the public OKX/xlayer nodes cap+ `eth_getLogs` at a 100-block range, which is why this needs drpc). Its 2.427731 USD₮0+ predates that window. Nothing has ever settled on this rail, including OKX's 2026-08-27 QA+ visit.++### Still the only open step, still owner-gated++```bash+onchainos agent activate --agent-id 2632 --preferred-language en-US+```++An on-chain write. The code fix above should ship with it (deploy is owner-gated too), but it+does not block: the quotation the reviewer parses is already correct in production today.++---+## 2026-09-05, both fixes are LIVE in production and both were proven on the wire; only the resubmission is leftThe deploy the previous session staged went out with the morning release (production readsdiff --git a/prompts/finish/okx-ai-RUNBOOK.md b/prompts/finish/okx-ai-RUNBOOK.mdindex 732fc62c3..7d5559ae0 100644--- a/prompts/finish/okx-ai-RUNBOOK.md+++ b/prompts/finish/okx-ai-RUNBOOK.md@@ -375,15 +375,18 @@ This is the holder-visible moment. Work the list top to bottom.----## 5.5 The pre-resubmission gate: two probes, both must pass+## 5.5 The pre-resubmission gate: three checks, all must pass-Never resubmit on a code review alone. Both of these run against live production, take about-a minute together, and each one covers a leg the other cannot see. Every rejection since-2026-07-04 would have been caught by one of them.+Never resubmit on a code review alone. These run against live production, take about a minute+together, and each one covers a leg the others cannot see. Every rejection since 2026-07-04+would have been caught by one of them.```bashnode scripts/okx-compliance-probe.mjs # the 402 quotation, as the reviewer parses itnode scripts/okx-payment-leg-probe.mjs # the signed replay, as the reviewer pays it+for s in forge-draft forge-standard forge-hd forge-image; do+ onchainos agent x402-check --endpoint "https://three.ws/api/okx/3d/$s" --agent-id 2632+done # the quotation, as OKX's OWN validator parses it```- **`okx-compliance-probe.mjs`** walks all four paid rows through five request shapes,@@ -400,7 +403,16 @@ node scripts/okx-payment-leg-probe.mjs # the signed replay, as the reviewerbuyer holds no USD₮0, so the run spends nothing; if it is ever funded the script refuses tosign without `--allow-spend`, because then a pass would be a real purchase.-Both take `--base` (point them at a staged worktree's server before a deploy) and `--out`+- **`onchainos agent x402-check`** is OKX's own endpoint validator, the tool behind the+ review's quotation stage, so it answers the exact question the rejection note asks. A pass+ reads `"valid": true` and echoes the rail it resolved: `network: eip155:196`,+ `scheme: exact`, `amountMinimal` equal to the row's registered fee, `payTo` and `asset`+ matching the service row. It needs a live wallet session (`onchainos wallet status` →+ `loggedIn: true`), which is why the two scripts above stay the machine-runnable gate and+ this is the confirmation on top of them. Capture:+ `prompts/okx-ai/e2e-evidence/84-2026-09-07-okx-x402-check.json`.++The two scripts take `--base` (point them at a staged worktree's server before a deploy) and `--out`(write the capture into `prompts/okx-ai/e2e-evidence/`). Commit the captures: they are theevidence trail for the next review.diff --git a/prompts/okx-ai/e2e-evidence/84-2026-09-07-okx-x402-check.json b/prompts/okx-ai/e2e-evidence/84-2026-09-07-okx-x402-check.jsonnew file mode 100644index 000000000..b2a207e06--- /dev/null+++ b/prompts/okx-ai/e2e-evidence/84-2026-09-07-okx-x402-check.json@@ -0,0 +1,59 @@+{+ "captured_at": "2026-09-07T01:06:51.767Z",+ "tool": "onchainos agent x402-check (onchainos v4.5.2)",+ "note": "OKX's own endpoint validator, the tool behind the listing review's quotation stage. Run against production.",+ "rows": {+ "forge-draft": {+ "ok": true,+ "amountHuman": 0.01,+ "amountMinimal": "10000",+ "asset": "0x779ded0c9e1022225f8e0630b35a9b54be713736",+ "decimals": 6,+ "network": "eip155:196",+ "payTo": "0x4022de2D36C334E73C7a108805Cea11C0564f402",+ "scheme": "exact",+ "tokenSymbol": "USDT",+ "valid": true,+ "x402Version": 2+ },+ "forge-standard": {+ "ok": true,+ "amountHuman": 0.05,+ "amountMinimal": "50000",+ "asset": "0x779ded0c9e1022225f8e0630b35a9b54be713736",+ "decimals": 6,+ "network": "eip155:196",+ "payTo": "0x4022de2D36C334E73C7a108805Cea11C0564f402",+ "scheme": "exact",+ "tokenSymbol": "USDT",+ "valid": true,+ "x402Version": 2+ },+ "forge-hd": {+ "ok": true,+ "amountHuman": 0.25,+ "amountMinimal": "250000",+ "asset": "0x779ded0c9e1022225f8e0630b35a9b54be713736",+ "decimals": 6,+ "network": "eip155:196",+ "payTo": "0x4022de2D36C334E73C7a108805Cea11C0564f402",+ "scheme": "exact",+ "tokenSymbol": "USDT",+ "valid": true,+ "x402Version": 2+ },+ "forge-image": {+ "ok": true,+ "amountHuman": 0.25,+ "amountMinimal": "250000",+ "asset": "0x779ded0c9e1022225f8e0630b35a9b54be713736",+ "decimals": 6,+ "network": "eip155:196",+ "payTo": "0x4022de2D36C334E73C7a108805Cea11C0564f402",+ "scheme": "exact",+ "tokenSymbol": "USDT",+ "valid": true,+ "x402Version": 2+ }+ }+}diff --git a/prompts/okx-ai/e2e-evidence/85-2026-09-07-compliance-probe.json b/prompts/okx-ai/e2e-evidence/85-2026-09-07-compliance-probe.jsonnew file mode 100644index 000000000..1418b4dd6--- /dev/null+++ b/prompts/okx-ai/e2e-evidence/85-2026-09-07-compliance-probe.json@@ -0,0 +1,670 @@+{+ "captured_at": "2026-09-07T01:07:01.734Z",+ "base": "https://three.ws",+ "what": "Live A2MCP compliance capture of the four paid OKX.AI forge rows: the bodyless self-check answers the quotation, and every quotation names each rail once at the registered list price.",+ "pass": true,+ "failures": [],+ "probes": [+ {+ "service": "forge-draft",+ "probe": "GET, the SSE transport a streaming MCP client opens with",+ "status": 402,+ "payment_required_header": true,+ "accepts": [+ {+ "scheme": "exact",+ "network": "eip155:196",+ "asset": "USD₮0 (X Layer settlement stablecoin)",+ "amount": "10000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "USDC (Solana)",+ "amount": "10000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "$THREE",+ "amount": "10000000"+ },+ {+ "scheme": "exact",+ "network": "eip155:8453",+ "asset": "USDC (Base)",+ "amount": "10000"+ }+ ],+ "duplicate_rails": false+ },+ {+ "service": "forge-draft",+ "probe": "docs self-check: POST, no body, no content-type",+ "status": 402,+ "payment_required_header": true,+ "accepts": [+ {+ "scheme": "exact",+ "network": "eip155:196",+ "asset": "USD₮0 (X Layer settlement stablecoin)",+ "amount": "10000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "USDC (Solana)",+ "amount": "10000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "$THREE",+ "amount": "10000000"+ },+ {+ "scheme": "exact",+ "network": "eip155:8453",+ "asset": "USDC (Base)",+ "amount": "10000"+ }+ ],+ "duplicate_rails": false+ },+ {+ "service": "forge-draft",+ "probe": "POST {} with content-type application/json",+ "status": 402,+ "payment_required_header": true,+ "accepts": [+ {+ "scheme": "exact",+ "network": "eip155:196",+ "asset": "USD₮0 (X Layer settlement stablecoin)",+ "amount": "10000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "USDC (Solana)",+ "amount": "10000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "$THREE",+ "amount": "10000000"+ },+ {+ "scheme": "exact",+ "network": "eip155:8453",+ "asset": "USDC (Base)",+ "amount": "10000"+ }+ ],+ "duplicate_rails": false+ },+ {+ "service": "forge-draft",+ "probe": "POST a plain business payload, naming no tool",+ "status": 402,+ "payment_required_header": true,+ "accepts": [+ {+ "scheme": "exact",+ "network": "eip155:196",+ "asset": "USD₮0 (X Layer settlement stablecoin)",+ "amount": "10000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "USDC (Solana)",+ "amount": "10000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "$THREE",+ "amount": "10000000"+ },+ {+ "scheme": "exact",+ "network": "eip155:8453",+ "asset": "USDC (Base)",+ "amount": "10000"+ }+ ],+ "duplicate_rails": false+ },+ {+ "service": "forge-draft",+ "probe": "well-formed tools/call forge_3d (control)",+ "status": 402,+ "payment_required_header": true,+ "accepts": [+ {+ "scheme": "exact",+ "network": "eip155:196",+ "asset": "USD₮0 (X Layer settlement stablecoin)",+ "amount": "10000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "USDC (Solana)",+ "amount": "10000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "$THREE",+ "amount": "10000000"+ },+ {+ "scheme": "exact",+ "network": "eip155:8453",+ "asset": "USDC (Base)",+ "amount": "10000"+ }+ ],+ "duplicate_rails": false+ },+ {+ "service": "forge-standard",+ "probe": "GET, the SSE transport a streaming MCP client opens with",+ "status": 402,+ "payment_required_header": true,+ "accepts": [+ {+ "scheme": "exact",+ "network": "eip155:196",+ "asset": "USD₮0 (X Layer settlement stablecoin)",+ "amount": "50000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "USDC (Solana)",+ "amount": "50000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "$THREE",+ "amount": "10000000"+ },+ {+ "scheme": "exact",+ "network": "eip155:8453",+ "asset": "USDC (Base)",+ "amount": "50000"+ }+ ],+ "duplicate_rails": false+ },+ {+ "service": "forge-standard",+ "probe": "docs self-check: POST, no body, no content-type",+ "status": 402,+ "payment_required_header": true,+ "accepts": [+ {+ "scheme": "exact",+ "network": "eip155:196",+ "asset": "USD₮0 (X Layer settlement stablecoin)",+ "amount": "50000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "USDC (Solana)",+ "amount": "50000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "$THREE",+ "amount": "10000000"+ },+ {+ "scheme": "exact",+ "network": "eip155:8453",+ "asset": "USDC (Base)",+ "amount": "50000"+ }+ ],+ "duplicate_rails": false+ },+ {+ "service": "forge-standard",+ "probe": "POST {} with content-type application/json",+ "status": 402,+ "payment_required_header": true,+ "accepts": [+ {+ "scheme": "exact",+ "network": "eip155:196",+ "asset": "USD₮0 (X Layer settlement stablecoin)",+ "amount": "50000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "USDC (Solana)",+ "amount": "50000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "$THREE",+ "amount": "10000000"+ },+ {+ "scheme": "exact",+ "network": "eip155:8453",+ "asset": "USDC (Base)",+ "amount": "50000"+ }+ ],+ "duplicate_rails": false+ },+ {+ "service": "forge-standard",+ "probe": "POST a plain business payload, naming no tool",+ "status": 402,+ "payment_required_header": true,+ "accepts": [+ {+ "scheme": "exact",+ "network": "eip155:196",+ "asset": "USD₮0 (X Layer settlement stablecoin)",+ "amount": "50000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "USDC (Solana)",+ "amount": "50000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "$THREE",+ "amount": "10000000"+ },+ {+ "scheme": "exact",+ "network": "eip155:8453",+ "asset": "USDC (Base)",+ "amount": "50000"+ }+ ],+ "duplicate_rails": false+ },+ {+ "service": "forge-standard",+ "probe": "well-formed tools/call forge_3d (control)",+ "status": 402,+ "payment_required_header": true,+ "accepts": [+ {+ "scheme": "exact",+ "network": "eip155:196",+ "asset": "USD₮0 (X Layer settlement stablecoin)",+ "amount": "50000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "USDC (Solana)",+ "amount": "50000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "$THREE",+ "amount": "10000000"+ },+ {+ "scheme": "exact",+ "network": "eip155:8453",+ "asset": "USDC (Base)",+ "amount": "50000"+ }+ ],+ "duplicate_rails": false+ },+ {+ "service": "forge-hd",+ "probe": "GET, the SSE transport a streaming MCP client opens with",+ "status": 402,+ "payment_required_header": true,+ "accepts": [+ {+ "scheme": "exact",+ "network": "eip155:196",+ "asset": "USD₮0 (X Layer settlement stablecoin)",+ "amount": "250000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "USDC (Solana)",+ "amount": "250000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "$THREE",+ "amount": "10000000"+ },+ {+ "scheme": "exact",+ "network": "eip155:8453",+ "asset": "USDC (Base)",+ "amount": "250000"+ }+ ],+ "duplicate_rails": false+ },+ {+ "service": "forge-hd",+ "probe": "docs self-check: POST, no body, no content-type",+ "status": 402,+ "payment_required_header": true,+ "accepts": [+ {+ "scheme": "exact",+ "network": "eip155:196",+ "asset": "USD₮0 (X Layer settlement stablecoin)",+ "amount": "250000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "USDC (Solana)",+ "amount": "250000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "$THREE",+ "amount": "10000000"+ },+ {+ "scheme": "exact",+ "network": "eip155:8453",+ "asset": "USDC (Base)",+ "amount": "250000"+ }+ ],+ "duplicate_rails": false+ },+ {+ "service": "forge-hd",+ "probe": "POST {} with content-type application/json",+ "status": 402,+ "payment_required_header": true,+ "accepts": [+ {+ "scheme": "exact",+ "network": "eip155:196",+ "asset": "USD₮0 (X Layer settlement stablecoin)",+ "amount": "250000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "USDC (Solana)",+ "amount": "250000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "$THREE",+ "amount": "10000000"+ },+ {+ "scheme": "exact",+ "network": "eip155:8453",+ "asset": "USDC (Base)",+ "amount": "250000"+ }+ ],+ "duplicate_rails": false+ },+ {+ "service": "forge-hd",+ "probe": "POST a plain business payload, naming no tool",+ "status": 402,+ "payment_required_header": true,+ "accepts": [+ {+ "scheme": "exact",+ "network": "eip155:196",+ "asset": "USD₮0 (X Layer settlement stablecoin)",+ "amount": "250000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "USDC (Solana)",+ "amount": "250000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "$THREE",+ "amount": "10000000"+ },+ {+ "scheme": "exact",+ "network": "eip155:8453",+ "asset": "USDC (Base)",+ "amount": "250000"+ }+ ],+ "duplicate_rails": false+ },+ {+ "service": "forge-hd",+ "probe": "well-formed tools/call forge_3d (control)",+ "status": 402,+ "payment_required_header": true,+ "accepts": [+ {+ "scheme": "exact",+ "network": "eip155:196",+ "asset": "USD₮0 (X Layer settlement stablecoin)",+ "amount": "250000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "USDC (Solana)",+ "amount": "250000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "$THREE",+ "amount": "10000000"+ },+ {+ "scheme": "exact",+ "network": "eip155:8453",+ "asset": "USDC (Base)",+ "amount": "250000"+ }+ ],+ "duplicate_rails": false+ },+ {+ "service": "forge-image",+ "probe": "GET, the SSE transport a streaming MCP client opens with",+ "status": 402,+ "payment_required_header": true,+ "accepts": [+ {+ "scheme": "exact",+ "network": "eip155:196",+ "asset": "USD₮0 (X Layer settlement stablecoin)",+ "amount": "250000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "USDC (Solana)",+ "amount": "250000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "$THREE",+ "amount": "10000000"+ },+ {+ "scheme": "exact",+ "network": "eip155:8453",+ "asset": "USDC (Base)",+ "amount": "250000"+ }+ ],+ "duplicate_rails": false+ },+ {+ "service": "forge-image",+ "probe": "docs self-check: POST, no body, no content-type",+ "status": 402,+ "payment_required_header": true,+ "accepts": [+ {+ "scheme": "exact",+ "network": "eip155:196",+ "asset": "USD₮0 (X Layer settlement stablecoin)",+ "amount": "250000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "USDC (Solana)",+ "amount": "250000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "$THREE",+ "amount": "10000000"+ },+ {+ "scheme": "exact",+ "network": "eip155:8453",+ "asset": "USDC (Base)",+ "amount": "250000"+ }+ ],+ "duplicate_rails": false+ },+ {+ "service": "forge-image",+ "probe": "POST {} with content-type application/json",+ "status": 402,+ "payment_required_header": true,+ "accepts": [+ {+ "scheme": "exact",+ "network": "eip155:196",+ "asset": "USD₮0 (X Layer settlement stablecoin)",+ "amount": "250000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "USDC (Solana)",+ "amount": "250000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "$THREE",+ "amount": "10000000"+ },+ {+ "scheme": "exact",+ "network": "eip155:8453",+ "asset": "USDC (Base)",+ "amount": "250000"+ }+ ],+ "duplicate_rails": false+ },+ {+ "service": "forge-image",+ "probe": "POST a plain business payload, naming no tool",+ "status": 402,+ "payment_required_header": true,+ "accepts": [+ {+ "scheme": "exact",+ "network": "eip155:196",+ "asset": "USD₮0 (X Layer settlement stablecoin)",+ "amount": "250000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "USDC (Solana)",+ "amount": "250000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "$THREE",+ "amount": "10000000"+ },+ {+ "scheme": "exact",+ "network": "eip155:8453",+ "asset": "USDC (Base)",+ "amount": "250000"+ }+ ],+ "duplicate_rails": false+ },+ {+ "service": "forge-image",+ "probe": "well-formed tools/call forge_3d (control)",+ "status": 402,+ "payment_required_header": true,+ "accepts": [+ {+ "scheme": "exact",+ "network": "eip155:196",+ "asset": "USD₮0 (X Layer settlement stablecoin)",+ "amount": "250000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "USDC (Solana)",+ "amount": "250000"+ },+ {+ "scheme": "exact",+ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",+ "asset": "$THREE",+ "amount": "10000000"+ },+ {+ "scheme": "exact",+ "network": "eip155:8453",+ "asset": "USDC (Base)",+ "amount": "250000"+ }+ ],+ "duplicate_rails": false+ }+ ],+ "note": "Re-run after the OKX rejection email of 2026-09-07 (the rejection-#3 verdict, unchanged approval state). Production, all four paid rows."+}diff --git a/public/changelog.json b/public/changelog.jsonindex 1fa30b8c8..30c376078 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,11 +1,22 @@{- "generated_at": "2026-09-07T00:35:01.169Z",+ "generated_at": "2026-09-07T01:11:24.115Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws","url": "https://three.ws"},"entries": [+ {+ "date": "2026-09-07",+ "type": "update",+ "title": "A payment we cannot read now comes back with the price list, not a bare error",+ "summary": "When an agent pays one of our x402 endpoints and the payment header arrives mangled (truncated in transit, double-encoded, wrapped by a proxy), the answer used to be a plain 400 error with no prices in it, so the agent had nothing left to work from and no way to retry. Every rejected payment now returns the ordinary 402 with the full list of accepted rails, tokens and amounts attached, exactly as it does when a payment is simply missing. That is what the x402 spec and the OKX seller SDK both do, and it means a paying agent can always read the quote again and try once more. Only a real server fault answers without a quote.",+ "link": "/docs/okx-marketplace",+ "tags": [+ "fix",+ "improvement"+ ]+ },{"date": "2026-09-07","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex e2d91fb1b..a3cd82b63 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -6,6 +6,14 @@<atom:link href="https://three.ws/changelog.xml" rel="self" type="application/rss+xml"/><description>What's new on three.ws: features, improvements, and releases, newest first.</description><language>en</language>+ <item>+ <title>A payment we cannot read now comes back with the price list, not a bare error</title>+ <link>https://three.ws/docs/okx-marketplace</link>+ <guid isPermaLink="false">2026-09-07:A payment we cannot read now comes back with the price list, not a bare error</guid>+ <pubDate>Mon, 07 Sep 2026 12:00:00 GMT</pubDate>+ <category>fix</category>+ <description>When an agent pays one of our x402 endpoints and the payment header arrives mangled (truncated in transit, double-encoded, wrapped by a proxy), the answer used to be a plain 400 error with no prices in it, so the agent had nothing left to work from and no way to retry. Every rejected payment now returns the ordinary 402 with the full list of accepted rails, tokens and amounts attached, exactly as it does when a payment is simply missing. That is what the x402 spec and the OKX seller SDK both do, and it means a paying agent can always read the quote again and try once more. Only a real server fault answers without a quote.</description>+ </item><item><title>Point an AI agent at the Blender on your own machine</title><link>https://three.ws/changelog</link>diff --git a/public/features.json b/public/features.jsonindex cfb26f765..a1ab3be31 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-09-07T00:35:01.146Z",+ "generated_at": "2026-09-07T01:11:24.106Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",diff --git a/specs/okx-agent-payments.md b/specs/okx-agent-payments.mdindex 32620e01b..9b502e7e8 100644--- a/specs/okx-agent-payments.md+++ b/specs/okx-agent-payments.md@@ -95,6 +95,19 @@ On an unpaid request to a paid A2MCP resource, respond `HTTP 402` with:| `resource.mimeType` | ⬜ optional | `"application/json"` (WIRE-OKLINK). WIRE-COINANK omits it. || top-level `error` | conditional | Added only on a rejected paid replay (e.g. `"insufficient_balance"`); the full `accepts` is re-emitted so the client can retry. See PAY-LEG2 / Appendix D. |+**Rule: every rejected payment leaves with the quotation attached, an undecodable+`PAYMENT-SIGNATURE` included.** OKX's seller SDK (`@okxweb3/x402-core`,+`x402HTTPResourceServer.extractPayment`) catches a header it cannot base64/JSON-decode, logs+it, and treats the request as unpaid, so the caller gets the ordinary 402 with the full+`accepts` back. Ours used to answer that one case with a bare `HTTP 400+{"error":"invalid_payment"}` and no `accepts` at all. A marketplace validator that replays a+payment reads a response with no `accepts` as "the x402 quotation cannot be parsed", which is+verbatim the internal note on the 2026-09-04 rejection. Only a genuine server fault (5xx) may+answer a paid request without re-emitting the quotation. Implemented in `sendX402Error()`+([api/_mcp/payments.js](../api/_mcp/payments.js)) for the A2MCP rows and in+`handleRestService()` ([api/okx/3d/[service].js](../api/okx/3d/%5Bservice%5D.js)) for the REST+rows; covered by `tests/api/okx-forge.test.js` and `tests/api/okx-3d-services.test.js`.+Notes vs. our current Bazaar-heavy body: OKX sellers emit **no** `extensions.bazaar`, **no** `builder-code`, **no** `offer-receipt`, **no** per-accept `description`. The OKX validator does not require them; keep the body minimal for the `eip155:196` accepts.### 1.2 Verify → do-work → settle (seller → OKX facilitator)diff --git a/tests/api/okx-3d-services.test.js b/tests/api/okx-3d-services.test.jsindex 41b942daa..1747733f0 100644--- a/tests/api/okx-3d-services.test.js+++ b/tests/api/okx-3d-services.test.js@@ -570,6 +570,25 @@ describe('failure paths never charge', () => {expect(settlePaymentMock).not.toHaveBeenCalled();});+ // The decode failure used to be the one rejection on the paid path that+ // answered without a quotation (a bare 400 carrying no accepts[]), which a+ // marketplace validator replaying a payment reads as an unparseable x402+ // quotation. OKX's own seller SDK re-issues the 402 here.+ it('an undecodable payment header re-issues the quotation, never a bare 400', async () => {+ const { X402Error } = await import('../../api/_lib/x402-errors.js');+ verifyPaymentMock.mockRejectedValueOnce(+ new X402Error('invalid_payment', 'X-PAYMENT JSON parse failed: Unexpected token', 400),+ );+ const res = makeRes();+ await handler(paidReq('rig', VALID_INPUT.rig), res);+ expect(res.statusCode).toBe(402);+ const body = JSON.parse(res.body);+ expect(body).toEqual(decode402Header(res));+ expect(body.accepts[0].network).toBe('eip155:196');+ expect(body.error).toMatch(/parse failed/);+ expect(settlePaymentMock).not.toHaveBeenCalled();+ });+it('settle failure after delivered work surfaces the x402 error path', async () => {const { X402Error } = await import('../../api/_lib/x402-errors.js');settlePaymentMock.mockRejectedValueOnce(new X402Error('settle_failed', 'facilitator down', 502));diff --git a/tests/api/okx-forge.test.js b/tests/api/okx-forge.test.jsindex fdeaef0b7..359e90fcb 100644--- a/tests/api/okx-forge.test.js+++ b/tests/api/okx-forge.test.js@@ -303,6 +303,33 @@ describe('402 challenge: the OKX Agent Payments Protocol integration', () => {expect(submitted).toHaveLength(0);});+ // A payment header we cannot decode is still a caller trying to pay, and the+ // only thing it can do next is read the quotation again. OKX's own seller+ // SDK answers an undecodable PAYMENT-SIGNATURE with a fresh 402; ours+ // answered a bare 400 whose body carried no accepts[] at all, the one+ // response on the paid path with nothing to parse.+ for (const header of ['not-base64-at-all!!', Buffer.from('notjson', 'utf8').toString('base64')]) {+ it(`an undecodable PAYMENT-SIGNATURE (${header.slice(0, 12)}) re-issues the quotation, never a bare 400`, async () => {+ const res = makeRes();+ await handler(+ makeReq({+ service: 'forge-draft',+ body: rpc(FORGE_TOOL, { prompt: 'a low-poly fox' }),+ headers: { 'payment-signature': header },+ }),+ res,+ );+ expect(res.statusCode).toBe(402);+ expect(res.headers['payment-required']).toBeTruthy();+ const challenge = JSON.parse(res.body);+ expect(challenge.x402Version).toBe(2);+ expect(challenge.accepts[0].network).toBe('eip155:196');+ expect(challenge.accepts[0].amount).toBe('10000');+ expect(challenge.error).toMatch(/PAYMENT|JSON|decode/i);+ expect(submitted).toHaveLength(0);+ });+ }+// GET is the discovery challenge a reviewer opens first. paymentRequirements()// was quoting the shared default there while the prepended rail quoted the// real price, so the same rail appeared twice at two different amounts and a