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>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
affaf4b200
commit
561ed8e277
@@ -33,6 +33,8 @@ from world_intel_mcp.sources import (
|
||||
climate,
|
||||
conflict,
|
||||
intelligence,
|
||||
space_weather,
|
||||
ai_watch,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -87,6 +89,8 @@ async def _fetch_overview() -> dict:
|
||||
"displacement": displacement.fetch_displacement_summary(fetcher),
|
||||
"risk_scores": intelligence.fetch_risk_scores(fetcher),
|
||||
"signal_convergence": intelligence.fetch_signal_convergence(fetcher),
|
||||
"space_weather": space_weather.fetch_space_weather(fetcher),
|
||||
"ai_watch": ai_watch.fetch_ai_watch(fetcher),
|
||||
}
|
||||
|
||||
gathered = await asyncio.gather(
|
||||
@@ -114,16 +118,10 @@ async def _fetch_overview() -> dict:
|
||||
# Routes
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
_INDEX_HTML: str | None = None
|
||||
|
||||
|
||||
async def index(request):
|
||||
"""Serve the dashboard HTML page."""
|
||||
global _INDEX_HTML
|
||||
if _INDEX_HTML is None:
|
||||
html_path = Path(__file__).parent / "index.html"
|
||||
_INDEX_HTML = html_path.read_text()
|
||||
return HTMLResponse(_INDEX_HTML)
|
||||
"""Serve the dashboard HTML page (reloads on each request during dev)."""
|
||||
html_path = Path(__file__).parent / "index.html"
|
||||
return HTMLResponse(html_path.read_text())
|
||||
|
||||
|
||||
async def api_overview(request):
|
||||
|
||||
Reference in New Issue
Block a user