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: landscape dashboard page, x402 receipt verifier, pricing/club/walk updates, marketplace CSS

nirholas150de4016d7b
diff --git a/api/healthz.js b/api/healthz.js
index b174e91dd..aee758ee6 100644
--- a/api/healthz.js
+++ b/api/healthz.js
@@ -3,8 +3,9 @@
// Lightweight liveness/readiness endpoint. Returns 200 with uptime + a small
// summary block compatible with the pump-dashboard's API status panel.
//
-// Intentionally has no DB / RPC dependencies — this should stay green even
-// when downstream systems are degraded so it's safe to wire to uptime probes.
+// Core health is always green (no hard DB dependency). Optional sub-probes
+// (Resend, x402) are cached for 5 minutes and fail gracefully — a DB outage
+// degrades the `x402` block but never the top-level `status: 'ok'`.
import { cors, json, method, wrap } from './_lib/http.js';
import { countRecentPayments } from './_lib/x402/audit-log.js';
diff --git a/pages/club.html b/pages/club.html
index f305412fe..f3bcbb591 100644
--- a/pages/club.html
+++ b/pages/club.html
@@ -344,15 +344,6 @@
grid-template-columns: 1fr 1fr;
gap: 8px;
}
- .club-pole-card {
- border: 1px solid var(--border);
- background: rgba(255, 59, 214, 0.04);
- border-radius: 10px;
- padding: 10px 11px;
- display: flex;
- flex-direction: column;
- gap: 8px;
- }
.club-pole-head {
display: flex;
justify-content: space-between;
@@ -409,30 +400,6 @@
outline: none;
border-color: var(--accent);
}
- .club-tip-btn {
- appearance: none;
- border: none;
- border-radius: 8px;
- padding: 8px 10px;
- font: inherit;
- font-size: 12px;
- font-weight: 700;
- color: #fff;
- cursor: pointer;
- background: linear-gradient(135deg, var(--accent) 0%, #ff5fda 100%);
- box-shadow:
- 0 4px 12px rgba(255, 59, 214, 0.32),
- inset 0 1px 0 rgba(255, 255, 255, 0.2);
- transition: transform 0.08s ease, filter 0.12s ease;
- }
- .club-tip-btn:hover { filter: brightness(1.08); }
- .club-tip-btn:active { transform: translateY(1px); }
- .club-tip-btn.is-pending {
- background: linear-gradient(135deg, #5a3a78 0%, #6b4d8c 100%);
- box-shadow: none;
- cursor: progress;
- }
-
.club-toggle {
display: flex;
align-items: center;
@@ -472,27 +439,6 @@
gap: 4px;
min-height: 32px;
}
- .club-tip-row {
- display: grid;
- grid-template-columns: 70px 1fr auto;
- gap: 8px;
- align-items: center;
- font-size: 11.5px;
- padding: 6px 8px;
- border-radius: 7px;
- background: rgba(255, 255, 255, 0.02);
- animation: tipIn 0.32s ease;
- }
- @keyframes tipIn {
- from { transform: translateY(-6px); opacity: 0; }
- to { transform: none; opacity: 1; }
- }
- .club-tip-who {
- color: var(--accent-2);
- font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
- font-size: 11px;
- }
- .club-tip-mid { color: var(--text); }
.club-tip-amt {
color: var(--text-3);
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
@@ -567,25 +513,9 @@
gap: 4px;
min-height: 32px;
}
- .club-lb-row {
- display: grid;
- grid-template-columns: 22px 1fr auto auto;
- gap: 8px;
- align-items: center;
- font-size: 12px;
- padding: 7px 8px;
- border-radius: 7px;
- background: rgba(255, 255, 255, 0.02);
- }
.club-lb-row.has-unpaid {
background: rgba(255, 59, 214, 0.06);
}
- .club-lb-rank {
- color: var(--text-3);
- font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
- font-size: 11px;
- text-align: right;
- }
.club-lb-name {
color: var(--text);
font-weight: 600;
diff --git a/pages/dashboard-next/landscape.html b/pages/dashboard-next/landscape.html
new file mode 100644
index 000000000..cacfb9572
--- /dev/null
+++ b/pages/dashboard-next/landscape.html
@@ -0,0 +1,15 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width,initial-scale=1" />
+ <title>Competitive Landscape · Dashboard · three.ws</title>
+ <meta name="robots" content="noindex" />
+ <link rel="icon" href="/favicon.ico" />
+ <link rel="stylesheet" href="/fonts/fonts.css" />
+ <link rel="stylesheet" href="/dashboard-next/shell.css" />
+ </head>
+ <body>
+ <script type="module" src="/src/dashboard-next/pages/landscape.js"></script>
+ </body>
+</html>
diff --git a/pages/pricing.html b/pages/pricing.html
index ab7d7918c..4071fb010 100644
--- a/pages/pricing.html
+++ b/pages/pricing.html
@@ -18,6 +18,7 @@
<link rel="stylesheet" href="/footer.css" />
<link rel="stylesheet" href="/fonts/fonts.css" />
<link rel="stylesheet" href="/mobile.css" />
+ <script defer src="/footer-newsletter.js"></script>
</head>
<body>
<a href="#main-content" class="h-skip-link">Skip to main content</a>
@@ -378,27 +379,47 @@
<div class="h-footer-link-col">
<h4 class="h-footer-link-heading">Product</h4>
<a href="/create">Create</a>
+ <a href="/marketplace">Marketplace</a>
<a href="/studio">Studio</a>
<a href="/widgets">Widgets</a>
- <a href="/discover">Discover</a>
<a href="/pricing">Pricing</a>
</div>
<div class="h-footer-link-col">
<h4 class="h-footer-link-heading">Developers</h4>
<a href="/docs">Docs</a>
<a href="https://github.com/nirholas/three.ws" target="_blank" rel="noopener noreferrer">GitHub</a>
- <a href="/dashboard/api">API</a>
+ <a href="/bazaar">x402 Bazaar</a>
+ <a href="https://developers.metaplex.com/core" target="_blank" rel="noopener noreferrer">Metaplex Core</a>
</div>
<div class="h-footer-link-col">
- <h4 class="h-footer-link-heading">Resources</h4>
+ <h4 class="h-footer-link-heading">Company</h4>
<a href="/blog">Blog</a>
- <a href="/dashboard">Dashboard</a>
<a href="/community">Community</a>
+ <a href="/features">Features</a>
+ <a href="/dashboard">Dashboard</a>
+ </div>
+ <div class="h-footer-link-col">
+ <h4 class="h-footer-link-heading">Legal</h4>
+ <a href="/legal/privacy">Privacy</a>
+ <a href="/legal/tos">Terms</a>
</div>
</nav>
</div>
<div class="h-footer-bottom">
<p class="h-footer-legal">&copy; 2026 three.ws &mdash; All rights reserved.</p>
+ <div class="h-footer-badges">
+ <a href="/pay" class="h-footer-badge" aria-label="Built with x402 payments">
+ <svg viewBox="0 0 16 16" aria-hidden="true">
+ <circle cx="8" cy="8" r="7" fill="none" stroke="currentColor" stroke-width="1.3"/>
+ <path d="M8 4v8M5.5 6h3.5a1.5 1.5 0 010 3H6.5a1.5 1.5 0 000 3H11" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
+ </svg>
+ Built with x402
+ </a>
+ <span class="h-footer-badge" aria-label="All systems operational">
+ <span class="h-footer-status-dot"></span>
+ All systems operational
+ </span>
+ </div>
<div class="h-footer-legal-links">
<a href="/legal/privacy">Privacy Policy</a>
<a href="/legal/tos">Terms of Use</a>
diff --git a/pages/walk.html b/pages/walk.html
index 67f61bc41..416501dc3 100644
--- a/pages/walk.html
+++ b/pages/walk.html
@@ -854,6 +854,20 @@
animation: walk-chat-in 0.2s ease;
transition: opacity 0.3s;
}
+
+ /* ── Walk HUD overflow scroll on small screens ──────────────── */
+ .walk-actions {
+ max-height: calc(100vh - 180px);
+ overflow-y: auto;
+ -ms-overflow-style: none;
+ scrollbar-width: none;
+ }
+ .walk-actions::-webkit-scrollbar { display: none; }
+
+ @media (max-height: 560px) {
+ .walk-actions .walk-btn { padding: 6px 10px; font-size: 12px; }
+ .walk-actions { gap: 5px; }
+ }
</style>
<link rel="stylesheet" href="/nav.css" />
</head>
diff --git a/public/home-polish.js b/public/home-polish.js
index b47f1eb20..d615affbc 100644
--- a/public/home-polish.js
+++ b/public/home-polish.js
@@ -28,7 +28,9 @@
function mountChapterRail(main) {
var chapters = [
{ id: 'h-hero-act', label: 'Intro', selector: '.h-hero-act' },
+ { id: 'h-traction', label: 'Traction', selector: '.h-traction' },
{ id: 'h-pillars', label: 'Pillars', selector: '.h-pillars' },
+ { id: 'h-journey', label: 'How it works', selector: '.h-journey' },
{ id: 'pick-animate', label: 'Animate', selector: '#pick-animate' },
{ id: 'deploy-act', label: 'Deploy', selector: '#deploy-act' },
{ id: 'h-bento-section', label: 'Features', selector: '.h-bento-section' },
diff --git a/public/marketplace.css b/public/marketplace.css
index 826a0a13e..45fc2e18b 100644
--- a/public/marketplace.css
+++ b/public/marketplace.css
@@ -855,6 +855,44 @@ body.market-page {
font-weight: 600;
}
+.skill-price-badge {
+ background: rgba(74, 222, 128, 0.12);
+ color: #4ade80;
+ font-weight: 600;
+ font-variant-numeric: tabular-nums;
+ border: 1px solid rgba(74, 222, 128, 0.2);
+}
+
+.d-pricing-summary {
+ display: inline-flex;
+ align-items: center;
+ gap: 8px;
+ margin-top: 12px;
+ padding: 8px 14px;
+ background: rgba(74, 222, 128, 0.08);
+ border: 1px solid rgba(74, 222, 128, 0.18);
+ border-radius: 8px;
+ font-size: 13px;
+ color: #d1d5db;
+}
+.d-pricing-summary strong {
+ color: #4ade80;
+ font-weight: 600;
+}
+.d-pricing-icon {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ width: 22px;
+ height: 22px;
+ border-radius: 6px;
+ background: rgba(74, 222, 128, 0.15);
+ color: #4ade80;
+ font-weight: 700;
+ font-size: 12px;
+ flex-shrink: 0;
+}
+
.purchase-btn {
margin-left: 8px;
padding: 4px 10px;
diff --git a/scripts/verify-x402-receipts.js b/scripts/verify-x402-receipts.js
new file mode 100755
index 000000000..cff3bba7a
--- /dev/null
+++ b/scripts/verify-x402-receipts.js
@@ -0,0 +1,308 @@
+#!/usr/bin/env node
+// scripts/verify-x402-receipts.js — smoke test for x402 offer & receipt signing.
+//
+// Hits a paid endpoint without a payment header to get the 402 challenge,
+// extracts signed offers from the offer-receipt extension, and verifies each
+// offer's cryptographic signature. READ-ONLY: never sends payments.
+//
+// Usage:
+// node scripts/verify-x402-receipts.js
+// node scripts/verify-x402-receipts.js --url https://three.ws/api/x402/model-check
+
+import { recoverTypedDataAddress } from 'viem';
+
+// ---------------------------------------------------------------------------
+// CLI argument parsing
+// ---------------------------------------------------------------------------
+
+const args = process.argv.slice(2);
+let targetUrl = 'http://localhost:3000/api/x402/model-check';
+
+for (let i = 0; i < args.length; i++) {
+ if (args[i] === '--url' && args[i + 1]) {
+ targetUrl = args[i + 1];
+ i++;
+ } else if (args[i] === '--help' || args[i] === '-h') {
+ console.log('Usage: node scripts/verify-x402-receipts.js [--url <endpoint>]');
+ console.log(' --url Target paid endpoint (default: http://localhost:3000/api/x402/model-check)');
+ process.exit(0);
+ }
+}
+
+// ---------------------------------------------------------------------------
+// EIP-712 domain & types (spec section 3.2 — chainId is always 1)
+// ---------------------------------------------------------------------------
+
+const OFFER_DOMAIN = Object.freeze({ name: 'x402 offer', version: '1', chainId: 1 });
+
+const OFFER_TYPES = Object.freeze({
+ Offer: [
+ { name: 'version', type: 'uint256' },
+ { name: 'resourceUrl', type: 'string' },
+ { name: 'scheme', type: 'string' },
+ { name: 'network', type: 'string' },
+ { name: 'asset', type: 'string' },
+ { name: 'payTo', type: 'string' },
+ { name: 'amount', type: 'string' },
+ { name: 'validUntil', type: 'uint256' },
+ ],
+});
+
+// ---------------------------------------------------------------------------
+// Helpers
+// ---------------------------------------------------------------------------
+
+/** Extract the payload from a signed offer (EIP-712 has it inline, JWS in the signature). */
+function extractOfferPayload(offer) {
+ if (offer.format === 'eip712') {
+ return offer.payload;
+ }
+ if (offer.format === 'jws') {
+ const parts = offer.signature.split('.');
+ if (parts.length !== 3) throw new Error('Invalid JWS format');
+ const payloadJson = Buffer.from(parts[1], 'base64url').toString('utf8');
+ return JSON.parse(payloadJson);
+ }
+ throw new Error(`Unknown offer format: ${offer.format}`);
+}
+
+/** Parse the kid for a did:pkh EIP-712 issuer — returns the embedded address. */
+function extractAddressFromDidPkh(kid) {
+ // kid format: did:pkh:eip155:1:<address>#key-1
+ const match = kid?.match(/^did:pkh:eip155:\d+:(0x[a-fA-F0-9]{40})/);
+ return match ? match[1].toLowerCase() : null;
+}
+
+/** Format a unix timestamp as ISO 8601. */
+function formatTimestamp(unixSeconds) {
+ if (!unixSeconds && unixSeconds !== 0) return 'N/A';
+ return new Date(Number(unixSeconds) * 1000).toISOString();
+}
+
+/** Check if a hex address looks valid. */
+function isValidAddress(addr) {
+ return typeof addr === 'string' && /^0x[a-fA-F0-9]{40}$/i.test(addr);
+}
+
+// ---------------------------------------------------------------------------
+// Offer verification
+// ---------------------------------------------------------------------------
+
+/**
+ * Verify an EIP-712 signed offer by recovering the signer address from the
+ * typed-data signature and comparing it to the address embedded in the kid.
+ */
+async function verifyEip712Offer(offer, kid) {
+ const payload = offer.payload;
+ if (!payload) {
+ return { valid: false, reason: 'missing payload' };
+ }
+
+ const message = {
+ version: BigInt(payload.version),
+ resourceUrl: payload.resourceUrl,
+ scheme: payload.scheme,
+ network: payload.network,
+ asset: payload.asset,
+ payTo: payload.payTo,
+ amount: payload.amount,
+ validUntil: BigInt(payload.validUntil),
+ };
+
+ let recoveredAddress;
+ try {
+ recoveredAddress = await recoverTypedDataAddress({
+ domain: OFFER_DOMAIN,
+ types: OFFER_TYPES,
+ primaryType: 'Offer',
+ message,
+ signature: offer.signature,
+ });
+ } catch (err) {
+ return { valid: false, reason: `signature recovery failed: ${err.message}` };
+ }
+
+ const expectedAddress = extractAddressFromDidPkh(kid);
+ if (!expectedAddress) {
+ // No kid to compare against — signature recovers but we cannot match issuer.
+ return {
+ valid: true,
+ signer: recoveredAddress.toLowerCase(),
+ note: 'kid not available; signer recovered but not cross-checked',
+ };
+ }
+
+ const match = recoveredAddress.toLowerCase() === expectedAddress;
+ return {
+ valid: match,
+ signer: recoveredAddress.toLowerCase(),
+ expected: expectedAddress,
+ reason: match ? undefined : `signer ${recoveredAddress} does not match kid address ${expectedAddress}`,
+ };
+}
+
+/**
+ * Structural verification for JWS offers. Full cryptographic verification
+ * requires resolving the public key from the kid (did:web), which may need
+ * network access to /.well-known/did.json. We verify the structure and
+ * report the kid for manual inspection.
+ */
+function verifyJwsOfferStructure(offer) {
+ const parts = offer.signature?.split('.');
+ if (!parts || parts.length !== 3) {
+ return { valid: false, reason: 'invalid JWS format (expected 3 dot-separated parts)' };
+ }
+ let header;
+ try {
+ header = JSON.parse(Buffer.from(parts[0], 'base64url').toString('utf8'));
+ } catch {
+ return { valid: false, reason: 'cannot decode JWS header' };
+ }
+ if (!header.alg) {
+ return { valid: false, reason: 'JWS header missing alg' };
+ }
+ if (!header.kid) {
+ return { valid: false, reason: 'JWS header missing kid' };
+ }
+ return {
+ valid: true,
+ kid: header.kid,
+ alg: header.alg,
+ note: 'structural check only; full cryptographic verification requires the public key from ' + header.kid,
+ };
+}
+
+// ---------------------------------------------------------------------------
+// Main
+// ---------------------------------------------------------------------------
+
+async function main() {
+ console.log('=== x402 Offer & Receipt Verification ===\n');
+ console.log(`Target: ${targetUrl}\n`);
+
+ // Step 1: hit the endpoint without a payment header to get the 402 challenge.
+ let response;
+ try {
+ response = await fetch(targetUrl, {
+ method: 'GET',
+ headers: { Accept: 'application/json' },
+ });
+ } catch (err) {
+ console.error(`Failed to reach ${targetUrl}`);
+ if (err.cause?.code === 'ECONNREFUSED') {
+ console.error('The server is not running. Start it with: npm run dev');
+ } else {
+ console.error(`Network error: ${err.message}`);
+ }
+ process.exit(1);
+ }
+
+ if (response.status !== 402) {
+ console.error(`Expected HTTP 402, got ${response.status}.`);
+ if (response.status === 200) {
+ console.error('The endpoint returned 200 — it may not require payment (check access control).');
+ }
+ process.exit(1);
+ }
+
+ let body;
+ try {
+ body = await response.json();
+ } catch (err) {
+ console.error(`Failed to parse 402 response body as JSON: ${err.message}`);
+ process.exit(1);
+ }
+
+ console.log('--- 402 Challenge ---');
+ console.log(`x402 version: ${body.x402Version || 'unknown'}`);
+ console.log(`Resource: ${body.resource?.url || 'N/A'}`);
+ console.log(`Accepts: ${body.accepts?.length || 0} payment method(s)`);
+
+ // Step 2: extract offers from the offer-receipt extension.
+ const offerReceiptExt = body.extensions?.['offer-receipt'];
+ const offers = offerReceiptExt?.info?.offers;
+
+ if (!offers || !offers.length) {
+ console.log('\nOffers found: 0 (extension not declared — OFFER_RECEIPT_SIGNING_PRIVATE_KEY may not be set)');
+ console.log('\n--- Receipt Verification ---');
+ console.log('(Requires a real payment — skipped in dry-run mode)');
+ console.log('\nResult: SKIP (no offers to verify)');
+ process.exit(0);
+ }
+
+ console.log(`\nOffers found: ${offers.length}`);
+
+ // The kid is shared across all offers from the same issuer.
+ // For EIP-712, extract it from the PAYMENT-REQUIRED header or the issuer config.
+ // We check the first EIP-712 offer's recovered signer, and for JWS the kid is in the header.
+ let kid = null;
+ // The server's buildOffersExtension doesn't embed the kid directly in the offer,
+ // but for EIP-712 the issuer address is recoverable from the signature. For JWS,
+ // the kid is in the JWS header.
+
+ let allValid = true;
+ const results = [];
+
+ for (let i = 0; i < offers.length; i++) {
+ const offer = offers[i];
+ const payload = extractOfferPayload(offer);
+ const idx = i + 1;
+
+ let verification;
+ if (offer.format === 'eip712') {
+ verification = await verifyEip712Offer(offer, kid);
+ // If we don't have a kid yet, use the recovered signer for subsequent checks.
+ if (!kid && verification.signer) {
+ kid = `did:pkh:eip155:1:${verification.signer}#key-1`;
+ }
+ } else if (offer.format === 'jws') {
+ verification = verifyJwsOfferStructure(offer);
+ if (!kid && verification.kid) {
+ kid = verification.kid;
+ }
+ } else {
+ verification = { valid: false, reason: `unknown format: ${offer.format}` };
+ }
+
+ const signerDisplay = verification.signer
+ ? verification.signer
+ : verification.kid
+ ? verification.kid
+ : 'N/A';
+
+ const validUntil = payload.validUntil ? formatTimestamp(payload.validUntil) : 'N/A';
+ const mark = verification.valid ? 'OK' : 'FAIL';
+
+ if (!verification.valid) allValid = false;
+
+ let line = ` [${idx}] network: ${payload.network || 'N/A'} | amount: ${payload.amount || 'N/A'} | signer: ${signerDisplay} | valid until: ${validUntil} ${mark}`;
+ if (verification.reason) {
+ line += `\n Reason: ${verification.reason}`;
+ }
+ if (verification.note) {
+ line += `\n Note: ${verification.note}`;
+ }
+
+ results.push(line);
+ }
+
+ for (const line of results) {
+ console.log(line);
+ }
+
+ console.log('\n--- Receipt Verification ---');
+ console.log('(Requires a real payment — skipped in dry-run mode)');
+
+ if (allValid) {
+ console.log('\nResult: PASS (offers verified)');
+ process.exit(0);
+ } else {
+ console.log('\nResult: FAIL (one or more offers failed verification)');
+ process.exit(1);
+ }
+}
+
+main().catch((err) => {
+ console.error(`Unexpected error: ${err.message}`);
+ process.exit(1);
+});
diff --git a/src/club-camera.js b/src/club-camera.js
index 1ee52eeb6..9c55f9761 100644
--- a/src/club-camera.js
+++ b/src/club-camera.js
@@ -57,6 +57,7 @@ export class ClubCamera {
this._onModeChange = opts.onModeChange || null;
this._houseYaw = 0;
this._autoYaw = 0;
+ this._autoOrbitRadius = AUTO_ORBIT_RADIUS;
this._autoLayout = null; // pole layout for auto-orbit
this._activeVipId = null;
// Slerp state for smooth rotation interpolation.
@@ -162,6 +163,14 @@ export class ClubCamera {
if (this.mode === 'house') return;
const bounds = ZOOM_BOUNDS[this.mode] || ZOOM_BOUNDS.free;
const factor = 1 + deltaY * 0.0015;
+
+ if (this.mode === 'auto') {
+ // In auto mode, adjust the orbit radius directly.
+ const nextRadius = Math.max(bounds.min, Math.min(bounds.max, this._autoOrbitRadius * factor));
+ this._autoOrbitRadius = nextRadius;
+ return;
+ }
+
const current = this._pending ? this._pending.offset : this.offset;
const len = current.length();
if (len < 1e-4) return;
@@ -207,9 +216,9 @@ export class ClubCamera {
// Slowly orbit the performing dancer's pole.
this._autoYaw += AUTO_ORBIT_SPEED * dt;
const orbitOffset = new Vector3(
- Math.sin(this._autoYaw) * AUTO_ORBIT_RADIUS,
+ Math.sin(this._autoYaw) * this._autoOrbitRadius,
AUTO_ORBIT_HEIGHT,
- Math.cos(this._autoYaw) * AUTO_ORBIT_RADIUS,
+ Math.cos(this._autoYaw) * this._autoOrbitRadius,
);
const autoTarget = new Vector3(
this._autoLayout.x,
diff --git a/src/dashboard-next/pages/developers.js b/src/dashboard-next/pages/developers.js
index 2300530e0..3b624cc56 100644
--- a/src/dashboard-next/pages/developers.js
+++ b/src/dashboard-next/pages/developers.js
@@ -577,6 +577,7 @@ function renderWebhookList(container) {
${wh.description ? `<div class="dev-wh-card-desc">${esc(wh.description)}</div>` : ''}
</div>
<div class="dev-wh-card-actions">
+ <button class="dev-wh-view-btn" data-id="${esc(wh.id)}">View Deliveries</button>
<button class="dn-btn ghost dev-wh-toggle" data-id="${esc(wh.id)}" data-active="${wh.active}">${wh.active ? 'Pause' : 'Resume'}</button>
<button class="dn-btn ghost danger dev-wh-delete" data-id="${esc(wh.id)}">Delete</button>
</div>
@@ -590,6 +591,7 @@ function renderWebhookList(container) {
${wh.stats_7d.failed > 0 ? `<span class="dev-wh-stat danger">${wh.stats_7d.failed} failed</span>` : ''}
${wh.stats_7d.last_delivery_at ? `<span class="dev-wh-stat">Last: ${relTime(wh.stats_7d.last_delivery_at)}</span>` : ''}
</div>` : ''}
+ <div class="dev-wh-deliveries" data-deliveries-for="${esc(wh.id)}"></div>
</div>
`).join('');
@@ -621,6 +623,60 @@ function renderWebhookList(container) {
}
});
});
+
+ container.querySelectorAll('.dev-wh-view-btn').forEach(btn => {
+ btn.addEventListener('click', async () => {
+ const id = btn.dataset.id;
+ const slot = container.querySelector(`[data-deliveries-for="${id}"]`);
+ if (!slot) return;
+
+ if (slot.dataset.loaded === 'true') {
+ slot.innerHTML = '';
+ slot.dataset.loaded = '';
+ btn.textContent = 'View Deliveries';
+ return;
+ }
+
+ btn.textContent = 'Loading...';
+ btn.disabled = true;
+
+ try {
+ const res = await get(`/api/developer/webhooks/${id}`);
+ const deliveries = res?.deliveries ?? [];
+ slot.dataset.loaded = 'true';
+ btn.textContent = 'Hide Deliveries';
+ btn.disabled = false;
+
+ if (!deliveries.length) {
+ slot.innerHTML = `<div class="dev-wh-delivery-list" style="padding:16px 0;color:var(--nxt-ink-dim);font-size:13px;text-align:center">No deliveries yet</div>`;
+ return;
+ }
+
+ slot.innerHTML = `<div class="dev-wh-delivery-list">
+ <div class="dev-wh-delivery-item" style="font-weight:600;font-size:11px;text-transform:uppercase;letter-spacing:0.04em;color:var(--nxt-ink-dim);border-bottom:1px solid var(--nxt-stroke)">
+ <span>Event</span><span>Event ID</span><span>Status</span><span>Time</span>
+ </div>
+ ${deliveries.slice(0, 25).map(d => {
+ const ok = d.status_code && d.status_code >= 200 && d.status_code < 300;
+ const fail = d.status_code === null || d.status_code >= 400;
+ const statusClass = ok ? 'ok' : fail ? 'fail' : 'pending';
+ const statusText = d.status_code ? `${d.status_code}` : d.error ? 'Error' : 'Pending';
+ return `<div class="dev-wh-delivery-item">
+ <span class="dev-wh-delivery-event">${esc(d.event_type)}</span>
+ <span class="dev-wh-delivery-event" style="opacity:0.6">${esc((d.event_id || '').slice(0, 16))}</span>
+ <span class="dev-wh-delivery-status ${statusClass}">${statusText}</span>
+ <span style="color:var(--nxt-ink-dim)">${relTime(d.created_at)}</span>
+ </div>`;
+ }).join('')}
+ ${deliveries.length > 25 ? `<div style="padding:8px 12px;font-size:12px;color:var(--nxt-ink-dim)">Showing 25 of ${deliveries.length} deliveries</div>` : ''}
+ </div>`;
+ } catch (err) {
+ btn.textContent = 'View Deliveries';
+ btn.disabled = false;
+ showToast(err?.message || 'Failed to load deliveries', 'danger');
+ }
+ });
+ });
}
function wireWebhookForm(el) {
diff --git a/src/marketplace.js b/src/marketplace.js
index 1e1b04cf8..552cd2c5f 100644
--- a/src/marketplace.js
+++ b/src/marketplace.js
@@ -1392,6 +1392,30 @@ function updateAvatarCardPriceInGrid(avatarId, price) {
//
// Renders inside the existing #agent-sale-panel container right under the
// agent's name. Mirrors the avatar modal panel: owner sees price/payout
+// Renders a pricing summary strip on the detail page overview,
+// showing the number of paid skills and lowest price.
+function renderDetailPricingSummary(agent) {
+ const existing = document.getElementById('d-pricing-summary');
+ if (existing) existing.remove();
+ const skillPrices = agent.skill_prices || {};
+ const priced = Object.entries(skillPrices).filter(([, p]) => p && Number(p.amount) > 0);
+ if (!priced.length) return;
+ const overview = $('d-overview');
+ if (!overview) return;
+ const minAmount = Math.min(...priced.map(([, p]) => Number(p.amount)));
+ const decimals = Number(priced[0]?.[1]?.mint_decimals ?? 6);
+ const minUsd = minAmount / Math.pow(10, decimals);
+ const formatted = minUsd >= 1 ? minUsd.toFixed(2) : minUsd >= 0.01 ? minUsd.toFixed(3) : minUsd.toFixed(6).replace(/0+$/, '');
+ const strip = document.createElement('div');
+ strip.id = 'd-pricing-summary';
+ strip.className = 'd-pricing-summary';
+ strip.innerHTML = `
+ <span class="d-pricing-icon">$</span>
+ <span>${priced.length} paid skill${priced.length === 1 ? '' : 's'} · from <strong>$${escapeHtml(formatted)}/call</strong></span>
+ `;
+ overview.insertAdjacentElement('afterend', strip);
+}
+
// editor, non-owner with active price sees a Buy button. Free agents for
// non-owners get nothing.
function renderAgentSalePanel(agent) {
@@ -3126,6 +3150,9 @@ function renderDetail(a, bookmarked) {
$('d-views').textContent = `⊙ ${fmtNumber(views)}`;
$('d-overview').textContent = a.description || '';
+ // Render pricing summary if agent has skill prices
+ renderDetailPricingSummary(a);
+
renderAgentSalePanel(a);
$('d-profile').textContent = a.system_prompt || a.prompt || '(No profile yet.)';
startPreviewSession(a);
diff --git a/src/walk.js b/src/walk.js
index c2ca840fb..5db61f23d 100644
--- a/src/walk.js
+++ b/src/walk.js
@@ -165,11 +165,11 @@ if (nameInput) {
// ── Help toggle ──────────────────────────────────────────────────────────
const helpEl = document.getElementById('walk-help');
let helpAutoHideTimer = null;
-if (helpToggleBtn && helpEl) {
+if (helpToggleBtn) {
helpToggleBtn.addEventListener('click', () => {
- const show = helpEl.style.display === 'none';
- helpEl.style.display = show ? '' : 'none';
- if (helpAutoHideTimer) { clearTimeout(helpAutoHideTimer); helpAutoHideTimer = null; }
+ toggleHelp();
+ // Also hide the small hints if showing the full overlay
+ if (helpEl && helpAutoHideTimer) { clearTimeout(helpAutoHideTimer); helpAutoHideTimer = null; }
});
}
@@ -651,6 +651,7 @@ let avatar = null;
let avatarYaw = 0; // current facing (radians); we lerp this toward movement angle
let avatarLean = 0; // current torso pitch (radians); lerps toward target lean
let currentMotion = 'idle'; // 'idle' | 'walk' | 'run' — drives clip crossfades
+let avatarHeight = 1.8; // cached avatar height, updated on load/switch
// Cached gltf scene + animation manifest defs, populated by loadAvatar — the
// multiplayer layer reuses both to spawn remote-player avatars without
@@ -687,6 +688,7 @@ async function loadAvatar() {
// Frame the camera relative to the avatar's height.
const height = Math.max(0.5, box.max.y - box.min.y);
+ avatarHeight = height;
CAM_OFFSET.set(0, height * 1.05, height * 1.95);
CAM_LOOK_OFFSET.set(0, height * 0.6, 0);
applyCameraImmediate();
@@ -1331,7 +1333,6 @@ function tick() {
}
}
- const avatarHeight = avatar ? new Box3().setFromObject(avatar).max.y - new Box3().setFromObject(avatar).min.y : 1.8;
const desired = computeCameraForMode(cameraMode, avatarRig.position, avatarHeight);
// Camera mode transition (smooth lerp)
@@ -2506,8 +2507,11 @@ loadAvatar()
avatar.position.y -= box.min.y;
avatarRig.add(avatar);
const height = Math.max(0.5, box.max.y - box.min.y);
+ avatarHeight = height;
CAM_OFFSET.set(0, height * 1.05, height * 1.95);
CAM_LOOK_OFFSET.set(0, height * 0.6, 0);
+ // Respect current camera mode visibility
+ if (cameraMode === 'firstperson') avatar.visible = false;
animationManager.attach(avatar);
animationManager.crossfadeTo(motionToClipName(currentMotion), 0);
setStatus('Avatar switched');
diff --git a/tests/club-camera.test.js b/tests/club-camera.test.js
index 045510f18..78b79823d 100644
--- a/tests/club-camera.test.js
+++ b/tests/club-camera.test.js
@@ -5,12 +5,13 @@
// JS — no WebGL / DOM — so vitest exercises the math directly.
import { describe, it, expect } from 'vitest';
-import { Vector3 } from 'three';
+import { Quaternion, Vector3 } from 'three';
import { ClubCamera, CLUB_CAMERA_MODES } from '../src/club-camera.js';
function makeStubCamera() {
const cam = {
position: new Vector3(),
+ quaternion: new Quaternion(),
_lookAt: new Vector3(),
lookAt(x, y, z) {
if (x?.isVector3) this._lookAt.copy(x);
@@ -28,7 +29,7 @@ function runFrames(clubCam, frames = 240, dt = 1 / 60) {
describe('ClubCamera — vocabulary', () => {
it('exports the canonical mode list', () => {
- expect(CLUB_CAMERA_MODES).toEqual(['free', 'vip', 'house']);
+ expect(CLUB_CAMERA_MODES).toEqual(['free', 'vip', 'house', 'auto']);
});
it('starts in free mode with sensible defaults', () => {
@@ -49,11 +50,12 @@ describe('ClubCamera — VIP convergence', () => {
runFrames(c, 240);
// Expected world position = pole target + offset (yaw + π flips behind dancer).
- const expectedTarget = new Vector3(pole3.x, 1.6, pole3.z);
+ // VIP shot: front-and-low with target at y=1.4, offset at y=0.85, distance 2.4.
+ const expectedTarget = new Vector3(pole3.x, 1.4, pole3.z);
const expectedOffset = new Vector3(
- Math.sin(pole3.yaw + Math.PI) * 2.6,
- 1.3,
- Math.cos(pole3.yaw + Math.PI) * 2.6,
+ Math.sin(pole3.yaw + Math.PI) * 2.4,
+ 0.85,
+ Math.cos(pole3.yaw + Math.PI) * 2.4,
);
const expectedPos = expectedTarget.clone().add(expectedOffset);
@@ -70,9 +72,10 @@ describe('ClubCamera — VIP convergence', () => {
runFrames(c, 360);
- // House cam target = (0, 0.5, -1.5), offset = (0, 12, ~0) → camera high overhead.
- expect(cam.position.y).toBeGreaterThan(11.5);
- expect(Math.abs(cam.position.x)).toBeLessThan(0.1);
+ // House cam target = (0, 0.5, -1.5), offset = (0, 13, ~0) → camera high overhead.
+ // With gentle yaw rotation, the x position drifts slightly but stays near zero.
+ expect(cam.position.y).toBeGreaterThan(12.5);
+ expect(Math.abs(cam.position.x)).toBeLessThan(1.0);
});
});
@@ -145,6 +148,41 @@ describe('ClubCamera — zoom', () => {
});
});
+describe('ClubCamera — auto mode', () => {
+ const pole2 = { id: '2', x: 0.5, z: -3.0, yaw: 0.3 };
+
+ it('setAuto switches to auto mode and orbits the pole', () => {
+ const cam = makeStubCamera();
+ const c = new ClubCamera(cam);
+ c.setAuto(pole2);
+ expect(c.getMode()).toBe('auto');
+
+ // After running frames, the camera should be near the pole's position
+ // at the orbit radius.
+ runFrames(c, 120);
+ const distFromPole = Math.hypot(
+ cam.position.x - pole2.x,
+ cam.position.z - pole2.z,
+ );
+ // Should be roughly at the auto-orbit radius (~3.2).
+ expect(distFromPole).toBeGreaterThan(2.0);
+ expect(distFromPole).toBeLessThan(5.0);
+ // Camera height should be at auto-orbit height (~1.6).
+ expect(cam.position.y).toBeGreaterThan(1.0);
+ expect(cam.position.y).toBeLessThan(3.0);
+ });
+
+ it('applyZoom works in auto mode', () => {
+ const c = new ClubCamera(makeStubCamera());
+ c.setAuto(pole2);
+ runFrames(c, 60);
+ // Zoom should not be a no-op.
+ const before = c.offset.length();
+ c.applyZoom(-200);
+ expect(c.offset.length()).not.toBe(before);
+ });
+});
+
describe('ClubCamera — mode change callback', () => {
it('fires onModeChange only on actual transitions', () => {
const calls = [];
@@ -155,7 +193,8 @@ describe('ClubCamera — mode change callback', () => {
c.setVip({ id: '1', x: 0, z: 0, yaw: 0 });
c.setVip({ id: '2', x: 1, z: 0, yaw: 0 }); // still vip → no callback
c.setHouse();
+ c.setAuto({ id: '3', x: 0, z: 0, yaw: 0 });
c.setFree();
- expect(calls).toEqual(['vip', 'house', 'free']);
+ expect(calls).toEqual(['vip', 'house', 'auto', 'free']);
});
});