Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

Add tests for Granite director and logo lexicon functionality

nirholas1874271fcba5
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 95111419e..5b44b4b26 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -25,6 +25,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **New doc: IRL, agents in the real world** — The IRL layer finally has a front door in the docs: one page that explains the whole vision and how the shipped pieces fit together. It covers placing an agent at a real GPS spot from your phone, walk-up discovery with proof of presence, paying agents in person via x402, Money Drops (real SOL, USDC, or $THREE escrowed at a place and claimable only by walking up), World Lines (agent-signed proofs that you were really there), and the privacy model that makes it all safe. The docs sidebar now also links the hands-on IRL tutorial, which was previously unreachable from the navigation. (`/docs/irl`) `[docs]`
- **Play and Club run cooler: smart frame caps and a power-saver toggle** — The 3D worlds on /play and /club used to render at your monitor's full refresh rate (up to 144+ frames a second) and kept working at full quality even when you clicked over to another window, which made laptops run hot with fans spinning. Both pages now cap rendering at 60fps, drop to 30fps whenever the window is in the background, and /play stops rendering the hidden 3D arena behind the coin-picker lobby entirely. There's also a new Eco toggle (the lightning button in /play, a checkbox in the /club panel) that holds everything at 30fps with lighter effects for a cooler, quieter machine; the setting is shared across both pages. (`/play`) `[improvement, fix]`
- **Shared 3D viewer links load again** — Opening a shared model link at /viewer could hang on the loading spinner forever even though the model file itself was fine. The viewer now reveals the model as soon as it finishes rendering, and if a model genuinely cannot display, you get a clear message and a working download button instead of an endless spinner. (`/viewer`) `[fix]`
+- **Short prompts now generate what you actually meant** — A terse prompt like a two-word meme reference used to go straight to the image model and come back as something unrecognizable. The art-director step that expands your idea into a precise single-object spec (shape, materials, framing) was silently failing on every ChatGPT, MCP, and API generation; it now runs on every one of them. On top of that, well-known logos and brand marks resolve to their real geometry deterministically, so asking for a famous mark gives you the actual shape instead of a garbled badge. (`/studio`) `[fix, improvement]`
- **The 3D viewer now funnels every model into a next step** — Every generated model's share page grew a "Do more with this model" panel: pose and animate it in Pose Studio (rigged models are detected automatically), restyle the material, drop it into Scene Studio or Parts Studio, place it in your room in AR, copy a paste-anywhere embed iframe, or launch it as a pump.fun coin with a rendered snapshot pre-filled as the token image. The viewer can now also be embedded on any site. (`/viewer`) `[feature, improvement]`
- **The Agora and City worlds survive OpenStreetMap outages** — The 3D city on /agora and /city is built from live OpenStreetMap data, and a single overloaded map server used to mean an empty world with no buildings. Map data now fails over across three independent OpenStreetMap mirrors, and if every mirror is down the world rebuilds from the last map snapshot saved in your browser, so Manhattan stays standing even when the map providers do not. (`/agora`) `[fix, improvement]`
- **The AR placement button is visible again on /irl** — On phones, the strip of actions under the camera view had quietly scrolled itself past its own first button, so "Place in AR" (the one-tap way to stand your agent on a real floor) sat just off the left edge of the screen, where almost nobody would swipe back to find it. The strip now opens on its true first action, so AR placement leads the row as intended. Every other control on the page was re-checked for overlap at phone, small-phone, and landscape sizes: nothing is covering anything else. (`/irl`) `[fix]`
diff --git a/api/3d/studio.js b/api/3d/studio.js
index d09966c5b..54f631ac7 100644
--- a/api/3d/studio.js
+++ b/api/3d/studio.js
@@ -33,6 +33,7 @@ import { cors, wrap, method, json, error, readJson, rateLimited } from '../_lib/
import { limits, clientIp } from '../_lib/rate-limit.js';
import { startForge, originFromReq, viewerUrl } from '../_mcp-studio/forge-client.js';
import { checkPromptSafety } from '../_mcp-studio/safety.js';
+import { resolveLogoPrompt } from '../_lib/forge-director-prompts.js';
const PROMPT_MIN = 3; // the generation lane needs a subject to condition on
const PROMPT_MAX = 1000; // matches /api/forge's own prompt ceiling
@@ -152,6 +153,12 @@ async function generate(req, res) {
}
const base = originFromReq(req);
+ // Known brand-mark prompts ("<brand name> logo") resolve to a deterministic
+ // geometric spec of the real mark. This lane runs no LLM director (the ~45s
+ // Actions deadline leaves no headroom), so without the lexicon a raw brand
+ // name reconstructs as a generic badge covered in garbled lettering.
+ const knownMark = resolveLogoPrompt(prompt);
+ const subject = knownMark ? knownMark.prompt : prompt;
let job;
try {
// Pinned to the fast free lane: ChatGPT Actions abandon the HTTP call at
@@ -161,8 +168,14 @@ async function generate(req, res) {
// deploy the async self-host Hunyuan3D worker (workers/model-hunyuan3d,
// forge lane already wired behind GCP_HUNYUAN3D_URL), then request tier
// 'high' with internal: true — startForge degrades to standard on
- // 402/timeout.
- job = await startForge(base, { prompt, backend: 'nvidia', path: 'image', tier: 'standard' });
+ // 402/timeout. A known mark with a reference view goes image→3D unpinned
+ // (image jobs return a poll handle, which the Actions contract handles).
+ job = await startForge(
+ base,
+ knownMark?.imagePath
+ ? { prompt: subject, imageUrls: [`${base}${knownMark.imagePath}`], tier: 'standard' }
+ : { prompt: subject, backend: 'nvidia', path: 'image', tier: 'standard' },
+ );
} catch (err) {
return failFromLane(res, err);
}
diff --git a/api/_lib/forge-director-prompts.js b/api/_lib/forge-director-prompts.js
index 2a65d4d65..22b75b1fe 100644
--- a/api/_lib/forge-director-prompts.js
+++ b/api/_lib/forge-director-prompts.js
@@ -1,13 +1,20 @@
// Shared IBM Granite "art director" prompt specs — the LLM rewrite step that
// turns a rough user idea into a tight, information-dense spec for the
// text-to-3D reconstruction pipeline (see api/_mcp-studio/forge-client.js's
-// directPrompt(), which sends one of these as the system instruction over
-// /api/chat, provider=watsonx). Centralized here so every surface that runs
+// directPrompt(), which sends one of these as the system message to watsonx
+// Granite in process, free-chain fallback). Centralized here so every surface that runs
// the director — the free MCP tools (api/_mcp-studio/tools.js), the paid
// OKX REST twin (api/_okx3d/rest-services.js), and the public /api/forge
// opt-in `director:true` param — stays in sync on one copy instead of three
// hand-maintained duplicates drifting apart.
+import { BRAND_MARK_DIRECTIVE, resolveLogoPrompt } from '../../mcp-server/src/tools/_logo-lexicon.js';
+
+// Deterministic brand-mark resolution ("<brand name> logo" → the real mark's
+// geometry). Re-exported here so every api/ director call-site gets the
+// lexicon from the same module it already imports the director prompts from.
+export { resolveLogoPrompt };
+
// For a single object/prop/creature — one isolated subject, its construction,
// per-part PBR materials, one held art style, and fine surface detail, ending
// in composition constraints tuned for clean image→mesh reconstruction.
@@ -19,7 +26,12 @@ export const MESH_DIRECTOR =
'leather, glossy lacquer, rough stone) so surfaces reconstruct with the right roughness/metalness, (4) a ' +
'coherent, consistent art style held across the whole subject (pick one: photoreal, stylized, low-poly, ' +
'hand-painted — never mix styles), (5) fine surface detail (seams, panel lines, weathering, grain) that ' +
- 'gives the reconstructor texture to latch onto. Always end with these composition constraints so the ' +
+ 'gives the reconstructor texture to latch onto. If the idea names a brand, meme, app, or term you do not ' +
+ 'recognize, keep the user\'s concrete object noun as the subject and describe its canonical physical form ' +
+ '(a pill is a two-tone medicine capsule, a rocket is a finned cylinder with a nose cone); never substitute ' +
+ 'a different object. ' +
+ BRAND_MARK_DIRECTIVE +
+ 'Always end with these composition constraints so the ' +
'reference image reconstructs cleanly: full subject in frame, centered, isolated on a plain neutral ' +
'background, one camera angle, even studio lighting, no cropping, no motion blur, no text or watermark, no ' +
'collage or multi-view grid, no second subject. Output ONLY the rewritten prompt as a single line — no ' +
@@ -36,7 +48,9 @@ export const AVATAR_DIRECTOR =
'material cues (e.g. brushed metal armor, worn leather straps, matte cloth, glossy visor) so surfaces ' +
'reconstruct with correct roughness/metalness, (4) one coherent, consistent art style held across the ' +
'whole character (pick one: photoreal, stylized, low-poly, hand-painted — never mix styles), (5) key ' +
- 'identifying features (hair, face, color scheme, accessories). Always end with these composition ' +
+ 'identifying features (hair, face, color scheme, accessories). If the idea names a brand, meme, or term ' +
+ 'you do not recognize, keep the user\'s stated character concept as the subject and render its canonical ' +
+ 'look; never substitute a different character. Always end with these composition ' +
'constraints: full body in frame head-to-toe, centered, isolated on a plain neutral background, no props ' +
'gripped or crossing the silhouette, one camera angle facing the character, even studio lighting, no ' +
'cropping, no motion blur, no text or watermark, no collage or multi-view grid, no second character. ' +
diff --git a/api/_mcp-studio/forge-client.js b/api/_mcp-studio/forge-client.js
index 4d1f6d614..40126aea6 100644
--- a/api/_mcp-studio/forge-client.js
+++ b/api/_mcp-studio/forge-client.js
@@ -12,6 +12,8 @@
// front door and the generation pipeline are always the same deployment.
import { env } from '../_lib/env.js';
+import { watsonxConfig, watsonxChatComplete } from '../_lib/watsonx.js';
+import { llmComplete } from '../_lib/llm.js';
const DEFAULT_TIMEOUT_MS = 180_000;
const DEFAULT_POLL_MS = 3_000;
@@ -180,50 +182,68 @@ export async function rig(base, glbUrl, { timeoutEnv } = {}) {
});
}
-// IBM Granite prompt director (via /api/chat, provider=watsonx). Rewrites a
-// rough idea into a tight single-subject 3D spec. Fail-soft: returns null on any
-// failure so the caller forwards the original prompt unchanged — never faked.
-export async function directPrompt(base, instruction, rawPrompt) {
- let res;
- try {
- res = await fetch(`${base}/api/chat`, {
- method: 'POST',
- headers: { 'content-type': 'application/json', accept: 'text/event-stream' },
- body: JSON.stringify({ provider: 'watsonx', message: `${instruction}\n\nIdea: ${rawPrompt}` }),
- signal: AbortSignal.timeout(30_000),
- });
- } catch {
- return null;
+// IBM Granite prompt director. Rewrites a rough idea into a tight single-subject
+// 3D spec. Runs IN PROCESS: watsonx Granite leads, and the shared free-first LLM
+// chain (llmComplete, the same one forge-enhance rides) is the fallback. The
+// previous implementation POSTed provider=watsonx to its own /api/chat, which
+// the anonymous-provider gate 401s (chat.js pins anon callers to the free
+// providers), so the director silently never ran on any surface. Fail-soft:
+// returns null on any failure so the caller forwards the original prompt
+// unchanged, never faked.
+const DIRECTOR_MAX_TOKENS = 200;
+const DIRECTOR_TIMEOUT_MS = 20_000;
+
+export async function directPrompt(instruction, rawPrompt) {
+ const user = `Idea: ${rawPrompt}`;
+ let text = null;
+
+ // watsonxChatComplete carries no abort signal of its own, so cap it here; a
+ // hung IAM or inference call must degrade to the free chain, not stall the
+ // whole generation submit.
+ const cfg = watsonxConfig();
+ if (cfg.configured) {
+ let timer;
+ try {
+ const result = await Promise.race([
+ watsonxChatComplete(cfg, {
+ messages: [
+ { role: 'system', content: instruction },
+ { role: 'user', content: user },
+ ],
+ maxTokens: DIRECTOR_MAX_TOKENS,
+ }),
+ new Promise((_, reject) => {
+ timer = setTimeout(() => reject(new Error('watsonx director timed out')), DIRECTOR_TIMEOUT_MS);
+ }),
+ ]);
+ text = result?.text || null;
+ } catch {
+ text = null;
+ } finally {
+ clearTimeout(timer);
+ }
}
- if (!res.ok || !res.body) return null;
- let acc = '';
- try {
- const reader = res.body.getReader();
- const decoder = new TextDecoder();
- let buf = '';
- for (;;) {
- const { value, done } = await reader.read();
- if (done) break;
- buf += decoder.decode(value, { stream: true });
- const lines = buf.split('\n');
- buf = lines.pop() ?? '';
- for (const line of lines) {
- if (!line.startsWith('data: ')) continue;
- let evt;
- try {
- evt = JSON.parse(line.slice(6));
- } catch {
- continue;
- }
- if (evt.type === 'chunk' && typeof evt.text === 'string') acc += evt.text;
- else if (evt.type === 'error') return null;
- else if (evt.type === 'done' && typeof evt.text === 'string' && !acc) acc = evt.text;
- }
+
+ if (!text) {
+ try {
+ const result = await llmComplete({
+ system: instruction,
+ user,
+ maxTokens: DIRECTOR_MAX_TOKENS,
+ timeoutMs: DIRECTOR_TIMEOUT_MS,
+ track: { tool: 'forge-director' },
+ });
+ text = result?.text || null;
+ } catch {
+ return null;
}
- } catch {
- return null;
}
- const refined = acc.trim().replace(/^["']|["']$/g, '').split('\n')[0].trim();
+
+ if (!text) return null;
+ // First line only, then strip wrapping quotes; the reverse order leaves a
+ // dangling quote when the model adds commentary lines after a quoted prompt.
+ const firstLine = text.trim().split('\n')[0].trim();
+ const refined = firstLine.replace(/^["'“”]+|["'“”]+$/g, '').trim();
return refined.length >= 3 && refined.length <= 1000 ? refined : null;
}
diff --git a/api/_mcp-studio/tools.js b/api/_mcp-studio/tools.js
index 7fc34c7e5..90215f63b 100644
--- a/api/_mcp-studio/tools.js
+++ b/api/_mcp-studio/tools.js
@@ -16,7 +16,7 @@ import Ajv from 'ajv';
import addFormats from 'ajv-formats';
import { assertSafePublicUrl, SsrfBlockedError } from '../_lib/ssrf-guard.js';
-import { MESH_DIRECTOR, AVATAR_DIRECTOR } from '../_lib/forge-director-prompts.js';
+import { MESH_DIRECTOR, AVATAR_DIRECTOR, resolveLogoPrompt } from '../_lib/forge-director-prompts.js';
import { checkPromptSafety } from './safety.js';
import {
originFromReq,
@@ -241,17 +241,34 @@ async function handleMeshForge(args, _auth, req) {
} catch (err) {
return toolError(err.userMessage ? err.message : 'That image URL could not be used.');
}
- // Granite prompt director (text mode only; fail-soft — original prompt on any failure).
+ // Known brand marks resolve deterministically (no LLM knows a niche mark's
+ // geometry; the lexicon spec is already tight, so a rewrite could only hurt)
+ // and, when a pre-rendered reference view ships with the mark, go image→3D
+ // for an exact reconstruction. Everything else runs the Granite prompt
+ // director (text mode only; fail-soft — original prompt on any failure).
let effective = prompt;
+ let markImageUrls;
if (prompt && !imageUrl) {
- const directed = await directPrompt(base, MESH_DIRECTOR, prompt);
- if (directed) effective = directed;
+ const knownMark = resolveLogoPrompt(prompt);
+ if (knownMark) {
+ effective = knownMark.prompt;
+ if (knownMark.imagePath) markImageUrls = [`${base}${knownMark.imagePath}`];
+ } else {
+ const directed = await directPrompt(MESH_DIRECTOR, prompt);
+ if (directed) effective = directed;
+ }
}
let job;
try {
job = await generate(
base,
- { prompt: effective || undefined, imageUrls: imageUrl ? [imageUrl] : undefined, aspect: '1:1', tier: 'standard', internal: true },
+ {
+ prompt: effective || undefined,
+ imageUrls: imageUrl ? [imageUrl] : markImageUrls,
+ aspect: '1:1',
+ tier: 'standard',
+ internal: true,
+ },
{ timeoutEnv: 'STUDIO_FORGE_TIMEOUT_MS' },
);
} catch (err) {
@@ -302,7 +319,7 @@ async function handleForgeAvatar(args, _auth, req) {
// Stage 1 — generate the mesh (Granite director in text mode, fail-soft).
let effective = prompt;
if (prompt && !imageUrl) {
- const directed = await directPrompt(base, AVATAR_DIRECTOR, prompt);
+ const directed = await directPrompt(AVATAR_DIRECTOR, prompt);
if (directed) effective = directed;
}
let gen;
diff --git a/api/_okx3d/rest-services.js b/api/_okx3d/rest-services.js
index da4db0e53..7637fb28b 100644
--- a/api/_okx3d/rest-services.js
+++ b/api/_okx3d/rest-services.js
@@ -26,7 +26,7 @@ import Ajv from 'ajv';
import addFormats from 'ajv-formats';
import { catalogEntry } from '../_lib/okx-catalog.js';
-import { MESH_DIRECTOR } from '../_lib/forge-director-prompts.js';
+import { MESH_DIRECTOR, resolveLogoPrompt } from '../_lib/forge-director-prompts.js';
import {
originFromReq,
viewerUrl,
@@ -134,12 +134,22 @@ const HANDLERS = {
},
// $0.30 — Granite director (fail-soft) + the standard/high generation lane.
+ // Known brand marks skip the director for the deterministic lexicon spec.
async 'text-to-3d-pro'(args, ctx) {
const tier = args.tier === 'high' ? 'high' : 'standard';
let effective = args.prompt;
- const directed = await directPrompt(ctx.base, MESH_DIRECTOR, args.prompt);
- if (directed) effective = directed;
- const job = await startForge(ctx.base, { prompt: effective, aspect: args.aspect_ratio });
+ const knownMark = resolveLogoPrompt(args.prompt);
+ if (knownMark) {
+ effective = knownMark.prompt;
+ } else {
+ const directed = await directPrompt(MESH_DIRECTOR, args.prompt);
+ if (directed) effective = directed;
+ }
+ const job = await startForge(ctx.base, {
+ prompt: effective,
+ imageUrls: knownMark?.imagePath ? [`${ctx.base}${knownMark.imagePath}`] : undefined,
+ aspect: args.aspect_ratio,
+ });
return queuedResponse(job, { mode: 'text_to_3d', tier });
},
diff --git a/api/forge.js b/api/forge.js
index bb72c5177..0b979a7d3 100644
--- a/api/forge.js
+++ b/api/forge.js
@@ -126,8 +126,8 @@ import {
cacheKeyForJob,
} from './_lib/forge-cache.js';
import { shouldRetryForQuality } from './_lib/glb-quality.js';
-import { directPrompt, originFromReq } from './_mcp-studio/forge-client.js';
-import { MESH_DIRECTOR } from './_lib/forge-director-prompts.js';
+import { directPrompt } from './_mcp-studio/forge-client.js';
+import { MESH_DIRECTOR, resolveLogoPrompt } from './_lib/forge-director-prompts.js';
// Circuit-breaker key + window for the free NVIDIA NIM TRELLIS text→3D lane. The
// hosted NVCF gateway can degrade so a submit neither completes nor hands back a
@@ -1527,8 +1527,16 @@ async function startJob(req, res) {
// opting in can only ever help, never break, a generation.
let directedPrompt = prompt;
if (body?.director === true) {
- const directed = await directPrompt(originFromReq(req), MESH_DIRECTOR, prompt).catch(() => null);
- if (directed) directedPrompt = directed;
+ // Known brand marks resolve deterministically before the LLM gets a
+ // say: no model reliably knows a niche mark's geometry, and the
+ // lexicon spec is already a tight single-subject description.
+ const knownMark = resolveLogoPrompt(prompt);
+ if (knownMark) {
+ directedPrompt = knownMark.prompt;
+ } else {
+ const directed = await directPrompt(MESH_DIRECTOR, prompt).catch(() => null);
+ if (directed) directedPrompt = directed;
+ }
}
const synthesized = await textToImage(directedPrompt, {
aspectRatio: aspect,
diff --git a/data/changelog.json b/data/changelog.json
index cdc00db70..91c4ea78a 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,16 @@
{
"$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-14",
+ "title": "Short prompts now generate what you actually meant",
+ "summary": "A terse prompt like a two-word meme reference used to go straight to the image model and come back as something unrecognizable. The art-director step that expands your idea into a precise single-object spec (shape, materials, framing) was silently failing on every ChatGPT, MCP, and API generation; it now runs on every one of them. On top of that, well-known logos and brand marks resolve to their real geometry deterministically, so asking for a famous mark gives you the actual shape instead of a garbled badge.",
+ "tags": [
+ "fix",
+ "improvement"
+ ],
+ "link": "/studio"
+ },
{
"date": "2026-07-14",
"title": "The three.ws 3D Studio is live in ChatGPT",
diff --git a/docs/ALL.md b/docs/ALL.md
index 41e284d64..27bf8b9ba 100644
--- a/docs/ALL.md
+++ b/docs/ALL.md
@@ -1,7 +1,7 @@
<!-- GENERATED by scripts/combine-docs.mjs — do not edit by hand. Edit the source files under docs/ and re-run. -->
# three.ws — Combined Documentation
-> Single-file snapshot of every document under [`docs/`](.). Generated 2026-07-14 from **292 files** (~4516 KB).
+> Single-file snapshot of every document under [`docs/`](.). Generated 2026-07-14 from **293 files** (~4527 KB).
> The individual source files remain the canonical, editable copies — this file is a read-only aggregate.
## Table of contents
@@ -120,37 +120,38 @@
- [sdk.md](#sec-193)
- [security.md](#sec-194)
- [share-and-embed.md](#sec-195)
-- [skills.md](#sec-196)
-- [smart-contracts.md](#sec-197)
-- [solana-pumpfun.md](#sec-198)
-- [solana-reputation.md](#sec-199)
-- [solana.md](#sec-200)
-- [spatial-mcp.md](#sec-201)
-- [start-here.md](#sec-203)
-- [syndication.md](#sec-204)
-- [token-gated-3d-embeds.md](#sec-205)
-- [trader-card.md](#sec-206)
-- [trading-arenas.md](#sec-207)
-- [trading-copilot.md](#sec-208)
-- [trading-experiment.md](#sec-209)
-- [trading-surfaces.md](#sec-210)
-- [troubleshooting.md](#sec-211)
-- [trust-primitives.md](#sec-212)
-- [ui-juice.md](#sec-261)
-- [validation.md](#sec-274)
-- [vanity.md](#sec-275)
-- [viewer.md](#sec-276)
-- [web-component.md](#sec-277)
-- [widget-api.md](#sec-278)
-- [widget-studio.md](#sec-279)
-- [widgets.md](#sec-280)
-- [x402-buyer.md](#sec-281)
-- [x402-dev-tools.md](#sec-282)
-- [x402-distribution.md](#sec-283)
-- [x402-endpoints.md](#sec-284)
-- [x402-revenue.md](#sec-285)
-- [x402-ring-economy.md](#sec-286)
-- [x402.md](#sec-287)
+- [sketchfab.md](#sec-196)
+- [skills.md](#sec-197)
+- [smart-contracts.md](#sec-198)
+- [solana-pumpfun.md](#sec-199)
+- [solana-reputation.md](#sec-200)
+- [solana.md](#sec-201)
+- [spatial-mcp.md](#sec-202)
+- [start-here.md](#sec-204)
+- [syndication.md](#sec-205)
+- [token-gated-3d-embeds.md](#sec-206)
+- [trader-card.md](#sec-207)
+- [trading-arenas.md](#sec-208)
+- [trading-copilot.md](#sec-209)
+- [trading-experiment.md](#sec-210)
+- [trading-surfaces.md](#sec-211)
+- [troubleshooting.md](#sec-212)
+- [trust-primitives.md](#sec-213)
+- [ui-juice.md](#sec-262)
+- [validation.md](#sec-275)
+- [vanity.md](#sec-276)
+- [viewer.md](#sec-277)
+- [web-component.md](#sec-278)
+- [widget-api.md](#sec-279)
+- [widget-studio.md](#sec-280)
+- [widgets.md](#sec-281)
+- [x402-buyer.md](#sec-282)
+- [x402-dev-tools.md](#sec-283)
+- [x402-distribution.md](#sec-284)
+- [x402-endpoints.md](#sec-285)
+- [x402-revenue.md](#sec-286)
+- [x402-ring-economy.md](#sec-287)
+- [x402.md](#sec-288)
### agent-abilities
@@ -261,81 +262,81 @@
### specs
-- [specs/agent-trading.md](#sec-202)
+- [specs/agent-trading.md](#sec-203)
### tutorials
-- [tutorials/agent-personality.md](#sec-213)
-- [tutorials/agent-reputation.md](#sec-214)
-- [tutorials/animate-your-avatar.md](#sec-215)
-- [tutorials/build-a-scene.md](#sec-216)
-- [tutorials/claim-threews-name.md](#sec-217)
-- [tutorials/connect-ai-brain.md](#sec-218)
-- [tutorials/create-and-edit-memory.md](#sec-219)
-- [tutorials/custom-skill.md](#sec-220)
-- [tutorials/customize-appearance.md](#sec-221)
-- [tutorials/deploy-to-vercel-custom-domain.md](#sec-222)
-- [tutorials/embed-in-30-seconds.md](#sec-223)
-- [tutorials/embed-on-website.md](#sec-224)
-- [tutorials/emotion-from-data.md](#sec-225)
-- [tutorials/first-agent.md](#sec-226)
-- [tutorials/generate-3d-api.md](#sec-227)
-- [tutorials/getting-started.md](#sec-228)
-- [tutorials/greeting-and-first-speech.md](#sec-229)
-- [tutorials/image-to-3d.md](#sec-230)
-- [tutorials/import-avatar-url.md](#sec-231)
-- [tutorials/js-api-events.md](#sec-232)
-- [tutorials/mcp-server-for-your-agent.md](#sec-233)
-- [tutorials/mine-vanity-address.md](#sec-234)
-- [tutorials/mint-pumpfun-token.md](#sec-235)
-- [tutorials/multi-agent-coordination.md](#sec-236)
-- [tutorials/nvidia-3d-free.md](#sec-237)
-- [tutorials/nvidia-nim-self-host.md](#sec-238)
-- [tutorials/paid-x402-endpoint.md](#sec-239)
-- [tutorials/pay-for-x402-service.md](#sec-240)
-- [tutorials/personal-ai-site.md](#sec-241)
-- [tutorials/place-agent-irl.md](#sec-242)
-- [tutorials/prompts-for-3d.md](#sec-243)
-- [tutorials/register-onchain.md](#sec-244)
-- [tutorials/self-host-agent-backend.md](#sec-245)
-- [tutorials/selfie-to-avatar.md](#sec-246)
-- [tutorials/share-your-agent.md](#sec-247)
-- [tutorials/shopify-store-guide-advanced.md](#sec-248)
-- [tutorials/shopify-store-guide.md](#sec-249)
-- [tutorials/skill-with-database-auth.md](#sec-250)
-- [tutorials/solana-agent-reputation.md](#sec-251)
-- [tutorials/sperax-tour.md](#sec-252)
-- [tutorials/swap-avatar-in-studio.md](#sec-253)
-- [tutorials/text-to-3d.md](#sec-254)
-- [tutorials/trigger-from-page-events.md](#sec-255)
-- [tutorials/upload-custom-glb.md](#sec-256)
-- [tutorials/view-in-ar.md](#sec-257)
-- [tutorials/voice-and-lipsync.md](#sec-258)
-- [tutorials/walk-companion.md](#sec-259)
-- [tutorials/web-component-end-to-end.md](#sec-260)
+- [tutorials/agent-personality.md](#sec-214)
+- [tutorials/agent-reputation.md](#sec-215)
+- [tutorials/animate-your-avatar.md](#sec-216)
+- [tutorials/build-a-scene.md](#sec-217)
+- [tutorials/claim-threews-name.md](#sec-218)
+- [tutorials/connect-ai-brain.md](#sec-219)
+- [tutorials/create-and-edit-memory.md](#sec-220)
+- [tutorials/custom-skill.md](#sec-221)
+- [tutorials/customize-appearance.md](#sec-222)
+- [tutorials/deploy-to-vercel-custom-domain.md](#sec-223)
+- [tutorials/embed-in-30-seconds.md](#sec-224)
+- [tutorials/embed-on-website.md](#sec-225)
+- [tutorials/emotion-from-data.md](#sec-226)
+- [tutorials/first-agent.md](#sec-227)
+- [tutorials/generate-3d-api.md](#sec-228)
+- [tutorials/getting-started.md](#sec-229)
+- [tutorials/greeting-and-first-speech.md](#sec-230)
+- [tutorials/image-to-3d.md](#sec-231)
+- [tutorials/import-avatar-url.md](#sec-232)
+- [tutorials/js-api-events.md](#sec-233)
+- [tutorials/mcp-server-for-your-agent.md](#sec-234)
+- [tutorials/mine-vanity-address.md](#sec-235)
+- [tutorials/mint-pumpfun-token.md](#sec-236)
+- [tutorials/multi-agent-coordination.md](#sec-237)
+- [tutorials/nvidia-3d-free.md](#sec-238)
+- [tutorials/nvidia-nim-self-host.md](#sec-239)
+- [tutorials/paid-x402-endpoint.md](#sec-240)
+- [tutorials/pay-for-x402-service.md](#sec-241)
+- [tutorials/personal-ai-site.md](#sec-242)
+- [tutorials/place-agent-irl.md](#sec-243)
+- [tutorials/prompts-for-3d.md](#sec-244)
+- [tutorials/register-onchain.md](#sec-245)
+- [tutorials/self-host-agent-backend.md](#sec-246)
+- [tutorials/selfie-to-avatar.md](#sec-247)
+- [tutorials/share-your-agent.md](#sec-248)
+- [tutorials/shopify-store-guide-advanced.md](#sec-249)
+- [tutorials/shopify-store-guide.md](#sec-250)
+- [tutorials/skill-with-database-auth.md](#sec-251)
+- [tutorials/solana-agent-reputation.md](#sec-252)
+- [tutorials/sperax-tour.md](#sec-253)
+- [tutorials/swap-avatar-in-studio.md](#sec-254)
+- [tutorials/text-to-3d.md](#sec-255)
+- [tutorials/trigger-from-page-events.md](#sec-256)
+- [tutorials/upload-custom-glb.md](#sec-257)
+- [tutorials/view-in-ar.md](#sec-258)
+- [tutorials/voice-and-lipsync.md](#sec-259)
+- [tutorials/walk-companion.md](#sec-260)
+- [tutorials/web-component-end-to-end.md](#sec-261)
### ux-flows
-- [ux-flows/01-onboarding-creation.md](#sec-262)
-- [ux-flows/02-forge-text-to-3d.md](#sec-263)
-- [ux-flows/03-3d-editing-viewer.md](#sec-264)
-- [ux-flows/04-embed-widget-studio.md](#sec-265)
-- [ux-flows/05-discovery-social.md](#sec-266)
-- [ux-flows/06-marketplace-skills.md](#sec-267)
-- [ux-flows/07-crypto-trading-analytics.md](#sec-268)
-- [ux-flows/08-coin-launch-wallets.md](#sec-269)
-- [ux-flows/09-x402-agent-commerce.md](#sec-270)
-- [ux-flows/10-chat-brain-labs.md](#sec-271)
-- [ux-flows/11-account-dashboard.md](#sec-272)
-- [ux-flows/12-home-and-content.md](#sec-273)
+- [ux-flows/01-onboarding-creation.md](#sec-263)
+- [ux-flows/02-forge-text-to-3d.md](#sec-264)
+- [ux-flows/03-3d-editing-viewer.md](#sec-265)
+- [ux-flows/04-embed-widget-studio.md](#sec-266)
+- [ux-flows/05-discovery-social.md](#sec-267)
+- [ux-flows/06-marketplace-skills.md](#sec-268)
+- [ux-flows/07-crypto-trading-analytics.md](#sec-269)
+- [ux-flows/08-coin-launch-wallets.md](#sec-270)
+- [ux-flows/09-x402-agent-commerce.md](#sec-271)
+- [ux-flows/10-chat-brain-labs.md](#sec-272)
+- [ux-flows/11-account-dashboard.md](#sec-273)
+- [ux-flows/12-home-and-content.md](#sec-274)
### zauth
-- [zauth/database.md](#sec-288)
-- [zauth/index.md](#sec-289)
-- [zauth/provider-hub.md](#sec-290)
-- [zauth/reposcan.md](#sec-291)
-- [zauth/vector.md](#sec-292)
+- [zauth/database.md](#sec-289)
+- [zauth/index.md](#sec-290)
+- [zauth/provider-hub.md](#sec-291)
+- [zauth/reposcan.md](#sec-292)
+- [zauth/vector.md](#sec-293)
---
@@ -547,6 +548,16 @@ The `glbUrl` is a real, durable GLB — open `viewerUrl` in a browser to inspect
or load `model.glb` in any glTF-capable engine (three.js, Babylon, Unity, Godot,
Blender).
+`viewerUrl` (`https://three.ws/viewer?src=<https GLB url>&title=<label>`) is more
+than a preview. Its "Do more with this model" panel funnels the model into the
+rest of the platform: Pose Studio (`/pose?src=`, shown when the GLB carries a
+skeleton), material restyling (`/restyle?url=`), Scene Studio (`/scene?model=`),
+Parts Studio (`/compose?glb=`), AR placement (`/ar?src=`), a pump.fun coin
+launch pre-filled with a rendered snapshot of the model, and a copyable embed
+iframe. The viewer page itself is embeddable on any site: it is served with
+`frame-ancestors *`, so an `<iframe src="https://three.ws/viewer?src=...">` works
+anywhere.
+
### Upgrade path
| Need | Endpoint |
@@ -15940,12 +15951,14 @@ Server-Sent Events stream from a unified multi-provider LLM gateway. Used by the
| `claude-opus-4-7` | Anthropic | flagship |
| `claude-sonnet-4-6` | Anthropic | balanced |
| `claude-haiku-4-5` | Anthropic | fast |
-| `gpt-4o` | OpenAI | flagship |
-| `gpt-4o-mini` | OpenAI | fast |
+| `gpt-5.6-sol` | OpenAI | flagship |
+| `gpt-5.6-terra` | OpenAI | balanced |
+| `gpt-5.6-luna` | OpenAI | fast |
+| `o3` / `o3-pro` | OpenAI | reasoning |
| `qwen-*` | Qwen / Alibaba | varies |
| `openrouter:*` | OpenRouter (any) | varies |
-Call `GET /api/brain/chat` for the live list of providers actually available on the current deployment (depends on which provider keys are configured).
+Legacy ids `gpt-4o`, `gpt-4o-mini`, and `o3-mini` are accepted and alias forward to `gpt-5.6-sol`, `gpt-5.6-luna`, and `o3`. Call `GET /api/brain/chat` for the live list of providers actually available on the current deployment (depends on which provider keys are configured).
**Response (SSE)**
@@ -16084,6 +16097,56 @@ curl -s -X POST https://three.ws/api/v1/ai/text-to-3d \
| `503` | `not_configured` | The NVIDIA NIM lane isn't configured on this deployment (`NVIDIA_API_KEY`) |
| `502`/`504` | `lane_error` / `lane_timeout` | The generation lane failed or timed out — retry |
+### Text→3D (ChatGPT Actions surface)
+
+```
+POST /api/3d/studio
+GET /api/3d/studio?job=<id>
+```
+
+Public, CORS-open, no auth. The REST contract behind the **"three.ws 3D Studio"**
+custom GPT (its OpenAPI Actions schema lives at
+`prompts/store-submissions/_generated/openai-actions.yaml`). It is a thin shaper
+over the same free NVIDIA NIM TRELLIS lane as `/api/v1/ai/text-to-3d` (same
+per-IP quota buckets, no extra capacity), with two store-specific rules:
+responses carry only model URLs and job state (no upsell block, no pricing
+paths, no internal identifiers), and every prompt passes an age-13+
+content-safety gate before any GPU work starts.
+
+**Request body**
+
+```json
+{ "prompt": "a small ceramic robot figurine" }
+```
+
+**Response, finished inline**
+
+```json
+{ "status": "done", "glbUrl": "https://cdn.three.ws/forge/anon/<id>.glb", "viewerUrl": "https://three.ws/viewer?src=…", "format": "glb" }
+```
+
+**Response, queued** (ChatGPT Actions time out at ~45s; the lane bounds its
+synchronous hold to 30s, so a slow job always returns `pending` plus a poll
+handle before the Action deadline)
+
+```json
+{ "status": "pending", "job": "f1.<signed-token>", "poll": "/api/3d/studio?job=f1.<signed-token>", "format": "glb" }
+```
+
+Poll `GET /api/3d/studio?job=<id>` until `status` is `"done"` (same shape as
+above) or `"error"` (`{ "status": "error", "job", "error" }`; generation is
+free, so a failed job costs nothing to retry).
+
+**Errors**
+
+| Status | Code | Meaning |
+| ------ | -------------------------------- | -------------------------------------------------------------------- |
+| `400` | `invalid_prompt` / `bad_request` | `prompt` missing, outside 3-1000 chars, or malformed JSON |
+| `400` | `prompt_rejected` | The age-13+ safety gate refused the prompt; `message` says why |
+| `429` | `rate_limited` | Free lane saturated; retry after `retry_after` seconds |
+| `502` | `generation_failed` | The lane could not start the job; retry is free |
+| `503` | `not_configured` / `lane_timeout`| Lane unavailable on this deployment, or slow to accept; retry later |
+
---
## Material Studio API
@@ -18593,6 +18656,8 @@ Place any three.ws avatar or Forge model into the real world through the camera
Every avatar page has an **AR** tab. Every Forge model has a **View in AR** button in its result toolbar. On mobile, tapping **Place in your space** triggers native AR. On desktop, the same screen shows a **QR code** — scan it with your phone and the AR session opens in one tap.
+The fastest way to try the whole loop is **[AR Forge](/ar)** (`/ar`): type a prompt, a real GLB is generated on the free lane, and the result opens straight into AR on a phone (or shows the QR handoff on desktop). It also accepts a deep link, `/ar?src=<glb-url>&title=<name>`, to reopen any shared model. Under the hood it uses the same `POST /api/forge` lane and the `GET /api/ar?src=` launcher described below.
+
---
## AR methods — which one fires
@@ -30860,7 +30925,7 @@ Three modes, all configurable per agent:
| **Self-hosted proxy** | You want to manage cost or use a private model | Set `key-proxy="/api/llm"` to point at your own serverless function that injects keys before forwarding to the provider. Keys never reach the client. |
| **Direct (advanced)** | Local-only experiments | The runtime can call providers directly if you pass an API key explicitly. Don't ship this to a public page. |
-The brain proxy at [`/api/brain/chat`](./api-reference.md) supports Anthropic, OpenAI, Qwen, and OpenRouter — so the brain attribute can be `claude-opus-4-7`, `claude-sonnet-4-6`, `claude-haiku-4-5`, `gpt-4o`, `gpt-4o-mini`, and others.
+The brain proxy at [`/api/brain/chat`](./api-reference.md) supports Anthropic, OpenAI, Qwen, and OpenRouter — so the brain attribute can be `claude-opus-4-7`, `claude-sonnet-4-6`, `claude-haiku-4-5`, `gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna`, and others.
---
@@ -32021,8 +32086,8 @@ Everything below is live on [/irl](/irl) and exposed by the [`@three-ws/irl`](ht
Open /irl on your phone, pick one of your agents (or try it anonymously), and drop a pin:
+- **Place in AR** is the flagship path on devices with a real AR surface. On Chrome for Android (ARCore) a WebXR hit-test reticle finds the floor; tap to anchor the agent to the detected surface, then **pinch with two fingers to resize it** — from a desk figurine (25%) to a statue (400%). The placement and the chosen size both save to the pin, so everyone nearby sees the agent exactly where and how big you left it. On iOS the same button opens the agent in ARKit Quick Look. This button leads the dock whenever the device supports it.
- **Pin here** places it at your current GPS spot using the camera and gyroscope. Works on every supported phone, including iOS Safari.
-- **Place on floor** uses a WebXR hit-test to anchor the agent to a real detected surface (Chrome on Android with ARCore).
- **Place on map** puts an agent somewhere you are not currently standing.
Anonymous pins work immediately from a device token and expire after 7 days. Signed-in pins are permanent until you remove them. The full walkthrough is in [Place a 3D agent in your real environment](/docs/tutorials/place-agent-irl).
@@ -33948,7 +34013,11 @@ answers every request synchronously over `POST`. `OPTIONS` is handled for CORS.
Add the connector with the URL above and **No authentication**. Each generation
tool renders its result inline in an interactive 3D viewer widget
-(`ui://widget/three-studio-model.html`).
+(`ui://widget/three-studio-model.html`); the persona tools render a living agent
+body in their own widget (`ui://widget/three-studio-persona.html`). Both widgets
+declare an `openai/widgetCSP` whose allowlist includes the GLB storage origin,
+so models load inside real ChatGPT (which enforces the CSP), not just in
+permissive test harnesses.
### Any MCP client
@@ -33958,6 +34027,15 @@ curl -s https://three.ws/api/mcp-studio \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```
+### ChatGPT custom GPT (Actions)
+
+The same free lane also ships as a REST Actions surface for the **"three.ws 3D
+Studio"** custom GPT: `POST /api/3d/studio` submits a prompt and
+`GET /api/3d/studio?job=<id>` polls it, with an age-13+ safety gate and
+store-clean responses (model URLs and job state only). Full contract in the
+[API reference](./api-reference.md). Use the MCP connector above when you want
+inline 3D widgets; the custom GPT covers plans without connector support.
+
## Tools
All six generation tools are free and run operator-funded on the platform's own
@@ -34043,8 +34121,14 @@ or payments.
Annotations: `create_agent_persona` and `persona_say` are writes
(`readOnlyHint:false`); `get_agent_persona` is a pure read (`readOnlyHint:true`).
-**How it renders.** Each persona tool returns an inline `text/html` resource that
-frames the hosted embodiment page — `https://three.ws/embodiment/embed` — with the
+**How it renders.** In ChatGPT (Apps SDK), each persona tool points its tool-level
+`_meta["openai/outputTemplate"]` at the registered
+`ui://widget/three-studio-persona.html` widget, which reads the tool's
+`structuredContent` and mounts the hosted embodiment page (a result-level template
+on an inline artifact is ignored by the Apps SDK, so the tool-level link is what
+makes the body appear). In every other MCP host the tool result carries an inline
+`text/html` resource that frames the same hosted page,
+`https://three.ws/embodiment/embed`, with the
persona id and the turn's speak/emotion payload as query params. That page mounts
`EmbodimentStage` (Three.js), which rides the platform's universal
canonicalize/retarget pipeline so the baked idle + gesture clip library drives any
@@ -44186,6 +44270,95 @@ To customize the preview image, change the agent's thumbnail in the editor.
<a id="sec-196"></a>
+> **Source:** `docs/sketchfab.md` · [↑ table of contents](#table-of-contents)
+
+# Sketchfab showcase
+
+The best community-made forge models are published to the official three.ws
+account on [Sketchfab](https://sketchfab.com), the largest public 3D model
+site. Each model page there links back to the creation on three.ws, so the
+showcase doubles as a discovery channel: someone browsing Sketchfab finds a
+model, follows the link, and can remix it or forge their own.
+
+This is a curated feed, not a mirror. Only models the community has already
+validated get pushed, a few per week.
+
+## What gets picked
+
+Selection runs three times a week (Mon/Wed/Fri) and takes up to
+`SKETCHFAB_UPLOADS_PER_RUN` models per run (default 2), in this order:
+
+1. **Weekly Forge-Off winners.** The creation crowned by community vote each
+ week on the [forge board](/forge) is the strongest curation signal on the
+ platform and always goes first.
+2. **Top-voted board models.** Anything with at least one community upvote,
+ highest votes first.
+3. **Creator-validated models.** Creations whose maker explicitly accepted
+ the result or downloaded the GLB, newest first. This tier keeps the
+ showcase alive while board voting ramps up. Raw unreviewed output is
+ never pushed.
+
+A model is skipped when its GLB exceeds the Sketchfab upload cap (45 MB
+guard), when it was already uploaded, or when it failed three times.
+
+**Brand safety.** The official account never publishes firearms or explicit
+content, regardless of what the forge itself allows. A conservative
+word-boundary denylist filters the selection query and re-checks before
+upload, and the platform's NemoGuard content classifier runs as a second
+layer. Blocked creations are parked in the ledger (`blocked`) and never
+re-picked. Refinement children are also excluded from the creator-validated
+tier, since their prompts are instructions, not titles.
+
+## What an upload looks like
+
+Every published model carries:
+
+- **The generation prompt** at the top of the description, in quotes.
+- **AI disclosure**: the `ai-generated` tag plus a plain statement that the
+ model was AI-generated on the three.ws Forge. Sketchfab has no dedicated
+ AI-content field, so tag + statement is the correct marking.
+- **Backlinks with UTM parameters** (`utm_source=sketchfab`,
+ `utm_medium=referral`, `utm_campaign=showcase`): one to the creation's
+ [share page](/docs/share-and-embed) (`/forge/share/<id>`), one to
+ [/forge](/forge). The UTM tags make Sketchfab referrals measurable in
+ analytics, which decides whether the cadence goes up or down.
+- **Tags**: `ai-generated`, `generative-ai`, `text-to-3d`, `threews`, plus the
+ model's category.
+
+Models are published viewable and inspectable but not downloadable: creations
+belong to their creators, and the showcase does not relicense them.
+
+## How it runs
+
+`GET /api/cron/sketchfab-showcase` (Cloud Scheduler, `Bearer $CRON_SECRET`):
+
+1. Refreshes the async processing status of recent uploads
+ (`uploaded` becomes `live` when Sketchfab finishes processing).
+2. Selects candidates and claims each in the `sketchfab_uploads` ledger
+ before any network call, so a retried or concurrent run can never
+ double-upload.
+3. Downloads the stored GLB and posts it to the
+ [Sketchfab Data API v3](https://docs.sketchfab.com/data-api/v3/index.html)
+ (`POST /v3/models`, multipart).
+
+`?dry_run=1` returns the current selection without uploading anything.
+
+## Configuration
+
+| Env var | Meaning |
+|---|---|
+| `SKETCHFAB_API_TOKEN` | Data API token of the official account (Sketchfab settings, Password & API). Unset: the cron is dormant and skips cleanly. |
+| `SKETCHFAB_UPLOADS_PER_RUN` | Models per run, default 2, clamped 1-5. At the Mon/Wed/Fri schedule the default publishes up to 6 models a week. |
+
+State lives in the `sketchfab_uploads` table (one row per creation:
+`pending`, `uploaded`, `live`, or `failed` with the error recorded). Code:
+[`api/cron/sketchfab-showcase.js`](https://github.com/nirholas/three.ws/blob/main/api/cron/sketchfab-showcase.js)
+and [`api/_lib/sketchfab.js`](https://github.com/nirholas/three.ws/blob/main/api/_lib/sketchfab.js).
+
+---
+
+<a id="sec-197"></a>
+
> **Source:** `docs/skills.md` · [↑ table of contents](#table-of-contents)
# Skills System
@@ -44896,7 +45069,7 @@ For IPFS publishing, the CID of the directory becomes the stable URI. Agents can
---
-<a id="sec-197"></a>
+<a id="sec-198"></a>
> **Source:** `docs/smart-contracts.md` · [↑ table of contents](#table-of-contents)
@@ -45489,7 +45662,7 @@ On Base at typical gas prices (~0.001 gwei base fee), an agent registration runs
---
-<a id="sec-198"></a>
+<a id="sec-199"></a>
> **Source:** `docs/solana-pumpfun.md` · [↑ table of contents](#table-of-contents)
@@ -45663,7 +45836,7 @@ The MCP client and cron crawler are unit-tested with mocked `fetch` and `sql`. E
---
-<a id="sec-199"></a>
+<a id="sec-200"></a>
> **Source:** `docs/solana-reputation.md` · [↑ table of contents](#table-of-contents)
@@ -45859,7 +46032,7 @@ The shapes differ; the purpose is identical — let an agent decide, before it p
---
-<a id="sec-200"></a>
+<a id="sec-201"></a>
> **Source:** `docs/solana.md` · [↑ table of contents](#table-of-contents)
@@ -46083,7 +46256,7 @@ A full ERC-8004-equivalent on Solana would mean writing three Anchor programs (I
---
-<a id="sec-201"></a>
+<a id="sec-202"></a>
> **Source:** `docs/spatial-mcp.md` · [↑ table of contents](#table-of-contents)
@@ -46193,7 +46366,7 @@ Free 3D Studio (`structuredContent.spatial`): `forge_free`, `text_to_avatar`, `m
---
-<a id="sec-202"></a>
+<a id="sec-203"></a>
> **Source:** `docs/specs/agent-trading.md` · [↑ table of contents](#table-of-contents)
@@ -46280,7 +46453,7 @@ Real routes (no mocks), server-side guards with tests (including the $THREE-sell
---
-<a id="sec-203"></a>
+<a id="sec-204"></a>
> **Source:** `docs/start-here.md` · [↑ table of contents](#table-of-contents)
@@ -46344,6 +46517,8 @@ If you're here to create and share agents rather than write code, follow this pa
3. **[Share & embed](./share-and-embed.md)** — get the embed snippet and put your agent anywhere
4. **[Do I need crypto?](./do-i-need-crypto.md)** — honest answers to the wallet and payment questions
+Make something the community upvotes and it can reach beyond three.ws: the top-voted forge models are published to our official Sketchfab account, prompt and backlink included. See [Sketchfab showcase](./sketchfab.md).
+
---
## Ready to build?
@@ -46378,7 +46553,7 @@ If you're here to create and share agents rather than write code, follow this pa
---
-<a id="sec-204"></a>
+<a id="sec-205"></a>
> **Source:** `docs/syndication.md` · [↑ table of contents](#table-of-contents)
@@ -46500,7 +46675,7 @@ updated feed.
---
-<a id="sec-205"></a>
+<a id="sec-206"></a>
> **Source:** `docs/token-gated-3d-embeds.md` · [↑ table of contents](#table-of-contents)
@@ -46618,7 +46793,7 @@ Every check that matters happens on the server:
---
-<a id="sec-206"></a>
+<a id="sec-207"></a>
> **Source:** `docs/trader-card.md` · [↑ table of contents](#table-of-contents)
@@ -46676,7 +46851,7 @@ Returns the identity summary, KPI aggregates, and the per-coin ledger — `known
---
-<a id="sec-207"></a>
+<a id="sec-208"></a>
> **Source:** `docs/trading-arenas.md` · [↑ table of contents](#table-of-contents)
@@ -46745,7 +46920,7 @@ Prove yourself solo (the [trading surfaces](trading-surfaces.md) → the [leader
---
-<a id="sec-208"></a>
+<a id="sec-209"></a>
> **Source:** `docs/trading-copilot.md` · [↑ table of contents](#table-of-contents)
@@ -46884,7 +47059,7 @@ plumbing — and never suggests, shills, or names another token on its own initi
---
-<a id="sec-209"></a>
+<a id="sec-210"></a>
> **Source:** `docs/trading-experiment.md` · [↑ table of contents](#table-of-contents)
@@ -47040,7 +47215,7 @@ much — and tune the next run. That is the whole point of the experiment.
---
-<a id="sec-210"></a>
+<a id="sec-211"></a>
> **Source:** `docs/trading-surfaces.md` · [↑ table of contents](#table-of-contents)
@@ -47185,7 +47360,7 @@ Agents wanting the same intel over MCP: see [docs/mcp.md](mcp.md) (`@three-ws/in
---
-<a id="sec-211"></a>
+<a id="sec-212"></a>
> **Source:** `docs/troubleshooting.md` · [↑ table of contents](#table-of-contents)
@@ -47841,7 +48016,7 @@ This is a known open issue. The `IdleAnimation` class is implemented in `src/idl
---
-<a id="sec-212"></a>
+<a id="sec-213"></a>
> **Source:** `docs/trust-primitives.md` · [↑ table of contents](#table-of-contents)
@@ -48081,7 +48256,7 @@ See also: [x402 paid endpoints](./x402.md) · [Agent Bouncer](./api-reference.md
---
-<a id="sec-213"></a>
+<a id="sec-214"></a>
> **Source:** `docs/tutorials/agent-personality.md` · [↑ table of contents](#table-of-contents)
@@ -48534,7 +48709,7 @@ The system prompt is the cheapest, highest-leverage thing you can change about a
---
-<a id="sec-214"></a>
+<a id="sec-215"></a>
> **Source:** `docs/tutorials/agent-reputation.md` · [↑ table of contents](#table-of-contents)
@@ -48838,7 +49013,7 @@ A read costs nothing and asks no one's permission. That's the property that lets
---
-<a id="sec-215"></a>
+<a id="sec-216"></a>
> **Source:** `docs/tutorials/animate-your-avatar.md` · [↑ table of contents](#table-of-contents)
@@ -49063,7 +49238,7 @@ Primary call to action: open **[/pose](/pose)**, load an avatar, and apply your
---
-<a id="sec-216"></a>
+<a id="sec-217"></a>
> **Source:** `docs/tutorials/build-a-scene.md` · [↑ table of contents](#table-of-contents)
@@ -49282,7 +49457,7 @@ The leverage of [Scene Studio](/scene) is that it's a *real* editor producing a
---
-<a id="sec-217"></a>
+<a id="sec-218"></a>
> **Source:** `docs/tutorials/claim-threews-name.md` · [↑ table of contents](#table-of-contents)
@@ -49590,7 +49765,7 @@ See also:
---
-<a id="sec-218"></a>
+<a id="sec-219"></a>
> **Source:** `docs/tutorials/connect-ai-brain.md` · [↑ table of contents](#table-of-contents)
@@ -49598,11 +49773,11 @@ See also:
The agent's body is the avatar. The agent's voice is the TTS. The agent's *brain* is whatever LLM is generating its replies. By default the platform routes through a managed Claude endpoint, which works out of the box but bills against your free tier. The moment you want real production traffic, full control over which model runs, or your own usage observability, you bring your own API key.
-This tutorial covers the whole brain layer. Where the LLM call actually happens (and why your key never ends up in HTML), how to attach your Anthropic or OpenAI key in My Agents, choosing between Claude Sonnet 4.6, Claude Opus 4.7, GPT-4o, GPT-5, and the smaller models, the latency and cost tradeoffs, configuring streaming and system prompts, tool-use support per model, and where to watch your token spend. The embed snippet doesn't change when you switch models — every config is on the agent record.
+This tutorial covers the whole brain layer. Where the LLM call actually happens (and why your key never ends up in HTML), how to attach your Anthropic or OpenAI key in My Agents, choosing between Claude Sonnet 4.6, Claude Opus 4.7, the GPT-5.6 family, and the smaller models, the latency and cost tradeoffs, configuring streaming and system prompts, tool-use support per model, and where to watch your token spend. The embed snippet doesn't change when you switch models — every config is on the agent record.
**What you'll build:**
- An agent powered by your own Anthropic key, with model selection
-- An agent powered by your own OpenAI key, switchable to GPT-5
+- An agent powered by your own OpenAI key, switchable across the GPT-5.6 family
- A working understanding of which model fits which use case (cost, latency, capability)
- A streaming-enabled brain so replies feel responsive
- An observability dashboard you can use to monitor spend per agent
@@ -49627,7 +49802,7 @@ This matters for three reasons:
- **Keys stay secret.** Even a "view source" attack on your page reveals nothing. The key lives only in the platform's key store.
- **Rate-limit shaping happens once, server-side.** The platform manages backoff and retries for you.
-- **The embed snippet doesn't know which model is running.** You can swap from Claude Sonnet 4.6 to GPT-5 in My Agents and every page that embeds your agent picks up the change on next load. No code edits anywhere.
+- **The embed snippet doesn't know which model is running.** You can swap from Claude Sonnet 4.6 to GPT-5.6 Sol in My Agents and every page that embeds your agent picks up the change on next load. No code edits anywhere.
The corollary: setting `api-key="sk-ant-..."` directly on the `<agent-3d>` tag is supported but discouraged. It exposes your key in DOM. Use it only for local prototypes that never get deployed. Production agents store their key on the platform side.
@@ -49691,23 +49866,36 @@ The current production-ready models, with the tradeoffs that actually matter for
### OpenAI models
-**GPT-4o** (`gpt-4o`) — the comparable peer to Sonnet 4.6.
+**GPT-5.6 Terra** (`gpt-5.6-terra`) is the comparable peer to Sonnet 4.6.
-- **Cost:** $2.50 per million input, $10 per million output. Slightly cheaper than Sonnet.
+- **Cost:** $2.50 per million input, $15 per million output. The same band as Sonnet.
- **Latency:** First token in ~700ms.
-- **Capability:** Strong at multimodal input (vision, audio) and at general chat. Tool use is reliable.
+- **Capability:** Strong at multimodal input and general chat. Tool use is reliable. The right OpenAI default for support, sales, and concierge agents.
+- **Context window:** 1M tokens.
-**GPT-5** (`gpt-5`) — OpenAI's reasoning-grade model, comparable to Opus.
+**GPT-5.6 Sol** (`gpt-5.6-sol`) is the reasoning-grade OpenAI flagship, comparable to Opus.
-- **Cost:** Premium. Comparable to Opus per token.
-- **Latency:** Higher than GPT-4o; first token in ~1.5s, more if reasoning is engaged.
-- **Capability:** Excellent at hard tasks, math, code, complex tool chains. Overkill for casual chat.
+- **Cost:** Premium ($5 per million input, $30 per million output). Comparable to Opus per token.
+- **Latency:** Higher than Terra; first token in ~1.5s, more if reasoning is engaged.
+- **Capability:** Frontier reasoning, coding, and agentic work. Excellent at hard tasks, math, and complex tool chains. Overkill for casual chat.
+- **Context window:** 1M tokens.
-**GPT-4o-mini** (`gpt-4o-mini`) — the budget option.
+**GPT-5.6 Luna** (`gpt-5.6-luna`) is the budget pick of the 5.6 family.
-- **Cost:** Lowest in the OpenAI lineup.
+- **Cost:** $1 per million input, $6 per million output.
- **Latency:** Fast.
-- **Capability:** Roughly comparable to Haiku for short interactions. Less coherent on long conversations.
+- **Capability:** Vision-capable, and roughly comparable to Haiku for short interactions. Less coherent on long conversations.
+- **Context window:** 1M tokens.
+
+**o3** (`o3`) is the reasoning specialist, with `o3-pro` above it.
+
+- **Cost:** Reasoning tokens bill as output, so replies cost more than their visible length suggests.
+- **Latency:** Variable; it thinks before the first token arrives.
+- **Capability:** Deep chain-of-thought for math, logic, and structured planning. Not a general chat pick; reach for it when the agent's job is to reason, not to converse.
+
+The platform also carries the wider OpenAI lineup: GPT-5.5 and GPT-5.5 Pro, the more affordable GPT-5.4 tier (`gpt-5.4`, `gpt-5.4-pro`, `gpt-5.4-mini`, `gpt-5.4-nano`, the cheapest current GPT), and GPT-5.3 Codex (`gpt-5.3-codex`) for code-centric agents. The three 5.6 models above cover almost every agent use case; the rest are there when you want a specific cost or capability point.
+
+Legacy ids keep working: `gpt-4o`, `gpt-4o-mini`, and `o3-mini` are accepted as aliases and resolve to `gpt-5.6-sol`, `gpt-5.6-luna`, and `o3` (the GPT-4o family was deprecated upstream in July 2026), so existing agents upgrade in place with no config change.
### Picking a model
@@ -49715,15 +49903,15 @@ A practical rule of thumb:
| Use case | Recommended model |
|---|---|
-| Support / FAQ agent for a SaaS | Sonnet 4.6 or GPT-4o |
+| Support / FAQ agent for a SaaS | Sonnet 4.6 or GPT-5.6 Terra |
| Personal-website-me agent | Sonnet 4.6 |
| Onboarding co-pilot, sales bot | Sonnet 4.6 |
| Museum tour guide, long-form domain agent | Sonnet 4.6, escalate to Opus only if needed |
-| Legal, medical, financial assistant | Opus 4.7 or GPT-5 |
-| Status-check, wave-and-greet, micro-interaction | Haiku 4.5 or GPT-4o-mini |
-| Multi-step tool chains, code assistance | Opus 4.7 or GPT-5 |
+| Legal, medical, financial assistant | Opus 4.7 or GPT-5.6 Sol |
+| Status-check, wave-and-greet, micro-interaction | Haiku 4.5 or GPT-5.6 Luna |
+| Multi-step tool chains, code assistance | Opus 4.7 or GPT-5.6 Sol |
-Start at Sonnet 4.6 for almost everything. Move to Haiku if latency is the bottleneck. Move to Opus or GPT-5 only when you have a specific quality issue that the smaller model can't fix with prompt iteration.
+Start at Sonnet 4.6 for almost everything. Move to Haiku if latency is the bottleneck. Move to Opus or GPT-5.6 Sol only when you have a specific quality issue that the smaller model can't fix with prompt iteration.
---
@@ -49731,15 +49919,15 @@ Start at Sonnet 4.6 for almost everything. Move to Haiku if latency is the bottl
The system prompt and the model are configured separately. You can swap models without touching the prompt, and vice versa.
-In **Brain → System prompt**, paste your full prompt. The same prompt works across all the models above, with one caveat: smaller models (Haiku, GPT-4o-mini) follow instructions less precisely, so prompts written for them benefit from being shorter and more explicit. A 600-word prompt that Sonnet handles cleanly may overflow Haiku's instruction-following budget.
+In **Brain → System prompt**, paste your full prompt. The same prompt works across all the models above, with one caveat: smaller models (Haiku, GPT-5.6 Luna) follow instructions less precisely, so prompts written for them benefit from being shorter and more explicit. A 600-word prompt that Sonnet handles cleanly may overflow Haiku's instruction-following budget.
-If you're targeting Haiku or GPT-4o-mini specifically, trim:
+If you're targeting Haiku or GPT-5.6 Luna specifically, trim:
- Cut the longer "voice" descriptions to 2-3 traits
- Reduce the rules list to 3-4 hard bans
- Keep fallback responses but cut any explanatory commentary
-For Sonnet, Opus, GPT-4o, and GPT-5, the full prompt template from the [agent personality](/tutorials/agent-personality) tutorial works without modification.
+For Sonnet, Opus, GPT-5.6 Terra, and GPT-5.6 Sol, the full prompt template from the [agent personality](/tutorials/agent-personality) tutorial works without modification.
A few configuration knobs alongside the prompt:
@@ -49792,11 +49980,11 @@ Tool use (the model invoking a function you've defined — a `searchProducts(que
| Claude Opus 4.7 | Excellent. Handles complex multi-tool chains and ambiguous tool selection cleanly. |
| Claude Sonnet 4.6 | Excellent. Indistinguishable from Opus for most tool flows. The default recommendation. |
| Claude Haiku 4.5 | Good for single-tool flows. Struggles with chains that require 3+ sequential tool calls. |
-| GPT-5 | Excellent, similar to Opus. Strong at parallel tool calls. |
-| GPT-4o | Very good. Slightly more prone to mis-formatting tool arguments than Sonnet. |
-| GPT-4o-mini | Functional. Avoid for anything with 2+ tools or non-trivial schemas. |
+| GPT-5.6 Sol | Excellent, similar to Opus. Strong at parallel tool calls. |
+| GPT-5.6 Terra | Very good. Slightly more prone to mis-formatting tool arguments than Sonnet. |
+| GPT-5.6 Luna | Functional. Avoid for anything with 2+ tools or non-trivial schemas. |
-If you're building a skill-heavy agent — one that needs to look up products, check inventory, search documentation, and place orders, all in one conversation — pick Sonnet or GPT-4o at minimum. Haiku and mini are acceptable for single-purpose lookups but get confused on chains.
+If you're building a skill-heavy agent — one that needs to look up products, check inventory, search documentation, and place orders, all in one conversation — pick Sonnet or GPT-5.6 Terra at minimum. Haiku and Luna are acceptable for single-purpose lookups but get confused on chains.
See the [custom skill tutorial](/tutorials/custom-skill) for the full skill-writing workflow.
@@ -49834,13 +50022,13 @@ If you have:
<agent-3d agent-id="YOUR_AGENT_ID" id="agent"></agent-3d>
```
-…on a thousand pages, you can switch the brain from Sonnet to Opus to GPT-5 entirely from the dashboard. No deploy. No code edit. The next page load picks up the new model.
+…on a thousand pages, you can switch the brain from Sonnet to Opus to GPT-5.6 Sol entirely from the dashboard. No deploy. No code edit. The next page load picks up the new model.
This makes A/B testing painless. Common patterns:
- **Cost optimisation pass.** Move a low-stakes agent from Sonnet to Haiku, watch the quality and spend for a week, decide whether to keep the change.
- **Capability spike.** Promote an agent to Opus for a busy week (a launch, a marketing campaign), then dial back down to Sonnet for steady-state.
-- **Provider failover.** If Anthropic has a brief outage, you can switch the agent to GPT-4o in the dashboard and keep traffic moving while you wait. Both keys are stored, both providers are reachable from the same agent record.
+- **Provider failover.** If Anthropic has a brief outage, you can switch the agent to GPT-5.6 Terra in the dashboard and keep traffic moving while you wait. Both keys are stored, both providers are reachable from the same agent record.
The trick to making this work cleanly is to write your system prompt in a model-agnostic style. Prompts that lean hard on Claude-specific quirks ("respond in XML tags") can produce slightly different output on GPT. The prompt template in the [agent personality](/tutorials/agent-personality) tutorial is intentionally portable across providers — use that style and your switch-day surprises are minimal.
@@ -49896,7 +50084,7 @@ The brain layer in full:
- LLM calls happen server-side; your key never leaves the platform's backend
- Keys are stored per-account in My Agents; one key serves all your agents from that provider
-- Sonnet 4.6 is the default; Opus 4.7 and GPT-5 are the reasoning-grade upgrades; Haiku and mini are the latency picks
+- Sonnet 4.6 is the default; Opus 4.7 and GPT-5.6 Sol are the reasoning-grade upgrades; Haiku and GPT-5.6 Luna are the latency picks
- Streaming is on by default and matters more than total latency for perceived speed
- Tool-use quality varies by model — pick Sonnet or larger for skill-heavy agents
- Usage and cost are visible in the dashboard, with alerts available for spend caps
@@ -49913,7 +50101,7 @@ The brain is the part of the agent you'll iterate on most after the system promp
---
-<a id="sec-219"></a>
+<a id="sec-220"></a>
> **Source:** `docs/tutorials/create-and-edit-memory.md` · [↑ table of contents](#table-of-contents)
@@ -50234,7 +50422,7 @@ The leverage is in *enhancement*: the right type, one fact per memory, tags, del
---
-<a id="sec-220"></a>
+<a id="sec-221"></a>
> **Source:** `docs/tutorials/custom-skill.md` · [↑ table of contents](#table-of-contents)
@@ -50747,7 +50935,7 @@ The skill installs via a URI in the agent manifest, runs entirely client-side, a
---
-<a id="sec-221"></a>
+<a id="sec-222"></a>
> **Source:** `docs/tutorials/customize-appearance.md` · [↑ table of contents](#table-of-contents)
@@ -51185,7 +51373,7 @@ Most production embeds use four or five of these together. The combination is wh
---
-<a id="sec-222"></a>
+<a id="sec-223"></a>
> **Source:** `docs/tutorials/deploy-to-vercel-custom-domain.md` · [↑ table of contents](#table-of-contents)
@@ -51702,7 +51890,7 @@ In rough order of likelihood:
---
-<a id="sec-223"></a>
+<a id="sec-224"></a>
> **Source:** `docs/tutorials/embed-in-30-seconds.md` · [↑ table of contents](#table-of-contents)
@@ -51976,7 +52164,7 @@ A working embedded agent is the foundation everything else builds on. From here,
---
-<a id="sec-224"></a>
+<a id="sec-225"></a>
> **Source:** `docs/tutorials/embed-on-website.md` · [↑ table of contents](#table-of-contents)
@@ -52478,7 +52666,7 @@ Squarespace's developer preview and published output can differ. Try adding the
---
-<a id="sec-225"></a>
+<a id="sec-226"></a>
> **Source:** `docs/tutorials/emotion-from-data.md` · [↑ table of contents](#table-of-contents)
@@ -52706,7 +52894,7 @@ function reactIfConfident(clipOrEmoteName, { confident, useExactClip = false } =
---
-<a id="sec-226"></a>
+<a id="sec-227"></a>
> **Source:** `docs/tutorials/first-agent.md` · [↑ table of contents](#table-of-contents)
@@ -53223,7 +53411,7 @@ Now that you have a working agent, here's what to explore next:
---
-<a id="sec-227"></a>
+<a id="sec-228"></a>
> **Source:** `docs/tutorials/generate-3d-api.md` · [↑ table of contents](#table-of-contents)
@@ -53432,7 +53620,7 @@ If you've never made an x402 call, start with [Build a paid x402 endpoint](/tuto
---
-<a id="sec-228"></a>
+<a id="sec-229"></a>
> **Source:** `docs/tutorials/getting-started.md` · [↑ table of contents](#table-of-contents)
@@ -53603,7 +53791,7 @@ Everything is editable forever — swap the body, rewrite the prompt, add capabi
---
-<a id="sec-229"></a>
+<a id="sec-230"></a>
> **Source:** `docs/tutorials/greeting-and-first-speech.md` · [↑ table of contents](#table-of-contents)
@@ -53949,7 +54137,7 @@ A working greeting moves the embed from "decoration" to "interaction", which is
---
-<a id="sec-230"></a>
+<a id="sec-231"></a>
> **Source:** `docs/tutorials/image-to-3d.md` · [↑ table of contents](#table-of-contents)
@@ -54052,7 +54240,7 @@ Everything you generate is kept in **Your creations** at the bottom of the page,
---
-<a id="sec-231"></a>
+<a id="sec-232"></a>
> **Source:** `docs/tutorials/import-avatar-url.md` · [↑ table of contents](#table-of-contents)
@@ -54220,7 +54408,7 @@ The URL path and the file-upload path converge on the same avatar record and the
---
-<a id="sec-232"></a>
+<a id="sec-233"></a>
> **Source:** `docs/tutorials/js-api-events.md` · [↑ table of contents](#table-of-contents)
@@ -54686,7 +54874,7 @@ The `whenReady`, awaited-`ask()`, and try/catch patterns are small but they remo
---
-<a id="sec-233"></a>
+<a id="sec-234"></a>
> **Source:** `docs/tutorials/mcp-server-for-your-agent.md` · [↑ table of contents](#table-of-contents)
@@ -55332,7 +55520,7 @@ Things that look right but bite you:
---
-<a id="sec-234"></a>
+<a id="sec-235"></a>
> **Source:** `docs/tutorials/mine-vanity-address.md` · [↑ table of contents](#table-of-contents)
@@ -55601,7 +55789,7 @@ The protocol itself is fully specified in [docs/PROTOCOL-vanity.md](../PROTOCOL-
---
-<a id="sec-235"></a>
+<a id="sec-236"></a>
> **Source:** `docs/tutorials/mint-pumpfun-token.md` · [↑ table of contents](#table-of-contents)
@@ -55953,7 +56141,7 @@ If you have a lawyer, talk to them before launching. If you don't, default to th
---
-<a id="sec-236"></a>
+<a id="sec-237"></a>
> **Source:** `docs/tutorials/multi-agent-coordination.md` · [↑ table of contents](#table-of-contents)
@@ -56004,7 +56192,7 @@ The rest of this tutorial assumes you've decided yes, two agents.
A SaaS pricing page. Two agents:
-- **Riley (Sales)** — front-of-stage. Greets visitors, answers high-level pricing/positioning questions, sniffs intent. Cheap LLM (Claude Haiku or GPT-4o-mini class).
+- **Riley (Sales)** — front-of-stage. Greets visitors, answers high-level pricing/positioning questions, sniffs intent. Cheap LLM (Claude Haiku or GPT-5.6 Luna class).
- **Devon (Engineer)** — stays in the background until summoned. Answers integration, security, architecture, and SDK questions. More expensive LLM (Claude Sonnet/Opus class) because the answers must be technically accurate.
The handoff rule is concrete: when Riley detects a "deep technical" question, Riley narrates the handoff and Devon steps forward. When Devon's done, control returns to Riley. There's a shared scratch memory so Devon knows what Riley already covered.
@@ -56513,7 +56701,7 @@ async function safeHandoff(targetEl, brief, fallbackEl, originalQuestion) {
---
-<a id="sec-237"></a>
+<a id="sec-238"></a>
> **Source:** `docs/tutorials/nvidia-3d-free.md` · [↑ table of contents](#table-of-contents)
@@ -56630,7 +56818,7 @@ It talks **directly** to a TRELLIS NIM and returns the GLB **synchronously** in
---
-<a id="sec-238"></a>
+<a id="sec-239"></a>
> **Source:** `docs/tutorials/nvidia-nim-self-host.md` · [↑ table of contents](#table-of-contents)
@@ -56806,7 +56994,7 @@ The proxy normalizes every documented artifact shape (inline `base64`, a bare st
---
-<a id="sec-239"></a>
+<a id="sec-240"></a>
> **Source:** `docs/tutorials/paid-x402-endpoint.md` · [↑ table of contents](#table-of-contents)
@@ -57498,7 +57686,7 @@ Both work. Choose based on whether your endpoint is part of an agent platform yo
---
-<a id="sec-240"></a>
+<a id="sec-241"></a>
> **Source:** `docs/tutorials/pay-for-x402-service.md` · [↑ table of contents](#table-of-contents)
@@ -57762,7 +57950,7 @@ package family is listed under [x402 → Open-source packages](/x402#open-source
---
-<a id="sec-241"></a>
+<a id="sec-242"></a>
> **Source:** `docs/tutorials/personal-ai-site.md` · [↑ table of contents](#table-of-contents)
@@ -58283,7 +58471,7 @@ The technical investment is one HTML file, a GLB avatar, and a system prompt. Th
---
-<a id="sec-242"></a>
+<a id="sec-243"></a>
> **Source:** `docs/tutorials/place-agent-irl.md` · [↑ table of contents](#table-of-contents)
@@ -58528,7 +58716,7 @@ This is fundamentally different from viewing a single model in AR. If you only n
---
-<a id="sec-243"></a>
+<a id="sec-244"></a>
> **Source:** `docs/tutorials/prompts-for-3d.md` · [↑ table of contents](#table-of-contents)
@@ -58664,7 +58852,7 @@ The tiers are explained in detail in [the text-to-3D tutorial](/tutorials/text-t
---
-<a id="sec-244"></a>
+<a id="sec-245"></a>
> **Source:** `docs/tutorials/register-onchain.md` · [↑ table of contents](#table-of-contents)
@@ -58994,7 +59182,7 @@ Your agent's URL will keep working as long as Base exists and IPFS gateways serv
---
-<a id="sec-245"></a>
+<a id="sec-246"></a>
> **Source:** `docs/tutorials/self-host-agent-backend.md` · [↑ table of contents](#table-of-contents)
@@ -59570,7 +59758,7 @@ A self-hosted instance with light traffic runs at $20–50/month all-in. The dom
---
-<a id="sec-246"></a>
+<a id="sec-247"></a>
> **Source:** `docs/tutorials/selfie-to-avatar.md` · [↑ table of contents](#table-of-contents)
@@ -59818,7 +60006,7 @@ The result is a standard `.glb` that animates in the [Animation Studio](/pose),
---
-<a id="sec-247"></a>
+<a id="sec-248"></a>
> **Source:** `docs/tutorials/share-your-agent.md` · [↑ table of contents](#table-of-contents)
@@ -60144,7 +60332,7 @@ The agent's URL is the durable handle. Embed it, link it, print it. The agent sh
---
-<a id="sec-248"></a>
+<a id="sec-249"></a>
> **Source:** `docs/tutorials/shopify-store-guide-advanced.md` · [↑ table of contents](#table-of-contents)
@@ -60454,7 +60642,7 @@ The clip URLs inside the manifest resolve **relative to the manifest**, so a sel
---
-<a id="sec-249"></a>
+<a id="sec-250"></a>
> **Source:** `docs/tutorials/shopify-store-guide.md` · [↑ table of contents](#table-of-contents)
@@ -60543,7 +60731,7 @@ It's powered by the open-source [`@three-ws/tour`](https://www.npmjs.com/package
---
-<a id="sec-250"></a>
+<a id="sec-251"></a>
> **Source:** `docs/tutorials/skill-with-database-auth.md` · [↑ table of contents](#table-of-contents)
@@ -61281,7 +61469,7 @@ Before this skill faces a real visitor:
---
-<a id="sec-251"></a>
+<a id="sec-252"></a>
> **Source:** `docs/tutorials/solana-agent-reputation.md` · [↑ table of contents](#table-of-contents)
@@ -61464,7 +61652,7 @@ A read costs nothing and asks no one's permission — which is exactly what lets
---
-<a id="sec-252"></a>
+<a id="sec-253"></a>
> **Source:** `docs/tutorials/sperax-tour.md` · [↑ table of contents](#table-of-contents)
@@ -61635,7 +61823,7 @@ This is covered by an automated test — [`tour-sdk/test/director.test.mjs`](htt
---
-<a id="sec-253"></a>
+<a id="sec-254"></a>
> **Source:** `docs/tutorials/swap-avatar-in-studio.md` · [↑ table of contents](#table-of-contents)
@@ -61895,7 +62083,7 @@ The key insight is the snippet's stability. Once embedded, your customers' pages
---
-<a id="sec-254"></a>
+<a id="sec-255"></a>
> **Source:** `docs/tutorials/text-to-3d.md` · [↑ table of contents](#table-of-contents)
@@ -62017,7 +62205,7 @@ This is normal — prompt, generate, adjust, repeat is the workflow, not a failu
---
-<a id="sec-255"></a>
+<a id="sec-256"></a>
> **Source:** `docs/tutorials/trigger-from-page-events.md` · [↑ table of contents](#table-of-contents)
@@ -62521,7 +62709,7 @@ The pattern under all of these is the same: every recipe starts with `whenReady(
---
-<a id="sec-256"></a>
+<a id="sec-257"></a>
> **Source:** `docs/tutorials/upload-custom-glb.md` · [↑ table of contents](#table-of-contents)
@@ -62917,7 +63105,7 @@ Once the body is on the platform, the embed snippet doesn't change. The same `<a
---
-<a id="sec-257"></a>
+<a id="sec-258"></a>
> **Source:** `docs/tutorials/view-in-ar.md` · [↑ table of contents](#table-of-contents)
@@ -63092,7 +63280,7 @@ AR surface detection needs a moment to work. Move the phone slowly over the targ
---
-<a id="sec-258"></a>
+<a id="sec-259"></a>
> **Source:** `docs/tutorials/voice-and-lipsync.md` · [↑ table of contents](#table-of-contents)
@@ -63170,7 +63358,7 @@ The fastest path to a talking agent is a built-in TTS voice. The catalog lives i
| `shimmer` | Light and airy |
| `verse` | Dynamic and conversational |
-The default is `nova`. These are synthesized by `POST /api/tts/speak` ([`api/tts/speak.js`](../../api/tts/speak.js)), which tries the free NVIDIA NIM Magpie lane first and falls back to OpenAI's `/v1/audio/speech`. You don't choose the provider — you choose the voice id, and the endpoint renders it on whichever lane is configured.
+The default is `nova`. These are synthesized by `POST /api/tts/speak` ([`api/tts/speak.js`](../../api/tts/speak.js)), which tries the free NVIDIA NIM Magpie lane first and falls back to the OpenAI `/v1/audio/speech` endpoint. You don't choose the provider — you choose the voice id, and the endpoint renders it on whichever lane is configured.
You can hear all of these immediately in the next step.
@@ -63323,7 +63511,7 @@ The leverage is that the avatar drives its mouth from the *audio it actually pla
---
-<a id="sec-259"></a>
+<a id="sec-260"></a>
> **Source:** `docs/tutorials/walk-companion.md` · [↑ table of contents](#table-of-contents)
@@ -63676,7 +63864,7 @@ The leverage is composability: the same engine renders the corner mascot, the fu
---
-<a id="sec-260"></a>
+<a id="sec-261"></a>
> **Source:** `docs/tutorials/web-component-end-to-end.md` · [↑ table of contents](#table-of-contents)
@@ -64277,7 +64465,7 @@ The web component is the most robust integration point the platform offers. Buil
---
-<a id="sec-261"></a>
+<a id="sec-262"></a>
> **Source:** `docs/ui-juice.md` · [↑ table of contents](#table-of-contents)
@@ -64439,7 +64627,7 @@ should reach for these primitives rather than re-rolling RAF loops.
---
-<a id="sec-262"></a>
+<a id="sec-263"></a>
> **Source:** `docs/ux-flows/01-onboarding-creation.md` · [↑ table of contents](#table-of-contents)
@@ -64645,7 +64833,7 @@ should reach for these primitives rather than re-rolling RAF loops.
---
-<a id="sec-263"></a>
+<a id="sec-264"></a>
> **Source:** `docs/ux-flows/02-forge-text-to-3d.md` · [↑ table of contents](#table-of-contents)
@@ -64815,7 +65003,7 @@ Routing facts (from `vercel.json`):
---
-<a id="sec-264"></a>
+<a id="sec-265"></a>
> **Source:** `docs/ux-flows/03-3d-editing-viewer.md` · [↑ table of contents](#table-of-contents)
@@ -65021,7 +65209,7 @@ Routing summary (from `vite.config.js`):
---
-<a id="sec-265"></a>
+<a id="sec-266"></a>
> **Source:** `docs/ux-flows/04-embed-widget-studio.md` · [↑ table of contents](#table-of-contents)
@@ -65195,7 +65383,7 @@ Routing recap (from `vercel.json`):
---
-<a id="sec-266"></a>
+<a id="sec-267"></a>
> **Source:** `docs/ux-flows/05-discovery-social.md` · [↑ table of contents](#table-of-contents)
@@ -65466,7 +65654,7 @@ Routing recap (from `vercel.json`):
---
-<a id="sec-267"></a>
+<a id="sec-268"></a>
> **Source:** `docs/ux-flows/06-marketplace-skills.md` · [↑ table of contents](#table-of-contents)
@@ -65680,7 +65868,7 @@ Routing facts confirmed in `vercel.json`:
---
-<a id="sec-268"></a>
+<a id="sec-269"></a>
> **Source:** `docs/ux-flows/07-crypto-trading-analytics.md` · [↑ table of contents](#table-of-contents)
@@ -66029,7 +66217,7 @@ coin-intel, pump-visualizer and pump-live — adding a coin on any surface shows
---
-<a id="sec-269"></a>
+<a id="sec-270"></a>
> **Source:** `docs/ux-flows/08-coin-launch-wallets.md` · [↑ table of contents](#table-of-contents)
@@ -66302,7 +66490,7 @@ real Solana/EVM RPC, pump.fun, and x402 — no mocks.
---
-<a id="sec-270"></a>
+<a id="sec-271"></a>
> **Source:** `docs/ux-flows/09-x402-agent-commerce.md` · [↑ table of contents](#table-of-contents)
@@ -66644,7 +66832,7 @@ choreographed two-agent narrative driven by Server-Sent Events.
---
-<a id="sec-271"></a>
+<a id="sec-272"></a>
> **Source:** `docs/ux-flows/10-chat-brain-labs.md` · [↑ table of contents](#table-of-contents)
@@ -66886,7 +67074,7 @@ modules. Routes resolved via `vercel.json` rewrites.
---
-<a id="sec-272"></a>
+<a id="sec-273"></a>
> **Source:** `docs/ux-flows/11-account-dashboard.md` · [↑ table of contents](#table-of-contents)
@@ -67105,7 +67293,7 @@ Shared auth concepts:
---
-<a id="sec-273"></a>
+<a id="sec-274"></a>
> **Source:** `docs/ux-flows/12-home-and-content.md` · [↑ table of contents](#table-of-contents)
@@ -67293,7 +67481,7 @@ All `/.well-known/*` and `/openapi.json` / `/sitemap.xml` responses are JSON/XML
---
-<a id="sec-274"></a>
+<a id="sec-275"></a>
> **Source:** `docs/validation.md` · [↑ table of contents](#table-of-contents)
@@ -67641,7 +67829,7 @@ The toggle's CSS class reflects the highest severity: `level-0` (errors), `level
---
-<a id="sec-275"></a>
+<a id="sec-276"></a>
> **Source:** `docs/vanity.md` · [↑ table of contents](#table-of-contents)
@@ -67872,7 +68060,7 @@ challenges and the discovery doc stay in parity.
---
-<a id="sec-276"></a>
+<a id="sec-277"></a>
> **Source:** `docs/viewer.md` · [↑ table of contents](#table-of-contents)
@@ -68242,7 +68430,7 @@ State is persisted to `localStorage` per agent ID when `attachScenePrefs(agentId
---
-<a id="sec-277"></a>
+<a id="sec-278"></a>
> **Source:** `docs/web-component.md` · [↑ table of contents](#table-of-contents)
@@ -69157,7 +69345,7 @@ defineElement('my-agent');
---
-<a id="sec-278"></a>
+<a id="sec-279"></a>
> **Source:** `docs/widget-api.md` · [↑ table of contents](#table-of-contents)
@@ -69355,7 +69543,7 @@ If you have multiple widgets and want to coordinate them (sync camera, broadcast
---
-<a id="sec-279"></a>
+<a id="sec-280"></a>
> **Source:** `docs/widget-studio.md` · [↑ table of contents](#table-of-contents)
@@ -69608,7 +69796,7 @@ You can override these freely in the iframe `width` and `height` attributes. Add
---
-<a id="sec-280"></a>
+<a id="sec-281"></a>
> **Source:** `docs/widgets.md` · [↑ table of contents](#table-of-contents)
@@ -70117,7 +70305,7 @@ Need to drive a widget from the parent page — change the camera, play an anima
---
-<a id="sec-281"></a>
+<a id="sec-282"></a>
> **Source:** `docs/x402-buyer.md` · [↑ table of contents](#table-of-contents)
@@ -70219,7 +70407,7 @@ set) back into the payment so attribution survives the round trip.
---
-<a id="sec-282"></a>
+<a id="sec-283"></a>
> **Source:** `docs/x402-dev-tools.md` · [↑ table of contents](#table-of-contents)
@@ -70413,7 +70601,7 @@ implementation against a live server.
---
-<a id="sec-283"></a>
+<a id="sec-284"></a>
> **Source:** `docs/x402-distribution.md` · [↑ table of contents](#table-of-contents)
@@ -70626,7 +70814,7 @@ script. Everything else above updates itself.
---
-<a id="sec-284"></a>
+<a id="sec-285"></a>
> **Source:** `docs/x402-endpoints.md` · [↑ table of contents](#table-of-contents)
@@ -70861,7 +71049,7 @@ input and do not promote any specific token.
---
-<a id="sec-285"></a>
+<a id="sec-286"></a>
> **Source:** `docs/x402-revenue.md` · [↑ table of contents](#table-of-contents)
@@ -71219,7 +71407,7 @@ settled activity (include it), and label it as such.
---
-<a id="sec-286"></a>
+<a id="sec-287"></a>
> **Source:** `docs/x402-ring-economy.md` · [↑ table of contents](#table-of-contents)
@@ -71945,7 +72133,7 @@ curl -s -H "Authorization: Bearer $CRON_SECRET" \
---
-<a id="sec-287"></a>
+<a id="sec-288"></a>
> **Source:** `docs/x402.md` · [↑ table of contents](#table-of-contents)
@@ -72121,7 +72309,7 @@ Each package has its own repository with a full README, API reference, and examp
---
-<a id="sec-288"></a>
+<a id="sec-289"></a>
> **Source:** `docs/zauth/database.md` · [↑ table of contents](#table-of-contents)
@@ -72267,7 +72455,7 @@ Use this endpoint to browse all known x402 endpoints before your agents commit t
---
-<a id="sec-289"></a>
+<a id="sec-290"></a>
> **Source:** `docs/zauth/index.md` · [↑ table of contents](#table-of-contents)
@@ -72291,7 +72479,7 @@ zauth is the security and trust layer that allows agents to act with confidence,
---
-<a id="sec-290"></a>
+<a id="sec-291"></a>
> **Source:** `docs/zauth/provider-hub.md` · [↑ table of contents](#table-of-contents)
@@ -72393,7 +72581,7 @@ Supply your EVM or Solana private keys to enable automatic refunds when your end
---
-<a id="sec-291"></a>
+<a id="sec-292"></a>
> **Source:** `docs/zauth/reposcan.md` · [↑ table of contents](#table-of-contents)
@@ -72719,7 +72907,7 @@ TypeScript -@x402/fetch
---
-<a id="sec-292"></a>
+<a id="sec-293"></a>
> **Source:** `docs/zauth/vector.md` · [↑ table of contents](#table-of-contents)
diff --git a/docs/api-reference.md b/docs/api-reference.md
index ae7747729..bd943d885 100644
--- a/docs/api-reference.md
+++ b/docs/api-reference.md
@@ -776,7 +776,7 @@ free, so a failed job costs nothing to retry).
| Status | Code | Meaning |
| ------ | -------------------------------- | -------------------------------------------------------------------- |
-| `400` | `invalid_prompt` / `bad_request` | `prompt` missing, outside 3–1000 chars, or malformed JSON |
+| `400` | `invalid_prompt` / `bad_request` | `prompt` missing, outside 3-1000 chars, or malformed JSON |
| `400` | `prompt_rejected` | The age-13+ safety gate refused the prompt; `message` says why |
| `429` | `rate_limited` | Free lane saturated; retry after `retry_after` seconds |
| `502` | `generation_failed` | The lane could not start the job; retry is free |
diff --git a/mcp-server/src/tools/_logo-lexicon.js b/mcp-server/src/tools/_logo-lexicon.js
new file mode 100644
index 000000000..d64524883
--- /dev/null
+++ b/mcp-server/src/tools/_logo-lexicon.js
@@ -0,0 +1,166 @@
+// Brand-mark lexicon for text→3D logo prompts.
+//
+// Text→3D runs text→image→mesh: neither the prompt director LLM nor the image
+// model reliably knows what a niche brand mark looks like, so a raw prompt like
+// "pumpfun logo" reconstructs as a generic badge covered in garbled lettering.
+// This module resolves well-known marks DETERMINISTICALLY: when a prompt is
+// essentially "<known brand> logo" (or just the brand name), it returns a
+// concrete geometric description of the real mark, written so the image model
+// draws shapes, never text. Anything more specific than brand+mark words falls
+// through to the LLM director, which carries BRAND_MARK_DIRECTIVE below.
+//
+// Dependency-free on purpose: this file ships in the published mcp-server npm
+// package AND loads in the hosted api/ bundle (api/_lib/forge-director-prompts.js
+// and the studio lanes import it), so it may import nothing.
+//
+// The emitted specs intentionally never contain the brand name: if the image
+// model sees "pump.fun" it will try to letter the word onto the mesh, and
+// letterforms reconstruct as noise.
+
+// Mirror of the composition constraints the Granite mesh director appends, so a
+// lexicon hit reconstructs under the same framing rules as a directed prompt.
+const COMPOSITION_TAIL =
+ 'full subject in frame, centered, isolated on a plain neutral background, one camera angle, ' +
+ 'even studio lighting, no cropping, no motion blur, no text or watermark, no collage or ' +
+ 'multi-view grid, no second subject';
+
+// Shared director clause: how the LLM director should handle brand/logo ideas
+// the lexicon did not resolve. Imported by every mesh-director instruction so
+// the guidance cannot drift between the api/ and mcp-server copies.
+export const BRAND_MARK_DIRECTIVE =
+ 'If the idea names a brand, company, app, or crypto token and asks for its logo, icon, or mark, ' +
+ 'describe the mark ITSELF as one solid extruded dimensional emblem: its real geometric shapes, ' +
+ 'proportions, and exact brand colors if you know them; if you do not know the mark, describe a ' +
+ 'clean minimal abstract geometric emblem in the brand color instead. Never repeat the brand name ' +
+ 'in your output and never invent lettering, wordmarks, badges, or slogan text: rendered text ' +
+ 'reconstructs as unreadable noise. ';
+
+// Each entry: aliases are matched in normalized space (lowercase, punctuation
+// collapsed to single spaces). `bare` aliases resolve even without a mark word
+// ("pumpfun" alone clearly wants the mark); short ticker aliases require an
+// explicit mark word ("sol logo" yes, bare "sol" no).
+//
+// `image` (optional) is a deployment-relative path to a pre-rendered reference
+// view of the mark under public/marks/. When present, call-sites submit
+// image→3D against `<base><image>` instead of gambling on the text→image draw:
+// live E2E showed the text lane reconstructs the right SHAPE but rolls random
+// colorways (red/white, green/teal) run to run, while the reference view
+// reconstructs the exact mark every time. The spec prompt still rides along as
+// the caption and as the fallback for callers that cannot do image mode.
+const BRANDS = [
+ {
+ id: 'pump.fun',
+ aliases: ['pumpfun', 'pump fun', '$pump'],
+ bare: ['pumpfun', 'pump fun', '$pump'],
+ image: '/marks/pump-fun.png',
+ spec:
+ 'A single glossy two-part gel capsule pill tilted diagonally at 45 degrees, two smooth ' +
+ 'cylindrical halves with rounded hemispherical ends joined at a crisp center seam, upper half ' +
+ 'vivid spring green, lower half clean white, smooth glossy plastic PBR surface with soft ' +
+ 'specular highlights, subtle seam ridge detail, clean minimal stylized look, ' +
+ COMPOSITION_TAIL,
+ },
+ {
+ id: 'bitcoin',
+ aliases: ['bitcoin', 'btc', '$btc'],
+ bare: ['bitcoin'],
+ spec:
+ 'A single thick round coin standing upright, polished metallic orange-gold PBR finish, face ' +
+ 'embossed with one large tilted capital letter B crossed by two short vertical strokes at top ' +
+ 'and bottom, raised circular rim, subtle brushed-metal grain, clean stylized look, ' +
+ COMPOSITION_TAIL,
+ },
+ {
+ id: 'ethereum',
+ aliases: ['ethereum', 'eth', '$eth', 'ether'],
+ bare: ['ethereum'],
+ spec:
+ 'A single faceted octahedron gemstone, two four-sided pyramids joined base to base with a thin ' +
+ 'horizontal split gap between the upper and lower halves, mirror symmetric, polished ' +
+ 'silver-grey crystalline PBR surface with crisp flat facets and sharp edges, clean minimal ' +
+ 'stylized look, ' +
+ COMPOSITION_TAIL,
+ },
+ {
+ id: 'solana',
+ aliases: ['solana', 'sol', '$sol'],
+ bare: ['solana'],
+ spec:
+ 'A single emblem of three identical flat parallelogram bars stacked horizontally with even ' +
+ 'gaps, the top and bottom bars slanting one way and the middle bar slanting the opposite way, ' +
+ 'each bar extruded with slight thickness, smooth PBR surface with a vibrant purple to teal ' +
+ 'gradient flowing across the bars, clean minimal stylized look, ' +
+ COMPOSITION_TAIL,
+ },
+ {
+ id: 'dogecoin',
+ aliases: ['dogecoin', 'doge', '$doge'],
+ bare: ['dogecoin'],
+ spec:
+ 'A single thick round coin standing upright, matte gold PBR finish, face embossed with the ' +
+ 'head of a Shiba Inu dog with pointed ears and a calm sideways glance, raised circular rim ' +
+ 'with small embossed circular studs, clean stylized look, ' +
+ COMPOSITION_TAIL,
+ },
+];
+
+const MARK_WORDS = new Set([
+ 'logo',
+ 'logos',
+ 'logotype',
+ 'logomark',
+ 'icon',
+ 'symbol',
+ 'emblem',
+ 'mark',
+ 'brandmark',
+ 'insignia',
+ 'badge',
+ 'sign',
+]);
+
+// Words that carry no subject information: a prompt made only of brand + mark
+// words + filler is "just the logo" and resolves; any other leftover token
+// means the user asked for something more specific, so the director handles it.
+const FILLER = new Set([
+ 'a', 'an', 'the', 'of', 'for', 'in', 'as', 'its', 'their', 'this', 'that',
+ 'one', 'single', 'i', 'me', 'my', 'us', 'we', 'please', 'want', 'need',
+ 'make', 'makes', 'making', 'generate', 'create', 'render', 'give', 'get',
+ '3d', 'dimensional', 'model', 'mesh', 'object', 'asset', 'prop', 'version',
+ 'official', 'original', 'coin', 'token', 'crypto', 'cryptocurrency', 'brand',
+]);
+
+function normalize(text) {
+ return String(text || '')
+ .toLowerCase()
+ .replace(/[^a-z0-9$]+/g, ' ')
+ .replace(/\s+/g, ' ')
+ .trim();
+}
+
+// Resolve a prompt that is essentially "<known brand> logo" (or a bare
+// unambiguous brand name) into a concrete geometric spec for the real mark.
+// Returns { brand, prompt, imagePath } on a hit, null otherwise. Null means:
+// not a known mark, or the prompt carries extra intent the deterministic spec
+// would drop. `imagePath` (nullable) is deployment-relative; callers that can
+// submit image→3D should prefer `<their forge base><imagePath>` over the text
+// prompt for an exact reconstruction of the mark.
+export function resolveLogoPrompt(rawPrompt) {
+ const norm = normalize(rawPrompt);
+ if (!norm) return null;
+ const padded = ` ${norm} `;
+ for (const brand of BRANDS) {
+ for (const alias of brand.aliases) {
+ if (!padded.includes(` ${alias} `)) continue;
+ const rest = padded.replace(` ${alias} `, ' ').trim();
+ const tokens = rest ? rest.split(' ') : [];
+ const hasMark = tokens.some((t) => MARK_WORDS.has(t));
+ const leftover = tokens.filter((t) => !MARK_WORDS.has(t) && !FILLER.has(t));
+ if (leftover.length > 0) continue;
+ if (hasMark || brand.bare.includes(alias)) {
+ return { brand: brand.id, prompt: brand.spec, imagePath: brand.image || null };
+ }
+ }
+ }
+ return null;
+}
diff --git a/mcp-server/src/tools/_studio-core.js b/mcp-server/src/tools/_studio-core.js
index 70b796263..f728e393e 100644
--- a/mcp-server/src/tools/_studio-core.js
+++ b/mcp-server/src/tools/_studio-core.js
@@ -21,6 +21,7 @@
import { classifyHumanoidPrompt } from './_humanoid.js';
import { composeRefinement, seedLineage, appendVersion, buildLineageChain, branchFrom } from './_lineage.js';
+import { resolveLogoPrompt, BRAND_MARK_DIRECTIVE } from './_logo-lexicon.js';
// Standard tool error envelope — identical shape to payments.js `toolError`, so
// a core's error is indistinguishable whether it is surfaced through the paid
@@ -180,9 +181,16 @@ async function startRig({ base, glbUrl }) {
return data;
}
-// IBM Granite prompt director over the deployed /api/chat SSE endpoint. Returns
-// the refined prompt string, or null on ANY failure so the caller falls back to
-// the original prompt (fail-soft, never fabricated).
+// Prompt director over the deployed /api/chat SSE endpoint. Returns the refined
+// prompt string, or null on ANY failure so the caller falls back to the
+// original prompt (fail-soft, never fabricated).
+//
+// No provider is pinned: this client is anonymous, and /api/chat rejects every
+// non-free provider for anonymous callers with 401 (pinning watsonx here used
+// to kill the director on every call). Unpinned, the deployment routes the
+// request through its anonymous free-provider chain. MESH_FORGE_DIRECTOR_MODEL
+// stays available as an explicit override for callers who know their
+// deployment's model catalog.
async function directPrompt({ base, rawPrompt, instruction, model }) {
let res;
try {
@@ -190,7 +198,6 @@ async function directPrompt({ base, rawPrompt, instruction, model }) {
method: 'POST',
headers: { 'content-type': 'application/json', accept: 'text/event-stream' },
body: JSON.stringify({
- provider: 'watsonx',
...(model ? { model } : {}),
message: `${instruction}\n\nIdea: ${rawPrompt}`,
}),
@@ -229,7 +236,10 @@ async function directPrompt({ base, rawPrompt, instruction, model }) {
return null;
}
- const refined = acc.trim().replace(/^["']|["']$/g, '').split('\n')[0].trim();
+ // First line only, then strip wrapping quotes; the reverse order leaves a
+ // dangling quote when the model adds commentary lines after a quoted prompt.
+ const firstLine = acc.trim().split('\n')[0].trim();
+ const refined = firstLine.replace(/^["'“”]+|["'“”]+$/g, '').trim();
return refined.length >= 3 && refined.length <= 1000 ? refined : null;
}
@@ -255,8 +265,10 @@ function normalizeViews({ image_url, image_urls }) {
const MESH_DIRECTOR_INSTRUCTION =
"You are a 3D asset art director. Rewrite the user's idea into ONE concise prompt for a " +
'text-to-3D generator. Describe a SINGLE isolated subject on a plain background, naming form, ' +
- 'materials, color, and surface detail. No scenes, no multiple objects, no text or logos, no ' +
- 'background environment. Output ONLY the rewritten prompt as a single line — no preamble, no quotes.';
+ 'materials, color, and surface detail. No scenes, no multiple objects, no rendered text, no ' +
+ 'background environment. ' +
+ BRAND_MARK_DIRECTIVE +
+ 'Output ONLY the rewritten prompt as a single line — no preamble, no quotes.';
const AVATAR_DIRECTOR_INSTRUCTION =
"You are a 3D character art director. Rewrite the user's idea into ONE concise prompt for a text-to-3D " +
@@ -274,7 +286,17 @@ export async function runForgeFree({ prompt, tier }) {
return coreError('invalid_input', 'Provide a text prompt of at least 3 characters.');
}
const tierId = VALID_TIER.has(tier) ? tier : 'draft';
+ // Known brand-mark prompts ("<brand name> logo") resolve to a deterministic
+ // geometric spec of the real mark; this lane has no LLM director, so without
+ // it the raw brand name reconstructs as a garbled generic badge. The user's
+ // original prompt stays on the response metadata unchanged.
+ const knownMark = resolveLogoPrompt(trimmed);
+ const subject = knownMark ? knownMark.prompt : trimmed;
const base = apiBaseFrom(['FORGE_FREE_API_BASE']);
+ // A pre-rendered reference view beats any text draw for a known mark: the
+ // text lane rolls a random colorway per run, the reference reconstructs the
+ // exact mark. Served by the same deployment the job is submitted to.
+ const markImageUrls = knownMark?.imagePath ? [`${base}${knownMark.imagePath}`] : undefined;
const startedAt = Date.now();
// The free lane's happy path is the durable NVIDIA NIM (R2-persisted) result.
// When NIM is cold it degrades to a HuggingFace Space whose gradio /tmp URL
@@ -303,7 +325,7 @@ export async function runForgeFree({ prompt, tier }) {
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
let gen;
try {
- gen = await forgeFreeOnce({ base, prompt: trimmed, tierId });
+ gen = await forgeFreeOnce({ base, prompt: subject, tierId, imageUrls: markImageUrls });
} catch (err) {
// Transient contention on the shared free lane (the generator is busy):
// honor the server's retryAfter (capped 1–8s), back off, and retry
@@ -378,13 +400,19 @@ export async function runForgeFree({ prompt, tier }) {
// One forge_free generation attempt: submit to the pinned free NVIDIA NIM lane,
// then (when queued) poll to a terminal state. Returns { data, jobId } or throws
// a coded error (with optional `.extra`/`.retryAfter`) the retry loop acts on.
-async function forgeFreeOnce({ base, prompt, tierId }) {
+async function forgeFreeOnce({ base, prompt, tierId, imageUrls }) {
const job = await submitForge({
base,
// Pin the free NVIDIA NIM (TRELLIS) lane so the happy path is always the
// zero-cost engine; path:"image" is the only path NVIDIA serves. NVCF can
// finish inside the generous submit window, so accept a synchronous done.
- payload: { prompt, tier: tierId, backend: 'nvidia', path: 'image' },
+ // With a reference view (known brand marks) the submit goes image→3D
+ // unpinned: the forge router owns image-mode engine selection, and the
+ // prompt rides along as the caption.
+ payload:
+ Array.isArray(imageUrls) && imageUrls.length
+ ? { image_urls: imageUrls, prompt: prompt || undefined, tier: tierId }
+ : { prompt, tier: tierId, backend: 'nvidia', path: 'image' },
submitTimeoutMs: 90_000,
allowSyncDone: true,
});
@@ -464,8 +492,12 @@ export async function runMeshForge({ prompt, image_url, image_urls, aspect_ratio
const base = apiBaseFrom(['MESH_FORGE_API_BASE']);
const started = Date.now();
+ // A known brand-mark prompt resolves deterministically and skips the LLM
+ // director: the lexicon spec is already a tight, correct description of the
+ // real mark, and a rewrite could only degrade it.
+ const knownMark = !imageMode && trimmedPrompt ? resolveLogoPrompt(trimmedPrompt) : null;
const runDirector =
- !imageMode && trimmedPrompt && direct !== false && env('MESH_FORGE_DIRECTOR', '1') !== '0';
+ !imageMode && !knownMark && trimmedPrompt && direct !== false && env('MESH_FORGE_DIRECTOR', '1') !== '0';
let directedPrompt = null;
if (runDirector) {
directedPrompt = await directPrompt({
@@ -475,15 +507,19 @@ export async function runMeshForge({ prompt, image_url, image_urls, aspect_ratio
model: env('MESH_FORGE_DIRECTOR_MODEL'),
});
}
- const effectivePrompt = directedPrompt || trimmedPrompt;
+ const effectivePrompt = knownMark?.prompt || directedPrompt || trimmedPrompt;
+ // Known marks with a pre-rendered reference view go image→3D: the reference
+ // reconstructs the exact mark, while a text draw rolls a random colorway.
+ const markViews = knownMark?.imagePath ? [`${base}${knownMark.imagePath}`] : null;
let job;
try {
job = await submitForge({
base,
- payload: imageMode
- ? { image_urls: views, prompt: effectivePrompt || undefined, aspect_ratio: aspect }
- : { prompt: effectivePrompt, aspect_ratio: aspect },
+ payload:
+ imageMode || markViews
+ ? { image_urls: imageMode ? views : markViews, prompt: effectivePrompt || undefined, aspect_ratio: aspect }
+ : { prompt: effectivePrompt, aspect_ratio: aspect },
submitTimeoutMs: 30_000,
allowSyncDone: false,
});
diff --git a/mcp-server/src/tools/mesh-forge.js b/mcp-server/src/tools/mesh-forge.js
index b9cdfac57..70a7f0568 100644
--- a/mcp-server/src/tools/mesh-forge.js
+++ b/mcp-server/src/tools/mesh-forge.js
@@ -18,8 +18,9 @@
//
// Environment (all optional — sensible prod defaults):
// MESH_FORGE_API_BASE — three.ws origin. Default https://three.ws
-// MESH_FORGE_DIRECTOR — "0" to skip the Granite director stage. Default on.
-// MESH_FORGE_DIRECTOR_MODEL — watsonx model id for direction. Default server default.
+// MESH_FORGE_DIRECTOR — "0" to skip the prompt-director stage. Default on.
+// MESH_FORGE_DIRECTOR_MODEL — model id for direction, resolved by the server's
+// anonymous chat chain. Default server default.
// MESH_FORGE_TIMEOUT_MS — overall reconstruct poll budget. Default 180000.
// MESH_FORGE_POLL_MS — poll interval. Default 3000.
diff --git a/public/changelog.json b/public/changelog.json
index e436d7c28..aa4a4dd47 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-14T21:21:38.842Z",
+ "generated_at": "2026-07-14T23:13:58.101Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -203,6 +203,17 @@
"fix"
]
},
+ {
+ "date": "2026-07-14",
+ "type": "update",
+ "title": "Short prompts now generate what you actually meant",
+ "summary": "A terse prompt like a two-word meme reference used to go straight to the image model and come back as something unrecognizable. The art-director step that expands your idea into a precise single-object spec (shape, materials, framing) was silently failing on every ChatGPT, MCP, and API generation; it now runs on every one of them. On top of that, well-known logos and brand marks resolve to their real geometry deterministically, so asking for a famous mark gives you the actual shape instead of a garbled badge.",
+ "link": "/studio",
+ "tags": [
+ "fix",
+ "improvement"
+ ]
+ },
{
"date": "2026-07-14",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index 708c66ca5..b18f6351d 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -158,6 +158,14 @@
<category>fix</category>
<description>Opening a shared model link at /viewer could hang on the loading spinner forever even though the model file itself was fine. The viewer now reveals the model as soon as it finishes rendering, and if a model genuinely cannot display, you get a clear message and a working download button instead of an endless spinner.</description>
</item>
+ <item>
+ <title>Short prompts now generate what you actually meant</title>
+ <link>https://three.ws/studio</link>
+ <guid isPermaLink="false">2026-07-14:Short prompts now generate what you actually meant</guid>
+ <pubDate>Tue, 14 Jul 2026 12:00:00 GMT</pubDate>
+ <category>fix</category>
+ <description>A terse prompt like a two-word meme reference used to go straight to the image model and come back as something unrecognizable. The art-director step that expands your idea into a precise single-object spec (shape, materials, framing) was silently failing on every ChatGPT, MCP, and API generation; it now runs on every one of them. On top of that, well-known logos and brand marks resolve to their real geometry deterministically, so asking for a famous mark gives you the actual shape instead of a garbled badge.</description>
+ </item>
<item>
<title>The 3D viewer now funnels every model into a next step</title>
<link>https://three.ws/viewer</link>
diff --git a/public/features.json b/public/features.json
index 534f0617f..d9e42998a 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-14T21:21:38.829Z",
+ "generated_at": "2026-07-14T23:13:58.087Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/public/marks/pump-fun.png b/public/marks/pump-fun.png
new file mode 100644
index 000000000..526240984
Binary files /dev/null and b/public/marks/pump-fun.png differ
diff --git a/tests/api/3d-studio.test.js b/tests/api/3d-studio.test.js
index 9dcb0bf7e..b51d483b4 100644
--- a/tests/api/3d-studio.test.js
+++ b/tests/api/3d-studio.test.js
@@ -232,6 +232,22 @@ describe('POST /api/3d/studio — response contract', () => {
expect(JSON.parse(opts.body)).toMatchObject({ prompt: 'a small ceramic robot figurine', backend: 'nvidia', path: 'image', tier: 'standard' });
});
+ it('submits a known brand-mark prompt as image→3D against the deployment-hosted reference view', async () => {
+ globalThis.fetch = vi.fn(async () => jsonResponse(SUBMIT_DONE));
+ const { res, body } = await dispatch(makeReq({ body: { prompt: 'pumpfun logo' } }), makeRes());
+ expect(res.statusCode).toBe(200);
+ expect(body.status).toBe('done');
+ expectCleanWire(body);
+ const sent = JSON.parse(globalThis.fetch.mock.calls[0][1].body);
+ // The reference view is served by the same deployment the job is submitted
+ // to, and the raw brand text never reaches the generator (it would be
+ // lettered onto the mesh as garbled noise).
+ expect(sent.image_urls).toEqual(['https://three.ws/marks/pump-fun.png']);
+ expect(sent.prompt).toMatch(/capsule/i);
+ expect(sent.prompt.toLowerCase()).not.toContain('pumpfun');
+ expect(sent.backend).toBeUndefined();
+ });
+
it('startForge attaches the internal seed token on internal requests when CRON_SECRET is set', async () => {
process.env.CRON_SECRET = 'test-seed-secret';
try {
diff --git a/tests/api/forge-director.test.js b/tests/api/forge-director.test.js
new file mode 100644
index 000000000..c69a5465a
--- /dev/null
+++ b/tests/api/forge-director.test.js
@@ -0,0 +1,111 @@
+// Tests for directPrompt() in api/_mcp-studio/forge-client.js: the Granite art
+// director that rewrites a rough idea into a single-subject 3D spec before it
+// drives the FLUX reference image.
+//
+// The director must run IN PROCESS (watsonx Granite lead, shared free-first
+// llmComplete chain as fallback). The original implementation POSTed
+// provider=watsonx to its own /api/chat, which the anonymous-provider gate
+// rejects with 401, so the director silently never ran and raw two-word
+// prompts (the "meme egg" class of bad generations) went straight to the image
+// model. These tests pin the in-process contract so that regression cannot
+// come back: no fetch to /api/chat, watsonx first, chain fallback, fail-soft
+// null, and the same output cleanup as before.
+
+import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
+
+const state = vi.hoisted(() => ({
+ configured: true,
+ watsonx: vi.fn(),
+ chain: vi.fn(),
+}));
+
+vi.mock('../../api/_lib/watsonx.js', () => ({
+ watsonxConfig: () => ({ configured: state.configured, chatModel: 'ibm/granite-3-8b-instruct' }),
+ watsonxChatComplete: (...args) => state.watsonx(...args),
+}));
+
+vi.mock('../../api/_lib/llm.js', () => ({
+ llmComplete: (...args) => state.chain(...args),
+}));
+
+import { directPrompt } from '../../api/_mcp-studio/forge-client.js';
+import { MESH_DIRECTOR } from '../../api/_lib/forge-director-prompts.js';
+
+const ORIGINAL_FETCH = globalThis.fetch;
+
+beforeEach(() => {
+ state.configured = true;
+ state.watsonx.mockReset();
+ state.chain.mockReset();
+});
+
+afterEach(() => {
+ globalThis.fetch = ORIGINAL_FETCH;
+ vi.useRealTimers();
+});
+
+describe('directPrompt — in-process Granite director', () => {
+ it('runs watsonx Granite with the instruction as the system message and never touches the network', async () => {
+ globalThis.fetch = vi.fn(async () => {
+ throw new Error('the director must not make HTTP calls');
+ });
+ state.watsonx.mockResolvedValue({ text: 'A glossy two-tone gel capsule, studio lighting, plain background' });
+
+ const out = await directPrompt(MESH_DIRECTOR, 'a capsule pill');
+ expect(out).toBe('A glossy two-tone gel capsule, studio lighting, plain background');
+ expect(globalThis.fetch).not.toHaveBeenCalled();
+ expect(state.chain).not.toHaveBeenCalled();
+
+ const [, opts] = state.watsonx.mock.calls[0];
+ expect(opts.messages).toEqual([
+ { role: 'system', content: MESH_DIRECTOR },
+ { role: 'user', content: 'Idea: a capsule pill' },
+ ]);
+ });
+
+ it('cleans the model output: wrapping quotes stripped, first line only', async () => {
+ state.watsonx.mockResolvedValue({ text: '"A brushed steel teapot, centered"\nSecond line the model added anyway' });
+ const out = await directPrompt(MESH_DIRECTOR, 'teapot');
+ expect(out).toBe('A brushed steel teapot, centered');
+ });
+
+ it('falls back to the free llmComplete chain when watsonx is not configured', async () => {
+ state.configured = false;
+ state.chain.mockResolvedValue({ text: 'A matte ceramic robot figurine, centered', provider: 'groq', model: 'x' });
+
+ const out = await directPrompt(MESH_DIRECTOR, 'robot');
+ expect(out).toBe('A matte ceramic robot figurine, centered');
+ expect(state.watsonx).not.toHaveBeenCalled();
+ expect(state.chain).toHaveBeenCalledTimes(1);
+ expect(state.chain.mock.calls[0][0]).toMatchObject({ system: MESH_DIRECTOR, user: 'Idea: robot' });
+ });
+
+ it('falls back to the chain when watsonx throws', async () => {
+ state.watsonx.mockRejectedValue(new Error('watsonx 429: quota'));
+ state.chain.mockResolvedValue({ text: 'A worn oak chair, centered' });
+ const out = await directPrompt(MESH_DIRECTOR, 'chair');
+ expect(out).toBe('A worn oak chair, centered');
+ });
+
+ it('falls back to the chain when watsonx hangs past the director timeout', async () => {
+ vi.useFakeTimers();
+ state.watsonx.mockReturnValue(new Promise(() => {}));
+ state.chain.mockResolvedValue({ text: 'A cast iron lantern, centered' });
+
+ const pending = directPrompt(MESH_DIRECTOR, 'lantern');
+ await vi.advanceTimersByTimeAsync(20_000);
+ const out = await pending;
+ expect(out).toBe('A cast iron lantern, centered');
+ });
+
+ it('returns null (fail-soft) when every lane fails, so callers keep the raw prompt', async () => {
+ state.watsonx.mockRejectedValue(new Error('down'));
+ state.chain.mockRejectedValue(new Error('all rungs dead'));
+ expect(await directPrompt(MESH_DIRECTOR, 'anything')).toBeNull();
+ });
+
+ it('returns null on a degenerate rewrite instead of forwarding junk', async () => {
+ state.watsonx.mockResolvedValue({ text: '""' });
+ expect(await directPrompt(MESH_DIRECTOR, 'anything')).toBeNull();
+ });
+});
diff --git a/tests/api/logo-lexicon.test.js b/tests/api/logo-lexicon.test.js
new file mode 100644
index 000000000..6045bdf2e
--- /dev/null
+++ b/tests/api/logo-lexicon.test.js
@@ -0,0 +1,112 @@
+// Tests for the brand-mark lexicon (mcp-server/src/tools/_logo-lexicon.js) :
+// the deterministic resolver that turns "pumpfun logo"-class prompts into a
+// concrete geometric description of the real mark before any generation lane
+// runs. Without it, text→image→3D reconstructs niche brand marks as a generic
+// badge covered in garbled lettering (no LLM in the chain knows the mark).
+//
+// Pins three contracts:
+// 1. Matching: brand + mark word (or a bare unambiguous brand name) resolves;
+// anything carrying extra subject intent falls through to the director.
+// 2. Spec hygiene: no emitted spec ever contains the brand name (the image
+// model letters any name it sees onto the mesh as noise) and every spec
+// ends in the director's composition constraints.
+// 3. Directive export: the shared BRAND_MARK_DIRECTIVE both director copies
+// embed is a non-empty instruction that forbids invented lettering.
+
+import { describe, it, expect } from 'vitest';
+import {
+ resolveLogoPrompt,
+ BRAND_MARK_DIRECTIVE,
+} from '../../mcp-server/src/tools/_logo-lexicon.js';
+
+describe('resolveLogoPrompt: matching', () => {
+ it('resolves the reported case: "pumpfun logo"', () => {
+ const hit = resolveLogoPrompt('pumpfun logo');
+ expect(hit).not.toBeNull();
+ expect(hit.brand).toBe('pump.fun');
+ expect(hit.prompt).toMatch(/capsule/i);
+ expect(hit.prompt).toMatch(/green/i);
+ });
+
+ it('resolves punctuation and spacing variants of the brand', () => {
+ for (const p of ['pump.fun logo', 'pump fun logo', 'PUMP-FUN LOGO', 'the pump.fun icon', '$pump logo']) {
+ expect(resolveLogoPrompt(p)?.brand).toBe('pump.fun');
+ }
+ });
+
+ it('resolves a bare unambiguous brand name with filler around it', () => {
+ expect(resolveLogoPrompt('pumpfun')?.brand).toBe('pump.fun');
+ expect(resolveLogoPrompt('make a 3d model of the pumpfun logo')?.brand).toBe('pump.fun');
+ expect(resolveLogoPrompt('bitcoin')?.brand).toBe('bitcoin');
+ });
+
+ it('resolves ticker aliases only alongside an explicit mark word', () => {
+ expect(resolveLogoPrompt('btc logo')?.brand).toBe('bitcoin');
+ expect(resolveLogoPrompt('eth icon')?.brand).toBe('ethereum');
+ expect(resolveLogoPrompt('sol emblem')?.brand).toBe('solana');
+ // Bare short tickers are too ambiguous to hijack.
+ expect(resolveLogoPrompt('btc')).toBeNull();
+ expect(resolveLogoPrompt('sol')).toBeNull();
+ expect(resolveLogoPrompt('eth')).toBeNull();
+ });
+
+ it('falls through when the prompt carries extra subject intent', () => {
+ expect(resolveLogoPrompt('pumpfun logo on a spaceship')).toBeNull();
+ expect(resolveLogoPrompt('astronaut holding the bitcoin logo')).toBeNull();
+ expect(resolveLogoPrompt('solana logo tattoo on an arm')).toBeNull();
+ });
+
+ it('ignores prompts with no known brand', () => {
+ expect(resolveLogoPrompt('a pill')).toBeNull();
+ expect(resolveLogoPrompt('logo')).toBeNull();
+ expect(resolveLogoPrompt('my company logo')).toBeNull();
+ expect(resolveLogoPrompt('')).toBeNull();
+ expect(resolveLogoPrompt(null)).toBeNull();
+ });
+});
+
+describe('resolveLogoPrompt: spec hygiene', () => {
+ const KNOWN = ['pumpfun logo', 'bitcoin logo', 'ethereum logo', 'solana logo', 'dogecoin logo'];
+
+ it('never emits the brand name inside a spec (letterforms reconstruct as noise)', () => {
+ for (const p of KNOWN) {
+ const hit = resolveLogoPrompt(p);
+ expect(hit).not.toBeNull();
+ const name = p.split(' ')[0];
+ expect(hit.prompt.toLowerCase()).not.toContain(name);
+ }
+ });
+
+ it('every spec carries the director composition constraints', () => {
+ for (const p of KNOWN) {
+ const { prompt } = resolveLogoPrompt(p);
+ expect(prompt).toMatch(/plain neutral background/);
+ expect(prompt).toMatch(/no text or watermark/);
+ expect(prompt).toMatch(/no second subject/);
+ }
+ });
+});
+
+describe('resolveLogoPrompt: reference views', () => {
+ it('pump.fun carries a reference view that exists under public/', async () => {
+ const hit = resolveLogoPrompt('pumpfun logo');
+ expect(hit.imagePath).toBe('/marks/pump-fun.png');
+ const { existsSync } = await import('node:fs');
+ const { fileURLToPath } = await import('node:url');
+ const path = await import('node:path');
+ const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../..');
+ expect(existsSync(path.join(root, 'public', hit.imagePath))).toBe(true);
+ });
+
+ it('marks without a reference view return imagePath null', () => {
+ expect(resolveLogoPrompt('bitcoin logo').imagePath).toBeNull();
+ });
+});
+
+describe('BRAND_MARK_DIRECTIVE', () => {
+ it('is embedded in both mesh director copies and forbids invented lettering', async () => {
+ expect(BRAND_MARK_DIRECTIVE).toMatch(/never invent lettering/i);
+ const { MESH_DIRECTOR } = await import('../../api/_lib/forge-director-prompts.js');
+ expect(MESH_DIRECTOR).toContain(BRAND_MARK_DIRECTIVE.trim());
+ });
+});