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
docs(mcp): publish the copy_subscribe update-semantics note and drop the trader audit probes
nirholas269b0ff04c8b
diff --git a/.trader-audit-check.mjs b/.trader-audit-check.mjsdeleted file mode 100644index 2c14244ae..000000000--- a/.trader-audit-check.mjs+++ /dev/null@@ -1,13 +0,0 @@-import { Pool, neonConfig } from '@neondatabase/serverless';-import ws from 'ws';-neonConfig.webSocketConstructor = ws;-neonConfig.wsProxy = () => '127.0.0.1:54490/v2';-neonConfig.useSecureWebSocket = false;-neonConfig.pipelineConnect = false;-const pool = new Pool({ connectionString: 'postgres://postgres:[email protected]:5432/main' });-const q = async (t, p) => (await pool.query(t, p)).rows;-console.log('copy_subscriptions cols:', (await q(`select column_name from information_schema.columns where table_name='copy_subscriptions' order by 1`)).map(r=>r.column_name).join(','));-console.log('agent_identities has deleted_at:', (await q(`select 1 from information_schema.columns where table_name='agent_identities' and column_name='deleted_at'`)).length === 1);-console.log('agent_identities has profile_image_url:', (await q(`select 1 from information_schema.columns where table_name='agent_identities' and column_name='profile_image_url'`)).length === 1);-console.log('copy_executions cols:', (await q(`select column_name from information_schema.columns where table_name='copy_executions' order by 1`)).map(r=>r.column_name).join(','));-await pool.end();diff --git a/.trader-audit-db.mjs b/.trader-audit-db.mjsdeleted file mode 100644index 032744ea3..000000000--- a/.trader-audit-db.mjs+++ /dev/null@@ -1,42 +0,0 @@-import { readFileSync } from 'node:fs';-import { Pool, neonConfig } from '@neondatabase/serverless';-import ws from 'ws';--neonConfig.webSocketConstructor = ws;-neonConfig.wsProxy = () => '127.0.0.1:54490/v2';-neonConfig.useSecureWebSocket = false;-neonConfig.pipelineConnect = false;--// Split a .sql file into top-level statements. Handles $$ ... $$ bodies and-// single-quoted strings so a semicolon inside either does not split.-function statements(text) {- const out = [];- let buf = '';- let inDollar = false;- let inQuote = false;- let inLineComment = false;- for (let i = 0; i < text.length; i++) {- const c = text[i];- const next2 = text.slice(i, i + 2);- if (inLineComment) { buf += c; if (c === '\n') inLineComment = false; continue; }- if (!inQuote && !inDollar && next2 === '--') { inLineComment = true; buf += c; continue; }- if (!inQuote && next2 === '$$') { inDollar = !inDollar; buf += next2; i++; continue; }- if (!inDollar && c === "'") { inQuote = !inQuote; buf += c; continue; }- if (c === ';' && !inDollar && !inQuote) { out.push(buf); buf = ''; continue; }- buf += c;- }- if (buf.trim()) out.push(buf);- return out.map((s) => s.trim()).filter((s) => s && !/^(--|\/\*)/.test(s) === true || s.length > 0).filter((s) => s.replace(/--[^\n]*\n/g, '').trim().length > 0);-}--const pool = new Pool({ connectionString: 'postgres://postgres:[email protected]:5432/main' });-let ok = 0; const failures = [];-for (const f of process.argv.slice(2)) {- for (const stmt of statements(readFileSync(f, 'utf8'))) {- try { await pool.query(stmt); ok++; }- catch (err) { failures.push(`${f}: ${err.message.slice(0, 120)} :: ${stmt.slice(0, 90).replace(/\s+/g, ' ')}`); }- }-}-console.log('statements applied:', ok, 'failed:', failures.length);-for (const f of failures.slice(0, 25)) console.log(' x', f);-await pool.end();diff --git a/.trader-audit-keys.mjs b/.trader-audit-keys.mjsdeleted file mode 100644index 4eb56a248..000000000--- a/.trader-audit-keys.mjs+++ /dev/null@@ -1,14 +0,0 @@-import { neonConfig } from '@neondatabase/serverless';-neonConfig.fetchEndpoint = 'http://127.0.0.1:54490/sql';-neonConfig.useSecureWebSocket = false;-process.env.DATABASE_URL = 'postgres://postgres:[email protected]:5432/main';-const { toolDefs } = await import('./api/_mcp/tools/trader.js');-const profile = toolDefs.find((t) => t.name === 'trader_profile');-const r = await profile.handler(- { agent_id: '22222222-2222-4222-8222-222222222222', window: 'all' },- { userId: null, rateKey: null, scope: '' },-);-const p = r.structuredContent;-console.log('recent_trades:', JSON.stringify(p.recent_trades, null, 1));-console.log('open_positions:', JSON.stringify(p.open_positions, null, 1));-console.log('win_rate_pct:', p.metrics.win_rate_pct, 'recommendation:', p.recommendation);diff --git a/.trader-audit-run.mjs b/.trader-audit-run.mjsdeleted file mode 100644index e707d0ae3..000000000--- a/.trader-audit-run.mjs+++ /dev/null@@ -1,76 +0,0 @@-// Live exercise of api/_mcp/tools/trader.js against a real Postgres 16 reached-// through the Neon HTTP driver (local-neon-http-proxy). No stubs: the handlers-// run their real SQL against the repo's real schema.-import { neonConfig } from '@neondatabase/serverless';-neonConfig.fetchEndpoint = 'http://127.0.0.1:54490/sql';-neonConfig.useSecureWebSocket = false;-process.env.DATABASE_URL = 'postgres://postgres:[email protected]:5432/main';--const { sql } = await import('./api/_lib/db.js');-const { toolDefs } = await import('./api/_mcp/tools/trader.js');-const byName = Object.fromEntries(toolDefs.map((t) => [t.name, t]));--const USER = '11111111-1111-4111-8111-111111111111';-const LEADER = '22222222-2222-4222-8222-222222222222';-const PRIVATE = '33333333-3333-4333-8333-333333333333';-const WALLET = 'FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump';-const LEADERW = 'THREEsynthetic1111111111111111111111111111';--await sql`delete from copy_subscriptions where copier_user_id = ${USER}`;-await sql`delete from agent_sniper_positions where agent_id in (${LEADER}, ${PRIVATE})`;-await sql`delete from agent_identities where id in (${LEADER}, ${PRIVATE})`;-await sql`delete from users where id = ${USER}`;-await sql`insert into users (id, email) values (${USER}, '[email protected]')`;-await sql`insert into agent_identities (id, user_id, name, is_public)- values (${LEADER}, ${USER}, 'Audit Leader', true)`;-await sql`insert into agent_identities (id, user_id, name, is_public)- values (${PRIVATE}, ${USER}, 'Private Leader', false)`;-const [strategy] = await sql`insert into agent_sniper_strategies (agent_id, user_id, network, per_trade_lamports)- values (${LEADER}, ${USER}, 'mainnet', 100000000) returning id`;--// Two closed wins and one open position, all with real lamport columns.-const mk = (mint, pnl, closed) => sql`- insert into agent_sniper_positions- (strategy_id, user_id, agent_id, wallet, mint, symbol, name, network, status,- entry_quote_lamports, exit_quote_lamports, realized_pnl_lamports, realized_pnl_pct,- buy_sig, sell_sig, opened_at, closed_at)- values (${strategy.id}, ${USER}, ${LEADER}, ${LEADERW}, ${mint}, 'AUD', 'Audit Coin', 'mainnet', ${closed ? 'closed' : 'open'},- ${1_000_000_000}, ${closed ? 1_000_000_000 + pnl : null}, ${closed ? pnl : null}, ${closed ? (pnl / 1e9) * 100 : null},- ${'buysig' + mint}, ${closed ? 'sellsig' + mint : null}, now() - interval '2 days', ${closed ? new Date().toISOString() : null})`;-await mk('THREEsynthetica111111111111111111111111111', 400_000_000, true);-await mk('THREEsyntheticb111111111111111111111111111', 250_000_000, true);-await mk('THREEsyntheticc111111111111111111111111111', 0, false);--const authed = { userId: USER, rateKey: null, scope: 'agents:read agents:write' };-const anon = { userId: null, rateKey: null, scope: '' };--const show = (label, r) => {- const text = r.content?.[0]?.text ?? '';- console.log(`\n### ${label} ${r.isError ? '[isError]' : '[ok]'}\n${text.slice(0, 900)}`);-};--show('trader_leaderboard (real board)', await byName.trader_leaderboard.handler({ limit: 5, window: 'all' }, anon));-show('trader_profile (real agent)', await byName.trader_profile.handler({ agent_id: LEADER, window: 'all' }, anon));-show('trader_profile (bad uuid)', await byName.trader_profile.handler({ agent_id: 'nope' }, anon));-show('trader_profile (unknown uuid)', await byName.trader_profile.handler({ agent_id: '44444444-4444-4444-8444-444444444444' }, anon));-show('trader_profile (private agent)', await byName.trader_profile.handler({ agent_id: PRIVATE }, anon));-show('copy_status (anonymous)', await byName.copy_status.handler({}, anon));-show('copy_status (empty)', await byName.copy_status.handler({}, authed));-show('copy_subscribe (bad wallet)', await byName.copy_subscribe.handler({ leader_agent_id: LEADER, copier_wallet: 'nope' }, authed));-show('copy_subscribe (bad config)', await byName.copy_subscribe.handler({ leader_agent_id: LEADER, copier_wallet: WALLET, sizing_rule: 'fixed', fixed_sol: 0, per_trade_cap_sol: 1, daily_budget_sol: 1 }, authed));-show('copy_subscribe (private leader)', await byName.copy_subscribe.handler({ leader_agent_id: PRIVATE, copier_wallet: WALLET, fixed_sol: 0.1 }, authed));-show('copy_subscribe (create)', await byName.copy_subscribe.handler({ leader_agent_id: LEADER, copier_wallet: WALLET, fixed_sol: 0.1, per_trade_cap_sol: 0.2, daily_budget_sol: 1, telegram_chat_id: '-1002233445566', perf_fee_bps: 500 }, authed));-show('copy_subscribe (update, same key)', await byName.copy_subscribe.handler({ leader_agent_id: LEADER, copier_wallet: WALLET, sizing_rule: 'multiplier', multiplier: 2, per_trade_cap_sol: 0.3, daily_budget_sol: 2 }, authed));-show('copy_status (populated)', await byName.copy_status.handler({}, authed));--const [row] = await sql`select telegram_chat_id, leader_wallet, perf_fee_bps, sizing_rule, multiplier- from copy_subscriptions where copier_user_id = ${USER}`;-console.log('\n### persisted row:', JSON.stringify(row));--const concurrent = await Promise.all([- byName.copy_subscribe.handler({ leader_agent_id: LEADER, copier_wallet: WALLET, fixed_sol: 0.11, per_trade_cap_sol: 0.2, daily_budget_sol: 1 }, authed),- byName.copy_subscribe.handler({ leader_agent_id: LEADER, copier_wallet: WALLET, fixed_sol: 0.12, per_trade_cap_sol: 0.2, daily_budget_sol: 1 }, authed),-]);-console.log('\n### concurrent upserts isError flags:', concurrent.map((r) => !!r.isError));-const [count] = await sql`select count(*)::int as n from copy_subscriptions where copier_user_id = ${USER}`;-console.log('### rows after concurrent upserts:', count.n);diff --git a/CHANGELOG.md b/CHANGELOG.mdindex e65024ecc..b595806fb 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -32,6 +32,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **The agent-wallet MCP tools explain a failed listing instead of returning a database error**: Publishing a paid endpoint with monetize_endpoint picks a short web address for the listing, and in the rare case where every attempt collided with an existing one, the tool passed the database's own unique-constraint text back to the calling agent, which read as an unexplained internal failure. It now answers with a named reason and plain advice (try a different name), in the same structured shape as every other refusal that tool can give, while the database detail goes to the logs only. The wallet tools' descriptions were also rewritten so their punctuation renders cleanly in every MCP client that shows them. (`/docs/mcp-tools`) `[fix, sdk]`- **The AI safety check stays available even when someone floods it with bad requests**: Every message and every autonomous money move an avatar makes is screened by the IBM Granite Guardian safety check before it runs. That check has an hourly platform-wide ceiling so one busy hour cannot run up an unbounded inference bill. The ceiling was being charged on every request that arrived, including ones that were rejected on the spot for a malformed body and never reached the safety model at all. A single client sending junk could therefore burn the whole platform hour and leave everyone else refused for real, valid checks. The ceiling is now charged only when an actual screening runs. Two error replies were also corrected: sending the wrong content type now answers 415 and an oversized body answers 413, instead of both being reported as generic bad input, so a caller can see which of the two to fix. (`/docs/ibm`) `[fix]`- **The CC0 object library answers a bad page request instead of quietly handing back the wrong page**: The free prop library behind /objects and the AR Studio Objects tray is also a public API anyone can page through. Ask it for a page size it cannot parse and it used to guess: a word where a number belongs silently returned a single object, a fractional page size handed back a fractional position to ask for next, and a page position sent without a page size was ignored outright. Every one of those looked like working pagination while quietly skipping or repeating props, so a script walking the whole catalogue could finish believing it had seen all 511 when it had not. Bad page requests now come back immediately as a clear error naming the parameter and the accepted range, while an oversized page still simply caps at the documented maximum. Separately, when the storage behind the library has a hiccup the endpoint still degrades to an empty list rather than an error page, but that emptiness is no longer cached for the next five minutes: the library reappears the moment storage recovers instead of staying blank long after. (`/objects`) `[fix, improvement]`+- **The copy-trading setup tool now states what a repeat call replaces and what it keeps**: Setting up copy-trading a second time for the same leader through an MCP agent updates the existing subscription instead of adding another, and the sizing rule, spend caps and performance fee are replaced by whatever that second call sends, so anything left out goes back to its default. The Oracle-score floor, the market-cap band and the Telegram alert route are the exception: they are kept as they were. None of that was written anywhere the calling agent could read it, so a copier who called the tool again only to change position sizing could end up with their per-trade cap back at the default without ever being told. The tool now spells out both halves in its own description and points at the copy dashboard as the place to clear the filters it preserves. (`/leaderboard`) `[docs, sdk]`- **The decentralized inference demo stops sending your prompt to a gateway that is no longer Livepeer**: The decentralized inference lab runs the same prompt through our own inference chain and through a Livepeer AI gateway, side by side. The free no-key gateway it used has not been Livepeer since early August: that hostname now points at an unrelated server. The demo kept posting prompts to it on every run and showing a bare connection error. It no longer dials that host at all. The decentralized card now reports the gateway as unavailable and names the two settings that bring it back (a Livepeer Studio key, or the address of a self-hosted gateway), and a self-hosted address is now honored by both this demo and the Forge Livepeer lane from one shared setting. The call also has a time limit, so a gateway that accepts the connection and then goes quiet can no longer hold up the reply from the other side of the comparison. (`/demos`) `[fix, improvement]`- **The extra views behind a 3D generation stop being rejected for the wrong file type**: Before a prompt becomes a 3D model, the forge draws a reference picture, then draws two more views of it so the reconstruction can see the sides and back instead of guessing them. Those extra views sent the reference picture to the image model labelled as a PNG no matter what it actually was, so a JPEG or WebP reference could be refused outright and you would quietly get fewer views and a rougher model. The real format is now read from the picture and sent with it. A reference that is unreachable, oversized, or not actually an image is now refused with a clear reason instead of being forwarded as-is and failing further down. And every image this step fetches, including the optional edit mask, now goes through the same address safety check the rest of the platform uses, so a supplied link cannot be aimed at an internal address. (`/create`) `[fix, security]`- **The Granite forecast tool now ships a copy-and-run example**: The IBM Granite forecasting tool on our x402 MCP endpoint advertised a two-point sample series, but the tool needs at least 64 points of history to forecast anything. Any agent that copied the published example got a validation error back instead of a forecast. The example is now a real 64-day daily series you can paste straight into a call, and it is identical on the hosted endpoint and in the @three-ws/ibm-x402-mcp package. A test now dials every published example through the server the way a client would, so a sample that does not actually work cannot ship again. (`/docs/ibm-x402-mcp`) `[fix, sdk]`@@ -429,7 +430,6 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **ASL Alphabet** (`/asl-alphabet`): The American manual alphabet on a live 3D avatar: every letter and number, what to look for, the look-alikes it is confused with, spell any word, and a drill for reading fingerspelling.- **Autonomous Trading** (`/trading`): The control room for three.ws autonomous trading: live fleet vitals, the agent scoreboard, the entry-to-exit pipeline, and every trading surface and doc in one place.- **Avatar CLI** (`/avatar-cli`): The @three-ws/avatar-cli package: scaffold a hash-anchored avatar manifest from a wallet and a GLB, validate it against the schema, and print an embed snippet. Offline, deterministic, and safe to run in a release script.-- **Docs · Economy Health Dashboard** (`/docs/economy-health-dashboard`): The operator dashboard that answers whether the Money Pulse is quiet and which link in the funding chain broke, plus the ranked diagnosis rules behind its verdict.- **Docs · MCP tool safety** (`/docs/mcp-safety`): What an MCP tool's safety annotations mean on three.ws and why you can trust them: read-only tools never change what you asked about, anything that spends is labelled as spending, and a build check verifies every hint against the tool's own code before it can ship.- **Docs · Repository guards** (`/docs/guards`): The local guards that protect this codebase in place of CI: what each one blocks, which stage runs it, and how to add a new one.- **Docs · The 10 SOL trading experiment** (`/docs/trading-experiment`): The full risk policy behind the autonomous fleet: entry band, position sizing, taking initials at 2x, the moon-bag floor, trailing and hard stops, and how to read the decision journal.diff --git a/data/changelog.json b/data/changelog.jsonindex 71dcc1477..fe9f26cd7 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,16 @@{"$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-08-13",+ "title": "The copy-trading setup tool now states what a repeat call replaces and what it keeps",+ "summary": "Setting up copy-trading a second time for the same leader through an MCP agent updates the existing subscription instead of adding another, and the sizing rule, spend caps and performance fee are replaced by whatever that second call sends, so anything left out goes back to its default. The Oracle-score floor, the market-cap band and the Telegram alert route are the exception: they are kept as they were. None of that was written anywhere the calling agent could read it, so a copier who called the tool again only to change position sizing could end up with their per-trade cap back at the default without ever being told. The tool now spells out both halves in its own description and points at the copy dashboard as the place to clear the filters it preserves.",+ "tags": [+ "docs",+ "sdk"+ ],+ "link": "/leaderboard"+ },{"date": "2026-08-13","title": "The agent-wallet MCP tools explain a failed listing instead of returning a database error",diff --git a/prompts/swarm-100/api-internal-mcp-03.md b/prompts/swarm-100/api-internal-mcp-03.mddeleted file mode 100644index 87b8e4cd3..000000000--- a/prompts/swarm-100/api-internal-mcp-03.md+++ /dev/null@@ -1,101 +0,0 @@-# API audit: api/_mcp batch 03 (1 files)--How to run: paste this file's repo path into a fresh Claude Code chat in this-repository and say "run this work order". This file is fully self-contained:-it depends on no other prompt file anywhere. If neighboring files in-prompts/swarm-100/ are gone, that work is done; if present, ignore them.-Every claim below rots; step 0 re-measures, and what you measure wins.--## Operating clause (binding)--- Read CLAUDE.md first. Its rules override everything, including this file.-- Finish 100% in this session. Never end the turn with a question, an option- list, or an unexecuted plan. A judgment call goes in one line of the final- report; it never becomes a question that halts work.-- The only permitted stops are the CLAUDE.md stop-and-ask gates: spending real- funds or any irreversible on-chain write, git push or a production deploy,- committing content that references a crypto project other than $THREE, and- destroying unrecoverable data.-- No mocks, no fake data, no placeholder stubs, no unfinished-work markers, no- commented-out code. Real APIs and real integrations only.-- The em-dash and en-dash characters are banned in everything you write.-- Concurrent agents share this worktree: stage explicit paths only (never a- bare add-everything), and commit finished work promptly.-- Before committing, run: npm run check:rules -- --paths <files you touched>.- It must exit 0.--## Step 0: re-derive the current state--1. Confirm each file below still exists; deleted ones are done, skip them.-2. For each, decide routability: grep its path in vercel.json and read how- server/index.mjs maps filesystem handlers. Routed files get an endpoint- audit; internal modules get a code and test audit.-3. Start a local server for endpoint checks: node server/index.mjs with .env- loaded, on a free PORT if 3000 is busy.--## Task: audit these api files, then fix everything found--Files in this batch:--- api/_mcp/tools/trader.js--For every routed handler:--1. Exercise it with curl against the local server: the success path returns- real data with the correct status; malformed input returns a 4xx JSON- error, never a stack trace or an HTML error page; auth is enforced where- the code intends it; CORS matches neighboring handlers.-2. Hard-rule scan: no mock fallbacks, no fake-data arrays, no stubbed- responses, no unfinished markers. Errors are handled at the boundary and- internal code trusts itself.-3. Do not spend funds or sign anything on-chain while probing. Payment and- trading handlers get their validation and error paths exercised, never a- live settlement.--For every internal (non-routed) module:--4. Something must import it; if nothing does, delete it as dead code (verify- with a repo-wide grep first).-5. Its main path and one failure path must be covered in tests/; add the- missing test if not.--## Definition of done--- [ ] Every listed file has recorded evidence: a curl transcript for routed- handlers, a passing test or a deletion for internal modules.-- [ ] Zero hard-rule violations remain in these files.-- [ ] vitest run passes; npm run check:rules -- --paths <touched files>- exits 0.--## Never blocked--| Blocker | Resolution (act, do not ask) |-|---|---|-| Missing env var or credential | Check .env and .env.local, then the Cloud Run service env, then Secret Manager (the CLAUDE.md self-unblock playbook has the exact commands). If it truly exists nowhere, wire the code fully behind the env var, prove the wiring with a dry run, and name the single missing var in the report. |-| gcloud not on PATH | Run: export PATH="$HOME/google-cloud-sdk/bin:$PATH" |-| Dev server port 3000 busy | Another agent may be serving this repo; probe it and reuse if so. Otherwise start your own on a free port: npx vite --port 3101 |-| Playwright browser missing | npx playwright install chromium |-| A surface needs a signed-in user | Register a fresh account through the real /register flow against the real API and use it. Never mock the session. |-| A defect sits in code you did not touch | Fix it if it blocks a Definition of done line (root cause it, never mask it). Otherwise note it in the report and continue. |-| An unrelated test is red | Same rule. Never pipe npm test through tail; it masks exit codes. |--## Close out (required)--1. Verify every Definition of done line with the actual command output in- front of you. Never claim a line you did not verify.-2. Commit with explicit paths and a subject that describes the diff (house- style: type(scope): what changed and why a reader cares).-3. Delete this prompt file in that same commit:-- git rm prompts/swarm-100/api-internal-mcp-03.md-- The shrinking directory is this campaign's only progress ledger; there is- no progress log to update.-4. Final report: what step 0 measured, what changed (file list), evidence per- Definition of done line, and any one-line judgment calls. No trailing- questions, no unexecuted plans.--If a line genuinely cannot pass inside this session (an external party must-respond, or an owner-gated action is the final step), finish everything else,-leave this file in place, and state exactly which line remains and who owns-it. Never delete this file on a partial.diff --git a/prompts/swarm-100/api-legal-01.md b/prompts/swarm-100/api-legal-01.mddeleted file mode 100644index 3b18502a5..000000000--- a/prompts/swarm-100/api-legal-01.md+++ /dev/null@@ -1,102 +0,0 @@-# API audit: api/legal batch 01 (2 files)--How to run: paste this file's repo path into a fresh Claude Code chat in this-repository and say "run this work order". This file is fully self-contained:-it depends on no other prompt file anywhere. If neighboring files in-prompts/swarm-100/ are gone, that work is done; if present, ignore them.-Every claim below rots; step 0 re-measures, and what you measure wins.--## Operating clause (binding)--- Read CLAUDE.md first. Its rules override everything, including this file.-- Finish 100% in this session. Never end the turn with a question, an option- list, or an unexecuted plan. A judgment call goes in one line of the final- report; it never becomes a question that halts work.-- The only permitted stops are the CLAUDE.md stop-and-ask gates: spending real- funds or any irreversible on-chain write, git push or a production deploy,- committing content that references a crypto project other than $THREE, and- destroying unrecoverable data.-- No mocks, no fake data, no placeholder stubs, no unfinished-work markers, no- commented-out code. Real APIs and real integrations only.-- The em-dash and en-dash characters are banned in everything you write.-- Concurrent agents share this worktree: stage explicit paths only (never a- bare add-everything), and commit finished work promptly.-- Before committing, run: npm run check:rules -- --paths <files you touched>.- It must exit 0.--## Step 0: re-derive the current state--1. Confirm each file below still exists; deleted ones are done, skip them.-2. For each, decide routability: grep its path in vercel.json and read how- server/index.mjs maps filesystem handlers. Routed files get an endpoint- audit; internal modules get a code and test audit.-3. Start a local server for endpoint checks: node server/index.mjs with .env- loaded, on a free PORT if 3000 is busy.--## Task: audit these api files, then fix everything found--Files in this batch:--- api/legal/risk-ack.js-- api/legal/tos-ack.js--For every routed handler:--1. Exercise it with curl against the local server: the success path returns- real data with the correct status; malformed input returns a 4xx JSON- error, never a stack trace or an HTML error page; auth is enforced where- the code intends it; CORS matches neighboring handlers.-2. Hard-rule scan: no mock fallbacks, no fake-data arrays, no stubbed- responses, no unfinished markers. Errors are handled at the boundary and- internal code trusts itself.-3. Do not spend funds or sign anything on-chain while probing. Payment and- trading handlers get their validation and error paths exercised, never a- live settlement.--For every internal (non-routed) module:--4. Something must import it; if nothing does, delete it as dead code (verify- with a repo-wide grep first).-5. Its main path and one failure path must be covered in tests/; add the- missing test if not.--## Definition of done--- [ ] Every listed file has recorded evidence: a curl transcript for routed- handlers, a passing test or a deletion for internal modules.-- [ ] Zero hard-rule violations remain in these files.-- [ ] vitest run passes; npm run check:rules -- --paths <touched files>- exits 0.--## Never blocked--| Blocker | Resolution (act, do not ask) |-|---|---|-| Missing env var or credential | Check .env and .env.local, then the Cloud Run service env, then Secret Manager (the CLAUDE.md self-unblock playbook has the exact commands). If it truly exists nowhere, wire the code fully behind the env var, prove the wiring with a dry run, and name the single missing var in the report. |-| gcloud not on PATH | Run: export PATH="$HOME/google-cloud-sdk/bin:$PATH" |-| Dev server port 3000 busy | Another agent may be serving this repo; probe it and reuse if so. Otherwise start your own on a free port: npx vite --port 3101 |-| Playwright browser missing | npx playwright install chromium |-| A surface needs a signed-in user | Register a fresh account through the real /register flow against the real API and use it. Never mock the session. |-| A defect sits in code you did not touch | Fix it if it blocks a Definition of done line (root cause it, never mask it). Otherwise note it in the report and continue. |-| An unrelated test is red | Same rule. Never pipe npm test through tail; it masks exit codes. |--## Close out (required)--1. Verify every Definition of done line with the actual command output in- front of you. Never claim a line you did not verify.-2. Commit with explicit paths and a subject that describes the diff (house- style: type(scope): what changed and why a reader cares).-3. Delete this prompt file in that same commit:-- git rm prompts/swarm-100/api-legal-01.md-- The shrinking directory is this campaign's only progress ledger; there is- no progress log to update.-4. Final report: what step 0 measured, what changed (file list), evidence per- Definition of done line, and any one-line judgment calls. No trailing- questions, no unexecuted plans.--If a line genuinely cannot pass inside this session (an external party must-respond, or an owner-gated action is the final step), finish everything else,-leave this file in place, and state exactly which line remains and who owns-it. Never delete this file on a partial.diff --git a/public/changelog.json b/public/changelog.jsonindex 1aab00164..7891d8fc9 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-08-13T04:53:25.154Z",+ "generated_at": "2026-08-13T05:14:30.316Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -278,6 +278,17 @@"improvement"]},+ {+ "date": "2026-08-13",+ "type": "update",+ "title": "The copy-trading setup tool now states what a repeat call replaces and what it keeps",+ "summary": "Setting up copy-trading a second time for the same leader through an MCP agent updates the existing subscription instead of adding another, and the sizing rule, spend caps and performance fee are replaced by whatever that second call sends, so anything left out goes back to its default. The Oracle-score floor, the market-cap band and the Telegram alert route are the exception: they are kept as they were. None of that was written anywhere the calling agent could read it, so a copier who called the tool again only to change position sizing could end up with their per-trade cap back at the default without ever being told. The tool now spells out both halves in its own description and points at the copy dashboard as the place to clear the filters it preserves.",+ "link": "/leaderboard",+ "tags": [+ "docs",+ "sdk"+ ]+ },{"date": "2026-08-13","type": "update",@@ -4053,16 +4064,6 @@"launch"]},- {- "date": "2026-07-30",- "type": "launch",- "title": "Docs · Economy Health Dashboard",- "summary": "The operator dashboard that answers whether the Money Pulse is quiet and which link in the funding chain broke, plus the ranked diagnosis rules behind its verdict.",- "link": "/docs/economy-health-dashboard",- "tags": [- "launch"- ]- },{"date": "2026-07-30","type": "launch",diff --git a/public/changelog.xml b/public/changelog.xmlindex 19761fc32..38ba38302 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -214,6 +214,14 @@<category>fix</category><description>The free prop library behind /objects and the AR Studio Objects tray is also a public API anyone can page through. Ask it for a page size it cannot parse and it used to guess: a word where a number belongs silently returned a single object, a fractional page size handed back a fractional position to ask for next, and a page position sent without a page size was ignored outright. Every one of those looked like working pagination while quietly skipping or repeating props, so a script walking the whole catalogue could finish believing it had seen all 511 when it had not. Bad page requests now come back immediately as a clear error naming the parameter and the accepted range, while an oversized page still simply caps at the documented maximum. Separately, when the storage behind the library has a hiccup the endpoint still degrades to an empty list rather than an error page, but that emptiness is no longer cached for the next five minutes: the library reappears the moment storage recovers instead of staying blank long after.</description></item>+ <item>+ <title>The copy-trading setup tool now states what a repeat call replaces and what it keeps</title>+ <link>https://three.ws/leaderboard</link>+ <guid isPermaLink="false">2026-08-13:The copy-trading setup tool now states what a repeat call replaces and what it keeps</guid>+ <pubDate>Thu, 13 Aug 2026 12:00:00 GMT</pubDate>+ <category>docs</category>+ <description>Setting up copy-trading a second time for the same leader through an MCP agent updates the existing subscription instead of adding another, and the sizing rule, spend caps and performance fee are replaced by whatever that second call sends, so anything left out goes back to its default. The Oracle-score floor, the market-cap band and the Telegram alert route are the exception: they are kept as they were. None of that was written anywhere the calling agent could read it, so a copier who called the tool again only to change position sizing could end up with their per-trade cap back at the default without ever being told. The tool now spells out both halves in its own description and points at the copy dashboard as the place to clear the filters it preserves.</description>+ </item><item><title>The decentralized inference demo stops sending your prompt to a gateway that is no longer Livepeer</title><link>https://three.ws/demos</link>@@ -3078,14 +3086,6 @@<category>launch</category><description>The @three-ws/avatar-cli package: scaffold a hash-anchored avatar manifest from a wallet and a GLB, validate it against the schema, and print an embed snippet. Offline, deterministic, and safe to run in a release script.</description></item>- <item>- <title>Docs · Economy Health Dashboard</title>- <link>https://three.ws/docs/economy-health-dashboard</link>- <guid isPermaLink="false">2026-07-30:Docs · Economy Health Dashboard</guid>- <pubDate>Thu, 30 Jul 2026 12:00:00 GMT</pubDate>- <category>launch</category>- <description>The operator dashboard that answers whether the Money Pulse is quiet and which link in the funding chain broke, plus the ranked diagnosis rules behind its verdict.</description>- </item><item><title>Docs · MCP tool safety</title><link>https://three.ws/docs/mcp-safety</link>