Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
fix(creations): exclude root from lineage view, doc the gallery + gate proof
fudjia7b055c95a2f6
diff --git a/docs/remix.md b/docs/remix.mdindex fd7a4051e..8f03bfd78 100644--- a/docs/remix.md+++ b/docs/remix.md@@ -14,11 +14,26 @@ free OpenAI 3D Studio app.| Surface | Auth | What it does ||---|---|---|| `POST /api/forge-iterate` | `x-forge-client` | Conversational iteration, ownership-preserving (see below) |-| `GET /api/remix-feed` | none (free) | Browse remixable assets with provenance + royalty terms |+| `GET /api/remix-feed` | none (free) | Browse remixable assets with provenance + royalty terms; supports `category`, `q`, `sort` || `POST /api/remix-feed` `{action:'publish'}` | `x-forge-client` | Opt your own finished model into the bazaar, set license/royalty/payout wallet || `GET /api/remix-feed?action=lineage&root=<id>` | none (free) | Reconstruct a model's full refinement thread |+| `GET /api/remix-feed?action=trending` | none (free) | The most-remixed published assets, platform-wide |+| `GET /api/creations-leaderboard` | none (free) | Top creators by remix count + real on-chain royalty earned || `POST /api/x402/remix-asset` | x402 ($0.25 USDC) | Pay to remix a source; a royalty routes to its creator on-chain |+## The Creator Gallery — [/creations](https://three.ws/creations)++The discovery + remix front door (roadmap prompt 09): search, filter, and sort+the bazaar with a live `<model-viewer>` preview per card, a **Trending+remixes** strip and a **Top creators** leaderboard, a one-click "Remix — $0.25"+action wired to the same `window.X402.pay()` flow as Forge Studio, a lineage+viewer per card, and a publish form for opting your own creation in without+leaving the page. It reuses every endpoint on this page — no parallel data+store — and links out to `/minted` (tokenized mints) and an agent's `/agents/:id`+profile, which now surfaces a **3D Creations** card (every asset that agent has+minted as an NFT, via `GET /api/v1/tokenized/launches?agent_id=`) when the+creator behind a listing is an on-chain-identified agent.+Provenance is stored on the existing `forge_creations` rows — no parallel store:`parent_creation_id`, `refine_instruction`, `lineage_index`, `remixable`,`remix_royalty_bps`, `creator_wallet_solana`, `remix_settlement_ref`.diff --git a/prompts/roadmap/_generated/09/gate-after.txt b/prompts/roadmap/_generated/09/gate-after.txtnew file mode 100644index 000000000..472abc6de--- /dev/null+++ b/prompts/roadmap/_generated/09/gate-after.txt@@ -0,0 +1,110 @@++> [email protected] gate+> npm run test:gate && npm run test:gate-3d && npm run audit:mcp && npm run audit:mcp-golden && npm run audit:routes && npm run audit:handlers && npm run audit:pages && npm run audit:hidden-guard && npm run audit:x402-catalog && npm run audit:tokens+++> [email protected] test:gate+> node scripts/test-gate.mjs++[test-gate] running 7 critical-path test files…++ RUN v4.1.9 /workspaces/three.ws+++ Test Files 7 passed (7)+ Tests 83 passed (83)+ Start at 09:07:34+ Duration 2.89s (transform 2.12s, setup 0ms, import 4.14s, tests 2.91s, environment 1ms)++[test-gate] ✓ all critical-path tests passed++> [email protected] test:gate-3d+> vitest run tests/glb-canonicalize.test.js tests/animation-retarget.test.js tests/animation-retarget-rest-pollution.test.js tests/viewer-framing.test.js+++ RUN v4.1.9 /workspaces/three.ws+++ Test Files 4 passed (4)+ Tests 244 passed (244)+ Start at 09:07:37+ Duration 633ms (transform 449ms, setup 0ms, import 1.12s, tests 338ms, environment 1ms)+++> [email protected] audit:mcp+> node scripts/audit-mcp-manifests.mjs++[audit:mcp] 16 MCP manifests consistent++> [email protected] audit:mcp-golden+> node scripts/audit-mcp-golden.mjs++[audit:mcp-golden] 236 hosted MCP tool contracts match the golden fixture++> [email protected] audit:routes+> node scripts/verify-routes.mjs++Route verify — 302 catalog pages, 1070 main routes, 1 post-filesystem routes.+ modeled dist files: 1535 · canonical-covered: 302 · literal page routes checked for shadows: 455+ filesystem boundary (handle:filesystem) present: yes++ℹ 1 advisory note(s):+ TRAILSLASH /payments/ → notfound (lands on designed 404)++✓ static checks pass: every catalog page reachable, unknown paths → designed 404, no shadowed page routes.++> [email protected] audit:handlers+> node scripts/audit-empty-handlers.mjs++✓ audit-empty-handlers: all API handlers export a body (1644 checked)++> [email protected] audit:pages+> node scripts/audit-page-index.mjs++Route audit: 142 auditable page routes, 302 documented in pages.json.+✓ Every auditable page route is documented.++ℹ 6 manifest page(s) have no `added` date (omitted from /changelog). Fine for legacy pages; add dates as you touch them.++> [email protected] audit:hidden-guard+> node scripts/audit-hidden-guard.mjs++✓ audit-hidden-guard: all 267 pages resolve the [hidden] guard++> [email protected] audit:x402-catalog+> node scripts/audit-x402-catalog.mjs++✓ audit-x402-catalog: all 65 x402 endpoints are documented++> [email protected] audit:tokens+> node scripts/audit-token-drift.mjs+++✗ design-token drift increased: 4 hardcoded token-hexes (baseline 0).++ pages/vault.html: 4 (was 0)++These hexes literally equal a canonical token — use the var instead:+ #4ade80 → var(--success)+ #f87171 → var(--danger)+ #fbbf24 → var(--warn)+See DESIGN-TOKENS.md. If a page deliberately re-themes a token, define the+token locally (a theme layer) rather than hardcoding the raw hex.++EXIT:1++--- ISOLATION NOTE (prompt 09 agent) ---+The only failure above (audit:tokens, 4 hardcoded hexes) comes entirely from+pages/vault.html, an UNRELATED, uncommitted, in-progress file left in this+shared worktree by a concurrent sibling agent (not part of this prompt's diff;+never staged or committed by this agent). Proof: temporarily moving+pages/vault.html aside and re-running `node scripts/audit-token-drift.mjs`+in isolation:++ ✓ token drift unchanged: 0 hardcoded token-hex(es) (baseline 0).++pages/vault.html was restored immediately after (untouched, not modified).+Every other gate check (test:gate, test:gate-3d, audit:mcp, audit:mcp-golden,+audit:routes, audit:handlers, audit:pages, audit:hidden-guard,+audit:x402-catalog) is green. This prompt's changes introduce zero gate+regression.diff --git a/scripts/tmp-verify/verify-agent-detail-populated.mjs b/scripts/tmp-verify/verify-agent-detail-populated.mjsdeleted file mode 100644index 5a7f05d4b..000000000--- a/scripts/tmp-verify/verify-agent-detail-populated.mjs+++ /dev/null@@ -1,77 +0,0 @@-// Verification-only: intercepts the tokenized-launches response to confirm the-// renderMintedCreations() populated-card path renders without throwing. No-// mocked data ships anywhere — this script is deleted after verification; it-// only proves the DOM-construction code is correct, since production currently-// has zero tokenized_3d_assets rows (the feature just shipped this session).-import { chromium } from 'playwright';--const BASE = process.env.BASE_URL || 'http://localhost:45601';-const AGENT_ID = process.argv[2] || '42534db3-f8f8-48ae-a4cb-ad8b9b42b2d7';-const errors = [];--const browser = await chromium.launch();-const page = await browser.newPage({ viewport: { width: 1360, height: 900 } });-page.on('console', (msg) => { if (msg.type() === 'error') errors.push(msg.text()); });-page.on('pageerror', (err) => errors.push(`pageerror: ${err.message}`));--await page.route('**/api/v1/tokenized/launches**', async (route) => {- const url = new URL(route.request().url());- if (url.searchParams.get('network') === 'devnet') return route.continue();- await route.fulfill({- status: 200,- contentType: 'application/json',- body: JSON.stringify({- data: {- launches: [- {- mint: 'FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpumpTEST1',- network: 'mainnet',- name: 'Test Chrome Rocket',- glb_url: 'https://three.ws/cdn/test.glb',- viewer_url: 'https://three.ws/viewer?src=test',- royalty: { basis_points: 500, percent: 5, recipient: null },- parent_mint: null,- remix_royalty: null,- created_at: new Date().toISOString(),- agent: { id: AGENT_ID, name: 'Simply Sage', url: `/agents/${AGENT_ID}` },- },- {- mint: 'FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpumpTEST2',- network: 'mainnet',- name: 'Remixed Sneaker',- glb_url: 'https://three.ws/cdn/test2.glb',- viewer_url: 'https://three.ws/viewer?src=test2',- royalty: { basis_points: 800, percent: 8, recipient: 'somewallet' },- parent_mint: 'someParentMint',- remix_royalty: { paid: true, creator_usd: 0.02 },- created_at: new Date(Date.now() - 3600_000).toISOString(),- agent: { id: AGENT_ID, name: 'Simply Sage', url: `/agents/${AGENT_ID}` },- },- ],- has_more: false,- offset: 0,- limit: 6,- network: 'mainnet',- },- }),- });-});--await page.goto(`${BASE}/agents/${AGENT_ID}`, { waitUntil: 'load', timeout: 30000 });-await page.waitForTimeout(2500);--const hidden = await page.$eval('#ad-creations-card', (el) => el.hidden);-const bodyText = await page.$eval('#ad-creations-body', (el) => el.innerText);-console.log('card hidden (should be false):', hidden);-console.log('body text:\n', bodyText);--await page.$eval('#ad-creations-card', (el) => el.scrollIntoView({ block: 'center' }));-await page.waitForTimeout(300);-await page.screenshot({ path: '/tmp/claude-1000/-workspaces-three-ws/3af649c2-981d-4e27-bcc7-a1b386bdb681/scratchpad/agent-detail-populated.png', fullPage: false });--const appErrors = errors.filter((e) => !/websocket|WebSocket|CORS|401/i.test(e));-console.log('\n--- app-relevant console errors ---');-console.log(appErrors.length ? appErrors.join('\n') : '(none)');--await browser.close();-process.exit(hidden || appErrors.length ? 1 : 0);diff --git a/scripts/tmp-verify/verify-agent-detail.mjs b/scripts/tmp-verify/verify-agent-detail.mjsdeleted file mode 100644index fb45719b6..000000000--- a/scripts/tmp-verify/verify-agent-detail.mjs+++ /dev/null@@ -1,34 +0,0 @@-import { chromium } from 'playwright';--const BASE = process.env.BASE_URL || 'http://localhost:45601';-const AGENT_ID = process.argv[2] || '42534db3-f8f8-48ae-a4cb-ad8b9b42b2d7';-const errors = [];-const warnings = [];--const browser = await chromium.launch();-const page = await browser.newPage({ viewport: { width: 1360, height: 900 } });--page.on('console', (msg) => {- if (msg.type() === 'error') errors.push(msg.text());- if (msg.type() === 'warning') warnings.push(msg.text());-});-page.on('pageerror', (err) => errors.push(`pageerror: ${err.message}`));--console.log(`→ navigating to /agents/${AGENT_ID}`);-await page.goto(`${BASE}/agents/${AGENT_ID}`, { waitUntil: 'load', timeout: 30000 });-await page.waitForTimeout(3000); // let fire-and-forget renders (launch history, creations) settle--const title = await page.title();-console.log('title:', title);--const creationsCardHidden = await page.$eval('#ad-creations-card', (el) => el.hidden).catch(() => 'not found');-console.log('ad-creations-card hidden:', creationsCardHidden);--const appErrors = errors.filter((e) => !/websocket|WebSocket/i.test(e));-console.log('\n--- console errors (app-relevant) ---');-console.log(appErrors.length ? appErrors.join('\n') : '(none)');--await page.screenshot({ path: '/tmp/claude-1000/-workspaces-three-ws/3af649c2-981d-4e27-bcc7-a1b386bdb681/scratchpad/agent-detail.png', fullPage: false });--await browser.close();-process.exit(appErrors.length ? 1 : 0);diff --git a/scripts/tmp-verify/verify-creations.mjs b/scripts/tmp-verify/verify-creations.mjsdeleted file mode 100644index 543d56606..000000000--- a/scripts/tmp-verify/verify-creations.mjs+++ /dev/null@@ -1,85 +0,0 @@-import { chromium } from 'playwright';--const BASE = process.env.BASE_URL || 'http://localhost:45601';-const errors = [];-const warnings = [];-const networkFailures = [];--const browser = await chromium.launch();-const page = await browser.newPage({ viewport: { width: 1360, height: 900 } });--page.on('console', (msg) => {- if (msg.type() === 'error') errors.push(msg.text());- if (msg.type() === 'warning') warnings.push(msg.text());-});-page.on('pageerror', (err) => errors.push(`pageerror: ${err.message}`));-page.on('requestfailed', (req) => networkFailures.push(`${req.method()} ${req.url()} — ${req.failure()?.errorText}`));--console.log('→ navigating to /creations');-await page.goto(`${BASE}/creations`, { waitUntil: 'networkidle', timeout: 30000 });--// Wait for the feed + leaderboards to settle (aria-busy flips false).-await page.waitForFunction(() => document.getElementById('cr-feed')?.getAttribute('aria-busy') === 'false', { timeout: 15000 });-await page.waitForFunction(() => document.getElementById('cr-trending-list')?.getAttribute('aria-busy') === 'false', { timeout: 15000 });-await page.waitForFunction(() => document.getElementById('cr-creators-list')?.getAttribute('aria-busy') === 'false', { timeout: 15000 });--const title = await page.title();-console.log('title:', title);--const feedHTML = await page.$eval('#cr-feed', (el) => el.innerHTML.slice(0, 300));-console.log('feed (empty state check):', feedHTML.includes('cr-empty') ? 'EMPTY STATE RENDERED' : 'ITEMS RENDERED');--const trendingHTML = await page.$eval('#cr-trending-list', (el) => el.innerHTML.slice(0, 200));-console.log('trending list:', trendingHTML.includes('cr-lb-empty') ? 'EMPTY STATE RENDERED' : 'ROWS RENDERED');--const creatorsHTML = await page.$eval('#cr-creators-list', (el) => el.innerHTML.slice(0, 200));-console.log('creators list:', creatorsHTML.includes('cr-lb-empty') ? 'EMPTY STATE RENDERED' : 'ROWS RENDERED');--// Exercise search + sort + category controls for real (no mocked responses).-// Wait for aria-busy to fully settle between each interaction so successive-// fetches never overlap (matches the app's own `state.loading` guard).-const settled = () => page.waitForFunction(() => document.getElementById('cr-feed')?.getAttribute('aria-busy') === 'false', { timeout: 15000 });--await page.fill('#cr-q', 'dragon');-await page.waitForTimeout(500); // debounce window-await settled();-await page.click('[data-sort="remixed"]');-await settled();-await page.selectOption('#cr-category', 'avatar');-await settled();-await page.click('[data-sort="recent"]');-await settled();-await page.fill('#cr-q', '');-await page.waitForTimeout(500);-await settled();-await page.selectOption('#cr-category', '');-await settled();--// Publish form interactivity (no submit — just check it renders/updates).-await page.fill('#cr-pub-id', 'test-id-not-submitted');-await page.fill('#cr-pub-royalty', '15');-await page.evaluate(() => document.getElementById('cr-pub-royalty').dispatchEvent(new Event('input')));-const royaltyOut = await page.$eval('#cr-pub-royalty-out', (el) => el.textContent);-console.log('royalty output updates on drag:', royaltyOut);--await page.screenshot({ path: '/tmp/claude-1000/-workspaces-three-ws/3af649c2-981d-4e27-bcc7-a1b386bdb681/scratchpad/creations-empty.png', fullPage: true });--// Mobile viewport check-await page.setViewportSize({ width: 375, height: 800 });-await page.waitForTimeout(200);-await page.screenshot({ path: '/tmp/claude-1000/-workspaces-three-ws/3af649c2-981d-4e27-bcc7-a1b386bdb681/scratchpad/creations-mobile.png', fullPage: true });--// Filter out known dev-environment noise unrelated to the app: Vite HMR's-// websocket auto-targets the Codespace's port-3000 forwarding domain-// regardless of which port this ad-hoc verification server actually runs on.-const appErrors = errors.filter((e) => !/websocket|WebSocket/i.test(e));--console.log('\n--- console errors (app-relevant) ---');-console.log(appErrors.length ? appErrors.join('\n') : '(none)');-console.log('\n--- console warnings ---');-console.log(warnings.length ? warnings.join('\n') : '(none)');-console.log('\n--- network failures ---');-console.log(networkFailures.length ? networkFailures.join('\n') : '(none)');--await browser.close();-process.exit(appErrors.length || networkFailures.length ? 1 : 0);diff --git a/src/creations.js b/src/creations.jsindex 88889d879..b4bafa4cd 100644--- a/src/creations.js+++ b/src/creations.js@@ -382,7 +382,11 @@ async function openLineage(rootId) {});const data = await res.json().catch(() => ({}));if (!res.ok) throw new Error(data?.message || `lineage returned ${res.status}`);- const lineage = Array.isArray(data.lineage) ? data.lineage : [];+ // The API always includes the root creation itself as the first row (the+ // base case of its recursive walk) — only rows AFTER it are actual+ // remixes/refinements, so a root-only result means no remixes yet.+ const full = Array.isArray(data.lineage) ? data.lineage : [];+ const lineage = full.filter((node) => node.id !== rootId);if (!lineage.length) {chain.innerHTML = `<li class="cr-lineage-item"><span class="cr-lineage-body">No remixes yet — be the first to build on this one.</span></li>`;return;