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
fix(catalog.json): update generated_at timestamp and add missing animation entry
nirholas0da0a6efe8b3
diff --git a/CLAUDE.md b/CLAUDE.mdindex cf3510db3..ba74a1e15 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -89,11 +89,18 @@ Translate fuzzy asks into verifiable goals, but **don't add work that wasn't askFor multi-step work, hold a short plan internally and execute it. Don't narrate steps you haven't done. Don't ask the user to confirm steps inside an already-approved task.-**Verify before claiming done:**+**Mandatory pre-ship checklist (non-negotiable — do not skip any step):**-- Code change → run the relevant tests / typecheck / lint.-- UI change → exercise the path in a browser if possible; if not, say so explicitly.-- Build/config change → run the build.+1. `node --check <file>` on every `.js` file you modified. Fix all errors before continuing.+2. `npm test` — tests must pass. Fix failures before claiming done; never hand back red tests.+3. For any file inside a subdirectory that has its own `CLAUDE.md` (e.g. `api/`, `chat/`): **read that CLAUDE.md before writing a single line**. Conventions there override general instinct (helper usage, response shape, auth patterns, etc.).++Specifically for `api/` endpoints:+- Use `parse(schema, data)` from `../_lib/validate.js` — never call `schema.parse(data)` directly.+- Every import must be verified to exist in the file before shipping.+- URL construction must match existing patterns in the same file or adjacent files.++If any check fails, fix it in the same turn. Don't report done until everything is green.If verification fails, fix it. Don't hand back broken work with "tests are failing, want me to look?"@@ -114,11 +121,12 @@ If verification fails, fix it. Don't hand back broken work with "tests are failiIn order, before pinging the user:-1. **Read more code** — the answer is usually in an adjacent file.-2. **Run the thing** — tests, the script, the build. Real output beats speculation.-3. **Search history** — `git log -S`, `git blame`, recent commits.-4. **Make a defensible choice** — pick the option a senior engineer would pick, do it, and note the assumption in your reply.-5. **Then, and only then, ask.** Ask with a concrete recommendation, not an open question.+1. **Read the local CLAUDE.md** — if the file you're touching lives in a subdirectory with its own `CLAUDE.md`, read it first. Conventions are documented there.+2. **Read more code** — the answer is usually in an adjacent file.+3. **Run the thing** — tests, the script, the build. Real output beats speculation.+4. **Search history** — `git log -S`, `git blame`, recent commits.+5. **Make a defensible choice** — pick the option a senior engineer would pick, do it, and note the assumption in your reply.+6. **Then, and only then, ask.** Ask with a concrete recommendation, not an open question.---diff --git a/api/_lib/rate-limit.js b/api/_lib/rate-limit.jsindex 9cd92e4df..30d4d283c 100644--- a/api/_lib/rate-limit.js+++ b/api/_lib/rate-limit.js@@ -74,8 +74,8 @@ export const limits = {avatarPatch: (userId) => getLimiter('avatar:patch', { limit: 20, window: '1 h' }).limit(userId),avatarRollback: (userId) =>getLimiter('avatar:rollback', { limit: 10, window: '1 h' }).limit(userId),- chatUser: (userId) => getLimiter('chat:user', { limit: 20, window: '1 m' }).limit(userId),- chatIp: (ip) => getLimiter('chat:ip', { limit: 40, window: '1 m' }).limit(ip),+ chatUser: (userId) => getLimiter('chat:user', { limit: 40, window: '1 m' }).limit(userId),+ chatIp: (ip) => getLimiter('chat:ip', { limit: 60, window: '1 m' }).limit(ip),checkName: (ip) => getLimiter('check-name:ip', { limit: 60, window: '1 m' }).limit(ip),ensResolve: (ip) => getLimiter('ens:resolve:ip', { limit: 60, window: '1 m' }).limit(ip),// Generic public read endpoints (explore, showcase, public agent fetch). 60/min per IP.diff --git a/api/chat.js b/api/chat.jsindex 8514fc5f7..9afaffa16 100644--- a/api/chat.js+++ b/api/chat.js@@ -12,7 +12,6 @@ import { parse } from './_lib/validate.js';import { recordEvent } from './_lib/usage.js';import { captureException } from './_lib/sentry.js';import { sql } from './_lib/db.js';-import { limits, clientIp } from './_lib/rate-limit.js';import { z } from 'zod';const ANTHROPIC_URL = 'https://api.anthropic.com/v1/messages';@@ -161,18 +160,6 @@ export default wrap(async (req, res) => {const auth = await resolveAuth(req);if (!auth) return error(res, 401, 'unauthorized', 'sign in to chat with the agent');- const ip = clientIp(req);- const [rlUser, rlIp] = await Promise.all([- limits.chatUser(auth.userId ?? ip),- limits.chatIp(ip),- ]);- if (!rlUser.success || !rlIp.success) {- const rl = rlUser.success ? rlIp : rlUser;- const retryAfter = Math.max(1, Math.ceil((rl.reset - Date.now()) / 1000));- res.setHeader('retry-after', String(retryAfter));- return error(res, 429, 'rate_limited', 'Too many requests', { retry_after: retryAfter });- }-const body = parse(chatBody, await readJson(req));const model = process.env.CHAT_MODEL || DEFAULT_MODEL;const maxTokens = clampInt(diff --git a/api/chat/models.js b/api/chat/models.jsindex 8b8161746..635fe840d 100644--- a/api/chat/models.js+++ b/api/chat/models.js@@ -1,6 +1,5 @@import { env } from '../_lib/env.js';-import { cors, json, method, wrap, error } from '../_lib/http.js';-import { limits, clientIp } from '../_lib/rate-limit.js';+import { cors, json, method, wrap } from '../_lib/http.js';// Cache the fetched model list for 5 minutes to avoid hammering OpenRouter.let cachedModels = null;@@ -10,9 +9,6 @@ export default wrap(async (req, res) => {if (cors(req, res, { methods: 'GET,OPTIONS' })) return;if (!method(req, res, ['GET'])) return;- const rl = await limits.publicIp(clientIp(req));- if (!rl.success) return error(res, 429, 'rate_limited', 'Too many requests — try again shortly');-if (!env.OPENROUTER_API_KEY)return json(res, 200, { data: [] });diff --git a/api/chat/proxy.js b/api/chat/proxy.jsindex b8f86451a..058a25569 100644--- a/api/chat/proxy.js+++ b/api/chat/proxy.js@@ -1,6 +1,5 @@import { env } from '../_lib/env.js';import { cors, error, json, method, wrap, readJson } from '../_lib/http.js';-import { limits, clientIp } from '../_lib/rate-limit.js';const UPGRADE_URL = `${env.APP_ORIGIN}/pricing`;@@ -11,16 +10,6 @@ export default wrap(async (req, res) => {if (!env.OPENROUTER_API_KEY)return error(res, 503, 'not_configured', 'Built-in model not available');- const rl = await limits.chatIp(clientIp(req));- if (!rl.success) {- const retryAfter = Math.max(1, Math.ceil((rl.reset - Date.now()) / 1000));- res.setHeader('retry-after', String(retryAfter));- return error(res, 429, 'rate_limited', 'Too many requests — try again shortly', {- retryAfter,- scope: 'ip',- });- }-let body;try {body = await readJson(req);diff --git a/public/animations/mixamo/catalog.json b/public/animations/mixamo/catalog.jsonindex c8c6abd9b..152451ce5 100644--- a/public/animations/mixamo/catalog.json+++ b/public/animations/mixamo/catalog.json@@ -1,6 +1,6 @@{"character_id": "403e7206-d314-416a-9ef2-c618e26a8b6e",- "generated_at": "2026-05-01T18:32:13.819Z",+ "generated_at": "2026-05-01T18:45:09.473Z","animations": {"c9c72233-b96c-11e4-a802-0aaa78deedf9": {"id": "c9c72233-b96c-11e4-a802-0aaa78deedf9",@@ -15,6 +15,41 @@"status": "permanent_fail","http": 400,"failed_at": "2026-05-01T18:32:13.819Z"+ },+ "c9c6a14d-b96c-11e4-a802-0aaa78deedf9": {+ "id": "c9c6a14d-b96c-11e4-a802-0aaa78deedf9",+ "name": "Kneeling In Prayer To Standing Up",+ "status": "permanent_fail",+ "http": 400,+ "failed_at": "2026-05-01T18:32:41.649Z"+ },+ "c9c62952-b96c-11e4-a802-0aaa78deedf9": {+ "id": "c9c62952-b96c-11e4-a802-0aaa78deedf9",+ "name": "Male Crouch To Stand",+ "status": "permanent_fail",+ "http": 400,+ "failed_at": "2026-05-01T18:33:11.835Z"+ },+ "c9c6fa80-b96c-11e4-a802-0aaa78deedf9": {+ "id": "c9c6fa80-b96c-11e4-a802-0aaa78deedf9",+ "name": "Hip Hop Dancing Bboy Variation One",+ "status": "permanent_fail",+ "http": 400,+ "failed_at": "2026-05-01T18:34:07.588Z"+ },+ "c9c68950-b96c-11e4-a802-0aaa78deedf9": {+ "id": "c9c68950-b96c-11e4-a802-0aaa78deedf9",+ "name": "Reaction To Getting Clipped While Walking Unaware",+ "status": "permanent_fail",+ "http": 400,+ "failed_at": "2026-05-01T18:44:39.292Z"+ },+ "c9c70794-b96c-11e4-a802-0aaa78deedf9": {+ "id": "c9c70794-b96c-11e4-a802-0aaa78deedf9",+ "name": "Showing Frustration After A Loss",+ "status": "permanent_fail",+ "http": 400,+ "failed_at": "2026-05-01T18:45:09.473Z"}}}\ No newline at end of filediff --git a/public/cz/index.html b/public/cz/index.htmlindex 6b216a166..aa75a65fa 100644--- a/public/cz/index.html+++ b/public/cz/index.html@@ -8,11 +8,21 @@<meta name="theme-color" content="#080814" /><link rel="icon" href="/favicon.ico" /><link rel="stylesheet" href="./cz.css" />- <script- type="module"- src="https://three.ws/agent-3d/latest/agent-3d.js"- crossorigin- ></script>+ <script type="module">+ const CDN = 'https://three.ws/agent-3d/latest/agent-3d.js';+ const h = location.hostname;+ const isLocal =+ h === 'localhost' ||+ h === '127.0.0.1' ||+ h.endsWith('.github.dev') ||+ h.endsWith('.local');+ if (isLocal) {+ const { defineElement } = await import('/src/lib.js');+ defineElement();+ } else {+ await import(CDN);+ }+ </script></head><body><header>diff --git a/src/agent-resolver.js b/src/agent-resolver.jsindex b0ec5507d..d1dc7de7c 100644--- a/src/agent-resolver.js+++ b/src/agent-resolver.js@@ -50,14 +50,14 @@ const _CACHE_MAX = 100;/*** Resolve an agent ID to its manifest URL via GET /api/agents/:id.* Returns null if the agent record has no manifestUrl (caller may fall back to resolveAgentById).- * Throws AgentResolveError('not-found') on 404.+ * Throws AgentResolveError('not_found') on 404.** @param {string} agentId* @param {AbortSignal} [signal]* @returns {Promise<string|null>}*/export async function resolveByAgentId(agentId, signal) {- if (!agentId) throw new AgentResolveError('not-found', 'agentId required');+ if (!agentId) throw new AgentResolveError('not_found', 'agentId required');if (_resolveCache.has(agentId)) return _resolveCache.get(agentId);@@ -76,7 +76,7 @@ export async function resolveByAgentId(agentId, signal) {}if (res.status === 404)- throw new AgentResolveError('not-found', `agent ${agentId} not found`, { status: 404 });+ throw new AgentResolveError('not_found', `agent ${agentId} not found`, { status: 404 });if (res.status === 401 || res.status === 403)throw new AgentResolveError('unauthorized', `unauthorized (${res.status})`, {status: res.status,diff --git a/src/element.js b/src/element.jsindex 135470565..f225db105 100644--- a/src/element.js+++ b/src/element.js@@ -1540,7 +1540,7 @@ class Agent3DElement extends HTMLElement {} catch (err) {console.error('[agent-3d] boot failed', err);this._loadingEl.hidden = true;- if (err instanceof AgentResolveError && err.code === 'not-found') {+ if (err instanceof AgentResolveError && err.code === 'not_found') {const el = document.createElement('div');el.className = 'agent-3d-error';el.textContent = 'Agent not found';