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.

feat: public profile pages, avatar visibility ungated, eth-vanity 200-null, avatar embed fixes

nirholas4a3ed64d11d3
diff --git a/a-embed.html b/a-embed.html
index a3b044936..2dc2a66d6 100644
--- a/a-embed.html
+++ b/a-embed.html
@@ -232,33 +232,40 @@
async function main() {
if (avatar) {
- const viewer = new Viewer({
- el: document.getElementById('stage'),
- model: avatar,
+ const r = await fetch(`/api/avatars/${encodeURIComponent(avatar)}`, {
+ credentials: 'include',
});
+ if (!r.ok) return showError(`Avatar not found (${r.status})`);
+ const { avatar: a } = await r.json();
+ const glbUrl = a?.url || a?.model_url;
+ if (!glbUrl) return showError('Avatar has no 3D body');
+
+ const stage = document.getElementById('stage');
+ const viewer = new Viewer(stage, { kiosk: true, postToParent });
if (bg === 'transparent') {
viewer.renderer?.setClearAlpha(0);
if (viewer.scene) viewer.scene.background = null;
}
- if (plateOn || openLinkOn) {
- try {
- const r = await fetch(`/api/avatars/${encodeURIComponent(avatar)}`, {
- credentials: 'include',
- });
- if (r.ok) {
- const { avatar: a } = await r.json();
- if (plateOn && a?.name) {
- document.getElementById('name-plate').textContent = a.name;
- }
- if (openLinkOn) {
- const ol = document.getElementById('open-link');
- ol.href = `/avatars/${encodeURIComponent(avatar)}`;
- ol.style.display = 'inline-block';
- }
- }
- } catch {}
+
+ if (plateOn && a?.name) {
+ document.getElementById('name-plate').textContent = a.name;
+ }
+ if (openLinkOn) {
+ const ol = document.getElementById('open-link');
+ ol.href = `/avatars/${encodeURIComponent(avatar)}`;
+ ol.style.display = 'inline-block';
}
+
+ const candidates = resolveUrlCandidates(glbUrl);
+ await loadWithFallback(viewer, candidates);
+
document.getElementById('loading').style.display = 'none';
+ postToParent({
+ __agent: true,
+ type: 'ready',
+ avatar,
+ name: a?.name || '',
+ });
return;
}
diff --git a/agent-edit.html b/agent-edit.html
index 35b35734f..ea7e12c46 100644
--- a/agent-edit.html
+++ b/agent-edit.html
@@ -51,33 +51,68 @@
margin: 0;
}
- .edit-tabs {
+ /* ── Layout: sidebar + main ── */
+ .edit-layout {
display: flex;
- gap: 0;
- padding: 0 1.618rem;
- border-bottom: 1px solid rgba(255, 255, 255, 0.06);
+ flex: 1;
+ min-height: 0;
+ align-items: stretch;
+ }
+ .edit-sidebar {
+ width: 220px;
flex-shrink: 0;
+ border-right: 1px solid rgba(255, 255, 255, 0.06);
+ padding: 1rem 0.75rem 2rem;
+ overflow-y: auto;
+ background: rgba(255, 255, 255, 0.015);
+ }
+ .edit-sidebar-group {
+ margin-bottom: 1rem;
+ }
+ .edit-sidebar-group:last-child {
+ margin-bottom: 0;
+ }
+ .edit-sidebar-group-title {
+ font-size: 0.618rem;
+ text-transform: uppercase;
+ letter-spacing: 0.1em;
+ color: rgba(255, 255, 255, 0.32);
+ padding: 0.5rem 0.75rem 0.382rem;
+ font-weight: 600;
}
.edit-tab {
+ display: block;
+ width: 100%;
background: transparent;
border: 0;
- border-bottom: 2px solid transparent;
- color: rgba(255, 255, 255, 0.4);
- font-size: 0.764rem;
+ border-left: 2px solid transparent;
+ color: rgba(255, 255, 255, 0.55);
+ font-size: 0.875rem;
font-family: inherit;
- padding: 0.75rem 1rem;
+ padding: 0.5rem 0.75rem;
cursor: pointer;
- margin-bottom: -1px;
- transition:
- color 0.15s,
- border-color 0.15s;
+ text-align: left;
+ border-radius: 0 6px 6px 0;
+ margin-bottom: 1px;
+ transition: color 0.12s, background 0.12s, border-color 0.12s;
}
.edit-tab:hover {
- color: rgba(255, 255, 255, 0.7);
+ color: rgba(255, 255, 255, 0.9);
+ background: rgba(255, 255, 255, 0.03);
}
.edit-tab.active {
- color: rgba(255, 255, 255, 0.9);
- border-bottom-color: #3b82f6;
+ color: #fff;
+ background: rgba(59, 130, 246, 0.12);
+ border-left-color: #3b82f6;
+ }
+ .edit-tab.danger { color: rgba(252, 165, 165, 0.75); }
+ .edit-tab.danger.active { color: #fca5a5; background: rgba(220, 38, 38, 0.12); border-left-color: #dc2626; }
+
+ .edit-main {
+ flex: 1;
+ min-width: 0;
+ display: flex;
+ flex-direction: column;
}
.edit-panel {
@@ -88,6 +123,56 @@
display: flex;
}
+ /* Mobile: sidebar collapses to a horizontal-scroll top bar */
+ @media (max-width: 800px) {
+ .edit-layout {
+ flex-direction: column;
+ }
+ .edit-sidebar {
+ width: 100%;
+ box-sizing: border-box;
+ border-right: 0;
+ border-bottom: 1px solid rgba(255, 255, 255, 0.06);
+ padding: 0.5rem 0.75rem;
+ display: flex;
+ gap: 0.382rem;
+ overflow-x: auto;
+ overflow-y: hidden;
+ }
+ .edit-sidebar-group {
+ display: flex;
+ align-items: center;
+ gap: 0.236rem;
+ margin: 0;
+ padding-right: 0.5rem;
+ border-right: 1px solid rgba(255, 255, 255, 0.06);
+ flex-shrink: 0;
+ }
+ .edit-sidebar-group:last-child { border-right: 0; padding-right: 0; }
+ .edit-sidebar-group-title {
+ padding: 0;
+ font-size: 0.55rem;
+ color: rgba(255, 255, 255, 0.28);
+ white-space: nowrap;
+ }
+ .edit-tab {
+ width: auto;
+ padding: 0.382rem 0.618rem;
+ border-radius: 6px;
+ border-left: 0;
+ border-bottom: 2px solid transparent;
+ font-size: 0.764rem;
+ margin-bottom: 0;
+ white-space: nowrap;
+ }
+ .edit-tab.active {
+ background: rgba(59, 130, 246, 0.18);
+ border-left: 0;
+ border-bottom-color: #3b82f6;
+ }
+ .edit-tab.danger.active { border-left: 0; border-bottom-color: #dc2626; }
+ }
+
/* ── Persona tab ── */
.persona-panel {
max-width: 560px;
@@ -753,9 +838,6 @@
/* Danger */
.danger-card { border-color: rgba(220, 38, 38, 0.3); }
- /* Tab bar scrolls when overflowing */
- .edit-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; }
- .edit-tab { white-space: nowrap; flex-shrink: 0; }
</style>
<link rel="stylesheet" href="/nav.css" />
<link rel="stylesheet" href="/footer.css" />
@@ -776,25 +858,41 @@
<h1 class="edit-header-title" id="agent-title">Edit Agent</h1>
</header>
- <div class="edit-tabs" role="tablist" aria-label="Edit sections">
- <button class="edit-tab active" data-tab="persona" role="tab" aria-selected="true" aria-controls="panel-persona" id="tab-persona">Persona</button>
- <button class="edit-tab" data-tab="outfit" role="tab" aria-selected="false" aria-controls="panel-outfit" id="tab-outfit">Outfit</button>
- <button class="edit-tab" data-tab="voice" role="tab" aria-selected="false" aria-controls="panel-voice" id="tab-voice">Voice</button>
- <button class="edit-tab" data-tab="knowledge" role="tab" aria-selected="false" aria-controls="panel-knowledge" id="tab-knowledge">Knowledge</button>
- <button class="edit-tab" data-tab="skills" role="tab" aria-selected="false" aria-controls="panel-skills" id="tab-skills">Skills</button>
- <button class="edit-tab" data-tab="publish" role="tab" aria-selected="false" aria-controls="panel-publish" id="tab-publish">Publish</button>
- <button class="edit-tab" data-tab="monetization" role="tab" aria-selected="false" aria-controls="panel-monetization" id="tab-monetization">Monetization</button>
- <button class="edit-tab" data-tab="wallet" role="tab" aria-selected="false" aria-controls="panel-wallet" id="tab-wallet">Wallet</button>
- <button class="edit-tab" data-tab="social" role="tab" aria-selected="false" aria-controls="panel-social" id="tab-social">Social</button>
- <button class="edit-tab" data-tab="autopilot" role="tab" aria-selected="false" aria-controls="panel-autopilot" id="tab-autopilot">Autopilot</button>
- <button class="edit-tab" data-tab="analytics" role="tab" aria-selected="false" aria-controls="panel-analytics" id="tab-analytics">Analytics</button>
- <button class="edit-tab" data-tab="embed" role="tab" aria-selected="false" aria-controls="panel-embed" id="tab-embed">Embed</button>
- <button class="edit-tab" data-tab="widgets" role="tab" aria-selected="false" aria-controls="panel-widgets" id="tab-widgets">Widgets</button>
- <button class="edit-tab" data-tab="studio" role="tab" aria-selected="false" aria-controls="panel-studio" id="tab-studio">Studio</button>
- <button class="edit-tab" data-tab="danger" role="tab" aria-selected="false" aria-controls="panel-danger" id="tab-danger">Danger</button>
- </div>
+ <div class="edit-layout">
+ <nav class="edit-sidebar" role="tablist" aria-label="Edit sections">
+ <div class="edit-sidebar-group">
+ <div class="edit-sidebar-group-title">Identity</div>
+ <button class="edit-tab active" data-tab="persona" role="tab" aria-selected="true" aria-controls="panel-persona" id="tab-persona">Persona</button>
+ <button class="edit-tab" data-tab="outfit" role="tab" aria-selected="false" aria-controls="panel-outfit" id="tab-outfit">Outfit</button>
+ <button class="edit-tab" data-tab="voice" role="tab" aria-selected="false" aria-controls="panel-voice" id="tab-voice">Voice</button>
+ </div>
+ <div class="edit-sidebar-group">
+ <div class="edit-sidebar-group-title">Brain</div>
+ <button class="edit-tab" data-tab="knowledge" role="tab" aria-selected="false" aria-controls="panel-knowledge" id="tab-knowledge">Knowledge</button>
+ <button class="edit-tab" data-tab="skills" role="tab" aria-selected="false" aria-controls="panel-skills" id="tab-skills">Skills</button>
+ <button class="edit-tab" data-tab="autopilot" role="tab" aria-selected="false" aria-controls="panel-autopilot" id="tab-autopilot">Autopilot</button>
+ </div>
+ <div class="edit-sidebar-group">
+ <div class="edit-sidebar-group-title">Distribute</div>
+ <button class="edit-tab" data-tab="publish" role="tab" aria-selected="false" aria-controls="panel-publish" id="tab-publish">Publish</button>
+ <button class="edit-tab" data-tab="embed" role="tab" aria-selected="false" aria-controls="panel-embed" id="tab-embed">Embed</button>
+ <button class="edit-tab" data-tab="widgets" role="tab" aria-selected="false" aria-controls="panel-widgets" id="tab-widgets">Widgets</button>
+ <button class="edit-tab" data-tab="social" role="tab" aria-selected="false" aria-controls="panel-social" id="tab-social">Social</button>
+ </div>
+ <div class="edit-sidebar-group">
+ <div class="edit-sidebar-group-title">Money</div>
+ <button class="edit-tab" data-tab="monetization" role="tab" aria-selected="false" aria-controls="panel-monetization" id="tab-monetization">Monetization</button>
+ <button class="edit-tab" data-tab="wallet" role="tab" aria-selected="false" aria-controls="panel-wallet" id="tab-wallet">Wallet</button>
+ <button class="edit-tab" data-tab="analytics" role="tab" aria-selected="false" aria-controls="panel-analytics" id="tab-analytics">Analytics</button>
+ </div>
+ <div class="edit-sidebar-group">
+ <div class="edit-sidebar-group-title">Advanced</div>
+ <button class="edit-tab" data-tab="studio" role="tab" aria-selected="false" aria-controls="panel-studio" id="tab-studio">Studio</button>
+ <button class="edit-tab danger" data-tab="danger" role="tab" aria-selected="false" aria-controls="panel-danger" id="tab-danger">Danger zone</button>
+ </div>
+ </nav>
- <main id="main">
+ <main id="main" class="edit-main">
<div id="loading" class="loading-msg" role="status" aria-live="polite">Loading…</div>
<div id="error" class="error-msg" style="display: none" role="alert"></div>
@@ -1366,7 +1464,8 @@
</div>
</div>
</section>
- </main>
+ </main>
+ </div>
<div class="outfit-status" id="outfit-status" role="status" aria-live="polite"></div>
diff --git a/api/_lib/migrations/2026-05-13-agent-memories-updated-at.sql b/api/_lib/migrations/2026-05-13-agent-memories-updated-at.sql
new file mode 100644
index 000000000..a19c13c30
--- /dev/null
+++ b/api/_lib/migrations/2026-05-13-agent-memories-updated-at.sql
@@ -0,0 +1,11 @@
+-- agent_memories needs updated_at to support upsert-by-id from the client.
+-- api/agent-memory.js writes this column in both INSERT branches and in the
+-- ON CONFLICT DO UPDATE clause; without it, every POST returns 500.
+
+alter table agent_memories
+ add column if not exists updated_at timestamptz not null default now();
+
+do $$ begin
+ create trigger agent_memories_set_updated_at before update on agent_memories
+ for each row execute function set_updated_at();
+exception when duplicate_object then null; end $$;
diff --git a/api/_lib/migrations/2026-05-13-avatars-default-public.sql b/api/_lib/migrations/2026-05-13-avatars-default-public.sql
index e22e71942..d6e4d103f 100644
--- a/api/_lib/migrations/2026-05-13-avatars-default-public.sql
+++ b/api/_lib/migrations/2026-05-13-avatars-default-public.sql
@@ -1,4 +1,4 @@
--- Avatars are now public by default. Private visibility is gated to paid plans.
+-- Avatars are now public by default.
-- This only changes the column default for new rows; existing rows are not modified.
alter table avatars alter column visibility set default 'public';
diff --git a/api/_lib/schema.sql b/api/_lib/schema.sql
index 88daccec8..9ce54410b 100644
--- a/api/_lib/schema.sql
+++ b/api/_lib/schema.sql
@@ -316,6 +316,7 @@ create table if not exists agent_memories (
context jsonb not null default '{}'::jsonb,
salience real not null default 0.5,
created_at timestamptz not null default now(),
+ updated_at timestamptz not null default now(),
expires_at timestamptz
);
@@ -323,6 +324,11 @@ create index if not exists agent_memories_agent_type
on agent_memories(agent_id, type, created_at desc)
where expires_at is null;
+do $$ begin
+ create trigger agent_memories_set_updated_at before update on agent_memories
+ for each row execute function set_updated_at();
+exception when duplicate_object then null; end $$;
+
-- ── agent_actions — append-only signed history ───────────────────────────────
create table if not exists agent_actions (
id bigserial primary key,
diff --git a/api/agents/eth-vanity.js b/api/agents/eth-vanity.js
index 6ecbbad41..24de664c6 100644
--- a/api/agents/eth-vanity.js
+++ b/api/agents/eth-vanity.js
@@ -246,8 +246,9 @@ export default async function handler(req, res, id, action) {
}
// ── GET ─────────────────────────────────────────────────────────────────
- if (!meta.eth_vanity) return error(res, 404, 'not_found', 'agent has no eth vanity record');
- return json(res, 200, { data: meta.eth_vanity });
+ // Return 200 + null for the "no record yet" state. 404 is reserved for
+ // missing parent resources (agent not found). Mirrors the SNS endpoint.
+ return json(res, 200, { data: meta.eth_vanity || null });
}
// Re-exported so the test suite can hit the verifier directly without
diff --git a/api/avatars/[id].js b/api/avatars/[id].js
index 7077b4797..a5fa45ce6 100644
--- a/api/avatars/[id].js
+++ b/api/avatars/[id].js
@@ -20,7 +20,6 @@ import { recordEvent } from '../_lib/usage.js';
import { z } from 'zod';
import { avatarVisibility, parse } from '../_lib/validate.js';
import { DEMO_AVATARS } from '../_lib/demo-avatars.js';
-import { userHasPaidPlan } from '../_lib/plans.js';
const patchSchema = z.object({
name: z.string().trim().min(1).max(120).optional(),
@@ -102,18 +101,6 @@ export default wrap(async (req, res) => {
return handleGlbPatch(res, auth, id, body.glbUrl);
}
const patch = parse(patchSchema, body);
- if (patch.visibility === 'private') {
- const current = await getAvatar({ id, requesterId: auth.userId });
- const wasPrivate = current?.visibility === 'private';
- if (!wasPrivate && !(await userHasPaidPlan(auth.userId))) {
- return error(
- res,
- 402,
- 'plan_required',
- 'private avatars require a Pro plan — upgrade at /dashboard/#billing or set visibility to public/unlisted',
- );
- }
- }
const avatar = await updateAvatar({ id, userId: auth.userId, patch });
if (!avatar) return error(res, 404, 'not_found', 'avatar not found or not yours');
return json(res, 200, { avatar });
diff --git a/api/avatars/index.js b/api/avatars/index.js
index c672732a4..24bb87c9f 100644
--- a/api/avatars/index.js
+++ b/api/avatars/index.js
@@ -11,7 +11,6 @@ import { cors, json, method, readJson, wrap, error } from '../_lib/http.js';
import { parse, createAvatarBody } from '../_lib/validate.js';
import { recordEvent } from '../_lib/usage.js';
import { defaultStorageMode } from '../_lib/storage-mode.js';
-import { userHasPaidPlan } from '../_lib/plans.js';
import { z } from 'zod';
const createWithStorage = createAvatarBody.extend({
@@ -45,15 +44,6 @@ async function handleCreate(req, res) {
if (!auth) return error(res, 401, 'unauthorized', 'avatars:write scope required');
const body = parse(createWithStorage, await readJson(req));
- if (body.visibility === 'private' && !(await userHasPaidPlan(auth.userId))) {
- return error(
- res,
- 402,
- 'plan_required',
- 'private avatars require a Pro plan — upgrade at /dashboard/#billing or set visibility to public/unlisted',
- );
- }
-
// Storage keys are scoped by userId (see storageKeyFor). Enforce that the
// caller can only register objects under their own prefix — otherwise a
// user could claim another user's freshly uploaded object.
diff --git a/api/portfolio/[action].js b/api/portfolio/[action].js
index de12f08a1..2ff21e5b7 100644
--- a/api/portfolio/[action].js
+++ b/api/portfolio/[action].js
@@ -21,6 +21,9 @@ import { reverseLookupAddress } from '../../src/solana/sns.js';
import { env } from '../_lib/env.js';
import { z } from 'zod';
+// `send` does a Solana submit + EVM RPC roundtrips; default 10s is not enough.
+export const maxDuration = 60;
+
const SNS_CACHE_TTL_MS = 10 * 60_000;
const _snsCache = new Map();
@@ -210,8 +213,8 @@ const sendSchema = z.object({
// 'native' for SOL/ETH, otherwise a mint (Solana) or 0x contract (EVM).
asset: z.string().min(1),
recipient: z.string().min(1),
- // Decimal string, in human units (e.g. "1.5" SOL or "100" USDC).
- amount: z.string().regex(/^\d+(\.\d+)?$/),
+ // Decimal string, in human units (e.g. "1.5" SOL, ".5" SOL, "100" USDC).
+ amount: z.string().regex(/^(\d+(\.\d*)?|\.\d+)$/, 'invalid amount'),
memo: z.string().max(120).optional(),
});
@@ -336,13 +339,17 @@ async function sendSolana({ agent, asset, recipient, amount, userId }) {
tx.add(createTransferInstruction(senderAta, recipientAta, kp.publicKey, amountUnits));
}
- const { blockhash, lastValidBlockHeight } = await conn.getLatestBlockhash();
+ const { blockhash } = await conn.getLatestBlockhash();
tx.feePayer = kp.publicKey;
tx.recentBlockhash = blockhash;
tx.sign(kp);
+ // Preflight runs on the RPC and throws synchronously if the tx would fail
+ // (insufficient lamports, missing ATA rent, etc.) — that gives us instant
+ // validation feedback. We deliberately don't await confirmTransaction here:
+ // 'confirmed' commitment takes 10-30s under load and the function would
+ // time out (Vercel default 10s). The signature is the receipt.
const sig = await conn.sendRawTransaction(tx.serialize(), { skipPreflight: false });
- await conn.confirmTransaction({ signature: sig, blockhash, lastValidBlockHeight }, 'confirmed');
return { tx_hash: sig };
}
diff --git a/api/users/[username].js b/api/users/[username].js
index 7b3e39402..636646489 100644
--- a/api/users/[username].js
+++ b/api/users/[username].js
@@ -16,37 +16,186 @@ export default wrap(async (req, res) => {
if (!rl.success) return error(res, 429, 'rate_limited', 'too many requests');
const [user] = await sql`
- select id, display_name, username, created_at, referral_code
+ select id, display_name, username, created_at, referral_code, wallet_address
from users
where lower(username) = ${username} and deleted_at is null
limit 1
`;
if (!user) return error(res, 404, 'not_found', 'user not found');
- const avatarRows = await sql`
- select id, name, description, thumbnail_key, tags, created_at
- from avatars
- where owner_id = ${user.id} and visibility = 'public' and deleted_at is null
- order by created_at desc
- limit 48
- `;
+ const [
+ avatarRows,
+ agentRows,
+ widgetRows,
+ skillRows,
+ pluginRows,
+ socialRows,
+ statsRow,
+ ] = await Promise.all([
+ sql`
+ select id, name, slug, description, storage_key, thumbnail_key, tags,
+ source, size_bytes, version, created_at
+ from avatars
+ where owner_id = ${user.id}
+ and visibility = 'public'
+ and deleted_at is null
+ order by created_at desc
+ limit 48
+ `,
+ sql`
+ select id, name, description, avatar_url, profile_image_url, home_url,
+ wallet_address, chain_id, erc8004_agent_id, x_username,
+ farcaster_fname, created_at
+ from agent_identities
+ where user_id = ${user.id}
+ and is_public = true
+ and deleted_at is null
+ order by created_at desc
+ limit 48
+ `,
+ sql`
+ select id, type, name, avatar_id, view_count, is_public, created_at
+ from widgets
+ where user_id = ${user.id}
+ and is_public = true
+ and deleted_at is null
+ order by view_count desc, created_at desc
+ limit 24
+ `,
+ sql`
+ select id, slug, name, description, category, tags, install_count,
+ price_per_call_usd, created_at
+ from marketplace_skills
+ where author_id = ${user.id}
+ and is_public = true
+ order by install_count desc, created_at desc
+ limit 24
+ `,
+ sql`
+ select id, identifier, name, description, category, tags,
+ install_count, avg_rating, rating_count, created_at
+ from plugins
+ where author_id = ${user.id}
+ and is_public = true
+ and deleted_at is null
+ order by install_count desc, created_at desc
+ limit 24
+ `,
+ sql`
+ select provider, username
+ from social_connections
+ where user_id = ${user.id}
+ and disconnected_at is null
+ `,
+ sql`
+ select
+ (select count(*)::int from avatars
+ where owner_id = ${user.id} and visibility = 'public' and deleted_at is null) as avatars_count,
+ (select count(*)::int from agent_identities
+ where user_id = ${user.id} and is_public = true and deleted_at is null) as agents_count,
+ (select count(*)::int from widgets
+ where user_id = ${user.id} and is_public = true and deleted_at is null) as widgets_count,
+ (select count(*)::int from marketplace_skills
+ where author_id = ${user.id} and is_public = true) as skills_count,
+ (select count(*)::int from plugins
+ where author_id = ${user.id} and is_public = true and deleted_at is null) as plugins_count,
+ (select coalesce(sum(view_count), 0)::bigint from widgets
+ where user_id = ${user.id} and is_public = true and deleted_at is null) as total_widget_views
+ `,
+ ]);
const avatars = avatarRows.map((a) => ({
id: a.id,
+ slug: a.slug,
name: a.name,
description: a.description,
thumbnail_url: a.thumbnail_key ? publicUrl(a.thumbnail_key) : null,
+ model_url: a.storage_key ? publicUrl(a.storage_key) : null,
+ size_bytes: Number(a.size_bytes || 0),
+ source: a.source,
+ version: a.version,
tags: a.tags || [],
created_at: a.created_at,
}));
+ const agents = agentRows.map((a) => ({
+ id: a.id,
+ name: a.name,
+ description: a.description,
+ avatar_url: a.avatar_url,
+ profile_image_url: a.profile_image_url,
+ home_url: a.home_url,
+ wallet_address: a.wallet_address,
+ chain_id: a.chain_id,
+ erc8004_agent_id: a.erc8004_agent_id ? String(a.erc8004_agent_id) : null,
+ x_username: a.x_username,
+ farcaster_fname: a.farcaster_fname,
+ created_at: a.created_at,
+ }));
+
+ const widgets = widgetRows.map((w) => ({
+ id: w.id,
+ type: w.type,
+ name: w.name,
+ avatar_id: w.avatar_id,
+ view_count: Number(w.view_count || 0),
+ created_at: w.created_at,
+ }));
+
+ const skills = skillRows.map((s) => ({
+ id: s.id,
+ slug: s.slug,
+ name: s.name,
+ description: s.description,
+ category: s.category,
+ tags: s.tags || [],
+ install_count: s.install_count,
+ price_per_call_usd: Number(s.price_per_call_usd || 0),
+ created_at: s.created_at,
+ }));
+
+ const plugins = pluginRows.map((p) => ({
+ id: p.id,
+ identifier: p.identifier,
+ name: p.name,
+ description: p.description,
+ category: p.category,
+ tags: p.tags || [],
+ install_count: p.install_count,
+ avg_rating: Number(p.avg_rating || 0),
+ rating_count: p.rating_count,
+ created_at: p.created_at,
+ }));
+
+ const social = {};
+ for (const row of socialRows) {
+ social[row.provider] = row.username;
+ }
+
+ const stats = {
+ avatars: statsRow?.avatars_count ?? 0,
+ agents: statsRow?.agents_count ?? 0,
+ widgets: statsRow?.widgets_count ?? 0,
+ skills: statsRow?.skills_count ?? 0,
+ plugins: statsRow?.plugins_count ?? 0,
+ widget_views: Number(statsRow?.total_widget_views ?? 0),
+ };
+
res.setHeader('Cache-Control', 'public, s-maxage=60, stale-while-revalidate=300');
return json(res, 200, {
user: {
username: user.username,
display_name: user.display_name || user.username,
referral_code: user.referral_code,
+ wallet_address: user.wallet_address,
+ created_at: user.created_at,
},
+ stats,
+ social,
avatars,
+ agents,
+ widgets,
+ skills,
+ plugins,
});
});
diff --git a/app.html b/app.html
index efcd26b91..276343c77 100644
--- a/app.html
+++ b/app.html
@@ -199,7 +199,10 @@
<aside class="auth-gate" id="auth-gate">
<div class="auth-gate__inner">
<div class="auth-gate__eyebrow">
- <span class="auth-gate__lock" aria-hidden="true">◎</span>
+ <svg class="auth-gate__lock" aria-hidden="true" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
+ <rect x="3" y="11" width="18" height="11" rx="2" />
+ <path d="M7 11V7a5 5 0 0 1 10 0v4" />
+ </svg>
<span>Unlock the agent</span>
</div>
<h2 class="auth-gate__title">Your agent lives here</h2>
diff --git a/embed.html b/embed.html
index 596f2d1d8..647e3a742 100644
--- a/embed.html
+++ b/embed.html
@@ -25,6 +25,7 @@
import { mountEmbedEditor } from './src/editor/embed-editor.js';
const url = new URL(location.href);
mountEmbedEditor(document.getElementById('root'), {
+ widgetId: url.searchParams.get('id') || '',
src: url.searchParams.get('src') || '',
mode: url.searchParams.get('mode') || 'floating',
position: url.searchParams.get('position') || 'bottom-right',
diff --git a/profile.html b/profile.html
index 7806ca310..e0e1b3303 100644
--- a/profile.html
+++ b/profile.html
@@ -303,6 +303,349 @@
border-color: rgba(74, 222, 128, 0.3);
}
+ /* ── Rich profile (username) ─────────────────────────────────────── */
+ .up-hero-rich {
+ display: grid;
+ grid-template-columns: 280px 1fr;
+ gap: 2rem;
+ align-items: center;
+ margin-bottom: 2rem;
+ padding-bottom: 2rem;
+ border-bottom: 1px solid rgba(255, 255, 255, 0.06);
+ }
+
+ .up-hero-3d {
+ width: 280px;
+ height: 280px;
+ border-radius: 16px;
+ border: 1px solid rgba(255, 255, 255, 0.08);
+ background:
+ radial-gradient(ellipse at top, rgba(255, 215, 0, 0.05) 0%, transparent 60%),
+ rgba(255, 255, 255, 0.015);
+ overflow: hidden;
+ position: relative;
+ }
+
+ .up-hero-3d model-viewer,
+ .up-hero-3d img {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ --poster-color: transparent;
+ background: transparent;
+ }
+
+ .up-hero-3d-empty {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 4rem;
+ color: rgba(255, 215, 0, 0.18);
+ }
+
+ .up-display-name {
+ font-size: 2.236rem;
+ font-weight: 300;
+ color: #f5f5f5;
+ letter-spacing: -0.025em;
+ margin: 0 0 0.382rem;
+ line-height: 1.05;
+ }
+
+ .up-handle {
+ font-size: 0.875rem;
+ color: rgba(255, 215, 0, 0.65);
+ margin: 0 0 0.75rem;
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
+ }
+
+ .up-meta-line {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 0.5rem 1rem;
+ font-size: 0.7rem;
+ color: rgba(255, 255, 255, 0.4);
+ margin: 0 0 0.875rem;
+ }
+
+ .up-meta-line a {
+ color: rgba(255, 255, 255, 0.55);
+ text-decoration: none;
+ display: inline-flex;
+ align-items: center;
+ gap: 0.25rem;
+ }
+
+ .up-meta-line a:hover {
+ color: #fff;
+ }
+
+ .up-meta-line svg {
+ width: 12px;
+ height: 12px;
+ }
+
+ .up-wallet-pill {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.382rem;
+ background: rgba(255, 255, 255, 0.03);
+ border: 1px solid rgba(255, 255, 255, 0.08);
+ padding: 0.25rem 0.618rem;
+ border-radius: 999px;
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
+ font-size: 0.65rem;
+ color: rgba(255, 255, 255, 0.55);
+ }
+
+ /* ── Stats strip ─────────────────────────────────────────────────── */
+ .up-stats {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
+ gap: 0;
+ margin-bottom: 2rem;
+ border: 1px solid rgba(255, 255, 255, 0.06);
+ border-radius: 12px;
+ overflow: hidden;
+ background: rgba(255, 255, 255, 0.015);
+ }
+
+ .up-stat {
+ padding: 0.875rem 1rem;
+ border-right: 1px solid rgba(255, 255, 255, 0.05);
+ text-align: center;
+ }
+
+ .up-stat:last-child {
+ border-right: none;
+ }
+
+ .up-stat-num {
+ display: block;
+ font-size: 1.382rem;
+ font-weight: 300;
+ color: #f5f5f5;
+ letter-spacing: -0.02em;
+ line-height: 1.1;
+ margin-bottom: 0.2rem;
+ }
+
+ .up-stat-label {
+ font-size: 0.55rem;
+ text-transform: uppercase;
+ letter-spacing: 0.12em;
+ color: rgba(255, 255, 255, 0.35);
+ }
+
+ /* ── Tabs ────────────────────────────────────────────────────────── */
+ .up-tabs {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 0.25rem;
+ margin-bottom: 1.5rem;
+ border-bottom: 1px solid rgba(255, 255, 255, 0.06);
+ }
+
+ .up-tab {
+ background: transparent;
+ border: none;
+ border-bottom: 2px solid transparent;
+ color: rgba(255, 255, 255, 0.4);
+ font-family: inherit;
+ font-size: 0.764rem;
+ padding: 0.618rem 1rem;
+ cursor: pointer;
+ transition: color 0.15s, border-color 0.15s;
+ display: inline-flex;
+ align-items: center;
+ gap: 0.382rem;
+ margin-bottom: -1px;
+ }
+
+ .up-tab:hover {
+ color: rgba(255, 255, 255, 0.8);
+ }
+
+ .up-tab--active {
+ color: #ffd700;
+ border-bottom-color: rgba(255, 215, 0, 0.7);
+ }
+
+ .up-tab-badge {
+ font-size: 0.55rem;
+ background: rgba(255, 255, 255, 0.06);
+ border-radius: 999px;
+ padding: 0.1rem 0.5rem;
+ color: rgba(255, 255, 255, 0.5);
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
+ }
+
+ .up-tab--active .up-tab-badge {
+ background: rgba(255, 215, 0, 0.12);
+ color: rgba(255, 215, 0, 0.85);
+ }
+
+ .up-section {
+ display: block;
+ }
+
+ .up-section[hidden] {
+ display: none;
+ }
+
+ /* ── Agent / widget / skill / plugin cards ───────────────────────── */
+ .up-card-row {
+ display: flex;
+ gap: 0.875rem;
+ padding: 0.875rem;
+ background: rgba(255, 255, 255, 0.02);
+ border: 1px solid rgba(255, 255, 255, 0.07);
+ border-radius: 12px;
+ transition: border-color 0.15s, background 0.15s;
+ text-decoration: none;
+ color: inherit;
+ }
+
+ .up-card-row:hover {
+ border-color: rgba(255, 255, 255, 0.14);
+ background: rgba(255, 255, 255, 0.04);
+ }
+
+ .up-card-row-thumb {
+ width: 56px;
+ height: 56px;
+ flex-shrink: 0;
+ border-radius: 50%;
+ background: radial-gradient(ellipse at center, rgba(255, 215, 0, 0.06) 0%, transparent 70%);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 1.5rem;
+ color: rgba(255, 215, 0, 0.4);
+ overflow: hidden;
+ }
+
+ .up-card-row-thumb img {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ }
+
+ .up-card-row-body {
+ flex: 1;
+ min-width: 0;
+ display: flex;
+ flex-direction: column;
+ gap: 0.25rem;
+ }
+
+ .up-card-row-head {
+ display: flex;
+ align-items: baseline;
+ gap: 0.5rem;
+ flex-wrap: wrap;
+ }
+
+ .up-card-row-name {
+ font-size: 0.875rem;
+ color: rgba(255, 255, 255, 0.92);
+ margin: 0;
+ font-weight: 500;
+ }
+
+ .up-card-row-desc {
+ font-size: 0.7rem;
+ color: rgba(255, 255, 255, 0.45);
+ margin: 0;
+ line-height: 1.5;
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+ }
+
+ .up-card-row-meta {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 0.5rem 0.875rem;
+ font-size: 0.6rem;
+ color: rgba(255, 255, 255, 0.3);
+ margin-top: 0.25rem;
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
+ }
+
+ .up-card-row-meta a {
+ color: rgba(154, 140, 255, 0.6);
+ text-decoration: none;
+ }
+
+ .up-card-row-meta a:hover {
+ color: rgba(154, 140, 255, 0.95);
+ }
+
+ .up-tag {
+ display: inline-block;
+ font-size: 0.55rem;
+ padding: 0.1rem 0.5rem;
+ border-radius: 999px;
+ background: rgba(154, 140, 255, 0.08);
+ color: rgba(154, 140, 255, 0.7);
+ margin-right: 4px;
+ font-family: inherit;
+ letter-spacing: 0.02em;
+ }
+
+ .up-list {
+ display: grid;
+ gap: 0.618rem;
+ }
+
+ .up-list-cols-2 {
+ grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
+ }
+
+ .up-card-row-pill {
+ display: inline-flex;
+ align-items: center;
+ font-size: 0.55rem;
+ padding: 0.15rem 0.5rem;
+ border-radius: 999px;
+ background: rgba(255, 215, 0, 0.08);
+ color: rgba(255, 215, 0, 0.75);
+ text-transform: uppercase;
+ letter-spacing: 0.08em;
+ }
+
+ .up-loading-shimmer {
+ background: linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.02) 100%);
+ background-size: 200% 100%;
+ animation: up-shimmer 1.4s infinite;
+ border-radius: 12px;
+ height: 220px;
+ }
+
+ @keyframes up-shimmer {
+ 0% { background-position: 200% 0; }
+ 100% { background-position: -200% 0; }
+ }
+
+ @media (max-width: 720px) {
+ .up-hero-rich {
+ grid-template-columns: 1fr;
+ gap: 1.5rem;
+ }
+ .up-hero-3d {
+ width: 100%;
+ max-width: 320px;
+ height: 320px;
+ }
+ .up-display-name {
+ font-size: 1.764rem;
+ }
+ }
+
@media (max-width: 480px) {
.up-hero {
flex-direction: column;
@@ -312,6 +655,13 @@
.up-grid {
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
+
+ .up-stat {
+ padding: 0.618rem 0.5rem;
+ }
+ .up-stat-num {
+ font-size: 1.1rem;
+ }
}
</style>
<link rel="stylesheet" href="/nav.css" />
@@ -474,7 +824,7 @@
}
async function mountUsernameProfile(rootEl, username) {
- rootEl.innerHTML = `<div class="up-error">Loading…</div>`;
+ rootEl.innerHTML = `<div class="up-loading-shimmer"></div>`;
const res = await fetch(`/api/users/${encodeURIComponent(username)}`);
if (!res.ok) {
@@ -483,23 +833,171 @@
rootEl.innerHTML = `<div class="up-error">${esc(msg)}</div>`;
return;
}
- const { user, avatars } = await res.json();
+ const data = await res.json();
+ const { user, stats = {}, social = {}, avatars = [], agents = [], widgets = [], skills = [], plugins = [] } = data;
// Update page meta
+ const display = user.display_name || user.username;
const title = `@${user.username} — three.ws`;
+ const summaryParts = [];
+ if (stats.avatars) summaryParts.push(`${stats.avatars} avatar${stats.avatars === 1 ? '' : 's'}`);
+ if (stats.agents) summaryParts.push(`${stats.agents} agent${stats.agents === 1 ? '' : 's'}`);
+ if (stats.widgets) summaryParts.push(`${stats.widgets} widget${stats.widgets === 1 ? '' : 's'}`);
+ if (stats.skills) summaryParts.push(`${stats.skills} skill${stats.skills === 1 ? '' : 's'}`);
+ const desc = `${display} on three.ws — ${summaryParts.join(' · ') || 'on-chain agent identity'}.`;
document.title = title;
const profileUrl = `${location.origin}/u/${encodeURIComponent(user.username)}`;
document.querySelector('#og-title')?.setAttribute('content', title);
- document.querySelector('#og-description')?.setAttribute('content', `${user.display_name || user.username}'s avatars on three.ws`);
+ document.querySelector('#og-description')?.setAttribute('content', desc);
document.querySelector('#og-url')?.setAttribute('content', profileUrl);
document.querySelector('#tw-title')?.setAttribute('content', title);
- document.querySelector('#tw-description')?.setAttribute('content', `${user.display_name || user.username}'s public avatars on three.ws`);
+ document.querySelector('#tw-description')?.setAttribute('content', desc);
- const avatarCards = avatars.map((a) => {
+ // Hero 3D
+ const heroAvatar = avatars.find((a) => a.model_url) || null;
+ const heroMedia = heroAvatar
+ ? `<model-viewer
+ src="${attr(heroAvatar.model_url)}"
+ alt="${attr(heroAvatar.name)}"
+ auto-rotate
+ auto-rotate-delay="0"
+ rotation-per-second="18deg"
+ interaction-prompt="none"
+ camera-controls
+ disable-zoom
+ shadow-intensity="0.6"
+ exposure="0.95"
+ environment-image="neutral"
+ loading="lazy"
+ ></model-viewer>`
+ : heroAvatar?.thumbnail_url
+ ? `<img src="${attr(heroAvatar.thumbnail_url)}" alt="${attr(heroAvatar?.name || display)}">`
+ : `<div class="up-hero-3d-empty">◎</div>`;
+
+ // Meta line: joined date + social
+ const metaBits = [];
+ if (user.created_at) {
+ const joined = new Date(user.created_at);
+ metaBits.push(`Joined ${joined.toLocaleDateString(undefined, { month: 'long', year: 'numeric' })}`);
+ }
+ if (social.twitter || social.x) {
+ const x = social.twitter || social.x;
+ metaBits.push(`<a href="https://x.com/${attr(x)}" target="_blank" rel="noopener">
+ <svg viewBox="0 0 24 24" aria-hidden="true"><path fill="currentColor" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>
+ @${esc(x)}
+ </a>`);
+ }
+ if (social.farcaster) {
+ metaBits.push(`<a href="https://warpcast.com/${attr(social.farcaster)}" target="_blank" rel="noopener">@${esc(social.farcaster)} on Farcaster</a>`);
+ }
+
+ const walletPill = user.wallet_address
+ ? `<span class="up-wallet-pill" title="${attr(user.wallet_address)}">
+ <svg width="10" height="10" viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" d="M2 4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v1H2zm0 2h12v6a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2zm9 4a1 1 0 1 0 0-2 1 1 0 0 0 0 2"/></svg>
+ ${esc(user.wallet_address.slice(0, 6))}…${esc(user.wallet_address.slice(-4))}
+ </span>`
+ : '';
+
+ // Stats strip
+ const statDefs = [
+ ['avatars', 'Avatars'],
+ ['agents', 'Agents'],
+ ['widgets', 'Widgets'],
+ ['skills', 'Skills'],
+ ['plugins', 'Plugins'],
+ ];
+ if (stats.widget_views > 0) statDefs.push(['widget_views', 'Widget Views']);
+ const statsHtml = statDefs.map(([key, label]) => `
+ <div class="up-stat">
+ <span class="up-stat-num">${formatStat(stats[key] || 0)}</span>
+ <span class="up-stat-label">${label}</span>
+ </div>
+ `).join('');
+
+ // Tabs: only show those with content; default to first non-empty
+ const tabs = [
+ { key: 'avatars', label: 'Avatars', count: avatars.length },
+ { key: 'agents', label: 'Agents', count: agents.length },
+ { key: 'widgets', label: 'Widgets', count: widgets.length },
+ { key: 'skills', label: 'Skills', count: skills.length },
+ { key: 'plugins', label: 'Plugins', count: plugins.length },
+ ];
+ const visibleTabs = tabs.filter((t) => t.count > 0);
+ const defaultTab = visibleTabs[0]?.key || 'avatars';
+
+ const tabBar = (visibleTabs.length > 1)
+ ? `<div class="up-tabs" role="tablist">
+ ${visibleTabs.map((t) => `
+ <button class="up-tab${t.key === defaultTab ? ' up-tab--active' : ''}" role="tab" data-tab="${t.key}" aria-selected="${t.key === defaultTab}">
+ ${esc(t.label)}
+ <span class="up-tab-badge">${t.count}</span>
+ </button>
+ `).join('')}
+ </div>`
+ : '';
+
+ rootEl.innerHTML = `
+ <div class="up-hero-rich">
+ <div class="up-hero-3d">${heroMedia}</div>
+ <div class="up-hero-info">
+ <h1 class="up-display-name">${esc(display)}</h1>
+ <p class="up-handle">@${esc(user.username)}</p>
+ ${metaBits.length ? `<div class="up-meta-line">${metaBits.join('')}</div>` : ''}
+ ${walletPill}
+ </div>
+ </div>
+ <div class="up-stats">${statsHtml}</div>
+ ${tabBar}
+ <section class="up-section" data-section="avatars"${defaultTab === 'avatars' ? '' : ' hidden'}>
+ ${renderAvatarsGrid(avatars)}
+ </section>
+ <section class="up-section" data-section="agents"${defaultTab === 'agents' ? '' : ' hidden'}>
+ ${renderAgentsList(agents)}
+ </section>
+ <section class="up-section" data-section="widgets"${defaultTab === 'widgets' ? '' : ' hidden'}>
+ ${renderWidgetsList(widgets)}
+ </section>
+ <section class="up-section" data-section="skills"${defaultTab === 'skills' ? '' : ' hidden'}>
+ ${renderSkillsList(skills)}
+ </section>
+ <section class="up-section" data-section="plugins"${defaultTab === 'plugins' ? '' : ' hidden'}>
+ ${renderPluginsList(plugins)}
+ </section>
+ `;
+
+ // Tab switching
+ rootEl.querySelectorAll('.up-tab').forEach((btn) => {
+ btn.addEventListener('click', () => {
+ const key = btn.dataset.tab;
+ rootEl.querySelectorAll('.up-tab').forEach((b) => {
+ const active = b.dataset.tab === key;
+ b.classList.toggle('up-tab--active', active);
+ b.setAttribute('aria-selected', active ? 'true' : 'false');
+ });
+ rootEl.querySelectorAll('.up-section').forEach((s) => {
+ s.hidden = s.dataset.section !== key;
+ });
+ });
+ });
+ }
+
+ function formatStat(n) {
+ if (n >= 1_000_000) return (n / 1_000_000).toFixed(1).replace(/\.0$/, '') + 'M';
+ if (n >= 1_000) return (n / 1_000).toFixed(1).replace(/\.0$/, '') + 'K';
+ return String(n);
+ }
+
+ function renderAvatarsGrid(avatars) {
+ if (!avatars.length) {
+ return `<p class="up-empty">No public avatars yet.</p>`;
+ }
+ const cards = avatars.map((a) => {
const thumb = a.thumbnail_url
? `<img src="${attr(a.thumbnail_url)}" alt="${attr(a.name)}" style="width:100%;height:100%;object-fit:cover">`
: `<div class="up-card-thumb-placeholder">◎</div>`;
- const tags = (a.tags || []).slice(0, 3).map((t) => `<span style="font-size:0.55rem;color:rgba(154,140,255,0.6);margin-right:4px">#${esc(t)}</span>`).join('');
+ const tags = (a.tags || []).slice(0, 3).map((t) => `<span class="up-tag">#${esc(t)}</span>`).join('');
+ const sizeKB = a.size_bytes ? Math.round(a.size_bytes / 1024) : 0;
+ const sizeLabel = sizeKB >= 1024 ? `${(sizeKB / 1024).toFixed(1)} MB` : `${sizeKB} KB`;
return `
<article class="up-card">
<a href="/avatars/${attr(a.id)}" class="up-card-thumb-link" tabindex="-1" aria-hidden="true">
@@ -510,27 +1008,124 @@
${a.description ? `<p class="up-card-desc">${esc(a.description)}</p>` : ''}
<div class="up-card-footer">
<div>${tags}</div>
+ ${a.size_bytes ? `<span class="up-card-id">${esc(sizeLabel)}</span>` : ''}
</div>
</div>
</article>
`;
}).join('');
+ return `<div class="up-grid">${cards}</div>`;
+ }
- rootEl.innerHTML = `
- <div class="up-hero">
- <div class="up-avatar-ring">
- <span class="up-avatar-glyph">◎</span>
- </div>
- <div class="up-hero-info">
- <h1 class="up-address">${esc(user.display_name || user.username)}</h1>
- <p class="up-muted">@${esc(user.username)}</p>
- <p class="up-muted" style="margin-top:4px">${avatars.length} public avatar${avatars.length === 1 ? '' : 's'}</p>
+ function renderAgentsList(agents) {
+ if (!agents.length) return `<p class="up-empty">No public agents yet.</p>`;
+ const cards = agents.map((a) => {
+ const img = a.profile_image_url || a.avatar_url;
+ const thumb = img
+ ? `<img src="${attr(img)}" alt="${attr(a.name)}">`
+ : `<span>◎</span>`;
+ const meta = [];
+ if (a.erc8004_agent_id && a.chain_id) meta.push(`ERC-8004 #${esc(a.erc8004_agent_id)} · chain ${esc(String(a.chain_id))}`);
+ if (a.wallet_address) meta.push(`${esc(a.wallet_address.slice(0, 6))}…${esc(a.wallet_address.slice(-4))}`);
+ if (a.x_username) meta.push(`<a href="https://x.com/${attr(a.x_username)}" target="_blank" rel="noopener">@${esc(a.x_username)}</a>`);
+ if (a.farcaster_fname) meta.push(`<a href="https://warpcast.com/${attr(a.farcaster_fname)}" target="_blank" rel="noopener">/${esc(a.farcaster_fname)}</a>`);
+ return `
+ <a class="up-card-row" href="/agent/${attr(a.id)}">
+ <div class="up-card-row-thumb">${thumb}</div>
+ <div class="up-card-row-body">
+ <div class="up-card-row-head">
+ <h3 class="up-card-row-name">${esc(a.name)}</h3>
+ </div>
+ ${a.description ? `<p class="up-card-row-desc">${esc(a.description)}</p>` : ''}
+ ${meta.length ? `<div class="up-card-row-meta">${meta.map((m) => `<span>${m}</span>`).join('')}</div>` : ''}
+ </div>
+ </a>
+ `;
+ }).join('');
+ return `<div class="up-list up-list-cols-2">${cards}</div>`;
+ }
+
+ function renderWidgetsList(widgets) {
+ if (!widgets.length) return `<p class="up-empty">No public widgets yet. <a href="/widgets">Build one →</a></p>`;
+ const typeIcons = {
+ turntable: '◐',
+ 'animation-gallery': '▶',
+ 'talking-agent': '💬',
+ passport: '◉',
+ 'hotspot-tour': '⊙',
+ };
+ const cards = widgets.map((w) => {
+ const icon = typeIcons[w.type] || '◎';
+ return `
+ <a class="up-card-row" href="/w/${attr(w.id)}">
+ <div class="up-card-row-thumb">${icon}</div>
+ <div class="up-card-row-body">
+ <div class="up-card-row-head">
+ <h3 class="up-card-row-name">${esc(w.name)}</h3>
+ <span class="up-card-row-pill">${esc(w.type)}</span>
+ </div>
+ <div class="up-card-row-meta">
+ <span>${formatStat(w.view_count)} view${w.view_count === 1 ? '' : 's'}</span>
+ <span>${esc(w.id)}</span>
+ </div>
+ </div>
+ </a>
+ `;
+ }).join('');
+ return `<div class="up-list up-list-cols-2">${cards}</div>`;
+ }
+
+ function renderSkillsList(skills) {
+ if (!skills.length) return `<p class="up-empty">No published skills yet.</p>`;
+ const cards = skills.map((s) => {
+ const tags = (s.tags || []).slice(0, 3).map((t) => `<span class="up-tag">#${esc(t)}</span>`).join('');
+ const price = s.price_per_call_usd > 0
+ ? `$${Number(s.price_per_call_usd).toFixed(4)}/call`
+ : 'free';
+ return `
+ <a class="up-card-row" href="/marketplace#${attr(s.slug)}">
+ <div class="up-card-row-thumb">⚡</div>
+ <div class="up-card-row-body">
+ <div class="up-card-row-head">
+ <h3 class="up-card-row-name">${esc(s.name)}</h3>
+ <span class="up-card-row-pill">${esc(s.category)}</span>
+ </div>
+ ${s.description ? `<p class="up-card-row-desc">${esc(s.description)}</p>` : ''}
+ <div class="up-card-row-meta">
+ <span>${esc(price)}</span>
+ <span>${formatStat(s.install_count)} install${s.install_count === 1 ? '' : 's'}</span>
+ ${tags ? `<span>${tags}</span>` : ''}
+ </div>
+ </div>
+ </a>
+ `;
+ }).join('');
+ return `<div class="up-list up-list-cols-2">${cards}</div>`;
+ }
+
+ function renderPluginsList(plugins) {
+ if (!plugins.length) return `<p class="up-empty">No published plugins yet.</p>`;
+ const cards = plugins.map((p) => {
+ const rating = p.rating_count > 0 ? `★ ${Number(p.avg_rating).toFixed(1)} (${p.rating_count})` : 'unrated';
+ return `
+ <div class="up-card-row">
+ <div class="up-card-row-thumb">◈</div>
+ <div class="up-card-row-body">
+ <div class="up-card-row-head">
+ <h3 class="up-card-row-name">${esc(p.name)}</h3>
+ <span class="up-card-row-pill">${esc(p.category)}</span>
+ </div>
+ ${p.description ? `<p class="up-card-row-desc">${esc(p.description)}</p>` : ''}
+ <div class="up-card-row-meta">
+ <span>${esc(p.identifier)}</span>
+ <span>${formatStat(p.install_count)} install${p.install_count === 1 ? '' : 's'}</span>
+ <span>${esc(rating)}</span>
+ </div>
+ </div>
</div>
- </div>
- <div class="up-grid">
- ${avatarCards || `<p class="up-empty">No public avatars yet.</p>`}
- </div>
- `;
+ `;
+ }).join('');
+ return `<div class="up-list up-list-cols-2">${cards}</div>`;
}
// Copy profile URL to clipboard
diff --git a/public/dashboard/agent-pumpfun.html b/public/dashboard/agent-pumpfun.html
index f8c2efb43..f78e9f83f 100644
--- a/public/dashboard/agent-pumpfun.html
+++ b/public/dashboard/agent-pumpfun.html
@@ -41,21 +41,104 @@
a:hover {
text-decoration: underline;
}
- header {
+ header.site-header {
display: flex;
align-items: center;
justify-content: space-between;
- padding: 16px 24px;
+ gap: 18px;
+ padding: 14px 24px;
border-bottom: 1px solid var(--border);
position: sticky;
top: 0;
- background: var(--bg);
+ background: rgba(0, 0, 0, 0.85);
+ backdrop-filter: blur(8px);
z-index: 5;
}
+ .site-header .brand {
+ display: inline-flex;
+ align-items: center;
+ gap: 8px;
+ font-weight: 600;
+ letter-spacing: -0.01em;
+ color: #fff;
+ }
+ .site-header .brand img {
+ height: 22px;
+ width: auto;
+ display: block;
+ }
+ .site-nav {
+ display: flex;
+ gap: 2px;
+ flex-wrap: wrap;
+ margin-left: auto;
+ }
+ .site-nav a {
+ font-size: 13px;
+ padding: 7px 11px;
+ border-radius: 7px;
+ color: #bbb;
+ }
+ .site-nav a:hover {
+ background: var(--panel);
+ text-decoration: none;
+ color: #eee;
+ }
+ .site-nav a.active {
+ background: var(--panel);
+ color: #fff;
+ }
.brand {
font-weight: 600;
letter-spacing: -0.01em;
}
+ .crumb {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ padding: 10px 24px;
+ border-bottom: 1px solid var(--border);
+ background: var(--bg);
+ position: sticky;
+ top: 53px;
+ z-index: 4;
+ font-size: 13px;
+ }
+ .crumb a { color: #9a8cff; }
+ .crumb .sep { color: #555; }
+ footer.site-footer {
+ margin-top: 40px;
+ padding: 28px 24px 36px;
+ border-top: 1px solid var(--border);
+ background: #06060a;
+ color: var(--muted);
+ font-size: 13px;
+ }
+ .site-footer-inner {
+ max-width: 1280px;
+ margin: 0 auto;
+ display: flex;
+ flex-wrap: wrap;
+ gap: 18px;
+ align-items: center;
+ justify-content: space-between;
+ }
+ .site-footer-brand {
+ display: inline-flex;
+ align-items: center;
+ gap: 8px;
+ color: #ddd;
+ font-weight: 600;
+ }
+ .site-footer-brand img { height: 18px; width: auto; }
+ .site-footer-links {
+ display: flex;
+ gap: 14px;
+ flex-wrap: wrap;
+ }
+ .site-footer-links a { color: #aaa; }
+ .site-footer-links a:hover { color: #fff; }
+ .site-footer-legal { color: #666; font-size: 12px; }
main {
padding: 28px;
max-width: 1280px;
@@ -193,7 +276,7 @@
border-bottom: 1px solid var(--border);
background: var(--bg);
position: sticky;
- top: 57px;
+ top: 96px;
z-index: 4;
}
.subnav a {
@@ -366,18 +449,29 @@
</style>
</head>
<body>
- <header>
- <div class="row">
- <a class="brand" href="/dashboard">← Dashboard</a>
- <span class="muted">/</span>
- <span class="brand">Agent · Pump.fun</span>
- </div>
- <div class="row">
- <a href="/dashboard/wallets">Wallets</a>
+ <header class="site-header">
+ <a class="brand" href="/" aria-label="three.ws home">
+ <img src="/three.svg" alt="" aria-hidden="true" />
+ <span>three.ws</span>
+ </a>
+ <nav class="site-nav" aria-label="Primary">
+ <a href="/app">Viewer</a>
+ <a href="/create">Create</a>
<a href="/discover">Discover</a>
- </div>
+ <a href="/widgets">Widgets</a>
+ <a href="/studio">Studio</a>
+ <a href="/docs">Docs</a>
+ <a href="/dashboard" class="active" aria-current="page">Dashboard</a>
+ </nav>
+ <div id="header-user-slot"></div>
</header>
+ <div class="crumb">
+ <a href="/dashboard">← Dashboard</a>
+ <span class="sep">/</span>
+ <span class="brand">Agent · Pump.fun</span>
+ </div>
+
<nav class="subnav" aria-label="Agent wallet tools">
<a href="/dashboard/agent-pumpfun" class="active" aria-current="page">Pump.fun</a>
<a href="/dashboard/wallets">Wallets</a>
@@ -723,6 +817,31 @@
<div class="toast" id="toast"></div>
+ <footer class="site-footer">
+ <div class="site-footer-inner">
+ <a class="site-footer-brand" href="/">
+ <img src="/three.svg" alt="" aria-hidden="true" />
+ <span>three.ws</span>
+ </a>
+ <nav class="site-footer-links" aria-label="Footer">
+ <a href="/discover">Discover</a>
+ <a href="/dashboard">Dashboard</a>
+ <a href="/dashboard/wallets">Wallets</a>
+ <a href="/pumpfun" target="_blank" rel="noopener">Pump.fun feed ↗</a>
+ <a href="/docs">Docs</a>
+ <a href="https://github.com/nirholas/three.ws" target="_blank" rel="noopener">GitHub</a>
+ <a href="/legal/privacy">Privacy</a>
+ <a href="/legal/tos">Terms</a>
+ </nav>
+ <span class="site-footer-legal">© 2026 three.ws</span>
+ </div>
+ </footer>
+
+ <script type="module">
+ import { mountHeaderUser } from '/header-user.js';
+ mountHeaderUser({ slot: '#header-user-slot' }).catch(() => {});
+ </script>
+
<script type="module">
const $ = (sel) => document.querySelector(sel);
const els = {
diff --git a/public/dashboard/dashboard.js b/public/dashboard/dashboard.js
index 78d1a521f..e330c9437 100644
--- a/public/dashboard/dashboard.js
+++ b/public/dashboard/dashboard.js
@@ -6,20 +6,14 @@ import { mountAgentVanityGrinderCard } from '/src/agent-vanity-grinder.js';
export const state = { user: null };
-const PAID_PLANS = new Set(['pro', 'team', 'enterprise']);
-function canSetPrivate() {
- const u = state.user;
- return Boolean(u && (PAID_PLANS.has(u.plan) || u.is_admin));
-}
function visibilityOptionsHtml(currentValue) {
- const allowPrivate = canSetPrivate() || currentValue === 'private';
const opts = [
{ v: 'public', label: 'Public (discoverable)' },
{ v: 'unlisted', label: 'Unlisted (anyone with link)' },
- { v: 'private', label: allowPrivate ? 'Private (only you)' : 'Private — Pro plan', disabled: !allowPrivate },
+ { v: 'private', label: 'Private (only you)' },
];
return opts
- .map((o) => `<option value="${o.v}"${currentValue === o.v ? ' selected' : ''}${o.disabled ? ' disabled' : ''}>${o.label}</option>`)
+ .map((o) => `<option value="${o.v}"${currentValue === o.v ? ' selected' : ''}>${o.label}</option>`)
.join('');
}
diff --git a/public/dashboard/embed-policy.html b/public/dashboard/embed-policy.html
index 5db64e680..5d4d631c6 100644
--- a/public/dashboard/embed-policy.html
+++ b/public/dashboard/embed-policy.html
@@ -406,7 +406,7 @@
</main>
<script type="module">
const params = new URL(location.href).searchParams;
- const agentId = params.get('agent');
+ let agentId = params.get('agent');
const statusEl = document.getElementById('status');
const modeSel = document.getElementById('mode');
const hostsEl = document.getElementById('hosts');
@@ -415,13 +415,13 @@
const urlEl = document.getElementById('embed-url');
const brainModeSel = document.getElementById('brain-mode');
const proxyWrap = document.getElementById('proxy-url-wrap');
+ const formEls = document.querySelectorAll(
+ 'main > .card, main > .actions, main > hr, main > .muted',
+ );
- if (!agentId) {
- statusEl.innerHTML =
- '<div class="err">Missing <code>?agent=ID</code> in URL.</div>';
- throw new Error('no agent id');
+ function setFormVisible(visible) {
+ for (const el of formEls) el.style.display = visible ? '' : 'none';
}
- urlEl.textContent = `/agent/${agentId}/embed`;
async function api(method, path, body) {
const res = await fetch(path, {
@@ -630,8 +630,65 @@
document.getElementById('reload').addEventListener('click', loadPolicy);
document.getElementById('clear').addEventListener('click', clearPolicy);
+ async function pickAgent() {
+ let list = [];
+ try {
+ const { agents } = await api('GET', '/api/agents');
+ list = Array.isArray(agents) ? agents : [];
+ } catch (e) {
+ setStatus(
+ `<div class="err">Could not load your agents: ${escapeHtml(e.message)}</div>`,
+ );
+ return null;
+ }
+
+ if (list.length === 0) {
+ setFormVisible(false);
+ setStatus(
+ `<div class="err">You don't have any agents yet. <a href="/dashboard/create">Create one</a> to configure an embed policy.</div>`,
+ );
+ return null;
+ }
+
+ if (list.length === 1) {
+ const u = new URL(location.href);
+ u.searchParams.set('agent', list[0].id);
+ location.replace(u.toString());
+ return null;
+ }
+
+ setFormVisible(false);
+ const opts = list
+ .map(
+ (a) =>
+ `<option value="${escapeHtml(a.id)}">${escapeHtml(a.name || a.id)}</option>`,
+ )
+ .join('');
+ setStatus(
+ `<div class="card"><label for="agent-pick">Choose an agent</label>` +
+ `<select id="agent-pick">${opts}</select>` +
+ `<div class="actions"><button class="btn" id="agent-pick-go">Continue</button></div></div>`,
+ );
+ return await new Promise((resolve) => {
+ document
+ .getElementById('agent-pick-go')
+ .addEventListener('click', () => {
+ const id = document.getElementById('agent-pick').value;
+ const u = new URL(location.href);
+ u.searchParams.set('agent', id);
+ location.replace(u.toString());
+ resolve(null);
+ });
+ });
+ }
+
(async () => {
await loadMe();
+ if (!agentId) {
+ await pickAgent();
+ return;
+ }
+ urlEl.textContent = `/agent/${agentId}/embed`;
await loadAgent();
await loadPolicy();
})();
diff --git a/public/dashboard/portfolio-asset.html b/public/dashboard/portfolio-asset.html
index 3598763d4..5196832c9 100644
--- a/public/dashboard/portfolio-asset.html
+++ b/public/dashboard/portfolio-asset.html
@@ -587,8 +587,16 @@
await ensureChart();
const sorted = [...points]
.map((p) => ({ time: Math.floor(new Date(p.t).getTime() / 1000), value: Number(p.price) }))
+ // lightweight-charts rejects NaN/null values — drop bad rows from upstream
+ .filter((d) => Number.isFinite(d.time) && Number.isFinite(d.value))
.sort((a, b) => a.time - b.time)
.filter((d, i, arr) => i === 0 || d.time !== arr[i - 1].time);
+ if (!sorted.length) {
+ $$('chart').style.display = 'none';
+ $$('chart-empty').style.display = 'flex';
+ $$('chart-change').textContent = '';
+ return;
+ }
series.setData(sorted);
chart.timeScale().fitContent();
diff --git a/public/dashboard/portfolio.html b/public/dashboard/portfolio.html
index c009fa8a1..e9c319d7f 100644
--- a/public/dashboard/portfolio.html
+++ b/public/dashboard/portfolio.html
@@ -781,9 +781,16 @@
await ensureChart();
const data = filtered
.map((p) => ({ time: Math.floor(new Date(p.t).getTime() / 1000), value: Number(p.usd) }))
+ // lightweight-charts rejects NaN/null; drop any malformed snapshot rows
+ .filter((d) => Number.isFinite(d.time) && Number.isFinite(d.value))
.sort((a, b) => a.time - b.time)
// dedupe identical timestamps (lightweight-charts requires unique time keys)
.filter((d, i, arr) => i === 0 || d.time !== arr[i - 1].time);
+ if (!data.length) {
+ $('chart').style.display = 'none';
+ $('chart-empty').style.display = 'flex';
+ return;
+ }
series.setData(data);
chart.timeScale().fitContent();
}
diff --git a/publish/src/erc8004/solana-deploy.js b/publish/src/erc8004/solana-deploy.js
index 29ded03cd..49b971cfb 100644
--- a/publish/src/erc8004/solana-deploy.js
+++ b/publish/src/erc8004/solana-deploy.js
@@ -164,18 +164,18 @@ export async function runSolanaDeploy({ agent, network, vanity }) {
tx.partialSign(vanityKeypair);
}
- // Phantom + Backpack expose signAndSendTransaction; Solflare does too.
+ // Always sign locally and submit via our Helius-backed proxy. Wallet
+ // `signAndSendTransaction` routes through the wallet's own RPC, which
+ // returns 403 "Access forbidden" intermittently on mainnet.
const endpoint = RPC[network] || RPC.mainnet;
- let signature;
- if (typeof wallet.signAndSendTransaction === 'function') {
- const res = await wallet.signAndSendTransaction(tx);
- signature = res?.signature || res;
- } else {
- const signed = await wallet.signTransaction(tx);
- const conn2 = new Connection(endpoint, 'confirmed');
- const raw = signed.serialize();
- signature = await conn2.sendRawTransaction(raw);
- }
+ const signed = await wallet.signTransaction(tx);
+ const conn2 = new Connection(endpoint, 'confirmed');
+ const raw = signed.serialize();
+ const signature = await conn2.sendRawTransaction(raw, {
+ skipPreflight: false,
+ preflightCommitment: 'confirmed',
+ maxRetries: 5,
+ });
// Wait for confirmation before calling the server.
const conn3 = new Connection(endpoint, 'confirmed');
diff --git a/src/agent-edit.js b/src/agent-edit.js
index 18261a3ea..be0ef40b3 100644
--- a/src/agent-edit.js
+++ b/src/agent-edit.js
@@ -1562,7 +1562,7 @@ async function loadWidgets() {
return;
}
container.innerHTML = items.map((w) => {
- const url = `${embedOrigin()}/embed.html?id=${encodeURIComponent(w.id)}`;
+ const url = `${embedOrigin()}/w/${encodeURIComponent(w.id)}`;
return `
<div class="widget-card" data-id="${escapeHtml(w.id)}">
<div class="widget-card-type">${escapeHtml(w.type)}</div>
diff --git a/src/app.js b/src/app.js
index b29f3ac4f..ab1fa4ca4 100644
--- a/src/app.js
+++ b/src/app.js
@@ -1298,6 +1298,23 @@ class App {
dropCtrl.on('drop', ({ files }) => this.load(files));
dropCtrl.on('dropstart', () => this.showSpinner());
dropCtrl.on('droperror', () => this.hideSpinner());
+
+ // Reflect drag state on <body> so the dropzone bar can highlight.
+ let dragDepth = 0;
+ const wrap = this.dropEl;
+ wrap.addEventListener('dragenter', (e) => {
+ if (!e.dataTransfer || !Array.from(e.dataTransfer.types || []).includes('Files')) return;
+ dragDepth += 1;
+ document.body.classList.add('is-dragover');
+ });
+ wrap.addEventListener('dragleave', () => {
+ dragDepth = Math.max(0, dragDepth - 1);
+ if (dragDepth === 0) document.body.classList.remove('is-dragover');
+ });
+ wrap.addEventListener('drop', () => {
+ dragDepth = 0;
+ document.body.classList.remove('is-dragover');
+ });
}
// ── Avatar Creator ────────────────────────────────────────────────────────
diff --git a/src/editor/embed-editor.js b/src/editor/embed-editor.js
index e4b313910..01416b3ab 100644
--- a/src/editor/embed-editor.js
+++ b/src/editor/embed-editor.js
@@ -33,6 +33,11 @@ const RESPONSIVE_PRESETS = [
{ id: 'desktop-first', label: 'Desktop-first', hint: 'Shrinks from preferred size' },
];
+// Shown in the preview when the user hasn't entered a `src` yet — so the stage
+// always renders an actual avatar instead of an empty box. Not emitted in the
+// generated snippet.
+const DEFAULT_PREVIEW_SRC = '/avatars/default.glb';
+
const STYLE = `
.editor-root {
position: fixed;
@@ -79,6 +84,26 @@ const STYLE = `
}
.agent-wrap.dragging { cursor: grabbing; }
.agent-wrap agent-3d { width: 100%; height: 100%; }
+ .agent-wrap iframe.widget-frame {
+ width: 100%;
+ height: 100%;
+ border: 0;
+ display: block;
+ background: transparent;
+ border-radius: 12px;
+ box-shadow: 0 8px 32px rgba(0,0,0,0.35);
+ }
+ .widget-badge {
+ position: absolute;
+ top: -28px;
+ right: 0;
+ background: #1e293b;
+ color: #a7f3d0;
+ font: 11px/1 ui-monospace, Menlo, monospace;
+ padding: 4px 8px;
+ border-radius: 4px;
+ border: 1px solid #334155;
+ }
.resize-handle {
position: absolute;
width: 14px;
@@ -256,6 +281,7 @@ const STYLE = `
export function mountEmbedEditor(root, options = {}) {
const defaults = {
+ widgetId: options.widgetId || '',
src: options.src || '',
mode: options.mode || 'floating',
position: options.position || 'bottom-right',
@@ -267,7 +293,7 @@ export function mountEmbedEditor(root, options = {}) {
...options,
};
- const state = { ...defaults };
+ const state = { ...defaults, widget: null };
const host = document.createElement('div');
const shadow = host.attachShadow({ mode: 'open' });
root.appendChild(host);
@@ -298,6 +324,9 @@ export function mountEmbedEditor(root, options = {}) {
<iframe id="preview-frame" hidden></iframe>
<div class="agent-wrap" id="agent-wrap">
<div class="size-readout" id="size-readout"></div>
+ <div class="widget-badge" id="widget-badge" hidden></div>
+ <iframe class="widget-frame" id="widget-frame" hidden
+ allow="autoplay; clipboard-write; microphone; camera; xr-spatial-tracking"></iframe>
<agent-3d eager kiosk id="preview-agent"></agent-3d>
<div class="resize-handle nw" data-h="nw"></div>
<div class="resize-handle ne" data-h="ne"></div>
@@ -400,6 +429,8 @@ export function mountEmbedEditor(root, options = {}) {
const stage = $('#stage');
const agentWrap = $('#agent-wrap');
const agentEl = $('#preview-agent');
+ const widgetFrame = $('#widget-frame');
+ const widgetBadge = $('#widget-badge');
const readout = $('#size-readout');
const snippetEl = $('#snippet');
const srcInput = $('#src-input');
@@ -408,7 +439,61 @@ export function mountEmbedEditor(root, options = {}) {
const copyBtn = $('#copy-btn');
srcInput.value = state.src;
- if (state.src) agentEl.setAttribute('src', state.src);
+ agentEl.setAttribute('src', state.src || DEFAULT_PREVIEW_SRC);
+
+ // If a widget id was passed, swap the bare <agent-3d> preview for an
+ // iframe loading the live widget renderer (/app#widget=<id>&kiosk=true).
+ if (state.widgetId) loadWidget(state.widgetId);
+
+ async function loadWidget(id) {
+ const origin = location.origin;
+ // Show the live widget immediately — don't wait on the metadata fetch.
+ widgetFrame.src = `${origin}/app#widget=${encodeURIComponent(id)}&kiosk=true`;
+ widgetFrame.hidden = false;
+ agentEl.style.display = 'none';
+ widgetBadge.hidden = false;
+ widgetBadge.textContent = id;
+
+ try {
+ const res = await fetch(`${origin}/api/widgets/${encodeURIComponent(id)}`, {
+ credentials: 'include',
+ });
+ if (!res.ok) {
+ widgetBadge.textContent = `${id} · not found`;
+ widgetBadge.style.color = '#fca5a5';
+ return;
+ }
+ const { widget } = await res.json();
+ state.widget = widget;
+ widgetBadge.textContent = `${widget.name || id} · ${widget.type}`;
+
+ // Type-aware preferred sizes (mirrors public/embed.js defaults).
+ const TYPE_SIZES = {
+ turntable: [600, 600],
+ 'animation-gallery': [720, 720],
+ 'talking-agent': [420, 600],
+ passport: [480, 560],
+ 'hotspot-tour': [800, 600],
+ };
+ const [w, h] = TYPE_SIZES[widget.type] || [600, 600];
+ state.width = `${w}px`;
+ state.height = `${h}px`;
+ wInput.value = state.width;
+ hInput.value = state.height;
+
+ // Pre-fill src with the avatar model so a fallback agent-3d snippet
+ // works if the user later toggles off the widget id.
+ if (widget.avatar?.model_url) {
+ state.src = widget.avatar.model_url;
+ srcInput.value = state.src;
+ }
+
+ sync();
+ } catch (err) {
+ widgetBadge.textContent = `${id} · ${err.message}`;
+ widgetBadge.style.color = '#fca5a5';
+ }
+ }
// Mode cards
const modeGrid = $('#mode-grid');
@@ -652,12 +737,33 @@ export function mountEmbedEditor(root, options = {}) {
$('#pos-grid').style.display = 'none';
}
- // Agent attrs
- if (state.src) agentEl.setAttribute('src', state.src);
- else agentEl.removeAttribute('src');
+ // Agent attrs — skip when a widget is driving the preview iframe so the
+ // hidden <agent-3d> doesn't fetch a GLB we'll never show. Fall back to a
+ // default avatar when the user hasn't entered a src, so the preview is
+ // never an empty box.
+ if (!state.widgetId) {
+ agentEl.setAttribute('src', state.src || DEFAULT_PREVIEW_SRC);
+ }
}
function buildSnippet() {
+ // Widget snippet — when a saved widget id is loaded, prefer the
+ // canonical script-tag embed (matches Studio's "share" modal).
+ if (state.widgetId) {
+ const origin = location.origin;
+ const wPx = parsePx(state.width);
+ const hPx = parsePx(state.height);
+ const dataAttrs = [
+ `data-widget="${escapeAttr(state.widgetId)}"`,
+ state.widget?.type ? `data-type="${escapeAttr(state.widget.type)}"` : '',
+ wPx ? `data-width="${wPx}"` : '',
+ hPx ? `data-height="${hPx}"` : '',
+ ]
+ .filter(Boolean)
+ .join(' ');
+ return `<script async src="${origin}/embed.js" ${dataAttrs}></` + 'script>';
+ }
+
const attrs = [];
if (state.src) attrs.push(`src="${escapeAttr(state.src)}"`);
if (state.mode && state.mode !== 'inline') attrs.push(`mode="${state.mode}"`);
diff --git a/src/erc8004/solana-deploy.js b/src/erc8004/solana-deploy.js
index 29ded03cd..49b971cfb 100644
--- a/src/erc8004/solana-deploy.js
+++ b/src/erc8004/solana-deploy.js
@@ -164,18 +164,18 @@ export async function runSolanaDeploy({ agent, network, vanity }) {
tx.partialSign(vanityKeypair);
}
- // Phantom + Backpack expose signAndSendTransaction; Solflare does too.
+ // Always sign locally and submit via our Helius-backed proxy. Wallet
+ // `signAndSendTransaction` routes through the wallet's own RPC, which
+ // returns 403 "Access forbidden" intermittently on mainnet.
const endpoint = RPC[network] || RPC.mainnet;
- let signature;
- if (typeof wallet.signAndSendTransaction === 'function') {
- const res = await wallet.signAndSendTransaction(tx);
- signature = res?.signature || res;
- } else {
- const signed = await wallet.signTransaction(tx);
- const conn2 = new Connection(endpoint, 'confirmed');
- const raw = signed.serialize();
- signature = await conn2.sendRawTransaction(raw);
- }
+ const signed = await wallet.signTransaction(tx);
+ const conn2 = new Connection(endpoint, 'confirmed');
+ const raw = signed.serialize();
+ const signature = await conn2.sendRawTransaction(raw, {
+ skipPreflight: false,
+ preflightCommitment: 'confirmed',
+ maxRetries: 5,
+ });
// Wait for confirmation before calling the server.
const conn3 = new Connection(endpoint, 'confirmed');
diff --git a/style.css b/style.css
index 6c7a7262f..ce7465b43 100644
--- a/style.css
+++ b/style.css
@@ -115,11 +115,20 @@ body {
padding-bottom: max(var(--space-sm), env(safe-area-inset-bottom, 0));
padding-left: max(var(--space-lg), env(safe-area-inset-left, 0));
padding-right: max(var(--space-lg), env(safe-area-inset-right, 0));
- background: rgba(255, 255, 255, 0.03);
- border-top: 1px solid rgba(255, 255, 255, 0.06);
+ background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.82));
+ backdrop-filter: blur(20px);
+ -webkit-backdrop-filter: blur(20px);
+ border-top: 1px solid rgba(255, 255, 255, 0.07);
+ box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.03) inset;
z-index: 1;
}
+/* Drag-over highlight — lifts when a file is hovering anywhere on the page */
+body.is-dragover .dropzone {
+ background: linear-gradient(180deg, rgba(139, 92, 246, 0.16), rgba(139, 92, 246, 0.08));
+ border-top-color: rgba(139, 92, 246, 0.5);
+}
+
.placeholder {
display: none;
}
@@ -724,39 +733,45 @@ footer .separator {
}
.upload-btn label {
- color: rgba(255, 255, 255, 0.5);
- border: 1px solid rgba(255, 255, 255, 0.1);
- border-radius: var(--radius-lg);
- transition: all 0.25s ease;
+ display: inline-flex;
+ align-items: center;
+ gap: var(--space-xs);
+ color: rgba(255, 255, 255, 0.88);
+ background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
+ border: 1px solid rgba(255, 255, 255, 0.14);
+ border-radius: var(--radius-md);
+ transition:
+ background 0.18s ease,
+ border-color 0.18s ease,
+ color 0.18s ease,
+ transform 0.18s ease;
font-size: var(--text-sm);
font-weight: 500;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
- display: inline-block;
overflow: hidden;
- padding: var(--space-sm) var(--space-lg);
- letter-spacing: 0.02em;
+ padding: var(--space-sm) var(--space-md);
+ letter-spacing: -0.005em;
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.upload-btn label:hover {
- background: rgba(255, 255, 255, 0.08);
+ background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
color: #fff;
- border-color: rgba(255, 255, 255, 0.25);
+ border-color: rgba(255, 255, 255, 0.28);
}
.upload-btn label:active {
- background: rgba(255, 255, 255, 0.12);
- color: #fff;
+ transform: translateY(1px);
border-color: rgba(255, 255, 255, 0.35);
- transform: scale(0.97);
}
.drop-hint {
- color: rgba(255, 255, 255, 0.25);
+ color: rgba(255, 255, 255, 0.42);
font-size: var(--text-sm);
- font-weight: 300;
- letter-spacing: 0.02em;
+ font-weight: 400;
+ letter-spacing: -0.005em;
}
@media screen and (max-width: 700px) {
@@ -768,10 +783,9 @@ footer .separator {
.upload-btn svg {
width: 1em;
height: 1em;
- vertical-align: middle;
fill: currentColor;
- margin-top: -0.25em;
- margin-right: 0.25em;
+ flex-shrink: 0;
+ opacity: 0.9;
}
/******************************************************************************
@@ -892,39 +906,30 @@ footer .separator {
*/
.spinner {
- width: 40px;
- height: 40px;
+ width: 36px;
+ height: 36px;
position: absolute;
left: 50%;
top: 50%;
- margin: -20px;
-
- background-color: rgba(255, 255, 255, 0.15);
-
- border-radius: 100%;
- -webkit-animation: sk-scaleout 1s infinite ease-in-out;
- animation: sk-scaleout 1s infinite ease-in-out;
+ margin: -18px;
+ border-radius: 50%;
+ border: 2px solid rgba(255, 255, 255, 0.08);
+ border-top-color: rgba(167, 139, 250, 0.9);
+ border-right-color: rgba(167, 139, 250, 0.4);
+ box-shadow: 0 0 24px rgba(139, 92, 246, 0.25);
+ -webkit-animation: sk-spin 0.9s linear infinite;
+ animation: sk-spin 0.9s linear infinite;
}
-@-webkit-keyframes sk-scaleout {
- 0% {
- -webkit-transform: scale(0);
- }
- 100% {
- -webkit-transform: scale(1);
- opacity: 0;
+@-webkit-keyframes sk-spin {
+ to {
+ -webkit-transform: rotate(360deg);
}
}
-@keyframes sk-scaleout {
- 0% {
- -webkit-transform: scale(0);
- transform: scale(0);
- }
- 100% {
- -webkit-transform: scale(1);
- transform: scale(1);
- opacity: 0;
+@keyframes sk-spin {
+ to {
+ transform: rotate(360deg);
}
}
@@ -3377,34 +3382,39 @@ body.deploy-page {
display: inline-flex;
align-items: center;
gap: var(--space-xs);
- padding: var(--space-sm) var(--space-lg);
- background: rgba(123, 47, 247, 0.15);
- border: 1px solid rgba(123, 47, 247, 0.3);
- border-radius: var(--radius-lg);
- color: rgba(255, 255, 255, 0.7);
+ padding: var(--space-sm) var(--space-md);
+ background: linear-gradient(180deg, rgba(139, 92, 246, 0.22), rgba(139, 92, 246, 0.1));
+ border: 1px solid rgba(167, 139, 250, 0.42);
+ border-radius: var(--radius-md);
+ color: #fff;
font-family: inherit;
font-size: var(--text-sm);
font-weight: 500;
+ text-decoration: none;
cursor: pointer;
- transition: all 0.25s ease;
- letter-spacing: 0.02em;
+ transition:
+ background 0.18s ease,
+ border-color 0.18s ease,
+ color 0.18s ease,
+ transform 0.18s ease;
+ letter-spacing: -0.005em;
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.create-avatar-btn:hover {
- background: rgba(123, 47, 247, 0.3);
- color: #fff;
- border-color: rgba(123, 47, 247, 0.5);
+ background: linear-gradient(180deg, rgba(139, 92, 246, 0.36), rgba(139, 92, 246, 0.16));
+ border-color: rgba(167, 139, 250, 0.7);
}
.create-avatar-btn:active {
- background: rgba(123, 47, 247, 0.4);
- transform: scale(0.97);
+ transform: translateY(1px);
}
.create-avatar-btn svg {
width: 1em;
height: 1em;
fill: currentColor;
+ flex-shrink: 0;
}
@media screen and (max-width: 700px) {
@@ -3418,186 +3428,120 @@ body.deploy-page {
}
/******************************************************************************
- * Make this a widget — appears once a model is loaded
+ * Viewer nav action buttons — Save / Make Widget / Deploy / Public profile
+ *
+ * All four share a single neutral pill style so the header doesn't read as a
+ * rainbow. Each keeps a tinted SVG icon as its identity cue. Deploy is the
+ * primary CTA — slightly stronger fill — and gains a fully-saturated success
+ * state once on-chain.
*/
-.make-widget-btn {
+.save-to-account-btn,
+.make-widget-btn,
+.deploy-onchain-btn,
+.view-public-profile-btn {
display: inline-flex;
align-items: center;
gap: var(--space-xs);
- padding: var(--space-sm) var(--space-lg);
- background: rgba(0, 229, 160, 0.1);
- border: 1px solid rgba(0, 229, 160, 0.3);
- border-radius: var(--radius-lg);
- color: rgba(255, 255, 255, 0.85);
+ padding: var(--space-sm) var(--space-md);
+ background: rgba(255, 255, 255, 0.04);
+ border: 1px solid rgba(255, 255, 255, 0.1);
+ border-radius: var(--radius-md);
+ color: rgba(255, 255, 255, 0.78);
font-family: inherit;
font-size: var(--text-sm);
font-weight: 500;
text-decoration: none;
cursor: pointer;
- transition: all 0.25s ease;
- letter-spacing: 0.02em;
+ transition:
+ background 0.18s ease,
+ border-color 0.18s ease,
+ color 0.18s ease,
+ transform 0.18s ease;
+ letter-spacing: -0.005em;
+ white-space: nowrap;
}
-.make-widget-btn:hover {
- background: rgba(0, 229, 160, 0.22);
+.save-to-account-btn:hover,
+.make-widget-btn:hover,
+.deploy-onchain-btn:hover,
+.view-public-profile-btn:hover {
+ background: rgba(255, 255, 255, 0.08);
+ border-color: rgba(255, 255, 255, 0.2);
color: #fff;
- border-color: rgba(0, 229, 160, 0.55);
}
-.make-widget-btn:focus-visible {
- outline: 2px solid rgba(0, 229, 160, 0.7);
+.save-to-account-btn:active,
+.make-widget-btn:active,
+.deploy-onchain-btn:active,
+.view-public-profile-btn:active {
+ transform: translateY(1px);
+}
+.save-to-account-btn:focus-visible,
+.make-widget-btn:focus-visible,
+.deploy-onchain-btn:focus-visible,
+.view-public-profile-btn:focus-visible {
+ outline: 2px solid rgba(255, 255, 255, 0.5);
outline-offset: 2px;
}
-.make-widget-btn[hidden] {
+.save-to-account-btn[hidden],
+.make-widget-btn[hidden],
+.deploy-onchain-btn[hidden],
+.view-public-profile-btn[hidden] {
display: none;
}
-.make-widget-btn svg {
+.save-to-account-btn svg,
+.make-widget-btn svg,
+.deploy-onchain-btn svg,
+.view-public-profile-btn svg {
width: 1em;
height: 1em;
-}
-@media screen and (max-width: 700px) {
- .make-widget-btn span {
- display: none;
- }
- .make-widget-btn {
- padding: var(--space-xs) var(--space-sm);
- }
-}
-
-.save-to-account-btn {
- display: inline-flex;
- align-items: center;
- gap: var(--space-xs);
- padding: var(--space-sm) var(--space-lg);
- background: rgba(139, 92, 246, 0.12);
- border: 1px solid rgba(139, 92, 246, 0.35);
- border-radius: var(--radius-lg);
- color: rgba(255, 255, 255, 0.9);
- font-family: inherit;
- font-size: var(--text-sm);
- font-weight: 500;
- text-decoration: none;
- cursor: pointer;
- transition: all 0.25s ease;
- letter-spacing: 0.02em;
-}
-.save-to-account-btn:hover {
- background: rgba(139, 92, 246, 0.24);
- color: #fff;
- border-color: rgba(139, 92, 246, 0.6);
-}
-.save-to-account-btn:focus-visible {
- outline: 2px solid rgba(139, 92, 246, 0.7);
- outline-offset: 2px;
-}
-.save-to-account-btn[hidden] {
- display: none;
+ transition: color 0.18s ease;
}
.save-to-account-btn[disabled] {
opacity: 0.6;
pointer-events: none;
}
-.save-to-account-btn svg {
- width: 1em;
- height: 1em;
-}
-@media screen and (max-width: 700px) {
- .save-to-account-btn span {
- display: none;
- }
- .save-to-account-btn {
- padding: var(--space-xs) var(--space-sm);
- }
-}
+/* Per-button icon accents — color identity lives in the icon, not the pill */
+.save-to-account-btn svg { color: #c4b5fd; } /* violet */
+.make-widget-btn svg { color: #5eead4; } /* teal */
+.view-public-profile-btn svg { color: #fcd34d; } /* gold */
+.deploy-onchain-btn svg { color: #a5b4fc; } /* indigo */
+
+/* Deploy on-chain — primary CTA, slightly stronger to pull the eye */
.deploy-onchain-btn {
- display: inline-flex;
- align-items: center;
- gap: var(--space-xs);
- padding: var(--space-sm) var(--space-lg);
- background: rgba(108, 99, 255, 0.1);
- border: 1px solid rgba(108, 99, 255, 0.4);
- border-radius: var(--radius-lg);
- color: rgba(255, 255, 255, 0.92);
- font-family: inherit;
- font-size: var(--text-sm);
- font-weight: 500;
- text-decoration: none;
- cursor: pointer;
- transition: all 0.25s ease;
- letter-spacing: 0.02em;
-}
-.deploy-onchain-btn:hover {
- background: rgba(108, 99, 255, 0.22);
+ background: linear-gradient(180deg, rgba(99, 102, 241, 0.22), rgba(99, 102, 241, 0.12));
+ border-color: rgba(129, 140, 248, 0.45);
color: #fff;
- border-color: rgba(108, 99, 255, 0.65);
-}
-.deploy-onchain-btn:focus-visible {
- outline: 2px solid rgba(108, 99, 255, 0.7);
- outline-offset: 2px;
-}
-.deploy-onchain-btn[hidden] {
- display: none;
}
-.deploy-onchain-btn svg {
- width: 1em;
- height: 1em;
+.deploy-onchain-btn:hover {
+ background: linear-gradient(180deg, rgba(99, 102, 241, 0.34), rgba(99, 102, 241, 0.18));
+ border-color: rgba(129, 140, 248, 0.7);
}
+
/* "Deployed ✓" success state — replaces the call-to-action once on-chain. */
.deploy-onchain-btn.is-deployed {
- background: rgba(74, 222, 128, 0.1);
+ background: rgba(74, 222, 128, 0.12);
border-color: rgba(74, 222, 128, 0.42);
color: #86efac;
}
+.deploy-onchain-btn.is-deployed svg {
+ color: #86efac;
+}
.deploy-onchain-btn.is-deployed:hover {
- background: rgba(74, 222, 128, 0.2);
+ background: rgba(74, 222, 128, 0.22);
color: #d1fae5;
border-color: rgba(74, 222, 128, 0.7);
}
-@media screen and (max-width: 700px) {
- .deploy-onchain-btn span {
- display: none;
- }
- .deploy-onchain-btn {
- padding: var(--space-xs) var(--space-sm);
- }
-}
-.view-public-profile-btn {
- display: inline-flex;
- align-items: center;
- gap: var(--space-xs);
- padding: var(--space-sm) var(--space-lg);
- background: rgba(255, 215, 0, 0.1);
- border: 1px solid rgba(255, 215, 0, 0.32);
- border-radius: var(--radius-lg);
- color: rgba(255, 255, 255, 0.9);
- font-family: inherit;
- font-size: var(--text-sm);
- font-weight: 500;
- text-decoration: none;
- cursor: pointer;
- transition: all 0.25s ease;
- letter-spacing: 0.02em;
-}
-.view-public-profile-btn:hover {
- background: rgba(255, 215, 0, 0.2);
- color: #fff;
- border-color: rgba(255, 215, 0, 0.6);
-}
-.view-public-profile-btn:focus-visible {
- outline: 2px solid rgba(255, 215, 0, 0.7);
- outline-offset: 2px;
-}
-.view-public-profile-btn[hidden] {
- display: none;
-}
-.view-public-profile-btn svg {
- width: 1em;
- height: 1em;
-}
@media screen and (max-width: 700px) {
+ .save-to-account-btn span,
+ .make-widget-btn span,
+ .deploy-onchain-btn span,
.view-public-profile-btn span {
display: none;
}
+ .save-to-account-btn,
+ .make-widget-btn,
+ .deploy-onchain-btn,
.view-public-profile-btn {
padding: var(--space-xs) var(--space-sm);
}
@@ -5184,7 +5128,7 @@ body[data-viewer-mode='main'][data-authed='false'] .auth-gate {
position: fixed;
top: calc(var(--header-h) + var(--space-md));
left: var(--space-md);
- width: 280px;
+ width: 300px;
z-index: 50;
}
@@ -5216,14 +5160,27 @@ body[data-viewer-mode='main'][data-authed='false'] .auth-gate {
.agent-onboarding__inner {
position: relative;
- background: rgba(12, 12, 18, 0.96);
- border: 1px solid rgba(255, 215, 0, 0.28);
- border-radius: 12px;
- padding: var(--space-lg) var(--space-lg) var(--space-md);
+ background: linear-gradient(180deg, rgba(20, 20, 30, 0.96), rgba(10, 10, 18, 0.96));
+ border: 1px solid rgba(167, 139, 250, 0.32);
+ border-radius: var(--radius-lg);
+ padding: var(--space-md) var(--space-md) var(--space-md);
+ backdrop-filter: blur(20px);
+ -webkit-backdrop-filter: blur(20px);
box-shadow:
- 0 12px 36px rgba(0, 0, 0, 0.55),
- 0 0 0 1px rgba(255, 215, 0, 0.06);
+ 0 20px 50px rgba(0, 0, 0, 0.55),
+ 0 1px 0 rgba(255, 255, 255, 0.04) inset,
+ 0 -40px 80px -40px rgba(139, 92, 246, 0.35) inset;
color: rgba(255, 255, 255, 0.92);
+ overflow: hidden;
+}
+
+.agent-onboarding__inner::before {
+ content: '';
+ position: absolute;
+ inset: 0 0 auto 0;
+ height: 1px;
+ background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.55), transparent);
+ pointer-events: none;
}
.agent-onboarding__close {
@@ -5250,20 +5207,23 @@ body[data-viewer-mode='main'][data-authed='false'] .auth-gate {
}
.agent-onboarding__close:focus-visible {
- outline: 2px solid rgba(255, 215, 0, 0.7);
+ outline: 2px solid rgba(167, 139, 250, 0.7);
outline-offset: 2px;
}
.agent-onboarding__title {
+ font-family: 'Space Grotesk', 'Inter', sans-serif;
margin: 0 0 var(--space-xs);
- font-size: 1.05rem;
- font-weight: 500;
- letter-spacing: -0.01em;
+ font-size: 1.1rem;
+ font-weight: 600;
+ letter-spacing: -0.015em;
+ color: #fff;
+ padding-right: var(--space-lg);
}
.agent-onboarding__desc {
margin: 0 0 var(--space-md);
- font-size: 0.82rem;
+ font-size: var(--text-sm);
color: rgba(255, 255, 255, 0.62);
line-height: 1.55;
}
@@ -5278,39 +5238,50 @@ body[data-viewer-mode='main'][data-authed='false'] .auth-gate {
display: inline-flex;
align-items: center;
padding: 0.5em 0.95em;
- border-radius: 7px;
- font-size: 0.78rem;
+ border-radius: var(--radius-md);
+ font-size: var(--text-sm);
font-weight: 500;
font-family: inherit;
text-decoration: none;
- border: 1px solid rgba(255, 255, 255, 0.16);
- background: transparent;
- color: rgba(255, 255, 255, 0.78);
+ border: 1px solid rgba(255, 255, 255, 0.14);
+ background: rgba(255, 255, 255, 0.04);
+ color: rgba(255, 255, 255, 0.82);
cursor: pointer;
- transition: all 0.15s;
+ transition:
+ background 0.18s ease,
+ border-color 0.18s ease,
+ color 0.18s ease,
+ transform 0.18s ease;
}
.agent-onboarding__btn:hover {
color: #fff;
- border-color: rgba(255, 255, 255, 0.36);
- background: rgba(255, 255, 255, 0.04);
+ border-color: rgba(255, 255, 255, 0.28);
+ background: rgba(255, 255, 255, 0.08);
+}
+
+.agent-onboarding__btn:active {
+ transform: translateY(1px);
}
.agent-onboarding__btn:focus-visible {
- outline: 2px solid rgba(255, 215, 0, 0.7);
+ outline: 2px solid rgba(167, 139, 250, 0.7);
outline-offset: 2px;
}
.agent-onboarding__btn--primary {
- background: rgba(255, 215, 0, 0.92);
- border-color: rgba(255, 215, 0, 0.92);
- color: #000;
+ background: linear-gradient(180deg, rgba(139, 92, 246, 0.95), rgba(124, 58, 237, 0.95));
+ border-color: rgba(167, 139, 250, 0.7);
+ color: #fff;
+ box-shadow:
+ 0 4px 14px rgba(139, 92, 246, 0.32),
+ 0 1px 0 rgba(255, 255, 255, 0.15) inset;
}
.agent-onboarding__btn--primary:hover {
- background: #ffd700;
- color: #000;
- border-color: #ffd700;
+ background: linear-gradient(180deg, rgba(151, 109, 255, 1), rgba(139, 92, 246, 1));
+ border-color: rgba(167, 139, 250, 0.9);
+ color: #fff;
}
@media (max-width: 700px) {
@@ -5323,112 +5294,142 @@ body[data-viewer-mode='main'][data-authed='false'] .auth-gate {
}
.auth-gate__inner {
- background: linear-gradient(180deg, rgba(18, 18, 26, 0.94) 0%, rgba(10, 10, 16, 0.94) 100%);
- border: 1px solid rgba(255, 255, 255, 0.1);
+ position: relative;
+ background: linear-gradient(180deg, rgba(20, 20, 30, 0.92) 0%, rgba(10, 10, 18, 0.94) 100%);
+ border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: var(--radius-lg);
- backdrop-filter: blur(18px);
- -webkit-backdrop-filter: blur(18px);
- padding: var(--space-md);
+ backdrop-filter: blur(22px) saturate(140%);
+ -webkit-backdrop-filter: blur(22px) saturate(140%);
+ padding: var(--space-md) var(--space-md) var(--space-sm);
box-shadow:
- 0 12px 40px rgba(0, 0, 0, 0.5),
- inset 0 1px 0 rgba(255, 255, 255, 0.05);
+ 0 20px 60px rgba(0, 0, 0, 0.55),
+ 0 1px 0 rgba(255, 255, 255, 0.05) inset,
+ 0 -20px 40px -20px rgba(139, 92, 246, 0.25) inset;
+ overflow: hidden;
+}
+
+.auth-gate__inner::before {
+ content: '';
+ position: absolute;
+ inset: 0 0 auto 0;
+ height: 1px;
+ background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.5), transparent);
+ pointer-events: none;
}
.auth-gate__eyebrow {
- display: flex;
+ display: inline-flex;
align-items: center;
- gap: var(--space-xs);
+ gap: 0.42rem;
font-size: var(--text-xs);
- color: rgba(255, 255, 255, 0.5);
- font-weight: 500;
- letter-spacing: 0.08em;
+ color: rgba(167, 139, 250, 0.85);
+ font-weight: 600;
+ letter-spacing: 0.1em;
text-transform: uppercase;
- margin-bottom: var(--space-xs);
+ margin-bottom: var(--space-sm);
+ padding: 0.18rem 0.5rem;
+ border-radius: 999px;
+ background: rgba(139, 92, 246, 0.1);
+ border: 1px solid rgba(139, 92, 246, 0.25);
}
.auth-gate__lock {
- font-size: 1rem;
- opacity: 0.7;
+ width: 0.85em;
+ height: 0.85em;
+ opacity: 0.9;
}
.auth-gate__title {
font-family: 'Space Grotesk', 'Inter', sans-serif;
- font-size: 1.15rem;
+ font-size: 1.32rem;
font-weight: 600;
color: #fff;
margin: 0 0 var(--space-2xs);
- letter-spacing: -0.01em;
+ letter-spacing: -0.018em;
+ line-height: 1.18;
}
.auth-gate__desc {
font-size: var(--text-sm);
- line-height: 1.5;
- color: rgba(255, 255, 255, 0.65);
- margin: 0 0 var(--space-sm);
+ line-height: 1.55;
+ color: rgba(255, 255, 255, 0.62);
+ margin: 0 0 var(--space-md);
}
.auth-gate__actions {
display: flex;
- flex-direction: column;
- gap: var(--space-2xs);
+ gap: var(--space-xs);
margin-bottom: var(--space-sm);
}
.auth-gate__btn {
+ flex: 1;
display: flex;
align-items: center;
justify-content: center;
- padding: var(--space-xs) var(--space-sm);
+ padding: 0.55rem var(--space-sm);
border-radius: var(--radius-md);
font-size: var(--text-sm);
font-weight: 500;
text-decoration: none;
border: 1px solid rgba(255, 255, 255, 0.12);
- color: rgba(255, 255, 255, 0.85);
- background: rgba(255, 255, 255, 0.03);
+ color: rgba(255, 255, 255, 0.82);
+ background: rgba(255, 255, 255, 0.04);
transition:
- background 0.15s,
- border-color 0.15s,
- color 0.15s;
+ background 0.18s ease,
+ border-color 0.18s ease,
+ color 0.18s ease,
+ transform 0.18s ease;
}
.auth-gate__btn:hover {
- background: rgba(255, 255, 255, 0.08);
- border-color: rgba(255, 255, 255, 0.2);
+ background: rgba(255, 255, 255, 0.09);
+ border-color: rgba(255, 255, 255, 0.22);
color: #fff;
}
+.auth-gate__btn:active {
+ transform: translateY(1px);
+}
+
.auth-gate__btn--primary {
- background: #fff;
+ background: linear-gradient(180deg, #fff, #e8e8ef);
color: #0a0a10;
- border-color: #fff;
+ border-color: rgba(255, 255, 255, 0.9);
+ font-weight: 600;
}
.auth-gate__btn--primary:hover {
- background: rgba(255, 255, 255, 0.9);
+ background: #fff;
color: #0a0a10;
+ border-color: #fff;
}
.auth-gate__perks {
list-style: none;
- padding: 0;
+ padding: var(--space-sm) 0 0;
margin: 0;
border-top: 1px solid rgba(255, 255, 255, 0.06);
- padding-top: var(--space-sm);
}
.auth-gate__perks li {
font-size: var(--text-xs);
color: rgba(255, 255, 255, 0.55);
- padding: var(--space-3xs) 0;
+ padding: 0.18rem 0;
display: flex;
align-items: center;
+ gap: 0.45rem;
+ line-height: 1.5;
}
.auth-gate__perks li::before {
- content: '→';
- margin-right: var(--space-xs);
- color: rgba(255, 255, 255, 0.4);
+ content: '';
+ flex-shrink: 0;
+ width: 4px;
+ height: 4px;
+ border-radius: 50%;
+ background: rgba(167, 139, 250, 0.6);
+ box-shadow: 0 0 6px rgba(167, 139, 250, 0.4);
}
@media screen and (max-width: 700px) {
diff --git a/vercel.json b/vercel.json
index f05898bfe..e4d697fe4 100644
--- a/vercel.json
+++ b/vercel.json
@@ -378,7 +378,7 @@
},
{
"src": "/api/agents/([^/]+)/pumpfun/([^/]+)",
- "dest": "/api/agents/[id]"
+ "dest": "/api/agents/pumpfun/[action]?id=$1&action=$2"
},
{
"src": "/api/avatars/([^/]+)/agents",