mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-25 17:14:57 +02:00
* feat(oref): add Tzeva Adom as primary alert source with Hebrew translations Tzeva Adom API (api.tzevaadom.co.il/notifications) is now the primary source for Israeli siren alerts. Free, no proxy needed, works from any IP. OREF direct (via residential proxy) remains as fallback. Includes Hebrew→English translation dictionaries: - 1,305 Israeli localities from CBS data - 28 threat type terms (missiles, rockets, drones, infiltration, etc.) Alert titles and location names are now served in English. Fallback chain: Tzeva Adom (primary) → OREF direct (proxy, fallback) * fix(oref): add threat categorization + misplaced-city guard to Tzeva Adom - categorizeOrefThreat() classifies Hebrew/English alerts into MISSILE/ROCKET/DRONE/MORTAR/INFILTRATION/EARTHQUAKE/TSUNAMI/HAZMAT - Detects when API puts a city name in the threat field and moves it to locations (known API quirk) * fix(oref): decouple siren poll loop from OREF proxy availability SIREN_ALERTS_ENABLED is always true (Tzeva Adom needs no proxy). OREF_PROXY_AVAILABLE gates only the OREF fallback path. The poll loop now starts regardless of proxy config, using Tzeva Adom as primary and OREF as fallback only when OREF_PROXY_AUTH is set. Response payloads report configured: true so the panel activates. * fix(oref): preserve error state when both siren sources fail When Tzeva Adom returns null and OREF proxy is unavailable, return early with lastError set instead of falling through and clearing the error. Prevents a false green state in the panel when both sources are down. * fix(oref): rebuild response cache on source outage Without calling orefPreSerializeResponses() in the failure branch, the /oref/alerts handler keeps serving stale _alertsCache from the last successful poll, masking the outage.