oculon 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/README.md +75 -5
  2. package/dist/cli/main.js +297 -0
  3. package/dist/core/evm.d.ts +20 -0
  4. package/dist/core/evm.js +165 -0
  5. package/dist/core/http.js +7 -0
  6. package/dist/core/quota.js +23 -0
  7. package/dist/index.d.ts +36 -0
  8. package/dist/index.js +68 -0
  9. package/dist/mcp.js +81 -2
  10. package/dist/modules/address.d.ts +32 -0
  11. package/dist/modules/address.js +91 -0
  12. package/dist/modules/breach.d.ts +53 -0
  13. package/dist/modules/breach.js +98 -0
  14. package/dist/modules/company.d.ts +53 -0
  15. package/dist/modules/company.js +149 -0
  16. package/dist/modules/hashcheck.d.ts +29 -0
  17. package/dist/modules/hashcheck.js +82 -0
  18. package/dist/modules/headers.d.ts +50 -0
  19. package/dist/modules/headers.js +108 -0
  20. package/dist/modules/honeypot.d.ts +36 -0
  21. package/dist/modules/honeypot.js +53 -0
  22. package/dist/modules/iban.d.ts +30 -0
  23. package/dist/modules/iban.js +82 -0
  24. package/dist/modules/ipintel.d.ts +52 -0
  25. package/dist/modules/ipintel.js +149 -0
  26. package/dist/modules/lookalike.d.ts +34 -0
  27. package/dist/modules/lookalike.js +122 -0
  28. package/dist/modules/personal.d.ts +1 -1
  29. package/dist/modules/personal.js +14 -4
  30. package/dist/modules/phone.d.ts +32 -0
  31. package/dist/modules/phone.js +148 -0
  32. package/dist/modules/ransomware.d.ts +56 -0
  33. package/dist/modules/ransomware.js +85 -0
  34. package/dist/modules/satellites.d.ts +45 -0
  35. package/dist/modules/satellites.js +113 -0
  36. package/dist/modules/utility.d.ts +121 -0
  37. package/dist/modules/utility.js +306 -0
  38. package/dist/sources/threatintel.d.ts +151 -0
  39. package/dist/sources/threatintel.js +256 -0
  40. package/dist/telegram.d.ts +2 -0
  41. package/dist/telegram.js +93 -6
  42. package/dist/web/assets/logo-200.png +0 -0
  43. package/dist/web/burns.d.ts +21 -0
  44. package/dist/web/burns.js +53 -0
  45. package/dist/web/index.html +70 -3
  46. package/dist/web/insights.js +2 -0
  47. package/dist/web/landing.html +1 -1
  48. package/dist/web/legal.html +1 -1
  49. package/dist/web/mcp.html +1 -1
  50. package/dist/web/openapi.js +11 -0
  51. package/dist/web/public.js +13 -1
  52. package/dist/web/server.d.ts +17 -0
  53. package/dist/web/server.js +161 -4
  54. package/dist/web/token.html +97 -0
  55. package/dist/web/token.json +9 -0
  56. package/dist/web/utility.html +225 -0
  57. package/package.json +2 -2
@@ -563,6 +563,16 @@ nav button { white-space: nowrap; }
563
563
  <option value="airport">Airport status (JFK, EGLL…)</option>
564
564
  <option value="country">Country brief</option>
565
565
  <option value="papers">Research papers (topic)</option>
566
+ <option value="phone">Who is calling? (phone number)</option>
567
+ <option value="password">Has my password leaked?</option>
568
+ <option value="breaches">Data breaches (domain, or empty for newest)</option>
569
+ <option value="company">Is this supplier real? (name, LEI or EU VAT)</option>
570
+ </optgroup>
571
+ <optgroup label="Threat intel">
572
+ <option value="ip">IP address check (IP or domain)</option>
573
+ <option value="hash">File hash check (MD5, SHA-1, SHA-256)</option>
574
+ <option value="ransomware">Ransomware claims (country, sector, name, or empty)</option>
575
+ <option value="satellites">Satellites (name, NORAD number, or empty for new launches)</option>
566
576
  </optgroup>
567
577
  <optgroup label="Investigate">
568
578
  <option value="dossier">Dossier (company, person)</option>
