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
Home forge controls test + changelog/feature feeds
nirholas4dd66fbff38e
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 2ecd9a127..a4c27d694 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -52,9 +52,9 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Sharper, cleaner models from photos** — Four upgrades to photo-to-3D landed together. Uploaded photos now have their background cleanly removed before reconstruction, so a busy backdrop no longer bleeds into the model. You can supply up to 6 reference angles instead of 4 for fuller coverage. Every uploaded angle is now quality-checked, and a blurry or off-subject one is dropped instead of corrupting the result. And every finished model runs through an automatic geometry cleanup pass that welds and de-duplicates the mesh and trims redundant triangles, so models load faster and render cleaner with no loss of detail. (`/image-to-3d`) `[improvement, feature]`- **The 3D world looks sharper and shows more of the plaza** — Two fixes to how the world renders. First, sharpness: the world lowers render detail when frames get choppy (loading a crowded plaza, a tab hiccup, a background sync), but it could only ever step down and never recovered, so a single rough moment left the 3D permanently soft on high-resolution screens while the interface on top stayed crisp. It now climbs back to your device's full sharpness once frames are smooth again, and it re-tunes automatically when you drag the window between a laptop screen and an external monitor. Second, framing: the follow camera was zoomed in tight, cropping the totem and side screens at the edges. It now uses a wider lens so you see more of the plaza and the crowd around you at once. (`/play`) `[fix, improvement]`- **The agent-to-agent payment economy runs far cheaper and now cycles hundreds of distinct payers** — Two improvements to the closed-loop x402 agent economy that dogfoods every paid endpoint on the platform. First, a fix: a background wallet-consolidation job was quietly closing the ring's payment account after every settlement, forcing the next one to recreate it and pay account rent each time. That single bug had pushed the real fee cost to roughly a hundred times where it should be. With it fixed and single-signature settlement turned on, each settlement is back to the network floor of a few thousandths of a cent, and the ring's working balance stays in the loop instead of leaking away. Second, a new capability: the ring can now cycle payments through a reusable pool of hundreds to a thousand distinct wallets instead of one, so the economy reads as many participants rather than a single account, with no extra cost per payment. The pool is off until funded and activated, and every wallet in it stays clearly labeled internal dogfooding, not organic demand. (`/admin/ring`) `[fix, improvement, infra]`-- **The autonomous-trading scoreboard now counts only real on-chain trades** — The homepage's live trading panel promises "real positions, no simulation" — so its headline numbers now come only from trades that actually landed on-chain. Winning exits, best run, best ROI, and open positions all exclude paper (simulated) fills, which the engine writes while it runs in practice mode. Nothing is inflated: the board shows the true count of profitable trades agents have closed for real, and it moves the instant a genuine winning exit lands. `[fix, improvement]`+- **The autonomous-trading scoreboard now counts only real on-chain trades** — The homepage's live trading panel promises "real positions, no simulation", so its headline numbers now come only from trades that actually landed on-chain. Winning exits, best run, best ROI, and open positions all exclude paper (simulated) fills, which the engine writes while it runs in practice mode. Nothing is inflated: the board shows the true count of profitable trades agents have closed for real, and it moves the instant a genuine winning exit lands. `[fix, improvement]`- **The avatar shop and animation bazaar are now discoverable by paying agents** — Two paid endpoints, the premium cosmetic shop and the animation download bazaar, were being skipped during automated x402 discovery: a probe that arrived without a specific item id got a 400/404 before the payment layer could answer, so directory crawlers read them as "not a paid endpoint" and never listed them. They now return a proper payment challenge to any credential-less probe, so agents can find them, see the price, and pay, while real buyers still get precise errors for a missing or unknown item. `[fix]`-- **The homepage AR showcase leads with the best models, and its QR places the exact one you see** — The "Your 3D agent, in your room" section on the homepage now pulls from the top-voted community Forge gallery instead of a random newest-first bucket, so the model you land on is one of the best the community made, not a half-formed generation. And the desktop QR code finally keeps its promise: scanning it opens the exact model on screen in the AR studio and drops it into your space, instead of dumping you on a generic page. (`/`) `[fix]`+- **The homepage AR showcase is a real, live gallery now** — The "Your 3D agent, in your room" section on the homepage got a full rebuild. It now leads with the top-voted community Forge models (deduped and interleaved by category, so every slide is a different subject instead of three of the same), rendered on a soft-lit floor so they read as sitting in a space rather than floating in a void. The gallery auto-advances with progress dots, a thumbnail paints instantly while each model streams in, and the next one is prefetched so browsing is seamless. The desktop QR and the new "Open this model in AR" link both drop the exact model on screen into your room, a live count shows how many models the community has forged, and the whole carousel is keyboard-navigable with screen-reader announcements. (`/`) `[improvement]`- **The homepage community feed is now a live, browsable loop** — The strip of community models on the homepage used to be a fixed set of six. It is now a live feed you can actually browse: switch between Fresh and Trending, and press Show more to see more. New models made by anyone appear at the top on their own while you watch, with a live indicator so Right now stays honest. Each card still spins the real 3D model and opens it when clicked. (`/`) `[feature, improvement]`- **The homepage no longer greets you with an empty stage** — The live 3D agent on the homepage is the first thing you see, but on a cold visit it could sit as a blank near-black panel for several seconds while the model and 3D engine loaded. That gap is now filled with a gently breathing agent silhouette and a "summoning your agent" cue, so the stage feels alive from the very first paint instead of looking broken. It fades out the instant the real avatar is ready, respects reduced-motion settings, and if the preview ever stalls it now surfaces a retry instead of hanging on the placeholder. `[improvement]`- **The live money feed now refuels itself** — The Money Pulse at three.ws/pulse streams real on-chain agent activity, so it only moves when the autonomous agents have SOL to spend. When that fuel ran out, the feed went quiet until someone topped it up by hand. It now keeps itself running: when the funding root can't cover the agents' costs, it converts a small, capped slice of the platform's own USDC revenue into SOL automatically, and agents whose wallets can no longer be signed for are retired from the pool instead of stalling it. The feed stays live without manual intervention. (`/pulse`) `[infra, fix]`diff --git a/data/changelog.json b/data/changelog.jsonindex ed6da0a4b..b3fedd427 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -4,7 +4,7 @@{"date": "2026-07-17","title": "The autonomous-trading scoreboard now counts only real on-chain trades",- "summary": "The homepage's live trading panel promises \"real positions, no simulation\" — so its headline numbers now come only from trades that actually landed on-chain. Winning exits, best run, best ROI, and open positions all exclude paper (simulated) fills, which the engine writes while it runs in practice mode. Nothing is inflated: the board shows the true count of profitable trades agents have closed for real, and it moves the instant a genuine winning exit lands.",+ "summary": "The homepage's live trading panel promises \"real positions, no simulation\", so its headline numbers now come only from trades that actually landed on-chain. Winning exits, best run, best ROI, and open positions all exclude paper (simulated) fills, which the engine writes while it runs in practice mode. Nothing is inflated: the board shows the true count of profitable trades agents have closed for real, and it moves the instant a genuine winning exit lands.","tags": ["fix","improvement"@@ -22,8 +22,8 @@},{"date": "2026-07-17",- "title": "Granite-powered features stay up during an IBM outage",- "summary": "The IBM Granite features (the Granite Oracle, Agent Twin, and Galaxy cluster naming) all run one-shot Granite completions through IBM watsonx. If watsonx dropped a request (an auth, quota, or regional hiccup), those features had no backstop and failed outright. They now fall over to the same Granite model family hosted on OpenRouter, so a watsonx-side blip is invisible to the user and the feature keeps answering.",+ "title": "IBM Granite features stay up, and no longer need an IBM account",+ "summary": "Every Granite-powered feature (the Granite Oracle, Agent Twin, Galaxy cluster naming, Granite Vision image reads, and the IBM Granite brain in the model comparison) ran only on IBM watsonx, so a watsonx hiccup or a deployment without IBM credentials meant the feature failed or was hidden. They now fall over to the same Granite family hosted on OpenRouter (and a vision-capable model for image reads), so Granite keeps answering through an outage and stays selectable even where watsonx is not configured.","tags": ["infra","improvement"@@ -40,9 +40,10 @@{"date": "2026-07-17","title": "Real marketplace purchases now land in the Money Pulse",- "summary": "The Money Pulse's Purchases tab was wired to a source that only ever filled up when a synthetic circulation loop was running, so real skill and time-pass sales never showed. It now reads straight from the marketplace's own purchase ledger: the moment a sale confirms on-chain in $THREE, it appears as a Purchase beat in the live feed, fronted by the agent that earned it, alongside tips, launches, trades and payments. Free trials stay out, so a beat always means value actually changed hands.",+ "summary": "The Money Pulse's Purchases tab was wired to a source that only ever filled up when a synthetic circulation loop was running, so real skill and time-pass sales never showed. It now reads straight from the marketplace's own purchase ledger: the moment a sale confirms on-chain in $THREE, it appears as a Purchase beat in the live feed, fronted by the agent that earned it, alongside tips, launches, trades and payments. Free trials stay out, so a beat always means value actually changed hands. While we were in there, every empty filter now points you to the action that creates that beat (buy a skill, launch a coin, arm an agent, tip, pay), and we fixed a caching quirk that could briefly show a short feed page instead of a full one.","tags": [- "fix"+ "fix",+ "improvement"],"link": "/pulse"},@@ -57,10 +58,10 @@},{"date": "2026-07-17",- "title": "The homepage AR showcase leads with the best models, and its QR places the exact one you see",- "summary": "The \"Your 3D agent, in your room\" section on the homepage now pulls from the top-voted community Forge gallery instead of a random newest-first bucket, so the model you land on is one of the best the community made, not a half-formed generation. And the desktop QR code finally keeps its promise: scanning it opens the exact model on screen in the AR studio and drops it into your space, instead of dumping you on a generic page.",+ "title": "The homepage AR showcase is a real, live gallery now",+ "summary": "The \"Your 3D agent, in your room\" section on the homepage got a full rebuild. It now leads with the top-voted community Forge models (deduped and interleaved by category, so every slide is a different subject instead of three of the same), rendered on a soft-lit floor so they read as sitting in a space rather than floating in a void. The gallery auto-advances with progress dots, a thumbnail paints instantly while each model streams in, and the next one is prefetched so browsing is seamless. The desktop QR and the new \"Open this model in AR\" link both drop the exact model on screen into your room, a live count shows how many models the community has forged, and the whole carousel is keyboard-navigable with screen-reader announcements.","tags": [- "fix"+ "improvement"],"link": "/"},diff --git a/public/changelog.json b/public/changelog.jsonindex c0c246c36..3bc482dcb 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-17T23:29:01.425Z",+ "generated_at": "2026-07-17T23:31:44.345Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -493,7 +493,7 @@"date": "2026-07-17","type": "update","title": "The autonomous-trading scoreboard now counts only real on-chain trades",- "summary": "The homepage's live trading panel promises \"real positions, no simulation\" — so its headline numbers now come only from trades that actually landed on-chain. Winning exits, best run, best ROI, and open positions all exclude paper (simulated) fills, which the engine writes while it runs in practice mode. Nothing is inflated: the board shows the true count of profitable trades agents have closed for real, and it moves the instant a genuine winning exit lands.",+ "summary": "The homepage's live trading panel promises \"real positions, no simulation\", so its headline numbers now come only from trades that actually landed on-chain. Winning exits, best run, best ROI, and open positions all exclude paper (simulated) fills, which the engine writes while it runs in practice mode. Nothing is inflated: the board shows the true count of profitable trades agents have closed for real, and it moves the instant a genuine winning exit lands.","link": null,"tags": ["fix",@@ -513,11 +513,11 @@{"date": "2026-07-17","type": "update",- "title": "The homepage AR showcase leads with the best models, and its QR places the exact one you see",- "summary": "The \"Your 3D agent, in your room\" section on the homepage now pulls from the top-voted community Forge gallery instead of a random newest-first bucket, so the model you land on is one of the best the community made, not a half-formed generation. And the desktop QR code finally keeps its promise: scanning it opens the exact model on screen in the AR studio and drops it into your space, instead of dumping you on a generic page.",+ "title": "The homepage AR showcase is a real, live gallery now",+ "summary": "The \"Your 3D agent, in your room\" section on the homepage got a full rebuild. It now leads with the top-voted community Forge models (deduped and interleaved by category, so every slide is a different subject instead of three of the same), rendered on a soft-lit floor so they read as sitting in a space rather than floating in a void. The gallery auto-advances with progress dots, a thumbnail paints instantly while each model streams in, and the next one is prefetched so browsing is seamless. The desktop QR and the new \"Open this model in AR\" link both drop the exact model on screen into your room, a live count shows how many models the community has forged, and the whole carousel is keyboard-navigable with screen-reader announcements.","link": "/","tags": [- "fix"+ "improvement"]},{diff --git a/public/changelog.xml b/public/changelog.xmlindex 44c0d384d..2b9154218 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -380,7 +380,7 @@<guid isPermaLink="false">2026-07-17:The autonomous-trading scoreboard now counts only real on-chain trades</guid><pubDate>Fri, 17 Jul 2026 12:00:00 GMT</pubDate><category>fix</category>- <description>The homepage's live trading panel promises "real positions, no simulation" — so its headline numbers now come only from trades that actually landed on-chain. Winning exits, best run, best ROI, and open positions all exclude paper (simulated) fills, which the engine writes while it runs in practice mode. Nothing is inflated: the board shows the true count of profitable trades agents have closed for real, and it moves the instant a genuine winning exit lands.</description>+ <description>The homepage's live trading panel promises "real positions, no simulation", so its headline numbers now come only from trades that actually landed on-chain. Winning exits, best run, best ROI, and open positions all exclude paper (simulated) fills, which the engine writes while it runs in practice mode. Nothing is inflated: the board shows the true count of profitable trades agents have closed for real, and it moves the instant a genuine winning exit lands.</description></item><item><title>The avatar shop and animation bazaar are now discoverable by paying agents</title>@@ -391,12 +391,12 @@<description>Two paid endpoints, the premium cosmetic shop and the animation download bazaar, were being skipped during automated x402 discovery: a probe that arrived without a specific item id got a 400/404 before the payment layer could answer, so directory crawlers read them as "not a paid endpoint" and never listed them. They now return a proper payment challenge to any credential-less probe, so agents can find them, see the price, and pay, while real buyers still get precise errors for a missing or unknown item.</description></item><item>- <title>The homepage AR showcase leads with the best models, and its QR places the exact one you see</title>+ <title>The homepage AR showcase is a real, live gallery now</title><link>https://three.ws/</link>- <guid isPermaLink="false">2026-07-17:The homepage AR showcase leads with the best models, and its QR places the exact one you see</guid>+ <guid isPermaLink="false">2026-07-17:The homepage AR showcase is a real, live gallery now</guid><pubDate>Fri, 17 Jul 2026 12:00:00 GMT</pubDate>- <category>fix</category>- <description>The "Your 3D agent, in your room" section on the homepage now pulls from the top-voted community Forge gallery instead of a random newest-first bucket, so the model you land on is one of the best the community made, not a half-formed generation. And the desktop QR code finally keeps its promise: scanning it opens the exact model on screen in the AR studio and drops it into your space, instead of dumping you on a generic page.</description>+ <category>improvement</category>+ <description>The "Your 3D agent, in your room" section on the homepage got a full rebuild. It now leads with the top-voted community Forge models (deduped and interleaved by category, so every slide is a different subject instead of three of the same), rendered on a soft-lit floor so they read as sitting in a space rather than floating in a void. The gallery auto-advances with progress dots, a thumbnail paints instantly while each model streams in, and the next one is prefetched so browsing is seamless. The desktop QR and the new "Open this model in AR" link both drop the exact model on screen into your room, a live count shows how many models the community has forged, and the whole carousel is keyboard-navigable with screen-reader announcements.</description></item><item><title>The homepage community feed is now a live, browsable loop</title>diff --git a/public/features.json b/public/features.jsonindex 149fce9ad..849cd26c4 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-17T23:29:01.395Z",+ "generated_at": "2026-07-17T23:31:44.256Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",diff --git a/tests/home-forge-controls.test.js b/tests/home-forge-controls.test.jsnew file mode 100644index 000000000..71ce36b56--- /dev/null+++ b/tests/home-forge-controls.test.js@@ -0,0 +1,174 @@+// @vitest-environment jsdom+//+// The homepage mini-forge's Options controls (src/home-forge-controls.js) give+// the chamber the full /forge brains — quality tiers, a live engine picker,+// aspect, BYOK, and the $THREE High gate — rendered from the SAME+// /api/forge?catalog + ?health endpoints the full page reads. These tests pin+// the behavior that keeps the two surfaces from drifting and preserves the+// mini-forge's "Auto = health-routed, never dead-ends" default:+//+// 1. Auto is the default engine → getConfig() sends NO backend (health routing).+// 2. The tier + engine + aspect buttons are built from the catalog payload.+// 3. Picking a lane sends that backend; picking Auto clears it again.+// 4. A lane the ?health probe reports "down" is disabled and unpickable.+// 5. Aspect ratio flows through to the config; geometry lanes hide the aspect row.+// 6. An older deploy with no catalog yields an inert controller on free defaults.+//+// three-access / forge-pay are mocked: this suite is about the controls' own+// wiring, not the $THREE access network or the payment modal.++import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';++vi.mock('../src/three-access.js', () => ({+ getAccess: vi.fn(async () => ({ access: { eligible: false, feature: 'forge.high' }, tier: { level: 0 } })),+ getTierPass: vi.fn(async () => null),+ attachTierPass: vi.fn((h) => h),+ primeTierPass: vi.fn(),+}));+vi.mock('../src/three-lock.js', () => ({+ renderLock: vi.fn(),+ lockStateFromAccess: vi.fn((a) => a),+}));+vi.mock('../src/forge-pay.js', () => ({+ payForHighGeneration: vi.fn(async () => ({ ok: false })),+}));++import { initForgeControls } from '../src/home-forge-controls.js';++// A minimal catalog shaped like buildCatalog() in api/_lib/forge-tiers.js.+const CATALOG = {+ paths: ['image', 'geometry', 'sketch'],+ default_tier: 'standard',+ default_backend: { image: 'nvidia', geometry: 'hunyuan3d', sketch: 'triposg' },+ tiers: [+ { id: 'draft', label: 'Draft', blurb: 'Fast preview', price_usdc: '0.00' },+ { id: 'standard', label: 'Standard', blurb: 'Balanced', price_usdc: '0.00' },+ { id: 'high', label: 'High', blurb: '200k poly + PBR', price_usdc: '0.50' },+ ],+ backends: [+ { id: 'nvidia', label: 'NVIDIA', paths: ['image'], byok: null, free: true, user_images: false, configured: true, blurb: 'Free TRELLIS on NVIDIA NIM' },+ { id: 'hunyuan3d', label: 'Hunyuan3D', paths: ['image', 'geometry'], byok: null, free: true, user_images: true, configured: true, blurb: 'Self-hosted image→3D' },+ { id: 'meshy', label: 'Meshy', paths: ['image', 'geometry'], byok: 'meshy', free: false, user_images: true, configured: false, blurb: 'Meshy on your key' },+ { id: 'triposg', label: 'TripoSG', paths: ['sketch'], byok: null, free: true, user_images: false, configured: true, blurb: 'Sketch→3D' },+ ],+};++const HEALTH = { backends: { nvidia: { status: 'ok' }, hunyuan3d: { status: 'down', message: 'worker cold' }, meshy: { status: 'ok' } } };++function mountPanel() {+ document.body.innerHTML = `+ <section id="home-forge">+ <button data-hf-opts aria-expanded="false"></button>+ <div data-hf-panel hidden>+ <div class="hf-panel-row"><div data-hf-tier></div></div>+ <div class="hf-panel-row"><div data-hf-engine></div></div>+ <div class="hf-panel-row" data-hf-aspect-row><div data-hf-aspect></div></div>+ <div data-hf-byok hidden>+ <span data-hf-byok-label></span>+ <input data-hf-byok-key />+ <p data-hf-byok-hint></p>+ </div>+ <div data-hf-lock hidden></div>+ <p data-hf-perk hidden></p>+ </div>+ </section>`;+ return document.getElementById('home-forge');+}++function initWith({ catalog = CATALOG, health = HEALTH } = {}) {+ global.fetch = vi.fn(async (url) => {+ const u = String(url);+ if (u.includes('catalog')) return { ok: true, json: async () => catalog };+ if (u.includes('health')) return { ok: true, json: async () => health };+ return { ok: true, json: async () => ({}) };+ });+ const root = mountPanel();+ return initForgeControls({ root, clientHeaders: { 'x-forge-client': 'test' }, onRerun: vi.fn() });+}++describe('home-forge controls', () => {+ beforeEach(() => {+ vi.useRealTimers();+ });+ afterEach(() => {+ document.body.innerHTML = '';+ vi.restoreAllMocks();+ });++ it('defaults to Auto — getConfig sends no backend (server health-routes)', async () => {+ const c = initWith();+ await c.whenReady;+ const cfg = c.getConfig();+ expect(cfg.backend).toBeNull();+ expect(cfg.tier).toBe('standard');+ expect(cfg.aspect_ratio).toBe('1:1');+ expect(cfg.path).toBe('image');+ });++ it('builds tier + engine buttons from the catalog', async () => {+ const c = initWith();+ await c.whenReady;+ const tiers = [...document.querySelectorAll('[data-hf-tier] button')].map((b) => b.dataset.tier);+ expect(tiers).toEqual(['draft', 'standard', 'high']);+ // High carries the $THREE lock pill.+ expect(document.querySelector('[data-hf-tier] button[data-tier="high"] .hfc-lock')).toBeTruthy();+ const engines = [...document.querySelectorAll('[data-hf-engine] button')].map((b) => b.dataset.engine);+ // Auto first, then the text/photo lanes; the sketch-only lane (triposg) is dropped.+ expect(engines[0]).toBe('__auto');+ expect(engines).toContain('nvidia');+ expect(engines).toContain('hunyuan3d');+ expect(engines).not.toContain('triposg');+ });++ it('picking a lane sends that backend; re-picking Auto clears it', async () => {+ const c = initWith();+ await c.whenReady;+ document.querySelector('[data-hf-engine] button[data-engine="nvidia"]').click();+ expect(c.getConfig().backend).toBe('nvidia');+ document.querySelector('[data-hf-engine] button[data-engine="__auto"]').click();+ expect(c.getConfig().backend).toBeNull();+ });++ it('disables a lane the health probe reports down', async () => {+ const c = initWith();+ await c.whenReady;+ // loadHealth() runs after the catalog resolves; give its promise a tick.+ await new Promise((r) => setTimeout(r, 0));+ const down = document.querySelector('[data-hf-engine] button[data-engine="hunyuan3d"]');+ expect(down.disabled).toBe(true);+ expect(down.getAttribute('aria-disabled')).toBe('true');+ });++ it('aspect ratio flows into the config and hides for geometry lanes', async () => {+ const c = initWith();+ await c.whenReady;+ document.querySelector('[data-hf-aspect] button[data-aspect="16:9"]').click();+ expect(c.getConfig().aspect_ratio).toBe('16:9');+ // hunyuan3d exposes geometry → aspect row hides, path becomes geometry.+ await new Promise((r) => setTimeout(r, 0)); // let health settle first+ // hunyuan3d is down in HEALTH; pick meshy (geometry, configured via byok) instead.+ document.querySelector('[data-hf-engine] button[data-engine="meshy"]').click();+ expect(c.getConfig().path).toBe('geometry');+ expect(document.querySelector('[data-hf-aspect-row]').hidden).toBe(true);+ });++ it('surfaces the BYOK key row for a keyed lane and sends the key header', async () => {+ const c = initWith();+ await c.whenReady;+ document.querySelector('[data-hf-engine] button[data-engine="meshy"]').click();+ expect(document.querySelector('[data-hf-byok]').hidden).toBe(false);+ const input = document.querySelector('[data-hf-byok-key]');+ input.value = 'msy_live_key';+ input.dispatchEvent(new Event('input'));+ const headers = await c.buildHeaders({ 'content-type': 'application/json' });+ expect(headers['x-forge-provider-key']).toBe('msy_live_key');+ });++ it('yields an inert free-defaults controller when the catalog is missing', async () => {+ const c = initWith({ catalog: null });+ const ready = await c.whenReady;+ expect(ready).toBe(false);+ const cfg = c.getConfig();+ expect(cfg).toEqual({ tier: 'standard', path: 'image', backend: null, aspect_ratio: '1:1', byokKey: '' });+ });+});