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(spatial-mcp): npm package README, corpus docs, spec lint section, changelog
nirholasbcd7e7d21537
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex de1cb20cb..0d164f372 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -22,6 +22,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Selfie avatars now match the shape of your face, not just the colour of it** — The selfie-to-avatar engine used to do one thing: take the face from your photo and paint it onto a standard head. From straight on it looked convincing, but the skull underneath was the same for everyone, so the moment the avatar turned it stopped being you. It now reshapes the head itself to your face: width, jaw, chin, cheekbones, brow, and how far the nose projects. That step had been written and tested for a while but had never actually reached the servers, so every avatar made until today was built the old way. Making it live also turned up a flaw in how the photo was read. Face measurements arrived scaled to the picture's width and height separately, which means a tall photo stretched the face before anything else happened, and that stretch was then treated as part of your bone structure. In practice the shape of your avatar's head partly depended on whether you shot the photo tall or square, which is not something anyone would expect. Measurements are now taken in true proportions, so the same face gives the same head regardless of how the photo was framed. Finally, the limits controlling how far the head is allowed to move toward your real shape were set before there was any way to measure the result. They were far too cautious, holding the head back to about two centimetres of change and quietly discarding real differences between faces. Measured across a forty-face test set covering a wide range of ages, complexions, beards, glasses and head coverings, retuning them cut the remaining shape error by 46 percent, and no face in the set came out worse. Choosing that limit needed a second measurement, because a test set of clean, well-lit photos will always argue for removing the limit entirely: it contains nothing for the limit to catch. So each test face was also degraded the way real photos are, with camera shake, a turned head, hair across the face, a dim room and a heavily shrunk upload, and checked for whether the same person still came out with the same head. The setting we shipped is the point where matching your face stops improving but sensitivity to photo quality keeps rising. In total, avatars now capture about 60 percent of the difference between a generic head and your real one, up from 26 percent. Rebuild your avatar at /create/selfie to get one made the new way. (`/create/selfie`) `[improvement, fix]`- **Signing avatars now sign whole sentences, touch what they are supposed to touch, and can raise an eyebrow** — Six things changed in the signing avatar. It was lowering its arms all the way to its sides between every single word, so a sentence read as a list of unrelated words; now the hands rise once at the start and lower once at the end, the way a person signs, and everything in between stays up in signing space. Signs that involve the two hands touching, like fall, help, good and again, were positioning each hand at fixed coordinates and hoping they met; they are now solved from the actual shape of the posed hand, so the fingers land on the palm even on an avatar with longer fingers or bigger hands, and the same is true of signs that touch the face, which previously buried the fingertips somewhere inside the head. The avatar can now raise its eyebrows: American Sign Language carries grammar on the face, where raised brows make a yes-or-no question and furrowed brows a what-or-why question, and signs now carry those markers to any avatar that has facial expressions built in. You can slow the signing down to three-quarter or half speed, which learners and many Deaf viewers want and which no amount of replaying a video at full speed substitutes for. You can switch the avatar to sign left-handed, because roughly one signer in ten is left-dominant and signing left-handed is not a mistake to be corrected. And the vocabulary is now checked automatically against two rules that hold across the whole language, so a new sign has to be well-formed and not merely render without crashing. (`/sign-language`) `[improvement, feature]`- **Solana reads on the crypto API stop failing when one RPC host throttles us** — The Solana endpoints on the public crypto API (balance, token holdings, token supply, largest holders, transaction, account, priority fees) were pointed at a single RPC host. Whenever that host rate-limited us, the caller got the rate-limit error even though the platform keeps a priority-ordered pool of other RPC endpoints for exactly this situation. Those calls now move to the next healthy host automatically, up to three per request, and a host that has just failed is skipped for the next 30 seconds so one bad host does not slow down every request behind it. A genuinely bad request, like a malformed address, still returns its error immediately instead of being retried. This was the second-largest error class on the API. (`/crypto-api`) `[fix, improvement]`+- **Spatial MCP becomes installable: npm package, conformance test kit, and a privacy lint** — Spatial MCP, our public-domain standard for returning a live 3D scene as an AI tool result, now ships as an npm package: @three-ws/spatial-mcp. Until today, adopting the standard meant copying a file out of our repository or importing it from our servers; now it is one install, with no dependencies, and it runs in Node, the browser, or any build system. The package carries three things. First, the validator and builder our own servers use, kept byte-identical to the copy served at three.ws/spatial-mcp/spatial-validator.js by a test that fails if the two ever drift. Second, a conformance test kit: thirteen real payloads a correct implementation must accept, reject, or flag, each with the required verdict written down, so anyone building their own validator or renderer can prove it conformant instead of asserting it. Third, a new data-minimization lint. The standard has always required that artifacts carry no session ids, wallet addresses, prices, or credentials, because that is what makes the format safe for app stores that do not allow crypto surfaces, but the specification previously admitted nothing checked this. Now lintSpatialMeta flags suspicious field names and credential-shaped values, the checker page runs it on everything you paste, and the deliberately broken example on the page now leaks an internal id and a price on purpose so you can watch the lint catch both. Lint findings are advisory and never block a valid render, since no tool can know every private field name; the obligation stays with the emitter, but the common mistakes no longer pass silently. The developer dashboard's Web SDK card was also corrected: it was advertising a package that does not contain the viewer, loading a script from an address that does not exist, and demonstrating attributes the component does not have. It now shows the real package, the real script address, and markup that works when pasted. (`/spatial-mcp`) `[sdk, feature, fix]`- **The KOL Tracker is now reachable, and its numbers are real** — The KOL Tracker page shipped listed in the sitemap but with no route behind it, so three.ws/tracker returned a 404 for everyone who followed the link, and the API behind it was answering with three placeholder rows left over from a test fixture. Both are fixed. The page is served, and it now ranks real Solana traders from the live kolscan board: realized profit, win rate and trade count for the 24h, 7d and 30d windows, enriched with our own on-chain FIFO profit calculation wherever we have the trades for a wallet. Every row states where its number came from, and when a source is unreachable the board shows an honest empty state instead of inventing traders. A new test blocks the whole class of mistake: any page advertised in the site index that has no route, or that never gets built, now fails the suite before it can reach production. (`/tracker`) `[fix, feature]`- **The signing avatar's arm now sits where a signer's arm sits, and it signs real words** — The signing avatar had a broken arm. Its handshapes were right, but the arm carrying them swung out to the side and behind the body, and the clip also dragged the avatar about a metre down through the floor, so you were watching correct fingerspelling performed somewhere over the avatar's shoulder. The cause was that the arm was posed with rotations written against a skeleton convention our reference avatar does not use. Arms are now solved instead of guessed: the code measures the actual skeleton (which way each bone points, how long it is, which way each palm faces) and then runs real inverse kinematics to put the wrist at a specific point in front of the body, with the elbow hanging where an elbow hangs. Fingerspelling now happens where signers do it, in front of the dominant shoulder at jaw height with the palm facing you, and the letters themselves are unchanged, to the digit. Because a hand can now be sent to a place on the body, the avatar also has a real sign vocabulary for the first time: thirty-two everyday words including hello, thank you, please, sorry, yes, no, happy, help, love, want, welcome, name, y'all and finish, two-handed where the sign is two-handed. Type a sentence and the words with signs are signed while the rest is fingerspelled, in one continuous motion, and the page tells you which was which. There is a new section on the sign-language page listing every word it can sign, each one playable. Both arms are now posed throughout, the idle hand rests at the side instead of hanging oddly, the avatar breathes during long holds, and the camera crops closer so you can actually see the hands. (`/sign-language`) `[improvement, fix]`- **The Spatial MCP reference renderer actually renders again** — Spatial MCP is our open, public-domain shape for handing back a live 3D scene as an AI tool result instead of a link, and three.ws/spatial-mcp is the page that proves it works. It has been showing two empty frames. The demo code asked for its renderer with a path relative to the page, and because the page is served both with and without a trailing slash, that path pointed at the site root on one of them and came back as a 404, so the renderer never loaded and neither scene appeared. The demo now loads as its own module file, which resolves correctly on either address and in local development, where the same page had been failing to build at all. Both frames are live again: you can orbit and zoom a real model on the left and, on the right, the same viewer displaying a model that arrived from a completely different server in a completely different format, converted by a six-line adapter shown as JSON underneath. That side-by-side is the whole argument for the standard, so it is worth having it work. The left frame is now a genuine model from our free text-to-3D lane rather than a borrowed sample, and the sample the page used to point at had itself gone dead upstream, which is why it also stayed blank once the renderer was fixed. (`/spatial-mcp`) `[fix]`diff --git a/STRUCTURE.md b/STRUCTURE.mdindex f0c35402d..74f1e3df7 100644--- a/STRUCTURE.md+++ b/STRUCTURE.md@@ -47,7 +47,7 @@ bottom.| Conversational refinement + remix economy | Iterate: [api/_mcp-studio/tools.js](api/_mcp-studio/tools.js) `refine_model` (free, on `/api/mcp-studio`) + [mcp-server/src/tools/refine-model.js](mcp-server/src/tools/refine-model.js) (paid stdio, $0.25); shared lineage core [mcp-server/src/tools/_lineage.js](mcp-server/src/tools/_lineage.js). Remix (paid track): feed [api/remix-feed.js](api/remix-feed.js) `→ /api/remix-feed` (free browse/publish/lineage), settlement [api/x402/remix-asset.js](api/x402/remix-asset.js) `→ /api/x402/remix-asset` + core [api/_lib/remix-settlement.js](api/_lib/remix-settlement.js) + split math [api/_lib/remix-royalty.js](api/_lib/remix-royalty.js). Docs [docs/remix.md](docs/remix.md), [docs/mcp-studio.md](docs/mcp-studio.md). | Live | Talk to a model to iterate it ("make it metallic") — real anchored re-generation with a revertable/branchable version lineage rendered as a viewer version strip; free on both the OpenAI 3D Studio and the paid MCP server. Creators publish a finished model as remixable (provenance + license + royalty on the existing `forge_creations` rows — no parallel store); another agent pays $0.25 USDC to remix it and a creator-set royalty (≤20%, capped) routes on-chain to the original creator via the audited `transferSolanaUSDC` rail. Split/caps/payout unit-tested ([tests/remix-settlement.test.js](tests/remix-settlement.test.js), [tests/remix-royalty.test.js](tests/remix-royalty.test.js), [tests/refine-lineage.test.js](tests/refine-lineage.test.js)). Free track stays crypto-free. Prompt 09. || 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`. 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/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. |-| Spatial MCP (3D as a native response type) | Spec [specs/SPATIAL_MCP.md](specs/SPATIAL_MCP.md), pure validator/builder [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)), 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. |+| 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. || Daily Forge (daily challenge + creator streak) | [pages/daily.html](pages/daily.html) `→ /daily` + [src/daily.js](src/daily.js), deterministic theme rotation [src/daily/daily-theme.js](src/daily/daily-theme.js), streak state machine [src/daily/creator-streak.js](src/daily/creator-streak.js) | Live | The **anonymous-first retention loop** the platform lacked: the logged-in streak system ([api/_lib/streaks.js](api/_lib/streaks.js)) needs an account, so the no-sign-up forge majority had no reason to return. Every UTC day resolves to one curated creative theme (the same for everyone, hashed from the date — no backend, no randomness) with a running "Day N" counter; forging today's theme on the free lane lights a localStorage streak (consecutive-day state machine: extend / reset-on-gap / never-double-count, `best` preserved, at-risk vs lapsed display), and milestones (3/7/14/30/50/100/365) fire a celebration. The generation lands in the shared recents so it's one tap from `/ar` and `/ar/studio`; a "Fresh from the community" strip reads `/api/forge-gallery?scope=community`. `changefreq: daily` in the sitemap. Tests: [tests/daily-theme.test.js](tests/daily-theme.test.js), [tests/creator-streak.test.js](tests/creator-streak.test.js). |diff --git a/data/changelog.json b/data/changelog.jsonindex c5d84bb0e..89f08d486 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,17 @@{"$comment": "Curated changelog entries for three.ws, the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.","entries": [+ {+ "date": "2026-07-25",+ "title": "Spatial MCP becomes installable: npm package, conformance test kit, and a privacy lint",+ "summary": "Spatial MCP, our public-domain standard for returning a live 3D scene as an AI tool result, now ships as an npm package: @three-ws/spatial-mcp. Until today, adopting the standard meant copying a file out of our repository or importing it from our servers; now it is one install, with no dependencies, and it runs in Node, the browser, or any build system. The package carries three things. First, the validator and builder our own servers use, kept byte-identical to the copy served at three.ws/spatial-mcp/spatial-validator.js by a test that fails if the two ever drift. Second, a conformance test kit: thirteen real payloads a correct implementation must accept, reject, or flag, each with the required verdict written down, so anyone building their own validator or renderer can prove it conformant instead of asserting it. Third, a new data-minimization lint. The standard has always required that artifacts carry no session ids, wallet addresses, prices, or credentials, because that is what makes the format safe for app stores that do not allow crypto surfaces, but the specification previously admitted nothing checked this. Now lintSpatialMeta flags suspicious field names and credential-shaped values, the checker page runs it on everything you paste, and the deliberately broken example on the page now leaks an internal id and a price on purpose so you can watch the lint catch both. Lint findings are advisory and never block a valid render, since no tool can know every private field name; the obligation stays with the emitter, but the common mistakes no longer pass silently. The developer dashboard's Web SDK card was also corrected: it was advertising a package that does not contain the viewer, loading a script from an address that does not exist, and demonstrating attributes the component does not have. It now shows the real package, the real script address, and markup that works when pasted.",+ "tags": [+ "sdk",+ "feature",+ "fix"+ ],+ "link": "/spatial-mcp"+ },{"date": "2026-07-25","title": "A twelfth trading strategy joins the fleet: Kimi takes a cockpit",diff --git a/docs/spatial-mcp.md b/docs/spatial-mcp.mdindex 7090cb86b..63982b4df 100644--- a/docs/spatial-mcp.md+++ b/docs/spatial-mcp.md@@ -3,9 +3,10 @@Spatial MCP is an open shape for returning a **live, interactive 3D scene** as an MCP tool result instead of a URL in text. A conformant host renders it inline — orbit, animate, place in AR — with an embedded component. three.ws is the reference implementation; the shape is renderer-agnostic and carries **no** payment, wallet, or coin surface, so it drops into crypto-free app stores unchanged.- **Spec:** [`specs/SPATIAL_MCP.md`](https://github.com/nirholas/three.ws/blob/main/specs/SPATIAL_MCP.md) (v0.1, CC0)-- **Validator (import it):** `https://three.ws/spatial-mcp/spatial-validator.js` — `validateSpatialArtifact()`, `buildSpatialArtifact()`. Source: [`public/spatial-mcp/spatial-validator.js`](https://github.com/nirholas/three.ws/blob/main/public/spatial-mcp/spatial-validator.js); server-side code imports the same module via `api/_lib/spatial-mcp.js`.+- **Validator (npm):** `npm install @three-ws/spatial-mcp` — `validateSpatialArtifact()`, `buildSpatialArtifact()`, `lintSpatialMeta()`, plus the conformance fixture corpus. Source: [`packages/spatial-mcp`](https://github.com/nirholas/three.ws/tree/main/packages/spatial-mcp).+- **Validator (import by URL, no npm):** `https://three.ws/spatial-mcp/spatial-validator.js` — the same module, served directly. Source: [`public/spatial-mcp/spatial-validator.js`](https://github.com/nirholas/three.ws/blob/main/public/spatial-mcp/spatial-validator.js); server-side code imports it via `api/_lib/spatial-mcp.js`, and a CI drift guard keeps the npm copy byte-identical.- **Validator (MCP tool):** `validate_spatial_response({ artifact })` on the three.ws 3D Studio server-- **Validator (no code at all):** paste a payload into the checker on [`/spatial-mcp`](https://three.ws/spatial-mcp) and read the diagnostics+- **Validator (no code at all):** paste a payload into the checker on [`/spatial-mcp`](https://three.ws/spatial-mcp) and read the diagnostics, conformance and data-minimization lint both- **Reference renderer:** [`/spatial-mcp`](https://three.ws/spatial-mcp) — `public/spatial-mcp/spatial-renderer.js`## Quick start — emit a conformant artifact@@ -96,6 +97,21 @@ It applies `camera`/`environment`/`affordances`, plays `animation` when present,`meta` is human-facing only. Never place session/job/creation/prediction/trace ids, wallet addresses, prices, or any auth/coin field anywhere in the artifact. Strip them at emit time — this is what keeps the shape reusable across the Claude and OpenAI tracks.+The reference lint flags the common violations:++```js+import { lintSpatialMeta } from '@three-ws/spatial-mcp';++lintSpatialMeta(artifact);+// [{ path: 'meta.session_id', message: 'looks like an internal/auth/coin field — the spec requires emitters to strip these (data minimization)' }]+```++Findings are advisory and never affect validity: the lint cannot know your internal field names, so a clean result is evidence, not proof. The checker on [`/spatial-mcp`](https://three.ws/spatial-mcp) runs it on every pasted payload.++## Prove your implementation conformant++`@three-ws/spatial-mcp` ships the fixture corpus (`fixtures/manifest.json` plus the artifacts it names): payloads a conformant validator must accept, reject with specific error paths, or lint. Run your implementation over every entry; disagreeing with a required verdict or missing a `mustFlag` path means non-conformance. The package's own test suite does exactly this, so the corpus and the reference validator can never drift apart.+## Who emits it on three.wsFree 3D Studio (`structuredContent.spatial`): `forge_free`, `text_to_avatar`, `mesh_forge`, `rig_mesh`, `forge_avatar`, `refine_model`. Paid 3D Studio: `preview_3d`. Conformance gate: `validate_spatial_response`.diff --git a/package-lock.json b/package-lock.jsonindex 4b43cf021..b8c786107 100644--- a/package-lock.json+++ b/package-lock.json@@ -59,7 +59,8 @@"walk-sdk","tour-sdk","packages/alibaba-cloud-mcp",- "packages/tool-sdk"+ "packages/tool-sdk",+ "packages/spatial-mcp"],"dependencies": {"@0xsplits/splits-sdk": "^6.5.0",@@ -21904,6 +21905,10 @@"resolved": "solana-agent-sdk","link": true},+ "node_modules/@three-ws/spatial-mcp": {+ "resolved": "packages/spatial-mcp",+ "link": true+ },"node_modules/@three-ws/three-token-mcp": {"resolved": "packages/three-token-mcp","link": true@@ -52654,6 +52659,14 @@"node": ">=20"}},+ "packages/spatial-mcp": {+ "name": "@three-ws/spatial-mcp",+ "version": "0.1.0",+ "license": "CC0-1.0",+ "engines": {+ "node": ">=18"+ }+ },"packages/three-token-mcp": {"name": "@three-ws/three-token-mcp","version": "1.1.1",@@ -52734,7 +52747,7 @@},"packages/viewer-presets": {"name": "@three-ws/viewer-presets",- "version": "0.3.0",+ "version": "0.4.0","license": "SEE LICENSE IN LICENSE","engines": {"node": ">=18"diff --git a/package.json b/package.jsonindex 8685bf609..d158e0c4c 100644--- a/package.json+++ b/package.json@@ -85,7 +85,8 @@"walk-sdk","tour-sdk","packages/alibaba-cloud-mcp",- "packages/tool-sdk"+ "packages/tool-sdk",+ "packages/spatial-mcp"],"main": "src/app.js","browserslist": [diff --git a/packages/spatial-mcp/README.md b/packages/spatial-mcp/README.mdnew file mode 100644index 000000000..cf8e17f6a--- /dev/null+++ b/packages/spatial-mcp/README.md@@ -0,0 +1,93 @@+# @three-ws/spatial-mcp++Validator, builder, and conformance fixtures for **Spatial MCP**, the open (CC0) shape for returning a live, interactive 3D scene as a first-class MCP tool result instead of a URL in text.++- Spec: [`specs/SPATIAL_MCP.md`](https://github.com/nirholas/three.ws/blob/main/specs/SPATIAL_MCP.md)+- Live reference renderer + paste-in checker: [three.ws/spatial-mcp](https://three.ws/spatial-mcp)+- Same module, importable without npm: `https://three.ws/spatial-mcp/spatial-validator.js`++Dependency-free. Runs in Node 18+, any browser, and any bundler.++## Install++```bash+npm install @three-ws/spatial-mcp+```++## Emit a conformant artifact++Put the artifact in your MCP tool result's `structuredContent`. Only `spatialMcpVersion`, `kind`, and `scene.glbUrl` are required; `buildSpatialArtifact` fills the recommended blocks and omits anything you don't provide.++```js+import { buildSpatialArtifact } from '@three-ws/spatial-mcp';++const spatial = buildSpatialArtifact({+ glbUrl: 'https://cdn.yoursite.example/models/helmet.glb',+ kind: 'model',+ prompt: 'a battle-worn sci-fi helmet',+ title: 'Battle-worn helmet',+});++return {+ content: [{ type: 'text', text: 'Here is your 3D model.' }],+ structuredContent: { glbUrl: spatial.scene.glbUrl, spatial },+};+```++## Validate before you ship++`validateSpatialArtifact` returns actionable diagnostics, never a bare boolean: every problem names the offending `path` and how to fix it.++```js+import { validateSpatialArtifact } from '@three-ws/spatial-mcp';++const { valid, errors, warnings } = validateSpatialArtifact(spatial);+// errors: [{ path: 'scene.glbUrl', message: 'required — must be an https URL to a .glb asset' }]+// warnings: [{ path: 'camera', message: 'recommended — include `{ autoRotate: true }` …' }]+```++## Data-minimization lint++The spec requires emitters to strip internal identifiers, wallet addresses, prices, and auth material from the artifact; that is what keeps the shape safe in crypto-free app stores. `lintSpatialMeta` flags the common violations. Findings are advisory and never affect validity.++```js+import { lintSpatialMeta } from '@three-ws/spatial-mcp';++lintSpatialMeta(artifact);+// [{ path: 'meta.session_id', message: 'looks like an internal/auth/coin field — …' }]+```++## Conformance fixtures++`fixtures/` is the spec's test corpus: real artifacts a conformant validator must accept, reject, or lint, with the required verdicts in `fixtures/manifest.json`. Point your own implementation at it:++```js+import manifest from '@three-ws/spatial-mcp/fixtures/manifest' with { type: 'json' };++for (const { file, valid, mustFlag = [] } of manifest.fixtures) {+ const artifact = await loadFixture(file); // read from node_modules/@three-ws/spatial-mcp/fixtures/<file>+ const result = myValidator(artifact);+ assert.equal(result.valid, valid, file);+ for (const path of mustFlag) assert(result.errors.some((e) => e.path === path), `${file} must flag ${path}`);+}+```++If your validator disagrees with a required verdict or misses a `mustFlag` path, it is not conformant. Fixture asset URLs use the reserved `assets.example` host: they exercise the validator and are not fetchable.++## API++| Export | What it does |+|---|---|+| `SPATIAL_MCP_VERSION` | the shape version this module implements (`'0.1'`) |+| `buildSpatialArtifact(fields)` | assemble a conformant artifact from what a generation tool already has |+| `validateSpatialArtifact(payload)` | `{ valid, version, errors, warnings }` with per-path diagnostics |+| `isConformantSpatialArtifact(payload)` | boolean convenience over the validator |+| `lintSpatialMeta(payload)` | advisory data-minimization findings, `[{ path, message }]` |++## Rendering++This package is emit-and-validate only. The framework-free reference renderer lives at [`public/spatial-mcp/spatial-renderer.js`](https://github.com/nirholas/three.ws/blob/main/public/spatial-mcp/spatial-renderer.js) (importable at `https://three.ws/spatial-mcp/spatial-renderer.js`) and displays any conformant artifact, including one transformed from a foreign tool result.++## License++CC0-1.0. The spec and this implementation are public domain: reimplement, extend, and ship them anywhere.diff --git a/public/changelog.json b/public/changelog.jsonindex 071e1a659..011828760 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-25T12:24:17.092Z",+ "generated_at": "2026-07-25T12:34:19.799Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -178,6 +178,18 @@"improvement"]},+ {+ "date": "2026-07-25",+ "type": "update",+ "title": "Spatial MCP becomes installable: npm package, conformance test kit, and a privacy lint",+ "summary": "Spatial MCP, our public-domain standard for returning a live 3D scene as an AI tool result, now ships as an npm package: @three-ws/spatial-mcp. Until today, adopting the standard meant copying a file out of our repository or importing it from our servers; now it is one install, with no dependencies, and it runs in Node, the browser, or any build system. The package carries three things. First, the validator and builder our own servers use, kept byte-identical to the copy served at three.ws/spatial-mcp/spatial-validator.js by a test that fails if the two ever drift. Second, a conformance test kit: thirteen real payloads a correct implementation must accept, reject, or flag, each with the required verdict written down, so anyone building their own validator or renderer can prove it conformant instead of asserting it. Third, a new data-minimization lint. The standard has always required that artifacts carry no session ids, wallet addresses, prices, or credentials, because that is what makes the format safe for app stores that do not allow crypto surfaces, but the specification previously admitted nothing checked this. Now lintSpatialMeta flags suspicious field names and credential-shaped values, the checker page runs it on everything you paste, and the deliberately broken example on the page now leaks an internal id and a price on purpose so you can watch the lint catch both. Lint findings are advisory and never block a valid render, since no tool can know every private field name; the obligation stays with the emitter, but the common mistakes no longer pass silently. The developer dashboard's Web SDK card was also corrected: it was advertising a package that does not contain the viewer, loading a script from an address that does not exist, and demonstrating attributes the component does not have. It now shows the real package, the real script address, and markup that works when pasted.",+ "link": "/spatial-mcp",+ "tags": [+ "sdk",+ "feature",+ "fix"+ ]+ },{"date": "2026-07-25","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex e518e147d..dc658d816 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -134,6 +134,14 @@<category>fix</category><description>The Solana endpoints on the public crypto API (balance, token holdings, token supply, largest holders, transaction, account, priority fees) were pointed at a single RPC host. Whenever that host rate-limited us, the caller got the rate-limit error even though the platform keeps a priority-ordered pool of other RPC endpoints for exactly this situation. Those calls now move to the next healthy host automatically, up to three per request, and a host that has just failed is skipped for the next 30 seconds so one bad host does not slow down every request behind it. A genuinely bad request, like a malformed address, still returns its error immediately instead of being retried. This was the second-largest error class on the API.</description></item>+ <item>+ <title>Spatial MCP becomes installable: npm package, conformance test kit, and a privacy lint</title>+ <link>https://three.ws/spatial-mcp</link>+ <guid isPermaLink="false">2026-07-25:Spatial MCP becomes installable: npm package, conformance test kit, and a privacy lint</guid>+ <pubDate>Sat, 25 Jul 2026 12:00:00 GMT</pubDate>+ <category>sdk</category>+ <description>Spatial MCP, our public-domain standard for returning a live 3D scene as an AI tool result, now ships as an npm package: @three-ws/spatial-mcp. Until today, adopting the standard meant copying a file out of our repository or importing it from our servers; now it is one install, with no dependencies, and it runs in Node, the browser, or any build system. The package carries three things. First, the validator and builder our own servers use, kept byte-identical to the copy served at three.ws/spatial-mcp/spatial-validator.js by a test that fails if the two ever drift. Second, a conformance test kit: thirteen real payloads a correct implementation must accept, reject, or flag, each with the required verdict written down, so anyone building their own validator or renderer can prove it conformant instead of asserting it. Third, a new data-minimization lint. The standard has always required that artifacts carry no session ids, wallet addresses, prices, or credentials, because that is what makes the format safe for app stores that do not allow crypto surfaces, but the specification previously admitted nothing checked this. Now lintSpatialMeta flags suspicious field names and credential-shaped values, the checker page runs it on everything you paste, and the deliberately broken example on the page now leaks an internal id and a price on purpose so you can watch the lint catch both. Lint findings are advisory and never block a valid render, since no tool can know every private field name; the obligation stays with the emitter, but the common mistakes no longer pass silently. The developer dashboard's Web SDK card was also corrected: it was advertising a package that does not contain the viewer, loading a script from an address that does not exist, and demonstrating attributes the component does not have. It now shows the real package, the real script address, and markup that works when pasted.</description>+ </item><item><title>The KOL Tracker is now reachable, and its numbers are real</title><link>https://three.ws/tracker</link>diff --git a/public/features.json b/public/features.jsonindex a2d8ac0ea..667ffca81 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-25T12:24:17.086Z",+ "generated_at": "2026-07-25T12:34:19.789Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",diff --git a/specs/SPATIAL_MCP.md b/specs/SPATIAL_MCP.mdindex 47a36eae6..4a96219e1 100644--- a/specs/SPATIAL_MCP.md+++ b/specs/SPATIAL_MCP.md@@ -74,7 +74,7 @@ A Spatial MCP artifact is a JSON object placed in a tool result's `structuredCon| `camera`,`environment`,`animation`,`persona`,`affordances`,`meta` | optional | objects; validated for type/shape only when present. || `ar.*Url` | optional | https URLs; `ar.supported: true` requires at least one of `usdzUrl`/`glbUrl`/`launchUrl`. |-**Data minimization.** `meta` is human-facing only. Never place session ids, job/creation/prediction ids, trace ids, wallet addresses, prices, or any auth/coin field anywhere in the artifact. The reference validator does not police this (it can't know your internal names), but conformant emitters MUST strip them — this is what keeps the shape reusable in crypto-free stores.+**Data minimization.** `meta` is human-facing only. Never place session ids, job/creation/prediction ids, trace ids, wallet addresses, prices, or any auth/coin field anywhere in the artifact. Conformant emitters MUST strip them; this is what keeps the shape reusable in crypto-free stores. The reference implementation ships `lintSpatialMeta(artifact)`, which flags the common violations (suspicious key names in `meta` and in unknown top-level blocks, plus credential- and address-shaped values). Its findings are advisory warnings, never conformance errors: it cannot know your internal field names, so a clean lint is evidence, not proof, and the requirement stays on the emitter. The paste-in checker at [`/spatial-mcp`](https://three.ws/spatial-mcp) runs the lint on every payload.**Forward compatibility.** Unknown top-level fields are ignored by conformant renderers (a warning, not an error), so a host may carry extra data without breaking older renderers.diff --git a/tests/e2e/spatial-mcp-render.spec.js b/tests/e2e/spatial-mcp-render.spec.jsindex 44265c5fa..ef746793e 100644--- a/tests/e2e/spatial-mcp-render.spec.js+++ b/tests/e2e/spatial-mcp-render.spec.js@@ -118,6 +118,10 @@ test('the checker names the offending field on a broken payload', async ({ pageawait expect(report).toContainText('kind');await expect(report).toContainText('camera.autoRotate');await expect(report).toContainText('ar.supported');+ // The data-minimization lint runs on every payload; the broken preset leaks+ // an internal id and a price on purpose so the privacy findings are visible.+ await expect(report).toContainText('meta.session_id');+ await expect(report).toContainText('meta.price_usd');await expect(report).not.toContainText('conformant, 0 errors');// An unusable payload gets the designed fallback, never a blank frame.