@cyanheads/noaa-spaceweather-mcp-server 0.1.1
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/AGENTS.md +328 -0
- package/CLAUDE.md +328 -0
- package/Dockerfile +99 -0
- package/LICENSE +201 -0
- package/README.md +315 -0
- package/changelog/0.1.x/0.1.1.md +31 -0
- package/changelog/template.md +127 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-alerts.tool.d.ts +37 -0
- package/dist/mcp-server/tools/definitions/get-alerts.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-alerts.tool.js +114 -0
- package/dist/mcp-server/tools/definitions/get-alerts.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-aurora-forecast.tool.d.ts +37 -0
- package/dist/mcp-server/tools/definitions/get-aurora-forecast.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-aurora-forecast.tool.js +202 -0
- package/dist/mcp-server/tools/definitions/get-aurora-forecast.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-conditions.tool.d.ts +55 -0
- package/dist/mcp-server/tools/definitions/get-conditions.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-conditions.tool.js +129 -0
- package/dist/mcp-server/tools/definitions/get-conditions.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-kp-index.tool.d.ts +34 -0
- package/dist/mcp-server/tools/definitions/get-kp-index.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-kp-index.tool.js +126 -0
- package/dist/mcp-server/tools/definitions/get-kp-index.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-solar-activity.tool.d.ts +58 -0
- package/dist/mcp-server/tools/definitions/get-solar-activity.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-solar-activity.tool.js +237 -0
- package/dist/mcp-server/tools/definitions/get-solar-activity.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-solar-wind.tool.d.ts +46 -0
- package/dist/mcp-server/tools/definitions/get-solar-wind.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-solar-wind.tool.js +197 -0
- package/dist/mcp-server/tools/definitions/get-solar-wind.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/index.d.ts +225 -0
- package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/index.js +19 -0
- package/dist/mcp-server/tools/definitions/index.js.map +1 -0
- package/dist/services/space-weather/space-weather-service.d.ts +42 -0
- package/dist/services/space-weather/space-weather-service.d.ts.map +1 -0
- package/dist/services/space-weather/space-weather-service.js +402 -0
- package/dist/services/space-weather/space-weather-service.js.map +1 -0
- package/dist/services/space-weather/types.d.ts +189 -0
- package/dist/services/space-weather/types.d.ts.map +1 -0
- package/dist/services/space-weather/types.js +6 -0
- package/dist/services/space-weather/types.js.map +1 -0
- package/package.json +105 -0
- package/server.json +99 -0
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview NOAA Space Weather Prediction Center (SWPC) feed client.
|
|
3
|
+
* Wraps keyless public JSON feeds from services.swpc.noaa.gov, normalizes the
|
|
4
|
+
* diverse feed shapes (array-of-arrays, array-of-objects, keyed objects) into
|
|
5
|
+
* clean typed domain records, and exposes per-feed methods used by all tools.
|
|
6
|
+
* @module services/space-weather/space-weather-service
|
|
7
|
+
*/
|
|
8
|
+
import { serviceUnavailable } from '@cyanheads/mcp-ts-core/errors';
|
|
9
|
+
import { fetchWithTimeout, withRetry } from '@cyanheads/mcp-ts-core/utils';
|
|
10
|
+
// ── Constants ──────────────────────────────────────────────────────────────
|
|
11
|
+
const BASE_URL = 'https://services.swpc.noaa.gov';
|
|
12
|
+
const USER_AGENT = 'noaa-spaceweather-mcp-server/0.1.1 (github.com/cyanheads/noaa-spaceweather-mcp-server)';
|
|
13
|
+
const FETCH_TIMEOUT_MS = 15_000;
|
|
14
|
+
/** Missing/fill value used in many SWPC feeds for sensor failures. */
|
|
15
|
+
const FILL_VALUE = -9999;
|
|
16
|
+
// ── NOAA scale helpers ──────────────────────────────────────────────────────
|
|
17
|
+
/** Maps Kp value (0–9) to NOAA G-scale level (0–5). */
|
|
18
|
+
function kpToGScale(kp) {
|
|
19
|
+
if (kp >= 9)
|
|
20
|
+
return 5;
|
|
21
|
+
if (kp >= 8)
|
|
22
|
+
return 4;
|
|
23
|
+
if (kp >= 7)
|
|
24
|
+
return 3;
|
|
25
|
+
if (kp >= 6)
|
|
26
|
+
return 2;
|
|
27
|
+
if (kp >= 5)
|
|
28
|
+
return 1;
|
|
29
|
+
return 0;
|
|
30
|
+
}
|
|
31
|
+
/** Returns aurora visibility latitude guidance for a G-scale level. */
|
|
32
|
+
function gScaleToAuroraLatitude(gScale) {
|
|
33
|
+
switch (gScale) {
|
|
34
|
+
case 5:
|
|
35
|
+
return 'Aurora possible to ~40° geomagnetic latitude';
|
|
36
|
+
case 4:
|
|
37
|
+
return 'Aurora possible to ~45° geomagnetic latitude';
|
|
38
|
+
case 3:
|
|
39
|
+
return 'Aurora possible to ~50° geomagnetic latitude';
|
|
40
|
+
case 2:
|
|
41
|
+
return 'Aurora possible to ~55° geomagnetic latitude';
|
|
42
|
+
case 1:
|
|
43
|
+
return 'Aurora possible to ~60° geomagnetic latitude';
|
|
44
|
+
default:
|
|
45
|
+
return 'No significant aurora expected at mid-latitudes';
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// ── Shared fetch helper ─────────────────────────────────────────────────────
|
|
49
|
+
async function fetchFeed(path, ctx) {
|
|
50
|
+
// Cast ctx to RequestContext for framework utils — Context is structurally
|
|
51
|
+
// compatible but lacks the index signature the type expects.
|
|
52
|
+
const reqCtx = ctx;
|
|
53
|
+
return withRetry(async () => {
|
|
54
|
+
const url = `${BASE_URL}${path}`;
|
|
55
|
+
const response = await fetchWithTimeout(url, FETCH_TIMEOUT_MS, reqCtx, {
|
|
56
|
+
signal: ctx.signal,
|
|
57
|
+
headers: { 'User-Agent': USER_AGENT },
|
|
58
|
+
});
|
|
59
|
+
const text = await response.text();
|
|
60
|
+
if (/^\s*<(!DOCTYPE\s+html|html[\s>])/i.test(text)) {
|
|
61
|
+
throw serviceUnavailable(`SWPC feed returned HTML instead of JSON — likely rate-limited or unavailable.`, { path });
|
|
62
|
+
}
|
|
63
|
+
try {
|
|
64
|
+
return JSON.parse(text);
|
|
65
|
+
}
|
|
66
|
+
catch (err) {
|
|
67
|
+
throw serviceUnavailable(`Failed to parse SWPC feed JSON from ${path}.`, { path }, { cause: err });
|
|
68
|
+
}
|
|
69
|
+
}, {
|
|
70
|
+
operation: `fetchFeed:${path}`,
|
|
71
|
+
context: reqCtx,
|
|
72
|
+
baseDelayMs: 1000,
|
|
73
|
+
signal: ctx.signal,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
// ── Normalization helpers ───────────────────────────────────────────────────
|
|
77
|
+
/**
|
|
78
|
+
* Normalize a null/string/number scale value to a number.
|
|
79
|
+
* SWPC returns null for unavailable forecasts — treat as 0 (no storm).
|
|
80
|
+
*/
|
|
81
|
+
function coerceScale(v) {
|
|
82
|
+
if (v == null)
|
|
83
|
+
return 0;
|
|
84
|
+
const n = Number(v);
|
|
85
|
+
return Number.isFinite(n) ? n : 0;
|
|
86
|
+
}
|
|
87
|
+
/** Parse numeric string, returning null if the value is the fill value or NaN. */
|
|
88
|
+
function parseNum(s) {
|
|
89
|
+
if (s == null)
|
|
90
|
+
return null;
|
|
91
|
+
const n = typeof s === 'string' ? parseFloat(s) : s;
|
|
92
|
+
if (!Number.isFinite(n) || n === FILL_VALUE)
|
|
93
|
+
return null;
|
|
94
|
+
return n;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Normalize a SWPC time tag string to ISO 8601 UTC.
|
|
98
|
+
* SWPC solar-wind feeds use "YYYY-MM-DD HH:MM:SS.mmm" (space-separated, no 'Z').
|
|
99
|
+
* Without normalization, `new Date(tag)` interprets the string as local time
|
|
100
|
+
* rather than UTC, corrupting all time-based filtering.
|
|
101
|
+
*/
|
|
102
|
+
function normalizeSwpcTime(tag) {
|
|
103
|
+
// Replace the space between date and time with 'T' and append 'Z' if absent.
|
|
104
|
+
if (typeof tag !== 'string' || tag.includes('T'))
|
|
105
|
+
return tag;
|
|
106
|
+
const normalized = tag.replace(' ', 'T');
|
|
107
|
+
return normalized.endsWith('Z') ? normalized : `${normalized}Z`;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Normalize array-of-arrays feed (plasma, mag) with a header row.
|
|
111
|
+
* data[0] is string[] field names; data[1..n] are string[] value rows.
|
|
112
|
+
*/
|
|
113
|
+
function normalizeArrayOfArrays(raw) {
|
|
114
|
+
if (raw.length < 2 || !Array.isArray(raw[0]))
|
|
115
|
+
return [];
|
|
116
|
+
const headers = raw[0];
|
|
117
|
+
return raw.slice(1).map((row) => {
|
|
118
|
+
const obj = {};
|
|
119
|
+
headers.forEach((h, i) => {
|
|
120
|
+
obj[h] = row[i] ?? '';
|
|
121
|
+
});
|
|
122
|
+
return obj;
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/** Parse a product code prefix to a product type. */
|
|
126
|
+
function parseProductType(id) {
|
|
127
|
+
const upper = id.toUpperCase();
|
|
128
|
+
if (upper.startsWith('WAR'))
|
|
129
|
+
return 'Warning';
|
|
130
|
+
if (upper.startsWith('WAT'))
|
|
131
|
+
return 'Watch';
|
|
132
|
+
if (upper.startsWith('ALT'))
|
|
133
|
+
return 'Alert';
|
|
134
|
+
if (upper.startsWith('SUM'))
|
|
135
|
+
return 'Summary';
|
|
136
|
+
return 'Other';
|
|
137
|
+
}
|
|
138
|
+
/** Extract phenomenon name from product code. */
|
|
139
|
+
function parsePhenomenon(id) {
|
|
140
|
+
const upper = id.toUpperCase();
|
|
141
|
+
// After the 3-char type prefix, look at the next character(s)
|
|
142
|
+
const core = upper.slice(3);
|
|
143
|
+
if (core.startsWith('G') || core.startsWith('K'))
|
|
144
|
+
return 'Geomagnetic';
|
|
145
|
+
if (core.startsWith('R') || core.startsWith('X'))
|
|
146
|
+
return 'Radio Blackout';
|
|
147
|
+
if (core.startsWith('S'))
|
|
148
|
+
return 'Solar Radiation';
|
|
149
|
+
if (core.startsWith('A'))
|
|
150
|
+
return 'Aurora';
|
|
151
|
+
return 'Space Weather';
|
|
152
|
+
}
|
|
153
|
+
/** Parse numeric level from product code suffix. */
|
|
154
|
+
function parseLevel(id) {
|
|
155
|
+
const match = id.match(/(\d+)\w*$/);
|
|
156
|
+
if (!match)
|
|
157
|
+
return 0;
|
|
158
|
+
return parseInt(match[1], 10);
|
|
159
|
+
}
|
|
160
|
+
// ── SpaceWeatherService ─────────────────────────────────────────────────────
|
|
161
|
+
/** NOAA SWPC public feeds client. Initialized once; accessed via accessor. */
|
|
162
|
+
export class SpaceWeatherService {
|
|
163
|
+
// config and storage are accepted per the service contract but not used by this
|
|
164
|
+
// keyless, stateless feed client.
|
|
165
|
+
constructor(_config, _storage) { }
|
|
166
|
+
// ── NOAA Scales ────────────────────────────────────────────────────────
|
|
167
|
+
/** Fetch current NOAA storm scales (today + 3-day forecast). */
|
|
168
|
+
async getNoaaScales(ctx) {
|
|
169
|
+
const raw = await fetchFeed('/products/noaa-scales.json', ctx);
|
|
170
|
+
const normalizePeriod = (r) => ({
|
|
171
|
+
date: r.DateStamp ?? '',
|
|
172
|
+
time: r.TimeStamp ?? '',
|
|
173
|
+
G: {
|
|
174
|
+
category: 'G',
|
|
175
|
+
scale: coerceScale(r.G?.Scale),
|
|
176
|
+
text: r.G?.Text ?? '',
|
|
177
|
+
minorProb: r.G?.Prob != null ? coerceScale(r.G.Prob) : null,
|
|
178
|
+
majorProb: null,
|
|
179
|
+
},
|
|
180
|
+
R: {
|
|
181
|
+
category: 'R',
|
|
182
|
+
scale: coerceScale(r.R?.Scale),
|
|
183
|
+
text: r.R?.Text ?? '',
|
|
184
|
+
minorProb: r.R?.MinorProb != null ? coerceScale(r.R.MinorProb) : null,
|
|
185
|
+
majorProb: r.R?.MajorProb != null ? coerceScale(r.R.MajorProb) : null,
|
|
186
|
+
},
|
|
187
|
+
S: {
|
|
188
|
+
category: 'S',
|
|
189
|
+
scale: coerceScale(r.S?.Scale),
|
|
190
|
+
text: r.S?.Text ?? '',
|
|
191
|
+
minorProb: r.S?.Prob != null ? coerceScale(r.S.Prob) : null,
|
|
192
|
+
majorProb: null,
|
|
193
|
+
},
|
|
194
|
+
});
|
|
195
|
+
const today = raw['0'];
|
|
196
|
+
if (!today)
|
|
197
|
+
throw serviceUnavailable('SWPC scales feed missing key "0" (today).', {
|
|
198
|
+
available: Object.keys(raw),
|
|
199
|
+
});
|
|
200
|
+
return {
|
|
201
|
+
today: normalizePeriod(today),
|
|
202
|
+
forecast: ['1', '2', '3']
|
|
203
|
+
.filter((k) => raw[k] != null)
|
|
204
|
+
.map((k) => normalizePeriod(raw[k])),
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
// ── Kp Index ────────────────────────────────────────────────────────────
|
|
208
|
+
/** Fetch observed Kp index history. */
|
|
209
|
+
async getKpObserved(ctx) {
|
|
210
|
+
const raw = await fetchFeed('/products/noaa-planetary-k-index.json', ctx);
|
|
211
|
+
return raw.map((r) => {
|
|
212
|
+
const kp = parseNum(r.Kp) ?? 0;
|
|
213
|
+
const gScale = kpToGScale(kp);
|
|
214
|
+
return {
|
|
215
|
+
timeTag: r.time_tag,
|
|
216
|
+
kp,
|
|
217
|
+
gScale,
|
|
218
|
+
auroraLatitude: gScaleToAuroraLatitude(gScale),
|
|
219
|
+
aRunning: parseNum(r.a_running),
|
|
220
|
+
stationCount: parseNum(r.station_count),
|
|
221
|
+
};
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
/** Fetch Kp 3-day forecast. */
|
|
225
|
+
async getKpForecast(ctx) {
|
|
226
|
+
const raw = await fetchFeed('/products/noaa-planetary-k-index-forecast.json', ctx);
|
|
227
|
+
return raw.map((r) => ({
|
|
228
|
+
timeTag: r.time_tag,
|
|
229
|
+
kp: parseNum(r.kp) ?? 0,
|
|
230
|
+
observed: r.observed,
|
|
231
|
+
noaaScale: r.noaa_scale ?? null,
|
|
232
|
+
}));
|
|
233
|
+
}
|
|
234
|
+
// ── OVATION Aurora ──────────────────────────────────────────────────────
|
|
235
|
+
/** Fetch the latest OVATION aurora forecast grid. */
|
|
236
|
+
async getAuroraForecast(ctx) {
|
|
237
|
+
const raw = await fetchFeed('/json/ovation_aurora_latest.json', ctx);
|
|
238
|
+
return {
|
|
239
|
+
meta: {
|
|
240
|
+
observationTime: raw['Observation Time'] ?? '',
|
|
241
|
+
forecastTime: raw['Forecast Time'] ?? '',
|
|
242
|
+
},
|
|
243
|
+
grid: (raw.coordinates ?? []).map(([lon, lat, aurora]) => ({
|
|
244
|
+
// OVATION grid uses 0–360 longitude. Normalize to −180..179 so user
|
|
245
|
+
// coordinates (WGS84 standard −180..180) map to the same range for
|
|
246
|
+
// nearest-grid-point search.
|
|
247
|
+
longitude: lon > 180 ? lon - 360 : lon,
|
|
248
|
+
latitude: lat,
|
|
249
|
+
auroraPercent: aurora,
|
|
250
|
+
})),
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
// ── Solar Wind ──────────────────────────────────────────────────────────
|
|
254
|
+
/** Fetch solar wind plasma (7-day, array-of-arrays format). */
|
|
255
|
+
async getSolarWindPlasma(ctx) {
|
|
256
|
+
const raw = await fetchFeed('/products/solar-wind/plasma-7-day.json', ctx);
|
|
257
|
+
const rows = normalizeArrayOfArrays(raw);
|
|
258
|
+
return rows.map((r) => ({
|
|
259
|
+
timeTag: normalizeSwpcTime(r['time_tag'] ?? ''),
|
|
260
|
+
densityPerCm3: parseNum(r['density']),
|
|
261
|
+
speedKmS: parseNum(r['speed']),
|
|
262
|
+
temperatureK: parseNum(r['temperature']),
|
|
263
|
+
}));
|
|
264
|
+
}
|
|
265
|
+
/** Fetch solar wind magnetic field (7-day, array-of-arrays format). */
|
|
266
|
+
async getSolarWindMag(ctx) {
|
|
267
|
+
const raw = await fetchFeed('/products/solar-wind/mag-7-day.json', ctx);
|
|
268
|
+
const rows = normalizeArrayOfArrays(raw);
|
|
269
|
+
return rows.map((r) => ({
|
|
270
|
+
timeTag: normalizeSwpcTime(r['time_tag'] ?? ''),
|
|
271
|
+
bxGsm: parseNum(r['bx_gsm']),
|
|
272
|
+
byGsm: parseNum(r['by_gsm']),
|
|
273
|
+
bzGsm: parseNum(r['bz_gsm']),
|
|
274
|
+
bt: parseNum(r['bt']),
|
|
275
|
+
}));
|
|
276
|
+
}
|
|
277
|
+
// ── Solar Activity ──────────────────────────────────────────────────────
|
|
278
|
+
/** Fetch GOES X-ray flux (7-day, long-channel 0.1-0.8nm only). */
|
|
279
|
+
async getXrayFlux(ctx) {
|
|
280
|
+
const raw = await fetchFeed('/json/goes/primary/xrays-7-day.json', ctx);
|
|
281
|
+
return raw
|
|
282
|
+
.filter((r) => r.energy === '0.1-0.8nm')
|
|
283
|
+
.map((r) => ({
|
|
284
|
+
timeTag: r.time_tag,
|
|
285
|
+
satellite: r.satellite,
|
|
286
|
+
fluxWm2: r.flux,
|
|
287
|
+
energy: r.energy,
|
|
288
|
+
}));
|
|
289
|
+
}
|
|
290
|
+
/** Fetch active solar regions (most recent observed date only). */
|
|
291
|
+
async getSolarRegions(ctx) {
|
|
292
|
+
const raw = await fetchFeed('/json/solar_regions.json', ctx);
|
|
293
|
+
// The feed contains ~30 days of region history in reverse-chrono order.
|
|
294
|
+
// Filter to the most recent observed_date to return only currently active regions.
|
|
295
|
+
const mostRecentDate = raw.length > 0 ? raw[0]?.observed_date : null;
|
|
296
|
+
return raw
|
|
297
|
+
.filter((r) => r.location != null && r.observed_date === mostRecentDate) // most recent date only, skip tombstones
|
|
298
|
+
.map((r) => {
|
|
299
|
+
// latitude is a bare integer in the live feed (e.g. 17, -5).
|
|
300
|
+
// Normalize to heliographic string ("N17", "S05") to match the declared output type.
|
|
301
|
+
const latNum = typeof r.latitude === 'number' ? r.latitude : parseFloat(String(r.latitude));
|
|
302
|
+
const latStr = Number.isFinite(latNum)
|
|
303
|
+
? `${latNum >= 0 ? 'N' : 'S'}${String(Math.abs(latNum)).padStart(2, '0')}`
|
|
304
|
+
: String(r.latitude ?? '');
|
|
305
|
+
return {
|
|
306
|
+
observedDate: r.observed_date,
|
|
307
|
+
region: r.region,
|
|
308
|
+
latitude: latStr,
|
|
309
|
+
location: r.location,
|
|
310
|
+
spotClass: r.spot_class ?? '',
|
|
311
|
+
numberSpots: r.number_spots ?? 0,
|
|
312
|
+
magClass: r.mag_class ?? '',
|
|
313
|
+
cFlareProbability: parseNum(r.c_flare_probability) ?? 0,
|
|
314
|
+
mFlareProbability: parseNum(r.m_flare_probability) ?? 0,
|
|
315
|
+
xFlareProbability: parseNum(r.x_flare_probability) ?? 0,
|
|
316
|
+
protonProbability: parseNum(r.proton_probability) ?? 0,
|
|
317
|
+
};
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
/** Fetch solar flare probabilities (3-day forward outlook from the latest issued entry). */
|
|
321
|
+
async getSolarProbabilities(ctx) {
|
|
322
|
+
const raw = await fetchFeed('/json/solar_probabilities.json', ctx);
|
|
323
|
+
// The feed is a 30-entry reverse-chrono archive of daily forecasts.
|
|
324
|
+
// Each entry embeds a 3-day outlook via _1_day / _2_day / _3_day columns.
|
|
325
|
+
// Take only the most recent entry (index 0) and expand its 3-day outlook
|
|
326
|
+
// into three records, advancing the date by 0, 1, and 2 days respectively.
|
|
327
|
+
if (raw.length === 0)
|
|
328
|
+
return [];
|
|
329
|
+
const latest = raw[0];
|
|
330
|
+
// Normalize to UTC: the date field is "2026-06-04T00:00:00" without a 'Z',
|
|
331
|
+
// so new Date() would interpret it as local time. Append 'Z' to force UTC.
|
|
332
|
+
const rawDate = latest.date.endsWith('Z') ? latest.date : `${latest.date}Z`;
|
|
333
|
+
const baseDate = new Date(rawDate);
|
|
334
|
+
return [0, 1, 2].map((dayOffset) => {
|
|
335
|
+
const d = new Date(baseDate);
|
|
336
|
+
d.setDate(d.getDate() + dayOffset);
|
|
337
|
+
const suffix = dayOffset === 0 ? '1_day' : dayOffset === 1 ? '2_day' : '3_day';
|
|
338
|
+
return {
|
|
339
|
+
date: d.toISOString(),
|
|
340
|
+
cClass1Day: parseNum(latest[`c_class_${suffix}`]) ?? 0,
|
|
341
|
+
mClass1Day: parseNum(latest[`m_class_${suffix}`]) ?? 0,
|
|
342
|
+
xClass1Day: parseNum(latest[`x_class_${suffix}`]) ?? 0,
|
|
343
|
+
protons1Day: parseNum(latest[`10mev_protons_${suffix}`]) ?? 0,
|
|
344
|
+
};
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
/** Fetch GOES integral proton flux (3-day, ≥10 MeV channel). */
|
|
348
|
+
async getProtonFlux(ctx) {
|
|
349
|
+
const raw = await fetchFeed('/json/goes/primary/integral-protons-plot-3-day.json', ctx);
|
|
350
|
+
return raw
|
|
351
|
+
.filter((r) => r.energy === '>=10 MeV')
|
|
352
|
+
.map((r) => ({
|
|
353
|
+
timeTag: r.time_tag,
|
|
354
|
+
satellite: r.satellite,
|
|
355
|
+
fluxPfu: r.flux,
|
|
356
|
+
energy: r.energy,
|
|
357
|
+
}));
|
|
358
|
+
}
|
|
359
|
+
// ── Alerts ──────────────────────────────────────────────────────────────
|
|
360
|
+
/** Fetch SWPC alerts, watches, and warnings. */
|
|
361
|
+
async getAlerts(ctx) {
|
|
362
|
+
const raw = await fetchFeed('/products/alerts.json', ctx);
|
|
363
|
+
return raw.map((r) => {
|
|
364
|
+
const id = r.product_id ?? '';
|
|
365
|
+
// The product_id field in the feed is a 4-char abbreviated code (e.g. "K04W").
|
|
366
|
+
// The full message code (e.g. "WARK04") lives in the message body as:
|
|
367
|
+
// "Space Weather Message Code: WARK04"
|
|
368
|
+
// Use the full message code for type/phenomenon/level parsing; it carries
|
|
369
|
+
// the WAR/WAT/ALT/SUM prefix the parser needs.
|
|
370
|
+
const msgCodeMatch = r.message?.match(/Space\s+Weather\s+Message\s+Code:\s*(\S+)/i);
|
|
371
|
+
const msgCode = msgCodeMatch?.[1] ?? id;
|
|
372
|
+
// Parse valid from/to from structured message lines like:
|
|
373
|
+
// Valid From: 2026 Jun 04 0000 UTC
|
|
374
|
+
// Valid To: 2026 Jun 04 2359 UTC
|
|
375
|
+
const fromMatch = r.message?.match(/Valid\s+From:\s*(.+?)(?:\r?\n|\r)/i);
|
|
376
|
+
const toMatch = r.message?.match(/Valid\s+To:\s*(.+?)(?:\r?\n|\r)/i);
|
|
377
|
+
return {
|
|
378
|
+
productId: id,
|
|
379
|
+
productType: parseProductType(msgCode),
|
|
380
|
+
level: parseLevel(msgCode),
|
|
381
|
+
issueDatetime: r.issue_datetime,
|
|
382
|
+
message: (r.message ?? '').replace(/\r\n/g, '\n').replace(/\r/g, '\n').trim(),
|
|
383
|
+
phenomenon: parsePhenomenon(msgCode),
|
|
384
|
+
validFrom: fromMatch?.[1] != null ? fromMatch[1].trim() : null,
|
|
385
|
+
validTo: toMatch?.[1] != null ? toMatch[1].trim() : null,
|
|
386
|
+
};
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
// ── Init / accessor ─────────────────────────────────────────────────────────
|
|
391
|
+
let _service;
|
|
392
|
+
/** Initialize the SpaceWeatherService singleton. Call once in setup(). */
|
|
393
|
+
export function initSpaceWeatherService(config, storage) {
|
|
394
|
+
_service = new SpaceWeatherService(config, storage);
|
|
395
|
+
}
|
|
396
|
+
/** Access the initialized SpaceWeatherService singleton. */
|
|
397
|
+
export function getSpaceWeatherService() {
|
|
398
|
+
if (!_service)
|
|
399
|
+
throw new Error('SpaceWeatherService not initialized — call initSpaceWeatherService() in setup()');
|
|
400
|
+
return _service;
|
|
401
|
+
}
|
|
402
|
+
//# sourceMappingURL=space-weather-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"space-weather-service.js","sourceRoot":"","sources":["../../../src/services/space-weather/space-weather-service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EAAE,gBAAgB,EAAuB,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAgBhG,8EAA8E;AAE9E,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AAClD,MAAM,UAAU,GACd,wFAAwF,CAAC;AAC3F,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEhC,sEAAsE;AACtE,MAAM,UAAU,GAAG,CAAC,IAAI,CAAC;AAEzB,+EAA+E;AAE/E,uDAAuD;AACvD,SAAS,UAAU,CAAC,EAAU;IAC5B,IAAI,EAAE,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IACtB,IAAI,EAAE,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IACtB,IAAI,EAAE,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IACtB,IAAI,EAAE,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IACtB,IAAI,EAAE,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IACtB,OAAO,CAAC,CAAC;AACX,CAAC;AAED,uEAAuE;AACvE,SAAS,sBAAsB,CAAC,MAAc;IAC5C,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,CAAC;YACJ,OAAO,8CAA8C,CAAC;QACxD,KAAK,CAAC;YACJ,OAAO,8CAA8C,CAAC;QACxD,KAAK,CAAC;YACJ,OAAO,8CAA8C,CAAC;QACxD,KAAK,CAAC;YACJ,OAAO,8CAA8C,CAAC;QACxD,KAAK,CAAC;YACJ,OAAO,8CAA8C,CAAC;QACxD;YACE,OAAO,iDAAiD,CAAC;IAC7D,CAAC;AACH,CAAC;AAED,+EAA+E;AAE/E,KAAK,UAAU,SAAS,CAAI,IAAY,EAAE,GAAY;IACpD,2EAA2E;IAC3E,6DAA6D;I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@module services/space-weather/types
|
|
4
|
+
*/
|
|
5
|
+
/** A single NOAA storm scale entry (R, S, or G) for one forecast period. */
|
|
6
|
+
export interface NoaaScaleEntry {
|
|
7
|
+
/** Storm scale category: R (radio blackout), S (solar radiation), G (geomagnetic). */
|
|
8
|
+
category: 'R' | 'S' | 'G';
|
|
9
|
+
/** Probability of a major event (%), or null when not applicable. */
|
|
10
|
+
majorProb: number | null;
|
|
11
|
+
/** Probability of a minor event (%), or null when not applicable. */
|
|
12
|
+
minorProb: number | null;
|
|
13
|
+
/** Storm scale level 0–5. */
|
|
14
|
+
scale: number;
|
|
15
|
+
/** Human-readable descriptor, e.g. "Moderate". Empty string when scale is 0. */
|
|
16
|
+
text: string;
|
|
17
|
+
}
|
|
18
|
+
/** NOAA storm scales for one forecast period. */
|
|
19
|
+
export interface NoaaScalesPeriod {
|
|
20
|
+
/** Date string for this period, e.g. "2026-06-04". */
|
|
21
|
+
date: string;
|
|
22
|
+
/** Geomagnetic storm scale (G). */
|
|
23
|
+
G: NoaaScaleEntry;
|
|
24
|
+
/** Radio blackout scale (R). */
|
|
25
|
+
R: NoaaScaleEntry;
|
|
26
|
+
/** Solar radiation storm scale (S). */
|
|
27
|
+
S: NoaaScaleEntry;
|
|
28
|
+
/** UTC time stamp, e.g. "15:00:00". */
|
|
29
|
+
time: string;
|
|
30
|
+
}
|
|
31
|
+
/** All NOAA storm scale periods from the feed. */
|
|
32
|
+
export interface NoaaScalesData {
|
|
33
|
+
/** 3-day forecast array (keys "1", "2", "3"). */
|
|
34
|
+
forecast: NoaaScalesPeriod[];
|
|
35
|
+
/** Today's observed/current values (key "0"). */
|
|
36
|
+
today: NoaaScalesPeriod;
|
|
37
|
+
}
|
|
38
|
+
/** One observed Kp index reading. */
|
|
39
|
+
export interface KpObservation {
|
|
40
|
+
/** Running mean of geomagnetic activity. */
|
|
41
|
+
aRunning: number | null;
|
|
42
|
+
/** Aurora latitude guidance for this Kp level, e.g. "Aurora possible to ~55°". */
|
|
43
|
+
auroraLatitude: string;
|
|
44
|
+
/** Corresponding NOAA G-scale level (0–5). */
|
|
45
|
+
gScale: number;
|
|
46
|
+
/** Kp value 0–9. */
|
|
47
|
+
kp: number;
|
|
48
|
+
/** Number of stations contributing. */
|
|
49
|
+
stationCount: number | null;
|
|
50
|
+
/** ISO 8601 time tag for the 3-hour interval. */
|
|
51
|
+
timeTag: string;
|
|
52
|
+
}
|
|
53
|
+
/** One Kp forecast point. */
|
|
54
|
+
export interface KpForecast {
|
|
55
|
+
/** Forecasted Kp value. */
|
|
56
|
+
kp: number;
|
|
57
|
+
/** NOAA scale string, e.g. "G1", or null when not available. */
|
|
58
|
+
noaaScale: string | null;
|
|
59
|
+
/** "observed" or "predicted". */
|
|
60
|
+
observed: string;
|
|
61
|
+
/** ISO 8601 time tag. */
|
|
62
|
+
timeTag: string;
|
|
63
|
+
}
|
|
64
|
+
/** OVATION aurora forecast metadata. */
|
|
65
|
+
export interface AuroraForecastMeta {
|
|
66
|
+
/** Forecast valid time, e.g. "2026-06-04T15:02:00Z". */
|
|
67
|
+
forecastTime: string;
|
|
68
|
+
/** Observation time, e.g. "2026-06-04T14:32:00Z". */
|
|
69
|
+
observationTime: string;
|
|
70
|
+
}
|
|
71
|
+
/** Aurora probability for a single grid cell. */
|
|
72
|
+
export interface AuroraGridPoint {
|
|
73
|
+
/** Aurora probability 0–100. */
|
|
74
|
+
auroraPercent: number;
|
|
75
|
+
/** Latitude −90–90. */
|
|
76
|
+
latitude: number;
|
|
77
|
+
/** Longitude −180–180. */
|
|
78
|
+
longitude: number;
|
|
79
|
+
}
|
|
80
|
+
/** Full OVATION aurora forecast. */
|
|
81
|
+
export interface AuroraForecastData {
|
|
82
|
+
/** Grid of aurora probability points (1° resolution). */
|
|
83
|
+
grid: AuroraGridPoint[];
|
|
84
|
+
meta: AuroraForecastMeta;
|
|
85
|
+
}
|
|
86
|
+
/** One real-time plasma measurement from DSCOVR. */
|
|
87
|
+
export interface SolarWindPlasma {
|
|
88
|
+
/** Proton density in particles/cm³. Null when the sensor returns -9999. */
|
|
89
|
+
densityPerCm3: number | null;
|
|
90
|
+
/** Solar wind speed in km/s. Null when missing. */
|
|
91
|
+
speedKmS: number | null;
|
|
92
|
+
/** Proton temperature in Kelvin. Null when missing. */
|
|
93
|
+
temperatureK: number | null;
|
|
94
|
+
/** ISO 8601 time tag. */
|
|
95
|
+
timeTag: string;
|
|
96
|
+
}
|
|
97
|
+
/** One real-time magnetic field measurement from DSCOVR. */
|
|
98
|
+
export interface SolarWindMag {
|
|
99
|
+
/** Total field magnitude Bt (nT). Null when missing. */
|
|
100
|
+
bt: number | null;
|
|
101
|
+
/** Bx component in GSM coordinates (nT). Null when missing. */
|
|
102
|
+
bxGsm: number | null;
|
|
103
|
+
/** By component in GSM coordinates (nT). Null when missing. */
|
|
104
|
+
byGsm: number | null;
|
|
105
|
+
/** Bz component in GSM coordinates (nT). Null when missing. */
|
|
106
|
+
bzGsm: number | null;
|
|
107
|
+
/** ISO 8601 time tag. */
|
|
108
|
+
timeTag: string;
|
|
109
|
+
}
|
|
110
|
+
/** One GOES X-ray flux reading. */
|
|
111
|
+
export interface XrayFlux {
|
|
112
|
+
/** Energy band descriptor. */
|
|
113
|
+
energy: string;
|
|
114
|
+
/** Flux in W/m² (the "0.1-0.8nm" long channel). */
|
|
115
|
+
fluxWm2: number;
|
|
116
|
+
/** Satellite number. */
|
|
117
|
+
satellite: number;
|
|
118
|
+
/** ISO 8601 time tag. */
|
|
119
|
+
timeTag: string;
|
|
120
|
+
}
|
|
121
|
+
/** Active solar region (NOAA active region). */
|
|
122
|
+
export interface SolarRegion {
|
|
123
|
+
/** C-class flare probability (%). */
|
|
124
|
+
cFlareProbability: number;
|
|
125
|
+
/** Heliographic latitude, e.g. "N17". */
|
|
126
|
+
latitude: string;
|
|
127
|
+
/** Heliographic location, e.g. "N17E47". */
|
|
128
|
+
location: string;
|
|
129
|
+
/** Magnetic class. */
|
|
130
|
+
magClass: string;
|
|
131
|
+
/** M-class flare probability (%). */
|
|
132
|
+
mFlareProbability: number;
|
|
133
|
+
/** Number of sunspots. */
|
|
134
|
+
numberSpots: number;
|
|
135
|
+
/** Observation date. */
|
|
136
|
+
observedDate: string;
|
|
137
|
+
/** Proton event probability (%). */
|
|
138
|
+
protonProbability: number;
|
|
139
|
+
/** NOAA active region number. */
|
|
140
|
+
region: number;
|
|
141
|
+
/** Spot classification. */
|
|
142
|
+
spotClass: string;
|
|
143
|
+
/** X-class flare probability (%). */
|
|
144
|
+
xFlareProbability: number;
|
|
145
|
+
}
|
|
146
|
+
/** Flare probability forecast for one day. */
|
|
147
|
+
export interface SolarProbabilities {
|
|
148
|
+
/** Probability of a C-class flare (%). */
|
|
149
|
+
cClass1Day: number;
|
|
150
|
+
/** Forecast date. */
|
|
151
|
+
date: string;
|
|
152
|
+
/** Probability of an M-class flare (%). */
|
|
153
|
+
mClass1Day: number;
|
|
154
|
+
/** Probability of ≥10 MeV proton event (%). */
|
|
155
|
+
protons1Day: number;
|
|
156
|
+
/** Probability of an X-class flare (%). */
|
|
157
|
+
xClass1Day: number;
|
|
158
|
+
}
|
|
159
|
+
/** One integral proton flux reading from GOES. */
|
|
160
|
+
export interface ProtonFlux {
|
|
161
|
+
/** Energy channel, e.g. ">=10 MeV". */
|
|
162
|
+
energy: string;
|
|
163
|
+
/** Flux in particle flux units (pfu). */
|
|
164
|
+
fluxPfu: number;
|
|
165
|
+
/** Satellite number. */
|
|
166
|
+
satellite: number;
|
|
167
|
+
/** ISO 8601 time tag. */
|
|
168
|
+
timeTag: string;
|
|
169
|
+
}
|
|
170
|
+
/** Parsed SWPC alert/watch/warning. */
|
|
171
|
+
export interface SpaceWeatherAlert {
|
|
172
|
+
/** ISO 8601 issue datetime. */
|
|
173
|
+
issueDatetime: string;
|
|
174
|
+
/** Severity level (numeric suffix from product code, 0 when not applicable). */
|
|
175
|
+
level: number;
|
|
176
|
+
/** Full plain-text message body. */
|
|
177
|
+
message: string;
|
|
178
|
+
/** Short parsed phenomenon, e.g. "Geomagnetic", "Radio Blackout", "Solar Radiation". */
|
|
179
|
+
phenomenon: string;
|
|
180
|
+
/** Product code, e.g. "WARK04", "ALTK07", "SUMS". */
|
|
181
|
+
productId: string;
|
|
182
|
+
/** Product type derived from the code prefix. */
|
|
183
|
+
productType: 'Warning' | 'Watch' | 'Alert' | 'Summary' | 'Other';
|
|
184
|
+
/** Valid from (parsed from message), null if not found. */
|
|
185
|
+
validFrom: string | null;
|
|
186
|
+
/** Valid to (parsed from message), null if not found. */
|
|
187
|
+
validTo: string | null;
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/space-weather/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,4EAA4E;AAC5E,MAAM,WAAW,cAAc;IAC7B,sFAAsF;IACtF,QAAQ,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IAC1B,qEAAqE;IACrE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,qEAAqE;IACrE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;CACd;AAED,iDAAiD;AACjD,MAAM,WAAW,gBAAgB;IAC/B,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,CAAC,EAAE,cAAc,CAAC;IAClB,gCAAgC;IAChC,CAAC,EAAE,cAAc,CAAC;IAClB,uCAAuC;IACvC,CAAC,EAAE,cAAc,CAAC;IAClB,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,kDAAkD;AAClD,MAAM,WAAW,cAAc;IAC7B,iDAAiD;IACjD,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,iDAAiD;IACjD,KAAK,EAAE,gBAA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EAAE,MAAM,CAAC;IACnB,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,kDAAkD;AAClD,MAAM,WAAW,UAAU;IACzB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,wBAAwB;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAC;CACjB;AAID,uCAAuC;AACvC,MAAM,WAAW,iBAAiB;IAChC,+BAA+B;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,wFAAwF;IACxF,UAAU,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,WAAW,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;IACjE,2DAA2D;IAC3D,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,yDAAyD;IACzD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/services/space-weather/types.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|