Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

chore: update build/deploy config and auto-refund env (externalize /crypto-optional.js for Vercel)

nirholas96d7c9ef0608
diff --git a/.env.example b/.env.example
index e1d60de55..e4fa27138 100644
--- a/.env.example
+++ b/.env.example
@@ -389,6 +389,21 @@ ZAUTH_DEBUG=
# tool args) are withheld from the third-party backend. Endpoint health is
# reported regardless. Enable only for short-lived debugging.
ZAUTH_INCLUDE_BODIES=
+# Auto-refund hot wallets. When at least one is set, the SDK automatically
+# refunds callers who pay and receive a 5xx or empty response. Use DEDICATED
+# keypairs funded only with the refund float — never the main treasury keys.
+#
+# EVM (Base) refund wallet — hex private key (0x…). Generate:
+# node -e "console.log(require('viem/accounts').generatePrivateKey())"
+ZAUTH_REFUND_PRIVATE_KEY=
+# Solana refund wallet — base58 secret key. Generate:
+# node -e "const {Keypair}=require('@solana/web3.js');console.log(require('bs58').default.encode(Keypair.generate().secretKey))"
+ZAUTH_SOLANA_PRIVATE_KEY=
+# Per-refund ceiling in USD. Defaults to 0.10 (above our highest tool price $0.05).
+ZAUTH_REFUND_MAX_USD=
+# Daily / monthly spend caps across all auto-refunds. Defaults: $25 / $250.
+ZAUTH_REFUND_DAILY_CAP_USD=
+ZAUTH_REFUND_MONTHLY_CAP_USD=
# ── Resend (transactional email) ─────────────────────────────────────────────
# Powers: account welcome, email verification codes, password reset, subscription
diff --git a/package.json b/package.json
index 00797d38a..4389f2b10 100644
--- a/package.json
+++ b/package.json
@@ -62,7 +62,7 @@
"audit:web": "node scripts/page-audit.mjs",
"build:news": "node scripts/build-news.mjs",
"prebuild": "(node scripts/build-news.mjs & node scripts/build-skill-metadata.mjs & node scripts/build-local-skill-packs.mjs & npm run build:club-assets & wait) && (node scripts/build-page-index.mjs && node scripts/audit-page-index.mjs)",
- "build": "vite build && node scripts/strip-sw-from-embeds.mjs",
+ "build": "NODE_OPTIONS='--no-deprecation --max-old-space-size=6144' vite build && node scripts/strip-sw-from-embeds.mjs",
"build:wasm": "PATH=\"$HOME/.cargo/bin:$PATH\" RUSTFLAGS='-C target-feature=+simd128' wasm-pack build crates/vanity-grinder --target web --release --out-dir ../../src/solana/vanity/wasm && printf '%s\\n' '# wasm-pack writes a default `*` gitignore that excludes everything.' '# Override it: the generated files in this directory ARE checked in so the' '# app builds without requiring a Rust toolchain at install time. Run' '# `npm run build:wasm` after editing /crates/vanity-grinder/src/lib.rs to' '# refresh these artifacts.' '!*' > src/solana/vanity/wasm/.gitignore",
"build:animations": "node scripts/build-animations.mjs",
"build:club-props": "node scripts/build-club-props.mjs",
@@ -91,6 +91,7 @@
"fetch-animations": "node scripts/download-animations.mjs",
"fetch:mixamo-catalog": "node scripts/fetch-mixamo-catalog.mjs",
"test": "vitest run && playwright test",
+ "test:core": "vitest run --maxWorkers=1",
"test:e2e": "playwright test",
"test:pages": "node scripts/test-pages.mjs",
"verify:ibm": "node scripts/verify-ibm-pages.mjs",
diff --git a/vercel.json b/vercel.json
index 43215be03..86da41167 100644
--- a/vercel.json
+++ b/vercel.json
@@ -433,6 +433,10 @@
"src": "/avatar-studio-demo/?",
"dest": "/avatar-studio-demo.html"
},
+ {
+ "src": "/forge/share/([^/]+)",
+ "dest": "/api/forge-share?id=$1"
+ },
{
"src": "/forge/?",
"dest": "/forge.html"
@@ -733,19 +737,28 @@
},
{
"src": "/home-classic/?",
- "dest": "/home-classic.html"
+ "status": 301,
+ "headers": { "Location": "/" }
},
{
"src": "/home-v3/?",
- "dest": "/home-v3.html"
+ "status": 301,
+ "headers": { "Location": "/" }
},
{
"src": "/home-v4/?",
- "dest": "/home-v4.html"
+ "status": 301,
+ "headers": { "Location": "/" }
+ },
+ {
+ "src": "/discover-next/?",
+ "status": 301,
+ "headers": { "Location": "/discover" }
},
{
"src": "/agent-next/?",
- "dest": "/agent-next.html"
+ "status": 301,
+ "headers": { "Location": "/agents" }
},
{
"src": "/deploy",
@@ -757,75 +770,93 @@
},
{
"src": "/dashboard-classic/?",
- "dest": "/dashboard-classic/index.html"
+ "headers": { "Location": "/dashboard/" },
+ "status": 301
},
{
"src": "/dashboard-classic/portfolio/asset",
- "dest": "/dashboard-classic/portfolio-asset.html"
+ "headers": { "Location": "/dashboard/portfolio" },
+ "status": 301
},
{
"src": "/dashboard-classic/portfolio",
- "dest": "/dashboard-classic/portfolio.html"
+ "headers": { "Location": "/dashboard/portfolio" },
+ "status": 301
},
{
"src": "/dashboard-classic/wallets",
- "dest": "/dashboard-classic/wallets.html"
+ "headers": { "Location": "/dashboard/account" },
+ "status": 301
},
{
"src": "/dashboard-classic/sessions",
- "dest": "/dashboard-classic/sessions.html"
+ "headers": { "Location": "/dashboard/settings" },
+ "status": 301
},
{
"src": "/dashboard-classic/actions",
- "dest": "/dashboard-classic/actions.html"
+ "headers": { "Location": "/dashboard/account" },
+ "status": 301
},
{
"src": "/dashboard-classic/embed-policy",
- "dest": "/dashboard-classic/embed-policy.html"
+ "headers": { "Location": "/dashboard/api" },
+ "status": 301
},
{
"src": "/dashboard-classic/memory",
- "dest": "/dashboard-classic/memory.html"
+ "headers": { "Location": "/dashboard/agents" },
+ "status": 301
},
{
"src": "/dashboard-classic/strategy",
- "dest": "/dashboard-classic/strategy.html"
+ "headers": { "Location": "/dashboard/library" },
+ "status": 301
},
{
"src": "/dashboard-classic/voice",
- "dest": "/dashboard-classic/voice.html"
+ "headers": { "Location": "/dashboard/settings" },
+ "status": 301
},
{
"src": "/dashboard-classic/sns",
- "dest": "/dashboard-classic/sns.html"
+ "headers": { "Location": "/dashboard/account" },
+ "status": 301
},
{
"src": "/dashboard-classic/delegation",
- "dest": "/dashboard-classic/delegation.html"
+ "headers": { "Location": "/dashboard/account" },
+ "status": 301
},
{
"src": "/dashboard-classic/tokens",
- "dest": "/dashboard-classic/tokens.html"
+ "headers": { "Location": "/dashboard/tokens" },
+ "status": 301
},
{
"src": "/dashboard-classic/agent-pumpfun",
- "dest": "/dashboard-classic/agent-pumpfun.html"
+ "headers": { "Location": "/dashboard/tokens" },
+ "status": 301
},
{
"src": "/dashboard-classic/x402",
- "dest": "/dashboard-classic/x402.html"
+ "headers": { "Location": "/dashboard/monetize" },
+ "status": 301
},
{
"src": "/dashboard-classic/storage",
- "dest": "/dashboard-classic/storage.html"
+ "headers": { "Location": "/dashboard/settings" },
+ "status": 301
},
{
"src": "/dashboard-classic/usage",
- "dest": "/dashboard-classic/usage.html"
+ "headers": { "Location": "/dashboard/analytics" },
+ "status": 301
},
{
"src": "/dashboard-classic/(.*)",
- "dest": "/dashboard-classic/$1"
+ "headers": { "Location": "/dashboard/" },
+ "status": 301
},
{
"src": "/dashboard/?",
@@ -881,7 +912,8 @@
},
{
"src": "/dashboard/portfolio/asset",
- "dest": "/dashboard-classic/portfolio-asset.html"
+ "headers": { "Location": "/dashboard/portfolio" },
+ "status": 301
},
{
"src": "/dashboard/portfolio/?",
@@ -889,43 +921,53 @@
},
{
"src": "/dashboard/wallets",
- "dest": "/dashboard-classic/wallets.html"
+ "headers": { "Location": "/dashboard/account" },
+ "status": 301
},
{
"src": "/dashboard/sessions",
- "dest": "/dashboard-classic/sessions.html"
+ "headers": { "Location": "/dashboard/settings" },
+ "status": 301
},
{
"src": "/dashboard/actions",
- "dest": "/dashboard-classic/actions.html"
+ "headers": { "Location": "/dashboard/account" },
+ "status": 301
},
{
"src": "/dashboard/embed-policy",
- "dest": "/dashboard-classic/embed-policy.html"
+ "headers": { "Location": "/dashboard/api" },
+ "status": 301
},
{
"src": "/dashboard/memory",
- "dest": "/dashboard-classic/memory.html"
+ "headers": { "Location": "/dashboard/agents" },
+ "status": 301
},
{
"src": "/dashboard/strategy",
- "dest": "/dashboard-classic/strategy.html"
+ "headers": { "Location": "/dashboard/library" },
+ "status": 301
},
{
"src": "/dashboard/voice",
- "dest": "/dashboard-classic/voice.html"
+ "headers": { "Location": "/dashboard/settings" },
+ "status": 301
},
{
"src": "/dashboard/sns",
- "dest": "/dashboard-classic/sns.html"
+ "headers": { "Location": "/dashboard/account" },
+ "status": 301
},
{
"src": "/dashboard/delegation",
- "dest": "/dashboard-classic/delegation.html"
+ "headers": { "Location": "/dashboard/account" },
+ "status": 301
},
{
"src": "/dashboard/agent-pumpfun",
- "dest": "/dashboard-classic/agent-pumpfun.html"
+ "headers": { "Location": "/dashboard/tokens" },
+ "status": 301
},
{
"src": "/dashboard/x402",
@@ -1114,14 +1156,14 @@
"src": "/marketplace/agents/([^/]+)",
"status": 301,
"headers": {
- "Location": "/agent-next?id=$1"
+ "Location": "/agents/$1"
}
},
{
"src": "/marketplace/avatars/([^/]+)",
"status": 301,
"headers": {
- "Location": "/agent-next?id=$1"
+ "Location": "/agents/$1"
}
},
{
@@ -1170,7 +1212,8 @@
},
{
"src": "/dashboard/storage",
- "dest": "/dashboard-classic/storage.html"
+ "headers": { "Location": "/dashboard/settings" },
+ "status": 301
},
{
"src": "/api/agents/([^/]+)/embed-policy",
@@ -1610,6 +1653,10 @@
"src": "/api/agent/([^/]+)/og",
"dest": "/api/agent-og?id=$1"
},
+ {
+ "src": "/api/forge/([^/]+)/og",
+ "dest": "/api/forge-og?id=$1"
+ },
{
"src": "/api/avatar/render",
"dest": "/api/avatar/render"
@@ -1661,7 +1708,7 @@
"src": "/avatars/([^/]+)",
"status": 301,
"headers": {
- "Location": "/agent-next?id=$1"
+ "Location": "/agents/$1"
}
},
{
@@ -1757,22 +1804,13 @@
},
{
"src": "/agent/([^/]+)",
- "has": [
- {
- "type": "query",
- "key": "_spa",
- "value": "1"
- }
- ],
- "dest": "/agent-home.html"
- },
- {
- "src": "/agent/([^/]+)",
- "dest": "/api/agent-page?id=$1"
+ "status": 301,
+ "headers": { "Location": "/agents/$1" }
},
{
"src": "/agent",
- "dest": "/agent-home.html"
+ "status": 301,
+ "headers": { "Location": "/agents" }
},
{
"src": "/api/widgets/oembed",
@@ -1878,6 +1916,14 @@
"src": "/docs/(.*)",
"dest": "/docs/$1"
},
+ {
+ "src": "/glossary",
+ "dest": "/glossary.html"
+ },
+ {
+ "src": "/glossary/",
+ "dest": "/glossary.html"
+ },
{
"src": "/tutorials",
"dest": "/tutorials.html"
@@ -1966,14 +2012,6 @@
"src": "/reputation/(.*)",
"dest": "/reputation/$1"
},
- {
- "src": "/deal",
- "dest": "/deal.html"
- },
- {
- "src": "/deal/",
- "dest": "/deal.html"
- },
{
"src": "/pay",
"dest": "/pay/index.html"
@@ -2002,6 +2040,14 @@
"src": "/x402/",
"dest": "/x402-stripe.html"
},
+ {
+ "src": "/community",
+ "dest": "/community.html"
+ },
+ {
+ "src": "/community/",
+ "dest": "/community.html"
+ },
{
"src": "/bazaar",
"dest": "/bazaar.html"
@@ -2088,7 +2134,8 @@
},
{
"src": "/dashboard/usage",
- "dest": "/dashboard-classic/usage.html"
+ "headers": { "Location": "/dashboard/analytics" },
+ "status": 301
},
{
"src": "/api/erc8004/register-confirm",
@@ -2154,6 +2201,17 @@
"src": "/agents/",
"dest": "/agents/index.html"
},
+ {
+ "src": "/agents/([^/]+)",
+ "has": [
+ {
+ "type": "header",
+ "key": "user-agent",
+ "value": "(?i).*(Twitterbot|facebookexternalhit|Slackbot|LinkedInBot|Discordbot|TelegramBot|WhatsApp|Googlebot|bingbot|Applebot|Pinterestbot|redditbot|Embedly|Quora|outbrain|vkShare|Iframely).*"
+ }
+ ],
+ "dest": "/api/agent-detail-og?id=$1"
+ },
{
"src": "/agents/([^/]+)",
"dest": "/agent-detail.html"
@@ -2510,6 +2568,14 @@
"src": "/extension/terms/?",
"dest": "/extension-terms.html"
},
+ {
+ "src": "/what-is",
+ "dest": "/what-is.html"
+ },
+ {
+ "src": "/what-is/",
+ "dest": "/what-is.html"
+ },
{
"src": "/features",
"dest": "/features.html"
@@ -2519,16 +2585,77 @@
"dest": "/features.html"
},
{
- "src": "/",
- "dest": "/home.html"
+ "src": "/features/forge",
+ "dest": "/features/forge.html"
+ },
+ {
+ "src": "/features/forge/",
+ "dest": "/features/forge.html"
+ },
+ {
+ "src": "/features/scan",
+ "dest": "/features/scan.html"
+ },
+ {
+ "src": "/features/scan/",
+ "dest": "/features/scan.html"
+ },
+ {
+ "src": "/features/play",
+ "dest": "/features/play.html"
},
{
- "src": "/home-v2",
- "dest": "/home-v2.html"
+ "src": "/features/play/",
+ "dest": "/features/play.html"
},
{
- "src": "/home-v2/",
- "dest": "/home-v2.html"
+ "src": "/features/walk",
+ "dest": "/features/walk.html"
+ },
+ {
+ "src": "/features/walk/",
+ "dest": "/features/walk.html"
+ },
+ {
+ "src": "/features/studio",
+ "dest": "/features/studio.html"
+ },
+ {
+ "src": "/features/studio/",
+ "dest": "/features/studio.html"
+ },
+ {
+ "src": "/features/marketplace",
+ "dest": "/features/marketplace.html"
+ },
+ {
+ "src": "/features/marketplace/",
+ "dest": "/features/marketplace.html"
+ },
+ {
+ "src": "/features/agent-exchange",
+ "dest": "/features/agent-exchange.html"
+ },
+ {
+ "src": "/features/agent-exchange/",
+ "dest": "/features/agent-exchange.html"
+ },
+ {
+ "src": "/features/deploy",
+ "dest": "/features/deploy.html"
+ },
+ {
+ "src": "/features/deploy/",
+ "dest": "/features/deploy.html"
+ },
+ {
+ "src": "/",
+ "dest": "/home.html"
+ },
+ {
+ "src": "/home-v2/?",
+ "status": 301,
+ "headers": { "Location": "/" }
},
{
"src": "/home",
@@ -2596,6 +2723,14 @@
},
"dest": "/dist-lib/$1"
},
+ {
+ "src": "/labs",
+ "dest": "/labs.html"
+ },
+ {
+ "src": "/labs/",
+ "dest": "/labs.html"
+ },
{
"src": "/fact-checker",
"dest": "/fact-checker.html"
@@ -2622,11 +2757,11 @@
},
{
"src": "/paywall",
- "dest": "/public/paywall.html"
+ "dest": "/paywall.html"
},
{
"src": "/paywall/",
- "dest": "/public/paywall.html"
+ "dest": "/paywall.html"
},
{
"src": "/api/x402/fact-check",
diff --git a/vite.config.js b/vite.config.js
index 83d65e981..d8b4bba58 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -200,7 +200,7 @@ const appConfig = {
// large bundles (Three.js, ethers) without affecting the output.
reportCompressedSize: false,
rollupOptions: {
- external: ['/studio/launch-panel.js', '/studio/fees-panel.js', './fees-panel.js', /^@pump-fun\/agent-payments-sdk(\/.*)?$/],
+ external: ['/studio/launch-panel.js', '/studio/fees-panel.js', './fees-panel.js', '/crypto-optional.js', /^@pump-fun\/agent-payments-sdk(\/.*)?$/],
output: {
manualChunks(id) {
if (id.includes('node_modules/three/')) {
@@ -215,21 +215,31 @@ const appConfig = {
// scripts can load them by a predictable URL without knowing the
// build hash: footer.js → /footer-bot.js, nav.js → /walk-companion.js.
entryFileNames: (chunk) =>
- chunk.name === 'footer-bot' || chunk.name === 'walk-companion'
+ chunk.name === 'footer-bot' || chunk.name === 'walk-companion' || chunk.name === 'notifications'
? `${chunk.name}.js`
: 'assets/[name]-[hash].js',
},
input: {
'footer-bot': resolve(__dirname, 'src/footer-bot.js'),
'walk-companion': resolve(__dirname, 'src/walk-companion.js'),
+ 'notifications': resolve(__dirname, 'src/notifications.js'),
app: resolve(__dirname, 'pages/app.html'),
'app-demo': resolve(__dirname, 'pages/app-demo.html'),
'app-next': resolve(__dirname, 'pages/app-next.html'),
home: resolve(__dirname, 'pages/home.html'),
- 'home-v2': resolve(__dirname, 'pages/home-v2.html'),
+ 'what-is': resolve(__dirname, 'pages/what-is.html'),
features: resolve(__dirname, 'pages/features.html'),
+ 'features-forge': resolve(__dirname, 'pages/features/forge.html'),
+ 'features-scan': resolve(__dirname, 'pages/features/scan.html'),
+ 'features-play': resolve(__dirname, 'pages/features/play.html'),
+ 'features-walk': resolve(__dirname, 'pages/features/walk.html'),
+ 'features-studio': resolve(__dirname, 'pages/features/studio.html'),
+ 'features-marketplace': resolve(__dirname, 'pages/features/marketplace.html'),
+ 'features-agent-exchange': resolve(__dirname, 'pages/features/agent-exchange.html'),
+ 'features-deploy': resolve(__dirname, 'pages/features/deploy.html'),
tutorials: resolve(__dirname, 'pages/tutorials.html'),
tutorial: resolve(__dirname, 'pages/tutorial.html'),
+ glossary: resolve(__dirname, 'pages/glossary.html'),
playground: resolve(__dirname, 'pages/playground.html'),
coin3d: resolve(__dirname, 'pages/coin3d.html'),
constellation: resolve(__dirname, 'pages/constellation.html'),
@@ -246,9 +256,13 @@ const appConfig = {
'avatar-studio': resolve(__dirname, 'pages/avatar-studio.html'),
'create-review': resolve(__dirname, 'pages/create-review.html'),
'import-rpm': resolve(__dirname, 'pages/import-rpm.html'),
- 'agent-home': resolve(__dirname, 'pages/agent-home.html'),
marketplace: resolve(__dirname, 'pages/marketplace.html'),
'agent-edit': resolve(__dirname, 'pages/agent-edit.html'),
+ 'avatar-edit': resolve(__dirname, 'pages/avatar-edit.html'),
+ 'create-video': resolve(__dirname, 'pages/create/video.html'),
+ 'extension-privacy': resolve(__dirname, 'pages/extension-privacy.html'),
+ 'extension-terms': resolve(__dirname, 'pages/extension-terms.html'),
+ 'embed-walk': resolve(__dirname, 'pages/embed-walk.html'),
'agent-embed': resolve(__dirname, 'pages/agent-embed.html'),
'agent-detail': resolve(__dirname, 'pages/agent-detail.html'),
'avatar-embed': resolve(__dirname, 'pages/avatar-embed.html'),
@@ -263,6 +277,7 @@ const appConfig = {
'a-embed': resolve(__dirname, 'pages/a-embed.html'),
'a-edit': resolve(__dirname, 'pages/a-edit.html'),
'a-me': resolve(__dirname, 'pages/a-me.html'),
+ labs: resolve(__dirname, 'pages/labs.html'),
'fact-checker': resolve(__dirname, 'pages/fact-checker.html'),
unstoppable: resolve(__dirname, 'pages/unstoppable.html'),
shopper: resolve(__dirname, 'pages/shopper.html'),
@@ -284,11 +299,6 @@ const appConfig = {
creating: resolve(__dirname, 'pages/creating.html'),
pricing: resolve(__dirname, 'pages/pricing.html'),
'x-pricing': resolve(__dirname, 'pages/x-pricing.html'),
- 'home-classic': resolve(__dirname, 'pages/home-classic.html'),
- 'home-v3': resolve(__dirname, 'pages/home-v3.html'),
- 'home-v4': resolve(__dirname, 'pages/home-v4.html'),
- 'agent-next': resolve(__dirname, 'pages/agent-next.html'),
- 'discover-next': resolve(__dirname, 'pages/discover-next.html'),
'avatar-studio-demo': resolve(__dirname, 'pages/avatar-studio-demo.html'),
'gallery-picker': resolve(__dirname, 'pages/gallery-picker.html'),
xr: resolve(__dirname, 'pages/xr.html'),
@@ -485,6 +495,16 @@ const appConfig = {
'/create': resolve(root, 'pages/create.html'),
'/create/selfie': resolve(root, 'pages/create-selfie.html'),
'/create/selfie/': resolve(root, 'pages/create-selfie.html'),
+ '/create/video': resolve(root, 'pages/create/video.html'),
+ '/create/video/': resolve(root, 'pages/create/video.html'),
+ '/extension/privacy': resolve(root, 'pages/extension-privacy.html'),
+ '/extension/privacy/': resolve(root, 'pages/extension-privacy.html'),
+ '/extension/terms': resolve(root, 'pages/extension-terms.html'),
+ '/extension/terms/': resolve(root, 'pages/extension-terms.html'),
+ '/embed/walk': resolve(root, 'pages/embed-walk.html'),
+ '/embed/walk/': resolve(root, 'pages/embed-walk.html'),
+ '/paywall': resolve(root, 'public/paywall.html'),
+ '/paywall/': resolve(root, 'public/paywall.html'),
'/scan': resolve(root, 'pages/scan.html'),
'/scan/': resolve(root, 'pages/scan.html'),
'/worlds': resolve(root, 'pages/worlds.html'),
@@ -497,8 +517,8 @@ const appConfig = {
'/import/rpm/': resolve(root, 'pages/import-rpm.html'),
'/dashboard': resolve(root, 'pages/dashboard-next/index.html'),
'/dashboard/': resolve(root, 'pages/dashboard-next/index.html'),
- '/dashboard-classic': resolve(root, 'public/dashboard-classic/index.html'),
- '/dashboard-classic/': resolve(root, 'public/dashboard-classic/index.html'),
+ '/dashboard-classic': null,
+ '/dashboard-classic/': null,
'/dashboard-next': resolve(root, 'pages/dashboard-next/index.html'),
'/dashboard-next/': resolve(root, 'pages/dashboard-next/index.html'),
'/dashboard/avatars': resolve(root, 'pages/dashboard-next/avatars.html'),
@@ -544,6 +564,8 @@ const appConfig = {
// END:DISCOVER_ROUTE
'/tutorials': resolve(root, 'pages/tutorials.html'),
'/tutorials/': resolve(root, 'pages/tutorials.html'),
+ '/glossary': resolve(root, 'pages/glossary.html'),
+ '/glossary/': resolve(root, 'pages/glossary.html'),
'/pump-live': resolve(root, 'pages/pump-live.html'),
'/pump-live/': resolve(root, 'pages/pump-live.html'),
'/pump-dashboard': resolve(root, 'pages/pump-dashboard.html'),
@@ -637,22 +659,17 @@ const appConfig = {
'/demo/coin/': resolve(root, 'public/demo/coin/index.html'),
'/': resolve(root, 'pages/home.html'),
'/home': resolve(root, 'pages/home.html'),
- '/home-v2': resolve(root, 'pages/home-v2.html'),
- '/home-v2/': resolve(root, 'pages/home-v2.html'),
- '/home-classic': resolve(root, 'pages/home-classic.html'),
- '/home-classic/': resolve(root, 'pages/home-classic.html'),
- '/home-v3': resolve(root, 'pages/home-v3.html'),
- '/home-v3/': resolve(root, 'pages/home-v3.html'),
- '/home-v4': resolve(root, 'pages/home-v4.html'),
- '/home-v4/': resolve(root, 'pages/home-v4.html'),
+ '/what-is': resolve(root, 'pages/what-is.html'),
+ '/what-is/': resolve(root, 'pages/what-is.html'),
'/features': resolve(root, 'pages/features.html'),
'/features/': resolve(root, 'pages/features.html'),
- '/agent': resolve(root, 'pages/agent-home.html'),
'/agent/new': resolve(root, 'pages/agent-edit.html'),
'/docs': resolve(root, 'docs/index.html'),
'/docs/': resolve(root, 'docs/index.html'),
'/bazaar': resolve(root, 'public/bazaar.html'),
'/bazaar/': resolve(root, 'public/bazaar.html'),
+ '/labs': resolve(root, 'pages/labs.html'),
+ '/labs/': resolve(root, 'pages/labs.html'),
'/forever': resolve(root, 'public/forever.html'),
'/forever/': resolve(root, 'public/forever.html'),
'/arbitrage': resolve(root, 'public/arbitrage.html'),
@@ -693,6 +710,14 @@ const appConfig = {
res.setHeader('Location', path + '/' + (req.url.slice(path.length) || ''));
return res.end();
}
+ // Legacy homepage variants (home-v2/v3/v4, classic, next) were
+ // reconciled into the single canonical pages/home.html. One front
+ // door: 301 every old variant URL to /. Mirrors vercel.json.
+ if (/^\/home-(v2|v3|v4|classic|next)\/?$/.test(path)) {
+ res.statusCode = 301;
+ res.setHeader('Location', '/');
+ return res.end();
+ }
// /explore is an alias for /discover — share the same JS bundle
if (path === '/explore' || path === '/explore/') {
res.statusCode = 301;
@@ -727,6 +752,32 @@ const appConfig = {
res.setHeader('Location', '/chat/');
return res.end();
}
+ // /dashboard-classic/* → canonical /dashboard/* (mirrors vercel.json 301s)
+ if (path === '/dashboard-classic' || path.startsWith('/dashboard-classic/')) {
+ const classicSlugMap = {
+ 'portfolio/asset': '/dashboard/portfolio',
+ portfolio: '/dashboard/portfolio',
+ wallets: '/dashboard/account',
+ sessions: '/dashboard/settings',
+ actions: '/dashboard/account',
+ 'embed-policy': '/dashboard/api',
+ memory: '/dashboard/agents',
+ strategy: '/dashboard/library',
+ voice: '/dashboard/settings',
+ sns: '/dashboard/account',
+ delegation: '/dashboard/account',
+ tokens: '/dashboard/tokens',
+ 'agent-pumpfun': '/dashboard/tokens',
+ x402: '/dashboard/monetize',
+ storage: '/dashboard/settings',
+ usage: '/dashboard/analytics',
+ };
+ const slug = path.replace(/^\/dashboard-classic\/?/, '').replace(/\/$/, '');
+ const dest = classicSlugMap[slug] || '/dashboard/';
+ res.statusCode = 301;
+ res.setHeader('Location', dest);
+ return res.end();
+ }
let filePath = fileMap[path];
// /blog/<slug> → resolves to blog/<slug>.html on disk
if (!filePath && /^\/blog\/[a-z0-9-]+\/?$/.test(path)) {
@@ -774,7 +825,7 @@ const appConfig = {
else if (!filePath && /^\/agent\/[^/]+\/embed$/.test(path))
filePath = resolve(root, 'pages/agent-embed.html');
else if (!filePath && /^\/agent\/[^/]+$/.test(path))
- filePath = resolve(root, 'pages/agent-home.html');
+ filePath = resolve(root, 'pages/agent-detail.html');
else if (!filePath && /^\/character\/[^/]+\/?$/.test(path))
filePath = resolve(root, 'public/character.html');
else if (!filePath && (path === '/characters' || path === '/characters/'))
@@ -789,6 +840,9 @@ const appConfig = {
// /embed/avatar/:handle → portable avatar embed by handle
else if (!filePath && /^\/embed\/avatar(\/[a-z0-9_-]{3,30})?\/?$/i.test(path))
filePath = resolve(root, 'pages/avatar-embed.html');
+ // /avatars/:id/edit → avatar customize page (mirrors vercel.json rewrite)
+ else if (!filePath && /^\/avatars\/[^/.]+\/edit\/?$/.test(path))
+ filePath = resolve(root, 'pages/avatar-edit.html');
// /avatars/:id → avatar studio page (mirrors vercel.json rewrite)
else if (!filePath && /^\/avatars\/[^/.]+\/?$/.test(path))
filePath = resolve(root, 'pages/avatar-page.html');
@@ -817,18 +871,6 @@ const appConfig = {
filePath = resolve(root, 'pages/dashboard-next/index.html');
else if (!filePath && /^\/dashboard\/edit\/[^/]+\/?$/.test(path))
filePath = resolve(root, 'pages/dashboard-next/index.html');
- // /dashboard-classic/<tab> → public/dashboard-classic/index.html (classic SPA)
- else if (
- !filePath &&
- /^\/dashboard-classic\/(?:agents|avatars|create|upload|animations|widgets|embed|keys|mcp|monetization|payments|subscriptions|billing|revenue|withdrawals|earnings|account|portfolio|wallets|sessions|actions|embed-policy|agent-pumpfun|usage|storage|memory|strategy|voice|sns|delegation|tokens)\/?$/.test(
- path,
- )
- )
- filePath = resolve(root, 'public/dashboard-classic/index.html');
- else if (!filePath && /^\/dashboard-classic\/edit\/[^/]+\/?$/.test(path))
- filePath = resolve(root, 'public/dashboard-classic/index.html');
- else if (!filePath && /^\/dashboard-classic\/portfolio\/asset\/?$/.test(path))
- filePath = resolve(root, 'public/dashboard-classic/portfolio-asset.html');
// /dashboard-next/<slug> → pages/dashboard-next/<slug>.html
// Mirrors vercel.json so the dev server resolves the sub-pages
// landed by parallel agents without each one having to touch
@@ -844,12 +886,12 @@ const appConfig = {
const candidate = resolve(root, `pages/dashboard-next/${slug}.html`);
if (existsSync(candidate)) filePath = candidate;
}
- // /dashboard-classic/<page> → corresponding static HTML page (classic pages)
- else if (!filePath && /^\/dashboard-classic\/portfolio\/asset\/?$/.test(path))
- filePath = resolve(root, 'public/dashboard-classic/portfolio-asset.html');
- else if (!filePath && /^\/dashboard-classic\/(?:portfolio|wallets|sessions|actions|embed-policy|agent-pumpfun|usage|storage|memory|strategy|voice|sns|delegation|tokens)\/?$/.test(path)) {
- const slug = path.replace(/^\/dashboard-classic\//, '').replace(/\/$/, '');
- filePath = resolve(root, `public/dashboard-classic/${slug}.html`);
+ // /features/<slug> → pages/features/<slug>.html
+ // Mirrors vercel.json so per-feature SEO landing pages work in dev.
+ else if (!filePath && /^\/features\/[a-z0-9][a-z0-9-]*\/?$/.test(path)) {
+ const slug = path.replace(/^\/features\//, '').replace(/\/$/, '');
+ const candidate = resolve(root, `pages/features/${slug}.html`);
+ if (existsSync(candidate)) filePath = candidate;
}
// Generic fallback: /<slug> or /<slug>.html → pages/<slug>.html
// Catches the long tail of bundled root-level pages (community,
@@ -871,6 +913,11 @@ const appConfig = {
req.url = '/src/walk-companion.js';
return next();
}
+ // /notifications.js — nav.js loads this module for the per-user inbox.
+ if (path === '/notifications.js') {
+ req.url = '/src/notifications.js';
+ return next();
+ }
// Avatar Studio (rebranded Character Studio fork) — serve the
// production build out of character-studio/build/ at /avatar-studio/*
// so the demo iframe works in dev. Run `npm run build --prefix
@@ -1274,7 +1321,7 @@ const appConfig = {
name: 'My Agents',
short_name: 'My Agents',
description: 'Manage your AI agents',
- url: '/agent-home?source=pwa-shortcut',
+ url: '/agents?source=pwa-shortcut',
icons: [{ src: 'pwa-192x192.png', sizes: '192x192' }],
},
],