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
feat(oracle): route trade links through the shared terminal link builder
nirholas685037c8ec83
diff --git a/api/_lib/oracle/alerts.js b/api/_lib/oracle/alerts.jsindex 75abbe3f1..d019364ae 100644--- a/api/_lib/oracle/alerts.js+++ b/api/_lib/oracle/alerts.js@@ -23,6 +23,7 @@// Fire-and-forget with a 4s abort — never delays the scoring loop.import { sql } from '../db.js';+import { gmgnTokenUrl, axiomTokenUrl } from '../../../src/shared/trading-terminals.js';const ALERT_TIMEOUT_MS = 4000;// Minimum tier to alert on. 'prime' only = exclusive. 'strong' = more volume.@@ -79,7 +80,7 @@ function format(coin) {pillars ? `<i>${pillars}</i>` : '',`<code>${escHtml(coin.mint)}</code>`,`${category}${smart}`,- `<a href="https://pump.fun/coin/${encodeURIComponent(coin.mint)}">pump.fun</a> · <a href="https://three.ws/oracle/coin/${encodeURIComponent(coin.mint)}">Oracle</a>`,+ `<a href="https://pump.fun/coin/${encodeURIComponent(coin.mint)}">pump.fun</a> · <a href="${gmgnTokenUrl(coin.mint)}">GMGN</a> · <a href="${axiomTokenUrl(coin.mint)}">Axiom</a> · <a href="https://three.ws/oracle/coin/${encodeURIComponent(coin.mint)}">Oracle</a>`,].filter(Boolean).join('\n');}@@ -156,7 +157,7 @@ export async function alertProfitableExit(exits) {const text = [`${emoji} <b>${agentName}</b> made <b>${escHtml(pnlStr)}</b> on <b>$${sym}</b>${modeLabel}`,`Peak: <b>${peakStr}</b> · Size: ${escHtml(sizeStr)} · Entry: ${tierE} ${escHtml(e.tier)} conviction (${e.conviction ?? '?'})`,- `<a href="https://pump.fun/coin/${encodeURIComponent(e.mint)}">pump.fun</a> · <a href="https://three.ws/oracle/coin/${encodeURIComponent(e.mint)}">Oracle</a> · <a href="https://three.ws/agents/${encodeURIComponent(e.agent_id)}">Track record</a>`,+ `<a href="https://pump.fun/coin/${encodeURIComponent(e.mint)}">pump.fun</a> · <a href="${gmgnTokenUrl(e.mint)}">GMGN</a> · <a href="https://three.ws/oracle/coin/${encodeURIComponent(e.mint)}">Oracle</a> · <a href="https://three.ws/agents/${encodeURIComponent(e.agent_id)}">Track record</a>`,].join('\n');await send(text);@@ -192,7 +193,7 @@ export async function alertAgentEntry(entries) {const text = [`${tierE} <b>${agentName}</b> entered <b>$${sym}</b>`,`${escHtml(e.tier)} conviction${convStr} · ${escHtml(sizeStr)}`,- `<a href="https://pump.fun/coin/${encodeURIComponent(e.mint)}">pump.fun</a> · <a href="https://three.ws/oracle/coin/${encodeURIComponent(e.mint)}">Oracle ↗</a> · <a href="https://three.ws/trader/${encodeURIComponent(e.agent_id)}">Copy trades →</a>`,+ `<a href="https://pump.fun/coin/${encodeURIComponent(e.mint)}">pump.fun</a> · <a href="${gmgnTokenUrl(e.mint)}">GMGN</a> · <a href="https://three.ws/oracle/coin/${encodeURIComponent(e.mint)}">Oracle ↗</a> · <a href="https://three.ws/trader/${encodeURIComponent(e.agent_id)}">Copy trades →</a>`,].join('\n');await send(text);diff --git a/api/cron/oracle-digest.js b/api/cron/oracle-digest.jsindex d9f86dc81..a8d42d42a 100644--- a/api/cron/oracle-digest.js+++ b/api/cron/oracle-digest.js@@ -19,6 +19,7 @@ import { error, json, method, wrapCron } from '../_lib/http.js';import { env } from '../_lib/env.js';import { constantTimeEquals } from '../_lib/crypto.js';import { sql } from '../_lib/db.js';+import { gmgnTokenUrl, referralUrl, TERMINAL_LABELS } from '../../src/shared/trading-terminals.js';const TIER_EMOJI = { prime: '🟣', strong: '🔵', lean: '🟡', watch: '⚪', avoid: '🔴' };const ALERT_TIMEOUT_MS = 5000;@@ -215,7 +216,7 @@ export function buildChannelDigest({ scored, actions, top }) {for (const c of top) {const e = TIER_EMOJI[c.tier] || '⚪';const cat = c.category && c.category !== 'unknown' ? ` · ${esc(c.category)}` : '';- lines.push(`${e} <b>$${esc(c.symbol || c.mint.slice(0, 6))}</b> · <code>${c.score}</code>${cat} · <a href="https://three.ws/oracle/coin/${encodeURIComponent(c.mint)}">view</a>`);+ lines.push(`${e} <b>$${esc(c.symbol || c.mint.slice(0, 6))}</b> · <code>${c.score}</code>${cat} · <a href="https://three.ws/oracle/coin/${encodeURIComponent(c.mint)}">view</a> · <a href="${gmgnTokenUrl(c.mint)}">GMGN</a>`);}lines.push(``);} else {@@ -228,6 +229,10 @@ export function buildChannelDigest({ scored, actions, top }) {lines.push(`<b>Agents</b> ${actions.total} action${actions.total !== 1 ? 's' : ''} · ${actions.wins}W / ${actions.losses}L${pnlStr}`, ``);}+ const offers = ['gmgn', 'axiom', 'padre', 'fomo']+ .map((k) => `<a href="${referralUrl(k)}">${TERMINAL_LABELS[k]}</a>`)+ .join(' · ');+ lines.push(`Trade with a fee discount: ${offers}`);lines.push(`<a href="https://three.ws/oracle">Open the live feed →</a>`);return lines.join('\n');}diff --git a/api/oracle-share.js b/api/oracle-share.jsindex f4bc51e16..645873731 100644--- a/api/oracle-share.js+++ b/api/oracle-share.js@@ -20,6 +20,7 @@import { sql } from './_lib/db.js';import { cors, wrap } from './_lib/http.js';import { env } from './_lib/env.js';+import { terminalLinks } from '../src/shared/trading-terminals.js';const MINT_RE = /^[1-9A-HJ-NP-Za-km-z]{32,44}$/;const PUMP_V3 = 'https://frontend-api-v3.pump.fun';@@ -228,6 +229,7 @@ function heroHtml({ mint, row, pump, origin }) {const actions = `<div class="cv-pills oc-actions"><a class="cv-pill" href="${esc(pumpUrl(mint))}" target="_blank" rel="noopener">pump.fun ↗</a>+ ${terminalLinks(mint).map((t) => `<a class="cv-pill" href="${esc(t.url)}" target="_blank" rel="noopener">${esc(t.label)} ↗</a>`).join('\n\t\t')}<a class="cv-pill" href="https://solscan.io/token/${esc(mint)}" target="_blank" rel="noopener">Solscan ↗</a><a class="cv-pill" href="/coin3d?mint=${encodeURIComponent(mint)}" title="Open the full 3D coin profile">View in 3D</a><a class="cv-pill" href="/launches/${esc(mint)}">Launch details</a>diff --git a/src/oracle.js b/src/oracle.jsindex 06da3a2ff..74a19f093 100644--- a/src/oracle.js+++ b/src/oracle.js@@ -10,6 +10,7 @@// force graph. The coin drawer also streams live trades via oracle-tape.js.import { proxiedImageURL } from './ipfs.js';+import { gmgnTokenUrl } from './shared/trading-terminals.js';const NETWORK = 'mainnet';const $ = (s, r = document) => r.querySelector(s);@@ -1768,6 +1769,7 @@ function renderDrawer(d) {<div class="dr-actions"><a class="dr-act" href="/oracle/coin/${encodeURIComponent(c.mint)}" title="Open the full conviction page">Full page ↗</a><a class="dr-act" href="${pumpUrl(c.mint)}" target="_blank" rel="noopener">pump.fun ↗</a>+ <a class="dr-act" href="${gmgnTokenUrl(c.mint)}" target="_blank" rel="noopener" title="Trade on GMGN">GMGN ↗</a><a class="dr-act" href="${solscan(c.mint)}" target="_blank" rel="noopener">solscan ↗</a><a class="dr-act" href="/launches/${esc(c.mint)}" target="_blank" rel="noopener">Details ↗</a><a class="dr-act" href="/coin3d?mint=${encodeURIComponent(c.mint)}" target="_blank" rel="noopener" title="Open the full 3D coin profile">View in 3D ↗</a>@@ -2094,6 +2096,7 @@ function renderMarket(m) {// Chart + explorer + social links.const lk = m.links || {};const linkBtns = [+ lk.gmgn ? `<a class="dr-act" href="${esc(lk.gmgn)}" target="_blank" rel="noopener">GMGN ↗</a>` : '',lk.dexscreener ? `<a class="dr-act" href="${esc(lk.dexscreener)}" target="_blank" rel="noopener">DexScreener ↗</a>` : '',lk.geckoterminal ? `<a class="dr-act" href="${esc(lk.geckoterminal)}" target="_blank" rel="noopener">GeckoTerminal ↗</a>` : '',lk.birdeye ? `<a class="dr-act" href="${esc(lk.birdeye)}" target="_blank" rel="noopener">Birdeye ↗</a>` : '',