@dangahagan/weather-mcp 1.22.0 → 1.24.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/README.md +32 -13
- package/dist/config/api.d.ts +29 -0
- package/dist/config/api.d.ts.map +1 -1
- package/dist/config/api.js +31 -0
- package/dist/config/api.js.map +1 -1
- package/dist/config/cache.d.ts +1 -0
- package/dist/config/cache.d.ts.map +1 -1
- package/dist/config/cache.js +6 -0
- package/dist/config/cache.js.map +1 -1
- package/dist/config/displayThresholds.d.ts +16 -0
- package/dist/config/displayThresholds.d.ts.map +1 -1
- package/dist/config/displayThresholds.js +16 -0
- package/dist/config/displayThresholds.js.map +1 -1
- package/dist/handlers/alertsHandler.d.ts +15 -3
- package/dist/handlers/alertsHandler.d.ts.map +1 -1
- package/dist/handlers/alertsHandler.js +558 -10
- package/dist/handlers/alertsHandler.js.map +1 -1
- package/dist/handlers/currentConditionsHandler.d.ts.map +1 -1
- package/dist/handlers/currentConditionsHandler.js +138 -4
- package/dist/handlers/currentConditionsHandler.js.map +1 -1
- package/dist/handlers/weatherSummaryHandler.d.ts +3 -1
- package/dist/handlers/weatherSummaryHandler.d.ts.map +1 -1
- package/dist/handlers/weatherSummaryHandler.js +2 -2
- package/dist/handlers/weatherSummaryHandler.js.map +1 -1
- package/dist/index.js +21 -4
- package/dist/index.js.map +1 -1
- package/dist/services/googleWeather.d.ts +100 -0
- package/dist/services/googleWeather.d.ts.map +1 -0
- package/dist/services/googleWeather.js +264 -0
- package/dist/services/googleWeather.js.map +1 -0
- package/dist/services/nationalCap.d.ts +172 -0
- package/dist/services/nationalCap.d.ts.map +1 -0
- package/dist/services/nationalCap.js +670 -0
- package/dist/services/nationalCap.js.map +1 -0
- package/dist/types/cap.d.ts +217 -0
- package/dist/types/cap.d.ts.map +1 -0
- package/dist/types/cap.js +13 -0
- package/dist/types/cap.js.map +1 -0
- package/dist/types/googleWeather.d.ts +99 -0
- package/dist/types/googleWeather.d.ts.map +1 -0
- package/dist/types/googleWeather.js +30 -0
- package/dist/types/googleWeather.js.map +1 -0
- package/dist/utils/capParse.d.ts +171 -0
- package/dist/utils/capParse.d.ts.map +1 -0
- package/dist/utils/capParse.js +616 -0
- package/dist/utils/capParse.js.map +1 -0
- package/dist/utils/pointInPolygon.d.ts +50 -0
- package/dist/utils/pointInPolygon.d.ts.map +1 -0
- package/dist/utils/pointInPolygon.js +135 -0
- package/dist/utils/pointInPolygon.js.map +1 -0
- package/dist/utils/thermalStress.d.ts +114 -0
- package/dist/utils/thermalStress.d.ts.map +1 -0
- package/dist/utils/thermalStress.js +186 -0
- package/dist/utils/thermalStress.js.map +1 -0
- package/dist/utils/units.d.ts +4 -0
- package/dist/utils/units.d.ts.map +1 -1
- package/dist/utils/units.js +6 -0
- package/dist/utils/units.js.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@dangahagan/weather-mcp)
|
|
4
4
|
[](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.dgahagan/weather-mcp)
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
|
-
[](./docs/testing/TEST_SUITE_README.md)
|
|
7
7
|
[](https://nodejs.org)
|
|
8
8
|
|
|
9
9
|
**Give your AI assistant real weather data — 17 tools, zero API keys, zero signup, zero cost.**
|
|
@@ -42,6 +42,14 @@ Then just ask:
|
|
|
42
42
|
|
|
43
43
|
📦 Listed in the [Official MCP Registry](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.dgahagan/weather-mcp) as `io.github.dgahagan/weather-mcp`.
|
|
44
44
|
|
|
45
|
+
✅ **The official package is [`@dangahagan/weather-mcp`](https://www.npmjs.com/package/@dangahagan/weather-mcp)**, published from this repository via npm [trusted publishing](https://docs.npmjs.com/trusted-publishers). Every release carries a signed provenance attestation tying the tarball to the exact commit and workflow that built it — verify any version without installing it:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npm view @dangahagan/weather-mcp@latest dist.attestations
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Republished copies of this server exist under other npm scopes. They are MIT-licensed forks, which the license permits, but they are not maintained here and are usually many versions behind. This issue tracker covers `@dangahagan/weather-mcp` only — for anything installed from another scope, please report it to that package's publisher.
|
|
52
|
+
|
|
45
53
|
## Why this server?
|
|
46
54
|
|
|
47
55
|
There are excellent commercial weather MCPs backed by paid APIs and full-time teams. If you need SLA-backed data, minute-level nowcasting, or premium global station coverage, they're worth a look — this project won't pretend otherwise.
|
|
@@ -50,7 +58,7 @@ Choose this one if you want:
|
|
|
50
58
|
|
|
51
59
|
- **Genuinely free** — every data source is a free public API. No trial that expires, no credit card, no rate-limited "free tier" bait.
|
|
52
60
|
- **No API keys** — install to first forecast in under a minute. Nothing to configure, nothing to leak into a repo. ([Three optional keys](#optional-api-keys) add extras if you want them; the default configuration needs none.)
|
|
53
|
-
- **Fully open source** — MIT licensed, readable TypeScript, 2,
|
|
61
|
+
- **Fully open source** — MIT licensed, readable TypeScript, 2,510 tests. Audit it, fork it, fix it.
|
|
54
62
|
- **Privacy-respecting** — your queries go directly from your machine to public weather APIs. No middleman server, no telemetry.
|
|
55
63
|
- **Breadth** — 17 tools covering weather, safety hazards (lightning, floods, wildfires), marine conditions, air quality, and historical data back to 1940. Most weather MCPs stop at forecasts.
|
|
56
64
|
|
|
@@ -63,8 +71,8 @@ All 17 tools, documented in detail in **[docs/TOOLS.md](./docs/TOOLS.md)**:
|
|
|
63
71
|
| Tool | What it does | Coverage |
|
|
64
72
|
|------|-------------|----------|
|
|
65
73
|
| `get_forecast` | Daily/hourly forecasts up to 16 days by coordinates, saved location, or city name; sunrise/sunset, UV, precipitation probability, optional climate-normals comparison, optional moon phase & twilight almanac, optional five-model agreement comparison | 🌍 Global |
|
|
66
|
-
| `get_current_conditions` | Current weather: temperature, wind, humidity, pressure; NOAA station observations in the US (plus heat index/wind chill, snow depth, optional NOAA fire-weather indices), Open-Meteo model data elsewhere (with an optional computed Fosberg fire-weather index), or real airport station observations worldwide with `source="metar"`. Always states the observation's age, and automatically falls back to a fresher nearby station when the nearest one has gone dark | 🌍 Global |
|
|
67
|
-
| `get_alerts` | Active watches, warnings, and advisories sorted by severity; official national warnings for the US (NOAA), Canada (ECCC),
|
|
74
|
+
| `get_current_conditions` | Current weather: temperature, wind, humidity, pressure; NOAA station observations in the US (plus heat index/wind chill, snow depth, optional NOAA fire-weather indices), Open-Meteo model data elsewhere (with an optional computed Fosberg fire-weather index), or real airport station observations worldwide with `source="metar"`. Always states the observation's age, and automatically falls back to a fresher nearby station when the nearest one has gone dark. In extreme conditions automatically adds frostbite time-to-onset (computed wind chill) or heat-stress context (estimated WBGT) | 🌍 Global |
|
|
75
|
+
| `get_alerts` | Active watches, warnings, and advisories sorted by severity; official national warnings for the US (NOAA), Canada (ECCC), 38 European countries (MeteoAlarm), India (NDMA SACHET), the Philippines (PAGASA), and Indonesia (BMKG) | 🇺🇸 🇨🇦 🇪🇺 🇮🇳 🇵🇭 🇮🇩 |
|
|
68
76
|
| `get_historical_weather` | Hourly/daily observations from 1940 to present | 🌍 Global |
|
|
69
77
|
| `get_weather_summary` | One-call overview combining current conditions, forecast, and alerts (optionally air quality and lightning) | 🌍 Global |
|
|
70
78
|
| `search_location` | Geocode place names to coordinates ("Paris" → 48.85, 2.35) | 🌍 Global |
|
|
@@ -89,7 +97,7 @@ All 17 tools, documented in detail in **[docs/TOOLS.md](./docs/TOOLS.md)**:
|
|
|
89
97
|
## Feature highlights
|
|
90
98
|
|
|
91
99
|
- **Smart source selection** — US queries use NOAA (detailed, includes forecaster narratives); everywhere else uses Open-Meteo. You never pick; it just works.
|
|
92
|
-
- **International weather alerts** — `get_alerts` routes by country: NOAA in the US, Environment and Climate Change Canada alerts in Canada,
|
|
100
|
+
- **International weather alerts** — `get_alerts` routes by country: NOAA in the US, Environment and Climate Change Canada alerts in Canada, the official national warnings of 38 European countries via EUMETNET MeteoAlarm, and the national CAP feeds of India (NDMA SACHET), the Philippines (PAGASA) and Indonesia (BMKG) — shown unmodified, with the issuing service credited. Where a feed publishes geometry inline, warnings are matched to your exact point by the alert's own polygon rather than to the whole country (the Philippines and Indonesia today; Europe remains country-level). Border cities like Toronto get the right country's alerts, not the nearest bounding box's.
|
|
93
101
|
- **Real observations worldwide** — ask for what a station is *actually reporting* and `get_current_conditions` will read the nearest airport's METAR (`source="metar"`): a genuine instrument reading anywhere on earth, with the station, its distance, and the observation age always stated. Outside the US this is the difference between a measurement and a model estimate.
|
|
94
102
|
- **Model agreement** — ask *"how confident is this forecast?"* and `compare_models=true` compares five global models (GFS, ECMWF, ICON, GEM, UKMO) in one request, summarizing where they agree and where they split rather than dumping five forecasts. Spread across models is a proxy for uncertainty, not a guarantee — a tight spread can still be wrong, and the output says so.
|
|
95
103
|
- **Ensemble spread** — the sibling question: *"how confident is the model itself?"* `ensemble_spread=true` summarizes ECMWF ENS's 50 perturbed members — per-day High/Moderate/Low confidence, interquartile temperature bands, and how many members produce rain — instead of one deterministic forecast. Member fractions are raw model output, **not calibrated probabilities**: a confident ensemble can still be wrong, and the output says so. Mutually exclusive with `compare_models`; the two answer different questions.
|
|
@@ -115,6 +123,9 @@ All free, all public, no authentication required:
|
|
|
115
123
|
| [RCC ACIS](https://www.rcc-acis.org/) | Daily record high/low temperatures | US |
|
|
116
124
|
| [EUMETNET MeteoAlarm](https://meteoalarm.org/) | Official national weather warnings (38 European countries) | Europe |
|
|
117
125
|
| [MSC GeoMet](https://api.weather.gc.ca/) | Environment and Climate Change Canada weather alerts | Canada |
|
|
126
|
+
| [NDMA SACHET](https://sachet.ndma.gov.in/) | Official Indian warnings (CAP, polygon geometry) — public domain | India |
|
|
127
|
+
| [PAGASA](https://publicalert.pagasa.dost.gov.ph/) | Official Philippine warnings (CAP, inline polygons) — CC BY 4.0 | Philippines |
|
|
128
|
+
| [BMKG](https://www.bmkg.go.id/) | Official Indonesian nowcast warnings (CAP, inline polygons) — attribution required | Indonesia |
|
|
118
129
|
| [NIFC WFIGS](https://data-nifc.opendata.arcgis.com/) | Active wildfire perimeters and incidents | US |
|
|
119
130
|
| [NASA FIRMS](https://firms.modaps.eosdis.nasa.gov/) | Satellite fire detections (VIIRS, near real-time) | Global |
|
|
120
131
|
| [RainViewer](https://www.rainviewer.com/api.html) | Precipitation radar imagery | Global |
|
|
@@ -256,6 +267,7 @@ Supported on `get_forecast`, `get_current_conditions`, and `get_historical_weath
|
|
|
256
267
|
| `NCEI_API_TOKEN` | — | Optional [free NCEI token](https://www.ncdc.noaa.gov/cdo-web/token) for official NOAA climate normals (US); falls back to Open-Meteo automatically. See [Optional API keys](#optional-api-keys) |
|
|
257
268
|
| `FIRMS_MAP_KEY` | — | Optional [free FIRMS key](https://firms.modaps.eosdis.nasa.gov/api/map_key/) for targeted wildfire queries and up to 5 days of detection history. See [Optional API keys](#optional-api-keys) |
|
|
258
269
|
| `GOOGLE_POLLEN_API_KEY` | — | Optional key for pollen outside Europe (incl. the US). **Requires a Google Cloud billing account** — free tier is 5,000 lookups/month. See [Optional API keys](#optional-api-keys) and [the setup guide](./docs/GOOGLE_POLLEN_KEY_SETUP.md) |
|
|
270
|
+
| `GOOGLE_WEATHER_API_KEY` | — | Optional key for official weather alerts beyond the US, Canada, Europe, India, the Philippines, and Indonesia (~45+ more territories). **Requires a Google Cloud billing account.** See [Optional API keys](#optional-api-keys) and [the setup guide](./docs/GOOGLE_WEATHER_KEY_SETUP.md) |
|
|
259
271
|
|
|
260
272
|
For caching architecture details, see [.github/CACHING.md](./.github/CACHING.md).
|
|
261
273
|
|
|
@@ -266,7 +278,7 @@ zero signup, and zero cost — that is the configuration this project is built
|
|
|
266
278
|
around and the one most people should use. If that's you, you can skip this
|
|
267
279
|
section entirely.
|
|
268
280
|
|
|
269
|
-
|
|
281
|
+
Four optional keys each unlock one extra. Without them the corresponding tool
|
|
270
282
|
still works; it just returns the keyless answer.
|
|
271
283
|
|
|
272
284
|
| Variable | What it costs | What it adds | Without it |
|
|
@@ -274,11 +286,15 @@ still works; it just returns the keyless answer.
|
|
|
274
286
|
| [`NCEI_API_TOKEN`](https://www.ncdc.noaa.gov/cdo-web/token) | Free registration (email) | Official NOAA station climate normals for US locations | Normals are computed from the Open-Meteo reanalysis archive — global, and the path virtually every user is already on |
|
|
275
287
|
| [`FIRMS_MAP_KEY`](https://firms.modaps.eosdis.nasa.gov/api/map_key/) | Free registration (email) | Targeted wildfire bbox queries with 1–5 days of detection history | Keyless 24-hour regional detection files — `get_wildfire_info` still works globally |
|
|
276
288
|
| `GOOGLE_POLLEN_API_KEY` | **Free tier, but requires a Google Cloud billing account (credit card on file)** — 5,000 lookups/month free, ~$10/1,000 after. [Setup guide](./docs/GOOGLE_POLLEN_KEY_SETUP.md) | Grass/tree/weed Universal Pollen Index outside Europe, including the US (65+ countries) | European pollen via CAMS still works keyless; elsewhere no pollen section renders |
|
|
289
|
+
| `GOOGLE_WEATHER_API_KEY` | **Free tier, but requires a Google Cloud billing account (credit card on file)** — the Weather API bills under a Maps Platform Essentials SKU; check Google's current allowance. [Setup guide](./docs/GOOGLE_WEATHER_KEY_SETUP.md) | Official weather alerts for ~45+ more territories — Australia, Japan, Brazil, Mexico and others ([Google's coverage list](https://developers.google.com/maps/documentation/weather/coverage) is authoritative) | US, Canadian, European, Indian, Philippine, and Indonesian alerts still work keyless; elsewhere `get_alerts` returns today's not-covered message |
|
|
277
290
|
|
|
278
|
-
The NCEI and FIRMS keys are true free registrations. **The Google
|
|
279
|
-
not** —
|
|
280
|
-
payment method to issue
|
|
281
|
-
"free" anywhere in these docs, and why
|
|
291
|
+
The NCEI and FIRMS keys are true free registrations. **The two Google keys are
|
|
292
|
+
not** — each has a free usage tier, but Google requires a billing account with
|
|
293
|
+
a payment method to issue them at all. That's why they aren't described as
|
|
294
|
+
simply "free" anywhere in these docs, and why they stay strictly optional. They
|
|
295
|
+
are separate variables on purpose: the recommended console restriction ties a
|
|
296
|
+
key to one specific API, so a Pollen-restricted key cannot serve alerts and
|
|
297
|
+
vice versa. If you prefer one unrestricted key, put the same string in both.
|
|
282
298
|
|
|
283
299
|
### Standing key policy
|
|
284
300
|
|
|
@@ -302,16 +318,19 @@ Being honest about what free public data can and can't do:
|
|
|
302
318
|
| Historical weather (1940+) | ✅ (>7 days old) | Station-level detail for last 7 days |
|
|
303
319
|
| Air quality, marine, radar, lightning | ✅ | — |
|
|
304
320
|
| Current conditions | ✅ (model data, or real station observations via `source="metar"`) | Station observations via NOAA (richer detail) |
|
|
305
|
-
| Weather alerts | ✅ US, Canada,
|
|
321
|
+
| Weather alerts | ✅ US, Canada, 38 European countries, India, the Philippines, and Indonesia keyless; ~45+ more territories with an optional key | NWS zone-level precision; Europe and India country-level; Philippines and Indonesia polygon-level |
|
|
306
322
|
| River conditions | ✅ (GloFAS modeled discharge) | Gauge observations + official flood stages via NWPS |
|
|
307
323
|
| Wildfires | ✅ (FIRMS satellite detections) | Named incidents with acreage + containment via NIFC |
|
|
308
324
|
| Fire weather | ✅ (computed Fosberg index + dryness context) | NOAA-published Haines, grassland, red-flag indices |
|
|
309
325
|
| Pollen | 🇪🇺 Europe keyless (CAMS, grains/m³); elsewhere needs an optional key | Universal Pollen Index with `GOOGLE_POLLEN_API_KEY` |
|
|
310
326
|
|
|
311
327
|
- European alerts are matched at **country level** — the keyless MeteoAlarm feeds carry no region polygons, so warnings for a large country may not affect the requested point; the output says so. Canadian alerts use a real bbox query with polygon-backed features.
|
|
328
|
+
- **Philippine and Indonesian alerts are matched by the alert's own polygon**, so a warning is shown only when it actually covers the requested point — finer than Europe's country-level matching. **Indian alerts are currently country-level**: SACHET publishes each alert's geometry from a separate endpoint that is not reliably reachable from servers, so Indian warnings are listed with an explicit note that they may not affect your exact location, exactly as Europe's are. Any alert whose geometry cannot be loaded is always listed rather than dropped — never silently treated as "not near you".
|
|
329
|
+
- Outside the US, Canada, Europe, India, the Philippines, and Indonesia, alerts need an optional [`GOOGLE_WEATHER_API_KEY`](#optional-api-keys); without one `get_alerts` says plainly that the region isn't covered rather than guessing. With a key, Google aggregates official national feeds for roughly 45 more territories — Australia, Japan, Brazil and Mexico among them, with [Google's coverage page](https://developers.google.com/maps/documentation/weather/coverage) as the authoritative list. Matching is by **provider polygon**, so coverage alignment may not be exact and an empty answer means "no alerts found", not a guarantee of coverage; the output says so both ways. Alert text appears in the publisher's source language. **The US, Canada, Europe, India, the Philippines, and Indonesia never contact Google** — those authorities stay first choice, key or no key — and a key failure surfaces loudly rather than degrading to a possibly-false all-clear.
|
|
312
330
|
- International current conditions default to **model-interpolated** values at the exact coordinates. `source="metar"` returns a **real instrument reading** instead — but from the nearest airport, which may be tens of km away and up to an hour old. The output always names the station, its distance and bearing, and the observation age, so the tradeoff is visible rather than assumed. METAR coverage follows airports, so remote land and open ocean have real gaps.
|
|
313
331
|
- Historical data older than 7 days comes from reanalysis models (9–25km grid), not direct station observations, and trails real time by ~5 days.
|
|
314
332
|
- Non-US wildfire results are **satellite heat detections, not managed incidents** — no fire names, sizes, or containment percentages exist in the data, detections can include industrial heat sources or agricultural burns, and a clear result is not an all-clear (cloud cover hides fires; small or new fires evade detection). The output frames all of this explicitly. Keyless data covers the last 24 hours; an optional free [`FIRMS_MAP_KEY`](https://firms.modaps.eosdis.nasa.gov/api/map_key/) unlocks targeted queries and up to 5 days of detection history (`day_range`).
|
|
333
|
+
- Frostbite-risk and heat-stress (WBGT) lines are **computed by this server** from temperature, humidity, and wind — not agency-published ratings. The wind chill is the standard 2001 North American model; the frostbite time bands are adapted from Environment Canada's published categories and the WBGT is the Australian Bureau of Meteorology's *simplified* estimate, which assumes full sun and light wind and so can overestimate in shade or overcast. Exertion thresholds also genuinely shift with acclimatization. Treat both as context, not as an occupational-safety determination.
|
|
315
334
|
- Non-US fire weather is a **Fosberg Fire Weather Index computed by this server** from current model values, not an agency-published rating — US locations get NOAA's own Haines/grassland/red-flag indices instead. The output says which it is and defers to national fire authorities; its category bands are a project heuristic.
|
|
316
335
|
- Non-US river discharge is **modeled**, not observed, and has no official flood-stage thresholds — levels are shown relative to recent history and the forecast ensemble. The ~5km model grid means the reported channel may be a few km from the requested point; the output says so when it is.
|
|
317
336
|
- Pollen is **Europe-only without a key**: it rides the CAMS European model on the air-quality endpoint, which returns real grains/m³ in Europe and nothing anywhere else. An optional [`GOOGLE_POLLEN_API_KEY`](#optional-api-keys) fills the gap for 65+ countries including the US, as a grass/tree/weed Universal Pollen Index (0–5) rather than per-species counts. Europe keeps the richer keyless data and never contacts Google.
|
|
@@ -324,7 +343,7 @@ Being honest about what free public data can and can't do:
|
|
|
324
343
|
```bash
|
|
325
344
|
npm run build # Compile TypeScript
|
|
326
345
|
npm run dev # Run in development mode
|
|
327
|
-
npm test # Run all 2,
|
|
346
|
+
npm test # Run all 2,510 tests
|
|
328
347
|
npm run test:coverage # Coverage report
|
|
329
348
|
npm run audit # Dependency vulnerability scan
|
|
330
349
|
```
|
|
@@ -342,7 +361,7 @@ Project structure, patterns, and contribution guidance:
|
|
|
342
361
|
- Error messages sanitized — no internal details leak to output
|
|
343
362
|
- Zero secrets by design: no keys means nothing to steal or misconfigure
|
|
344
363
|
- Automated dependency scanning (npm audit + Dependabot), minimal dependency footprint
|
|
345
|
-
-
|
|
364
|
+
- Security policy and supported versions: see [SECURITY.md](./SECURITY.md)
|
|
346
365
|
|
|
347
366
|
To report a vulnerability, see [SECURITY.md](./SECURITY.md).
|
|
348
367
|
|
package/dist/config/api.d.ts
CHANGED
|
@@ -77,4 +77,33 @@ export declare const GOOGLE_POLLEN_API_KEY: string | undefined;
|
|
|
77
77
|
* Check if Google Pollen API key is available (key configured)
|
|
78
78
|
*/
|
|
79
79
|
export declare function isGooglePollenKeyAvailable(): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Google Weather API key
|
|
82
|
+
*
|
|
83
|
+
* OPTIONAL: Create a key in the Google Cloud console
|
|
84
|
+
* (https://console.cloud.google.com/). Unlike the NCEI and FIRMS keys above,
|
|
85
|
+
* this one is **not a free registration**: it has a free usage tier, but
|
|
86
|
+
* **requires a Google Cloud billing account** (credit card on file).
|
|
87
|
+
* The **Weather API** must be enabled on the project.
|
|
88
|
+
*
|
|
89
|
+
* Benefits of providing a key:
|
|
90
|
+
* - Official weather alerts for ~45+ additional territories (Australia, Japan,
|
|
91
|
+
* Brazil, Mexico, and others) via the Google Weather API
|
|
92
|
+
*
|
|
93
|
+
* If not provided:
|
|
94
|
+
* - US, Canadian, European, Indian, Philippine, and Indonesian alerts
|
|
95
|
+
* continue to work keyless
|
|
96
|
+
* - Alerts outside these regions are unavailable
|
|
97
|
+
* - No setup required
|
|
98
|
+
*
|
|
99
|
+
* Rate limits with key:
|
|
100
|
+
* - Per Google's Weather API free tier
|
|
101
|
+
*
|
|
102
|
+
* Setup guide: docs/GOOGLE_WEATHER_KEY_SETUP.md
|
|
103
|
+
*/
|
|
104
|
+
export declare const GOOGLE_WEATHER_API_KEY: string | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* Check if Google Weather API key is available (key configured)
|
|
107
|
+
*/
|
|
108
|
+
export declare function isGoogleWeatherKeyAvailable(): boolean;
|
|
80
109
|
//# sourceMappingURL=api.d.ts.map
|
package/dist/config/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/config/api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,cAAc,oBAA6B,CAAC;AAEzD;;GAEG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,aAAa,oBAA4B,CAAC;AAEvD;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,qBAAqB,oBAAoC,CAAC;AAEvE;;GAEG;AACH,wBAAgB,0BAA0B,IAAI,OAAO,CAEpD"}
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/config/api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,cAAc,oBAA6B,CAAC;AAEzD;;GAEG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,aAAa,oBAA4B,CAAC;AAEvD;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,qBAAqB,oBAAoC,CAAC;AAEvE;;GAEG;AACH,wBAAgB,0BAA0B,IAAI,OAAO,CAEpD;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,sBAAsB,oBAAqC,CAAC;AAEzE;;GAEG;AACH,wBAAgB,2BAA2B,IAAI,OAAO,CAErD"}
|
package/dist/config/api.js
CHANGED
|
@@ -83,4 +83,35 @@ export const GOOGLE_POLLEN_API_KEY = process.env.GOOGLE_POLLEN_API_KEY;
|
|
|
83
83
|
export function isGooglePollenKeyAvailable() {
|
|
84
84
|
return !!GOOGLE_POLLEN_API_KEY && GOOGLE_POLLEN_API_KEY.trim().length > 0;
|
|
85
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Google Weather API key
|
|
88
|
+
*
|
|
89
|
+
* OPTIONAL: Create a key in the Google Cloud console
|
|
90
|
+
* (https://console.cloud.google.com/). Unlike the NCEI and FIRMS keys above,
|
|
91
|
+
* this one is **not a free registration**: it has a free usage tier, but
|
|
92
|
+
* **requires a Google Cloud billing account** (credit card on file).
|
|
93
|
+
* The **Weather API** must be enabled on the project.
|
|
94
|
+
*
|
|
95
|
+
* Benefits of providing a key:
|
|
96
|
+
* - Official weather alerts for ~45+ additional territories (Australia, Japan,
|
|
97
|
+
* Brazil, Mexico, and others) via the Google Weather API
|
|
98
|
+
*
|
|
99
|
+
* If not provided:
|
|
100
|
+
* - US, Canadian, European, Indian, Philippine, and Indonesian alerts
|
|
101
|
+
* continue to work keyless
|
|
102
|
+
* - Alerts outside these regions are unavailable
|
|
103
|
+
* - No setup required
|
|
104
|
+
*
|
|
105
|
+
* Rate limits with key:
|
|
106
|
+
* - Per Google's Weather API free tier
|
|
107
|
+
*
|
|
108
|
+
* Setup guide: docs/GOOGLE_WEATHER_KEY_SETUP.md
|
|
109
|
+
*/
|
|
110
|
+
export const GOOGLE_WEATHER_API_KEY = process.env.GOOGLE_WEATHER_API_KEY;
|
|
111
|
+
/**
|
|
112
|
+
* Check if Google Weather API key is available (key configured)
|
|
113
|
+
*/
|
|
114
|
+
export function isGoogleWeatherKeyAvailable() {
|
|
115
|
+
return !!GOOGLE_WEATHER_API_KEY && GOOGLE_WEATHER_API_KEY.trim().length > 0;
|
|
116
|
+
}
|
|
86
117
|
//# sourceMappingURL=api.js.map
|
package/dist/config/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/config/api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;AAEzD;;GAEG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO,CAAC,CAAC,cAAc,IAAI,cAAc,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AAC9D,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;AAEvD;;GAEG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO,CAAC,CAAC,aAAa,IAAI,aAAa,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AAC5D,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG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,CAAC,CAAC,sBAAsB,IAAI,sBAAsB,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AAC9E,CAAC"}
|
package/dist/config/cache.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/config/cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAkDH,eAAO,MAAM,WAAW;aAEtB,OAAO;aAIP,OAAO;aAIP,YAAY;aAGZ,GAAG;iBAGD,eAAe;iBAIf,SAAS;iBAIT,QAAQ;iBAIR,QAAQ;iBAIR,iBAAiB;iBAIjB,MAAM;iBAIN,gBAAgB;iBAIhB,cAAc;iBAKd,OAAO;iBAIP,aAAa;iBAMb,cAAc;iBAMd,YAAY;iBAMZ,OAAO;iBAIP,cAAc;iBAMd,iBAAiB;iBAQjB,YAAY;iBAQZ,cAAc;iBAKd,cAAc;iBAKd,cAAc;iBAKd,iBAAiB;;
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/config/cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAkDH,eAAO,MAAM,WAAW;aAEtB,OAAO;aAIP,OAAO;aAIP,YAAY;aAGZ,GAAG;iBAGD,eAAe;iBAIf,SAAS;iBAIT,QAAQ;iBAIR,QAAQ;iBAIR,iBAAiB;iBAIjB,MAAM;iBAIN,gBAAgB;iBAIhB,cAAc;iBAKd,OAAO;iBAIP,aAAa;iBAMb,cAAc;iBAMd,YAAY;iBAMZ,OAAO;iBAIP,cAAc;iBAMd,iBAAiB;iBAQjB,YAAY;iBAQZ,cAAc;iBAKd,cAAc;iBAKd,cAAc;iBAKd,iBAAiB;iBAOjB,WAAW;;CAEL,CAAC;AAEX;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAYrE"}
|
package/dist/config/cache.js
CHANGED
|
@@ -141,6 +141,12 @@ export const CacheConfig = {
|
|
|
141
141
|
// rows per region file (not per request), so repeated queries anywhere
|
|
142
142
|
// in a region cost one fetch per half hour.
|
|
143
143
|
firmsRegionalFile: 30 * MINUTE,
|
|
144
|
+
// National CAP documents and polygon documents, keyed on (index identifier,
|
|
145
|
+
// index published stamp). SACHET re-serves a thread's latest version under
|
|
146
|
+
// one GUID; the stamp (not the identifier) makes the key immutable. A named
|
|
147
|
+
// 24h entry rather than Infinity so a long-running server's LRU is not
|
|
148
|
+
// pinned with dead alerts.
|
|
149
|
+
capDocument: 24 * HOUR,
|
|
144
150
|
},
|
|
145
151
|
};
|
|
146
152
|
/**
|
package/dist/config/cache.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../src/config/cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,iCAAiC;AACjC,MAAM,MAAM,GAAG,EAAE,GAAG,IAAI,CAAC;AACzB,MAAM,IAAI,GAAG,EAAE,GAAG,MAAM,CAAC;AACzB,MAAM,GAAG,GAAG,EAAE,GAAG,IAAI,CAAC;AAEtB;;;;;GAKG;AACH,SAAS,aAAa,CAAC,GAAW,EAAE,YAAqB;IACvD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC/B,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,YAAY,CAAC;IAC7C,OAAO,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,GAAG,CAAC;AAC5C,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,YAAY,CAAC,GAAW,EAAE,YAAoB,EAAE,GAAY,EAAE,GAAY;IACjF,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC/B,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,YAAY,CAAC;IAE7C,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACnC,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AE,CAAC;IACvB,MAAM,QAAQ,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC,GAAG,GAAG,CAAC;IAEzD,IAAI,QAAQ,GAAG,CAAC,EAAE,CAAC;QACjB,gEAAgE;QAChE,OAAO,WAAW,CAAC,GAAG,CAAC,cAAc,CAAC;IACxC,CAAC;SAAM,CAAC;QACN,mCAAmC;QACnC,OAAO,WAAW,CAAC,GAAG,CAAC,gBAAgB,CAAC;IAC1C,CAAC;AACH,CAAC"}
|
|
@@ -91,6 +91,22 @@ export declare const DisplayThresholds: {
|
|
|
91
91
|
readonly mm: 0.05;
|
|
92
92
|
};
|
|
93
93
|
};
|
|
94
|
+
/**
|
|
95
|
+
* Thermal stress thresholds
|
|
96
|
+
*/
|
|
97
|
+
readonly thermalStress: {
|
|
98
|
+
/**
|
|
99
|
+
* Display gates only. The band boundaries themselves live in
|
|
100
|
+
* `src/utils/thermalStress.ts` (where Fosberg's live), and those functions
|
|
101
|
+
* return null below their own lowest band — so *raising* a gate here
|
|
102
|
+
* suppresses lines as expected, while *lowering* one past the pure
|
|
103
|
+
* module's floor has no effect until that floor moves too.
|
|
104
|
+
*/
|
|
105
|
+
/** Render the frostbite line when effective wind chill (°F) is at or below this */
|
|
106
|
+
readonly showFrostbiteAtWindChillF: -18;
|
|
107
|
+
/** Compute/render WBGT only when air temp (°F) is at or above showHeatIndex and rounded WBGT (°F) is at or above this */
|
|
108
|
+
readonly showWbgtF: 80;
|
|
109
|
+
};
|
|
94
110
|
};
|
|
95
111
|
/**
|
|
96
112
|
* API-related constants
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"displayThresholds.d.ts","sourceRoot":"","sources":["../../src/config/displayThresholds.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,iBAAiB;IAC5B;;OAEG;aACH,WAAW;QACT,2DAA2D;iBAC3D,aAAa,EAAE,EAAE;QACjB,2DAA2D;iBAC3D,aAAa,EAAE,EAAE;QACjB;;;;;;WAMG;iBACH,YAAY;qBACV,CAAC,EAAE,CAAC;qBACJ,CAAC,EAAE,CAAC;;;IAIR;;OAEG;aACH,IAAI;QACF,4FAA4F;iBAC5F,qBAAqB,EAAE,GAAG;;IAG5B;;OAEG;aACH,UAAU;QACR,gBAAgB;iBAChB,QAAQ,EAAE,IAAI;QACd,UAAU;iBACV,GAAG,EAAE,CAAG;QACR,mBAAmB;iBACnB,QAAQ,EAAE,CAAG;QACb,uBAAuB;iBACvB,KAAK,EAAE,EAAI;;IAGb;;OAEG;aACH,iBAAiB;QACf;;;;WAIG;iBACH,mBAAmB,EAAE,GAAG;QACxB;;;;WAIG;iBACH,sBAAsB,EAAE,GAAG;QAC3B;;;WAGG;iBACH,kBAAkB,EAAE,CAAC;;IAGvB;;OAEG;aACH,aAAa;QACX,4CAA4C;iBAC5C,KAAK,EAAE,GAAG;QACV,+CAA+C;iBAC/C,QAAQ,EAAE,GAAG;QACb,4CAA4C;iBAC5C,KAAK,EAAE,GAAG;QACV;;;;;;;;;WASG;iBACH,UAAU;qBACR,IAAI,EAAE,KAAK;qBACX,EAAE,EAAE,IAAI;;;
|
|
1
|
+
{"version":3,"file":"displayThresholds.d.ts","sourceRoot":"","sources":["../../src/config/displayThresholds.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,iBAAiB;IAC5B;;OAEG;aACH,WAAW;QACT,2DAA2D;iBAC3D,aAAa,EAAE,EAAE;QACjB,2DAA2D;iBAC3D,aAAa,EAAE,EAAE;QACjB;;;;;;WAMG;iBACH,YAAY;qBACV,CAAC,EAAE,CAAC;qBACJ,CAAC,EAAE,CAAC;;;IAIR;;OAEG;aACH,IAAI;QACF,4FAA4F;iBAC5F,qBAAqB,EAAE,GAAG;;IAG5B;;OAEG;aACH,UAAU;QACR,gBAAgB;iBAChB,QAAQ,EAAE,IAAI;QACd,UAAU;iBACV,GAAG,EAAE,CAAG;QACR,mBAAmB;iBACnB,QAAQ,EAAE,CAAG;QACb,uBAAuB;iBACvB,KAAK,EAAE,EAAI;;IAGb;;OAEG;aACH,iBAAiB;QACf;;;;WAIG;iBACH,mBAAmB,EAAE,GAAG;QACxB;;;;WAIG;iBACH,sBAAsB,EAAE,GAAG;QAC3B;;;WAGG;iBACH,kBAAkB,EAAE,CAAC;;IAGvB;;OAEG;aACH,aAAa;QACX,4CAA4C;iBAC5C,KAAK,EAAE,GAAG;QACV,+CAA+C;iBAC/C,QAAQ,EAAE,GAAG;QACb,4CAA4C;iBAC5C,KAAK,EAAE,GAAG;QACV;;;;;;;;;WASG;iBACH,UAAU;qBACR,IAAI,EAAE,KAAK;qBACX,EAAE,EAAE,IAAI;;;IAIZ;;OAEG;aACH,aAAa;QACX;;;;;;WAMG;QACH,mFAAmF;iBACnF,yBAAyB,EAAE,CAAC,EAAE;QAC9B,yHAAyH;iBACzH,SAAS,EAAE,EAAE;;CAEP,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,YAAY;IACvB;;;OAGG;aACH,2BAA2B,EAAE,CAAC;IAE9B;;OAEG;aACH,uBAAuB,EAAE,EAAE;CACnB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,eAAe;IAC1B;;OAEG;aACH,mBAAmB,EAAE,CAAC;IAEtB;;OAEG;aACH,eAAe,EAAE,EAAE;IAEnB;;OAEG;aACH,sBAAsB,EAAE,GAAG;IAE3B;;;;;OAKG;aACH,kBAAkB,EAAE,GAAG;CACf,CAAC"}
|
|
@@ -91,6 +91,22 @@ export const DisplayThresholds = {
|
|
|
91
91
|
mm: 0.05,
|
|
92
92
|
},
|
|
93
93
|
},
|
|
94
|
+
/**
|
|
95
|
+
* Thermal stress thresholds
|
|
96
|
+
*/
|
|
97
|
+
thermalStress: {
|
|
98
|
+
/**
|
|
99
|
+
* Display gates only. The band boundaries themselves live in
|
|
100
|
+
* `src/utils/thermalStress.ts` (where Fosberg's live), and those functions
|
|
101
|
+
* return null below their own lowest band — so *raising* a gate here
|
|
102
|
+
* suppresses lines as expected, while *lowering* one past the pure
|
|
103
|
+
* module's floor has no effect until that floor moves too.
|
|
104
|
+
*/
|
|
105
|
+
/** Render the frostbite line when effective wind chill (°F) is at or below this */
|
|
106
|
+
showFrostbiteAtWindChillF: -18,
|
|
107
|
+
/** Compute/render WBGT only when air temp (°F) is at or above showHeatIndex and rounded WBGT (°F) is at or above this */
|
|
108
|
+
showWbgtF: 80,
|
|
109
|
+
},
|
|
94
110
|
};
|
|
95
111
|
/**
|
|
96
112
|
* API-related constants
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"displayThresholds.js","sourceRoot":"","sources":["../../src/config/displayThresholds.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B;;OAEG;IACH,WAAW,EAAE;QACX,2DAA2D;QAC3D,aAAa,EAAE,EAAE;QACjB,2DAA2D;QAC3D,aAAa,EAAE,EAAE;QACjB;;;;;;WAMG;QACH,YAAY,EAAE;YACZ,CAAC,EAAE,CAAC;YACJ,CAAC,EAAE,CAAC;SACL;KACF;IAED;;OAEG;IACH,IAAI,EAAE;QACJ,4FAA4F;QAC5F,qBAAqB,EAAE,GAAG;KAC3B;IAED;;OAEG;IACH,UAAU,EAAE;QACV,gBAAgB;QAChB,QAAQ,EAAE,IAAI;QACd,UAAU;QACV,GAAG,EAAE,GAAG;QACR,mBAAmB;QACnB,QAAQ,EAAE,GAAG;QACb,uBAAuB;QACvB,KAAK,EAAE,IAAI;KACZ;IAED;;OAEG;IACH,iBAAiB,EAAE;QACjB;;;;WAIG;QACH,mBAAmB,EAAE,GAAG;QACxB;;;;WAIG;QACH,sBAAsB,EAAE,GAAG;QAC3B;;;WAGG;QACH,kBAAkB,EAAE,CAAC;KACtB;IAED;;OAEG;IACH,aAAa,EAAE;QACb,4CAA4C;QAC5C,KAAK,EAAE,GAAG;QACV,+CAA+C;QAC/C,QAAQ,EAAE,GAAG;QACb,4CAA4C;QAC5C,KAAK,EAAE,GAAG;QACV;;;;;;;;;WASG;QACH,UAAU,EAAE;YACV,IAAI,EAAE,KAAK;YACX,EAAE,EAAE,IAAI;SACT;KACF;CACO,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B;;;OAGG;IACH,2BAA2B,EAAE,CAAC;IAE9B;;OAEG;IACH,uBAAuB,EAAE,EAAE;CACnB,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B;;OAEG;IACH,mBAAmB,EAAE,CAAC;IAEtB;;OAEG;IACH,eAAe,EAAE,EAAE;IAEnB;;OAEG;IACH,sBAAsB,EAAE,GAAG,EAAE,0BAA0B;IAEvD;;;;;OAKG;IACH,kBAAkB,EAAE,GAAG;CACf,CAAC"}
|
|
1
|
+
{"version":3,"file":"displayThresholds.js","sourceRoot":"","sources":["../../src/config/displayThresholds.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B;;OAEG;IACH,WAAW,EAAE;QACX,2DAA2D;QAC3D,aAAa,EAAE,EAAE;QACjB,2DAA2D;QAC3D,aAAa,EAAE,EAAE;QACjB;;;;;;WAMG;QACH,YAAY,EAAE;YACZ,CAAC,EAAE,CAAC;YACJ,CAAC,EAAE,CAAC;SACL;KACF;IAED;;OAEG;IACH,IAAI,EAAE;QACJ,4FAA4F;QAC5F,qBAAqB,EAAE,GAAG;KAC3B;IAED;;OAEG;IACH,UAAU,EAAE;QACV,gBAAgB;QAChB,QAAQ,EAAE,IAAI;QACd,UAAU;QACV,GAAG,EAAE,GAAG;QACR,mBAAmB;QACnB,QAAQ,EAAE,GAAG;QACb,uBAAuB;QACvB,KAAK,EAAE,IAAI;KACZ;IAED;;OAEG;IACH,iBAAiB,EAAE;QACjB;;;;WAIG;QACH,mBAAmB,EAAE,GAAG;QACxB;;;;WAIG;QACH,sBAAsB,EAAE,GAAG;QAC3B;;;WAGG;QACH,kBAAkB,EAAE,CAAC;KACtB;IAED;;OAEG;IACH,aAAa,EAAE;QACb,4CAA4C;QAC5C,KAAK,EAAE,GAAG;QACV,+CAA+C;QAC/C,QAAQ,EAAE,GAAG;QACb,4CAA4C;QAC5C,KAAK,EAAE,GAAG;QACV;;;;;;;;;WASG;QACH,UAAU,EAAE;YACV,IAAI,EAAE,KAAK;YACX,EAAE,EAAE,IAAI;SACT;KACF;IAED;;OAEG;IACH,aAAa,EAAE;QACb;;;;;;WAMG;QACH,mFAAmF;QACnF,yBAAyB,EAAE,CAAC,EAAE;QAC9B,yHAAyH;QACzH,SAAS,EAAE,EAAE;KACd;CACO,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B;;;OAGG;IACH,2BAA2B,EAAE,CAAC;IAE9B;;OAEG;IACH,uBAAuB,EAAE,EAAE;CACnB,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B;;OAEG;IACH,mBAAmB,EAAE,CAAC;IAEtB;;OAEG;IACH,eAAe,EAAE,EAAE;IAEnB;;OAEG;IACH,sBAAsB,EAAE,GAAG,EAAE,0BAA0B;IAEvD;;;;;OAKG;IACH,kBAAkB,EAAE,GAAG;CACf,CAAC"}
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Handler for get_alerts tool.
|
|
3
3
|
*
|
|
4
|
-
* Routed by country (see
|
|
4
|
+
* Routed by country (see .devdocs/archive/completed/international-alerts-plan.md D1):
|
|
5
5
|
* US → NOAA (the original path, byte-identical output),
|
|
6
6
|
* Canada → MSC GeoMet (Environment and Climate Change Canada),
|
|
7
7
|
* MeteoAlarm member countries → the country's MeteoAlarm feed,
|
|
8
|
-
*
|
|
8
|
+
* India / Philippines / Indonesia → their national CAP feeds (NDMA SACHET,
|
|
9
|
+
* PAGASA, BMKG), matched to the requested point by alert polygon
|
|
10
|
+
* (see .devdocs/archive/completed/plan-national-cap-alerts.md D1),
|
|
11
|
+
* elsewhere → the optional keyed Google Weather API fallback when a
|
|
12
|
+
* `GOOGLE_WEATHER_API_KEY` is configured, else a clean not-covered
|
|
13
|
+
* message (see .devdocs/archive/completed/global-alerts-fallback-plan.md D1).
|
|
14
|
+
*
|
|
15
|
+
* The branch order is the invariant: a US, Canadian, MeteoAlarm-country, or
|
|
16
|
+
* national-CAP-country request never contacts Google, key or no key — those
|
|
17
|
+
* are jurisdictional authorities and stay first-choice. Without a key the
|
|
18
|
+
* elsewhere branch is byte-identical to before the fallback existed.
|
|
9
19
|
*
|
|
10
20
|
* Country resolution order: a `country_code` already carried by the resolved
|
|
11
21
|
* location (saved location or geocoded city_name), else a cached
|
|
@@ -21,12 +31,14 @@ import { GeocodingService } from '../services/geocoding.js';
|
|
|
21
31
|
import { MeteoAlarmService } from '../services/meteoalarm.js';
|
|
22
32
|
import { GeoMetService } from '../services/geomet.js';
|
|
23
33
|
import { NominatimService } from '../services/nominatim.js';
|
|
34
|
+
import { GoogleWeatherService } from '../services/googleWeather.js';
|
|
35
|
+
import { NationalCapService } from '../services/nationalCap.js';
|
|
24
36
|
type HandlerResult = {
|
|
25
37
|
content: Array<{
|
|
26
38
|
type: string;
|
|
27
39
|
text: string;
|
|
28
40
|
}>;
|
|
29
41
|
};
|
|
30
|
-
export declare function handleGetAlerts(args: unknown, noaaService: NOAAService, locationStore: LocationStore, geocodingService: GeocodingService, meteoAlarmService?: MeteoAlarmService, geoMetService?: GeoMetService, nominatimService?: NominatimService): Promise<HandlerResult>;
|
|
42
|
+
export declare function handleGetAlerts(args: unknown, noaaService: NOAAService, locationStore: LocationStore, geocodingService: GeocodingService, meteoAlarmService?: MeteoAlarmService, geoMetService?: GeoMetService, nominatimService?: NominatimService, googleWeatherService?: GoogleWeatherService, nationalCapService?: NationalCapService): Promise<HandlerResult>;
|
|
31
43
|
export {};
|
|
32
44
|
//# sourceMappingURL=alertsHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alertsHandler.d.ts","sourceRoot":"","sources":["../../src/handlers/alertsHandler.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"alertsHandler.d.ts","sourceRoot":"","sources":["../../src/handlers/alertsHandler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EACL,iBAAiB,EAGlB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EACL,kBAAkB,EAGnB,MAAM,4BAA4B,CAAC;AAyBpC,KAAK,aAAa,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC;AAMxE,wBAAsB,eAAe,CACnC,IAAI,EAAE,OAAO,EACb,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,iBAAiB,CAAC,EAAE,iBAAiB,EACrC,aAAa,CAAC,EAAE,aAAa,EAC7B,gBAAgB,CAAC,EAAE,gBAAgB,EACnC,oBAAoB,CAAC,EAAE,oBAAoB,EAC3C,kBAAkB,CAAC,EAAE,kBAAkB,GACtC,OAAO,CAAC,aAAa,CAAC,CA8ExB"}
|