oculon 0.1.2 → 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.
@@ -0,0 +1,410 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
6
+ <meta name="theme-color" content="#000000">
7
+ <link rel="icon" type="image/png" href="/favicon.ico">
8
+ <link rel="apple-touch-icon" href="/assets/icon-192.png">
9
+ <title>Oculon Analyst</title>
10
+ <meta name="description" content="Ask a question; Oculon checks live public data, then answers with a brief: bottom line, confidence, cited findings, and a cross-examination by other models.">
11
+ <meta property="og:type" content="website"><meta property="og:site_name" content="Oculon"><meta property="og:title" content="Oculon Analyst"><meta property="og:description" content="Ask anything. It checks live public data first, then answers with a cited brief you can cross-examine."><meta property="og:image" content="https://oculon.live/assets/og.png"><meta property="og:image:width" content="1200"><meta property="og:image:height" content="630"><meta name="twitter:card" content="summary_large_image"><meta name="twitter:image" content="https://oculon.live/assets/og.png">
12
+ <link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
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
+ <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
+ :root{--bg:#000;--panel:rgba(5,9,10,.86);--line:#1c2629;--line2:#263438;--text:#f2f6f7;--soft:#c9d3d5;--mut:#8b9a9e;--dim:#56666a;--y:#00f0ff;--ok:#3ddc97;--warn:#ffc857;--bad:#ff5d6c;--sans:'Space Grotesk',system-ui,sans-serif;--mono:'Space Mono',ui-monospace,Consolas,monospace}
19
+ *{box-sizing:border-box}
20
+ body{margin:0;background:var(--bg);color:var(--text);font-family:var(--sans);-webkit-font-smoothing:antialiased;min-height:100vh}
21
+ a{color:inherit}
22
+ button{font:inherit;color:inherit}
23
+ #liquidbg{position:fixed;inset:0;width:100%;height:100%;z-index:0;pointer-events:none;opacity:.34}
24
+ header,main,.dock{position:relative;z-index:1}
25
+ header{position:sticky;top:0;z-index:20;background:#000;border-bottom:1px solid var(--line)}
26
+ header .in{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px clamp(16px,3vw,36px);max-width:1180px;margin:0 auto}
27
+ .logo{font-size:17px;font-weight:600;letter-spacing:.4em;text-decoration:none}
28
+ .logo span{color:var(--y);letter-spacing:.22em;font-weight:400;margin-left:8px}
29
+ header nav{display:flex;gap:20px;align-items:center;font-size:14px}
30
+ header nav a{text-decoration:none;color:var(--soft)}
31
+ header nav .btn{background:var(--y);color:#001418;padding:8px 13px;font-weight:600}
32
+ @media (max-width:560px){header nav .opt{display:none}}
33
+ .lbl{font:11.5px var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--mut)}
34
+ main{max-width:880px;margin:0 auto;padding:40px clamp(16px,3vw,28px) 260px}
35
+
36
+ /* intro */
37
+ .intro h1{margin:14px 0 14px;font-size:clamp(36px,6.4vw,64px);font-weight:300;letter-spacing:-.04em;line-height:1.02}
38
+ .intro h1 em{font-style:normal;color:var(--y)}
39
+ .intro p{font-size:clamp(16px,2vw,19px);line-height:1.6;color:var(--soft);font-weight:300;max-width:660px;margin:0}
40
+ .how{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:30px 0 8px}
41
+ .how div{border:1px solid var(--line);background:var(--panel);padding:14px}
42
+ .how b{display:block;font:11px var(--mono);color:var(--y);letter-spacing:.12em;margin-bottom:6px}
43
+ .how span{font-size:14px;line-height:1.45;color:var(--soft)}
44
+ @media (max-width:720px){.how{grid-template-columns:repeat(2,minmax(0,1fr))}}
45
+ .examples{display:flex;flex-wrap:wrap;gap:8px;margin-top:22px}
46
+ .chip{border:1px solid var(--line2);background:rgba(0,0,0,.55);padding:9px 12px;font-size:14px;color:var(--soft);cursor:pointer;text-align:left;line-height:1.35}
47
+ .chip:hover{border-color:var(--y);color:#fff}
48
+
49
+ /* thread */
50
+ .turn{margin-top:46px}
51
+ .q{display:flex;gap:12px;align-items:baseline;font-size:clamp(19px,2.6vw,24px);font-weight:400;line-height:1.35;letter-spacing:-.01em}
52
+ .q .lbl{flex:none;color:var(--y)}
53
+ .trace{margin-top:16px;border:1px solid var(--line);background:var(--panel);display:grid;grid-template-columns:118px minmax(0,1fr);gap:0}
54
+ .radar{border-right:1px solid var(--line);display:grid;place-items:center;padding:14px}
55
+ .radar svg{width:86px;height:86px}
56
+ .sweep{transform-origin:50px 50px;animation:sweep 2.4s linear infinite}
57
+ .trace.done .sweep{animation:none;opacity:0}
58
+ @keyframes sweep{to{transform:rotate(360deg)}}
59
+ .blip{fill:var(--y);opacity:0;animation:blip 1.6s ease-out forwards}
60
+ @keyframes blip{0%{opacity:1;r:4}100%{opacity:.55;r:2.2}}
61
+ .steps{list-style:none;margin:0;padding:10px 14px;min-width:0}
62
+ .steps li{display:grid;grid-template-columns:16px minmax(0,1fr) auto;gap:10px;align-items:baseline;padding:7px 0;border-bottom:1px dashed #152023;font-size:14px}
63
+ .steps li:last-child{border-bottom:0}
64
+ .steps .st{font:12px var(--mono);color:var(--mut)}
65
+ .steps .st.ok{color:var(--ok)}.steps .st.err{color:var(--bad)}
66
+ .steps .nm{color:#fff;overflow-wrap:anywhere}.steps .nm small{display:block;color:var(--dim);font:11.5px var(--mono);margin-top:2px;overflow-wrap:anywhere}
67
+ .steps .meta{font:11.5px var(--mono);color:var(--mut);white-space:nowrap}
68
+ .spin{display:inline-block;width:10px;height:10px;border:1.5px solid var(--y);border-right-color:transparent;border-radius:50%;animation:sp .8s linear infinite}
69
+ @keyframes sp{to{transform:rotate(360deg)}}
70
+ .thinking{padding:10px 14px;font:12px var(--mono);color:var(--mut)}
71
+ .thinking i{color:var(--y);font-style:normal}
72
+ @media (max-width:560px){.trace{grid-template-columns:1fr}.radar{border-right:0;border-bottom:1px solid var(--line);padding:10px}.radar svg{width:64px;height:64px}}
73
+
74
+ /* brief */
75
+ .brief{margin-top:14px;border:1px solid var(--line2);background:rgba(3,7,8,.92);position:relative}
76
+ .brief::before{content:'';position:absolute;left:-1px;top:-1px;width:56px;height:2px;background:var(--y)}
77
+ .bhead{display:flex;flex-wrap:wrap;gap:8px 16px;justify-content:space-between;padding:14px 20px;border-bottom:1px solid var(--line)}
78
+ .bbody{padding:20px}
79
+ .brief h2{margin:0 0 10px;font-size:clamp(22px,3.4vw,30px);font-weight:500;letter-spacing:-.02em;line-height:1.2}
80
+ .bl{font-size:clamp(17px,2.2vw,19px);line-height:1.6;color:var(--soft);margin:0}
81
+ .conf{display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px 16px;align-items:center;margin:20px 0 4px;padding:14px 16px;border:1px solid var(--line);background:rgba(0,0,0,.5)}
82
+ .conf .num{font:700 30px var(--mono);line-height:1}
83
+ .conf .bar{height:6px;background:#11191b;position:relative;overflow:hidden}
84
+ .conf .bar i{position:absolute;inset:0 auto 0 0;width:0;transition:width 1s cubic-bezier(.2,.8,.2,1)}
85
+ .conf .why{grid-column:1/-1;font-size:14px;line-height:1.5;color:var(--mut);margin:4px 0 0}
86
+ .conf .lv{font:11.5px var(--mono);letter-spacing:.12em;text-transform:uppercase;margin-bottom:6px}
87
+ .sec{margin-top:22px}
88
+ .sec h3{font:11.5px var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--mut);margin:0 0 10px;font-weight:400}
89
+ .findings{list-style:none;margin:0;padding:0;counter-reset:f}
90
+ .findings li{display:grid;grid-template-columns:30px minmax(0,1fr);gap:10px;padding:11px 0;border-top:1px solid #121b1d}
91
+ .findings li:first-child{border-top:0}
92
+ .findings .ix{font:12px var(--mono);color:var(--y);padding-top:3px}
93
+ .findings p{margin:0;font-size:16px;line-height:1.6;color:#e7eeef}
94
+ .cite{display:inline-block;font:11px var(--mono);color:var(--y);border:1px solid #0f3c40;background:#031416;padding:0 5px;margin-left:4px;cursor:pointer;vertical-align:1px;text-decoration:none}
95
+ .cite:hover{background:var(--y);color:#001418}
96
+ .verdicts{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}
97
+ .vd{font:11px var(--mono);padding:2px 7px;border:1px solid}
98
+ .vd.supported{color:var(--ok);border-color:#1d5a42}.vd.partly{color:var(--warn);border-color:#5d4a1c}.vd.unsupported{color:var(--bad);border-color:#5e2128}
99
+ .two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
100
+ .two>div{border:1px solid var(--line);padding:14px;background:rgba(0,0,0,.4)}
101
+ .two ul{margin:0;padding-left:18px}.two li,.two p{font-size:14.5px;line-height:1.55;color:var(--soft);margin:0 0 4px}
102
+ @media (max-width:640px){.two{grid-template-columns:1fr}}
103
+ .srcs{list-style:none;margin:0;padding:0}
104
+ .srcs li{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:10px;align-items:baseline;padding:7px 6px;border-top:1px solid #121b1d;font-size:14px}
105
+ .srcs li.hl{background:#04262a;outline:1px solid var(--y)}
106
+ .srcs .n{font:12px var(--mono);color:var(--y)}
107
+ .srcs .t{overflow-wrap:anywhere;color:var(--soft)}.srcs .t a{color:#fff;text-decoration-color:var(--y);text-underline-offset:3px}
108
+ .srcs .t small{color:var(--dim);font:11.5px var(--mono);margin-left:6px}
109
+ .pill{font:10.5px var(--mono);letter-spacing:.08em;padding:1px 6px;border:1px solid var(--line2);color:var(--mut);white-space:nowrap}
110
+ .pill.LIVE{color:var(--ok);border-color:#1d5a42}.pill.CACHED{color:var(--y);border-color:#0f3c40}.pill.ERROR,.pill.UNAVAILABLE{color:var(--bad);border-color:#5e2128}
111
+ .more{background:none;border:0;color:var(--mut);font:12px var(--mono);cursor:pointer;padding:8px 6px}
112
+ .actions{display:flex;flex-wrap:wrap;gap:8px;padding:16px 20px;border-top:1px solid var(--line)}
113
+ .act{border:1px solid var(--line2);background:#000;padding:10px 14px;font-size:14px;cursor:pointer;color:#fff}
114
+ .act:hover{border-color:var(--y)}
115
+ .act.primary{background:var(--y);color:#001418;border-color:var(--y);font-weight:600}
116
+ .act[disabled]{opacity:.55;cursor:default}
117
+ .review{margin:0 20px 18px;border:1px solid var(--line);padding:14px 16px;background:rgba(0,0,0,.45)}
118
+ .review p{margin:4px 0;font-size:14.5px;line-height:1.55;color:var(--soft)}
119
+ .review b{color:#fff;font-weight:500}
120
+ .follow{display:flex;flex-wrap:wrap;gap:8px;padding:0 20px 20px}
121
+ .plan{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:12px 14px 4px}
122
+ .plan .lbl{color:var(--y);margin-right:4px}
123
+ .plan .part{display:inline-flex;align-items:baseline;gap:6px;border:1px solid var(--line2);padding:3px 8px;font-size:13px;color:var(--soft);line-height:1.35}
124
+ .plan .part b{font:11px var(--mono);color:var(--y)}
125
+ .details{margin-top:16px;padding:14px 16px;border-left:2px solid var(--y);background:rgba(0,240,255,.03)}
126
+ .details p,.details li{font-size:15.5px;line-height:1.65;color:#dfe8e9;margin:0 0 8px}
127
+ .details ul{margin:0 0 8px;padding-left:20px}
128
+ .details p:last-child,.details ul:last-child{margin-bottom:0}
129
+ .err{margin-top:14px;border:1px solid #5e2128;background:#140507;padding:14px 16px;color:#ffc9ce;font-size:15px;line-height:1.5}
130
+
131
+ /* dock */
132
+ .dock{position:fixed;left:0;right:0;bottom:0;z-index:30;background:linear-gradient(180deg,transparent,#000 22%);padding:26px clamp(12px,3vw,28px) calc(14px + env(safe-area-inset-bottom))}
133
+ .dock .in{max-width:880px;margin:0 auto}
134
+ .models{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:8px;max-width:560px}
135
+ .model{border:1px solid var(--line2);background:rgba(0,0,0,.8);padding:7px 10px;cursor:pointer;text-align:left;line-height:1.2;min-width:0}
136
+ .model b{display:block;font-size:13.5px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
137
+ @media (max-width:480px){.model{padding:6px 8px}.model b{font-size:12.5px}.model small{font-size:9.5px}.dock{padding-top:18px}}
138
+ .model small{font:10.5px var(--mono);color:var(--mut);letter-spacing:.06em;text-transform:uppercase}
139
+ .model[aria-pressed="true"]{border-color:var(--y);background:#021a1d}
140
+ .model[aria-pressed="true"] small{color:var(--y)}
141
+ .box{display:flex;align-items:flex-end;gap:8px;border:1px solid var(--y);background:#020b0c;padding:8px 8px 8px 14px;box-shadow:0 0 0 4px rgba(0,240,255,.06)}
142
+ .box .pr{font:13px var(--mono);color:var(--y);padding-bottom:9px}
143
+ .box textarea{flex:1;min-width:0;resize:none;border:0;outline:0;background:transparent;color:#fff;font:16px/1.5 var(--sans);max-height:160px;padding:6px 0}
144
+ .box textarea::placeholder{color:var(--dim)}
145
+ .send{background:var(--y);color:#001418;border:0;padding:10px 16px;font-weight:600;cursor:pointer}
146
+ .send[disabled]{opacity:.5;cursor:default}
147
+ .dockfoot{display:flex;justify-content:space-between;gap:10px;margin-top:7px;font:11px var(--mono);color:var(--dim)}
148
+ .dockfoot button{background:none;border:0;color:var(--mut);font:11px var(--mono);cursor:pointer;padding:0}
149
+ </style>
150
+ </head>
151
+ <body>
152
+ <canvas id="liquidbg" aria-hidden="true"></canvas>
153
+ <header><div class="in"><a class="logo" href="/"><img class="lm" src="/assets/logo.svg" alt="" width="22" height="22">OCULON<span>ANALYST</span></a><nav><a class="opt" href="/docs">Docs</a><a class="opt" href="/mcp">MCP</a><a class="btn" href="/app">Open app</a></nav></div></header>
154
+ <main>
155
+ <section class="intro" id="intro">
156
+ <div class="lbl"><span style="color:var(--y)">●</span> Analyst desk · checks live public data before it answers</div>
157
+ <h1>Ask anything.<br>Get a <em>brief</em>, not a guess.</h1>
158
+ <p>About Oculon, about the world, or anything else. It splits your question into parts, checks each one against live sources (outages, vulnerabilities, quakes, flights, scams, papers, news) or searches and reads the web, then writes a brief: the bottom line, how sure it is, each finding with its source, and what it could not see. Then let other models cross-examine it.</p>
159
+ <div class="how">
160
+ <div><b>01 · CHECK</b><span>Live tools run first; you watch every source it touches.</span></div>
161
+ <div><b>02 · BRIEF</b><span>Bottom line, confidence 0-100 and numbered citations.</span></div>
162
+ <div><b>03 · CROSS-EXAMINE</b><span>Two other models judge each finding against the same evidence.</span></div>
163
+ <div><b>04 · WATCH</b><span>Turn any answer into a monitor that tells you when it changes.</span></div>
164
+ </div>
165
+ <div class="examples" id="examples">
166
+ <button class="chip" type="button">Is there an internet outage in Iran right now?</button>
167
+ <button class="chip" type="button">Is paypa1-secure-login.top safe to open?</button>
168
+ <button class="chip" type="button">Any critical CVEs for nginx this month?</button>
169
+ <button class="chip" type="button">What is the travel risk for Bangkok this week?</button>
170
+ <button class="chip" type="button">Is this a scam: "Your package is on hold, pay the $1.99 customs fee today"</button>
171
+ <button class="chip" type="button">Were there strong earthquakes near Japan in the last 48 hours?</button>
172
+ <button class="chip" type="button">How do I connect Oculon to Claude, and what can it do there?</button>
173
+ <button class="chip" type="button">What caused the 2003 Northeast blackout, and could it happen again?</button>
174
+ </div>
175
+ </section>
176
+ <div id="thread"></div>
177
+ </main>
178
+ <div class="dock">
179
+ <div class="in">
180
+ <div class="models" id="models" role="group" aria-label="Model">
181
+ <button class="model" type="button" data-m="haiku" aria-pressed="true"><b>Haiku 5.5</b><small>fast</small></button>
182
+ <button class="model" type="button" data-m="opus" aria-pressed="false"><b>Opus 5.5</b><small>thorough</small></button>
183
+ <button class="model" type="button" data-m="gpt" aria-pressed="false"><b>GPT-6.2 Astra</b><small>second view</small></button>
184
+ </div>
185
+ <form class="box" id="form"><span class="pr">&gt;</span><textarea id="q" rows="1" maxlength="600" placeholder="Ask about an event, a link, a place, a vulnerability, a message…" aria-label="Your question"></textarea><button class="send" id="send" type="submit">Ask</button></form>
186
+ <div class="dockfoot"><span id="hint">Enter to ask · Shift+Enter for a new line</span><button type="button" id="clear">New session</button></div>
187
+ </div>
188
+ </div>
189
+ <script src="/assets/fx.js"></script>
190
+ <script>
191
+ if (window.OculonFX) { try { OculonFX.liquid(document.getElementById('liquidbg'), { base: '#000000', mid: '#001a26', hi: '#00c8e0', intensity: 0.8, scale: 0.3 }); } catch {} }
192
+ const $ = (id) => document.getElementById(id);
193
+ const esc = (s) => String(s ?? '').replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' })[c]);
194
+ const MODELS = { haiku: 'Claude Haiku 5.5', opus: 'Claude Opus 5.5', gpt: 'GPT-6.2 Astra' };
195
+ const store = { get(k, d) { try { const v = localStorage.getItem(k); return v ? JSON.parse(v) : d; } catch { return d; } }, set(k, v) { try { localStorage.setItem(k, JSON.stringify(v)); } catch {} } };
196
+ let model = store.get('oculon.analyst.model', 'haiku');
197
+ let turns = store.get('oculon.analyst.turns', []);
198
+ let busy = false;
199
+
200
+ /* model picker */
201
+ const pick = (m) => { model = MODELS[m] ? m : 'haiku'; store.set('oculon.analyst.model', model); document.querySelectorAll('.model').forEach((b) => b.setAttribute('aria-pressed', String(b.dataset.m === model))); };
202
+ document.querySelectorAll('.model').forEach((b) => b.addEventListener('click', () => pick(b.dataset.m)));
203
+ pick(model);
204
+
205
+ /* composer */
206
+ const q = $('q');
207
+ const grow = () => { q.style.height = 'auto'; q.style.height = Math.min(160, q.scrollHeight) + 'px'; };
208
+ q.addEventListener('input', grow);
209
+ q.addEventListener('keydown', (e) => { if (e.key === 'Enter' && !e.shiftKey) { e.preventDefault(); $('form').requestSubmit(); } });
210
+ $('form').addEventListener('submit', (e) => { e.preventDefault(); const text = q.value.trim(); if (text.length >= 3 && !busy) { q.value = ''; grow(); askQuestion(text); } });
211
+ $('examples').addEventListener('click', (e) => { const c = e.target.closest('.chip'); if (c && !busy) askQuestion(c.textContent.trim()); });
212
+ $('clear').addEventListener('click', () => { if (busy) return; turns = []; store.set('oculon.analyst.turns', turns); $('thread').innerHTML = ''; $('intro').hidden = false; scrollTo({ top: 0, behavior: 'smooth' }); });
213
+
214
+ /* radar: a sweep, and a blip for every source found */
215
+ const radarSvg = () => `<svg viewBox="0 0 100 100" aria-hidden="true"><defs><linearGradient id="sw" x1="0" x2="1"><stop offset="0" stop-color="#00f0ff" stop-opacity="0"/><stop offset="1" stop-color="#00f0ff" stop-opacity=".55"/></linearGradient></defs>
216
+ <circle cx="50" cy="50" r="46" fill="none" stroke="#1c2629"/><circle cx="50" cy="50" r="30" fill="none" stroke="#162023"/><circle cx="50" cy="50" r="14" fill="none" stroke="#162023"/>
217
+ <line x1="4" y1="50" x2="96" y2="50" stroke="#121a1c"/><line x1="50" y1="4" x2="50" y2="96" stroke="#121a1c"/>
218
+ <path class="sweep" d="M50 50 L50 4 A46 46 0 0 1 89.8 27 Z" fill="url(#sw)"/><g class="blips"></g><circle cx="50" cy="50" r="2" fill="#00f0ff"/></svg>`;
219
+ const addBlip = (svg, i) => { const a = (i * 137.5) * Math.PI / 180, r = 12 + ((i * 29) % 32); const c = document.createElementNS('http://www.w3.org/2000/svg', 'circle'); c.setAttribute('cx', (50 + r * Math.cos(a)).toFixed(1)); c.setAttribute('cy', (50 + r * Math.sin(a)).toFixed(1)); c.setAttribute('r', '3'); c.setAttribute('class', 'blip'); svg.querySelector('.blips').appendChild(c); };
220
+
221
+ const level = (c) => c >= 75 ? ['High', 'var(--ok)'] : c >= 45 ? ['Moderate', 'var(--warn)'] : ['Low', 'var(--bad)'];
222
+ /* the analyst's plan: the parts it split the question into */
223
+ const planHtml = (parts) => parts && parts.length ? `<div class="plan"><span class="lbl">Plan</span>${parts.map((p, i) => `<span class="part"><b>${i + 1}</b>${esc(p)}</span>`).join('')}</div>` : '';
224
+ /* details: short paragraphs and "- " bullets, with [n] citations made clickable */
225
+ function detailsHtml(text) {
226
+ const cite = (s) => esc(s).replace(/\[(\d{1,3})\]/g, (_, n) => `<a class="cite" data-n="${n}" href="#">${n}</a>`);
227
+ const out = []; let list = [];
228
+ const flush = () => { if (list.length) { out.push(`<ul>${list.map((l) => `<li>${cite(l)}</li>`).join('')}</ul>`); list = []; } };
229
+ for (const line of String(text).split(/\n+/)) {
230
+ const l = line.trim(); if (!l) continue;
231
+ if (/^[-*•]\s+/.test(l) || /^\d+[.)]\s+/.test(l)) list.push(l.replace(/^([-*•]|\d+[.)])\s+/, ''));
232
+ else { flush(); out.push(`<p>${cite(l)}</p>`); }
233
+ }
234
+ flush();
235
+ return out.join('');
236
+ }
237
+
238
+ /* one brief */
239
+ function renderBrief(t) {
240
+ const b = t.brief, src = t.sources || [];
241
+ const [lv, color] = level(b.confidence);
242
+ const live = src.filter((s) => s.status === 'LIVE').length;
243
+ const cites = (ns) => (ns || []).map((n) => `<a class="cite" data-n="${n}" href="#">${n}</a>`).join('');
244
+ const srcRow = (s) => `<li data-n="${s.n}"><span class="n">[${s.n}]</span><span class="t">${s.url ? `<a href="${esc(s.url)}" target="_blank" rel="noopener">${esc(s.label)}</a>` : esc(s.label)}<small>${esc(s.kind === 'feed' ? 'data feed' : s.host || '')}</small></span>${s.status ? `<span class="pill ${esc(s.status)}">${esc(s.status)}</span>` : '<span></span>'}</li>`;
245
+ const cited = new Set(b.findings.flatMap((f) => f.sources));
246
+ const first = src.filter((s) => cited.has(s.n)), rest = src.filter((s) => !cited.has(s.n));
247
+ const others = Object.keys(MODELS).filter((m) => m !== t.model).map((m) => MODELS[m]).join(' + ');
248
+ return `<article class="brief" data-id="${esc(t.id)}">
249
+ <div class="bhead"><span class="lbl">Brief · ${esc(MODELS[t.model] || t.model)}</span><span class="lbl">${src.length} sources · ${live} live · ${Math.round((t.ms || 0) / 1000)}s</span></div>
250
+ <div class="bbody">
251
+ ${b.headline ? `<h2>${esc(b.headline)}</h2>` : ''}
252
+ <p class="bl">${esc(b.bottomLine)}</p>
253
+ ${b.details ? `<div class="details">${detailsHtml(b.details)}</div>` : ''}
254
+ <div class="conf"><div class="num" style="color:${color}">${b.confidence}</div><div><div class="lv" style="color:${color}">${lv} confidence</div><div class="bar"><i style="background:${color}" data-w="${b.confidence}"></i></div></div>${b.confidenceWhy ? `<p class="why">${esc(b.confidenceWhy)}</p>` : ''}</div>
255
+ ${b.findings.length ? `<div class="sec"><h3>Findings</h3><ol class="findings">${b.findings.map((f, i) => `<li data-i="${i}"><span class="ix">${String(i + 1).padStart(2, '0')}</span><div><p>${esc(f.text)}${cites(f.sources)}</p><div class="verdicts"></div></div></li>`).join('')}</ol></div>` : ''}
256
+ ${b.unknowns.length || b.changeMyMind ? `<div class="sec two">${b.unknowns.length ? `<div><h3 class="lbl" style="margin:0 0 8px">Not known yet</h3><ul>${b.unknowns.map((u) => `<li>${esc(u)}</li>`).join('')}</ul></div>` : ''}${b.changeMyMind ? `<div><h3 class="lbl" style="margin:0 0 8px">Would change this</h3><p>${esc(b.changeMyMind)}</p></div>` : ''}</div>` : ''}
257
+ ${src.length ? `<div class="sec"><h3>Sources</h3><ol class="srcs">${first.map(srcRow).join('')}${rest.length ? `<li class="restwrap" style="display:block;border:0;padding:0"><button class="more" type="button">+ ${rest.length} more checked</button><ol class="srcs rest" hidden>${rest.map(srcRow).join('')}</ol></li>` : ''}</ol></div>` : ''}
258
+ </div>
259
+ <div class="actions">
260
+ ${b.findings.length ? `<button class="act primary" type="button" data-act="review">Cross-examine with ${esc(others)}</button>` : ''}
261
+ ${b.watch ? `<button class="act" type="button" data-act="watch" data-text="${esc(b.watch)}">Watch: ${esc(b.watch)}</button>` : ''}
262
+ <button class="act" type="button" data-act="copy">Copy brief</button>
263
+ </div>
264
+ <div class="reviewbox"></div>
265
+ ${b.followUps.length ? `<div class="follow">${b.followUps.map((f) => `<button class="chip" type="button" data-follow>${esc(f)}</button>`).join('')}</div>` : ''}
266
+ </article>`;
267
+ }
268
+
269
+ function renderReview(card, data) {
270
+ const lines = [];
271
+ for (const r of data.reviews) {
272
+ if (r.error) { lines.push(`<p><b>${esc(r.label)}</b>: could not review (${esc(r.error)})</p>`); continue; }
273
+ lines.push(`<p><b>${esc(r.label)}</b> ${r.bottomLine === 'agree' ? 'agrees with the bottom line' : r.bottomLine === 'disagree' ? 'disagrees with the bottom line' : 'partly agrees with the bottom line'}${r.missed ? `. Missed: ${esc(r.missed)}` : '.'}</p>`);
274
+ for (const f of r.findings) {
275
+ const box = card.querySelector(`.findings li[data-i="${f.i}"] .verdicts`);
276
+ if (box) box.insertAdjacentHTML('beforeend', `<span class="vd ${esc(f.verdict)}" title="${esc(f.note)}">${esc(r.label.replace(/^Claude /, ''))}: ${esc(f.verdict)}</span>`);
277
+ }
278
+ }
279
+ const all = data.reviews.flatMap((r) => r.findings);
280
+ const ok = all.filter((f) => f.verdict === 'supported').length;
281
+ card.querySelector('.reviewbox').innerHTML = `<div class="review"><div class="lbl" style="margin-bottom:6px">Cross-examination · ${ok}/${all.length} finding checks supported</div>${lines.join('')}</div>`;
282
+ }
283
+
284
+ function wireCard(card, t) {
285
+ card.querySelectorAll('.bar i').forEach((i) => requestAnimationFrame(() => { i.style.width = i.dataset.w + '%'; }));
286
+ card.addEventListener('click', async (e) => {
287
+ const c = e.target.closest('.cite');
288
+ if (c) {
289
+ e.preventDefault();
290
+ const rest = card.querySelector('.rest'); const row = card.querySelector(`.srcs li[data-n="${c.dataset.n}"]`);
291
+ if (row && rest && rest.contains(row)) { rest.hidden = false; card.querySelector('.more')?.remove(); }
292
+ card.querySelectorAll('.srcs li.hl').forEach((x) => x.classList.remove('hl'));
293
+ if (row) { row.classList.add('hl'); row.scrollIntoView({ behavior: 'smooth', block: 'center' }); setTimeout(() => row.classList.remove('hl'), 2400); }
294
+ return;
295
+ }
296
+ if (e.target.closest('.more')) { card.querySelector('.rest').hidden = false; e.target.closest('.more').remove(); return; }
297
+ const f = e.target.closest('[data-follow]');
298
+ if (f && !busy) { askQuestion(f.textContent.trim()); return; }
299
+ const a = e.target.closest('[data-act]');
300
+ if (!a || a.disabled) return;
301
+ if (a.dataset.act === 'copy') {
302
+ const b = t.brief;
303
+ const text = [b.headline, '', b.bottomLine, ...(b.details ? ['', b.details] : []), '', `Confidence: ${b.confidence}/100 (${b.confidenceWhy})`, '', ...b.findings.map((f, i) => `${i + 1}. ${f.text} [${f.sources.join(', ')}]`), '', 'Sources:', ...(t.sources || []).map((s) => `[${s.n}] ${s.label}${s.url ? ' ' + s.url : ''}`), '', 'Oculon Analyst'].join('\n');
304
+ try { await navigator.clipboard.writeText(text); a.textContent = 'Copied'; } catch { a.textContent = 'Copy failed'; }
305
+ setTimeout(() => { a.textContent = 'Copy brief'; }, 1600);
306
+ }
307
+ if (a.dataset.act === 'review') {
308
+ a.disabled = true; a.innerHTML = '<span class="spin"></span> Cross-examining…';
309
+ try {
310
+ const r = await fetch('/api/analyst/review', { method: 'POST', headers: { 'content-type': 'application/json', 'x-oculon': '1' }, body: JSON.stringify({ id: t.id }) });
311
+ const j = await r.json();
312
+ if (!r.ok) throw new Error(j.error || `HTTP ${r.status}`);
313
+ t.review = j; save(); renderReview(card, j); a.remove();
314
+ } catch (err) { a.disabled = false; a.textContent = 'Cross-examine again'; card.querySelector('.reviewbox').innerHTML = `<div class="review"><p>${esc(err.message)}</p></div>`; }
315
+ }
316
+ if (a.dataset.act === 'watch') {
317
+ a.disabled = true;
318
+ try {
319
+ const r = await fetch('/api/my/monitors', { method: 'POST', headers: { 'content-type': 'application/json', 'x-oculon': '1' }, body: JSON.stringify({ text: a.dataset.text }) });
320
+ const j = await r.json();
321
+ if (!r.ok) throw new Error(j.error || `HTTP ${r.status}`);
322
+ a.outerHTML = `<a class="act" href="/app#watch">Watching. Open your monitors →</a>`;
323
+ } catch (err) { a.disabled = false; a.textContent = `Could not watch: ${err.message}`; }
324
+ }
325
+ });
326
+ }
327
+
328
+ function save() { store.set('oculon.analyst.turns', turns.slice(-20)); }
329
+
330
+ function renderTurn(t) {
331
+ const el = document.createElement('section');
332
+ el.className = 'turn';
333
+ el.innerHTML = `<div class="q"><span class="lbl">Q</span><span>${esc(t.question)}</span></div>
334
+ <div class="trace done"><div class="radar">${radarSvg()}</div><div>${planHtml(t.plan)}<ul class="steps">${(t.steps || []).map((s) => `<li><span class="st ${s.ok ? 'ok' : 'err'}">${s.ok ? '✓' : '✕'}</span><span class="nm">${esc(s.label)}</span><span class="meta">${(s.ms / 1000).toFixed(1)}s</span></li>`).join('') || '<li><span class="st">·</span><span class="nm">No tools were needed</span><span></span></li>'}</ul></div></div>
335
+ ${renderBrief(t)}`;
336
+ $('thread').appendChild(el);
337
+ el.querySelectorAll('.radar svg').forEach((svg) => (t.sources || []).forEach((_, i) => i < 24 && addBlip(svg, i)));
338
+ const card = el.querySelector('.brief');
339
+ wireCard(card, t);
340
+ if (t.review) renderReview(card, t.review);
341
+ return el;
342
+ }
343
+
344
+ async function askQuestion(question) {
345
+ busy = true; $('send').disabled = true; $('intro').hidden = true;
346
+ const el = document.createElement('section');
347
+ el.className = 'turn';
348
+ el.innerHTML = `<div class="q"><span class="lbl">Q</span><span>${esc(question)}</span></div><div class="trace"><div class="radar">${radarSvg()}</div><div><div class="planbox"></div><ul class="steps"></ul><div class="thinking"><span class="spin"></span> <i>${esc(MODELS[model])}</i> is reading the question and choosing sources…</div></div></div>`;
349
+ $('thread').appendChild(el);
350
+ el.scrollIntoView({ behavior: 'smooth', block: 'start' });
351
+ const steps = el.querySelector('.steps'), svg = el.querySelector('.radar svg'), thinking = el.querySelector('.thinking');
352
+ let blips = 0;
353
+ let plan = null;
354
+ const history = turns.slice(-4).map((t) => ({ q: t.question, a: t.brief?.bottomLine || '' }));
355
+ const fail = (msg) => { el.querySelector('.trace').classList.add('done'); thinking.remove(); el.insertAdjacentHTML('beforeend', `<div class="err">${esc(msg)}</div>`); };
356
+ try {
357
+ const res = await fetch('/api/analyst', { method: 'POST', headers: { 'content-type': 'application/json', 'x-oculon': '1' }, body: JSON.stringify({ q: question, model, history }) });
358
+ if (!res.ok || !res.body) { let m = `HTTP ${res.status}`; try { m = (await res.json()).error || m; } catch {} throw new Error(m); }
359
+ const reader = res.body.getReader(); const dec = new TextDecoder(); let buf = ''; let done = false;
360
+ while (!done) {
361
+ const { value, done: end } = await reader.read();
362
+ if (end) break;
363
+ buf += dec.decode(value, { stream: true });
364
+ let k;
365
+ while ((k = buf.indexOf('\n\n')) >= 0) {
366
+ const chunk = buf.slice(0, k); buf = buf.slice(k + 2);
367
+ const line = chunk.split('\n').find((l) => l.startsWith('data: '));
368
+ if (!line) continue;
369
+ let ev; try { ev = JSON.parse(line.slice(6)); } catch { continue; }
370
+ if (ev.type === 'plan') {
371
+ plan = ev.parts;
372
+ el.querySelector('.planbox').innerHTML = planHtml(plan);
373
+ } else if (ev.type === 'step') {
374
+ thinking.innerHTML = `<span class="spin"></span> checking sources…`;
375
+ steps.insertAdjacentHTML('beforeend', `<li data-id="${esc(ev.id)}"><span class="st"><span class="spin"></span></span><span class="nm">${esc(ev.label)}<small>${esc(ev.args)}</small></span><span class="meta">…</span></li>`);
376
+ } else if (ev.type === 'stepdone') {
377
+ const li = steps.querySelector(`li[data-id="${CSS.escape(ev.id)}"]`);
378
+ if (li) {
379
+ const live = ev.sources.filter((s) => s.status === 'LIVE').length;
380
+ li.querySelector('.st').outerHTML = `<span class="st ${ev.ok ? 'ok' : 'err'}">${ev.ok ? '✓' : '✕'}</span>`;
381
+ li.querySelector('.meta').textContent = `${(ev.ms / 1000).toFixed(1)}s · ${ev.sources.length} src${live ? ` · ${live} live` : ''}`;
382
+ }
383
+ for (const _ of ev.sources) if (blips < 24) addBlip(svg, blips++);
384
+ thinking.innerHTML = `<span class="spin"></span> <i>${esc(MODELS[model])}</i> is weighing the evidence…`;
385
+ } else if (ev.type === 'brief') {
386
+ const t = { id: ev.id, question, model: ev.model, brief: ev.brief, sources: ev.sources, steps: ev.steps, ms: ev.ms, plan };
387
+ turns.push(t); save();
388
+ el.remove();
389
+ renderTurn(t).scrollIntoView({ behavior: 'smooth', block: 'start' });
390
+ done = true;
391
+ } else if (ev.type === 'error') {
392
+ fail(`The analyst could not finish: ${ev.message}`); done = true;
393
+ }
394
+ }
395
+ }
396
+ if (!done) fail('The connection closed before the brief was ready. Try again.');
397
+ } catch (e) {
398
+ fail(e.message || 'Something went wrong.');
399
+ } finally {
400
+ busy = false; $('send').disabled = false; q.focus({ preventScroll: true });
401
+ }
402
+ }
403
+
404
+ /* restore this viewer's session */
405
+ if (turns.length) { $('intro').hidden = true; turns.forEach(renderTurn); }
406
+ const pre = new URLSearchParams(location.search).get('q');
407
+ if (pre) { history.replaceState(null, '', location.pathname); askQuestion(pre.slice(0, 600)); }
408
+ </script>
409
+ </body>
410
+ </html>
Binary file
@@ -185,7 +185,14 @@ void main(){
185
185
  (function () {
186
186
  if (window.__oculonCleanUrl) return;
187
187
  window.__oculonCleanUrl = true;
188
- window.oculonInitialHash = decodeURIComponent(location.hash.slice(1));
188
+ // A section asked for by a link on another Oculon page travels in window.name, so the address never shows it.
189
+ let carried = '';
190
+ try { if (window.name.startsWith('oculon-goto:')) { carried = window.name.slice(12); window.name = ''; } } catch {}
191
+ window.oculonInitialHash = carried || decodeURIComponent(location.hash.slice(1));
192
+ if (location.hash) history.replaceState(history.state, '', location.pathname + location.search);
193
+ // Same site: this host, or another subdomain of the same domain (oculon.live, app., docs., mcp.).
194
+ const site = (h) => h.split('.').slice(-2).join('.');
195
+ const sameSite = (u) => u.protocol === location.protocol && (u.host === location.host || (location.hostname.includes('.') && site(u.hostname) === site(location.hostname)));
189
196
  document.addEventListener('click', (e) => {
190
197
  if (e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
191
198
  const a = e.target.closest && e.target.closest('a[href]');
@@ -193,13 +200,28 @@ void main(){
193
200
  const raw = a.getAttribute('href');
194
201
  if (raw === '#') { e.preventDefault(); return; }
195
202
  const u = new URL(a.href, location.href);
196
- if (!u.hash || u.origin !== location.origin || u.pathname !== location.pathname || u.search !== location.search) return;
203
+ if (!u.hash) return;
204
+ if (u.origin !== location.origin || u.pathname !== location.pathname || u.search !== location.search) {
205
+ // Another page: open it at its plain address and hand over the section name.
206
+ if (!sameSite(u)) return;
207
+ e.preventDefault();
208
+ try { window.name = 'oculon-goto:' + decodeURIComponent(u.hash.slice(1)); } catch {}
209
+ location.href = u.origin + u.pathname + u.search;
210
+ return;
211
+ }
197
212
  const name = decodeURIComponent(u.hash.slice(1));
198
213
  const el = document.getElementById(name);
199
- if (el) { e.preventDefault(); el.scrollIntoView({ behavior: 'smooth', block: 'start' }); return; }
214
+ if (el) { e.preventDefault(); el.scrollIntoView({ behavior: 'smooth', block: 'start' }); if (typeof window.onOculonSection === 'function') window.onOculonSection(name); return; }
200
215
  if (typeof window.onOculonHash === 'function') { e.preventDefault(); window.onOculonHash(name); }
201
216
  });
202
217
  const clear = () => { if (location.hash) history.replaceState(history.state, '', location.pathname + location.search); };
203
218
  window.oculonClearHash = clear;
204
219
  addEventListener('load', () => setTimeout(clear, 2500));
220
+ // Pages whose sections are in the HTML from the start (landing, legal) jump to the handed-over section here;
221
+ // the docs and the app handle it themselves once their content is in place.
222
+ addEventListener('DOMContentLoaded', () => {
223
+ const name = window.oculonInitialHash;
224
+ const el = name && document.getElementById(name);
225
+ if (el) setTimeout(() => el.scrollIntoView({ behavior: 'instant', block: 'start' }), 60);
226
+ });
205
227
  })();
Binary file
Binary file
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="212 212 600 600"><path fill="#00f0ff" d="M512 212 H348 Q212 212 212 348 V676 Q212 812 348 812 H676 Q812 812 812 676 V512 H680 V630 Q680 680 630 680 H394 Q344 680 344 630 V394 Q344 344 394 344 H512 Z"/><path fill="#00f0ff" d="M586 212 H676 Q812 212 812 348 V438 Q812 472 778 472 H586 Q552 472 552 438 V246 Q552 212 586 212 Z"/></svg>
Binary file
@@ -12,6 +12,10 @@
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}
@@ -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>
@@ -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
 
@@ -223,7 +233,7 @@ fetch('/api/readme').then((r) => r.json()).then((j) => {
223
233
  const first = doc.querySelector('p'); if (first) first.classList.add('intro');
224
234
  buildNav(); reveal();
225
235
  // A link straight to a section (#remote-mcp) skips the rise-in, which could leave the jumped-to text hidden on phones.
226
- const target = window.oculonInitialHash || decodeURIComponent(location.hash.slice(1));
236
+ const target = sectionFromPath() || window.oculonInitialHash || decodeURIComponent(location.hash.slice(1));
227
237
  if (target) {
228
238
  document.querySelectorAll('.rv').forEach((el) => { el.classList.add('in'); rvio.unobserve(el); });
229
239
  // Cards above the README (module finder, live fusion) fill in after this, which moves the section down;
@@ -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>
@@ -1775,7 +1779,7 @@ const openView = (name) => {
1775
1779
  else document.querySelector(`nav button[data-tab="${CSS.escape(name)}"]`)?.click();
1776
1780
  };
1777
1781
  window.onOculonHash = openView;
1778
- const arrived = decodeURIComponent(location.hash.slice(1));
1782
+ const arrived = window.oculonInitialHash || decodeURIComponent(location.hash.slice(1));
1779
1783
  if (arrived) { openView(arrived); history.replaceState(null, '', location.pathname + location.search); }
1780
1784
  loadInbox().catch(() => {});
1781
1785
  if (!loaded.overview && !document.getElementById('tab-overview').hidden) { loaded.overview = true; loadOverview(); }