oculon 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/README.md +344 -2
- package/dist/agent.d.ts +47 -0
- package/dist/agent.js +104 -0
- package/dist/cases.d.ts +68 -0
- package/dist/cases.js +158 -0
- package/dist/cli/main.d.ts +12 -0
- package/dist/cli/main.js +1999 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +15 -0
- package/dist/core/context.d.ts +19 -0
- package/dist/core/context.js +19 -0
- package/dist/core/features.d.ts +22 -0
- package/dist/core/features.js +28 -0
- package/dist/core/graph.d.ts +38 -0
- package/dist/core/graph.js +81 -0
- package/dist/core/http.d.ts +42 -0
- package/dist/core/http.js +266 -0
- package/dist/core/keys.d.ts +8 -0
- package/dist/core/keys.js +22 -0
- package/dist/core/llm.d.ts +93 -0
- package/dist/core/llm.js +180 -0
- package/dist/core/merkle.d.ts +15 -0
- package/dist/core/merkle.js +46 -0
- package/dist/core/paths.d.ts +2 -0
- package/dist/core/paths.js +6 -0
- package/dist/core/png.d.ts +17 -0
- package/dist/core/png.js +101 -0
- package/dist/core/quota.d.ts +15 -0
- package/dist/core/quota.js +90 -0
- package/dist/core/stats.d.ts +24 -0
- package/dist/core/stats.js +67 -0
- package/dist/core/store.d.ts +20 -0
- package/dist/core/store.js +213 -0
- package/dist/core/text.d.ts +9 -0
- package/dist/core/text.js +30 -0
- package/dist/core/types.d.ts +38 -0
- package/dist/core/types.js +1 -0
- package/dist/index.d.ts +342 -0
- package/dist/index.js +495 -0
- package/dist/live.d.ts +53 -0
- package/dist/live.js +236 -0
- package/dist/mcp.d.ts +43 -0
- package/dist/mcp.js +651 -0
- package/dist/modules/airport.d.ts +60 -0
- package/dist/modules/airport.js +111 -0
- package/dist/modules/audit.d.ts +73 -0
- package/dist/modules/audit.js +211 -0
- package/dist/modules/bgp.d.ts +147 -0
- package/dist/modules/bgp.js +206 -0
- package/dist/modules/blackout.d.ts +41 -0
- package/dist/modules/blackout.js +98 -0
- package/dist/modules/brief.d.ts +26 -0
- package/dist/modules/brief.js +99 -0
- package/dist/modules/calendar.d.ts +27 -0
- package/dist/modules/calendar.js +145 -0
- package/dist/modules/calibrate.d.ts +46 -0
- package/dist/modules/calibrate.js +92 -0
- package/dist/modules/cloud.d.ts +32 -0
- package/dist/modules/cloud.js +94 -0
- package/dist/modules/condor.d.ts +66 -0
- package/dist/modules/condor.js +214 -0
- package/dist/modules/connect.d.ts +47 -0
- package/dist/modules/connect.js +114 -0
- package/dist/modules/contradictions.d.ts +27 -0
- package/dist/modules/contradictions.js +76 -0
- package/dist/modules/country.d.ts +82 -0
- package/dist/modules/country.js +136 -0
- package/dist/modules/cricket.d.ts +34 -0
- package/dist/modules/cricket.js +166 -0
- package/dist/modules/darkships.d.ts +219 -0
- package/dist/modules/darkships.js +400 -0
- package/dist/modules/defi.d.ts +237 -0
- package/dist/modules/defi.js +512 -0
- package/dist/modules/emailsec.d.ts +47 -0
- package/dist/modules/emailsec.js +146 -0
- package/dist/modules/exposure.d.ts +43 -0
- package/dist/modules/exposure.js +89 -0
- package/dist/modules/factcheck.d.ts +39 -0
- package/dist/modules/factcheck.js +127 -0
- package/dist/modules/falcon.d.ts +58 -0
- package/dist/modules/falcon.js +219 -0
- package/dist/modules/feedback.d.ts +24 -0
- package/dist/modules/feedback.js +37 -0
- package/dist/modules/fence.d.ts +52 -0
- package/dist/modules/fence.js +128 -0
- package/dist/modules/ferret.d.ts +47 -0
- package/dist/modules/ferret.js +220 -0
- package/dist/modules/filings.d.ts +86 -0
- package/dist/modules/filings.js +166 -0
- package/dist/modules/fires.d.ts +56 -0
- package/dist/modules/fires.js +150 -0
- package/dist/modules/hazards.d.ts +37 -0
- package/dist/modules/hazards.js +83 -0
- package/dist/modules/health.d.ts +24 -0
- package/dist/modules/health.js +82 -0
- package/dist/modules/heron.d.ts +68 -0
- package/dist/modules/heron.js +184 -0
- package/dist/modules/hound.d.ts +100 -0
- package/dist/modules/hound.js +301 -0
- package/dist/modules/impact.d.ts +39 -0
- package/dist/modules/impact.js +63 -0
- package/dist/modules/launches.d.ts +24 -0
- package/dist/modules/launches.js +61 -0
- package/dist/modules/listen.d.ts +48 -0
- package/dist/modules/listen.js +125 -0
- package/dist/modules/lynx.d.ts +43 -0
- package/dist/modules/lynx.js +127 -0
- package/dist/modules/magpie.d.ts +70 -0
- package/dist/modules/magpie.js +174 -0
- package/dist/modules/meerkat.d.ts +42 -0
- package/dist/modules/meerkat.js +293 -0
- package/dist/modules/monitor.d.ts +27 -0
- package/dist/modules/monitor.js +105 -0
- package/dist/modules/narratives.d.ts +33 -0
- package/dist/modules/narratives.js +136 -0
- package/dist/modules/owl.d.ts +71 -0
- package/dist/modules/owl.js +290 -0
- package/dist/modules/papers.d.ts +46 -0
- package/dist/modules/papers.js +135 -0
- package/dist/modules/personal.d.ts +54 -0
- package/dist/modules/personal.js +153 -0
- package/dist/modules/pulse.d.ts +19 -0
- package/dist/modules/pulse.js +59 -0
- package/dist/modules/raven.d.ts +80 -0
- package/dist/modules/raven.js +147 -0
- package/dist/modules/recall.d.ts +44 -0
- package/dist/modules/recall.js +123 -0
- package/dist/modules/regs.d.ts +88 -0
- package/dist/modules/regs.js +142 -0
- package/dist/modules/rewind.d.ts +22 -0
- package/dist/modules/rewind.js +68 -0
- package/dist/modules/sanctions.d.ts +62 -0
- package/dist/modules/sanctions.js +173 -0
- package/dist/modules/scam.d.ts +43 -0
- package/dist/modules/scam.js +111 -0
- package/dist/modules/scoop.d.ts +31 -0
- package/dist/modules/scoop.js +74 -0
- package/dist/modules/ships.d.ts +33 -0
- package/dist/modules/ships.js +113 -0
- package/dist/modules/sky.d.ts +47 -0
- package/dist/modules/sky.js +183 -0
- package/dist/modules/squawk.d.ts +46 -0
- package/dist/modules/squawk.js +106 -0
- package/dist/modules/tortoise.d.ts +40 -0
- package/dist/modules/tortoise.js +104 -0
- package/dist/modules/travel.d.ts +94 -0
- package/dist/modules/travel.js +241 -0
- package/dist/modules/urlcheck.d.ts +63 -0
- package/dist/modules/urlcheck.js +223 -0
- package/dist/modules/vulns.d.ts +142 -0
- package/dist/modules/vulns.js +276 -0
- package/dist/plugins.d.ts +41 -0
- package/dist/plugins.js +70 -0
- package/dist/report.d.ts +12 -0
- package/dist/report.js +90 -0
- package/dist/scheduler.d.ts +22 -0
- package/dist/scheduler.js +139 -0
- package/dist/sources/aircraft.d.ts +76 -0
- package/dist/sources/aircraft.js +107 -0
- package/dist/sources/airports.d.ts +28 -0
- package/dist/sources/airports.js +100 -0
- package/dist/sources/ais.d.ts +32 -0
- package/dist/sources/ais.js +111 -0
- package/dist/sources/apify.d.ts +28 -0
- package/dist/sources/apify.js +80 -0
- package/dist/sources/arxiv.d.ts +13 -0
- package/dist/sources/arxiv.js +27 -0
- package/dist/sources/certs.d.ts +12 -0
- package/dist/sources/certs.js +23 -0
- package/dist/sources/corp.d.ts +46 -0
- package/dist/sources/corp.js +60 -0
- package/dist/sources/earth.d.ts +39 -0
- package/dist/sources/earth.js +76 -0
- package/dist/sources/fda.d.ts +77 -0
- package/dist/sources/fda.js +121 -0
- package/dist/sources/finance.d.ts +181 -0
- package/dist/sources/finance.js +270 -0
- package/dist/sources/gdelt.d.ts +19 -0
- package/dist/sources/gdelt.js +33 -0
- package/dist/sources/github.d.ts +17 -0
- package/dist/sources/github.js +33 -0
- package/dist/sources/hackernews.d.ts +20 -0
- package/dist/sources/hackernews.js +37 -0
- package/dist/sources/labels.d.ts +21 -0
- package/dist/sources/labels.js +87 -0
- package/dist/sources/launch.d.ts +16 -0
- package/dist/sources/launch.js +41 -0
- package/dist/sources/ofac.d.ts +29 -0
- package/dist/sources/ofac.js +86 -0
- package/dist/sources/onchain.d.ts +77 -0
- package/dist/sources/onchain.js +189 -0
- package/dist/sources/opentimestamps.d.ts +44 -0
- package/dist/sources/opentimestamps.js +131 -0
- package/dist/sources/polymarket.d.ts +36 -0
- package/dist/sources/polymarket.js +70 -0
- package/dist/sources/predict.d.ts +18 -0
- package/dist/sources/predict.js +59 -0
- package/dist/sources/press.d.ts +30 -0
- package/dist/sources/press.js +111 -0
- package/dist/sources/resend.d.ts +14 -0
- package/dist/sources/resend.js +29 -0
- package/dist/sources/robinhood.d.ts +109 -0
- package/dist/sources/robinhood.js +129 -0
- package/dist/sources/sec.d.ts +67 -0
- package/dist/sources/sec.js +129 -0
- package/dist/sources/sentinel.d.ts +13 -0
- package/dist/sources/sentinel.js +63 -0
- package/dist/sources/signatures.d.ts +14 -0
- package/dist/sources/signatures.js +103 -0
- package/dist/sources/social.d.ts +22 -0
- package/dist/sources/social.js +56 -0
- package/dist/sources/space.d.ts +160 -0
- package/dist/sources/space.js +230 -0
- package/dist/sources/usgs.d.ts +17 -0
- package/dist/sources/usgs.js +24 -0
- package/dist/sources/wayback.d.ts +10 -0
- package/dist/sources/wayback.js +28 -0
- package/dist/sources/websec.d.ts +19 -0
- package/dist/sources/websec.js +40 -0
- package/dist/sources/wikidata.d.ts +11 -0
- package/dist/sources/wikidata.js +30 -0
- package/dist/sources/wikimedia.d.ts +28 -0
- package/dist/sources/wikimedia.js +52 -0
- package/dist/telegram.d.ts +104 -0
- package/dist/telegram.js +927 -0
- package/dist/web/assets/favicon-32.png +0 -0
- package/dist/web/assets/fx.js +178 -0
- package/dist/web/assets/icon-192.png +0 -0
- package/dist/web/assets/icon-512.png +0 -0
- package/dist/web/assets/icon-maskable-512.png +0 -0
- package/dist/web/assets/night-americas.jpg +0 -0
- package/dist/web/assets/night-emea.jpg +0 -0
- package/dist/web/assets/og.png +0 -0
- package/dist/web/assets/redsea-bm.jpg +0 -0
- package/dist/web/docs.html +263 -0
- package/dist/web/index.html +1828 -0
- package/dist/web/insights.d.ts +100 -0
- package/dist/web/insights.js +134 -0
- package/dist/web/landing.html +1143 -0
- package/dist/web/legal.html +176 -0
- package/dist/web/manifest.webmanifest +20 -0
- package/dist/web/mcp.html +104 -0
- package/dist/web/mcphttp.d.ts +10 -0
- package/dist/web/mcphttp.js +67 -0
- package/dist/web/openapi.d.ts +1 -0
- package/dist/web/openapi.js +51 -0
- package/dist/web/public.d.ts +45 -0
- package/dist/web/public.js +135 -0
- package/dist/web/server.d.ts +69 -0
- package/dist/web/server.js +750 -0
- package/dist/web/share.d.ts +35 -0
- package/dist/web/share.js +132 -0
- package/dist/web/sw.js +28 -0
- package/package.json +60 -4
package/dist/mcp.js
ADDED
|
@@ -0,0 +1,651 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Oculon MCP server over stdio (JSON-RPC 2.0, one message per line). No dependencies.
|
|
3
|
+
* Lets Claude and other MCP clients call every Oculon module as a tool.
|
|
4
|
+
*/
|
|
5
|
+
import { readFileSync } from 'node:fs';
|
|
6
|
+
import { createInterface } from 'node:readline';
|
|
7
|
+
import { Oculon, summarizeProvenance } from './index.js';
|
|
8
|
+
import { ONCHAIN_TOOLS, onchainEnabled } from './core/features.js';
|
|
9
|
+
import { availableKinds } from './modules/monitor.js';
|
|
10
|
+
export const SERVER_INFO = { name: 'oculon', version: '0.1.0' };
|
|
11
|
+
const SUPPORTED = ['2025-06-18', '2025-03-26', '2024-11-05'];
|
|
12
|
+
const str = (d) => ({ type: 'string', description: d });
|
|
13
|
+
const num = (d) => ({ type: 'number', description: d });
|
|
14
|
+
const schema = (props = {}, required = []) => ({ type: 'object', properties: props, required, additionalProperties: false });
|
|
15
|
+
/** Module results go out as result + signals + a compact provenance summary (full per-request provenance is noisy). */
|
|
16
|
+
function compact(r) {
|
|
17
|
+
return { module: r.module, input: r.input, generatedAt: r.generatedAt, result: r.result, signals: r.signals, provenance: summarizeProvenance(r.provenance) };
|
|
18
|
+
}
|
|
19
|
+
export const TOOLS = [
|
|
20
|
+
{
|
|
21
|
+
name: 'oculon_radar',
|
|
22
|
+
description: 'Global anomaly radar. Finds what the world is suddenly paying attention to right now (Wikipedia readership spikes, Hacker News traction, Polymarket swings, strong earthquakes, severe natural events) and fuses items about the same subject into corroborated signals with evidence.',
|
|
23
|
+
inputSchema: schema(),
|
|
24
|
+
run: async (o) => compact(await o.radar()),
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'oculon_footprint',
|
|
28
|
+
description: 'Pre-release footprints of a domain: hostnames that newly appeared in Certificate Transparency logs, pages newly archived by the Wayback Machine, and newly created public GitHub repos. Good for spotting unannounced products.',
|
|
29
|
+
inputSchema: schema({ domain: str('Domain, e.g. openai.com'), days: num('Look-back window in days (default 30)'), github_org: str('GitHub org to check (default: first label of the domain)') }, ['domain']),
|
|
30
|
+
run: async (o, a) => compact(await o.footprint(String(a.domain), { ...(a.days ? { days: Number(a.days) } : {}), ...(a.github_org ? { org: String(a.github_org) } : {}) })),
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'oculon_hype',
|
|
34
|
+
description: 'Hype-cycle phase of a topic (DORMANT, EMERGING, RISING, PEAK, COOLING, STEADY) from 8 weeks of Wikipedia readers, Hacker News stories, global news share (GDELT), arXiv papers and new GitHub repos.',
|
|
35
|
+
inputSchema: schema({ topic: str('Topic, e.g. "ai agent"') }, ['topic']),
|
|
36
|
+
run: async (o, a) => compact(await o.hype(String(a.topic))),
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'oculon_aircraft',
|
|
40
|
+
description: 'Track one aircraft by registration (e.g. N628TS) or ICAO hex: type, registered owner, live position from ADS-B, nearest airport, and movement since the previous check.',
|
|
41
|
+
inputSchema: schema({ query: str('Registration or 6-character ICAO hex') }, ['query']),
|
|
42
|
+
run: async (o, a) => compact(await o.aircraft(String(a.query))),
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'oculon_military_air',
|
|
46
|
+
description: 'Worldwide military air traffic from open ADS-B data, grouped by region, with notable roles (tanker, AWACS, ISR, bomber, maritime patrol) and surges versus the region history.',
|
|
47
|
+
inputSchema: schema(),
|
|
48
|
+
run: async (o) => compact(await o.military()),
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'oculon_dossier',
|
|
52
|
+
description: 'Dossier on a company, person or project: Wikipedia profile and readership spike, Hacker News stories, news, related Polymarket markets, new GitHub repos, SEC filings (if enabled), merged into one timeline with a fused signal.',
|
|
53
|
+
inputSchema: schema({ name: str('Entity name, e.g. Nvidia'), github: str('GitHub org/user to check (default: name without spaces)') }, ['name']),
|
|
54
|
+
run: async (o, a) => compact(await o.dossier(String(a.name), a.github ? { github: String(a.github) } : {})),
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'oculon_natural_events',
|
|
58
|
+
description: 'Open natural events from NASA EONET (tropical cyclones, wildfires, volcanoes, floods, icebergs) with a severity score.',
|
|
59
|
+
inputSchema: schema({ days: num('Events updated in the last N days (default 7)') }),
|
|
60
|
+
run: async (o, a) => compact(await o.naturalEvents(a.days ? Number(a.days) : undefined)),
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'oculon_night_lights',
|
|
64
|
+
description: 'Night-time lights of a place from NASA VIIRS satellite data: recent nights versus a baseline month. A sharp drop can indicate blackout, conflict or evacuation; a rise can indicate new activity.',
|
|
65
|
+
inputSchema: schema({ place: str('Place name, e.g. "Gaza Strip" or "Kyiv"') }, ['place']),
|
|
66
|
+
run: async (o, a) => compact(await o.nightLights(String(a.place))),
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: 'oculon_satellite_image',
|
|
70
|
+
description: 'True-color satellite image (NASA MODIS, about 250 m) of a place for a date. Returns the image.',
|
|
71
|
+
inputSchema: schema({ place: str('Place name'), date: str('YYYY-MM-DD (default: yesterday)') }, ['place']),
|
|
72
|
+
run: async (o, a) => {
|
|
73
|
+
const r = await o.satelliteImage(String(a.place), a.date ? String(a.date) : undefined);
|
|
74
|
+
return { __image: r.result.file, meta: { place: r.result.place.name, date: r.result.date, file: r.result.file } };
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'oculon_sentinel_image',
|
|
79
|
+
description: 'Sharp satellite image (Copernicus Sentinel-2, 10 m per pixel; or Sentinel-1 radar that sees through clouds) of a place, least cloudy pass in the window ending on the date. Returns the image.',
|
|
80
|
+
inputSchema: schema({ place: str('Place name'), date: str('YYYY-MM-DD window end (default today)'), radar: { type: 'boolean', description: 'Use Sentinel-1 radar instead of optical' } }, ['place']),
|
|
81
|
+
run: async (o, a) => {
|
|
82
|
+
const r = await o.sentinel(String(a.place), { ...(a.date ? { date: String(a.date) } : {}), kind: a.radar === true ? 'radar' : 'optical' });
|
|
83
|
+
const s = r.result.shots[0];
|
|
84
|
+
return { __image: s.file, meta: { place: s.place.name, window: `${s.from} to ${s.to}`, kind: s.kind, file: s.file } };
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: 'oculon_forecast',
|
|
89
|
+
description: 'Record a probability forecast for the first outcome of an open Polymarket market. The market price at that moment is stored as the baseline, and the forecast is hashed for later proof.',
|
|
90
|
+
inputSchema: schema({ market_slug: str('Polymarket market slug'), probability: num('Probability between 0 and 1 (exclusive)'), rationale: str('Why') }, ['market_slug', 'probability']),
|
|
91
|
+
run: async (o, a) => compact(await o.forecast(String(a.market_slug), Number(a.probability), a.rationale ? String(a.rationale) : '')),
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: 'oculon_auto_forecast',
|
|
95
|
+
description: 'Make automatic forecasts on Polymarket markets whose 24h swing is corroborated by another independent source (documented momentum rule).',
|
|
96
|
+
inputSchema: schema(),
|
|
97
|
+
run: async (o) => compact(await o.autoForecast()),
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: 'oculon_resolve_forecasts',
|
|
101
|
+
description: 'Check open forecasts against Polymarket and score the resolved ones (Brier score versus the market price at forecast time).',
|
|
102
|
+
inputSchema: schema(),
|
|
103
|
+
run: async (o) => compact(await o.resolveForecasts()),
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: 'oculon_scoreboard',
|
|
107
|
+
description: 'Forecast track record: counts, Brier scores of the model and of the market, and skill versus the market.',
|
|
108
|
+
inputSchema: schema(),
|
|
109
|
+
run: (o) => o.scoreboard(),
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: 'oculon_stamp_proofs',
|
|
113
|
+
description: 'Timestamp all not-yet-stamped forecasts on Bitcoin via OpenTimestamps (Merkle batch, free).',
|
|
114
|
+
inputSchema: schema(),
|
|
115
|
+
run: async (o) => compact(await o.stampProofs()),
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: 'oculon_verify_proof',
|
|
119
|
+
description: 'Verify a forecast proof: recompute its hash, check the Merkle path, and check the Bitcoin attestation against the block merkle root. Returns VERIFIED, PENDING, NOT_STAMPED, TAMPERED or ERROR.',
|
|
120
|
+
inputSchema: schema({ prediction_id: str('Forecast id, e.g. raven-2538036424ba') }, ['prediction_id']),
|
|
121
|
+
run: async (o, a) => compact(await o.verifyProof(String(a.prediction_id))),
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: 'oculon_wallet',
|
|
125
|
+
description: 'On-chain wallet intelligence for an EVM (0x...) or Solana address: portfolio value and top holdings, first transaction and age, recent transactions, risk labels (GoPlus, Webacy), and balance on Robinhood Chain.',
|
|
126
|
+
inputSchema: schema({ address: str('Wallet address') }, ['address']),
|
|
127
|
+
run: async (o, a) => compact(await o.wallet(String(a.address))),
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: 'oculon_token',
|
|
131
|
+
description: 'Token contract check: honeypot and owner-power flags, buy/sell tax and holders (GoPlus), DEX pairs and liquidity (DexScreener), price and market cap (CoinGecko). Returns DANGER, CAUTION, OK or UNKNOWN with reasons.',
|
|
132
|
+
inputSchema: schema({ address: str('Token contract address (0x...)'), chain: { type: 'string', enum: ['eth', 'base', 'arbitrum', 'bsc', 'polygon', 'robinhood'], description: 'Chain (default eth)' } }, ['address']),
|
|
133
|
+
run: async (o, a) => compact(await o.token(String(a.address), a.chain ? String(a.chain) : 'eth')),
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: 'oculon_ships',
|
|
137
|
+
description: 'Live vessels around a port or sea area from AIS (aisstream.io), listening for a number of seconds: totals, moving vs anchored/moored, vessel types (cargo, tanker, military...), names. Coverage depends on community receivers; an empty result says so.',
|
|
138
|
+
inputSchema: schema({ place: str('Port or sea area, e.g. "Port of Rotterdam" or "Singapore Strait"'), seconds: num('Listening window, 10-120 (default 30)') }, ['place']),
|
|
139
|
+
run: async (o, a) => compact(await o.ships(String(a.place), a.seconds ? Number(a.seconds) : 30)),
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: 'oculon_ship',
|
|
143
|
+
description: 'Follow one ship by its 9-digit MMSI and return its latest AIS position, speed and status if it reports within the window.',
|
|
144
|
+
inputSchema: schema({ mmsi: str('9-digit MMSI'), seconds: num('Listening window, 10-180 (default 60)') }, ['mmsi']),
|
|
145
|
+
run: async (o, a) => compact(await o.ship(String(a.mmsi), a.seconds ? Number(a.seconds) : 60)),
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: 'oculon_robinhood',
|
|
149
|
+
description: 'Robinhood Chain (id 4663) right now: chain activity, trending pools and pools created in the last hours, each with risk flags (thin liquidity, buys without sells, sudden dumps).',
|
|
150
|
+
inputSchema: schema(),
|
|
151
|
+
run: async (o) => compact(await o.robinhood()),
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: 'oculon_robinhood_token',
|
|
155
|
+
description: 'Risk read on a Robinhood Chain token: contract verification, top-10 holder concentration, holders, and pool behavior. Returns DANGER, CAUTION, OK or UNKNOWN with reasons.',
|
|
156
|
+
inputSchema: schema({ address: str('Token address (0x...)') }, ['address']),
|
|
157
|
+
run: async (o, a) => compact(await o.robinhoodToken(String(a.address))),
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: 'oculon_robinhood_deployer',
|
|
161
|
+
description: 'Robinhood Chain deployer reputation: from a token or deployer address, find every token that wallet launched (directly or through a launchpad) and how many are dead now. Flags serial launchers.',
|
|
162
|
+
inputSchema: schema({ address: str('Token or deployer address (0x...)') }, ['address']),
|
|
163
|
+
run: async (o, a) => compact(await o.robinhoodDeployer(String(a.address))),
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: 'oculon_space_weather',
|
|
167
|
+
description: 'Current space weather from NOAA SWPC: planetary K index, geomagnetic storm level (G1-G5) and the strongest solar flare of the last 7 days.',
|
|
168
|
+
inputSchema: schema(),
|
|
169
|
+
run: async (o) => compact(await o.spaceWeather()),
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: 'oculon_air_quality',
|
|
173
|
+
description: 'Latest PM2.5 air quality from monitoring stations near a place (OpenAQ), with the US EPA category.',
|
|
174
|
+
inputSchema: schema({ place: str('Place name, e.g. "New Delhi"') }, ['place']),
|
|
175
|
+
run: async (o, a) => compact(await o.airQuality(String(a.place))),
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
name: 'oculon_url_check',
|
|
179
|
+
description: 'Is a link dangerous? Checks Google Safe Browsing, URLhaus (abuse.ch), urlscan.io scan history, domain age and registrar (RDAP), and warning signs in the URL itself (brand names on other domains, punycode, risky TLDs). Returns a verdict (malicious, suspicious, no known threats), a 0-100 risk and the reasons.',
|
|
180
|
+
inputSchema: schema({ url: str('The link or domain, e.g. "https://paypa1-login.top/verify"') }, ['url']),
|
|
181
|
+
run: async (o, a) => compact(await o.urlCheck(String(a.url))),
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: 'oculon_audit',
|
|
185
|
+
description: 'Dependency audit for developers. Pass the text of a package.json or requirements.txt, or items like "npm:express@4.17.1 pypi:requests==2.19.0". For each package: known vulnerabilities with CVSS, deprecation, last release, versions behind, OpenSSF Scorecard and maintenance, license; plus a 0-100 risk. Source: deps.dev.',
|
|
186
|
+
inputSchema: schema({ manifest: str('package.json or requirements.txt contents, or "npm:name@version" items'), max: num('Maximum packages to check (default 60, up to 150)') }, ['manifest']),
|
|
187
|
+
run: async (o, a) => compact(await o.audit(String(a.manifest), a.max ? { max: Number(a.max) } : {})),
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
name: 'oculon_fact_check',
|
|
191
|
+
description: 'Fact check a claim, or the main claim of a news link. Finds published fact checks (Google Fact Check Tools: Snopes, AFP, PolitiFact, Full Fact and others) and current reporting, then gives a verdict (true, mostly true, mixed, misleading, false, unverified) with a confidence and a summary that cites the numbered sources.',
|
|
192
|
+
inputSchema: schema({ claim: str('The claim, or a URL of an article') }, ['claim']),
|
|
193
|
+
run: async (o, a) => compact(await o.factCheck(String(a.claim))),
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
name: 'oculon_travel',
|
|
197
|
+
description: 'Travel and place risk brief for the coming week: US State Department and UK FCDO advice, 7-day weather warnings (storms, heavy rain, gusts, heat, cold, UV), PM2.5 air quality, WHO disease outbreak news, GDACS disaster alerts, nearby earthquakes, satellite heat detections and confirmed internet outages. Returns a level (low, moderate, high, severe) with the reasons.',
|
|
198
|
+
inputSchema: schema({ place: str('City, region or country, e.g. "Lisbon"') }, ['place']),
|
|
199
|
+
run: async (o, a) => compact(await o.travel(String(a.place))),
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
name: 'oculon_scam_check',
|
|
203
|
+
description: 'Is this message a scam? Paste an SMS, email or chat message. Every link is checked (Safe Browsing, URLhaus, urlscan.io, domain age, look-alikes), the sender domain is compared with any brand it mentions, and known scam patterns are matched (parcel fees, account locked, one-time codes, gift cards or crypto, "hi mum" new number, prizes, job and investment promises). Returns likely scam, suspicious or no strong signs, a 0-100 risk, the reasons and what to do.',
|
|
204
|
+
inputSchema: schema({ message: str('The full text of the message, including the sender line if there is one') }, ['message']),
|
|
205
|
+
run: async (o, a) => compact(await o.scamCheck(String(a.message))),
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
name: 'oculon_recall',
|
|
209
|
+
description: 'Is this car or product recalled? Pass a 17-character VIN, "year make model" (e.g. "2018 Honda Accord"), or a product name ("stroller", "peanut butter"). Vehicles: NHTSA safety recalls with do-not-drive and park-outside warnings. Products: CPSC consumer recalls and FDA food, drug and device enforcement reports.',
|
|
210
|
+
inputSchema: schema({ query: str('VIN, "year make model", or product name') }, ['query']),
|
|
211
|
+
run: async (o, a) => compact(await o.recall(String(a.query))),
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
name: 'oculon_email_security',
|
|
215
|
+
description: 'Can someone send email that looks like it comes from this domain? Checks SPF, DMARC, DKIM, MTA-STS, TLS reporting, BIMI, CAA and DNSSEC from public DNS, and returns a verdict (spoofable, partly protected, protected), a 0-100 score and the fixes in order.',
|
|
216
|
+
inputSchema: schema({ domain: str('Domain or email address, e.g. "example.com"') }, ['domain']),
|
|
217
|
+
run: async (o, a) => compact(await o.emailSecurity(String(a.domain))),
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
name: 'oculon_papers',
|
|
221
|
+
description: 'Research brief on a topic: the most cited papers of recent years, the newest relevant ones, papers per year (is the field growing?), PubMed counts for medical topics, and a short overview that cites the numbered papers. Sources: OpenAlex, PubMed, Semantic Scholar.',
|
|
222
|
+
inputSchema: schema({ topic: str('Research topic, e.g. "solid-state battery"'), years: num('Look-back window in years for most cited (default 3)') }, ['topic']),
|
|
223
|
+
run: async (o, a) => compact(await o.papers(String(a.topic), a.years ? { years: Number(a.years) } : {})),
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
name: 'oculon_country',
|
|
227
|
+
description: 'Country brief: GDP, growth, GDP per person, inflation, unemployment and population (World Bank), IMF growth and inflation outlook, head of state and government, capital, currency and its rate to the US dollar, US and UK travel advice, internet outages, disaster alerts and the latest headlines.',
|
|
228
|
+
inputSchema: schema({ country: str('Country name or ISO code, e.g. "Argentina"') }, ['country']),
|
|
229
|
+
run: async (o, a) => compact(await o.country(String(a.country))),
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: 'oculon_airport',
|
|
233
|
+
description: 'Is an airport running normally? Current METAR and TAF (flight category, wind, visibility, ceiling), FAA ground stops, delay programs and closures for US airports, and aircraft squawking an emergency within 150 km. Accepts IATA (JFK), ICAO (EGLL) or a name.',
|
|
234
|
+
inputSchema: schema({ airport: str('IATA or ICAO code, or airport name') }, ['airport']),
|
|
235
|
+
run: async (o, a) => compact(await o.airport(String(a.airport))),
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
name: 'oculon_monitor',
|
|
239
|
+
description: 'Create a monitor from a plain-language request, e.g. "tell me when there is an internet outage in Iran", "watch critical CVEs for nginx", "earthquakes above 6 near Tokyo", "news about OpenAI", "travel risk changes for Bangkok". It becomes a watch rule that is re-checked on a schedule and reports only changes, with evidence. Set dry_run to see the rule without saving it.',
|
|
240
|
+
inputSchema: schema({ request: str('What to watch, in plain language'), dry_run: { type: 'boolean', description: 'Only show how the request would be read' } }, ['request']),
|
|
241
|
+
run: async (o, a) => (a.dry_run ? o.monitorParse(String(a.request)) : o.monitor(String(a.request))),
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
name: 'oculon_web_search',
|
|
245
|
+
description: 'Search the web (Tavily, Exa fallback). Returns titles, URLs, snippets and dates.',
|
|
246
|
+
inputSchema: schema({ query: str('Search query'), max: num('Max results (default 6)') }, ['query']),
|
|
247
|
+
run: async (o, a) => {
|
|
248
|
+
const r = await o.webSearch(String(a.query), a.max ? Number(a.max) : 6);
|
|
249
|
+
return { results: r.data, source: r.prov.source, status: r.prov.status };
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
name: 'oculon_read_page',
|
|
254
|
+
description: 'Fetch a web page and return its readable text (Jina Reader, Firecrawl fallback), capped at about 6000 characters.',
|
|
255
|
+
inputSchema: schema({ url: str('http(s) URL') }, ['url']),
|
|
256
|
+
run: async (o, a) => {
|
|
257
|
+
const r = await o.readPage(String(a.url));
|
|
258
|
+
return { text: r.data, source: r.prov.source, status: r.prov.status, ...(r.prov.note ? { note: r.prov.note } : {}) };
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
name: 'oculon_ask',
|
|
263
|
+
description: 'Ask Oculon a question in plain language. An agent picks and calls Oculon tools (radar, dossiers, aircraft, satellites, on-chain, web) and answers with sources.',
|
|
264
|
+
inputSchema: schema({ question: str('The question') }, ['question']),
|
|
265
|
+
run: async (o, a) => o.ask(String(a.question)),
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
name: 'oculon_case_new',
|
|
269
|
+
description: 'Open a case file: a deeper OSINT investigation of a question (about 1-3 minutes). Returns an answer with confidence, sourced findings, a timeline, entities and open questions. Citations are verified against what the tools actually returned.',
|
|
270
|
+
inputSchema: schema({ question: str('What to investigate') }, ['question']),
|
|
271
|
+
run: async (o, a) => {
|
|
272
|
+
const r = await o.caseInvestigate({ question: String(a.question) });
|
|
273
|
+
return { id: r.case.id, report: r.case.report, markdown: r.case.markdown };
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
name: 'oculon_case_list',
|
|
278
|
+
description: 'List case files with their confidence, number of findings and whether they are watched.',
|
|
279
|
+
inputSchema: schema(),
|
|
280
|
+
run: async (o) => (await o.caseList()).map((k) => ({ id: k.id, question: k.question, confidence: k.report?.confidence ?? null, findings: k.report?.findings.length ?? 0, runs: k.runs, watch: k.watch, updatedAt: k.updatedAt })),
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
name: 'oculon_case_show',
|
|
284
|
+
description: 'Show one case file in full.',
|
|
285
|
+
inputSchema: schema({ id: num('Case id') }, ['id']),
|
|
286
|
+
run: async (o, a) => o.caseGet(Number(a.id)),
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
name: 'oculon_narratives',
|
|
290
|
+
description: 'News narratives tracked across days (storylines such as a company crisis or an IPO), with stories per day and phase. Set run=true to first group the latest headlines.',
|
|
291
|
+
inputSchema: schema({ run: { type: 'boolean', description: 'Group new headlines first (uses an LLM)' } }),
|
|
292
|
+
run: async (o, a) => (a.run === true ? compact(await o.narrativesRun()) : (await o.narratives(14)).map((n) => ({ name: n.name, daily: n.daily, total: n.total, phase: n.phase, latest: n.latest.slice(0, 3) }))),
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
name: 'oculon_health',
|
|
296
|
+
description: 'Company early-warning score 0-100 from hiring momentum, new federal lawsuits, insider selling, news tone, GitHub shipping and the stock move, with every component explained and a 30-day history.',
|
|
297
|
+
inputSchema: schema({ company: str('Company name') }, ['company']),
|
|
298
|
+
run: async (o, a) => {
|
|
299
|
+
const r = await o.health(String(a.company));
|
|
300
|
+
return { result: r.result, signals: r.signals.filter((s) => s.module === 'health') };
|
|
301
|
+
},
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
name: 'oculon_impact',
|
|
305
|
+
description: 'People exposed to current M6+ earthquakes and severe storms (Wikidata settlement populations within the affected radius, plus night-light change when enough nights have passed). Give a place to estimate exposure around it instead.',
|
|
306
|
+
inputSchema: schema({ place: str('Optional place'), radius_km: num('Radius around the place (default 50)') }),
|
|
307
|
+
run: async (o, a) => compact(await o.impact(a.place ? String(a.place) : undefined, a.radius_km ? Number(a.radius_km) : 50)),
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
name: 'oculon_contradictions',
|
|
311
|
+
description: 'Read several independent articles on a topic and list factual claims that conflict between them (numbers, dates, names, denials), each side with its source URL.',
|
|
312
|
+
inputSchema: schema({ topic: str('Topic, e.g. "Anthropic IPO"') }, ['topic']),
|
|
313
|
+
run: async (o, a) => compact(await o.contradictions(String(a.topic))),
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
name: 'oculon_sanctions',
|
|
317
|
+
description: 'Screen against the US OFAC sanctions (SDN) list: a wallet address (also checks whether it transacted directly with a listed address), a vessel IMO number, or the exact name of a company, person or vessel. Returns SANCTIONED, EXPOSED or CLEAR.',
|
|
318
|
+
inputSchema: schema({ query: str('Wallet address, "IMO 1234567", or exact name') }, ['query']),
|
|
319
|
+
run: async (o, a) => compact(await o.sanctions(String(a.query))),
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
name: 'oculon_markets_crosscheck',
|
|
323
|
+
description: 'Cross-check Polymarket against Kalshi and Manifold: an LLM confirms which markets ask exactly the same question, then gaps between venues are listed. A big gap means one crowd is wrong or knows something first.',
|
|
324
|
+
inputSchema: schema({ min_gap_pp: num('Minimum gap in percentage points to flag (default 15)') }),
|
|
325
|
+
run: async (o, a) => compact(await o.markets(a.min_gap_pp ? { minGapPp: Number(a.min_gap_pp) } : {})),
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
name: 'oculon_launches',
|
|
329
|
+
description: "Launch radar for a company: new Hugging Face models/datasets/Spaces, new iOS apps and app updates, new npm packages under its scope, and (with a domain) new hostnames, pages and repos.",
|
|
330
|
+
inputSchema: schema({ company: str('Company name, e.g. OpenAI'), domain: str('Its domain, e.g. openai.com (optional)'), org: str('Org handle on GitHub/Hugging Face/npm (default: company)'), days: num('Look-back window (default 30)') }, ['company']),
|
|
331
|
+
run: async (o, a) => compact(await o.launches(String(a.company), { ...(a.domain ? { domain: String(a.domain) } : {}), ...(a.org ? { org: String(a.org) } : {}), ...(a.days ? { days: Number(a.days) } : {}) })),
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
name: 'oculon_rewind',
|
|
335
|
+
description: 'Time machine: what Oculon would have seen on a past date. Wikipedia spikes measured against the weeks before, top Hacker News stories, strong earthquakes and that day\'s Guardian headlines, fused across sources.',
|
|
336
|
+
inputSchema: schema({ date: str('YYYY-MM-DD, at least two days ago') }, ['date']),
|
|
337
|
+
run: async (o, a) => compact(await o.rewind(String(a.date))),
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
name: 'oculon_fence_add',
|
|
341
|
+
description: 'Add a geofence around a place. Each check reports what is NEW inside it: military aircraft, military vessels, earthquakes, natural events.',
|
|
342
|
+
inputSchema: schema({ name: str('Fence name'), place: str('Center place, e.g. "Strait of Hormuz"'), radius_km: num('Half-width in km (default 100)'), kinds: { type: 'array', items: { type: 'string', enum: ['air', 'sea', 'quake', 'events'] }, description: 'What to watch (default all)' } }, ['name', 'place']),
|
|
343
|
+
run: async (o, a) => o.fenceAddAround(String(a.name), String(a.place), a.radius_km ? Number(a.radius_km) : 100, Array.isArray(a.kinds) ? a.kinds.map(String) : undefined),
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
name: 'oculon_fence_list',
|
|
347
|
+
description: 'List geofences with their boxes and what each watches.',
|
|
348
|
+
inputSchema: schema(),
|
|
349
|
+
run: (o) => o.fenceList().map((f) => ({ id: f.id, name: f.name, box: [f.south, f.west, f.north, f.east], kinds: f.kinds, lastRun: f.lastRun })),
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
name: 'oculon_fence_check',
|
|
353
|
+
description: 'Check every geofence now and report what is new inside each since the previous check.',
|
|
354
|
+
inputSchema: schema(),
|
|
355
|
+
run: async (o) => {
|
|
356
|
+
const r = await o.fenceCheck();
|
|
357
|
+
return { checks: r.checks.map((c) => ({ id: c.fence.id, name: c.fence.name, baseline: c.baseline, changes: c.changes, counts: c.counts })), signals: r.signals };
|
|
358
|
+
},
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
name: 'oculon_watch_list',
|
|
362
|
+
description: 'List the watchlist: targets Oculon re-checks for changes (companies, domains, wallets, tokens, planes, topics, night lights, air quality).',
|
|
363
|
+
inputSchema: schema(),
|
|
364
|
+
run: (o) => o.watchList(),
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
name: 'oculon_watch_add',
|
|
368
|
+
description: `Add a watchlist target. Kinds: company, domain, plane, topic, lights (place), air (place), port (place, anchored-vessel queue), news (keyword), outage (country), cve (vendor or product), quake ("place|min magnitude"), hazard (country or storm name), url, package ("npm:name" or "pypi:name"), travel (place)${onchainEnabled() ? ', wallet, token (address or address@chain)' : ''}. For plain-language requests use oculon_monitor.`,
|
|
369
|
+
inputSchema: schema({ kind: { type: 'string', enum: availableKinds() }, target: str('What to watch'), label: str('Optional display name') }, ['kind', 'target']),
|
|
370
|
+
run: (o, a) => o.watchAdd(String(a.kind), String(a.target), a.label ? String(a.label) : undefined),
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
name: 'oculon_watch_run',
|
|
374
|
+
description: 'Re-check every watchlist target now and report only what changed since the previous check. The first check of a target records a baseline.',
|
|
375
|
+
inputSchema: schema(),
|
|
376
|
+
run: async (o) => {
|
|
377
|
+
const r = await o.watchRun();
|
|
378
|
+
return { runs: r.runs.map((x) => ({ id: x.item.id, kind: x.item.kind, target: x.item.target, baseline: x.baseline, changes: x.changes, ...(x.error ? { error: x.error } : {}) })), signals: r.signals };
|
|
379
|
+
},
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
name: 'oculon_brief',
|
|
383
|
+
description: "Today's brief: the strongest signals of the last 24 hours and watchlist changes, summarized.",
|
|
384
|
+
inputSchema: schema({ refresh: { type: 'boolean', description: 'Rewrite even if a brief exists for today' } }),
|
|
385
|
+
run: (o, a) => o.brief({ refresh: a.refresh === true }),
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
name: 'oculon_signals',
|
|
389
|
+
description: 'Most recent signals produced by any Oculon module, with scores and evidence.',
|
|
390
|
+
inputSchema: schema({ limit: num('Max signals (default 30)') }),
|
|
391
|
+
run: (o, a) => o.signals(a.limit ? Number(a.limit) : 30),
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
name: 'oculon_entity',
|
|
395
|
+
description: 'Look up an entity in the Oculon graph and its neighbors. Ids look like "domain:openai.com", "org:nvidia", "aircraft:a835af", "company:falcon landing llc".',
|
|
396
|
+
inputSchema: schema({ id: str('Entity id') }, ['id']),
|
|
397
|
+
run: (o, a) => o.entity(String(a.id)),
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
name: 'oculon_connect',
|
|
401
|
+
description: 'How two things are connected in the Oculon graph: shortest path of typed edges between them (names or ids). Duplicates such as org:nvidia and company:nvidia are merged first.',
|
|
402
|
+
inputSchema: schema({ a: str('First thing, e.g. "Nvidia"'), b: str('Second thing, e.g. "Jensen Huang"'), depth: num('Max hops (default 6)') }, ['a', 'b']),
|
|
403
|
+
run: (o, a) => o.connect(String(a.a), String(a.b), a.depth ? Number(a.depth) : 6),
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
name: 'oculon_social_pulse',
|
|
407
|
+
description: 'What people are posting about a subject right now on X, Reddit, TikTok (paid Apify, small daily budget) and Bluesky: post counts per platform, pace over the last day when measurable, most engaged and latest posts with links.',
|
|
408
|
+
inputSchema: schema({ query: str('Subject, e.g. "Nvidia"') }, ['query']),
|
|
409
|
+
run: (o, a) => o.pulse(String(a.query)),
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
name: 'oculon_podcast',
|
|
413
|
+
description: 'Find recent podcast episodes about a subject and transcribe the newest English one (Deepgram, paid per minute with a daily budget): machine summary, topics, and timestamped passages that mention the subject.',
|
|
414
|
+
inputSchema: schema({ subject: str('Subject, e.g. "Nvidia"'), pick: num('Episode index from the list (optional)') }, ['subject']),
|
|
415
|
+
run: (o, a) => o.podcast(String(a.subject), a.pick !== undefined ? Number(a.pick) : undefined),
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
name: 'oculon_listen',
|
|
419
|
+
description: 'Transcribe a public audio or video FILE URL (mp3, mp4, wav...; not a YouTube page) with Deepgram and return a machine summary, topics and timestamped passages that mention the subject.',
|
|
420
|
+
inputSchema: schema({ url: str('Direct media file URL'), subject: str('What to look for (optional)') }, ['url']),
|
|
421
|
+
run: (o, a) => o.listen(String(a.url), a.subject ? String(a.subject) : ''),
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
name: 'oculon_exposure',
|
|
425
|
+
description: "A domain's internet exposure: resolves its main hosts and known subdomains, then lists open ports, software and known CVEs per IP from Shodan InternetDB (free). CDN edges are marked.",
|
|
426
|
+
inputSchema: schema({ domain: str('Domain, e.g. example.com') }, ['domain']),
|
|
427
|
+
run: (o, a) => o.exposure(String(a.domain)),
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
name: 'oculon_dark_ships',
|
|
431
|
+
description: 'Vessels that deliberately switched off AIS near a place (port, strait, sea) in the last days, from Global Fishing Watch: where they went dark and reappeared, for how long. Coverage is strongest for fishing and carrier vessels.',
|
|
432
|
+
inputSchema: schema({ place: str('Sea area, strait or port'), days: num('Window in days (default 30)') }, ['place']),
|
|
433
|
+
run: (o, a) => o.darkShips(String(a.place), a.days ? Number(a.days) : 30),
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
name: 'oculon_vessel',
|
|
437
|
+
description: 'Vessel identity from a name, MMSI or IMO (Global Fishing Watch registry data): flag history, type, owners, earlier names, first and last AIS transmission, OFAC sanctions check on the IMO.',
|
|
438
|
+
inputSchema: schema({ query: str('Vessel name, MMSI or IMO') }, ['query']),
|
|
439
|
+
run: (o, a) => o.vessel(String(a.query)),
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
name: 'oculon_fires',
|
|
443
|
+
description: 'Active fires and thermal hotspots near a place in the last 1-5 days from NASA FIRMS (VIIRS satellites): clusters with detection count and fire radiative power. Catches wildfires, industrial fires and strikes on infrastructure.',
|
|
444
|
+
inputSchema: schema({ place: str('Place name'), days: num('1 to 5 (default 2)') }, ['place']),
|
|
445
|
+
run: (o, a) => o.fires(String(a.place), a.days ? Number(a.days) : 2),
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
name: 'oculon_cloud_outages',
|
|
449
|
+
description: 'Current outages on major internet platforms: official status pages of GitHub, Cloudflare, OpenAI, Anthropic, Discord, Reddit, Vercel, npm and others, plus AWS, Azure and Google Cloud incidents.',
|
|
450
|
+
inputSchema: schema({}),
|
|
451
|
+
run: (o) => o.cloud(),
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
name: 'oculon_bgp',
|
|
455
|
+
description: 'BGP routing. "world": global BGP hijacks and route leaks (Cloudflare Radar) with DDoS target countries. Two-letter country code: visible IPv4/IPv6 prefixes per hour and change versus the median (shutdowns and cable cuts show as drops), plus incidents involving it. AS number: visibility, prefixes, neighbours and incidents. IP address: announcing network, RPKI validity, abuse contact, location.',
|
|
456
|
+
inputSchema: schema({ resource: str('"world", a country code like PK, an AS number like AS15169, or an IP address'), days: num('Window in days for incidents (default 2)') }),
|
|
457
|
+
run: (o, a) => o.bgp(a.resource ? String(a.resource) : 'world', a.days ? Number(a.days) : 2),
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
name: 'oculon_vulns',
|
|
461
|
+
description: 'Vulnerabilities newly exploited in the wild (CISA KEV) with EPSS odds and due dates, new critical CVEs (NVD) and critical package advisories (GitHub), optionally for one vendor.',
|
|
462
|
+
inputSchema: schema({ days: num('Window in days (default 7)'), vendor: str('Vendor or product filter, e.g. Microsoft, Fortinet') }),
|
|
463
|
+
run: (o, a) => o.vulns({ ...(a.days ? { days: Number(a.days) } : {}), ...(a.vendor ? { vendor: String(a.vendor) } : {}) }),
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
name: 'oculon_cve',
|
|
467
|
+
description: 'One CVE in depth: CVSS, CWE, affected products, EPSS exploitation probability and 30-day trend, CISA KEV status, affected packages with fixed versions (OSV, GitHub).',
|
|
468
|
+
inputSchema: schema({ id: str('CVE id, e.g. CVE-2021-44228') }, ['id']),
|
|
469
|
+
run: (o, a) => o.cve(String(a.id)),
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
name: 'oculon_package_vulns',
|
|
473
|
+
description: 'Known vulnerabilities of a software package (OSV.dev), optionally for one version, flagged when exploited in the wild.',
|
|
474
|
+
inputSchema: schema({ ecosystem: str('npm, PyPI, Go, Maven, crates.io, RubyGems, NuGet...'), name: str('Package name'), version: str('Version (optional)') }, ['ecosystem', 'name']),
|
|
475
|
+
run: (o, a) => o.packageVulns(String(a.ecosystem), String(a.name), a.version ? String(a.version) : undefined),
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
name: 'oculon_regs',
|
|
479
|
+
description: "US Federal Register: executive orders, final and proposed rules, notices and tomorrow's documents on public inspection, with effective dates and comment deadlines. Filter by text and agency.",
|
|
480
|
+
inputSchema: schema({ query: str('Search text (optional)'), agency: str('Agency name or abbreviation, e.g. SEC, Commerce'), days: num('Window in days (default 7)') }),
|
|
481
|
+
run: (o, a) => o.regs({ ...(a.query ? { query: String(a.query) } : {}), ...(a.agency ? { agency: String(a.agency) } : {}), ...(a.days ? { days: Number(a.days) } : {}) }),
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
name: 'oculon_defi',
|
|
485
|
+
description: 'DeFi risk radar (DefiLlama, alternative.me): protocol TVL crashes, stablecoin depegs and supply shocks, recent hacks, chain TVL moves, DEX volume and fee spikes, yield anomalies, crypto fear and greed.',
|
|
486
|
+
inputSchema: schema(),
|
|
487
|
+
run: (o) => o.defi(),
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
name: 'oculon_protocol',
|
|
491
|
+
description: 'One DeFi protocol in depth: TVL per chain, 1d-1y change, drawdown from its high, audits, oracles, hack history, funding rounds and DefiLlama warnings.',
|
|
492
|
+
inputSchema: schema({ name: str('Protocol name or slug, e.g. aave') }, ['name']),
|
|
493
|
+
run: (o, a) => o.protocol(String(a.name)),
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
name: 'oculon_squawks',
|
|
497
|
+
description: 'Aircraft squawking emergency transponder codes right now (adsb.lol): 7500 hijack, 7600 radio failure, 7700 general emergency, with position, registration and nearest airport.',
|
|
498
|
+
inputSchema: schema(),
|
|
499
|
+
run: (o) => o.squawks(),
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
name: 'oculon_sec_search',
|
|
503
|
+
description: 'SEC EDGAR full-text search across filings since 2001: which companies wrote a phrase (e.g. "cybersecurity incident", "going concern") in a window, with form, date and 8-K items.',
|
|
504
|
+
inputSchema: schema({ query: str('Phrase or boolean query'), forms: str('Comma-separated forms, e.g. 8-K,10-K'), days: num('Window in days (default 30)') }, ['query']),
|
|
505
|
+
run: (o, a) => o.filings(String(a.query), { ...(a.forms ? { forms: String(a.forms).split(',') } : {}), ...(a.days ? { days: Number(a.days) } : {}) }),
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
name: 'oculon_sec_events',
|
|
509
|
+
description: "A company's recent 8-K events decoded into plain English: material agreements, cybersecurity incidents, restructuring, restatements, CEO/CFO departures, bankruptcy.",
|
|
510
|
+
inputSchema: schema({ company: str('Ticker or CIK'), days: num('Window in days (default 90)') }, ['company']),
|
|
511
|
+
run: (o, a) => o.secEvents(String(a.company), a.days ? Number(a.days) : 90),
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
name: 'oculon_blackout',
|
|
515
|
+
description: 'Internet outages and shutdowns by country and network in the last days: Cloudflare Radar confirmed outages (with cause) and traffic anomalies, plus IODA outage scores per country.',
|
|
516
|
+
inputSchema: schema({ days: num('Window in days (default 2, max 14)') }),
|
|
517
|
+
run: (o, a) => o.blackout(a.days ? Number(a.days) : 2),
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
name: 'oculon_hazards',
|
|
521
|
+
description: 'Official orange and red disaster alerts from GDACS (UN/EU): earthquakes, cyclones, floods, volcanoes, droughts, wildfires, with severity and countries, plus tsunami bulletins and extreme US weather alerts.',
|
|
522
|
+
inputSchema: schema({ days: num('Window in days (default 7)') }),
|
|
523
|
+
// The bulletins hang off the result array and would be dropped by JSON, so they are returned beside it.
|
|
524
|
+
run: async (o, a) => {
|
|
525
|
+
const r = await o.hazards(a.days ? Number(a.days) : 7);
|
|
526
|
+
return { ...r, result: { alerts: [...r.result], bulletins: r.result.bulletins ?? [] } };
|
|
527
|
+
},
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
name: 'oculon_calendar',
|
|
531
|
+
description: 'Catalyst calendar for the next days: earnings (watched companies first, then the largest), key US macro releases, and high-volume prediction markets that close.',
|
|
532
|
+
inputSchema: schema({ days: num('Window in days (default 14)') }),
|
|
533
|
+
run: (o, a) => o.calendar(a.days ? Number(a.days) : 14),
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
name: 'oculon_feedback_stats',
|
|
537
|
+
description: 'Useful/Noise votes per module and how far each module alert bar has moved because of them.',
|
|
538
|
+
inputSchema: schema({}),
|
|
539
|
+
run: (o) => o.feedbackStats(),
|
|
540
|
+
},
|
|
541
|
+
];
|
|
542
|
+
/** Tools that change the shared watchlist, fences or plugins; not offered to anonymous remote clients. */
|
|
543
|
+
const REMOTE_HIDDEN = new Set(['oculon_watch_add', 'oculon_fence_add', 'oculon_watch_run', 'oculon_case_new', 'oculon_stamp_proofs', 'oculon_resolve_forecasts', 'oculon_auto_forecast', 'oculon_forecast']);
|
|
544
|
+
/** Tools this build offers: on-chain tools are left out unless OCULON_ONCHAIN=1. */
|
|
545
|
+
export function activeTools() {
|
|
546
|
+
return onchainEnabled() ? TOOLS : TOOLS.filter((t) => !ONCHAIN_TOOLS.has(t.name));
|
|
547
|
+
}
|
|
548
|
+
export class McpServer {
|
|
549
|
+
makeOculon;
|
|
550
|
+
opts;
|
|
551
|
+
oculon = null;
|
|
552
|
+
/**
|
|
553
|
+
* `remote`: the server is reached over the internet by anyone (remote MCP). Tools that change what the whole
|
|
554
|
+
* install watches are left out, and oculon_monitor only shows how a request would be read.
|
|
555
|
+
*/
|
|
556
|
+
constructor(makeOculon = () => new Oculon(), opts = {}) {
|
|
557
|
+
this.makeOculon = makeOculon;
|
|
558
|
+
this.opts = opts;
|
|
559
|
+
}
|
|
560
|
+
get o() {
|
|
561
|
+
return (this.oculon ??= this.makeOculon());
|
|
562
|
+
}
|
|
563
|
+
pluginTools = null;
|
|
564
|
+
/** Built-in tools plus one tool per installed plugin tool (`plugin_<plugin>_<tool>`), loaded once. */
|
|
565
|
+
async allTools() {
|
|
566
|
+
if (!this.pluginTools) {
|
|
567
|
+
const { loadPlugins, pluginApi } = await import('./plugins.js');
|
|
568
|
+
const { plugins } = await loadPlugins();
|
|
569
|
+
this.pluginTools = plugins.flatMap((p) => p.tools.map((t) => ({
|
|
570
|
+
name: `plugin_${p.name}_${t.name}`.replace(/-/g, '_'),
|
|
571
|
+
description: `[plugin ${p.name}] ${t.description}`,
|
|
572
|
+
inputSchema: t.inputSchema ?? schema(),
|
|
573
|
+
run: (o, a) => t.run(pluginApi(o, p.name), a),
|
|
574
|
+
})));
|
|
575
|
+
}
|
|
576
|
+
const all = [...activeTools(), ...this.pluginTools];
|
|
577
|
+
return this.opts.remote ? all.filter((t) => !REMOTE_HIDDEN.has(t.name)) : all;
|
|
578
|
+
}
|
|
579
|
+
/** Handle one JSON-RPC message; returns the response, or null for notifications. */
|
|
580
|
+
async handle(msg) {
|
|
581
|
+
const reply = (result) => ({ jsonrpc: '2.0', id: msg.id ?? null, result });
|
|
582
|
+
const fail = (code, message) => ({ jsonrpc: '2.0', id: msg.id ?? null, error: { code, message } });
|
|
583
|
+
const isNotification = msg.id === undefined || msg.id === null;
|
|
584
|
+
switch (msg.method) {
|
|
585
|
+
case 'initialize': {
|
|
586
|
+
const asked = String(msg.params?.protocolVersion ?? '');
|
|
587
|
+
return reply({
|
|
588
|
+
protocolVersion: SUPPORTED.includes(asked) ? asked : SUPPORTED[0],
|
|
589
|
+
capabilities: { tools: { listChanged: false } },
|
|
590
|
+
serverInfo: SERVER_INFO,
|
|
591
|
+
instructions: 'Oculon is an OSINT engine. Every result includes provenance (LIVE/CACHED/UNAVAILABLE/ERROR per source). Report data as given; do not present ERROR or UNAVAILABLE sources as findings.',
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
case 'ping':
|
|
595
|
+
return reply({});
|
|
596
|
+
case 'tools/list':
|
|
597
|
+
return reply({ tools: (await this.allTools()).map(({ name, description, inputSchema }) => ({ name, description, inputSchema })) });
|
|
598
|
+
case 'tools/call': {
|
|
599
|
+
const name = String(msg.params?.name ?? '');
|
|
600
|
+
const tool = (await this.allTools()).find((t) => t.name === name);
|
|
601
|
+
if (!tool)
|
|
602
|
+
return fail(-32602, `unknown tool: ${name}`);
|
|
603
|
+
try {
|
|
604
|
+
const args = msg.params?.arguments ?? {};
|
|
605
|
+
if (this.opts.remote && name === 'oculon_monitor')
|
|
606
|
+
args.dry_run = true;
|
|
607
|
+
const out = await tool.run(this.o, args);
|
|
608
|
+
if (out && typeof out === 'object' && '__image' in out) {
|
|
609
|
+
const { __image, meta } = out;
|
|
610
|
+
const content = [{ type: 'text', text: JSON.stringify(meta) }];
|
|
611
|
+
if (__image)
|
|
612
|
+
content.unshift({ type: 'image', data: readFileSync(__image).toString('base64'), mimeType: 'image/png' });
|
|
613
|
+
return reply({ content, isError: !__image });
|
|
614
|
+
}
|
|
615
|
+
return reply({ content: [{ type: 'text', text: JSON.stringify(out) }] });
|
|
616
|
+
}
|
|
617
|
+
catch (e) {
|
|
618
|
+
return reply({ content: [{ type: 'text', text: `Error: ${e.message}` }], isError: true });
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
default:
|
|
622
|
+
if (isNotification)
|
|
623
|
+
return null;
|
|
624
|
+
return fail(-32601, `method not found: ${msg.method}`);
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
close() {
|
|
628
|
+
this.oculon?.close();
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
/** Run on stdio. Logs go to stderr so stdout stays pure JSON-RPC. */
|
|
632
|
+
export function serveStdio(server = new McpServer()) {
|
|
633
|
+
const rl = createInterface({ input: process.stdin });
|
|
634
|
+
const write = (m) => process.stdout.write(`${JSON.stringify(m)}\n`);
|
|
635
|
+
rl.on('line', async (line) => {
|
|
636
|
+
if (!line.trim())
|
|
637
|
+
return;
|
|
638
|
+
let msg;
|
|
639
|
+
try {
|
|
640
|
+
msg = JSON.parse(line);
|
|
641
|
+
}
|
|
642
|
+
catch {
|
|
643
|
+
write({ jsonrpc: '2.0', id: null, error: { code: -32700, message: 'parse error' } });
|
|
644
|
+
return;
|
|
645
|
+
}
|
|
646
|
+
const res = await server.handle(msg);
|
|
647
|
+
if (res)
|
|
648
|
+
write(res);
|
|
649
|
+
});
|
|
650
|
+
rl.on('close', () => server.close());
|
|
651
|
+
}
|