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(chatgpt-app): widget CSP allowlists the GLB storage origin; persona tools render a real Apps SDK widget
nirholas8fb854f37349
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 15305051a..e2f1b4758 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -10,6 +10,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Docs · Sketchfab Showcase** (`/docs/sketchfab`) — How the best community forge models get published to the official three.ws Sketchfab account: what gets picked, AI disclosure, and the backlinks that make referrals measurable.- **End-User License Agreement** (`/legal/eula`) — License terms for the three.ws Seeker/Saga app.- **"Deploy onchain" now opens the real deploy flow with your model loaded** — After forging a model, the "Deploy onchain" shortcut used to drop you on Launchpad Studio (the white-label site builder), which ignored your model entirely. It now opens the on-chain deploy wizard with your model and its name already filled in, so you go straight from forge to a permanent on-chain agent identity. The search palette's "Launch a coin" action was also mispointed and now opens the pump.fun coin launch flow. (`/deploy`) `[fix]`+- **3D models now render inside ChatGPT** — Fixed the free 3D Studio app for ChatGPT so generated models actually display in the conversation. The inline viewer's security allowlist was missing the storage domain models are served from, so ChatGPT blocked every model from loading; it is now included automatically. Living agent personas (create, reload, speak) also gained their own inline view in ChatGPT, so a saved agent body idles, lip-syncs, and emotes right in the chat. `[fix, improvement]`- **3D previews stop erroring on the scanner and every plain page footer** — The walking robot in the site footer failed to appear on plain pages like /hydrate and /login because its compressed 3D model needed a decoder the page never loaded; the decoder is now wired in before the viewer starts, so the robot renders everywhere. The 3D scanner also downloaded a 748KB placeholder avatar the moment the page opened, even for visitors who never started a scan, and logged a fetch error on every visit to the old /scan address; the placeholder now loads only when the build step is actually on screen, and if its download ever fails the progress view stays clean instead of showing a dead black panel. (`/create/selfie`) `[fix]`- **Agent and coin art always renders on the Activity and Deployments feeds** — Avatars on the /activity trading floor and the /deployments on-chain feed come from wherever the agent's creator hosted them, and browsers were silently blocking many of those hosts (IPFS gateways serving metadata instead of an image, dead image servers), leaving blank tiles and repeated failed requests. Every third-party image now loads through the platform's own image resolver, which finds the real artwork across multiple IPFS gateways and shows a clean generated placeholder when the original is truly gone. (`/activity`) `[fix]`- **Agent brains upgraded to the newest OpenAI models** — Every OpenAI-powered surface on the platform now runs the GPT-5.6 family released this month. The Brain page and agent model pickers offer three tiers: Sol (flagship reasoning), Terra (balanced), and Luna (fast and cost-efficient), each with a 1M-token context window, up from 128K. Vision fallbacks, the copilot, widgets, and the marketplace default to Luna, and anything still pointed at the retired GPT-4o models is transparently upgraded, so nothing breaks and every answer gets smarter. (`/brain`) `[improvement]`diff --git a/api/_mcp-studio/component.js b/api/_mcp-studio/component.jsindex 58960c5b2..7cc6ec03e 100644--- a/api/_mcp-studio/component.js+++ b/api/_mcp-studio/component.js@@ -267,7 +267,7 @@ export const COMPONENT_MIME = 'text/html+skybridge';// The public origin generated GLBs are actually served from (the R2 public// bucket, e.g. https://pub-<hash>.r2.dev). ChatGPT ENFORCES the widget CSP// inside its sandbox, so leaving this origin out blocks every model fetch and-// the widget error-states on 100% of generations — even though the same widget+// the widget error-states on 100% of generations, even though the same widget// works in permissive test harnesses. Resolved lazily because S3_PUBLIC_DOMAIN// is a required-env getter (throws when storage isn't configured, e.g. tests).function glbStorageOrigin() {@@ -300,10 +300,10 @@ export function componentCsp() {// ── persona widget ──────────────────────────────────────────────────────────//// ChatGPT only renders a widget when the TOOL's _meta["openai/outputTemplate"]-// points at a registered ui:// resource — a result-level template on an inline+// points at a registered ui:// resource; a result-level template on an inline// artifact is ignored, so the persona tools rendered nothing there. This widget// closes that gap: it reads the persona structuredContent (embed_url, name,-// status) and mounts the hosted embodiment embed — the same living body the+// status) and mounts the hosted embodiment embed, the same living body the// inline artifact shows in other MCP hosts. frame_domains opts the widget into// framing the app origin.diff --git a/api/_mcp-studio/dispatch.js b/api/_mcp-studio/dispatch.jsindex f1cab5fb7..d1f0f5764 100644--- a/api/_mcp-studio/dispatch.js+++ b/api/_mcp-studio/dispatch.js@@ -68,7 +68,7 @@ function widgetResources() {mimeType: COMPONENT_MIME,text: PERSONA_COMPONENT_HTML,_meta: {- 'openai/widgetDescription': 'A live 3D agent body — it idles between turns, lip-syncs each reply, and shows emotion.',+ 'openai/widgetDescription': 'A live 3D agent body: it idles between turns, lip-syncs each reply, and shows emotion.','openai/widgetCSP': personaComponentCsp(),'openai/widgetDomain': 'https://three.ws','openai/widgetPrefersBorder': true,diff --git a/api/_mcp-studio/persona-tools.js b/api/_mcp-studio/persona-tools.jsindex 82947c507..7cf301ef1 100644--- a/api/_mcp-studio/persona-tools.js+++ b/api/_mcp-studio/persona-tools.js@@ -31,7 +31,8 @@ import {isPersonaId,} from '../_lib/persona-store.js';import { expressionForText, expressionFor } from '../../src/embodiment/emotion.js';-import { embodimentArtifact } from '../_lib/embodiment-artifact.js';+import { embodimentArtifact, buildEmbedUrl } from '../_lib/embodiment-artifact.js';+import { PERSONA_COMPONENT_URI } from './component.js';const MAX_GLB_BYTES = 64 * 1024 * 1024;@@ -124,7 +125,7 @@ async function handleCreatePersona(args, _auth, req) {},embodimentArtifact({ persona, state: 'idle' }),],- structuredContent: { ...persona, status: 'created' },+ structuredContent: { ...persona, status: 'created', embed_url: buildEmbedUrl({ persona, state: 'idle' }) },};}@@ -146,7 +147,7 @@ async function handleGetPersona(args) {},embodimentArtifact({ persona, state: 'idle' }),],- structuredContent: { ...persona, status: 'loaded' },+ structuredContent: { ...persona, status: 'loaded', embed_url: buildEmbedUrl({ persona, state: 'idle' }) },};}@@ -194,6 +195,14 @@ async function handlePersonaSay(args, _auth, req) {gesture: expr.gesture,turn_count: persona.turn_count,status: 'spoken',+ embed_url: buildEmbedUrl({+ persona,+ state: 'speaking',+ text,+ emotion: expr.emotion,+ intensity: expr.intensity,+ gesture: expr.gesture,+ }),},};}@@ -205,11 +214,13 @@ const CREATE_ANNOTATIONS = { readOnlyHint: false, destructiveHint: false, idempoconst READ_ANNOTATIONS = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };const SAY_ANNOTATIONS = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false };-// The persona tools return their living-body artifact as an inline text/html-// resource (embodimentArtifact carries its own openai/outputTemplate), so the-// tool-level _meta only advertises the invocation labels + widget accessibility.+// Apps SDK hosts only render a widget declared on the TOOL descriptor, so each+// persona tool links the registered persona widget (which frames the hosted+// embodiment embed from structuredContent.embed_url). The inline text/html+// artifact stays in content[] for hosts that render inline resources instead.function personaMeta(invoking, invoked) {return {+ 'openai/outputTemplate': PERSONA_COMPONENT_URI,'openai/toolInvocation/invoking': invoking,'openai/toolInvocation/invoked': invoked,'openai/widgetAccessible': true,diff --git a/data/changelog.json b/data/changelog.jsonindex 5fe50501c..9ce11e604 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -13682,6 +13682,15 @@"fix"],"link": "/sitemap"+ },+ {+ "date": "2026-07-14",+ "title": "3D models now render inside ChatGPT",+ "summary": "Fixed the free 3D Studio app for ChatGPT so generated models actually display in the conversation. The inline viewer's security allowlist was missing the storage domain models are served from, so ChatGPT blocked every model from loading; it is now included automatically. Living agent personas (create, reload, speak) also gained their own inline view in ChatGPT, so a saved agent body idles, lip-syncs, and emotes right in the chat.",+ "tags": [+ "fix",+ "improvement"+ ]}]}diff --git a/public/changelog.json b/public/changelog.jsonindex 9e96d703d..52234428a 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-14T13:48:01.626Z",+ "generated_at": "2026-07-14T13:50:21.208Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -46,6 +46,17 @@"fix"]},+ {+ "date": "2026-07-14",+ "type": "update",+ "title": "3D models now render inside ChatGPT",+ "summary": "Fixed the free 3D Studio app for ChatGPT so generated models actually display in the conversation. The inline viewer's security allowlist was missing the storage domain models are served from, so ChatGPT blocked every model from loading; it is now included automatically. Living agent personas (create, reload, speak) also gained their own inline view in ChatGPT, so a saved agent body idles, lip-syncs, and emotes right in the chat.",+ "link": null,+ "tags": [+ "fix",+ "improvement"+ ]+ },{"date": "2026-07-14","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex c50767239..e1c262d8f 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -38,6 +38,14 @@<category>fix</category><description>After forging a model, the "Deploy onchain" shortcut used to drop you on Launchpad Studio (the white-label site builder), which ignored your model entirely. It now opens the on-chain deploy wizard with your model and its name already filled in, so you go straight from forge to a permanent on-chain agent identity. The search palette's "Launch a coin" action was also mispointed and now opens the pump.fun coin launch flow.</description></item>+ <item>+ <title>3D models now render inside ChatGPT</title>+ <link>https://three.ws/changelog</link>+ <guid isPermaLink="false">2026-07-14:3D models now render inside ChatGPT</guid>+ <pubDate>Tue, 14 Jul 2026 12:00:00 GMT</pubDate>+ <category>fix</category>+ <description>Fixed the free 3D Studio app for ChatGPT so generated models actually display in the conversation. The inline viewer's security allowlist was missing the storage domain models are served from, so ChatGPT blocked every model from loading; it is now included automatically. Living agent personas (create, reload, speak) also gained their own inline view in ChatGPT, so a saved agent body idles, lip-syncs, and emotes right in the chat.</description>+ </item><item><title>3D previews stop erroring on the scanner and every plain page footer</title><link>https://three.ws/create/selfie</link>diff --git a/tests/mcp-studio.test.js b/tests/mcp-studio.test.jsindex 862ef35c2..25aa58300 100644--- a/tests/mcp-studio.test.js+++ b/tests/mcp-studio.test.js@@ -3,7 +3,7 @@ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';import { TOOL_CATALOG, TOOL_NAMES } from '../api/_mcp-studio/tools.js';import { PERSONA_TOOL_CATALOG, PERSONA_TOOL_NAMES } from '../api/_mcp-studio/persona-tools.js';import { dispatch } from '../api/_mcp-studio/dispatch.js';-import { COMPONENT_URI } from '../api/_mcp-studio/component.js';+import { COMPONENT_URI, PERSONA_COMPONENT_URI, componentCsp } from '../api/_mcp-studio/component.js';// The generation tools (render the model-viewer widget) + the three embodiment /// persona tools (render the living-body embed).@@ -88,6 +88,12 @@ describe('mcp-studio embodiment (persona) tools', () => {it('carries ZERO crypto / payment surface', () => {expect(FORBIDDEN.test(JSON.stringify(PERSONA_TOOL_CATALOG))).toBe(false);});++ it('every persona tool links the persona widget template (ChatGPT only renders tool-level templates)', () => {+ for (const t of PERSONA_TOOL_CATALOG) {+ expect(t._meta?.['openai/outputTemplate']).toBe(PERSONA_COMPONENT_URI);+ }+ });});describe('mcp-studio dispatch', () => {@@ -110,15 +116,50 @@ describe('mcp-studio dispatch', () => {expect(r.result.tools.map((t) => t.name).sort()).toEqual([...ALL].sort());});- it('serves the Apps SDK widget resource', async () => {+ it('serves both Apps SDK widget resources', async () => {const list = await dispatch({ jsonrpc: '2.0', id: 3, method: 'resources/list' }, auth, mkReq());- expect(list.result.resources[0].uri).toBe(COMPONENT_URI);+ const uris = list.result.resources.map((r) => r.uri);+ expect(uris).toEqual([COMPONENT_URI, PERSONA_COMPONENT_URI]);+ // resources/list is metadata only; the HTML body ships via resources/read.+ for (const r of list.result.resources) expect(r.text).toBeUndefined();const read = await dispatch({ jsonrpc: '2.0', id: 4, method: 'resources/read', params: { uri: COMPONENT_URI } },auth,mkReq(),);expect(read.result.contents[0].text).toContain('model-viewer');+ const readPersona = await dispatch(+ { jsonrpc: '2.0', id: 14, method: 'resources/read', params: { uri: PERSONA_COMPONENT_URI } },+ auth,+ mkReq(),+ );+ expect(readPersona.result.contents[0].text).toContain('embed_url');+ expect(readPersona.result.contents[0]._meta['openai/widgetCSP'].frame_domains).toContain('https://three.ws');+ });++ it('widget CSP allowlists the GLB storage origin (ChatGPT enforces it in the sandbox)', () => {+ const prev = process.env.S3_PUBLIC_DOMAIN;+ process.env.S3_PUBLIC_DOMAIN = 'https://pub-abc123.r2.dev';+ try {+ const csp = componentCsp();+ expect(csp.connect_domains).toContain('https://pub-abc123.r2.dev');+ expect(csp.resource_domains).toContain('https://pub-abc123.r2.dev');+ } finally {+ if (prev === undefined) delete process.env.S3_PUBLIC_DOMAIN;+ else process.env.S3_PUBLIC_DOMAIN = prev;+ }+ });++ it('widget CSP stays valid when storage is unconfigured', () => {+ const prev = process.env.S3_PUBLIC_DOMAIN;+ delete process.env.S3_PUBLIC_DOMAIN;+ try {+ const csp = componentCsp();+ expect(csp.connect_domains).toContain('https://three.ws');+ expect(csp.connect_domains.every((d) => d.startsWith('https://'))).toBe(true);+ } finally {+ if (prev !== undefined) process.env.S3_PUBLIC_DOMAIN = prev;+ }});it('unknown tool returns an error', async () => {