@cyanheads/noaa-spaceweather-mcp-server 0.4.0 → 0.5.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/AGENTS.md +5 -5
- package/CLAUDE.md +5 -5
- package/README.md +6 -6
- package/changelog/0.5.x/0.5.0.md +28 -0
- package/changelog/template.md +10 -3
- package/dist/mcp-server/tools/definitions/get-alerts.tool.d.ts +1 -0
- package/dist/mcp-server/tools/definitions/get-alerts.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-alerts.tool.js +54 -20
- package/dist/mcp-server/tools/definitions/get-alerts.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-conditions.tool.d.ts +13 -13
- package/dist/mcp-server/tools/definitions/get-conditions.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-conditions.tool.js +67 -83
- package/dist/mcp-server/tools/definitions/get-conditions.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/index.d.ts +14 -13
- package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
- package/dist/services/space-weather/space-weather-service.d.ts +1 -1
- package/dist/services/space-weather/space-weather-service.d.ts.map +1 -1
- package/dist/services/space-weather/space-weather-service.js +33 -27
- package/dist/services/space-weather/space-weather-service.js.map +1 -1
- package/dist/services/space-weather/types.d.ts +10 -15
- package/dist/services/space-weather/types.d.ts.map +1 -1
- package/package.json +9 -9
- package/server.json +3 -3
- package/skills/noaa-spaceweather-guide/SKILL.md +2 -2
package/AGENTS.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** noaa-spaceweather-mcp-server
|
|
4
|
-
**Version:** 0.
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.
|
|
6
|
-
**Engines:** Bun ≥1.4.
|
|
4
|
+
**Version:** 0.5.0
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.22`
|
|
6
|
+
**Engines:** Bun ≥1.4.4, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` ^2.4.0 (protocol revisions 2026-07-28 and 2025-*)
|
|
8
8
|
**Zod:** ^4.6.7
|
|
9
9
|
|
|
@@ -50,7 +50,7 @@ Tailor suggestions to what's actually missing or stale — don't recite the full
|
|
|
50
50
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
51
51
|
|
|
52
52
|
export const getConditions = tool('noaa_spaceweather_get_conditions', {
|
|
53
|
-
description: 'Current space-weather snapshot: NOAA R/S/G storm scales (
|
|
53
|
+
description: 'Current space-weather snapshot: NOAA R/S/G storm scales (latest, rolling 24-hour maxima, and 3-day forecast), latest Kp index, and a plain-language status summary.',
|
|
54
54
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
55
55
|
input: z.object({}),
|
|
56
56
|
output: z.object({
|
|
@@ -296,7 +296,7 @@ When you complete a skill's checklist, check the boxes and add a completion time
|
|
|
296
296
|
|
|
297
297
|
## Bundling
|
|
298
298
|
|
|
299
|
-
`npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. `mcpb pack` reads `.mcpbignore`, not `.gitignore`, so every root path the bundle must not ship — source, tests, docs, caches, logs, agent docs, plugin manifests, gitignored local files — needs a root-anchored line there (`/docs/`, never `docs/`, which also strips `node_modules/*/docs/`); `lint:packaging` names each missing or unanchored line. Root `skills/` ships on purpose. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips four classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs (`framework-skills/`, `skills/`, `.claude/`, `.agents
|
|
299
|
+
`npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. `mcpb pack` reads `.mcpbignore`, not `.gitignore`, so every root path the bundle must not ship — source, tests, docs, caches, logs, agent docs, plugin manifests, gitignored local files — needs a root-anchored line there (`/docs/`, never `docs/`, which also strips `node_modules/*/docs/`); `lint:packaging` names each missing or unanchored line. Root `skills/` ships on purpose. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips four classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs (`framework-skills/`, `skills/`, `.claude/`, `.agents/`, `AGENTS.md`, and `CLAUDE.md` at a package root, and `SKILL.md` anywhere — a deeper `skills/`, such as the MCP SDK's `dist/ext/skills/`, is runtime code and stays); platform-specific native bindings, which would otherwise lock the bundle to the platform it was packed on; node-gyp build output beside a `binding.gyp` (`config.gypi`, Makefiles, `obj.target/`, `.deps/`, object files and debug symbols), which records the packing machine's paths — compiled `*.node` addons stay; and build-only package files — the framework's `changelog/`, `scripts/`, `templates/`, and config bases (`biome.json`, `vitest.config.base.mjs`, `config/tsconfig.base.json`), and `better-sqlite3`'s `deps/` and `src/` C sources. A server using DataCanvas therefore ships a portable bundle without the DuckDB native — `@duckdb/node-api` is an optional peer loaded lazily, so canvas tools report an actionable install hint and every other tool works normally. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
|
|
300
300
|
|
|
301
301
|
**Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match, that every `user_config` option is wired into `mcp_config.env` as `"X": "${user_config.X}"` (the host substitutes nothing else — `"${X}"` reaches the server as that literal string), and that an optional string option carries `"default": ""`.
|
|
302
302
|
|
package/CLAUDE.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** noaa-spaceweather-mcp-server
|
|
4
|
-
**Version:** 0.
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.
|
|
6
|
-
**Engines:** Bun ≥1.4.
|
|
4
|
+
**Version:** 0.5.0
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.22`
|
|
6
|
+
**Engines:** Bun ≥1.4.4, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` ^2.4.0 (protocol revisions 2026-07-28 and 2025-*)
|
|
8
8
|
**Zod:** ^4.6.7
|
|
9
9
|
|
|
@@ -50,7 +50,7 @@ Tailor suggestions to what's actually missing or stale — don't recite the full
|
|
|
50
50
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
51
51
|
|
|
52
52
|
export const getConditions = tool('noaa_spaceweather_get_conditions', {
|
|
53
|
-
description: 'Current space-weather snapshot: NOAA R/S/G storm scales (
|
|
53
|
+
description: 'Current space-weather snapshot: NOAA R/S/G storm scales (latest, rolling 24-hour maxima, and 3-day forecast), latest Kp index, and a plain-language status summary.',
|
|
54
54
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
55
55
|
input: z.object({}),
|
|
56
56
|
output: z.object({
|
|
@@ -296,7 +296,7 @@ When you complete a skill's checklist, check the boxes and add a completion time
|
|
|
296
296
|
|
|
297
297
|
## Bundling
|
|
298
298
|
|
|
299
|
-
`npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. `mcpb pack` reads `.mcpbignore`, not `.gitignore`, so every root path the bundle must not ship — source, tests, docs, caches, logs, agent docs, plugin manifests, gitignored local files — needs a root-anchored line there (`/docs/`, never `docs/`, which also strips `node_modules/*/docs/`); `lint:packaging` names each missing or unanchored line. Root `skills/` ships on purpose. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips four classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs (`framework-skills/`, `skills/`, `.claude/`, `.agents
|
|
299
|
+
`npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. `mcpb pack` reads `.mcpbignore`, not `.gitignore`, so every root path the bundle must not ship — source, tests, docs, caches, logs, agent docs, plugin manifests, gitignored local files — needs a root-anchored line there (`/docs/`, never `docs/`, which also strips `node_modules/*/docs/`); `lint:packaging` names each missing or unanchored line. Root `skills/` ships on purpose. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips four classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs (`framework-skills/`, `skills/`, `.claude/`, `.agents/`, `AGENTS.md`, and `CLAUDE.md` at a package root, and `SKILL.md` anywhere — a deeper `skills/`, such as the MCP SDK's `dist/ext/skills/`, is runtime code and stays); platform-specific native bindings, which would otherwise lock the bundle to the platform it was packed on; node-gyp build output beside a `binding.gyp` (`config.gypi`, Makefiles, `obj.target/`, `.deps/`, object files and debug symbols), which records the packing machine's paths — compiled `*.node` addons stay; and build-only package files — the framework's `changelog/`, `scripts/`, `templates/`, and config bases (`biome.json`, `vitest.config.base.mjs`, `config/tsconfig.base.json`), and `better-sqlite3`'s `deps/` and `src/` C sources. A server using DataCanvas therefore ships a portable bundle without the DuckDB native — `@duckdb/node-api` is an optional peer loaded lazily, so canvas tools report an actionable install hint and every other tool works normally. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
|
|
300
300
|
|
|
301
301
|
**Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match, that every `user_config` option is wired into `mcp_config.env` as `"X": "${user_config.X}"` (the host substitutes nothing else — `"${X}"` reaches the server as that literal string), and that an optional string option carries `"default": ""`.
|
|
302
302
|
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<div align="center">
|
|
9
9
|
|
|
10
|
-
[](./CHANGELOG.md) [](./LICENSE) [](https://github.com/users/cyanheads/packages/container/package/noaa-spaceweather-mcp-server) [](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/@cyanheads/noaa-spaceweather-mcp-server) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -35,7 +35,7 @@ Space weather from NOAA's Space Weather Prediction Center: geomagnetic storms, K
|
|
|
35
35
|
|
|
36
36
|
| Tool | Description |
|
|
37
37
|
|:-----|:------------|
|
|
38
|
-
| `noaa_spaceweather_get_conditions` |
|
|
38
|
+
| `noaa_spaceweather_get_conditions` | Latest R/S/G observations, rolling 24-hour maxima, three-day forecast, latest Kp, and an optional SWPC forecast discussion |
|
|
39
39
|
| `noaa_spaceweather_get_kp_index` | Planetary K-index (0–9) — recent observed 3-hour values with G-scale equivalents and aurora-latitude guidance, plus 3-day forecast |
|
|
40
40
|
| `noaa_spaceweather_get_aurora_forecast` | OVATION model aurora forecast: global probability grid, optional local lookup by coordinates with a daylight-aware go/no-go verdict and a poleward horizon reading |
|
|
41
41
|
| `noaa_spaceweather_get_solar_wind` | Real-time solar wind from the active L1 spacecraft: speed, proton density, temperature, and the critical Bz component with the window's most southward reading — explains why current geomagnetic conditions exist |
|
|
@@ -47,7 +47,7 @@ Space weather from NOAA's Space Weather Prediction Center: geomagnetic storms, K
|
|
|
47
47
|
### `noaa_spaceweather_get_conditions` <sub>tool</sub>
|
|
48
48
|
|
|
49
49
|
- `include_discussion` (bool, default false) is the only input; one call composes the `noaa-scales.json` and `noaa-planetary-k-index.json` feeds, plus the `discussion.txt` product when the discussion is requested
|
|
50
|
-
-
|
|
50
|
+
- `today` holds the latest observed R/S/G levels. `yesterday` holds the rolling 24-hour observed maxima with SWPC’s date stamp, or null when unavailable. An unissued latest level or forecast G has null `scale`, `text`, and `label`. Forecast R/S can carry probabilities. The three-day forecast starts on the current UTC date. The latest Kp comes with its G-scale equivalent and aurora-latitude guidance.
|
|
51
51
|
- With `include_discussion`, the forecaster-written Forecast Discussion split into its topic sections (Solar Activity, Energetic Particle, Solar Wind, Geospace), each with its 24-hour summary and 3-day forecast text
|
|
52
52
|
|
|
53
53
|
---
|
|
@@ -85,7 +85,7 @@ Space weather from NOAA's Space Weather Prediction Center: geomagnetic storms, K
|
|
|
85
85
|
|
|
86
86
|
### `noaa_spaceweather_get_alerts` <sub>tool</sub>
|
|
87
87
|
|
|
88
|
-
- `active_only` (default true)
|
|
88
|
+
- `active_only` (default true) returns in-force Warnings, Watches, and Alerts. It drops cancellations and their targets, superseded Watches, older links in explicit Alert continuation chains, Summaries, and expired products. `max_age_hours` (1–720, default 48) bounds the lookback. An active product with a future validity end can survive that cutoff. Set `active_only: false` for the complete history within the window.
|
|
89
89
|
- Each record carries product type, NOAA scale and level (0 means "no scale stated," not zero severity), serial number, parsed validity window, `cancelled`, and full message text. Under `active_only` the response also counts what it excluded, by reason, so an empty result reads as "quiet" or "everything was filtered"
|
|
90
90
|
|
|
91
91
|
---
|
|
@@ -153,7 +153,7 @@ No API key is needed — every SWPC feed is public. For Docker or a source build
|
|
|
153
153
|
| `MCP_SESSION_MODE` | HTTP session mode. This project explicitly uses `stateless`; `auto` resolves to `stateful`. | `stateless` |
|
|
154
154
|
| `MCP_AUTH_MODE` | Auth mode: `none`, `jwt`, or `oauth`. | `none` |
|
|
155
155
|
| `MCP_LOG_LEVEL` | Log level (RFC 5424). | `info` |
|
|
156
|
-
| `LOGS_DIR` | Directory for log files (Node.js only). | `<
|
|
156
|
+
| `LOGS_DIR` | Directory for log files (Node.js only). Relative paths resolve from the server package. | `<server-package>/logs` |
|
|
157
157
|
| `LOG_TOOL_FAILURE_PAYLOADS` | Log each failed tool call's arguments and result, redacted by key name and capped at `LOG_TOOL_FAILURE_PAYLOAD_MAX_BYTES` (default `16384`). A secret inside a free-form value is not redacted. | `false` |
|
|
158
158
|
| `STORAGE_PROVIDER_TYPE` | Storage backend. | `in-memory` |
|
|
159
159
|
| `OTEL_ENABLED` | Enable [OpenTelemetry instrumentation](https://github.com/cyanheads/mcp-ts-core/tree/main/docs/telemetry). | `false` |
|
|
@@ -166,7 +166,7 @@ No domain-specific API keys are required. See [`.env.example`](./.env.example) f
|
|
|
166
166
|
|
|
167
167
|
### Local development
|
|
168
168
|
|
|
169
|
-
Requires [Bun v1.4.
|
|
169
|
+
Requires [Bun v1.4.4](https://bun.sh/) or higher (or Node.js v24+).
|
|
170
170
|
|
|
171
171
|
- **Clone and install:**
|
|
172
172
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Reports unissued NOAA scale levels and resolves continued alerts in the active view."
|
|
3
|
+
breaking: true
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.5.0 — 2026-11-21
|
|
8
|
+
|
|
9
|
+
## Changed
|
|
10
|
+
|
|
11
|
+
- **Development and packaging tooling**: sync framework skills and scripts, exclude the Vitest cache from MCPB bundles, and document the JWT audience and issuer settings.
|
|
12
|
+
|
|
13
|
+
## Fixed
|
|
14
|
+
|
|
15
|
+
- **Unissued NOAA scale levels** ([#47](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/47)). Breaking output change: clients must accept null for `scale`, `text`, and `label` in `today.G`, `today.R`, `today.S`, and `forecast[].G` when SWPC issues no level. Known values and Kp remain available.
|
|
16
|
+
- **Observed periods** ([#49](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/49)). The existing `today` and `yesterday` keys represent latest observations and rolling 24-hour observed maxima. `yesterday.date` carries SWPC’s reported date stamp.
|
|
17
|
+
- **Continued alerts** ([#50](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/50)). Active results exclude predecessors uniquely identified by a newer continuation and count them under `exclusions.continued`. History keeps all records in the requested window.
|
|
18
|
+
|
|
19
|
+
## Dependencies
|
|
20
|
+
|
|
21
|
+
- `@cyanheads/mcp-ts-core` ^0.13.18 → ^0.13.22
|
|
22
|
+
- Bun minimum >=1.4.0 → >=1.4.4
|
|
23
|
+
- `@biomejs/biome` ^2.6.3 → ^2.6.8 (dev)
|
|
24
|
+
- `@types/node` ^26.6.5 → ^26.6.6 (dev)
|
|
25
|
+
- `@vitest/coverage-istanbul` ^5.0.5 → ^5.1.1 (dev)
|
|
26
|
+
- `ignore` ^7.0.14 → ^7.0.16 (dev)
|
|
27
|
+
- `tsc-alias` ^1.9.9 → ^1.9.10 (dev)
|
|
28
|
+
- `vitest` ^5.0.5 → ^5.1.1 (dev, uses threads on Bun)
|
package/changelog/template.md
CHANGED
|
@@ -116,14 +116,21 @@ security: false
|
|
|
116
116
|
resolves to whatever real item already owns 42, and timeline previews pull
|
|
117
117
|
in that unrelated item's metadata.
|
|
118
118
|
|
|
119
|
+
Outside reporters: when the issue or PR came from outside the project
|
|
120
|
+
(`git-wrapup` step 5 says how to tell), thank its author in the same
|
|
121
|
+
parenthetical, profile linked by full URL for the same reason:
|
|
122
|
+
|
|
123
|
+
([#38](https://github.com/cyanheads/mcp-ts-core/issues/38), thanks [@octocat](https://github.com/octocat)!)
|
|
124
|
+
|
|
119
125
|
TAG ANNOTATIONS — the annotated tag body renders as the GitHub Release body
|
|
120
126
|
via `gh release create --notes-from-tag`. It is a condensed digest of this
|
|
121
127
|
entry, never a copy, and its format is owned by the `release-and-publish`
|
|
122
128
|
skill (step 4, "Create the annotated tag"): a short subject line without the
|
|
123
129
|
version, flat headline bullets — no Keep-a-Changelog section headers, no
|
|
124
|
-
gates line — at most one deps line, issue backlinks
|
|
125
|
-
last. In release-PR mode the `git-wrapup`
|
|
126
|
-
PR body's `## Changes` and the tag copies
|
|
130
|
+
gates line — at most one deps line, issue backlinks with any outside-reporter
|
|
131
|
+
thanks, and the changelog link last. In release-PR mode the `git-wrapup`
|
|
132
|
+
skill authors those bullets as the PR body's `## Changes` and the tag copies
|
|
133
|
+
them.
|
|
127
134
|
-->
|
|
128
135
|
|
|
129
136
|
## Added
|
|
@@ -55,6 +55,7 @@ export declare const getAlerts: import("@cyanheads/mcp-ts-core").ToolDefinition<
|
|
|
55
55
|
cancellationRecord: z.ZodNumber;
|
|
56
56
|
cancelledBySerial: z.ZodNumber;
|
|
57
57
|
superseded: z.ZodNumber;
|
|
58
|
+
continued: z.ZodNumber;
|
|
58
59
|
validityElapsed: z.ZodNumber;
|
|
59
60
|
}, z.core.$strip>>;
|
|
60
61
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-alerts.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-alerts.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"get-alerts.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-alerts.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAqPjE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiOpB,CAAC"}
|
|
@@ -14,7 +14,7 @@ import { getSpaceWeatherService } from '../../../services/space-weather/space-we
|
|
|
14
14
|
* The window leads because it decides which records were candidates at all, and product
|
|
15
15
|
* type follows because a Summary is never in force whatever its body says. Then the
|
|
16
16
|
* reasons that name a *replacement* — this record is itself a cancellation, a later
|
|
17
|
-
* record cancelled it, a later record superseded it — and only last the generic
|
|
17
|
+
* record cancelled it, a later record superseded or continued it — and only last the generic
|
|
18
18
|
* "its stated end passed".
|
|
19
19
|
*
|
|
20
20
|
* That ordering is deliberate: a superseded Watch has usually outlived its own forecast
|
|
@@ -28,6 +28,7 @@ const EXCLUSION_REASONS = [
|
|
|
28
28
|
'cancellationRecord',
|
|
29
29
|
'cancelledBySerial',
|
|
30
30
|
'superseded',
|
|
31
|
+
'continued',
|
|
31
32
|
'validityElapsed',
|
|
32
33
|
];
|
|
33
34
|
/** Product types that can be in force; everything else is informational or unparsed. */
|
|
@@ -123,10 +124,47 @@ function resolveSuperseded(all) {
|
|
|
123
124
|
const newest = carriers.reduce((best, current) => issuedMs(current) > issuedMs(best) ? current : best);
|
|
124
125
|
return new Set(carriers.filter(({ index }) => index !== newest.index).map(({ index }) => index));
|
|
125
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Resolve explicit same-code continuation links across the feed. The two earliest
|
|
129
|
+
* issue times per serial distinguish a unique earlier record from an ambiguous pair
|
|
130
|
+
* regardless of feed order. A newer record retaining the serial does not make an
|
|
131
|
+
* earlier link ambiguous.
|
|
132
|
+
*/
|
|
133
|
+
function resolveContinued(all) {
|
|
134
|
+
const alerts = all.flatMap((alert, index) => {
|
|
135
|
+
if (alert.productType !== 'Alert' || alert.cancelled)
|
|
136
|
+
return [];
|
|
137
|
+
const issuedMs = Date.parse(alert.issueDatetime);
|
|
138
|
+
return Number.isFinite(issuedMs) ? [{ alert, index, issuedMs }] : [];
|
|
139
|
+
});
|
|
140
|
+
const bySerial = new Map();
|
|
141
|
+
for (const { alert, index, issuedMs } of alerts) {
|
|
142
|
+
if (alert.serialNumber === null)
|
|
143
|
+
continue;
|
|
144
|
+
const key = JSON.stringify([alert.messageCode, alert.serialNumber]);
|
|
145
|
+
const existing = bySerial.get(key);
|
|
146
|
+
if (!existing || issuedMs < existing.firstMs) {
|
|
147
|
+
bySerial.set(key, { index, firstMs: issuedMs, secondMs: existing?.firstMs ?? Infinity });
|
|
148
|
+
}
|
|
149
|
+
else if (issuedMs < existing.secondMs) {
|
|
150
|
+
existing.secondMs = issuedMs;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
const continued = new Set();
|
|
154
|
+
for (const { alert, issuedMs } of alerts) {
|
|
155
|
+
if (alert.continuesSerialNumber === null)
|
|
156
|
+
continue;
|
|
157
|
+
const target = bySerial.get(JSON.stringify([alert.messageCode, alert.continuesSerialNumber]));
|
|
158
|
+
if (target && target.firstMs < issuedMs && target.secondMs >= issuedMs) {
|
|
159
|
+
continued.add(target.index);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return continued;
|
|
163
|
+
}
|
|
126
164
|
/**
|
|
127
165
|
* The first reason a record is not in force, or null when it is. A product is in force
|
|
128
166
|
* until something in the feed says otherwise — a stated end that has passed, a
|
|
129
|
-
* cancellation naming it,
|
|
167
|
+
* cancellation naming it, a superseding Watch, or an explicitly linked continuation.
|
|
130
168
|
*/
|
|
131
169
|
function exclusionReason(alert, index, ctx) {
|
|
132
170
|
const end = endMs(alert);
|
|
@@ -150,6 +188,8 @@ function exclusionReason(alert, index, ctx) {
|
|
|
150
188
|
return 'cancelledBySerial';
|
|
151
189
|
if (ctx.superseded.has(index))
|
|
152
190
|
return 'superseded';
|
|
191
|
+
if (ctx.continued.has(index))
|
|
192
|
+
return 'continued';
|
|
153
193
|
if (end !== null && end < ctx.nowMs)
|
|
154
194
|
return 'validityElapsed';
|
|
155
195
|
return null;
|
|
@@ -202,7 +242,7 @@ export const getAlerts = tool('noaa_spaceweather_get_alerts', {
|
|
|
202
242
|
active_only: z
|
|
203
243
|
.boolean()
|
|
204
244
|
.default(true)
|
|
205
|
-
.describe('When true (default), return only in-force Warnings, Watches, and Alerts. Excluded: Summaries and unrecognized products; products whose validity end has passed; cancellation notices;
|
|
245
|
+
.describe('When true (default), return only in-force Warnings, Watches, and Alerts. Excluded: Summaries and unrecognized products; products whose validity end has passed; cancellation notices; products a later cancellation names by serial; all but the newest record carrying the "THIS SUPERSEDES ANY/ALL PRIOR WATCHES IN EFFECT" line; and Alerts replaced by explicitly linked continuations. Counts per reason ride in the exclusions enrichment field. Set false to return every product in the window, cancellations included (flagged by the cancelled field).'),
|
|
206
246
|
max_age_hours: z
|
|
207
247
|
.number()
|
|
208
248
|
.min(1)
|
|
@@ -248,16 +288,15 @@ export const getAlerts = tool('noaa_spaceweather_get_alerts', {
|
|
|
248
288
|
const nowMs = Date.now();
|
|
249
289
|
const cutoffMs = nowMs - input.max_age_hours * 60 * 60 * 1000;
|
|
250
290
|
let filtered;
|
|
251
|
-
let excluded;
|
|
252
291
|
if (input.active_only) {
|
|
253
|
-
//
|
|
254
|
-
//
|
|
255
|
-
// lookback still happened.
|
|
292
|
+
// A cancellation, supersession, or continuation outside the caller's window
|
|
293
|
+
// can still replace a record that passed the lookback or validity check.
|
|
256
294
|
const filterCtx = {
|
|
257
295
|
nowMs,
|
|
258
296
|
cutoffMs,
|
|
259
297
|
cancelledBySerial: resolveCancelledBySerial(all),
|
|
260
298
|
superseded: resolveSuperseded(all),
|
|
299
|
+
continued: resolveContinued(all),
|
|
261
300
|
};
|
|
262
301
|
const counts = Object.fromEntries(EXCLUSION_REASONS.map((r) => [r, 0]));
|
|
263
302
|
filtered = [];
|
|
@@ -268,18 +307,13 @@ export const getAlerts = tool('noaa_spaceweather_get_alerts', {
|
|
|
268
307
|
else
|
|
269
308
|
filtered.push(alert);
|
|
270
309
|
});
|
|
271
|
-
// Zeros across the board would tell a caller nothing it can act on; the window
|
|
272
|
-
// echo below already says filtering was applied.
|
|
273
|
-
if (filtered.length < all.length)
|
|
274
|
-
excluded = counts;
|
|
275
310
|
ctx.enrich({
|
|
276
311
|
appliedWindowHours: input.max_age_hours,
|
|
277
312
|
appliedCutoff: new Date(cutoffMs).toISOString(),
|
|
278
313
|
});
|
|
279
|
-
//
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
ctx.enrich({ exclusions: excluded });
|
|
314
|
+
// The window echo already discloses filtering when every record passes.
|
|
315
|
+
if (filtered.length < all.length)
|
|
316
|
+
ctx.enrich({ exclusions: counts });
|
|
283
317
|
}
|
|
284
318
|
else {
|
|
285
319
|
// A literal history window — nothing is filtered by reason, so no counts.
|
|
@@ -288,12 +322,9 @@ export const getAlerts = tool('noaa_spaceweather_get_alerts', {
|
|
|
288
322
|
if (filtered.length === 0) {
|
|
289
323
|
// ctx.enrich.notice is last-wins, so the whole empty-state message is composed
|
|
290
324
|
// once here rather than appended to across branches.
|
|
291
|
-
const excludedCount = excluded
|
|
292
|
-
? Object.values(excluded).reduce((sum, n) => sum + n, 0)
|
|
293
|
-
: undefined;
|
|
294
325
|
ctx.enrich.notice(input.active_only
|
|
295
|
-
?
|
|
296
|
-
? `No active alerts, watches, or warnings — all ${
|
|
326
|
+
? all.length > 0
|
|
327
|
+
? `No active alerts, watches, or warnings — all ${all.length} products in the feed were excluded; see exclusions for the breakdown, or set active_only=false to see them.`
|
|
297
328
|
: 'No active alerts, watches, or warnings. Set active_only=false to include summaries.'
|
|
298
329
|
: 'No space weather products issued in the requested window.');
|
|
299
330
|
}
|
|
@@ -334,6 +365,9 @@ export const getAlerts = tool('noaa_spaceweather_get_alerts', {
|
|
|
334
365
|
cancellationRecord: z.number().describe('Cancellation notices.'),
|
|
335
366
|
cancelledBySerial: z.number().describe('Named by a later cancellation.'),
|
|
336
367
|
superseded: z.number().describe('Replaced by a newer superseding Watch.'),
|
|
368
|
+
continued: z
|
|
369
|
+
.number()
|
|
370
|
+
.describe('Replaced by an explicitly linked later Alert continuation.'),
|
|
337
371
|
validityElapsed: z.number().describe('Validity end already passed.'),
|
|
338
372
|
})
|
|
339
373
|
.optional()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-alerts.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-alerts.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OA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,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"get-alerts.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-alerts.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAG3F;;;;;;;;;;;;;;;GAeG;AACH,MAAM,iBAAiB,GAAG;IACxB,SAAS;IACT,aAAa;IACb,oBAAoB;IACpB,mBAAmB;IACnB,YAAY;IACZ,WAAW;IACX,iBAAiB;CACT,CAAC;AAIX,wFAAwF;AACxF,MAAM,cAAc,GAAkD,IAAI,GAAG,CAAC;IAC5E,SAAS;IACT,OAAO;IACP,OAAO;CACR,CAAC,CAAC;AAEH;;;;;GAKG;AACH,SAAS,KAAK,CAAC,KAAwB;IACrC,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACxC,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACrC,OAAO,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;AACtC,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,SAAS,wBAAwB,CAAC,GAAiC;IACjE,MAAM,SAAS,GAAG,IAAI,GAAG,EAAU,CAAC;IACpC,KAAK,MAAM,YAAY,IAAI,GAAG,EAAE,CAAC;QAC/B,IAAI,CAAC,YAAY,CAAC,SAAS,IAAI,CAAC,YA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MAAM,KAAK,GAAG,KAAK,CAAC,SAAS;oBAC3B,CAAC,CAAC,KAAK,oBAAoB,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG;oBAC/C,CAAC,CAAC,kBAAkB,CAAC;gBACvB,4EAA4E;gBAC5E,6EAA6E;gBAC7E,8BAA8B;gBAC9B,MAAM,MAAM,GAAG,oBAAoB,CAAC,KAAK,CAAC,YAAY,IAAI,YAAY,CAAC,CAAC;gBACxE,KAAK,CAAC,IAAI,CACR,eAAe,oBAAoB,CAAC,KAAK,CAAC,aAAa,CAAC,iBAAiB,KAAK,CAAC,KAAK,GAAG,KAAK,kBAAkB,MAAM,EAAE,CACvH,CAAC;gBACF,IAAI,KAAK,CAAC,SAAS;oBAAE,KAAK,CAAC,IAAI,CAAC,mBAAmB,oBAAoB,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;gBAC5F,IAAI,KAAK,CAAC,OAAO;oBAAE,KAAK,CAAC,IAAI,CAAC,iBAAiB,oBAAoB,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;gBACtF,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACf,KAAK,CAAC,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;YAClD,CAAC;QACH,CAAC;QACD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -31,27 +31,27 @@ export declare const getConditions: import("@cyanheads/mcp-ts-core").ToolDefinit
|
|
|
31
31
|
}, z.core.$strip>>;
|
|
32
32
|
today: z.ZodObject<{
|
|
33
33
|
G: z.ZodObject<{
|
|
34
|
-
scale: z.ZodNumber
|
|
35
|
-
text: z.ZodString
|
|
36
|
-
label: z.ZodString
|
|
34
|
+
scale: z.ZodNullable<z.ZodNumber>;
|
|
35
|
+
text: z.ZodNullable<z.ZodString>;
|
|
36
|
+
label: z.ZodNullable<z.ZodString>;
|
|
37
37
|
}, z.core.$strip>;
|
|
38
38
|
R: z.ZodObject<{
|
|
39
|
-
scale: z.ZodNumber
|
|
40
|
-
text: z.ZodString
|
|
41
|
-
label: z.ZodString
|
|
39
|
+
scale: z.ZodNullable<z.ZodNumber>;
|
|
40
|
+
text: z.ZodNullable<z.ZodString>;
|
|
41
|
+
label: z.ZodNullable<z.ZodString>;
|
|
42
42
|
}, z.core.$strip>;
|
|
43
43
|
S: z.ZodObject<{
|
|
44
|
-
scale: z.ZodNumber
|
|
45
|
-
text: z.ZodString
|
|
46
|
-
label: z.ZodString
|
|
44
|
+
scale: z.ZodNullable<z.ZodNumber>;
|
|
45
|
+
text: z.ZodNullable<z.ZodString>;
|
|
46
|
+
label: z.ZodNullable<z.ZodString>;
|
|
47
47
|
}, z.core.$strip>;
|
|
48
48
|
}, z.core.$strip>;
|
|
49
49
|
forecast: z.ZodArray<z.ZodObject<{
|
|
50
50
|
date: z.ZodString;
|
|
51
51
|
G: z.ZodObject<{
|
|
52
|
-
scale: z.ZodNumber
|
|
53
|
-
text: z.ZodString
|
|
54
|
-
label: z.ZodString
|
|
52
|
+
scale: z.ZodNullable<z.ZodNumber>;
|
|
53
|
+
text: z.ZodNullable<z.ZodString>;
|
|
54
|
+
label: z.ZodNullable<z.ZodString>;
|
|
55
55
|
}, z.core.$strip>;
|
|
56
56
|
R: z.ZodObject<{
|
|
57
57
|
scale: z.ZodNullable<z.ZodNumber>;
|
|
@@ -86,7 +86,7 @@ export declare const getConditions: import("@cyanheads/mcp-ts-core").ToolDefinit
|
|
|
86
86
|
}, {
|
|
87
87
|
readonly reason: "feed_moved";
|
|
88
88
|
readonly code: JsonRpcErrorCode.ServiceUnavailable;
|
|
89
|
-
readonly when: "SWPC feed
|
|
89
|
+
readonly when: "SWPC feed returns a permanent 4xx, the scales feed lacks its latest observed period (key \"0\") or carries a malformed required scale field, or the forecast discussion has no topic section. Fails in one attempt.";
|
|
90
90
|
readonly retryable: false;
|
|
91
91
|
readonly recovery: "Retrying will not help — the SWPC feed path no longer resolves or no longer has the expected shape; the feed URL needs updating against SWPC current inventory.";
|
|
92
92
|
}], undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-conditions.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-conditions.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"get-conditions.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-conditions.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAiMjE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiOxB,CAAC"}
|