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
chore: commit outstanding workspace changes (docs, locales)
nirholas22a876fbddd1
diff --git a/api/_lib/x402-paid-endpoint.js b/api/_lib/x402-paid-endpoint.jsindex 5af87c9c1..077372740 100644--- a/api/_lib/x402-paid-endpoint.js+++ b/api/_lib/x402-paid-endpoint.js@@ -231,19 +231,28 @@ function buildRequirements({ priceAtomics, networks, resourceUrl, payToOverride// operator-fixable state, not "nothing is wired". Surface a retryable 503 with// an actionable message instead of a 500 that reads as a permanent config// error, and never after taking a payment. Self-heals when the secret is set.- const solanaGatedOnSecret =+ const solanaConfigured =networks.some((n) => resolveNetwork(n) === NETWORK_SOLANA_MAINNET) &&(payToOverride?.solana || env.X402_PAY_TO_SOLANA) &&env.X402_FEE_PAYER_SOLANA &&- env.X402_ASSET_MINT_SOLANA &&- !solanaSettleable();- if (solanaGatedOnSecret) {+ env.X402_ASSET_MINT_SOLANA;+ if (solanaConfigured && !solanaSettleable()) {throw new X402Error('settlement_unavailable','paidEndpoint: Solana settlement is temporarily unavailable — the self-facilitator co-signing key (X402_FEE_PAYER_SECRET_BASE58) is not configured. Retry once it is set.',503,);}+ // Same transient class, different cause: fully wired but the sponsor+ // wallet is under its SOL settle floor. Self-heals when treasury-topup+ // (or the operator) refunds the wallet.+ if (solanaConfigured && sponsorKnownBelowFloor()) {+ throw new X402Error(+ 'settlement_unavailable',+ 'paidEndpoint: settlement is temporarily unavailable — the sponsor wallet is below its SOL settle floor. Retry after it is refunded.',+ 503,+ );+ }throw new X402Error('no_payto_configured','paidEndpoint: no X402_PAY_TO_* configured for any requested network',diff --git a/docs/tutorials/pay-for-x402-service.md b/docs/tutorials/pay-for-x402-service.mdindex 018112148..bd04f797e 100644--- a/docs/tutorials/pay-for-x402-service.md+++ b/docs/tutorials/pay-for-x402-service.md@@ -6,7 +6,7 @@ This is the **consume** side of x402. If you want to *build* an endpoint that ta**Prerequisites:**-- A browser wallet: **Phantom** (or Solflare) for Solana, or **MetaMask** / **Coinbase Wallet** for Base (EVM). The checkout detects whichever is installed.+- A browser wallet: **Phantom** (or Solflare) for Solana, or **MetaMask** / **Coinbase Wallet** for Base (EVM). The checkout detects whichever is installed. **Or no browser wallet at all:** if you're signed in to three.ws and one of your agents holds USDC in its own wallet, the checkout offers that agent as a payment method and settles server-side — no extension, no popup (see "Paying" below).- A small USDC balance on the network you'll pay from. Most calls are $0.001–$0.01, so ~$1 USDC funds thousands of them. On Solana you also need a little SOL for the account; on Base the signature is gasless from your side.- Light JavaScript familiarity for the programmatic path (Steps 5–6). The UI paths (Steps 2–4) need none.@@ -38,6 +38,7 @@ There are two distinct problems: **finding** an endpoint and **paying** it.- For **Solana**, the wallet can only sign serialized transactions, so the module posts the challenge's `accept` to `/api/x402-checkout?action=prepare` (`api/x402-checkout.js`), gets back a partially-signed SPL `transferChecked`, has Phantom add the buyer's signature, then `?action=encode`s it into the `X-PAYMENT` header.- For **Base / EVM**, the wallet signs an EIP-3009 `transferWithAuthorization` typed-data message locally — no server prep needed.+- For an **agent wallet** (signed-in three.ws users only), no browser wallet is involved at all. The modal lists your agents with their live USDC balances (from `/api/x402-pay?agents=1`), and picking one sends the payment through `POST /api/x402-pay` — the server decrypts the agent's custodial key (audit-logged), enforces the agent's per-call/daily spend policy *before* signing, builds and settles the SPL transfer, and streams progress back. Underfunded agents render disabled with their exact balance; the option pays Solana USDC only, and never appears on third-party merchant embeds (the session cookie doesn't travel cross-origin).Either way the signed payload is base64-encoded into `X-PAYMENT`, the gated request is retried once, and the unlocked result plus the decoded `X-PAYMENT-RESPONSE` receipt come back.@@ -67,7 +68,7 @@ Find an HTTP service you want and click **Try it** on its card.1. The drop-in payment modal opens, having already re-fetched the live 402 challenge to confirm the current price (prices can change; the card is a cached hint, the modal is the source of truth).2. The modal shows the **price**, the **network**, and **who you're paying** — the on-chain `payTo` address, linked to a block explorer so you can verify the recipient before committing.-3. Pick your wallet. The modal only offers wallets that match a network in the challenge's `accepts` and are actually detected in your browser; undetected ones render disabled with an "install" hint.+3. Pick your wallet. The modal only offers wallets that match a network in the challenge's `accepts` and are actually detected in your browser; undetected ones render disabled with an "install" hint. Signed-in users with funded agents also see a **"Your agents"** group at the top — picking one skips the wallet popup entirely and pays from the agent's own USDC under its spend limits.4. Approve the payment in your wallet. Before prompting you, the modal does a fail-open balance pre-check — if it can positively read that your wallet is short, it shows an insufficient-funds state with the exact shortfall and an explorer link, instead of letting you sign a doomed transaction.5. The platform settles on-chain and retries the call. The card's receipt area fills in with the result and a link to the on-chain transaction.diff --git a/public/locales/ml.json b/public/locales/ml.jsonindex 807555941..ebd999a57 100644--- a/public/locales/ml.json+++ b/public/locales/ml.json@@ -16831,14 +16831,14 @@"it_signs_these_it_doesn_t_spell": "It signs these. It doesn’t spell them.","meta_description": "three.ws avatars sign in American Sign Language. Fingerspell any word or number, get signed chat replies, and sign back to the AI with your webcam: the whole loop, live in 3D.","meta_og_description": "Avatars that sign in ASL. Fingerspell anything, get signed chat replies, and sign back with your webcam, live in 3D.",- "meta_og_title": "",- "meta_title": "",- "meta_twitter_description": "",- "meta_twitter_title": "",- "open_the_animation_studio": "",- "sign_back_with_your_camera": "",- "sign_it": "",- "sign_to_us_and_we_ll_read": "",+ "meta_og_title": "Sign Language Avatars · three.ws",+ "meta_title": "Sign Language Avatars · three.ws",+ "meta_twitter_description": "Avatars that sign in ASL: fingerspelling, signed chat replies, and webcam sign input, live in 3D.",+ "meta_twitter_title": "Sign Language Avatars · three.ws",+ "open_the_animation_studio": "Open the Animation Studio →",+ "sign_back_with_your_camera": "Sign back with your camera",+ "sign_it": "🤟 Sign it",+ "sign_to_us_and_we_ll_read": "Sign to us and we’ll read it","signed_chat_replies": "","signing_hand": "","speed": "",diff --git a/public/tokens.css b/public/tokens.cssindex fe6325420..25439e4f3 100644--- a/public/tokens.css+++ b/public/tokens.css@@ -200,7 +200,11 @@dim secondary/muted text (above)faint tertiary hints, disabled, watermark labels */--ink-bright: #ffffff;- --ink-faint: rgba(255, 255, 255, 0.45);+ /* 0.55, not 0.45: on the #0a0a0a shell 0.45 composites to ~4.2:1, under+ the 4.5:1 WCAG AA floor axe enforces on hint text; 0.55 measures 6.1:1.+ (Genuinely disabled controls are exempt from AA and can dim further via+ opacity at the component level.) */+ --ink-faint: rgba(255, 255, 255, 0.55);/* Elevation / shadow (B01) — three depth tiers. Mirrors the component layerin style.css so any surface can express depth without hand-rolling shadows.@@ -339,7 +343,8 @@--ink-bright: #0a0c12;--ink: #1d212b;--ink-dim: #5a616f;- --ink-faint: rgba(15, 18, 28, 0.45);+ /* 0.62, not 0.45: on white 0.45 composites to ~3.5:1; 0.62 measures 5.5:1. */+ --ink-faint: rgba(15, 18, 28, 0.62);/* Accent — white is invisible on light, so light gets a real accent. */--accent: #2563eb;diff --git a/src/walk.js b/src/walk.jsindex 67c99d492..6a4d459af 100644--- a/src/walk.js+++ b/src/walk.js@@ -1814,6 +1814,7 @@ async function enableAR() {} catch {}arActive = true;+ dayNight.setPaused(true); // the real room's estimated lighting owns the rig nowstage.classList.add('is-ar');arBtn.setAttribute('aria-pressed', 'true');terrain.mesh.visible = false; // hide the world ground; the room is the floor in AR@@ -1870,12 +1871,21 @@ function disableAR() {groundShadowCatcher.material.opacity = 0.32;scene.background = null; // CSS gradient on #walk-stage shows through- // Restore camera FOV and lighting defaults.+ // Restore camera FOV and the environment's authored lighting (the AR pass+ // mutated intensities and the hemi tint to match the real room), then hand+ // the rig back to the day/night cycle at the current time of day.camera.fov = 50;camera.updateProjectionMatrix();- ambientLight.intensity = 0.55;- sun.intensity = 1.4;- hemi.color.set(0xbcd6ff);+ const envMeta = walkManifest ? getEnvironment(walkManifest, currentEnvName) : null;+ if (envMeta) {+ applyLighting(envMeta, { ambientLight, hemi, sun });+ } else {+ ambientLight.intensity = 0.55;+ sun.intensity = 1.4;+ hemi.color.set(0xbcd6ff);+ }+ dayNight.setPaused(false);+ dayNight.update(Date.now(), true);// Hide blob shadow.blobShadow.material.opacity = 0;diff --git a/vercel.json b/vercel.jsonindex 591d4e900..4054f2f69 100644--- a/vercel.json+++ b/vercel.json@@ -5611,6 +5611,10 @@{"path": "/api/cron/quality-bench","schedule": "23 3 * * 1"- }+ },+ {+ "path": "/api/cron/garment-catalog-audit",+ "schedule": "20 6 * * *"+ }]}