@dangahagan/weather-mcp 0.4.0 → 1.0.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 +122 -2
- package/dist/config/cache.d.ts +1 -0
- package/dist/config/cache.d.ts.map +1 -1
- package/dist/config/cache.js +3 -0
- package/dist/config/cache.js.map +1 -1
- package/dist/handlers/airQualityHandler.d.ts +11 -0
- package/dist/handlers/airQualityHandler.d.ts.map +1 -0
- package/dist/handlers/airQualityHandler.js +154 -0
- package/dist/handlers/airQualityHandler.js.map +1 -0
- package/dist/handlers/alertsHandler.d.ts.map +1 -1
- package/dist/handlers/alertsHandler.js +8 -5
- package/dist/handlers/alertsHandler.js.map +1 -1
- package/dist/handlers/currentConditionsHandler.d.ts.map +1 -1
- package/dist/handlers/currentConditionsHandler.js +64 -1
- package/dist/handlers/currentConditionsHandler.js.map +1 -1
- package/dist/handlers/forecastHandler.d.ts.map +1 -1
- package/dist/handlers/forecastHandler.js +113 -2
- package/dist/handlers/forecastHandler.js.map +1 -1
- package/dist/handlers/marineConditionsHandler.d.ts +11 -0
- package/dist/handlers/marineConditionsHandler.d.ts.map +1 -0
- package/dist/handlers/marineConditionsHandler.js +154 -0
- package/dist/handlers/marineConditionsHandler.js.map +1 -0
- package/dist/index.js +71 -1
- package/dist/index.js.map +1 -1
- package/dist/services/noaa.d.ts +10 -0
- package/dist/services/noaa.d.ts.map +1 -1
- package/dist/services/noaa.js +42 -1
- package/dist/services/noaa.js.map +1 -1
- package/dist/services/openmeteo.d.ts +57 -1
- package/dist/services/openmeteo.d.ts.map +1 -1
- package/dist/services/openmeteo.js +316 -4
- package/dist/services/openmeteo.js.map +1 -1
- package/dist/types/noaa.d.ts +94 -0
- package/dist/types/noaa.d.ts.map +1 -1
- package/dist/types/openmeteo.d.ts +292 -0
- package/dist/types/openmeteo.d.ts.map +1 -1
- package/dist/utils/airQuality.d.ts +54 -0
- package/dist/utils/airQuality.d.ts.map +1 -0
- package/dist/utils/airQuality.js +251 -0
- package/dist/utils/airQuality.js.map +1 -0
- package/dist/utils/fireWeather.d.ts +62 -0
- package/dist/utils/fireWeather.d.ts.map +1 -0
- package/dist/utils/fireWeather.js +168 -0
- package/dist/utils/fireWeather.js.map +1 -0
- package/dist/utils/marine.d.ts +38 -0
- package/dist/utils/marine.d.ts.map +1 -0
- package/dist/utils/marine.js +162 -0
- package/dist/utils/marine.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,7 +12,41 @@ An MCP (Model Context Protocol) server that provides **global weather data** to
|
|
|
12
12
|
|
|
13
13
|
## Features
|
|
14
14
|
|
|
15
|
-
- **
|
|
15
|
+
- **Marine Conditions**: Comprehensive marine weather for coastal and ocean areas (NEW in v0.6.0)
|
|
16
|
+
- Global coverage for waves, swell, and ocean currents
|
|
17
|
+
- Significant wave height with safety categorization (Calm to Extreme)
|
|
18
|
+
- Wind waves (locally generated) and swell (distant systems) separation
|
|
19
|
+
- Wave period and direction for planning
|
|
20
|
+
- Ocean current velocity and direction
|
|
21
|
+
- Optional 5-day marine forecast with daily summaries
|
|
22
|
+
- Safety assessment for maritime activities (sailing, boating, surfing)
|
|
23
|
+
- Wave interpretation guide based on Douglas Sea Scale
|
|
24
|
+
- Important: Data has limited coastal accuracy - NOT for navigation
|
|
25
|
+
- **Severe Weather Probabilities**: Probabilistic severe weather forecasting (NEW in v0.6.0)
|
|
26
|
+
- US locations only (NOAA gridpoint data)
|
|
27
|
+
- Optional enhancement to forecasts (`include_severe_weather` parameter)
|
|
28
|
+
- Thunderstorm probability for next 48 hours
|
|
29
|
+
- Wind gust probabilities (20-60+ mph categories)
|
|
30
|
+
- Tropical storm and hurricane wind probabilities
|
|
31
|
+
- Lightning activity levels
|
|
32
|
+
- Smart display showing only significant threats
|
|
33
|
+
- Works with both daily and hourly forecasts
|
|
34
|
+
- **Air Quality Monitoring**: Comprehensive air quality data for any location worldwide (v0.5.0)
|
|
35
|
+
- Air Quality Index (AQI) with automatic region detection (US AQI or European EAQI)
|
|
36
|
+
- Health recommendations based on AQI levels
|
|
37
|
+
- Pollutant concentrations (PM2.5, PM10, O₃, NO₂, SO₂, CO, NH₃)
|
|
38
|
+
- UV Index with sun protection recommendations
|
|
39
|
+
- Optional hourly air quality forecasts (5-day outlook)
|
|
40
|
+
- Categorized health risk levels (Good, Moderate, Unhealthy, etc.)
|
|
41
|
+
- Activity recommendations for sensitive populations
|
|
42
|
+
- **Fire Weather Data**: Fire danger indices for US locations (v0.5.0)
|
|
43
|
+
- Haines Index (atmospheric fire growth potential)
|
|
44
|
+
- Grassland Fire Danger Index
|
|
45
|
+
- Red Flag Threat Index
|
|
46
|
+
- Mixing Height (smoke dispersion indicator)
|
|
47
|
+
- Transport Wind Speed (smoke transport)
|
|
48
|
+
- Optional enhancement to current conditions
|
|
49
|
+
- **Location Search**: Find coordinates for any location worldwide (v0.4.0)
|
|
16
50
|
- Convert location names to coordinates ("Paris" → 48.8534°, 2.3488°)
|
|
17
51
|
- Support for cities, airports, landmarks, and regions globally
|
|
18
52
|
- Detailed metadata: timezone, elevation, population, country
|
|
@@ -34,6 +68,7 @@ An MCP (Model Context Protocol) server that provides **global weather data** to
|
|
|
34
68
|
- 24-hour temperature range
|
|
35
69
|
- Wind gusts and detailed cloud cover
|
|
36
70
|
- Recent precipitation history
|
|
71
|
+
- Optional fire weather indices (see above)
|
|
37
72
|
- **Historical Data**: Access historical weather observations for any location worldwide
|
|
38
73
|
- Recent data (last 7 days): Detailed hourly observations from NOAA real-time API (US only)
|
|
39
74
|
- Archival data (>7 days old): Hourly/daily weather data from 1940-present via Open-Meteo (global coverage)
|
|
@@ -56,7 +91,10 @@ The Weather MCP server includes an intelligent in-memory caching system that sig
|
|
|
56
91
|
|
|
57
92
|
The cache automatically stores and retrieves weather data with intelligent expiration:
|
|
58
93
|
|
|
59
|
-
- **Location Searches**: Cached for 30 days (locations don't move)
|
|
94
|
+
- **Location Searches**: Cached for 30 days (locations don't move)
|
|
95
|
+
- **Marine Conditions**: Cached for 1 hour (marine data updates hourly) - NEW in v0.6.0
|
|
96
|
+
- **Air Quality Data**: Cached for 1 hour (air quality updates hourly) - v0.5.0
|
|
97
|
+
- **Fire Weather Data**: Cached for 2 hours (gridpoint data updates ~hourly) - v0.5.0
|
|
60
98
|
- **Weather Alerts**: Cached for 5 minutes (alerts can change rapidly)
|
|
61
99
|
- **Forecasts**: Cached for 2 hours (updated approximately hourly)
|
|
62
100
|
- **Current Conditions**: Cached for 15 minutes (observations update every 20-60 minutes)
|
|
@@ -345,6 +383,88 @@ If you get "No historical data available":
|
|
|
345
383
|
- Note: Most recent data has a 5-day delay
|
|
346
384
|
- Very recent dates (last 5 days) may not be available in archival data yet
|
|
347
385
|
|
|
386
|
+
### 6. get_alerts
|
|
387
|
+
Get active weather alerts, watches, warnings, and advisories for US locations.
|
|
388
|
+
|
|
389
|
+
**Parameters:**
|
|
390
|
+
- `latitude` (required): Latitude coordinate (-90 to 90)
|
|
391
|
+
- `longitude` (required): Longitude coordinate (-180 to 180)
|
|
392
|
+
- `active_only` (optional): Show only active alerts (default: true)
|
|
393
|
+
|
|
394
|
+
**Description:**
|
|
395
|
+
Retrieves current weather alerts from the NOAA API for safety-critical weather information. Returns severity levels (Extreme, Severe, Moderate, Minor), urgency indicators, effective/expiration times, and affected areas. Alerts are automatically sorted by severity with the most critical first.
|
|
396
|
+
|
|
397
|
+
**Examples:**
|
|
398
|
+
```
|
|
399
|
+
"Are there any weather alerts for Miami, Florida?"
|
|
400
|
+
"Check for severe weather warnings in Oklahoma City"
|
|
401
|
+
"What weather watches are active in my area?" (latitude: 40.7128, longitude: -74.0060)
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
**Returns:**
|
|
405
|
+
- Alert type and severity (Extreme → Severe → Moderate → Minor)
|
|
406
|
+
- Urgency, certainty, and response type
|
|
407
|
+
- Event description and instructions
|
|
408
|
+
- Effective and expiration times
|
|
409
|
+
- Affected geographic areas
|
|
410
|
+
- Recommended actions and safety information
|
|
411
|
+
|
|
412
|
+
### 7. get_air_quality (NEW in v0.5.0)
|
|
413
|
+
Get comprehensive air quality data for any location worldwide.
|
|
414
|
+
|
|
415
|
+
**Parameters:**
|
|
416
|
+
- `latitude` (required): Latitude coordinate (-90 to 90)
|
|
417
|
+
- `longitude` (required): Longitude coordinate (-180 to 180)
|
|
418
|
+
- `forecast` (optional): Include hourly forecast for next 5 days (default: false)
|
|
419
|
+
|
|
420
|
+
**Description:**
|
|
421
|
+
Provides current air quality conditions using the Open-Meteo Air Quality API with automatic AQI scale selection (US AQI for US locations, European EAQI elsewhere). Includes health recommendations, pollutant concentrations, and UV index.
|
|
422
|
+
|
|
423
|
+
**Examples:**
|
|
424
|
+
```
|
|
425
|
+
"What's the air quality in Los Angeles?"
|
|
426
|
+
"Check pollution levels in Beijing"
|
|
427
|
+
"Get air quality forecast for Paris for the next 5 days"
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
**Returns:**
|
|
431
|
+
- Air Quality Index (AQI) with appropriate scale (US or European)
|
|
432
|
+
- Health risk category and recommendations
|
|
433
|
+
- Pollutant concentrations (PM2.5, PM10, O₃, NO₂, SO₂, CO, NH₃)
|
|
434
|
+
- UV Index with sun protection guidance
|
|
435
|
+
- Activity recommendations for sensitive groups
|
|
436
|
+
- Optional 5-day hourly forecast
|
|
437
|
+
|
|
438
|
+
### 8. get_marine_conditions (NEW in v0.6.0)
|
|
439
|
+
Get marine weather conditions including wave height, swell, ocean currents, and sea state.
|
|
440
|
+
|
|
441
|
+
**Parameters:**
|
|
442
|
+
- `latitude` (required): Latitude coordinate (-90 to 90)
|
|
443
|
+
- `longitude` (required): Longitude coordinate (-180 to 180)
|
|
444
|
+
- `forecast` (optional): Include 5-day marine forecast (default: false)
|
|
445
|
+
|
|
446
|
+
**Description:**
|
|
447
|
+
Provides comprehensive marine weather data using the Open-Meteo Marine API with global ocean coverage. Includes significant wave height with Douglas Sea Scale categorization, wind waves vs swell separation, wave period/direction, ocean currents, and safety assessment for maritime activities.
|
|
448
|
+
|
|
449
|
+
**Important:** Data has limited accuracy in coastal areas and is NOT suitable for coastal navigation - always consult official marine forecasts.
|
|
450
|
+
|
|
451
|
+
**Examples:**
|
|
452
|
+
```
|
|
453
|
+
"What are the ocean conditions off the coast of California?"
|
|
454
|
+
"Get wave height and swell for surfing in Hawaii"
|
|
455
|
+
"Check marine conditions in the Atlantic Ocean" (latitude: 30.0, longitude: -60.0)
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
**Returns:**
|
|
459
|
+
- Significant wave height (meters/feet) with safety category
|
|
460
|
+
- Wind waves (locally generated) height and direction
|
|
461
|
+
- Swell height, period, and direction (from distant systems)
|
|
462
|
+
- Ocean current velocity and direction
|
|
463
|
+
- Sea state interpretation (Calm → Phenomenal based on Douglas Sea Scale)
|
|
464
|
+
- Safety assessment for maritime activities
|
|
465
|
+
- Wave period for planning and safety
|
|
466
|
+
- Optional 5-day forecast with daily summaries
|
|
467
|
+
|
|
348
468
|
## Error Handling & Service Status
|
|
349
469
|
|
|
350
470
|
### Enhanced Error Messages
|
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
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/config/cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAkDH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;CA8Cd,CAAC;AAEX;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAYrE"}
|
package/dist/config/cache.js
CHANGED
|
@@ -56,6 +56,9 @@ export const CacheConfig = {
|
|
|
56
56
|
// Maximum number of entries in cache before LRU eviction
|
|
57
57
|
// Min: 100, Max: 10000, Default: 1000
|
|
58
58
|
maxSize: getEnvNumber('CACHE_MAX_SIZE', 1000, 100, 10000),
|
|
59
|
+
// API timeout configuration
|
|
60
|
+
// Min: 5000ms (5 seconds), Max: 120000ms (2 minutes), Default: 30000ms (30 seconds)
|
|
61
|
+
apiTimeoutMs: getEnvNumber('API_TIMEOUT_MS', 30000, 5000, 120000),
|
|
59
62
|
// TTL values for different data types
|
|
60
63
|
ttl: {
|
|
61
64
|
// Grid coordinate lookups (lat/lon -> grid mapping)
|
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,IAAI,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;QAClB,OAAO,CAAC,IAAI,CAAC,WAAW,GAAG,MAAM,KAAK,q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QAC9C,QAAQ,EAAE,CAAC,GAAG,IAAI;QAElB,6BAA6B;QAC7B,oDAAoD;QACpD,iBAAiB,EAAE,EAAE,GAAG,MAAM;QAE9B,iBAAiB;QACjB,sDAAsD;QACtD,MAAM,EAAE,CAAC,GAAG,MAAM;QAElB,wCAAwC;QACxC,6CAA6C;QAC7C,gBAAgB,EAAE,CAAC,GAAG,IAAI;QAE1B,kDAAkD;QAClD,6DAA6D;QAC7D,cAAc,EAAE,QAAQ;QAExB,8BAA8B;QAC9B,+BAA+B;QAC/B,aAAa,EAAE,CAAC,GAAG,MAAM;KAC1B;CACO,CAAC;AAEX;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,SAAwB;IAC3D,MAAM,KAAK,GAAG,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC9E,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handler for get_air_quality tool
|
|
3
|
+
*/
|
|
4
|
+
import { OpenMeteoService } from '../services/openmeteo.js';
|
|
5
|
+
export declare function handleGetAirQuality(args: unknown, openMeteoService: OpenMeteoService): Promise<{
|
|
6
|
+
content: Array<{
|
|
7
|
+
type: string;
|
|
8
|
+
text: string;
|
|
9
|
+
}>;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=airQualityHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"airQualityHandler.d.ts","sourceRoot":"","sources":["../../src/handlers/airQualityHandler.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAkB5D,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,OAAO,EACb,gBAAgB,EAAE,gBAAgB,GACjC,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CA4B7D"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handler for get_air_quality tool
|
|
3
|
+
*/
|
|
4
|
+
import { validateCoordinates, validateOptionalBoolean } from '../utils/validation.js';
|
|
5
|
+
import { getUSAQICategory, getEuropeanAQICategory, getUVIndexCategory, getPollutantInfo, formatPollutantConcentration, shouldUseUSAQI } from '../utils/airQuality.js';
|
|
6
|
+
export async function handleGetAirQuality(args, openMeteoService) {
|
|
7
|
+
// Validate input parameters with runtime checks
|
|
8
|
+
const { latitude, longitude } = validateCoordinates(args);
|
|
9
|
+
const forecast = validateOptionalBoolean(args?.forecast, 'forecast', false);
|
|
10
|
+
// Get air quality data
|
|
11
|
+
const airQualityData = await openMeteoService.getAirQuality(latitude, longitude, forecast, 5 // Default 5-day forecast
|
|
12
|
+
);
|
|
13
|
+
// Format the air quality data for display
|
|
14
|
+
const output = formatAirQuality(airQualityData, latitude, longitude, forecast);
|
|
15
|
+
return {
|
|
16
|
+
content: [
|
|
17
|
+
{
|
|
18
|
+
type: 'text',
|
|
19
|
+
text: output
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Format air quality data as markdown
|
|
26
|
+
*/
|
|
27
|
+
function formatAirQuality(data, latitude, longitude, includeForecast) {
|
|
28
|
+
let output = `# Air Quality Report\n\n`;
|
|
29
|
+
output += `**Location:** ${latitude.toFixed(4)}, ${longitude.toFixed(4)}\n`;
|
|
30
|
+
output += `**Timezone:** ${data.timezone}\n`;
|
|
31
|
+
output += `**Elevation:** ${Math.round(data.elevation)}m\n`;
|
|
32
|
+
output += `\n`;
|
|
33
|
+
// Determine which AQI to show primarily based on location
|
|
34
|
+
const useUSAQI = shouldUseUSAQI(latitude, longitude);
|
|
35
|
+
if (!data.current) {
|
|
36
|
+
output += `⚠️ **No current air quality data available for this location.**\n`;
|
|
37
|
+
return output;
|
|
38
|
+
}
|
|
39
|
+
const current = data.current;
|
|
40
|
+
const currentTime = new Date(current.time);
|
|
41
|
+
output += `**Observation Time:** ${currentTime.toLocaleString()}\n\n`;
|
|
42
|
+
// Display primary AQI with health information
|
|
43
|
+
if (useUSAQI && current.us_aqi !== undefined) {
|
|
44
|
+
const category = getUSAQICategory(current.us_aqi);
|
|
45
|
+
const emoji = category.level === 'Good' ? '🟢' :
|
|
46
|
+
category.level === 'Moderate' ? '🟡' :
|
|
47
|
+
category.level === 'Unhealthy for Sensitive Groups' ? '🟠' :
|
|
48
|
+
category.level === 'Unhealthy' ? '🔴' :
|
|
49
|
+
category.level === 'Very Unhealthy' ? '🟣' : '🟤';
|
|
50
|
+
output += `## ${emoji} US Air Quality Index: ${Math.round(current.us_aqi)}\n\n`;
|
|
51
|
+
output += `**Category:** ${category.level} (${category.color})\n`;
|
|
52
|
+
output += `**Description:** ${category.description}\n\n`;
|
|
53
|
+
output += `**Health Implications:**\n${category.healthImplications}\n\n`;
|
|
54
|
+
if (category.cautionaryStatement !== 'None') {
|
|
55
|
+
output += `⚠️ **Caution:** ${category.cautionaryStatement}\n\n`;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
else if (current.european_aqi !== undefined) {
|
|
59
|
+
const category = getEuropeanAQICategory(current.european_aqi);
|
|
60
|
+
const emoji = category.level === 'Good' ? '🟢' :
|
|
61
|
+
category.level === 'Fair' ? '🟢' :
|
|
62
|
+
category.level === 'Moderate' ? '🟡' :
|
|
63
|
+
category.level === 'Poor' ? '🟠' :
|
|
64
|
+
category.level === 'Very Poor' ? '🔴' : '🟣';
|
|
65
|
+
output += `## ${emoji} European Air Quality Index: ${Math.round(current.european_aqi)}\n\n`;
|
|
66
|
+
output += `**Category:** ${category.level} (${category.color})\n`;
|
|
67
|
+
output += `**Description:** ${category.description}\n\n`;
|
|
68
|
+
output += `**Health Implications:**\n${category.healthImplications}\n\n`;
|
|
69
|
+
if (category.cautionaryStatement !== 'None') {
|
|
70
|
+
output += `⚠️ **Caution:** ${category.cautionaryStatement}\n\n`;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
// UV Index
|
|
74
|
+
if (current.uv_index !== undefined) {
|
|
75
|
+
const uvCategory = getUVIndexCategory(current.uv_index);
|
|
76
|
+
const uvEmoji = uvCategory.level === 'Low' ? '🟢' :
|
|
77
|
+
uvCategory.level === 'Moderate' ? '🟡' :
|
|
78
|
+
uvCategory.level === 'High' ? '🟠' :
|
|
79
|
+
uvCategory.level === 'Very High' ? '🔴' : '🟣';
|
|
80
|
+
output += `## ${uvEmoji} UV Index: ${current.uv_index.toFixed(1)}\n\n`;
|
|
81
|
+
output += `**Level:** ${uvCategory.level}\n`;
|
|
82
|
+
output += `**Description:** ${uvCategory.description}\n`;
|
|
83
|
+
output += `**Recommendation:** ${uvCategory.recommendation}\n\n`;
|
|
84
|
+
if (current.uv_index_clear_sky !== undefined && Math.abs(current.uv_index_clear_sky - current.uv_index) > 1) {
|
|
85
|
+
output += `*Note: UV index under clear sky would be ${current.uv_index_clear_sky.toFixed(1)}*\n\n`;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
// Pollutant Concentrations
|
|
89
|
+
output += `## Pollutant Concentrations\n\n`;
|
|
90
|
+
const pollutants = [
|
|
91
|
+
{ key: 'pm2_5', value: current.pm2_5, units: data.current_units?.pm2_5 },
|
|
92
|
+
{ key: 'pm10', value: current.pm10, units: data.current_units?.pm10 },
|
|
93
|
+
{ key: 'ozone', value: current.ozone, units: data.current_units?.ozone },
|
|
94
|
+
{ key: 'nitrogen_dioxide', value: current.nitrogen_dioxide, units: data.current_units?.nitrogen_dioxide },
|
|
95
|
+
{ key: 'sulphur_dioxide', value: current.sulphur_dioxide, units: data.current_units?.sulphur_dioxide },
|
|
96
|
+
{ key: 'carbon_monoxide', value: current.carbon_monoxide, units: data.current_units?.carbon_monoxide }
|
|
97
|
+
];
|
|
98
|
+
for (const pollutant of pollutants) {
|
|
99
|
+
if (pollutant.value !== undefined) {
|
|
100
|
+
const info = getPollutantInfo(pollutant.key);
|
|
101
|
+
const concentration = formatPollutantConcentration(pollutant.value, pollutant.units);
|
|
102
|
+
output += `**${info.name}:** ${concentration}\n`;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (current.ammonia !== undefined && data.current_units?.ammonia) {
|
|
106
|
+
const info = getPollutantInfo('ammonia');
|
|
107
|
+
const concentration = formatPollutantConcentration(current.ammonia, data.current_units.ammonia);
|
|
108
|
+
output += `**${info.name}:** ${concentration}\n`;
|
|
109
|
+
}
|
|
110
|
+
if (current.aerosol_optical_depth !== undefined) {
|
|
111
|
+
output += `**Aerosol Optical Depth:** ${current.aerosol_optical_depth.toFixed(3)} (atmospheric haze indicator)\n`;
|
|
112
|
+
}
|
|
113
|
+
output += `\n`;
|
|
114
|
+
// Show secondary AQI for reference
|
|
115
|
+
if (useUSAQI && current.european_aqi !== undefined) {
|
|
116
|
+
output += `*European AQI: ${Math.round(current.european_aqi)} (${getEuropeanAQICategory(current.european_aqi).level})*\n\n`;
|
|
117
|
+
}
|
|
118
|
+
else if (!useUSAQI && current.us_aqi !== undefined) {
|
|
119
|
+
output += `*US AQI: ${Math.round(current.us_aqi)} (${getUSAQICategory(current.us_aqi).level})*\n\n`;
|
|
120
|
+
}
|
|
121
|
+
// Add forecast summary if requested
|
|
122
|
+
if (includeForecast && data.hourly && data.hourly.time && data.hourly.time.length > 0) {
|
|
123
|
+
output += `---\n\n`;
|
|
124
|
+
output += `## Air Quality Forecast\n\n`;
|
|
125
|
+
// Show next 24 hours
|
|
126
|
+
const hoursToShow = Math.min(24, data.hourly.time.length);
|
|
127
|
+
output += `**Next ${hoursToShow} hours:**\n\n`;
|
|
128
|
+
// Group by 6-hour periods for readability
|
|
129
|
+
const periods = Math.ceil(hoursToShow / 6);
|
|
130
|
+
for (let i = 0; i < periods; i++) {
|
|
131
|
+
const startIdx = i * 6;
|
|
132
|
+
const endIdx = Math.min(startIdx + 6, hoursToShow);
|
|
133
|
+
const startTime = new Date(data.hourly.time[startIdx]);
|
|
134
|
+
const endTime = new Date(data.hourly.time[endIdx - 1]);
|
|
135
|
+
// Get AQI range for this period
|
|
136
|
+
let minAQI = Infinity;
|
|
137
|
+
let maxAQI = -Infinity;
|
|
138
|
+
for (let j = startIdx; j < endIdx; j++) {
|
|
139
|
+
const aqiValue = useUSAQI ? data.hourly.us_aqi?.[j] : data.hourly.european_aqi?.[j];
|
|
140
|
+
if (aqiValue !== undefined) {
|
|
141
|
+
minAQI = Math.min(minAQI, aqiValue);
|
|
142
|
+
maxAQI = Math.max(maxAQI, aqiValue);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
const avgAQI = (minAQI + maxAQI) / 2;
|
|
146
|
+
const aqiCategory = useUSAQI ? getUSAQICategory(avgAQI) : getEuropeanAQICategory(avgAQI);
|
|
147
|
+
output += `**${startTime.toLocaleTimeString()} - ${endTime.toLocaleTimeString()}:** `;
|
|
148
|
+
output += `${useUSAQI ? 'US' : 'EU'} AQI ${Math.round(minAQI)}-${Math.round(maxAQI)} (${aqiCategory.level})\n`;
|
|
149
|
+
}
|
|
150
|
+
output += `\n*Forecast includes ${data.hourly.time.length} hours of data*\n`;
|
|
151
|
+
}
|
|
152
|
+
return output;
|
|
153
|
+
}
|
|
154
|
+
//# sourceMappingURL=airQualityHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"airQualityHandler.js","sourceRoot":"","sources":["../../src/handlers/airQualityHandler.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,4BAA4B,EAC5B,cAAc,EACf,MAAM,wBAAwB,CAAC;AAShC,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,IAAa,EACb,gBAAkC;IAElC,gDAAgD;IAChD,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC1D,MAAM,QAAQ,GAAG,uBAAuB,CACrC,IAAuB,EAAE,QAAQ,EAClC,UAAU,EACV,KAAK,CACN,CAAC;IAEF,uBAAuB;IACvB,MAAM,cAAc,GAAG,MAAM,gBAAgB,CAAC,aAAa,CACzD,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,CAAC,CAAC,yBAAyB;KAC5B,CAAC;IAEF,0CAA0C;IAC1C,MAAM,MAAM,GAAG,gBAAgB,CAAC,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IAE/E,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,MAAM;aACb;SACF;KACF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,gBAAgB,CACvB,IAAiC,EACjC,QAAgB,EAChB,SAAiB,EACjB,eAAwB;IAExB,IAAI,MAAM,GAAG,0BAA0B,CAAC;IACxC,MAAM,IAAI,iBAAiB,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;IAC5E,MAAM,IAAI,iBAAiB,IA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CAAC,CAAC;YAEzF,MAAM,IAAI,KAAK,SAAS,CAAC,kBAAkB,EAAE,MAAM,OAAO,CAAC,kBAAkB,EAAE,MAAM,CAAC;YACtF,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,QAAQ,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,WAAW,CAAC,KAAK,KAAK,CAAC;QACjH,CAAC;QAED,MAAM,IAAI,wBAAwB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,mBAAmB,CAAC;IAC/E,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alertsHandler.d.ts","sourceRoot":"","sources":["../../src/handlers/alertsHandler.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AASlD,wBAAsB,eAAe,CACnC,IAAI,EAAE,OAAO,EACb,WAAW,EAAE,WAAW,GACvB,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"alertsHandler.d.ts","sourceRoot":"","sources":["../../src/handlers/alertsHandler.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AASlD,wBAAsB,eAAe,CACnC,IAAI,EAAE,OAAO,EACb,WAAW,EAAE,WAAW,GACvB,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAmG7D"}
|
|
@@ -30,11 +30,14 @@ export async function handleGetAlerts(args, noaaService) {
|
|
|
30
30
|
'Minor': 3,
|
|
31
31
|
'Unknown': 4
|
|
32
32
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
});
|
|
33
|
+
// Cache severity values to avoid repeated lookups during sort
|
|
34
|
+
const alertsWithSeverity = alerts.map(alert => ({
|
|
35
|
+
alert,
|
|
36
|
+
severityValue: severityOrder[alert.properties.severity] ?? 4
|
|
37
|
+
}));
|
|
38
|
+
const sortedAlerts = alertsWithSeverity
|
|
39
|
+
.sort((a, b) => a.severityValue - b.severityValue)
|
|
40
|
+
.map(item => item.alert);
|
|
38
41
|
for (const alert of sortedAlerts) {
|
|
39
42
|
const props = alert.properties;
|
|
40
43
|
// Severity emoji
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alertsHandler.js","sourceRoot":"","sources":["../../src/handlers/alertsHandler.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAQtF,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,IAAa,EACb,WAAwB;IAExB,gDAAgD;IAChD,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC1D,MAAM,WAAW,GAAG,uBAAuB,CACxC,IAAmB,EAAE,WAAW,EACjC,aAAa,EACb,IAAI,CACL,CAAC;IAEF,kBAAkB;IAClB,MAAM,UAAU,GAAG,MAAM,WAAW,CAAC,SAAS,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;IACjF,MAAM,MAAM,GAAG,UAAU,CAAC,QAAQ,CAAC;IAEnC,gCAAgC;IAChC,IAAI,MAAM,GAAG,sBAAsB,CAAC;IACpC,MAAM,IAAI,iBAAiB,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,OAAO,CAAC,CAA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KAAK,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,SAAS,EAAE,CAAC;gBACnD,MAAM,IAAI,cAAc,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,cAAc,EAAE,IAAI,CAAC;YACrE,CAAC;YAED,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;gBACf,MAAM,IAAI,aAAa,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,IAAI,CAAC;YACnE,CAAC;YAED,MAAM,IAAI,uBAAuB,KAAK,CAAC,WAAW,IAAI,CAAC;YAEvD,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;gBACtB,MAAM,IAAI,wBAAwB,KAAK,CAAC,WAAW,IAAI,CAAC;YAC1D,CAAC;YAED,MAAM,IAAI,+BAA+B,KAAK,CAAC,QAAQ,IAAI,CAAC;YAC5D,MAAM,IAAI,eAAe,KAAK,CAAC,UAAU,MAAM,CAAC;QAClD,CAAC;IACH,CAAC;IAED,MAAM,IAAI,OAAO,CAAC;IAClB,MAAM,IAAI,gDAAgD,CAAC;IAE3D,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,MAAM;aACb;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"currentConditionsHandler.d.ts","sourceRoot":"","sources":["../../src/handlers/currentConditionsHandler.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"currentConditionsHandler.d.ts","sourceRoot":"","sources":["../../src/handlers/currentConditionsHandler.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAmBlD,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,OAAO,EACb,WAAW,EAAE,WAAW,GACvB,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CA6P7D"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Handler for get_current_conditions tool
|
|
3
3
|
*/
|
|
4
|
-
import { validateCoordinates } from '../utils/validation.js';
|
|
4
|
+
import { validateCoordinates, validateOptionalBoolean } from '../utils/validation.js';
|
|
5
5
|
import { convertToFahrenheit } from '../utils/temperatureConversion.js';
|
|
6
6
|
import { DisplayThresholds } from '../config/displayThresholds.js';
|
|
7
|
+
import { getHainesCategory, getGrasslandFireDangerCategory, getRedFlagCategory, getCurrentFireWeatherValue, formatMixingHeight, interpretTransportWind } from '../utils/fireWeather.js';
|
|
7
8
|
export async function handleGetCurrentConditions(args, noaaService) {
|
|
8
9
|
// Validate input parameters with runtime checks
|
|
9
10
|
const { latitude, longitude } = validateCoordinates(args);
|
|
11
|
+
const includeFireWeather = validateOptionalBoolean(args?.include_fire_weather, 'include_fire_weather', false);
|
|
10
12
|
// Get current observation
|
|
11
13
|
const observation = await noaaService.getCurrentConditions(latitude, longitude);
|
|
12
14
|
const props = observation.properties;
|
|
@@ -154,6 +156,67 @@ export async function handleGetCurrentConditions(args, noaaService) {
|
|
|
154
156
|
output += `**Last 6 Hours:** ${precipIn.toFixed(2)} inches\n`;
|
|
155
157
|
}
|
|
156
158
|
}
|
|
159
|
+
// Fire Weather section (optional)
|
|
160
|
+
if (includeFireWeather) {
|
|
161
|
+
try {
|
|
162
|
+
const gridpointData = await noaaService.getGridpointDataByCoordinates(latitude, longitude);
|
|
163
|
+
const fireProps = gridpointData.properties;
|
|
164
|
+
// Check if any fire weather data is available
|
|
165
|
+
const hainesValue = getCurrentFireWeatherValue(fireProps.hainesIndex);
|
|
166
|
+
const grasslandValue = getCurrentFireWeatherValue(fireProps.grasslandFireDangerIndex);
|
|
167
|
+
const redFlagValue = getCurrentFireWeatherValue(fireProps.redFlagThreatIndex);
|
|
168
|
+
const mixingHeightValue = getCurrentFireWeatherValue(fireProps.mixingHeight);
|
|
169
|
+
const transportWindValue = getCurrentFireWeatherValue(fireProps.transportWindSpeed);
|
|
170
|
+
if (hainesValue !== null || grasslandValue !== null || redFlagValue !== null || mixingHeightValue !== null) {
|
|
171
|
+
output += `\n## Fire Weather\n\n`;
|
|
172
|
+
// Haines Index
|
|
173
|
+
if (hainesValue !== null) {
|
|
174
|
+
const hainesCategory = getHainesCategory(hainesValue);
|
|
175
|
+
const emoji = hainesCategory.level === 'Low' ? '🟢' :
|
|
176
|
+
hainesCategory.level === 'Moderate' ? '🟡' :
|
|
177
|
+
hainesCategory.level === 'High' ? '🟠' : '🔴';
|
|
178
|
+
output += `**${emoji} Haines Index:** ${hainesValue} (${hainesCategory.level})\n`;
|
|
179
|
+
output += `${hainesCategory.fireGrowthPotential}\n\n`;
|
|
180
|
+
}
|
|
181
|
+
// Grassland Fire Danger Index
|
|
182
|
+
if (grasslandValue !== null) {
|
|
183
|
+
const grasslandCategory = getGrasslandFireDangerCategory(grasslandValue);
|
|
184
|
+
const emoji = grasslandCategory.level === 'Low' ? '🟢' :
|
|
185
|
+
grasslandCategory.level === 'Moderate' ? '🟡' :
|
|
186
|
+
grasslandCategory.level === 'High' ? '🟠' : '🔴';
|
|
187
|
+
output += `**${emoji} Grassland Fire Danger:** ${grasslandValue} (${grasslandCategory.level})\n`;
|
|
188
|
+
output += `${grasslandCategory.description}\n\n`;
|
|
189
|
+
}
|
|
190
|
+
// Red Flag Threat Index
|
|
191
|
+
if (redFlagValue !== null) {
|
|
192
|
+
const redFlagCategory = getRedFlagCategory(redFlagValue);
|
|
193
|
+
const emoji = redFlagCategory.level === 'Low' ? '🟢' :
|
|
194
|
+
redFlagCategory.level === 'Moderate' ? '🟡' :
|
|
195
|
+
redFlagCategory.level === 'High' ? '🟠' : '🔴';
|
|
196
|
+
output += `**${emoji} Red Flag Threat:** ${Math.round(redFlagValue)} (${redFlagCategory.level})\n`;
|
|
197
|
+
output += `${redFlagCategory.description}\n\n`;
|
|
198
|
+
}
|
|
199
|
+
// Mixing Height (important for smoke dispersion)
|
|
200
|
+
if (mixingHeightValue !== null) {
|
|
201
|
+
const mixingHeightFt = mixingHeightValue; // Already in feet from API
|
|
202
|
+
output += `**Mixing Height:** ${formatMixingHeight(mixingHeightFt)}\n`;
|
|
203
|
+
}
|
|
204
|
+
// Transport Wind Speed (smoke transport)
|
|
205
|
+
if (transportWindValue !== null) {
|
|
206
|
+
output += `**Transport Wind:** ${interpretTransportWind(transportWindValue)}\n`;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
output += `\n## Fire Weather\n\n`;
|
|
211
|
+
output += `No fire weather data available for this location.\n`;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
catch (error) {
|
|
215
|
+
// If fire weather data fetch fails, just skip it (don't error the whole request)
|
|
216
|
+
output += `\n## Fire Weather\n\n`;
|
|
217
|
+
output += `⚠️ Fire weather data not available for this location.\n`;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
157
220
|
output += `\n---\n`;
|
|
158
221
|
output += `*Data source: NOAA National Weather Service*\n`;
|
|
159
222
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"currentConditionsHandler.js","sourceRoot":"","sources":["../../src/handlers/currentConditionsHandler.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"currentConditionsHandler.js","sourceRoot":"","sources":["../../src/handlers/currentConditionsHandler.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,iBA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|
-
{"version":3,"file":"forecastHandler.d.ts","sourceRoot":"","sources":["../../src/handlers/forecastHandler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"forecastHandler.d.ts","sourceRoot":"","sources":["../../src/handlers/forecastHandler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AA8I5D,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,OAAO,EACb,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,gBAAgB,GACjC,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAiD7D"}
|