mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-25 17:14:57 +02:00
* feat: add WTO trade policy service with 4 RPC endpoints and TradePolicyPanel Adds a new `trade` RPC domain backed by the WTO API (apiportal.wto.org) for trade policy intelligence: quantitative restrictions, tariff timeseries, bilateral trade flows, and SPS/TBT barrier notifications. New files: 6 protos, generated server/client, 4 server handlers + shared WTO fetch utility, client service with circuit breakers, TradePolicyPanel (4 tabs), and full API key infrastructure (Rust keychain, sidecar, runtime config). Panel registered for FULL and FINANCE variants with data loader integration, command palette entry, status panel tracking, data freshness monitoring, and i18n across all 17 locale files. https://claude.ai/code/session_01HZXyoQp6xK3TX8obDzv6Ye * chore: update package-lock.json https://claude.ai/code/session_01HZXyoQp6xK3TX8obDzv6Ye * fix: move tab click listener to constructor to prevent leak The delegated click handler was added inside render(), which runs on every data update (4× per load cycle). Since the listener targets this.content (a persistent container), each call stacked a duplicate handler. Moving it to the constructor binds it exactly once. https://claude.ai/code/session_01HZXyoQp6xK3TX8obDzv6Ye --------- Co-authored-by: Claude <noreply@anthropic.com>
2.1 KiB
2.1 KiB
Desktop Runtime Configuration Schema
World Monitor desktop now uses a runtime configuration schema with per-feature toggles and secret-backed credentials.
Secret keys
The desktop vault schema (Rust SUPPORTED_SECRET_KEYS) supports the following 22 keys:
GROQ_API_KEYOPENROUTER_API_KEYFRED_API_KEYEIA_API_KEYFINNHUB_API_KEYCLOUDFLARE_API_TOKENACLED_ACCESS_TOKENURLHAUS_AUTH_KEYOTX_API_KEYABUSEIPDB_API_KEYNASA_FIRMS_API_KEYWINGBITS_API_KEYWS_RELAY_URLVITE_WS_RELAY_URLVITE_OPENSKY_RELAY_URLOPENSKY_CLIENT_IDOPENSKY_CLIENT_SECRETAISSTREAM_API_KEYOLLAMA_API_URLOLLAMA_MODELWORLDMONITOR_API_KEY— gates cloud fallback access (min 16 chars)WTO_API_KEY
Note: UC_DP_KEY exists in the TypeScript RuntimeSecretKey union but is not in the desktop Rust keychain or sidecar.
Feature schema
Each feature includes:
id: stable feature identifier.requiredSecrets: list of keys that must be present and valid.enabled: user-toggle state from runtime settings panel.available: computed (enabled && requiredSecrets valid).fallback: user-facing degraded behavior description.
Desktop secret storage
Desktop builds persist secrets in OS credential storage through Tauri command bindings backed by Rust keyring entries (world-monitor service namespace).
Secrets are not stored in plaintext files by the frontend.
Degradation behavior
If required secrets are missing/disabled:
- Summarization: Groq/OpenRouter disabled, browser model fallback.
- FRED / EIA / Finnhub: economic, oil analytics, and stock data return empty state.
- Cloudflare / ACLED: outages/conflicts return empty state.
- Cyber threat feeds (URLhaus, OTX, AbuseIPDB): cyber threat layer returns empty state.
- NASA FIRMS: satellite fire detection returns empty state.
- Wingbits: flight enrichment disabled, heuristic-only flight classification remains.
- AIS / OpenSky relay: live tracking features are disabled cleanly.
- WorldMonitor API key: cloud fallback is blocked; desktop operates local-only.