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.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat: add admin launcher control panel with API integration and dynamic configuration
nirholas80349c03297d
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 0504a3ea5..41154fe3b 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -14,15 +14,18 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **60 live x402 payments per minute** — A new per-minute cron fires 60 parallel real Solana USDC micropayments each tick via the x402 protocol, seeding the platform's payment activity feed and club stage with continuous on-chain traffic. Each payment is a signed SPL TransferChecked transaction broadcast via the Solana facilitator — not simulated. Configure the batch size or pause it with X402_SEED_BATCH_SIZE / X402_SEED_ENABLED. (`/pay`) `[infra, feature]`- **Alibaba Cloud partnership — Qwen models and alibaba-cloud-mcp** — three.ws joins the Alibaba Cloud Partner Network. Qwen-Max, Qwen-Plus, Qwen-Turbo, and Qwen-Long are now available as agent brain options via DashScope. Ships with @three-ws/alibaba-cloud-mcp — a new MCP server for chat, embeddings, and model discovery using your own Alibaba Cloud API key. Set DASHSCOPE_API_KEY in Vercel to activate. (`/blog/three-ws-alibaba-cloud-partnership`) `[feature]`- **Capabilities dashboard — live command center for all 4 autonomous features** — New /dashboard/capabilities page surfaces live status for Alpha Hunt, Coin Launcher, Auto-Claim, and Market Maker in one view. KPI strips show daily budget, total volume, claimable fees, and net P&L per capability. Tabbed tables show launched coins, schedule status, per-market inventory bars, and recent MM trades. Alpha Hunt trigger is now also configurable directly from the Sniper Strategies dashboard — full field set including min smart-money count, quality score, organic score, max market cap, and narrative keywords. (`/dashboard/capabilities`) `[feature, improvement]`+- **Fixed /play getting stuck on "too many requests"** — Opening /play could dead-end on a "Something went wrong — too many requests" screen, especially from a shared network or after a couple of reloads. The wallet sign-in step was sharing the same strict rate limit as login and trading, so a small burst of page loads exhausted it. Sign-in now has its own generous limit sized for a busy world, and if that check ever can't be reached, /play opens anyway instead of blocking — the game server still verifies token-gated worlds on entry. (`/play`) `[fix]`- **Hardened Redis credentials against dashboard paste errors** — A trailing newline or stray space on the Upstash Redis token — the kind that creeps in when pasting into a dashboard — was being sent verbatim in the auth header and rejected as WRONGPASS, while the URL still resolved. The result was thousands of failures an hour: paid endpoints denying, the payments feed not loading, usage telemetry and caches going dark. Redis credentials are now trimmed at the source (matching how wallet addresses, RPC URLs, and certificates are already sanitized), so a single stray character can never silently take the limiter, feed, and caches offline. `[fix, infra]`- **Improved resilience during database outages** — API endpoints now return HTTP 503 (Service Unavailable) with a Retry-After header instead of 500 when the database is temporarily unreachable, so clients and caches know to back off and retry rather than treating it as a permanent error. Background crons skip their tick gracefully and log a warning instead of firing repeated alert storms. A single deduped ops alert now covers the whole outage. `[fix, infra]`- **Live Agents mission control + one-click session launcher** — New /agents-live page shows a real-time grid of every AI agent with an active screen stream — watch their screens and avatar feeds live, all in one view. Agent owners now get a "Start Live Session" panel on any watch view: click Generate credentials, copy the Docker or Node launch command, run it anywhere, and the agent browser session starts streaming to the screen canvas instantly. Sessions are signed 7-day bearer tokens, no extra setup required. (`/agents-live`) `[feature]`- **Manage your AWS Marketplace API key — new keys & usage page** — AWS Marketplace subscribers (and anyone with an x402 subscription key) now have a home for it at /billing/keys. See every key with its billing source — AWS Marketplace or on-chain — live status, rate limit, total calls, and when it was last used. Rotate a key to get a fresh secret in one click (AWS-billed keys stay linked to your AWS account and keep metering correctly), or revoke a native key outright. The post-subscribe welcome flow now points here, so a lost key is always recoverable by rotating instead of being stuck. (`/billing/keys`) `[feature]`+- **Money Pulse now tracks real marketplace demand** — The Pulse page gained a Marketplace viability panel — the honest economic signal behind the headline counters. It surfaces real $THREE skill purchases as their own thing: GMV over 24h and 7 days, average ticket, the repeat-buyer rate, the number of unique buyer→seller pairs, the platform take-rate earned, plus a 7-day GMV sparkline, the top skills the market is actually paying for, and the top-earning sellers. Until now these real, value-delivering purchases were invisible on Pulse while the agent-to-agent x402 settlement counter took the spotlight; now you can see whether agents paying each other for skills is a real, recurring market. Every figure is a confirmed on-chain purchase — never synthetic. (`/pulse`) `[feature, improvement]`- **Money Pulse redesign — monochrome, with far more live data** — The live activity page at /pulse got a full pass. It's now proper monochrome to match the rest of the site — the violet accent and green/amber feed colors give way to a single clean ink ramp. And it carries a lot more real signal: 24h on-chain volume (SOL + USD), distinct active wallets, and split counters for trades, snipes, and agent-to-agent payments, plus a 7-day activity sparkline, the day's single biggest tip, and a fresh-launches feed alongside the existing top-earners and busiest-wallets boards. Every number is a real on-chain or launch record — never synthetic. (`/pulse`) `[improvement, feature]`- **Partner ecosystem page** — New /partners page showing all active technology partnerships — AWS, IBM, Google Cloud, Alibaba Cloud, Intel, NVIDIA, Microsoft, and Oracle — with what each powers on the platform, tier badges, and links to partner-specific pages and MCP servers. (`/partners`) `[feature]`- **Production stability fixes — payment sessions, Redis error handling, infra resilience** — Fixed a SQL syntax error that blocked payment session expiry and refunds (PostgreSQL does not allow LIMIT directly in UPDATE — now uses a CTE with FOR UPDATE SKIP LOCKED). Fixed esbuild class-name minification breaking NeonDB error detection in production — infrastructure errors (wrong DB credentials, Redis auth) now correctly return 503 and suppress alert storms instead of crashing every endpoint with 500. Added graceful Redis-unavailable handling to the usage flush buffer and the bounty board API. Fixed Express-style response methods in pulse-tick cron. `[fix, infra]`- **Sign-in restored during rate-limiter outages** — Fixed an issue where a temporary outage of the distributed rate limiter could block every sign-in attempt platform-wide. The login and registration limiters now degrade gracefully to a local per-instance cap during such an outage — keeping sign-in available while still throttling brute-force attempts — instead of denying everyone. Money-moving limits are unchanged and still fail safe. `[fix, security]`- **Task input on Agent Screen — send your agent a task and watch it work** — You can now type any task directly into the Agent Screen page and your agent picks it up in real time. The live screen panel has a new command bar at the bottom: type what you want your agent to do (research, browse, shop, monitor, trade) and hit send. The task is queued via /api/agent-task and the running worker executes it with Stagehand, streaming every browser action back to the live screen as it happens. The worker automatically checks for new tasks every 3 seconds and runs them in priority order, falling back to its autonomous loop when the queue is empty. (`/agent-screen`) `[feature, improvement]`+- **The launcher now reads Know Your Meme** — The autonomous coin launcher gained a new culture feed: Know Your Meme. It reads the freshly-confirmed meme entries and the live meme newsfeed, fuses them with the platform's on-chain signals, and rides the strongest wave when an agent coins its next launch — so new launches track the memes actually entering culture right now, not stale themes. As always, only the cultural THEME is mined; names and tickers are invented fresh, never copied, and every coin stays avatar-fronted and $THREE-aligned. `[feature, improvement]`- **Top Performers podium on marketplace — oracle-ranked agent leaderboard** — The marketplace now surfaces the top 3 oracle-performing agents in trophy-style cards above the agent grid. Each card shows oracle win rate, W/L record, and realized PnL. Rank 1 gets gold, rank 2 silver, rank 3 bronze. Cards shimmer while loading and disappear cleanly when no oracle data exists. Links directly to each agent's profile. (`/marketplace`) `[feature, improvement]`## 2026-06-26diff --git a/api/_lib/rate-limit.js b/api/_lib/rate-limit.jsindex 501f240d7..561f3c28d 100644--- a/api/_lib/rate-limit.js+++ b/api/_lib/rate-limit.js@@ -583,6 +583,17 @@ export const limits = {// a screenshot in Redis, so cap the burst per IP to keep that bounded; reads use// the generic publicIp bucket.buildPublishIp: (ip) => getLimiter('build:publish:ip', { limit: 10, window: '10 m' }).limit(ip),+ // /play sign-in nonce (GET /api/play/nonce). Hit on every /play page load — and+ // again on each sign-in attempt — to read the gate config + mint a self-verifying+ // HMAC nonce. It has NO side effects and NO cost (no RPC, no DB), so it must NOT+ // borrow the strict credential `authIp` bucket (30/10m, shared with login/register/+ // trading): a shared office/NAT, a burst of players, or a couple of reloads would+ // exhaust that and 429 the gate on what is almost always an open game. The real+ // abuse surface is /verify (ed25519 signature + RPC balance read), which keeps+ // `authIp`. local: a per-instance flood guard is all this needs — like publicIp /+ // tokenPriceIp — and it spends zero Redis commands on a high-traffic page-load path.+ playNonceIp: (ip) =>+ getLimiter('play:nonce:ip', { limit: 120, window: '1 m', local: true }).limit(ip),// Browser Solana JSON-RPC proxy (api/solana-rpc). Forwards to the keyed// upstream (Helius), so cap per-IP burst to keep the studio launch panel// responsive while preventing anonymous quota drain, plus a global hourlydiff --git a/api/play/nonce.js b/api/play/nonce.jsindex 13c6dee45..2737c15b4 100644--- a/api/play/nonce.js+++ b/api/play/nonce.js@@ -14,7 +14,7 @@ export default wrap(async (req, res) => {if (!method(req, res, ['GET'])) return;res.setHeader('cache-control', 'no-store');- const rl = await limits.authIp(clientIp(req));+ const rl = await limits.playNonceIp(clientIp(req));if (!rl.success) return rateLimited(res, rl);const { nonce, exp } = issueNonce();diff --git a/api/pulse.js b/api/pulse.jsindex 05836cd72..8ac2e5464 100644--- a/api/pulse.js+++ b/api/pulse.js@@ -21,6 +21,7 @@// GET /api/pulse?since=<cursor> — delta poll: only events newer than cursor// GET /api/pulse?agent_id=<id> — one agent's public "wallet story"// GET /api/pulse?view=stats — aggregate money intelligence+// GET /api/pulse?view=marketplace — marketplace commerce viability metrics// GET /api/pulse?view=agent-summary&agent_id=<id> — one wallet's lifetime summary//// Filters: type=all|tips|launches|trades|payments, network=mainnet|devnet.@@ -32,12 +33,22 @@ import { isUuid } from './_lib/validate.js';import { publicUrl as r2PublicUrl } from './_lib/r2.js';import { explorerTxUrl, explorerAccountUrl } from './_lib/avatar-wallet.js';import { cacheGet, cacheSet } from './_lib/cache.js';+import { marketplaceFeeBps } from './_lib/marketplace-platform-fee.js';// The custody categories that are safe to surface publicly. Everything else// (withdraw, vanity_swap, limit_change, key_recover) is owner-private and is// excluded by the WHERE clauses below — never add those here.const PUBLIC_SPEND_CATEGORIES = ['trade', 'snipe', 'x402'];+// $THREE is the only coin the marketplace prices in. Real skill purchases settle+// in $THREE (6 decimals), so marketplace GMV is denominated here. A purchase is+// "paid" only when status='confirmed' and it's not a free trial.+const THREE_MINT = process.env.THREE_TOKEN_MINT || 'FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump';+const THREE_DECIMALS = 6;+const MARKET_PAID_KINDS = ['purchase', 'time_pass'];+// atomic $THREE → whole-token float (keeps the fractional part Number-division gives).+const threeFromAtomic = (atomic) => Number(atomic || 0) / 10 ** THREE_DECIMALS;+// type= query param → the set of `kind`s it admits.const TYPE_KINDS = {all: ['tip', 'trade', 'snipe', 'payment', 'launch'],@@ -326,6 +337,23 @@ async function handleStats(network) {AND ce.created_at > now() - interval '24 hours'`;+ // 24h marketplace demand — REAL skill purchases settled in $THREE. This is the+ // honest viability signal: value is delivered AND the platform earns a take-rate,+ // unlike the x402 counter which only measures agent-to-agent settlement plumbing.+ // Sourced from skill_purchases (the same table /marketplace confirms against).+ const [mkt24] = await sql`+ SELECT+ COUNT(*) FILTER (WHERE sp.status = 'confirmed' AND sp.kind = ANY(${MARKET_PAID_KINDS}))::int AS purchases,+ COUNT(*) FILTER (WHERE sp.kind = 'trial')::int AS trials,+ COALESCE(SUM(sp.amount) FILTER (WHERE sp.status = 'confirmed'), 0)::text AS gmv_atomic,+ COUNT(DISTINCT sp.user_id) FILTER (WHERE sp.status = 'confirmed')::int AS buyers,+ COUNT(DISTINCT sp.agent_id) FILTER (WHERE sp.status = 'confirmed')::int AS sellers+ FROM skill_purchases sp+ JOIN agent_identities ai ON ai.id = sp.agent_id AND ${pubAgent}+ WHERE sp.currency_mint = ${THREE_MINT} AND sp.chain = 'solana'+ AND sp.created_at > now() - interval '24 hours'+ `;+// The single biggest tip of the last 24h — the day's headline moment.const [bigTip] = await sql`SELECT ai.id AS agent_id, ai.name AS agent_name,@@ -423,6 +451,15 @@ async function handleStats(network) {trades_only_24h: trades,snipes_24h: snipes,payments_24h: payments,+ // Real marketplace demand — paid skill purchases settled in $THREE. The honest+ // counterpart to payments_24h: every unit here delivered value and earned a fee.+ marketplace_24h: {+ purchases: Number(mkt24?.purchases || 0),+ trials: Number(mkt24?.trials || 0),+ gmv_three: threeFromAtomic(mkt24?.gmv_atomic),+ buyers: Number(mkt24?.buyers || 0),+ sellers: Number(mkt24?.sellers || 0),+ },active_wallets_24h: Number(tempo24?.active_wallets || 0),volume_24h: {sol: Number(tempo24?.lamports || 0) / 1e9,@@ -507,6 +544,163 @@ async function handleAgentSummary(network, agentId) {};}+// ── marketplace viability dashboard ────────────────────────────────────────────+// The numbers that actually answer "is agent-to-agent commerce viable?" — not raw+// payment count (vanity) but GMV, repeat-buyer rate, unique trading pairs, average+// ticket and the platform take-rate. All sourced from real, confirmed skill_purchases+// rows (each backed by an on-chain $THREE transfer), gated to public seller agents.+async function handleMarketplace(network) {+ const pubAgent = sql`ai.deleted_at IS NULL AND ai.is_public = true+ AND COALESCE((ai.meta->>'pulse_opt_out')::boolean, false) = false`;+ const feeBps = marketplaceFeeBps();++ // One windowed aggregate, reused for 24h and 7d so both cards read identically.+ const windowAgg = async (interval) => {+ const [r] = await sql`+ SELECT+ COUNT(*) FILTER (WHERE sp.status = 'confirmed' AND sp.kind = ANY(${MARKET_PAID_KINDS}))::int AS purchases,+ COUNT(*) FILTER (WHERE sp.kind = 'trial')::int AS trials,+ COALESCE(SUM(sp.amount) FILTER (WHERE sp.status = 'confirmed'), 0)::text AS gmv_atomic,+ COUNT(DISTINCT sp.user_id) FILTER (WHERE sp.status = 'confirmed')::int AS buyers,+ COUNT(DISTINCT sp.agent_id) FILTER (WHERE sp.status = 'confirmed')::int AS sellers,+ COUNT(DISTINCT (sp.user_id, sp.agent_id)) FILTER (WHERE sp.status = 'confirmed')::int AS pairs+ FROM skill_purchases sp+ JOIN agent_identities ai ON ai.id = sp.agent_id AND ${pubAgent}+ WHERE sp.currency_mint = ${THREE_MINT} AND sp.chain = 'solana'+ AND sp.created_at > now() - ${interval}::interval+ `;+ const purchases = Number(r?.purchases || 0);+ const gmv = threeFromAtomic(r?.gmv_atomic);+ return {+ purchases,+ trials: Number(r?.trials || 0),+ gmv_three: gmv,+ buyers: Number(r?.buyers || 0),+ sellers: Number(r?.sellers || 0),+ pairs: Number(r?.pairs || 0),+ avg_ticket_three: purchases > 0 ? gmv / purchases : 0,+ take_rate_three: feeBps > 0 ? (gmv * feeBps) / 10_000 : 0,+ };+ };++ // Repeat-buyer rate (7d): the single strongest viability signal — do buyers come+ // back, or is every purchase a one-off? Counts buyers with ≥2 paid purchases.+ const repeatPromise = sql`+ WITH b AS (+ SELECT sp.user_id, COUNT(*) AS n+ FROM skill_purchases sp+ JOIN agent_identities ai ON ai.id = sp.agent_id AND ${pubAgent}+ WHERE sp.currency_mint = ${THREE_MINT} AND sp.chain = 'solana'+ AND sp.status = 'confirmed' AND sp.kind = ANY(${MARKET_PAID_KINDS})+ AND sp.created_at > now() - interval '7 days'+ GROUP BY sp.user_id+ )+ SELECT COUNT(*)::int AS buyers, COUNT(*) FILTER (WHERE n >= 2)::int AS repeat_buyers FROM b+ `;++ // Top skills by 7d GMV — what is the market actually paying for?+ const topSkillsPromise = sql`+ SELECT sp.skill,+ COUNT(*)::int AS purchases,+ COALESCE(SUM(sp.amount), 0)::text AS gmv_atomic,+ COUNT(DISTINCT sp.user_id)::int AS buyers+ FROM skill_purchases sp+ JOIN agent_identities ai ON ai.id = sp.agent_id AND ${pubAgent}+ WHERE sp.currency_mint = ${THREE_MINT} AND sp.chain = 'solana'+ AND sp.status = 'confirmed' AND sp.kind = ANY(${MARKET_PAID_KINDS})+ AND sp.created_at > now() - interval '7 days'+ GROUP BY sp.skill+ ORDER BY SUM(sp.amount) DESC NULLS LAST+ LIMIT 6+ `;++ // Top sellers by 7d earnings — the supply side that's actually clearing.+ const topSellersPromise = sql`+ SELECT ai.id AS agent_id, ai.name AS agent_name,+ av.thumbnail_key AS thumb_key, av.visibility AS avatar_vis,+ ai.meta->>'solana_address' AS agent_addr,+ COUNT(*)::int AS sales, COALESCE(SUM(sp.amount), 0)::text AS gmv_atomic+ FROM skill_purchases sp+ JOIN agent_identities ai ON ai.id = sp.agent_id AND ${pubAgent}+ LEFT JOIN avatars av ON av.id = ai.avatar_id AND av.deleted_at IS NULL+ WHERE sp.currency_mint = ${THREE_MINT} AND sp.chain = 'solana'+ AND sp.status = 'confirmed' AND sp.kind = ANY(${MARKET_PAID_KINDS})+ AND sp.created_at > now() - interval '7 days'+ GROUP BY ai.id, ai.name, av.thumbnail_key, av.visibility, ai.meta->>'solana_address'+ ORDER BY SUM(sp.amount) DESC NULLS LAST+ LIMIT 6+ `;++ // 7-day GMV + purchase sparkline, zero-filled per UTC day.+ const seriesPromise = sql`+ WITH days AS (+ SELECT generate_series(+ date_trunc('day', now()) - interval '6 days',+ date_trunc('day', now()),+ interval '1 day'+ ) AS day+ ),+ ev AS (+ SELECT date_trunc('day', sp.created_at) AS day,+ COUNT(*) FILTER (WHERE sp.status = 'confirmed' AND sp.kind = ANY(${MARKET_PAID_KINDS}))::int AS purchases,+ COALESCE(SUM(sp.amount) FILTER (WHERE sp.status = 'confirmed'), 0)::text AS gmv_atomic+ FROM skill_purchases sp+ JOIN agent_identities ai ON ai.id = sp.agent_id AND ${pubAgent}+ WHERE sp.currency_mint = ${THREE_MINT} AND sp.chain = 'solana'+ AND sp.created_at > date_trunc('day', now()) - interval '6 days'+ GROUP BY 1+ )+ SELECT to_char(days.day, 'Dy') AS label, to_char(days.day, 'YYYY-MM-DD') AS day,+ COALESCE(ev.purchases, 0) AS purchases, COALESCE(ev.gmv_atomic, '0') AS gmv_atomic+ FROM days LEFT JOIN ev ON ev.day = days.day+ ORDER BY days.day+ `;++ const [d24, d7, [repeat], topSkills, topSellers, series] = await Promise.all([+ windowAgg('24 hours'),+ windowAgg('7 days'),+ repeatPromise,+ topSkillsPromise,+ topSellersPromise,+ seriesPromise,+ ]);++ const buyers7 = Number(repeat?.buyers || 0);+ const repeatBuyers7 = Number(repeat?.repeat_buyers || 0);++ return {+ network,+ fee_bps: feeBps,+ fee_pct: feeBps / 100,+ window_24h: d24,+ window_7d: d7,+ repeat_buyer_rate_7d: buyers7 > 0 ? repeatBuyers7 / buyers7 : 0,+ repeat_buyers_7d: repeatBuyers7,+ buyers_7d: buyers7,+ series_7d: series.map((r) => ({+ label: r.label,+ day: r.day,+ purchases: Number(r.purchases || 0),+ gmv_three: threeFromAtomic(r.gmv_atomic),+ })),+ top_skills: topSkills.map((r) => ({+ skill: r.skill,+ purchases: Number(r.purchases || 0),+ buyers: Number(r.buyers || 0),+ gmv_three: threeFromAtomic(r.gmv_atomic),+ })),+ top_sellers: topSellers.map((r) => ({+ id: r.agent_id,+ name: r.agent_name || 'Agent',+ url: `/agent/${r.agent_id}`,+ avatar_thumbnail_url: r2Url(r.thumb_key, r.avatar_vis === 'public' || r.avatar_vis === 'unlisted'),+ solana_address: r.agent_addr || null,+ sales: Number(r.sales || 0),+ gmv_three: threeFromAtomic(r.gmv_atomic),+ })),+ };+}+export default async function handler(req, res) {if (cors(req, res, { methods: 'GET,OPTIONS', origins: '*' })) return;if (!method(req, res, ['GET'])) return;@@ -536,6 +730,17 @@ export default async function handler(req, res) {return json(res, 200, { data: body });}+ if (view === 'marketplace') {+ const cacheKey = `pulse:marketplace:${network}`;+ let body = await cacheGet(cacheKey);+ if (body === null) {+ body = await handleMarketplace(network);+ await cacheSet(cacheKey, body, STATS_TTL_S);+ }+ res.setHeader('cache-control', 'public, max-age=20');+ return json(res, 200, { data: body });+ }+if (view === 'agent-summary') {if (!agentId) return error(res, 400, 'validation_error', 'agent_id is required for agent-summary');const body = await handleAgentSummary(network, agentId);diff --git a/data/changelog.json b/data/changelog.jsonindex 05436aea6..dc8094c5f 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,26 @@{"$comment": "Curated changelog entries for three.ws — the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.","entries": [+ {+ "date": "2026-06-27",+ "title": "Money Pulse now tracks real marketplace demand",+ "summary": "The Pulse page gained a Marketplace viability panel — the honest economic signal behind the headline counters. It surfaces real $THREE skill purchases as their own thing: GMV over 24h and 7 days, average ticket, the repeat-buyer rate, the number of unique buyer→seller pairs, the platform take-rate earned, plus a 7-day GMV sparkline, the top skills the market is actually paying for, and the top-earning sellers. Until now these real, value-delivering purchases were invisible on Pulse while the agent-to-agent x402 settlement counter took the spotlight; now you can see whether agents paying each other for skills is a real, recurring market. Every figure is a confirmed on-chain purchase — never synthetic.",+ "tags": ["feature", "improvement"],+ "link": "/pulse"+ },+ {+ "date": "2026-06-27",+ "title": "Fixed /play getting stuck on \"too many requests\"",+ "summary": "Opening /play could dead-end on a \"Something went wrong — too many requests\" screen, especially from a shared network or after a couple of reloads. The wallet sign-in step was sharing the same strict rate limit as login and trading, so a small burst of page loads exhausted it. Sign-in now has its own generous limit sized for a busy world, and if that check ever can't be reached, /play opens anyway instead of blocking — the game server still verifies token-gated worlds on entry.",+ "tags": ["fix"],+ "link": "/play"+ },+ {+ "date": "2026-06-27",+ "title": "The launcher now reads Know Your Meme",+ "summary": "The autonomous coin launcher gained a new culture feed: Know Your Meme. It reads the freshly-confirmed meme entries and the live meme newsfeed, fuses them with the platform's on-chain signals, and rides the strongest wave when an agent coins its next launch — so new launches track the memes actually entering culture right now, not stale themes. As always, only the cultural THEME is mined; names and tickers are invented fresh, never copied, and every coin stays avatar-fronted and $THREE-aligned.",+ "tags": ["feature", "improvement"]+ },{"date": "2026-06-27","title": "Money Pulse redesign — monochrome, with far more live data",diff --git a/pages/admin/launcher.html b/pages/admin/launcher.htmlnew file mode 100644index 000000000..79c700f58--- /dev/null+++ b/pages/admin/launcher.html@@ -0,0 +1,196 @@+<!doctype html>+<html lang="en">+ <head>+ <script>/* three.ws theme boot — no-flash */(function(){document.documentElement.classList.add('js');try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />+ <meta name="robots" content="noindex, nofollow" />+ <title>Memetic Launcher · Control · three.ws</title>+ <meta name="description" content="Admin control panel for the autonomous coin launcher." />+ <link rel="stylesheet" href="/nav.css" />+ <link rel="stylesheet" href="/src/admin-launcher.css" />+ </head>+ <body>+ <header><div id="nav-container"></div></header>+ <script src="/nav.js"></script>++ <main class="ml-shell" id="ml-root" aria-busy="true">+ <!-- Auth gate -->+ <section class="ml-gate" id="ml-gate" hidden>+ <div class="ml-gate-card">+ <div class="ml-gate-mark" aria-hidden="true">◎</div>+ <h1 class="ml-gate-title">Memetic Launcher</h1>+ <p class="ml-gate-sub">Admin control. Enter the operator secret to continue.</p>+ <form id="ml-gate-form" autocomplete="off">+ <input+ type="password"+ id="ml-secret"+ class="ml-input"+ placeholder="CRON_SECRET"+ aria-label="Operator secret"+ autocomplete="current-password"+ />+ <button type="submit" class="ml-btn ml-btn-primary ml-gate-btn">Unlock</button>+ <p class="ml-gate-err" id="ml-gate-err" role="alert" aria-live="assertive"></p>+ </form>+ </div>+ </section>++ <!-- Control panel -->+ <div id="ml-panel" hidden>+ <!-- Hero / status -->+ <header class="ml-hero">+ <div class="ml-hero-l">+ <p class="ml-kicker"><span class="ml-dot" id="ml-status-dot"></span> Autonomous coin launcher</p>+ <h1 class="ml-title">Memetic <em>Launcher</em></h1>+ <p class="ml-sub" id="ml-status-line">Loading state…</p>+ </div>+ <div class="ml-hero-r">+ <div class="ml-master">+ <span class="ml-master-lbl">Master wallet</span>+ <span class="ml-master-val" id="ml-master-bal">—</span>+ </div>+ <button class="ml-btn ml-armswitch" id="ml-armswitch" aria-pressed="false">+ <span class="ml-armswitch-track"><span class="ml-armswitch-knob"></span></span>+ <span class="ml-armswitch-lbl" id="ml-armswitch-lbl">Disabled</span>+ </button>+ </div>+ </header>++ <!-- Breaker banner -->+ <div class="ml-breaker" id="ml-breaker" hidden role="alert">+ <span class="ml-breaker-ico" aria-hidden="true">⚠</span>+ <span class="ml-breaker-txt" id="ml-breaker-txt">Circuit breaker tripped.</span>+ <button class="ml-btn ml-btn-ghost" id="ml-resume">Resume</button>+ </div>++ <!-- Stat cards -->+ <dl class="ml-stats" id="ml-stats">+ <div class="ml-stat ml-stat--lead"><dt>Launched today</dt><dd id="ml-s-launched">—</dd></div>+ <div class="ml-stat"><dt>Dry runs</dt><dd id="ml-s-dry">—</dd></div>+ <div class="ml-stat"><dt>SOL spent</dt><dd id="ml-s-spent">—</dd></div>+ <div class="ml-stat"><dt>SOL left today</dt><dd id="ml-s-left">—</dd></div>+ <div class="ml-stat"><dt>Queue agents</dt><dd id="ml-s-queue">—</dd></div>+ <div class="ml-stat"><dt>Failed / skipped</dt><dd id="ml-s-fail">—</dd></div>+ </dl>++ <div class="ml-grid">+ <!-- Config -->+ <form class="ml-config" id="ml-config" aria-label="Launcher configuration">+ <section class="ml-card">+ <h2 class="ml-card-h">Mode</h2>+ <p class="ml-card-help">What the launcher coins each tick.</p>+ <div class="ml-modes" id="ml-modes" role="radiogroup" aria-label="Launch mode"></div>+ </section>++ <section class="ml-card" id="ml-sources-card">+ <h2 class="ml-card-h">Trend sources</h2>+ <p class="ml-card-help">Culture mined to ride live narratives. Themes only — never clones a ticker.</p>+ <div class="ml-chips" id="ml-sources"></div>+ </section>++ <section class="ml-card">+ <h2 class="ml-card-h">Cadence & rate</h2>+ <div class="ml-fields">+ <label class="ml-field">+ <span class="ml-field-lbl">Target cadence <em>seconds</em></span>+ <input type="number" min="5" max="86400" step="1" id="ml-cadence" class="ml-input" />+ <span class="ml-field-hint" id="ml-cadence-hint"></span>+ </label>+ <label class="ml-field">+ <span class="ml-field-lbl">Max / hour <em>hard ceiling</em></span>+ <input type="number" min="0" max="100000" step="1" id="ml-maxhour" class="ml-input" />+ </label>+ </div>+ </section>++ <section class="ml-card">+ <h2 class="ml-card-h">Economics</h2>+ <div class="ml-fields">+ <label class="ml-field">+ <span class="ml-field-lbl">Per launch <em>SOL</em></span>+ <input type="number" min="0" max="50" step="0.001" id="ml-perlaunch" class="ml-input" />+ </label>+ <label class="ml-field">+ <span class="ml-field-lbl">Dev buy <em>SOL</em></span>+ <input type="number" min="0" max="50" step="0.001" id="ml-devbuy" class="ml-input" />+ </label>+ <label class="ml-field">+ <span class="ml-field-lbl">Daily cap <em>SOL</em></span>+ <input type="number" min="0" max="100000" step="0.01" id="ml-dailycap" class="ml-input" />+ </label>+ <label class="ml-field">+ <span class="ml-field-lbl">$THREE buyback <em>%</em></span>+ <input type="number" min="0" max="100" step="0.5" id="ml-buyback" class="ml-input" />+ <span class="ml-field-hint" id="ml-buyback-hint"></span>+ </label>+ </div>+ </section>++ <section class="ml-card">+ <h2 class="ml-card-h">Safety</h2>+ <div class="ml-toggles">+ <label class="ml-switch">+ <input type="checkbox" id="ml-dryrun" />+ <span class="ml-switch-ui" aria-hidden="true"></span>+ <span class="ml-switch-txt">+ <strong>Dry run</strong>+ <small>Choose a coin + agent, record it, move no SOL. Turn off to go live.</small>+ </span>+ </label>+ <div class="ml-net">+ <span class="ml-net-lbl">Network</span>+ <div class="ml-seg" id="ml-network" role="radiogroup" aria-label="Network">+ <button type="button" class="ml-seg-btn" data-net="mainnet" role="radio">Mainnet</button>+ <button type="button" class="ml-seg-btn" data-net="devnet" role="radio">Devnet</button>+ </div>+ </div>+ </div>+ </section>+ </form>++ <!-- Live console -->+ <section class="ml-console" aria-label="Live launch console">+ <div class="ml-console-h">+ <h2 class="ml-card-h">Live console</h2>+ <span class="ml-console-meta" id="ml-console-meta">—</span>+ </div>+ <ol class="ml-runs" id="ml-runs"></ol>+ <div class="ml-runs-empty" id="ml-runs-empty" hidden>+ <p>No launches yet. Arm the launcher to see live activity here.</p>+ </div>+ </section>+ </div>+ </div>+ </main>++ <!-- Sticky save bar -->+ <div class="ml-savebar" id="ml-savebar" hidden role="region" aria-label="Unsaved changes">+ <span class="ml-savebar-txt" id="ml-savebar-txt">Unsaved changes</span>+ <div class="ml-savebar-actions">+ <button class="ml-btn ml-btn-ghost" id="ml-discard">Discard</button>+ <button class="ml-btn ml-btn-primary" id="ml-save">Save changes</button>+ </div>+ </div>++ <!-- Arm confirmation modal -->+ <div class="ml-modal" id="ml-modal" hidden role="dialog" aria-modal="true" aria-labelledby="ml-modal-title">+ <div class="ml-modal-card">+ <h2 class="ml-modal-title" id="ml-modal-title">Arm the live firehose?</h2>+ <p class="ml-modal-body" id="ml-modal-body"></p>+ <label class="ml-modal-confirm">+ <span>Type <strong>ARM</strong> to confirm</span>+ <input type="text" id="ml-modal-input" class="ml-input" autocomplete="off" spellcheck="false" />+ </label>+ <div class="ml-modal-actions">+ <button class="ml-btn ml-btn-ghost" id="ml-modal-cancel">Cancel</button>+ <button class="ml-btn ml-btn-danger" id="ml-modal-go" disabled>Arm & go live</button>+ </div>+ </div>+ </div>++ <div class="ml-toast" id="ml-toast" hidden aria-live="polite"></div>++ <script type="module" src="/src/admin-launcher.js"></script>+ </body>+</html>diff --git a/pages/deployments.html b/pages/deployments.htmlindex 77e0e6302..930ab7cf0 100644--- a/pages/deployments.html+++ b/pages/deployments.html@@ -17,7 +17,7 @@property="og:description"content="A live, cross-chain stream of every agent registered on the ERC-8004 Identity Registry — the moment each registration lands on-chain."/>- <meta property="og:image" content="https://three.ws/api/page-og?s=crypto&t=On-chain+Deployments&d=A+live%2C+cross-chain+feed+of+every+agent+registered+on+the+ERC-8004+Identity+Registry+%E2%80%94+the+moment+each+registration+lands+on-chain.&p=%2Fdeployments" />+ <meta property="og:image" content="https://three.ws/api/page-og?s=crypto&t=On-chain+Deployments&d=A+live%2C+cross-chain+feed+of+every+agent+registered+on+the+ERC-8004+Identity+Registry+%E2%80%94+the+moment+each+registration+lands+on-chain.+Real+on-chain+registrations+&p=%2Fdeployments" /><meta property="og:image:width" content="1200" /><meta property="og:image:height" content="630" /><meta name="twitter:card" content="summary_large_image" />@@ -27,7 +27,7 @@name="twitter:description"content="A live, cross-chain stream of every agent registered on the ERC-8004 Identity Registry — the moment it lands on-chain."/>- <meta name="twitter:image" content="https://three.ws/api/page-og?s=crypto&t=On-chain+Deployments&d=A+live%2C+cross-chain+feed+of+every+agent+registered+on+the+ERC-8004+Identity+Registry+%E2%80%94+the+moment+each+registration+lands+on-chain.&p=%2Fdeployments" />+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=crypto&t=On-chain+Deployments&d=A+live%2C+cross-chain+feed+of+every+agent+registered+on+the+ERC-8004+Identity+Registry+%E2%80%94+the+moment+each+registration+lands+on-chain.+Real+on-chain+registrations+&p=%2Fdeployments" /><meta name="theme-color" content="#0a0a0a" /><link rel="icon" href="/favicon.ico" sizes="any" /><link rel="icon" type="image/svg+xml" href="/favicon.svg" />diff --git a/pages/payments.html b/pages/payments.htmlindex 9d0fb2e2d..35d595d6f 100644--- a/pages/payments.html+++ b/pages/payments.html@@ -255,6 +255,8 @@<meta name="twitter:description" content="Create budget-limited payment sessions for AI agents. Governance-enforced spend limits, URL allowlists, and expiry — agents pay x402 APIs without holding a private key."><meta name="twitter:image" content="https://three.ws/api/page-og?s=account&t=Agent+Payment+Sessions&d=Create+budget-limited+payment+sessions+for+AI+agents.+Governance-enforced+spend+limits%2C+URL+allowlists%2C+and+expiry+%E2%80%94+agents+pay+x402+APIs+without+holding+a+priv&p=%2Fpayments"><script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Agent Payment Sessions","description":"Create budget-limited payment sessions for AI agents. Governance-enforced spend limits, URL allowlists, and expiry — agents pay x402 APIs without holding a private key.","url":"https://three.ws/payments","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=account&t=Agent+Payment+Sessions&d=Create+budget-limited+payment+sessions+for+AI+agents.+Governance-enforced+spend+limits%2C+URL+allowlists%2C+and+expiry+%E2%80%94+agents+pay+x402+APIs+without+holding+a+priv&p=%2Fpayments"}]}</script>++ <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1"></head><body><a href="#main-content" class="h-skip-link">Skip to main content</a>diff --git a/pages/pulse.html b/pages/pulse.htmlindex c08c7ba87..7366f0c0e 100644--- a/pages/pulse.html+++ b/pages/pulse.html@@ -86,7 +86,12 @@<div class="px-counter"><dt>Payments · 24h</dt><dd id="px-c-pays">—</dd>- <span class="px-counter-sub">agent → agent</span>+ <span class="px-counter-sub">agent → agent x402</span>+ </div>+ <div class="px-counter">+ <dt>Marketplace · 24h</dt>+ <dd id="px-c-market">—</dd>+ <span class="px-counter-sub" id="px-c-market-sub">paid skill buys</span></div><div class="px-counter"><dt>Active wallets · 24h</dt>@@ -103,6 +108,37 @@<div class="px-spark-bars" id="px-spark-bars" role="img" aria-label="Daily activity, last 7 days"></div></section>+ <section class="px-market" id="px-market" aria-label="Marketplace viability" hidden>+ <div class="px-market-h">+ <div class="px-market-htxt">+ <span class="px-market-title">Marketplace viability</span>+ <span class="px-market-tag" id="px-mkt-fee">—</span>+ </div>+ <span class="px-market-sub">Real $THREE skill purchases — value delivered, take-rate earned. The honest signal behind the payments counter.</span>+ </div>+ <div class="px-market-kpis">+ <div class="px-kpi"><dt>GMV · 24h</dt><dd id="px-mkt-gmv24">—</dd><span class="px-kpi-sub" id="px-mkt-gmv24-sub">$THREE</span></div>+ <div class="px-kpi"><dt>GMV · 7d</dt><dd id="px-mkt-gmv7">—</dd><span class="px-kpi-sub" id="px-mkt-gmv7-sub">$THREE</span></div>+ <div class="px-kpi"><dt>Avg ticket</dt><dd id="px-mkt-ticket">—</dd><span class="px-kpi-sub">per purchase · 7d</span></div>+ <div class="px-kpi"><dt>Repeat buyers</dt><dd id="px-mkt-repeat">—</dd><span class="px-kpi-sub" id="px-mkt-repeat-sub">of buyers · 7d</span></div>+ <div class="px-kpi"><dt>Trading pairs</dt><dd id="px-mkt-pairs">—</dd><span class="px-kpi-sub">unique buyer→seller · 7d</span></div>+ <div class="px-kpi"><dt>Take-rate · 7d</dt><dd id="px-mkt-take">—</dd><span class="px-kpi-sub" id="px-mkt-take-sub">platform fee</span></div>+ </div>+ <div class="px-market-body">+ <div class="px-market-spark">+ <div class="px-spark-h">+ <span class="px-spark-title">GMV · last 7 days</span>+ <span class="px-spark-total" id="px-mkt-spark-total">—</span>+ </div>+ <div class="px-spark-bars" id="px-mkt-spark" role="img" aria-label="Daily marketplace GMV, last 7 days"></div>+ </div>+ <div class="px-market-skills">+ <div class="px-card-h">Top skills <small>GMV · 7d</small></div>+ <div id="px-mkt-skills"><p class="px-lb-empty">Loading…</p></div>+ </div>+ </div>+ </section>+<div class="px-grid"><div class="px-main"><h2 class="px-section-h">Live feed</h2>@@ -121,6 +157,10 @@<div class="px-card-h">Busiest wallets <small>events · 24h</small></div><div id="px-busiest"><p class="px-lb-empty">Loading…</p></div></section>+ <section class="px-card" id="px-sellers-card" hidden>+ <div class="px-card-h">Top sellers <small>earnings · 7d</small></div>+ <div id="px-sellers"><p class="px-lb-empty">Loading…</p></div>+ </section><section class="px-card"><div class="px-card-h">Fresh launches <small>newest coins</small></div><div id="px-launches"><p class="px-lb-empty">Loading…</p></div>diff --git a/public/changelog.json b/public/changelog.jsonindex 0e1bc5e04..bbd82b81f 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-27T10:03:23.024Z",+ "generated_at": "2026-06-27T10:26:19.972Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -88,6 +88,16 @@"improvement"]},+ {+ "date": "2026-06-27",+ "type": "update",+ "title": "Fixed /play getting stuck on \"too many requests\"",+ "summary": "Opening /play could dead-end on a \"Something went wrong — too many requests\" screen, especially from a shared network or after a couple of reloads. The wallet sign-in step was sharing the same strict rate limit as login and trading, so a small burst of page loads exhausted it. Sign-in now has its own generous limit sized for a busy world, and if that check ever can't be reached, /play opens anyway instead of blocking — the game server still verifies token-gated worlds on entry.",+ "link": "/play",+ "tags": [+ "fix"+ ]+ },{"date": "2026-06-27","type": "update",@@ -130,6 +140,17 @@"feature"]},+ {+ "date": "2026-06-27",+ "type": "update",+ "title": "Money Pulse now tracks real marketplace demand",+ "summary": "The Pulse page gained a Marketplace viability panel — the honest economic signal behind the headline counters. It surfaces real $THREE skill purchases as their own thing: GMV over 24h and 7 days, average ticket, the repeat-buyer rate, the number of unique buyer→seller pairs, the platform take-rate earned, plus a 7-day GMV sparkline, the top skills the market is actually paying for, and the top-earning sellers. Until now these real, value-delivering purchases were invisible on Pulse while the agent-to-agent x402 settlement counter took the spotlight; now you can see whether agents paying each other for skills is a real, recurring market. Every figure is a confirmed on-chain purchase — never synthetic.",+ "link": "/pulse",+ "tags": [+ "feature",+ "improvement"+ ]+ },{"date": "2026-06-27","type": "update",@@ -184,6 +205,17 @@"improvement"]},+ {+ "date": "2026-06-27",+ "type": "update",+ "title": "The launcher now reads Know Your Meme",+ "summary": "The autonomous coin launcher gained a new culture feed: Know Your Meme. It reads the freshly-confirmed meme entries and the live meme newsfeed, fuses them with the platform's on-chain signals, and rides the strongest wave when an agent coins its next launch — so new launches track the memes actually entering culture right now, not stale themes. As always, only the cultural THEME is mined; names and tickers are invented fresh, never copied, and every coin stays avatar-fronted and $THREE-aligned.",+ "link": null,+ "tags": [+ "feature",+ "improvement"+ ]+ },{"date": "2026-06-27","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex 3aa861c99..1a92991fd 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -70,6 +70,14 @@<category>feature</category><description>New /dashboard/capabilities page surfaces live status for Alpha Hunt, Coin Launcher, Auto-Claim, and Market Maker in one view. KPI strips show daily budget, total volume, claimable fees, and net P&L per capability. Tabbed tables show launched coins, schedule status, per-market inventory bars, and recent MM trades. Alpha Hunt trigger is now also configurable directly from the Sniper Strategies dashboard — full field set including min smart-money count, quality score, organic score, max market cap, and narrative keywords.</description></item>+ <item>+ <title>Fixed /play getting stuck on "too many requests"</title>+ <link>https://three.ws/play</link>+ <guid isPermaLink="false">2026-06-27:Fixed /play getting stuck on "too many requests"</guid>+ <pubDate>Sat, 27 Jun 2026 12:00:00 GMT</pubDate>+ <category>fix</category>+ <description>Opening /play could dead-end on a "Something went wrong — too many requests" screen, especially from a shared network or after a couple of reloads. The wallet sign-in step was sharing the same strict rate limit as login and trading, so a small burst of page loads exhausted it. Sign-in now has its own generous limit sized for a busy world, and if that check ever can't be reached, /play opens anyway instead of blocking — the game server still verifies token-gated worlds on entry.</description>+ </item><item><title>Hardened Redis credentials against dashboard paste errors</title><link>https://three.ws/changelog</link>@@ -102,6 +110,14 @@<category>feature</category><description>AWS Marketplace subscribers (and anyone with an x402 subscription key) now have a home for it at /billing/keys. See every key with its billing source — AWS Marketplace or on-chain — live status, rate limit, total calls, and when it was last used. Rotate a key to get a fresh secret in one click (AWS-billed keys stay linked to your AWS account and keep metering correctly), or revoke a native key outright. The post-subscribe welcome flow now points here, so a lost key is always recoverable by rotating instead of being stuck.</description></item>+ <item>+ <title>Money Pulse now tracks real marketplace demand</title>+ <link>https://three.ws/pulse</link>+ <guid isPermaLink="false">2026-06-27:Money Pulse now tracks real marketplace demand</guid>+ <pubDate>Sat, 27 Jun 2026 12:00:00 GMT</pubDate>+ <category>feature</category>+ <description>The Pulse page gained a Marketplace viability panel — the honest economic signal behind the headline counters. It surfaces real $THREE skill purchases as their own thing: GMV over 24h and 7 days, average ticket, the repeat-buyer rate, the number of unique buyer→seller pairs, the platform take-rate earned, plus a 7-day GMV sparkline, the top skills the market is actually paying for, and the top-earning sellers. Until now these real, value-delivering purchases were invisible on Pulse while the agent-to-agent x402 settlement counter took the spotlight; now you can see whether agents paying each other for skills is a real, recurring market. Every figure is a confirmed on-chain purchase — never synthetic.</description>+ </item><item><title>Money Pulse redesign — monochrome, with far more live data</title><link>https://three.ws/pulse</link>@@ -142,6 +158,14 @@<category>feature</category><description>You can now type any task directly into the Agent Screen page and your agent picks it up in real time. The live screen panel has a new command bar at the bottom: type what you want your agent to do (research, browse, shop, monitor, trade) and hit send. The task is queued via /api/agent-task and the running worker executes it with Stagehand, streaming every browser action back to the live screen as it happens. The worker automatically checks for new tasks every 3 seconds and runs them in priority order, falling back to its autonomous loop when the queue is empty.</description></item>+ <item>+ <title>The launcher now reads Know Your Meme</title>+ <link>https://three.ws/changelog</link>+ <guid isPermaLink="false">2026-06-27:The launcher now reads Know Your Meme</guid>+ <pubDate>Sat, 27 Jun 2026 12:00:00 GMT</pubDate>+ <category>feature</category>+ <description>The autonomous coin launcher gained a new culture feed: Know Your Meme. It reads the freshly-confirmed meme entries and the live meme newsfeed, fuses them with the platform's on-chain signals, and rides the strongest wave when an agent coins its next launch — so new launches track the memes actually entering culture right now, not stale themes. As always, only the cultural THEME is mined; names and tickers are invented fresh, never copied, and every coin stays avatar-fronted and $THREE-aligned.</description>+ </item><item><title>Top Performers podium on marketplace — oracle-ranked agent leaderboard</title><link>https://three.ws/marketplace</link>diff --git a/public/features.json b/public/features.jsonindex 7dd07a83b..3277eaa72 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-27T10:03:23.003Z",+ "generated_at": "2026-06-27T10:26:19.957Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",diff --git a/src/admin-launcher.css b/src/admin-launcher.cssnew file mode 100644index 000000000..6f68de42e--- /dev/null+++ b/src/admin-launcher.css@@ -0,0 +1,221 @@+/* /admin/launcher — Memetic Launcher control panel.+ Monochrome on near-black, the white --ink / --accent ramp only (matches /pulse+ and /deployments so the admin surfaces feel like one product). Every state —+ gate, loading, empty, armed, paused — is designed. */++.ml-shell {+ max-width: 1180px;+ margin: 0 auto;+ padding: var(--space-xl, 40px) var(--space-md, 16px) 120px;+}++/* ── shared atoms ─────────────────────────────────────────────────────────── */+.ml-input {+ appearance: none;+ width: 100%;+ font: inherit;+ font-size: var(--text-sm, 0.85rem);+ color: var(--ink-bright, #fff);+ background: var(--surface-1, rgba(255, 255, 255, 0.03));+ border: 1px solid var(--stroke, rgba(255, 255, 255, 0.1));+ border-radius: var(--radius-md, 10px);+ padding: 10px 12px;+ transition: border-color 0.14s ease, background 0.14s ease;+}+.ml-input:hover { border-color: var(--stroke-strong, rgba(255, 255, 255, 0.16)); }+.ml-input:focus-visible {+ outline: none;+ border-color: var(--ink, #e8e8e8);+ background: var(--surface-2, rgba(255, 255, 255, 0.05));+}++.ml-btn {+ appearance: none;+ font: inherit;+ font-size: var(--text-sm, 0.85rem);+ font-weight: 600;+ cursor: pointer;+ border: 1px solid transparent;+ border-radius: var(--radius-pill, 999px);+ padding: 9px 18px;+ transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease, transform 0.06s ease;+}+.ml-btn:active { transform: translateY(1px); }+.ml-btn:focus-visible { outline: 2px solid var(--accent, #fff); outline-offset: 2px; }+.ml-btn-primary { background: var(--ink-bright, #fff); color: #000; }+.ml-btn-primary:hover { background: var(--ink, #e8e8e8); }+.ml-btn-ghost { background: transparent; color: var(--ink, #e8e8e8); border-color: var(--stroke-strong, rgba(255, 255, 255, 0.16)); }+.ml-btn-ghost:hover { background: var(--surface-2, rgba(255, 255, 255, 0.05)); }+.ml-btn-danger { background: var(--ink-bright, #fff); color: #000; }+.ml-btn-danger:hover { background: #fff; }+.ml-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }++/* ── auth gate ────────────────────────────────────────────────────────────── */+.ml-gate { display: grid; place-items: center; min-height: 60vh; }+.ml-gate-card {+ width: min(420px, 100%);+ text-align: center;+ background: var(--surface-1, rgba(255, 255, 255, 0.03));+ border: 1px solid var(--stroke, rgba(255, 255, 255, 0.08));+ border-radius: var(--radius-lg, 16px);+ padding: var(--space-2xl, 48px) var(--space-xl, 36px);+}+.ml-gate-mark { font-size: 2.4rem; color: var(--ink-bright, #fff); margin-bottom: var(--space-sm, 12px); }+.ml-gate-title { font-family: var(--font-display, sans-serif); font-size: 1.6rem; font-weight: 700; margin: 0 0 6px; color: var(--ink-bright, #fff); }+.ml-gate-sub { margin: 0 0 var(--space-lg, 24px); color: var(--ink-dim, #999); font-size: var(--text-sm, 0.85rem); }+.ml-gate-btn { width: 100%; margin-top: var(--space-sm, 12px); padding: 11px; }+.ml-gate-err { margin: var(--space-sm, 12px) 0 0; min-height: 1.1em; color: var(--ink, #e8e8e8); font-size: var(--text-xs, 0.75rem); }++/* ── hero / status ────────────────────────────────────────────────────────── */+.ml-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-lg, 24px); flex-wrap: wrap; margin-bottom: var(--space-xl, 32px); }+.ml-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: var(--text-2xs, 0.68rem); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim, #888); margin: 0 0 10px; }+.ml-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-faint, #555); transition: background 0.2s ease, box-shadow 0.2s ease; }+.ml-dot.is-armed { background: var(--ink-bright, #fff); animation: ml-ping 2s ease infinite; }+.ml-dot.is-dry { background: var(--ink, #bbb); }+.ml-dot.is-paused { background: var(--ink-dim, #888); }+@keyframes ml-ping { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5); } 70% { box-shadow: 0 0 0 9px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }+.ml-title { font-family: var(--font-display, sans-serif); font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; line-height: 1; margin: 0 0 10px; color: var(--ink-dim, #999); letter-spacing: -0.02em; }+.ml-title em { font-style: normal; color: var(--ink-bright, #fff); }+.ml-sub { margin: 0; color: var(--ink-dim, #999); font-size: var(--text-base, 0.95rem); }+.ml-hero-r { display: flex; align-items: center; gap: var(--space-md, 18px); }+.ml-master { text-align: right; }+.ml-master-lbl { display: block; font-size: var(--text-2xs, 0.66rem); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-dim, #888); }+.ml-master-val { font-family: var(--font-mono, monospace); font-size: 1.25rem; font-weight: 700; color: var(--ink-bright, #fff); }++/* arm switch */+.ml-armswitch { display: inline-flex; align-items: center; gap: 10px; background: var(--surface-1, rgba(255, 255, 255, 0.03)); border: 1px solid var(--stroke-strong, rgba(255, 255, 255, 0.16)); border-radius: var(--radius-pill, 999px); padding: 7px 14px 7px 8px; }+.ml-armswitch-track { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--surface-3, rgba(255, 255, 255, 0.12)); transition: background 0.18s ease; flex: none; }+.ml-armswitch-knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink-dim, #999); transition: transform 0.18s ease, background 0.18s ease; }+.ml-armswitch[aria-pressed='true'] .ml-armswitch-track { background: var(--ink-bright, #fff); }+.ml-armswitch[aria-pressed='true'] .ml-armswitch-knob { transform: translateX(16px); background: #000; }+.ml-armswitch-lbl { font-size: var(--text-sm, 0.82rem); font-weight: 600; color: var(--ink, #e8e8e8); }++/* ── breaker ──────────────────────────────────────────────────────────────── */+.ml-breaker { display: flex; align-items: center; gap: 12px; background: var(--surface-2, rgba(255, 255, 255, 0.05)); border: 1px solid var(--stroke-strong, rgba(255, 255, 255, 0.2)); border-radius: var(--radius-md, 12px); padding: 12px 16px; margin-bottom: var(--space-lg, 24px); }+.ml-breaker-ico { font-size: 1.1rem; }+.ml-breaker-txt { flex: 1; font-size: var(--text-sm, 0.85rem); color: var(--ink-bright, #fff); }++/* ── stats ────────────────────────────────────────────────────────────────── */+.ml-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--space-sm, 12px); margin: 0 0 var(--space-xl, 32px); }+.ml-stat { background: var(--surface-1, rgba(255, 255, 255, 0.03)); border: 1px solid var(--stroke, rgba(255, 255, 255, 0.07)); border-radius: var(--radius-lg, 14px); padding: var(--space-md, 16px) var(--space-sm, 12px); min-width: 0; transition: border-color 0.14s ease; }+.ml-stat:hover { border-color: var(--stroke-strong, rgba(255, 255, 255, 0.14)); }+.ml-stat--lead { background: var(--surface-2, rgba(255, 255, 255, 0.05)); border-color: var(--stroke-strong, rgba(255, 255, 255, 0.14)); }+.ml-stat dt { font-size: var(--text-2xs, 0.66rem); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-dim, #888); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }+.ml-stat dd { margin: 0; font-family: var(--font-mono, monospace); font-size: clamp(1.2rem, 2.4vw, 1.7rem); font-weight: 700; color: var(--ink-bright, #fff); line-height: 1; }++/* ── grid ─────────────────────────────────────────────────────────────────── */+.ml-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: var(--space-lg, 24px); align-items: start; }+.ml-config { display: flex; flex-direction: column; gap: var(--space-md, 18px); }+.ml-card { background: var(--surface-1, rgba(255, 255, 255, 0.025)); border: 1px solid var(--stroke, rgba(255, 255, 255, 0.07)); border-radius: var(--radius-lg, 16px); padding: var(--space-lg, 22px); }+.ml-card-h { font-size: var(--text-sm, 0.8rem); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink, #e8e8e8); margin: 0; }+.ml-card-help { margin: 6px 0 var(--space-md, 16px); font-size: var(--text-xs, 0.76rem); color: var(--ink-dim, #888); line-height: 1.45; }++/* mode radio cards */+.ml-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }+.ml-mode { cursor: pointer; }+.ml-mode input { position: absolute; opacity: 0; pointer-events: none; }+.ml-mode-ui { display: block; height: 100%; background: var(--surface-1, rgba(255, 255, 255, 0.03)); border: 1px solid var(--stroke, rgba(255, 255, 255, 0.1)); border-radius: var(--radius-md, 12px); padding: 12px 14px; transition: border-color 0.14s ease, background 0.14s ease; }+.ml-mode:hover .ml-mode-ui { border-color: var(--stroke-strong, rgba(255, 255, 255, 0.18)); }+.ml-mode input:checked + .ml-mode-ui { border-color: var(--ink-bright, #fff); background: var(--surface-3, rgba(255, 255, 255, 0.08)); }+.ml-mode input:focus-visible + .ml-mode-ui { outline: 2px solid var(--accent, #fff); outline-offset: 2px; }+.ml-mode-name { display: block; font-size: var(--text-sm, 0.85rem); font-weight: 600; color: var(--ink-bright, #fff); margin-bottom: 3px; }+.ml-mode-desc { display: block; font-size: var(--text-2xs, 0.7rem); color: var(--ink-dim, #888); line-height: 1.35; }++/* chips */+.ml-chips { display: flex; flex-wrap: wrap; gap: 8px; }+.ml-chip { appearance: none; font: inherit; font-size: var(--text-xs, 0.76rem); font-weight: 500; cursor: pointer; color: var(--ink-dim, #999); background: var(--surface-1, rgba(255, 255, 255, 0.03)); border: 1px solid var(--stroke, rgba(255, 255, 255, 0.1)); border-radius: var(--radius-pill, 999px); padding: 7px 14px; transition: all 0.14s ease; }+.ml-chip:hover { color: var(--ink, #e8e8e8); border-color: var(--stroke-strong, rgba(255, 255, 255, 0.18)); }+.ml-chip[aria-pressed='true'] { color: #000; background: var(--ink-bright, #fff); border-color: var(--ink-bright, #fff); }+.ml-chip:focus-visible { outline: 2px solid var(--accent, #fff); outline-offset: 2px; }++/* fields */+.ml-fields { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md, 16px); }+.ml-field { display: flex; flex-direction: column; gap: 7px; }+.ml-field-lbl { font-size: var(--text-xs, 0.76rem); font-weight: 600; color: var(--ink, #e8e8e8); }+.ml-field-lbl em { font-style: normal; font-weight: 400; color: var(--ink-dim, #888); text-transform: uppercase; font-size: 0.66rem; letter-spacing: 0.06em; }+.ml-field-hint { font-size: var(--text-2xs, 0.68rem); color: var(--ink-faint, #666); min-height: 1em; }++/* toggles / switch */+.ml-toggles { display: flex; flex-direction: column; gap: var(--space-md, 18px); }+.ml-switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }+.ml-switch input { position: absolute; opacity: 0; pointer-events: none; }+.ml-switch-ui { position: relative; flex: none; width: 42px; height: 24px; margin-top: 2px; border-radius: 999px; background: var(--surface-3, rgba(255, 255, 255, 0.12)); transition: background 0.18s ease; }+.ml-switch-ui::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink-dim, #999); transition: transform 0.18s ease, background 0.18s ease; }+.ml-switch input:checked + .ml-switch-ui { background: var(--ink-bright, #fff); }+.ml-switch input:checked + .ml-switch-ui::after { transform: translateX(18px); background: #000; }+.ml-switch input:focus-visible + .ml-switch-ui { outline: 2px solid var(--accent, #fff); outline-offset: 2px; }+.ml-switch-txt strong { display: block; font-size: var(--text-sm, 0.85rem); color: var(--ink-bright, #fff); }+.ml-switch-txt small { display: block; font-size: var(--text-2xs, 0.7rem); color: var(--ink-dim, #888); margin-top: 2px; line-height: 1.4; }++.ml-net { display: flex; align-items: center; justify-content: space-between; gap: 12px; }+.ml-net-lbl { font-size: var(--text-sm, 0.85rem); font-weight: 600; color: var(--ink-bright, #fff); }+.ml-seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-1, rgba(255, 255, 255, 0.03)); border: 1px solid var(--stroke, rgba(255, 255, 255, 0.08)); border-radius: var(--radius-pill, 999px); }+.ml-seg-btn { appearance: none; font: inherit; font-size: var(--text-sm, 0.8rem); font-weight: 500; cursor: pointer; color: var(--ink-dim, #888); background: transparent; border: none; border-radius: var(--radius-pill, 999px); padding: 6px 16px; transition: color 0.14s ease, background 0.14s ease; }+.ml-seg-btn:hover { color: var(--ink, #e8e8e8); }+.ml-seg-btn.active { color: var(--ink-bright, #fff); background: var(--surface-3, rgba(255, 255, 255, 0.08)); }+.ml-seg-btn:focus-visible { outline: 2px solid var(--accent, #fff); outline-offset: 2px; }++/* ── console ──────────────────────────────────────────────────────────────── */+.ml-console { position: sticky; top: var(--space-md, 16px); background: var(--surface-1, rgba(255, 255, 255, 0.025)); border: 1px solid var(--stroke, rgba(255, 255, 255, 0.07)); border-radius: var(--radius-lg, 16px); padding: var(--space-lg, 22px); }+.ml-console-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: var(--space-md, 16px); }+.ml-console-meta { font-family: var(--font-mono, monospace); font-size: var(--text-2xs, 0.68rem); color: var(--ink-faint, #666); }+.ml-runs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 620px; overflow-y: auto; }+.ml-run { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface-1, rgba(255, 255, 255, 0.03)); border: 1px solid var(--stroke, rgba(255, 255, 255, 0.06)); border-radius: var(--radius-md, 10px); animation: ml-in 0.24s ease; }+@keyframes ml-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }+.ml-run-main { min-width: 0; }+.ml-run-name { font-size: var(--text-sm, 0.82rem); font-weight: 600; color: var(--ink-bright, #fff); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }+.ml-run-name a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }+.ml-run-name a:hover { border-color: var(--ink-dim, #888); }+.ml-run-sym { color: var(--ink-dim, #888); font-family: var(--font-mono, monospace); font-weight: 500; }+.ml-run-meta { font-size: var(--text-2xs, 0.68rem); color: var(--ink-dim, #888); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }+.ml-run-meta .ml-kind { text-transform: uppercase; letter-spacing: 0.04em; }+.ml-run-err { color: var(--ink, #ccc); }+.ml-run-r { text-align: right; }+.ml-run-sol { font-family: var(--font-mono, monospace); font-size: var(--text-xs, 0.76rem); color: var(--ink, #e8e8e8); }+.ml-run-time { display: block; font-size: var(--text-2xs, 0.66rem); color: var(--ink-faint, #666); margin-top: 2px; }+.ml-pill { display: inline-block; font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 7px; border-radius: 999px; border: 1px solid var(--stroke-strong, rgba(255, 255, 255, 0.18)); color: var(--ink, #ccc); white-space: nowrap; }+.ml-pill.s-confirmed, .ml-pill.s-launched { background: var(--ink-bright, #fff); color: #000; border-color: var(--ink-bright, #fff); }+.ml-pill.s-dry_run { color: var(--ink-dim, #999); }+.ml-pill.s-failed { border-color: var(--ink, #ccc); color: var(--ink-bright, #fff); }+.ml-pill.s-skipped, .ml-pill.s-pending, .ml-pill.s-funded { color: var(--ink-dim, #888); }+.ml-runs-empty { text-align: center; padding: var(--space-xl, 36px) var(--space-md, 16px); color: var(--ink-dim, #888); font-size: var(--text-sm, 0.85rem); }++/* ── savebar ──────────────────────────────────────────────────────────────── */+.ml-savebar { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 18px; background: var(--surface-3, rgba(20, 20, 20, 0.92)); backdrop-filter: blur(12px); border: 1px solid var(--stroke-strong, rgba(255, 255, 255, 0.2)); border-radius: var(--radius-pill, 999px); padding: 10px 12px 10px 22px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); animation: ml-rise 0.2s ease; }+@keyframes ml-rise { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }+.ml-savebar-txt { font-size: var(--text-sm, 0.82rem); color: var(--ink-bright, #fff); font-weight: 500; }+.ml-savebar-actions { display: flex; gap: 8px; }++/* ── modal ────────────────────────────────────────────────────────────────── */+.ml-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(0, 0, 0, 0.66); backdrop-filter: blur(4px); padding: var(--space-md, 16px); animation: ml-fade 0.16s ease; }+@keyframes ml-fade { from { opacity: 0; } to { opacity: 1; } }+.ml-modal-card { width: min(440px, 100%); background: var(--surface-2, #141414); border: 1px solid var(--stroke-strong, rgba(255, 255, 255, 0.2)); border-radius: var(--radius-lg, 16px); padding: var(--space-xl, 28px); }+.ml-modal-title { margin: 0 0 10px; font-size: 1.2rem; font-weight: 700; color: var(--ink-bright, #fff); }+.ml-modal-body { margin: 0 0 var(--space-lg, 20px); font-size: var(--text-sm, 0.85rem); color: var(--ink-dim, #aaa); line-height: 1.5; }+.ml-modal-confirm { display: flex; flex-direction: column; gap: 8px; font-size: var(--text-sm, 0.82rem); color: var(--ink, #e8e8e8); margin-bottom: var(--space-lg, 20px); }+.ml-modal-actions { display: flex; justify-content: flex-end; gap: 10px; }++/* ── toast ────────────────────────────────────────────────────────────────── */+.ml-toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 70; background: var(--ink-bright, #fff); color: #000; font-size: var(--text-sm, 0.82rem); font-weight: 600; padding: 11px 20px; border-radius: var(--radius-pill, 999px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); animation: ml-rise 0.2s ease; }+.ml-toast.is-err { background: var(--surface-3, #222); color: var(--ink-bright, #fff); border: 1px solid var(--stroke-strong, rgba(255, 255, 255, 0.25)); }++/* ── skeleton / loading ───────────────────────────────────────────────────── */+.ml-skel { color: transparent !important; background: linear-gradient(90deg, var(--surface-1, rgba(255,255,255,0.04)) 25%, var(--surface-3, rgba(255,255,255,0.09)) 50%, var(--surface-1, rgba(255,255,255,0.04)) 75%); background-size: 200% 100%; border-radius: 6px; animation: ml-shimmer 1.3s linear infinite; }+@keyframes ml-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }++/* ── responsive ───────────────────────────────────────────────────────────── */+@media (max-width: 940px) {+ .ml-grid { grid-template-columns: 1fr; }+ .ml-console { position: static; }+ .ml-stats { grid-template-columns: repeat(3, 1fr); }+}+@media (max-width: 560px) {+ .ml-hero { flex-direction: column; align-items: flex-start; }+ .ml-hero-r { width: 100%; justify-content: space-between; }+ .ml-stats { grid-template-columns: repeat(2, 1fr); }+ .ml-fields { grid-template-columns: 1fr; }+}++@media (prefers-reduced-motion: reduce) {+ .ml-dot.is-armed, .ml-run, .ml-savebar, .ml-toast, .ml-modal, .ml-skel { animation: none; }+}diff --git a/src/admin-launcher.js b/src/admin-launcher.jsnew file mode 100644index 000000000..085f5d162--- /dev/null+++ b/src/admin-launcher.js@@ -0,0 +1,438 @@+// /admin/launcher — Memetic Launcher control panel controller.+//+// Talks only to /api/admin/launcher (admin session OR Bearer secret). The secret+// lives in sessionStorage and in memory, sent as `Authorization: Bearer` — never+// in a URL, never logged, cleared on any 401. All API-sourced strings (coin+// names, symbols, errors) are escaped before they touch the DOM.++const API = '/api/admin/launcher';+const SECRET_KEY = 'ml_launcher_secret';+const REFRESH_MS = 5000;++const MODES = [+ { id: 'hybrid', name: 'Hybrid', desc: 'Trend first, meme + random filler to hold cadence.' },+ { id: 'trend', name: 'Trend', desc: 'Only ride live cultural narratives.' },+ { id: 'meme', name: 'Meme', desc: 'LLM coins original memes from culture.' },+ { id: 'random', name: 'Random', desc: 'Wordlist salad. No LLM, pure volume.' },+ { id: 'off', name: 'Off', desc: 'Selected but idle. Launches nothing.' },+];+const SOURCES = [+ { id: 'coin_intel', label: 'Coin intel' },+ { id: 'trending', label: 'Trending' },+ { id: 'knowyourmeme', label: 'Know Your Meme' },+ { id: 'x', label: 'X' },+ { id: 'oracle', label: 'Oracle' },+ { id: 'hackernews', label: 'Hacker News' },+ { id: 'reddit', label: 'Reddit' },+ { id: 'wikipedia', label: 'Wikipedia' },+];+const EDITABLE = [+ 'enabled', 'dry_run', 'mode', 'sources', 'target_cadence_seconds',+ 'max_per_hour', 'per_launch_sol', 'dev_buy_sol', 'daily_sol_cap', 'buyback_bps', 'network',+];++let secret = sessionStorage.getItem(SECRET_KEY) || '';+let loaded = null; // last-saved config (normalized)+let draft = null; // editable working copy+let refreshTimer = null;+let pendingLive = false; // a save is waiting on the arm modal++const $ = (id) => document.getElementById(id);+const esc = (s) =>+ String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));++// ── API ──────────────────────────────────────────────────────────────────────+async function api(method, body) {+ const r = await fetch(API, {+ method,+ headers: { 'content-type': 'application/json', authorization: `Bearer ${secret}` },+ credentials: 'same-origin',+ body: body ? JSON.stringify(body) : undefined,+ });+ if (r.status === 401 || r.status === 403) {+ secret = '';+ sessionStorage.removeItem(SECRET_KEY);+ stopRefresh();+ showGate('Secret rejected. Try again.');+ throw new Error('unauthorized');+ }+ const j = await r.json().catch(() => null);+ if (!r.ok) throw new Error(j?.error_description || j?.error || `HTTP ${r.status}`);+ return j;+}++// ── normalize ─────────────────────────────────────────────────────────────────+function normalize(c) {+ c = c || {};+ const arr = (v) => (Array.isArray(v) ? v : typeof v === 'string' ? safeJson(v, []) : []);+ return {+ enabled: !!c.enabled,+ dry_run: c.dry_run == null ? true : !!c.dry_run,+ paused: !!c.paused,+ pause_reason: c.pause_reason || '',+ mode: c.mode || 'hybrid',+ sources: arr(c.sources),+ target_cadence_seconds: Number(c.target_cadence_seconds ?? 60),+ max_per_hour: Number(c.max_per_hour ?? 30),+ per_launch_sol: Number(c.per_launch_sol ?? 0.03),+ dev_buy_sol: Number(c.dev_buy_sol ?? 0),+ daily_sol_cap: Number(c.daily_sol_cap ?? 1),+ buyback_bps: Number(c.buyback_bps ?? 5000),+ network: c.network || 'mainnet',+ };+}+function safeJson(s, d) { try { return JSON.parse(s); } catch { return d; } }++// ── gate ──────────────────────────────────────────────────────────────────────+function showGate(errMsg) {+ $('ml-panel').hidden = true;+ $('ml-gate').hidden = false;+ $('ml-root').setAttribute('aria-busy', 'false');+ $('ml-gate-err').textContent = errMsg || '';+ $('ml-secret').focus();+}++$('ml-gate-form').addEventListener('submit', async (e) => {+ e.preventDefault();+ const val = $('ml-secret').value.trim();+ if (!val) return;+ secret = val;+ $('ml-gate-err').textContent = '';+ try {+ await load();+ sessionStorage.setItem(SECRET_KEY, secret);+ $('ml-secret').value = '';+ } catch (err) {+ if (err.message !== 'unauthorized') $('ml-gate-err').textContent = err.message;+ }+});++// ── load + render ──────────────────────────────────────────────────────────────+async function load() {+ const state = await api('GET');+ loaded = normalize(state.config);+ draft = { ...loaded };+ $('ml-gate').hidden = true;+ $('ml-panel').hidden = false;+ $('ml-root').setAttribute('aria-busy', 'false');+ buildStaticControls();+ renderForm();+ renderState(state);+ updateDirty();+ startRefresh();+}++async function refresh() {+ if (document.hidden || !secret) return;+ try {+ const state = await api('GET');+ const fresh = normalize(state.config);+ // Only adopt server config into the form when the user has no pending edits,+ // so a background refresh never clobbers what they are typing.+ if (!isDirty()) {+ loaded = fresh;+ draft = { ...fresh };+ renderForm();+ updateDirty();+ } else {+ // Still keep breaker/paused state honest even mid-edit.+ loaded.paused = fresh.paused;+ loaded.pause_reason = fresh.pause_reason;+ }+ renderState(state);+ } catch {+ /* transient — next tick retries */+ }+}++function startRefresh() { stopRefresh(); refreshTimer = setInterval(refresh, REFRESH_MS); }+function stopRefresh() { if (refreshTimer) clearInterval(refreshTimer); refreshTimer = null; }+document.addEventListener('visibilitychange', () => { if (!document.hidden) refresh(); });++// ── static controls (modes, chips, network) built once ────────────────────────+let built = false;+function buildStaticControls() {+ if (built) return;+ built = true;++ $('ml-modes').innerHTML = MODES.map(+ (m) => `+ <label class="ml-mode">+ <input type="radio" name="ml-mode" value="${m.id}" />+ <span class="ml-mode-ui">+ <span class="ml-mode-name">${esc(m.name)}</span>+ <span class="ml-mode-desc">${esc(m.desc)}</span>+ </span>+ </label>`,+ ).join('');+ $('ml-modes').addEventListener('change', (e) => {+ if (e.target.name === 'ml-mode') { draft.mode = e.target.value; onEdit(); }+ });++ $('ml-sources').innerHTML = SOURCES.map(+ (s) => `<button type="button" class="ml-chip" data-src="${s.id}" aria-pressed="false">${esc(s.label)}</button>`,+ ).join('');+ $('ml-sources').addEventListener('click', (e) => {+ const btn = e.target.closest('.ml-chip');+ if (!btn) return;+ const id = btn.dataset.src;+ const set = new Set(draft.sources);+ set.has(id) ? set.delete(id) : set.add(id);+ draft.sources = [...set];+ onEdit();+ });++ $('ml-network').addEventListener('click', (e) => {+ const btn = e.target.closest('.ml-seg-btn');+ if (!btn) return;+ draft.network = btn.dataset.net;+ onEdit();+ });++ // numeric inputs+ bindNum('ml-cadence', 'target_cadence_seconds');+ bindNum('ml-maxhour', 'max_per_hour');+ bindNum('ml-perlaunch', 'per_launch_sol');+ bindNum('ml-devbuy', 'dev_buy_sol');+ bindNum('ml-dailycap', 'daily_sol_cap');+ $('ml-buyback').addEventListener('input', () => {+ const pct = Number($('ml-buyback').value);+ draft.buyback_bps = Number.isFinite(pct) ? Math.round(pct * 100) : draft.buyback_bps;+ $('ml-buyback-hint').textContent = `${draft.buyback_bps} bps → $THREE buyback-burn`;+ onEdit(false);+ });++ $('ml-dryrun').addEventListener('change', () => { draft.dry_run = $('ml-dryrun').checked; onEdit(); });+ $('ml-armswitch').addEventListener('click', () => { draft.enabled = !draft.enabled; onEdit(); });++ // The config form has no submit button; guard against Enter-to-reload.+ $('ml-config').addEventListener('submit', (e) => e.preventDefault());++ $('ml-save').addEventListener('click', save);+ $('ml-discard').addEventListener('click', () => { draft = { ...loaded }; renderForm(); updateDirty(); });+ $('ml-resume').addEventListener('click', resumeBreaker);+ wireModal();+}++function bindNum(id, key) {+ $(id).addEventListener('input', () => {+ const n = Number($(id).value);+ if (Number.isFinite(n)) { draft[key] = n; onEdit(false); }+ });+}++function onEdit(rerender = true) {+ if (rerender) renderForm();+ updateDirty();+ renderStatusFromDraft();+}++// ── render form from draft ─────────────────────────────────────────────────────+function renderForm() {+ // modes+ for (const el of document.querySelectorAll('input[name="ml-mode"]')) el.checked = el.value === draft.mode;+ // sources+ const set = new Set(draft.sources);+ for (const btn of document.querySelectorAll('#ml-sources .ml-chip')) {+ btn.setAttribute('aria-pressed', set.has(btn.dataset.src) ? 'true' : 'false');+ }+ $('ml-sources-card').style.opacity = draft.mode === 'trend' || draft.mode === 'hybrid' ? '1' : '0.5';+ // network+ for (const btn of document.querySelectorAll('#ml-network .ml-seg-btn')) {+ btn.classList.toggle('active', btn.dataset.net === draft.network);+ }+ // numbers+ setVal('ml-cadence', draft.target_cadence_seconds);+ setVal('ml-maxhour', draft.max_per_hour);+ setVal('ml-perlaunch', draft.per_launch_sol);+ setVal('ml-devbuy', draft.dev_buy_sol);+ setVal('ml-dailycap', draft.daily_sol_cap);+ setVal('ml-buyback', round(draft.buyback_bps / 100, 2));+ $('ml-buyback-hint').textContent = `${draft.buyback_bps} bps → $THREE buyback-burn`;+ $('ml-cadence-hint').textContent = cadenceHint(draft.target_cadence_seconds);+ $('ml-dryrun').checked = draft.dry_run;+ renderStatusFromDraft();+}+function setVal(id, v) { const el = $(id); if (el && document.activeElement !== el) el.value = v; }++function cadenceHint(sec) {+ if (!sec) return '';+ const perHr = Math.floor(3600 / sec);+ return `≈ ${perHr.toLocaleString()} / hour at full tilt`;+}++// ── status (hero) ──────────────────────────────────────────────────────────────+function renderStatusFromDraft() {+ const wasArmed = loaded.enabled && !loaded.dry_run && !loaded.paused;+ const willArm = draft.enabled && !draft.dry_run;+ // arm switch reflects desired enabled state+ const sw = $('ml-armswitch');+ sw.setAttribute('aria-pressed', draft.enabled ? 'true' : 'false');+ $('ml-armswitch-lbl').textContent = draft.enabled ? (draft.dry_run ? 'Enabled · dry run' : 'Armed') : 'Disabled';++ // dot + status line reflect SAVED state (truth), with a hint when edits pend+ const dot = $('ml-status-dot');+ dot.className = 'ml-dot';+ let line;+ if (loaded.paused) { dot.classList.add('is-paused'); line = `Paused — ${esc(loaded.pause_reason || 'circuit breaker tripped')}`; }+ else if (wasArmed) { dot.classList.add('is-armed'); line = `Live — minting on ${esc(loaded.mode)} mode, every ${loaded.target_cadence_seconds}s.`; }+ else if (loaded.enabled) { dot.classList.add('is-dry'); line = 'Enabled in dry-run — choosing coins + agents, moving no SOL.'; }+ else { line = 'Disabled — fully inert. Nothing launches.'; }+ if (isDirty()) line += willArm && !wasArmed ? ' • Unsaved: will go LIVE on save.' : ' • Unsaved changes.';+ $('ml-status-line').innerHTML = line;+}++// ── render server state (stats, console, master, breaker) ──────────────────────+function renderState(state) {+ const s = state.stats || {};+ $('ml-s-launched').textContent = num(s.launched_today);+ $('ml-s-dry').textContent = num(s.dry_runs_today);+ $('ml-s-spent').textContent = fmtSol(s.sol_spent_today);+ $('ml-s-left').textContent = s.sol_remaining_today == null ? '—' : fmtSol(s.sol_remaining_today);+ $('ml-s-queue').textContent = num(state.queue_enabled);+ $('ml-s-fail').textContent = `${num(s.failed_today)} / ${num(s.skipped_today)}`;++ $('ml-master-bal').textContent = state.master_balance_sol == null ? 'n/a' : `${fmtSol(state.master_balance_sol)} ◎`;++ const breaker = $('ml-breaker');+ if (loaded.paused) {+ breaker.hidden = false;+ $('ml-breaker-txt').textContent = `Circuit breaker tripped: ${loaded.pause_reason || 'repeated failures'}. Launches halted.`;+ } else { breaker.hidden = true; }++ renderConsole(state.console || [], state.config?.network || draft.network);+ $('ml-console-meta').textContent = `updated ${new Date().toLocaleTimeString()}`;+}++function renderConsole(runs, network) {+ const list = $('ml-runs');+ const empty = $('ml-runs-empty');+ if (!runs.length) { list.innerHTML = ''; empty.hidden = false; return; }+ empty.hidden = true;+ list.innerHTML = runs+ .map((r) => {+ const status = String(r.status || 'pending');+ const mint = r.mint+ ? `<a href="${solscan(r.mint, network)}" target="_blank" rel="noopener">${esc(r.name || r.symbol || 'coin')}</a>`+ : esc(r.name || r.symbol || '—');+ const meta = r.status === 'failed' && r.error+ ? `<span class="ml-run-err">${esc(trunc(r.error, 64))}</span>`+ : `<span class="ml-kind">${esc(r.kind || '')}</span>${r.trigger_source ? ' · ' + esc(r.trigger_source) : ''}`;+ const sol = Number(r.sol_spent) > 0 ? `${fmtSol(r.sol_spent)} ◎` : (r.dry_run ? 'dry' : '—');+ return `+ <li class="ml-run">+ <span class="ml-pill s-${esc(status)}">${esc(statusLabel(status))}</span>+ <span class="ml-run-main">+ <span class="ml-run-name">${mint} <span class="ml-run-sym">${esc(r.symbol || '')}</span></span>+ <span class="ml-run-meta">${meta}</span>+ </span>+ <span class="ml-run-r">+ <span class="ml-run-sol">${esc(sol)}</span>+ <span class="ml-run-time">${esc(reltime(r.created_at))}</span>+ </span>+ </li>`;+ })+ .join('');+}++// ── dirty + save ───────────────────────────────────────────────────────────────+function pickEditable(o) { const r = {}; for (const k of EDITABLE) r[k] = o[k]; r.sources = [...(o.sources || [])].sort(); return r; }+function isDirty() { return JSON.stringify(pickEditable(draft)) !== JSON.stringify(pickEditable(loaded)); }+function updateDirty() {+ const dirty = isDirty();+ $('ml-savebar').hidden = !dirty;+ const willArm = draft.enabled && !draft.dry_run;+ const wasArmed = loaded.enabled && !loaded.dry_run && !loaded.paused;+ $('ml-savebar-txt').textContent = dirty && willArm && !wasArmed ? '⚠ Will arm the LIVE firehose' : 'Unsaved changes';+}++async function save() {+ const willArm = draft.enabled && !draft.dry_run;+ const wasArmed = loaded.enabled && !loaded.dry_run && !loaded.paused;+ if (willArm && !wasArmed) { openModal(); return; }+ await commit();+}++async function commit() {+ const payload = {};+ for (const k of EDITABLE) payload[k] = draft[k];+ $('ml-save').disabled = true;+ try {+ const resp = await api('POST', payload);+ loaded = normalize(resp.config);+ draft = { ...loaded };+ renderForm();+ updateDirty();+ toast(resp.armed ? 'Saved — launcher is ARMED' : 'Saved');+ refresh();+ } catch (err) {+ if (err.message !== 'unauthorized') toast(err.message, true);+ } finally {+ $('ml-save').disabled = false;+ }+}++async function resumeBreaker() {+ try {+ await api('POST', { action: 'resume' });+ toast('Breaker cleared');+ refresh();+ } catch (err) {+ if (err.message !== 'unauthorized') toast(err.message, true);+ }+}++// ── arm modal ──────────────────────────────────────────────────────────────────+function wireModal() {+ $('ml-modal-input').addEventListener('input', () => {+ $('ml-modal-go').disabled = $('ml-modal-input').value.trim().toUpperCase() !== 'ARM';+ });+ $('ml-modal-cancel').addEventListener('click', closeModal);+ $('ml-modal-go').addEventListener('click', async () => { closeModal(); await commit(); });+ $('ml-modal').addEventListener('click', (e) => { if (e.target === $('ml-modal')) closeModal(); });+ document.addEventListener('keydown', (e) => { if (e.key === 'Escape' && !$('ml-modal').hidden) closeModal(); });+}+function openModal() {+ pendingLive = true;+ $('ml-modal-body').textContent =+ `This enables real launches: the master wallet will fund agents and mint coins on ${draft.network} ` ++ `every ~${draft.target_cadence_seconds}s, up to ${draft.daily_sol_cap} SOL/day. Real SOL will move.`;+ $('ml-modal-input').value = '';+ $('ml-modal-go').disabled = true;+ $('ml-modal').hidden = false;+ $('ml-modal-input').focus();+}+function closeModal() { pendingLive = false; $('ml-modal').hidden = true; }++// ── toast ──────────────────────────────────────────────────────────────────────+let toastTimer = null;+function toast(msg, isErr) {+ const t = $('ml-toast');+ t.textContent = msg;+ t.classList.toggle('is-err', !!isErr);+ t.hidden = false;+ clearTimeout(toastTimer);+ toastTimer = setTimeout(() => { t.hidden = true; }, 3200);+}++// ── formatters ─────────────────────────────────────────────────────────────────+function num(n) { return Number(n || 0).toLocaleString(); }+function round(n, d) { const p = 10 ** d; return Math.round(Number(n) * p) / p; }+function fmtSol(n) { const v = Number(n || 0); return v === 0 ? '0' : v < 0.001 ? v.toExponential(1) : round(v, 4).toString(); }+function trunc(s, n) { s = String(s || ''); return s.length > n ? s.slice(0, n - 1) + '…' : s; }+function statusLabel(s) { return { dry_run: 'dry', confirmed: 'live', launched: 'live' }[s] || s; }+function solscan(mint, network) { return `https://solscan.io/token/${encodeURIComponent(mint)}${network === 'devnet' ? '?cluster=devnet' : ''}`; }+function reltime(iso) {+ if (!iso) return '';+ const d = (Date.now() - new Date(iso).getTime()) / 1000;+ if (d < 60) return `${Math.max(0, Math.floor(d))}s`;+ if (d < 3600) return `${Math.floor(d / 60)}m`;+ if (d < 86400) return `${Math.floor(d / 3600)}h`;+ return `${Math.floor(d / 86400)}d`;+}++// ── boot ───────────────────────────────────────────────────────────────────────+(async function boot() {+ if (!secret) { showGate(); return; }+ try { await load(); } catch (err) { if (err.message !== 'unauthorized') showGate(err.message); }+})();diff --git a/src/game/play-gate.js b/src/game/play-gate.jsindex ae6116b12..1c6cea1e4 100644--- a/src/game/play-gate.js+++ b/src/game/play-gate.js@@ -55,8 +55,15 @@ class Gate {try {cfg = await fetchPlayConfig();} catch (err) {- this._mount();- this._render({ state: 'error', error: err?.message || 'Could not reach sign-in. Check your connection.', onRetry: () => this._start() });+ // Fail OPEN, never closed: when we can't even read the gate config we don't+ // know whether a token is pinned, and /play is almost always open. Bricking+ // the world with a blocking error overlay on a transient blip (a 429 from a+ // shared NAT, a network hiccup) would dead-end the 99% case. The server is+ // the real authority — a genuinely-gated world refuses any unsigned room+ // join, so the worst case here is an honest bounce at join, not free entry.+ // This honors the self-healing contract documented at _ensurePlayAccess.+ console.warn('[play-gate] gate probe failed, opening /play:', err?.message || err);+ this._finish({ required: false });return;}this.cfg = cfg;diff --git a/src/pulse.css b/src/pulse.cssindex 23a58bab9..f00b02487 100644--- a/src/pulse.css+++ b/src/pulse.css@@ -82,6 +82,34 @@.px-spark-lbl { font-size: var(--text-2xs, .62rem); color: var(--ink-faint, #666); letter-spacing: .03em; }.px-spark-col--now .px-spark-lbl { color: var(--ink, #e8e8e8); }+/* ── Marketplace viability panel ───────────────────────────────────────────+ The honest demand dashboard: real $THREE skill purchases, GMV, repeat-buyer+ rate, trading pairs and take-rate. Featured surface above the feed grid. */+.px-market { background: var(--surface-1, rgba(255,255,255,.03)); border: 1px solid var(--stroke-strong, rgba(255,255,255,.14));+ border-radius: var(--radius-lg, 14px); padding: var(--space-md, 16px); margin-bottom: var(--space-xl, 32px); }+.px-market-h { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: var(--space-md, 14px); }+.px-market-htxt { display: flex; align-items: center; gap: 10px; }+.px-market-title { font-family: var(--font-display, sans-serif); font-size: var(--text-lg, 1.05rem); font-weight: 600; color: var(--ink-bright, #fff); }+.px-market-tag { font-family: var(--font-mono, monospace); font-size: var(--text-2xs, .64rem); font-weight: 600; letter-spacing: .03em;+ color: var(--ink-bright, #fff); background: var(--surface-3, rgba(255,255,255,.08)); border: 1px solid var(--stroke-strong, rgba(255,255,255,.14));+ border-radius: 999px; padding: 3px 9px; white-space: nowrap; }+.px-market-tag--off { color: var(--ink-faint, #666); border-color: var(--stroke, rgba(255,255,255,.07)); }+.px-market-sub { flex: 1 1 100%; font-size: var(--text-2xs, .66rem); color: var(--ink-dim, #888); line-height: 1.4; }+.px-market-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--space-sm, 10px); margin-bottom: var(--space-md, 16px); }+.px-kpi { background: var(--surface-2, rgba(255,255,255,.05)); border: 1px solid var(--stroke, rgba(255,255,255,.07));+ border-radius: var(--radius-md, 10px); padding: 10px 12px; }+.px-kpi dt { font-size: var(--text-2xs, .62rem); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-dim, #888); margin-bottom: 5px; }+.px-kpi dd { margin: 0; font-family: var(--font-mono, monospace); font-size: clamp(1.05rem, 2.4vw, 1.4rem); font-weight: 700; color: var(--ink-bright, #fff); line-height: 1.05; }+.px-kpi-sub { display: block; margin-top: 3px; font-size: var(--text-2xs, .6rem); color: var(--ink-faint, #666); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }+.px-market-body { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--space-md, 16px); align-items: start; }+.px-market-spark .px-spark-bar--mkt { background: rgba(255,255,255,.28); }+.px-market-spark .px-spark-col:hover .px-spark-bar--mkt { background: var(--ink, #e8e8e8); }+.px-skill-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 8px; border-radius: var(--radius-md, 9px); }+.px-skill-row:hover { background: var(--surface-2, rgba(255,255,255,.05)); }+.px-skill-name { font-size: var(--text-sm, .8rem); font-weight: 600; color: var(--ink, #e8e8e8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }+.px-skill-meta { flex: 0 0 auto; font-family: var(--font-mono, monospace); font-size: var(--text-sm, .78rem); font-weight: 700; color: var(--ink-bright, #fff); text-align: right; }+.px-skill-meta small { display: block; font-weight: 400; color: var(--ink-faint, #666); font-size: var(--text-2xs, .6rem); }+/* Layout: feed + stats rail */.px-grid { display: grid; grid-template-columns: 1fr 320px; gap: var(--space-lg, 24px); align-items: start; }.px-main { min-width: 0; }@@ -124,8 +152,11 @@.px-grid { grid-template-columns: 1fr; }.px-rail { position: static; flex-direction: column; }.px-counters { grid-template-columns: repeat(3, 1fr); }+ .px-market-kpis { grid-template-columns: repeat(3, 1fr); }+ .px-market-body { grid-template-columns: 1fr; }}@media (max-width: 520px) {.px-counters { grid-template-columns: repeat(2, 1fr); }+ .px-market-kpis { grid-template-columns: repeat(2, 1fr); }.px-spark-lbl { font-size: 0.55rem; }}diff --git a/src/pulse.js b/src/pulse.jsindex 736019f8e..50e2df791 100644--- a/src/pulse.js+++ b/src/pulse.js@@ -70,6 +70,16 @@ function fmtNum(n) {return String(v);}+// Whole-token $THREE amount → compact label (e.g. 12.4k, 1.2M, 340).+function fmtThree(n) {+ const v = Number(n) || 0;+ if (v >= 1_000_000) return `${(v / 1_000_000).toFixed(2)}M`;+ if (v >= 1000) return `${(v / 1000).toFixed(1)}k`;+ if (v >= 100) return String(Math.round(v));+ return v.toFixed(v < 1 ? 3 : 1).replace(/\.0$/, '');+}+const fmtPct = (frac) => `${Math.round((Number(frac) || 0) * 100)}%`;+function timeAgo(iso) {const t = new Date(iso).getTime();if (!Number.isFinite(t)) return '';@@ -93,6 +103,11 @@ function renderStats(d) {$('px-c-trades').textContent = String(d.trades_only_24h ?? 0);$('px-c-trades-sub').textContent = (d.snipes_24h ?? 0) > 0 ? `+${d.snipes_24h} snipe${d.snipes_24h === 1 ? '' : 's'}` : 'swaps';$('px-c-pays').textContent = String(d.payments_24h ?? 0);+ const mkt = d.marketplace_24h || {};+ $('px-c-market').textContent = String(mkt.purchases ?? 0);+ $('px-c-market-sub').textContent = mkt.gmv_three > 0+ ? `${fmtThree(mkt.gmv_three)} $THREE`+ : (mkt.trials > 0 ? `${mkt.trials} trial${mkt.trials === 1 ? '' : 's'}` : 'paid skill buys');$('px-c-active').textContent = String(d.active_wallets_24h ?? 0);renderSparkline(d.series_7d);@@ -184,6 +199,104 @@ function renderLaunches(list) {.join('');}+async function loadMarketplace() {+ try {+ const res = await fetch(`/api/pulse?view=marketplace&network=${state.network}`, { headers: { accept: 'application/json' } });+ if (!res.ok) throw new Error(`marketplace ${res.status}`);+ const { data } = await res.json();+ renderMarketplace(data);+ } catch (e) {+ log.warn('marketplace failed', e?.message);+ // Supplementary panel — never block the page; just hide it on failure.+ $('px-market')?.setAttribute('hidden', '');+ $('px-sellers-card')?.setAttribute('hidden', '');+ }+}++function renderMarketplace(d) {+ const panel = $('px-market');+ if (!panel) return;+ const w24 = d.window_24h || {};+ const w7 = d.window_7d || {};+ const anyActivity = (w7.purchases || 0) > 0 || (w7.trials || 0) > 0 || (w24.purchases || 0) > 0;+ panel.hidden = false;++ // Fee tag — surfaces the live take-rate, or that it's off (honest either way).+ const feeEl = $('px-mkt-fee');+ if (feeEl) {+ feeEl.textContent = d.fee_bps > 0 ? `${d.fee_pct}% take-rate` : 'take-rate off';+ feeEl.classList.toggle('px-market-tag--off', !(d.fee_bps > 0));+ }++ $('px-mkt-gmv24').textContent = fmtThree(w24.gmv_three);+ $('px-mkt-gmv24-sub').textContent = `$THREE · ${w24.purchases || 0} buy${w24.purchases === 1 ? '' : 's'}`;+ $('px-mkt-gmv7').textContent = fmtThree(w7.gmv_three);+ $('px-mkt-gmv7-sub').textContent = `$THREE · ${w7.purchases || 0} buy${w7.purchases === 1 ? '' : 's'}`;+ $('px-mkt-ticket').textContent = fmtThree(w7.avg_ticket_three);+ $('px-mkt-repeat').textContent = fmtPct(d.repeat_buyer_rate_7d);+ $('px-mkt-repeat-sub').textContent = `${d.repeat_buyers_7d || 0}/${d.buyers_7d || 0} buyers · 7d`;+ $('px-mkt-pairs').textContent = String(w7.pairs || 0);+ $('px-mkt-take').textContent = d.fee_bps > 0 ? fmtThree(w7.take_rate_three) : '—';+ $('px-mkt-take-sub').textContent = d.fee_bps > 0 ? `$THREE earned · 7d` : 'fee disabled';++ renderMarketSpark(d.series_7d);++ // Top skills — what the market is paying for.+ const skillsHost = $('px-mkt-skills');+ if (d.top_skills?.length) {+ skillsHost.innerHTML = d.top_skills+ .map((s) => (+ `<div class="px-skill-row">` ++ `<span class="px-skill-name">${esc(s.skill)}</span>` ++ `<span class="px-skill-meta">${fmtThree(s.gmv_three)} <small>$THREE · ${s.purchases} buy${s.purchases === 1 ? '' : 's'}</small></span>` ++ `</div>`+ ))+ .join('');+ } else {+ skillsHost.innerHTML = anyActivity+ ? `<p class="px-lb-empty">No paid skills cleared in the last 7 days.</p>`+ : `<p class="px-lb-empty">No marketplace sales yet. Fund agents and list paid skills to start the loop. <a href="/marketplace">Open marketplace.</a></p>`;+ }++ // Top sellers rail card — the supply side that's actually clearing.+ const sellersCard = $('px-sellers-card');+ const sellersHost = $('px-sellers');+ if (d.top_sellers?.length) {+ sellersCard.hidden = false;+ sellersHost.innerHTML = d.top_sellers+ .map((a) => agentCardHTML(a, `${fmtThree(a.gmv_three)} <small>$THREE · ${a.sales} sale${a.sales === 1 ? '' : 's'}</small>`))+ .join('');+ wireWalletChips(sellersHost);+ } else {+ sellersCard.hidden = true;+ }+}++// 7-day GMV sparkline for the marketplace panel; today highlighted, bars scale to peak.+function renderMarketSpark(series) {+ const host = $('px-mkt-spark');+ const totalEl = $('px-mkt-spark-total');+ if (!host) return;+ const days = Array.isArray(series) ? series : [];+ const total = days.reduce((s, d) => s + (d.gmv_three || 0), 0);+ if (totalEl) totalEl.textContent = total > 0 ? `${fmtThree(total)} $THREE` : '—';+ if (!days.length) { host.innerHTML = `<p class="px-lb-empty">No activity yet.</p>`; return; }+ const peak = Math.max(1e-9, ...days.map((d) => d.gmv_three || 0));+ host.innerHTML = days+ .map((d, i) => {+ const v = d.gmv_three || 0;+ const h = v > 0 ? Math.max(6, Math.round((v / peak) * 100)) : 2;+ const today = i === days.length - 1;+ return (+ `<div class="px-spark-col${today ? ' px-spark-col--now' : ''}" title="${esc(d.day)}: ${fmtThree(v)} $THREE · ${d.purchases || 0} buys">` ++ `<div class="px-spark-bar px-spark-bar--mkt" style="height:${h}%"></div>` ++ `<span class="px-spark-lbl">${esc(d.label)}</span>` ++ `</div>`+ );+ })+ .join('');+}+function mountFeed() {const host = $('px-feed');if (state.pulse) state.pulse.destroy();@@ -210,6 +323,7 @@ function wireNetworkToggle() {$('px-net-label').textContent = net;state.pulse?.setNetwork(net);loadStats();+ loadMarketplace();});}}@@ -218,8 +332,9 @@ function init() {wireNetworkToggle();mountFeed();loadStats();+ loadMarketplace();// Refresh stats on a slow cadence; the feed has its own live delta polling.- setInterval(() => { if (!document.hidden) loadStats(); }, 60_000);+ setInterval(() => { if (!document.hidden) { loadStats(); loadMarketplace(); } }, 60_000);}if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', init);diff --git a/vite.config.js b/vite.config.jsindex 33a2bb1d3..6aad97823 100644--- a/vite.config.js+++ b/vite.config.js@@ -379,6 +379,7 @@ const appConfig = {launches: resolve(__dirname, 'pages/launches.html'),pulse: resolve(__dirname, 'pages/pulse.html'),deployments: resolve(__dirname, 'pages/deployments.html'),+ 'admin-launcher': resolve(__dirname, 'pages/admin/launcher.html'),'launch-detail': resolve(__dirname, 'pages/launch-detail.html'),watchlist: resolve(__dirname, 'pages/watchlist.html'),leaderboard: resolve(__dirname, 'pages/leaderboard.html'),@@ -840,6 +841,8 @@ support: resolve(__dirname, 'pages/support.html'),'/pulse/': resolve(root, 'pages/pulse.html'),'/deployments': resolve(root, 'pages/deployments.html'),'/deployments/': resolve(root, 'pages/deployments.html'),+ '/admin/launcher': resolve(root, 'pages/admin/launcher.html'),+ '/admin/launcher/': resolve(root, 'pages/admin/launcher.html'),'/clash': resolve(root, 'pages/clash.html'),'/clash/': resolve(root, 'pages/clash.html'),'/watchlist': resolve(root, 'pages/watchlist.html'),