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
Add Oracle conviction to MCP API; watchlist on launches and oracle pages
nirholas2485c7ded60b
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 9c28924bd..21e7b72b9 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -14,6 +14,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Every launch now has its own page — the full story of a coin in one place** — Until now, clicking a coin on the launches feed sent you out to pump.fun. Now every launch opens a rich profile that stays on three.ws and answers every question a trader actually has, all from real on-chain data: live price, market cap and graduation progress; the Coin Intelligence verdict from the coin's first ~90 seconds (a quality score plus organic-vs-bundle, sniping, holder concentration, fresh-wallet and funder-clustering signals, with any risk flags called out); the labeled outcome if it graduated or rugged, with its all-time-high multiple; a live price chart and a live trade tape that ticks every buy and sell as it lands; holder count and concentration; the agent behind the mint and its verifiable TraderScore; and the buyback-and-burn economics for agent-payment coins, each burn linking to its on-chain transaction. Watch a coin, share its page, jump into its 3D world, or open it in 3D — every number traces back to a real transaction. (`/launches`) `[feature]`- **Oracle — live trade tape and 3D conviction graph in the war room** — Two new war-room surfaces: every coin in Oracle now has a live trade tape inside its drawer that streams every buy and sell in real time, annotated with the trader's archetype — Smart Money, KOL, Sniper, Rugger — the moment it lands on-chain. Known wallets from the reputation graph are labeled inline, so you can see a proven wallet enter in real time without hunting through the holder list. Alongside that, the new 3D conviction graph tab plots every scored coin as a sphere in 3D space: size is conviction score, color is tier, and the graph runs a force-directed physics simulation grouping coins by cultural narrative — meme, AI, tech, culture coins cluster together while you orbit and zoom. Click any sphere to open its full conviction breakdown. Both surfaces are live when you open Oracle. (`/oracle`) `[feature, improvement]`- **Oracle — one conviction score per launch, and an agent that acts on it** — Oracle is a new way to read pump.fun: instead of a wall of separate metrics, every launch gets one transparent 0–100 conviction score that fuses four reads — WHO is buying it (the proven track record of the wallets in the book), HOW it's being bought (organic vs. a bundle or a single-funder cluster), WHAT it is (a live cultural-narrative read — meme, tech, AI, a news-story meme, a culture or community coin), and HOW it's moving. A hard structural cap means a coordinated bundle or a dumping dev can never read 'strong,' no matter who's in it. Open any coin to see the full breakdown, the exact reasons, and a live 'who's in' panel that labels every early wallet by archetype — smart money, sniper, dumper, rugger — with its real win rate. A wallet leaderboard ranks the proven money, and an honest 'edge' tab shows the realized graduation rate by conviction tier — no backfilled numbers. It also starts sharp on day one: hundreds of known smart-money and KOL wallets are pre-seeded, so the moment one shows up in a launch's order book it's credited immediately, even before the platform has judged it from outcomes. Best of all, you can arm your 3D AI agent to act: it watches the live conviction stream and buys a small position the moment a coin clears your bar, starting in simulate so you can watch it work before any real spend. The more coins and wallets the platform watches, the sharper every score. (`/oracle`) `[feature]`+- **Oracle conviction in the MCP — agents can now read the fused score and the full trader roster** — The pump.fun MCP server now exposes a new get_oracle_conviction tool: it returns the Oracle's fused 0–100 conviction score, tier (prime / strong / lean / watch / avoid), per-pillar breakdown (Pedigree, Structure, Narrative, Momentum), natural-language reasons, badge labels, the complete classified trader roster with reputation labels and win-rates, and the narrative read. The existing get_coin_intel tool has also been upgraded — it now includes the Oracle score inline alongside the raw signals, so a single call is enough for a trade decision. 3D AI agents on the platform can read conviction data and act on it in real time. (`/oracle`) `[feature, sdk]`- **Oracle conviction scores now read live crypto news** — Oracle's narrative pillar used to guess virality from metadata alone. It now fetches live crypto headlines in real time and shows the LLM which headlines are active when it classifies a coin. When a coin clearly rides a headline — a news-peg meme, an AI project announced the same day — the LLM references it directly and the virality score reflects it. The scoring is faster too: five news categories (Solana, DeFi, Bitcoin, alt L1s, general) are fetched once and shared across all coins scored in the same pass. (`/oracle`) `[improvement]`- **Oracle conviction scores refresh every two minutes, automatically** — Oracle now runs on a serverless cron that fires every two minutes: it scores the latest pump.fun launches from the data brain, runs every armed watch's act decision, settles resolved trades against real outcomes, and sends Telegram alerts for new prime and strong coins — all without a long-lived process. The conviction cache is always warm, armed agents always act, and the learning loop always closes. (`/oracle`) `[improvement]`- **Oracle fires Telegram alerts for prime and strong conviction coins** — When a coin crosses the prime or strong conviction tier, Oracle now fires a Telegram alert with the full score breakdown: overall score, all four pillar values, coin symbol, category, and direct links to the coin's Oracle page and pump.fun listing. Alerts are deduplicated per coin across restarts so you get exactly one signal per conviction event — no repeats if the cron fires while the alert is already out. (`/oracle`) `[feature]`diff --git a/api/copy/settle-fee.js b/api/copy/settle-fee.jsindex ce63f4a56..cf0412c69 100644--- a/api/copy/settle-fee.js+++ b/api/copy/settle-fee.js@@ -120,6 +120,7 @@ export default wrap(async (req, res) => {sol_usd: solUsd,fee_usd: Number(usd.toFixed(4)),quote: quote.token,+ memo: quote.quote.nonce,legs: quote.quote.legs,expires_at: quote.expiresAt,});diff --git a/api/pump-fun-mcp.js b/api/pump-fun-mcp.jsindex af67c336f..744420e5d 100644--- a/api/pump-fun-mcp.js+++ b/api/pump-fun-mcp.js@@ -854,6 +854,33 @@ async function handleGetCoinIntel({ mint, network = 'mainnet' } = {}) {};} catch { /* weights table absent — training hasn't run yet */ }+ // Oracle conviction — fused 4-pillar score from the oracle engine (may not+ // exist for brand-new coins; the oracle-score cron sweeps ~every 5 min).+ let oracle = null;+ try {+ const [oc] = await sql`+ select score, tier, pedigree, structure, narrative, momentum,+ structure_cap, badges, reasons, scored_at+ from oracle_conviction+ where mint = ${cleanMint} and network = ${network}+ limit 1+ `;+ if (oc) oracle = {+ score: num(oc.score),+ tier: oc.tier,+ pillars: {+ pedigree: num(oc.pedigree),+ structure: num(oc.structure),+ narrative: num(oc.narrative),+ momentum: num(oc.momentum),+ },+ structure_cap: !!oc.structure_cap,+ badges: Array.isArray(oc.badges) ? oc.badges : [],+ reasons: Array.isArray(oc.reasons) ? oc.reasons : [],+ scored_at: oc.scored_at,+ };+ } catch { /* oracle tables not yet migrated — fine */ }+const smartNotable = Array.isArray(row.smart_money_notable) ? row.smart_money_notable : [];// Build a plain-language summary the agent can read directly@@ -939,6 +966,10 @@ async function handleGetCoinIntel({ mint, network = 'mainnet' } = {}) {// Learning model: conditional win-rates so agents can see the evidence behind the scoremodel,++ // Oracle conviction — fused score from the 4-pillar engine (null until scored)+ oracle,+ oracle_url: `https://three.ws/oracle?mint=${encodeURIComponent(cleanMint)}`,};} catch (err) {const missing = /relation .* does not exist/i.test(String(err?.message));@@ -999,6 +1030,169 @@ async function handlePumpfunBotStatus() {}}+// ── get_oracle_conviction ──────────────────────────────────────────────────++// Returns the fused Oracle conviction score for a mint: 4-pillar breakdown,+// tier, badges, reasons, full who's-in trader roster, narrative classification,+// and labeled outcome when available.+async function handleGetOracleConviction({ mint, network = 'mainnet' } = {}) {+ if (!mint || typeof mint !== 'string') throw new Error('mint required');+ const cleanMint = mint.trim();++ let sql;+ try {+ sql = (await import('./_lib/db.js')).sql;+ } catch {+ return { found: false, reason: 'database_unavailable' };+ }++ const num = (v) => { const n = Number(v); return Number.isFinite(n) ? n : null; };++ try {+ // 1. Conviction verdict from oracle_conviction cache+ const [conv] = await sql`+ select mint, network, symbol, name, image_uri,+ score, tier, pedigree, structure, narrative, momentum,+ structure_cap, badges, reasons, components, category,+ smart_wallet_count, scored_at+ from oracle_conviction+ where mint = ${cleanMint} and network = ${network}+ limit 1+ `.catch(() => []);++ if (conv == null) {+ // Not yet scored — return basic identity if we at least know the coin+ const [basic] = await sql`+ select mint, symbol, name from pump_coin_intel+ where mint = ${cleanMint} and network = ${network} limit 1+ `.catch(() => []);+ return {+ found: !!basic,+ mint: cleanMint,+ symbol: basic?.symbol || null,+ name: basic?.name || null,+ conviction: null,+ narrative: null,+ whos_in: [],+ outcome: null,+ url: `https://three.ws/oracle?mint=${encodeURIComponent(cleanMint)}`,+ reason: basic ? 'not_yet_scored' : 'unknown_mint',+ };+ }++ // 2. Narrative classification+ const [narr] = await sql`+ select category, narrative, virality, confidence, tags, source+ from oracle_narrative+ where mint = ${cleanMint} and network = ${network} limit 1+ `.catch(() => []);++ // 3. Trader roster — wallets annotated with reputation labels+ const walletRows = await sql`+ select w.wallet, w.buy_lamports, w.sell_lamports, w.is_creator, w.funder,+ r.label, r.smart_money_score, r.win_rate, r.early_win_rate, r.tag+ from pump_coin_wallets w+ left join wallet_reputation r on r.wallet = w.wallet and r.network = ${network}+ where w.mint = ${cleanMint}+ order by w.buy_lamports desc+ limit 50+ `.catch(() => []);++ // 4. Outcome label+ let outcome = null;+ try {+ const [o] = await sql`+ select outcome, graduated, rugged, ath_market_cap_usd, ath_multiple, labeled_at+ from pump_coin_outcomes where mint = ${cleanMint} limit 1+ `;+ if (o) outcome = {+ outcome: o.outcome,+ graduated: o.graduated,+ rugged: o.rugged,+ ath_market_cap_usd: num(o.ath_market_cap_usd),+ ath_multiple: num(o.ath_multiple),+ labeled_at: o.labeled_at,+ };+ } catch { /* fine — table may not exist yet */ }++ // Resolve wallet labels: brain reputation wins; knownWallet() seed fills the gap.+ let knownWallet;+ try {+ knownWallet = (await import('./_lib/oracle/known-wallets.js')).knownWallet;+ } catch { knownWallet = () => null; }++ const whosIn = walletRows.map((w) => {+ const brainLabel = w.label && w.label !== 'unproven' ? w.label : null;+ const known = brainLabel ? null : knownWallet(w.wallet);+ return {+ wallet: w.wallet,+ label: brainLabel || known?.label || 'unproven',+ score: w.smart_money_score != null ? num(w.smart_money_score) : (known?.score ?? null),+ win_rate: w.win_rate != null ? num(w.win_rate) : null,+ early_win_rate: w.early_win_rate != null ? num(w.early_win_rate) : null,+ source: brainLabel ? 'brain' : (known ? 'gmgn' : null),+ tag: w.tag || known?.tag || null,+ buy_sol: Number(w.buy_lamports || 0) / 1e9,+ sell_sol: Number(w.sell_lamports || 0) / 1e9,+ is_creator: !!w.is_creator,+ funder: w.funder || null,+ };+ });++ // Tier summary for agent quick-read+ const tierLabel = {+ prime: 'PRIME — highest conviction. Top-grade entry signal.',+ strong: 'STRONG — solid conviction. Enter with normal position size.',+ lean: 'LEAN — mild positive lean. Size small or wait for confirmation.',+ watch: 'WATCH — insufficient signal. Observe only.',+ avoid: 'AVOID — negative signal. Do not enter.',+ }[conv.tier] || conv.tier;++ return {+ found: true,+ mint: conv.mint,+ network: conv.network,+ symbol: conv.symbol,+ name: conv.name,+ image_uri: conv.image_uri,+ category: conv.category || narr?.category || 'unknown',++ conviction: {+ score: num(conv.score),+ tier: conv.tier,+ tier_label: tierLabel,+ pillars: {+ pedigree: num(conv.pedigree),+ structure: num(conv.structure),+ narrative: num(conv.narrative),+ momentum: num(conv.momentum),+ },+ structure_cap: !!conv.structure_cap,+ badges: Array.isArray(conv.badges) ? conv.badges : [],+ reasons: Array.isArray(conv.reasons) ? conv.reasons : [],+ scored_at: conv.scored_at,+ },++ narrative: narr ? {+ category: narr.category,+ narrative: narr.narrative,+ virality: num(narr.virality),+ confidence: num(narr.confidence),+ tags: Array.isArray(narr.tags) ? narr.tags : [],+ source: narr.source,+ } : null,++ whos_in: whosIn,+ outcome,+ url: `https://three.ws/oracle?mint=${encodeURIComponent(cleanMint)}`,+ };+ } catch (err) {+ const missing = /relation .* does not exist/i.test(String(err?.message));+ if (missing) return { found: false, reason: 'oracle_tables_pending' };+ throw err;+ }+}+// ── Dispatch ───────────────────────────────────────────────────────────────// Keyed by CANONICAL (snake_case) names. tools/call resolves legacy camelCase@@ -1008,6 +1202,7 @@ const HANDLERS = {get_token_details: handleGetTokenDetails,get_token_holders: handleGetTokenHolders,get_coin_intel: handleGetCoinIntel,+ get_oracle_conviction: handleGetOracleConviction,kol_radar: handleKolRadar,kol_leaderboard: handleKolLeaderboard,search_tokens: indexerOrUnavailable('search_tokens'),@@ -1039,11 +1234,17 @@ const PROTOCOL_VERSION = '2025-06-18';const RESOURCE_PATH = '/api/pump-fun-mcp';const SERVER_INFO = { name: 'three.ws-pumpfun-mcp', version: '1.0.0' };const INSTRUCTIONS =- 'Free, read-only pump.fun + Solana tools from three.ws. ' +- 'COIN INTELLIGENCE (call first before any trade): get_coin_intel returns the full ' +- 'intelligence snapshot for a mint — bundle vs organic verdict, bubblemaps cluster ' +- 'connectivity, smart-money presence with wallet win-rates, dev behaviour, category, ' +- 'news-meme detection, risk flags, and a 0–100 quality score. ' ++ 'Free, read-only pump.fun + Solana intelligence tools from three.ws. ' ++ 'ORACLE CONVICTION (highest-signal trade read): get_oracle_conviction returns the ' ++ 'fused 0–100 Oracle score for a mint — a 4-pillar synthesis of pedigree (smart-money ' ++ 'presence), structure (organic vs bundle, holder concentration, bubblemaps connectivity), ' ++ 'narrative (category, meme virality, news hook), and momentum (velocity, timing). ' ++ 'Includes the tier (prime ≥86 / strong ≥72 / lean ≥54 / watch ≥36 / avoid), ' ++ 'natural-language reasons, badge labels, and the full classified trader roster with ' ++ 'win-rates. COIN INTELLIGENCE (raw signals): get_coin_intel returns every signal recorded ' ++ 'during the observation window — bundle/organic verdict, bubblemaps cluster connectivity, ' ++ 'smart-money wallet details, dev behaviour, category, news-meme detection, risk flags, ' ++ 'quality score, and now also includes the Oracle score inline. ' +'Token discovery (search_tokens, get_trending_tokens, get_new_tokens, ' +'get_graduated_tokens, get_king_of_the_hill), on-chain analysis (get_bonding_curve, ' +'get_token_holders, get_token_details, get_token_trades), creator intelligence ' +diff --git a/data/changelog.json b/data/changelog.jsonindex 8f16105fc..a990166bc 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,13 @@{"$comment": "Curated changelog entries for three.ws — the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.","entries": [+ {+ "date": "2026-06-16",+ "title": "Oracle conviction in the MCP — agents can now read the fused score and the full trader roster",+ "summary": "The pump.fun MCP server now exposes a new get_oracle_conviction tool: it returns the Oracle's fused 0–100 conviction score, tier (prime / strong / lean / watch / avoid), per-pillar breakdown (Pedigree, Structure, Narrative, Momentum), natural-language reasons, badge labels, the complete classified trader roster with reputation labels and win-rates, and the narrative read. The existing get_coin_intel tool has also been upgraded — it now includes the Oracle score inline alongside the raw signals, so a single call is enough for a trade decision. 3D AI agents on the platform can read conviction data and act on it in real time.",+ "tags": ["feature", "sdk"],+ "link": "/oracle"+ },{"date": "2026-06-16","title": "Rich OG cards on every shared coin link — price, score, and live status in the preview",diff --git a/pages/oracle.html b/pages/oracle.htmlindex 976125278..1e5ea3da6 100644--- a/pages/oracle.html+++ b/pages/oracle.html@@ -75,6 +75,17 @@/* coin grid */.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }+ .coin-wrap { position: relative; }+ .oc-watch { position: absolute; top: 10px; right: 10px; z-index: 2; width: 28px; height: 28px;+ display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line);+ background: rgba(0,0,0,0.3); color: rgba(255,255,255,0.45); font-size: 14px; cursor: pointer;+ transition: color .15s, border-color .15s, background .15s; opacity: 0; }+ .coin-wrap:hover .oc-watch, .oc-watch.oc-watched, .oc-watch:focus-visible { opacity: 1; }+ .oc-watch.oc-watched { color: var(--accent, #7c83ff); border-color: var(--accent, #7c83ff); background: rgba(124,131,255,.12); }+ .oc-watch:hover { color: var(--ink); border-color: var(--stroke-strong, rgba(255,255,255,.2)); }+ .oc-watch:focus-visible { outline: 2px solid var(--accent, #7c83ff); outline-offset: 1px; }+ @media (hover: none) { .oc-watch { opacity: 1; } }+.coin { text-align: left; width: 100%; background: var(--panel); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);border: 1px solid var(--line); border-radius: var(--r); padding: 15px; box-shadow: var(--shadow);display: flex; flex-direction: column; gap: 13px; transition: transform .14s, border-color .18s; }diff --git a/public/changelog.json b/public/changelog.jsonindex 8a7635937..6fe746106 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-16T04:32:42.855Z",+ "generated_at": "2026-06-16T04:40:22.704Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -89,6 +89,17 @@"feature"]},+ {+ "date": "2026-06-16",+ "type": "update",+ "title": "Oracle conviction in the MCP — agents can now read the fused score and the full trader roster",+ "summary": "The pump.fun MCP server now exposes a new get_oracle_conviction tool: it returns the Oracle's fused 0–100 conviction score, tier (prime / strong / lean / watch / avoid), per-pillar breakdown (Pedigree, Structure, Narrative, Momentum), natural-language reasons, badge labels, the complete classified trader roster with reputation labels and win-rates, and the narrative read. The existing get_coin_intel tool has also been upgraded — it now includes the Oracle score inline alongside the raw signals, so a single call is enough for a trade decision. 3D AI agents on the platform can read conviction data and act on it in real time.",+ "link": "/oracle",+ "tags": [+ "feature",+ "sdk"+ ]+ },{"date": "2026-06-16","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex c3eb81ab7..56b8ee004 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -70,6 +70,14 @@<category>feature</category><description>Oracle is a new way to read pump.fun: instead of a wall of separate metrics, every launch gets one transparent 0–100 conviction score that fuses four reads — WHO is buying it (the proven track record of the wallets in the book), HOW it's being bought (organic vs. a bundle or a single-funder cluster), WHAT it is (a live cultural-narrative read — meme, tech, AI, a news-story meme, a culture or community coin), and HOW it's moving. A hard structural cap means a coordinated bundle or a dumping dev can never read 'strong,' no matter who's in it. Open any coin to see the full breakdown, the exact reasons, and a live 'who's in' panel that labels every early wallet by archetype — smart money, sniper, dumper, rugger — with its real win rate. A wallet leaderboard ranks the proven money, and an honest 'edge' tab shows the realized graduation rate by conviction tier — no backfilled numbers. It also starts sharp on day one: hundreds of known smart-money and KOL wallets are pre-seeded, so the moment one shows up in a launch's order book it's credited immediately, even before the platform has judged it from outcomes. Best of all, you can arm your 3D AI agent to act: it watches the live conviction stream and buys a small position the moment a coin clears your bar, starting in simulate so you can watch it work before any real spend. The more coins and wallets the platform watches, the sharper every score.</description></item>+ <item>+ <title>Oracle conviction in the MCP — agents can now read the fused score and the full trader roster</title>+ <link>https://three.ws/oracle</link>+ <guid isPermaLink="false">2026-06-16:Oracle conviction in the MCP — agents can now read the fused score and the full trader roster</guid>+ <pubDate>Tue, 16 Jun 2026 12:00:00 GMT</pubDate>+ <category>feature</category>+ <description>The pump.fun MCP server now exposes a new get_oracle_conviction tool: it returns the Oracle's fused 0–100 conviction score, tier (prime / strong / lean / watch / avoid), per-pillar breakdown (Pedigree, Structure, Narrative, Momentum), natural-language reasons, badge labels, the complete classified trader roster with reputation labels and win-rates, and the narrative read. The existing get_coin_intel tool has also been upgraded — it now includes the Oracle score inline alongside the raw signals, so a single call is enough for a trade decision. 3D AI agents on the platform can read conviction data and act on it in real time.</description>+ </item><item><title>Oracle conviction scores now read live crypto news</title><link>https://three.ws/oracle</link>diff --git a/public/features.json b/public/features.jsonindex 4e01776c8..3b46fc837 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-16T04:32:42.759Z",+ "generated_at": "2026-06-16T04:40:22.691Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",diff --git a/src/dashboard-next/pages/copy.js b/src/dashboard-next/pages/copy.jsindex 299612ed0..ed637cdc3 100644--- a/src/dashboard-next/pages/copy.js+++ b/src/dashboard-next/pages/copy.js@@ -122,19 +122,23 @@ function earningsSection(earnings) {if (!owing.length) return '';const total = Number(earnings.total_fee_owed_sol) || 0;const rows = owing.map((i) => `- <div class="cp-item">+ <div class="cp-item" data-earn-sub="${esc(i.subscription_id)}"><img class="cp-av" src="${esc(i.leader_image || '/favicon.ico')}" alt="" onerror="this.style.visibility='hidden'" /><div class="cp-mid"><div class="cp-title">${esc(i.leader_name || 'trader')}</div><div class="cp-sub">${fmtSol(i.cumulative_profit_sol)} profit copied · ${(i.perf_fee_bps / 100).toFixed(0)}% fee</div></div>- <div class="cp-side"><span class="cp-amt">${fmtSol(i.fee_sol)}</span></div>+ <div class="cp-side">+ <span class="cp-amt">${fmtSol(i.fee_sol)}</span>+ <button class="cp-btn primary" data-settle="${esc(i.subscription_id)}" data-fee-usd="${esc(String(i.fee_usd || ''))}" aria-label="Settle performance fee">Settle in $THREE</button>+ </div></div>`).join('');return `- <section class="cp-sec">- <div class="cp-sec-h"><h2>Performance fees</h2><span class="cp-count">${fmtSol(total)}</span></div>- <p class="cp-note">Leaders earn a performance fee on the profit you make copying them — charged only on gains above your prior peak, never on losses. Settle in $THREE from your agent wallet; 80% goes to the trader, the rest funds buybacks and reflects to $THREE holders.</p>- <div>${rows}</div>+ <section class="cp-sec" id="cp-earn">+ <div class="cp-sec-h"><h2>Performance fees owed</h2><span class="cp-count">${fmtSol(total)}</span></div>+ <p class="cp-note">Charged only on gains above your all-time peak. 80% goes to the trader, 15% to treasury, 5% to $THREE holders. Settlement ratchets your high-water mark so the same profit is never billed twice.</p>+ <div id="cp-earn-rows">${rows}</div>+ <div id="cp-earn-status" style="display:none;font-size:12px;color:var(--nxt-ink-faint);padding:10px 0"></div></section>`;}@@ -220,6 +224,79 @@ async function loadAndRender(host) {loadAndRender(host);} catch { btn.disabled = false; }});++ // Performance fee settlement+ host.querySelector('#cp-earn')?.addEventListener('click', async (e) => {+ const btn = e.target.closest('[data-settle]');+ if (!btn) return;+ const subId = btn.dataset.settle;+ const statusEl = host.querySelector('#cp-earn-status');+ const setStatus = (msg) => { statusEl.style.display = msg ? 'block' : 'none'; statusEl.textContent = msg; };+ btn.disabled = true;+ try {+ await payWithCopyFee(subId, setStatus);+ setStatus('Fee settled. Reloading…');+ setTimeout(() => loadAndRender(host), 1200);+ } catch (err) {+ setStatus(`Payment failed: ${err.message || 'unknown error'}. Try again.`);+ btn.disabled = false;+ }+ });+}++const MEMO_PROGRAM_ID = 'MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr';++async function payWithCopyFee(subscriptionId, onStatus = () => {}) {+ // 1. Request the charge quote from the server+ onStatus('Getting quote…');+ const charge = await post('/api/copy/settle-fee', { subscription_id: subscriptionId });+ if (charge.nothing_to_settle) throw new Error('Nothing to settle right now.');+ if (!charge.quote || !charge.legs || !charge.memo) throw new Error('Invalid quote received.');++ // 2. Load Solana SDK lazily+ onStatus('Preparing transaction…');+ const [{ Connection, PublicKey, Transaction, TransactionInstruction }, { getAssociatedTokenAddressSync, createTransferInstruction, createAssociatedTokenAccountIdempotentInstruction }] =+ await Promise.all([import('@solana/web3.js'), import('@solana/spl-token')]);++ const wallet = window.solana;+ if (!wallet) throw Object.assign(new Error('No wallet found. Install Phantom.'), { code: 'no_wallet' });+ if (!wallet.isConnected) await wallet.connect();+ const payer = wallet.publicKey;+ if (!payer) throw new Error('Wallet has no public key.');++ const rpc = window.__solanaRpc || `${location.origin}/api/solana-rpc`;+ const connection = new Connection(rpc, 'confirmed');++ // 3. Build the $THREE SPL transfer + memo transaction+ const mint = new PublicKey(charge.legs[0]?.mint || 'FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump');+ const fromAta = getAssociatedTokenAddressSync(mint, payer);+ const tx = new Transaction();+ for (const leg of charge.legs) {+ const owner = new PublicKey(leg.address);+ const destAta = getAssociatedTokenAddressSync(mint, owner, true);+ tx.add(createAssociatedTokenAccountIdempotentInstruction(payer, destAta, owner, mint));+ tx.add(createTransferInstruction(fromAta, destAta, payer, BigInt(leg.atomics)));+ }+ tx.add(new TransactionInstruction({+ keys: [],+ programId: new PublicKey(MEMO_PROGRAM_ID),+ data: new TextEncoder().encode(charge.memo),+ }));+ const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash('confirmed');+ tx.feePayer = payer;+ tx.recentBlockhash = blockhash;++ // 4. Sign and send+ onStatus('Waiting for wallet signature…');+ const signature = await wallet.sendTransaction(tx, connection);+ onStatus('Confirming on-chain…');+ await connection.confirmTransaction({ signature, blockhash, lastValidBlockHeight }, 'confirmed');++ // 5. Settle — server verifies and ratchets the HWM+ onStatus('Recording settlement…');+ const settled = await post('/api/copy/settle-fee', { quoteToken: charge.quote, tx_signature: signature });+ if (!settled.ok) throw new Error(settled.error_description || 'Settlement failed on server.');+ return settled;}async function main() {diff --git a/src/launches.css b/src/launches.cssindex 504901345..eafb1f5cd 100644--- a/src/launches.css+++ b/src/launches.css@@ -864,6 +864,10 @@ body {outline-offset: var(--focus-ring-offset);}+.lx-action-watch { flex: 0 0 auto; min-width: 36px; cursor: pointer; font-size: var(--text-md); }+.lx-action-watch.lx-watched { color: var(--accent, #7c83ff); border-color: var(--accent, #7c83ff); }+.lx-action-watch.lx-watched:hover { background: rgba(124,131,255,.08); }+.lx-mint {font-family: var(--font-mono);font-size: var(--text-2xs);diff --git a/src/launches.js b/src/launches.jsindex 5df15c96d..62884487e 100644--- a/src/launches.js+++ b/src/launches.js@@ -46,6 +46,25 @@ const statNetworkEl = document.getElementById('lx-stat-network');const REDUCED_MOTION = window.matchMedia('(prefers-reduced-motion: reduce)').matches;+// ── watchlist helpers (mirrors launch-detail.js & watchlist.js) ──────────────++const WATCH_KEY = 'ld_watchlist';++function watchedMints() {+ try { return new Set(JSON.parse(localStorage.getItem(WATCH_KEY) || '[]')); } catch { return new Set(); }+}++function toggleWatch(mint) {+ try {+ const list = JSON.parse(localStorage.getItem(WATCH_KEY) || '[]');+ const idx = list.indexOf(mint);+ if (idx >= 0) list.splice(idx, 1);+ else list.unshift(mint);+ localStorage.setItem(WATCH_KEY, JSON.stringify(list.slice(0, 200)));+ return idx < 0; // true = now watched+ } catch { return false; }+}+// ── helpers ──────────────────────────────────────────────────────────────────function el(tag, props = {}, children = []) {@@ -373,6 +392,26 @@ function launchCard(launch, index, { featured = false } = {}) {);}+ const watched = !isDevnet && watchedMints().has(launch.mint);+ const watchBtn = isDevnet ? null : el('button', {+ class: `lx-action lx-action-watch${watched ? ' lx-watched' : ''}`,+ type: 'button',+ 'aria-label': watched ? 'Remove from watchlist' : 'Add to watchlist',+ 'aria-pressed': String(watched),+ title: watched ? 'Remove from watchlist' : 'Add to watchlist',+ text: watched ? '★' : '☆',+ onclick: (e) => {+ e.preventDefault();+ e.stopPropagation();+ const nowWatched = toggleWatch(launch.mint);+ watchBtn.textContent = nowWatched ? '★' : '☆';+ watchBtn.classList.toggle('lx-watched', nowWatched);+ watchBtn.setAttribute('aria-pressed', String(nowWatched));+ watchBtn.setAttribute('aria-label', nowWatched ? 'Remove from watchlist' : 'Add to watchlist');+ watchBtn.title = nowWatched ? 'Remove from watchlist' : 'Add to watchlist';+ },+ });+const actions = [el('a', {class: 'lx-action',@@ -401,6 +440,7 @@ function launchCard(launch, index, { featured = false } = {}) {'aria-label': `Visit the 3D world for ${launch.symbol || launch.name}`,}),);+ if (watchBtn) actions.push(watchBtn);}// Abstract orbital glyph seeded from the mint — the coin's deterministicdiff --git a/src/oracle.js b/src/oracle.jsindex 169f6d0bb..a35f40e43 100644--- a/src/oracle.js+++ b/src/oracle.js@@ -13,6 +13,21 @@ const NETWORK = 'mainnet';const $ = (s, r = document) => r.querySelector(s);const $$ = (s, r = document) => [...r.querySelectorAll(s)];+// ── watchlist helpers (same key as launch-detail.js and watchlist.js) ────────+const WATCH_KEY = 'ld_watchlist';+function watchedMints() {+ try { return new Set(JSON.parse(localStorage.getItem(WATCH_KEY) || '[]')); } catch { return new Set(); }+}+function toggleOracleWatch(mint) {+ try {+ const list = JSON.parse(localStorage.getItem(WATCH_KEY) || '[]');+ const idx = list.indexOf(mint);+ if (idx >= 0) list.splice(idx, 1); else list.unshift(mint);+ localStorage.setItem(WATCH_KEY, JSON.stringify(list.slice(0, 200)));+ return idx < 0;+ } catch { return false; }+}+// ── tiny helpers ─────────────────────────────────────────────────────────────const esc = (s) => String(s ?? '').replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));const shortAddr = (a) => (a && a.length > 10 ? `${a.slice(0, 4)}…${a.slice(-4)}` : a || '');@@ -177,8 +192,10 @@ function renderFeed() {const items = [...state.feed.values()].sort((a, b) => b.score - a.score);$('#ctFeed').textContent = items.length ? items.length : '';if (!items.length) return renderFeedEmpty('empty');- $('#feedGrid').innerHTML = items.map(coinCard).join('');- $$('#feedGrid .coin').forEach((c) => c.addEventListener('click', () => openCoin(c.dataset.mint)));+ const grid = $('#feedGrid');+ grid.innerHTML = '';+ const watched = watchedMints();+ items.forEach((it) => grid.appendChild(coinCard(it, watched)));}function renderFeedEmpty(kind) {@@ -194,19 +211,22 @@ function pillar(kind, label, val) {<div class="track"><div class="fill" style="width:${Math.max(0, Math.min(100, val || 0))}%"></div></div></div>`;}-function coinCard(it) {+function coinCard(it, watched = new Set()) {const p = it.pillars || {};- const img = 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>`;const badges = (it.badges || []).map((b) => {const cls = b === 'smart-money' ? 'sm' : b === 'structure-flag' ? 'flag' : b === 'news' ? 'news' : '';const txt = b === 'structure-flag' ? 'structure ⚑' : b;return `<span class="chip ${cls}">${esc(txt)}</span>`;}).join('');- return `<button class="coin ${tierClass(it.tier)}" data-mint="${esc(it.mint)}">++ const btn = document.createElement('button');+ btn.className = `coin ${tierClass(it.tier)}`;+ btn.dataset.mint = it.mint;+ btn.innerHTML = `<div class="coin-top">- ${img}+ ${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-name">${esc(it.name || it.mint.slice(0, 8))}</div>@@ -227,8 +247,32 @@ function coinCard(it) {${it.smart_wallet_count ? `<span class="chip sm"><b>${it.smart_wallet_count}</b> smart in</span>` : ''}${badges}<span class="chip">${ago(it.scored_at)} ago</span>- </div>- </button>`;+ </div>`;+ btn.addEventListener('click', () => openCoin(it.mint));++ const isWatched = watched.has(it.mint);+ const watchBtn = document.createElement('button');+ watchBtn.className = `oc-watch${isWatched ? ' oc-watched' : ''}`;+ watchBtn.type = 'button';+ watchBtn.textContent = isWatched ? '★' : '☆';+ watchBtn.setAttribute('aria-label', isWatched ? 'Remove from watchlist' : 'Add to watchlist');+ watchBtn.setAttribute('aria-pressed', String(isWatched));+ watchBtn.title = isWatched ? 'Remove from watchlist' : 'Add to watchlist';+ watchBtn.addEventListener('click', (e) => {+ e.stopPropagation();+ const nowWatched = toggleOracleWatch(it.mint);+ watchBtn.textContent = nowWatched ? '★' : '☆';+ watchBtn.classList.toggle('oc-watched', nowWatched);+ watchBtn.setAttribute('aria-pressed', String(nowWatched));+ watchBtn.setAttribute('aria-label', nowWatched ? 'Remove from watchlist' : 'Add to watchlist');+ watchBtn.title = nowWatched ? 'Remove from watchlist' : 'Add to watchlist';+ });++ const wrap = document.createElement('div');+ wrap.className = 'coin-wrap';+ wrap.appendChild(btn);+ wrap.appendChild(watchBtn);+ return wrap;}function setStats(data) {diff --git a/src/pump/mcp-tools.js b/src/pump/mcp-tools.jsindex 63f4e990d..d5b838605 100644--- a/src/pump/mcp-tools.js+++ b/src/pump/mcp-tools.js@@ -95,8 +95,16 @@ export const TOOL_ANNOTATIONS = Object.freeze({social_cashtag_sentiment: { title: 'Cashtag Sentiment', ...LOCAL_DETERMINISTIC },kol_leaderboard: { title: 'KOL Leaderboard', ...LIVE_READ },get_coin_intel: { title: 'Coin Intel', ...LIVE_READ },+ get_oracle_conviction: { title: 'Oracle Conviction', ...LIVE_READ },pumpfun_quote_swap: { title: 'Swap Quote (Read-Only)', ...LIVE_READ },social_x_post_impact: { title: 'X Post Price Impact', ...LIVE_READ },+ pumpfun_upload_metadata: {+ title: 'Upload Coin Metadata',+ readOnlyHint: false,+ destructiveHint: false,+ idempotentHint: true,+ openWorldHint: true,+ },pumpfun_bot_status: { title: 'Indexer Status', ...LIVE_READ },});@@ -525,11 +533,149 @@ export const TOOLS = [dev_sold: { type: 'boolean' },unique_buyers: { type: 'integer' },outcome: { type: 'object', nullable: true, description: 'Labeled outcome if available (graduated, ath_multiple, etc).' },+ oracle: {+ type: 'object',+ nullable: true,+ description: 'Fused Oracle conviction score (null if the Oracle engine has not yet scored this coin). Call get_oracle_conviction for the full read including who\'s-in roster and narrative.',+ properties: {+ score: { type: 'number', description: '0–100 fused Oracle score.' },+ tier: { type: 'string', enum: ['prime', 'strong', 'lean', 'watch', 'avoid'] },+ pillars: { type: 'object', description: 'Per-pillar scores: pedigree, structure, narrative, momentum (each 0–100).' },+ badges: { type: 'array', items: { type: 'string' } },+ reasons: { type: 'array', items: { type: 'string' }, description: 'Natural-language explanation of the score.' },+ },+ },+ oracle_url: { type: 'string', description: 'Oracle deep-link for the coin — opens the Oracle war-room drawer directly.' },+ },+ required: ['found'],+ additionalProperties: true,+ },+ },+ {+ name: 'get_oracle_conviction',+ description:+ 'Oracle conviction score for a pump.fun mint — the fused 0–100 score the Oracle engine produces by combining four intelligence pillars: pedigree (who bought it), structure (organic vs bundle, holder concentration, bubblemaps connectivity), narrative (category, meme virality, news hook), and momentum (timing, velocity). Returns the tier (prime ≥86 / strong ≥72 / lean ≥54 / watch ≥36 / avoid), the per-pillar breakdown, the natural-language reasons that drove the score, the full "who\'s in" trader roster with reputation labels and win-rates, and the narrative read (category, virality, tags). Call this when you need the highest-confidence trade signal — it synthesises everything get_coin_intel exposes into one actionable score. Pairs with get_coin_intel for raw signals.',+ inputSchema: {+ type: 'object',+ properties: {+ mint: { type: 'string', description: 'Solana mint address (base58).' },+ network: { type: 'string', enum: ['mainnet', 'devnet'], default: 'mainnet' },+ },+ required: ['mint'],+ },+ outputSchema: {+ type: 'object',+ properties: {+ found: { type: 'boolean' },+ mint: { type: 'string' },+ symbol: { type: 'string' },+ name: { type: 'string' },+ conviction: {+ type: 'object',+ nullable: true,+ description: 'Fused conviction verdict. null if the Oracle has not yet scored this coin.',+ properties: {+ score: { type: 'number', description: '0–100 fused Oracle score.' },+ tier: { type: 'string', enum: ['prime', 'strong', 'lean', 'watch', 'avoid'], description: 'prime ≥86, strong ≥72, lean ≥54, watch ≥36, avoid <36.' },+ pillars: {+ type: 'object',+ properties: {+ pedigree: { type: 'number', description: 'Smart-money pedigree pillar score (0–100, weight 34%).' },+ structure: { type: 'number', description: 'Structure pillar score: organic/bundle/concentration/connectivity (0–100, weight 30%).' },+ narrative: { type: 'number', description: 'Narrative pillar score: category fit, meme virality, news hook (0–100, weight 18%).' },+ momentum: { type: 'number', description: 'Momentum pillar score: velocity, buy/sell ratio, timing entropy (0–100, weight 18%).' },+ },+ },+ structure_cap: { type: 'boolean', description: 'true when structural flags capped the score below raw pillar math.' },+ badges: { type: 'array', items: { type: 'string' }, description: 'Short human-readable badges attached to this coin, e.g. "Smart money: 3 wallets".' },+ reasons: { type: 'array', items: { type: 'string' }, description: 'Natural-language sentences explaining every signal that drove the score.' },+ scored_at: { type: 'string', description: 'ISO timestamp when the conviction was last computed.' },+ },+ },+ narrative: {+ type: 'object',+ nullable: true,+ description: 'Narrative classification for the coin.',+ properties: {+ category: { type: 'string', description: 'E.g. meme, ai, tech, culture, news, defi.' },+ narrative: { type: 'string', description: 'One-sentence description of the coin\'s story or hook.' },+ virality: { type: 'number', nullable: true, description: '0–1 estimated virality of the narrative.' },+ confidence: { type: 'number', nullable: true },+ tags: { type: 'array', items: { type: 'string' } },+ source: { type: 'string', description: 'Classifier that produced the narrative read.' },+ },+ },+ whos_in: {+ type: 'array',+ description: 'Classified trader roster — every wallet that touched this coin, annotated with their reputation.',+ items: {+ type: 'object',+ properties: {+ wallet: { type: 'string' },+ label: { type: 'string', description: 'Trader archetype: smart_money, kol, sniper, whale, early_degen, recycler, dca_buyer, dca_seller, bot, unproven.' },+ score: { type: 'number', nullable: true, description: 'Brain reputation score (0–100).' },+ win_rate: { type: 'number', nullable: true, description: 'Historical win-rate (0–1).' },+ early_win_rate: { type: 'number', nullable: true, description: 'Win-rate on early entries specifically.' },+ source: { type: 'string', nullable: true, description: '"brain" (trained) or "gmgn" (seed corpus).' },+ tag: { type: 'string', nullable: true, description: 'Social handle when known (from seed corpus).' },+ buy_sol: { type: 'number', description: 'Total SOL bought.' },+ sell_sol: { type: 'number', description: 'Total SOL sold.' },+ is_creator: { type: 'boolean' },+ funder: { type: 'string', nullable: true, description: 'The wallet that funded this one (if identified).' },+ },+ },+ },+ outcome: {+ type: 'object',+ nullable: true,+ description: 'Labeled outcome if available.',+ properties: {+ outcome: { type: 'string' },+ graduated: { type: 'boolean' },+ rugged: { type: 'boolean' },+ ath_market_cap_usd: { type: 'number', nullable: true },+ ath_multiple: { type: 'number', nullable: true },+ },+ },+ url: { type: 'string', description: 'Oracle deep-link URL for this coin.' },},required: ['found'],additionalProperties: true,},},+ {+ name: 'pumpfun_upload_metadata',+ description:+ 'Upload coin metadata (name, symbol, description, image) to IPFS and get back a pump.fun-ready metadata URI. Call this before launching a coin — pass the returned uri to the launch-agent endpoint or the studio launch flow. Requires a valid bearer token (API key). Image may be a public HTTPS URL or a base64 data URI (max 10 MB). The returned uri is a permanent ipfs:// link; the call is idempotent for the same content.',+ inputSchema: {+ type: 'object',+ properties: {+ name: { type: 'string', description: 'Coin name (1–32 chars).' },+ symbol: { type: 'string', description: 'Ticker symbol (1–10 chars, no $).' },+ description: { type: 'string', description: 'Coin description (max 500 chars).' },+ image_url: {+ type: 'string',+ description:+ 'Image for the coin icon. Public HTTPS URL or base64 data URI (data:image/png;base64,…). Square image, at least 400×400 px, under 5 MB.',+ },+ twitter: { type: 'string', description: 'Twitter/X handle or URL (optional).' },+ telegram: { type: 'string', description: 'Telegram URL (optional).' },+ website: { type: 'string', description: 'Website URL (optional).' },+ },+ required: ['name', 'symbol', 'description', 'image_url'],+ },+ outputSchema: {+ type: 'object',+ properties: {+ uri: { type: 'string', description: 'ipfs:// URI ready for the pump.fun launch-agent `uri` field.' },+ cid: { type: 'string', description: 'IPFS CID of the metadata JSON.' },+ image_cid: { type: 'string', description: 'IPFS CID of the uploaded image.' },+ provider: { type: 'string', description: 'IPFS provider used.' },+ },+ required: ['uri', 'cid'],+ additionalProperties: false,+ },+ },{name: 'pumpfun_bot_status',description: