Commit Graph

50 Commits

Author SHA1 Message Date
Marc Shade 4dda867968 feat: phase 14 — BTC technicals, central bank rates, 3 datasets, dashboard UX (+5 = 84 tools)
New tools:
- intel_btc_technicals: SMA-50/200, Mayer Multiple, golden/death cross, ATH distance
- intel_central_bank_rates: 15 banks (Fed/ECB/BoE via FRED, 12 curated fallback)
- intel_trade_routes: 19 maritime chokepoints with oil flow and vessel transit data
- intel_cloud_regions: 28 AWS/Azure/GCP regions with coordinates
- intel_financial_centers: GFCI top 20 with rankings and specializations

Dashboard additions:
- BTC Technicals drawer section (price, SMA, Mayer, cross signal)
- Central Bank Rates drawer section (15 banks, sorted by rate)
- Trade route markers on infrastructure map layer (chokepoint/canal/route icons)
- Regional presets (Globe/Americas/Europe/MENA/Asia-Pac/Africa) with localStorage persistence
- Time window filter (1h/6h/24h/7d/All) filtering earthquakes and news by timestamp
- Static datasets served via /api/static for instant boot

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 17:04:17 -05:00
Marc Shade 39e687b054 feat: phase 13 — USNI fleet tracker, RSS expansion, remove static reports
- Add intel_usni_fleet tool: parses USNI News Fleet Tracker RSS for
  Navy fleet disposition (ships, hull numbers, strike groups, regions)
- Expand RSS to 90+ feeds across 16 categories: +3 Latin America
  (InSight Crime, Brazil Reports, Mexico News Daily), +7 multilingual
  (BBC Mundo, DW ES/DE, France24 FR, RFI, UN News ES/FR)
- Add data freshness monitoring: per-source staleness in dashboard
  drawer via cache.freshness() and SSE stream
- Add USNI Fleet Tracker drawer section to dashboard
- Remove static HTML report system (reports/ dir, 3 MCP tools,
  4 CLI commands, PDF endpoint) — live dashboard replaces all
- Update ROADMAP.md: phases 1-11 complete, 80 tools, 15 datasets

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 16:41:38 -05:00
Marc Shade 6075910505 feat: phase 12 — 68→81 tools, 5 geospatial datasets, 5 new sources, news ticker fix
New static datasets (config/):
- cables.py: 34 undersea fiber-optic cables with landing points, capacity, owners
- datacenters.py: 48 AI datacenter clusters with power capacity (MW)
- spaceports.py: 27 launch facilities worldwide
- minerals.py: 27 critical mineral deposits (lithium, cobalt, rare earths, etc.)
- exchanges.py: 82 stock exchanges across 4 tiers with country→ticker mapping

New source modules (sources/):
- hacker_news.py: HN Firebase API top stories
- github_trending.py: GitHub search API trending repos
- arxiv_papers.py: arXiv Atom API with regex XML parsing
- usa_spending.py: USAspending.gov federal agency budgets
- environmental.py: NASA EONET natural events + GDACS disaster alerts

Extended existing modules:
- markets.py: fetch_country_stocks() — any country by ISO-3 code
- military.py: fetch_aircraft_details_batch() — parallel batch lookup (max 20)
- geospatial.py: 5 new fetch functions for cables, datacenters, spaceports, minerals, exchanges
- circuit_breaker.py: per-source configurable thresholds
- cache.py: freshness() method for per-source staleness tracking

Fixed news ticker (News 0 → News 17+):
- Root cause: RSS feeds fetched sequentially by category (14 categories × slow feeds = timeout)
- Fix: single asyncio.gather() for all 80+ feeds with 12s per-feed hard timeout
- Reduced per-request HTTP timeout from 15s to 8s for RSS feeds

13 new tools wired in server.py, 14 new tests (76 total, all passing).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 20:05:44 -05:00
Marc Shade 986f79fb8f docs: update README hero image with live 14-layer dashboard screenshot
Captured via Playwright with live SSE data showing all 14 map layers,
HUD stats, alert banner, drawer with posture/markets/crypto, and
the full layer panel including new Climate and News layers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 17:33:12 -05:00
Marc Shade fc915be90a feat: news geolocation map layer with 75-country centroid lookup
Client-side geolocation scans article titles/summaries for country
mentions and plots them at country centroids with jitter. Integrated
into layer toggles, search, HUD click-to-zoom, and detail panel.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 17:26:04 -05:00
Marc Shade b9eb85bb64 fix: layer panel + alert banner positioning below dynamic topbar
_syncLayersTop() now measures both topbar height and alert banner,
positioning layers panel below both. Alert banner also uses
--layers-top CSS var so it tracks topbar height changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 17:22:35 -05:00
Marc Shade a65a84523f feat: climate overlay layer, adaptive topbar, mobile layer panel
- Climate map layer: 15 zones with temp-anomaly colored markers (hot/warm/cool/cold)
  with significance animation and full detail panel
- Topbar: flex-wrap with max-height cap on HUD pills, dynamic --layers-top CSS var
  ensures layer panel never overlaps topbar regardless of row count
- Mobile: collapsible layer panel (tap title to expand/collapse)
- Search and HUD pill click-to-zoom extended for climate layer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 17:11:41 -05:00
Marc Shade e68bef3104 feat: search, layer persistence, drawer collapse, HUD click-to-zoom, webcam auto-refresh
- Search: type country/city/keyword to zoom map to matching markers
  - ISO3→name mapping for 40+ countries (search "ukraine" matches UKR)
  - Searches all data sources: earthquakes, military, conflict, fires, webcams, bases, etc.
  - / keyboard shortcut to focus search, Esc to clear
  - Visual feedback: cyan border on match, red on no match
- Layer persistence: toggle states saved to localStorage, restored on reload
- Drawer section collapse: click any section header to collapse/expand
  - Collapsed state persists across SSE updates and page reloads via localStorage
  - 19 collapsible sections with rotate indicator
- HUD pill click-to-zoom: click any stat pill to zoom map to that layer's markers
  - Auto-enables layer if toggled off
- Webcam auto-refresh: preview image refreshes every 15s while detail panel is open
  - Interval properly cleared on panel close (no memory leak)
- Webcam drawer items now clickable (opens detail panel with preview)
- Loading state: spinner + "LOADING LIVE FEEDS" shown until first SSE data arrives
- Fixed keyboard shortcuts: D toggle now properly uses drawer 'closed' class
- Fixed drawer event delegation: attached once at boot instead of re-adding every 30s SSE update

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 16:11:08 -05:00
Marc Shade a6427dfe08 feat: marker clustering, cable corridor click-through fix, keyboard shortcuts
- Marker clustering (leaflet.markercluster) for air traffic, military,
  conflict, wildfires, and nav warnings — clusters expand on click
- Cable corridor rectangles set to interactive:false so clicks pass
  through to markers underneath (fixes blocked clicks in Med/Middle East)
- Batch addLayers() for air traffic performance with 9500+ markers
- Keyboard shortcuts: Esc closes panels, D toggles drawer, R resets view
- Custom dark-theme cluster styles with per-layer color coding

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 13:51:58 -05:00
Marc Shade 907351ed30 feat: webcam preview images in detail panel + unique layer indicator colors
- Webcam clicks now show the live camera feed image from Windy API
- Added img to DOMPurify allowed tags for preview rendering
- Road Traffic layer dot → white (#e0e0e0), Webcams → grey (#909090)
- All 12 layers now have visually distinct indicator colors

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 13:13:06 -05:00
Marc Shade 54e4f5935e fix: detail panel for new map layer markers (air traffic, traffic, webcams, nav warnings)
Map marker clicks were showing headers but empty bodies because the type
handlers were only in showDrawerDetail, not the primary showDetail function.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 12:56:25 -05:00
Marc Shade 966ce83eae fix: auto-load .env via python-dotenv for dashboard API keys
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 12:42:15 -05:00
Marc Shade 994d1d4c91 feat: add 4 new map layers — air traffic, road traffic, nav warnings, webcams
- Air Traffic: sample every 10th aircraft from OpenSky for ~950 map markers
- Nav Warnings: parse DD-MM.mmN DDD-MM.mmW coordinates from NGA warning text
- Road Traffic: TomTom city congestion circles (when API key set)
- Webcams: Windy camera positions (when API key set)
- 12 toggleable layers total (up from 8)
- Detail panels for all new marker types

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 12:01:21 -05:00
Marc Shade fcc702b093 feat: domestic flights, road traffic, CCTV webcams, AI situation brief
Four new intelligence domains for the dashboard:

1. Domestic flights (OpenSky) — global airborne aircraft count by
   region with commercial/general breakdown. No API key needed.

2. Road traffic (TomTom) — real-time congestion % for 20 major world
   cities + traffic incidents in 5 strategic regions. Needs
   TOMTOM_API_KEY (free 2500 req/day at developer.tomtom.com).

3. CCTV webcams (Windy) — public traffic camera locations worldwide.
   Needs WINDY_API_KEY (free 100 req/day at api.windy.com).

4. AI situation brief (Ollama) — LLM-generated 3-paragraph
   intelligence brief synthesizing all dashboard data. Uses local
   Ollama (llama3.2). Falls back to structured metrics summary.

New files: sources/traffic.py, sources/webcams.py, analysis/situation.py
Modified: sources/aviation.py (+fetch_domestic_flights), dashboard/app.py,
dashboard/index.html (drawer sections + HUD pills for all 4 domains).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 11:46:19 -05:00
Marc Shade fc105872e2 fix: update UCDP GED API to v25.1 + add token auth support
UCDP now requires x-ucdp-access-token header (previously open access).
Updated from v24.1 to v25.1 (latest stable). Token passed via
UCDP_ACCESS_TOKEN env var; gracefully degrades to 0 events without it
(conflict zone fallback uses static INTEL_HOTSPOTS).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 11:36:26 -05:00
Marc Shade 0775102ed3 feat: migrate ACLED API from deprecated key/email to OAuth2 Bearer tokens
ACLED retired api.acleddata.com and moved to acleddata.com/api/ with
OAuth2 password-grant authentication. New flow:
- POST to /oauth/token with email+password → Bearer token (24h TTL)
- Automatic refresh via refresh_token (14-day TTL)
- Module-level token cache with async lock

Shared acled_query() helper in conflict.py used by all 9 call sites
in intelligence.py. Env vars: ACLED_EMAIL + ACLED_PASSWORD (replaces
ACLED_ACCESS_TOKEN).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 11:11:06 -05:00
Marc Shade 59451ce9f6 fix: header bar fire count shows cluster count instead of raw 74k detections
Matches the sidebar fix — computes cluster count from fires_by_region
top_clusters rather than displaying total_fires (raw FIRMS detections).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:51:13 -05:00
Marc Shade be452eb7d9 fix: wildfire counter shows cluster count, cable corridor antimeridian split
Wildfire sidebar counter now shows rendered cluster markers (180) instead
of raw FIRMS detections (74,901); raw total preserved in tooltip.

Transpacific cable corridor rectangle split into two halves at the
antimeridian so it renders over the Pacific instead of across landmasses.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:44:08 -05:00
Marc Shade 71fbb1cda4 feat: waterway diamonds, cable corridor zones, cache resilience
- Render 9 strategic waterway chokepoints as cyan diamond markers
  (Hormuz, Malacca, Suez, Panama, Bab-el-Mandeb, Taiwan, Gibraltar,
  GIUK Gap, Bosphorus) with throughput tooltips
- Render 6 submarine cable corridors as dashed blue rectangles
  (transatlantic N/S, transpacific, asia-europe, red sea, med)
- Add waterways + cable_corridors to /api/static and SSE payloads
- Make cache.set() and evict_expired() swallow sqlite3 write errors
  instead of crashing callers (fixes "readonly database" in dashboard)
- Infrastructure layer: 134 → 173 items

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:37:03 -05:00
Marc Shade 95b149ad55 fix: replace 22 dead/blocked RSS feeds with working alternatives
Tested all 80+ RSS feeds — 22 returned 403/404/timeout. Changes:
- AP Top News: rsshub → feedx.net (working wire proxy)
- Reuters World: reutersagency.com → Google News RSS filter
- Defense One: /rss/ → /rss/all/ (correct endpoint)
- Military Times replaces Stars and Stripes (404, no RSS found)
- The National UAE: /rss → Arc outbound feed (working)
- Nikkei Asia: /rss → /rss/feed/nar (working)
- Lowy Interpreter replaces East Asia Forum (403 WAF block)
- Dialogo Americas replaces Americas Quarterly + Brazil Wire
- Remove 13 dead feeds with no working replacement:
  Threatpost, CSIS, CFR, Chatham House, Atlantic Council, IISS,
  Al Monitor, ACAPS, EU External Action, NATO News,
  Energy Intelligence, The Africa Report, African Arguments

Reduces feed count from 80 to 62, eliminating wasted timeout cycles
that were blocking the dashboard SSE first frame.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:26:47 -05:00
Marc Shade a72fdc50f7 fix: dashboard instant boot, pipeline map layer, theater data bugs
- Add /api/static endpoint for instant geospatial data on boot (158 items)
- Add per-coroutine 45s timeout to prevent SSE first-frame blocking
- Dismiss loading overlay after static fetch instead of waiting for SSE
- Render 24 oil/gas/hydrogen pipelines as colored polylines on map
- Fix theaters dict-vs-list bug in posture.py and fleet.py
- Add exposure detail modal and color/label entries

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:09:14 -05:00
Marc Shade 2d1c95389a fix: wildfire data parsing + dashboard cascade failure protection
Population exposure was showing 0 because exposure.py parsed wildfire
data using wrong keys ("regions" instead of "fires_by_region", "detections"
instead of "top_clusters"). Now correctly matches NASA FIRMS response format.

Dashboard updateAll() now wraps each map/UI update in try/catch to prevent
a single failed layer from blocking all subsequent layer renders.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:36:29 -05:00
Marc Shade de2cbeaa1a feat: add strategic synthesis to dashboard map + drawer
- Strategic Posture section (top of drawer): composite score, 9 domain
  grid with color-coded scores, top 5 threats
- Fleet Report section: readiness score/level, waterway status table,
  aircraft count, active surges
- Population Exposure map layer: circle markers sized by population,
  colored by threat type (red=conflict, orange=quake, yellow=fire)
- Population Exposure drawer section: total exposed, by event type,
  city table with distance
- HUD pills: Posture score + Exposed population
- Layer toggle for Pop Exposure (purple, default on)
- Backend: exposure API now includes lat/lon for map rendering

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:21:03 -05:00
Marc Shade 2969dfc950 feat: add strategic synthesis layer — Phase 11 (+4 = 68 tools)
- intel_strategic_posture: composite risk from 9 weighted domains
  (military, political, conflict, infrastructure, economic, cyber,
  health, climate, space) with per-domain scoring and top threats
- intel_world_brief: structured daily intelligence summary aggregating
  posture, focal points, news clusters, anomalies, trending threats
- intel_fleet_report: naval fleet activity combining theater posture,
  waterway status, military surge, and readiness scoring
- intel_population_exposure: population at risk near active events
  (earthquakes, wildfires, conflict) using 105-city dataset (1B pop)

New files: analysis/posture.py, analysis/world_brief.py,
analysis/exposure.py, sources/fleet.py, config/population.py

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:02:14 -05:00
Marc Shade 7359c03275 docs: update all docs for 64 tools, Phase 9 NLP complete
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 08:44:28 -05:00
Marc Shade 69f1a6d44f feat: NLP intelligence — entity extraction, classification, clustering, spikes (+4 = 64 tools)
Phase 10: News Intelligence & NLP
- intel_extract_entities: Regex-based NER for countries, leaders, orgs,
  companies, CVEs, APT groups (28 leaders, 41 orgs, 25 companies, 36 APTs)
- intel_classify_event: Keyword-based threat classification into 14
  categories with severity scoring (1-10)
- intel_news_clusters: Jaccard similarity topic clustering for news
  articles with keyword extraction
- intel_keyword_spikes: Welford's algorithm baseline comparison with
  CVE/APT pattern extraction from headlines

No new dependencies — all pure Python with regex and SQLite.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 08:41:40 -05:00
Marc Shade 2aa5fd1425 fix: replace iframe modal with window.open for external links
Iframes blocked by most sites (X-Frame-Options/CSP). External links
now open in a new tab via window.open with noopener,noreferrer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 08:17:54 -05:00
Marc Shade 084a386645 docs: update README, pyproject for 60 tools across 25 domains
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 08:05:58 -05:00
Marc Shade 6065eabb82 docs: update ROADMAP to reflect 60 tools and completed phases
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 07:46:47 -05:00
Marc Shade 11fc331ba4 feat: geospatial datasets — 70 bases, 40 ports, 24 pipelines, 24 nuclear (+4 = 60 tools)
Static geospatial intelligence datasets with map visualization:
- 70 military bases from 9 operators (USA, RUS, CHN, GBR, FRA, NATO, etc.)
- 40 strategic ports (container, oil, LNG, naval, bulk)
- 24 oil/gas/hydrogen pipelines with capacity and status
- 24 nuclear facilities (power, enrichment, research, reprocessing)
- 4 new MCP tools: intel_military_bases, intel_strategic_ports,
  intel_pipelines, intel_nuclear_facilities
- New "Infrastructure" map layer with base/port/facility markers
- Pipeline summary table in drawer with click-to-detail
- All geospatial items have detail modals on click

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 07:42:08 -05:00
Marc Shade a3dabb2c9f feat: modal detail system, 80+ RSS feeds, service status tool (#56)
- All external links open in iframe modal instead of navigating away
- 9 drawer item types (cyber, health, AI, social, elections, etc.)
  expand into rich detail panel on click
- RSS feeds expanded from ~20 to ~80 across 14 categories with
  source tier reliability scoring
- New intel_service_status tool monitoring AWS/Azure/GCP/CF/GitHub
- Cloud service incidents rendered in dashboard Security section
- Zero target=_blank links remain in dashboard

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 07:29:31 -05:00
Marc Shade 2d33ea136a feat: IODA fallback, UCDP timeout fix, PDF export, 18 tests
- infrastructure.py: Add IODA (Georgia Tech) as fallback when Cloudflare
  Radar returns 403 (no API token). Internet outage data now available
  without CLOUDFLARE_API_TOKEN.
- conflict.py: Increase UCDP GED API timeout from 15s to 30s to handle
  slow responses from ucdpapi.pcr.uu.se.
- dashboard/app.py: Add /api/report/pdf endpoint for PDF daily brief
  export via weasyprint (optional dependency).
- pyproject.toml: Add dashboard + pdf optional deps, intel-dashboard
  script entry point, update description for 55 tools.
- tests: Add 11 new tests covering health, sanctions, elections, shipping,
  social, nuclear, infrastructure (IODA fallback + cable health), and
  UCDP conflict. Fix cross-loop asyncio lock issue in conftest.
- Total: 50 tests passing, 55 tools verified.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 07:05:58 -05:00
Marc Shade 6fee3feae5 fix: dashboard layout — alerts clear layers, zoom above ticker
Alert banner moved right (left: 220px) to clear layers panel,
reduced strip size (0.58rem, 3px padding), text-overflow ellipsis.
Zoom controls pushed up 50px margin-bottom to clear bottom ticker.
Responsive rule for alert banner on small screens.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 05:40:44 -05:00
Marc Shade dd3c4f6951 fix: conflict zones always visible via INTEL_HOTSPOTS fallback
When both ACLED (no API key) and UCDP (timeout/empty) fail, the
dashboard now falls back to 22 pre-coded conflict hotspots from
INTEL_HOTSPOTS with severity levels (critical/high/moderate/low).
Frontend updated with 3-tier fallback: ACLED → UCDP → conflict_zones.
Marker sizing uses escalation level for hotspots, tooltips show severity.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 22:25:05 -05:00
Marc Shade 2d46b064dd feat: add adsb.lol as primary military aircraft source
OpenSky anonymous access returns 429 consistently. Added adsb.lol
free community API (/v2/mil endpoint) as primary source with OpenSky
as fallback.

- _fetch_adsblol_military: dedicated military endpoint, no filtering needed
- _fetch_opensky_military: original OpenSky logic as fallback
- _icao_to_country: derives country from ICAO hex prefix (US, UK, FR, etc.)
- adsblol rate limit: 5s between calls (community API, be polite)
- Cache TTL increased to 300s for both sources
- bbox filtering applied client-side for adsb.lol data

Result: 127 military aircraft from multiple nations now visible on map.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 21:23:11 -05:00
Marc Shade 6c2159d06d fix: conflict map uses UCDP as fallback when ACLED unavailable
- updateMapConflict supports both ACLED and UCDP data fields
  (fatalities/best, event_type/type_of_violence_label)
- updateAll passes UCDP events when ACLED errors (no API key)
- HUD conflict pill also falls back to UCDP source
- Increased conflict marker limit from 100 to 200

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 21:03:17 -05:00
Marc Shade e47f0a70b2 fix: stale-data fallback, per-source rate limits, broken feeds
Cache: add get_stale() for last-known-good fallback when APIs fail.
Fetcher: on API failure or tripped circuit breaker, serve stale cached
data instead of returning None — dashboards never go blank after first
successful fetch. Add per-source rate limits (11 sources configured).

Fix Yahoo Finance: compute change_pct from previousClose when
regularMarketChangePercent is absent (Yahoo v8 API change).
Fix health RSS: replace dead WHO DON/ProMED/CIDRAP URLs with working
WHO news, CDC outbreaks, and Outbreak News Today feeds.
Fix wildfires: extend FIRMS query from 1-day to 2-day (NRT data lag),
include nominal-confidence fires (was filtering to high-only).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 20:34:36 -05:00
Marc Shade 0fdd0814d7 feat: wire Phase 7 feeds to dashboard — 7 new visualizations + nuclear map layer
Backend: add 7 new data feeds to _fetch_overview() (33 total SSE streams).
Frontend: alert banner (critical/high/medium), health outbreak tracker,
election calendar with risk bars, shipping stress gauge, social signals
from Reddit, nuclear test site map layer with concern scoring, weekly
trends with anomaly tracking. New HUD pills for alerts, shipping stress,
outbreaks, nuclear flags.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 20:18:09 -05:00
Marc Shade d5bf09f342 feat: add health, sanctions, elections, shipping, social, nuclear intelligence — Phase 7 (+10 = 55 tools)
New source modules: disease outbreaks (WHO/ProMED/CIDRAP), OFAC sanctions
search, election calendar with risk scoring, shipping stress index,
Reddit social signals, nuclear test site seismic monitor. Cross-domain
alert digest and weekly trend analysis. Registers orphaned space_weather
and ai_watch modules.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 20:06:05 -05:00
Marc Shade 9f7a81812b feat: add military & infrastructure intelligence — Phase 6 (+6 = 45 tools)
New analysis modules: surge detection (8 sensitive regions), cascade
simulation (6 cable corridors), hotspot escalation scoring (22 hotspots).
New tools: commodity quotes, unrest events, hotspot escalation, military
surge, vessel snapshot, cascade analysis.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 19:04:49 -05:00
Marc Shade 8d60a9a220 feat: add core analysis engine — focal points, temporal anomalies, CII v2
Phase 5 of world-intel-mcp: intelligence synthesis layer that makes raw
data actionable.

New modules:
- config/countries.py: 22 tier-1 countries with event multipliers, 22
  intel hotspots, 9 strategic waterways, 6 conflict zones
- analysis/focal_points.py: detect convergence of signals on entities
  using signal count, type diversity, and recency weighting
- analysis/temporal.py: Welford's algorithm + SQLite for streaming
  anomaly detection with seasonal baselines (weekday+month)

Upgraded modules:
- analysis/instability.py: CII v2 with 4 weighted domains (unrest 0.25,
  conflict 0.30, security 0.20, information 0.25), UCDP floors, event
  multipliers. Full v1 backward compat preserved.
- analysis/signals.py: v2 aggregator accepts 7 data sources (added
  outages, military, protests) with convergence scoring
- sources/intelligence.py: 3 new fetch functions (focal_points,
  signal_summary, temporal_anomalies), instability upgraded to CII v2

3 new MCP tools: intel_focal_points, intel_signal_summary,
intel_temporal_anomalies. Total: 39 tools.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 18:39:57 -05:00
Marc Shade 561ed8e277 feat: add space weather + AI watch feeds, fix data binding issues
- Add space_weather source (NOAA SWPC: Kp index, X-ray flux, alerts)
- Add ai_watch source (arXiv cs.AI/LG/CL, HuggingFace, lab trending)
- Fix RSS circuit breaker: per-feed source names prevent cascade trips
- Fix displacement field: internally_displaced (was reading idps)
- Fix energy prices: handle nested oil.brent/wti structure
- Fix climate anomalies: use temp_anomaly_c and precip_anomaly_pct
- Fix news ticker: add feed_name to source fallback chain
- Remove defunct Reuters RSS feed, update War Zone URL
- Disable HTML caching for dev-friendly reloads

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 13:28:38 -05:00
Marc Shade affaf4b200 feat: redesign intelligence dashboard as map-first ops center
Complete v3 rewrite: full-viewport Leaflet map as primary interface
with glassmorphic floating panels. All geolocated events (earthquakes,
military aircraft, ACLED conflict, wildfire clusters, signal convergence)
are clickable map markers with detailed slide-in modals.

Design: Chakra Petch + Share Tech Mono typography, vignette overlay,
CSS custom properties, animated markers with pulse/glow on critical
events. Data drawer with sticky section headers for non-geospatial
data (markets, crypto, cyber, predictions, displacement). Scrolling
news ticker, HUD stat pills, layer toggle switches.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 13:08:09 -05:00
Marc Shade 15ecc8e3e1 feat: expand intelligence dashboard with 7 new feeds, tabbed UI, map, and charts
Backend: wire stablecoin_status, etf_flows, acled_events, ucdp_events,
displacement, risk_scores, and signal_convergence into the SSE overview
endpoint (23 total feeds, up from 16).

Frontend: complete rewrite with 7-tab navigation (Overview, Markets,
Security, Conflict & Humanitarian, Natural & Climate, Geospatial Map,
Trend Charts), Leaflet dark-tile map with toggleable layers, Chart.js
rolling time-series, feed health counter, and DOMPurify sanitization.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 12:49:11 -05:00
Marc Shade 5af243d7a5 fix: handle object-shaped climate anomaly data in dashboard
Climate API may return zones as {zone_name: data} object instead of
array. Added Object.values() fallback to normalize both shapes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 12:25:06 -05:00
Marc Shade 7a4036dc8d feat: add live intelligence dashboard with SSE streaming
Starlette app serving a real-time dashboard at http://127.0.0.1:8501.
17 intelligence domains updated every 30s via Server-Sent Events:
markets, crypto, sectors, macro, cyber, military, earthquakes,
wildfires, climate, news, predictions, energy, aviation, infra,
cables, nav warnings, trending keywords.

- DOMPurify for XSS-safe DOM updates
- Exponential backoff SSE reconnection
- Responsive dark-theme grid layout with Chart.js
- CLI: `intel dashboard [--port 8501]`

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 12:20:48 -05:00
Marc Shade c12f45eaa8 fix: Jinja2 None-crash in report templates — |default(0) → or 0
Jinja2's |default(0) only replaces undefined, not None values from API
data. When used with comparison operators (>=) or format(), None causes
TypeError crashes. Replaced with Python `or` operator which handles
None correctly across market_overview.html (7 patterns) and
country_dossier.html (1 pattern).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 12:05:10 -05:00
Marc Shade a4d2b546a3 refactor: replace Wingbits (paid) with hexdb.io (free) for aircraft lookups
hexdb.io provides ICAO hex aircraft details with no API key required,
eliminating the 30-day trial limitation of Wingbits.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 11:12:09 -05:00
Marc Shade 3131ccbcdc fix: wildfire parser uses dynamic CSV headers + cache key collision
- Parse FIRMS CSV column indices from header row instead of hardcoded
  offsets. FIRMS added 'instrument' column, shifting confidence/frp.
- Fix cache key collision: _fetch_region and fetch_wildfires both used
  'wildfire:fires:{region}' — now CSV uses 'wildfire:csv:{region}'.
- Add type guard for non-string input to _parse_fires_csv.
- Remove unused _CSV_COLUMNS constant.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 10:55:05 -05:00
Marc Shade 01cb4255ef feat: add world-intel-mcp server — 36 tools across 14 intelligence domains
New MCP server providing real-time global intelligence: financial markets
(Yahoo Finance, CoinGecko), economic indicators (FRED, EIA, World Bank),
conflict tracking (ACLED, UCDP, HDX), military flights (OpenSky),
infrastructure monitoring (Cloudflare Radar, NGA cable health), maritime
warnings (NGA), climate anomalies (Open-Meteo), news aggregation (RSS,
GDELT), prediction markets (Polymarket), displacement data (UNHCR),
aviation delays (FAA), cyber threats (Feodo, CISA KEV, SANS, URLhaus),
country intelligence briefs (Ollama LLM), and HTML report generation
(Jinja2 + Chart.js).

Includes: SQLite TTL cache, per-source circuit breakers, async HTTP
fetcher with retry/rate-limiting, Click CLI with 27 commands, 4 analysis
modules (instability scoring, geo-convergence, signal aggregation, news
clustering), 4 HTML report templates, and 28 unit tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 10:33:57 -05:00