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.

chore: agent-detail/edit + discover + login/register + erc8004 register-ui polish

nirholas956e769e92d7
diff --git a/agent-detail.html b/agent-detail.html
index 635b8718e..f49ea06fe 100644
--- a/agent-detail.html
+++ b/agent-detail.html
@@ -220,6 +220,67 @@
<span class="ad-muted">Registry</span>
<span class="ad-trust-pills" id="ad-registries"></span>
</div>
+ <div class="ad-row ad-row-split" id="ad-sns-row" style="display:none">
+ <span class="ad-muted">SNS</span>
+ <span class="ad-mono" id="ad-sns"></span>
+ </div>
+ <div class="ad-row ad-row-split" id="ad-voice-row" style="display:none">
+ <span class="ad-muted">Voice</span>
+ <span id="ad-voice"></span>
+ </div>
+ </section>
+
+ <section class="ad-card" id="ad-reputation-card" style="display:none">
+ <div class="ad-card-head">
+ <span class="ad-bullet ad-bullet-amber"></span>
+ <h2>REPUTATION</h2>
+ </div>
+ <div class="ad-row ad-row-split">
+ <span class="ad-muted">Average score</span>
+ <span><b id="ad-rep-avg">—</b> / 5</span>
+ </div>
+ <div class="ad-row ad-row-split">
+ <span class="ad-muted">Feedback count</span>
+ <span id="ad-rep-count">0</span>
+ </div>
+ <div class="ad-row ad-row-split" id="ad-rep-stake-row" style="display:none">
+ <span class="ad-muted">Total stake</span>
+ <span id="ad-rep-stake"></span>
+ </div>
+ </section>
+
+ <section class="ad-card" id="ad-actions-card" style="display:none">
+ <div class="ad-card-head">
+ <span class="ad-bullet ad-bullet-green"></span>
+ <h2>RECENT ACTIONS</h2>
+ <span class="ad-pill ad-pill-muted" id="ad-actions-count">0</span>
+ </div>
+ <div id="ad-actions-list"></div>
+ </section>
+
+ <section class="ad-card" id="ad-memory-card" style="display:none">
+ <div class="ad-card-head">
+ <span class="ad-bullet"></span>
+ <h2>MEMORY</h2>
+ <span class="ad-pill ad-pill-muted" id="ad-memory-count">0</span>
+ </div>
+ <div id="ad-memory-list"></div>
+ </section>
+
+ <section class="ad-card" id="ad-strategy-card" style="display:none">
+ <div class="ad-card-head">
+ <span class="ad-bullet ad-bullet-violet"></span>
+ <h2>STRATEGY</h2>
+ </div>
+ <pre class="ad-raw" id="ad-strategy"></pre>
+ </section>
+
+ <section class="ad-card" id="ad-embed-policy-card" style="display:none">
+ <div class="ad-card-head">
+ <span class="ad-bullet ad-bullet-muted"></span>
+ <h2>EMBED POLICY</h2>
+ </div>
+ <div id="ad-embed-policy"></div>
</section>
<details class="ad-card ad-collapse">
diff --git a/agent-edit.html b/agent-edit.html
index caa7bdc1e..2421b6715 100644
--- a/agent-edit.html
+++ b/agent-edit.html
@@ -1364,7 +1364,6 @@
<div class="outfit-status" id="outfit-status" role="status" aria-live="polite"></div>
- <script type="module" src="/dist-lib/agent-3d.js"></script>
<script type="module" src="/src/agent-edit.js"></script>
<div id="footer-container"></div>
diff --git a/api/x/triggers.js b/api/x/triggers.js
index c84745782..b987838c6 100644
--- a/api/x/triggers.js
+++ b/api/x/triggers.js
@@ -44,7 +44,7 @@ export default wrap(async (req, res) => {
if (req.method === 'GET') {
const rows = await sql`
- select id, agent_id, kind, config, enabled, last_fired_at, created_at, updated_at
+ select id, agent_id, kind, config, enabled, auto_publish, last_fired_at, created_at, updated_at
from x_triggers
where user_id = ${user.id}
order by created_at desc
@@ -60,10 +60,11 @@ export default wrap(async (req, res) => {
try { validateConfig(kind, config); } catch (err) { return error(res, 400, 'validation_error', err.message); }
const agentId = typeof body?.agent_id === 'string' ? body.agent_id : null;
const enabled = body?.enabled !== false;
+ const autoPublish = body?.auto_publish !== false;
const rows = await sql`
- insert into x_triggers (user_id, agent_id, kind, config, enabled)
- values (${user.id}, ${agentId}, ${kind}, ${JSON.stringify(config)}::jsonb, ${enabled})
- returning id, agent_id, kind, config, enabled, last_fired_at, created_at, updated_at
+ insert into x_triggers (user_id, agent_id, kind, config, enabled, auto_publish)
+ values (${user.id}, ${agentId}, ${kind}, ${JSON.stringify(config)}::jsonb, ${enabled}, ${autoPublish})
+ returning id, agent_id, kind, config, enabled, auto_publish, last_fired_at, created_at, updated_at
`;
return json(res, 201, { trigger: rows[0] });
}
@@ -80,14 +81,16 @@ export default wrap(async (req, res) => {
try { validateConfig(existing.kind, nextConfig); } catch (err) { return error(res, 400, 'validation_error', err.message); }
}
const nextEnabled = typeof body?.enabled === 'boolean' ? body.enabled : null;
+ const nextAuto = typeof body?.auto_publish === 'boolean' ? body.auto_publish : null;
const rows = await sql`
update x_triggers
set config = ${JSON.stringify(nextConfig)}::jsonb,
enabled = coalesce(${nextEnabled}, enabled),
+ auto_publish = coalesce(${nextAuto}, auto_publish),
updated_at = now()
where id = ${id} and user_id = ${user.id}
- returning id, agent_id, kind, config, enabled, last_fired_at, created_at, updated_at
+ returning id, agent_id, kind, config, enabled, auto_publish, last_fired_at, created_at, updated_at
`;
return json(res, 200, { trigger: rows[0] });
}
diff --git a/app.html b/app.html
index a0dac0fd8..efcd26b91 100644
--- a/app.html
+++ b/app.html
@@ -47,6 +47,7 @@
<link rel="apple-touch-icon" href="/pwa-192x192.png" />
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="/fonts/fonts.css" />
+ <link rel="stylesheet" href="/footer.css" />
<script defer type="module" src="/src/app.js"></script>
<link rel="stylesheet" href="/nav.css" />
</head>
diff --git a/public/dashboard/dashboard.js b/public/dashboard/dashboard.js
index 687607eb4..8c36baa24 100644
--- a/public/dashboard/dashboard.js
+++ b/public/dashboard/dashboard.js
@@ -906,6 +906,70 @@ async function loadXPanel({ host, meterEl, bodyEl, avatar }) {
loadScheduledPosts(scheduledEl);
loadXTriggers(triggersEl, avatar);
+ loadXReviews(reviewsEl);
+ loadXAnalytics(analyticsEl, avatar);
+}
+
+async function loadXReviews(host) {
+ if (!host) return;
+ try {
+ const r = await fetch('/api/x/reviews', { credentials: 'include' });
+ const reviews = (await r.json()).reviews || [];
+ if (!reviews.length) { host.innerHTML = ''; return; }
+ host.innerHTML = `
+ <div class="muted" style="font-size:11px;text-transform:uppercase;letter-spacing:0.07em;margin-bottom:6px;color:#ffb84d">⚠ ${reviews.length} draft${reviews.length === 1 ? '' : 's'} awaiting your review</div>
+ ${reviews.map((r) => `
+ <div style="padding:10px 12px;background:#1a1408;border:1px solid #3a2a14;border-radius:8px;margin-bottom:6px">
+ <div style="color:#ccc;font-size:13px;white-space:pre-wrap">${esc(r.text)}</div>
+ <div class="row" style="gap:6px;margin-top:8px">
+ <button class="btn" data-approve="${attr(r.id)}" style="font-size:11px;padding:4px 10px">Approve & post</button>
+ <button class="btn sec" data-reject="${attr(r.id)}" style="font-size:11px;padding:4px 10px">Reject</button>
+ <span class="muted" style="font-size:11px;margin-left:auto">${new Date(r.created_at).toLocaleString()}</span>
+ </div>
+ </div>
+ `).join('')}
+ `;
+ host.querySelectorAll('[data-approve]').forEach((btn) => {
+ btn.addEventListener('click', async () => {
+ const id = btn.getAttribute('data-approve');
+ btn.disabled = true;
+ const r = await fetch(`/api/x/reviews?id=${encodeURIComponent(id)}`, {
+ method: 'PATCH', credentials: 'include',
+ headers: { 'content-type': 'application/json' },
+ body: JSON.stringify({ action: 'approve', append_link: true }),
+ });
+ if (!r.ok) { alert((await r.json()).error_description || 'approve failed'); btn.disabled = false; return; }
+ loadXReviews(host);
+ });
+ });
+ host.querySelectorAll('[data-reject]').forEach((btn) => {
+ btn.addEventListener('click', async () => {
+ const id = btn.getAttribute('data-reject');
+ await fetch(`/api/x/reviews?id=${encodeURIComponent(id)}`, { method: 'DELETE', credentials: 'include' });
+ loadXReviews(host);
+ });
+ });
+ } catch {}
+}
+
+async function loadXAnalytics(host, avatar) {
+ if (!host) return;
+ try {
+ const r = await fetch(`/api/x/analytics?agent_id=${encodeURIComponent(avatar.agent_id || avatar.id)}`, { credentials: 'include' });
+ const data = await r.json();
+ const t = data.totals || {};
+ if (!t.posts) { host.innerHTML = ''; return; }
+ host.innerHTML = `
+ <div class="muted" style="font-size:11px;text-transform:uppercase;letter-spacing:0.07em;margin-bottom:6px">Engagement (last 50 posts)</div>
+ <div class="row" style="gap:14px;flex-wrap:wrap;font-size:12px;color:#ccc">
+ <div><b>${t.posts}</b> <span class="muted">posts</span></div>
+ <div><b>${t.likes}</b> <span class="muted">likes</span></div>
+ <div><b>${t.retweets}</b> <span class="muted">RTs</span></div>
+ <div><b>${t.replies}</b> <span class="muted">replies</span></div>
+ <div><b>${t.impressions.toLocaleString()}</b> <span class="muted">impressions</span></div>
+ </div>
+ `;
+ } catch {}
}
async function loadXTriggers(host, avatar) {
@@ -944,8 +1008,13 @@ async function loadXTriggers(host, avatar) {
const priceThresholds = (byKind.price_milestone?.config?.thresholds_usd ?? [10000, 50000, 100000, 500000, 1000000]).join(', ');
const paymentMin = byKind.payment_received?.config?.min_amount_usd ?? 1;
+ const anyReviewMode = triggers.some((t) => t.auto_publish === false);
+
host.innerHTML = `
- <div class="muted" style="font-size:11px;text-transform:uppercase;letter-spacing:0.07em;margin-bottom:8px">Auto-post triggers</div>
+ <div class="row" style="justify-content:space-between;margin-bottom:8px">
+ <div class="muted" style="font-size:11px;text-transform:uppercase;letter-spacing:0.07em">Auto-post triggers</div>
+ <label class="muted" style="font-size:11px"><input type="checkbox" data-trig-review-all ${anyReviewMode ? 'checked' : ''} style="width:auto;display:inline-block;margin-right:4px;vertical-align:middle"> Review before publish</label>
+ </div>
${row('daily_persona', 'Daily in-character post',
'Agent tweets once a day at your chosen UTC hour, in voice.',
`<label style="font-size:12px;color:#888">UTC hour <input type="number" min="0" max="23" data-trig-input="daily_persona.hour_utc" value="${dailyHour}" style="width:60px;display:inline-block;margin-left:6px"></label>
@@ -992,16 +1061,39 @@ async function loadXTriggers(host, avatar) {
if (!r.ok) throw new Error((await r.json()).error_description || 'update failed');
byKind[kind] = (await r.json()).trigger;
} else {
+ const autoPublish = !host.querySelector('[data-trig-review-all]')?.checked;
const r = await fetch('/api/x/triggers', {
method: 'POST', credentials: 'include',
headers: { 'content-type': 'application/json' },
- body: JSON.stringify({ kind, config, enabled, agent_id: agentId }),
+ body: JSON.stringify({ kind, config, enabled, agent_id: agentId, auto_publish: autoPublish }),
});
if (!r.ok) throw new Error((await r.json()).error_description || 'create failed');
byKind[kind] = (await r.json()).trigger;
}
}
+ const reviewAllEl = host.querySelector('[data-trig-review-all]');
+ if (reviewAllEl) {
+ reviewAllEl.addEventListener('change', async () => {
+ const autoPublish = !reviewAllEl.checked;
+ const ids = Object.values(byKind).map((t) => t.id);
+ for (const id of ids) {
+ try {
+ const r = await fetch(`/api/x/triggers?id=${encodeURIComponent(id)}`, {
+ method: 'PATCH', credentials: 'include',
+ headers: { 'content-type': 'application/json' },
+ body: JSON.stringify({ auto_publish: autoPublish }),
+ });
+ if (r.ok) {
+ const t = (await r.json()).trigger;
+ byKind[t.kind] = t;
+ }
+ } catch {}
+ }
+ setTrigMsg(autoPublish ? 'Auto-publish enabled.' : 'New trigger drafts will require your review.');
+ });
+ }
+
host.querySelectorAll('[data-trig]').forEach((cb) => {
cb.addEventListener('change', async () => {
const kind = cb.getAttribute('data-trig');
diff --git a/public/discover/discover.js b/public/discover/discover.js
index add768318..b8ef58f9c 100644
--- a/public/discover/discover.js
+++ b/public/discover/discover.js
@@ -72,9 +72,13 @@ for (const c of CHAINS) {
}
// Hydrate initial state from URL so deep links from register-ui (?q=…) and
-// browser back/forward restore the user's filters.
+// browser back/forward restore the user's filters. The marketplace is a 3D
+// showcase first — when no `only3d` param is present, default to 3D. Pass
+// `only3d=0` (or click the "All agents" chip) to opt into the full firehose.
const initialParams = new URLSearchParams(location.search);
-const initialFilter = initialParams.get('only3d') === '1' ? '3d' : 'all';
+const hasAnyParam = initialParams.toString().length > 0;
+const only3dParam = initialParams.get('only3d');
+const initialFilter = only3dParam === '0' ? 'all' : '3d';
const initialChain = initialParams.get('chain') || '';
const initialQuery = initialParams.get('q') || '';
const initialSource = ['onchain', 'avatar'].includes(initialParams.get('source'))
@@ -112,7 +116,11 @@ if (els.sources && initialSource !== 'all') {
/** Sync state into URL via replaceState (no history spam). */
function syncUrl() {
const p = new URLSearchParams();
+ // 3D is the default — encode the opposite explicitly so /discover (no
+ // params) and /discover?only3d=1 both mean "3D only", while clicking
+ // "All agents" produces /discover?only3d=0 (sticky on reload).
if (state.filter === '3d') p.set('only3d', '1');
+ else p.set('only3d', '0');
if (state.source !== 'all') p.set('source', state.source);
if (state.chainId) p.set('chain', state.chainId);
if (state.query) p.set('q', state.query);
@@ -175,6 +183,12 @@ els.searchClear?.addEventListener('click', () => {
// Initial visibility (covers ?q= deep links).
updateSearchClearVisibility();
+// If we defaulted to 3D-only (no params on the URL), reflect that in the URL
+// so the user can copy/share the canonical view.
+if (!hasAnyParam) {
+ syncUrl();
+}
+
els.loadMore.addEventListener('click', () => loadPage());
// Delegated embed-button click — cards can be re-rendered freely
@@ -287,13 +301,50 @@ function renderCard(item) {
return renderOnchainCard(item);
}
+/**
+ * Card thumbnail. Priority:
+ * 1. Static image (R2 thumbnail or remote PNG)
+ * 2. Live <model-viewer> preview of the GLB (lazy, no controls)
+ * 3. Emoji placeholder
+ * model-viewer is loaded once via index.html; lazy reveal limits work to
+ * cards actually in viewport.
+ */
+function renderThumb({ image, glbUrl, has3d, alt }) {
+ if (image) {
+ return `<img src="${escapeAttr(image)}" alt="${escapeAttr(alt || '')}" loading="lazy" onerror="this.replaceWith(Object.assign(document.createElement('div'),{className:'explore-card-ph',textContent:'${has3d ? '🎭' : '🤖'}'}))" />`;
+ }
+ if (glbUrl) {
+ return `<model-viewer
+ src="${escapeAttr(glbUrl)}"
+ alt="${escapeAttr(alt || '')}"
+ class="explore-card-mv"
+ reveal="auto"
+ loading="lazy"
+ disable-zoom
+ disable-pan
+ disable-tap
+ interaction-prompt="none"
+ camera-controls="false"
+ auto-rotate
+ rotation-per-second="20deg"
+ environment-image="neutral"
+ shadow-intensity="0"
+ exposure="1"
+ ></model-viewer>`;
+ }
+ return `<div class="explore-card-ph">${has3d ? '🎭' : '🤖'}</div>`;
+}
+
function renderOnchainCard(item) {
const card = document.createElement('article');
card.className = 'explore-card' + (item.has3d ? ' explore-card--3d' : '');
- const thumb = item.image
- ? `<img src="${escapeAttr(item.image)}" alt="" loading="lazy" />`
- : `<div class="explore-card-ph">${item.has3d ? '🎭' : '🤖'}</div>`;
+ const thumb = renderThumb({
+ image: item.image,
+ glbUrl: item.glbUrl,
+ has3d: item.has3d,
+ alt: item.name,
+ });
const badges = [];
badges.push(
@@ -347,9 +398,12 @@ function renderAvatarCard(item) {
const card = document.createElement('article');
card.className = 'explore-card explore-card--3d explore-card--avatar';
- const thumb = item.image
- ? `<img src="${escapeAttr(item.image)}" alt="" loading="lazy" />`
- : `<div class="explore-card-ph">🎭</div>`;
+ const thumb = renderThumb({
+ image: item.image,
+ glbUrl: item.glbUrl,
+ has3d: true,
+ alt: item.name,
+ });
const badges = [
`<span class="explore-badge explore-badge--avatar">Public avatar</span>`,
diff --git a/public/discover/index.html b/public/discover/index.html
index e5761a324..bcb8cad93 100644
--- a/public/discover/index.html
+++ b/public/discover/index.html
@@ -31,6 +31,23 @@
<link rel="stylesheet" href="/style.css" />
<link rel="stylesheet" href="/nav.css" />
<link rel="stylesheet" href="/fonts/fonts.css" />
+ <script
+ type="module"
+ src="https://ajax.googleapis.com/ajax/libs/model-viewer/4.0.0/model-viewer.min.js"
+ ></script>
+ <style>
+ .explore-card-thumb model-viewer.explore-card-mv {
+ width: 100%;
+ height: 100%;
+ display: block;
+ background: transparent;
+ /* Card thumb is wrapped in an <a> — let clicks pass through. */
+ pointer-events: none;
+ --poster-color: transparent;
+ --progress-bar-color: rgba(255, 255, 255, 0.4);
+ --progress-bar-height: 2px;
+ }
+ </style>
</head>
<body class="features-page explore-page">
<header>
diff --git a/public/login.html b/public/login.html
index dcb9bc8f6..c3c386348 100644
--- a/public/login.html
+++ b/public/login.html
@@ -504,15 +504,15 @@
<p class="sub">Sign in to manage your avatars.</p>
<div class="chain-tabs" role="tablist" aria-label="Wallet chain">
- <button type="button" class="chain-tab active" data-chain="evm" role="tab" aria-selected="true" aria-controls="evm-panel">EVM</button>
- <button type="button" class="chain-tab" data-chain="solana" role="tab" aria-selected="false" aria-controls="solana-panel">Solana</button>
+ <button type="button" class="chain-tab active" data-chain="solana" role="tab" aria-selected="true" aria-controls="solana-panel">Solana</button>
+ <button type="button" class="chain-tab" data-chain="evm" role="tab" aria-selected="false" aria-controls="evm-panel">EVM</button>
</div>
- <div id="evm-panel" class="chain-panel active" role="tabpanel">
- <div id="wallet-mount"></div>
- </div>
- <div id="solana-panel" class="chain-panel" role="tabpanel">
+ <div id="solana-panel" class="chain-panel active" role="tabpanel">
<div id="solana-wallet-mount"></div>
</div>
+ <div id="evm-panel" class="chain-panel" role="tabpanel">
+ <div id="wallet-mount"></div>
+ </div>
<p class="wallet-step-hint" title="Your wallet will prompt twice — once to connect, once to sign.">Wallet prompts to connect, then to sign.</p>
<div class="or-divider">or</div>
@@ -702,22 +702,26 @@
// ── Wallet chain tabs ──
const solanaTab = document.querySelector('.chain-tab[data-chain="solana"]');
+ const evmTab = document.querySelector('.chain-tab[data-chain="evm"]');
+ function activateChain(chain) {
+ document.querySelectorAll('.chain-tab').forEach((x) => {
+ const on = x.dataset.chain === chain;
+ x.classList.toggle('active', on);
+ x.setAttribute('aria-selected', on ? 'true' : 'false');
+ });
+ document.getElementById('evm-panel').classList.toggle('active', chain === 'evm');
+ document.getElementById('solana-panel').classList.toggle('active', chain === 'solana');
+ }
const hasSolana = !!(window.solana || window.phantom?.solana || window.backpack || window.solflare);
if (solanaTab && !hasSolana) {
solanaTab.disabled = true;
solanaTab.title = 'Install Phantom, Backpack, or Solflare to use Solana';
+ activateChain('evm');
}
document.querySelectorAll('.chain-tab').forEach((t) => {
t.addEventListener('click', () => {
if (t.disabled) return;
- const chain = t.dataset.chain;
- document.querySelectorAll('.chain-tab').forEach((x) => {
- const on = x.dataset.chain === chain;
- x.classList.toggle('active', on);
- x.setAttribute('aria-selected', on ? 'true' : 'false');
- });
- document.getElementById('evm-panel').classList.toggle('active', chain === 'evm');
- document.getElementById('solana-panel').classList.toggle('active', chain === 'solana');
+ activateChain(t.dataset.chain);
});
});
diff --git a/public/register.html b/public/register.html
index 5f8263564..b9ecbe35c 100644
--- a/public/register.html
+++ b/public/register.html
@@ -354,15 +354,15 @@
<p class="sub">Get started free. <span class="badge">✓ No email needed</span></p>
<div class="chain-tabs" role="tablist" aria-label="Wallet chain">
- <button type="button" class="chain-tab active" data-chain="evm" role="tab" aria-selected="true" aria-controls="evm-panel">EVM</button>
- <button type="button" class="chain-tab" data-chain="solana" role="tab" aria-selected="false" aria-controls="solana-panel">Solana</button>
+ <button type="button" class="chain-tab active" data-chain="solana" role="tab" aria-selected="true" aria-controls="solana-panel">Solana</button>
+ <button type="button" class="chain-tab" data-chain="evm" role="tab" aria-selected="false" aria-controls="evm-panel">EVM</button>
</div>
- <div id="evm-panel" class="chain-panel active" role="tabpanel">
- <div id="wallet-mount"></div>
- </div>
- <div id="solana-panel" class="chain-panel" role="tabpanel">
+ <div id="solana-panel" class="chain-panel active" role="tabpanel">
<div id="solana-wallet-mount"></div>
</div>
+ <div id="evm-panel" class="chain-panel" role="tabpanel">
+ <div id="wallet-mount"></div>
+ </div>
<p class="hint" style="margin-top:10px;text-align:center;font-size:11px;color:#555;cursor:help" title="Your wallet will prompt twice — once to connect, once to sign.">Wallet prompts to connect, then to sign.</p>
<div class="divider">or</div>
@@ -566,22 +566,25 @@
// Wallet chain tabs + Solana detection
(function () {
const solanaTab = document.querySelector('.chain-tab[data-chain="solana"]');
+ function activateChain(chain) {
+ document.querySelectorAll('.chain-tab').forEach((x) => {
+ const on = x.dataset.chain === chain;
+ x.classList.toggle('active', on);
+ x.setAttribute('aria-selected', on ? 'true' : 'false');
+ });
+ document.getElementById('evm-panel').classList.toggle('active', chain === 'evm');
+ document.getElementById('solana-panel').classList.toggle('active', chain === 'solana');
+ }
const hasSolana = !!(window.solana || window.phantom?.solana || window.backpack || window.solflare);
if (solanaTab && !hasSolana) {
solanaTab.disabled = true;
solanaTab.title = 'Install Phantom, Backpack, or Solflare to use Solana';
+ activateChain('evm');
}
document.querySelectorAll('.chain-tab').forEach((t) => {
t.addEventListener('click', () => {
if (t.disabled) return;
- const chain = t.dataset.chain;
- document.querySelectorAll('.chain-tab').forEach((x) => {
- const on = x.dataset.chain === chain;
- x.classList.toggle('active', on);
- x.setAttribute('aria-selected', on ? 'true' : 'false');
- });
- document.getElementById('evm-panel').classList.toggle('active', chain === 'evm');
- document.getElementById('solana-panel').classList.toggle('active', chain === 'solana');
+ activateChain(t.dataset.chain);
});
});
diff --git a/public/studio/launch-panel.js b/public/studio/launch-panel.js
index 9b35c607a..c85bae129 100644
--- a/public/studio/launch-panel.js
+++ b/public/studio/launch-panel.js
@@ -221,6 +221,7 @@ const LP_CSS = `
background:rgba(246,179,179,.06);border:1px solid rgba(246,179,179,.22);border-radius:8px;
font-size:.73rem;color:rgba(255,221,221,.85);line-height:1.35}
.lp-link-row.checking{background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.08);color:rgba(255,255,255,.5)}
+.lp-link-row.conflict{background:rgba(255,196,114,.08);border-color:rgba(255,196,114,.32);color:rgba(255,230,194,.9)}
.lp-link-row .lp-link-info{flex:1;min-width:0}
.lp-link-row .lp-link-title{display:block;font-weight:500;color:#fff;margin-bottom:.1rem;font-size:.78rem}
.lp-link-row .lp-link-sub{display:block;color:rgba(255,255,255,.55);font-size:.7rem}
@@ -1238,6 +1239,17 @@ export function mountLaunchPanel(container, { getAvatar, getUser, getPreviewView
if (s.walletLinked === false) {
const busy = s.walletLinking ? 'disabled' : '';
+ if (s.walletConflict) {
+ const short = esc(shortenAddr(s.walletAddr));
+ return `<div class="lp-link-row conflict">
+ <div class="lp-link-info">
+ <span class="lp-link-title">This wallet belongs to a different three.ws account</span>
+ <span class="lp-link-sub">Sign once more with ${short} to transfer it to the account you&rsquo;re signed into now. The previous account loses this wallet.</span>
+ ${s.walletLinkError ? `<span class="lp-link-err">${esc(s.walletLinkError)}</span>` : ''}
+ </div>
+ <button class="lp-link-btn" id="lp-link-transfer" ${busy}>${s.walletLinking ? 'Sign in your wallet…' : 'Transfer wallet to this account'}</button>
+ </div>`;
+ }
return `<div class="lp-link-row">
<div class="lp-link-info">
<span class="lp-link-title">Link this wallet to launch</span>
@@ -1537,7 +1549,8 @@ export function mountLaunchPanel(container, { getAvatar, getUser, getPreviewView
q('#lp-disc')?.addEventListener('click', disconnectWallet);
q('#lp-addr-copy')?.addEventListener('click', (e) => copyAddressToClipboard(e.currentTarget));
q('#lp-deposit')?.addEventListener('click', openDepositModal);
- q('#lp-link-wallet')?.addEventListener('click', linkConnectedWallet);
+ q('#lp-link-wallet')?.addEventListener('click', () => linkConnectedWallet(false));
+ q('#lp-link-transfer')?.addEventListener('click', () => linkConnectedWallet(true));
// Wallet-source toggle
container.querySelectorAll('.lp-src button[data-src]').forEach((btn) => {
diff --git a/src/agent-detail.js b/src/agent-detail.js
index da3ed2c8f..f8aa15530 100644
--- a/src/agent-detail.js
+++ b/src/agent-detail.js
@@ -215,8 +215,180 @@ function render(agent) {
if (agent.tradeUrl && agent.tradeUrl !== '#') $('ad-trade').href = agent.tradeUrl;
else $('ad-trade').style.display = 'none';
+ const sns = agent.rawMetadata?.meta?.sns_domain;
+ if (sns) {
+ document.getElementById('ad-sns-row').style.display = '';
+ document.getElementById('ad-sns').textContent = `${sns}.sol`;
+ }
+
+ const voiceProvider = agent.rawMetadata?.voice_provider;
+ const voiceId = agent.rawMetadata?.voice_id;
+ if (voiceProvider && voiceProvider !== 'browser') {
+ document.getElementById('ad-voice-row').style.display = '';
+ document.getElementById('ad-voice').innerHTML = `<span class="ad-pill ad-pill-green">cloned · ${voiceProvider}</span>`;
+ } else if (voiceProvider === 'browser') {
+ document.getElementById('ad-voice-row').style.display = '';
+ document.getElementById('ad-voice').textContent = 'browser TTS';
+ }
+
document.querySelector('.ad-main').classList.remove('loading');
bindWalletActions();
+
+ loadExtraSections(agent.id, agent.rawMetadata);
+}
+
+async function loadExtraSections(agentId, rec) {
+ const url = (p) => `/api/agents/${encodeURIComponent(agentId)}${p}`;
+
+ const safe = async (fn) => {
+ try { return await fn(); } catch (e) { return null; }
+ };
+
+ const [actions, memory, strategy, reputation, embedPolicy] = await Promise.all([
+ safe(() => fetchJson(url('/actions?limit=8'))),
+ safe(() => fetch(`/api/agent-memory?agentId=${encodeURIComponent(agentId)}&limit=6`, { credentials: 'include' }).then((r) => r.ok ? r.json() : null)),
+ safe(() => fetch(`/api/agent-strategy?id=${encodeURIComponent(agentId)}`, { credentials: 'include' }).then((r) => r.ok ? r.json() : null)),
+ safe(() => fetchJson(url('/reputation'))),
+ safe(() => fetch(url('/embed-policy'), { credentials: 'include' }).then((r) => r.ok ? r.json() : null)),
+ ]);
+
+ if (actions?.actions?.length) renderActions(actions.actions, agentId);
+ if (memory?.entries?.length) renderMemory(memory.entries);
+ if (strategy?.data?.strategy != null) renderStrategy(strategy.data.strategy);
+ if (reputation && (reputation.count > 0 || reputation.average > 0)) renderReputation(reputation);
+ if (embedPolicy) renderEmbedPolicy(embedPolicy);
+}
+
+function escapeText(s) {
+ return String(s == null ? '' : s);
+}
+
+function fmtRelTime(iso) {
+ const t = new Date(iso).getTime();
+ const sec = Math.floor((Date.now() - t) / 1000);
+ if (sec < 60) return `${sec}s ago`;
+ if (sec < 3600) return `${Math.floor(sec / 60)}m ago`;
+ if (sec < 86400) return `${Math.floor(sec / 3600)}h ago`;
+ if (sec < 604800) return `${Math.floor(sec / 86400)}d ago`;
+ return new Date(iso).toLocaleDateString();
+}
+
+function actionIcon(type) {
+ return ({ speak: '💬', remember: '📝', sign: '✍️', 'skill-done': '✓', validate: '✔', 'load-end': '📦' })[type] || '•';
+}
+
+function summarizeActionPayload(p) {
+ if (typeof p !== 'object' || !p) return '';
+ if (p.text) return String(p.text).slice(0, 90);
+ if (p.content) return String(p.content).slice(0, 90);
+ const k = Object.keys(p)[0];
+ if (k == null) return '';
+ const v = p[k];
+ return typeof v === 'string' ? `${k}=${v.slice(0, 60)}` : `${k}=${typeof v}`;
+}
+
+function renderActions(actions, agentId) {
+ const card = document.getElementById('ad-actions-card');
+ const list = document.getElementById('ad-actions-list');
+ document.getElementById('ad-actions-count').textContent = `${actions.length} recent`;
+ list.innerHTML = '';
+ for (const a of actions) {
+ const verifyMark =
+ a.verified === true ? '<span class="ad-pill ad-pill-green" title="signature verified">✓</span>'
+ : a.verified === false ? '<span class="ad-pill" title="invalid signature">✗</span>'
+ : '';
+ const meta = el('span', { class: 'ad-muted', style: 'font-size:11px;display:flex;align-items:center;gap:6px' });
+ if (verifyMark) {
+ const m = document.createElement('span');
+ m.innerHTML = verifyMark;
+ meta.appendChild(m);
+ }
+ meta.appendChild(el('span', { text: fmtRelTime(a.timestamp) }));
+ const row = el('div', { class: 'ad-row ad-row-split', style: 'padding:8px 0;border-bottom:1px solid rgba(255,255,255,0.04)' }, [
+ el('span', { style: 'display:flex;align-items:center;gap:8px;min-width:0' }, [
+ el('span', { text: actionIcon(a.type) }),
+ el('span', { class: 'ad-mono', style: 'min-width:90px;flex-shrink:0', text: a.type }),
+ el('span', { class: 'ad-muted', style: 'overflow:hidden;text-overflow:ellipsis;white-space:nowrap', text: summarizeActionPayload(a.payload) }),
+ ]),
+ meta,
+ ]);
+ list.appendChild(row);
+ }
+ list.appendChild(
+ el('div', { style: 'text-align:center;padding-top:10px' }, [
+ el('a', { class: 'ad-cta', href: `/dashboard/actions?agent=${encodeURIComponent(agentId)}`, text: 'See full action log →' }),
+ ]),
+ );
+ card.style.display = '';
+}
+
+function renderMemory(entries) {
+ const card = document.getElementById('ad-memory-card');
+ document.getElementById('ad-memory-count').textContent = `${entries.length}`;
+ const list = document.getElementById('ad-memory-list');
+ list.innerHTML = '';
+ for (const m of entries) {
+ const row = el('div', { style: 'padding:8px 0;border-bottom:1px solid rgba(255,255,255,0.04)' }, [
+ el('div', { class: 'ad-muted', style: 'font-size:11px;text-transform:uppercase;letter-spacing:.05em;margin-bottom:2px', text: m.type || 'memory' }),
+ el('div', { style: 'color:#ddd;font-size:13px;white-space:pre-wrap', text: String(m.content || '').slice(0, 240) }),
+ ]);
+ list.appendChild(row);
+ }
+ card.style.display = '';
+}
+
+function renderStrategy(strategy) {
+ const card = document.getElementById('ad-strategy-card');
+ const pre = document.getElementById('ad-strategy');
+ pre.textContent = typeof strategy === 'string' ? strategy : JSON.stringify(strategy, null, 2);
+ card.style.display = '';
+}
+
+function renderReputation(r) {
+ const card = document.getElementById('ad-reputation-card');
+ document.getElementById('ad-rep-avg').textContent = r.average ? Number(r.average).toFixed(2) : '0.00';
+ document.getElementById('ad-rep-count').textContent = String(r.count || 0);
+ if (r.total_stake_wei && r.total_stake_wei !== '0') {
+ document.getElementById('ad-rep-stake-row').style.display = '';
+ const wei = BigInt(r.total_stake_wei);
+ const eth = Number(wei) / 1e18;
+ document.getElementById('ad-rep-stake').textContent = `${eth.toFixed(4)} ETH`;
+ }
+ card.style.display = '';
+}
+
+function renderEmbedPolicy(p) {
+ if (!p || typeof p !== 'object') return;
+ const card = document.getElementById('ad-embed-policy-card');
+ const host = document.getElementById('ad-embed-policy');
+ host.innerHTML = '';
+
+ const allowEmbed = p.allow_embed === false ? 'No' : 'Yes';
+ const allowedOrigins = Array.isArray(p.allowed_origins) ? p.allowed_origins : [];
+ const monthlyQuota = p?.brain?.monthly_quota;
+
+ host.appendChild(el('div', { class: 'ad-row ad-row-split' }, [
+ el('span', { class: 'ad-muted', text: 'Embeddable' }),
+ el('span', { text: allowEmbed }),
+ ]));
+ if (allowedOrigins.length) {
+ host.appendChild(el('div', { class: 'ad-row ad-row-split' }, [
+ el('span', { class: 'ad-muted', text: 'Allowed origins' }),
+ el('span', { class: 'ad-mono', style: 'font-size:11px;text-align:right', text: allowedOrigins.slice(0, 3).join(', ') + (allowedOrigins.length > 3 ? ` +${allowedOrigins.length - 3}` : '') }),
+ ]));
+ } else if (allowEmbed === 'Yes') {
+ host.appendChild(el('div', { class: 'ad-row ad-row-split' }, [
+ el('span', { class: 'ad-muted', text: 'Allowed origins' }),
+ el('span', { text: 'any' }),
+ ]));
+ }
+ if (monthlyQuota != null) {
+ host.appendChild(el('div', { class: 'ad-row ad-row-split' }, [
+ el('span', { class: 'ad-muted', text: 'Monthly LLM quota' }),
+ el('span', { text: String(monthlyQuota) }),
+ ]));
+ }
+ card.style.display = '';
}
function bindWalletActions() {
diff --git a/src/agent-edit.js b/src/agent-edit.js
index ee1636135..b07f510bb 100644
--- a/src/agent-edit.js
+++ b/src/agent-edit.js
@@ -195,10 +195,25 @@ function renderMonetization() {
// Lazily mount the agent preview + avatar picker only when the user opens
// the tab so we don't pay for a WebGL context up front.
+async function ensureAgent3DLib() {
+ if (customElements.get('agent-3d')) return true;
+ const candidates = ['/agent-3d/latest/agent-3d.js', '/dist-lib/agent-3d.js'];
+ for (const url of candidates) {
+ try {
+ await import(/* @vite-ignore */ url);
+ if (customElements.get('agent-3d')) return true;
+ } catch {
+ /* try next candidate */
+ }
+ }
+ return false;
+}
+
async function ensureOutfitTab() {
if (outfitMounted) return;
outfitMounted = true;
+ await ensureAgent3DLib();
const preview = $('outfit-preview');
const a3d = document.createElement('agent-3d');
a3d.setAttribute('agent-id', agentId);
@@ -1169,6 +1184,9 @@ function renderXTriggers(rows) {
<label style="display:inline-flex;align-items:center;gap:.5rem;font-size:.764rem;color:rgba(255,255,255,.6)">
<input type="checkbox" class="trigger-enabled" ${t.enabled ? 'checked' : ''}> Enabled
</label>
+ <label style="display:inline-flex;align-items:center;gap:.5rem;font-size:.764rem;color:rgba(255,255,255,.6)" title="If off, fired triggers queue as drafts instead of posting automatically.">
+ <input type="checkbox" class="trigger-auto" ${t.auto_publish !== false ? 'checked' : ''}> Auto-publish
+ </label>
<button class="chip-remove" data-del="${escapeHtml(t.id)}" title="Delete">×</button>
</div>
<div class="trigger-item-body">${body}</div>
@@ -1183,7 +1201,8 @@ function renderXTriggers(rows) {
const id = item.dataset.id;
item.querySelector('[data-del]').addEventListener('click', () => deleteTrigger(id));
item.querySelector('.trigger-save').addEventListener('click', () => saveTrigger(item, id));
- item.querySelector('.trigger-enabled').addEventListener('change', (e) => saveTriggerEnabled(id, e.target.checked));
+ item.querySelector('.trigger-enabled').addEventListener('change', (e) => patchTrigger(id, { enabled: e.target.checked }));
+ item.querySelector('.trigger-auto').addEventListener('change', (e) => patchTrigger(id, { auto_publish: e.target.checked }));
});
}
@@ -1218,12 +1237,12 @@ async function saveTrigger(item, id) {
}
}
-async function saveTriggerEnabled(id, enabled) {
+async function patchTrigger(id, body) {
await fetch(`${API_BASE}/x/triggers?id=${encodeURIComponent(id)}`, {
method: 'PATCH',
headers: { 'Content-Type': 'application/json' },
credentials: 'include',
- body: JSON.stringify({ enabled }),
+ body: JSON.stringify(body),
});
}
diff --git a/src/app.js b/src/app.js
index 95458237e..b29f3ac4f 100644
--- a/src/app.js
+++ b/src/app.js
@@ -1709,33 +1709,49 @@ class App {
}
/**
- * Resolve the initial state passed to RegisterUI. If `?avatar=<id>` is
- * present, fetch that avatar from the backend and pre-fill name /
- * description / image / GLB. Otherwise fall back to the current viewer
- * model.
+ * Resolve the initial state passed to RegisterUI. Honors:
+ * ?avatar=<id> — fetch a saved avatar from the backend
+ * ?name= — prefill identity name
+ * ?description= — prefill description
+ * ?image= — prefill image URL
+ * ?network= — preselect chain (mainnet-beta/devnet/base/bsc/…)
+ * Avatar lookup wins over the viewer's current model when both exist;
+ * direct query params override either as last-step "manual" entries.
*/
async _resolveDeployInitial() {
const qp = new URLSearchParams(location.search);
const avatarId = qp.get('avatar');
- const fallback = { glbUrl: this._currentModelUrl || '' };
- if (!avatarId) return fallback;
- try {
- const res = await fetch(`/api/avatars/${encodeURIComponent(avatarId)}`, {
- credentials: 'include',
- });
- if (!res.ok) throw new Error(`HTTP ${res.status}`);
- const { avatar } = await res.json();
- if (!avatar) throw new Error('empty avatar payload');
- return {
- name: avatar.name || '',
- description: avatar.description || '',
- imageUrl: avatar.thumbnail_url || '',
- glbUrl: avatar.url || avatar.model_url || '',
- };
- } catch (err) {
- console.warn('[deploy] avatar prefill failed; falling back to viewer model', err);
- return fallback;
+ const qpName = qp.get('name') || '';
+ const qpDesc = qp.get('description') || '';
+ const qpImage = qp.get('image') || '';
+ const qpNetwork = qp.get('network') || '';
+ const base = { glbUrl: this._currentModelUrl || '' };
+ let resolved = base;
+ if (avatarId) {
+ try {
+ const res = await fetch(`/api/avatars/${encodeURIComponent(avatarId)}`, {
+ credentials: 'include',
+ });
+ if (!res.ok) throw new Error(`HTTP ${res.status}`);
+ const { avatar } = await res.json();
+ if (!avatar) throw new Error('empty avatar payload');
+ resolved = {
+ name: avatar.name || '',
+ description: avatar.description || '',
+ imageUrl: avatar.thumbnail_url || '',
+ glbUrl: avatar.url || avatar.model_url || '',
+ };
+ } catch (err) {
+ console.warn('[deploy] avatar prefill failed; falling back to viewer model', err);
+ }
}
+ return {
+ ...resolved,
+ name: qpName || resolved.name || '',
+ description: qpDesc || resolved.description || '',
+ imageUrl: qpImage || resolved.imageUrl || '',
+ network: qpNetwork || '',
+ };
}
_upgradeToHorizonFooter() {
diff --git a/src/erc8004/register-ui.js b/src/erc8004/register-ui.js
index af988bbbb..4c522ee5e 100644
--- a/src/erc8004/register-ui.js
+++ b/src/erc8004/register-ui.js
@@ -72,6 +72,39 @@ const SOLANA_LABELS = {
const _isSolana = (id) => id === SOLANA_MAINNET || id === SOLANA_DEVNET;
const _solanaNetwork = (id) => (id === SOLANA_DEVNET ? 'devnet' : 'mainnet');
+/**
+ * Map an external `?network=` argument to one of our chain IDs.
+ * Accepts canonical Solana strings ("mainnet-beta", "devnet"), bare chain
+ * names ("base", "polygon", "bsc"), or numeric EVM chainIds. Returns null
+ * when the value is empty or unknown so the caller can fall back.
+ */
+function _resolveNetworkArg(raw) {
+ if (!raw) return null;
+ const s = String(raw).trim().toLowerCase();
+ if (!s) return null;
+ if (s === 'mainnet-beta' || s === 'solana' || s === 'solana-mainnet' || s === 'mainnet')
+ return SOLANA_MAINNET;
+ if (s === 'devnet' || s === 'solana-devnet') return SOLANA_DEVNET;
+ if (/^\d+$/.test(s)) {
+ const id = Number(s);
+ return REGISTRY_DEPLOYMENTS[id] ? id : null;
+ }
+ const aliases = {
+ ethereum: 1, eth: 1, mainnet_eth: 1,
+ optimism: 10, op: 10,
+ bsc: 56, bnb: 56,
+ polygon: 137, matic: 137, pol: 137,
+ base: 8453,
+ arbitrum: 42161, arb: 42161,
+ avalanche: 43114, avax: 43114,
+ linea: 59144, scroll: 534352, celo: 42220,
+ 'bsc-testnet': 97, sepolia: 11155111,
+ 'base-sepolia': 84532, 'arbitrum-sepolia': 421614,
+ };
+ const id = aliases[s];
+ return id && REGISTRY_DEPLOYMENTS[id] ? id : null;
+}
+
// ───────────────────────────────────────────────────────────────────────────
// SRI integrity cache
// ───────────────────────────────────────────────────────────────────────────
@@ -289,7 +322,9 @@ export class RegisterUI {
// Selected chain for reads + writes. Initialized to BSC Testnet; if the
// wallet is already on a different supported chain, we'll adopt that.
- this.selectedChainId = DEFAULT_CHAIN_ID;
+ // `initial.network` (from ?network= URL param) overrides the default
+ // when it maps to a known chain.
+ this.selectedChainId = _resolveNetworkArg(opts.initial?.network) ?? DEFAULT_CHAIN_ID;
// Tab state
this.activeTab = opts.initialTab || 'create';
@@ -362,40 +397,86 @@ export class RegisterUI {
const pageMode = this.mode === 'page';
this.el = document.createElement('div');
this.el.className = 'erc8004-register' + (pageMode ? ' erc8004-register--page' : '');
- const closeBtn = pageMode
- ? ''
- : `<button class="erc8004-btn erc8004-btn--close" type="button" title="Close">✕</button>`;
- this.el.innerHTML = `
- <div class="erc8004-card erc8004-card--wide">
- <div class="erc8004-header">
- <div class="erc8004-controls">
- <select class="erc8004-chain-select" title="Target chain"></select>
- <button class="erc8004-btn erc8004-btn--wallet" type="button">
- Connect MetaMask
- </button>
- ${closeBtn}
+
+ if (pageMode) {
+ this.el.innerHTML = `
+ <div class="deploy-shell">
+ <header class="deploy-hero">
+ <div class="deploy-hero-text">
+ <div class="deploy-hero-eyebrow">
+ <span class="deploy-hero-dot" aria-hidden="true"></span>
+ <span>Deploy on-chain</span>
+ </div>
+ <h1 class="deploy-hero-title">Give your agent an on-chain identity</h1>
+ <p class="deploy-hero-sub">
+ Mint your agent as an NFT on Solana (Metaplex Core) or EVM (ERC-8004).
+ Your 3D body, services, and metadata live in a single discoverable record.
+ </p>
+ <div class="deploy-hero-meta">
+ <a class="deploy-hero-link" href="/dashboard">My agents →</a>
+ <a class="deploy-hero-link" href="https://eips.ethereum.org/EIPS/eip-8004" target="_blank" rel="noopener">ERC-8004 spec ↗</a>
+ <a class="deploy-hero-link" href="https://developers.metaplex.com/core" target="_blank" rel="noopener">Metaplex Core ↗</a>
+ </div>
+ </div>
+ <div class="deploy-hero-controls">
+ <label class="deploy-chain-control">
+ <span class="deploy-chain-label">Target network</span>
+ <select class="erc8004-chain-select" title="Target chain"></select>
+ </label>
+ <button class="erc8004-btn erc8004-btn--wallet deploy-wallet-btn" type="button">
+ Connect wallet
+ </button>
+ </div>
+ </header>
+
+ <div class="erc8004-mainnet-banner deploy-banner" data-role="mainnet-banner" style="display:none"></div>
+
+ <div class="deploy-grid">
+ <main class="deploy-main">
+ <div class="erc8004-tab-body" data-role="tab-body"></div>
+ </main>
+ <aside class="deploy-preview" data-role="preview" aria-label="Agent preview"></aside>
</div>
</div>
+ `;
+ } else {
+ this.el.innerHTML = `
+ <div class="erc8004-card erc8004-card--wide">
+ <div class="erc8004-header">
+ <div class="erc8004-controls">
+ <select class="erc8004-chain-select" title="Target chain"></select>
+ <button class="erc8004-btn erc8004-btn--wallet" type="button">
+ Connect MetaMask
+ </button>
+ <button class="erc8004-btn erc8004-btn--close" type="button" title="Close">✕</button>
+ </div>
+ </div>
- <div class="erc8004-mainnet-banner" data-role="mainnet-banner" style="display:none"></div>
+ <div class="erc8004-mainnet-banner" data-role="mainnet-banner" style="display:none"></div>
- <nav class="erc8004-tabs" role="tablist">
- <button class="erc8004-tab erc8004-tab--active" data-tab="create">Create Agent</button>
- <button class="erc8004-tab" data-tab="my">My Agents</button>
- <button class="erc8004-tab" data-tab="search">Search</button>
- <button class="erc8004-tab" data-tab="templates">Templates</button>
- <button class="erc8004-tab" data-tab="batch">Batch</button>
- <button class="erc8004-tab" data-tab="history">History</button>
- </nav>
+ <nav class="erc8004-tabs" role="tablist">
+ <button class="erc8004-tab erc8004-tab--active" data-tab="create">Create Agent</button>
+ <button class="erc8004-tab" data-tab="my">My Agents</button>
+ <button class="erc8004-tab" data-tab="search">Search</button>
+ <button class="erc8004-tab" data-tab="templates">Templates</button>
+ <button class="erc8004-tab" data-tab="batch">Batch</button>
+ <button class="erc8004-tab" data-tab="history">History</button>
+ </nav>
- <div class="erc8004-tab-body" data-role="tab-body"></div>
- </div>
- `;
+ <div class="erc8004-tab-body" data-role="tab-body"></div>
+ </div>
+ `;
+ }
this.container.appendChild(this.el);
this._populateChainSelect();
this._renderActiveTab();
this._refreshMainnetBanner();
+ this._refreshWalletButton();
+ }
+
+ _isPageMode() {
+ return this.mode === 'page';
}
_refreshMainnetBanner() {
@@ -434,6 +515,7 @@ export class RegisterUI {
const raw = e.target.value;
const newChain = _isSolana(raw) ? raw : Number(raw);
this.selectedChainId = newChain;
+ this._refreshWalletButton();
// If we just selected an EVM chain and the user has an EVM wallet on a
// different chain, prompt to switch. Solana chains skip this entirely.
if (
@@ -469,6 +551,24 @@ export class RegisterUI {
// -----------------------------------------------------------------------
async _connectWallet() {
+ // On Solana, route to Phantom instead of MetaMask.
+ if (_isSolana(this.selectedChainId)) {
+ try {
+ const provider = detectSolanaWallet();
+ if (!provider) {
+ window.open('https://phantom.app/', '_blank', 'noopener');
+ return;
+ }
+ const res = await provider.connect();
+ const pk = res?.publicKey?.toBase58?.() || provider.publicKey?.toBase58?.();
+ if (pk) this._toast('Connected ' + shortAddr(pk));
+ this._refreshWalletButton();
+ this._renderActiveTab();
+ } catch (err) {
+ this._toast('Phantom: ' + (err?.message || String(err)), true);
+ }
+ return;
+ }
try {
const { address, chainId } = await connectWallet();
this.wallet = { address, chainId: Number(chainId) };
@@ -514,8 +614,24 @@ export class RegisterUI {
_refreshWalletButton() {
const btn = this.el.querySelector('.erc8004-btn--wallet');
+ if (!btn) return;
+ const solana = _isSolana(this.selectedChainId);
+ if (solana) {
+ // Solana — `this.wallet` tracks EVM only; show Phantom CTA / connected state
+ // from window.solana when available.
+ const hasPhantom = !!detectSolanaWallet();
+ const pk = window.solana?.publicKey?.toBase58?.() || null;
+ if (pk) {
+ btn.textContent = shortAddr(pk);
+ btn.classList.add('erc8004-btn--connected');
+ } else {
+ btn.textContent = hasPhantom ? 'Connect Phantom' : 'Install Phantom';
+ btn.classList.remove('erc8004-btn--connected');
+ }
+ return;
+ }
if (!this.wallet) {
- btn.textContent = 'Connect MetaMask';
+ btn.textContent = window.ethereum ? 'Connect MetaMask' : 'Install MetaMask';
btn.classList.remove('erc8004-btn--connected');
return;
}
@@ -681,6 +797,15 @@ export class RegisterUI {
_renderActiveTab() {
const body = this.el.querySelector('[data-role="tab-body"]');
body.innerHTML = '';
+ // In page mode (/deploy) we hide the tab strip and always render the
+ // Create wizard — this URL is single-purpose. The preview rail mirrors
+ // the form state on the right.
+ if (this._isPageMode()) {
+ this.activeTab = 'create';
+ this._renderCreate(body);
+ this._refreshPreview();
+ return;
+ }
switch (this.activeTab) {
case 'create':
this._renderCreate(body);
@@ -703,6 +828,68 @@ export class RegisterUI {
}
}
+ // ----- Preview rail (page mode only) -----------------------------------
+
+ _refreshPreview() {
+ const rail = this.el.querySelector('[data-role="preview"]');
+ if (!rail) return;
+ const f = this.form;
+ const solana = _isSolana(this.selectedChainId);
+ const chainLabel = solana
+ ? SOLANA_LABELS[this.selectedChainId]
+ : (CHAIN_META[this.selectedChainId]?.name || `Chain ${this.selectedChainId}`);
+ const standard = solana ? 'Metaplex Core NFT' : 'ERC-8004 (ERC-721)';
+ const costLabel = solana ? '~0.003 SOL' : `gas on ${esc(chainLabel)}`;
+ const img = f.imageUrl?.trim();
+ const avatarLine = this._avatarSummary();
+ const services = (f.services || []).filter((s) => s.endpoint?.trim());
+ rail.innerHTML = `
+ <div class="deploy-preview-card">
+ <div class="deploy-preview-eyebrow">Live preview</div>
+ <div class="deploy-preview-thumb">
+ ${img
+ ? `<img src="${esc(img)}" alt="" onerror="this.style.display='none';this.nextElementSibling.style.display='flex'" />
+ <div class="deploy-preview-ph" style="display:none">No image</div>`
+ : `<div class="deploy-preview-ph">No image yet</div>`}
+ </div>
+ <div class="deploy-preview-name">${esc(f.name) || '<span class="deploy-preview-dim">Untitled agent</span>'}</div>
+ <div class="deploy-preview-desc">${esc(f.description) || '<span class="deploy-preview-dim">Add a description in Step 1.</span>'}</div>
+ <dl class="deploy-preview-meta">
+ <dt>Chain</dt><dd>${esc(chainLabel)}</dd>
+ <dt>Standard</dt><dd>${standard}</dd>
+ <dt>Avatar</dt><dd>${avatarLine}</dd>
+ <dt>Services</dt><dd>${services.length ? services.map((s) => `<span class="deploy-svc-pill">${esc(s.type)}</span>`).join(' ') : '<span class="deploy-preview-dim">none</span>'}</dd>
+ <dt>Cost</dt><dd>${esc(costLabel)}</dd>
+ </dl>
+ <div class="deploy-preview-checklist">
+ <div class="deploy-check ${f.name?.trim() ? 'is-ok' : ''}">${f.name?.trim() ? '✓' : '○'} Name</div>
+ <div class="deploy-check ${f.description?.trim() ? 'is-ok' : ''}">${f.description?.trim() ? '✓' : '○'} Description</div>
+ <div class="deploy-check ${this._hasAvatar() ? 'is-ok' : ''}">${this._hasAvatar() ? '✓' : '○'} Avatar</div>
+ <div class="deploy-check ${this._walletReady() ? 'is-ok' : ''}">${this._walletReady() ? '✓' : '○'} Wallet</div>
+ </div>
+ </div>
+ `;
+ }
+
+ _hasAvatar() {
+ const f = this.form;
+ const s = f.avatarSource;
+ if (s === 'current') return !!f.glbUrl;
+ if (s === 'saved') return !!f.savedAvatar;
+ if (s === 'upload') return !!f.glbFile;
+ if (s === 'url') return !!f.pastedGlbUrl?.trim();
+ if (s === 'default') return !!f.defaultAvatarId;
+ if (s === 'skip') return true;
+ return false;
+ }
+
+ _walletReady() {
+ if (_isSolana(this.selectedChainId)) {
+ return !!window.solana?.publicKey;
+ }
+ return !!this.wallet;
+ }
+
_renderBatch(body) {
if (_isSolana(this.selectedChainId)) {
body.innerHTML = `
@@ -724,8 +911,32 @@ export class RegisterUI {
_renderCreate(body) {
const step = this.wizardStep;
- body.innerHTML = `
- <div class="erc8004-wizard">
+ const pageMode = this._isPageMode();
+ const stepLabels = ['Identity', 'Services', 'Avatar', 'Deploy'];
+ const stepBar = `
+ <ol class="erc8004-steps deploy-steps" role="list">
+ ${[1, 2, 3, 4]
+ .map((n) => {
+ const state = n === step ? 'active' : (n < step ? 'done' : '');
+ const clickable = n < step ? 'data-role="goto-step" data-step="' + n + '"' : '';
+ return `
+ <li class="erc8004-step deploy-step ${state ? 'deploy-step--' + state : ''} ${n === step ? 'erc8004-step--active' : ''} ${n < step ? 'erc8004-step--done' : ''}" ${clickable}>
+ <span class="erc8004-step-num">${n < step ? '✓' : n}</span>
+ <span class="erc8004-step-lbl">${stepLabels[n - 1]}</span>
+ </li>`;
+ })
+ .join('')}
+ </ol>`;
+ const quickstart = pageMode
+ ? `
+ <div class="deploy-quickstart-bar">
+ <span class="deploy-quickstart-bar-label">Start from</span>
+ <button class="deploy-qs-chip" data-role="qs-current" type="button">Current session</button>
+ <button class="deploy-qs-chip" data-role="qs-saved" type="button" ${this._signedIn ? '' : 'disabled'}>Saved agent</button>
+ <button class="deploy-qs-chip" data-role="qs-scratch" type="button">Scratch</button>
+ <button class="deploy-qs-chip" data-role="qs-update" type="button">Edit existing →</button>
+ </div>`
+ : `
<div class="erc8004-quickstart" data-role="quickstart">
<div class="erc8004-quickstart-title">How would you like to start?</div>
<div class="erc8004-quickstart-grid">
@@ -746,19 +957,11 @@ export class RegisterUI {
<div class="erc8004-quickstart-btn-hint">Edit an agent you've already registered.</div>
</button>
</div>
- </div>
- <ol class="erc8004-steps">
- ${[1, 2, 3, 4]
- .map(
- (n) => `
- <li class="erc8004-step ${n === step ? 'erc8004-step--active' : ''} ${n < step ? 'erc8004-step--done' : ''}">
- <span class="erc8004-step-num">${n}</span>
- <span class="erc8004-step-lbl">${['Identity', 'Services', 'Configuration', 'Deploy'][n - 1]}</span>
- </li>
- `,
- )
- .join('')}
- </ol>
+ </div>`;
+ body.innerHTML = `
+ <div class="erc8004-wizard ${pageMode ? 'deploy-wizard' : ''}">
+ ${quickstart}
+ ${stepBar}
<div class="erc8004-wizard-body" data-role="wizard-body"></div>
</div>
`;
@@ -774,6 +977,15 @@ export class RegisterUI {
body.querySelector('[data-role="qs-update"]').addEventListener('click', () =>
this._applyQuickStart('update'),
);
+ body.querySelectorAll('[data-role="goto-step"]').forEach((el) => {
+ el.addEventListener('click', () => {
+ const n = Number(el.dataset.step);
+ if (n >= 1 && n < this.wizardStep) {
+ this.wizardStep = n;
+ this._renderActiveTab();
+ }
+ });
+ });
const wbody = body.querySelector('[data-role="wizard-body"]');
if (step === 1) this._renderStepIdentity(wbody);
else if (step === 2) this._renderStepServices(wbody);
@@ -864,18 +1076,18 @@ export class RegisterUI {
<button class="erc8004-btn erc8004-btn--primary" data-role="next">Next: Services →</button>
</div>
`;
- body.querySelector('[name="name"]').addEventListener(
- 'input',
- (e) => (this.form.name = e.target.value),
- );
- body.querySelector('[name="description"]').addEventListener(
- 'input',
- (e) => (this.form.description = e.target.value),
- );
- body.querySelector('[name="imageUrl"]').addEventListener(
- 'input',
- (e) => (this.form.imageUrl = e.target.value),
- );
+ body.querySelector('[name="name"]').addEventListener('input', (e) => {
+ this.form.name = e.target.value;
+ this._refreshPreview();
+ });
+ body.querySelector('[name="description"]').addEventListener('input', (e) => {
+ this.form.description = e.target.value;
+ this._refreshPreview();
+ });
+ body.querySelector('[name="imageUrl"]').addEventListener('input', (e) => {
+ this.form.imageUrl = e.target.value;
+ this._refreshPreview();
+ });
body.querySelector('[data-role="next"]').addEventListener('click', () => {
if (!this.form.name.trim() || !this.form.description.trim()) {
this._toast('Name and description are required.', true);
diff --git a/style.css b/style.css
index 662e07721..6c7a7262f 100644
--- a/style.css
+++ b/style.css
@@ -1424,7 +1424,14 @@ body.explore-page {
min-height: calc(100vh - var(--header-h));
height: auto;
overflow: visible;
- padding: var(--space-xl) var(--space-lg) var(--space-2xl);
+ padding: var(--space-md) var(--space-lg) var(--space-2xl);
+}
+
+body.deploy-page {
+ background:
+ radial-gradient(900px 500px at 80% -10%, rgba(99, 102, 241, 0.12), transparent 60%),
+ radial-gradient(700px 400px at 10% 5%, rgba(139, 92, 246, 0.10), transparent 60%),
+ #070710;
}
/* Logo image in header */
@@ -2169,6 +2176,471 @@ body.explore-page {
background: rgba(255, 255, 255, 0.02);
}
+/* ── /deploy page shell ─────────────────────────────────────────────── */
+
+.deploy-shell {
+ width: 100%;
+ max-width: 1180px;
+ margin: 0 auto;
+ display: flex;
+ flex-direction: column;
+ gap: var(--space-lg);
+}
+
+.deploy-hero {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: var(--space-lg);
+ align-items: end;
+ padding: var(--space-lg) 0 var(--space-md);
+ border-bottom: 1px solid rgba(255, 255, 255, 0.06);
+}
+
+.deploy-hero-text {
+ min-width: 0;
+ max-width: 720px;
+}
+
+.deploy-hero-eyebrow {
+ display: inline-flex;
+ align-items: center;
+ gap: 8px;
+ padding: 4px 10px 4px 8px;
+ margin-bottom: var(--space-sm);
+ font-size: var(--text-xs);
+ font-weight: 500;
+ letter-spacing: 0.06em;
+ text-transform: uppercase;
+ color: rgba(255, 255, 255, 0.7);
+ background: rgba(139, 92, 246, 0.12);
+ border: 1px solid rgba(139, 92, 246, 0.35);
+ border-radius: 999px;
+}
+
+.deploy-hero-dot {
+ width: 6px;
+ height: 6px;
+ border-radius: 50%;
+ background: #a78bfa;
+ box-shadow: 0 0 12px rgba(167, 139, 250, 0.9);
+}
+
+.deploy-hero-title {
+ margin: 0 0 var(--space-xs);
+ font-size: clamp(1.6rem, 2.6vw, 2.2rem);
+ font-weight: 500;
+ line-height: 1.1;
+ letter-spacing: -0.01em;
+ color: #fff;
+}
+
+.deploy-hero-sub {
+ margin: 0 0 var(--space-md);
+ max-width: 60ch;
+ font-size: var(--text-base);
+ line-height: 1.55;
+ color: rgba(255, 255, 255, 0.62);
+ font-weight: 300;
+}
+
+.deploy-hero-meta {
+ display: flex;
+ flex-wrap: wrap;
+ gap: var(--space-md);
+ font-size: var(--text-sm);
+}
+
+.deploy-hero-link {
+ color: rgba(255, 255, 255, 0.55);
+ text-decoration: none;
+ border-bottom: 1px dashed transparent;
+ transition: color 0.15s, border-color 0.15s;
+}
+
+.deploy-hero-link:hover {
+ color: #fff;
+ border-color: rgba(255, 255, 255, 0.35);
+}
+
+.deploy-hero-controls {
+ display: flex;
+ flex-direction: column;
+ gap: var(--space-sm);
+ align-items: stretch;
+ min-width: 220px;
+}
+
+.deploy-chain-control {
+ display: flex;
+ flex-direction: column;
+ gap: 4px;
+}
+
+.deploy-chain-label {
+ font-size: var(--text-xs);
+ letter-spacing: 0.06em;
+ text-transform: uppercase;
+ color: rgba(255, 255, 255, 0.45);
+}
+
+.deploy-shell .erc8004-chain-select {
+ padding: 10px 12px;
+ font-size: var(--text-sm);
+ background: rgba(255, 255, 255, 0.04);
+ border-color: rgba(255, 255, 255, 0.14);
+ border-radius: 10px;
+ min-width: 220px;
+}
+
+.deploy-wallet-btn {
+ justify-content: center;
+ padding: 10px 16px;
+ font-weight: 500;
+}
+
+.deploy-banner {
+ padding: 10px 14px;
+ margin: 0;
+ background: rgba(245, 158, 11, 0.08);
+ border: 1px solid rgba(245, 158, 11, 0.3);
+ border-radius: 10px;
+ color: rgba(255, 230, 178, 0.95);
+ font-size: var(--text-sm);
+}
+
+.deploy-grid {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) 340px;
+ gap: var(--space-lg);
+ align-items: start;
+}
+
+.deploy-main {
+ min-width: 0;
+ padding: var(--space-lg);
+ background: rgba(255, 255, 255, 0.025);
+ border: 1px solid rgba(255, 255, 255, 0.07);
+ border-radius: 16px;
+}
+
+.deploy-preview {
+ position: sticky;
+ top: calc(var(--header-h) + var(--space-md));
+}
+
+.deploy-preview-card {
+ padding: var(--space-md);
+ background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
+ border: 1px solid rgba(255, 255, 255, 0.08);
+ border-radius: 16px;
+ box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
+}
+
+.deploy-preview-eyebrow {
+ font-size: var(--text-xs);
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: rgba(255, 255, 255, 0.4);
+ margin-bottom: var(--space-sm);
+}
+
+.deploy-preview-thumb {
+ position: relative;
+ width: 100%;
+ aspect-ratio: 1;
+ margin-bottom: var(--space-sm);
+ background: radial-gradient(60% 60% at 50% 40%, rgba(139, 92, 246, 0.18), rgba(0, 0, 0, 0));
+ border: 1px solid rgba(255, 255, 255, 0.07);
+ border-radius: 12px;
+ overflow: hidden;
+}
+
+.deploy-preview-thumb img {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ display: block;
+}
+
+.deploy-preview-ph {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 100%;
+ height: 100%;
+ font-size: var(--text-sm);
+ color: rgba(255, 255, 255, 0.3);
+ letter-spacing: 0.04em;
+}
+
+.deploy-preview-name {
+ font-size: var(--text-lg);
+ font-weight: 500;
+ color: #fff;
+ margin-bottom: 2px;
+ word-break: break-word;
+}
+
+.deploy-preview-desc {
+ font-size: var(--text-sm);
+ color: rgba(255, 255, 255, 0.55);
+ margin-bottom: var(--space-sm);
+ line-height: 1.45;
+ display: -webkit-box;
+ -webkit-line-clamp: 3;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+}
+
+.deploy-preview-dim {
+ color: rgba(255, 255, 255, 0.3);
+ font-style: italic;
+}
+
+.deploy-preview-meta {
+ display: grid;
+ grid-template-columns: auto 1fr;
+ gap: 4px var(--space-sm);
+ margin: 0 0 var(--space-sm);
+ padding: var(--space-sm) 0;
+ border-top: 1px solid rgba(255, 255, 255, 0.06);
+ border-bottom: 1px solid rgba(255, 255, 255, 0.06);
+ font-size: var(--text-xs);
+}
+
+.deploy-preview-meta dt {
+ color: rgba(255, 255, 255, 0.4);
+ font-weight: 400;
+}
+
+.deploy-preview-meta dd {
+ margin: 0;
+ color: rgba(255, 255, 255, 0.85);
+ word-break: break-word;
+}
+
+.deploy-svc-pill {
+ display: inline-block;
+ padding: 2px 6px;
+ margin-right: 4px;
+ background: rgba(99, 102, 241, 0.18);
+ border: 1px solid rgba(99, 102, 241, 0.35);
+ border-radius: 4px;
+ font-size: 11px;
+ color: #c7d2fe;
+}
+
+.deploy-preview-checklist {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: 4px 12px;
+}
+
+.deploy-check {
+ font-size: var(--text-xs);
+ color: rgba(255, 255, 255, 0.4);
+ letter-spacing: 0.02em;
+}
+
+.deploy-check.is-ok {
+ color: rgba(134, 239, 172, 0.95);
+}
+
+.deploy-quickstart-bar {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ gap: 6px;
+ margin-bottom: var(--space-md);
+ padding-bottom: var(--space-sm);
+ border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
+}
+
+.deploy-quickstart-bar-label {
+ font-size: var(--text-xs);
+ color: rgba(255, 255, 255, 0.4);
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ margin-right: 4px;
+}
+
+.deploy-qs-chip {
+ padding: 5px 10px;
+ font-size: var(--text-xs);
+ color: rgba(255, 255, 255, 0.7);
+ background: rgba(255, 255, 255, 0.03);
+ border: 1px solid rgba(255, 255, 255, 0.08);
+ border-radius: 999px;
+ cursor: pointer;
+ font-family: inherit;
+ transition: background 0.15s, color 0.15s, border-color 0.15s;
+}
+
+.deploy-qs-chip:hover:not(:disabled) {
+ color: #fff;
+ background: rgba(255, 255, 255, 0.07);
+ border-color: rgba(255, 255, 255, 0.2);
+}
+
+.deploy-qs-chip:disabled {
+ opacity: 0.4;
+ cursor: not-allowed;
+}
+
+/* Steps as a connected progress bar */
+.deploy-steps {
+ position: relative;
+ display: grid;
+ grid-template-columns: repeat(4, 1fr);
+ gap: 0;
+ margin-bottom: var(--space-md);
+ padding: 0;
+ list-style: none;
+}
+
+.deploy-steps::before {
+ content: '';
+ position: absolute;
+ top: 16px;
+ left: calc(100% / 8);
+ right: calc(100% / 8);
+ height: 2px;
+ background: rgba(255, 255, 255, 0.08);
+ z-index: 0;
+}
+
+.deploy-step {
+ position: relative;
+ z-index: 1;
+ display: flex !important;
+ flex-direction: column;
+ align-items: center;
+ gap: 8px !important;
+ padding: 0 !important;
+ background: transparent !important;
+ border: 0 !important;
+ color: rgba(255, 255, 255, 0.45);
+ font-size: var(--text-xs);
+}
+
+.deploy-step .erc8004-step-num {
+ width: 32px;
+ height: 32px;
+ background: rgba(20, 20, 30, 1);
+ border: 2px solid rgba(255, 255, 255, 0.12);
+ color: rgba(255, 255, 255, 0.6);
+ font-weight: 500;
+}
+
+.deploy-step--active .erc8004-step-num {
+ background: linear-gradient(135deg, #8b5cf6, #6366f1) !important;
+ border-color: rgba(139, 92, 246, 0.8);
+ color: #fff;
+ box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
+}
+
+.deploy-step--done .erc8004-step-num {
+ background: rgba(34, 197, 94, 0.18);
+ border-color: rgba(34, 197, 94, 0.5);
+ color: rgba(134, 239, 172, 1);
+}
+
+.deploy-step--active {
+ color: #fff;
+}
+
+.deploy-step--done {
+ color: rgba(134, 239, 172, 0.85);
+ cursor: pointer;
+}
+
+.deploy-step--done:hover {
+ color: rgba(187, 247, 208, 1);
+}
+
+.deploy-step .erc8004-step-lbl {
+ font-weight: 500;
+ letter-spacing: 0.02em;
+}
+
+.deploy-wizard .erc8004-wizard-body {
+ padding: 0;
+ background: transparent;
+ border: 0;
+}
+
+.deploy-wizard .erc8004-h3 {
+ font-size: 1.25rem;
+ font-weight: 500;
+ margin-bottom: 4px;
+}
+
+.deploy-wizard .erc8004-p {
+ margin-bottom: var(--space-md);
+}
+
+.deploy-wizard .erc8004-input {
+ padding: 10px 12px;
+ background: rgba(255, 255, 255, 0.03);
+ border-color: rgba(255, 255, 255, 0.12);
+ border-radius: 10px;
+}
+
+.deploy-wizard .erc8004-input:focus {
+ border-color: rgba(139, 92, 246, 0.55);
+ background: rgba(255, 255, 255, 0.05);
+ box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
+}
+
+.deploy-wizard .erc8004-wizard-nav {
+ margin-top: var(--space-lg);
+ padding-top: var(--space-md);
+ border-top: 1px solid rgba(255, 255, 255, 0.06);
+}
+
+.deploy-wizard .erc8004-btn--primary {
+ padding: 10px 18px;
+ font-weight: 500;
+ background: linear-gradient(135deg, rgba(139, 92, 246, 0.8), rgba(99, 102, 241, 0.8));
+ border-color: rgba(139, 92, 246, 0.6);
+ box-shadow: 0 6px 20px rgba(99, 102, 241, 0.2);
+}
+
+.deploy-wizard .erc8004-btn--primary:hover:not(:disabled) {
+ background: linear-gradient(135deg, rgba(139, 92, 246, 0.95), rgba(99, 102, 241, 0.95));
+ border-color: rgba(139, 92, 246, 0.75);
+}
+
+@media (max-width: 900px) {
+ .deploy-hero {
+ grid-template-columns: minmax(0, 1fr);
+ align-items: stretch;
+ }
+ .deploy-hero-controls {
+ flex-direction: row;
+ align-items: end;
+ }
+ .deploy-grid {
+ grid-template-columns: minmax(0, 1fr);
+ }
+ .deploy-preview {
+ position: static;
+ order: -1;
+ }
+ .deploy-preview-thumb {
+ aspect-ratio: 2.4;
+ }
+}
+
+@media (max-width: 560px) {
+ .deploy-hero-controls {
+ flex-direction: column;
+ }
+ .deploy-step .erc8004-step-lbl {
+ font-size: 10px;
+ }
+}
+
.erc8004-card {
width: 100%;
max-width: 480px;