oculon 0.1.1 → 0.1.3

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.
@@ -12,12 +12,16 @@
12
12
  <link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
13
13
  <link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&display=swap" rel="stylesheet">
14
14
  <style>
15
+ /* no sideways scrolling on phones: wide tables and code scroll inside their own boxes */
16
+ html,body{overflow-x:clip;max-width:100%}
17
+ .lm{display:inline-block;width:22px;height:22px;vertical-align:-4px;margin-right:12px}
18
+ .social{display:flex;gap:16px;align-items:center;margin-top:18px}.social a{color:#9fb0b4;display:inline-flex;transition:color .2s,transform .2s}.social a:hover{color:#00f0ff;transform:translateY(-2px)}.social svg{display:block}
15
19
  :root{--bg:#000;--bg2:#060606;--line:#222;--text:#fff;--soft:#cfcfcf;--mut:#9a9a9a;--dim:#5e5e5e;--y:#00f0ff;--sans:'Space Grotesk',system-ui,sans-serif;--mono:'Space Mono',ui-monospace,Consolas,monospace}
16
20
  *{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:90px}
17
21
  body{margin:0;background:var(--bg);color:var(--text);font-family:var(--sans);-webkit-font-smoothing:antialiased;overflow-x:clip}
18
22
  a{color:inherit}
19
23
  .lbl{font:12px var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--mut)}
20
- header{position:sticky;top:0;z-index:5;background:rgba(0,0,0,.88);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}
24
+ header{position:sticky;top:0;z-index:5;background:#000;border-bottom:1px solid var(--line)}
21
25
  header .in{display:flex;align-items:center;justify-content:space-between;padding:18px clamp(20px,3vw,40px);gap:20px}
22
26
  .logo{font-size:17px;font-weight:600;letter-spacing:.4em;text-decoration:none}
23
27
  .logo span{color:var(--mut);letter-spacing:.2em;font-weight:400;margin-left:10px}
@@ -34,7 +38,7 @@ main{padding:64px clamp(20px,5vw,72px) 120px;max-width:1020px}
34
38
  main h1{margin:14px 0 18px;font-size:clamp(44px,5vw,64px);font-weight:300;letter-spacing:-.04em;line-height:1}
35
39
  main h2{margin:72px 0 16px;font-size:36px;font-weight:300;letter-spacing:-.03em;padding-top:28px;border-top:1px solid var(--line)}
36
40
  main h3{margin:36px 0 10px;font-size:22px;font-weight:400}
37
- main p,main li{font-size:17px;line-height:1.7;color:var(--soft);font-weight:300}
41
+ main p,main li{font-size:17px;line-height:1.7;color:var(--soft);font-weight:300;overflow-wrap:anywhere}
38
42
  main ul{padding-left:20px}
39
43
  main strong{color:#fff;font-weight:500}
40
44
  main a{color:#fff;text-decoration-color:var(--y);text-underline-offset:3px}
@@ -54,7 +58,7 @@ td:first-child{color:#fff;white-space:nowrap}
54
58
  /* motion, shared with the landing page */
55
59
  #liquidbg{position:fixed;inset:0;width:100%;height:100%;z-index:0;pointer-events:none;opacity:.34}
56
60
  header,.layout{position:relative;z-index:1}
57
- header{position:sticky}
61
+ header{position:sticky;z-index:5}
58
62
  header::after{content:'';position:absolute;left:-30%;bottom:-1px;width:30%;height:1px;background:linear-gradient(90deg,transparent,var(--y),transparent);animation:hscan 6s linear infinite}
59
63
  @keyframes hscan{to{left:100%}}
60
64
  .logo{background:linear-gradient(90deg,#fff 40%,var(--y) 50%,#fff 60%);background-size:300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:shim 7s linear infinite}
@@ -91,7 +95,7 @@ aside.left a.on{text-shadow:0 0 18px rgba(0,240,255,.6)}
91
95
  .qc h3{margin:8px 0 6px;font-size:18px;font-weight:500}
92
96
  .qc p{margin:0;font-size:14px !important;line-height:1.55 !important;color:var(--mut) !important}
93
97
  .qc .cmd{margin-top:12px;display:flex;align-items:center;gap:10px;background:#050a0b;border:1px solid #1a2629;padding:9px 10px 9px 12px;font:12.5px var(--mono);color:#e6fbff}
94
- .qc .cmd code{background:none;border:0;padding:0;font-size:12.5px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
98
+ .qc .cmd code{background:none;border:0;padding:0;font-size:12.5px;flex:1;min-width:0;white-space:normal;overflow-wrap:anywhere}
95
99
  .qc .cmd .p{color:var(--y)}
96
100
  .cp{background:none;border:1px solid #2a3b3f;color:#9fd8e2;font:11px var(--mono);padding:4px 9px;cursor:pointer;flex:none;transition:all .2s}
97
101
  .cp:hover{border-color:var(--y);color:#fff}.cp.ok{border-color:#3fd16b;color:#3fd16b}
@@ -128,7 +132,7 @@ aside.left a.on{text-shadow:0 0 18px rgba(0,240,255,.6)}
128
132
  </style>
129
133
  </head>
130
134
  <body>
131
- <header><div class="in"><a class="logo" href="/">OCULON<span>DOCS</span></a><nav><a class="opt" href="/">Home</a><a class="opt" href="#cli-reference">CLI reference</a><a class="btn" href="/app">Open app</a></nav></div></header>
135
+ <header><div class="in"><a class="logo" href="/"><img class="lm" src="/assets/logo.svg" alt="" width="22" height="22">OCULON<span>DOCS</span></a><nav><a class="opt" href="/">Home</a><a class="opt" href="/ask">Analyst</a><a class="opt" href="#cli-reference">CLI reference</a><a class="btn" href="/app">Open app</a></nav></div></header>
132
136
  <canvas id="liquidbg" aria-hidden="true"></canvas>
133
137
  <div class="layout">
134
138
  <aside class="left"><div class="lbl" style="margin-bottom:14px">Guide</div><div id="toc"></div></aside>
@@ -138,7 +142,7 @@ aside.left a.on{text-shadow:0 0 18px rgba(0,240,255,.6)}
138
142
  <div class="dstats"><div><span>Version</span><b id="ds-ver">—</b></div><div><span>Modules</span><b id="ds-mod">—</b></div><div><span>MCP tools</span><b id="ds-mcp">—</b></div><div><span>Public sources</span><b id="ds-src">—</b></div></div>
139
143
  <div class="dsec"><h2 id="start-here">Start here</h2><p class="sub">Four commands, in the order most people run them.</p>
140
144
  <div class="qs">
141
- <div class="qc"><div class="n">01</div><h3>Install</h3><p>Needs Node.js 22.13 or newer. No runtime dependencies.</p><div class="cmd"><span class="p">$</span><code>npm i -g oculon</code><button class="cp" type="button">copy</button></div></div>
145
+ <div class="qc"><div class="n">01</div><h3>Install</h3><p>Needs Node.js 22.13 or newer (<a href="https://nodejs.org" target="_blank" rel="noopener">nodejs.org</a>). No runtime dependencies. To try it without installing, put <code>npx</code> in front of any command, e.g. <code>npx oculon tour</code>.</p><div class="cmd"><span class="p">$</span><code>npm install -g oculon</code><button class="cp" type="button">copy</button></div></div>
142
146
  <div class="qc"><div class="n">02</div><h3>Take the tour</h3><p>Shows what this install knows and what to try next.</p><div class="cmd"><span class="p">$</span><code>oculon tour</code><button class="cp" type="button">copy</button></div></div>
143
147
  <div class="qc"><div class="n">03</div><h3>Open the web app</h3><p>Overview page, console, dashboard and these docs, with the schedule and live streams running.</p><div class="cmd"><span class="p">$</span><code>oculon serve --watch 15 --live</code><button class="cp" type="button">copy</button></div></div>
144
148
  <div class="qc"><div class="n">04</div><h3>Connect an agent</h3><p>Add the remote MCP server to Claude Code, or run <code>oculon mcp</code> on stdio.</p><div class="cmd"><span class="p">$</span><code>claude mcp add --transport http oculon https://mcp.oculon.live</code><button class="cp" type="button">copy</button></div></div>
@@ -164,6 +168,7 @@ ots verify -d &lt;root&gt; &lt;id&gt;.ots # the root is committed i
164
168
  </section>
165
169
  <div id="doc" class="skeleton">Loading…</div>
166
170
  <section id="help"><h2 id="cli-reference">CLI reference</h2><p>The full command list, printed by <code>oculon help</code> on this install.</p><div id="help-out" class="skeleton">Loading…</div></section>
171
+ <div style="margin-top:56px;padding-top:22px;border-top:1px solid var(--line)"><div class="lbl">Follow Oculon</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>
167
172
  </main>
168
173
  <aside class="right"><div class="lbl" style="margin-bottom:12px">On this page</div><div id="otp"></div></aside>
169
174
  </div>
@@ -174,6 +179,11 @@ if (window.OculonFX) { OculonFX.liquid(document.getElementById('liquidbg'), { ba
174
179
  const rvio = new IntersectionObserver((es) => es.forEach((e) => { if (e.isIntersecting) { e.target.classList.add('in'); rvio.unobserve(e.target); } }), { threshold: 0.08 });
175
180
  const reveal = () => document.querySelectorAll('#doc h2, #doc h3, #doc p, #doc pre, #doc table, #doc ul, #help h2, #help pre').forEach((el) => { if (!el.classList.contains('rv')) { el.classList.add('rv'); rvio.observe(el); } });
176
181
  const $ = (id) => document.getElementById(id);
182
+ // Sections have their own addresses: docs.<domain>/install (or /docs/install on a single host).
183
+ const docsBase = location.pathname.startsWith('/docs') ? '/docs/' : '/';
184
+ function sectionFromPath() { const s = location.pathname.slice(docsBase.length).replace(/\/$/, ''); return /^[a-z0-9-]+$/.test(s) ? s : ''; }
185
+ window.onOculonSection = (id) => { const next = docsBase + id; if (location.pathname !== next) history.pushState({ section: id }, '', next + location.search); };
186
+ addEventListener('popstate', () => { const s = sectionFromPath(); const el = s && document.getElementById(s); if (el) el.scrollIntoView({ behavior: 'instant', block: 'start' }); else if (!s) scrollTo({ top: 0 }); });
177
187
  const esc = (s) => String(s ?? '').replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' })[c]);
178
188
  const slug = (s) => s.toLowerCase().replace(/<[^>]+>/g, '').replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '');
179
189
 
@@ -197,6 +207,8 @@ function md(src) {
197
207
  if (/^\s*[-*]\s+/.test(l)) { const items = []; while (i < lines.length && /^\s*[-*]\s+/.test(lines[i])) { let item = lines[i++].replace(/^\s*[-*]\s+/, ''); while (i < lines.length && /^\s{2,}\S/.test(lines[i]) && !/^\s*[-*]\s+/.test(lines[i])) item += ' ' + lines[i++].trim(); items.push(item); } html += `<ul>${items.map((t) => `<li>${inline(t)}</li>`).join('')}</ul>`; continue; }
198
208
  if (/^\s*\d+\.\s+/.test(l)) { const items = []; while (i < lines.length && /^\s*\d+\.\s+/.test(lines[i])) items.push(lines[i++].replace(/^\s*\d+\.\s+/, '')); html += `<ol>${items.map((t) => `<li>${inline(t)}</li>`).join('')}</ol>`; continue; }
199
209
  if (!l.trim()) { i++; continue; }
210
+ // Badge rows ([![CI](...)](...)) are for GitHub; the docs page skips them.
211
+ if (/^\s*\[!\[/.test(l)) { i++; continue; }
200
212
  const buf = []; while (i < lines.length && lines[i].trim() && !/^(#|```|\||\s*[-*]\s|\s*\d+\.\s)/.test(lines[i])) buf.push(lines[i++]);
201
213
  html += `<p>${inline(buf.join(' '))}</p>`;
202
214
  }
@@ -221,9 +233,20 @@ fetch('/api/readme').then((r) => r.json()).then((j) => {
221
233
  const first = doc.querySelector('p'); if (first) first.classList.add('intro');
222
234
  buildNav(); reveal();
223
235
  // A link straight to a section (#remote-mcp) skips the rise-in, which could leave the jumped-to text hidden on phones.
224
- if (location.hash) {
236
+ const target = sectionFromPath() || window.oculonInitialHash || decodeURIComponent(location.hash.slice(1));
237
+ if (target) {
225
238
  document.querySelectorAll('.rv').forEach((el) => { el.classList.add('in'); rvio.unobserve(el); });
226
- document.getElementById(decodeURIComponent(location.hash.slice(1)))?.scrollIntoView({ behavior: 'instant', block: 'start' });
239
+ // Cards above the README (module finder, live fusion) fill in after this, which moves the section down;
240
+ // keep it in place for a moment unless the reader starts scrolling.
241
+ const el = document.getElementById(target);
242
+ if (el) {
243
+ let moved = false;
244
+ const stop = () => { moved = true; };
245
+ ['wheel', 'touchstart', 'keydown'].forEach((ev) => addEventListener(ev, stop, { once: true, passive: true }));
246
+ const go = () => { if (!moved) el.scrollIntoView({ behavior: 'instant', block: 'start' }); };
247
+ go(); [150, 500, 1000, 1800, 3000].forEach((ms) => setTimeout(go, ms));
248
+ }
249
+ window.oculonClearHash?.();
227
250
  }
228
251
  }).catch((e) => { $('doc').textContent = `Could not load the README: ${e.message}`; });
229
252
  fetch('/api/meta').then((r) => r.json()).then((m) => { $('ver').textContent = `v${m.version}`; }).catch(() => {});
@@ -13,6 +13,9 @@
13
13
  <link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&display=swap" rel="stylesheet">
14
14
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.min.css">
15
15
  <style>
16
+ /* no sideways scrolling on phones: wide tables and code scroll inside their own boxes */
17
+ html,body{overflow-x:clip;max-width:100%}
18
+ .lm{display:inline-block;width:22px;height:22px;vertical-align:-4px;margin-right:12px}
16
19
  :root {
17
20
  --bg: #000; --panel: #060606; --panel-2: #0e0e0e; --line: #222; --text: #fff; --muted: #9a9a9a;
18
21
  --accent: #00f0ff; --accent-2: #e8e8e8; --warn: #00f0ff; --bad: #ff7a6b; --chip: #111;
@@ -348,7 +351,7 @@ nav button { white-space: nowrap; }
348
351
  </head>
349
352
  <body>
350
353
  <header>
351
- <a class="brand" href="/">OCULON</a>
354
+ <a class="brand" href="/"><img class="lm" src="/assets/logo.svg" alt="" width="22" height="22">OCULON</a>
352
355
  <nav role="tablist">
353
356
  <button role="tab" data-tab="overview" aria-selected="true">Overview</button>
354
357
  <!--onchain--> <button role="tab" data-tab="robinhood" aria-selected="false">Robinhood</button><!--/onchain-->
@@ -368,6 +371,7 @@ nav button { white-space: nowrap; }
368
371
  <button role="tab" data-tab="accuracy">Accuracy</button>
369
372
  </nav>
370
373
  <div class="spacer"></div>
374
+ <a class="toplink" href="/ask">Analyst</a>
371
375
  <a class="toplink" href="/docs">Docs</a>
372
376
  <span class="status" id="status"></span>
373
377
  <button class="icon-btn" id="theme" title="Toggle theme" aria-label="Toggle theme">◐</button>
@@ -400,7 +404,7 @@ nav button { white-space: nowrap; }
400
404
  <article class="ov w2"><div class="ovh"><span>Forecast and proof</span><a data-go="forecasts">Forecasts →</a></div><div id="ov-fc" class="ovb"><div class="ov-sk"></div></div><div class="ovf">Raven · Tortoise · OpenTimestamps</div></article>
401
405
  <article class="ov"><div class="ovh"><span>Watchlist</span><a data-go="watch">Watch →</a></div><div id="ov-watch" class="ovb"><div class="ov-sk"></div></div><div class="ovf">Meerkat</div></article>
402
406
  <article class="ov"><div class="ovh"><span>Case files</span><a data-go="cases">Cases →</a></div><div id="ov-cases" class="ovb"><div class="ov-sk"></div></div><div class="ovf">Sourced investigations</div></article>
403
- <article class="ov w4"><div class="ovh"><span>Free-tier budgets today</span><a href="/docs#configuration">Docs →</a></div><div id="ov-quota" class="ovb"><div class="ov-sk"></div></div><div class="ovf">oculon quota</div></article>
407
+ <article class="ov w4"><div class="ovh"><span>API budgets today</span><a href="/docs#configuration">Docs →</a></div><div id="ov-quota" class="ovb"><div class="ov-sk"></div></div><div class="ovf">oculon quota</div></article>
404
408
  </div>
405
409
  </section>
406
410
  <!--onchain--> <section id="tab-robinhood" hidden>
@@ -1439,7 +1443,6 @@ const signalCard = (s) => shareCard({ kicker: `${s.module} · ${String(s.created
1439
1443
  function openEntity(id) {
1440
1444
  document.querySelectorAll('nav button').forEach((x) => x.setAttribute('aria-selected', 'false'));
1441
1445
  document.querySelectorAll('main > section').forEach((s) => { s.hidden = s.id !== 'tab-entity'; });
1442
- history.replaceState(null, '', '#entity:' + encodeURIComponent(id));
1443
1446
  scrollTo({ top: 0 });
1444
1447
  loadEntity(id);
1445
1448
  }
@@ -1465,7 +1468,7 @@ async function loadEntity(id) {
1465
1468
  const d = document.getElementById('ent-dossier'); if (d) d.onclick = () => runInvestigate('dossier', p.name);
1466
1469
  } catch (e) { body.innerHTML = `<p class="err">${esc(e.message)}</p>`; }
1467
1470
  }
1468
- addEventListener('hashchange', () => { if (location.hash.startsWith('#entity:')) loadEntity(decodeURIComponent(location.hash.slice(8))); });
1471
+ addEventListener('hashchange', () => { const n = decodeURIComponent(location.hash.slice(1)); if (n) { openView(n); history.replaceState(null, '', location.pathname + location.search); } });
1469
1472
  function runInvestigate(kind, q) {
1470
1473
  goTab('investigate');
1471
1474
  const sel = document.getElementById('inv-kind'); sel.value = kind; sel.dispatchEvent(new Event('change'));
@@ -1769,11 +1772,15 @@ async function loadAccuracy() {
1769
1772
  /* ================================================================== PWA */
1770
1773
  if ('serviceWorker' in navigator) navigator.serviceWorker.register('/sw.js').catch(() => {});
1771
1774
 
1772
- const fromHash = () => document.querySelector(`nav button[data-tab="${CSS.escape(location.hash.slice(1))}"]`)?.click();
1773
- document.querySelectorAll('nav button').forEach((b) => b.addEventListener('click', () => history.replaceState(null, '', '#' + b.dataset.tab)));
1774
- addEventListener('hashchange', fromHash);
1775
- if (location.hash.startsWith('#entity:')) openEntity(decodeURIComponent(location.hash.slice(8)));
1776
- else if (location.hash) fromHash();
1775
+ // Views are opened by name (#overview, #entity:org:x) from links, but the address bar stays clean.
1776
+ const openView = (name) => {
1777
+ if (!name) return;
1778
+ if (name.startsWith('entity:')) openEntity(name.slice(7));
1779
+ else document.querySelector(`nav button[data-tab="${CSS.escape(name)}"]`)?.click();
1780
+ };
1781
+ window.onOculonHash = openView;
1782
+ const arrived = window.oculonInitialHash || decodeURIComponent(location.hash.slice(1));
1783
+ if (arrived) { openView(arrived); history.replaceState(null, '', location.pathname + location.search); }
1777
1784
  loadInbox().catch(() => {});
1778
1785
  if (!loaded.overview && !document.getElementById('tab-overview').hidden) { loaded.overview = true; loadOverview(); }
1779
1786
 
@@ -14,6 +14,12 @@
14
14
  <link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
15
15
  <link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&display=swap" rel="stylesheet">
16
16
  <style>
17
+ /* no sideways scrolling on phones: wide tables and code scroll inside their own boxes */
18
+ html,body{overflow-x:clip;max-width:100%}
19
+ .lm{display:inline-block;width:22px;height:22px;vertical-align:-4px;margin-right:12px}
20
+ .social{display:flex;gap:16px;align-items:center;margin-top:18px}.social a{color:#9fb0b4;display:inline-flex;transition:color .2s,transform .2s}.social a:hover{color:#00f0ff;transform:translateY(-2px)}.social svg{display:block}
21
+ .hero img.lm{position:static;left:auto;top:auto;transform:none;width:22px;filter:none;animation:none}
22
+ .logo{white-space:nowrap}
17
23
  :root{--bg:#000;--bg2:#060606;--line:#222;--line2:#1a1a1a;--text:#fff;--soft:#cfcfcf;--mut:#9a9a9a;--dim:#5e5e5e;--y:#00f0ff;--sans:'Space Grotesk',system-ui,sans-serif;--mono:'Space Mono',ui-monospace,Consolas,monospace;--pad:clamp(20px,4vw,60px)}
18
24
  *{box-sizing:border-box}html{scroll-behavior:smooth}
19
25
  body{margin:0;background:var(--bg);color:var(--text);font-family:var(--sans);-webkit-font-smoothing:antialiased;overflow-x:clip}
@@ -346,13 +352,13 @@ footer.sitefoot{border-top:1px solid rgba(255,255,255,.12);background:transparen
346
352
  <header class="hero">
347
353
  <img src="/assets/night-emea.jpg" alt="">
348
354
  <div class="tint"></div><div class="grid"></div><canvas id="herofx" aria-hidden="true"></canvas><div class="scan"></div><div class="shade"></div>
349
- <nav class="top"><div class="wrap"><a class="logo" href="/">OCULON</a>
350
- <div class="links"><a class="opt" href="#console">Console</a><!--onchain--><a class="opt" href="#robinhood">Robinhood Chain</a><!--/onchain--><a class="opt" href="#modules">Modules</a><a href="/docs">Docs</a><a class="btn o" href="/app" style="padding:9px 14px;font-size:13px">Open app</a></div></div></nav>
355
+ <nav class="top"><div class="wrap"><a class="logo" href="/"><img class="lm" src="/assets/logo.svg" alt="" width="22" height="22">OCULON</a>
356
+ <div class="links"><a class="opt" href="#console">Console</a><!--onchain--><a class="opt" href="#robinhood">Robinhood Chain</a><!--/onchain--><a class="opt" href="#modules">Modules</a><a class="opt" href="/ask">Analyst</a><a href="/docs">Docs</a><a class="btn o" href="/app" style="padding:9px 14px;font-size:13px">Open app</a></div></div></nav>
351
357
  <div class="lbl credit"><span class="y">●</span> SCAN <span id="clock">--:--:--</span> UTC<br><span id="scanning">NASA Black Marble · Europe · Africa · Asia</span></div>
352
358
  <div class="copy"><div class="wrap">
353
359
  <h1><span class="ln"><span>See</span></span><span class="ln"><span>everything.</span></span></h1>
354
360
  <div class="hin" style="padding-bottom:12px"><p>An open-source intelligence engine for the physical and digital world. <!--onchain-->Routing tables to shipping lanes to fresh pools on Robinhood Chain.<!--/onchain--><!--offchain-->Routing tables to shipping lanes to exploit catalogs and orbit.<!--/offchain--> Self-hosted, sourced, silent until it matters.</p>
355
- <div style="margin-top:26px;display:flex;gap:12px;flex-wrap:wrap"><a class="btn" href="/app">Open the app</a><span class="btn o"><span class="y">$</span> npm i -g oculon</span></div></div>
361
+ <div style="margin-top:26px;display:flex;gap:12px;flex-wrap:wrap"><a class="btn" href="/app">Open the app</a><a class="btn o" href="/ask">Ask the analyst</a><span class="btn o"><span class="y">$</span> npm i -g oculon</span></div></div>
356
362
  </div></div>
357
363
  </header>
358
364
 
@@ -480,7 +486,7 @@ footer.sitefoot{border-top:1px solid rgba(255,255,255,.12);background:transparen
480
486
  <div class="card"><div class="cmd">$ oculon case new "&lt;q&gt;"</div><h3>Case files</h3><div class="cd">A deep investigation with a citation on every finding, rerun on demand.</div><div class="src">All modules</div></div>
481
487
  <div class="card"><div class="cmd">$ oculon rewind &lt;date&gt;</div><h3>Time machine</h3><div class="cd">What Oculon would have seen on a past day, used to tune the radar.</div><div class="src">Archives · Wayback</div></div>
482
488
  <div class="card"><div class="cmd">$ oculon connect A to B</div><h3>How two things link</h3><div class="cd">Shortest path through companies, domains, repos and people.</div><div class="src">Evidence graph</div></div>
483
- <div class="card"><div class="cmd">$ oculon ask "&lt;q&gt;"</div><h3>An agent with every tool</h3><div class="cd">Ask in plain English; it picks modules and cites what it used.</div><div class="src">Free-tier LLMs first</div></div>
489
+ <div class="card"><div class="cmd">$ oculon ask "&lt;q&gt;"</div><h3>An agent with every tool</h3><div class="cd">Ask in plain English; it picks modules and cites what it used.</div><div class="src">Groq · Gemini · Mistral · Claude</div></div>
484
490
  </div>
485
491
  </section>
486
492
 
@@ -612,7 +618,7 @@ r.provenance <span class="d">// every source used</span></pre></div></div>
612
618
  <div class="faq">
613
619
  <details><summary>Does it cost anything?</summary><p>No. Oculon is MIT licensed. About 20 sources work with no key, and the rest use free tiers. A daily budget per source keeps usage inside those free limits.</p></details>
614
620
  <details><summary>Where does my data go?</summary><p>Into a local SQLite file in <code>~/.oculon</code>. Nothing is sent to the authors; there is no telemetry. Queries go only to the sources a command needs. See <a href="/privacy">Privacy</a>.</p></details>
615
- <details><summary>What do I need to run it?</summary><p>Node.js 22.13 or newer. <code>npm i -g oculon</code>, then <code>oculon tour</code> shows what your install can already do.</p></details>
621
+ <details><summary>What do I need to run it?</summary><p>Node.js 22.13 or newer. <code>npm i -g oculon</code>, then <code>oculon tour</code> shows what your install can already do. To try it without installing, use <code>npx oculon tour</code>.</p></details>
616
622
  <details><summary>Can my AI agent use it?</summary><p>Yes. Add <code>https://mcp.oculon.live</code> as a remote MCP server in Claude, Cursor or VS Code and its <span class="mcpn">71</span> tools are ready with nothing to install. <code>oculon mcp</code> runs the same server locally on stdio, and the TypeScript SDK returns the same result objects as the CLI.</p></details>
617
623
  <!--onchain--> <details><summary>Does Robinhood Chain need a key?</summary><p>No. Heron reads pool data from GeckoTerminal and contract data from Blockscout without keys.</p></details>
618
624
  <details><summary>Are the verdicts audits?</summary><p>No. Token and deployer verdicts are heuristics over pool and explorer data, and every verdict lists the reasons behind it so you can judge them.</p></details><!--/onchain-->
@@ -632,7 +638,7 @@ r.provenance <span class="d">// every source used</span></pre></div></div>
632
638
 
633
639
  <footer class="sitefoot"><div class="wrap">
634
640
  <div class="fgrid">
635
- <div class="fbrand"><a class="logo" href="/">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>
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>
636
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>
637
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>
638
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>
@@ -12,11 +12,15 @@
12
12
  <link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
13
13
  <link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&display=swap" rel="stylesheet">
14
14
  <style>
15
+ /* no sideways scrolling on phones: wide tables and code scroll inside their own boxes */
16
+ html,body{overflow-x:clip;max-width:100%}
17
+ .lm{display:inline-block;width:22px;height:22px;vertical-align:-4px;margin-right:12px}
18
+ .social{display:flex;gap:16px;align-items:center;margin-top:18px}.social a{color:#9fb0b4;display:inline-flex;transition:color .2s,transform .2s}.social a:hover{color:#00f0ff;transform:translateY(-2px)}.social svg{display:block}
15
19
  :root{--line:#222;--soft:#cfcfcf;--mut:#9a9a9a;--y:#00f0ff;--sans:'Space Grotesk',system-ui,sans-serif;--mono:'Space Mono',ui-monospace,Consolas,monospace}
16
20
  *{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:90px}
17
21
  body{margin:0;background:#000;color:#fff;font-family:var(--sans);-webkit-font-smoothing:antialiased;overflow-x:clip}
18
22
  a{color:inherit}
19
- header{position:sticky;top:0;z-index:5;background:rgba(0,0,0,.88);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}
23
+ header{position:sticky;top:0;z-index:5;background:#000;border-bottom:1px solid var(--line)}
20
24
  header .in{display:flex;align-items:center;justify-content:space-between;padding:18px clamp(20px,3vw,40px);gap:20px}
21
25
  .logo{font-size:17px;font-weight:600;letter-spacing:.4em;text-decoration:none}
22
26
  header nav{display:flex;gap:24px;font-size:14px}header nav a{text-decoration:none;color:var(--soft)}
@@ -36,7 +40,7 @@ footer a{color:var(--mut)}
36
40
  /* motion, shared with the landing page and docs */
37
41
  #liquidbg{position:fixed;inset:0;width:100%;height:100%;z-index:0;pointer-events:none;opacity:.36}
38
42
  header,main,footer{position:relative;z-index:1}
39
- header{position:sticky}
43
+ header{position:sticky;z-index:5}
40
44
  header::after{content:'';position:absolute;left:-30%;bottom:-1px;width:30%;height:1px;background:linear-gradient(90deg,transparent,var(--y),transparent);animation:hscan 6s linear infinite}
41
45
  @keyframes hscan{to{left:100%}}
42
46
  .logo{background:linear-gradient(90deg,#fff 40%,var(--y) 50%,#fff 60%);background-size:300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:shim 7s linear infinite}
@@ -78,7 +82,7 @@ footer{background:rgba(0,0,0,.6);backdrop-filter:blur(6px)}
78
82
  </style>
79
83
  </head>
80
84
  <body>
81
- <header><div class="in"><a class="logo" href="/">OCULON</a><nav><a href="/privacy" id="n-privacy">Privacy</a><a href="/terms" id="n-terms">Terms</a><a href="/docs">Docs</a></nav></div></header>
85
+ <header><div class="in"><a class="logo" href="/"><img class="lm" src="/assets/logo.svg" alt="" width="22" height="22">OCULON</a><nav><a href="/privacy" id="n-privacy">Privacy</a><a href="/terms" id="n-terms">Terms</a><a href="/docs">Docs</a></nav></div></header>
82
86
  <canvas id="liquidbg" aria-hidden="true"></canvas>
83
87
  <main>
84
88
  <article class="doc" id="privacy">
@@ -152,7 +156,7 @@ footer{background:rgba(0,0,0,.6);backdrop-filter:blur(6px)}
152
156
  <p>These terms ship with the software and may change between versions.</p>
153
157
  </article>
154
158
  </main>
155
- <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></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></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>
156
160
  <script src="/assets/fx.js"></script>
157
161
  <script>
158
162
  if (window.OculonFX) { OculonFX.liquid(document.getElementById('liquidbg'), { base: '#000000', mid: '#001a26', hi: '#00c8e0', intensity: 0.8, scale: 0.3 }); }
@@ -163,7 +167,7 @@ document.getElementById(`n-${which}`).classList.add('on');
163
167
  document.title = `Oculon ${which === 'terms' ? 'Terms' : 'Privacy'}`;
164
168
  document.getElementById('year').textContent = new Date().getFullYear();
165
169
  document.querySelectorAll('.doc.on h2, .doc.on p, .doc.on ul').forEach((el) => { if (el.closest('.sum') || el.closest('.glance')) return; el.classList.add('rv'); rvio.observe(el); });
166
- if (location.hash) setTimeout(() => document.getElementById(location.hash.slice(1))?.scrollIntoView(), 50);
170
+ // fx.js scrolls to a section handed over by a link.
167
171
 
168
172
  // Live card: the services this install actually called today, from its quota counters.
169
173
  fetch('/api/quota').then((r) => r.json()).then((q) => {
@@ -1,20 +1,44 @@
1
1
  {
2
2
  "name": "Oculon",
3
3
  "short_name": "Oculon",
4
- "description": "Open-source intelligence engine: signals, routing, exploits, ships, satellites and Robinhood Chain, with sources on every answer.",
4
+ "description": "Open-source intelligence engine: scams, links, claims, outages, vulnerabilities, travel risk and research, with sources on every answer.",
5
5
  "start_url": "/app",
6
6
  "scope": "/",
7
7
  "display": "standalone",
8
8
  "background_color": "#000000",
9
9
  "theme_color": "#000000",
10
10
  "icons": [
11
- { "src": "/assets/icon-192.png", "sizes": "192x192", "type": "image/png", "purpose": "any" },
12
- { "src": "/assets/icon-512.png", "sizes": "512x512", "type": "image/png", "purpose": "any" },
13
- { "src": "/assets/icon-maskable-512.png", "sizes": "512x512", "type": "image/png", "purpose": "maskable" }
11
+ {
12
+ "src": "/assets/icon-192.png",
13
+ "sizes": "192x192",
14
+ "type": "image/png",
15
+ "purpose": "any"
16
+ },
17
+ {
18
+ "src": "/assets/icon-512.png",
19
+ "sizes": "512x512",
20
+ "type": "image/png",
21
+ "purpose": "any"
22
+ },
23
+ {
24
+ "src": "/assets/icon-maskable-512.png",
25
+ "sizes": "512x512",
26
+ "type": "image/png",
27
+ "purpose": "maskable"
28
+ }
14
29
  ],
15
30
  "shortcuts": [
16
- { "name": "Overview", "url": "/app#overview" },
17
- { "name": "Robinhood Chain", "url": "/app#robinhood" },
18
- { "name": "Signal inbox", "url": "/app#inbox" }
31
+ {
32
+ "name": "Overview",
33
+ "url": "/app"
34
+ },
35
+ {
36
+ "name": "Analyst",
37
+ "url": "/ask"
38
+ },
39
+ {
40
+ "name": "Docs",
41
+ "url": "/docs"
42
+ }
19
43
  ]
20
44
  }
package/dist/web/mcp.html CHANGED
@@ -11,13 +11,17 @@
11
11
  <link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
12
12
  <link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600&family=Space+Mono:wght@400;700&display=swap" rel="stylesheet">
13
13
  <style>
14
+ /* no sideways scrolling on phones: wide tables and code scroll inside their own boxes */
15
+ html,body{overflow-x:clip;max-width:100%}
16
+ .lm{display:inline-block;width:22px;height:22px;vertical-align:-4px;margin-right:12px}
17
+ .social{display:flex;gap:16px;align-items:center;margin-top:18px}.social a{color:#9fb0b4;display:inline-flex;transition:color .2s,transform .2s}.social a:hover{color:#00f0ff;transform:translateY(-2px)}.social svg{display:block}
14
18
  :root{--bg:#000;--bg2:#060606;--line:#222;--text:#fff;--soft:#cfcfcf;--mut:#9a9a9a;--dim:#5e5e5e;--y:#00f0ff;--sans:'Space Grotesk',system-ui,sans-serif;--mono:'Space Mono',ui-monospace,Consolas,monospace}
15
19
  *{box-sizing:border-box}
16
20
  body{margin:0;background:var(--bg);color:var(--text);font-family:var(--sans);-webkit-font-smoothing:antialiased;overflow-x:clip}
17
21
  a{color:inherit}
18
22
  #liquidbg{position:fixed;inset:0;width:100%;height:100%;z-index:0;pointer-events:none;opacity:.3}
19
23
  header,main,footer{position:relative;z-index:1}
20
- header{position:sticky;top:0;z-index:5;background:rgba(0,0,0,.88);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}
24
+ header{position:sticky;top:0;z-index:5;background:#000;border-bottom:1px solid var(--line)}
21
25
  header .in{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px clamp(16px,3vw,40px);max-width:1100px;margin:0 auto}
22
26
  .logo{font-size:17px;font-weight:600;letter-spacing:.4em;text-decoration:none}
23
27
  .logo span{color:var(--y);letter-spacing:.2em;font-weight:400;margin-left:8px}
@@ -60,7 +64,7 @@ footer a{color:var(--soft)}
60
64
  </head>
61
65
  <body>
62
66
  <canvas id="liquidbg" aria-hidden="true"></canvas>
63
- <header><div class="in"><a class="logo" href="/">OCULON<span>MCP</span></a><nav><a class="opt" href="/docs#remote-mcp">Docs</a><a class="opt" href="https://github.com/oculonlive/oculon" target="_blank" rel="noopener">GitHub</a><a class="btn" href="/app">Open app</a></nav></div></header>
67
+ <header><div class="in"><a class="logo" href="/"><img class="lm" src="/assets/logo.svg" alt="" width="22" height="22">OCULON<span>MCP</span></a><nav><a class="opt" href="/docs#remote-mcp">Docs</a><a class="opt" href="https://github.com/oculonlive/oculon" target="_blank" rel="noopener">GitHub</a><a class="btn" href="/app">Open app</a></nav></div></header>
64
68
  <main>
65
69
  <div class="lbl live"><i></i>Remote MCP server · online</div>
66
70
  <h1>Oculon for your agent.<br>One URL, nothing to install.</h1>
@@ -88,7 +92,7 @@ footer a{color:var(--soft)}
88
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>
89
93
  </div>
90
94
  </main>
91
- <footer><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></footer>
92
96
  <script src="/assets/fx.js"></script>
93
97
  <script>
94
98
  if (window.OculonFX) { try { OculonFX.liquid(document.getElementById('liquidbg'), { base: '#000000', mid: '#001a26', hi: '#00c8e0', intensity: 0.8, scale: 0.3 }); } catch {} }
@@ -21,6 +21,25 @@ import { openApiSpec } from './openapi.js';
21
21
  import { randomBytes } from 'node:crypto';
22
22
  import { addPersonal, confirmEmail, emailStatus, listPersonal, personalAlerts, removeEmail, removePersonal, requestEmail, unsubscribeEmail } from '../modules/personal.js';
23
23
  import { mailEnabled } from '../sources/resend.js';
24
+ import { analyst, crossExamine, isAnalystModel } from '../analyst.js';
25
+ import { scrubSecrets } from '../core/keys.js';
26
+ /** Analyst questions and cross-examinations per visitor address per hour on a public install. */
27
+ const ANALYST_PER_HOUR = Number(process.env.OCULON_ANALYST_PER_HOUR ?? 40);
28
+ const analystHits = new Map();
29
+ function analystLimit(ip, now = Date.now()) {
30
+ const recent = (analystHits.get(ip) ?? []).filter((t) => now - t < 3600_000);
31
+ if (recent.length >= ANALYST_PER_HOUR) {
32
+ analystHits.set(ip, recent);
33
+ return false;
34
+ }
35
+ recent.push(now);
36
+ analystHits.set(ip, recent);
37
+ if (analystHits.size > 20_000)
38
+ for (const [k, v] of analystHits)
39
+ if (!v.some((t) => now - t < 3600_000))
40
+ analystHits.delete(k);
41
+ return true;
42
+ }
24
43
  const HERE = dirname(fileURLToPath(import.meta.url));
25
44
  const slim = (r) => ({ module: r.module, input: r.input, generatedAt: r.generatedAt, result: r.result, signals: r.signals, provenance: summarizeProvenance(r.provenance) });
26
45
  function need(q, key, max = 200) {
@@ -439,12 +458,16 @@ export function renderPage(html, domain) {
439
458
  let out = on ? drop('offchain')(html) : drop('onchain')(html);
440
459
  // the markers themselves are not needed once the blocks are resolved
441
460
  out = out.replace(/<!--\/?(on|off)chain-->/g, '').replace(/\/\*\/?(on|off)chain\*\//g, '');
461
+ // Docs sections are addresses, not #fragments: /docs#install becomes /docs/install (docs.<domain>/install below).
462
+ if (!domain)
463
+ out = out.replace(/href="\/docs#([a-z0-9-]+)"/g, 'href="/docs/$1"');
442
464
  if (domain) {
443
465
  const main = `https://${domain}`;
444
466
  out = out
445
467
  .replace(/href="\/app(#[^"]*)?"/g, (_m, h) => `href="https://app.${domain}/${h ?? ''}"`)
446
468
  .replace(/href="\/report"/g, `href="https://app.${domain}/report"`)
447
- .replace(/href="\/docs(#[^"]*)?"/g, (_m, h) => `href="https://docs.${domain}/${h ?? ''}"`)
469
+ .replace(/href="\/ask"/g, `href="https://${domain}/ask"`)
470
+ .replace(/href="\/docs(?:#([^"]*))?"/g, (_m, h) => `href="https://docs.${domain}/${h ?? ''}"`)
448
471
  .replace(/href="\/(privacy|terms)(#[^"]*)?"/g, (_m, p, h) => `href="${main}/${p}${h ?? ''}"`)
449
472
  .replace(/href="\/"/g, `href="${main}/"`);
450
473
  }
@@ -464,7 +487,7 @@ export function createWebServer(opts = {}) {
464
487
  const oculon = opts.oculon ?? new Oculon();
465
488
  const log = opts.log ?? (() => { });
466
489
  // Pages are small and read per request, so edits to them show up without a restart.
467
- const PAGE_FILES = { app: 'index.html', landing: 'landing.html', docs: 'docs.html', legal: 'legal.html' };
490
+ const PAGE_FILES = { app: 'index.html', landing: 'landing.html', docs: 'docs.html', legal: 'legal.html', ask: 'ask.html' };
468
491
  const publicMode = Boolean(opts.publicMode);
469
492
  const adminToken = opts.adminToken ?? (process.env.OCULON_ADMIN_TOKEN?.trim() || undefined);
470
493
  const limiter = new RateLimiter();
@@ -584,7 +607,7 @@ export function createWebServer(opts = {}) {
584
607
  if (req.method === 'POST')
585
608
  return send(res, ok ? 200 : 404, '{}', 'application/json');
586
609
  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.';
587
- 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">◉ 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');
610
+ 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');
588
611
  }
589
612
  if (url.pathname === '/api/my' || url.pathname.startsWith('/api/my/')) {
590
613
  if (!admin)
@@ -616,6 +639,57 @@ export function createWebServer(opts = {}) {
616
639
  return send(res, e instanceof HttpError ? e.status : 400, JSON.stringify({ error: e.message }), 'application/json; charset=utf-8');
617
640
  }
618
641
  }
642
+ // Oculon Analyst (/ask): the brief streams as server-sent events; cross-examination is a plain JSON call.
643
+ if (url.pathname === '/api/analyst' || url.pathname === '/api/analyst/review') {
644
+ if (req.method !== 'POST')
645
+ return send(res, 405, '{"error":"method not allowed"}', 'application/json');
646
+ if (!admin)
647
+ return send(res, 403, '{"error":"the analyst is not public on this install"}', 'application/json');
648
+ if (!sameSite())
649
+ return send(res, 403, '{"error":"forbidden"}', 'application/json');
650
+ const ip = (viaEdge && String(req.headers['x-oculon-client-ip'] ?? '').trim()) || clientIp(req);
651
+ if (publicMode && !isAdmin(req, adminToken) && !analystLimit(ip))
652
+ return send(res, 429, '{"error":"You have asked a lot this hour. Try again a bit later."}', 'application/json');
653
+ let body;
654
+ try {
655
+ body = await readJson(req, 20_000);
656
+ }
657
+ catch (e) {
658
+ return send(res, e instanceof HttpError ? e.status : 400, JSON.stringify({ error: e.message }), 'application/json');
659
+ }
660
+ if (url.pathname === '/api/analyst/review') {
661
+ try {
662
+ const out = await crossExamine(String(body.id ?? ''));
663
+ log('analyst review');
664
+ return send(res, 200, JSON.stringify(out), 'application/json; charset=utf-8');
665
+ }
666
+ catch (e) {
667
+ return send(res, 400, JSON.stringify({ error: e.message }), 'application/json; charset=utf-8');
668
+ }
669
+ }
670
+ const question = String(body.q ?? '').trim();
671
+ if (question.length < 3 || question.length > 600)
672
+ return send(res, 400, '{"error":"ask in 3-600 characters"}', 'application/json');
673
+ const model = isAnalystModel(body.model) ? body.model : 'haiku';
674
+ const history = (Array.isArray(body.history) ? body.history : []).slice(-4).map((h) => ({ q: String(h.q ?? '').slice(0, 500), a: String(h.a ?? '').slice(0, 700) })).filter((h) => h.q);
675
+ res.writeHead(200, { 'content-type': 'text/event-stream; charset=utf-8', 'cache-control': 'no-cache, no-transform', 'x-accel-buffering': 'no', connection: 'keep-alive' });
676
+ const write = (e) => { if (!res.writableEnded)
677
+ res.write(`data: ${JSON.stringify(e)}\n\n`); };
678
+ const ping = setInterval(() => { if (!res.writableEnded)
679
+ res.write(': keep-alive\n\n'); }, 15_000);
680
+ log(`analyst ${model}: ${question.slice(0, 60)}`);
681
+ try {
682
+ await analyst(oculon, { question, model, history, onEvent: write });
683
+ }
684
+ catch (e) {
685
+ write({ type: 'error', message: scrubSecrets(e.message).slice(0, 300) });
686
+ }
687
+ finally {
688
+ clearInterval(ping);
689
+ res.end();
690
+ }
691
+ return;
692
+ }
619
693
  // On an open public install every visitor may use the app, but the shared watchlist, fences and the
620
694
  // install's monitors are changed only by the owner (signed in with OCULON_ADMIN_TOKEN).
621
695
  const owner = !publicMode || isAdmin(req, adminToken);
@@ -678,7 +752,16 @@ export function createWebServer(opts = {}) {
678
752
  }
679
753
  // Pages: landing at /, dashboard at /app, docs at /docs. On app.* and docs.* hosts the root serves that page.
680
754
  const sub = hostName.split('.')[0];
681
- const page = url.pathname === '/' ? (sub === 'app' ? 'app' : sub === 'docs' ? 'docs' : 'landing') : url.pathname === '/app' || url.pathname === '/app/' || url.pathname === '/index.html' ? 'app' : url.pathname === '/docs' || url.pathname === '/docs/' ? 'docs' : /^\/(privacy|terms)\/?$/.test(url.pathname) ? 'legal' : null;
755
+ // Docs sections have their own addresses: docs.<domain>/install, or /docs/install on a single host.
756
+ 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];
757
+ if (docsSection && !['api', 'assets', 'app', 'report', 'r', 'proof', 'ask'].includes(docsSection)) {
758
+ if (siteDomain && sub !== 'docs') {
759
+ res.writeHead(301, { location: `https://docs.${siteDomain}/${docsSection}${url.search}`, 'cache-control': 'no-store' });
760
+ return res.end();
761
+ }
762
+ return send(res, 200, renderPage(readFileSync(join(HERE, PAGE_FILES.docs), 'utf8'), siteDomain && hostName.endsWith(siteDomain) ? siteDomain : null), 'text/html; charset=utf-8');
763
+ }
764
+ const page = url.pathname === '/' ? (sub === 'app' ? 'app' : sub === 'docs' ? 'docs' : 'landing') : url.pathname === '/app' || url.pathname === '/app/' || url.pathname === '/index.html' ? 'app' : url.pathname === '/docs' || url.pathname === '/docs/' ? 'docs' : /^\/(privacy|terms)\/?$/.test(url.pathname) ? 'legal' : /^\/ask\/?$/.test(url.pathname) && sub !== 'docs' ? 'ask' : null;
682
765
  if (page) {
683
766
  // On the public domain, /app and /docs live on their own subdomains.
684
767
  if (siteDomain && hostName === siteDomain && (page === 'app' || page === 'docs') && url.pathname !== '/') {