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.

Refactor code structure for improved readability and maintainability

qbdz9d21328c317b
diff --git a/.gitignore b/.gitignore
index e9924628d..c0bae76e5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -307,3 +307,4 @@ three-ws-*-log-export-*.json
.pump-launch-wallets/
pump-launch-wallets*.zip
.preview/
+three-ws-club-music.wav
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7166ec7c7..bfdd3f92e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -24,7 +24,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Memory seeding no longer times out** — Building your agent's memory seed from your connected accounts could fail with an opaque error when the language model took a moment to respond — the request was being cut off before it finished and the page showed a generic failure. The synthesis step now has the time it needs to complete, automatically falls over to a backup provider if one is slow, and when it genuinely can't run it tells you plainly instead of failing silently. `[fix]`
- **One shared motion library now powers live game-feel across the platform** — The interaction polish proven on the Swarms page — numbers that count up between real values, directional green/red flashes, live-feed rows that slide in, sparklines, ring gauges, connection dots, and a single restrained it-shipped ripple — now lives in one shared, token-driven, reduced-motion-safe library instead of being re-rolled per page. Every surface that adopts it speaks the same visual vocabulary, and because it's built entirely on the platform's motion tokens, it goes perfectly still the instant you ask your system for reduced motion. The Swarms page is its first consumer; the launch, deploy, markets and AI surfaces follow. It's a foundation, not a faked effect — every animation rides a real value. `[improvement, sdk]`
- **Oracle now has full documentation** — Everything behind the conviction score, in one place. The new Oracle docs explain — in plain English and, where you want it, full mathematical detail — how Oracle reads every pump.fun launch: the four pillars (who's buying, how it's structured, what story it rides, how it's moving), exactly how they fuse into a 0–100 score, where the hard caps come from, how the engine is calibrated and backtested against real outcomes, how to arm an agent on it, the full public API, and where it's headed. Real screenshots throughout, a quickstart for traders, builders, and skeptics, and a researcher-level appendix. (`/oracle/docs`) `[docs, feature]`
-- **Reward coins can now send creator fees to a single GitHub account, not just a repo** — The Fees & rewards panel already let you split a coin's creator fees across a GitHub repo's contributors. Now you can also route rewards to one specific person: type a GitHub @username and it resolves to their three.ws-linked Solana payout wallet, added as a recipient you can give 100% (or any share) of the fees. This is the same mechanism behind $THREE, whose creator rewards flow to @nirholas even though someone else launched the coin. A handle with no linked wallet is flagged so you can paste their address or ask them to link one. The same input still accepts an owner/repo to split across contributors — one field, both intents. `[feature]`
+- **Reward coins can now send creator fees to a single GitHub account, not just a repo** — The Fees & rewards panel already let you split a coin's creator fees across a GitHub repo's contributors. Now you can also route rewards to one specific person: type a GitHub @username and it resolves to their three.ws-linked Solana payout wallet, added as a recipient you can give 100% (or any share) of the fees. This is the same mechanism behind $THREE, whose creator rewards flow to @nirholas even though someone else launched the coin. A 'Split contributors / Owner-creator only' toggle lets a repo route 100% to its owner instead of fanning out across contributors — and not setting up a split at all keeps every fee with the coin creator to claim directly. A handle with no linked wallet is flagged so you can paste their address or ask them to link one. `[feature]`
- **Swarm dashboards now show consensus building and firing live** — When you watch a trading swarm, you can now see the moment it decides. Every consensus vote animates in and fills a meter toward the swarm's firing threshold in real time. When member consensus clears the line and the treasury actually fires a buy, the meter visibly crosses the threshold with a hot success glow, the vote stamps a pulsing “fire” badge, and a single accent ripple sweeps the panel — so the most important event on the page lands instead of slipping by as a quiet log line. Skips fill toward the line and stop short. Respects reduced-motion preferences. (`/swarms`) `[improvement]`
- **Swarm treasury figures now count up and flash when money moves** — On a live swarm dashboard, the treasury tiles — balance, realized P&L, open positions and win rate — no longer hard-swap to a new number. When a live update lands, each figure smoothly counts from its current value to the new one and the tile flashes in the direction of the change: green when it rises, red when it drops. A confirmed payout pulses the balance and P&L tiles the instant the money lands. It animates only between two real values, never from zero, and respects reduced-motion preferences (those users get an instant, exact update). (`/swarms`) `[improvement]`
- **The $THREE holder leaderboard now rides out RPC rate limits instead of stalling** — The $THREE holder leaderboard, its share card, and the token stats panel all serve from a snapshot that refreshes every few minutes. When our on-chain data provider briefly rate-limited that refresh mid-scan, the whole refresh gave up for that cycle — and the failure was logged as a hard error even though it was a routine, self-healing hiccup. Now the scan retries the throttled page with a short backoff so it finishes and the snapshot stays current, and a rate limit is correctly treated as a transient blip rather than an incident. The result is a fresher holder board with far less log and alert noise. (`/leaderboard`) `[fix, infra]`
diff --git a/data/changelog.json b/data/changelog.json
index 279fd9fd5..142f195bc 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -13,7 +13,7 @@
{
"date": "2026-06-30",
"title": "Reward coins can now send creator fees to a single GitHub account, not just a repo",
- "summary": "The Fees & rewards panel already let you split a coin's creator fees across a GitHub repo's contributors. Now you can also route rewards to one specific person: type a GitHub @username and it resolves to their three.ws-linked Solana payout wallet, added as a recipient you can give 100% (or any share) of the fees. This is the same mechanism behind $THREE, whose creator rewards flow to @nirholas even though someone else launched the coin. A handle with no linked wallet is flagged so you can paste their address or ask them to link one. The same input still accepts an owner/repo to split across contributors — one field, both intents.",
+ "summary": "The Fees & rewards panel already let you split a coin's creator fees across a GitHub repo's contributors. Now you can also route rewards to one specific person: type a GitHub @username and it resolves to their three.ws-linked Solana payout wallet, added as a recipient you can give 100% (or any share) of the fees. This is the same mechanism behind $THREE, whose creator rewards flow to @nirholas even though someone else launched the coin. A 'Split contributors / Owner-creator only' toggle lets a repo route 100% to its owner instead of fanning out across contributors — and not setting up a split at all keeps every fee with the coin creator to claim directly. A handle with no linked wallet is flagged so you can paste their address or ask them to link one.",
"tags": [
"feature"
]
diff --git a/docs/ALL.md b/docs/ALL.md
index 2552e6b83..44e8522ec 100644
--- a/docs/ALL.md
+++ b/docs/ALL.md
@@ -64588,6 +64588,12 @@ sparklines, ring gauges, FLIP reorders, SSE status dots, and the single "it
shipped" ripple. The vocabulary was proven on the `/swarms` page and extracted so
every surface animates the same way instead of reinventing it.
+**See it run:** [`/ui-juice`](https://three.ws/ui-juice) is a live kitchen-sink that
+exercises every primitive on real, user-driven values (source: `pages/ui-juice.html`
++ `src/ui-juice-demo.js`). It's the fastest way to feel each helper and to verify the
+reduced-motion behaviour — emulate `prefers-reduced-motion: reduce` in DevTools and
+drive any control; everything lands on its static end state with no motion.
+
Three guarantees hold for every export:
- **Token-driven.** Durations and easings come from the motion ladder in
diff --git a/docs/contributing.md b/docs/contributing.md
index 13f784637..2dfefbdc8 100644
--- a/docs/contributing.md
+++ b/docs/contributing.md
@@ -157,6 +157,33 @@ The `npm run verify` command is what CI runs. If it passes locally, the build ch
---
+## Publishing MCP servers & standalone mirrors
+
+Every MCP server package (any directory with both a `package.json` and a `server.json` — the 35 under `packages/*-mcp`, plus `packages/agent-sniper`, `mcp-server`, and `mcp-bridge`) ships to three destinations. All steps are idempotent and default to a safe dry run.
+
+**1. npm + the official MCP registry** (`registry.modelcontextprotocol.io`):
+
+```bash
+npm run audit:mcp # validate every server.json (names, versions, ≤100-char descriptions)
+npm run publish:mcp:dry # report what would publish — no writes
+npm run publish:mcp # publish any package/version missing from npm or the registry
+```
+
+Auth: npm needs `npm whoami` to succeed or `NPM_TOKEN` set. The registry publishes under the `io.github.nirholas` namespace and needs `MCP_REGISTRY_TOKEN`, or a GitHub token for that account (`GITHUB_TOKEN`, or the PAT on the `origin` remote) — a token for a different account will be rejected for that namespace.
+
+**2. Standalone GitHub mirrors** — each package also lives in its own repo at `github.com/<owner>/<name>` (a read-only mirror; the monorepo stays canonical). Each sync force-pushes one snapshot commit whose message records the source monorepo SHA, and rewrites the mirror's `package.json` / `server.json` `repository` fields to point at the standalone repo:
+
+```bash
+npm run sync:repos:dry # plan only
+npm run sync:repos # create missing repos + push snapshots (needs gh auth as the owner)
+# scope to a subset:
+node scripts/sync-standalone-repos.mjs --execute --only agent-sniper,copy-mcp
+```
+
+Auth: `gh` must be authenticated as the target owner (default `nirholas`; override with `--owner`) so it can create and push under that account.
+
+---
+
## Writing Tests
- **Unit tests** go in `tests/src/` for pure functions and source modules
diff --git a/fees-github-owner-only.png b/fees-github-owner-only.png
new file mode 100644
index 000000000..a53be8c87
Binary files /dev/null and b/fees-github-owner-only.png differ
diff --git a/package.json b/package.json
index 54e242dc7..7ee3423d1 100644
--- a/package.json
+++ b/package.json
@@ -160,6 +160,8 @@
"publish:packages:dry": "node scripts/publish-packages.mjs --dry-run",
"publish:mcp": "node scripts/publish-mcp-servers.mjs",
"publish:mcp:dry": "node scripts/publish-mcp-servers.mjs --dry-run",
+ "sync:repos": "node scripts/sync-standalone-repos.mjs --execute",
+ "sync:repos:dry": "node scripts/sync-standalone-repos.mjs --dry-run",
"build:chat": "cd chat && node scripts/ensure-deps.mjs && npm run build && cd .. && mkdir -p dist/chat && cp -rf public/chat/. dist/chat/",
"build:avatar-studio": "npm run build --prefix character-studio",
"build:fast": "npm run build",
diff --git a/public/changelog.json b/public/changelog.json
index c4e0a72c0..4bb95100c 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-06-30T23:05:31.948Z",
+ "generated_at": "2026-06-30T23:12:30.318Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -195,7 +195,7 @@
"date": "2026-06-30",
"type": "update",
"title": "Reward coins can now send creator fees to a single GitHub account, not just a repo",
- "summary": "The Fees & rewards panel already let you split a coin's creator fees across a GitHub repo's contributors. Now you can also route rewards to one specific person: type a GitHub @username and it resolves to their three.ws-linked Solana payout wallet, added as a recipient you can give 100% (or any share) of the fees. This is the same mechanism behind $THREE, whose creator rewards flow to @nirholas even though someone else launched the coin. A handle with no linked wallet is flagged so you can paste their address or ask them to link one. The same input still accepts an owner/repo to split across contributors — one field, both intents.",
+ "summary": "The Fees & rewards panel already let you split a coin's creator fees across a GitHub repo's contributors. Now you can also route rewards to one specific person: type a GitHub @username and it resolves to their three.ws-linked Solana payout wallet, added as a recipient you can give 100% (or any share) of the fees. This is the same mechanism behind $THREE, whose creator rewards flow to @nirholas even though someone else launched the coin. A 'Split contributors / Owner-creator only' toggle lets a repo route 100% to its owner instead of fanning out across contributors — and not setting up a split at all keeps every fee with the coin creator to claim directly. A handle with no linked wallet is flagged so you can paste their address or ask them to link one.",
"link": null,
"tags": [
"feature"
diff --git a/public/changelog.xml b/public/changelog.xml
index bc3b62ba9..634617db5 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -156,7 +156,7 @@
<guid isPermaLink="false">2026-06-30:Reward coins can now send creator fees to a single GitHub account, not just a repo</guid>
<pubDate>Tue, 30 Jun 2026 12:00:00 GMT</pubDate>
<category>feature</category>
- <description>The Fees &amp; rewards panel already let you split a coin's creator fees across a GitHub repo's contributors. Now you can also route rewards to one specific person: type a GitHub @username and it resolves to their three.ws-linked Solana payout wallet, added as a recipient you can give 100% (or any share) of the fees. This is the same mechanism behind $THREE, whose creator rewards flow to @nirholas even though someone else launched the coin. A handle with no linked wallet is flagged so you can paste their address or ask them to link one. The same input still accepts an owner/repo to split across contributors — one field, both intents.</description>
+ <description>The Fees &amp; rewards panel already let you split a coin's creator fees across a GitHub repo's contributors. Now you can also route rewards to one specific person: type a GitHub @username and it resolves to their three.ws-linked Solana payout wallet, added as a recipient you can give 100% (or any share) of the fees. This is the same mechanism behind $THREE, whose creator rewards flow to @nirholas even though someone else launched the coin. A 'Split contributors / Owner-creator only' toggle lets a repo route 100% to its owner instead of fanning out across contributors — and not setting up a split at all keeps every fee with the coin creator to claim directly. A handle with no linked wallet is flagged so you can paste their address or ask them to link one.</description>
</item>
<item>
<title>Swarm dashboards now show consensus building and firing live</title>
diff --git a/public/features.json b/public/features.json
index 7af20b2a3..67ac1be67 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-06-30T23:05:31.590Z",
+ "generated_at": "2026-06-30T23:12:30.029Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/public/studio/fees-panel.js b/public/studio/fees-panel.js
index f4032d68a..ad3ac30c5 100644
--- a/public/studio/fees-panel.js
+++ b/public/studio/fees-panel.js
@@ -198,6 +198,11 @@ const FP_CSS = `
.fp-gh input::placeholder{color:rgba(255,255,255,.25)}
.fp-gh-hint{font-size:.63rem;color:rgba(255,255,255,.4);line-height:1.45;margin-top:-.15rem}
.fp-gh-hint b{color:rgba(255,255,255,.62);font-weight:600}
+.fp-gh-modes{display:flex;gap:.3rem}
+.fp-gh-mode{flex:1;padding:.34rem .5rem;border-radius:7px;cursor:pointer;font-size:.66rem;font-weight:600;
+ background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.09);color:rgba(255,255,255,.5);transition:all .15s}
+.fp-gh-mode:hover{color:rgba(255,255,255,.8);border-color:rgba(255,255,255,.18)}
+.fp-gh-mode.on{background:rgba(120,160,240,.12);border-color:rgba(120,160,240,.4);color:#bcd0f5}
.fp-holders{display:flex;flex-direction:column;gap:.3rem}
.fp-holder{display:flex;align-items:center;gap:.5rem;padding:.4rem .6rem;border-radius:8px;
@@ -253,6 +258,7 @@ export function mountFeesPanel(container, opts = {}) {
editing: false,
rows: [], // [{ address, pct, gh?:{login,avatar} }]
githubRepo: '', githubBusy: false, githubError: '',
+ ghMode: 'contributors', // 'contributors' = split a repo; 'owner' = repo owner/creator gets 100%
};
let _alive = true;
@@ -470,11 +476,15 @@ export function mountFeesPanel(container, opts = {}) {
// ── GitHub import ─────────────────────────────────────────────────────────────
- // Dispatch the GitHub input: an "owner/repo" imports a whole repo's
- // contributors; a bare "@login" routes rewards to that single account.
+ // Dispatch the GitHub input. A bare "@login" always routes to that single
+ // account. An "owner/repo" honours the mode toggle: 'contributors' splits
+ // across the repo's contributors; 'owner' sends 100% to the repo owner/creator.
async function importGithub() {
const repo = parseGithubRepo(s.githubRepo);
- if (repo) return importGithubRepo(repo);
+ if (repo) {
+ if (s.ghMode === 'owner') return addGithubAccount(repo.owner);
+ return importGithubRepo(repo);
+ }
const login = parseGithubAccount(s.githubRepo);
if (login) return addGithubAccount(login);
s.githubError = 'Enter a GitHub @username, or a repo as owner/name.';
@@ -730,11 +740,17 @@ export function mountFeesPanel(container, opts = {}) {
const busy = !!s.busy;
return `<div class="fp-deleg">
<div class="fp-deleg-title">🎁 Reward split — delegate creator fees</div>
+ <div class="fp-gh-modes">
+ <button class="fp-gh-mode${s.ghMode === 'contributors' ? ' on' : ''}" data-mode="contributors">Split contributors</button>
+ <button class="fp-gh-mode${s.ghMode === 'owner' ? ' on' : ''}" data-mode="owner">Owner / creator only</button>
+ </div>
<div class="fp-gh">
<input id="fp-gh-input" placeholder="GitHub @username or owner/repo" value="${esc(s.githubRepo)}" spellcheck="false" />
<button class="fp-btn violet${s.githubBusy ? ' busy' : ''}" id="fp-gh-go" ${s.githubBusy ? 'disabled' : ''}>${s.githubBusy ? 'Resolving…' : 'Add'}</button>
</div>
- <div class="fp-gh-hint">A <b>@username</b> routes rewards to one account · an <b>owner/repo</b> splits across its contributors.</div>
+ <div class="fp-gh-hint">${s.ghMode === 'owner'
+ ? `An <b>owner/repo</b> (or <b>@username</b>) routes <b>100%</b> to that one account — no contributor split.`
+ : `A <b>@username</b> routes rewards to one account · an <b>owner/repo</b> splits across its contributors.`}</div>
${s.githubError ? `<div class="fp-err">${esc(s.githubError)}</div>` : ''}
${s.rows.length ? rowsHtml : `<div class="fp-note">Add recipients below or import a GitHub repo's contributors.</div>`}
<button class="fp-add" id="fp-add" ${s.rows.length >= 10 ? 'disabled' : ''}>+ Add recipient</button>
@@ -788,6 +804,9 @@ export function mountFeesPanel(container, opts = {}) {
q('#fp-gh-go')?.addEventListener('click', importGithub);
q('#fp-gh-input')?.addEventListener('input', (e) => { s.githubRepo = e.target.value; });
q('#fp-gh-input')?.addEventListener('keydown', (e) => { if (e.key === 'Enter') { e.preventDefault(); importGithub(); } });
+ container.querySelectorAll('.fp-gh-mode').forEach((el) => {
+ el.addEventListener('click', (e) => { s.ghMode = e.currentTarget.dataset.mode; s.githubError = ''; render(); });
+ });
container.querySelectorAll('.fp-share-addr').forEach((el) => {
el.addEventListener('input', (e) => { s.rows[+e.target.dataset.i].address = e.target.value; });