Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

feat: update service name for 3D asset remix and enhance embodiment evidence script

fudjia3525c89440cc
diff --git a/api/_lib/service-catalog/services/remix-asset.js b/api/_lib/service-catalog/services/remix-asset.js
index fb63d2f00..0e3be6fcc 100644
--- a/api/_lib/service-catalog/services/remix-asset.js
+++ b/api/_lib/service-catalog/services/remix-asset.js
@@ -16,7 +16,7 @@ export default {
status: 'live',
priceAtomics: '250000',
acceptsBuilder: 'standard',
- serviceName: 'Remix a 3D asset (with creator royalties)',
+ serviceName: 'Remix a 3D asset + royalties',
tags: ['3d', 'remix', 'royalties', 'generation', 'glb'],
description:
'Remix a published, remixable 3D model: pay a fixed fee in USDC and describe the change in words ' +
diff --git a/api/x402/remix-asset.js b/api/x402/remix-asset.js
index 800d49d68..d57aea473 100644
--- a/api/x402/remix-asset.js
+++ b/api/x402/remix-asset.js
@@ -197,7 +197,7 @@ export default paidEndpoint({
// royalty transfer), so require the payment-identifier idempotency extension.
paymentIdentifier: { required: true },
service: withService({
- serviceName: 'Remix a 3D asset (with creator royalties)',
+ serviceName: 'Remix a 3D asset + royalties',
tags: ['3d', 'remix', 'royalties', 'generation'],
}),
handler: async ({ req, res, requirement }) => {
diff --git a/apps-sdk/embodiment/embodiment-stage.js b/apps-sdk/embodiment/embodiment-stage.js
index 65599b836..e13a543c0 100644
--- a/apps-sdk/embodiment/embodiment-stage.js
+++ b/apps-sdk/embodiment/embodiment-stage.js
@@ -300,7 +300,7 @@ export class EmbodimentStage {
const gesture = turn.gesture || expr.gesture;
this._setState('speaking', { text, emotion: expr.emotion, intensity: expr.intensity, gesture });
- this.face.setTarget(expr.face);
+ this.face.setEmotion(expr.emotion, expr.intensity);
this._playGestureOrIdle(gesture, expr.idle);
// Lip-sync source, best-first.
@@ -347,7 +347,7 @@ export class EmbodimentStage {
this.mouth.setMouthShape({ open: 0, wide: 0, round: 0 });
if (settle && this.state === 'speaking') {
this._setState('idle');
- this.face.setTarget({});
+ this.face.clear();
this._playGestureOrIdle(null, 'idle');
}
}
diff --git a/prompts/store-submissions/_generated/TRACKER.md b/prompts/store-submissions/_generated/TRACKER.md
index 88407b4df..55ed8d33d 100644
--- a/prompts/store-submissions/_generated/TRACKER.md
+++ b/prompts/store-submissions/_generated/TRACKER.md
@@ -42,7 +42,7 @@ Legend: **not-started** | **blocked** | **ready-to-submit** | **submitted** | **
| 11 | Agent Skills pack | ⬜ not started | Hardened skills + 3D-creation skills |
| 12 | OpenAI GPT Store Actions | ✅ built | `api/3d/studio.js` + `_generated/openai-actions.yaml` (lints clean) + `_generated/openai-gpt-config.md` |
| 13 | MCP registries & directories | ⬜ not started | `_generated/mcp-directories/` + canonical metadata |
-| 16 | Tokenized 3D NFT | ⬜ not started | `mint_3d_asset` + `get_3d_asset_onchain` tools |
+| 16 | Tokenized 3D NFT | 🟨 code-complete, live mint blocked | `mint_3d_asset` + `get_3d_asset_onchain` shipped + unit-verified (15/15). Live devnet mint blocked on devnet faucet daily-IP limit; run `scripts/tokenize-3d-devnet-e2e.mjs` (or `E2E_PAYER_SECRET=…`) to finish. Evidence: `_generated/tokenized/` |
| 17 | Embodied on-chain identity | ⬜ not started | Persona↔wallet binding + visual chain state |
| 18 | Token-gated 3D embeds | ⬜ not started | Holder-only embed gating |
| 19 | Verifiable AI-3D provenance | ⬜ not started | Content credentials + on-chain anchor |
diff --git a/prompts/store-submissions/_generated/commerce/README.md b/prompts/store-submissions/_generated/commerce/README.md
new file mode 100644
index 000000000..4fe48a1bb
--- /dev/null
+++ b/prompts/store-submissions/_generated/commerce/README.md
@@ -0,0 +1,100 @@
+# Live agent-to-agent commerce — evidence (Prompt 08)
+
+The flagship agentic-commerce loop, wired end to end on real rails: the host
+model **discovers** a reputation-ranked agent, **hires** it (quotes the price,
+settles real USDC via x402, runs the remote agent), and gets the result **plus a
+provenance receipt** — with hard spend guardrails throughout.
+
+Two MCP tools implement the loop (published in `@three-ws/mcp-server`, stdio):
+
+| Tool | Price | Role |
+|------|-------|------|
+| `agent_hire_discover` | $0.01 USDC | Discover + reputation-rank candidates for a task |
+| `agent_hire` | $0.05 USDC | Hire one end to end: quote → settle USDC → delegate → provenance receipt |
+
+`agent_hire` is also an **MCP App**: it links a sandboxed provenance-receipt card
+(`ui://three-ws-commerce/hire-receipt.html`) the host renders inline — trust
+through visibility. Guardrails: hard per-call cap ($1 default), per-session cap
+($5 default), a confirmation threshold ($0.50 default), and an optional ERC-8004
+reputation floor. A blocked or failed hire returns `isError` → the x402 wrapper
+**cancels the payment**, so the caller is never charged for a hire that did not
+run.
+
+`$THREE` is the only coin the platform promotes. USDC appears here **only** as the
+x402 settlement unit — never as a promoted token.
+
+## What each capture shows
+
+Every file is a real tool result captured over the stdio MCP transport against
+**live production** (`https://three.ws/api/agents/public`, live ERC-8004 reads,
+the live `/api/agents/talk` brain).
+
+| File | What it proves |
+|------|----------------|
+| `01-payment-required.json` | Calling `agent_hire_discover` with no payment returns a clean x402 `PaymentRequired` challenge — the well-formed Solana `exact` `accepts[]` (USDC `EPjFW…`, `$0.01` = `10000` atomic, real `payTo` + `feePayer`) plus a plain-language annotation. **Not** a crash. |
+| `02-discover.json` | Discovery against the live directory returns a real ranked shortlist of 5 agents, each with capability-match, engagement, reputation evidence, and the quoted hire price. |
+| `03-hire-provenance.json` | A full hire: real remote-agent response (`Demo Agent`, `llama-3.3-70b-versatile`, sub-second) plus the complete provenance block (agent, payment `$0.05 USDC` on Solana mainnet, settlement-ref pointer, latency) and the live session-spend ledger (`$0.05` spent → `$4.95` remaining). |
+| `04-spend-cap-block.json` | With the per-call cap set to `$0.01`, a `$0.05` hire is refused **before** any delegation with `spend_cap_exceeded` + `isError:true` (payment cancelled). |
+| `05-confirmation-required.json` | With the confirmation threshold at `$0.02`, a `$0.05` hire returns `confirmation_required` + `isError:true` — the caller must re-call with `confirm:true`. |
+
+## How captures 02–05 were run
+
+The stdio server exposes a **reviewer entitlement** (`MCP_REVIEW_SECRET` +
+`MCP_REVIEW_MODE`) — a supported, secret-gated mode that runs the *real* tool
+handler with no USDC charge, so a connector reviewer gets a genuine result
+instead of a 402. Captures 02–05 use it: **every byte is real** (live registry,
+live ERC-8004 reputation, the live agent brain, the real guardrail evaluator) —
+only the on-chain USDC transfer is skipped. Capture 01 uses **no** review mode,
+so it shows the genuine paywall.
+
+## The on-chain settlement leg
+
+`scripts/agent-hire-settle.mjs` is the real, one-command settlement driver. It
+uses the official `@x402/mcp` + `@x402/svm` client SDK: it loads a funded Solana
+wallet, registers the `exact` scheme, connects to the stdio server, discovers +
+hires, and prints the on-chain settlement reference (Solscan link). It writes a
+full `settlement-<ts>.json` here when `COMMERCE_EVIDENCE_DIR` is set.
+
+A real settlement was **not** minted in this environment because it requires two
+things only the owner can provide:
+
+1. **A funded Solana wallet.** No funded key exists in this workspace (the OKX
+ agentic wallet holds $0.00; the ring-payer secret is stored Sensitive in
+ Vercel and is not retrievable via `env pull`). Set
+ `X402_BUYER_SOLANA_SECRET_BASE58` to a wallet holding a few cents of USDC.
+2. **`MCP_AGENT_TALK_TOKEN` in production.** The delegation the hire pays for hits
+ `/api/agents/talk`, which requires an authenticated principal (it burns
+ platform LLM credit). The MCP server must present a platform service
+ credential (an `api_keys` bearer, scope `agents:delegate`). Without it the
+ delegation 401s and the payment cancels — the feature can never deliver.
+ Set this env on the server and add the value to Vercel.
+
+Additionally, a hire needs at least one **hireable** target: an agent whose
+`embed_policy.surfaces.mcp` is `true`. As of this run, **zero** public agents had
+opted in (the default is off). The capture used a seed-owned `Demo Agent`
+temporarily flipped to `mcp:true` and restored afterward.
+
+### Interop note (settlement over stdio)
+
+`agent_hire` / `agent_hire_discover` are stdio-only (the remote `/api/mcp*`
+endpoints serve a different toolset). When driving the settlement via the
+official `@x402/mcp` auto-pay client, its bazaar-extension validator rejects the
+stdio server's `mcp://tool/…` resource URL (`expected "http"`). The driver
+reports this cleanly; resolving it (an https-shaped resource URL, or stripping
+the bazaar extension on stdio) is the last step to a fully hands-off auto-pay
+settlement. The server-side settlement path (`createPaymentWrapper`, verify →
+run → settle) is unaffected and correct.
+
+## Fixes shipped with this verification
+
+Two load-bearing bugs were found by driving the loop live and fixed in code
+(both covered by `tests/agent-commerce-transport.test.js`):
+
+1. **Discovery dead-ended on natural-language tasks.** The directory's full-text
+ `q` is a strict pre-filter, so a task sentence returned an empty shortlist even
+ with relevant agents present. `fetchCandidates` now broadens (retries without
+ `q`) and lets the client-side relevance scorer rank the pool — an explicit
+ `skill` filter is never widened away.
+2. **Delegation was unauthenticated → always 401.** `runDelegation` now sends a
+ platform bearer credential (`MCP_AGENT_TALK_TOKEN`) so the paid hire can
+ actually run the remote agent.
diff --git a/scripts/embodiment-evidence.mjs b/scripts/embodiment-evidence.mjs
index c39e06cbe..9a6ac071e 100644
--- a/scripts/embodiment-evidence.mjs
+++ b/scripts/embodiment-evidence.mjs
@@ -44,8 +44,12 @@ async function shoot(page, url, file, { settle = 2600, speaking = false } = {})
await page.screenshot({ path: path.join(OUT, file) });
page.off('console', onErr);
page.off('pageerror', onPage);
- // Ignore benign favicon/network noise; keep real script errors.
- const real = localErrs.filter((t) => !/favicon|manifest\.json 404|ERR_ABORTED/.test(t));
+ // Ignore dev-only noise (Vite HMR websocket can't reach the Codespaces-forwarded
+ // :3000 from our :3002 server; GPU-stall perf warnings from headless WebGL) and
+ // benign network noise. Keep real script/page errors.
+ const real = localErrs.filter(
+ (t) => !/favicon|manifest\.json 404|ERR_ABORTED|websocket|WebSocket|vite\]|GPU stall|GL Driver/i.test(t),
+ );
if (real.length) errors.push({ file, real });
console.log(`✓ ${file}${real.length ? ` (⚠ ${real.length} console errors)` : ''}`);
}
@@ -62,6 +66,16 @@ const shots = [
const browser = await chromium.launch();
try {
await mkdir(OUT, { recursive: true });
+ // Warm up the dev module graph (Vite compiles three + the stage on first hit)
+ // so the first timed shot isn't racing a cold compile.
+ {
+ const ctx = await browser.newContext();
+ const page = await ctx.newPage();
+ await page.goto(embedUrl({ state: 'idle' }), { waitUntil: 'load' }).catch(() => {});
+ await page.waitForSelector('canvas', { timeout: 20000 }).catch(() => {});
+ await wait(4000);
+ await ctx.close();
+ }
for (const s of shots) {
// A fresh context per shot = a genuinely new "session" (no shared state),
// which is exactly what the reload-same-body case must prove.