oculon 0.1.0 → 0.1.2
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.
- package/README.md +19 -19
- package/dist/cli/main.js +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +9 -1
- package/dist/mcp.js +1 -1
- package/dist/modules/scam.js +40 -2
- package/dist/modules/tortoise.d.ts +19 -0
- package/dist/modules/tortoise.js +31 -2
- package/dist/sources/opentimestamps.d.ts +5 -0
- package/dist/sources/opentimestamps.js +14 -0
- package/dist/web/assets/fx.js +27 -0
- package/dist/web/docs.html +38 -7
- package/dist/web/index.html +11 -8
- package/dist/web/landing.html +4 -3
- package/dist/web/legal.html +2 -2
- package/dist/web/mcp.html +1 -1
- package/dist/web/public.js +1 -0
- package/dist/web/server.js +14 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,19 +35,19 @@ npx oculon ask "why is Nvidia in the news this week?"
|
|
|
35
35
|
|
|
36
36
|
| Module | Command | What it does | Sources |
|
|
37
37
|
|---|---|---|---|
|
|
38
|
-
| Scam check | `oculon scam "<message>"` · Telegram: forward the message | Is this SMS, email or chat message a scam? Every link goes through the URL check, the sender is compared with any brand it names, and known scam patterns are matched in code (parcel fees, account locked, one-time codes, gift cards and crypto, "hi mum" new number asking for money, prizes, job and investment promises); a verdict, a 0-100 risk, the reasons and what to do |
|
|
38
|
+
| Scam check | `oculon scam "<message>"` · Telegram: forward the message | Is this SMS, email or chat message a scam? Every link goes through the URL check, the sender is compared with any brand it names, and known scam patterns are matched in code (parcel fees, account locked, one-time codes, gift cards and crypto, "hi mum" new number asking for money, prizes, job and investment promises); a verdict, a 0-100 risk, the reasons and what to do | Google Safe Browsing, URLhaus, urlscan.io, RDAP, Groq, Gemini, Mistral |
|
|
39
39
|
| URL check | `oculon url <link>` | Is a link dangerous? A verdict (malicious, suspicious, no known threats), a 0-100 risk and the reasons: Safe Browsing and URLhaus matches, community tags on urlscan.io scans, domain age and registrar, and warning signs in the URL itself (a brand name on someone else's domain, punycode look-alikes, risky top-level domains, `@` tricks). Big platforms are not blamed for files their users upload | Google Safe Browsing, URLhaus (abuse.ch), urlscan.io, RDAP |
|
|
40
|
-
| Fact check | `oculon factcheck "<claim>"` or a news URL | Published fact checks about the claim (Snopes, AFP, PolitiFact, Full Fact and others) plus current reporting; an LLM weighs only that evidence and cites it by number, giving true, mostly true, mixed, misleading, false or unverified with a confidence. Without an LLM the published ratings decide | Google Fact Check Tools, Tavily
|
|
40
|
+
| Fact check | `oculon factcheck "<claim>"` or a news URL | Published fact checks about the claim (Snopes, AFP, PolitiFact, Full Fact and others) plus current reporting; an LLM weighs only that evidence and cites it by number, giving true, mostly true, mixed, misleading, false or unverified with a confidence. Without an LLM the published ratings decide | Google Fact Check Tools, Tavily, Exa, Jina Reader, Groq, Gemini, Mistral |
|
|
41
41
|
| Audit | `oculon audit [package.json\|requirements.txt\|npm:name@ver ...]` | Dependency health for npm and PyPI: known vulnerabilities with CVSS, deprecation, years since the last release, major versions behind, OpenSSF Scorecard and its "Maintained" check, license; a 0-100 risk per package (dev dependencies weigh less) | deps.dev (Google Open Source Insights), OpenSSF Scorecard, OSV |
|
|
42
42
|
| Travel | `oculon travel <place>` | What a visitor should know for the coming week: US State Department level and UK FCDO advice, 7-day weather warnings (storms, heavy rain, strong gusts, heat, cold, UV), PM2.5, WHO disease outbreak news, orange and red disaster alerts, nearby strong earthquakes, satellite heat detections and confirmed internet outages; a level from low to severe | US State Department, UK FCDO, Open-Meteo, OpenAQ, WHO, GDACS, USGS, NASA FIRMS, Cloudflare Radar |
|
|
43
43
|
| Recall | `oculon recall <VIN\|"2018 Honda Accord"\|product>` | Is this car or product recalled? A VIN is decoded to make, model and year; vehicles get NHTSA safety recalls with do-not-drive and park-outside warnings; products get US consumer recalls and FDA food, drug and device enforcement reports from the last few years | NHTSA (vPIC and recalls), CPSC SaferProducts, openFDA |
|
|
44
44
|
| Email security | `oculon email <domain>` | Can someone send mail that looks like it comes from a domain? SPF (qualifier, DNS lookup count), DMARC (policy, coverage, reporting), DKIM on common selectors, MTA-STS, TLS reporting, BIMI, CAA and DNSSEC, a 0-100 score, a verdict (spoofable, partly protected, protected) and the fixes in order | Google Public DNS (DNS over HTTPS) |
|
|
45
|
-
| Papers | `oculon papers "<topic>"` | Research brief: the most cited papers of recent years among the most relevant, the newest relevant ones, papers per year (growing, steady or shrinking), PubMed counts for medical topics, and a short overview that cites the numbered papers | OpenAlex, PubMed, Semantic Scholar
|
|
45
|
+
| Papers | `oculon papers "<topic>"` | Research brief: the most cited papers of recent years among the most relevant, the newest relevant ones, papers per year (growing, steady or shrinking), PubMed counts for medical topics, and a short overview that cites the numbered papers | OpenAlex, PubMed, Semantic Scholar, Groq, Gemini, Mistral |
|
|
46
46
|
| Country | `oculon country <name>` | One-page country brief: GDP, growth, GDP per person, inflation, unemployment and population, the IMF outlook for this year and next, head of state and government, capital, currency and its rate to the dollar, US and UK travel advice, internet outages, disaster alerts and the latest headlines | World Bank, IMF, Wikidata, open.er-api.com, US State Department, UK FCDO, Cloudflare Radar, GDACS, Guardian |
|
|
47
47
|
| Airport | `oculon airport <JFK\|EGLL\|name>` | Is an airport running normally? Current METAR and TAF (flight category, wind, visibility, ceiling), FAA ground stops, ground delay programs, delays and closures at US airports, and aircraft squawking an emergency within 150 km | aviationweather.gov (NOAA), FAA NAS status, adsb.lol, OurAirports |
|
|
48
48
|
| Share | web app · `/r/<id>` | Any everyday check can be shared as a link: the server runs the check, keeps a snapshot and serves it as a page with a preview card for X, Telegram, WhatsApp and Slack | Oculon |
|
|
49
49
|
| Personal monitors | web app · Telegram `/monitor` | Each visitor (a random id in a cookie, no account) or Telegram chat keeps up to 10 monitors of its own, written in plain language and re-checked about hourly; changes are kept as alerts and sent by email (after a confirmation link, with one-click unsubscribe) or to the Telegram chat | Resend (email), Meerkat |
|
|
50
|
-
| Monitor | `oculon monitor "<request>"` | Watch anything in plain language: "internet outages in Iran", "critical CVEs for nginx", "earthquakes above 6 near Tokyo", "news about OpenAI", "travel risk changes for Bangkok", "flood or cyclone alerts for the Philippines". The request becomes a watchlist rule; only changes are reported, with evidence, in the app, Telegram and the signal feed |
|
|
50
|
+
| Monitor | `oculon monitor "<request>"` | Watch anything in plain language: "internet outages in Iran", "critical CVEs for nginx", "earthquakes above 6 near Tokyo", "news about OpenAI", "travel risk changes for Bangkok", "flood or cyclone alerts for the Philippines". The request becomes a watchlist rule; only changes are reported, with evidence, in the app, Telegram and the signal feed | Groq, Gemini, Mistral (with a pattern fallback), Meerkat |
|
|
51
51
|
| Live | `oculon live` / `serve --live` | Listens to two real-time streams: English Wikipedia articles suddenly edited by several people (6+ human edits by 3+ editors in 15 minutes), and names or hashtags surging in English Bluesky posts against their own last hour (watched companies and topics get a lower bar) | Wikimedia EventStreams, Bluesky Jetstream |
|
|
52
52
|
| Calendar | `oculon calendar [days]` | Catalysts ahead: earnings (watched companies first, then the largest by revenue estimate), IPOs, key US macro releases (CPI, jobs, GDP, PCE, JOLTS...), rules taking effect and comment periods closing at market-moving agencies, and high-volume prediction markets that close; also added to the daily brief | Finnhub, FRED, Federal Register, Polymarket |
|
|
53
53
|
| Connect | `oculon connect <A> to <B>` / `resolve` | Entity resolution merges duplicates across kinds (`org:nvidia` = `company:nvidia` = `nvidia.com`), then finds the shortest chain of typed links between two things in the graph | Oculon graph |
|
|
@@ -67,20 +67,20 @@ npx oculon ask "why is Nvidia in the news this week?"
|
|
|
67
67
|
| Social pulse | `oculon social <subject>` | Recent posts about a subject on X, Reddit, TikTok and Bluesky: count per platform, the most engaged and the newest posts with links, and Reddit's pace over the last six hours versus the day before; a sharp acceleration is a signal | Apify (X, Reddit, TikTok; pay per result), Bluesky |
|
|
68
68
|
| Feedback | Telegram buttons / `oculon feedback` | Every alert has Useful and Noise buttons; votes move that module's alert bar (from the third vote, capped at -10/+20 points) | your votes |
|
|
69
69
|
| Sanctions | `oculon sanctions <IMO\|name>` | Screens against the US OFAC SDN list and, for names, sanctions, PEP and wanted lists worldwide (OpenSanctions, free non-commercial key): vessel IMO numbers, exact names and aliases; for a confident name match, its owners, subsidiaries, directors and associates, sanctioned ones first. Runs automatically on every vessel seen over AIS | OFAC SDN, OpenSanctions |
|
|
70
|
-
| Narratives | `oculon narratives [run]` | Groups headlines into storylines that persist across days and flags new or fast-growing ones | Guardian, NYT, Hacker News, Oculon signals,
|
|
70
|
+
| Narratives | `oculon narratives [run]` | Groups headlines into storylines that persist across days and flags new or fast-growing ones | Guardian, NYT, Hacker News, Oculon signals, Groq, Gemini, Mistral |
|
|
71
71
|
| Calibration | `oculon calibrate` | Replays past days with the Time Machine, checks which radar items became news within three days, picks the signal threshold with the best F1 and per-source weights; the live radar uses them | Time Machine, Guardian |
|
|
72
72
|
| Company health | `oculon health <company>` | 0-100 early-warning score from hiring momentum, new lawsuits, insider selling, news tone, shipping and the stock move, each part explained; a sharp drop is a signal | Hound sources |
|
|
73
73
|
| Disaster impact | `oculon impact [place]` | People living within the affected radius of M6+ quakes and severe storms, plus night-light change once data covers the days after | USGS, NASA EONET, Wikidata, NASA VIIRS |
|
|
74
|
-
| Contradictions | `oculon contradictions <topic>` | Reads several outlets and lists factual claims that conflict, each side with its source | Tavily, GNews, Guardian, Jina,
|
|
74
|
+
| Contradictions | `oculon contradictions <topic>` | Reads several outlets and lists factual claims that conflict, each side with its source | Tavily, GNews, Guardian, Jina, Groq, Gemini, Mistral |
|
|
75
75
|
| Report | `oculon report` | A self-contained weekly HTML report; sent to Telegram on Mondays | everything above |
|
|
76
76
|
| Plugins | `oculon plugin list/run` | Local `.mjs` plugins add tools to the CLI and MCP server (see `examples/plugins/show-hn.mjs`) | your code |
|
|
77
|
-
| Case Files | `oculon case new "<question>"` | Deep investigations: an agent runs up to 10 tool steps, cross-checks sources and looks for contrary evidence, then writes a case file (answer, findings with confidence, timeline, entities, open questions). Citations are verified in code against what the tools returned; a finding needs two independent sources for "high". Watched cases are re-investigated daily and only new findings are reported | every tool below,
|
|
77
|
+
| Case Files | `oculon case new "<question>"` | Deep investigations: an agent runs up to 10 tool steps, cross-checks sources and looks for contrary evidence, then writes a case file (answer, findings with confidence, timeline, entities, open questions). Citations are verified in code against what the tools returned; a finding needs two independent sources for "high". Watched cases are re-investigated daily and only new findings are reported | every tool below, Groq, Gemini, Mistral |
|
|
78
78
|
| First to Know | `oculon scoops` | For each strong signal, finds when major media first covered the subject (oldest-first search from a week before) and records the lead time, positive or negative. An honest scoreboard of how often Oculon was ahead | Guardian, NYT, GNews |
|
|
79
79
|
| Lynx | `oculon markets` | Cross-checks Polymarket against Kalshi and Manifold; an LLM confirms each pair asks exactly the same question before gaps are reported | Polymarket, Kalshi, Manifold |
|
|
80
80
|
| Launch Radar | `oculon launches <company>` | New Hugging Face models/datasets/Spaces, new iOS apps and updates, new npm packages, plus (with a domain) new hostnames, pages and repos | Hugging Face, App Store, npm, Ferret sources |
|
|
81
81
|
| Time Machine | `oculon rewind <date>` | What Oculon would have seen on a past date: Wikipedia spikes against the weeks before, top Hacker News stories, strong earthquakes and that day's Guardian headlines, fused | Wikimedia, HN, USGS, Guardian |
|
|
82
82
|
| Geofences | `oculon fence add <name> <place>` | Boxes on the map, checked every scan for new military aircraft, military vessels, earthquakes and natural events; draw them on the dashboard map | adsb.lol, aisstream, USGS, NASA EONET |
|
|
83
|
-
| Octopus | `oculon ask "<question>"` | Tool-using AI agent: picks Oculon tools, searches and reads the web, answers with sources. Read-only. | Claude (optional, pay per use: Opus 5.5, Fable 5.2 for case files), then Groq, Gemini, Mistral, NVIDIA NIM, OpenRouter (
|
|
83
|
+
| Octopus | `oculon ask "<question>"` | Tool-using AI agent: picks Oculon tools, searches and reads the web, answers with sources. Read-only. | Claude (optional, pay per use: Opus 5.5, Fable 5.2 for case files), then Groq, Gemini, Mistral, NVIDIA NIM, OpenRouter (automatic fallback) |
|
|
84
84
|
| Owl | `oculon radar` | Global anomaly radar: Wikipedia readership spikes, Hacker News traction, prediction-market swings, trending coins, NYT top stories, earthquakes, natural events and space weather, fused across sources | Wikimedia, HN, Polymarket, CoinGecko, NYT, USGS, NASA EONET, NOAA SWPC |
|
|
85
85
|
| Hound | `oculon dossier <name> [--deep]` | Dossier on a company, person or project: profile and readership spike, stock quote, insider trades and insider sentiment, analyst ratings and their shift, peers, key financials, earnings surprises, decoded 8-K events, news from five outlets, web results, federal court dockets, job openings, UK registry, brand, prediction markets, repos, YouTube, Bluesky; FDA recalls and clinical trials for health and food companies; with `--deep` lobbying, federal contracts, visa filings and patents; one merged timeline | Wikipedia, Finnhub, SEC EDGAR, openFDA, ClinicalTrials.gov, GDELT, GNews, Guardian, NYT, Tavily, CourtListener, Adzuna, Companies House, Brandfetch, Polymarket, GitHub, YouTube, Bluesky |
|
|
86
86
|
| Cricket | `oculon hype <topic>` | Hype-cycle phase (DORMANT, EMERGING, RISING, PEAK, COOLING, STEADY) from 8 weeks of readers, developers, news, press, research, scholarly output and builders | Wikimedia, HN, GDELT, Guardian, arXiv, OpenAlex, GitHub |
|
|
@@ -89,17 +89,21 @@ npx oculon ask "why is Nvidia in the news this week?"
|
|
|
89
89
|
| Falcon | `oculon plane <reg>` / `oculon mil` | One aircraft (owner, live position, nearest airport, moves between checks); worldwide military air traffic with notable roles (tanker, AWACS, ISR, bomber) and surges versus history | adsb.lol, OpenSky, hexdb.io, OurAirports |
|
|
90
90
|
| Condor | `oculon events` / `lights` / `image` / `space` / `air` | Natural events with severity; night-time lights of any place versus a baseline month to spot blackouts or surges; true-color satellite images; space weather (official NOAA alerts and scales, solar wind, 3-day forecast, solar flares, coronal mass ejections modelled to reach Earth, geomagnetic storms, close asteroid passes); PM2.5 air quality | NASA EONET, NASA GIBS (VIIRS, MODIS), NOAA SWPC, NASA DONKI and NeoWs, OpenAQ, Nominatim |
|
|
91
91
|
| Raven | `oculon forecast ...` | Forecasts on live Polymarket markets, resolved against real outcomes and scored (Brier) against the crowd price at forecast time | Polymarket |
|
|
92
|
-
| Tortoise | `oculon proof ...` | Tamper-evident proofs: forecasts hashed into a Merkle tree, timestamped on Bitcoin through OpenTimestamps, verified down to the block merkle root | OpenTimestamps, Blockstream |
|
|
92
|
+
| Tortoise | `oculon proof ...` | Tamper-evident proofs: forecasts hashed into a Merkle tree, timestamped on Bitcoin through OpenTimestamps, verified down to the block merkle root. Each proof can be checked without Oculon: `/api/proof?id=<id>` gives the forecast, its canonical JSON, hash and Merkle path, and `/proof/<id>.ots` is a standard OpenTimestamps file for `ots verify -d <root> <id>.ots` | OpenTimestamps, Blockstream |
|
|
93
93
|
|
|
94
94
|
## Install
|
|
95
95
|
|
|
96
96
|
Requires Node.js 22.13 or newer (it uses the built-in `node:sqlite`).
|
|
97
97
|
|
|
98
98
|
```sh
|
|
99
|
-
npm install -g oculon
|
|
100
|
-
oculon
|
|
99
|
+
npm install -g oculon # install the oculon command
|
|
100
|
+
oculon tour # what you can try right away
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
+
Or try it without installing: put `npx` in front of any command, for example `npx oculon scam "Your package is on hold, pay the customs fee"`.
|
|
104
|
+
|
|
105
|
+
`oculon doctor` checks your setup afterwards: the Node.js version, the data folder and which optional API keys are set. Keys are read from the environment or from a `.env` file in the folder you run `oculon` in.
|
|
106
|
+
|
|
103
107
|
Data is stored in `~/.oculon` (set `OCULON_HOME` to change it).
|
|
104
108
|
|
|
105
109
|
## CLI
|
|
@@ -124,7 +128,7 @@ oculon ships "Port of Rotterdam" # live vessels (AIS)
|
|
|
124
128
|
oculon watch add company Nvidia # watchlist: company domain plane topic lights air port
|
|
125
129
|
oculon watch run # report only what changed since last time
|
|
126
130
|
oculon brief # today's brief
|
|
127
|
-
oculon quota # today's API usage vs
|
|
131
|
+
oculon quota # today's API usage vs daily budgets
|
|
128
132
|
oculon ask "is there a geomagnetic storm right now?"
|
|
129
133
|
oculon radar # what the world is suddenly watching
|
|
130
134
|
oculon dossier Nvidia # company / person dossier
|
|
@@ -235,10 +239,6 @@ Press Ctrl+K anywhere to search entities or run a module (CVE ids, AS numbers, d
|
|
|
235
239
|
|
|
236
240
|
Free-tier quotas are protected by daily per-source budgets (`oculon quota`); when one is spent, Oculon serves the last cached result or labels the source unavailable instead of calling it.
|
|
237
241
|
|
|
238
|
-
## Splice skill
|
|
239
|
-
|
|
240
|
-
`integrations/splice/oculon` packages keyless tools (radar, space weather, military air, new subdomains) as a Splice skill: `manifest.json`, `SKILL.md`, `tools/`, `tests/`, `examples/`, with network access limited to the seven hosts it uses.
|
|
241
|
-
|
|
242
242
|
## Telegram bot
|
|
243
243
|
|
|
244
244
|
Create a bot with @BotFather, then set:
|
|
@@ -262,7 +262,7 @@ All optional, read from the environment or a `.env` file in the working director
|
|
|
262
262
|
| `OCULON_DB` | Database path override |
|
|
263
263
|
| `OCULON_CONTACT` | Contact email, sent only to SEC EDGAR (which requires one); no other API receives it |
|
|
264
264
|
| `GITHUB_TOKEN` | Raises GitHub limits from 60 to 5000 requests/hour |
|
|
265
|
-
| LLM, search, news, markets, company, security, social and air keys | See `.env.example`; each is optional
|
|
265
|
+
| LLM, search, news, markets, company, security, social and air keys | See `.env.example`; each is optional. `oculon doctor` shows which groups are on |
|
|
266
266
|
|
|
267
267
|
API keys never appear in output: provenance URLs, errors and agent tool results are scrubbed of every key in the environment.
|
|
268
268
|
|
|
@@ -299,7 +299,7 @@ The repository includes a `Dockerfile` and `railway.json`. Mount a persistent vo
|
|
|
299
299
|
|
|
300
300
|
## Limits
|
|
301
301
|
|
|
302
|
-
-
|
|
302
|
+
- Public APIs rate-limit; GDELT and arXiv in particular answer 429 after heavy use. Affected sources are reported as errors and the rest of the result still returns.
|
|
303
303
|
- The Wayback Machine CDX API is often slow; Ferret caps it at 45 s.
|
|
304
304
|
- crt.sh can lag behind the CT logs by weeks.
|
|
305
305
|
- OpenTimestamps proofs stay PENDING until a calendar commits to Bitcoin, usually a few hours.
|
|
@@ -323,7 +323,7 @@ The repository includes a `Dockerfile` and `railway.json`. Mount a persistent vo
|
|
|
323
323
|
- Exposure uses InternetDB, which reflects Shodan's last scan (days to weeks old) and knows nothing about machines behind a CDN.
|
|
324
324
|
- Social pulse samples are small (X returns about 10 posts per search on Apify's free plan) and X, TikTok and Bluesky are fetched by popularity, so pace is measured on Reddit only. Address labels come from a community dataset (MIT) and can be incomplete or stale.
|
|
325
325
|
- Plugins run with full Node permissions; install only code you trust.
|
|
326
|
-
- `oculon ask` answers are written by
|
|
326
|
+
- `oculon ask` answers are written by an LLM from tool results; they can still misread data, so check the cited sources.
|
|
327
327
|
- Respect each data provider's terms. OpenStreetMap, Nominatim and adsb.lol data are ODbL-licensed and require attribution.
|
|
328
328
|
|
|
329
329
|
## Development
|
package/dist/cli/main.js
CHANGED
|
@@ -161,7 +161,7 @@ ${c.bold('Live')}
|
|
|
161
161
|
${c.bold('Graph')}
|
|
162
162
|
oculon connect <A> to <B> how two things are linked (shortest path)
|
|
163
163
|
oculon resolve merge duplicates: org:nvidia = company:nvidia = nvidia.com
|
|
164
|
-
oculon quota today's API usage vs
|
|
164
|
+
oculon quota today's API usage vs daily budgets
|
|
165
165
|
|
|
166
166
|
${c.bold('Radar')}
|
|
167
167
|
oculon radar what the world is suddenly paying attention to
|
package/dist/index.d.ts
CHANGED
|
@@ -82,6 +82,10 @@ export declare class Oculon {
|
|
|
82
82
|
}>>;
|
|
83
83
|
/** Tortoise: verify a forecast's proof down to the Bitcoin block. */
|
|
84
84
|
verifyProof(predictionId: string): Promise<ModuleResult<import("./modules/tortoise.js").Verification>>;
|
|
85
|
+
/** Tortoise: the forecast, its hash, Merkle path and root, for checking without this install. */
|
|
86
|
+
proofBundle(predictionId: string): import("./modules/tortoise.js").ProofBundle;
|
|
87
|
+
/** Tortoise: the standard OpenTimestamps `.ots` file for a forecast's batch, or null before stamping. */
|
|
88
|
+
proofOts(predictionId: string): Buffer<ArrayBufferLike> | null;
|
|
85
89
|
/** Magpie: wallet portfolio, history and risk (EVM or Solana address). */
|
|
86
90
|
wallet(address: string): Promise<ModuleResult<import("./modules/magpie.js").WalletResult>>;
|
|
87
91
|
/** Magpie: token contract risk, DEX pairs and price. On chain "robinhood" this uses Heron's own rules. */
|
package/dist/index.js
CHANGED
|
@@ -37,7 +37,7 @@ import { ferret } from './modules/ferret.js';
|
|
|
37
37
|
import { hound } from './modules/hound.js';
|
|
38
38
|
import { owl } from './modules/owl.js';
|
|
39
39
|
import { auto, getPrediction, listPredictions, predict, resolve, scoreboard } from './modules/raven.js';
|
|
40
|
-
import { stamp, verify } from './modules/tortoise.js';
|
|
40
|
+
import { proofBundle, proofOts, stamp, verify } from './modules/tortoise.js';
|
|
41
41
|
import { token, wallet } from './modules/magpie.js';
|
|
42
42
|
import { deployerProfile, overview, rhTokenCheck } from './modules/heron.js';
|
|
43
43
|
import { addWatch, listWatch, removeWatch, runWatch } from './modules/meerkat.js';
|
|
@@ -139,6 +139,14 @@ export class Oculon {
|
|
|
139
139
|
verifyProof(predictionId) {
|
|
140
140
|
return verify(this.ctx, predictionId);
|
|
141
141
|
}
|
|
142
|
+
/** Tortoise: the forecast, its hash, Merkle path and root, for checking without this install. */
|
|
143
|
+
proofBundle(predictionId) {
|
|
144
|
+
return proofBundle(this.ctx, predictionId);
|
|
145
|
+
}
|
|
146
|
+
/** Tortoise: the standard OpenTimestamps `.ots` file for a forecast's batch, or null before stamping. */
|
|
147
|
+
proofOts(predictionId) {
|
|
148
|
+
return proofOts(this.ctx, predictionId);
|
|
149
|
+
}
|
|
142
150
|
/** Magpie: wallet portfolio, history and risk (EVM or Solana address). */
|
|
143
151
|
wallet(address) {
|
|
144
152
|
return wallet(this.ctx, address);
|
package/dist/mcp.js
CHANGED
|
@@ -7,7 +7,7 @@ import { createInterface } from 'node:readline';
|
|
|
7
7
|
import { Oculon, summarizeProvenance } from './index.js';
|
|
8
8
|
import { ONCHAIN_TOOLS, onchainEnabled } from './core/features.js';
|
|
9
9
|
import { availableKinds } from './modules/monitor.js';
|
|
10
|
-
export const SERVER_INFO = { name: 'oculon', version: '0.1.
|
|
10
|
+
export const SERVER_INFO = { name: 'oculon', version: '0.1.2' };
|
|
11
11
|
const SUPPORTED = ['2025-06-18', '2025-03-26', '2024-11-05'];
|
|
12
12
|
const str = (d) => ({ type: 'string', description: d });
|
|
13
13
|
const num = (d) => ({ type: 'number', description: d });
|
package/dist/modules/scam.js
CHANGED
|
@@ -5,7 +5,8 @@ const PATTERNS = [
|
|
|
5
5
|
{ name: 'urgency or threat', weight: 15, re: /\b(urgent|immediately|within (24|48) hours|final (notice|warning)|last chance|act now|expires? today|will be (suspended|closed|deleted|blocked)|legal action|arrest warrant)\b/i },
|
|
6
6
|
{ name: 'account locked or verify your account', weight: 20, re: /\b(account (has been |is )?(suspended|locked|limited|restricted|on hold|compromised)|verify your (account|identity|details)|unusual (sign[- ]?in|activity)|confirm your (password|details|information))\b/i },
|
|
7
7
|
{ name: 'parcel or delivery fee', weight: 25, re: /\b(parcel|package|delivery|shipment)\b[\s\S]{0,80}\b(fee|pay|held|on hold|failed|unpaid|customs|redeliver|re-?schedule)\b/i },
|
|
8
|
-
{ name: 'prize, lottery or giveaway', weight: 25, re: /\b(you('ve| have)? won|winner|lottery|jackpot|claim your (prize|reward|gift)|selected to receive|free (iphone|gift))\b/i },
|
|
8
|
+
{ name: 'prize, lottery or giveaway', weight: 25, re: /\b(you('ve| have)? won|winner|lottery|jackpot|claim your (prize|reward|gift)|selected to receive|free (iphone|gift)|giveaway|airdrop|you (were|have been|are|got) (selected|chosen|picked)|(selected|chosen|picked) as (the|a|one of)|lucky (winner|recipient|one))\b/i },
|
|
9
|
+
{ name: 'asks for your crypto wallet or recovery phrase', weight: 35, re: /\b(seed phrase|recovery phrase|secret (recovery )?phrase|private key|1[2-8][- ]word|connect your wallet|(validate|verify|sync|rectify) your wallet)\b|\b(send|share|give|drop|reply with|dm|tell)\b(?: me)?[\s\S]{0,25}\b(sol|solana|eth|ethereum|btc|bitcoin|usdt|bnb|trx|crypto|wallet|metamask|phantom|trust ?wallet)\s+(wallet\s+)?(address|addy|wallet)\b/i },
|
|
9
10
|
{ name: 'refund or tax rebate', weight: 20, re: /\b(refund|rebate|overpaid|reimbursement|compensation)\b[\s\S]{0,60}\b(claim|click|eligible|pending|approved)\b/i },
|
|
10
11
|
{ name: 'asks for a one-time code or password', weight: 40, re: /\b(otp|one[- ]time (code|password)|verification code|security code|6-digit code|pin)\b[\s\S]{0,60}\b(send|share|reply|tell|give|forward)\b|\b(send|share|reply with|tell me|give me|forward)\b[\s\S]{0,40}\b(otp|code|password|pin)\b/i },
|
|
11
12
|
{ name: 'gift card or crypto payment', weight: 30, re: /\b(gift ?cards?|itunes card|google play card|steam card|pay (in|with|via) (bitcoin|btc|usdt|crypto)|bitcoin atm|wallet address)\b/i },
|
|
@@ -13,6 +14,20 @@ const PATTERNS = [
|
|
|
13
14
|
{ name: 'guaranteed investment returns', weight: 25, re: /\b(guaranteed (profit|return)s?|double your (money|investment)|\d{2,3}% (return|profit)|risk[- ]free investment|trading (signal|mentor)|recover your (lost )?(funds|crypto))\b/i },
|
|
14
15
|
{ name: 'a "new number" or a request for secrecy', weight: 25, re: /\b(this is my new number|my new number|lost my phone|phone (is )?broken|don't tell (anyone|dad|mom|mum)|keep (this|it) (between us|confidential|secret|quiet))\b/i },
|
|
15
16
|
{ name: 'asks you to send money', weight: 20, re: /\b(send|transfer|wire|lend|pay)\b(?: me)?[\s\S]{0,25}(\$|€|£|usd|eur|gbp)\s?\d|\b(send|transfer|wire|lend)\b(?: me)? (some )?(money|cash|funds)\b/i },
|
|
17
|
+
{ name: 'crypto promotion or fake volume offer', weight: 35, re: /\b(promot(e|ion|ing) (your|ur|the) (project|token|coin|community|launch)|(massive|organic|real|huge) (volume|holders|buyers|traction)|volume bots?|diamond holders|increase (your |ur )?(project'?s? )?(market ?cap|mc|holders|volume)|(trend(ing)?) on (dextools|dexscreener|coingecko|cmc|birdeye|pump\.?fun|twitter|x)|(cmc|coingecko|coinmarketcap|cg|cex) listings?|fast[- ]track listing|kol (campaign|marketing|promotion)s?|shill(ing)? (campaign|service|team)|raid (team|service)s?|call channels?|promote on all chains|pump (your|ur) (chart|token|coin))\b/i },
|
|
18
|
+
{ name: 'unsolicited paid service for your token', weight: 30, re: /\b(how to buy (guide|video|tutorial)|(logo|banner|website|video|meme|sticker|animation)s? for (your|ur) (token|project|coin|memecoin))\b|\b(yo|hey|hi|hello|dear|gm) dev\b[\s\S]{0,220}\b(dm|d m|telegram|details|\$\s?\d+)|\bfor (your|ur) (token|project|coin|memecoin)\b[\s\S]{0,160}(\$\s?\d+|\d+\s?(usdt|usd|sol|eth|bnb)\b|check my (last |previous |past )?work)/i },
|
|
19
|
+
{ name: 'exclusive early-access or signals pitch', weight: 25, re: /\b(right circle|inner circle|private (group|circle|channel|community)|vip (group|channel|signals?|access)|alpha (group|channel|calls?|chat)|position(ing|ed)? (early|smart)|get in early|before (it|they) (pumps?|moons?|trends?|explodes?)|first wave|next \d{2,4}x|\d{2,4}x (gems?|coins?|potential|returns?)|insider (info|calls|tips|access)|(trading|crypto|forex) signals?|pump (group|signals?))\b/i },
|
|
20
|
+
{ name: 'hype or fear of missing out', weight: 10, re: /\b(don'?t miss (out|this)|before it'?s too late|limited (spots|slots|seats)|only \d+ (spots|slots|seats) left|access matters|timing matters|being early|early (access|entry|birds?)|to the moon|life[- ]changing (money|opportunity)|financial freedom|passive income)\b/i },
|
|
21
|
+
{ name: 'fake support or wallet "validation"', weight: 35, re: /\b(i('m| am) (from|with) (the )?(support|admin|help ?desk|security|compliance) team|(binance|coinbase|metamask|trust ?wallet|phantom|kraken|ledger|okx|bybit|kucoin) (support|team|security|admin)|wallet (validation|synchroni[sz]ation|sync|migration|rectification|whitelisting)|(claim|unlock|release) your (airdrop|tokens|funds|rewards)|dapp (link|portal|connect))\b/i },
|
|
22
|
+
{ name: 'investment platform that needs a fee to withdraw', weight: 35, re: /\b((withdrawal|unlock|release|clearance|verification|upgrade) (fee|tax|deposit)|pay (the |a |an )?(tax|fee|deposit) (to|before|in order to) (withdraw|release|unlock)|(liquidity|usdt|cloud|defi) mining|mining pool|arbitrage (bot|platform|trading)|my (uncle|aunt|mentor|teacher|cousin) (works|taught|showed|is an analyst)|(trading|investment) platform\b[\s\S]{0,60}\b(profit|returns?|deposit|withdraw))\b/i },
|
|
23
|
+
{ name: 'task job that asks for a deposit', weight: 30, re: /\b((optimi[sz]ation|rating|review|data|order) tasks?|complete (\d+ )?tasks (a|per) day|(recharge|top[- ]?up|deposit) (to|before|in order to) (unlock|continue|complete|withdraw)|commission (per|for each|on every) (task|order|review)|negative balance)\b/i },
|
|
24
|
+
{ name: 'funds recovery offer', weight: 35, re: /\b((funds?|crypto|scam|asset) recovery (service|expert|agent|team|company)|recovery (expert|agent|specialist|hacker)|ethical hacker|hire a hacker|we (can )?(help )?(get|bring) (your |the )?(money|funds|crypto) back)\b/i },
|
|
25
|
+
{ name: 'blackmail or sextortion', weight: 45, re: /\b(i (have )?(recorded|hacked|filmed) (you|your)|(webcam|camera) (recording|footage)|intimate (video|photos?|pictures)|send (it|this|the (video|photos?)) to (all )?your (contacts|friends|family|colleagues)|(or|otherwise) (i will|i'll) (send|share|publish|release|leak))\b/i },
|
|
26
|
+
{ name: 'tech support or fake subscription renewal', weight: 30, re: /\b(your (computer|pc|device|phone|mac) (is|has been) (infected|hacked|compromised|locked)|(call|contact) (microsoft|apple|windows|norton|mcafee) support|(norton|mcafee|geek squad|amazon prime|paypal)\b[\s\S]{0,50}\b(renew(al|ed)?|subscription|charged|invoice|order)\b[\s\S]{0,80}\b(call|cancel|dispute|refund)|toll[- ]free)\b/i },
|
|
27
|
+
{ name: 'loan that wants a fee first', weight: 30, re: /\b((instant|guaranteed|pre[- ]?approved) loan|loan (has been |is )?approved|no credit check|(processing|insurance|activation|registration) fee\b[\s\S]{0,40}\bloan|loan\b[\s\S]{0,40}\b(processing|insurance|activation|registration) fee)\b/i },
|
|
28
|
+
{ name: 'government, toll or tax impersonation', weight: 25, re: /\b(irs|hmrc|social security (number|administration)|ssn (has been |is )?(suspended|compromised|blocked)|tax (office|department|authority) [\s\S]{0,40}(owe|unpaid|refund)|toll (charges?|payment|violation|balance)|unpaid (toll|tax|fine|ticket)|outstanding (toll|fine|penalty|balance)[\s\S]{0,40}(pay|avoid))\b/i },
|
|
29
|
+
{ name: 'wrong-number or cold friendly opener', weight: 10, re: /^\s*((hi|hello|hey)[\s,!.]*)?(is this|are you) [A-Z][a-z]+\b|\b(sorry,? (wrong number|i (must have )?(texted|messaged) the wrong (person|number))|remember me\?)/i },
|
|
30
|
+
{ name: 'moves you to a private chat', weight: 10, re: /\b(check (my|the|your) (dm|d m|inbox|pm)|in (the |my )?d ?m\b|dm me|pm me|message me on (whatsapp|telegram|signal)|add me on (whatsapp|telegram|signal|wechat|line)|contact (me|us) on (whatsapp|telegram))\b/i },
|
|
16
31
|
{ name: 'link shortener or tracking link', weight: 10, re: /\b(bit\.ly|tinyurl\.com|t\.co|is\.gd|cutt\.ly|rb\.gy|shorturl\.at|ow\.ly|tiny\.cc)\//i },
|
|
17
32
|
];
|
|
18
33
|
const BRANDS = /\b(paypal|apple|amazon|netflix|microsoft|google|facebook|instagram|whatsapp|dhl|fedex|ups|usps|royal mail|irs|hmrc|bank|visa|mastercard|binance|coinbase|metamask)\b/i;
|
|
@@ -73,6 +88,17 @@ export async function scamCheck(ctx, text) {
|
|
|
73
88
|
risk += 20;
|
|
74
89
|
reasons.push('a new number asking for money is the "hi mum" family-impersonation scam');
|
|
75
90
|
}
|
|
91
|
+
// Several crypto scam signs in one message weigh more than each alone.
|
|
92
|
+
const cryptoHits = patterns.filter((p) => /crypto|token|early-access|fake support|withdraw/.test(p.name)).length;
|
|
93
|
+
if (cryptoHits >= 2) {
|
|
94
|
+
risk += 15;
|
|
95
|
+
reasons.push('several crypto scam signs appear together');
|
|
96
|
+
}
|
|
97
|
+
// A giveaway that wants your wallet is the crypto "you were selected" scam.
|
|
98
|
+
if (patterns.some((p) => /giveaway/.test(p.name)) && patterns.some((p) => /crypto wallet/.test(p.name))) {
|
|
99
|
+
risk += 20;
|
|
100
|
+
reasons.push('a giveaway that asks for your wallet is a common crypto scam');
|
|
101
|
+
}
|
|
76
102
|
const brand = BRANDS.exec(msg)?.[1];
|
|
77
103
|
if (brand && sender && (sender.freeMail || !senderDomain.includes(brand.toLowerCase().replace(/\s+/g, '')))) {
|
|
78
104
|
risk += 25;
|
|
@@ -89,8 +115,20 @@ export async function scamCheck(ctx, text) {
|
|
|
89
115
|
advice.push('Do not click the links or reply. Open the company\'s app or type its address yourself.');
|
|
90
116
|
if (patterns.some((p) => /code|password/.test(p.name)))
|
|
91
117
|
advice.push('Never share a one-time code: no real company asks for it.');
|
|
92
|
-
if (patterns.some((p) => /gift card|crypto/.test(p.name)))
|
|
118
|
+
if (patterns.some((p) => /gift card|crypto payment/.test(p.name)))
|
|
93
119
|
advice.push('Requests for gift cards or crypto are almost always fraud.');
|
|
120
|
+
if (patterns.some((p) => /crypto wallet/.test(p.name)))
|
|
121
|
+
advice.push('Never share a recovery phrase or private key, and ignore "giveaways" that ask for your wallet: they lead to drained wallets or fake fees.');
|
|
122
|
+
if (patterns.some((p) => /promotion|paid service|early-access/.test(p.name)))
|
|
123
|
+
advice.push('Unsolicited offers to promote a token, sell you "volume" or let you into an early group are spam or paid pump schemes. Do not pay upfront.');
|
|
124
|
+
if (patterns.some((p) => /fee to withdraw|task job/.test(p.name)))
|
|
125
|
+
advice.push('If a platform or job wants a fee or deposit before you can withdraw, stop paying: the money will not come back.');
|
|
126
|
+
if (patterns.some((p) => /recovery/.test(p.name)))
|
|
127
|
+
advice.push('"Recovery" services that contact you after a loss are a second scam.');
|
|
128
|
+
if (patterns.some((p) => /blackmail/.test(p.name)))
|
|
129
|
+
advice.push('Do not pay or reply. These threats are usually sent in bulk with a password from an old data leak. Change that password and report the message.');
|
|
130
|
+
if (patterns.some((p) => /tech support|subscription/.test(p.name)))
|
|
131
|
+
advice.push('Do not call numbers in the message. Check your account on the company\'s own site.');
|
|
94
132
|
if (patterns.some((p) => /new number/.test(p.name)))
|
|
95
133
|
advice.push('Call the person on the number you already have before sending anything.');
|
|
96
134
|
advice.push('Report it: forward phishing SMS to 7726 (US, UK) and report emails to the impersonated company.');
|
|
@@ -6,8 +6,27 @@
|
|
|
6
6
|
* because it needs a funded wallet.
|
|
7
7
|
*/
|
|
8
8
|
import type { Ctx } from '../core/context.js';
|
|
9
|
+
import { type PathStep } from '../core/merkle.js';
|
|
9
10
|
import type { ModuleResult } from '../core/types.js';
|
|
10
11
|
import { type Receipt } from '../sources/opentimestamps.js';
|
|
12
|
+
import { predictionCore } from './raven.js';
|
|
13
|
+
/** Everything needed to check a forecast's proof without trusting this server. */
|
|
14
|
+
export interface ProofBundle {
|
|
15
|
+
forecast: ReturnType<typeof predictionCore>;
|
|
16
|
+
canonicalJson: string;
|
|
17
|
+
leaf: string;
|
|
18
|
+
merklePath: PathStep[];
|
|
19
|
+
root: string | null;
|
|
20
|
+
batchId: string | null;
|
|
21
|
+
bitcoin: {
|
|
22
|
+
height: number;
|
|
23
|
+
time: string;
|
|
24
|
+
} | null;
|
|
25
|
+
howToVerify: string[];
|
|
26
|
+
}
|
|
27
|
+
export declare function proofBundle(ctx: Ctx, predictionId: string): ProofBundle;
|
|
28
|
+
/** The forecast's batch root as a standard `.ots` file, or null when it has not been stamped yet. */
|
|
29
|
+
export declare function proofOts(ctx: Ctx, predictionId: string): Buffer | null;
|
|
11
30
|
export interface Batch {
|
|
12
31
|
id: string;
|
|
13
32
|
root: string;
|
package/dist/modules/tortoise.js
CHANGED
|
@@ -1,6 +1,35 @@
|
|
|
1
1
|
import { applyPath, merkle } from '../core/merkle.js';
|
|
2
|
-
import { bitcoinBlock, matchesMerkleRoot, parseTimestamp, submit, upgrade } from '../sources/opentimestamps.js';
|
|
3
|
-
import {
|
|
2
|
+
import { bitcoinBlock, matchesMerkleRoot, otsFile, parseTimestamp, submit, upgrade } from '../sources/opentimestamps.js';
|
|
3
|
+
import { canonicalJson } from '../core/merkle.js';
|
|
4
|
+
import { getPrediction, leafOf, predictionCore } from './raven.js';
|
|
5
|
+
export function proofBundle(ctx, predictionId) {
|
|
6
|
+
const p = getPrediction(ctx, predictionId);
|
|
7
|
+
if (!p)
|
|
8
|
+
throw new Error(`no prediction ${predictionId}`);
|
|
9
|
+
const forecast = predictionCore(p);
|
|
10
|
+
const row = ctx.store.db.prepare('SELECT merkle_path FROM predictions WHERE id = ?').get(p.id);
|
|
11
|
+
const batch = p.batchId ? getBatch(ctx, p.batchId) : null;
|
|
12
|
+
return {
|
|
13
|
+
forecast,
|
|
14
|
+
canonicalJson: canonicalJson(forecast),
|
|
15
|
+
leaf: p.leaf,
|
|
16
|
+
merklePath: row.merkle_path ? JSON.parse(row.merkle_path) : [],
|
|
17
|
+
root: batch?.root ?? null,
|
|
18
|
+
batchId: batch?.id ?? null,
|
|
19
|
+
bitcoin: batch?.bitcoinHeight ? { height: batch.bitcoinHeight, time: new Date((batch.bitcoinTime ?? 0) * 1000).toISOString() } : null,
|
|
20
|
+
howToVerify: [
|
|
21
|
+
'SHA-256 of canonicalJson (UTF-8) must equal leaf.',
|
|
22
|
+
'Walk merklePath from leaf: for each step, hash sha256(current || sibling) when side is R, or sha256(sibling || current) when side is L. The result must equal root.',
|
|
23
|
+
`Download the OpenTimestamps proof (/proof/${p.id}.ots) and run: ots verify -d ${batch?.root ?? '<root>'} ${p.id}.ots (or open it at opentimestamps.org). It names the Bitcoin block whose merkle root commits to root.`,
|
|
24
|
+
],
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/** The forecast's batch root as a standard `.ots` file, or null when it has not been stamped yet. */
|
|
28
|
+
export function proofOts(ctx, predictionId) {
|
|
29
|
+
const p = getPrediction(ctx, predictionId);
|
|
30
|
+
const batch = p?.batchId ? getBatch(ctx, p.batchId) : null;
|
|
31
|
+
return batch && batch.receipts.length ? otsFile(batch.root, batch.receipts) : null;
|
|
32
|
+
}
|
|
4
33
|
const toBatch = (r) => ({
|
|
5
34
|
id: r.id,
|
|
6
35
|
root: r.root,
|
|
@@ -21,6 +21,11 @@ export interface Receipt {
|
|
|
21
21
|
/** Hex of the calendar's serialized timestamp for our digest. */
|
|
22
22
|
ots: string;
|
|
23
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* A standard detached `.ots` file for a SHA-256 digest, built from the calendar receipts.
|
|
26
|
+
* Any OpenTimestamps tool can upgrade and verify it, e.g. `ots verify -d <digest> proof.ots`.
|
|
27
|
+
*/
|
|
28
|
+
export declare function otsFile(digestHex: string, receipts: Receipt[]): Buffer;
|
|
24
29
|
export declare function submit(ctx: Ctx, digestHex: string): Promise<{
|
|
25
30
|
receipts: Receipt[];
|
|
26
31
|
provenance: Provenance[];
|
|
@@ -96,6 +96,20 @@ export function parseTimestamp(bytes, digest) {
|
|
|
96
96
|
walk(digest);
|
|
97
97
|
return out;
|
|
98
98
|
}
|
|
99
|
+
const OTS_MAGIC = Buffer.from('004f70656e54696d657374616d7073000050726f6f6600bf89e2e884e89294', 'hex');
|
|
100
|
+
/**
|
|
101
|
+
* A standard detached `.ots` file for a SHA-256 digest, built from the calendar receipts.
|
|
102
|
+
* Any OpenTimestamps tool can upgrade and verify it, e.g. `ots verify -d <digest> proof.ots`.
|
|
103
|
+
*/
|
|
104
|
+
export function otsFile(digestHex, receipts) {
|
|
105
|
+
const parts = [OTS_MAGIC, Buffer.from([0x01, 0x08]), Buffer.from(digestHex, 'hex')];
|
|
106
|
+
receipts.forEach((rc, i) => {
|
|
107
|
+
if (i < receipts.length - 1)
|
|
108
|
+
parts.push(Buffer.from([0xff]));
|
|
109
|
+
parts.push(Buffer.from(rc.ots, 'hex'));
|
|
110
|
+
});
|
|
111
|
+
return Buffer.concat(parts);
|
|
112
|
+
}
|
|
99
113
|
export async function submit(ctx, digestHex) {
|
|
100
114
|
const body = Buffer.from(digestHex, 'hex');
|
|
101
115
|
const results = await Promise.all(CALENDARS.map((c) => ctx.http.postBytes(`${c}/digest`, body, { source: 'opentimestamps', headers: { accept: 'application/vnd.opentimestamps.v1' } })));
|
package/dist/web/assets/fx.js
CHANGED
|
@@ -176,3 +176,30 @@ void main(){
|
|
|
176
176
|
|
|
177
177
|
window.OculonFX = { liquid, stream, reduce: REDUCE };
|
|
178
178
|
})();
|
|
179
|
+
|
|
180
|
+
/*
|
|
181
|
+
* Clean addresses: links to a part of the same page scroll there without adding "#section" to the
|
|
182
|
+
* address bar, and a "#section" that arrives from another page is removed once the page has used it.
|
|
183
|
+
* A page with its own views (the app) sets window.onOculonHash(name) to handle names that are not elements.
|
|
184
|
+
*/
|
|
185
|
+
(function () {
|
|
186
|
+
if (window.__oculonCleanUrl) return;
|
|
187
|
+
window.__oculonCleanUrl = true;
|
|
188
|
+
window.oculonInitialHash = decodeURIComponent(location.hash.slice(1));
|
|
189
|
+
document.addEventListener('click', (e) => {
|
|
190
|
+
if (e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
|
|
191
|
+
const a = e.target.closest && e.target.closest('a[href]');
|
|
192
|
+
if (!a || (a.target && a.target !== '_self') || a.hasAttribute('download')) return;
|
|
193
|
+
const raw = a.getAttribute('href');
|
|
194
|
+
if (raw === '#') { e.preventDefault(); return; }
|
|
195
|
+
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;
|
|
197
|
+
const name = decodeURIComponent(u.hash.slice(1));
|
|
198
|
+
const el = document.getElementById(name);
|
|
199
|
+
if (el) { e.preventDefault(); el.scrollIntoView({ behavior: 'smooth', block: 'start' }); return; }
|
|
200
|
+
if (typeof window.onOculonHash === 'function') { e.preventDefault(); window.onOculonHash(name); }
|
|
201
|
+
});
|
|
202
|
+
const clear = () => { if (location.hash) history.replaceState(history.state, '', location.pathname + location.search); };
|
|
203
|
+
window.oculonClearHash = clear;
|
|
204
|
+
addEventListener('load', () => setTimeout(clear, 2500));
|
|
205
|
+
})();
|
package/dist/web/docs.html
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
body{margin:0;background:var(--bg);color:var(--text);font-family:var(--sans);-webkit-font-smoothing:antialiased;overflow-x:clip}
|
|
18
18
|
a{color:inherit}
|
|
19
19
|
.lbl{font:12px var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--mut)}
|
|
20
|
-
header{position:sticky;top:0;z-index:5;background
|
|
20
|
+
header{position:sticky;top:0;z-index:5;background:#000;border-bottom:1px solid var(--line)}
|
|
21
21
|
header .in{display:flex;align-items:center;justify-content:space-between;padding:18px clamp(20px,3vw,40px);gap:20px}
|
|
22
22
|
.logo{font-size:17px;font-weight:600;letter-spacing:.4em;text-decoration:none}
|
|
23
23
|
.logo span{color:var(--mut);letter-spacing:.2em;font-weight:400;margin-left:10px}
|
|
@@ -34,7 +34,7 @@ main{padding:64px clamp(20px,5vw,72px) 120px;max-width:1020px}
|
|
|
34
34
|
main h1{margin:14px 0 18px;font-size:clamp(44px,5vw,64px);font-weight:300;letter-spacing:-.04em;line-height:1}
|
|
35
35
|
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
36
|
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}
|
|
37
|
+
main p,main li{font-size:17px;line-height:1.7;color:var(--soft);font-weight:300;overflow-wrap:anywhere}
|
|
38
38
|
main ul{padding-left:20px}
|
|
39
39
|
main strong{color:#fff;font-weight:500}
|
|
40
40
|
main a{color:#fff;text-decoration-color:var(--y);text-underline-offset:3px}
|
|
@@ -54,7 +54,7 @@ td:first-child{color:#fff;white-space:nowrap}
|
|
|
54
54
|
/* motion, shared with the landing page */
|
|
55
55
|
#liquidbg{position:fixed;inset:0;width:100%;height:100%;z-index:0;pointer-events:none;opacity:.34}
|
|
56
56
|
header,.layout{position:relative;z-index:1}
|
|
57
|
-
header{position:sticky}
|
|
57
|
+
header{position:sticky;z-index:5}
|
|
58
58
|
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
59
|
@keyframes hscan{to{left:100%}}
|
|
60
60
|
.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 +91,7 @@ aside.left a.on{text-shadow:0 0 18px rgba(0,240,255,.6)}
|
|
|
91
91
|
.qc h3{margin:8px 0 6px;font-size:18px;font-weight:500}
|
|
92
92
|
.qc p{margin:0;font-size:14px !important;line-height:1.55 !important;color:var(--mut) !important}
|
|
93
93
|
.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;
|
|
94
|
+
.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
95
|
.qc .cmd .p{color:var(--y)}
|
|
96
96
|
.cp{background:none;border:1px solid #2a3b3f;color:#9fd8e2;font:11px var(--mono);padding:4px 9px;cursor:pointer;flex:none;transition:all .2s}
|
|
97
97
|
.cp:hover{border-color:var(--y);color:#fff}.cp.ok{border-color:#3fd16b;color:#3fd16b}
|
|
@@ -109,6 +109,10 @@ aside.left a.on{text-shadow:0 0 18px rgba(0,240,255,.6)}
|
|
|
109
109
|
.msearch span{font:12px var(--mono);color:var(--mut)}
|
|
110
110
|
.msearch:focus-within{border-color:var(--y);box-shadow:0 0 22px rgba(0,240,255,.15)}
|
|
111
111
|
.mods{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
|
|
112
|
+
.fusion{border:1px solid #1f2a2d;background:rgba(4,8,9,.85);padding:20px 22px}
|
|
113
|
+
.fusion .ft{font-size:20px;color:#fff;margin:6px 0 4px}.fusion .fs{font:12px var(--mono);color:var(--y);letter-spacing:.08em}
|
|
114
|
+
.fusion ul{list-style:none;padding:0;margin:14px 0 0}.fusion li{font-size:14.5px;line-height:1.55;padding:8px 0;border-top:1px solid #151d20;color:var(--soft)}
|
|
115
|
+
.fusion li b{font:12px var(--mono);color:var(--y);margin-right:8px}
|
|
112
116
|
.mc{border:1px solid #1f2a2d;background:rgba(4,8,9,.85);padding:16px 16px 14px;position:relative;overflow:hidden;transition:border-color .3s,transform .35s;animation:mcin .5s cubic-bezier(.2,.8,.2,1) both}
|
|
113
117
|
@keyframes mcin{from{opacity:0;transform:translateY(12px)}}
|
|
114
118
|
.mc:hover{border-color:rgba(0,240,255,.5);transform:translateY(-2px)}
|
|
@@ -134,7 +138,7 @@ aside.left a.on{text-shadow:0 0 18px rgba(0,240,255,.6)}
|
|
|
134
138
|
<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>
|
|
135
139
|
<div class="dsec"><h2 id="start-here">Start here</h2><p class="sub">Four commands, in the order most people run them.</p>
|
|
136
140
|
<div class="qs">
|
|
137
|
-
<div class="qc"><div class="n">01</div><h3>Install</h3><p>Needs Node.js 22.13 or newer. No runtime dependencies
|
|
141
|
+
<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>
|
|
138
142
|
<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>
|
|
139
143
|
<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>
|
|
140
144
|
<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>
|
|
@@ -151,6 +155,12 @@ aside.left a.on{text-shadow:0 0 18px rgba(0,240,255,.6)}
|
|
|
151
155
|
<div class="dsec"><h2 id="module-finder">Module finder</h2><p class="sub">Every module from the table in <a href="#what-it-does">What it does</a>. Type to filter by name, command or source.</p>
|
|
152
156
|
<label class="msearch"><span>⌕</span><input id="mq" placeholder="cve, ships, satellite, sanctions…" autocomplete="off" spellcheck="false"><span id="mn"></span></label>
|
|
153
157
|
<div class="mods" id="mods"></div></div>
|
|
158
|
+
<div class="dsec"><h2 id="fusion-live">Cross-source fusion, live</h2><p class="sub">The strongest signal on this install right now that more than one independent source agrees on, read from <a href="/api/signals?limit=200">/api/signals</a>. Every line links to the original record.</p>
|
|
159
|
+
<div id="fusion" class="fusion"><p class="skeleton">Loading…</p></div></div>
|
|
160
|
+
<div class="dsec"><h2 id="verify-a-forecast">Verify a forecast yourself</h2><p class="sub">Forecast proofs do not depend on this server. For any forecast id: <code>/api/proof?id=<id></code> gives the forecast, its canonical JSON, hash and Merkle path, and <code>/proof/<id>.ots</code> is a standard OpenTimestamps file.</p>
|
|
161
|
+
<pre><code>sha256(canonicalJson) == leaf # the forecast was not edited
|
|
162
|
+
leaf + merklePath -> root # it is in the stamped batch
|
|
163
|
+
ots verify -d <root> <id>.ots # the root is committed in a Bitcoin block</code></pre></div>
|
|
154
164
|
</section>
|
|
155
165
|
<div id="doc" class="skeleton">Loading…</div>
|
|
156
166
|
<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>
|
|
@@ -187,6 +197,8 @@ function md(src) {
|
|
|
187
197
|
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; }
|
|
188
198
|
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; }
|
|
189
199
|
if (!l.trim()) { i++; continue; }
|
|
200
|
+
// Badge rows ([](...)) are for GitHub; the docs page skips them.
|
|
201
|
+
if (/^\s*\[!\[/.test(l)) { i++; continue; }
|
|
190
202
|
const buf = []; while (i < lines.length && lines[i].trim() && !/^(#|```|\||\s*[-*]\s|\s*\d+\.\s)/.test(lines[i])) buf.push(lines[i++]);
|
|
191
203
|
html += `<p>${inline(buf.join(' '))}</p>`;
|
|
192
204
|
}
|
|
@@ -211,12 +223,31 @@ fetch('/api/readme').then((r) => r.json()).then((j) => {
|
|
|
211
223
|
const first = doc.querySelector('p'); if (first) first.classList.add('intro');
|
|
212
224
|
buildNav(); reveal();
|
|
213
225
|
// A link straight to a section (#remote-mcp) skips the rise-in, which could leave the jumped-to text hidden on phones.
|
|
214
|
-
|
|
226
|
+
const target = window.oculonInitialHash || decodeURIComponent(location.hash.slice(1));
|
|
227
|
+
if (target) {
|
|
215
228
|
document.querySelectorAll('.rv').forEach((el) => { el.classList.add('in'); rvio.unobserve(el); });
|
|
216
|
-
|
|
229
|
+
// Cards above the README (module finder, live fusion) fill in after this, which moves the section down;
|
|
230
|
+
// keep it in place for a moment unless the reader starts scrolling.
|
|
231
|
+
const el = document.getElementById(target);
|
|
232
|
+
if (el) {
|
|
233
|
+
let moved = false;
|
|
234
|
+
const stop = () => { moved = true; };
|
|
235
|
+
['wheel', 'touchstart', 'keydown'].forEach((ev) => addEventListener(ev, stop, { once: true, passive: true }));
|
|
236
|
+
const go = () => { if (!moved) el.scrollIntoView({ behavior: 'instant', block: 'start' }); };
|
|
237
|
+
go(); [150, 500, 1000, 1800, 3000].forEach((ms) => setTimeout(go, ms));
|
|
238
|
+
}
|
|
239
|
+
window.oculonClearHash?.();
|
|
217
240
|
}
|
|
218
241
|
}).catch((e) => { $('doc').textContent = `Could not load the README: ${e.message}`; });
|
|
219
242
|
fetch('/api/meta').then((r) => r.json()).then((m) => { $('ver').textContent = `v${m.version}`; }).catch(() => {});
|
|
243
|
+
// Live fusion example: the top-scored signal whose evidence comes from two or more different sources.
|
|
244
|
+
fetch('/api/signals?limit=200').then((r) => r.json()).then((list) => {
|
|
245
|
+
const multi = (Array.isArray(list) ? list : []).map((s) => ({ s, n: new Set((s.evidence || []).map((e) => e.source)).size })).filter((x) => x.n > 1).sort((a, b) => b.s.score - a.s.score)[0];
|
|
246
|
+
if (!multi) { $('fusion').innerHTML = '<p class="skeleton">No multi-source signal right now. Signals agree across sources a few times a day; check back later.</p>'; return; }
|
|
247
|
+
const s = multi.s;
|
|
248
|
+
const items = (s.evidence || []).slice(0, 8).map((e) => `<li><b>${esc(e.source)}</b>${e.url ? `<a href="${esc(e.url)}" target="_blank" rel="noopener">${esc(String(e.text).slice(0, 180))}</a>` : esc(String(e.text).slice(0, 180))}</li>`).join('');
|
|
249
|
+
$('fusion').innerHTML = `<div class="fs">SCORE ${esc(s.score)} · ${multi.n} SOURCES · ${esc(s.module)} · ${esc(String(s.createdAt).slice(0, 16).replace('T', ' '))} UTC</div><div class="ft">${esc(s.title)}</div><ul>${items}</ul>`;
|
|
250
|
+
}).catch(() => { $('fusion').innerHTML = '<p class="skeleton">Could not load signals right now.</p>'; });
|
|
220
251
|
fetch('/api/console?cmd=help').then((r) => r.json()).then((r) => {
|
|
221
252
|
const o = $('help-out'); o.className = '';
|
|
222
253
|
o.innerHTML = `<pre><code>${esc(r.output).split('\n').map((l) => /^\S/.test(l) ? `<span style="color:#fff;font-weight:700">${l}</span>` : l.replace(/^(\s+)(oculon)\b/, '$1<span class="k">$2</span>')).join('\n')}</code></pre>`;
|
package/dist/web/index.html
CHANGED
|
@@ -400,7 +400,7 @@ nav button { white-space: nowrap; }
|
|
|
400
400
|
<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
401
|
<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
402
|
<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>
|
|
403
|
+
<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
404
|
</div>
|
|
405
405
|
</section>
|
|
406
406
|
<!--onchain--> <section id="tab-robinhood" hidden>
|
|
@@ -1439,7 +1439,6 @@ const signalCard = (s) => shareCard({ kicker: `${s.module} · ${String(s.created
|
|
|
1439
1439
|
function openEntity(id) {
|
|
1440
1440
|
document.querySelectorAll('nav button').forEach((x) => x.setAttribute('aria-selected', 'false'));
|
|
1441
1441
|
document.querySelectorAll('main > section').forEach((s) => { s.hidden = s.id !== 'tab-entity'; });
|
|
1442
|
-
history.replaceState(null, '', '#entity:' + encodeURIComponent(id));
|
|
1443
1442
|
scrollTo({ top: 0 });
|
|
1444
1443
|
loadEntity(id);
|
|
1445
1444
|
}
|
|
@@ -1465,7 +1464,7 @@ async function loadEntity(id) {
|
|
|
1465
1464
|
const d = document.getElementById('ent-dossier'); if (d) d.onclick = () => runInvestigate('dossier', p.name);
|
|
1466
1465
|
} catch (e) { body.innerHTML = `<p class="err">${esc(e.message)}</p>`; }
|
|
1467
1466
|
}
|
|
1468
|
-
addEventListener('hashchange', () => {
|
|
1467
|
+
addEventListener('hashchange', () => { const n = decodeURIComponent(location.hash.slice(1)); if (n) { openView(n); history.replaceState(null, '', location.pathname + location.search); } });
|
|
1469
1468
|
function runInvestigate(kind, q) {
|
|
1470
1469
|
goTab('investigate');
|
|
1471
1470
|
const sel = document.getElementById('inv-kind'); sel.value = kind; sel.dispatchEvent(new Event('change'));
|
|
@@ -1769,11 +1768,15 @@ async function loadAccuracy() {
|
|
|
1769
1768
|
/* ================================================================== PWA */
|
|
1770
1769
|
if ('serviceWorker' in navigator) navigator.serviceWorker.register('/sw.js').catch(() => {});
|
|
1771
1770
|
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
if (
|
|
1776
|
-
else
|
|
1771
|
+
// Views are opened by name (#overview, #entity:org:x) from links, but the address bar stays clean.
|
|
1772
|
+
const openView = (name) => {
|
|
1773
|
+
if (!name) return;
|
|
1774
|
+
if (name.startsWith('entity:')) openEntity(name.slice(7));
|
|
1775
|
+
else document.querySelector(`nav button[data-tab="${CSS.escape(name)}"]`)?.click();
|
|
1776
|
+
};
|
|
1777
|
+
window.onOculonHash = openView;
|
|
1778
|
+
const arrived = decodeURIComponent(location.hash.slice(1));
|
|
1779
|
+
if (arrived) { openView(arrived); history.replaceState(null, '', location.pathname + location.search); }
|
|
1777
1780
|
loadInbox().catch(() => {});
|
|
1778
1781
|
if (!loaded.overview && !document.getElementById('tab-overview').hidden) { loaded.overview = true; loadOverview(); }
|
|
1779
1782
|
|
package/dist/web/landing.html
CHANGED
|
@@ -480,7 +480,7 @@ footer.sitefoot{border-top:1px solid rgba(255,255,255,.12);background:transparen
|
|
|
480
480
|
<div class="card"><div class="cmd">$ oculon case new "<q>"</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
481
|
<div class="card"><div class="cmd">$ oculon rewind <date></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
482
|
<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 "<q>"</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">
|
|
483
|
+
<div class="card"><div class="cmd">$ oculon ask "<q>"</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
484
|
</div>
|
|
485
485
|
</section>
|
|
486
486
|
|
|
@@ -612,7 +612,7 @@ r.provenance <span class="d">// every source used</span></pre></div></div>
|
|
|
612
612
|
<div class="faq">
|
|
613
613
|
<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
614
|
<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
|
|
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. To try it without installing, use <code>npx oculon tour</code>.</p></details>
|
|
616
616
|
<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
617
|
<!--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
618
|
<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-->
|
|
@@ -1114,7 +1114,8 @@ api('/api/forecasts').then(async (r) => {
|
|
|
1114
1114
|
const p = v.result;
|
|
1115
1115
|
$('fc-proof').innerHTML = `<div class="lbl">Proof · Tortoise</div><div class="steps">${(p.steps || []).map((s) => `<div class="step"><div class="ck">✓</div><p>${esc(s)}</p></div>`).join('')}</div>
|
|
1116
1116
|
<div class="verified">● ${esc(p.status)}${p.bitcoin?.height ? ` · BITCOIN BLOCK ${esc(p.bitcoin.height)}` : ''}</div>
|
|
1117
|
-
<div class="hash">leaf ${esc(p.leaf)}${p.bitcoin?.blockHash ? `<br>block ${esc(p.bitcoin.blockHash)}` : ''}</div
|
|
1117
|
+
<div class="hash">leaf ${esc(p.leaf)}${p.bitcoin?.blockHash ? `<br>block ${esc(p.bitcoin.blockHash)}` : ''}</div>
|
|
1118
|
+
<div class="src" style="margin-top:14px;line-height:1.8">Check it without Oculon: <a href="/proof/${encodeURIComponent(f.id)}.ots" download>OpenTimestamps proof (.ots)</a> · <a href="/api/proof?id=${encodeURIComponent(f.id)}" target="_blank" rel="noopener">forecast, hash and Merkle path</a>${p.bitcoin?.blockHash ? ` · <a href="https://blockstream.info/block/${encodeURIComponent(p.bitcoin.blockHash)}" target="_blank" rel="noopener">block on Blockstream</a>` : ''}<br><code>ots verify -d ${esc(p.root || '')} ${esc(f.id)}.ots</code></div>`;
|
|
1118
1119
|
const steps = [...document.querySelectorAll('#fc-proof .step')];
|
|
1119
1120
|
new IntersectionObserver((es, o) => { if (es.some((e) => e.isIntersecting)) { steps.forEach((s, i) => setTimeout(() => s.classList.add('in'), 300 + i * 450)); o.disconnect(); } }, { threshold: .3 }).observe($('fc-proof'));
|
|
1120
1121
|
} catch { $('fc-proof').innerHTML = '<div class="lbl">Proof · Tortoise</div><p class="mut" style="margin-top:14px">Verification unavailable right now. Run oculon proof verify to check it locally.</p>'; }
|
package/dist/web/legal.html
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:90px}
|
|
17
17
|
body{margin:0;background:#000;color:#fff;font-family:var(--sans);-webkit-font-smoothing:antialiased;overflow-x:clip}
|
|
18
18
|
a{color:inherit}
|
|
19
|
-
header{position:sticky;top:0;z-index:5;background
|
|
19
|
+
header{position:sticky;top:0;z-index:5;background:#000;border-bottom:1px solid var(--line)}
|
|
20
20
|
header .in{display:flex;align-items:center;justify-content:space-between;padding:18px clamp(20px,3vw,40px);gap:20px}
|
|
21
21
|
.logo{font-size:17px;font-weight:600;letter-spacing:.4em;text-decoration:none}
|
|
22
22
|
header nav{display:flex;gap:24px;font-size:14px}header nav a{text-decoration:none;color:var(--soft)}
|
|
@@ -36,7 +36,7 @@ footer a{color:var(--mut)}
|
|
|
36
36
|
/* motion, shared with the landing page and docs */
|
|
37
37
|
#liquidbg{position:fixed;inset:0;width:100%;height:100%;z-index:0;pointer-events:none;opacity:.36}
|
|
38
38
|
header,main,footer{position:relative;z-index:1}
|
|
39
|
-
header{position:sticky}
|
|
39
|
+
header{position:sticky;z-index:5}
|
|
40
40
|
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
41
|
@keyframes hscan{to{left:100%}}
|
|
42
42
|
.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}
|
package/dist/web/mcp.html
CHANGED
|
@@ -17,7 +17,7 @@ body{margin:0;background:var(--bg);color:var(--text);font-family:var(--sans);-we
|
|
|
17
17
|
a{color:inherit}
|
|
18
18
|
#liquidbg{position:fixed;inset:0;width:100%;height:100%;z-index:0;pointer-events:none;opacity:.3}
|
|
19
19
|
header,main,footer{position:relative;z-index:1}
|
|
20
|
-
header{position:sticky;top:0;z-index:5;background
|
|
20
|
+
header{position:sticky;top:0;z-index:5;background:#000;border-bottom:1px solid var(--line)}
|
|
21
21
|
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
22
|
.logo{font-size:17px;font-weight:600;letter-spacing:.4em;text-decoration:none}
|
|
23
23
|
.logo span{color:var(--y);letter-spacing:.2em;font-weight:400;margin-left:8px}
|
package/dist/web/public.js
CHANGED
package/dist/web/server.js
CHANGED
|
@@ -244,6 +244,7 @@ export const ROUTES = {
|
|
|
244
244
|
'/api/quota': (_q, o) => o.quota(),
|
|
245
245
|
'/api/forecasts': (_q, o) => ({ scoreboard: o.scoreboard(), forecasts: o.forecasts('all', 200) }),
|
|
246
246
|
'/api/verify': async (q, o) => slim(await o.verifyProof(need(q, 'id', 64))),
|
|
247
|
+
'/api/proof': (q, o) => o.proofBundle(need(q, 'id', 64)),
|
|
247
248
|
'/api/entity': (q, o) => o.entity(need(q, 'id', 300)),
|
|
248
249
|
'/api/exposure': async (q, o) => slim(await o.exposure(need(q, 'domain', 120))),
|
|
249
250
|
'/api/podcast': async (q, o) => slim(await o.podcast(need(q, 'q', 120))),
|
|
@@ -652,6 +653,19 @@ export function createWebServer(opts = {}) {
|
|
|
652
653
|
res.setHeader('access-control-allow-origin', '*');
|
|
653
654
|
return send(res, 200, JSON.stringify(openApiSpec(siteDomain ? `https://app.${siteDomain}` : `http://${req.headers.host ?? '127.0.0.1'}`), null, 2), 'application/json; charset=utf-8', 'public, max-age=3600');
|
|
654
655
|
}
|
|
656
|
+
// A forecast's OpenTimestamps proof as a standard .ots file, for checking with any OpenTimestamps tool.
|
|
657
|
+
const otsId = /^\/proof\/([A-Za-z0-9_-]{1,64})\.ots$/.exec(url.pathname)?.[1];
|
|
658
|
+
if (otsId) {
|
|
659
|
+
let file = null;
|
|
660
|
+
try {
|
|
661
|
+
file = oculon.proofOts(otsId);
|
|
662
|
+
}
|
|
663
|
+
catch { }
|
|
664
|
+
if (!file)
|
|
665
|
+
return send(res, 404, '{"error":"no stamped proof for this forecast yet"}', 'application/json');
|
|
666
|
+
res.writeHead(200, { 'content-type': 'application/vnd.opentimestamps.v1', 'content-disposition': `attachment; filename="${otsId}.ots"`, 'cache-control': 'public, max-age=3600', 'access-control-allow-origin': '*' });
|
|
667
|
+
return void res.end(file);
|
|
668
|
+
}
|
|
655
669
|
// Shared results: /r/<id> is a public snapshot page with link-preview tags.
|
|
656
670
|
const shareId = /^\/r\/([A-Za-z0-9_-]{6,16})\/?$/.exec(url.pathname)?.[1];
|
|
657
671
|
if (shareId) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oculon",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Open-source intelligence engine and agent: cross-source signals with provenance from 50+ public sources (routing, exploits, ships, aircraft, satellites, markets), forecasts timestamped on Bitcoin. CLI, SDK, MCP server, web app and Telegram bot.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"osint",
|