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(cosmos): land the video page and coin3d follow-ups with the regenerated feeds
nirholas91286512f831
diff --git a/pages/create/video.html b/pages/create/video.htmlindex be1ec8bfd..43b282dcc 100644--- a/pages/create/video.html+++ b/pages/create/video.html@@ -725,6 +725,20 @@background: #140a0a;}+ /* ── Focus visibility ───────────────────────────────────────── */+ .back-btn:focus-visible,+ .avatar-thumb:focus-visible,+ .audio-drop:focus-within,+ .audio-file-clear:focus-visible,+ .generate-btn:focus-visible,+ .retry-btn:focus-visible,+ .video-action-btn:focus-visible,+ .note-action:focus-visible,+ .prompt-input:focus-visible {+ outline: 2px solid var(--accent);+ outline-offset: 2px;+ }+/* ── Responsive ─────────────────────────────────────────────── */@media (max-width: 780px) {main {@@ -790,6 +804,31 @@</div></div>+ <div class="offline-banner" id="offline-banner" role="status">+ <svg+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+ aria-hidden="true"+ >+ <circle cx="12" cy="12" r="10" />+ <line x1="12" y1="8" x2="12" y2="13" />+ <line x1="12" y1="16" x2="12.01" y2="16" />+ </svg>+ <div>+ <strong data-i18n="create_video.video_rendering_is_offline">Video rendering is offline</strong>+ <p data-i18n-html="create_video.the_gpu_renderer_behind_this_page">+ The GPU renderer behind this page is not reachable right now, so a+ generation would fail after the upload. Your avatars still animate in+ the <a href="/avatar-studio">Avatar Studio</a>, and+ <a href="/create/prompt">prompt to avatar</a> is unaffected.+ </p>+ </div>+ </div>+<div class="workspace"><!-- Left: 3D avatar preview + selector --><div class="avatar-panel">@@ -816,6 +855,20 @@<span class="avatar-select-loading" id="avatar-bar-loading"data-i18n="create_video.loading_avatars">Loading avatars…</span>+ <div class="avatar-bar-note" id="avatar-bar-empty">+ <span class="note-text" data-i18n="create_video.no_avatars_yet_make_one_and_it">+ No avatars yet. Make one and it shows up here, ready to speak.+ </span>+ <a class="note-action" href="/create" data-i18n="create_video.create_an_avatar">Create an avatar</a>+ </div>+ <div class="avatar-bar-note" id="avatar-bar-error">+ <span class="note-text" data-i18n="create_video.we_could_not_load_your_avatars">+ We could not load your avatars. Check your connection and try again.+ </span>+ <button class="note-action" type="button" id="avatar-bar-retry" data-i18n="create_video.retry">+ Retry+ </button>+ </div></div></div>@@ -823,13 +876,12 @@<div class="controls-panel"><!-- Audio --><div class="control-block">- <p class="control-label" data-i18n="create_video.audio_file">Audio file</p>+ <label class="control-label" for="audio-input" data-i18n="create_video.audio_file">Audio file</label><div class="audio-drop" id="audio-drop"><inputtype="file"accept="audio/*,.wav,.mp3,.m4a,.ogg,.flac"id="audio-input"- aria-label="Upload audio file"/><svgviewBox="0 0 24 24"diff --git a/public/changelog.json b/public/changelog.jsonindex eefbc8ad6..d8e2e393e 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-08-17T02:44:53.897Z",+ "generated_at": "2026-08-17T02:48:53.794Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",diff --git a/public/features.json b/public/features.jsonindex b6ff1aae3..d67e92397 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-08-17T02:44:53.797Z",+ "generated_at": "2026-08-17T02:48:53.620Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",diff --git a/src/coin3d/main.js b/src/coin3d/main.jsindex 9c6db34c6..ff20cd103 100644--- a/src/coin3d/main.js+++ b/src/coin3d/main.js@@ -451,6 +451,17 @@ function animate() {o.mesh.position.x = Math.cos(o.angle) * o.radius;o.mesh.position.z = Math.sin(o.angle) * o.radius;o.mesh.position.y = o.y + Math.sin(t * o.bob + o.phase) * 0.08;+ if (o.spawn !== undefined) {+ const k = (t - o.spawn) / 0.55;+ if (k >= 1) {+ o.mesh.scale.setScalar(1);+ o.spawn = undefined;+ } else {+ // Ease-out back: a touch of overshoot so the arrival reads as motion.+ const e = Math.max(0, 1 - Math.pow(1 - Math.max(0, k), 3));+ o.mesh.scale.setScalar(Math.max(0.001, e * (1 + Math.sin(e * Math.PI) * 0.12)));+ }+ }}stepPulses();@@ -1174,6 +1185,18 @@ function launchCard(l) {}// ── Boot ────────────────────────────────────────────────────────────────────+let marketTimer = null;++// The static <title> carries a data-i18n key, and the runtime i18n catalog pass+// lands asynchronously (and again on every locale switch). Without claiming+// ownership the way the shared runtime expects, that pass reverts the per-token+// title back to the generic page title.+function setPageTitle(text) {+ const el = document.querySelector('title');+ if (el) el.setAttribute('data-i18n-owned', '1');+ document.title = text;+}+async function main() {if (!mint) {renderLanding();@@ -1199,7 +1222,7 @@ async function main() {return;}- if (snapshot.name === 'Unknown token' && !snapshot.image && !snapshot.holders.length) {+ if (!isKnownToken(snapshot)) {setStatus('error', 'Token not found', `No on-chain data for ${mint}.`, {href: '/launches',label: 'Browse coins',@@ -1213,7 +1236,7 @@ async function main() {// of hanging on the loading spinner forever.renderHud(snapshot);setStatus(null);- document.title = `${snapshot.name}${snapshot.symbol ? ` ($${snapshot.symbol})` : ''} · 3D — three.ws`;+ setPageTitle(`${snapshot.name}${snapshot.symbol ? ` ($${snapshot.symbol})` : ''} · 3D · three.ws`);let sceneOk = true;try {@@ -1221,20 +1244,20 @@ async function main() {buildPulsePool();buildCoin(snapshot);buildGraduationRing(snapshot);- buildHolderGalaxy(snapshot);} catch (err) {sceneOk = false;console.warn('[coin3d] 3D scene unavailable, falling back to data view:', err?.message || err);showSceneFallback();}- // Async enrichment — none of these block the scene render.+ // Async enrichment. None of these block the scene render.+ loadHolders().then((h) => applyHolders(snapshot, h, sceneOk));fetchOracleConviction(mint, network).then((cv) => renderOracleSlot(cv, mint));fetchMarket(mint).then(applyMarket);fetchCoinIntel(mint, network).then(applyIntel);startTradePolling(mint);// Refresh market figures periodically so price/volume stay live.- setInterval(() => fetchMarket(mint).then(applyMarket), 60_000);+ marketTimer = setInterval(() => fetchMarket(mint).then(applyMarket), 60_000);// Expose the live scene for embedders and host pages (e.g. to react to the// loaded snapshot or drive the camera from the outside).@@ -1255,6 +1278,7 @@ function showSceneFallback() {addEventListener('beforeunload', () => {if (rafId) cancelAnimationFrame(rafId);if (tape.timer) clearInterval(tape.timer);+ if (marketTimer) clearInterval(marketTimer);renderer?.dispose?.();});diff --git a/src/collection-render.js b/src/collection-render.jsnew file mode 100644index 000000000..387d09e5d--- /dev/null+++ b/src/collection-render.js@@ -0,0 +1,183 @@+/**+ * My Collection: the pure card/state renderers.+ *+ * Split out of collection.js so the markup can be unit-tested without booting+ * the page controller (which fetches and mutates the DOM on import).+ */++import { walletChipHTML } from './shared/agent-wallet-chip.js';++const USDC_MINT = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';+const THREE_MINT = 'FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump';++function fmtDate(iso) {+ if (!iso) return '';+ return new Date(iso).toLocaleDateString(undefined, { month: 'short', day: 'numeric', year: 'numeric' });+}++function fmtAmount(amount, mint) {+ if (!amount) return '';+ const symbol = mint === THREE_MINT ? '$THREE' : mint === USDC_MINT ? 'USDC' : '';+ const val = (Number(amount) / 1_000_000).toFixed(2);+ return symbol ? `${val} ${symbol}` : val;+}++function fmtUsd(n) {+ if (n == null || Number.isNaN(Number(n))) return '';+ return `$${Number(n).toFixed(2)}`;+}++function esc(s) {+ return String(s ?? '').replace(/[&<>"']/g, (c) => (+ { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]+ ));+}++function explorerUrl(mint, network) {+ const base = network === 'devnet'+ ? 'https://explorer.solana.com/address/'+ : 'https://solscan.io/token/';+ const suffix = network === 'devnet' ? '?cluster=devnet' : '';+ return `${base}${mint}${suffix}`;+}++function skillCard(p) {+ const agentName = p.agent_name || 'Unknown agent';+ const thumb = p.agent_thumbnail+ ? `<img class="col-card-avatar" src="${esc(p.agent_thumbnail)}" alt="${esc(agentName)}" loading="lazy">`+ : `<div class="col-card-avatar placeholder" aria-hidden="true">⚡</div>`;++ const kindBadge = p.kind === 'trial'+ ? '<span class="badge badge-amber">Trial</span>'+ : '<span class="badge badge-green">Owned</span>';++ const nftLine = p.skill_nft_mint+ ? `<div class="col-card-nft">NFT: <a href="${esc(explorerUrl(p.skill_nft_mint, p.skill_nft_network))}" target="_blank" rel="noopener">${esc(`${p.skill_nft_mint.slice(0, 6)}…${p.skill_nft_mint.slice(-4)}`)}</a></div>`+ : '';++ const priceLine = p.amount ? `<span class="badge badge-muted">${esc(fmtAmount(p.amount, p.currency_mint))}</span>` : '';++ // Wallet chip for the publishing agent, only when the purchase record carries+ // its custodial Solana address. The buyer doesn't own the publisher agent, so+ // the chip renders isOwner:false (◎ Tip), letting the holder tip the creator+ // straight from their collection. getWalletStatus returns null without an+ // address, so showPending:false means the chip simply doesn't render.+ // Field names match what /api/users/me/purchased-skills actually selects+ // (agent_solana_*, aliased off agent_identities.meta). Reading the un-prefixed+ // names alone silently dropped every vanity address into a plain one.+ const agentRecord = {+ id: p.agent_id,+ name: p.agent_name,+ solana_address: p.solana_address || p.agent_solana_address || null,+ solana_vanity_prefix: p.solana_vanity_prefix || p.agent_solana_vanity_prefix || null,+ solana_vanity_suffix: p.solana_vanity_suffix || p.agent_solana_vanity_suffix || null,+ avatar_thumbnail_url: p.agent_thumbnail || null,+ };+ const walletLine = agentRecord.solana_address+ ? `<div class="col-card-wallet" style="margin-top:8px">${walletChipHTML(agentRecord, { isOwner: false, showPending: false, dense: true })}</div>`+ : '';++ const agentHref = p.agent_id+ ? `/marketplace/agents/${encodeURIComponent(p.agent_id)}`+ : '/marketplace';++ return `+ <article class="col-card">+ <div class="col-card-header">+ ${thumb}+ <div class="col-card-meta">+ <div class="col-card-skill">${esc(p.skill)}</div>+ <div class="col-card-agent">${esc(agentName)}</div>+ </div>+ </div>+ ${walletLine}+ <div class="col-card-badges">${kindBadge}${priceLine}</div>+ ${nftLine}+ <div class="col-card-footer">+ <span class="col-card-date">Purchased ${esc(fmtDate(p.confirmed_at || p.created_at))}</span>+ <a href="${esc(agentHref)}" class="col-cta">View agent<span class="sr-only"> ${esc(agentName)}</span></a>+ </div>+ </article>`;+}++function subCard(s) {+ const now = Date.now();+ const periodEnd = s.current_period_end ? new Date(s.current_period_end) : null;+ const isActive = s.status === 'active' && (!periodEnd || periodEnd > now);+ const isCancelled = s.status === 'cancelled' || s.status === 'canceled';++ const expiryClass = isActive ? 'active' : 'expired';+ const expiryText = periodEnd+ ? (isActive+ ? `Renews ${fmtDate(s.current_period_end)}`+ : `${isCancelled ? 'Ends' : 'Ended'} ${fmtDate(s.current_period_end)}`)+ : '';++ const statusBadge = isActive+ ? '<span class="badge badge-green">Active</span>'+ : isCancelled+ ? '<span class="badge badge-muted">Cancelled</span>'+ : '<span class="badge badge-amber">Expired</span>';++ const priceLine = s.price_usd != null+ ? `<span class="badge badge-muted">${esc(fmtUsd(s.price_usd))}${s.interval ? ` / ${esc(s.interval)}` : ''}</span>`+ : '';++ const planName = s.plan_name || 'Subscription';+ const creator = s.creator_name || 'Creator';+ const creatorHref = s.creator_username ? `/u/${encodeURIComponent(s.creator_username)}` : '/marketplace';+ const initial = esc((planName[0] || '🔄').toUpperCase());++ return `+ <article class="col-card">+ <div class="col-card-header">+ <div class="col-card-avatar placeholder" aria-hidden="true">${initial}</div>+ <div class="col-card-meta">+ <div class="col-card-skill">${esc(planName)}</div>+ <div class="col-card-agent">by ${esc(creator)}</div>+ </div>+ </div>+ <div class="col-card-badges">${statusBadge}${priceLine}</div>+ <div class="col-card-footer">+ <span class="col-sub-expiry ${expiryClass}">${esc(expiryText)}</span>+ <a href="${esc(creatorHref)}" class="col-cta">View creator<span class="sr-only"> ${esc(creator)}</span></a>+ </div>+ </article>`;+}++function skeletonGrid(n = 6) {+ return Array.from({ length: n }, () => `+ <div class="skeleton-card">+ <div class="col-card-header">+ <div class="col-card-avatar skeleton"></div>+ <div class="col-card-meta">+ <div class="skeleton-row skeleton" style="width:70%;margin-bottom:6px;"></div>+ <div class="skeleton-row skeleton" style="width:45%;"></div>+ </div>+ </div>+ <div class="skeleton-row skeleton" style="width:40%;"></div>+ <div style="display:flex;justify-content:space-between;margin-top:4px;">+ <div class="skeleton-row skeleton" style="width:40%;"></div>+ <div class="skeleton-row skeleton" style="width:25%;"></div>+ </div>+ </div>`).join('');+}++function emptyState(panel) {+ if (panel === 'skills') {+ return `+ <div class="col-empty">+ <svg width="48" height="48" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" aria-hidden="true"><path d="M13 10V3L4 14h7v7l9-11h-7z"/></svg>+ <h3>No skills yet</h3>+ <p>Browse the <a href="/marketplace">marketplace</a> and unlock premium agent skills.</p>+ </div>`;+ }+ return `+ <div class="col-empty">+ <svg width="48" height="48" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" aria-hidden="true"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>+ <h3>No subscriptions</h3>+ <p>Browse the <a href="/marketplace">marketplace</a> and subscribe to a creator to see it here.</p>+ </div>`;+}++export { esc, fmtDate, fmtAmount, fmtUsd, explorerUrl, skillCard, subCard, skeletonGrid, emptyState };diff --git a/src/collection.js b/src/collection.jsindex 0ed9e533b..545b8093d 100644--- a/src/collection.js+++ b/src/collection.js@@ -1,181 +1,11 @@/**- * My Collection page — shows all purchased skills and active subscriptions.+ * My Collection page controller: fetches the caller's purchases and+ * subscriptions, drives the loading / empty / error / populated states, and+ * owns the tablist. The card markup lives in collection-render.js.*/-import { walletChipHTML, wireWalletChips } from './shared/agent-wallet-chip.js';--const USDC_MINT = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';-const THREE_MINT = 'FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump';--function fmtDate(iso) {- if (!iso) return '';- return new Date(iso).toLocaleDateString(undefined, { month: 'short', day: 'numeric', year: 'numeric' });-}--function fmtAmount(amount, mint) {- if (!amount) return '';- const symbol = mint === THREE_MINT ? '$THREE' : mint === USDC_MINT ? 'USDC' : '';- const val = (Number(amount) / 1_000_000).toFixed(2);- return symbol ? `${val} ${symbol}` : val;-}--function fmtUsd(n) {- if (n == null || Number.isNaN(Number(n))) return '';- return `$${Number(n).toFixed(2)}`;-}--function esc(s) {- return String(s ?? '').replace(/[&<>"']/g, (c) => (- { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]- ));-}--function explorerUrl(mint, network) {- const base = network === 'devnet'- ? 'https://explorer.solana.com/address/'- : 'https://solscan.io/token/';- const suffix = network === 'devnet' ? '?cluster=devnet' : '';- return `${base}${mint}${suffix}`;-}--function skillCard(p) {- const agentName = p.agent_name || 'Unknown agent';- const thumb = p.agent_thumbnail- ? `<img class="col-card-avatar" src="${esc(p.agent_thumbnail)}" alt="${esc(agentName)}" loading="lazy">`- : `<div class="col-card-avatar placeholder" aria-hidden="true">⚡</div>`;-- const kindBadge = p.kind === 'trial'- ? '<span class="badge badge-amber">Trial</span>'- : '<span class="badge badge-green">Owned</span>';-- const nftLine = p.skill_nft_mint- ? `<div class="col-card-nft">NFT: <a href="${esc(explorerUrl(p.skill_nft_mint, p.skill_nft_network))}" target="_blank" rel="noopener">${esc(`${p.skill_nft_mint.slice(0, 6)}…${p.skill_nft_mint.slice(-4)}`)}</a></div>`- : '';-- const priceLine = p.amount ? `<span class="badge badge-muted">${esc(fmtAmount(p.amount, p.currency_mint))}</span>` : '';-- // Wallet chip for the publishing agent, only when the purchase record carries- // its custodial Solana address. The buyer doesn't own the publisher agent, so- // the chip renders isOwner:false (◎ Tip), letting the holder tip the creator- // straight from their collection. getWalletStatus returns null without an- // address, so showPending:false means the chip simply doesn't render.- // Field names match what /api/users/me/purchased-skills actually selects- // (agent_solana_*, aliased off agent_identities.meta). Reading the un-prefixed- // names alone silently dropped every vanity address into a plain one.- const agentRecord = {- id: p.agent_id,- name: p.agent_name,- solana_address: p.solana_address || p.agent_solana_address || null,- solana_vanity_prefix: p.solana_vanity_prefix || p.agent_solana_vanity_prefix || null,- solana_vanity_suffix: p.solana_vanity_suffix || p.agent_solana_vanity_suffix || null,- avatar_thumbnail_url: p.agent_thumbnail || null,- };- const walletLine = agentRecord.solana_address- ? `<div class="col-card-wallet" style="margin-top:8px">${walletChipHTML(agentRecord, { isOwner: false, showPending: false, dense: true })}</div>`- : '';-- const agentHref = p.agent_id- ? `/marketplace/agents/${encodeURIComponent(p.agent_id)}`- : '/marketplace';-- return `- <article class="col-card">- <div class="col-card-header">- ${thumb}- <div class="col-card-meta">- <div class="col-card-skill">${esc(p.skill)}</div>- <div class="col-card-agent">${esc(agentName)}</div>- </div>- </div>- ${walletLine}- <div class="col-card-badges">${kindBadge}${priceLine}</div>- ${nftLine}- <div class="col-card-footer">- <span class="col-card-date">Purchased ${esc(fmtDate(p.confirmed_at || p.created_at))}</span>- <a href="${esc(agentHref)}" class="col-cta">View agent<span class="sr-only"> ${esc(agentName)}</span></a>- </div>- </article>`;-}--function subCard(s) {- const now = Date.now();- const periodEnd = s.current_period_end ? new Date(s.current_period_end) : null;- const isActive = s.status === 'active' && (!periodEnd || periodEnd > now);- const isCancelled = s.status === 'cancelled' || s.status === 'canceled';-- const expiryClass = isActive ? 'active' : 'expired';- const expiryText = periodEnd- ? (isActive- ? `Renews ${fmtDate(s.current_period_end)}`- : `${isCancelled ? 'Ends' : 'Ended'} ${fmtDate(s.current_period_end)}`)- : '';-- const statusBadge = isActive- ? '<span class="badge badge-green">Active</span>'- : isCancelled- ? '<span class="badge badge-muted">Cancelled</span>'- : '<span class="badge badge-amber">Expired</span>';-- const priceLine = s.price_usd != null- ? `<span class="badge badge-muted">${esc(fmtUsd(s.price_usd))}${s.interval ? ` / ${esc(s.interval)}` : ''}</span>`- : '';-- const planName = s.plan_name || 'Subscription';- const creator = s.creator_name || 'Creator';- const creatorHref = s.creator_username ? `/u/${encodeURIComponent(s.creator_username)}` : '/marketplace';- const initial = esc((planName[0] || '🔄').toUpperCase());-- return `- <article class="col-card">- <div class="col-card-header">- <div class="col-card-avatar placeholder" aria-hidden="true">${initial}</div>- <div class="col-card-meta">- <div class="col-card-skill">${esc(planName)}</div>- <div class="col-card-agent">by ${esc(creator)}</div>- </div>- </div>- <div class="col-card-badges">${statusBadge}${priceLine}</div>- <div class="col-card-footer">- <span class="col-sub-expiry ${expiryClass}">${esc(expiryText)}</span>- <a href="${esc(creatorHref)}" class="col-cta">View creator<span class="sr-only"> ${esc(creator)}</span></a>- </div>- </article>`;-}--function skeletonGrid(n = 6) {- return Array.from({ length: n }, () => `- <div class="skeleton-card">- <div class="col-card-header">- <div class="col-card-avatar skeleton"></div>- <div class="col-card-meta">- <div class="skeleton-row skeleton" style="width:70%;margin-bottom:6px;"></div>- <div class="skeleton-row skeleton" style="width:45%;"></div>- </div>- </div>- <div class="skeleton-row skeleton" style="width:40%;"></div>- <div style="display:flex;justify-content:space-between;margin-top:4px;">- <div class="skeleton-row skeleton" style="width:40%;"></div>- <div class="skeleton-row skeleton" style="width:25%;"></div>- </div>- </div>`).join('');-}--function emptyState(panel) {- if (panel === 'skills') {- return `- <div class="col-empty">- <svg width="48" height="48" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" aria-hidden="true"><path d="M13 10V3L4 14h7v7l9-11h-7z"/></svg>- <h3>No skills yet</h3>- <p>Browse the <a href="/marketplace">marketplace</a> and unlock premium agent skills.</p>- </div>`;- }- return `- <div class="col-empty">- <svg width="48" height="48" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" aria-hidden="true"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>- <h3>No subscriptions</h3>- <p>Browse the <a href="/marketplace">marketplace</a> and subscribe to a creator to see it here.</p>- </div>`;-}+import { wireWalletChips } from './shared/agent-wallet-chip.js';+import { skillCard, subCard, skeletonGrid, emptyState } from './collection-render.js';function els() {return {diff --git a/src/cosmos.js b/src/cosmos.jsindex 85aa8fdea..b6341be86 100644--- a/src/cosmos.js+++ b/src/cosmos.js@@ -220,7 +220,7 @@ function stopTimers() {async function generate() {const prompt = els.prompt.value.trim();if (prompt.length < 3) {- showNote('err', 'Describe a world first — even a few words is enough.');+ showNote('err', 'Describe a world first. Even a few words is enough.');els.prompt.focus();return;}@@ -393,11 +393,18 @@ async function downloadClip() {}}+// A shared world has to arrive as a world. The link carries the clip itself plus+// the avatar and prompt that framed it, so the recipient opens the finished scene+// rather than a blank stage and a prefilled textarea.async function shareLink() {if (!lastVideoUrl) return;const url = new URL(window.location.href);+ url.search = '';url.searchParams.set('prompt', lastPrompt);+ url.searchParams.set('world', lastVideoUrl);if (activeAvatarUrl) url.searchParams.set('avatar', activeAvatarUrl);+ const seedVal = els.seed.value.trim();+ if (seedVal) url.searchParams.set('seed', seedVal);const link = url.toString();try {await navigator.clipboard.writeText(link);@@ -436,7 +443,18 @@ function init() {} else {selectAvatar(DEFAULT_AVATAR, { quiet: true });}- if (deepPrompt) els.prompt.value = deepPrompt.slice(0, 300);+ if (deepPrompt) {+ els.prompt.value = deepPrompt.slice(0, 300);+ lastPrompt = els.prompt.value;+ }+ const deepSeed = params.get('seed');+ if (deepSeed && Number.isFinite(Number(deepSeed))) els.seed.value = String(Math.trunc(Number(deepSeed)));++ // A shared world plays straight away. Only an https .mp4 is honored, matching+ // the durable URLs this lane hands out; anything else is ignored so a crafted+ // link cannot point the stage at arbitrary content.+ const deepWorld = params.get('world');+ if (deepWorld && /^https:\/\/[^\s]+\.mp4(\?[^\s]*)?$/i.test(deepWorld)) succeed(deepWorld);loadCommunityAvatars();