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.

marketplace a11y polish + a2a-helpers BigInt fix

nirholas9ca68713bd77
diff --git a/agent-payments-sdk/src/a2a-helpers.ts b/agent-payments-sdk/src/a2a-helpers.ts
index 96a1ed2dd..05b6b6ef2 100644
--- a/agent-payments-sdk/src/a2a-helpers.ts
+++ b/agent-payments-sdk/src/a2a-helpers.ts
@@ -179,7 +179,14 @@ export async function createPrivateKeySigner(privateKey: string): Promise<A2ASig
],
},
primaryType: "TransferWithAuthorization",
- message,
+ message: {
+ from: message.from,
+ to: message.to,
+ value: BigInt(message.value),
+ validAfter: BigInt(message.validAfter),
+ validBefore: BigInt(message.validBefore),
+ nonce: message.nonce,
+ },
}),
};
}
diff --git a/pages/marketplace.html b/pages/marketplace.html
index 0e4eaf38a..b332f96be 100644
--- a/pages/marketplace.html
+++ b/pages/marketplace.html
@@ -28,11 +28,13 @@
display: flex;
align-items: center;
gap: 10px;
- padding: 10px 24px;
- background: linear-gradient(90deg, rgba(253, 224, 71, 0.08), rgba(253, 224, 71, 0.02));
- border-bottom: 1px solid rgba(253, 224, 71, 0.2);
+ margin: 12px 24px 0;
+ padding: 8px 14px;
+ background: linear-gradient(90deg, rgba(253, 224, 71, 0.07), rgba(253, 224, 71, 0.02));
+ border: 1px solid rgba(253, 224, 71, 0.18);
+ border-radius: 10px;
color: #fde68a;
- font-size: 13px;
+ font-size: 12px;
line-height: 1.4;
}
.market-wip-banner .market-wip-icon {
@@ -249,6 +251,20 @@
text-transform: uppercase;
color: #7dd3fc;
font-weight: 600;
+ display: inline-flex;
+ align-items: center;
+ gap: 8px;
+ }
+ .market-hero-beta-pill {
+ font-family: 'Space Grotesk', sans-serif;
+ font-size: 9px;
+ font-weight: 700;
+ letter-spacing: 0.18em;
+ padding: 2px 7px;
+ border-radius: 999px;
+ background: rgba(253, 224, 71, 0.12);
+ color: #fde047;
+ border: 1px solid rgba(253, 224, 71, 0.25);
}
.market-hero-title {
font-family: 'Space Grotesk', sans-serif;
@@ -334,6 +350,10 @@
.market-hero-dots button.active {
background: #fafafa;
}
+ .market-hero-dots button:focus-visible {
+ outline: 2px solid #7dd3fc;
+ outline-offset: 3px;
+ }
@media (max-width: 880px) {
.market-hero {
grid-template-columns: 1fr;
@@ -1133,15 +1153,6 @@
</aside>
<main class="market-main" id="market-main">
- <div class="market-wip-banner" id="market-wip-banner" role="status" hidden>
- <span class="market-wip-icon" aria-hidden="true">!</span>
- <div class="market-wip-text">
- <strong>Marketplace is in beta.</strong>
- Avatars, chat, and forking are stable. <em>Paid skills, on-chain agent listings, and submission moderation are still landing</em> — expect rough edges.
- </div>
- <button class="market-wip-dismiss" id="market-wip-dismiss" aria-label="Dismiss">×</button>
- </div>
-
<!-- Discovery view -->
<section class="market-discovery" id="market-discovery">
<!-- Weekly curated theme strip (loads from /api/marketplace/theme) -->
@@ -1155,7 +1166,10 @@
<section class="market-hero" id="market-hero" hidden aria-label="Featured 3D avatars">
<div class="market-hero-stage" id="market-hero-stage"></div>
<div class="market-hero-meta">
- <div class="market-hero-eyebrow">Featured · Community Avatars</div>
+ <div class="market-hero-eyebrow">
+ Featured · Community Avatars
+ <span class="market-hero-beta-pill" aria-label="Marketplace is in beta">BETA</span>
+ </div>
<h1 class="market-hero-title" id="market-hero-title">—</h1>
<p class="market-hero-desc" id="market-hero-desc">—</p>
<div class="market-hero-stats" id="market-hero-stats"></div>
@@ -1196,6 +1210,15 @@
<a class="market-submit-avatar-btn" href="/create" id="market-submit-avatar-btn">+ Create Avatar</a>
</header>
+ <div class="market-wip-banner" id="market-wip-banner" role="status" hidden>
+ <span class="market-wip-icon" aria-hidden="true">!</span>
+ <div class="market-wip-text">
+ <strong>Marketplace is in beta.</strong>
+ Avatars, chat, and forking are stable. <em>Paid skills, on-chain agent listings, and submission moderation are still landing</em> — expect rough edges.
+ </div>
+ <button class="market-wip-dismiss" id="market-wip-dismiss" aria-label="Dismiss">×</button>
+ </div>
+
<div class="market-cat-chips" id="market-cat-chips" role="navigation" aria-label="Categories"></div>
<div class="market-tag-banner" id="market-tag-banner" role="status" hidden></div>
diff --git a/src/marketplace.js b/src/marketplace.js
index 12b7c5ab9..6482c4ddd 100644
--- a/src/marketplace.js
+++ b/src/marketplace.js
@@ -616,19 +616,56 @@ function renderHero() {
dots.innerHTML = state.featured
.map(
(_, i) =>
- `<button class="market-hero-dot${i === state.heroIndex ? ' active' : ''}" data-dot="${i}" aria-label="Slide ${i + 1}"></button>`,
+ `<button class="market-hero-dot${i === state.heroIndex ? ' active' : ''}" data-dot="${i}" aria-label="Slide ${i + 1} of ${state.featured.length}"${i === state.heroIndex ? ' aria-current="true"' : ''}></button>`,
)
.join('');
- dots.querySelectorAll('[data-dot]').forEach((btn) => {
+ const dotButtons = dots.querySelectorAll('[data-dot]');
+ dotButtons.forEach((btn) => {
btn.addEventListener('click', () => {
state.heroIndex = Number(btn.dataset.dot);
renderHero();
startHeroAutoplay();
});
+ // ArrowLeft/ArrowRight cycle focus + slide. Home/End jump to first/last.
+ btn.addEventListener('keydown', (e) => {
+ const last = state.featured.length - 1;
+ let next = null;
+ if (e.key === 'ArrowRight') next = Math.min(state.heroIndex + 1, last);
+ else if (e.key === 'ArrowLeft') next = Math.max(state.heroIndex - 1, 0);
+ else if (e.key === 'Home') next = 0;
+ else if (e.key === 'End') next = last;
+ if (next === null || next === state.heroIndex) return;
+ e.preventDefault();
+ state.heroIndex = next;
+ renderHero();
+ dots.querySelector(`[data-dot="${next}"]`)?.focus();
+ startHeroAutoplay();
+ });
});
+ bindHeroInteractions();
updateHeroMeta();
}
+let heroInteractionsBound = false;
+function bindHeroInteractions() {
+ if (heroInteractionsBound) return;
+ const hero = $('market-hero');
+ if (!hero) return;
+ heroInteractionsBound = true;
+ // Pause autoplay when the user is engaging with the hero (mouse over,
+ // or keyboard focus inside) — resume on leave / blur.
+ const pause = () => stopHeroAutoplay();
+ const resume = () => {
+ if (state.featured.length >= 2 && !document.hidden) startHeroAutoplay();
+ };
+ hero.addEventListener('mouseenter', pause);
+ hero.addEventListener('mouseleave', resume);
+ hero.addEventListener('focusin', pause);
+ hero.addEventListener('focusout', (e) => {
+ if (!hero.contains(e.relatedTarget)) resume();
+ });
+}
+
function updateHeroMeta() {
const a = state.featured[state.heroIndex];
if (!a) return;
@@ -697,6 +734,11 @@ function updateNavCounts() {
function startHeroAutoplay() {
if (state.heroTimer) clearInterval(state.heroTimer);
if (state.featured.length < 2) return;
+ // Honor the OS-level reduced-motion preference — users on that setting
+ // shouldn't see content silently rotating under them.
+ if (typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches) {
+ return;
+ }
state.heroTimer = setInterval(() => {
state.heroIndex = (state.heroIndex + 1) % state.featured.length;
// Cheap update — just toggle active classes + meta, don't re-render model-viewers.
@@ -704,7 +746,10 @@ function startHeroAutoplay() {
el.classList.toggle('active', Number(el.dataset.slot) === state.heroIndex);
});
document.querySelectorAll('.market-hero-dot').forEach((el) => {
- el.classList.toggle('active', Number(el.dataset.dot) === state.heroIndex);
+ const isActive = Number(el.dataset.dot) === state.heroIndex;
+ el.classList.toggle('active', isActive);
+ if (isActive) el.setAttribute('aria-current', 'true');
+ else el.removeAttribute('aria-current');
});
updateHeroMeta();
}, 6500);
@@ -812,22 +857,14 @@ function renderGrid() {
const totalCards = agentItems.length + avatars.length + onchain.length;
if (!totalCards) {
- let msg;
const stillLoading =
(!state.publicAvatarsLoaded && state.filter !== 'agents' && state.filter !== 'onchain') ||
(!state.onchainLoaded && state.filter === 'onchain');
if (stillLoading) {
- msg = renderSkeletons(8);
- } else if (state.filter === 'agents') {
- msg = '<div class="market-empty">No agents published yet. Be the first.</div>';
- } else if (state.filter === 'avatars') {
- msg = '<div class="market-empty">No public avatars match your search.</div>';
- } else if (state.filter === 'onchain') {
- msg = '<div class="market-empty">No onchain agents match your search.</div>';
+ els.grid.innerHTML = renderSkeletons(8);
} else {
- msg = '<div class="market-empty">Nothing here yet — try a different search.</div>';
+ els.grid.innerHTML = renderEmptyState();
}
- els.grid.innerHTML = msg;
els.loadMore.hidden = true;
return;
}