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.

mixed: avatar privacy default, MCP rebrand 1.0.2, 3D home jump fix

overstepping9ebb344e962e
diff --git a/api/_lib/validate.js b/api/_lib/validate.js
index e25e93acc..595e631b0 100644
--- a/api/_lib/validate.js
+++ b/api/_lib/validate.js
@@ -71,7 +71,7 @@ export const createAvatarBody = z.object({
name: z.string().trim().min(1).max(120),
slug: slug.optional(),
description: z.string().trim().max(2000).optional(),
- visibility: avatarVisibility.default('public'),
+ visibility: avatarVisibility.default('private'),
tags: z.array(z.string().trim().min(1).max(40)).max(20).default([]),
source: z.enum(['upload', 'avaturn', 'readyplayer', 'import', 'direct-upload', 'reconstruct']).default('upload'),
parent_avatar_id: z.string().uuid().optional(),
diff --git a/package.json b/package.json
index 2445a98bc..5f8b51a00 100644
--- a/package.json
+++ b/package.json
@@ -47,7 +47,7 @@
]
},
"scripts": {
- "postinstall": "npm run build --prefix agent-payments-sdk && node scripts/fix-pump-sdk-esm.mjs && node scripts/copy-three-decoders.mjs",
+ "postinstall": "npm run build --prefix agent-payments-sdk && node scripts/fix-pump-sdk-esm.mjs && node scripts/fix-x402-extensions-esm.mjs && node scripts/copy-three-decoders.mjs",
"dev": "vite --port 3000",
"dev:multi": "npm run dev --prefix multiplayer",
"dev:walk-all": "node scripts/dev-walk-all.mjs",
diff --git a/packages/avatar-agent-mcp/README.md b/packages/avatar-agent-mcp/README.md
index b31f9f837..80e7fc949 100644
--- a/packages/avatar-agent-mcp/README.md
+++ b/packages/avatar-agent-mcp/README.md
@@ -7,7 +7,7 @@
[![node](https://img.shields.io/badge/node-%E2%89%A520-9945FF?style=flat-square)](https://nodejs.org)
[![mcp](https://img.shields.io/badge/Model%20Context%20Protocol-✓-9945FF?style=flat-square)](https://modelcontextprotocol.io)
-Registry name: **`ws.three/3D-AI-Agent-Avatar`** · npm: **`@three-ws/avatar-agent`**
+Registry name: **`io.github.three-ws/3D-AI-Agent-Avatar`** · npm: **`@three-ws/avatar-agent`**
A single MCP server that's two things at once:
diff --git a/packages/avatar-agent-mcp/package.json b/packages/avatar-agent-mcp/package.json
index 123222829..d5617af8f 100644
--- a/packages/avatar-agent-mcp/package.json
+++ b/packages/avatar-agent-mcp/package.json
@@ -1,7 +1,7 @@
{
"name": "@three-ws/avatar-agent",
- "version": "1.0.1",
- "mcpName": "ws.three/3D-AI-Agent-Avatar",
+ "version": "1.0.2",
+ "mcpName": "io.github.three-ws/3D-AI-Agent-Avatar",
"description": "3D AI Agent Avatar — MCP server that spawns a textured GLB avatar, inspects/validates/optimizes any 3D model, gives the agent a Solana wallet + a voice, and ships full pump.fun powers (atomic Jito-bundled launches + creator-fee collection). Powered by three.ws.",
"type": "module",
"author": "nirholas <[email protected]>",
diff --git a/packages/avatar-agent-mcp/server.json b/packages/avatar-agent-mcp/server.json
index e8b9059cd..16881c008 100644
--- a/packages/avatar-agent-mcp/server.json
+++ b/packages/avatar-agent-mcp/server.json
@@ -1,17 +1,17 @@
{
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
- "name": "ws.three/3D-AI-Agent-Avatar",
+ "name": "io.github.three-ws/3D-AI-Agent-Avatar",
"description": "3D AI Agent Avatar — render, inspect, validate, and optimize any GLB; spawn a textured 3D avatar with a Solana wallet, a voice (OpenAI TTS), live pose + camera rendering, and full pump.fun powers (atomic Jito-bundled launches + creator-fee collection). Built by three.ws.",
"repository": {
"url": "https://github.com/nirholas/three.ws",
"source": "github"
},
- "version": "1.0.1",
+ "version": "1.0.2",
"packages": [
{
"registryType": "npm",
"identifier": "@three-ws/avatar-agent",
- "version": "1.0.1",
+ "version": "1.0.2",
"transport": {
"type": "stdio"
},
diff --git a/public/demos/3d-home.html b/public/demos/3d-home.html
index 2f9db068e..e8838c834 100644
--- a/public/demos/3d-home.html
+++ b/public/demos/3d-home.html
@@ -314,7 +314,7 @@
let seqT = 0, landed = false, jumpTarget = { x: 0, y: 0 };
const STAND_S = 2.566; // standup clip duration
- const JUMP_S = 2.933; // jumpdown3 clip duration
+ const JUMP_S = 2.667; // jumpdown clip duration
const SIT_DWELL_S = 2.4; // how long he sits before standing
// Earliest-possible fraction at which the impact effects MAY fire.
// The actual trigger is gated on screen-space proximity below — this
@@ -326,10 +326,13 @@
const LAND_PX = 10;
const PEAK_U = 0.55; // arc peak in world units
const JUMP_YAW = 0.22; // ~12° peak yaw mid-flight (face-forward at both ends)
- // cz.glb origin is at the feet (verified in /demos/button-jump.html), so
- // these stay 0 by default. Bump them if the visible feet/butt sit off.
+ // cz.glb origin is at the feet (verified in /demos/button-jump.html).
+ // FEET_OFFSET stays 0 so the visible feet land on the button top.
+ // SIT_OFFSET pushes the origin DOWN by the seated feet→butt distance,
+ // so the butt — not the feet — rests on the text line. Tuned to the
+ // sitidle pose where legs dangle below the hips.
const FEET_OFFSET_PX = 0;
- const SIT_OFFSET_PX = 0;
+ const SIT_OFFSET_PX = 140;
function smoothstep(t) { return t * t * (3 - 2 * t); }
@@ -640,7 +643,7 @@
Promise.all([
fetchClip('/animations/clips/sitidle.json'),
fetchClip('/animations/clips/standup.json'),
- fetchClip('/animations/clips/jumpdown3.json'),
+ fetchClip('/animations/clips/jumpdown.json'),
...PERFORM_CLIPS.map(c => fetchClip(c.file)),
]).then(([sitJson, standJson, jumpJson, ...performJsons]) => {
sitAction = mixer.clipAction(THREE.AnimationClip.parse(sitJson));
@@ -670,11 +673,19 @@
if (rootBone) baseRootPos = rootBone.position.clone();
- // Lock root bone every frame so animation root motion never drifts the avatar
+ // Root-bone lock — only active during 'jumping'. The jump clip
+ // has translational root motion that would compete with our
+ // JS-driven parabolic arc, so we clamp Hips to its rest pose
+ // for those frames. Other phases (sitting, standingUp, perform)
+ // must let the clip's Hips.position drive seated/standing height
+ // — clamping there forces default.glb's standing rest pose into
+ // every clip and the avatar floats above the sit anchor.
const _r = renderer.render.bind(renderer);
renderer.render = (sc, cam) => {
try {
- if (rootBone && baseRootPos) rootBone.position.copy(baseRootPos);
+ if (phase === 'jumping' && rootBone && baseRootPos) {
+ rootBone.position.copy(baseRootPos);
+ }
} catch (_) {}
_r(sc, cam);
};
diff --git a/scripts/fix-x402-extensions-esm.mjs b/scripts/fix-x402-extensions-esm.mjs
new file mode 100644
index 000000000..63d5dadc2
--- /dev/null
+++ b/scripts/fix-x402-extensions-esm.mjs
@@ -0,0 +1,53 @@
+// Patches @x402/extensions after install.
+//
+// The 2.12.0 package ships with `dist/esm/` empty — only `dist/cjs/` got built.
+// Its `exports` map still advertises `import` conditions pointing at the missing
+// `.mjs` files, so Vite/Vitest/Node ESM fail with "Failed to resolve entry for
+// package".
+//
+// Rewrite each subpath's `import` condition to point at the working CJS bundle.
+// Vite's ESM-CJS interop handles the named-export pattern tsup produces.
+// Idempotent; survives `npm ci` via postinstall.
+
+import { existsSync, readFileSync, writeFileSync } from 'node:fs';
+import { dirname, join } from 'node:path';
+import { fileURLToPath } from 'node:url';
+
+const root = dirname(fileURLToPath(import.meta.url));
+const repo = dirname(root);
+const pkgPath = join(repo, 'node_modules/@x402/extensions/package.json');
+
+if (!existsSync(pkgPath)) {
+ console.log('[fix-x402-extensions-esm] package not installed, skipping');
+ process.exit(0);
+}
+
+const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
+const exportsMap = pkg.exports || {};
+let mutated = 0;
+
+for (const conditions of Object.values(exportsMap)) {
+ if (!conditions || typeof conditions !== 'object') continue;
+ const require = conditions.require;
+ if (!require?.default) continue;
+ const desiredImport = {
+ types: require.types,
+ default: require.default,
+ };
+ const currentImport = conditions.import;
+ if (
+ currentImport?.types === desiredImport.types &&
+ currentImport?.default === desiredImport.default
+ ) {
+ continue;
+ }
+ conditions.import = desiredImport;
+ mutated++;
+}
+
+if (mutated > 0) {
+ writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n');
+ console.log(`[fix-x402-extensions-esm] redirected import→cjs for ${mutated} subpath(s)`);
+} else {
+ console.log('[fix-x402-extensions-esm] already patched');
+}
diff --git a/scripts/verify-3d-home.mjs b/scripts/verify-3d-home.mjs
index 1b08c9ac5..a34b7f813 100644
--- a/scripts/verify-3d-home.mjs
+++ b/scripts/verify-3d-home.mjs
@@ -17,7 +17,9 @@ const page = await browser.newPage();
const consoleErrors = [];
const failedRequests = [];
page.on('console', msg => {
- if (msg.type() === 'error') consoleErrors.push(msg.text());
+ const t = msg.type();
+ if (t === 'error') consoleErrors.push(msg.text());
+ if (process.env.LOG_ALL) console.log(`[browser ${t}] ${msg.text()}`);
});
page.on('pageerror', err => consoleErrors.push(`pageerror: ${err.message}`));
page.on('requestfailed', req => {