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.

chore: roll up in-flight edits across pages, voice, persona, lip-sync

nirholas4bc7647e81ed
diff --git a/.env.example b/.env.example
index ddee97b20..bf4b89dc3 100644
--- a/.env.example
+++ b/.env.example
@@ -101,6 +101,20 @@ REPLICATE_REMESH_MODEL=
REPLICATE_RETEX_MODEL=
REPLICATE_RERIG_MODEL=
+# ── Persona Hub (optional) ────────────────────────────────────────────────────
+# When set, /api/auth/persona/issue signs tokens with ES256 (asymmetric) so
+# tenants can verify offline via the JWK Set at /.well-known/jwks.json. When
+# unset, persona tokens are signed with HS256 (shared JWT_SECRET) and tenants
+# must hit /api/auth/persona/verify to validate.
+#
+# Generate a fresh keypair with:
+# node scripts/generate-persona-key.mjs
+# then paste the output here / into Vercel env.
+PERSONA_JWKS_KID=
+PERSONA_JWKS_PRIVATE_KEY_PEM=
+# Optional — auto-derived from the private key if omitted:
+PERSONA_JWKS_PUBLIC_KEY_PEM=
+
# ── ERC-7710 Delegation Relayer (POST /api/permissions/redeem) ───────────────
# Enable the server-side relayer endpoint (default: false).
PERMISSIONS_RELAYER_ENABLED=false
diff --git a/agent-home.html b/agent-home.html
index 568f0882a..eb3529062 100644
--- a/agent-home.html
+++ b/agent-home.html
@@ -1048,6 +1048,7 @@
</div>
<div class="h-footer-link-col">
<h4 class="h-footer-link-heading">Resources</h4>
+ <a href="/blog">Blog</a>
<a href="/dashboard">Dashboard</a>
</div>
</nav>
diff --git a/api/auth/persona/[action].js b/api/auth/persona/[action].js
index a7fab350f..21d5533b8 100644
--- a/api/auth/persona/[action].js
+++ b/api/auth/persona/[action].js
@@ -31,7 +31,7 @@
// Returns the user's avatar catalog so the consent UI can render a
// picker without a second round trip.
-import { SignJWT, jwtVerify } from 'jose';
+import { SignJWT, jwtVerify, importPKCS8, importSPKI, exportJWK } from 'jose';
import { getSessionUser } from '../../_lib/auth.js';
import { sql } from '../../_lib/db.js';
import { env } from '../../_lib/env.js';
@@ -41,10 +41,61 @@ import { cors, json, error, method, readJson, wrap } from '../../_lib/http.js';
const PERSONA_TTL_SEC = 60 * 60 * 24; // 24h
-let _jwtKey;
-function jwtKey() {
- if (!_jwtKey) _jwtKey = new TextEncoder().encode(env.JWT_SECRET);
- return _jwtKey;
+// Persona Hub supports two signing modes:
+// - ES256 (preferred): when PERSONA_JWKS_PRIVATE_KEY_PEM is set, persona
+// tokens are signed with that EC P-256 private key and the public key is
+// published at /.well-known/jwks.json so tenants can verify offline.
+// Generate one with: `node scripts/generate-persona-key.mjs`.
+// - HS256 (fallback): JWT_SECRET shared secret; tenants must hit the
+// /verify endpoint since the secret can't be published.
+//
+// Verification accepts both, so existing tokens keep working through a key
+// rollover.
+
+let _hsKey;
+function hsKey() {
+ if (!_hsKey) _hsKey = new TextEncoder().encode(env.JWT_SECRET);
+ return _hsKey;
+}
+
+let _esKeys = null; // { kid, alg, privateKey, publicKey, publicJwk }
+async function esKeys() {
+ if (_esKeys) return _esKeys;
+ const pem = process.env.PERSONA_JWKS_PRIVATE_KEY_PEM;
+ if (!pem) return null;
+ const pkcs8 = pem.replace(/\\n/g, '\n');
+ const privateKey = await importPKCS8(pkcs8, 'ES256');
+ const publicPem = process.env.PERSONA_JWKS_PUBLIC_KEY_PEM
+ ? process.env.PERSONA_JWKS_PUBLIC_KEY_PEM.replace(/\\n/g, '\n')
+ : null;
+ let publicKey;
+ if (publicPem) {
+ publicKey = await importSPKI(publicPem, 'ES256');
+ } else {
+ // Without the explicit public key we derive a JWK from the private key's
+ // public bits (jose's exportJWK on a private CryptoKey returns the public
+ // JWK fields plus `d`; we drop `d` for publication).
+ publicKey = privateKey;
+ }
+ const fullJwk = await exportJWK(publicKey);
+ delete fullJwk.d;
+ const publicJwk = {
+ kty: fullJwk.kty,
+ crv: fullJwk.crv,
+ x: fullJwk.x,
+ y: fullJwk.y,
+ alg: 'ES256',
+ use: 'sig',
+ kid: process.env.PERSONA_JWKS_KID || 'persona-es256-1',
+ };
+ _esKeys = {
+ kid: publicJwk.kid,
+ alg: 'ES256',
+ privateKey,
+ publicKey,
+ publicJwk,
+ };
+ return _esKeys;
}
// Tenant origin must be a valid https URL on a three.ws subdomain, or a
@@ -104,25 +155,31 @@ async function handleIssue(req, res) {
}
const now = Math.floor(Date.now() / 1000);
+ const es = await esKeys();
+ const alg = es ? 'ES256' : 'HS256';
+ const kid = es ? es.kid : env.JWT_KID;
+ const signingKey = es ? es.privateKey : hsKey();
+
const token = await new SignJWT({
scope: 'persona:read avatar:read',
token_use: 'persona',
avatar,
})
- .setProtectedHeader({ alg: 'HS256', kid: env.JWT_KID, typ: 'JWT' })
+ .setProtectedHeader({ alg, kid, typ: 'JWT' })
.setIssuer(env.ISSUER)
.setSubject(user.id)
.setAudience(tenantOrigin)
.setIssuedAt(now)
.setExpirationTime(now + PERSONA_TTL_SEC)
.setJti(randomToken(16))
- .sign(jwtKey());
+ .sign(signingKey);
return json(res, 200, {
token,
expires_in: PERSONA_TTL_SEC,
avatar,
tenant_origin: tenantOrigin,
+ alg,
});
}
@@ -136,15 +193,34 @@ async function handleVerify(req, res) {
if (!token) return error(res, 400, 'invalid_request', 'token query param required');
if (!audience) return error(res, 400, 'invalid_request', 'audience query param required');
+ // Try ES256 first when configured, then fall back to HS256 so tokens
+ // minted with the legacy shared-secret signer still verify during a key
+ // rotation.
let payload;
- try {
- ({ payload } = await jwtVerify(token, jwtKey(), {
- issuer: env.ISSUER,
- audience,
- algorithms: ['HS256'],
- }));
- } catch (err) {
- return error(res, 401, 'invalid_token', err?.message || 'verification failed');
+ const es = await esKeys();
+ let lastErr = null;
+ if (es) {
+ try {
+ ({ payload } = await jwtVerify(token, es.publicKey, {
+ issuer: env.ISSUER,
+ audience,
+ algorithms: ['ES256'],
+ }));
+ } catch (err) {
+ lastErr = err;
+ }
+ }
+ if (!payload) {
+ try {
+ ({ payload } = await jwtVerify(token, hsKey(), {
+ issuer: env.ISSUER,
+ audience,
+ algorithms: ['HS256'],
+ }));
+ } catch (hsErr) {
+ const reason = (lastErr ?? hsErr)?.message || 'verification failed';
+ return error(res, 401, 'invalid_token', reason);
+ }
}
if (payload.token_use !== 'persona') {
@@ -161,6 +237,24 @@ async function handleVerify(req, res) {
});
}
+async function handleJwks(req, res) {
+ if (cors(req, res, { methods: 'GET,OPTIONS', credentials: false })) return;
+ if (!method(req, res, ['GET'])) return;
+ const es = await esKeys();
+ const keys = es ? [es.publicJwk] : [];
+ res.setHeader('content-type', 'application/jwk-set+json; charset=utf-8');
+ res.setHeader('cache-control', 'public, max-age=3600, s-maxage=86400');
+ res.setHeader('access-control-allow-origin', '*');
+ if (!keys.length) {
+ res.setHeader(
+ 'x-three-ws-status',
+ 'no PERSONA_JWKS_PRIVATE_KEY_PEM configured; persona tokens are HS256, verify via /api/auth/persona/verify',
+ );
+ }
+ res.statusCode = 200;
+ res.end(JSON.stringify({ keys }));
+}
+
async function handleMe(req, res) {
if (cors(req, res, { methods: 'GET,OPTIONS', credentials: true })) return;
if (!method(req, res, ['GET'])) return;
@@ -193,5 +287,6 @@ export default wrap(async (req, res) => {
if (action === 'issue') return handleIssue(req, res);
if (action === 'verify') return handleVerify(req, res);
if (action === 'me') return handleMe(req, res);
+ if (action === 'jwks') return handleJwks(req, res);
return error(res, 404, 'not_found', `unknown persona action: ${action}`);
});
diff --git a/avatar-page.html b/avatar-page.html
index 43d43323b..f298244ed 100644
--- a/avatar-page.html
+++ b/avatar-page.html
@@ -230,7 +230,21 @@
.av-cta-talk-row {
padding: 16px 24px 0;
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+ align-items: stretch;
+ }
+ .av-cta-edit-link {
+ align-self: center;
+ color: var(--text-3);
+ font-size: 12px;
+ text-decoration: none;
+ padding: 2px 4px;
+ border-radius: 4px;
+ transition: color 0.15s;
}
+ .av-cta-edit-link:hover { color: var(--text); }
.av-cta-talk {
width: 100%;
background: linear-gradient(135deg, #7dd3fc 0%, #a78bfa 100%);
diff --git a/blog/three-ws-on-alibaba-cloud-marketplace.html b/blog/three-ws-on-alibaba-cloud-marketplace.html
index 78b81c351..0cfded148 100644
--- a/blog/three-ws-on-alibaba-cloud-marketplace.html
+++ b/blog/three-ws-on-alibaba-cloud-marketplace.html
@@ -80,6 +80,12 @@
<li>Open source: <a href="https://github.com/nirholas/three.ws" rel="noopener">github.com/nirholas/three.ws</a></li>
<li>Project site: <a href="https://three.ws" rel="noopener">three.ws</a></li>
</ul>
+
+ <h2>Related</h2>
+ <ul>
+ <li><a href="/blog/three-ws-on-bnb-chain-dappbay.html">three.ws Listed on BNB Chain's Dappbay Directory</a></li>
+ <li><a href="/docs/listings">All listings &amp; distribution channels</a></li>
+ </ul>
</article>
</main>
<footer>
diff --git a/blog/three-ws-on-bnb-chain-dappbay.html b/blog/three-ws-on-bnb-chain-dappbay.html
index c4367ec7a..312665383 100644
--- a/blog/three-ws-on-bnb-chain-dappbay.html
+++ b/blog/three-ws-on-bnb-chain-dappbay.html
@@ -61,6 +61,12 @@
<li>Project site: <a href="https://three.ws" rel="noopener">three.ws</a></li>
<li>Open source: <a href="https://github.com/nirholas/three.ws" rel="noopener">github.com/nirholas/three.ws</a></li>
</ul>
+
+ <h2>Related</h2>
+ <ul>
+ <li><a href="/blog/three-ws-on-alibaba-cloud-marketplace.html">three.ws Launches on Alibaba Cloud Marketplace</a></li>
+ <li><a href="/docs/listings">All listings &amp; distribution channels</a></li>
+ </ul>
</article>
</main>
<footer>
diff --git a/create-selfie.html b/create-selfie.html
index 137dd8b1e..cb3b804e1 100644
--- a/create-selfie.html
+++ b/create-selfie.html
@@ -232,58 +232,93 @@
}
#submit-btn.ready:hover { filter: brightness(1.04); }
- .camera-overlay {
+ #cam-overlay {
position: fixed;
inset: 0;
background: #000;
z-index: 1000;
- display: flex;
+ display: none;
flex-direction: column;
}
- .camera-overlay video {
+ #cam-overlay.open { display: flex; }
+ #cam-stage {
+ position: relative;
+ flex: 1;
+ min-height: 0;
+ overflow: hidden;
+ }
+ #cam-stage video,
+ #cam-stage img.preview {
width: 100%;
height: 100%;
object-fit: cover;
}
- .camera-overlay .cam-bar {
+ #cam-stage video { transform: scaleX(-1); }
+ .cam-prompt {
position: absolute;
+ top: env(safe-area-inset-top, 18px);
left: 0;
right: 0;
- bottom: 0;
- padding: 18px 20px 32px;
- background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
+ text-align: center;
+ color: rgba(255, 255, 255, 0.92);
+ font-size: 13px;
+ letter-spacing: 0.06em;
+ text-transform: uppercase;
+ padding: 16px 18px;
+ background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent);
+ pointer-events: none;
+ }
+ .cam-prompt strong { font-weight: 600; color: var(--accent); }
+ #cam-error {
+ position: absolute;
+ top: 60px;
+ left: 16px;
+ right: 16px;
+ padding: 10px 14px;
+ background: rgba(239, 77, 77, 0.92);
+ color: white;
+ border-radius: 9px;
+ font-size: 13.5px;
+ text-align: center;
+ }
+ .cam-bar {
+ padding: 16px 22px calc(env(safe-area-inset-bottom, 18px) + 18px);
+ background: rgba(0, 0, 0, 0.7);
display: flex;
align-items: center;
justify-content: space-between;
+ gap: 16px;
}
- .camera-overlay button {
- background: var(--panel);
+ .cam-bar button {
+ background: rgba(255, 255, 255, 0.08);
color: var(--text);
- border: 1px solid var(--border);
+ border: 1px solid rgba(255, 255, 255, 0.18);
border-radius: 9px;
- padding: 10px 14px;
+ padding: 10px 16px;
font: 600 14px/1 inherit;
cursor: pointer;
+ min-width: 88px;
}
- .camera-overlay button.shutter {
+ .cam-bar button.shutter {
width: 72px;
height: 72px;
border-radius: 50%;
background: var(--accent);
color: var(--accent-ink);
border: none;
+ padding: 0;
+ min-width: 72px;
}
- .camera-overlay .cam-prompt {
- position: absolute;
- top: 24px;
- left: 0;
- right: 0;
- text-align: center;
- color: rgba(255, 255, 255, 0.92);
- font-size: 14px;
- letter-spacing: 0.04em;
- text-transform: uppercase;
+ .cam-bar button.shutter::before {
+ content: '';
+ display: block;
+ width: 56px;
+ height: 56px;
+ border-radius: 50%;
+ border: 3px solid var(--accent-ink);
+ margin: 0 auto;
}
+ .cam-bar .spacer { flex: 1; }
</style>
</head>
<body>
@@ -369,6 +404,28 @@
</section>
</main>
+ <!-- Camera overlay (driven by selfie-capture.js) -->
+ <div id="cam-overlay" role="dialog" aria-modal="true" aria-label="Camera capture">
+ <div id="cam-stage">
+ <video id="cam-video" autoplay playsinline muted></video>
+ </div>
+ <div class="cam-prompt">
+ Take your <strong id="cam-slot-name">photo</strong>
+ </div>
+ <div id="cam-error" hidden></div>
+ <div class="cam-bar">
+ <div id="cam-actions-live" style="display: contents;">
+ <button type="button" data-cam-action="cancel">Cancel</button>
+ <button type="button" class="shutter" data-cam-action="shoot" aria-label="Take photo"></button>
+ <div class="spacer"></div>
+ </div>
+ <div id="cam-actions-review" hidden style="display: contents;">
+ <button type="button" data-cam-action="retake">Retake</button>
+ <button type="button" data-cam-action="use">Use this</button>
+ </div>
+ </div>
+ </div>
+
<script type="module">
import '/src/selfie-capture.js';
import '/src/selfie-pipeline.js';
diff --git a/create.html b/create.html
index d04073bc2..406187efe 100644
--- a/create.html
+++ b/create.html
@@ -811,10 +811,10 @@
<h2 class="card-title">Selfie to avatar</h2>
</div>
<p class="card-subtitle">
- Snap a selfie or pick a style — three.ws builds a rigged 3D avatar.
+ Three photos — frontal, left, right. three.ws builds a rigged 3D avatar in about a minute.
</p>
<span class="card-cta">
- Open creator
+ Take 3 photos
<svg
width="13"
height="13"
@@ -984,6 +984,7 @@
</div>
<div class="h-footer-link-col">
<h4 class="h-footer-link-heading">Resources</h4>
+ <a href="/blog">Blog</a>
<a href="/dashboard">Dashboard</a>
</div>
</nav>
diff --git a/data/pages.json b/data/pages.json
index b753d8342..58095121d 100644
--- a/data/pages.json
+++ b/data/pages.json
@@ -96,9 +96,21 @@
{ "path": "/docs/widgets", "title": "Docs · Widgets", "description": "Build and publish reusable chat and 3D widgets." },
{ "path": "/docs/api-reference", "title": "Docs · API Reference", "description": "Full HTTP API reference." },
{ "path": "/docs/sdk", "title": "Docs · SDK", "description": "JavaScript / Node SDK for three.ws." },
+ { "path": "/docs/listings", "title": "Docs · Listings & Distribution", "description": "Cloud marketplaces and ecosystem directories where three.ws is listed (Alibaba Cloud, BNB Chain Dappbay, and more).", "priority": 0.5, "changefreq": "monthly" },
{ "path": "/tutorials", "title": "Tutorials", "description": "Step-by-step build guides." }
]
},
+ {
+ "id": "blog",
+ "title": "Blog",
+ "description": "Long-form announcements, launches, and writing from three.ws.",
+ "pages": [
+ { "path": "/blog", "title": "Blog", "description": "Editorial index of three.ws launches and long-form posts.", "priority": 0.7, "changefreq": "weekly", "lastmod": "2026-05-17" },
+ { "path": "/blog/three-ws-on-alibaba-cloud-marketplace", "title": "three.ws Launches on Alibaba Cloud Marketplace", "description": "three.ws is live on the Alibaba Cloud International Marketplace. The first deployment of on-chain agents with native HTTP 402 / x402 payment capability inside the procurement flow of a top-four cloud provider.", "priority": 0.6, "changefreq": "monthly", "lastmod": "2026-05-17" },
+ { "path": "/blog/three-ws-on-bnb-chain-dappbay", "title": "three.ws Listed on BNB Chain's Dappbay Directory", "description": "three.ws is now in BNB Chain's official dApp directory under AI Agent Launchpad, AI Data, and AI Infra.", "priority": 0.6, "changefreq": "monthly", "lastmod": "2026-05-17" },
+ { "path": "/blog/how-to-embed-3d-onchain-agents", "title": "How to Embed 3D On-Chain Agents on Your Site", "description": "A short walkthrough for embedding a three.ws agent on any website using the <agent-3d> tag.", "priority": 0.5, "changefreq": "monthly", "lastmod": "2026-05-15" }
+ ]
+ },
{
"id": "legal",
"title": "Legal",
diff --git a/data/rss/items.json b/data/rss/items.json
index fb07f341a..d368de10c 100644
--- a/data/rss/items.json
+++ b/data/rss/items.json
@@ -8,7 +8,7 @@
"link": "https://three.ws/blog/three-ws-on-bnb-chain-dappbay.html",
"author": "three.ws",
"summary": "three.ws is now listed on Dappbay, BNB Chain's official dApp directory, under AI Agent Launchpad, AI Data, and AI Infra. The listing puts <agent-3d> — the one-tag deploy for Solana-minted, ERC-8004-walleted, x402-native 3D agents — in front of the BNB Chain ecosystem's discovery surface for AI dApps.",
- "body_html": "<p><strong>three.ws is now listed on <a href=\"https://dappbay.bnbchain.org/detail/three\" rel=\"noopener\">Dappbay</a>, BNB Chain's official dApp directory.</strong> The listing is live under the categories <em>AI Agent Launchpad</em>, <em>AI Data</em>, and <em>AI Infra</em>, with a current rank of <strong>AI #121</strong>.</p>\n<ul>\n<li>Dappbay listing: <a href=\"https://dappbay.bnbchain.org/detail/three\" rel=\"noopener\">dappbay.bnbchain.org/detail/three</a></li>\n<li>Open source: <a href=\"https://github.com/nirholas/three.ws\" rel=\"noopener\">github.com/nirholas/three.ws</a></li>\n<li>Project site: <a href=\"https://three.ws\" rel=\"noopener\">three.ws</a></li>\n</ul>\n<h2>What three.ws ships</h2>\n<p>three.ws is the platform for 3D AI agents on-chain. Every <code>&lt;agent-3d&gt;</code> tag deploys an autonomous 3D character with:</p>\n<ul>\n<li><strong>A Solana NFT identity.</strong> Each agent is minted as a transferable on-chain asset.</li>\n<li><strong>An ERC-8004 wallet.</strong> The emerging cross-chain agent-identity standard, baked in.</li>\n<li><strong>A browser-native 3D body.</strong> Rendered in WebGL &mdash; no plugins, no native install.</li>\n<li><strong>Native x402 / HTTP 402 payments.</strong> Creators monetize through time-passes, trials, and per-session payments in USDC, with earnings settled on-chain.</li>\n</ul>\n<h2>Why Dappbay matters</h2>\n<p>Dappbay is BNB Chain's official discovery layer for decentralized applications &mdash; the dApp directory that BNB Chain itself publishes and that the wider BSC ecosystem uses to find, vet, and rank projects. A Dappbay listing puts three.ws inside that discovery flow and surfaces it to the BNB Chain community looking for AI agent infrastructure, launchpads, and tooling.</p>\n<p>three.ws settles agent payments on Solana, Base, and Polygon today; the Dappbay presence is about distribution and reach into BNB Chain's AI dApp audience, not a chain migration. The underlying x402 protocol is chain-agnostic, and we're open to expanding payment rails wherever agent demand lives.</p>\n<h2>What gets listed</h2>\n<ul>\n<li><strong>Project:</strong> three &mdash; <em>The platform for 3D AI agents on-chain.</em></li>\n<li><strong>Categories:</strong> AI Agent Launchpad &middot; AI Data &middot; AI Infra</li>\n<li><strong>Current rank:</strong> AI #121</li>\n<li><strong>Payment chains:</strong> Solana, Base, Polygon (USDC via x402)</li>\n</ul>\n<h2>Links</h2>\n<ul>\n<li>Dappbay listing: <a href=\"https://dappbay.bnbchain.org/detail/three\" rel=\"noopener\">dappbay.bnbchain.org/detail/three</a></li>\n<li>Project site: <a href=\"https://three.ws\" rel=\"noopener\">three.ws</a></li>\n<li>Open source: <a href=\"https://github.com/nirholas/three.ws\" rel=\"noopener\">github.com/nirholas/three.ws</a></li>\n</ul>",
+ "body_html": "<p><strong>three.ws is now listed on <a href=\"https://dappbay.bnbchain.org/detail/three\" rel=\"noopener\">Dappbay</a>, BNB Chain's official dApp directory.</strong> The listing is live under the categories <em>AI Agent Launchpad</em>, <em>AI Data</em>, and <em>AI Infra</em>, with a current rank of <strong>AI #121</strong>.</p>\n<ul>\n<li>Dappbay listing: <a href=\"https://dappbay.bnbchain.org/detail/three\" rel=\"noopener\">dappbay.bnbchain.org/detail/three</a></li>\n<li>Open source: <a href=\"https://github.com/nirholas/three.ws\" rel=\"noopener\">github.com/nirholas/three.ws</a></li>\n<li>Project site: <a href=\"https://three.ws\" rel=\"noopener\">three.ws</a></li>\n</ul>\n<h2>What three.ws ships</h2>\n<p>three.ws is the platform for 3D AI agents on-chain. Every <code>&lt;agent-3d&gt;</code> tag deploys an autonomous 3D character with:</p>\n<ul>\n<li><strong>A Solana NFT identity.</strong> Each agent is minted as a transferable on-chain asset.</li>\n<li><strong>An ERC-8004 wallet.</strong> The emerging cross-chain agent-identity standard, baked in.</li>\n<li><strong>A browser-native 3D body.</strong> Rendered in WebGL &mdash; no plugins, no native install.</li>\n<li><strong>Native x402 / HTTP 402 payments.</strong> Creators monetize through time-passes, trials, and per-session payments in USDC, with earnings settled on-chain.</li>\n</ul>\n<h2>Why Dappbay matters</h2>\n<p>Dappbay is BNB Chain's official discovery layer for decentralized applications &mdash; the dApp directory that BNB Chain itself publishes and that the wider BSC ecosystem uses to find, vet, and rank projects. A Dappbay listing puts three.ws inside that discovery flow and surfaces it to the BNB Chain community looking for AI agent infrastructure, launchpads, and tooling.</p>\n<p>three.ws settles agent payments on Solana, Base, and Polygon today; the Dappbay presence is about distribution and reach into BNB Chain's AI dApp audience, not a chain migration. The underlying x402 protocol is chain-agnostic, and we're open to expanding payment rails wherever agent demand lives.</p>\n<h2>What gets listed</h2>\n<ul>\n<li><strong>Project:</strong> three &mdash; <em>The platform for 3D AI agents on-chain.</em></li>\n<li><strong>Categories:</strong> AI Agent Launchpad &middot; AI Data &middot; AI Infra</li>\n<li><strong>Current rank:</strong> AI #121</li>\n<li><strong>Payment chains:</strong> Solana, Base, Polygon (USDC via x402)</li>\n</ul>\n<h2>Links</h2>\n<ul>\n<li>Dappbay listing: <a href=\"https://dappbay.bnbchain.org/detail/three\" rel=\"noopener\">dappbay.bnbchain.org/detail/three</a></li>\n<li>Project site: <a href=\"https://three.ws\" rel=\"noopener\">three.ws</a></li>\n<li>Open source: <a href=\"https://github.com/nirholas/three.ws\" rel=\"noopener\">github.com/nirholas/three.ws</a></li>\n</ul>\n<h2>Related</h2>\n<ul>\n<li><a href=\"https://three.ws/blog/three-ws-on-alibaba-cloud-marketplace.html\">three.ws Launches on Alibaba Cloud Marketplace</a></li>\n<li><a href=\"https://three.ws/docs/listings\">All listings &amp; distribution channels</a></li>\n</ul>",
"tags": [
"listing",
"directory",
@@ -25,7 +25,7 @@
"link": "https://three.ws/blog/three-ws-on-alibaba-cloud-marketplace.html",
"author": "three.ws",
"summary": "three.ws is now live on the Alibaba Cloud International Marketplace. The listing makes <agent-3d> — one HTML tag that deploys a Solana-minted, ERC-8004-walleted, x402-native 3D agent — available to every Alibaba Cloud customer worldwide. This is the first deployment of on-chain agents with native HTTP 402 / x402 payment capability inside the procurement flow of a top-four cloud provider.",
- "body_html": "<p><strong>three.ws is now live on the <a href=\"https://marketplace.alibabacloud.com/products/56724001/sgcmfw00036800.html\" rel=\"noopener\">Alibaba Cloud International Marketplace</a>.</strong> The listing makes <code>&lt;agent-3d&gt;</code> &mdash; a single HTML tag that deploys a fully on-chain 3D AI agent &mdash; available to every Alibaba Cloud customer worldwide.</p>\n<p>This is the first deployment of on-chain agents with native HTTP 402 / x402 payment capability inside the procurement flow of a top-four cloud provider.</p>\n<ul>\n<li>Marketplace product: <a href=\"https://marketplace.alibabacloud.com/products/56724001/sgcmfw00036800.html\" rel=\"noopener\">marketplace.alibabacloud.com/products/56724001/sgcmfw00036800.html</a></li>\n<li>Storefront: <a href=\"https://marketplace.alibabacloud.com/store/3247293.html\" rel=\"noopener\">marketplace.alibabacloud.com/store/3247293.html</a></li>\n<li>Open source: <a href=\"https://github.com/nirholas/three.ws\" rel=\"noopener\">github.com/nirholas/three.ws</a></li>\n</ul>\n<h2>What three.ws ships</h2>\n<p>three.ws is an open-source stack for autonomous 3D AI agents that run natively in the browser. Every <code>&lt;agent-3d&gt;</code> tag deploys an agent with:</p>\n<ul>\n<li><strong>A Solana NFT identity.</strong> Each agent is minted as a transferable on-chain asset.</li>\n<li><strong>An ERC-8004 wallet.</strong> The emerging cross-chain agent-identity standard, baked in.</li>\n<li><strong>A browser-native 3D body.</strong> Rendered in WebGL &mdash; no plugins, no native install, no client runtime.</li>\n<li><strong>A swappable LLM brain.</strong> Claude, GPT, and open-weights models are live today. Qwen and ModelScope land through the Alibaba Cloud integration.</li>\n<li><strong>Native x402 / HTTP 402 payments.</strong> Agents pay for what they consume and earn for what they offer, settling in USDC on Solana.</li>\n</ul>\n<p>A developer integrates an agent into any web page with a single line of HTML. That tag is a Solana-native economic actor &mdash; it can hold value, sign transactions, charge for skills, pay for inference, and route revenue back to its owner with no backend, no API keys, no Stripe account, and no checkout page.</p>\n<h2>The Alibaba Cloud listing</h2>\n<p>Alibaba Cloud is the #1 cloud provider in Asia and one of the top four hyperscalers globally. Its International Marketplace is the procurement gateway used by enterprise customers across China, Southeast Asia, the Middle East, and Latin America &mdash; regions where AWS and Google Cloud run second.</p>\n<p>A marketplace listing is the actual buying flow that enterprises use to acquire software through their existing cloud account, with consolidated billing, compliance, and support. three.ws now sits inside that flow as a directly procurable product.</p>\n<h2>Why this matters for the agent economy</h2>\n<p>HTTP 402 &mdash; &quot;Payment Required&quot; &mdash; has been reserved in the HTTP specification since 1997 for machine-to-machine payments. The x402 protocol activated it on-chain. three.ws makes x402 the default payment layer for embedded 3D agents.</p>\n<p>Three structural outcomes follow from the Alibaba Cloud listing:</p>\n<ol>\n<li><strong>Distribution at hyperscale.</strong> The Marketplace exposes three.ws to millions of paying enterprise developers across 200+ countries.</li>\n<li><strong>Native on-chain settlement.</strong> Every agent action &mdash; minting, skill purchases, inference, accessory acquisition, coin launches &mdash; routes through Solana via three.ws rails. No off-chain accounting, no payment processors.</li>\n<li><strong>Portable agent identity.</strong> ERC-8004 gives each agent a cross-chain wallet identity, removing the need for proprietary account systems and making agents interoperable across the wider on-chain agent ecosystem.</li>\n</ol>\n<h2>Shipping next</h2>\n<ul>\n<li><strong>One-click deploy from the Alibaba Cloud console.</strong> Provision a branded three.ws agent from the same console enterprises already use for VMs, databases, and AI services.</li>\n<li><strong>Qwen and ModelScope brain integration.</strong> three.ws agents will run on Alibaba's frontier models alongside the existing Claude, GPT, and open-weights options.</li>\n<li><strong>Enterprise launchpad.</strong> White-label tenant subdomains, no-code agent and coin launch flows for brands deploying agents at scale.</li>\n<li><strong>VR/AR walkaround sites.</strong> Explorable 3D websites with mobile joystick navigation, built on the same agent engine.</li>\n<li><strong>Cross-marketplace expansion.</strong> AWS, Azure, and Google Cloud listings are next.</li>\n</ul>\n<h2>Open source</h2>\n<p>The full three.ws stack is open source: <a href=\"https://github.com/nirholas/three.ws\" rel=\"noopener\">github.com/nirholas/three.ws</a></p>\n<p>The codebase includes the <code>&lt;agent-3d&gt;</code> browser component, the Solana minting SDK, the x402 payment SDK, the ERC-8004 wallet integration, and the agent-payments SDK used by third-party developers.</p>",
+ "body_html": "<p><strong>three.ws is now live on the <a href=\"https://marketplace.alibabacloud.com/products/56724001/sgcmfw00036800.html\" rel=\"noopener\">Alibaba Cloud International Marketplace</a>.</strong> The listing makes <code>&lt;agent-3d&gt;</code> &mdash; a single HTML tag that deploys a fully on-chain 3D AI agent &mdash; available to every Alibaba Cloud customer worldwide.</p>\n<p>This is the first deployment of on-chain agents with native HTTP 402 / x402 payment capability inside the procurement flow of a top-four cloud provider.</p>\n<ul>\n<li>Marketplace product: <a href=\"https://marketplace.alibabacloud.com/products/56724001/sgcmfw00036800.html\" rel=\"noopener\">marketplace.alibabacloud.com/products/56724001/sgcmfw00036800.html</a></li>\n<li>Storefront: <a href=\"https://marketplace.alibabacloud.com/store/3247293.html\" rel=\"noopener\">marketplace.alibabacloud.com/store/3247293.html</a></li>\n<li>Open source: <a href=\"https://github.com/nirholas/three.ws\" rel=\"noopener\">github.com/nirholas/three.ws</a></li>\n</ul>\n<h2>What three.ws ships</h2>\n<p>three.ws is an open-source stack for autonomous 3D AI agents that run natively in the browser. Every <code>&lt;agent-3d&gt;</code> tag deploys an agent with:</p>\n<ul>\n<li><strong>A Solana NFT identity.</strong> Each agent is minted as a transferable on-chain asset.</li>\n<li><strong>An ERC-8004 wallet.</strong> The emerging cross-chain agent-identity standard, baked in.</li>\n<li><strong>A browser-native 3D body.</strong> Rendered in WebGL &mdash; no plugins, no native install, no client runtime.</li>\n<li><strong>A swappable LLM brain.</strong> Claude, GPT, and open-weights models are live today. Qwen and ModelScope land through the Alibaba Cloud integration.</li>\n<li><strong>Native x402 / HTTP 402 payments.</strong> Agents pay for what they consume and earn for what they offer, settling in USDC on Solana.</li>\n</ul>\n<p>A developer integrates an agent into any web page with a single line of HTML. That tag is a Solana-native economic actor &mdash; it can hold value, sign transactions, charge for skills, pay for inference, and route revenue back to its owner with no backend, no API keys, no Stripe account, and no checkout page.</p>\n<h2>The Alibaba Cloud listing</h2>\n<p>Alibaba Cloud is the #1 cloud provider in Asia and one of the top four hyperscalers globally. Its International Marketplace is the procurement gateway used by enterprise customers across China, Southeast Asia, the Middle East, and Latin America &mdash; regions where AWS and Google Cloud run second.</p>\n<p>A marketplace listing is the actual buying flow that enterprises use to acquire software through their existing cloud account, with consolidated billing, compliance, and support. three.ws now sits inside that flow as a directly procurable product.</p>\n<h2>Why this matters for the agent economy</h2>\n<p>HTTP 402 &mdash; &quot;Payment Required&quot; &mdash; has been reserved in the HTTP specification since 1997 for machine-to-machine payments. The x402 protocol activated it on-chain. three.ws makes x402 the default payment layer for embedded 3D agents.</p>\n<p>Three structural outcomes follow from the Alibaba Cloud listing:</p>\n<ol>\n<li><strong>Distribution at hyperscale.</strong> The Marketplace exposes three.ws to millions of paying enterprise developers across 200+ countries.</li>\n<li><strong>Native on-chain settlement.</strong> Every agent action &mdash; minting, skill purchases, inference, accessory acquisition, coin launches &mdash; routes through Solana via three.ws rails. No off-chain accounting, no payment processors.</li>\n<li><strong>Portable agent identity.</strong> ERC-8004 gives each agent a cross-chain wallet identity, removing the need for proprietary account systems and making agents interoperable across the wider on-chain agent ecosystem.</li>\n</ol>\n<h2>Shipping next</h2>\n<ul>\n<li><strong>One-click deploy from the Alibaba Cloud console.</strong> Provision a branded three.ws agent from the same console enterprises already use for VMs, databases, and AI services.</li>\n<li><strong>Qwen and ModelScope brain integration.</strong> three.ws agents will run on Alibaba's frontier models alongside the existing Claude, GPT, and open-weights options.</li>\n<li><strong>Enterprise launchpad.</strong> White-label tenant subdomains, no-code agent and coin launch flows for brands deploying agents at scale.</li>\n<li><strong>VR/AR walkaround sites.</strong> Explorable 3D websites with mobile joystick navigation, built on the same agent engine.</li>\n<li><strong>Cross-marketplace expansion.</strong> AWS, Azure, and Google Cloud listings are next.</li>\n</ul>\n<h2>Open source</h2>\n<p>The full three.ws stack is open source: <a href=\"https://github.com/nirholas/three.ws\" rel=\"noopener\">github.com/nirholas/three.ws</a></p>\n<p>The codebase includes the <code>&lt;agent-3d&gt;</code> browser component, the Solana minting SDK, the x402 payment SDK, the ERC-8004 wallet integration, and the agent-payments SDK used by third-party developers.</p>\n<h2>Related</h2>\n<ul>\n<li><a href=\"https://three.ws/blog/three-ws-on-bnb-chain-dappbay.html\">three.ws Listed on BNB Chain's Dappbay Directory</a></li>\n<li><a href=\"https://three.ws/docs/listings\">All listings &amp; distribution channels</a></li>\n</ul>",
"tags": [
"listing",
"marketplace",
diff --git a/docs/persona-hub.md b/docs/persona-hub.md
index 19c5a9fa0..b3550d988 100644
--- a/docs/persona-hub.md
+++ b/docs/persona-hub.md
@@ -108,7 +108,35 @@ if (!res.ok) throw new Error(claims.error_description);
// claims.exp — Unix timestamp
```
-Tokens are HS256-signed with `JWT_SECRET`. Tenants that prefer offline verification can use the JWKS endpoint at `/.well-known/jwks.json` (not yet shipped — use `/verify` for now).
+### Two signing modes
+
+| Mode | Algorithm | When | Verification |
+|---|---|---|---|
+| **ES256** (preferred) | EC P-256 asymmetric | `PERSONA_JWKS_PRIVATE_KEY_PEM` env var set | Offline via [JWKS endpoint](https://three.ws/.well-known/jwks.json), or `/verify` |
+| **HS256** (fallback) | HMAC-SHA256 with `JWT_SECRET` | No persona keypair configured | Must hit `/verify` — secret can't be published |
+
+Generate an ES256 keypair with:
+
+```bash
+node scripts/generate-persona-key.mjs
+```
+
+then paste the output into Vercel env. The verify endpoint accepts both algorithms during rotation so tokens minted before key install keep working until they expire.
+
+### Offline verification (ES256 only)
+
+```js
+import { jwtVerify, createRemoteJWKSet } from 'jose';
+
+const JWKS = createRemoteJWKSet(new URL('https://three.ws/.well-known/jwks.json'));
+
+const { payload } = await jwtVerify(token, JWKS, {
+ issuer: 'https://three.ws',
+ audience: 'https://coolgame.three.ws',
+ algorithms: ['ES256'],
+});
+// payload.sub, payload.avatar, etc.
+```
---
diff --git a/features.html b/features.html
index 5ce225c7f..3f05bee2d 100644
--- a/features.html
+++ b/features.html
@@ -870,6 +870,7 @@
</div>
<div class="h-footer-link-col">
<h4 class="h-footer-link-heading">Resources</h4>
+ <a href="/blog">Blog</a>
<a href="/dashboard">Dashboard</a>
</div>
</nav>
diff --git a/home.html b/home.html
index 10b6f295d..d32ae5534 100644
--- a/home.html
+++ b/home.html
@@ -693,6 +693,7 @@
</div>
<div class="h-footer-link-col">
<h4 class="h-footer-link-heading">Resources</h4>
+ <a href="/blog">Blog</a>
<a href="/dashboard">Dashboard</a>
</div>
</nav>
diff --git a/profile.html b/profile.html
index e0e1b3303..9295a2842 100644
--- a/profile.html
+++ b/profile.html
@@ -772,6 +772,7 @@
</div>
<div class="h-footer-link-col">
<h4 class="h-footer-link-heading">Resources</h4>
+ <a href="/blog">Blog</a>
<a href="/dashboard">Dashboard</a>
</div>
</nav>
diff --git a/public/llms-full.txt b/public/llms-full.txt
index 4c257eec0..d217e0df1 100644
--- a/public/llms-full.txt
+++ b/public/llms-full.txt
@@ -331,12 +331,46 @@ URL: https://three.ws/docs/sdk
JavaScript / Node SDK for three.ws.
+### Docs · Listings & Distribution
+
+URL: https://three.ws/docs/listings
+
+Cloud marketplaces and ecosystem directories where three.ws is listed (Alibaba Cloud, BNB Chain Dappbay, and more).
+
### Tutorials
URL: https://three.ws/tutorials
Step-by-step build guides.
+## Blog
+
+Long-form announcements, launches, and writing from three.ws.
+
+### Blog
+
+URL: https://three.ws/blog
+
+Editorial index of three.ws launches and long-form posts.
+
+### three.ws Launches on Alibaba Cloud Marketplace
+
+URL: https://three.ws/blog/three-ws-on-alibaba-cloud-marketplace
+
+three.ws is live on the Alibaba Cloud International Marketplace. The first deployment of on-chain agents with native HTTP 402 / x402 payment capability inside the procurement flow of a top-four cloud provider.
+
+### three.ws Listed on BNB Chain's Dappbay Directory
+
+URL: https://three.ws/blog/three-ws-on-bnb-chain-dappbay
+
+three.ws is now in BNB Chain's official dApp directory under AI Agent Launchpad, AI Data, and AI Infra.
+
+### How to Embed 3D On-Chain Agents on Your Site
+
+URL: https://three.ws/blog/how-to-embed-3d-onchain-agents
+
+A short walkthrough for embedding a three.ws agent on any website using the <agent-3d> tag.
+
## Legal
### Privacy Policy
diff --git a/public/llms.txt b/public/llms.txt
index 158c3eae5..de6c47588 100644
--- a/public/llms.txt
+++ b/public/llms.txt
@@ -75,8 +75,18 @@ Docs, tutorials, and reference.
- [Docs · Widgets](https://three.ws/docs/widgets): Build and publish reusable chat and 3D widgets.
- [Docs · API Reference](https://three.ws/docs/api-reference): Full HTTP API reference.
- [Docs · SDK](https://three.ws/docs/sdk): JavaScript / Node SDK for three.ws.
+- [Docs · Listings & Distribution](https://three.ws/docs/listings): Cloud marketplaces and ecosystem directories where three.ws is listed (Alibaba Cloud, BNB Chain Dappbay, and more).
- [Tutorials](https://three.ws/tutorials): Step-by-step build guides.
+## Blog
+
+Long-form announcements, launches, and writing from three.ws.
+
+- [Blog](https://three.ws/blog): Editorial index of three.ws launches and long-form posts.
+- [three.ws Launches on Alibaba Cloud Marketplace](https://three.ws/blog/three-ws-on-alibaba-cloud-marketplace): three.ws is live on the Alibaba Cloud International Marketplace. The first deployment of on-chain agents with native HTTP 402 / x402 payment capability inside the procurement flow of a top-four cloud provider.
+- [three.ws Listed on BNB Chain's Dappbay Directory](https://three.ws/blog/three-ws-on-bnb-chain-dappbay): three.ws is now in BNB Chain's official dApp directory under AI Agent Launchpad, AI Data, and AI Infra.
+- [How to Embed 3D On-Chain Agents on Your Site](https://three.ws/blog/how-to-embed-3d-onchain-agents): A short walkthrough for embedding a three.ws agent on any website using the <agent-3d> tag.
+
## Legal
- [Privacy Policy](https://three.ws/legal/privacy): How three.ws handles user data.
diff --git a/public/sitemap.xml b/public/sitemap.xml
index 127c60066..75983e017 100644
--- a/public/sitemap.xml
+++ b/public/sitemap.xml
@@ -216,10 +216,40 @@
<loc>https://three.ws/docs/sdk</loc>
<lastmod>2026-05-17</lastmod>
</url>
+ <url>
+ <loc>https://three.ws/docs/listings</loc>
+ <lastmod>2026-05-17</lastmod>
+ <changefreq>monthly</changefreq>
+ <priority>0.5</priority>
+ </url>
<url>
<loc>https://three.ws/tutorials</loc>
<lastmod>2026-05-17</lastmod>
</url>
+ <url>
+ <loc>https://three.ws/blog</loc>
+ <lastmod>2026-05-17</lastmod>
+ <changefreq>weekly</changefreq>
+ <priority>0.7</priority>
+ </url>
+ <url>
+ <loc>https://three.ws/blog/three-ws-on-alibaba-cloud-marketplace</loc>
+ <lastmod>2026-05-17</lastmod>
+ <changefreq>monthly</changefreq>
+ <priority>0.6</priority>
+ </url>
+ <url>
+ <loc>https://three.ws/blog/three-ws-on-bnb-chain-dappbay</loc>
+ <lastmod>2026-05-17</lastmod>
+ <changefreq>monthly</changefreq>
+ <priority>0.6</priority>
+ </url>
+ <url>
+ <loc>https://three.ws/blog/how-to-embed-3d-onchain-agents</loc>
+ <lastmod>2026-05-15</lastmod>
+ <changefreq>monthly</changefreq>
+ <priority>0.5</priority>
+ </url>
<url>
<loc>https://three.ws/legal/privacy</loc>
<lastmod>2026-05-17</lastmod>
diff --git a/public/sitemap/index.html b/public/sitemap/index.html
index af37fe83a..2cf86f7cb 100644
--- a/public/sitemap/index.html
+++ b/public/sitemap/index.html
@@ -59,6 +59,7 @@
<a href="#agent-tools">Agent Tools</a>
<a href="#account">Account</a>
<a href="#learn">Learn</a>
+ <a href="#blog">Blog</a>
<a href="#legal">Legal</a>
<a href="#machine">Machine-readable</a>
<a href="#news">News</a>
@@ -443,6 +444,13 @@
<span class="sm-desc">JavaScript / Node SDK for three.ws.</span>
</a>
</li>
+ <li>
+ <a href="/docs/listings">
+ <span class="sm-title">Docs · Listings &amp; Distribution</span>
+ <span class="sm-path">/docs/listings</span>
+ <span class="sm-desc">Cloud marketplaces and ecosystem directories where three.ws is listed (Alibaba Cloud, BNB Chain Dappbay, and more).</span>
+ </a>
+ </li>
<li>
<a href="/tutorials">
<span class="sm-title">Tutorials</span>
@@ -453,6 +461,43 @@
</ul>
</section>
+ <section class="sm-section" id="blog">
+ <header>
+ <h2>Blog</h2>
+ <p class="sm-section-desc">Long-form announcements, launches, and writing from three.ws.</p>
+ </header>
+ <ul class="sm-list">
+ <li>
+ <a href="/blog">
+ <span class="sm-title">Blog</span>
+ <span class="sm-path">/blog</span>
+ <span class="sm-desc">Editorial index of three.ws launches and long-form posts.</span>
+ </a>
+ </li>
+ <li>
+ <a href="/blog/three-ws-on-alibaba-cloud-marketplace">
+ <span class="sm-title">three.ws Launches on Alibaba Cloud Marketplace</span>
+ <span class="sm-path">/blog/three-ws-on-alibaba-cloud-marketplace</span>
+ <span class="sm-desc">three.ws is live on the Alibaba Cloud International Marketplace. The first deployment of on-chain agents with native HTTP 402 / x402 payment capability inside the procurement flow of a top-four cloud provider.</span>
+ </a>
+ </li>
+ <li>
+ <a href="/blog/three-ws-on-bnb-chain-dappbay">
+ <span class="sm-title">three.ws Listed on BNB Chain's Dappbay Directory</span>
+ <span class="sm-path">/blog/three-ws-on-bnb-chain-dappbay</span>
+ <span class="sm-desc">three.ws is now in BNB Chain's official dApp directory under AI Agent Launchpad, AI Data, and AI Infra.</span>
+ </a>
+ </li>
+ <li>
+ <a href="/blog/how-to-embed-3d-onchain-agents">
+ <span class="sm-title">How to Embed 3D On-Chain Agents on Your Site</span>
+ <span class="sm-path">/blog/how-to-embed-3d-onchain-agents</span>
+ <span class="sm-desc">A short walkthrough for embedding a three.ws agent on any website using the &lt;agent-3d&gt; tag.</span>
+ </a>
+ </li>
+ </ul>
+ </section>
+
<section class="sm-section" id="legal">
<header>
<h2>Legal</h2>
diff --git a/src/account.js b/src/account.js
index 2427e67c2..d7a2283e5 100644
--- a/src/account.js
+++ b/src/account.js
@@ -156,7 +156,33 @@ export async function saveRemoteGlbToAccount(source, meta = {}) {
}
export async function generateAndSaveCompanions(avatarId, glbBlob) {
- const { glbBlobToUsdzBlob, glbBlobToHalfBodyBlob } = await import('./usdz-pipeline.js');
+ const { glbBlobToUsdzBlob, glbBlobToHalfBodyBlob, glbBlobToArkitReport } = await import(
+ './usdz-pipeline.js'
+ );
+
+ // ARKit-52 conformance check — runs in the background, dispatches a
+ // `three-ws:arkit-report` CustomEvent so pages can show coverage to the
+ // user. Independent of usdz / halfbody passes so a failure here doesn't
+ // block them.
+ (async () => {
+ let report;
+ try {
+ report = await glbBlobToArkitReport(glbBlob);
+ } catch (err) {
+ console.warn('[account] arkit report failed:', err?.message);
+ return;
+ }
+ console.info(
+ `[account] avatar ${avatarId} ARKit-52 coverage: ${Math.round(report.coverage * 100)}% (${report.implemented.length}/52)`,
+ );
+ try {
+ document.dispatchEvent(
+ new CustomEvent('three-ws:arkit-report', {
+ detail: { avatarId, ...report },
+ }),
+ );
+ } catch (_) {}
+ })();
// USDZ companion for iOS Quick Look. Independent of the half-body pass so
// a failure in one doesn't poison the other.
diff --git a/src/agent-avatar.js b/src/agent-avatar.js
index fbc92b95d..193d714d6 100644
--- a/src/agent-avatar.js
+++ b/src/agent-avatar.js
@@ -23,8 +23,8 @@ import { ACTION_TYPES } from './agent-protocol.js';
import { Vector3, Box3, MathUtils, PositionalAudio } from 'three';
import { resolveSlot, DEFAULT_ANIMATION_MAP } from './runtime/animation-slots.js';
import { ElevenLabsTTS } from './runtime/speech.js';
-import { LipSyncAnalyser } from './lip-sync-analyser.js';
-import { resolveMorphTargets, MORPH_ALIASES } from './runtime/arkit52.js';
+import { LipSyncAnalyser, VISEMES as LIPSYNC_VISEMES } from './lip-sync-analyser.js';
+import { resolveMorphTargets, MORPH_ALIASES, ARKIT_VISEMES } from './runtime/arkit52.js';
// BEGIN:IDLE_LOOP_IMPORT
import { IdleAnimation } from './idle-animation.js';
// END:IDLE_LOOP_IMPORT
@@ -323,6 +323,24 @@ export class AgentAvatar {
this._lipSync.connect(audioSource);
}
+ /**
+ * Tear down the active LipSyncAnalyser and zero every morph target the
+ * lipsync path writes so the lerp pulls the face back to neutral over the
+ * next few frames. Without this the mouth would freeze at the last viseme
+ * weight when TTS ends or is interrupted mid-word.
+ */
+ disconnectLipSync() {
+ this._lipSync?.disconnect();
+ this._lipSync = null;
+ // Zero every viseme the analyser ever writes plus the talk-hint slots
+ // that the amplitude-only fallback path drives.
+ for (const name of LIPSYNC_VISEMES) {
+ if (name in this._morphTarget) this._morphTarget[name] = 0;
+ }
+ this._morphTarget['mouthOpen'] = 0;
+ this._morphTarget['jawOpen'] = 0;
+ }
+
/**
* Set the agent's animation slot override map (from meta.edits.animations).
* @param {Object|null} map — { slotName: clipName, … }
@@ -677,17 +695,28 @@ export class AgentAvatar {
// Stage 4: Apply emotion to avatar
this._applyEmotionToAvatar(dt);
- // Stage 5: Frequency-based viseme lipsync (ElevenLabs path)
- // Samples the live audio AnalyserNode and overrides the blunt mouthOpen
- // with per-viseme morph weights. No-ops when _lipSync is null.
+ // Stage 5: Live-audio lipsync (ElevenLabs path).
+ // Sample the AnalyserNode once and branch on the avatar's detected
+ // lipsync mode so non-ARKit rigs (no viseme morphs) still move the jaw.
if (this._lipSync) {
const visemes = this._lipSync.sample();
if (visemes) {
- for (const [name, weight] of Object.entries(visemes)) {
- this._setMorphTarget(name, weight);
+ if (this._lipsyncMode === 'visemes') {
+ for (const [name, weight] of Object.entries(visemes)) {
+ this._setMorphTarget(name, weight);
+ }
+ // Suppress the flat mouthOpen talk-hint while real visemes drive the mouth.
+ this._setMorphTarget('mouthOpen', 0);
+ } else if (this._lipsyncMode === 'jaw') {
+ // No visemes on this rig — drive jawOpen straight from the
+ // smoothed amplitude so the mouth still moves to speech.
+ // 1.8x to push 0..~0.55 average speech amplitude up to a
+ // visible open; clamped in _setMorphTarget.
+ const amp = this._lipSync.getAmplitude();
+ this._setMorphTarget('jawOpen', amp * 1.8);
}
- // Suppress the flat mouthOpen talk-hint while real visemes are active
- this._setMorphTarget('mouthOpen', 0);
+ // _lipsyncMode === 'none' → no morph path available; the existing
+ // talk-hint mouthOpen on _onSpeak is the best we can do for this rig.
}
}
@@ -788,8 +817,20 @@ export class AgentAvatar {
*/
_buildMorphCache() {
this._morphResolved = new Map();
+ this._lipsyncMode = 'none';
if (!this.viewer?.content) return;
this._morphResolved = resolveMorphTargets(this.viewer.content);
+
+ // Determine the best lipsync rendering path for this avatar:
+ // 'visemes' — at least one ARKit viseme morph exists; drive per-viseme
+ // weights from the spectral analyser
+ // 'jaw' — no visemes but jawOpen (or aliased mouthOpen) exists;
+ // drive a single morph from overall amplitude
+ // 'none' — neither; lipsync is a no-op on this rig
+ const hasVisemes = ARKIT_VISEMES.some((n) => this._morphResolved.has(n));
+ if (hasVisemes) this._lipsyncMode = 'visemes';
+ else if (this._morphResolved.has('jawOpen')) this._lipsyncMode = 'jaw';
+ else this._lipsyncMode = 'none';
}
/**
diff --git a/src/app.js b/src/app.js
index 4adab15e9..555b0b506 100644
--- a/src/app.js
+++ b/src/app.js
@@ -1478,8 +1478,7 @@ class App {
if (tts.analyserNode) avatar.connectLipSync(tts.analyserNode);
};
tts.onEnd = () => {
- avatar._lipSync?.disconnect();
- avatar._lipSync = null;
+ avatar.disconnectLipSync();
};
}
}
diff --git a/src/avatar-page.js b/src/avatar-page.js
index e04c6d551..05dd2d5c7 100644
--- a/src/avatar-page.js
+++ b/src/avatar-page.js
@@ -229,6 +229,7 @@ function renderShell(glbUrl) {
<span class="av-cta-talk-dot" aria-hidden="true"></span>
<span>Talk to ${esc(avatar.name)}</span>
</button>
+ ${avatar.owner_id ? `<a class="av-cta-edit-link" href="/avatars/${encodeURIComponent(avatar.id || avatarId)}/edit">Customize appearance →</a>` : ''}
</div>
<div class="av-cta-row">
<button class="av-cta" id="av-use">Start an agent</button>
diff --git a/src/create.js b/src/create.js
index a396ec1b5..a4e2f24da 100644
--- a/src/create.js
+++ b/src/create.js
@@ -4,6 +4,21 @@ import { AvatarCreator } from './avatar-creator.js';
// GLB magic bytes: ASCII "glTF"
const GLB_MAGIC = [0x67, 0x6c, 0x54, 0x46];
+// Surface ARKit-52 conformance results to the user. The companions pipeline
+// dispatches `three-ws:arkit-report` on document once the GLB has been
+// inspected. Avatars with full coverage are silent — we only nudge when a
+// rig is missing morphs, since that's the actionable case.
+document.addEventListener('three-ws:arkit-report', (event) => {
+ const detail = /** @type {CustomEvent} */ (event).detail || {};
+ const coverage = Math.round((detail.coverage || 0) * 100);
+ const implemented = detail.implemented?.length ?? 0;
+ if (coverage >= 100) return;
+ showStatus(
+ `Avatar saved · ${coverage}% ARKit blendshape coverage (${implemented}/52). Missing morphs render flatter — see docs/avatar-creation.md.`,
+ 'info',
+ );
+});
+
async function boot() {
const creator = new AvatarCreator(document.body, (blob, meta = {}) => {
const provider = meta.provider || 'avaturn';
@@ -27,7 +42,10 @@ async function boot() {
});
wireCard('card-selfie', async () => {
if (await isAtAvatarLimit()) return;
- creator.openDefaultEditor();
+ // Real 3-photo flow lives at /create/selfie. Pulls camera or upload,
+ // posts to /api/onboarding/avaturn-session, then redirects back to /
+ // with #avatarSession so the main viewer's AvatarCreator picks it up.
+ window.location.href = '/create/selfie';
});
wireCard('card-upload-glb', (e) => {
// Tooltip anchors live inside the card; let them navigate normally.
diff --git a/src/element.js b/src/element.js
index c14e7b811..e877ca187 100644
--- a/src/element.js
+++ b/src/element.js
@@ -1417,8 +1417,7 @@ class Agent3DElement extends HTMLElement {
if (tts.analyserNode) avatar.connectLipSync(tts.analyserNode);
};
tts.onEnd = () => {
- avatar._lipSync?.disconnect();
- avatar._lipSync = null;
+ avatar.disconnectLipSync();
};
}
} catch (e) {
diff --git a/src/lip-sync-analyser.js b/src/lip-sync-analyser.js
index 8be31b2c0..04d40f7fc 100644
--- a/src/lip-sync-analyser.js
+++ b/src/lip-sync-analyser.js
@@ -6,7 +6,7 @@
// High (2k–8k Hz) → sibilants + fricatives: viseme_SS, viseme_FF, viseme_CH
// Amplitude dip → bilabial closure: viseme_PP
-const VISEMES = [
+export const VISEMES = [
'viseme_aa', 'viseme_O', 'viseme_E', 'viseme_I', 'viseme_nn',
'viseme_SS', 'viseme_FF', 'viseme_CH', 'viseme_PP',
];
@@ -32,6 +32,11 @@ export class LipSyncAnalyser {
this._out = {};
this._prev = {};
for (const n of VISEMES) this._out[n] = this._prev[n] = 0;
+
+ // Smoothed overall amplitude (0..1) — exposed via getAmplitude() so
+ // non-ARKit avatars (no viseme morphs) can drive a single jaw morph.
+ this._amplitude = 0;
+ this._prevAmplitude = 0;
}
/**
@@ -92,6 +97,19 @@ export class LipSyncAnalyser {
}
this._ctx = this._analyser = this._source = this._freqBuf = null;
for (const n of VISEMES) this._out[n] = this._prev[n] = 0;
+ this._amplitude = this._prevAmplitude = 0;
+ }
+
+ /**
+ * Last sampled overall amplitude (0..1), smoothed by the same EMA as the
+ * viseme weights. Updated by every call to sample(). Returns 0 before the
+ * first sample or after disconnect.
+ *
+ * Non-ARKit avatars (no viseme morphs) can drive jawOpen/mouthOpen directly
+ * from this without re-running spectral analysis.
+ */
+ getAmplitude() {
+ return this._amplitude;
}
/**
@@ -117,6 +135,7 @@ export class LipSyncAnalyser {
this._prev[k] = n;
this._out[k] = n;
}
+ this._prevAmplitude = this._amplitude = this._prevAmplitude * 0.75;
return this._out;
}
@@ -138,6 +157,9 @@ export class LipSyncAnalyser {
this._prev[k] = n;
this._out[k] = n;
}
+ // Smoothed amplitude tracks the same EMA so the jaw fallback feels
+ // in-step with the viseme weights instead of leading or lagging them.
+ this._prevAmplitude = this._amplitude = this._prevAmplitude + (overall - this._prevAmplitude) * 0.25;
return this._out;
}
}
diff --git a/src/usdz-pipeline.js b/src/usdz-pipeline.js
index b4ca0bd19..b667f081c 100644
--- a/src/usdz-pipeline.js
+++ b/src/usdz-pipeline.js
@@ -11,6 +11,7 @@
// without any external converter or hosted RPM endpoint.
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
+import { conformanceReport } from './runtime/arkit52.js';
import { GLTFExporter } from 'three/addons/exporters/GLTFExporter.js';
import { USDZExporter } from 'three/addons/exporters/USDZExporter.js';
import { MeshStandardMaterial, Color, DoubleSide } from 'three';
@@ -155,3 +156,20 @@ export async function glbBlobToHalfBodyBlob(glbBlob) {
});
return new Blob([buffer], { type: 'model/gltf-binary' });
}
+
+/**
+ * Inspect a GLB Blob and report which of the 52 canonical ARKit blendshapes
+ * the avatar implements (including via known aliases — snake_case, _L/_R
+ * suffixes, combined-shape fanout). Used by the upload pipeline to attach
+ * coverage metadata so the editor can surface gaps to the user and the
+ * Empathy Layer knows up-front what it can drive.
+ *
+ * @param {Blob} glbBlob
+ * @returns {Promise<{ implemented: string[], missing: string[], coverage: number }>}
+ */
+export async function glbBlobToArkitReport(glbBlob) {
+ const gltf = await _loadGlbBlob(glbBlob);
+ const scene = gltf.scene || gltf.scenes?.[0];
+ if (!scene) throw new Error('arkit: glb contained no scene');
+ return conformanceReport(scene);
+}
diff --git a/src/voice/talk-mode.js b/src/voice/talk-mode.js
index 12dec3c19..0b0c66697 100644
--- a/src/voice/talk-mode.js
+++ b/src/voice/talk-mode.js
@@ -54,8 +54,17 @@ export function openTalkMode({ avatar, systemPromptFn }) {
const transcriptEl = overlay.querySelector('.tws-talk-transcript');
const errEl = overlay.querySelector('.tws-talk-error');
const nameEl = overlay.querySelector('.tws-talk-name');
+ const cloneBtn = overlay.querySelector('.tws-talk-clone');
nameEl.textContent = avatar.name || 'Avatar';
+ // Owner-only affordance: `owner_id` is stripped from the API response for
+ // non-owners (see api/_lib/avatars.js stripOwnerFor), so its presence
+ // is the signal that the current session owns this avatar.
+ const isOwner = !!avatar.owner_id;
+ if (isOwner && avatar.agent_id) {
+ cloneBtn.hidden = false;
+ }
+
const scene = new TalkScene();
const mouthTarget = new AvatarMouthTarget();
@@ -125,6 +134,20 @@ export function openTalkMode({ avatar, systemPromptFn }) {
closeBtn.addEventListener('click', () => close());
+ if (cloneBtn) {
+ cloneBtn.addEventListener('click', () => {
+ openVoiceCloneModal({
+ agentId: avatar.agent_id,
+ agentName: avatar.name || 'Avatar',
+ onClose: () => {
+ // User may have completed a clone — invalidate the cache so the
+ // next turn picks up the new voice_id from the agent record.
+ controller?.refreshVoice();
+ },
+ });
+ });
+ }
+
function close() {
if (unloading) return;
unloading = true;
@@ -155,8 +178,13 @@ export function closeTalkMode() {
const TEMPLATE = `
<button class="tws-talk-close" aria-label="Exit talk mode" title="Exit (Esc)">✕</button>
<div class="tws-talk-header">
- <span class="tws-talk-eyebrow">Talking to</span>
- <span class="tws-talk-name"></span>
+ <div>
+ <span class="tws-talk-eyebrow">Talking to</span>
+ <span class="tws-talk-name"></span>
+ </div>
+ <button class="tws-talk-clone" type="button" hidden aria-label="Clone your voice for this avatar">
+ <span aria-hidden="true">🎙️</span> Use my voice
+ </button>
</div>
<div class="tws-talk-stage"></div>
<div class="tws-talk-transcript" aria-live="polite"></div>
@@ -240,7 +268,29 @@ const TALK_CSS = `
.tws-talk-close:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.25); }
.tws-talk-header {
padding: 16px 24px 0;
- display: flex; flex-direction: column; gap: 2px;
+ display: flex;
+ align-items: flex-start;
+ justify-content: space-between;
+ gap: 12px;
+}
+.tws-talk-header > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
+.tws-talk-clone {
+ background: rgba(255,255,255,0.06);
+ border: 1px solid rgba(255,255,255,0.14);
+ color: #fafafa;
+ font-family: inherit;
+ font-size: 12px;
+ font-weight: 600;
+ padding: 7px 12px;
+ border-radius: 999px;
+ cursor: pointer;
+ transition: background 0.15s, border-color 0.15s, transform 0.1s;
+ flex-shrink: 0;
+}
+.tws-talk-clone:hover {
+ background: rgba(255,255,255,0.10);
+ border-color: rgba(255,255,255,0.25);
+ transform: translateY(-1px);
}
.tws-talk-eyebrow {
font-family: 'Space Grotesk', sans-serif;
diff --git a/tests/lip-sync-analyser.test.js b/tests/lip-sync-analyser.test.js
index dc405be82..7fd80b6b8 100644
--- a/tests/lip-sync-analyser.test.js
+++ b/tests/lip-sync-analyser.test.js
@@ -158,4 +158,42 @@ describe('LipSyncAnalyser', () => {
analyser.connect({ totally: 'not an audio node' });
expect(analyser.sample()).toBeNull();
});
+
+ it('getAmplitude() reports 0 before connect, tracks signal level after sampling, decays on silence', () => {
+ expect(analyser.getAmplitude()).toBe(0);
+
+ const fake = new FakeAnalyserNode({ spectrum: () => 220 });
+ analyser.connect(fake);
+ // Single frame: amplitude rises from 0 but does not snap to the full target (EMA).
+ analyser.sample();
+ const first = analyser.getAmplitude();
+ expect(first).toBeGreaterThan(0);
+ expect(first).toBeLessThan(220 / 255);
+
+ // Settle.
+ for (let i = 0; i < 60; i++) analyser.sample();
+ const stable = analyser.getAmplitude();
+ expect(stable).toBeGreaterThan(0.7); // ~220/255 ≈ 0.86
+ expect(stable).toBeLessThan(0.95);
+
+ // Silence — amplitude decays monotonically.
+ fake.setSpectrum(() => 0);
+ let prev = stable;
+ for (let i = 0; i < 30; i++) {
+ analyser.sample();
+ const now = analyser.getAmplitude();
+ expect(now).toBeLessThanOrEqual(prev + 1e-9);
+ prev = now;
+ }
+ expect(prev).toBeLessThan(stable * 0.1);
+ });
+
+ it('disconnect() resets amplitude to 0', () => {
+ const fake = new FakeAnalyserNode({ spectrum: () => 220 });
+ analyser.connect(fake);
+ for (let i = 0; i < 30; i++) analyser.sample();
+ expect(analyser.getAmplitude()).toBeGreaterThan(0);
+ analyser.disconnect();
+ expect(analyser.getAmplitude()).toBe(0);
+ });
});
diff --git a/tutorial.html b/tutorial.html
index 6159e004e..2cf80be2a 100644
--- a/tutorial.html
+++ b/tutorial.html
@@ -753,6 +753,7 @@
</div>
<div class="h-footer-link-col">
<h4 class="h-footer-link-heading">Resources</h4>
+ <a href="/blog">Blog</a>
<a href="/tutorials" aria-current="page">Tutorials</a>
<a href="/dashboard">Dashboard</a>
</div>
diff --git a/tutorials.html b/tutorials.html
index 798291a79..d3bce80cb 100644
--- a/tutorials.html
+++ b/tutorials.html
@@ -569,6 +569,7 @@
</div>
<div class="h-footer-link-col">
<h4 class="h-footer-link-heading">Resources</h4>
+ <a href="/blog">Blog</a>
<a href="/tutorials" aria-current="page">Tutorials</a>
<a href="/dashboard">Dashboard</a>
</div>
diff --git a/vercel.json b/vercel.json
index 3b07d9d38..933b8eff0 100644
--- a/vercel.json
+++ b/vercel.json
@@ -40,6 +40,10 @@
"src": "/\\.well-known/agent-attestation-schemas",
"dest": "/api/wk?name=agent-attestation-schemas"
},
+ {
+ "src": "/\\.well-known/jwks\\.json",
+ "dest": "/api/auth/persona/[action]?action=jwks"
+ },
{
"src": "/\\.well-known/oauth-authorization-server",
"dest": "/api/wk?name=oauth-authorization-server"
@@ -918,6 +922,10 @@
"src": "/agent/([^/]+)/edit",
"dest": "/agent-edit.html"
},
+ {
+ "src": "/avatars/([^/]+)/edit",
+ "dest": "/avatar-edit.html?id=$1"
+ },
{
"src": "/agent/([^/]+)/embed",
"headers": {
@@ -1348,6 +1356,18 @@
"src": "/sitemap/",
"dest": "/sitemap/index.html"
},
+ {
+ "src": "/blog",
+ "dest": "/blog/index.html"
+ },
+ {
+ "src": "/blog/",
+ "dest": "/blog/index.html"
+ },
+ {
+ "src": "/blog/([a-z0-9-]+)/?",
+ "dest": "/blog/$1.html"
+ },
{
"src": "/llms.txt",
"headers": { "content-type": "text/plain; charset=utf-8", "cache-control": "public, max-age=3600" },
@@ -1378,6 +1398,14 @@
"src": "/chat/(.*)",
"dest": "/chat/$1"
},
+ {
+ "src": "/create/selfie",
+ "dest": "/create-selfie.html"
+ },
+ {
+ "src": "/create/selfie/",
+ "dest": "/create-selfie.html"
+ },
{
"src": "/create",
"dest": "/create.html"
@@ -1419,6 +1447,20 @@
"Location": "/discover"
}
},
+ {
+ "src": "/dappbay",
+ "status": 302,
+ "headers": {
+ "Location": "https://dappbay.bnbchain.org/detail/three"
+ }
+ },
+ {
+ "src": "/dappbay/",
+ "status": 302,
+ "headers": {
+ "Location": "https://dappbay.bnbchain.org/detail/three"
+ }
+ },
{
"src": "/a/(\\d+)/(\\d+)/embed",
"headers": {
diff --git a/vite.config.js b/vite.config.js
index db9dccf94..fac370e53 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -125,6 +125,7 @@ const appConfig = {
embed: resolve(__dirname, 'embed.html'),
launchpad: resolve(__dirname, 'launchpad.html'),
create: resolve(__dirname, 'create.html'),
+ 'create-selfie': resolve(__dirname, 'create-selfie.html'),
'agent-home': resolve(__dirname, 'agent-home.html'),
marketplace: resolve(__dirname, 'marketplace.html'),
'agent-edit': resolve(__dirname, 'agent-edit.html'),
@@ -184,6 +185,8 @@ const appConfig = {
'/agents': resolve(root, 'public/agents/index.html'),
'/agents/': resolve(root, 'public/agents/index.html'),
'/create': resolve(root, 'create.html'),
+ '/create/selfie': resolve(root, 'create-selfie.html'),
+ '/create/selfie/': resolve(root, 'create-selfie.html'),
'/dashboard': resolve(root, 'public/dashboard/index.html'),
'/studio': resolve(root, 'public/studio/index.html'),
'/studio/': resolve(root, 'public/studio/index.html'),
@@ -245,6 +248,8 @@ const appConfig = {
'/strategy-lab/': resolve(root, 'public/strategy-lab.html'),
'/sitemap': resolve(root, 'public/sitemap/index.html'),
'/sitemap/': resolve(root, 'public/sitemap/index.html'),
+ '/blog': resolve(root, 'blog/index.html'),
+ '/blog/': resolve(root, 'blog/index.html'),
'/demo/avatar-os': resolve(root, 'public/demo/avatar-os/index.html'),
'/demo/avatar-os/': resolve(root, 'public/demo/avatar-os/index.html'),
'/': resolve(root, 'home.html'),
@@ -302,8 +307,13 @@ const appConfig = {
return res.end();
}
let filePath = fileMap[path];
+ // /blog/<slug> → resolves to blog/<slug>.html on disk
+ if (!filePath && /^\/blog\/[a-z0-9-]+\/?$/.test(path)) {
+ const slug = path.replace(/^\/blog\//, '').replace(/\/$/, '');
+ filePath = resolve(root, `blog/${slug}.html`);
+ }
// /tutorials/<slug> → dedicated tutorial viewer template
- if (!filePath && /^\/tutorials\/[a-z0-9-]+\/?$/.test(path))
+ else if (!filePath && /^\/tutorials\/[a-z0-9-]+\/?$/.test(path))
filePath = resolve(root, 'tutorial.html');
// /p/<slug> → public Launchpad Studio renderer (hydrates from /api/launchpad/get)
else if (!filePath && /^\/p\/[a-z0-9-]+\/?$/.test(path))