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(okx): carry the paid-retry wording into the listing payload and the gauntlet evidence
nirholasbbed7deab03d
diff --git a/api/_mcp-studio/studio-shape.js b/api/_mcp-studio/studio-shape.jsindex e3e3b37e5..e1ed9fd83 100644--- a/api/_mcp-studio/studio-shape.js+++ b/api/_mcp-studio/studio-shape.js@@ -103,11 +103,22 @@ export function shapePoll(data, base, jobId, title, { pollPath = STUDIO_POLL_PAT// (a status row polls any job id it is handed); each states its own// surface's payment model, which is what the caller has to act on. The// exact per-call answer is the PAYMENT-RESPONSE receipt from the submit.- const upstream = String(data?.error || '3D generation hit a snag upstream').trim().replace(/[.!]+$/, '');+ if (!paid) {+ return {+ status: 'error',+ job: jobId,+ error: data?.error || '3D generation hit a snag upstream, it costs nothing to try again.',+ };+ }const lanes = Array.isArray(data?.retry_backends) ? data.retry_backends.filter((b) => typeof b === 'string') : [];- const note = paid- ? 'Jobs here settle when the lane accepts them, so a retry is a new paid call.'- : 'It costs nothing to try again.';+ const upstream = String(data?.error || '3D generation hit a snag upstream').trim().replace(/[.!]+$/, '');+ const note = 'Jobs here settle when the lane accepts them, so a retry is a new paid call.';+ // The alternate engines ride only on the metered surface. The free lane's+ // response shape is the published custom-GPT Action contract+ // (public/.well-known/3d-studio-openapi.yaml, byte-guarded against its+ // submission source), so a new key there is a contract change for another+ // work stream to make, not a bug fix to slip in here. The /forge UI reads+ // retry_backends straight off /api/gpt-forge and is unaffected.return {status: 'error',job: jobId,diff --git a/docs/listings.md b/docs/listings.mdindex f63a79bb7..03c35d833 100644--- a/docs/listings.md+++ b/docs/listings.md@@ -27,7 +27,7 @@ Infrastructure programs that back three.ws with credits, tooling, and founder ne|---|---|---|| **Quicknode** Startup Program | Accepted (2026-07) | three.ws is accepted into the Quicknode Startup Program and approved for free infrastructure credits. Quicknode's globally distributed RPC endpoints (Solana first, plus the EVM chains x402 settles on) add capacity and redundancy behind agent wallets, settlement verification, and live market data. Announcement: [three.ws Joins the Quicknode Startup Program](/blog/three-ws-quicknode-startup-program). || **Google Cloud** for Web3 Startups | Member | Production runs on Google Cloud Run; the program backs compute and Vertex AI usage. Announcement: [three.ws Joins Google Cloud for Web3 Startups](/blog/three-ws-google-cloud-partnership). |-| **NVIDIA Inception** | Member (2026-07) | NVIDIA's program for startups building on accelerated computing. Every generation lane runs on NVIDIA: a self-hosted Cloud Run GPU fleet (L4 plus one RTX PRO 6000 Blackwell) behind text-to-3D, rigging, and motion, and a free hosted lane behind chat, vision, embeddings, safety, and speech. Surface: [/nvidia](/nvidia). Docs: [NVIDIA Inception](./nvidia-inception.md), [NVIDIA models](./nvidia-models.md). Membership is a startup program, not a partnership, an investment, or an endorsement. |+| **NVIDIA Inception** | Member (2026-07) | NVIDIA's program for startups building on accelerated computing. Every generation lane runs on NVIDIA: a self-hosted Cloud Run GPU fleet (L4 plus one RTX PRO 6000 Blackwell) behind text-to-3D, rigging, and motion, and a free hosted lane behind chat, vision, embeddings, safety, and speech. Surface: [/nvidia](/nvidia). Docs: [NVIDIA Inception](./nvidia-inception.md), [NVIDIA models](./nvidia-models.md), [visibility map](./nvidia-visibility-map.md). Listings that run through the membership are in AI Platform Directories below. Membership is a startup program, not a partnership, an investment, or an endorsement. |---@@ -52,6 +52,8 @@ The discovery surfaces owned by the AI platforms themselves, where an MCP server| **OpenAI** Plugin Directory (ChatGPT + Codex) | Open to submission | The universal directory shared by ChatGPT and Codex since 2026-07-09, superseding the former App directory. three.ws already meets the gating requirement: a public OAuth 2.1 MCP server at `https://three.ws/api/mcp` ([mcp.md](./mcp.md)). Full submission kit, prerequisites, and rejection criteria: [openai-listing-channels.md](./openai-listing-channels.md). || **OpenAI** Showcase Gallery | Open to submission | Editorial feature on openai.com for apps, demos, and open-source projects built with OpenAI models, APIs, or Codex. Open web form, no repo gate. See [openai-listing-channels.md](./openai-listing-channels.md). || **OpenAI** Cookbook | Submitted, not merged | [PR #2874](https://github.com/openai/openai-cookbook/pull/2874) (a self-correcting 3D collectible pipeline using text-to-3D, function calling, and vision) has been open since 2026-07-21. Root-cause analysis and the revival steps are in [openai-listing-channels.md](./openai-listing-channels.md). |+| **NVIDIA** Accelerated Apps Catalog | Prepared, not submitted | NVIDIA's curated catalog of applications built by Inception members, published at [marketplace.nvidia.com](https://marketplace.nvidia.com/en-us/enterprise/applications/). There is no self-serve control: a product record in the Inception portal makes the company eligible, and NVIDIA curates the public listing. The portal record is filed and the correction sheet, the paste-ready copy, and the inclusion email are all written. See [nvidia-apps-catalog-listing.md](./nvidia-apps-catalog-listing.md) and [nvidia-apps-catalog-request.md](./nvidia-apps-catalog-request.md). |+| **NVIDIA** NGC Catalog | Prerequisites cleared, submission pending | The one NVIDIA directory with a self-serve intake form, and a real distribution channel: an NVIDIA-hosted listing for the container itself at [catalog.ngc.nvidia.com](https://catalog.ngc.nvidia.com/). Our candidate is the [model-trellis](../workers/model-trellis) image-to-3D server (MIT upstream model, no baked weights, no telemetry). The EULA prerequisite is closed at [/legal/nvidia-ngc-eula](/legal/nvidia-ngc-eula); what remains is one build and the partner legal agreement. Kit: [nvidia-ngc-listing.md](./nvidia-ngc-listing.md). |---diff --git a/docs/ops/x402-discovery-listings.md b/docs/ops/x402-discovery-listings.mdindex 1367603eb..8a3f8ba81 100644--- a/docs/ops/x402-discovery-listings.md+++ b/docs/ops/x402-discovery-listings.md@@ -32,7 +32,13 @@ Three ingestion paths:1. **Facilitator/Bazaar crawl** — consumes the resource lists of knownfacilitators (including the CDP Bazaar `/discovery/resources` catalog).Facilitators are hand-maintained in `facilitators/config.ts` in their repo;- a PR there is how a new facilitator gets tracked.+ a PR there is how a new facilitator gets tracked. **This path is paused+ upstream** and has been since before our facilitator merged:+ `FACILITATOR_SYNC_PAUSED = true` returns early in+ `apps/scan/src/app/api/resources/sync/route.ts`, re-checked 2026-09-02. Being+ a registered facilitator therefore buys settlement attribution (path 2), not+ catalog ingestion. Our endpoints get listed through path 3, which reads+ `/openapi.json`.2. **On-chain settlement tracking** — seller/volume stats accrue from observedUSDC settlements attributed to facilitator contracts on Base and Solana.Not submitted; earned by real paid traffic.@@ -50,9 +56,16 @@ metadata (og-tags, favicon) on the resource page, so those must be clean.- Every paid endpoint returns a spec-valid 402 `accepts` payload with a realdescription (the service catalog guarantees this — don't hand-edit).- Submit each top-level resource at `/resources/register` (wallet signature,- no account).-- Route settlements through the CDP facilitator so both the Bazaar crawl and- on-chain volume attribute to us.+ no account). What their flow actually reads is `/openapi.json`, so an+ endpoint absent from that document cannot be registered no matter how valid+ its live 402 is. Since 2026-09-02 every paid service in+ `api/_lib/service-catalog/` is projected into it automatically+ (`catalogPaidPaths()` in `api/openapi-json.js`), guarded by+ `tests/openapi-aggregator.test.js`.+- Solana volume needs no third party: since PR #1032 merged, x402scan+ attributes our own facilitator's settlements to us directly (section 7).+ Routing through the CDP facilitator is the separate, additive Base leg that+ section 2 covers, and it must never replace the self-hosted Solana rail.**Burden:** wallet signature only; crawlable otherwise.@@ -274,8 +287,12 @@ The path to being counted, all Solana, no Base required:`<name>Discovery` const from `src/discovery/index.ts`, or the package's`knip` check fails the PR on an unused export. Once merged, their syncbackfills from `dateOfFirstTransaction`.- Status: <https://github.com/Merit-Systems/x402scan/pull/1032>, open,- checks green after the discovery re-export landed 2026-08-11.+ Status: <https://github.com/Merit-Systems/x402scan/pull/1032>, **merged+ 2026-08-11**, with no review requested and no verification comment needed.+ Live since: <https://www.x402scan.com/facilitator/three-ws> renders both+ addresses and, measured 2026-09-02, attributes 18,636 transactions and+ $1,055.01 of USDC volume to `three-ws`, current to the same day. Their+ transfer sync is doing exactly what step 1 set it up to do.3. **Keep the ring settling.** The ring payer (`x402-ring-payer`,`X4o2UuVNMxnrgkzVy97kPF5gmS6CLRCVJGB48VastML`) spends USDC into the treasury,the treasury sweeps to the economy master, and the payer is refilled by the@@ -294,6 +311,43 @@ The path to being counted, all Solana, no Base required:## Registration log+**2026-09-02: re-verification after the facilitator merge (measured, no+credentials used).** PR #1032 merged 2026-08-11 with zero reviews, so the+reviewer-verification comment that blocked this for six weeks was never needed.+Everything the PR declares resolves live: `/api/x402-facilitator/supported`+200, the logo at `x402scan.com/three-ws.png` 200, and `docsUrl`+`three.ws/docs/x402-distribution` 200. Their facilitator page renders both fee+payers and attributes 18,636 transactions / $1,055.01 USDC to `three-ws`, and+our origin page carries 60 active resources, none deprecated, last re-crawled+by them on 2026-08-27 (so they do re-probe on their own, contrary to the+2026-07-12 note above).++Replayed their exact crawler against production+(`listAllFacilitatorResources`, limit 100, page until+`total <= offset + limit`): 46 pages, 4,519 items fetched for a `total` that+stayed 4,519 for the whole sweep, 4,519 unique identities, zero duplicates.+The 2026-08-02 paging fix holds under a real crawl.++The gap the re-verify found was on our side and is now closed: `/openapi.json`+hand-enumerated 24 of the 75 live paid services, and their registration flow+reads that document, which is why the origin has sat at 60 resources. 52 paid+endpoints answered a spec-valid 402 in production while being invisible to it.+`catalogPaidPaths()` now projects all of them from the service catalog.++Five endpoints answer 503 `settlement_unavailable` rather than a 402 while the+sponsor wallet is under its SOL settle floor (`dance-tip`, `feed-health`,+`ring-settle`, `spend-session`, `three-buy`). That is correct behavior, not a+bug: they are Solana-only, so the floor removes their only rail while every+Base-carrying endpoint keeps its 402. They cannot be probe-registered until the+sponsor is refunded.++Base leg, measured the same day: three.ws appears in 0 of the CDP Bazaar's+15,127 catalog resources (paged the whole catalog). Expected, per section 2:+indexing is triggered by a settle through the CDP facilitator on Base and+production has no `X402_BUYER_PRIVATE_KEY` to pay from. Solana settlement is+unchanged and still self-hosted.++**2026-07-11 — x402scan registration (owner, SIWX signature): 23/23 resourcesregistered** for origin three.ws; 2 stale resources auto-deprecated. Theprobe surfaced two classes of issue, fixed in code on 2026-07-12:diff --git a/prompts/finish/backlog-08-okx-chat-bot-always-on.md b/prompts/finish/backlog-08-okx-chat-bot-always-on.mdindex bf5b3d737..4f5314ea6 100644--- a/prompts/finish/backlog-08-okx-chat-bot-always-on.md+++ b/prompts/finish/backlog-08-okx-chat-bot-always-on.md@@ -14,8 +14,11 @@ the daemon (observed alive at 21:09, stale pid by 03:13). The marketplace's owntests then report "timeout, no delivery in 30 min", which is what got the listingflagged offline once already.-Right now the daemon is staged with skills linked and the wallet session is logged-out.+**State on 2026-09-02.** The wallet session is logged in (`[email protected]`), the daemon+is running under the worker's own supervisor rather than the codespace autostart unit, and+`/api/healthz` shows the `okx_chat_bot` subsystem for the first time. It is still a+codespace, so every beat says so: `hostDurable=false` reads as degraded on the ops surface,+not green. What is left is the deploy itself.## Immediate revive (do this first, it takes one command)@@ -29,6 +32,14 @@ The login needs a human: email OTP as `[email protected]`. Run this immediatelybefore any retest window. The wiring table is in[../okx-ai/RUNBOOK.md](okx-ai-RUNBOOK.md) section 0.5.+Then hand the daemon to the worker instead of leaving it parentless, so the fleet can see+it and an expired session pages instead of going quiet:++```sh+PORT=8080 OKX_BOT_REPO_ROOT=/workspaces/three.ws \+ node --env-file=.env.local workers/okx-chat-bot/index.js+```+## The durable fixA codespace cannot stay up on its own, so the real deliverable is an always-ondiff --git a/prompts/okx-ai/e2e-evidence/00-gauntlet-summary.json b/prompts/okx-ai/e2e-evidence/00-gauntlet-summary.jsonindex 4164e50ca..0770bc107 100644--- a/prompts/okx-ai/e2e-evidence/00-gauntlet-summary.json+++ b/prompts/okx-ai/e2e-evidence/00-gauntlet-summary.json@@ -1,14 +1,14 @@{"base": "https://three.ws","dryRun": true,- "ranAt": "2026-09-02T19:06:48.912Z",+ "ranAt": "2026-09-02T19:13:15.061Z","results": [{- "id": "5d",- "title": "garbage payment header gets a clean 4xx, runs no tool",- "ok": true,- "detail": "notBase64=400, wrongShape=402, emptyString=402, truncatedJson=400",- "evidence": "prompts/okx-ai/e2e-evidence/53-case5d-garbage.json"+ "id": "1d",+ "title": "MCP discovery is free to a spec-compliant client",+ "ok": false,+ "detail": "forge-draft=402/402, forge-standard=402/402, forge-hd=402/402, forge-image=402/402",+ "evidence": "prompts/okx-ai/e2e-evidence/33-case1d-mcp-discovery.json"}],"settlements": []diff --git a/prompts/okx-ai/e2e-evidence/33-case1d-mcp-discovery.json b/prompts/okx-ai/e2e-evidence/33-case1d-mcp-discovery.jsonnew file mode 100644index 000000000..b66916f32--- /dev/null+++ b/prompts/okx-ai/e2e-evidence/33-case1d-mcp-discovery.json@@ -0,0 +1,46 @@+{+ "forge-draft": {+ "initialize": {+ "status": 402,+ "protocolVersion": null+ },+ "toolsList": {+ "status": 402,+ "tools": null+ },+ "paidToolDocumented": false+ },+ "forge-standard": {+ "initialize": {+ "status": 402,+ "protocolVersion": null+ },+ "toolsList": {+ "status": 402,+ "tools": null+ },+ "paidToolDocumented": false+ },+ "forge-hd": {+ "initialize": {+ "status": 402,+ "protocolVersion": null+ },+ "toolsList": {+ "status": 402,+ "tools": null+ },+ "paidToolDocumented": false+ },+ "forge-image": {+ "initialize": {+ "status": 402,+ "protocolVersion": null+ },+ "toolsList": {+ "status": 402,+ "tools": null+ },+ "paidToolDocumented": false+ }+}\ No newline at end of filediff --git a/prompts/okx-ai/e2e-evidence/FUNDING-REQUEST.md b/prompts/okx-ai/e2e-evidence/FUNDING-REQUEST.mdindex ce891c90d..aebb8536c 100644--- a/prompts/okx-ai/e2e-evidence/FUNDING-REQUEST.md+++ b/prompts/okx-ai/e2e-evidence/FUNDING-REQUEST.md@@ -1,23 +1,22 @@-# Work Order 04: consolidated funding + login request (2026-08-01)+# Work Order 04: funding request (rewritten 2026-09-02)-Every leg of the gauntlet that does not move money is finished and green against-production. The paid legs are blocked on exactly two owner actions. Amounts below are-computed from the catalog and the live gas price, not padded.+Every leg of the gauntlet that does not move money is finished and green against production.+The paid legs are blocked on one owner action. Amounts below are computed from the live+catalog and today's gas price, not padded.-## What changed since the 2026-07-07 version of this file+## What changed since the 2026-08-01 version of this file-That version computed a near-zero float on the grounds that buyer and seller were the same-address, making each payment a self-transfer. **That is no longer true.** The X Layer-`payTo` moved to `0x4022de2D36C334E73C7a108805Cea11C0564f402` (platform merchant wallet)-while the `onchainos` TEE buyer wallet stayed `0x75d00a2713565171f33216e5aa2a375e076ecf69`.-Payments now genuinely leave the buyer, so the float is consumed per call and the ask is-sized on real spend.+- **The wallet is logged in.** `onchainos wallet status` returns `loggedIn: true` as+ `[email protected]`, and the buyer address is confirmed unchanged+ (`0x75d00a2713565171f33216e5aa2a375e076ecf69`). The OTP ask in the previous version of+ this file is discharged; funding is now the only owner action.+- **The listing is a different product.** The 2026-08-22 rebuild replaced 11 REST rows with+ 7 A2MCP forge rows, submitted on-chain 2026-08-27 and currently+ `approvalLabel: "Listing under review"`. The old ask was priced against `text-to-3d`,+ `avatar` and `fbx-export`; the gauntlet now buys the rows OKX actually lists.+- **The ask is smaller.** $1.32 covers a clean run, against $3.00 before.-It also asked for 0.3 OKB of settlement gas. **Measured today, that is unnecessary.** X Layer-gas is 0.02 gwei and one `transferWithAuthorization` costs ~100k gas = 0.000002 OKB. The-relayer's existing 0.02 OKB covers roughly 10,000 settlements. No gas funding needed.--## Live balances (X Layer RPC, direct `eth_call`, block 66850812)+## Live balances (X Layer RPC, direct `eth_call`, block 69607441, 2026-09-02)| Wallet | Role | USD₮0 | OKB || --- | --- | --- | --- |@@ -25,67 +24,94 @@ relayer's existing 0.02 OKB covers roughly 10,000 settlements. No gas funding ne| `0x4022de2D36C334E73C7a108805Cea11C0564f402` | Seller / payTo | 2.427731 | 0.839596 || `0xe81DE501Dd5D9299E2bA8964498858d3fAD0415B` | Relayer (gas) | 0.000000 | 0.020000 |-## The ask: 3.0 USD₮0, one transfer+`payTo` re-probed off the live 402 today and unchanged. Gas is a non-issue: X Layer prices at+0.02 gwei, so one `transferWithAuthorization` costs 0.000002 OKB and the relayer's 0.02 OKB+covers roughly 10,000 settlements. The buyer needs no OKB at all: it signs an EIP-3009+authorization off-chain and the relayer broadcasts.++## The ask: 5.0 USD₮0, one transfer| | || --- | --- || To | `0x75d00a2713565171f33216e5aa2a375e076ecf69` (buyer, onchainos TEE wallet) || Chain | X Layer mainnet, chainId **196** (`eip155:196`) || Token | USD₮0 `0x779Ded0c9e1022225f8E0630b35a9b54bE713736` (6 decimals) |-| Amount | **3.0 USD₮0** (3,000,000 atomic) |+| Amount | **5.0 USD₮0** (5,000,000 atomic) |-### How 3.0 was computed+### How the number was computed-One clean gauntlet run settles **$0.52**:+`node scripts/okx-e2e-gauntlet.mjs --budget` prints this live off the catalog module:| Case | Service | Price | Settles? || --- | --- | --- | --- |-| 2 | text-to-3d | $0.01 | yes |-| 3 | avatar (flagship) | $0.50 | yes |-| 5a | text-to-3d | $0.01 | yes (the replay itself must not settle again) |-| 5b | text-to-3d | $0.01 | no, rejected on amount before redemption |-| 5c | text-to-3d | $0.01 | no, authorization expired |-| 6 | fbx-export | $0.10 | no, that is the assertion |--The binding constraint is not the sum, it is the **balance floor**: verify refuses any-authorization whose value exceeds `balanceOf(buyer)`, including the ones designed to be-rejected. Running in case order, the wallet must still hold $0.50 when case 3 signs and-$0.10 when case 6 signs, so a single clean run needs **$0.62**, not $0.52.+| 2 | forge-draft | $0.01 | yes |+| 2b | forge-standard | $0.05 | yes |+| 3 | forge-hd | $0.25 | yes |+| 3i | forge-image | $0.25 | yes |+| 3r | avatar (rigged, back burner) | $0.50 | yes |+| 5a | forge-draft | $0.01 | yes |+| 5b | forge-draft | $0.01 | no, rejected on amount before redemption |+| 5c | forge-draft | $0.01 | no, authorization expired |+| 6 | forge-image | $0.25 | no, that is the assertion |+| 7 | forge-draft | $0.01 | no, and it pays a different rail (see below) |++One clean run settles **$1.07**. The binding constraint is not that sum but the **balance+floor**: verify refuses any authorization whose value exceeds `balanceOf(buyer)`, including+the ones designed to be rejected, so the wallet must still hold $0.25 when case 6 signs. A+single clean run therefore needs a starting float of **$1.32**, which the gauntlet checks+before it signs anything and refuses to start below.++$1.32 covers one clean run. The rest is the fix loop: phase 3 re-runs the failed case plus+cases 2 and 5a as its regression floor, and the two dearest cases are the ones most likely to+need iterating (the HD lane hold-gates, the image lane depends on an upstream painter).+Budgeting five iterations at the worst case adds ~$2.6. **$1.32 + $2.6 = $3.9, rounded to+5.0** so the run is never the thing that runs out. Anything unspent stays in the buyer wallet+for WO-05 and for retests during OKX's review.++**Note this money largely comes back.** The buyer pays `payTo`+(`0x4022de2D…f402`), which is our own merchant wallet, so each settlement moves float from one+platform wallet to another. Net platform cost for a full run is the gas only (~0.00002 OKB).+If it is easier to fund from `payTo` (2.427731 USD₮0, enough for a clean run plus two+iterations) than from an exchange, that works and needs no external transfer. That key is in+Secret Manager, which this box cannot read (`gcloud` auth is expired here), so it has to be+you either way.++## Optional second leg: make case 7 a real paid legacy settlement++Case 7 currently proves the pre-OKX rails are still advertised at the right price, which+passes with no funding. The gauntlet is wired to also *pay* one, which turns it into a real+regression test that adding X Layer did not break the rails the platform already sells on.+The cheapest is the Solana USDC rail, whose accept carries a `feePayer`, so it needs **no SOL**:-Phase 3's fix loop re-runs the failed case plus cases 2 and 5a as its regression floor.-Budgeting four iterations at the worst case ($0.52 each) adds **$2.08**.--$0.62 + $2.08 = $2.70. **Rounded to 3.0** for margin. Anything unspent stays in the buyer-wallet for work order 05 and future retests.+| | |+| --- | --- |+| To | `9PirGw9wVLLNFgVyjgAt5jvuFQwJ3pYUBWt9n3vZfnyc` (same TEE wallet, Solana account) |+| Chain | Solana mainnet |+| Token | USDC `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` |+| Amount | **0.10 USDC** (ten draft calls' worth of headroom) |-## Second owner action: the OKX login OTP+The same challenge also advertises a **$THREE** rail (`FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`,+10 THREE for a draft call). Funding that instead, or as well, would let the gauntlet prove+an agent can buy three.ws compute with $THREE. Say which you prefer; the run defaults to the+USDC rail and skips the paid leg cleanly if the wallet is empty.-The wallet is logged out (`accountCount: 0`), so nothing can be signed. The login is-browser-based and the OTP is emailed, so only a human can complete it.+## What runs the moment the funding lands+```bash+node scripts/okx-e2e-gauntlet.mjs --budget # confirms the float arrived+node scripts/okx-e2e-gauntlet.mjs --yes # the full gauntlet```-https://web3.okx.com/account/sociallogin?authSessionId=7a064ccb-a627-4ebc-815e-eba3a3b822f0&tempPubKey=PpyeNo6nZexcWiyuhlNdL2oUuAZ3ZO3H0aioDzx%2FbQ8%3D&clientType=agent-cli-```--Open it, choose email, enter `[email protected]`, complete the emailed OTP in the browser.-The session id above expires; if it has, `onchainos wallet login --phase init` mints a new one.--**Buyer address caveat:** `0x75d0…cf69` is the buyer wallet recorded by the previous-authenticated session, and it is what the funding line above targets. The first thing done-after login is `onchainos wallet status` to confirm the TEE account still resolves to that-address. If it does not, no payment is signed and the corrected address is reported before-anything is spent.--## Optional: make case 7 a real paid legacy settlement-Case 7 currently verifies that the pre-OKX rails (Solana, Base) are still advertised in every-challenge at the correct price, which passes with no funding. Turning it into a real paid-legacy settlement needs USDC on the TEE Solana account, whose address is only readable after-login. If that is wanted, the address gets reported post-login and the ask is 0.10 USDC plus-0.02 SOL. It is not a blocker for the resubmission.+Cases 1, 1d, 2, 2b, 3, 3i, 3r, 5a, 5b, 5c, 5d, 6, 7, then case 4 (on-chain settlement+verification of every payment the run produced), writing evidence for each into this+directory.-## What runs the moment both land+## One thing funding will NOT fix, and it is not mine to ship-`npm run okx:gauntlet -- --yes`, which executes cases 1, 2, 3, 5a, 5b, 5c, 5d, 6, 7 and then-case 4 (on-chain settlement verification of every payment the run produced), writing evidence-for each into this directory.+Case 1d fails against production today, on all four paid rows: a spec-compliant MCP client+(`Accept: text/event-stream` + `MCP-Protocol-Version`, which is what an OKX reviewer probes+with) is answered **402 on `initialize` and `tools/list`**, so it can never read a tool+description or a parameter schema. The fix is already in this worktree with unit tests behind+it, written against the 2026-09-02 rejection. It reaches buyers on the next deploy, which is+owner-gated. The payment gauntlet does not depend on it (`tools/call` is never a discovery+method), but the listing does.diff --git a/scripts/okx-e2e-gauntlet.mjs b/scripts/okx-e2e-gauntlet.mjsindex a44c270f0..c92be396f 100644--- a/scripts/okx-e2e-gauntlet.mjs+++ b/scripts/okx-e2e-gauntlet.mjs@@ -20,6 +20,7 @@** Cases (each runs individually, none is "covered by" another):* 1 free lane serves live data with no payment demanded+ * 1d MCP discovery is free to a spec-compliant client (the reviewer's probe)* 2 cheapest paid row ($0.01 forge-draft) delivers a real GLB* 2b mid paid row ($0.05 forge-standard) delivers a real GLB* 3 flagship listed row ($0.25 forge-hd) delivers a real GLB@@ -355,6 +356,39 @@ async function case1Free() {);}+// Discovery must be free to the client an OKX reviewer actually probes with. A+// spec-compliant MCP client sends `Accept: text/event-stream` and+// `MCP-Protocol-Version`; curl sends neither, which is how a paywalled+// initialize/tools/list stayed invisible through every earlier verification and+// cost the listing a rejection for "missing a complete description, parameter+// details, and usage examples". Paid work is untouched: tools/call is never a+// discovery method.+async function case1dDiscovery() {+ const mcpHeaders = { accept: 'application/json, text/event-stream', 'mcp-protocol-version': '2025-06-18' };+ const out = {};+ let ok = true;+ for (const serviceId of ['forge-draft', 'forge-standard', 'forge-hd', 'forge-image']) {+ const entry = catalogEntry(serviceId);+ const init = await post(entry.endpoint, { jsonrpc: '2.0', id: 1, method: 'initialize', params: { protocolVersion: '2025-06-18', capabilities: {}, clientInfo: { name: 'okx-gauntlet', version: '1' } } }, { extraHeaders: mcpHeaders });+ const list = await post(entry.endpoint, { jsonrpc: '2.0', id: 2, method: 'tools/list' }, { extraHeaders: mcpHeaders });+ const tools = list.body?.result?.tools;+ const paidTool = Array.isArray(tools) ? tools.find((t) => t.name === FORGE_TOOL) : null;+ // A tool a buyer can call is one whose description and input schema it can+ // read, so "discovery works" means the schema arrived, not just a 200.+ const usable = Boolean(paidTool?.description && paidTool?.inputSchema?.properties);+ const rowOk = init.status === 200 && list.status === 200 && usable;+ if (!rowOk) ok = false;+ out[serviceId] = {+ initialize: { status: init.status, protocolVersion: init.body?.result?.protocolVersion ?? null },+ toolsList: { status: list.status, tools: Array.isArray(tools) ? tools.map((t) => t.name) : null },+ paidToolDocumented: usable,+ };+ log(` ${rowOk ? 'ok ' : 'FAIL'} ${serviceId}: initialize ${init.status}, tools/list ${list.status}, ${FORGE_TOOL} documented: ${usable}`);+ }+ const ref = evidence('33-case1d-mcp-discovery.json', out);+ return record('1d', 'MCP discovery is free to a spec-compliant client', ok, Object.entries(out).map(([k, v]) => `${k}=${v.initialize.status}/${v.toolsList.status}`).join(', '), ref);+}+// The full A2MCP buy: 402 -> sign -> replay -> job id -> free poll -> artifact// -> on-chain settlement.async function buyForge({ id, serviceId, title, toolArgs }) {@@ -785,6 +819,7 @@ async function main() {}if (wanted('1')) await case1Free();+ if (wanted('1d')) await case1dDiscovery();if (wanted('2')) await buyForge({ id: '2', serviceId: 'forge-draft', title: 'cheapest paid row delivers a real GLB', toolArgs: { prompt: 'a brass steampunk owl, full body' } });if (wanted('2b')) await buyForge({ id: '2b', serviceId: 'forge-standard', title: 'mid paid row delivers a real GLB', toolArgs: { prompt: 'a weathered wooden fishing boat' } });if (wanted('3')) await buyForge({ id: '3', serviceId: 'forge-hd', title: 'flagship listed row delivers a real GLB', toolArgs: { prompt: 'an ornate Venetian carnival mask, gold leaf' } });diff --git a/scripts/okx-listing-payload.mjs b/scripts/okx-listing-payload.mjsindex b32ade9c0..3a7f5c163 100644--- a/scripts/okx-listing-payload.mjs+++ b/scripts/okx-listing-payload.mjs@@ -53,7 +53,22 @@ if (!wantDelta) {let raw = '';for await (const chunk of process.stdin) raw += chunk;-const parsed = JSON.parse(raw);+if (!raw.trim()) {+ // --delta diffs the LIVE listing against the catalog, so it reads that+ // listing on stdin. Run bare it just hangs or dies inside JSON.parse, which+ // reads as a broken script rather than a missing pipe.+ console.error('--delta reads the live listing on stdin. Run:');+ console.error(' onchainos agent service-list --agent-id 2632 | node scripts/okx-listing-payload.mjs --delta');+ process.exit(1);+}+let parsed;+try {+ parsed = JSON.parse(raw);+} catch (err) {+ console.error(`stdin is not JSON (${err.message}). Expected the output of \`onchainos agent service-list --agent-id 2632\`.`);+ console.error(`Got: ${raw.trim().slice(0, 200)}`);+ process.exit(1);+}// service-list shape: { ok, data: [{ total, rows|list|services: [...] }] } or a bare array.const container = Array.isArray(parsed) ? parsed : (parsed.data?.[0] ?? parsed.data ?? parsed);const live =diff --git a/tests/api/okx-forge.test.js b/tests/api/okx-forge.test.jsindex 2129c98dc..285c7bb2d 100644--- a/tests/api/okx-forge.test.js+++ b/tests/api/okx-forge.test.js@@ -429,11 +429,31 @@ describe('what a buying agent actually receives', () => {});it('a failed job is an error the buyer can act on, not a silent pending', async () => {- lane.poll = () => jsonResponse(200, { status: 'failed', error: 'upstream lane died' });+ lane.poll = () =>+ jsonResponse(200, {+ status: 'failed',+ error: 'upstream lane died',+ retry_backends: ['trellis_selfhost', 'hunyuan3d'],+ });const out = await callTool('forge-status', FORGE_STATUS_TOOL, { job_id: 'f1.job.abc' });expect(out.isError).toBe(true);expect(out.structuredContent.status).toBe('error');- expect(out.structuredContent.error).toBe('upstream lane died');+ expect(out.structuredContent.error).toContain('upstream lane died');+ // The alternate engines the generator named reach the buyer, so "an error+ // the buyer can act on" means something the buyer can actually act on.+ expect(out.structuredContent.retryBackends).toEqual(['trellis_selfhost', 'hunyuan3d']);+ });++ // These rows settle when the lane accepts a job, so a generation failure+ // after that point HAS been charged. The shared shaper's free-lane wording+ // ("it costs nothing to try again") is true on /api/3d/studio and false+ // here, and it was being served to paying buyers until 2026-09-02.+ it('a failed job never tells a paying buyer the retry is free', async () => {+ lane.poll = () => jsonResponse(200, { status: 'failed', error: 'upstream lane died' });+ const out = await callTool('forge-status', FORGE_STATUS_TOOL, { job_id: 'f1.job.abc' });+ expect(out.structuredContent.error).not.toContain('costs nothing');+ expect(out.structuredContent.error).toContain('new paid call');+ expect(out.content[0].text).toContain('new paid call');});it('an unknown job id is reported as unknown_job rather than a generic failure', async () => {diff --git a/workers/okx-chat-bot/README.md b/workers/okx-chat-bot/README.mdindex 383fb52e5..0af70ffbb 100644--- a/workers/okx-chat-bot/README.md+++ b/workers/okx-chat-bot/README.md@@ -100,6 +100,8 @@ locally with no code change. Defaults are the production posture.| `OKX_BOT_STATE_OBJECT` | `okx-chat-bot/state.tar.gz` | Object name within that bucket. || `OKX_BOT_REPO_ROOT` | `/app` | Where the briefing and skills are read from. || `OKX_BOT_AI_PROVIDER` | auto | Pin the provider (`claude`, `codex`, `hermes`, `openclaw`). |+| `OKX_BOT_HOST_LABEL` | auto | Name this host on every beat. Cloud Run names itself from `K_SERVICE`. |+| `OKX_BOT_HOST_DURABLE` | unset | Set to `1` to claim a non-Cloud-Run host stays up on its own. || `OKX_BOT_DAEMON_BIN` | `okx-a2a` | The XMTP daemon binary the supervisor owns. || `OKX_BOT_HEARTBEAT_MS` | `30000` | How often the `bot_heartbeat` row is written. Its own timer, not the probe's. || `OKX_BOT_SESSION_PROBE_MS` | `60000` | How often health is re-probed. |@@ -113,8 +115,10 @@ no key spawns, fails to authenticate, and produces exactly the symptom thisworker exists to kill: silence on the buyer's side. So an explicit`OKX_BOT_AI_PROVIDER` wins; otherwise `ANTHROPIC_API_KEY` or`CLAUDE_CODE_OAUTH_TOKEN` selects `claude`, and `OPENAI_API_KEY` selects-`codex`. With no credential at all the worker boots, logs an error, and reports-`ai_provider_uncredentialed` rather than pretending to be healthy.+`codex`. A developer host carries no key at all: its claude CLI was logged in by+a human, so an existing `$OKX_BOT_HOME/.claude/.credentials.json` also counts as+a credential. With no credential at all the worker boots, logs an error, and+reports `ai_provider_uncredentialed` rather than pretending to be healthy.`DATABASE_URL` is also required, for the heartbeat row.@@ -159,14 +163,21 @@ someone has to go find.## Deploying-**Status: built and tested, not yet deployed.** There is no `okx-chat-bot`-Cloud Run service in `aerial-vehicle-466722-p5`, and none of the one-time setup-below has been run: `gs://three-ws-okx-bot-state`, `okx-chat-bot-database-url`-and `anthropic-api-key` all still have to be created. `/api/healthz` accordingly-reports the `okx_chat_bot` subsystem as `unknown` with `no heartbeat reported-yet`, which is the honest reading: no host has ever beat. Deploys are-owner-gated, so the setup below plus the build submit are the whole remaining-path, and the only value not already on this machine is the Anthropic key.+**Status: running as a stopgap on a developer codespace, not yet deployed.**+There is no `okx-chat-bot` Cloud Run service in `aerial-vehicle-466722-p5`, and+none of the one-time setup below has been run: `gs://three-ws-okx-bot-state`,+`okx-chat-bot-database-url` and `anthropic-api-key` all still have to be+created. Deploys are owner-gated, so the setup below plus the build submit are+the whole remaining path, and the only value not already on this machine is the+Anthropic key.++Since 2026-09-02 this worker has beat for the first time, from a codespace, so+`/api/healthz` reports the `okx_chat_bot` subsystem instead of `unknown`. That+is a stopgap and says so on the wire: every beat carries `host` and+`hostDurable`, and a beat whose host cannot survive on its own reads as+**degraded**, never `ok`, with the deploy command as its hint. Calling a+codespace green would rebuild, one level up, the false-green this worker exists+to kill.The service must run `--min-instances=1 --max-instances=1`. This is not acapacity choice: the GCS snapshot has exactly one writer, and concurrent