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: implement vamp detection in feed rendering and enhance coin display with dupe badges

nrpofbae83e4573c
diff --git a/pages/oracle.html b/pages/oracle.html
index 0d558279c..533f5dff2 100644
--- a/pages/oracle.html
+++ b/pages/oracle.html
@@ -144,7 +144,11 @@
.coin-top { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; }
.coin-img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; background: radial-gradient(120% 100% at 50% 0%, #1a1c24, #0d0e14); border: 1px solid var(--line); display: grid; place-items: center; font: 700 17px/1 var(--mono); color: var(--faint); }
.coin-id { min-width: 0; }
- .coin-sym { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+ .coin-sym { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px; min-width: 0; }
+ .coin-sym .sym-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+ .dupe-badge { flex: none; font: 700 10px/1 var(--mono); padding: 3px 5px; border-radius: 6px; cursor: help;
+ color: var(--amber); background: color-mix(in srgb, var(--amber) 12%, transparent);
+ border: 1px solid color-mix(in srgb, var(--amber) 32%, var(--line)); }
.coin-name { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* conviction dial */
.dial { text-align: center; }
diff --git a/scripts/econ-loop.mjs b/scripts/econ-loop.mjs
new file mode 100644
index 000000000..566308e44
--- /dev/null
+++ b/scripts/econ-loop.mjs
@@ -0,0 +1,27 @@
+// econ-loop.mjs — run the three.ws agent-to-agent economy (Circulation engine)
+// continuously, on the prod 2-min cadence. Each tick makes real marketplace
+// agents pay each other (SOL tips, x402 pay-for-service, $THREE skill buys,
+// pump.fun trades, reviews). Env gates in ~/.three-ws-fleet/env + CIRCULATION_*.
+//
+// Usage: node scripts/econ-loop.mjs (loops until killed)
+
+import { runCirculationTick, config } from '../api/_lib/circulation.js';
+
+const EVERY_MS = Number(process.env.CIRCULATION_TICK_MS || 120_000);
+const cfg = config ? config() : {};
+console.log(JSON.stringify({ msg: 'econ-loop start', network: cfg.network, pool: cfg.poolTarget, actions: cfg.actionsPerTick, everyMs: EVERY_MS }));
+
+let n = 0;
+async function tick() {
+ n++;
+ try {
+ const out = await runCirculationTick();
+ const acts = (out.actions || []).map((a) => `${a.kind}:${a.ok ? 'OK' : (a.skipped ? 'skip' : 'fail')}`);
+ console.log(JSON.stringify({ t: new Date().toISOString(), tick: n, pool: out.pool, grew: (out.grew || []).length, actions: acts }));
+ } catch (e) {
+ console.log(JSON.stringify({ t: new Date().toISOString(), tick: n, error: String(e.message || e).slice(0, 200) }));
+ }
+}
+
+await tick();
+setInterval(tick, EVERY_MS);
diff --git a/src/oracle.js b/src/oracle.js
index 460394a3a..62d2910c9 100644
--- a/src/oracle.js
+++ b/src/oracle.js
@@ -516,6 +516,7 @@ function renderFeed() {
const watched = watchedMints();
let items = [...state.feed.values()].sort(sorter);
if (state.watchOnly) items = items.filter((it) => watched.has(it.mint));
+ items = collapseCopycats(items, watched);
syncWatchToggleUi();
$('#ctFeed').textContent = items.length ? items.length : '';
if (!items.length) return renderFeedEmpty(state.watchOnly ? 'watch' : 'empty');
@@ -524,6 +525,37 @@ function renderFeed() {
items.forEach((it) => grid.appendChild(coinCard(it, watched)));
}
+// Copycat & bundle spam floods pump.fun — dozens of distinct mints launched
+// with an identical symbol+name (the "deploy 100 more" and "America 250" runs),
+// each landing on the same default conviction. Because every mint is its own
+// row, the feed would render a wall of near-identical cards that reads like a
+// bug. Fold each cluster into its single strongest representative — items arrive
+// pre-sorted, so the first one seen (highest score / newest, per the active
+// sort) wins — and tag it with the cluster size. A watched ★ mint is never
+// folded away: a coin you're tracking always keeps its own card.
+function collapseCopycats(items, watched = new Set()) {
+ const repByKey = new Map();
+ const out = [];
+ for (const it of items) {
+ const sym = (it.symbol || '').trim().toLowerCase();
+ const name = (it.name || '').trim().replace(/\s+/g, ' ').toLowerCase();
+ const key = (sym || name) ? `${sym}${name}` : null;
+ if (!key || watched.has(it.mint)) { out.push(it); continue; }
+ const rep = repByKey.get(key);
+ if (rep) {
+ rep._dupes += 1;
+ rep._dupeMints.push(it.mint);
+ } else {
+ // Shallow clone so the dupe tally never mutates the cached feed item
+ // (renderFeed runs on every SSE insert — mutation would double-count).
+ const clone = { ...it, _dupes: 1, _dupeMints: [it.mint] };
+ repByKey.set(key, clone);
+ out.push(clone);
+ }
+ }
+ return out;
+}
+
function renderFeedEmpty(kind) {
const grid = $('#feedGrid');
$('#ctFeed').textContent = '';
@@ -778,14 +810,16 @@ function coinCard(it, watched = new Set()) {
btn.className = `coin ${tierClass(it.tier)}`;
btn.dataset.mint = it.mint;
btn.type = 'button';
- btn.setAttribute('aria-label', `View ${it.symbol || it.name || it.mint.slice(0, 8)} conviction — score ${it.score}, ${it.tier || 'unrated'} tier`);
+ btn.setAttribute('aria-label', `View ${it.symbol || it.name || it.mint.slice(0, 8)} conviction — score ${it.score}, ${it.tier || 'unrated'} tier${it._dupes > 1 ? `, ${it._dupes} copycat mints share this name` : ''}`);
btn.innerHTML = `
<div class="coin-top">
${it.image_uri
? `<img class="coin-img" src="${esc(it.image_uri)}" alt="" loading="lazy" onerror="this.replaceWith(Object.assign(document.createElement('div'),{className:'coin-img',textContent:'${esc((it.symbol || '?')[0])}'}))">`
: `<div class="coin-img">${esc((it.symbol || '?')[0])}</div>`}
<div class="coin-id">
- <div class="coin-sym">${esc(it.symbol || '—')}</div>
+ <div class="coin-sym"><span class="sym-txt">${esc(it.symbol || '—')}</span>${it._dupes > 1
+ ? `<span class="dupe-badge" title="${it._dupes} distinct mints launched with this exact name — copycat or bundle spam. Showing the highest-conviction one.">×${it._dupes}</span>`
+ : ''}</div>
<div class="coin-name">${esc(it.name || it.mint.slice(0, 8))}</div>
</div>
<div class="dial">
diff --git a/vercel.json b/vercel.json
index 87b6cbd57..e2aa89f43 100644
--- a/vercel.json
+++ b/vercel.json
@@ -124,8 +124,36 @@
"includeFiles": "{examples/skills/**,data/pages.json,data/archives/**,data/rss/**,data/_generated/**,sdk/src/sas-config.json}",
"maxDuration": 60
},
+ "{api/agents/solana-wallet,api/avatars/fork,api/creations,api/genome/breed,api/labor/bounty,api/labor/deliver,api/labor/release,api/x402/skill-call}.js": {
+ "includeFiles": "examples/skills/**",
+ "maxDuration": 30
+ },
+ "api/agents/onchain/[action].js": {
+ "includeFiles": "examples/skills/**",
+ "maxDuration": 30
+ },
+ "api/agents/x402/[action].js": {
+ "includeFiles": "examples/skills/**",
+ "maxDuration": 30
+ },
+ "api/chat-skills.js": {
+ "includeFiles": "{examples/skills/**,data/_generated/**}",
+ "maxDuration": 30
+ },
+ "api/skills-manifest.js": {
+ "includeFiles": "data/_generated/**",
+ "maxDuration": 30
+ },
+ "api/admin/news/[action].js": {
+ "includeFiles": "{data/archives/**,data/rss/**}",
+ "maxDuration": 30
+ },
+ "api/rss/announcements.js": {
+ "includeFiles": "{data/archives/**,data/rss/**}",
+ "maxDuration": 30
+ },
"api/**/*.js": {
- "includeFiles": "{examples/skills/**,data/pages.json,data/archives/**,data/rss/**,data/_generated/**,sdk/src/sas-config.json}",
+ "includeFiles": "{data/pages.json,sdk/src/sas-config.json}",
"maxDuration": 30
}
},