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
feat(avatar-artifact): let the standalone viewer show a real avatar, not only its house portrait
nirholas72a048c1c001
diff --git a/STRUCTURE.md b/STRUCTURE.mdindex 7543400cf..7961f675e 100644--- a/STRUCTURE.md+++ b/STRUCTURE.md@@ -66,6 +66,7 @@ bottom.| Restyle Studio (material/PBR editor + AI restyle + variants) | [pages/restyle.html](pages/restyle.html) `→ /restyle`, [src/restyle.js](src/restyle.js). PBR preset/variant library [packages/viewer-presets/src/materials.js](packages/viewer-presets/src/materials.js) (`@three-ws/viewer-presets`). AI restyle + persistence core [api/_lib/material-studio-store.js](api/_lib/material-studio-store.js), free hosted endpoint [api/material-studio.js](api/material-studio.js) `→ /api/material-studio`; paid agent twin [mcp-server/src/tools/restyle-material.js](mcp-server/src/tools/restyle-material.js) (`restyle_material`, $0.05 stdio MCP), thin core [mcp-server/src/tools/_material-core.js](mcp-server/src/tools/_material-core.js). Shares the `refine_model` lineage core ([mcp-server/src/tools/_lineage.js](mcp-server/src/tools/_lineage.js)) so a restyle/variant is just another kind of version, feeding prompt 09 remix. Docs: [docs/mcp-tools.md](docs/mcp-tools.md). | Live | Re-skin any GLB without regenerating its mesh: live PBR editing (color/metalness/roughness/emissive/texture) with a one-click preset library (14 looks — chrome, gold, glass, wood…), seeded reproducible colorway variants (mulberry32 PRNG — same base+seed → same set), and free-text AI restyle ("make it chrome", "cyberpunk neon") via IBM Granite-proposed PBR factors applied + re-exported server-side. Every AI restyle / saved checkpoint mints a real, `gltf-validator`-checked, durably-stored GLB recorded in an immutable parent→child lineage — non-destructive in the durable sense, not just an in-browser Reset. Roadmap prompt 06. || Embodiment: a living agent body in the chat | Hosted embed [pages/embodiment/embed.html](pages/embodiment/embed.html) `→ /embodiment/embed` (Vite input + vercel route, `frame-ancestors *`); engine [apps-sdk/embodiment/embodiment-stage.js](apps-sdk/embodiment/embodiment-stage.js) (`EmbodimentStage`) + [overlay.js](apps-sdk/embodiment/overlay.js); persona tools (free) [api/_mcp-studio/persona-tools.js](api/_mcp-studio/persona-tools.js) → `/api/mcp-studio` (`create_agent_persona`, `get_agent_persona`, `persona_say`) and (paid) [api/_mcp3d/tools/studio.js](api/_mcp3d/tools/studio.js); shared inline-body artifact [api/_lib/embodiment-artifact.js](api/_lib/embodiment-artifact.js); identity store [api/_lib/persona-store.js](api/_lib/persona-store.js) (Postgres `agent_personas` + fs fallback + durable R2 GLB); reload route [api/mcp3d/persona.js](api/mcp3d/persona.js) `→ /api/mcp3d/persona`; live chain-state feed [api/mcp3d/persona-identity.js](api/mcp3d/persona-identity.js) `→ /api/mcp3d/persona-identity` (polled only when the embed is opened with `?wallet=1`). Emotion/rig/lip-sync cores under [src/embodiment/](src/embodiment) + [src/voice/](src/voice). | Live | A generated avatar becomes a persistent, named body that renders inline in ChatGPT/Claude: it lip-syncs each reply, blends the matching expression + gesture, idles between turns, and reloads by `persona_id` in a fresh session (the id is the capability, no sign-in). Rides the universal canonicalize/retarget clip library; a rig without face morphs animates the jaw, a non-humanoid GLB falls back to a gentle idle (`decideRigMode`/`supportsCanonicalClips`), never a bind-pose T-pose. Zero crypto/token surface. Tests: [tests/persona-store.test.js](tests/persona-store.test.js), [tests/api/persona-resolve-route.test.js](tests/api/persona-resolve-route.test.js), [tests/api/persona-identity-route.test.js](tests/api/persona-identity-route.test.js), [tests/mcp-studio.test.js](tests/mcp-studio.test.js), [tests/embodiment-rig-mode.test.js](tests/embodiment-rig-mode.test.js). Evidence: [prompts/store-submissions/_generated/embodiment/](prompts/store-submissions/_generated/embodiment/). Store-submission prompt 07. || Claude.ai artifact embed + builder | Endpoint [api/artifact.js](api/artifact.js) `→ /api/artifact`, prebuilt viewer [public/artifact-viewer.bundle.js](public/artifact-viewer.bundle.js) (source [scripts/artifact-viewer/src.js](scripts/artifact-viewer/src.js), `npm run build:artifact-viewer`), builder page [public/artifact/index.html](public/artifact/index.html) `→ /artifact` + [README](public/artifact/README.md), contract [specs/CLAUDE_ARTIFACT.md](specs/CLAUDE_ARTIFACT.md), vendored sandbox CSP [public/claude-artifact-csp.txt](public/claude-artifact-csp.txt) (refresh: [scripts/refresh-claude-csp.mjs](scripts/refresh-claude-csp.mjs)). | Live | `GET /api/artifact?agent=<uuid>` returns ONE self-contained HTML document with three.js, GLTFLoader, the viewer and the agent GLB all inlined, because Claude's artifact sandbox CSP blocks every external script and fetch. Paste the URL into a Claude conversation and the agent renders inline. The builder page is the pre-flight: it lists real public agents that carry an embeddable avatar (`/api/agents/public?avatar=1`), renders the response in a sandboxed iframe under the same CSP Claude applies, and reports payload size, fetch time, frame render time and sandbox compliance before you paste. Size is graded against the ceiling the endpoint can actually emit (a 6 MB model base64-inlines to 8 MB, plus the 565 KB viewer), not against the raw model cap, so a large-but-accepted artifact is not flagged as over budget. `?model=<glb url>` is the viewer-only lane (allowlisted https origins, SSRF-guarded, 6 MB cap). Tests: [tests/api/artifact.test.js](tests/api/artifact.test.js) pins the generated HTML against the vendored Claude CSP. |+| Avatar Artifact: the standalone shareable viewer | Page [pages/avatar-artifact.html](pages/avatar-artifact.html) `→ /avatar-artifact`, scene + artifact loader [src/avatar-artifact.js](src/avatar-artifact.js), docs [docs/avatar-artifact.md](docs/avatar-artifact.md). | Live | One page, one avatar, no wrapper: the URL you paste into an `<iframe>` on someone else's site or send to a person who has never heard of three.ws. `?agent=<uuid>` renders that agent's avatar from the live public record (the name becomes the heading and the document title, an Open profile link appears), `?model=<glb url>` renders any GLB from the same allowlisted hosts `/api/artifact` enforces, and a bare link renders the house portrait: a procedural figure that tracks cursor, touch and arrow keys. Ships no third-party CDN (three.js is bundled, because an embed host never agreed to a cross-origin script) and suspends its render loop on a hidden tab. An avatar with no baked clips is driven by the shared retargeted `idle` from the universal clip library rather than left in a bind-pose T-pose. Every failure lane (no such agent, private avatar, no avatar yet, blocked host, dead model, no WebGL) has its own sentence and its own next move; the Copy embed snippet carries the artifact parameters so the iframe shows what you were looking at. || Spatial MCP (3D as a native response type) | Spec [specs/SPATIAL_MCP.md](specs/SPATIAL_MCP.md), pure validator/builder/lint [public/spatial-mcp/spatial-validator.js](public/spatial-mcp/spatial-validator.js) (published at `https://three.ws/spatial-mcp/spatial-validator.js`; server-side re-export [api/_lib/spatial-mcp.js](api/_lib/spatial-mcp.js)), npm package + conformance fixture corpus [packages/spatial-mcp/](packages/spatial-mcp) (`@three-ws/spatial-mcp`, CC0, drift-guarded byte-identical to the published module), validator tool [api/_mcp3d/tools/spatial.js](api/_mcp3d/tools/spatial.js) (`validate_spatial_response`, free), reference renderer [public/spatial-mcp/spatial-renderer.js](public/spatial-mcp/spatial-renderer.js) + demo/checker [public/spatial-mcp/index.html](public/spatial-mcp/index.html) + [public/spatial-mcp/demo.js](public/spatial-mcp/demo.js) `→ /spatial-mcp`, docs [docs/spatial-mcp.md](docs/spatial-mcp.md). | Live · both stores | Open (CC0) shape for returning a live, interactive 3D scene as a first-class MCP tool result (scene GLB, camera, environment, animation, AR handoff, affordances) instead of a URL. Every three.ws 3D generator emits a conformant artifact under `structuredContent.spatial`; the validator returns actionable errors, not a boolean; the framework-free reference renderer displays any conformant payload — including one transformed from a foreign tool result (portability proof at `/spatial-mcp`). The page runs the real validator in the browser: every rendered payload shows its verdict, and a paste-in checker validates arbitrary payloads as you type (with a deliberately broken example) so an implementer debugs an adapter without leaving the page. Zero coin surface — reusable in the OpenAI free app. Tests: [tests/spatial-mcp.test.js](tests/spatial-mcp.test.js), render smoke [tests/e2e/spatial-mcp-render.spec.js](tests/e2e/spatial-mcp-render.spec.js). Evidence: [prompts/store-submissions/_generated/spatial-mcp/](prompts/store-submissions/_generated/spatial-mcp/). Store-submission prompt 20. || AR-ready exports ("View in your space") | Device-routing core [api/_lib/ar-launch.js](api/_lib/ar-launch.js), UA-branched launch endpoint [api/ar.js](api/ar.js) `→ /api/ar`, MCP tool [api/_mcp3d/tools/ar.js](api/_mcp3d/tools/ar.js) (`export_ar`, free), in-viewer AR button [public/viewer.html](public/viewer.html), docs [docs/ar.md](docs/ar.md). | Live · both stores | `GET /api/ar?src=<glb>` branches on the request User-Agent server-side: iOS → Apple Quick Look (USDZ generated from the GLB on the fly by model-viewer's three.js USDZExporter — real conversion, no server USD tooling), Android → 302 Google Scene Viewer ARCore intent with browser fallback, desktop → WebGL viewer. Bad input rejected at the boundary with a designed error page. `export_ar` returns the AR launch link + a conformant Spatial-MCP artifact; response is OpenAI-clean (no ids/coin surface). `kind=avatar` is the living-agent lane: the launch page leads with a "Bring it to life" handoff into `/irl?avatar=<glb>` (avatar-producing tools return `irlUrl` automatically), and Android serves the launch page instead of the blind Scene Viewer redirect so the living path stays visible. Shared links unfurl: the launch page's `og:image` points at `GET /api/render/glb?glbUrl=` ([api/render/glb.js](api/render/glb.js), server-side PNG of the actual model, CDN-cached a day) and the page carries "Create your own" → `/ar` conversion CTAs. Tests: [tests/ar-export.test.js](tests/ar-export.test.js). Evidence: [prompts/store-submissions/_generated/ar/](prompts/store-submissions/_generated/ar/). Store-submission prompt 21. || AR Forge (prompt → model → your room) | [public/ar-forge.html](public/ar-forge.html) `→ /ar` (self-contained page, CDN model-viewer + local meshopt decoder, no Vite registration needed; vercel route sets `xr-spatial-tracking` permissions-policy) | Live | Mobile-first app: one prompt hits the free NVIDIA lane (`POST /api/forge {backend:"nvidia"}`, poll `?job=`), the result renders in an AR-capable `<model-viewer>` with "View in your space" (WebXR / Scene Viewer / Quick Look). Non-AR devices get a QR handoff to `GET /api/ar?src=` (server-side UA routing) plus a copyable `/viewer?src=` share link. Deep link `/ar?src=<glb>&title=` reopens any shared model; recent forges persist in localStorage. Designed idle/working/failed/result states; https-only GLB guard. |diff --git a/data/pages.json b/data/pages.jsonindex 2a30aaac7..3c1a150bf 100644--- a/data/pages.json+++ b/data/pages.json@@ -2407,6 +2407,14 @@"changefreq": "weekly","added": "2026-04-27"},+ {+ "path": "/docs/avatar-artifact",+ "title": "Docs · Avatar Artifact viewer",+ "description": "The standalone avatar viewer you paste into any site as a one-line iframe: its ?agent= and ?model= parameters, the hosts a model may come from, how a clip-less rig still comes to life, and the sentence the page shows for every way it can fail.",+ "priority": 0.6,+ "changefreq": "monthly",+ "added": "2026-08-16"+ },{"path": "/docs/site-performance","title": "Docs · Site load performance",diff --git a/docs/avatar-artifact.md b/docs/avatar-artifact.mdnew file mode 100644index 000000000..703043323--- /dev/null+++ b/docs/avatar-artifact.md@@ -0,0 +1,126 @@+# Avatar Artifact: the standalone viewer++[three.ws/avatar-artifact](https://three.ws/avatar-artifact) is one page that renders one avatar and nothing else. No app shell, no sign-in, no navigation to get lost in: a URL you can paste into an `<iframe>` on any site, or send to someone who has never heard of three.ws, and it renders a live 3D avatar in their browser.++It is deliberately the smallest viewer we ship. [The full 3D viewer](./viewer.md) is the engine behind `/app` and every `<agent-3d>` embed, with camera rigs, material editing and a clip panel. This page has one job: show the artifact, beautifully, from a link.++---++## The three modes++| URL | What renders |+| --- | --- |+| `/avatar-artifact` | The house portrait: a procedural figure that follows your cursor. The page's own identity, and what a bare link shows. |+| `/avatar-artifact?agent=<uuid>` | That agent's avatar, resolved live from `GET /api/agents/<uuid>`. |+| `/avatar-artifact?model=<glb url>` | Any GLB served from an allowed host. No agent, no persona, just the model. |++Passing both `agent` and `model` is an error, the same rule [the Claude artifact endpoint](../specs/CLAUDE_ARTIFACT.md) applies. The page says so and offers a way out rather than guessing.++### Viewing an agent++```+https://three.ws/avatar-artifact?agent=27a0f649-3b59-4552-bb0b-faf616ac448b+```++The page fetches the agent's public record, reads `avatar_model_url`, and renders it. The agent's name becomes the page heading and the document title, and an **Open profile** link appears next to the controls so the viewer is never a dead end.++Only avatars whose visibility is `public` or `unlisted` carry a model URL in the public API. An agent whose avatar is private renders a designed message saying so and links to the profile, which stays public.++### Viewing a raw model++```+https://three.ws/avatar-artifact?model=https://three.ws/avatars/michelle.glb+```++The model URL must be `https:` on one of these hosts, or same-origin:++- `*.r2.dev`, `*.r2.cloudflarestorage.com`+- `*.amazonaws.com`, `*.cloudfront.net`+- `storage.googleapis.com`+- `*.blob.core.windows.net`+- `three.ws`, `*.vercel.app`++Anything else is refused with an explanation instead of rendered. This is the same allowlist `/api/artifact` enforces server-side, for the same reason: an indexed page on our origin must not become a renderer for arbitrary third-party payloads.++---++## Embedding it++Click **Copy embed** on the page and you get an iframe pointed at exactly what you are looking at, artifact parameters included:++```html+<iframe+ src="https://three.ws/avatar-artifact?agent=27a0f649-3b59-4552-bb0b-faf616ac448b"+ width="100%"+ height="600"+ style="border:0"+ loading="lazy"+ title="Avatar Artifact"+></iframe>+```++If the clipboard is unavailable (a cross-origin frame, or Safari) the page reveals the snippet in a text field instead of failing silently.++Two properties make this safe to drop on someone else's page:++- **No third-party CDN.** three.js ships with the bundle. An embed host never picks up a cross-origin script tag it did not agree to.+- **It stops when it is not visible.** A hidden tab suspends the render loop, so an embedded viewer never burns a host page's GPU in the background.++For a full chat widget or a token-gated embed, use [Share and embed](./share-and-embed.md) instead. This page is the plain viewer.++---++## Interaction++Every input drives one look-target, so the page works with a mouse, a finger or a keyboard alone:++| Input | Effect |+| --- | --- |+| Move the cursor | Turn the subject |+| Drag (touch) | Same, on a phone |+| Arrow keys, or `WASD` | Same, without a pointer |+| `+` / `-`, or the wheel | Zoom (artifact modes only) |++`prefers-reduced-motion` removes the idle sway, breathing and drift; the avatar still responds to input.++---++## Animation++If the GLB carries its own animation clips, the page plays one: whichever is named for an idle, or the first clip. The author's intent wins.++Most three.ws avatars carry no baked clips, because motion lives in the [shared clip library](./animations.md) and is retargeted onto whatever skeleton the rig uses. The page does exactly that: it attaches an `AnimationManager`, loads the `idle` clip and retargets it. Any humanoid rig the canonicalizer recognises comes to life; a rig that genuinely cannot be skeleton-driven (a static prop, a non-humanoid mesh) simply stands still. Nothing renders in a bind-pose T-pose.++---++## When something goes wrong++Every failure has its own sentence and its own next move. There is no blank screen and no raw exception:++| What happened | What the page says |+| --- | --- |+| The 3D runtime never loaded | Network hiccup, offers a retry |+| The browser has no WebGL | Names the cause, suggests another browser |+| No agent with that id | The link may be old, offers **Browse agents** |+| The agent lookup failed | Network hiccup, offers a retry |+| The agent has no avatar yet | Explains, links to the profile |+| The agent's avatar is private | Explains, links to the (public) profile |+| The model host is not allowed | Names the rule |+| The model failed to load | Moved, or a compression format this viewer does not carry |++A large model on a slow connection is not a failure: the loading overlay reports byte progress, and the watchdog re-arms on every progress tick so a download that is genuinely still running is never called dead.++---++## Where the code lives++- Page markup and copy: [pages/avatar-artifact.html](../pages/avatar-artifact.html)+- Scene, artifact resolution and loading: [src/avatar-artifact.js](../src/avatar-artifact.js)+- Clip retargeting: [src/animation-manager.js](../src/animation-manager.js)++## Related++- [The 3D viewer](./viewer.md): the full engine behind `/app` and `<agent-3d>`+- [Share and embed](./share-and-embed.md): widgets, web components and embed policy+- [Claude artifact contract](../specs/CLAUDE_ARTIFACT.md): the self-contained HTML lane for Claude.ai, which shares this page's parameter shape+- [Animations](./animations.md): the clip library this page retargets fromdiff --git a/docs/share-and-embed.md b/docs/share-and-embed.mdindex 7dbaec6dc..7c3fe8d2b 100644--- a/docs/share-and-embed.md+++ b/docs/share-and-embed.md@@ -64,6 +64,18 @@ The element renders inline (no iframe boundary), supports keyboard navigation, a---+## Just the avatar, nothing else++If all you want on the page is the 3D avatar, without chat, voice, or any widget UI, [Avatar Artifact](./avatar-artifact.md) is a one-line iframe:++```html+<iframe src="https://three.ws/avatar-artifact?agent=<your-agent-id>" width="100%" height="600" style="border:0" loading="lazy" title="Avatar Artifact"></iframe>+```++It renders your agent's avatar, follows the visitor's cursor, and links back to the profile. Open the page itself and click **Copy embed** to get the snippet already pointed at your agent.++---+## Controlling who can embed your agentBy default, your agent can be embedded anywhere. If you want to restrict it to specific domains:diff --git a/docs/start-here.md b/docs/start-here.mdindex d691aff06..b816a71ba 100644--- a/docs/start-here.md+++ b/docs/start-here.md@@ -183,6 +183,7 @@ Deeper references that don't fit a track above but answer real questions:- [Agent task briefs](./agent-tasks/README.md): self-contained task prompts for AI agents working on the platform- [Troubleshooting and FAQ](./troubleshooting.md): fixes organized by symptom- [The 3D viewer](./viewer.md): the rendering layer reference (model loading, cameras, animation, lighting)+- [Avatar Artifact](./avatar-artifact.md): the standalone viewer page, its ?agent= and ?model= parameters, and the iframe you paste anywhere- [Farcaster memory seeding](./farcaster-memory-seeding.md): give an agent your Farcaster voice, proved with a wallet the account already verified, and revoke it in one click- [X memory seeding](./x-memory-seeding.md): seed an agent from your public X posts behind an explicit, versioned consent you can revoke (revocation deletes what the seed wrote)- [GitHub memory seeding](./github-memory-seeding.md): tick the profile, repositories, and READMEs your agent may read, and nothing outside that list is ever fetched or stored (disconnecting deletes every fact it wrote)diff --git a/prompts/swarm-100/route-avatar-artifact.md b/prompts/swarm-100/route-avatar-artifact.mddeleted file mode 100644index a59fb86cf..000000000--- a/prompts/swarm-100/route-avatar-artifact.md+++ /dev/null@@ -1,119 +0,0 @@-# Route audit: /avatar-artifact (Avatar Artifact)--How to run: paste this file's repo path into a fresh Claude Code chat in this-repository and say "run this work order". This file is fully self-contained:-it depends on no other prompt file anywhere. If neighboring files in-prompts/swarm-100/ are gone, that work is done; if present, ignore them.-Every claim below rots; step 0 re-measures, and what you measure wins.--## Operating clause (binding)--- Read CLAUDE.md first. Its rules override everything, including this file.-- Finish 100% in this session. Never end the turn with a question, an option- list, or an unexecuted plan. A judgment call goes in one line of the final- report; it never becomes a question that halts work.-- The only permitted stops are the CLAUDE.md stop-and-ask gates: spending real- funds or any irreversible on-chain write, git push or a production deploy,- committing content that references a crypto project other than $THREE, and- destroying unrecoverable data.-- No mocks, no fake data, no placeholder stubs, no unfinished-work markers, no- commented-out code. Real APIs and real integrations only.-- The em-dash and en-dash characters are banned in everything you write.-- Concurrent agents share this worktree: stage explicit paths only (never a- bare add-everything), and commit finished work promptly.-- Before committing, run: npm run check:rules -- --paths <files you touched>.- It must exit 0.--## Step 0: re-derive the current state--1. This route's declared entry (path, description, added date):-- node -e "const p=require('./data/pages.json');for(const s of p.sections)for(const g of s.pages)if(g.path==='/avatar-artifact')console.log(JSON.stringify(g,null,2))"--2. Find the serving implementation: grep "/avatar-artifact" in vercel.json (the live- route table server/index.mjs boots from), then list matching files in- pages/ and src/. STRUCTURE.md maps every surface to its directory if the- grep is ambiguous.-3. Production right now:-- curl -so /dev/null -w '%{http_code}\n' https://three.ws/avatar-artifact--4. Start (or reuse) the local dev server: npm run dev (vite, port 3000).--## Task: audit this one route end to end, then fix everything found--Route: /avatar-artifact ("Avatar Artifact", section "labs").-Declared purpose: Standalone Three.js viewer for avatar artifacts: embeddable and shareable without any wrapper page.--Drive the page in a real headless browser. Playwright is already a dev-dependency; keep your probe script in the session scratchpad, never in the-repo.--1. Load http://localhost:3000/avatar-artifact. Record the HTTP status, every console- error and warning, and every failed network request.-2. Exercise it like a first-time user: click the primary actions, run the- primary flow if one exists, follow the page's internal links. Every button- must do something real; every link must resolve. If the page renders data,- prove in the network log that it came from a live endpoint, not a baked-in- fallback array.-3. States: verify populated, empty, loading, and error states are designed and- reachable. Block the page's primary fetch in Playwright and confirm an- actionable error state appears, not a blank void or a raw exception.-4. Responsive: render at 320, 768, and 1440 px. No horizontal page scroll, no- overlapping or clipped controls.-5. Accessibility basics: one h1; interactive elements are real buttons or- links with visible focus states; images carry alt text; form fields have- labels.-6. Head: a specific title tag and meta description that match the declared- purpose above.-7. Fix every defect at its root in the page's real source files and re-run the- probe until clean. Defects in shared modules are in scope when this route- exercises them.--## Definition of done--- [ ] Local load of /avatar-artifact: HTTP 200, zero console errors, zero unhandled- failed requests (a third-party outage must land in a designed fallback,- not a broken page).-- [ ] No dead interactive element on the page: no stub href="#", no button- without a handler, no link to a missing path.-- [ ] Empty, loading, error, and populated states verified.-- [ ] 320 / 768 / 1440 px renders verified clean.-- [ ] Title and meta description present and specific.-- [ ] npm test passes; npm run check:rules -- --paths <touched files> exits 0.-- [ ] Production status from step 0 recorded in the report; if production- needs a deploy to pick up a fix, the report says so (deploys stay- owner-gated).--## Never blocked--| Blocker | Resolution (act, do not ask) |-|---|---|-| Missing env var or credential | Check .env and .env.local, then the Cloud Run service env, then Secret Manager (the CLAUDE.md self-unblock playbook has the exact commands). If it truly exists nowhere, wire the code fully behind the env var, prove the wiring with a dry run, and name the single missing var in the report. |-| gcloud not on PATH | Run: export PATH="$HOME/google-cloud-sdk/bin:$PATH" |-| Dev server port 3000 busy | Another agent may be serving this repo; probe it and reuse if so. Otherwise start your own on a free port: npx vite --port 3101 |-| Playwright browser missing | npx playwright install chromium |-| A surface needs a signed-in user | Register a fresh account through the real /register flow against the real API and use it. Never mock the session. |-| A defect sits in code you did not touch | Fix it if it blocks a Definition of done line (root cause it, never mask it). Otherwise note it in the report and continue. |-| An unrelated test is red | Same rule. Never pipe npm test through tail; it masks exit codes. |--## Close out (required)--1. Verify every Definition of done line with the actual command output in- front of you. Never claim a line you did not verify.-2. Commit with explicit paths and a subject that describes the diff (house- style: type(scope): what changed and why a reader cares).-3. Delete this prompt file in that same commit:-- git rm prompts/swarm-100/route-avatar-artifact.md-- The shrinking directory is this campaign's only progress ledger; there is- no progress log to update.-4. Final report: what step 0 measured, what changed (file list), evidence per- Definition of done line, and any one-line judgment calls. No trailing- questions, no unexecuted plans.--If a line genuinely cannot pass inside this session (an external party must-respond, or an owner-gated action is the final step), finish everything else,-leave this file in place, and state exactly which line remains and who owns-it. Never delete this file on a partial.diff --git a/src/avatar-artifact.js b/src/avatar-artifact.jsindex 24aa4d40d..34c029b35 100644--- a/src/avatar-artifact.js+++ b/src/avatar-artifact.js@@ -573,12 +573,17 @@ function buildArtifactStage(scene, camera, renderer, artifact) {}}- const clock = new THREE.Clock();+ // Wall-clock delta rather than THREE.Clock, which three deprecated in r180,+ // and clamped so a backgrounded tab does not resume by fast-forwarding the+ // idle clip through however many minutes it was hidden.+ let lastFrameMs = 0;return {ready: () => loaded,update(t, mouse, zoom, reduceMotion) {- const delta = clock.getDelta();+ const now = performance.now();+ const delta = lastFrameMs ? Math.min(0.1, (now - lastFrameMs) / 1000) : 0;+ lastFrameMs = now;if (mixer) mixer.update(delta);if (anim) anim.update(delta);