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
<!DOCTYPE html>
<html lang="en">
<head>
<script>/* three.ws theme boot — no-flash */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title data-i18n="activity.meta_title">Agent Activity · Oracle · three.ws</title>
<meta name="description" content="The live trading floor: every move 3D agents make on pump.fun, in real time. Autonomous agents act on Oracle conviction — watch them trade, track outcomes, and copy the winners. Live conviction movers, the agent leaderboard, and proven wins, all on one screen." data-i18n-attr="content:activity.meta_description"/>
<link rel="canonical" href="https://three.ws/activity" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<link rel="manifest" href="/manifest.webmanifest" />
<link rel="stylesheet" href="/style.css" />
<link rel="stylesheet" href="/nav.css" />
<link rel="stylesheet" href="/mobile.css" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Agent Activity · Oracle · three.ws" data-i18n-attr="content:activity.meta_og_title"/>
<meta property="og:description" content="The live trading floor: every Oracle conviction action from every autonomous 3D agent on pump.fun. Conviction movers, the agent leaderboard, and proven wins — live." data-i18n-attr="content:activity.meta_og_description"/>
<meta property="og:url" content="https://three.ws/activity" />
<meta property="og:image" content="https://three.ws/api/page-og?s=crypto&t=Agent+Activity%3A+Oracle+conviction+in+real+time&d=The+trading+floor%3A+every+Oracle+conviction+action+from+every+autonomous+3D+agent+on+pump.fun%2C+live.+Filter+by+tier+and+mode%2C+track+outcomes%2C+and+copy+the&p=%2Factivity" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Agent Activity · Oracle · three.ws" data-i18n-attr="content:activity.meta_twitter_title"/>
<meta name="twitter:description" content="The live trading floor: every move 3D agents make on pump.fun, in real time." data-i18n-attr="content:activity.meta_twitter_description"/>
<meta name="twitter:image" content="https://three.ws/api/page-og?s=crypto&t=Agent+Activity%3A+Oracle+conviction+in+real+time&d=The+trading+floor%3A+every+Oracle+conviction+action+from+every+autonomous+3D+agent+on+pump.fun%2C+live.+Filter+by+tier+and+mode%2C+track+outcomes%2C+and+copy+the&p=%2Factivity" />
<style>
:root {
--ac-bg: #07080c;
--ac-panel: rgba(16,18,26,0.88);
--ac-panel2: rgba(255,255,255,0.03);
--ac-border: rgba(255,255,255,0.09);
--ac-border2: rgba(255,255,255,0.16);
--ac-text: #e9ebf2;
--ac-muted: #8a90a2;
--ac-faint: #5c6273;
--ac-accent: #8b5cf6;
--ac-up: #34d399;
--ac-dn: var(--danger);
--ac-warn: var(--warn);
--ac-neutral: #818cf8;
/* tier palette */
--tier-prime: #c084fc;
--tier-strong: #93c5fd;
--tier-lean: #fde047;
--tier-watch: #94a3b8;
--tier-avoid: #fca5a5;
}
html, body { background: var(--ac-bg); color: var(--ac-text); margin: 0; }
body { font-family: var(--font-body, 'Inter', system-ui, sans-serif); min-height: 100vh; }
* { box-sizing: border-box; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(0,0,0,0.82); backdrop-filter: blur(10px); }
.ac-wrap { max-width: 1240px; margin: 0 auto; padding: 0 18px 90px; }
/* ── hero ── */
.ac-hero {
padding: 28px 0 16px;
display: flex; flex-wrap: wrap; gap: 14px;
align-items: flex-end; justify-content: space-between;
}
.ac-hero h1 {
font-family: var(--font-display, 'Space Grotesk', sans-serif);
font-size: clamp(1.6rem, 3vw, 2.2rem);
line-height: 1.05; margin: 0 0 5px; letter-spacing: -0.02em;
display: flex; align-items: center; gap: 10px;
}
.ac-pulse {
width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
background: var(--ac-up); box-shadow: 0 0 0 0 rgba(52,211,153,0.6);
animation: acPing 2.2s ease-out infinite;
}
.ac-pulse.is-stale { background: var(--ac-warn); animation: none; box-shadow: 0 0 0 3px rgba(251,191,36,.14); }
@keyframes acPing { 0%{box-shadow:0 0 0 0 rgba(52,211,153,.55);}70%{box-shadow:0 0 0 10px rgba(52,211,153,0);}100%{box-shadow:0 0 0 0 rgba(52,211,153,0);} }
.ac-hero p { margin: 0; color: var(--ac-muted); font-size: 13.5px; max-width: 560px; line-height: 1.5; }
/* ── kpis ── */
.ac-kpis { display: flex; gap: 8px; flex-wrap: wrap; }
.ac-kpi {
background: var(--ac-panel2); border: 1px solid var(--ac-border);
border-radius: 11px; padding: 9px 13px; min-width: 84px;
font-family: var(--font-mono, ui-monospace, monospace);
}
.ac-kpi .v { font-size: 18px; font-weight: 700; color: var(--ac-text); font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 3px; }
.ac-kpi .v.up { color: var(--ac-up); }
.ac-kpi .v.dn { color: var(--ac-dn); }
.ac-kpi .v.accent { color: var(--ac-accent); }
.ac-kpi .l { font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ac-faint); margin-top: 2px; }
.ac-kpi.is-skel .v { color: transparent; border-radius: 5px; background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.11), rgba(255,255,255,.05)); background-size: 200% 100%; animation: acShimmer 1.4s infinite; width: 42px; height: 18px; }
/* ── layout: feed + rail ── */
.ac-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.ac-main { min-width: 0; }
.ac-rail { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 76px; }
/* ── insight strip ── */
.ac-insight {
display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px;
}
.ac-insight-card {
flex: 1 1 160px; min-width: 0; display: flex; align-items: center; gap: 10px;
background: linear-gradient(135deg, rgba(139,92,246,.08), rgba(255,255,255,.02));
border: 1px solid var(--ac-border); border-radius: 12px; padding: 10px 12px;
text-decoration: none; color: inherit; transition: border-color var(--duration-fast), transform var(--duration-fast);
animation: acIn .35s ease both;
}
.ac-insight-card:hover { border-color: rgba(139,92,246,.4); transform: translateY(-1px); }
.ac-insight-card .ic { font-size: 18px; flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.04); }
/* .it/.ik/.iv are inline <span>s inside a flex row: without an explicit
block/flex display the kicker and the value run together on one line
and the ellipsis truncation below never engages. */
.ac-insight-card .it { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ac-insight-card .ik { display: block; font-size: 9.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--ac-faint); }
.ac-insight-card .iv { display: block; font-size: 13px; font-weight: 700; color: var(--ac-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-insight-card .iv .sub { font-weight: 600; font-size: 11.5px; color: var(--ac-muted); margin-left: 4px; }
.ac-insight-card .iv.up { color: var(--ac-up); }
/* ── toolbar ── */
.ac-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 14px 0 16px; }
.ac-chip {
background: var(--ac-panel2); border: 1px solid var(--ac-border); color: var(--ac-muted);
border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12px;
cursor: pointer; transition: all var(--duration-fast); white-space: nowrap;
}
.ac-chip:hover { color: var(--ac-text); border-color: var(--ac-border2); }
.ac-chip.is-active { background: rgba(139,92,246,0.18); border-color: rgba(139,92,246,0.5); color: #fff; }
.ac-chip.tier-prime { --tc: rgba(192,132,252,.25); --tb: rgba(192,132,252,.5); }
.ac-chip.tier-strong { --tc: rgba(147,197,253,.2); --tb: rgba(147,197,253,.45); }
.ac-chip.tier-lean { --tc: rgba(253,224,71,.18); --tb: rgba(253,224,71,.42); }
.ac-chip.is-active.tier-prime { background: var(--tc); border-color: var(--tb); }
.ac-chip.is-active.tier-strong { background: var(--tc); border-color: var(--tb); }
.ac-chip.is-active.tier-lean { background: var(--tc); border-color: var(--tb); }
.ac-sep { width: 1px; height: 22px; background: var(--ac-border); flex-shrink: 0; }
.ac-mode-pill {
font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
border: 1px solid var(--ac-border); background: var(--ac-panel2); color: var(--ac-muted);
cursor: pointer; transition: all var(--duration-fast);
}
.ac-mode-pill.is-active { background: rgba(139,92,246,.15); border-color: rgba(139,92,246,.4); color: #fff; }
.ac-mode-pill.live { color: var(--ac-up); border-color: rgba(52,211,153,.3); background: rgba(52,211,153,.07); }
.ac-mode-pill.live.is-active { background: rgba(52,211,153,.18); border-color: rgba(52,211,153,.5); }
/* search */
.ac-search { position: relative; flex: 1 1 180px; min-width: 150px; max-width: 280px; }
.ac-search input {
width: 100%; background: var(--ac-panel2); border: 1px solid var(--ac-border);
border-radius: 999px; color: var(--ac-text); font: inherit; font-size: 12.5px;
padding: 6px 28px 6px 30px; transition: border-color var(--duration-fast), background var(--duration-fast);
}
.ac-search input::placeholder { color: var(--ac-faint); }
.ac-search input:focus { outline: none; border-color: rgba(139,92,246,.5); background: rgba(139,92,246,.06); }
.ac-search .si { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ac-faint); font-size: 12px; pointer-events: none; }
.ac-search .sx { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--ac-faint); cursor: pointer; font-size: 14px; padding: 2px 4px; line-height: 1; border-radius: 50%; }
.ac-search .sx:hover { color: var(--ac-text); }
.ac-refresh { font-size: 11px; color: var(--ac-faint); margin-left: auto; display: inline-flex; align-items: center; gap: 5px; }
/* ── feed ── */
.ac-feed { display: flex; flex-direction: column; gap: 8px; }
.ac-row {
display: flex; align-items: center; gap: 12px;
background: var(--ac-panel); border: 1px solid var(--ac-border);
border-radius: 12px; padding: 12px 14px;
transition: border-color var(--duration-fast), transform var(--duration-fast);
animation: acIn .35s ease both;
position: relative; overflow: hidden;
}
@keyframes acIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ac-row:hover { border-color: var(--ac-border2); transform: translateX(2px); }
.ac-row[hidden] { display: none; }
.ac-row.is-new { animation: acFlash 1.1s ease both; }
@keyframes acFlash { 0%{ background: rgba(139,92,246,.14); border-color: rgba(139,92,246,.45);} 100%{ background: var(--ac-panel); border-color: var(--ac-border);} }
.ac-row .outcome-edge { position: absolute; top: 0; bottom: 0; left: 0; width: 3px; }
.ac-row.oc-win .outcome-edge { background: var(--ac-up); }
.ac-row.oc-loss .outcome-edge { background: var(--ac-dn); }
.ac-row.oc-flat .outcome-edge { background: var(--ac-faint); }
.ac-row.oc-open .outcome-edge { background: var(--ac-warn); }
/* agent avatar */
.ac-av { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; border: 1px solid var(--ac-border); background: rgba(255,255,255,.05); flex-shrink: 0; }
/* tier pill */
.ac-tier {
font: 700 9.5px/1 var(--font-mono, ui-monospace, monospace);
letter-spacing: .06em; text-transform: uppercase;
padding: 3px 7px; border-radius: 5px; flex-shrink: 0; white-space: nowrap;
}
.ac-tier.prime { background: rgba(192,132,252,.18); color: var(--tier-prime); border: 1px solid rgba(192,132,252,.35); }
.ac-tier.strong { background: rgba(147,197,253,.16); color: var(--tier-strong); border: 1px solid rgba(147,197,253,.3); }
.ac-tier.lean { background: rgba(253,224,71,.14); color: var(--tier-lean); border: 1px solid rgba(253,224,71,.3); }
.ac-tier.watch { background: rgba(255,255,255,.05); color: var(--tier-watch); border: 1px solid rgba(255,255,255,.12); }
.ac-tier.avoid { background: rgba(248,113,113,.14); color: var(--tier-avoid); border: 1px solid rgba(248,113,113,.3); }
.ac-body { flex: 1; min-width: 0; }
.ac-headline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; }
.ac-agent { font-weight: 600; font-size: 13.5px; color: var(--ac-text); text-decoration: none; }
.ac-agent:hover { color: var(--ac-accent); }
.ac-verb { font-size: 12px; color: var(--ac-muted); }
.ac-coin { font-family: var(--font-mono, ui-monospace, monospace); font-size: 13px; font-weight: 700; color: var(--ac-neutral); text-decoration: none; }
.ac-coin:hover { color: var(--ac-text); }
.ac-meta { font-size: 11.5px; color: var(--ac-faint); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ac-meta a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--ac-faint); }
.ac-meta a:hover { color: var(--ac-muted); }
.ac-meta .dotsep { opacity: .5; }
/* conviction micro-bar */
.ac-conv { display: inline-flex; align-items: center; gap: 5px; }
.ac-conv .track { width: 34px; height: 4px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.ac-conv .fill { height: 100%; border-radius: 3px; background: var(--cc, var(--ac-neutral)); }
.ac-reason { font-size: 11.5px; color: var(--ac-muted); margin-top: 3px; font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
/* right column */
.ac-right { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ac-pnl { font-family: var(--font-mono, ui-monospace, monospace); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ac-pnl.up { color: var(--ac-up); }
.ac-pnl.dn { color: var(--ac-dn); }
.ac-pnl.neutral { color: var(--ac-muted); }
.ac-outcome { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 4px; text-transform: uppercase; letter-spacing: .04em; }
.ac-outcome.win { background: rgba(52,211,153,.15); color: var(--ac-up); }
.ac-outcome.loss { background: rgba(248,113,113,.15); color: var(--ac-dn); }
.ac-outcome.flat { background: rgba(255,255,255,.06); color: var(--ac-faint); }
.ac-outcome.open { background: rgba(251,191,36,.12); color: var(--ac-warn); }
.ac-mode-tag { font-size: 9px; font-weight: 700; padding: 2px 5px; border-radius: 4px; text-transform: uppercase; letter-spacing: .05em; }
.ac-mode-tag.sim { background: rgba(251,191,36,.12); color: rgba(251,191,36,.7); }
.ac-mode-tag.live { background: rgba(52,211,153,.12); color: var(--ac-up); }
/* copy CTA */
.ac-copy-cta {
font-size: 11px; padding: 4px 9px; border-radius: 7px;
background: var(--ac-panel2); border: 1px solid var(--ac-border);
color: var(--ac-muted); text-decoration: none; white-space: nowrap;
transition: background var(--duration-fast), color var(--duration-fast);
}
.ac-copy-cta:hover { background: rgba(139,92,246,.2); border-color: rgba(139,92,246,.4); color: #fff; }
/* empty / skeleton / error */
.ac-skel { background: var(--ac-panel); border: 1px solid var(--ac-border); border-radius: 12px; padding: 14px; display: flex; gap: 12px; align-items: center; }
.ac-skel .sh { border-radius: 6px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: acShimmer 1.4s infinite; }
@keyframes acShimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.ac-skel .sh-av { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; }
.ac-empty { text-align: center; padding: 56px 24px; border: 1px dashed var(--ac-border2); border-radius: 14px; background: var(--ac-panel2); }
.ac-empty .icon { font-size: 28px; opacity: .6; }
.ac-empty h3 { font-family: var(--font-display, sans-serif); font-size: 17px; margin: 12px 0 7px; }
.ac-empty p { color: var(--ac-muted); font-size: 13px; max-width: 480px; margin: 0 auto; line-height: 1.55; }
.ac-empty-cta { display: inline-flex; align-items: center; gap: 7px; margin-top: 16px; background: rgba(139,92,246,.16); border: 1px solid rgba(139,92,246,.4); color: #fff; border-radius: 10px; padding: 9px 16px; font-size: 13px; font-weight: 600; text-decoration: none; transition: background var(--duration-fast), border-color var(--duration-fast); }
.ac-empty-cta:hover { background: rgba(139,92,246,.28); border-color: rgba(139,92,246,.6); }
.ac-empty-sub { display: inline-flex; gap: 14px; margin-top: 14px; font-size: 12px; color: var(--ac-faint); flex-wrap: wrap; justify-content: center; }
.ac-empty-sub a { color: var(--ac-muted); text-decoration: none; border-bottom: 1px dotted var(--ac-faint); }
.ac-empty-sub a:hover { color: var(--ac-text); }
.ac-load-more { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 10px; background: var(--ac-panel2); border: 1px solid var(--ac-border); border-radius: 10px; padding: 11px; font: inherit; font-size: 13px; color: var(--ac-muted); cursor: pointer; transition: color var(--duration-fast), border-color var(--duration-fast); }
.ac-load-more:hover:not(:disabled) { color: var(--ac-text); border-color: var(--ac-border2); }
.ac-load-more:disabled { opacity: .6; cursor: progress; }
.ac-spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid rgba(255,255,255,.18); border-top-color: var(--ac-accent); animation: acSpin .7s linear infinite; flex-shrink: 0; }
@keyframes acSpin { to { transform: rotate(360deg); } }
/* error / retry */
.ac-error-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.ac-retry-btn { display: inline-flex; align-items: center; gap: 7px; background: rgba(139,92,246,.16); border: 1px solid rgba(139,92,246,.4); color: #fff; border-radius: 10px; padding: 9px 16px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background var(--duration-fast), border-color var(--duration-fast); }
.ac-retry-btn:hover:not(:disabled) { background: rgba(139,92,246,.28); border-color: rgba(139,92,246,.6); }
.ac-retry-btn:disabled { opacity: .6; cursor: progress; }
/* stale-data banner */
.ac-stale { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 9px 13px; border-radius: 10px; font-size: 12.5px; background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.32); color: var(--ac-warn); animation: acIn .25s ease both; }
.ac-stale .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ac-warn); flex-shrink: 0; }
.ac-stale .ac-stale-text { flex: 1; min-width: 0; color: #f3d58a; }
.ac-stale .ac-retry-btn { background: rgba(251,191,36,.14); border-color: rgba(251,191,36,.4); padding: 5px 11px; font-size: 12px; color: var(--ac-warn); }
.ac-stale .ac-retry-btn:hover:not(:disabled) { background: rgba(251,191,36,.24); border-color: rgba(251,191,36,.6); }
/* "new actions" jump pill */
.ac-newpill { position: sticky; top: 70px; z-index: 6; align-self: center; margin: 0 auto 4px; display: none; }
.ac-newpill button { display: inline-flex; align-items: center; gap: 6px; background: rgba(139,92,246,.92); border: 1px solid rgba(139,92,246,.6); color: #fff; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; box-shadow: 0 6px 22px rgba(139,92,246,.4); transition: transform var(--duration-fast); }
.ac-newpill button:hover { transform: translateY(-1px); }
/* no-search-results */
.ac-noresults { text-align: center; padding: 34px 18px; color: var(--ac-muted); font-size: 13px; border: 1px dashed var(--ac-border); border-radius: 12px; }
.ac-noresults button { background: none; border: none; color: var(--ac-accent); cursor: pointer; font: inherit; text-decoration: underline; }
/* outcome filter pills */
.ac-outcome-pill {
padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.1);
background: transparent; color: var(--ac-muted); font: inherit; font-size: 12px;
cursor: pointer; transition: color var(--duration-fast), border-color var(--duration-fast), background var(--duration-fast);
white-space: nowrap;
}
.ac-outcome-pill:hover { color: var(--ac-text); border-color: rgba(255,255,255,.25); }
.ac-outcome-pill.is-active { background: rgba(255,255,255,.07); color: var(--ac-text); border-color: rgba(255,255,255,.22); }
.ac-outcome-pill.win.is-active { color: var(--ac-up); border-color: rgba(52,211,153,.45); background: rgba(52,211,153,.1); }
.ac-outcome-pill.loss.is-active { color: var(--ac-dn); border-color: rgba(248,113,113,.45); background: rgba(248,113,113,.09); }
.ac-outcome-pill.open.is-active { color: var(--ac-warn); border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.08); }
/* ── rail cards ── */
.ac-card { background: var(--ac-panel); border: 1px solid var(--ac-border); border-radius: 14px; overflow: hidden; }
.ac-card-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px 10px; }
.ac-card-h .ttl { font-family: var(--font-display, sans-serif); font-size: 13px; font-weight: 700; letter-spacing: -.01em; flex: 1; display: flex; align-items: center; gap: 7px; }
.ac-card-h .ttl .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.ac-card-h .more { font-size: 11px; color: var(--ac-faint); text-decoration: none; white-space: nowrap; transition: color var(--duration-fast); }
.ac-card-h .more:hover { color: var(--ac-accent); }
.ac-card-b { padding: 2px 8px 8px; }
.ac-li { display: flex; align-items: center; gap: 9px; padding: 7px 6px; border-radius: 9px; text-decoration: none; color: inherit; transition: background var(--duration-fast); }
.ac-li:hover { background: rgba(255,255,255,.04); }
.ac-li-rank { font-family: var(--font-mono, monospace); font-size: 11px; font-weight: 700; color: var(--ac-faint); width: 16px; text-align: center; flex-shrink: 0; }
.ac-li-rank.top { color: var(--ac-warn); }
.ac-li-av { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; border: 1px solid var(--ac-border); background: rgba(255,255,255,.05); flex-shrink: 0; }
.ac-li-av.round { border-radius: 50%; }
/* Rail rows are name-over-subtitle and value-over-caption. Both stacks are
built from inline <span>s, so they need an explicit column flex or the
two lines collapse into one ("$VOOD ▲ tierprime · score 96"). */
.ac-li-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ac-li-name { display: block; font-size: 12.5px; font-weight: 600; color: var(--ac-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-li-sub { display: block; font-size: 10.5px; color: var(--ac-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-li-r { text-align: right; flex-shrink: 0; font-family: var(--font-mono, monospace); display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.ac-li-r .big { display: block; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ac-li-r .big.up { color: var(--ac-up); } .ac-li-r .big.dn { color: var(--ac-dn); }
.ac-li-r .small { display: block; font-size: 10px; color: var(--ac-faint); }
.ac-li-r .small.up { color: var(--ac-up); } .ac-li-r .small.dn { color: var(--ac-dn); }
.ac-card-empty { padding: 16px 14px 18px; text-align: center; color: var(--ac-faint); font-size: 11.5px; line-height: 1.5; }
.ac-card-empty a { color: var(--ac-muted); }
.ac-card-skel { display: flex; flex-direction: column; gap: 4px; padding: 4px 6px 8px; }
.ac-card-skel .row { display: flex; align-items: center; gap: 9px; padding: 7px 6px; }
.ac-card-skel .sh { border-radius: 6px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: acShimmer 1.4s infinite; }
.ac-delta { font-size: 11px; font-weight: 700; font-family: var(--font-mono, monospace); }
.ac-delta.up { color: var(--ac-up); } .ac-delta.dn { color: var(--ac-dn); }
.ac-rail-cta { display: block; text-align: center; padding: 12px; border-radius: 12px; background: linear-gradient(135deg, rgba(139,92,246,.16), rgba(52,211,153,.06)); border: 1px solid rgba(139,92,246,.3); color: #fff; text-decoration: none; font-size: 12.5px; font-weight: 600; transition: border-color var(--duration-fast), transform var(--duration-fast); }
.ac-rail-cta:hover { border-color: rgba(139,92,246,.6); transform: translateY(-1px); }
.ac-rail-cta .sub { display: block; font-weight: 500; font-size: 11px; color: var(--ac-muted); margin-top: 3px; }
.ac-kbd { font-family: var(--font-mono, monospace); font-size: 10px; background: rgba(255,255,255,.06); border: 1px solid var(--ac-border); border-radius: 4px; padding: 1px 5px; color: var(--ac-muted); }
@media (max-width: 920px) {
.ac-layout { grid-template-columns: 1fr; }
.ac-rail { position: static; flex-direction: column; }
}
@media (max-width: 600px) {
.ac-right { display: none; }
.ac-row:hover { transform: none; }
.ac-search { max-width: none; order: 10; flex-basis: 100%; }
}
</style>
<meta property="og:site_name" content="three.ws">
<script type="application/ld+json">{"@context":"https://schema.org","@type":"WebPage","name":"Agent Activity — Oracle conviction in real time","description":"The trading floor: every Oracle conviction action from every autonomous 3D agent on pump.fun, live. Filter by tier and mode, track outcomes, copy the winners. Live conviction movers, the agent leaderboard, and proven wins on one screen.","url":"https://three.ws/activity","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"}}</script>
<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
<meta property="og:locale" content="en_US">
<meta property="og:image:alt" content="Agent Activity — Oracle conviction in real time — three.ws">
<meta name="twitter:site" content="@trythreews">
</head>
<body>
<header class="site-header"><div id="nav-container"></div></header>
<script src="/nav.js"></script>
<main class="ac-wrap">
<div class="ac-hero">
<div>
<h1 data-i18n-html="activity.agent_activity"><span class="ac-pulse" id="ac-pulse" aria-hidden="true"></span>Agent Activity</h1>
<p data-i18n="activity.the_live_trading_floor_every_move_3d">The live trading floor. Every move 3D agents make on pump.fun, in real time — autonomous agents acting on Oracle conviction. Watch them trade, track outcomes, and copy the winners.</p>
</div>
<!-- Deliberately not a live region: the whole tile row is re-rendered on
every streamed action, so aria-live here re-announces all nine
numbers on each trade. The feed (role="feed") carries the news. -->
<div class="ac-kpis" id="ac-kpis" role="group" aria-label="Oracle platform stats"></div>
</div>
<div class="ac-layout">
<div class="ac-main">
<div class="ac-insight" id="ac-insight" hidden></div>
<div class="ac-toolbar">
<button class="ac-chip is-active" data-tier="" data-i18n="activity.all_tiers">All tiers</button>
<button class="ac-chip tier-prime" data-tier="prime" data-i18n="activity.prime">🟣 Prime</button>
<button class="ac-chip tier-strong" data-tier="strong" data-i18n="activity.strong">🔵 Strong</button>
<button class="ac-chip tier-lean" data-tier="lean" data-i18n="activity.lean">🟡 Lean</button>
<button class="ac-chip" data-tier="watch" data-i18n="activity.watch">⚪ Watch</button>
<div class="ac-sep"></div>
<button class="ac-mode-pill is-active" data-mode="" data-i18n="activity.all">All</button>
<button class="ac-mode-pill live" data-mode="live" data-i18n="activity.live_only">Live only</button>
<button class="ac-mode-pill" data-mode="simulate" data-i18n="activity.simulate">Simulate</button>
<div class="ac-sep"></div>
<button class="ac-outcome-pill is-active" data-outcome="" data-i18n="activity.all_outcomes">All outcomes</button>
<button class="ac-outcome-pill win" data-outcome="win" data-i18n="activity.wins">Wins ✓</button>
<button class="ac-outcome-pill loss" data-outcome="loss" data-i18n="activity.losses">Losses ✗</button>
<button class="ac-outcome-pill open" data-outcome="open" data-i18n="activity.open">Open →</button>
<div class="ac-search">
<span class="si" aria-hidden="true">⌕</span>
<input id="ac-search-input" type="search" placeholder="Filter agent or coin… /" aria-label="Filter loaded actions by agent or coin" autocomplete="off" />
<button class="sx" id="ac-search-clear" type="button" aria-label="Clear filter" hidden data-i18n-attr="aria-label:activity.clear_filter_arialabel">×</button>
</div>
<span class="ac-refresh" id="ac-refresh-note"></span>
</div>
<div class="ac-stale" id="ac-stale" role="status" hidden>
<span class="dot" aria-hidden="true"></span>
<span class="ac-stale-text" id="ac-stale-text"></span>
<button class="ac-retry-btn" id="ac-stale-retry" type="button" data-i18n="activity.refresh">↻ Refresh</button>
</div>
<div class="ac-newpill" id="ac-newpill"><button type="button" data-i18n-html="activity.0_new">↑ <span id="ac-newpill-n">0</span> new</button></div>
<div class="ac-feed" id="ac-feed" role="feed" aria-busy="false"></div>
<button class="ac-load-more" id="ac-load-more" hidden data-i18n-html="activity.load_more"><span class="ac-load-more-label">Load more</span></button>
</div>
<aside class="ac-rail" aria-label="Conviction Board">
<a class="ac-rail-cta" href="/oracle" data-i18n-html="activity.arm_a_3d_agent_with_oracle_convictionlet">Arm a 3D agent with Oracle conviction<span class="sub">Let it trade pump.fun autonomously →</span></a>
<section class="ac-card" id="card-agents">
<div class="ac-card-h">
<span class="ttl" data-i18n-html="activity.top_agents"><span class="dot" style="background:var(--ac-accent)"></span>Top Agents</span>
<a class="more" href="/oracle#agents" data-i18n="activity.leaderboard">Leaderboard →</a>
</div>
<div class="ac-card-b" id="card-agents-b"></div>
</section>
<section class="ac-card" id="card-movers">
<div class="ac-card-h">
<span class="ttl" data-i18n-html="activity.conviction_movers"><span class="dot" style="background:var(--ac-up)"></span>Conviction Movers</span>
<a class="more" href="/oracle" data-i18n="activity.24h">24h →</a>
</div>
<div class="ac-card-b" id="card-movers-b"></div>
</section>
<section class="ac-card" id="card-wins">
<div class="ac-card-h">
<span class="ttl" data-i18n-html="activity.proven_wins"><span class="dot" style="background:var(--ac-warn)"></span>Proven Wins</span>
<a class="more" href="/oracle#proof" data-i18n="activity.gallery">Gallery →</a>
</div>
<div class="ac-card-b" id="card-wins-b"></div>
</section>
</aside>
</div>
</main>
<script src="/brand.js" defer></script>
<script type="module">
import { proxiedImageURL } from '/src/ipfs.js';
const API = '/api/oracle/activity';
const STATS_API = '/api/oracle/stats';
const REFRESH_MS = 60_000;
const TIER_EMOJI = { prime: '🟣', strong: '🔵', lean: '🟡', watch: '⚪', avoid: '🔴' };
const TIER_COLOR = { prime: 'var(--tier-prime)', strong: 'var(--tier-strong)', lean: 'var(--tier-lean)', watch: 'var(--tier-watch)', avoid: 'var(--tier-avoid)' };
const sol = (n) => n == null ? '—' : (Math.abs(Number(n)) >= 1 ? Number(n).toFixed(2) : Number(n).toFixed(3)) + ' ◎';
const sign = (n) => n > 0 ? '+' : '';
const esc = (s) => String(s ?? '').replace(/[&<>"']/g, (c) => ({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c]));
const imgFallbackAttr = `data-fallback="invisible"`;
// Agent and token art URLs come from third-party data (pump.fun IPFS
// metadata, per-agent hosts) and routinely fail ORB/CORS when loaded
// directly as <img> sources: some are metadata JSON documents, some are
// dead hosts. Route every remote URL through the same-origin /api/img
// proxy: it retries across IPFS gateways, follows a metadata doc one hop
// to the real image, and always answers 200 with a valid image
// (deterministic placeholder on failure) so the page never logs a failed
// request. Missing URLs keep the favicon tile; the seed keeps placeholders
// stable per agent/coin.
const imgSrc = (url, seed) => proxiedImageURL(String(url || ''), String(seed || '')) || '/favicon.ico';
function usdc(n) {
if (n == null || !isFinite(n)) return null;
const a = Math.abs(n);
if (a >= 1e9) return '$' + (n / 1e9).toFixed(1) + 'B';
if (a >= 1e6) return '$' + (n / 1e6).toFixed(1) + 'M';
if (a >= 1e3) return '$' + (n / 1e3).toFixed(1) + 'K';
return '$' + Math.round(n);
}
function ago(iso) {
if (!iso) return '';
const d = Date.now() - new Date(iso).getTime();
const m = d / 60000;
if (m < 1) return Math.max(1, Math.floor(d / 1000)) + 's ago';
if (m < 60) return Math.floor(m) + 'm ago';
const h = m / 60;
if (h < 24) return Math.floor(h) + 'h ago';
return Math.floor(h / 24) + 'd ago';
}
function durationBetween(a, b) {
if (!a || !b) return null;
const ms = new Date(b).getTime() - new Date(a).getTime();
if (!isFinite(ms) || ms <= 0) return null;
const m = ms / 60000;
if (m < 60) return Math.max(1, Math.round(m)) + 'm';
const h = m / 60;
if (h < 24) return h.toFixed(h < 10 ? 1 : 0) + 'h';
return Math.round(h / 24) + 'd';
}
function renderRow(item) {
const tier = item.tier || 'watch';
const outcome = (item.outcome || 'open').toLowerCase();
const isLive = item.mode === 'live';
const pnl = item.realized_pnl_sol != null ? Number(item.realized_pnl_sol) : null;
const pnlClass = pnl == null ? 'neutral' : pnl > 0 ? 'up' : pnl < 0 ? 'dn' : 'neutral';
const pnlStr = pnl != null
? `<span class="ac-pnl ${pnlClass}">${sign(pnl)}${sol(pnl)}</span>`
: item.size_sol != null ? `<span class="ac-pnl neutral">${sol(item.size_sol)}</span>` : '';
const outcomeHtml = `<span class="ac-outcome ${outcome}">${outcome}</span>`;
const peakHtml = item.peak_multiple && item.peak_multiple >= 2
? `<span style="font-size:10.5px;color:var(--ac-up);font-family:var(--font-mono,monospace)">${Number(item.peak_multiple).toFixed(1)}×</span>` : '';
const av = imgSrc(item.agent_image || item.agent_avatar, item.agent_id || item.mint);
const coinUrl = `/oracle/coin/${encodeURIComponent(item.mint)}`;
const verb = outcome === 'win' ? 'closed ↑' : outcome === 'loss' ? 'closed ↓' : outcome === 'flat' ? 'closed' : 'entered';
const outcomeWord = { win: 'won', loss: 'lost', flat: 'closed flat', open: 'open position' }[outcome] || outcome;
const symLabel = (item.symbol || item.mint.slice(0, 6)).toUpperCase();
const pnlLabel = pnl != null ? `, P&L ${sign(pnl)}${sol(pnl)}` : '';
const rowLabel = `${item.agent_name || 'Agent'} ${verb.replace(/[↑↓]/g, '').trim()} $${symLabel} — ${outcomeWord}${pnlLabel}`;
// conviction micro-bar
const conv = item.conviction != null ? Math.max(0, Math.min(100, Number(item.conviction))) : null;
const convHtml = conv != null
? `<span class="ac-conv" title="Oracle conviction ${conv}/100"><span class="track"><span class="fill" style="width:${conv}%;--cc:${TIER_COLOR[tier] || 'var(--ac-neutral)'}"></span></span><span style="color:var(--ac-muted);font-family:var(--font-mono,monospace)">${conv}</span></span>`
: '';
// entry market cap + hold duration
const mc = usdc(item.entry_mc_usd);
const hold = outcome !== 'open' ? durationBetween(item.acted_at, item.settled_at) : null;
const metaBits = [
`<span>${ago(item.acted_at)}</span>`,
`<span class="dotsep">·</span><span>${sol(item.size_sol)}</span>`,
convHtml ? `<span class="dotsep">·</span>${convHtml}` : '',
mc ? `<span class="dotsep">·</span><span title="Entry market cap">@ ${mc}</span>` : '',
hold ? `<span class="dotsep">·</span><span title="Time in position">held ${hold}</span>` : '',
item.tx_url ? `<span class="dotsep">·</span><a href="${esc(item.tx_url)}" target="_blank" rel="noopener" title="View transaction on Solscan">tx ↗</a>` : '',
`<span class="dotsep">·</span><a href="/oracle/coin/${encodeURIComponent(item.mint)}" target="_blank" rel="noopener">Oracle ↗</a>`,
].filter(Boolean).join('');
const reasonHtml = item.reason
? `<div class="ac-reason" title="${esc(item.reason)}">“${esc(item.reason)}”</div>` : '';
return `<div class="ac-row oc-${outcome}" data-id="${esc(item.id)}" data-agent="${esc(item.agent_id)}" role="article" aria-label="${esc(rowLabel)}">
<span class="outcome-edge" aria-hidden="true"></span>
<img class="ac-av" src="${esc(av)}" alt="" ${imgFallbackAttr} loading="lazy" />
<div class="ac-body">
<div class="ac-headline">
<span class="ac-tier ${tier}">${TIER_EMOJI[tier] || ''} ${tier}</span>
<a class="ac-agent" href="/agents/${esc(item.agent_id)}">${esc(item.agent_name)}</a>
<span class="ac-verb">${verb}</span>
<a class="ac-coin" href="${esc(coinUrl)}" title="Open the full coin page">$${esc(symLabel)}</a>
</div>
<div class="ac-meta">${metaBits}</div>
${reasonHtml}
</div>
<div class="ac-right">
${pnlStr}
<div style="display:flex;gap:5px;align-items:center;flex-wrap:wrap;justify-content:flex-end">
${outcomeHtml}
${peakHtml}
<span class="ac-mode-tag ${isLive ? 'live' : 'sim'}">${isLive ? 'live' : 'sim'}</span>
</div>
${outcome === 'win' || outcome === 'open'
? `<a class="ac-copy-cta" href="/trader/${encodeURIComponent(item.agent_id)}">Copy trades →</a>` : ''}
</div>
</div>`;
}
function skeletons(n = 5) {
return Array.from({length: n}, () => `<div class="ac-skel">
<div class="sh sh-av"></div>
<div style="flex:1;display:flex;flex-direction:column;gap:8px">
<div class="sh" style="width:55%;height:13px"></div>
<div class="sh" style="width:80%;height:11px"></div>
</div>
</div>`).join('');
}
const state = { tier: '', mode: '', outcome: '', q: '', cursor: null, loading: false, items: [], lastSuccess: null, stale: false };
const feed = document.getElementById('ac-feed');
const loadMoreBtn = document.getElementById('ac-load-more');
const loadMoreLabel = loadMoreBtn.querySelector('.ac-load-more-label');
const staleBar = document.getElementById('ac-stale');
const staleText = document.getElementById('ac-stale-text');
const staleRetry = document.getElementById('ac-stale-retry');
const pulse = document.getElementById('ac-pulse');
const newpill = document.getElementById('ac-newpill');
const newpillN = document.getElementById('ac-newpill-n');
const insightEl = document.getElementById('ac-insight');
let pendingNew = 0;
function showStale(msg) {
state.stale = true;
staleText.textContent = msg;
staleBar.hidden = false;
pulse.classList.add('is-stale');
}
function clearStale() {
state.stale = false;
staleBar.hidden = true;
pulse.classList.remove('is-stale');
}
// ── search (client-side filter over loaded actions) ──
function matchesSearch(item) {
if (!state.q) return true;
const q = state.q;
return (item.agent_name || '').toLowerCase().includes(q)
|| (item.symbol || '').toLowerCase().includes(q)
|| (item.mint || '').toLowerCase().includes(q)
|| (item.reason || '').toLowerCase().includes(q);
}
function applySearch() {
let shown = 0;
const byId = new Map(state.items.map((it) => [String(it.id), it]));
feed.querySelectorAll('.ac-row').forEach((row) => {
const it = byId.get(row.dataset.id);
const hit = it ? matchesSearch(it) : true;
row.hidden = !hit;
if (hit) shown++;
});
const nr = document.getElementById('ac-noresults');
if (state.q && shown === 0 && state.items.length) {
if (!nr) {
feed.insertAdjacentHTML('beforeend',
`<div class="ac-noresults" id="ac-noresults">No loaded actions match “${esc(state.q)}”. <button id="ac-noresults-clear">Clear filter</button></div>`);
document.getElementById('ac-noresults-clear').addEventListener('click', clearSearch);
}
} else if (nr) {
nr.remove();
}
}
function clearSearch() {
searchInput.value = '';
state.q = '';
searchClear.hidden = true;
applySearch();
}
async function load(reset = false) {
if (state.loading) return;
state.loading = true;
feed.setAttribute('aria-busy', 'true');
if (reset) { state.items = []; state.cursor = null; pendingNew = 0; newpill.style.display = 'none'; feed.innerHTML = skeletons(); }
else if (!loadMoreBtn.hidden) {
loadMoreBtn.disabled = true;
loadMoreBtn.setAttribute('aria-busy', 'true');
loadMoreLabel.textContent = 'Loading…';
if (!loadMoreBtn.querySelector('.ac-spin')) {
loadMoreBtn.insertAdjacentHTML('afterbegin', '<span class="ac-spin" aria-hidden="true"></span>');
}
}
const url = new URL(API, location.origin);
url.searchParams.set('network', 'mainnet');
url.searchParams.set('limit', '40');
if (state.tier) url.searchParams.set('tier', state.tier);
if (state.mode) url.searchParams.set('mode', state.mode);
if (state.outcome) url.searchParams.set('outcome', state.outcome);
if (state.cursor) url.searchParams.set('before', state.cursor);
try {
const r = await fetch(url, { headers: { accept: 'application/json' } });
if (!r.ok) throw new Error('HTTP ' + r.status);
const data = await r.json();
const items = data.items || [];
if (reset) {
state.items = items;
if (items.length) {
feed.innerHTML = items.map(renderRow).join('');
applySearch();
} else {
feed.innerHTML = emptyState();
}
} else {
state.items.push(...items);
feed.insertAdjacentHTML('beforeend', items.map(renderRow).join(''));
applySearch();
}
state.cursor = data.next_before || null;
loadMoreBtn.hidden = !state.cursor;
if (data.summary) mergeSummary(data.summary);
state.lastSuccess = Date.now();
clearStale();
} catch (e) {
if (reset && !state.items.length) {
loadMoreBtn.hidden = true;
feed.innerHTML = `<div class="ac-empty">
<div class="icon">⚠️</div>
<h3>Couldn't load activity</h3>
<p>${esc(e.message)}</p>
<div class="ac-error-actions">
<button class="ac-retry-btn" id="ac-error-retry" type="button">↻ Try again</button>
</div>
</div>`;
const btn = document.getElementById('ac-error-retry');
if (btn) btn.addEventListener('click', () => { btn.disabled = true; load(true); });
} else {
const since = state.lastSuccess
? `last updated ${ago(new Date(state.lastSuccess).toISOString())}`
: 'showing earlier data';
showStale(`Couldn't refresh — ${since}. ${e.message}`);
}
} finally {
state.loading = false;
feed.setAttribute('aria-busy', 'false');
loadMoreBtn.removeAttribute('aria-busy');
const spin = loadMoreBtn.querySelector('.ac-spin');
if (spin) spin.remove();
loadMoreLabel.textContent = 'Load more';
loadMoreBtn.disabled = false;
}
}
function emptyState() {
const filtered = state.tier || state.mode || state.outcome;
if (filtered) {
return `<div class="ac-empty">
<div class="icon">🔭</div>
<h3>No actions match these filters</h3>
<p>No agent has acted under this tier / mode / outcome combination yet. Clear the filters to see the full floor, or check the Conviction Board for what's moving.</p>
<button class="ac-empty-cta" id="ac-clear-filters" type="button">Clear filters</button>
</div>`;
}
return `<div class="ac-empty">
<div class="icon">🤖</div>
<h3>The floor is quiet — for now</h3>
<p>The Oracle is scanning pump.fun continuously and scoring conviction. The moment an Oracle-armed 3D agent acts on a signal, its trade streams in here live. Be the first to arm one.</p>
<a class="ac-empty-cta" href="/oracle">⚡ Arm your agent →</a>
<div class="ac-empty-sub">
<a href="/oracle">How conviction works</a>
<a href="/oracle#agents">Agent leaderboard</a>
<a href="/oracle#proof">Proven wins</a>
</div>
</div>`;
}
// ── KPIs: merge /api/oracle/stats (always-present platform numbers) with
// the activity summary (7-day action rollup). Stats wins for fields it
// owns; activity fills PnL which stats doesn't carry. ──
const kpiData = { agents_armed: null, scored_24h: null, open_actions: null, win_rate: null, market_base_rate: null, best_ath: null, total_pnl_sol: null, pnl_sample: 0, actions_7d: null, prime_count: null, strong_count: null, scored_total: null };
function mergeSummary(s) {
kpiData.actions_7d = Number(s.total) || 0;
// pnl_sample counts the settled actions that actually carry a realized
// figure. Without it a window where nothing has settled sums to 0 and
// renders as a confident "+0.000", which reads as "broke even" when the
// truth is "no closed trade to measure yet".
kpiData.pnl_sample = Number(s.pnl_sample) || 0;
kpiData.total_pnl_sol = Number(s.total_pnl_sol) || 0;
// Derive win rate from the 7d action rollup as a fallback if stats absent.
if (kpiData.win_rate == null && (s.wins + s.losses) > 0) {
kpiData.win_rate = Math.round(s.wins / (s.wins + s.losses) * 100);
}
renderKpis();
}
function applyStats(st) {
kpiData.agents_armed = Number(st.agents_armed) || 0;
kpiData.scored_24h = Number(st.scored_24h) || 0;
kpiData.open_actions = Number(st.open_actions) || 0;
kpiData.win_rate = st.win_rate != null ? Number(st.win_rate) : kpiData.win_rate;
kpiData.market_base_rate = st.market_base_rate != null ? Number(st.market_base_rate) : null;
kpiData.best_ath = st.best_ath != null ? Number(st.best_ath) : null;
kpiData.prime_count = st.prime_count != null ? Number(st.prime_count) : null;
kpiData.strong_count = st.strong_count != null ? Number(st.strong_count) : null;
kpiData.scored_total = st.scored_total != null ? Number(st.scored_total) : null;
renderKpis();
}
function renderKpis() {
const kpis = document.getElementById('ac-kpis');
const d = kpiData;
// A realized PnL of 0 is only meaningful when something actually settled
// with a figure attached, so gate the tile on the sample size.
const pnlKnown = d.pnl_sample > 0 && d.total_pnl_sol != null;
const pnl = d.total_pnl_sol;
// Win rate is graded against the market's own base rate (every scored
// coin), not a hardcoded 50%: on pump.fun a 15% call hit rate against a
// 5% base rate is the Oracle winning, and painting it red said the
// opposite.
const bar = d.market_base_rate;
const wrClass = d.win_rate == null ? ''
: bar != null ? (d.win_rate >= bar ? 'up' : 'dn')
: (d.win_rate >= 50 ? 'up' : 'dn');
const wrTitle = d.win_rate == null
? 'Share of resolved Oracle calls that won. No call has resolved yet.'
: `Share of resolved Oracle calls (lean, strong, prime) that won.${bar != null ? ` Baseline across every scored coin: ${bar}%.` : ''}`;
const cells = [
['Agents armed', d.agents_armed != null ? d.agents_armed : 'n/a', 'accent', 'Distinct 3D agents currently armed with Oracle conviction'],
['Scored 24h', d.scored_24h != null ? d.scored_24h : 'n/a', '', 'pump.fun coins the Oracle scored in the last 24 hours'],
['Open', d.open_actions != null ? d.open_actions : 'n/a', '', 'Agent positions still open (entered, not yet settled)'],
['Win rate', d.win_rate != null ? d.win_rate + '%' : 'n/a', wrClass, wrTitle],
['Best ATH', d.best_ath != null ? d.best_ath.toFixed(1) + '×' : 'n/a', d.best_ath != null ? 'up' : '', 'Highest peak multiple reached by any coin the Oracle called'],
['PnL (7d)', pnlKnown ? (pnl >= 0 ? '+' : '') + sol(pnl) : 'n/a', pnlKnown ? (pnl >= 0 ? 'up' : 'dn') : '', pnlKnown ? 'Realized SOL across agent positions settled in the last 7 days' : 'No agent position has settled with a realized figure in the last 7 days'],
['Prime coins', d.prime_count != null ? d.prime_count : 'n/a', d.prime_count > 0 ? 'accent' : '', 'Coins currently sitting at prime conviction tier'],
['Strong coins', d.strong_count != null ? d.strong_count : 'n/a', '', 'Coins currently sitting at strong conviction tier'],
['All-time scored',d.scored_total != null ? d.scored_total.toLocaleString() : 'n/a', '', 'Every coin the Oracle has ever scored'],
];
kpis.innerHTML = cells.map(([l, v, cls, tip]) =>
`<div class="ac-kpi" title="${esc(tip)}"><div class="v ${cls}">${v}</div><div class="l">${l}</div></div>`).join('');
}
function kpiSkeleton() {
document.getElementById('ac-kpis').innerHTML = Array.from({length: 9}, () =>
`<div class="ac-kpi is-skel"><div class="v"></div><div class="l"> </div></div>`).join('');
}
// ── toolbar wiring ──
document.querySelector('.ac-toolbar').addEventListener('click', (e) => {
const tierBtn = e.target.closest('[data-tier]');
const modeBtn = e.target.closest('[data-mode]');
const outcomeBtn = e.target.closest('[data-outcome]');
if (tierBtn) {
document.querySelectorAll('[data-tier]').forEach(b => b.classList.toggle('is-active', b === tierBtn));
state.tier = tierBtn.dataset.tier;
load(true);
}
if (modeBtn) {
document.querySelectorAll('[data-mode]').forEach(b => b.classList.toggle('is-active', b === modeBtn));
state.mode = modeBtn.dataset.mode;
restartSse();
load(true);
}
if (outcomeBtn) {
document.querySelectorAll('[data-outcome]').forEach(b => b.classList.toggle('is-active', b === outcomeBtn));
state.outcome = outcomeBtn.dataset.outcome;
load(true);
}
});
feed.addEventListener('click', (e) => {
if (e.target.id === 'ac-clear-filters') {
state.tier = ''; state.mode = ''; state.outcome = '';
document.querySelectorAll('[data-tier]').forEach(b => b.classList.toggle('is-active', b.dataset.tier === ''));
document.querySelectorAll('[data-mode]').forEach(b => b.classList.toggle('is-active', b.dataset.mode === ''));
document.querySelectorAll('[data-outcome]').forEach(b => b.classList.toggle('is-active', b.dataset.outcome === ''));
restartSse();
load(true);
}
});
// ── search wiring ──
const searchInput = document.getElementById('ac-search-input');
const searchClear = document.getElementById('ac-search-clear');
let searchDebounce;
searchInput.addEventListener('input', () => {
clearTimeout(searchDebounce);
searchDebounce = setTimeout(() => {
state.q = searchInput.value.trim().toLowerCase();
searchClear.hidden = !state.q;
applySearch();
}, 120);
});
searchClear.addEventListener('click', clearSearch);
loadMoreBtn.addEventListener('click', () => { loadMoreBtn.disabled = true; load(false); });
staleRetry.addEventListener('click', () => {
staleRetry.disabled = true;
Promise.all([load(true), loadStats()]).finally(() => { staleRetry.disabled = false; });
});
newpill.querySelector('button').addEventListener('click', () => {
pendingNew = 0;
newpill.style.display = 'none';
window.scrollTo({ top: 0, behavior: 'smooth' });
});
// ── keyboard shortcuts ──
document.addEventListener('keydown', (e) => {
if (e.target.matches('input, textarea, select') && e.key !== 'Escape') return;
if (e.key === '/') { e.preventDefault(); searchInput.focus(); }
else if (e.key === 'r' && !e.metaKey && !e.ctrlKey) { e.preventDefault(); load(true); loadStats(); loadRail(); }
else if (e.key === 'Escape' && e.target === searchInput) { clearSearch(); searchInput.blur(); }
});
// ── stats endpoint (always-present platform numbers, even with 0 actions) ──
async function loadStats() {
try {
const r = await fetch(`${STATS_API}?network=mainnet`, { headers: { accept: 'application/json' } });
if (!r.ok) throw new Error('HTTP ' + r.status);
applyStats(await r.json());
} catch {
// Leave the skeleton up only while a request is genuinely in flight.
// Without this the tiles shimmered forever on a stats outage, which
// reads as "still loading" rather than "not available". renderKpis
// prints "n/a" for every value it does not have.
renderKpis();
}
}
// ── SSE — real-time updates ──────────────────────────────────────────
const note = document.getElementById('ac-refresh-note');
const seenIds = new Set();
let es = null;
let sseActive = false;
let sseLastCursor = null;
function restartSse() {
if (es) { try { es.close(); } catch {} es = null; }
sseActive = false;
if (typeof EventSource !== 'undefined') startSse();
}
function startSse() {
const url = new URL('/api/oracle/action-stream', location.origin);
url.searchParams.set('network', 'mainnet');
if (state.mode) url.searchParams.set('mode', state.mode);
if (sseLastCursor) url.searchParams.set('since', sseLastCursor);
es = new EventSource(url.toString());
sseActive = false;
es.addEventListener('hello', () => {
sseActive = true;
note.innerHTML = '<span style="color:var(--ac-up)">⚡ Live</span>';
state.lastSuccess = Date.now();
if (state.stale && !state.cursor) clearStale();
});
es.addEventListener('action', (e) => {
const item = JSON.parse(e.data);
if (seenIds.has(item.id)) return;
if (state.tier && item.tier !== state.tier) return;
if (state.mode && item.mode !== state.mode) return;
if (state.outcome && (item.outcome || 'open') !== state.outcome) return;
if (state.cursor) return; // user is paginated — don't disrupt
seenIds.add(item.id);
sseLastCursor = item.acted_at;
state.items.unshift(item);
// If the feed is showing an empty/error placeholder, replace it.
if (feed.querySelector('.ac-empty')) feed.innerHTML = '';
const div = document.createElement('div');
div.innerHTML = renderRow(item);
const row = div.firstElementChild;
row.style.animationDelay = '0ms';
row.classList.add('is-new');
row.hidden = !matchesSearch(item);
feed.prepend(row);
// Nudge open-action KPIs upward live.
if ((item.outcome || 'open') === 'open' && kpiData.open_actions != null) {
kpiData.open_actions += 1; renderKpis();
}
if (document.querySelector('#ac-noresults') && matchesSearch(item)) applySearch();
// "N new" jump pill if user has scrolled down.
if (window.scrollY > 320 && !row.hidden) {
pendingNew++;
newpillN.textContent = pendingNew;
newpill.style.display = 'block';
}
});
es.addEventListener('settle', (e) => {
const item = JSON.parse(e.data);
const existing = feed.querySelector(`[data-id="${CSS.escape(item.id)}"]`);
const idx = state.items.findIndex((it) => String(it.id) === String(item.id));
if (idx >= 0) state.items[idx] = item;
if (!existing) return;
const div = document.createElement('div');
div.innerHTML = renderRow(item);
const updated = div.firstElementChild;
updated.hidden = !matchesSearch(item);
existing.replaceWith(updated);
// Settled means one fewer open position.
if (kpiData.open_actions != null && kpiData.open_actions > 0) {
kpiData.open_actions -= 1; renderKpis();
}
});
es.addEventListener('bye', (e) => {
const d = JSON.parse(e.data || '{}');
if (d.since) sseLastCursor = d.since;
es.close(); es = null;
sseActive = false;
setTimeout(() => { if (!sseActive) startSse(); }, 500);
});
es.addEventListener('error', () => {
sseActive = false;
note.textContent = 'Reconnecting…';
try { es.close(); } catch {}
es = null;
setTimeout(() => { if (!sseActive) startSse(); }, 5000);
});
}
// ── Conviction Board rail ──────────────────────────────────────────
function railSkeleton(rows = 4) {
return `<div class="ac-card-skel">${Array.from({length: rows}, () => `<div class="row">
<div class="sh" style="width:26px;height:26px;border-radius:8px"></div>
<div style="flex:1;display:flex;flex-direction:column;gap:6px"><div class="sh" style="width:60%;height:11px"></div><div class="sh" style="width:40%;height:9px"></div></div>
<div class="sh" style="width:32px;height:12px"></div>
</div>`).join('')}</div>`;
}
function railEmpty(msg, link, linkText) {
return `<div class="ac-card-empty">${msg}${link ? `<br><a href="${link}">${linkText}</a>` : ''}</div>`;
}
async function loadAgents() {
const b = document.getElementById('card-agents-b');
b.innerHTML = railSkeleton();
try {
const r = await fetch('/api/oracle/leaderboard?network=mainnet&limit=5&min_actions=1', { headers: { accept: 'application/json' } });
if (!r.ok) throw new Error('HTTP ' + r.status);
const { agents } = await r.json();
if (!agents || !agents.length) {
b.innerHTML = railEmpty('No ranked agents yet.', '/oracle', 'Arm the first →');
return null;
}
b.innerHTML = agents.map((a) => {
const wr = a.win_rate != null ? a.win_rate + '%' : '—';
const roi = a.roi_pct != null ? `${a.roi_pct >= 0 ? '+' : ''}${a.roi_pct}% ROI` : `${a.total} calls`;
const roiCls = a.roi_pct != null ? (a.roi_pct >= 0 ? 'up' : 'dn') : '';
const av = imgSrc(a.image_url, a.agent_id);
return `<a class="ac-li" href="/trader/${encodeURIComponent(a.agent_id)}">
<span class="ac-li-rank ${a.rank <= 3 ? 'top' : ''}">${a.rank}</span>
<img class="ac-li-av round" src="${esc(av)}" alt="" ${imgFallbackAttr} loading="lazy" />
<span class="ac-li-main"><span class="ac-li-name">${esc(a.name || 'Agent')}</span><span class="ac-li-sub">${a.wins}W · ${a.losses}L · ${a.total} calls</span></span>
<span class="ac-li-r"><span class="big up">${wr}</span><span class="small ${roiCls}">${roi}</span></span>
</a>`;
}).join('');
return agents[0];
} catch (e) {
b.innerHTML = railEmpty(`Couldn't load — ${esc(e.message)}.`);
return null;
}
}
async function loadMovers() {
const b = document.getElementById('card-movers-b');
b.innerHTML = railSkeleton();
try {
const r = await fetch('/api/oracle/movers?network=mainnet&direction=rising&hours=24&limit=5&min_delta=3', { headers: { accept: 'application/json' } });
if (!r.ok) throw new Error('HTTP ' + r.status);
const { items } = await r.json();
if (!items || !items.length) {
b.innerHTML = railEmpty('No conviction moves in the last 24h.', '/oracle', 'Browse the Oracle →');
return null;
}
b.innerHTML = items.map((m) => {
const sym = (m.symbol || m.mint.slice(0, 6)).toUpperCase();
const av = imgSrc(m.image_uri, m.mint);
const up = (m.delta || 0) >= 0;
const moveTitle = `Conviction moved ${m.first_score} to ${m.score} in the last 24h${m.tier_changed ? ', crossing a tier' : ''}`;
return `<a class="ac-li" href="/oracle/coin/${encodeURIComponent(m.mint)}" title="${esc(moveTitle)}">
<img class="ac-li-av" src="${esc(av)}" alt="" ${imgFallbackAttr} loading="lazy" />
<span class="ac-li-main"><span class="ac-li-name">$${esc(sym)}${m.tier_changed ? ' <span style="color:var(--ac-up);font-size:9px">▲ tier</span>' : ''}</span><span class="ac-li-sub">${esc(m.tier || '')} · score ${m.score ?? '—'}</span></span>
<span class="ac-li-r"><span class="ac-delta ${up ? 'up' : 'dn'}">${up ? '+' : ''}${m.delta}</span><span class="small">${m.first_score} → ${m.score}</span></span>
</a>`;
}).join('');
return items[0];
} catch (e) {
b.innerHTML = railEmpty(`Couldn't load — ${esc(e.message)}.`);
return null;
}
}
async function loadWins() {
const b = document.getElementById('card-wins-b');
b.innerHTML = railSkeleton(3);
try {
const r = await fetch('/api/oracle/wins?network=mainnet&period=30d&min_ath=2&limit=5', { headers: { accept: 'application/json' } });
if (!r.ok) throw new Error('HTTP ' + r.status);
const { items } = await r.json();
if (!items || !items.length) {
b.innerHTML = railEmpty('No proven wins in this window yet.', '/oracle#proof', 'See the gallery →');
return null;
}
b.innerHTML = items.map((w) => {
const sym = (w.symbol || w.mint.slice(0, 6)).toUpperCase();
const av = imgSrc(w.image_uri, w.mint);
const ath = w.ath_multiple != null ? w.ath_multiple.toFixed(1) + '×' : '—';
return `<a class="ac-li" href="${esc(w.pump_url)}" target="_blank" rel="noopener">
<img class="ac-li-av" src="${esc(av)}" alt="" ${imgFallbackAttr} loading="lazy" />
<span class="ac-li-main"><span class="ac-li-name">$${esc(sym)}${w.graduated ? ' 🎓' : ''}</span><span class="ac-li-sub">${esc(w.tier || '')}${w.last_mc_usd ? ' · ' + usdc(w.last_mc_usd) : ''}</span></span>
<span class="ac-li-r"><span class="big up">${ath}</span><span class="small">ATH</span></span>
</a>`;
}).join('');
return items[0];
} catch (e) {
b.innerHTML = railEmpty(`Couldn't load — ${esc(e.message)}.`);
return null;
}
}
// Insight strip — cross-pollinate the rail's standouts into one glanceable row.
function renderInsight({ topAgent, topMover, topWin }) {
const cards = [];
if (topAgent) {
cards.push(`<a class="ac-insight-card" href="/trader/${encodeURIComponent(topAgent.agent_id)}">
<span class="ic">🏆</span><span class="it"><span class="ik">Top agent</span>
<span class="iv">${esc(topAgent.name || 'Agent')}<span class="sub">${topAgent.win_rate != null ? topAgent.win_rate + '% win' : topAgent.total + ' calls'}</span></span></span></a>`);
}
if (topMover) {
const sym = (topMover.symbol || topMover.mint.slice(0, 6)).toUpperCase();
cards.push(`<a class="ac-insight-card" href="/oracle/coin/${encodeURIComponent(topMover.mint)}">
<span class="ic">📈</span><span class="it"><span class="ik">Biggest 24h move</span>
<span class="iv up">$${esc(sym)}<span class="sub">+${topMover.delta} conviction</span></span></span></a>`);
}
if (topWin) {
const sym = (topWin.symbol || topWin.mint.slice(0, 6)).toUpperCase();
cards.push(`<a class="ac-insight-card" href="${esc(topWin.pump_url)}" target="_blank" rel="noopener">
<span class="ic">🚀</span><span class="it"><span class="ik">Best proven win</span>
<span class="iv up">${topWin.ath_multiple != null ? topWin.ath_multiple.toFixed(1) + '×' : '—'}<span class="sub">$${esc(sym)}</span></span></span></a>`);
}
if (cards.length) { insightEl.innerHTML = cards.join(''); insightEl.hidden = false; }
else { insightEl.hidden = true; }
}
async function loadRail() {
const [topAgent, topMover, topWin] = await Promise.all([loadAgents(), loadMovers(), loadWins()]);
renderInsight({ topAgent, topMover, topWin });
}
// ── boot ──
kpiSkeleton();
loadStats();
loadRail();
load(true).then(() => {
state.items.forEach((it) => seenIds.add(it.id));
if (typeof EventSource !== 'undefined') startSse();
});
// Fallback polling (fires if SSE is down and we're on first page)
setInterval(() => {
if (!sseActive && !state.cursor && !state.loading) load(true);
if (!sseActive) note.textContent = 'Reconnecting…';
}, REFRESH_MS);
// Keep the rail + stats fresh on a slower cadence.
setInterval(() => { if (!document.hidden) { loadStats(); loadRail(); } }, 90_000);
document.addEventListener('visibilitychange', () => {
if (!document.hidden && !sseActive && !state.cursor && !state.loading) { load(true); loadStats(); }
});
</script>
<!-- Runtime i18n: detects locale, swaps annotated copy, mounts <lang-switcher>. -->
<script type="module" src="/i18n.js"></script>
</body>
</html>