@@ -923,7 +933,7 @@ function handleMapClick(e) {
923
933
  const waitMap = setInterval(() => { if (map) { map.on('click', handleMapClick); clearInterval(waitMap); } }, 300);
924
934
 
925
935
  /* investigate */
926
- const placeholders = { scam: 'USPS: your package is on hold, pay the $1.99 fee within 24 hours at usps-redelivery-help.top/track', recall: '2018 Honda Accord', emailsec: 'example.com', airport: 'JFK', country: 'Argentina', papers: 'solid-state battery', url: 'paypa1-secure-login.top/verify', factcheck: 'The Great Wall of China is visible from space', audit: 'npm:lodash@4.17.15 npm:request pypi:requests==2.19.0', travel: 'Lisbon', dossier: 'Nvidia', hype: 'ai agent', footprint: 'openai.com', lights: 'Gaza Strip', aircraft: 'N628TS', image: 'Kyoto', /*onchain*/wallet: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', token: '0xdac17f958d2ee523a2206206994597c13d831ec7', /*/onchain*/air: 'New Delhi', space: '(no input needed)', /*onchain*/robinhood: '(no input needed)', deployer: '0x… token or deployer', /*/onchain*/launches: 'OpenAI', markets: '(no input needed)', rewind: '2026-11-12', sanctions: 'IMO 1234567 or 0x… or exact name', health: 'Nvidia', impact: '(empty = current quakes and storms)', contradictions: 'Anthropic IPO' };
936
+ const placeholders = { phone: '+1 876 555 0100', password: 'type a password (it never leaves your browser)', breaches: '(empty = newest breaches) or adobe.com', company: 'NL004495445B01', ip: '185.220.101.1', hash: '094fd325049b8a9cf6d3e5ef2a6d4cc6a567d7d49c35f8bb8dd9e3c6acf3d78d', ransomware: '(empty = newest claims) or Healthcare, DE, a company', satellites: '(empty = new launches) or ISS, 25544', scam: 'USPS: your package is on hold, pay the $1.99 fee within 24 hours at usps-redelivery-help.top/track', recall: '2018 Honda Accord', emailsec: 'example.com', airport: 'JFK', country: 'Argentina', papers: 'solid-state battery', url: 'paypa1-secure-login.top/verify', factcheck: 'The Great Wall of China is visible from space', audit: 'npm:lodash@4.17.15 npm:request pypi:requests==2.19.0', travel: 'Lisbon', dossier: 'Nvidia', hype: 'ai agent', footprint: 'openai.com', lights: 'Gaza Strip', aircraft: 'N628TS', image: 'Kyoto', /*onchain*/wallet: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', token: '0xdac17f958d2ee523a2206206994597c13d831ec7', /*/onchain*/air: 'New Delhi', space: '(no input needed)', /*onchain*/robinhood: '(no input needed)', deployer: '0x… token or deployer', /*/onchain*/launches: 'OpenAI', markets: '(no input needed)', rewind: '2026-11-12', sanctions: 'IMO 1234567 or 0x… or exact name', health: 'Nvidia', impact: '(empty = current quakes and storms)', contradictions: 'Anthropic IPO' };
927
937
  const usd = (x) => (x == null ? '?' : '$' + Math.round(x).toLocaleString('en-US'));
928
938
 
929
939
  /* brief: tiny, safe Markdown renderer (escape first, then headings, bold, links, bullets) */
@@ -1070,10 +1080,49 @@ $('#ask-go').onclick = async () => {
1070
1080
  finally { $('#ask-go').disabled = false; }
1071
1081
  };
1072
1082
  $('#ask-q').addEventListener('keydown', (e) => { if (e.key === 'Enter') $('#ask-go').click(); });
1073
- $('#inv-kind').onchange = () => { $('#inv-q').placeholder = placeholders[$('#inv-kind').value]; };
1083
+ $('#inv-kind').onchange = () => { const k = $('#inv-kind').value; $('#inv-q').placeholder = placeholders[k]; $('#inv-q').type = k === 'password' ? 'password' : 'text'; if (k === 'password') $('#inv-q').value = ''; };
1074
1084
  const spark = (xs) => { const m = Math.max(...xs, 1e-9); return `<span class="spark">${xs.map((x) => `<i style="height:${Math.max(2, Math.round((x / m) * 28))}px" title="${esc(x)}"></i>`).join('')}</span>`; };
1075
1085
  const sigList = (s) => (s.length ? `<h3>Signals</h3>${s.map(renderSignal).join('')}` : '');
1086
+ const link = (u, t) => `<a href="${safeUrl(u)}" target="_blank" rel="noopener noreferrer">${esc(t)}</a>`;
1087
+ const tonePill = (t, txt) => `<span class="pill ${t}">${esc(txt)}</span>`;
1076
1088
  const views = {
1089
+ ip: (r) => {
1090
+ const d = r.result;
1091
+ const t = d.verdict === 'malicious' ? 'bad' : d.verdict === 'suspicious' ? 'warn' : 'ok';
1092
+ const row = (k, v) => (v ? `<tr><td>${k}</td><td>${v}</td></tr>` : '');
1093
+ const flags = Object.entries(d.flags).filter(([, v]) => v).map(([k]) => `<span class="chip">${esc(k === 'knownGood' ? 'known benign' : k)}</span>`).join('');
1094
+ return `<h3>${esc(d.ip)}${d.resolvedFrom ? ` <span class="meta">${esc(d.resolvedFrom)}</span>` : ''} ${tonePill(t, d.verdict)} <span class="meta">risk ${d.risk}/100</span></h3>${flags ? `<p>${flags}</p>` : ''}<table>${row('Network', esc([d.network.asn, d.network.name].filter(Boolean).join(' ')) + (d.network.type ? ` <span class="meta">${esc(d.network.type)}</span>` : ''))}${row('Location', d.location ? esc([d.location.city, d.location.region, d.location.country].filter(Boolean).join(', ')) : '')}${row('Reverse DNS', esc(d.network.reverse || ''))}${row('AbuseIPDB', d.abuseipdb ? `${d.abuseipdb.reports} reports · confidence ${d.abuseipdb.score}%` : '')}${row('VirusTotal', d.virustotal ? `${d.virustotal.malicious} of ${d.virustotal.engines} engines flag it · ${link(d.virustotal.link, 'open')}` : '')}${row('GreyNoise', d.greynoise ? (d.greynoise.noise ? `scanning, ${esc(d.greynoise.classification || 'unknown')}` : d.greynoise.riot ? 'known benign service' : 'not seen scanning') : '')}${row('OTX', d.otx ? `${d.otx.count} threat report${d.otx.count === 1 ? '' : 's'}` : '')}${row('Open ports', d.ports && d.ports.ports.length ? esc(d.ports.ports.slice(0, 16).join(', ')) + (d.ports.vulns.length ? ` <span class="err">${d.ports.vulns.length} known CVEs</span>` : '') : '')}</table>${d.reasons.length ? `<h3>Why</h3><ul class="ev">${d.reasons.map((x) => `<li>${esc(x)}</li>`).join('')}</ul>` : ''}<h3>What to do</h3><ul class="ev">${d.advice.map((x) => `<li>${esc(x)}</li>`).join('')}</ul>`;
1095
+ },
1096
+ hash: (r) => {
1097
+ const d = r.result;
1098
+ const t = d.verdict === 'malicious' ? 'bad' : d.verdict === 'suspicious' ? 'warn' : d.verdict === 'known good' ? 'ok' : '';
1099
+ return `<h3>${tonePill(t, d.verdict)} ${d.family ? `<b>${esc(d.family)}</b>` : ''} <span class="meta">${esc(d.algorithm)}</span></h3><p class="meta"><code>${esc(d.hash)}</code>${d.name ? `<br>${esc(d.name)}` : ''}</p><ul class="ev">${d.reasons.map((x) => `<li>${esc(x)}</li>`).join('')}</ul><p>${[d.bazaar && link(d.bazaar.link, 'MalwareBazaar'), d.virustotal && link(d.virustotal.link, 'VirusTotal')].filter(Boolean).join(' · ')}</p><h3>What to do</h3><ul class="ev">${d.advice.map((x) => `<li>${esc(x)}</li>`).join('')}</ul>`;
1100
+ },
1101
+ ransomware: (r) => {
1102
+ const d = r.result;
1103
+ const tally = (xs) => xs.map((x) => `<span class="chip">${esc(x.name)} ${x.count}</span>`).join('');
1104
+ return `<h3>${d.query ? `Ransomware claims: ${esc(d.query)}` : 'Newest ransomware claims'} <span class="meta">${d.total} found</span></h3>${d.byGroup.length ? `<p class="meta">Groups ${tally(d.byGroup.slice(0, 6))}</p>` : ''}${d.byCountry.length && d.mode !== 'country' ? `<p class="meta">Countries ${tally(d.byCountry.slice(0, 6))}</p>` : ''}${d.victims.length ? `<ul class="ev">${d.victims.slice(0, 25).map((v) => `<li><b>${v.url ? link(v.url, v.victim) : esc(v.victim)}</b> <span class="pill bad">${esc(v.group)}</span> <span class="meta">${esc([v.country, v.sector, (v.discovered || v.attacked || '').slice(0, 10)].filter(Boolean).join(' · '))}</span>${v.description ? `<div class="meta">${esc(v.description)}</div>` : ''}</li>`).join('')}</ul>` : '<p>No claims found.</p>'}<p class="meta">${esc(d.note)}</p>`;
1105
+ },
1106
+ company: (r) => {
1107
+ const d = r.result;
1108
+ const vat = d.vat ? `<h3>VAT ${esc(d.vat.country + d.vat.number)} ${tonePill(d.vat.valid ? 'ok' : 'bad', d.vat.valid ? 'valid' : 'not valid')}</h3>${d.vat.name ? `<p><b>${esc(d.vat.name)}</b>${d.vat.address ? `<br><span class="meta">${esc(d.vat.address)}</span>` : ''}</p>` : ''}` : '';
1109
+ const recs = d.records.map((x) => `<li><b>${link(x.url, x.name)}</b> ${tonePill(x.status === 'ACTIVE' ? 'ok' : 'warn', (x.status || '?').toLowerCase())} ${x.registration && x.registration !== 'ISSUED' ? tonePill('warn', 'LEI ' + x.registration.toLowerCase()) : ''}<div class="meta">LEI ${esc(x.lei)}${x.registeredAs ? ' · reg. ' + esc(x.registeredAs) : ''}${x.created ? ' · since ' + esc(x.created) : ''}</div>${x.address ? `<div class="meta">${esc(x.address)}</div>` : ''}${x.parent ? `<div class="meta">Ultimate parent: ${esc(x.parent.name)}</div>` : ''}</li>`).join('');
1110
+ return `${vat}${d.warnings.length ? `<ul class="ev">${d.warnings.map((w) => `<li class="err">${esc(w)}</li>`).join('')}</ul>` : ''}${recs ? `<h3>LEI register</h3><ul class="ev">${recs}</ul>` : ''}<p class="meta">${esc(d.note)}</p>`;
1111
+ },
1112
+ breaches: (r) => {
1113
+ const d = r.result;
1114
+ return `<h3>${d.query ? `Breaches: ${esc(d.query)} ${tonePill(d.total ? 'bad' : 'ok', d.total ? d.total + ' found' : 'none found')}` : 'Newest breaches'}</h3>${d.breaches.length ? `<ul class="ev">${d.breaches.map((b) => `<li><b>${link(b.url, b.title)}</b> <span class="meta">${esc(b.breachDate || '')} · ${b.accounts.toLocaleString('en-US')} accounts${b.domain ? ' · ' + esc(b.domain) : ''}</span><div class="meta">${esc(b.dataClasses.join(', '))}</div><div>${esc(b.description)}</div></li>`).join('')}</ul>` : ''}<p class="meta">${esc(d.note)}</p>`;
1115
+ },
1116
+ phone: (r) => {
1117
+ const d = r.result;
1118
+ const t = d.risk === 'high' ? 'bad' : d.risk === 'medium' ? 'warn' : 'ok';
1119
+ return `<h3>${esc(d.e164)} ${tonePill(t, d.risk + ' risk')}${d.valid === false ? ' ' + tonePill('bad', 'not valid') : ''}</h3><p>${esc([d.country, d.location, d.lineType, d.carrier].filter(Boolean).join(' · '))}</p>${d.warnings.length ? `<ul class="ev">${d.warnings.map((w) => `<li class="err">${esc(w)}</li>`).join('')}</ul>` : ''}<h3>What to do</h3><ul class="ev">${d.advice.map((x) => `<li>${esc(x)}</li>`).join('')}</ul>`;
1120
+ },
1121
+ satellites: (r) => {
1122
+ const d = r.result;
1123
+ if (d.mode === 'recent') return `<h3>Launched in the last 30 days <span class="meta">${d.total} objects</span></h3><table><tr><th>launch</th><th>objects</th><th>names</th></tr>${d.launches.map((l) => `<tr><td>${esc(l.id)}</td><td class="num">${l.objects}</td><td>${esc(l.names.join(', '))}</td></tr>`).join('')}</table><p class="meta">${esc(d.note)}</p>`;
1124
+ return d.objects.length ? `<ul class="ev">${d.objects.map((x) => `<li><b>${link(x.url, x.name)}</b> <span class="meta">NORAD ${x.norad} · ${esc(x.intlId)}</span>${x.status ? ' ' + tonePill(x.status === 'operational' ? 'ok' : '', x.status) : ''}${x.orbit ? `<div>${esc(x.orbit.regime)} · ${x.orbit.perigeeKm}-${x.orbit.apogeeKm} km · ${x.orbit.periodMin} min · ${x.orbit.inclination}°</div>` : ''}<div class="meta">${esc([x.owner && 'owner ' + x.owner, x.type, x.launchDate && 'launched ' + x.launchDate, x.decayed && 'decayed ' + x.decayed].filter(Boolean).join(' · '))}</div></li>`).join('')}</ul><p class="meta">${esc(d.note)}</p>` : `<p>${esc(d.note)}</p>`;
1125
+ },
1077
1126
  scam: (r) => {
1078
1127
  const d = r.result;
1079
1128
  const tone = d.verdict === 'likely scam' ? 'bad' : d.verdict === 'suspicious' ? 'warn' : 'ok';
@@ -1223,7 +1272,25 @@ $('#inv-go').onclick = async () => {
1223
1272
  if (q.startsWith('(')) q = '';
1224
1273
  const out = $('#inv-out');
1225
1274
  if (kind === 'image') { out.innerHTML = `<p class="meta">Loading satellite image of ${esc(q)}…</p><img class="sat" alt="Satellite image of ${esc(q)}" src="/api/image?place=${encodeURIComponent(q)}">`; return; }
1226
- const param = { scam: 'message', recall: 'q', emailsec: 'domain', airport: 'code', country: 'name', papers: 'topic', url: 'url', factcheck: 'claim', audit: 'packages', travel: 'place', dossier: 'name', hype: 'topic', footprint: 'domain', lights: 'place', aircraft: 'q', /*onchain*/wallet: 'address', token: 'address', /*/onchain*/air: 'place', space: 'x', /*onchain*/robinhood: 'x', deployer: 'address', /*/onchain*/launches: 'company', markets: 'x', rewind: 'date', sanctions: 'q', health: 'company', impact: 'place', contradictions: 'topic' }[kind];
1275
+ if (kind === 'password') {
1276
+ // k-anonymity: hash here, send 5 characters of the SHA-1, match the rest in this browser.
1277
+ const pw = $('#inv-q').value;
1278
+ if (!pw) { out.innerHTML = '<p class="err">Type a password first.</p>'; return; }
1279
+ if (!crypto.subtle) { out.innerHTML = '<p class="err">This browser cannot hash here (it needs a secure https page).</p>'; return; }
1280
+ $('#inv-go').disabled = true;
1281
+ out.innerHTML = '<p class="meta">Checking…</p>';
1282
+ try {
1283
+ const buf = await crypto.subtle.digest('SHA-1', new TextEncoder().encode(pw));
1284
+ const hex = [...new Uint8Array(buf)].map((b) => b.toString(16).padStart(2, '0')).join('').toUpperCase();
1285
+ const r = await api('/api/pwned?prefix=' + hex.slice(0, 5));
1286
+ const hit = r.suffixes.find(([s]) => s === hex.slice(5));
1287
+ const n = hit ? hit[1] : 0;
1288
+ out.innerHTML = `<h3><span class="pill ${n ? 'bad' : 'ok'}">${n ? 'leaked' : 'not found'}</span> ${n ? `<span class="meta">seen ${n.toLocaleString('en-US')} times in data breaches</span>` : '<span class="meta">not in any known breach</span>'}</h3><ul class="ev">${n ? '<li>Stop using this password everywhere you use it, starting with email and banking.</li><li>Use a password manager to make a different password for every site, and turn on two-factor sign-in.</li>' : '<li>Still use it on one site only, and keep two-factor sign-in on.</li>'}</ul><p class="meta">Your password never left this browser: only the first 5 characters of its SHA-1 hash (${esc(hex.slice(0, 5))}) were sent, and the match happened here. Data: Have I Been Pwned, Pwned Passwords.</p>`;
1289
+ } catch (err) { out.innerHTML = `<p class="err">${esc(err.message)}</p>`; }
1290
+ finally { $('#inv-go').disabled = false; }
1291
+ return;
1292
+ }
1293
+ const param = { phone: 'number', breaches: 'domain', company: 'q', ip: 'ip', hash: 'hash', ransomware: 'q', satellites: 'q', scam: 'message', recall: 'q', emailsec: 'domain', airport: 'code', country: 'name', papers: 'topic', url: 'url', factcheck: 'claim', audit: 'packages', travel: 'place', dossier: 'name', hype: 'topic', footprint: 'domain', lights: 'place', aircraft: 'q', /*onchain*/wallet: 'address', token: 'address', /*/onchain*/air: 'place', space: 'x', /*onchain*/robinhood: 'x', deployer: 'address', /*/onchain*/launches: 'company', markets: 'x', rewind: 'date', sanctions: 'q', health: 'company', impact: 'place', contradictions: 'topic' }[kind];
1227
1294
  $('#inv-go').disabled = true;
1228
1295
  out.innerHTML = '<p class="meta">Working… some sources are rate-limited and take a while.</p>';
1229
1296
  try {
@@ -84,6 +84,8 @@ const KEY_GROUPS = [
84
84
  ['Companies', ['ADZUNA_APP_KEY', 'COURTLISTENER_TOKEN', 'COMPANIES_HOUSE_API_KEY', 'BRANDFETCH_API_KEY']],
85
85
  ['Social and audio', ['APIFY_TOKEN', 'YOUTUBE_API_KEY', 'BLUESKY_APP_PASSWORD', 'DEEPGRAM_API_KEY']],
86
86
  ['Web security', ['URLSCAN_API_KEY', 'SAFE_BROWSING_KEY', 'ABUSECH_AUTH_KEY']],
87
+ ['Threat intel', ['ABUSEIPDB_API_KEY', 'OTX_API_KEY', 'IPINFO_TOKEN', 'VIRUSTOTAL_API_KEY']],
88
+ ['Phone', ['NUMVERIFY_API_KEY']],
87
89
  ['Fact checks', ['GOOGLE_API_KEY']],
88
90
  ['Telegram bot', ['TELEGRAM_BOT_TOKEN']],
89
91
  ];
@@ -641,7 +641,7 @@ r.provenance <span class="d">// every source used</span></pre></div></div>
641
641
  <div class="fbrand"><a class="logo" href="/"><img class="lm" src="/assets/logo.svg" alt="" width="22" height="22">OCULON</a><p>Open-source intelligence engine for the physical and digital world. Self-hosted, MIT licensed, zero runtime dependencies.</p><div class="fstatus"><i></i><span id="f-status">Engine online</span></div><div class="social"><a href="https://x.com/oculonlive" target="_blank" rel="noopener" aria-label="Oculon on X" title="Oculon on X"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"/></svg></a><a href="https://github.com/oculonlive/oculon" target="_blank" rel="noopener" aria-label="Oculon on GitHub" title="Oculon on GitHub"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg></a><a href="https://www.npmjs.com/package/oculon" target="_blank" rel="noopener" aria-label="Oculon on npm" title="Oculon on npm"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z"/></svg></a><a href="https://t.me/oculon_radar_bot" target="_blank" rel="noopener" aria-label="Oculon Radar on Telegram" title="Oculon Radar on Telegram"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"/></svg></a><a href="https://glama.ai/mcp/servers/oculonlive/oculon" target="_blank" rel="noopener" aria-label="Oculon on Glama" title="Oculon on Glama"><svg viewBox="15 15 300 300" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M95 15H75V155H95V15ZM255 15H235V155H255V15ZM75 25H65V125H75V25ZM265 25H255V125H265V25ZM65 35H55V95H65V35ZM275 35H265V95H275V35ZM105 75H95V155H105V75ZM235 75H225V155H235V75ZM205 85H125V185H205V85ZM125 95H105V155H125V95ZM225 95H205V155H225V95ZM75 145H65V155H75V145ZM265 145H255V155H265V145ZM125 155H115V225H125V155ZM215 155H205V225H215V155ZM85 165H75V315H85V165ZM115 165H105V315H115V165ZM225 165H215V315H225V165ZM255 165H245V315H255V165ZM105 175H85V315H105V175ZM245 175H225V315H245V175ZM135 185H125V235H135V185ZM185 185H145V195H185V185ZM205 185H195V235H205V185ZM75 195H65V275H75V195ZM145 195H135V235H145V195ZM195 195H185V235H195V195ZM155 205H145V235H155V205ZM185 205H175V235H185V205ZM125 235H115V315H125V235ZM215 235H205V315H215V235ZM145 245H125V315H145V245ZM205 245H185V315H205V245ZM185 265H145V315H185V265Z"/></svg></a></div></div>
642
642
  <div><h5>Product</h5><a href="#console">Console</a><!--onchain--><a href="#robinhood">Robinhood Chain</a><!--/onchain--><a href="#world">Live world</a><a href="#modules">Modules</a><a href="/app">Open the app</a></div>
643
643
  <div><h5>Developers</h5><a href="/docs#cli">CLI</a><a href="/docs#sdk">SDK</a><a href="/docs#mcp-server">MCP server</a><a href="/docs#telegram-bot">Telegram bot</a><a href="/docs#cli-reference">Command reference</a></div>
644
- <div><h5>Resources</h5><a href="/docs">Documentation</a><a href="/docs#install">Install</a><a href="/docs#configuration">Configuration</a><a href="/docs#limits">Limits</a><a href="/report">Weekly report</a></div>
644
+ <div><h5>Resources</h5><a href="/docs">Documentation</a><a href="/docs#install">Install</a><a href="/docs#configuration">Configuration</a><a href="/docs#limits">Limits</a><a href="/report">Weekly report</a><a href="/thetoken">Token</a></div>
645
645
  <div><h5>Legal</h5><a href="/privacy">Privacy</a><a href="/terms">Terms</a><a href="/docs#license">Licence (MIT)</a><a href="/terms#sources">Data sources</a></div>
646
646
  </div>
647
647
  <div class="fword" aria-hidden="true">OCULON</div>
@@ -156,7 +156,7 @@ footer{background:rgba(0,0,0,.6);backdrop-filter:blur(6px)}
156
156
  <p>These terms ship with the software and may change between versions.</p>
157
157
  </article>
158
158
  </main>
159
- <footer><div class="in"><span>© <span id="year"></span> Oculon contributors · MIT</span><span><a href="/">Home</a> · <a href="/docs">Docs</a> · <a href="/app">App</a></span></div><div class="in" style="padding-top:0"><div class="social" style="margin-top:0"><a href="https://x.com/oculonlive" target="_blank" rel="noopener" aria-label="Oculon on X" title="Oculon on X"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"/></svg></a><a href="https://github.com/oculonlive/oculon" target="_blank" rel="noopener" aria-label="Oculon on GitHub" title="Oculon on GitHub"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg></a><a href="https://www.npmjs.com/package/oculon" target="_blank" rel="noopener" aria-label="Oculon on npm" title="Oculon on npm"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z"/></svg></a><a href="https://t.me/oculon_radar_bot" target="_blank" rel="noopener" aria-label="Oculon Radar on Telegram" title="Oculon Radar on Telegram"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"/></svg></a><a href="https://glama.ai/mcp/servers/oculonlive/oculon" target="_blank" rel="noopener" aria-label="Oculon on Glama" title="Oculon on Glama"><svg viewBox="15 15 300 300" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M95 15H75V155H95V15ZM255 15H235V155H255V15ZM75 25H65V125H75V25ZM265 25H255V125H265V25ZM65 35H55V95H65V35ZM275 35H265V95H275V35ZM105 75H95V155H105V75ZM235 75H225V155H235V75ZM205 85H125V185H205V85ZM125 95H105V155H125V95ZM225 95H205V155H225V95ZM75 145H65V155H75V145ZM265 145H255V155H265V145ZM125 155H115V225H125V155ZM215 155H205V225H215V155ZM85 165H75V315H85V165ZM115 165H105V315H115V165ZM225 165H215V315H225V165ZM255 165H245V315H255V165ZM105 175H85V315H105V175ZM245 175H225V315H245V175ZM135 185H125V235H135V185ZM185 185H145V195H185V185ZM205 185H195V235H205V185ZM75 195H65V275H75V195ZM145 195H135V235H145V195ZM195 195H185V235H195V195ZM155 205H145V235H155V205ZM185 205H175V235H185V205ZM125 235H115V315H125V235ZM215 235H205V315H215V235ZM145 245H125V315H145V245ZM205 245H185V315H205V245ZM185 265H145V315H185V265Z"/></svg></a></div></div></footer>
159
+ <footer><div class="in"><span>© <span id="year"></span> Oculon contributors · MIT</span><span><a href="/">Home</a> · <a href="/docs">Docs</a> · <a href="/app">App</a> · <a href="/thetoken">Token</a></span></div><div class="in" style="padding-top:0"><div class="social" style="margin-top:0"><a href="https://x.com/oculonlive" target="_blank" rel="noopener" aria-label="Oculon on X" title="Oculon on X"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"/></svg></a><a href="https://github.com/oculonlive/oculon" target="_blank" rel="noopener" aria-label="Oculon on GitHub" title="Oculon on GitHub"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg></a><a href="https://www.npmjs.com/package/oculon" target="_blank" rel="noopener" aria-label="Oculon on npm" title="Oculon on npm"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z"/></svg></a><a href="https://t.me/oculon_radar_bot" target="_blank" rel="noopener" aria-label="Oculon Radar on Telegram" title="Oculon Radar on Telegram"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"/></svg></a><a href="https://glama.ai/mcp/servers/oculonlive/oculon" target="_blank" rel="noopener" aria-label="Oculon on Glama" title="Oculon on Glama"><svg viewBox="15 15 300 300" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M95 15H75V155H95V15ZM255 15H235V155H255V15ZM75 25H65V125H75V25ZM265 25H255V125H265V25ZM65 35H55V95H65V35ZM275 35H265V95H275V35ZM105 75H95V155H105V75ZM235 75H225V155H235V75ZM205 85H125V185H205V85ZM125 95H105V155H125V95ZM225 95H205V155H225V95ZM75 145H65V155H75V145ZM265 145H255V155H265V145ZM125 155H115V225H125V155ZM215 155H205V225H215V155ZM85 165H75V315H85V165ZM115 165H105V315H115V165ZM225 165H215V315H225V165ZM255 165H245V315H255V165ZM105 175H85V315H105V175ZM245 175H225V315H245V175ZM135 185H125V235H135V185ZM185 185H145V195H185V185ZM205 185H195V235H205V185ZM75 195H65V275H75V195ZM145 195H135V235H145V195ZM195 195H185V235H195V195ZM155 205H145V235H155V205ZM185 205H175V235H185V205ZM125 235H115V315H125V235ZM215 235H205V315H215V235ZM145 245H125V315H145V245ZM205 245H185V315H205V245ZM185 265H145V315H185V265Z"/></svg></a></div></div></footer>
160
160
  <script src="/assets/fx.js"></script>
161
161
  <script>
162
162
  if (window.OculonFX) { OculonFX.liquid(document.getElementById('liquidbg'), { base: '#000000', mid: '#001a26', hi: '#00c8e0', intensity: 0.8, scale: 0.3 }); }
package/dist/web/mcp.html CHANGED
@@ -92,7 +92,7 @@ footer a{color:var(--soft)}
92
92
  <div class="f"><strong>Open source</strong>Run your own copy with <code>oculon serve</code>; it serves this endpoint at <code>/mcp</code>.</div>
93
93
  </div>
94
94
  </main>
95
- <footer><div class="social" style="justify-content:center;margin:0 0 14px"><a href="https://x.com/oculonlive" target="_blank" rel="noopener" aria-label="Oculon on X" title="Oculon on X"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"/></svg></a><a href="https://github.com/oculonlive/oculon" target="_blank" rel="noopener" aria-label="Oculon on GitHub" title="Oculon on GitHub"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg></a><a href="https://www.npmjs.com/package/oculon" target="_blank" rel="noopener" aria-label="Oculon on npm" title="Oculon on npm"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z"/></svg></a><a href="https://t.me/oculon_radar_bot" target="_blank" rel="noopener" aria-label="Oculon Radar on Telegram" title="Oculon Radar on Telegram"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"/></svg></a><a href="https://glama.ai/mcp/servers/oculonlive/oculon" target="_blank" rel="noopener" aria-label="Oculon on Glama" title="Oculon on Glama"><svg viewBox="15 15 300 300" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M95 15H75V155H95V15ZM255 15H235V155H255V15ZM75 25H65V125H75V25ZM265 25H255V125H265V25ZM65 35H55V95H65V35ZM275 35H265V95H275V35ZM105 75H95V155H105V75ZM235 75H225V155H235V75ZM205 85H125V185H205V85ZM125 95H105V155H125V95ZM225 95H205V155H225V95ZM75 145H65V155H75V145ZM265 145H255V155H265V145ZM125 155H115V225H125V155ZM215 155H205V225H215V155ZM85 165H75V315H85V165ZM115 165H105V315H115V165ZM225 165H215V315H225V165ZM255 165H245V315H255V165ZM105 175H85V315H105V175ZM245 175H225V315H245V175ZM135 185H125V235H135V185ZM185 185H145V195H185V185ZM205 185H195V235H205V185ZM75 195H65V275H75V195ZM145 195H135V235H145V195ZM195 195H185V235H195V195ZM155 205H145V235H155V205ZM185 205H175V235H185V205ZM125 235H115V315H125V235ZM215 235H205V315H215V235ZM145 245H125V315H145V245ZM205 245H185V315H205V245ZM185 265H145V315H185V265Z"/></svg></a></div><a href="/">oculon.live</a> · <a href="/docs#remote-mcp">Docs</a> · <a href="/privacy">Privacy</a> · <a href="/terms">Terms</a></footer>
95
+ <footer><div class="social" style="justify-content:center;margin:0 0 14px"><a href="https://x.com/oculonlive" target="_blank" rel="noopener" aria-label="Oculon on X" title="Oculon on X"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"/></svg></a><a href="https://github.com/oculonlive/oculon" target="_blank" rel="noopener" aria-label="Oculon on GitHub" title="Oculon on GitHub"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg></a><a href="https://www.npmjs.com/package/oculon" target="_blank" rel="noopener" aria-label="Oculon on npm" title="Oculon on npm"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z"/></svg></a><a href="https://t.me/oculon_radar_bot" target="_blank" rel="noopener" aria-label="Oculon Radar on Telegram" title="Oculon Radar on Telegram"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"/></svg></a><a href="https://glama.ai/mcp/servers/oculonlive/oculon" target="_blank" rel="noopener" aria-label="Oculon on Glama" title="Oculon on Glama"><svg viewBox="15 15 300 300" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M95 15H75V155H95V15ZM255 15H235V155H255V15ZM75 25H65V125H75V25ZM265 25H255V125H265V25ZM65 35H55V95H65V35ZM275 35H265V95H275V35ZM105 75H95V155H105V75ZM235 75H225V155H235V75ZM205 85H125V185H205V85ZM125 95H105V155H125V95ZM225 95H205V155H225V95ZM75 145H65V155H75V145ZM265 145H255V155H265V145ZM125 155H115V225H125V155ZM215 155H205V225H215V155ZM85 165H75V315H85V165ZM115 165H105V315H115V165ZM225 165H215V315H225V165ZM255 165H245V315H255V165ZM105 175H85V315H105V175ZM245 175H225V315H245V175ZM135 185H125V235H135V185ZM185 185H145V195H185V185ZM205 185H195V235H205V185ZM75 195H65V275H75V195ZM145 195H135V235H145V195ZM195 195H185V235H195V195ZM155 205H145V235H155V205ZM185 205H175V235H185V205ZM125 235H115V315H125V235ZM215 235H205V315H215V235ZM145 245H125V315H145V245ZM205 245H185V315H205V245ZM185 265H145V315H185V265Z"/></svg></a></div><a href="/">oculon.live</a> · <a href="/docs#remote-mcp">Docs</a> · <a href="/privacy">Privacy</a> · <a href="/terms">Terms</a> · <a href="/thetoken">Token</a></footer>
96
96
  <script src="/assets/fx.js"></script>
97
97
  <script>
98
98
  if (window.OculonFX) { try { OculonFX.liquid(document.getElementById('liquidbg'), { base: '#000000', mid: '#001a26', hi: '#00c8e0', intensity: 0.8, scale: 0.3 }); } catch {} }
@@ -6,6 +6,17 @@ const E = [
6
6
  ['/api/factcheck', 'factCheck', 'Fact check a claim or a news link against published fact checks and current reporting.', [{ name: 'claim', desc: 'Claim text or article URL', example: 'The Great Wall of China is visible from space', required: true }]],
7
7
  ['/api/recall', 'recall', 'Vehicle recalls by VIN or "year make model", or product recalls by name (NHTSA, CPSC, FDA).', [{ name: 'q', desc: 'VIN, vehicle or product', example: '2018 Honda Accord', required: true }]],
8
8
  ['/api/emailsec', 'emailSecurity', 'Can someone spoof email from this domain? SPF, DMARC, DKIM, MTA-STS, DNSSEC, with fixes.', [{ name: 'domain', desc: 'Domain', example: 'example.com', required: true }]],
9
+ ['/api/phone', 'phoneCheck', 'Who is calling? Country, line type, carrier, premium-rate and callback-scam warnings for a phone number.', [{ name: 'number', desc: 'Phone number in international format', example: '+1 876 555 0100', required: true }, { name: 'country', desc: 'ISO country code for a national number', example: 'US' }]],
10
+ ['/api/company', 'companyCheck', 'Is this supplier real? EU VAT number (VIES), LEI or company name (GLEIF): status, address, ultimate parent.', [{ name: 'q', desc: 'Company name, LEI or EU VAT number', example: 'NL004495445B01', required: true }]],
11
+ ['/api/breaches', 'dataBreaches', 'Newest data breaches in Have I Been Pwned, or every breach of one domain.', [{ name: 'domain', desc: 'Domain or company (optional)', example: 'adobe.com' }]],
12
+ ['/api/ip', 'ipCheck', 'Who runs this IP, and is it known for abuse? AbuseIPDB, GreyNoise, OTX, VirusTotal, ThreatFox, Spamhaus DROP, Tor, open ports.', [{ name: 'ip', desc: 'IP address or domain', example: '185.220.101.1', required: true }]],
13
+ ['/api/hash', 'hashCheck', 'Is this file known malware or a known good file? MD5, SHA-1 or SHA-256.', [{ name: 'hash', desc: 'File hash in hex', example: '094fd325049b8a9cf6d3e5ef2a6d4cc6a567d7d49c35f8bb8dd9e3c6acf3d78d', required: true }]],
14
+ ['/api/ransomware', 'ransomwareClaims', 'Ransomware leak-site claims: newest, or by country code, sector, company or domain.', [{ name: 'q', desc: 'Country code, sector, company or domain (optional)', example: 'Healthcare' }]],
15
+ ['/api/iban', 'ibanCheck', 'Check an IBAN offline: country, length, check digits, bank code, and whether the account is in the supplier\'s country.', [{ name: 'iban', desc: 'IBAN', example: 'DE89 3704 0044 0532 0130 00', required: true }, { name: 'country', desc: 'Supplier ISO country code', example: 'NL' }]],
16
+ ['/api/lookalike', 'lookalikes', 'Lookalike domains of a brand that exist in DNS, and new certificates naming the brand.', [{ name: 'domain', desc: 'The real domain', example: 'example.com', required: true }]],
17
+ ['/api/honeypot', 'honeypotCheck', 'Can this token be sold? Buy and sell simulation with taxes (Ethereum, BNB Chain, Base).', [{ name: 'address', desc: 'Token contract address', example: '0x6982508145454Ce325dDbE47a25d4ec3d2311933', required: true }, { name: 'chain', desc: 'eth, bsc or base', example: 'eth' }]],
18
+ ['/api/address', 'addressCheck', 'Crypto address check without keys: chain, OFAC sanctions, balance and activity.', [{ name: 'address', desc: 'Crypto address', example: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh', required: true }, { name: 'network', desc: '"robinhood" for Robinhood Chain 0x addresses', example: 'robinhood' }]],
19
+ ['/api/satellites', 'satellites', 'Satellites launched in the last 30 days, or one object\'s orbit, owner and status.', [{ name: 'q', desc: 'Satellite name or NORAD number (optional)', example: '25544' }]],
9
20
  ['/api/travel', 'travelRisk', 'Travel risk for the coming week: official advice, weather, air, outbreaks, disasters, quakes, outages.', [{ name: 'place', desc: 'City or country', example: 'Lisbon', required: true }]],
10
21
  ['/api/airport', 'airportStatus', 'Airport weather (METAR, TAF), FAA delays and ground stops, nearby emergency squawks.', [{ name: 'code', desc: 'IATA or ICAO code, or name', example: 'JFK', required: true }]],
11
22
  ['/api/country', 'countryBrief', 'Country brief: economy, IMF outlook, leaders, currency, travel advice, outages, headlines.', [{ name: 'name', desc: 'Country name or ISO code', example: 'Argentina', required: true }]],
@@ -43,9 +43,21 @@ export const PUBLIC_API = new Set([
43
43
  '/api/airport',
44
44
  '/api/share',
45
45
  '/api/scam',
46
+ '/api/ip',
47
+ '/api/hash',
48
+ '/api/ransomware',
49
+ '/api/company',
50
+ '/api/pwned',
51
+ '/api/breaches',
52
+ '/api/phone',
53
+ '/api/satellites',
54
+ '/api/iban',
55
+ '/api/lookalike',
56
+ '/api/honeypot',
57
+ '/api/address',
46
58
  ]);
47
59
  /** Endpoints that start outside work (a CLI process or several upstream calls) get a tighter budget. */
48
- const HEAVY = new Set(['/api/console', '/api/rhtoken', '/api/verify', '/api/url', '/api/travel', '/api/audit', '/api/recall', '/api/emailsec', '/api/country', '/api/airport', '/api/scam']);
60
+ const HEAVY = new Set(['/api/console', '/api/rhtoken', '/api/verify', '/api/url', '/api/travel', '/api/audit', '/api/recall', '/api/emailsec', '/api/country', '/api/airport', '/api/scam', '/api/ip', '/api/hash', '/api/company', '/api/phone', '/api/lookalike', '/api/honeypot', '/api/address']);
49
61
  /** Signals from these modules describe the owner's own watchlist, cases, fences, votes or raw social streams. */
50
62
  const PRIVATE_MODULES = new Set(['meerkat', 'case', 'fence', 'feedback', 'live']);
51
63
  export function publicSignals(list) {
@@ -1,7 +1,11 @@
1
1
  import { type Server } from 'node:http';
2
2
  import { Oculon } from '../index.js';
3
3
  import { type Delivery } from '../modules/personal.js';
4
+ import { type BurnInfo } from './burns.js';
4
5
  export interface WebOptions {
6
+ /** RPC for the burn list on /thetoken (default ROBINHOOD_PUBLIC_RPC_URL) and a fetch for tests. */
7
+ burnRpcUrl?: string;
8
+ burnFetch?: typeof fetch;
5
9
  port?: number;
6
10
  host?: string;
7
11
  /** Open to the internet: read-only overview and docs for visitors, full app only with the admin cookie. */
@@ -61,6 +65,19 @@ export declare const POST_ROUTES: Record<string, PostHandler>;
61
65
  * and on the public domain points /app and /docs links at their subdomains.
62
66
  */
63
67
  export declare function renderPage(html: string, domain: string | null): string;
68
+ export interface TokenInfo {
69
+ ca: string;
70
+ chain: string;
71
+ ticker: string;
72
+ explorer: string;
73
+ launchpad: string;
74
+ txBase: string;
75
+ deployBlock: number;
76
+ }
77
+ /** The burn section on /thetoken: total, share of supply and every burn with its time and transaction. */
78
+ export declare function burnBlock(b: BurnInfo | null, t: Partial<TokenInfo>): string;
79
+ /** The address block on /thetoken, from src/web/token.json. An empty address says no token is official yet. */
80
+ export declare function tokenBlock(t: Partial<TokenInfo>): string;
64
81
  export declare function createWebServer(opts?: WebOptions): {
65
82
  server: Server;
66
83
  oculon: Oculon;
@@ -23,6 +23,8 @@ import { addPersonal, confirmEmail, emailStatus, listPersonal, personalAlerts, r
23
23
  import { mailEnabled } from '../sources/resend.js';
24
24
  import { analyst, crossExamine, isAnalystModel } from '../analyst.js';
25
25
  import { scrubSecrets } from '../core/keys.js';
26
+ import { readBurns, rpcClient } from './burns.js';
27
+ import { UTILITY, badgeSvg, createNonce, getInvestigation, holderFor, listInvestigations, runSafety, safetyState, signOutHolder, startInvestigation, startSafety, tokenConfig, verifyHolder } from '../modules/utility.js';
26
28
  /** Analyst questions and cross-examinations per visitor address per hour on a public install. */
27
29
  const ANALYST_PER_HOUR = Number(process.env.OCULON_ANALYST_PER_HOUR ?? 40);
28
30
  const analystHits = new Map();
@@ -82,7 +84,21 @@ export function consoleArgv(input) {
82
84
  return null;
83
85
  const [cmd, a1, a2, a3] = parts;
84
86
  const onchain = onchainEnabled();
85
- const bare = ['bgp', 'vulns', 'hazards', 'cloud', 'squawk', 'blackout', 'regs', 'calendar', 'quota', 'help', ...(onchain ? ['rh', 'defi'] : [])];
87
+ const bare = ['bgp', 'vulns', 'hazards', 'cloud', 'squawk', 'blackout', 'regs', 'calendar', 'quota', 'help', 'ransomware', 'breaches', 'satellite', ...(onchain ? ['rh', 'defi'] : [])];
88
+ if (cmd === 'ip' && parts.length === 2 && /^([\d.]{7,15}|[0-9a-f:]{2,39}|[a-z0-9.-]+\.[a-z]{2,})$/i.test(a1))
89
+ return ['ip', a1.toLowerCase()];
90
+ if (cmd === 'hash' && parts.length === 2 && /^([a-f0-9]{32}|[a-f0-9]{40}|[a-f0-9]{64})$/i.test(a1))
91
+ return ['hash', a1.toLowerCase()];
92
+ if (cmd === 'phone' && parts.length === 2 && /^\+\d{7,15}$/.test(a1))
93
+ return ['phone', a1];
94
+ if (cmd === 'breaches' && parts.length === 2 && /^[a-z0-9.-]+\.[a-z]{2,}$/i.test(a1))
95
+ return ['breaches', a1.toLowerCase()];
96
+ if (cmd === 'ransomware' && parts.length === 2 && /^[\p{L}\d.-]{2,40}$/u.test(a1))
97
+ return ['ransomware', a1];
98
+ if (cmd === 'satellite' && parts.length === 2 && /^[\w()-]{3,30}$/.test(a1))
99
+ return ['satellite', a1];
100
+ if (cmd === 'company' && parts.length === 2 && /^[A-Z0-9]{8,20}$/i.test(a1))
101
+ return ['company', a1.toUpperCase()];
86
102
  if (parts.length === 1 && bare.includes(cmd))
87
103
  return [cmd];
88
104
  if (onchain && cmd === 'deployer' && parts.length === 2 && HEX_ADDR.test(a1))
@@ -246,6 +262,27 @@ export const ROUTES = {
246
262
  throw e instanceof HttpError ? e : new HttpError(400, e.message);
247
263
  }
248
264
  },
265
+ '/api/ip': async (q, o) => slim(await o.ipCheck(need(q, 'ip', 253))),
266
+ '/api/hash': async (q, o) => slim(await o.hashCheck(need(q, 'hash', 64))),
267
+ '/api/ransomware': async (q, o) => slim(await o.ransomware((q.get('q') ?? '').slice(0, 80))),
268
+ '/api/company': async (q, o) => slim(await o.companyCheck(need(q, 'q', 120))),
269
+ // Password checks hash in the browser and send only 5 characters of the SHA-1; the server never sees the password.
270
+ '/api/pwned': async (q, o) => {
271
+ const prefix = need(q, 'prefix', 5);
272
+ if (!/^[0-9a-f]{5}$/i.test(prefix))
273
+ throw new HttpError(400, 'prefix must be the first 5 hex characters of a SHA-1 hash');
274
+ const r = await o.pwnedRange(prefix);
275
+ if (!r.data)
276
+ throw new HttpError(502, `Pwned Passwords is not answering right now (${r.prov.note ?? r.prov.status})`);
277
+ return { prefix: prefix.toUpperCase(), suffixes: [...r.data], provenance: [r.prov] };
278
+ },
279
+ '/api/breaches': async (q, o) => slim(await o.breaches((q.get('domain') ?? '').slice(0, 120))),
280
+ '/api/phone': async (q, o) => slim(await o.phoneCheck(need(q, 'number', 32), q.get('country') ? { country: q.get('country').slice(0, 2) } : {})),
281
+ '/api/iban': async (q, o) => slim(await o.ibanCheck(need(q, 'iban', 64), q.get('country') ? { country: q.get('country').slice(0, 2) } : {})),
282
+ '/api/lookalike': async (q, o) => slim(await o.lookalikes(need(q, 'domain', 120))),
283
+ '/api/honeypot': async (q, o) => slim(await o.honeypotCheck(need(q, 'address', 60), q.get('chain') ? { chain: q.get('chain').slice(0, 12) } : {})),
284
+ '/api/address': async (q, o) => slim(await o.addressCheck(need(q, 'address', 120), q.get('network') ? { network: q.get('network').slice(0, 20) } : {})),
285
+ '/api/satellites': async (q, o) => slim(await o.satellites((q.get('q') ?? '').slice(0, 60))),
249
286
  '/api/papers': async (q, o) => slim(await o.papers(need(q, 'topic', 200), q.get('years') ? { years: Number(q.get('years')) || 3 } : {})),
250
287
  '/api/country': async (q, o) => {
251
288
  try {
@@ -351,6 +388,13 @@ async function readJson(req, limit = 10_000) {
351
388
  /** Writes that change what the whole install watches. */
352
389
  const OWNER_ONLY = new Set(['/api/monitor', '/api/watch/delete', '/api/fences', '/api/fences/delete', '/api/cases']);
353
390
  export const POST_ROUTES = {
391
+ // Raw email headers can be several kilobytes, too long for a query string.
392
+ '/api/headers': async (b, o) => {
393
+ const raw = String(b.headers ?? '');
394
+ if (!raw.trim())
395
+ throw new HttpError(400, 'missing headers');
396
+ return o.headerCheck(raw.slice(0, 100_000));
397
+ },
354
398
  '/api/fences': (b, o) => {
355
399
  const box = Array.isArray(b.box) ? b.box.map(Number) : null;
356
400
  if (!box || box.length !== 4)
@@ -485,12 +529,41 @@ export function renderPage(html, domain) {
485
529
  .replace(/href="\/app(#[^"]*)?"/g, (_m, h) => `href="https://app.${domain}/${h ?? ''}"`)
486
530
  .replace(/href="\/report"/g, `href="https://app.${domain}/report"`)
487
531
  .replace(/href="\/ask"/g, `href="https://${domain}/ask"`)
532
+ .replace(/href="\/thetoken"/g, `href="https://${domain}/thetoken"`)
533
+ .replace(/href="\/utility"/g, `href="https://${domain}/utility"`)
488
534
  .replace(/href="\/docs(?:#([^"]*))?"/g, (_m, h) => `href="https://docs.${domain}/${h ?? ''}"`)
489
535
  .replace(/href="\/(privacy|terms)(#[^"]*)?"/g, (_m, p, h) => `href="${main}/${p}${h ?? ''}"`)
490
536
  .replace(/href="\/"/g, `href="${main}/"`);
491
537
  }
492
538
  return out;
493
539
  }
540
+ /** The burn section on /thetoken: total, share of supply and every burn with its time and transaction. */
541
+ export function burnBlock(b, t) {
542
+ if (!b)
543
+ return '';
544
+ const esc = (s) => s.replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' })[c]);
545
+ const base = /^https:\/\/[^\s"'<>]+$/.test(t.txBase ?? '') ? t.txBase.replace(/\/$/, '') : '';
546
+ const when = (iso) => `${iso.slice(0, 10)} ${iso.slice(11, 16)} UTC`;
547
+ const short = (tx) => `${tx.slice(0, 10)}…${tx.slice(-6)}`;
548
+ const rows = b.burns.map((x) => `<tr><td>${esc(when(x.time))}<br>${base ? `<a href="${esc(base)}/tx/${esc(x.tx)}" target="_blank" rel="noopener">${esc(short(x.tx))}</a>` : `<span>${esc(short(x.tx))}</span>`}</td><td class="n">${esc(x.amount)}</td></tr>`).join('');
549
+ return `<div class="burn"><div class="lbl">Burned</div><div class="btot"><span>${esc(b.total)}</span>${b.percent ? `<em>${esc(b.percent)} of supply</em>` : ''}</div>`
550
+ + (rows ? `<div class="btable"><table><thead><tr><th>Time · transaction</th><th class="n">Amount</th></tr></thead><tbody>${rows}</tbody></table></div>` : '<p>No burns yet.</p>')
551
+ + `<p class="bnote">Read live from the chain: transfers to the dead and zero addresses. Updated ${esc(when(b.checkedAt))}.</p></div>`;
552
+ }
553
+ /** The address block on /thetoken, from src/web/token.json. An empty address says no token is official yet. */
554
+ export function tokenBlock(t) {
555
+ const esc = (s) => s.replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' })[c]);
556
+ const ca = (t.ca ?? '').trim();
557
+ if (!ca)
558
+ return '<div class="ca none"><p>No official token address has been posted yet. Until it appears here, on X and on GitHub at the same time, any address claimed to be Oculon is not ours.</p></div>';
559
+ const safe = (u) => (/^https:\/\/[^\s"'<>]+$/.test(u ?? '') ? u : '');
560
+ const launchpad = safe(t.launchpad), explorer = safe(t.explorer);
561
+ // The third cell links to the launchpad page when there is one, otherwise to a block explorer.
562
+ const link = launchpad ? { k: 'Launchpad', u: launchpad, label: new URL(launchpad).hostname.replace(/^www\./, '') } : explorer ? { k: 'Explorer', u: explorer, label: 'view' } : null;
563
+ const cell = (k, v) => `<div><b>${k}</b><span>${v ? esc(v) : '-'}</span></div>`;
564
+ return `<div class="ca"><div class="lbl">Contract address</div><div class="addr"><code id="ca-value">${esc(ca)}</code><button id="copy-ca" type="button">COPY</button></div>`
565
+ + `<div class="meta">${cell('Chain', (t.chain ?? '').trim())}${cell('Ticker', (t.ticker ?? '').trim() ? `$${(t.ticker ?? '').trim().replace(/^\$/, '')}` : '')}<div><b>${link ? link.k : 'Explorer'}</b><span>${link ? `<a href="${esc(link.u)}" target="_blank" rel="noopener">${esc(link.label)}</a>` : '-'}</span></div></div></div>`;
566
+ }
494
567
  function send(res, status, body, type, cache = 'no-store') {
495
568
  res.writeHead(status, {
496
569
  'content-type': type,
@@ -523,6 +596,31 @@ export function createWebServer(opts = {}) {
523
596
  // A Cloudflare Worker serves app.<domain> and docs.<domain> by forwarding to this server with the site name
524
597
  // and the client address in headers. Those headers count only when they carry the shared edge secret.
525
598
  const edgeSecret = (opts.edgeSecret ?? process.env.OCULON_EDGE_SECRET ?? '').trim() || null;
599
+ // Live safety badges: active monitors are re-checked about every 15 minutes.
600
+ const safetyTimer = setInterval(() => {
601
+ void runSafety(oculon).then((changes) => { for (const c of changes)
602
+ log(`safety badge ${c.token}: ${c.from ?? 'new'} -> ${c.to}`); }).catch(() => { });
603
+ }, 5 * 60_000);
604
+ safetyTimer.unref();
605
+ // Burns on /thetoken come from the chain RPC, cached for five minutes; a failed read keeps the last good one.
606
+ let burnCache = null;
607
+ const tokenBurns = async (t) => {
608
+ const url = opts.burnRpcUrl ?? process.env.ROBINHOOD_PUBLIC_RPC_URL?.trim();
609
+ if (!url || !/^0x[0-9a-fA-F]{40}$/.test(t.ca ?? '') || !t.deployBlock)
610
+ return null;
611
+ const key = `${t.ca}:${t.deployBlock}`;
612
+ if (burnCache && burnCache.key === key && Date.now() - burnCache.at < 300_000)
613
+ return burnCache.info;
614
+ try {
615
+ const info = await readBurns(rpcClient(url, opts.burnFetch), t.ca, t.deployBlock);
616
+ burnCache = { at: Date.now(), key, info };
617
+ return info;
618
+ }
619
+ catch (e) {
620
+ log(`token burns: ${e.message}`);
621
+ return burnCache?.key === key ? burnCache.info : null;
622
+ }
623
+ };
526
624
  /** The page a browser sees on the MCP endpoint: the URL to add, client snippets and the tools this endpoint lists. */
527
625
  const mcpPage = async (onPath) => {
528
626
  const r = (await mcpServer.handle({ jsonrpc: '2.0', id: 0, method: 'tools/list' }));
@@ -627,6 +725,56 @@ export function createWebServer(opts = {}) {
627
725
  const msg = url.pathname === '/mail/confirm' ? (ok ? 'Alerts confirmed. You will get an email when one of your monitors finds a change.' : 'This confirmation link is no longer valid.') : ok ? 'You are unsubscribed. No more monitor emails will be sent.' : 'This address was already unsubscribed.';
628
726
  return send(res, 200, `<!doctype html><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Oculon alerts</title><body style="margin:0;background:#000;color:#f2f2f2;font-family:system-ui,sans-serif;display:grid;place-items:center;min-height:100vh;padding:16px"><div style="max-width:460px"><p style="font:600 12px monospace;letter-spacing:.2em;color:#00f0ff"><img src="/assets/logo.svg" alt="" width="18" height="18" style="vertical-align:-4px;margin-right:10px">OCULON</p><h1 style="font-weight:500">${msg}</h1><p><a style="color:#00f0ff" href="${siteDomain ? `https://app.${siteDomain}/#watch` : '/app#watch'}">Open your monitors →</a></p></div></body>`, 'text/html; charset=utf-8');
629
727
  }
728
+ // $OCULON utility: burn-to-investigate, live safety badges and the holder tier (see modules/utility.ts).
729
+ const badge = /^\/badge\/(0x[0-9a-fA-F]{40})\.svg$/.exec(url.pathname)?.[1];
730
+ if (badge && req.method === 'GET')
731
+ return send(res, 200, badgeSvg(safetyState(oculon.ctx, badge)), 'image/svg+xml; charset=utf-8', 'public, max-age=300');
732
+ if ((/^\/utility\/?$/.test(url.pathname) || /^\/investigation\/[0-9a-f]{12}$/.test(url.pathname) || /^\/safety\/0x[0-9a-fA-F]{40}$/.test(url.pathname)) && req.method === 'GET' && hostName.split('.')[0] !== 'docs') {
733
+ return send(res, 200, renderPage(readFileSync(join(HERE, 'utility.html'), 'utf8'), siteDomain && hostName.endsWith(siteDomain) ? siteDomain : null), 'text/html; charset=utf-8');
734
+ }
735
+ if (url.pathname.startsWith('/api/utility/')) {
736
+ if (!admin)
737
+ return send(res, 403, '{"error":"not available on this install"}', 'application/json');
738
+ if (req.method === 'POST' && !sameSite())
739
+ return send(res, 403, '{"error":"forbidden"}', 'application/json');
740
+ const owner = `web:${visitor()}`;
741
+ const json = (v, status = 200) => send(res, status, JSON.stringify(v), 'application/json; charset=utf-8');
742
+ try {
743
+ if (req.method === 'GET') {
744
+ if (url.pathname === '/api/utility/info')
745
+ return json({ token: tokenConfig(), amounts: { investigate: UTILITY.investigate.toString(), safety: UTILITY.safety.toString(), holder: UTILITY.holder.toString() }, safetyDays: UTILITY.safetyDays, holderMonitors: UTILITY.holderMonitors, holder: holderFor(oculon.ctx, owner), investigations: listInvestigations(oculon.ctx, 12) });
746
+ if (url.pathname === '/api/utility/investigation') {
747
+ const v = getInvestigation(oculon.ctx, url.searchParams.get('id') ?? '');
748
+ return v ? json(v) : json({ error: 'no such investigation' }, 404);
749
+ }
750
+ if (url.pathname === '/api/utility/safety') {
751
+ const t = url.searchParams.get('token') ?? '';
752
+ if (!/^0x[0-9a-fA-F]{40}$/.test(t))
753
+ throw new HttpError(400, 'give a token address');
754
+ return json(safetyState(oculon.ctx, t));
755
+ }
756
+ }
757
+ if (req.method === 'POST') {
758
+ const b = await readJson(req);
759
+ if (url.pathname === '/api/utility/nonce')
760
+ return json(createNonce(siteDomain ?? hostName, String(b.address ?? '')));
761
+ if (url.pathname === '/api/utility/holder')
762
+ return json(await verifyHolder(oculon.ctx, owner, String(b.message ?? ''), String(b.signature ?? '')));
763
+ if (url.pathname === '/api/utility/signout') {
764
+ signOutHolder(oculon.ctx, owner);
765
+ return json({ ok: true });
766
+ }
767
+ if (url.pathname === '/api/utility/investigate')
768
+ return json(await startInvestigation(oculon, String(b.tx ?? ''), String(b.target ?? ''), String(b.signature ?? '')));
769
+ if (url.pathname === '/api/utility/safety')
770
+ return json(await startSafety(oculon, String(b.tx ?? ''), String(b.token ?? ''), String(b.signature ?? '')));
771
+ }
772
+ return json({ error: 'not found' }, 404);
773
+ }
774
+ catch (e) {
775
+ return json({ error: e.message }, e instanceof HttpError ? e.status : 400);
776
+ }
777
+ }
630
778
  if (url.pathname === '/api/my' || url.pathname.startsWith('/api/my/')) {
631
779
  if (!admin)
632
780
  return send(res, 403, '{"error":"not available on this install"}', 'application/json');
@@ -635,14 +783,14 @@ export function createWebServer(opts = {}) {
635
783
  const owner = `web:${visitor()}`;
636
784
  try {
637
785
  if (req.method === 'GET' && url.pathname === '/api/my')
638
- return send(res, 200, JSON.stringify({ monitors: listPersonal(oculon.ctx, owner), alerts: personalAlerts(oculon.ctx, owner, 40), email: emailStatus(oculon.ctx, owner), mail: mailEnabled(), owner: !publicMode || isAdmin(req, adminToken) }), 'application/json; charset=utf-8');
786
+ return send(res, 200, JSON.stringify({ monitors: listPersonal(oculon.ctx, owner), alerts: personalAlerts(oculon.ctx, owner, 40), email: emailStatus(oculon.ctx, owner), mail: mailEnabled(), owner: !publicMode || isAdmin(req, adminToken), holder: holderFor(oculon.ctx, owner) }), 'application/json; charset=utf-8');
639
787
  if (req.method === 'POST') {
640
788
  const b = await readJson(req);
641
789
  if (url.pathname === '/api/my/monitors') {
642
790
  const text = String(b.text ?? '').trim();
643
791
  if (text.length < 4 || text.length > 300)
644
792
  throw new HttpError(400, 'describe what to watch in 4-300 characters');
645
- return send(res, 200, JSON.stringify(await addPersonal(oculon.ctx, owner, text)), 'application/json; charset=utf-8');
793
+ return send(res, 200, JSON.stringify(await addPersonal(oculon.ctx, owner, text, holderFor(oculon.ctx, owner) ? UTILITY.holderMonitors : undefined)), 'application/json; charset=utf-8');
646
794
  }
647
795
  if (url.pathname === '/api/my/monitors/delete')
648
796
  return send(res, 200, JSON.stringify({ removed: removePersonal(oculon.ctx, owner, Number(b.id)) }), 'application/json');
@@ -772,7 +920,7 @@ export function createWebServer(opts = {}) {
772
920
  const sub = hostName.split('.')[0];
773
921
  // Docs sections have their own addresses: docs.<domain>/install, or /docs/install on a single host.
774
922
  const docsSection = (sub === 'docs' ? /^\/([a-z0-9][a-z0-9-]{0,60})\/?$/ : /^\/docs\/([a-z0-9][a-z0-9-]{0,60})\/?$/).exec(url.pathname)?.[1];
775
- if (docsSection && !['api', 'assets', 'app', 'report', 'r', 'proof', 'ask'].includes(docsSection)) {
923
+ if (docsSection && !['api', 'assets', 'app', 'report', 'r', 'proof', 'ask', 'thetoken'].includes(docsSection)) {
776
924
  if (siteDomain && sub !== 'docs') {
777
925
  res.writeHead(301, { location: `https://docs.${siteDomain}/${docsSection}${url.search}`, 'cache-control': 'no-store' });
778
926
  return res.end();
@@ -788,6 +936,15 @@ export function createWebServer(opts = {}) {
788
936
  }
789
937
  return send(res, 200, renderPage(readFileSync(join(HERE, PAGE_FILES[page]), 'utf8'), siteDomain && hostName.endsWith(siteDomain) ? siteDomain : null), 'text/html; charset=utf-8');
790
938
  }
939
+ if (/^\/thetoken\/?$/.test(url.pathname) && sub !== 'docs') {
940
+ let info = {};
941
+ try {
942
+ info = JSON.parse(readFileSync(join(HERE, 'token.json'), 'utf8'));
943
+ }
944
+ catch { /* no file: nothing official */ }
945
+ const html = readFileSync(join(HERE, 'token.html'), 'utf8').replace('{{TOKEN_BLOCK}}', tokenBlock(info) + burnBlock(await tokenBurns(info), info));
946
+ return send(res, 200, renderPage(html, siteDomain && hostName.endsWith(siteDomain) ? siteDomain : null), 'text/html; charset=utf-8');
947
+ }
791
948
  if (url.pathname === '/manifest.webmanifest')
792
949
  return send(res, 200, readFileSync(join(HERE, 'manifest.webmanifest'), 'utf8'), 'application/manifest+json; charset=utf-8', 'no-cache');
793
950
  if (url.pathname === '/sw.js')