Skip to content

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

feat: enhance Live Trading Theater UI and functionality — redesigned as a trading room, added agent funding script, and improved vanity check flow

nrpoca8b8b499523
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cc96cd59a..16a0aa38c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,8 +8,10 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Agents in the ring — platform agents now buy and sell services from each other** — The closed-loop x402 economy is no longer a scheduler paying itself: real platform agents with their own custodial wallets now do the buying. An endpoint-shopper hunts intel and health checks, an Agora citizen tips dancers and pays club cover after finishing work, and a curator buys marketplace listings and billboard slots — each purchase signed by the agent's own key, checked against its personal spend limits, logged to its custody trail, and attributed by agent in the activity feed. The treasury keeps every agent's small USDC float topped up between a floor and a ceiling and sweeps back the overflow, so the money still never leaves platform-controlled wallets. On a slower cadence the agents also touch the chain itself, emitting real on-chain agent-invocation events — visible, verifiable activity, not simulated volume. (`/docs/x402-ring-economy`) `[feature]`
- **Agents no longer buy pump.fun mayhem-mode coins** — Autonomous agent strategies and discretionary agent trades now refuse to buy pump.fun mayhem-mode coins — the high-volatility variant — and trade only regular coins. The check reads the mayhem flag straight off the on-chain bonding curve before any spend, so it can't be spoofed, and it's buy-only: an agent that already holds a mayhem coin can always sell to exit. Blocked buys show up as a clean skip in the activity feed, not an error. `[improvement]`
+- **Autonomous trading experiment — take initials, hold a moon bag, never dump the whole bag** — You can now give one agent a real budget and let it trade newer pump.fun launches under a disciplined, documented risk policy. It only buys projects between $10k and $100k market cap, never buys pump.fun Mayhem tokens, and — the important part — it never sells 100% of a winner on the way up. When a position hits 2x it sells just enough to recover the initial stake, then holds the rest as a moon bag that rides on a trailing stop, with a hard stop-loss underneath. Every buy and every sell is written to a trade journal with its reasoning, so you can actually learn what works. Funding is manual from the agent wallet UI; nothing auto-funds, and it runs in simulate mode until you deliberately go live. (`/docs/trading-experiment`) `[feature]`
- **Copy a trader straight from the Live Trading Theater** — Tap any agent on the 3D stage and you can now set one of your own agents to mirror it — it buys what the leader buys, server-signed and sized by a per-trade SOL amount you choose, always capped by your own spend limits. Watching a good trader on stage now leads directly to copying it, no page-hopping. Sells are mirrored too, and you can manage or stop the mirror from your agent's profile at any time. (`/theater`) `[feature]`
- **Every paid endpoint now settles — full x402 catalog coverage** — The x402 ring economy now exercises every paid endpoint on the platform, not just a handful. A single canonical catalog covers all 46 paid endpoints — tips, services, market intel, health checks and settlements — each with the exact request it needs to actually go through, read straight from the endpoint that handles it. The autonomous rotation is wired to this catalog and weighted so every safe-to-buy endpoint is paid at least once an hour, with the ones that shouldn't be bought on a loop (real coin mints, AI calls, third-party payouts) held out and verified separately. Several endpoints that would have silently rejected or mis-charged a real payment were fixed at the root: three were reading the request the wrong way and failing every paid call, and the old rotation was calling tip and cosmetic endpoints with the wrong method entirely. The result is continuous, provable coverage — a new paid endpoint now fails the test suite until it's in the catalog. `[feature, improvement]`
+- **Every platform wallet is now watched for leaks — and arming a sniper no longer moves money** — Two safety upgrades to how the platform handles money. First, a new on-chain leak scanner watches every wallet the platform controls — the funding masters, all treasuries, the x402 ring wallets — not just a subset, and pages ops within minutes if a single lamport or token ever leaves one of them to an address outside the controlled set. Second, we closed an implicit-funding footgun: previously, simply arming an autonomous trading strategy could cause a master wallet to start pushing real SOL to that agent on a schedule. Now that only happens if the strategy explicitly opts in, and it is off by default, so arming a strategy never moves money on its own. `[security, infra]`
- **Every ring settlement is now proven on-chain — reconciliation blind spot closed** — The closed-loop agent economy settles real USDC through the platform's own facilitator, and until now those settlements were trusted but never verified against the blockchain. A new reconciler runs every 30 minutes and holds the ring to the same standard the funding wallet already meets: every recorded settlement and every treasury→payer sweep from the last 72 hours is checked to exist and succeed on-chain, a sample of each is parsed to prove the exact dollar amount and recipient match the books, and the two internal ledgers are cross-checked so a settlement with no matching spend record — the tell-tale sign of value leaking through our own facilitator — is caught. It also runs a silence alarm: if the ring is switched on but goes quiet for 30 minutes, operators are paged, closing the gap where 'it was working, then it wasn't' used to pass unnoticed. Any missing, failed, or mismatched settlement raises an immediate alert; every finding lands on the finance-integrity board, tagged so ring issues stand apart from the rest. `[security, infra]`
- **Full audit trail + breach monitoring on the economy's funding wallet** — The master wallet that fuels the platform's autonomous economy now keeps a tamper-evident accounting book of every move it makes. Each SOL transfer is recorded with the engine it funded, the amount, the on-chain signature, the running balance, and the US-dollar value at the moment of the transfer — cryptographically hash-chained so no past entry can be altered or deleted without detection. A monitor runs every 30 minutes and checks three things: that the book hasn't been tampered with, that every transfer we recorded really happened on-chain, and — most importantly — that no SOL ever left the wallet without a matching record, which is the tell-tale sign of a stolen key. Anything off raises an immediate operator alert and lands on the finance-integrity board. There's also a one-command accounting export (CSV or JSON, with running balance and dollar totals) for bookkeeping and review. `[security, infra, docs]`
- **Leak-proofing the closed-loop economy: fail-closed spend guards + an on-chain leak scanner** — The rule behind the closed-loop agent economy is simple: no dollar and no SOL ever leaves the wallets the platform controls. Until now the safeguards that enforced it were passive — a couple of configuration switches that, if flipped or forgotten, could quietly re-open spending to the outside world, and nothing actually watched the blockchain to confirm money wasn't leaving. Both gaps are now closed. Before the economy spends anything, it re-checks the three switches that keep the loop sealed — external spending off, no charity split, settlements routed only through the platform's own settlement service — and if any of them is wrong it stops spending entirely and pages operators, naming the switch that changed. Separately, a new monitor reads the chain itself every ten minutes: for each ring wallet it inspects every recent transaction and flags anything that moved value to an address the platform doesn't control — a stablecoin payment to a stranger, any non-stablecoin token leaving, an unexplained SOL debit, or a permission grant that would let someone else move funds later. Any such finding pages operators within minutes with the transaction, the counterparty, the amount, and the exact recovery steps, and is filed on the same financial-integrity board as the rest of the platform's money checks. It also tallies the network fees the wallets actually paid and cross-checks them against the books, so fees paid outside the accounting get caught too. The monitor only ever reads the chain — it never moves funds or touches keys. `[security]`
@@ -21,6 +23,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Ring wallets: watched for drain, auto-refilled, and verifiable in one command** — The three platform wallets that power the closed-loop agent economy — the one that pays, the one that receives, and the one that covers network fees — are now monitored and self-healing so the loop can run unattended without silently stalling or draining. A balance monitor checks all three on-chain every ten minutes and pages operators before trouble: the fee and paying wallets alert when their SOL dips near the level where settlements would be refused, and the paying wallet alerts when its USDC float runs low. The receiving wallet is intentionally left unbounded — it fills up and gets swept back automatically, so a low balance there is healthy, not a problem. The fee and paying wallets are also registered with the platform's funding root, which now tops up their fee SOL automatically when they fall below floor — closing the failure where the fee wallet ran dry and the whole ring quietly halted. A new one-command check confirms every wallet is correctly configured, registered, and reachable, prints their live balances, and refuses to pass on any mismatch, without ever exposing a secret. A funding runbook documents exactly how much to send and how to confirm it landed. `[infra, security]`
- **Status page now shows internal dependency health, not just uptime** — The public status page and the platform health API now report the health of the systems behind the surfaces — cache, database, Solana RPC, the x402 payment ring, and the world service — not only whether each page returns. A surface can answer normally while a dependency is quietly running on a fallback (cache on memory, RPC throttled, the payment ring half-configured); those states are now visible with a plain-language explanation and the exact fix, instead of being buried in server logs. The monitor also re-alerts on a degradation that persists rather than going silent after the first notice, and posts a recovery note when it clears. (`/status`) `[improvement]`
- **The Live Trading Theater got more alive — and shows its guardrails** — A pass of polish across the 3D stage: performers now cast contact shadows so no one floats, the camera pushes in on a marquee fill, the celebration coin scales with the real size of the buy, and receipts show the coin ticker. A new quiet-state heartbeat tells you exactly how long since the last on-chain move instead of a generic 'market is quiet'. There's an opt-in sound toggle that plays a subtle chime on big fills (off by default). And the live tape now surfaces safety refusals — when an agent declines a pump.fun mayhem coin or a rug/honeypot firewall blocks a buy, you see it happen, so the platform's guardrails are visible instead of silent. (`/theater`) `[improvement]`
+- **The Live Trading Theater is now a dealing room, not a stage** — The 3D theater has been rebuilt from an abstract stage into a trading dealing room: every agent now stands at its own workstation — a desk with a lit monitor — arranged in staggered rows like a trading pit. The monitor is a live status light: a resting glow when idle, a green flash when a real buy fills, and an amber flash when a safety rule refuses a bad trade, so you can read the room at a glance. The camera settles into the pit instead of spinning, and you can drop in your own environment (an office/floor backdrop) via a URL parameter without any code change. The point of the redesign: the setting now explains what the agents are doing — trading — instead of leaving you to guess why characters were celebrating on a stage. (`/theater`) `[improvement]`
- **Treasury sweepback — every agent wallet cycles back to one root** — The economy's funding root now has a return leg. A scheduled sweep skims surplus SOL and stray token balances from every platform engine wallet back to the single master treasury, with an on-demand full-drain lever for emergencies. Destination is locked in code to the master wallet, every operational float is respected, dust is never moved, and every returned lamport lands on the same tamper-evident ledger that records outbound funding — one wallet funds the fleet, and the fleet settles back to one wallet. `[security, infra]`
- **x402 ring: paid endpoints now settle every minute, cap-coherent** — The platform's x402 endpoints now get paid continuously — a new per-minute ring tick sends a steady stream of real on-chain USDC payments across the catalog: cheap tips and services every minute, plus a larger ring-settle that carries volume for a few cents of network fees. It runs inside its own hard per-tick and daily spend caps, kept fully separate from the existing autonomous loop's budget, and pauses cleanly (with an alert) if the payer wallet dips below its SOL or USDC floor instead of retrying in a loop. We also fixed the long-standing quiet skip where the flagship ring-settle was dropped because its price exceeded a stale cap: the default caps now fit it, a config check flags any mismatch, and any skip is logged loudly with the exact setting to change. (`/docs/x402-ring-economy`) `[feature, infra]`
diff --git a/data/changelog.json b/data/changelog.json
index ca9db0067..918a03129 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,15 @@
{
"$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-07-03",
+ "title": "The Live Trading Theater is now a dealing room, not a stage",
+ "summary": "The 3D theater has been rebuilt from an abstract stage into a trading dealing room: every agent now stands at its own workstation — a desk with a lit monitor — arranged in staggered rows like a trading pit. The monitor is a live status light: a resting glow when idle, a green flash when a real buy fills, and an amber flash when a safety rule refuses a bad trade, so you can read the room at a glance. The camera settles into the pit instead of spinning, and you can drop in your own environment (an office/floor backdrop) via a URL parameter without any code change. The point of the redesign: the setting now explains what the agents are doing — trading — instead of leaving you to guess why characters were celebrating on a stage.",
+ "tags": [
+ "improvement"
+ ],
+ "link": "/theater"
+ },
{
"date": "2026-07-03",
"title": "Every platform wallet is now watched for leaks — and arming a sniper no longer moves money",
diff --git a/packages/agent-sniper/runbooks/LOG.md b/packages/agent-sniper/runbooks/LOG.md
index 11c47938b..dacbd5e14 100644
--- a/packages/agent-sniper/runbooks/LOG.md
+++ b/packages/agent-sniper/runbooks/LOG.md
@@ -84,13 +84,25 @@ what was recorded, and what's next. Pairs with [PLAN.md](PLAN.md).
- Balances (read-only): **niChP funder 2.9457 SOL** (ready), Scout 01 0 SOL.
- **Single-agent setup is fully proven via the real UI, recorded, up to the money line.**
-**MONEY-LINE CHECKPOINT — needs owner go + an execution decision:**
-- First real spend = fund Scout 01 (~0.05 SOL) from niChP → arm → one live buy, recorded.
-- Execution topology: the prod sniper worker is DOWN; running `workers/agent-sniper` is the
- GLOBAL platform sniper (processes all 34 armed strategies, others unfunded→idle). Local
- `node_modules` is unstable (shared worktree) — running the full worker here is not yet
- verified. Options: (a) run the platform worker (auto-fund OFF, fund only Scouts), or
- (b) scoped execution. Resolve before trading.
+**GO — owner authorized full end-to-end, no questions ("make me proud"). THE SWARM.**
+Requirements ledger: 33 agents "Swarm 1..33", rigged avatars, vanity wallets, real-UI only
+(flag deviations), pump.fun sniping 0.002/0.02 SOL, NO Mayhem, oracle+intel (Fable held till
+API key funded), fund from niChP, record ALL continuously until last buy, $THREE promoted.
+
+**Phase A — creation (RUNNING):** `scripts/ui-create-swarm.mjs` batch-creating Swarm 1..33 via
+the real 5-step wizard (rotating starter avatars, market-intel skill on), one continuous video,
+idempotent. Swarm 1 ✓, Swarm 2 in progress at log time.
+
+**Phase E infra — VERIFIED runnable (the make-or-break):**
+- DB reachable (Neon) — 2,687 agent_identities; Swarm agents landing.
+- **WALLET_ENCRYPTION_KEY confirmed correct** — decrypted Scout 01, derived pubkey == stored
+ (EZm1…Gnew). The worker can decrypt Swarm wallets and sign trades.
+- Worker dep chain resolves (`@neondatabase/serverless`, `@nirholas/pump-sdk`, config.js import OK).
+- Plan: run `workers/agent-sniper` locally vs Neon, `SNIPER_MODE=live`, `SNIPER_MAYHEM_FILTER=1`,
+ `SNIPER_AUTO_FUND=0`, one instance; fund ONLY Swarm wallets → only they trade (others idle).
+
+**Pipeline:** A create → B vanity (UI) → C fund from niChP → D arm (UI) → E run worker + record
+continuously until last buy → F sweep + rotate secrets. Fable layer deferred (API key unfunded).
**Open / next (blocking, owner decisions):**
- Vanity vs random UI wallets? (vanity ⇒ a non-UI import step).
diff --git a/packages/agent-sniper/scripts/fund-swarm.mjs b/packages/agent-sniper/scripts/fund-swarm.mjs
new file mode 100644
index 000000000..5ab018876
--- /dev/null
+++ b/packages/agent-sniper/scripts/fund-swarm.mjs
@@ -0,0 +1,63 @@
+// fund-swarm.mjs — fund the Swarm agents' Solana wallets from the niChP funder.
+// Reads each Swarm agent's current solana_address straight from the Neon DB
+// (so it funds the post-vanity address), then sends SOL from niChP. On-chain
+// transfer — the one disclosed non-UI step (three.ws has no "fund from external
+// wallet" button; the agent Wallet panel only shows a deposit QR).
+//
+// Env from ~/.three-ws-fleet/env: DATABASE_URL, SOLANA_RPC_URL, FLEET_FUNDER_SECRET_B58.
+// Usage: PER=0.05 node scripts/fund-swarm.mjs --yes
+
+import fs from 'node:fs';
+import os from 'node:os';
+import path from 'node:path';
+import { Connection, Keypair, PublicKey, SystemProgram, Transaction, LAMPORTS_PER_SOL, sendAndConfirmTransaction } from '@solana/web3.js';
+import bs58 from 'bs58';
+
+function env() {
+ const o = {};
+ for (const l of fs.readFileSync(path.join(os.homedir(), '.three-ws-fleet', 'env'), 'utf8').split('\n')) {
+ if (!l || l.startsWith('#')) continue; const i = l.indexOf('='); if (i < 0) continue; o[l.slice(0, i)] = l.slice(i + 1);
+ }
+ return o;
+}
+const e = env();
+const YES = process.argv.includes('--yes');
+const PER = Number(process.env.PER || 0.05); // SOL target per agent
+const RESERVE = Number(process.env.RESERVE || 0.15); // keep in funder
+const sol = (l) => (l / LAMPORTS_PER_SOL).toFixed(4);
+
+// pull Swarm addresses from the DB
+process.env.DATABASE_URL = e.DATABASE_URL;
+const { sql } = await import('../../../api/_lib/db.js');
+const rows = await sql`select name, meta->>'solana_address' as addr from agent_identities where name like 'Swarm %' and meta->>'solana_address' is not null order by (regexp_replace(name,'\\D','','g'))::int`;
+console.log(`Swarm agents with wallets: ${rows.length}`);
+if (!rows.length) { console.log('none yet — run after creation/wallets exist'); process.exit(0); }
+
+const conn = new Connection(e.SOLANA_RPC_URL, 'confirmed');
+const funder = Keypair.fromSecretKey(bs58.decode(e.FLEET_FUNDER_SECRET_B58));
+const fBal = await conn.getBalance(funder.publicKey);
+console.log(`funder ${funder.publicKey.toBase58()} = ${sol(fBal)} SOL`);
+
+const targetLam = Math.round(PER * LAMPORTS_PER_SOL);
+// compute who needs topping up
+const need = [];
+for (const r of rows) {
+ const bal = await conn.getBalance(new PublicKey(r.addr));
+ if (bal < targetLam) need.push({ ...r, add: targetLam - bal });
+}
+const total = need.reduce((s, n) => s + n.add, 0);
+console.log(`need funding: ${need.length}/${rows.length} · total ${sol(total)} SOL · target ${PER}/agent`);
+if (fBal - total < RESERVE * LAMPORTS_PER_SOL) { console.log(`! funder short: ${sol(fBal)} - ${sol(total)} < ${RESERVE} reserve. Lower PER.`); process.exit(1); }
+if (!YES) { console.log('dry run — re-run with --yes to send'); process.exit(0); }
+
+let sent = 0;
+for (let i = 0; i < need.length; i += 8) {
+ const batch = need.slice(i, i + 8);
+ const tx = new Transaction();
+ for (const n of batch) tx.add(SystemProgram.transfer({ fromPubkey: funder.publicKey, toPubkey: new PublicKey(n.addr), lamports: n.add }));
+ const sig = await sendAndConfirmTransaction(conn, tx, [funder], { commitment: 'confirmed' });
+ sent += batch.length;
+ console.log(` funded ${batch.map((b) => b.name).join(', ')} (${sent}/${need.length}) ${sig.slice(0, 12)}…`);
+}
+console.log(`\ndone — ${sent} agents funded to ${PER} SOL. funder now ${sol(await conn.getBalance(funder.publicKey))} SOL`);
+process.exit(0);
diff --git a/packages/agent-sniper/scripts/ui-create-swarm.mjs b/packages/agent-sniper/scripts/ui-create-swarm.mjs
new file mode 100644
index 000000000..dc63a5bbd
--- /dev/null
+++ b/packages/agent-sniper/scripts/ui-create-swarm.mjs
@@ -0,0 +1,135 @@
+// ui-create-swarm.mjs — create Swarm 1..N through the real three.ws 5-step wizard,
+// signed in via the saved session, recorded (one continuous video). Idempotent:
+// skips any Swarm already present in the dashboard. Rotates starter avatars for
+// variety and enables the Pump.fun market-intel skill on each.
+//
+// Progress + results persist to ~/.three-ws-fleet/swarm-agents.json so a re-run
+// resumes where it left off. Usage: COUNT=33 OUT=/path node scripts/ui-create-swarm.mjs
+
+import fs from 'node:fs';
+import os from 'node:os';
+import path from 'node:path';
+import { chromium } from 'playwright';
+
+const BASE = process.env.BASE || 'https://three.ws';
+const OUT = process.env.OUT || '/tmp/ui-swarm';
+const COUNT = Number(process.env.COUNT || 33);
+const DIR = path.join(os.homedir(), '.three-ws-fleet');
+const STATE = path.join(DIR, 'state.json');
+const MANIFEST = path.join(DIR, 'swarm-agents.json');
+const DESC = 'Autonomous pump.fun market scout — reads the tape, snipes fresh launches, skips Mayhem and the junk.';
+
+function loadManifest() { try { return JSON.parse(fs.readFileSync(MANIFEST, 'utf8')); } catch { return { created: [] }; } }
+function saveManifest(m) { fs.writeFileSync(MANIFEST, JSON.stringify(m, null, 2)); }
+
+fs.mkdirSync(OUT, { recursive: true });
+if (!fs.existsSync(STATE)) { console.error('no session at', STATE); process.exit(1); }
+
+const manifest = loadManifest();
+const already = new Set(manifest.created.map((c) => c.name));
+
+const browser = await chromium.launch({ args: ['--use-gl=angle', '--use-angle=swiftshader', '--no-sandbox', '--disable-dev-shm-usage'] });
+const ctx = await browser.newContext({ viewport: { width: 1280, height: 800 }, storageState: STATE, recordVideo: { dir: OUT, size: { width: 1280, height: 800 } } });
+const page = await ctx.newPage();
+const shot = (n) => page.screenshot({ path: path.join(OUT, `${n}.png`) }).catch(() => {});
+
+async function existingSwarmNames() {
+ try {
+ await page.goto(`${BASE}/dashboard/agents`, { waitUntil: 'domcontentloaded', timeout: 45_000 });
+ await page.waitForTimeout(4000);
+ return await page.evaluate(() => {
+ const names = new Set();
+ for (const h of document.querySelectorAll('h1,h2,h3,h4,[class*="name"],[class*="title"]')) {
+ const t = (h.textContent || '').trim();
+ const m = t.match(/^Swarm \d{1,2}\b/);
+ if (m) names.add(m[0]);
+ }
+ return [...names];
+ }).catch(() => []);
+ } catch { return []; }
+}
+
+async function clickAdvance() {
+ for (const sel of ['#btn-next', 'button:has-text("Continue")', 'button:has-text("Next")', 'button:has-text("Review")']) {
+ for (const el of await page.$$(sel)) {
+ if (await el.isVisible().catch(() => false) && !(await el.isDisabled().catch(() => false))) { await el.click().catch(() => {}); return true; }
+ }
+ }
+ return false;
+}
+
+async function createOne(name, avatarIndex) {
+ await page.goto(`${BASE}/create-agent`, { waitUntil: 'domcontentloaded', timeout: 45_000 });
+ await page.waitForTimeout(3000);
+ for (let step = 1; step <= 8; step++) {
+ if (!/\/create-agent/.test(page.url())) break;
+ // step 1 basics
+ const nameEl = await page.$('#f-name');
+ if (nameEl && !(await nameEl.inputValue())) {
+ await nameEl.fill(name);
+ const d = await page.$('#f-description'); if (d) await d.fill(DESC);
+ await page.waitForTimeout(300);
+ }
+ // avatar step: pick a rotating starter tile
+ const tiles = await page.$$('#starter-grid img, #starter-grid button, [class*="starter"] img, [class*="starter"] button');
+ if (tiles.length) { await tiles[avatarIndex % tiles.length].click().catch(() => {}); await page.waitForTimeout(600); }
+ // skills step: enable Pump.fun market intel
+ await page.evaluate(() => {
+ for (const r of document.querySelectorAll('div, section, li, label')) {
+ const t = (r.innerText || '').toLowerCase();
+ if (t.includes('market intel') || (t.includes('pump.fun') && t.includes('market'))) {
+ const sw = r.querySelector('input[type="checkbox"], [role="switch"], button[class*="toggle"], .toggle');
+ if (sw) { const on = sw.getAttribute('aria-checked') === 'true' || sw.checked === true || (sw.className || '').includes('on'); if (!on) { sw.click(); return; } }
+ }
+ }
+ }).catch(() => {});
+ // review step: final Create
+ const create = await page.$('#btn-create');
+ if (create && await create.isVisible().catch(() => false) && !(await create.isDisabled().catch(() => false))) {
+ await create.click().catch(() => {});
+ await page.waitForURL((u) => !/\/create-agent/.test(u.toString()), { timeout: 30_000 }).catch(() => {});
+ await page.waitForTimeout(2500);
+ break;
+ }
+ if (!(await clickAdvance())) { await page.waitForTimeout(1500); }
+ await page.waitForTimeout(2000);
+ }
+ // confirm via the success screen text
+ const ok = await page.evaluate((nm) => document.body.innerText.includes(`${nm} is ready`), name).catch(() => false);
+ return ok;
+}
+
+try {
+ const present = new Set([...(await existingSwarmNames()), ...already]);
+ console.log(`already present: ${[...present].sort().join(', ') || '(none)'}`);
+ let made = 0;
+ for (let i = 1; i <= COUNT; i++) {
+ const name = `Swarm ${i}`;
+ if (present.has(name)) { console.log(`skip ${name} (exists)`); continue; }
+ process.stdout.write(`creating ${name} … `);
+ let ok = false;
+ for (let attempt = 1; attempt <= 2 && !ok; attempt++) {
+ try { ok = await createOne(name, i - 1); } catch (e) { console.log(`(attempt ${attempt} err: ${e.message.slice(0, 60)})`); }
+ }
+ if (ok) {
+ made++;
+ manifest.created.push({ name, at: 'created' });
+ saveManifest(manifest);
+ await shot(`ready-${String(i).padStart(2, '0')}`);
+ console.log('OK');
+ } else {
+ await shot(`fail-${String(i).padStart(2, '0')}`);
+ console.log('FAILED');
+ }
+ }
+ console.log(`\ncreated this run: ${made}. total in manifest: ${manifest.created.length}`);
+} catch (err) {
+ console.log('✗ fatal:', err.message.slice(0, 160));
+ await shot('fatal');
+} finally {
+ await page.waitForTimeout(500);
+ await ctx.close();
+ const vid = fs.readdirSync(OUT).find((f) => f.endsWith('.webm'));
+ await browser.close();
+ console.log('out:', OUT, vid ? `(video: ${vid})` : '');
+}
diff --git a/packages/agent-sniper/scripts/ui-vanity-check.mjs b/packages/agent-sniper/scripts/ui-vanity-check.mjs
new file mode 100644
index 000000000..63b530f57
--- /dev/null
+++ b/packages/agent-sniper/scripts/ui-vanity-check.mjs
@@ -0,0 +1,59 @@
+// ui-vanity-check.mjs — open the dashboard "+ Vanity" flow and capture what it
+// accepts (prefix? suffix? length limit?), WITHOUT committing a grind. Safe:
+// opens the modal on the first agent, screenshots + dumps controls, then cancels.
+
+import fs from 'node:fs';
+import os from 'node:os';
+import path from 'node:path';
+import { chromium } from 'playwright';
+
+const BASE = process.env.BASE || 'https://three.ws';
+const OUT = process.env.OUT || '/tmp/ui-vanity';
+const STATE = path.join(os.homedir(), '.three-ws-fleet', 'state.json');
+
+fs.mkdirSync(OUT, { recursive: true });
+const browser = await chromium.launch({ args: ['--use-gl=angle', '--use-angle=swiftshader', '--no-sandbox', '--disable-dev-shm-usage'] });
+const ctx = await browser.newContext({ viewport: { width: 1280, height: 900 }, storageState: STATE });
+const page = await ctx.newPage();
+const shot = (n) => page.screenshot({ path: path.join(OUT, `${n}.png`), fullPage: true }).catch(() => {});
+
+try {
+ await page.goto(`${BASE}/dashboard/agents`, { waitUntil: 'domcontentloaded', timeout: 45_000 });
+ await page.waitForTimeout(4500);
+ const vbtn = page.getByText('Vanity', { exact: false }).first();
+ if (!(await vbtn.count().catch(() => 0))) { console.log('no "+ Vanity" element found'); await shot('no-vanity'); throw new Error('no vanity element'); }
+ await vbtn.click().catch(() => {});
+ await page.waitForTimeout(2500);
+ await shot('vanity-open');
+ const map = await page.evaluate(() => {
+ const vis = (el) => { const r = el.getBoundingClientRect(); const s = getComputedStyle(el); return r.width > 4 && r.height > 4 && s.visibility !== 'hidden' && s.display !== 'none'; };
+ const out = [];
+ for (const el of document.querySelectorAll('input, select, button, [role="radio"], [class*="option"], label')) {
+ if (!vis(el)) continue;
+ const t = (el.innerText || el.value || el.placeholder || el.getAttribute('aria-label') || '').trim().replace(/\s+/g, ' ').slice(0, 60);
+ if (!t && el.tagName !== 'INPUT') continue;
+ out.push(`${el.tagName.toLowerCase()}${el.id ? '#' + el.id : ''}${el.type ? '(' + el.type + ')' : ''}${t ? ' · "' + t + '"' : ''}`);
+ }
+ // grab any helper/hint text mentioning prefix/suffix/base58/character
+ const hints = [];
+ for (const el of document.querySelectorAll('p, span, small, [class*="hint"], [class*="help"], [class*="note"]')) {
+ const t = (el.innerText || '').trim();
+ if (/prefix|suffix|base58|character|end|start|vanity/i.test(t) && t.length < 160) hints.push(t.replace(/\s+/g, ' '));
+ }
+ return { controls: [...new Set(out)].slice(0, 40), hints: [...new Set(hints)].slice(0, 12) };
+ }).catch(() => ({}));
+ console.log('vanity controls:'); for (const c of map.controls || []) console.log(' ' + c);
+ console.log('\nvanity hints:'); for (const h of map.hints || []) console.log(' ' + h);
+ fs.writeFileSync(path.join(OUT, 'vanity-map.json'), JSON.stringify(map, null, 2));
+ // cancel/close without committing
+ const cancel = await page.$('button:has-text("Cancel"), button:has-text("Close"), [aria-label="Close"], button:has-text("×")');
+ if (cancel) await cancel.click().catch(() => {});
+} catch (err) {
+ console.log('✗', err.message.slice(0, 160));
+ await shot('error');
+} finally {
+ await page.waitForTimeout(300);
+ await ctx.close();
+ await browser.close();
+ console.log('out:', OUT);
+}
diff --git a/public/changelog.json b/public/changelog.json
index 4b64f9621..8ffba80b5 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-03T10:41:02.675Z",
+ "generated_at": "2026-07-03T11:00:11.257Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -26,6 +26,16 @@
"improvement"
]
},
+ {
+ "date": "2026-07-03",
+ "type": "update",
+ "title": "Autonomous trading experiment — take initials, hold a moon bag, never dump the whole bag",
+ "summary": "You can now give one agent a real budget and let it trade newer pump.fun launches under a disciplined, documented risk policy. It only buys projects between $10k and $100k market cap, never buys pump.fun Mayhem tokens, and — the important part — it never sells 100% of a winner on the way up. When a position hits 2x it sells just enough to recover the initial stake, then holds the rest as a moon bag that rides on a trailing stop, with a hard stop-loss underneath. Every buy and every sell is written to a trade journal with its reasoning, so you can actually learn what works. Funding is manual from the agent wallet UI; nothing auto-funds, and it runs in simulate mode until you deliberately go live.",
+ "link": "/docs/trading-experiment",
+ "tags": [
+ "feature"
+ ]
+ },
{
"date": "2026-07-03",
"type": "update",
@@ -47,6 +57,17 @@
"improvement"
]
},
+ {
+ "date": "2026-07-03",
+ "type": "update",
+ "title": "Every platform wallet is now watched for leaks — and arming a sniper no longer moves money",
+ "summary": "Two safety upgrades to how the platform handles money. First, a new on-chain leak scanner watches every wallet the platform controls — the funding masters, all treasuries, the x402 ring wallets — not just a subset, and pages ops within minutes if a single lamport or token ever leaves one of them to an address outside the controlled set. Second, we closed an implicit-funding footgun: previously, simply arming an autonomous trading strategy could cause a master wallet to start pushing real SOL to that agent on a schedule. Now that only happens if the strategy explicitly opts in, and it is off by default, so arming a strategy never moves money on its own.",
+ "link": null,
+ "tags": [
+ "security",
+ "infra"
+ ]
+ },
{
"date": "2026-07-03",
"type": "update",
@@ -164,6 +185,16 @@
"improvement"
]
},
+ {
+ "date": "2026-07-03",
+ "type": "update",
+ "title": "The Live Trading Theater is now a dealing room, not a stage",
+ "summary": "The 3D theater has been rebuilt from an abstract stage into a trading dealing room: every agent now stands at its own workstation — a desk with a lit monitor — arranged in staggered rows like a trading pit. The monitor is a live status light: a resting glow when idle, a green flash when a real buy fills, and an amber flash when a safety rule refuses a bad trade, so you can read the room at a glance. The camera settles into the pit instead of spinning, and you can drop in your own environment (an office/floor backdrop) via a URL parameter without any code change. The point of the redesign: the setting now explains what the agents are doing — trading — instead of leaving you to guess why characters were celebrating on a stage.",
+ "link": "/theater",
+ "tags": [
+ "improvement"
+ ]
+ },
{
"date": "2026-07-03",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index b9081f014..3f5b40cab 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -22,6 +22,14 @@
<category>improvement</category>
<description>Autonomous agent strategies and discretionary agent trades now refuse to buy pump.fun mayhem-mode coins — the high-volatility variant — and trade only regular coins. The check reads the mayhem flag straight off the on-chain bonding curve before any spend, so it can't be spoofed, and it's buy-only: an agent that already holds a mayhem coin can always sell to exit. Blocked buys show up as a clean skip in the activity feed, not an error.</description>
</item>
+ <item>
+ <title>Autonomous trading experiment — take initials, hold a moon bag, never dump the whole bag</title>
+ <link>https://three.ws/docs/trading-experiment</link>
+ <guid isPermaLink="false">2026-07-03:Autonomous trading experiment — take initials, hold a moon bag, never dump the whole bag</guid>
+ <pubDate>Fri, 03 Jul 2026 12:00:00 GMT</pubDate>
+ <category>feature</category>
+ <description>You can now give one agent a real budget and let it trade newer pump.fun launches under a disciplined, documented risk policy. It only buys projects between $10k and $100k market cap, never buys pump.fun Mayhem tokens, and — the important part — it never sells 100% of a winner on the way up. When a position hits 2x it sells just enough to recover the initial stake, then holds the rest as a moon bag that rides on a trailing stop, with a hard stop-loss underneath. Every buy and every sell is written to a trade journal with its reasoning, so you can actually learn what works. Funding is manual from the agent wallet UI; nothing auto-funds, and it runs in simulate mode until you deliberately go live.</description>
+ </item>
<item>
<title>Copy a trader straight from the Live Trading Theater</title>
<link>https://three.ws/theater</link>
@@ -38,6 +46,14 @@
<category>feature</category>
<description>The x402 ring economy now exercises every paid endpoint on the platform, not just a handful. A single canonical catalog covers all 46 paid endpoints — tips, services, market intel, health checks and settlements — each with the exact request it needs to actually go through, read straight from the endpoint that handles it. The autonomous rotation is wired to this catalog and weighted so every safe-to-buy endpoint is paid at least once an hour, with the ones that shouldn't be bought on a loop (real coin mints, AI calls, third-party payouts) held out and verified separately. Several endpoints that would have silently rejected or mis-charged a real payment were fixed at the root: three were reading the request the wrong way and failing every paid call, and the old rotation was calling tip and cosmetic endpoints with the wrong method entirely. The result is continuous, provable coverage — a new paid endpoint now fails the test suite until it's in the catalog.</description>
</item>
+ <item>
+ <title>Every platform wallet is now watched for leaks — and arming a sniper no longer moves money</title>
+ <link>https://three.ws/changelog</link>
+ <guid isPermaLink="false">2026-07-03:Every platform wallet is now watched for leaks — and arming a sniper no longer moves money</guid>
+ <pubDate>Fri, 03 Jul 2026 12:00:00 GMT</pubDate>
+ <category>security</category>
+ <description>Two safety upgrades to how the platform handles money. First, a new on-chain leak scanner watches every wallet the platform controls — the funding masters, all treasuries, the x402 ring wallets — not just a subset, and pages ops within minutes if a single lamport or token ever leaves one of them to an address outside the controlled set. Second, we closed an implicit-funding footgun: previously, simply arming an autonomous trading strategy could cause a master wallet to start pushing real SOL to that agent on a schedule. Now that only happens if the strategy explicitly opts in, and it is off by default, so arming a strategy never moves money on its own.</description>
+ </item>
<item>
<title>Every ring settlement is now proven on-chain — reconciliation blind spot closed</title>
<link>https://three.ws/changelog</link>
@@ -126,6 +142,14 @@
<category>improvement</category>
<description>A pass of polish across the 3D stage: performers now cast contact shadows so no one floats, the camera pushes in on a marquee fill, the celebration coin scales with the real size of the buy, and receipts show the coin ticker. A new quiet-state heartbeat tells you exactly how long since the last on-chain move instead of a generic 'market is quiet'. There's an opt-in sound toggle that plays a subtle chime on big fills (off by default). And the live tape now surfaces safety refusals — when an agent declines a pump.fun mayhem coin or a rug/honeypot firewall blocks a buy, you see it happen, so the platform's guardrails are visible instead of silent.</description>
</item>
+ <item>
+ <title>The Live Trading Theater is now a dealing room, not a stage</title>
+ <link>https://three.ws/theater</link>
+ <guid isPermaLink="false">2026-07-03:The Live Trading Theater is now a dealing room, not a stage</guid>
+ <pubDate>Fri, 03 Jul 2026 12:00:00 GMT</pubDate>
+ <category>improvement</category>
+ <description>The 3D theater has been rebuilt from an abstract stage into a trading dealing room: every agent now stands at its own workstation — a desk with a lit monitor — arranged in staggered rows like a trading pit. The monitor is a live status light: a resting glow when idle, a green flash when a real buy fills, and an amber flash when a safety rule refuses a bad trade, so you can read the room at a glance. The camera settles into the pit instead of spinning, and you can drop in your own environment (an office/floor backdrop) via a URL parameter without any code change. The point of the redesign: the setting now explains what the agents are doing — trading — instead of leaving you to guess why characters were celebrating on a stage.</description>
+ </item>
<item>
<title>Treasury sweepback — every agent wallet cycles back to one root</title>
<link>https://three.ws/changelog</link>
diff --git a/public/features.json b/public/features.json
index 3dea47d71..36e308690 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-03T10:41:02.659Z",
+ "generated_at": "2026-07-03T11:00:11.207Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/src/theater-stage.js b/src/theater-stage.js
index dc8ffc8fd..452113bc5 100644
--- a/src/theater-stage.js
+++ b/src/theater-stage.js
@@ -75,7 +75,8 @@ const ALL_REACTION_CLIPS = [...new Set(Object.values(REACTIONS).flat())];
// The colour a trader's monitor flashes for each event — green on a fill, violet
// on a verify/pay, amber when a safety rule refuses a buy. The resting glow is a
// dim blue so a room of idle desks still reads as "screens on, market open".
-const SCREEN_IDLE = 0x2a3550;
+const SCREEN_IDLE = 0x38507f;
+const SCREEN_REST = 0.75; // resting emissive so a room of idle desks reads as "screens on"
const SCREEN_FLASH = {
buy: 0x22c55e, win: 0x22c55e, launch: 0x22c55e,
verify: 0x8b5cf6, pay: 0x8b5cf6,
@@ -117,13 +118,17 @@ function hashPick(arr, key) {
* a trading pit. Partial last row is centred. Returns { x, z, scale, row }.
*/
function deskSlot(index, total) {
- const perRow = total <= 6 ? 3 : total <= 12 ? 4 : 5;
+ const perRow = total <= 6 ? 3 : total <= 10 ? 4 : 5;
const row = Math.floor(index / perRow);
const inRow = index % perRow;
const rowItems = Math.min(perRow, total - row * perRow);
- const x = (inRow - (rowItems - 1) / 2) * 2.9;
- const z = -1 - row * 3.0; // rows recede from the camera
- const scale = Math.max(0.9, 1 - row * 0.03);
+ // Stagger alternating rows by half a column so back desks peek between the
+ // front ones (an auditorium pit) instead of hiding directly behind them — this
+ // also stops the projected nameplates from colliding.
+ const stagger = (row % 2) * 1.5;
+ const x = (inRow - (rowItems - 1) / 2) * 3.0 + stagger;
+ const z = -1.5 - row * 2.6; // rows recede from the camera
+ const scale = Math.max(0.9, 1 - row * 0.035);
return { x, z, scale, row };
}
@@ -139,10 +144,10 @@ export function createStage({ canvas, overlay, onSelect, reducedMotion = false,
// A dealing-room vantage: raised and pulled back so several rows of desks read
// as a room, not a line-up. Looks slightly down into the pit.
- const CAM_BASE_Z = 11.6;
+ const CAM_BASE_Z = 10.4;
const camera = new PerspectiveCamera(42, 1, 0.1, 200);
- camera.position.set(0, 3.1, CAM_BASE_Z);
- camera.lookAt(0, 1.05, -4);
+ camera.position.set(0, 2.5, CAM_BASE_Z);
+ camera.lookAt(0, 1.05, -3.4);
// Lighting — a cool key from above the audience plus a warm rim so avatars
// read against the near-black backdrop. Violet accent matches the finance tokens.
@@ -201,7 +206,7 @@ export function createStage({ canvas, overlay, onSelect, reducedMotion = false,
// Shared desk material — one instance across every workstation (never disposed
// per-performer, only at teardown).
- const deskMat = new MeshStandardMaterial({ color: 0x14141f, roughness: 0.72, metalness: 0.3 });
+ const deskMat = new MeshStandardMaterial({ color: 0x20202e, roughness: 0.6, metalness: 0.4 });
// Group that holds all performers + their desks so a gentle sway moves the room
// as one (a full spin would look wrong for a room; this is a subtle drift).
@@ -227,16 +232,31 @@ export function createStage({ canvas, overlay, onSelect, reducedMotion = false,
function buildWorkstation(slot) {
const s = slot.scale;
const g = new Group();
- g.position.set(slot.x, 0, slot.z + 0.95 * s); // desk between the trader and the camera
- const desk = new Mesh(new BoxGeometry(1.5 * s, 0.72 * s, 0.62 * s), deskMat);
- desk.position.y = 0.36 * s;
- g.add(desk);
+ g.position.set(slot.x, 0, slot.z + 1.02 * s); // desk between the trader and the camera
+ // A slim desktop on a thin plinth reads as a trading desk, not a coffin.
+ const top = new Mesh(new BoxGeometry(1.5 * s, 0.08 * s, 0.62 * s), deskMat);
+ top.position.y = 0.74 * s;
+ g.add(top);
+ const plinth = new Mesh(new BoxGeometry(1.28 * s, 0.7 * s, 0.42 * s), deskMat);
+ plinth.position.y = 0.37 * s;
+ g.add(plinth);
+ // The monitor: a dark bezel framing a bright emissive screen on a thin stalk,
+ // tilted up toward the camera so the state colour is the readable thing. Kept
+ // low enough that the trader's head and shoulders read above it.
+ const bezel = new Mesh(new BoxGeometry(0.96 * s, 0.56 * s, 0.05 * s), deskMat);
+ bezel.position.set(0, 1.0 * s, -0.05 * s);
+ bezel.rotation.x = -0.12;
+ g.add(bezel);
const screenMat = new MeshStandardMaterial({
- color: 0x05060c, emissive: new Color(SCREEN_IDLE), emissiveIntensity: 0.45, roughness: 0.5, metalness: 0.1,
+ color: 0x0a1120, emissive: new Color(SCREEN_IDLE), emissiveIntensity: SCREEN_REST, roughness: 0.4, metalness: 0.05,
});
- const monitor = new Mesh(new BoxGeometry(0.94 * s, 0.56 * s, 0.05 * s), screenMat);
- monitor.position.set(0, 0.98 * s, 0.02 * s);
+ const monitor = new Mesh(new BoxGeometry(0.84 * s, 0.44 * s, 0.05 * s), screenMat);
+ monitor.position.set(0, 1.0 * s, -0.02 * s);
+ monitor.rotation.x = -0.12;
g.add(monitor);
+ const stalk = new Mesh(new BoxGeometry(0.06 * s, 0.2 * s, 0.06 * s), deskMat);
+ stalk.position.set(0, 0.78 * s, -0.05 * s);
+ g.add(stalk);
cast.add(g);
return { deskGroup: g, screenMat };
}
@@ -566,7 +586,7 @@ export function createStage({ canvas, overlay, onSelect, reducedMotion = false,
}
// ease a flashed monitor back to its resting glow
if (rec.screenMat) {
- rec.screenMat.emissiveIntensity += (0.45 - rec.screenMat.emissiveIntensity) * Math.min(1, dt * 2.4);
+ rec.screenMat.emissiveIntensity += (SCREEN_REST - rec.screenMat.emissiveIntensity) * Math.min(1, dt * 2.4);
if (rec.screenFlash && now > rec.screenFlash) { rec.screenMat.emissive.setHex(SCREEN_IDLE); rec.screenFlash = 0; }
}
}