@cyanheads/noaa-spaceweather-mcp-server 0.2.0 → 0.2.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.
Files changed (40) hide show
  1. package/AGENTS.md +4 -3
  2. package/CLAUDE.md +4 -3
  3. package/README.md +4 -2
  4. package/changelog/0.2.x/0.2.0.md +2 -2
  5. package/changelog/0.2.x/0.2.1.md +23 -0
  6. package/changelog/template.md +7 -7
  7. package/dist/mcp-server/tools/definitions/get-alerts.tool.d.ts +2 -0
  8. package/dist/mcp-server/tools/definitions/get-alerts.tool.d.ts.map +1 -1
  9. package/dist/mcp-server/tools/definitions/get-alerts.tool.js +2 -0
  10. package/dist/mcp-server/tools/definitions/get-alerts.tool.js.map +1 -1
  11. package/dist/mcp-server/tools/definitions/get-aurora-forecast.tool.d.ts +12 -1
  12. package/dist/mcp-server/tools/definitions/get-aurora-forecast.tool.d.ts.map +1 -1
  13. package/dist/mcp-server/tools/definitions/get-aurora-forecast.tool.js +159 -39
  14. package/dist/mcp-server/tools/definitions/get-aurora-forecast.tool.js.map +1 -1
  15. package/dist/mcp-server/tools/definitions/get-conditions.tool.d.ts +1 -0
  16. package/dist/mcp-server/tools/definitions/get-conditions.tool.d.ts.map +1 -1
  17. package/dist/mcp-server/tools/definitions/get-conditions.tool.js +1 -0
  18. package/dist/mcp-server/tools/definitions/get-conditions.tool.js.map +1 -1
  19. package/dist/mcp-server/tools/definitions/get-kp-index.tool.d.ts +2 -0
  20. package/dist/mcp-server/tools/definitions/get-kp-index.tool.d.ts.map +1 -1
  21. package/dist/mcp-server/tools/definitions/get-kp-index.tool.js +2 -0
  22. package/dist/mcp-server/tools/definitions/get-kp-index.tool.js.map +1 -1
  23. package/dist/mcp-server/tools/definitions/get-solar-activity.tool.d.ts +2 -0
  24. package/dist/mcp-server/tools/definitions/get-solar-activity.tool.d.ts.map +1 -1
  25. package/dist/mcp-server/tools/definitions/get-solar-activity.tool.js +2 -0
  26. package/dist/mcp-server/tools/definitions/get-solar-activity.tool.js.map +1 -1
  27. package/dist/mcp-server/tools/definitions/get-solar-wind.tool.d.ts +2 -0
  28. package/dist/mcp-server/tools/definitions/get-solar-wind.tool.d.ts.map +1 -1
  29. package/dist/mcp-server/tools/definitions/get-solar-wind.tool.js +2 -0
  30. package/dist/mcp-server/tools/definitions/get-solar-wind.tool.js.map +1 -1
  31. package/dist/mcp-server/tools/definitions/index.d.ts +21 -1
  32. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  33. package/dist/services/space-weather/solar-position.d.ts +29 -0
  34. package/dist/services/space-weather/solar-position.d.ts.map +1 -0
  35. package/dist/services/space-weather/solar-position.js +76 -0
  36. package/dist/services/space-weather/solar-position.js.map +1 -0
  37. package/dist/services/space-weather/types.d.ts +1 -1
  38. package/dist/services/space-weather/types.d.ts.map +1 -1
  39. package/package.json +5 -5
  40. package/server.json +3 -3
package/AGENTS.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** noaa-spaceweather-mcp-server
4
- **Version:** 0.2.0
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.3`
4
+ **Version:** 0.2.1
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.6`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/server` ^2.0.0 (protocol revisions 2026-07-28 and 2025-*)
8
8
  **Zod:** ^4.6.5
@@ -120,7 +120,7 @@ Handlers receive a unified `ctx` object. Key properties:
120
120
 
121
121
  Handlers throw — the framework catches, classifies, and formats.
122
122
 
123
- **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. Pass `ctx.recoveryFor('reason')` as the throw's data to put it on the wire (`data.recovery.hint`, mirrored into `content[]` text); override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`, `RequestCancelled`) bubble freely and don't need declaring.
123
+ **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable?, severity?, thrownBy? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. Pass `ctx.recoveryFor('reason')` as the throw's data to put it on the wire (`data.recovery.hint`, mirrored into `content[]` text unless the message already contains it verbatim); override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Forwarding it is lint-enforced per throw site (`error-contract-recovery-unforwarded`). Mark an entry the service layer throws with `thrownBy: 'service'` so `error-contract-unthrown` skips it — lint-only metadata, nothing at runtime reads it. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`, `RequestCancelled`) bubble freely and don't need declaring.
124
124
 
125
125
  ```ts
126
126
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
@@ -168,6 +168,7 @@ src/
168
168
  services/
169
169
  space-weather/
170
170
  space-weather-service.ts # NOAA SWPC feed client + normalization
171
+ solar-position.ts # Solar elevation + darkness state (pure)
171
172
  types.ts # Domain types (KpRecord, ScaleEntry, etc.)
172
173
  mcp-server/
173
174
  tools/definitions/
package/CLAUDE.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** noaa-spaceweather-mcp-server
4
- **Version:** 0.2.0
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.3`
4
+ **Version:** 0.2.1
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.6`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/server` ^2.0.0 (protocol revisions 2026-07-28 and 2025-*)
8
8
  **Zod:** ^4.6.5
@@ -120,7 +120,7 @@ Handlers receive a unified `ctx` object. Key properties:
120
120
 
121
121
  Handlers throw — the framework catches, classifies, and formats.
122
122
 
123
- **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. Pass `ctx.recoveryFor('reason')` as the throw's data to put it on the wire (`data.recovery.hint`, mirrored into `content[]` text); override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`, `RequestCancelled`) bubble freely and don't need declaring.
123
+ **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable?, severity?, thrownBy? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. Pass `ctx.recoveryFor('reason')` as the throw's data to put it on the wire (`data.recovery.hint`, mirrored into `content[]` text unless the message already contains it verbatim); override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Forwarding it is lint-enforced per throw site (`error-contract-recovery-unforwarded`). Mark an entry the service layer throws with `thrownBy: 'service'` so `error-contract-unthrown` skips it — lint-only metadata, nothing at runtime reads it. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`, `RequestCancelled`) bubble freely and don't need declaring.
124
124
 
125
125
  ```ts
126
126
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
@@ -168,6 +168,7 @@ src/
168
168
  services/
169
169
  space-weather/
170
170
  space-weather-service.ts # NOAA SWPC feed client + normalization
171
+ solar-position.ts # Solar elevation + darkness state (pure)
171
172
  types.ts # Domain types (KpRecord, ScaleEntry, etc.)
172
173
  mcp-server/
173
174
  tools/definitions/
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-0.2.0-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/noaa-spaceweather-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/noaa-spaceweather-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/noaa-spaceweather-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.0-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.2.1-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/noaa-spaceweather-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/noaa-spaceweather-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/noaa-spaceweather-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.0-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -37,7 +37,7 @@ Space weather from NOAA's Space Weather Prediction Center (SWPC) — geomagnetic
37
37
  |:-----|:------------|
38
38
  | `noaa_spaceweather_get_conditions` | Current space-weather snapshot: NOAA R/S/G storm scales, latest Kp, a plain-language status summary, and optionally SWPC's forecast discussion explaining the forecast |
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
- | `noaa_spaceweather_get_aurora_forecast` | OVATION model aurora forecast: global probability grid, optional local lookup by coordinates with go/no-go verdict |
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 |
42
42
  | `noaa_spaceweather_get_solar_activity` | Solar flare picture: discrete flare events with peak class and R-scale level, GOES X-ray flux, the daily F10.7 cm radio flux, 3-day flare-class probabilities, active solar regions with per-region probabilities, and solar radiation storm level |
43
43
  | `noaa_spaceweather_get_alerts` | Active SWPC alerts, watches, and warnings — structured records with product type, severity, issue time, validity window, and full message text |
@@ -69,6 +69,8 @@ Space weather from NOAA's Space Weather Prediction Center (SWPC) — geomagnetic
69
69
 
70
70
  - Without coordinates: global metadata only — grid point count, global peak probability, peak region
71
71
  - With `latitude`/`longitude` (WGS84, required together): nearest 1°-grid lookup, the centered-dipole geomagnetic latitude those coordinates convert to, the minimum Kp and G level needed at that geomagnetic latitude, and a plain-language go/no-go verdict
72
+ - Darkness gating: the sun's elevation at the coordinates at the forecast time (`sunElevationDeg`) and the sky state it implies (`darkness`: `day`, `civil_twilight`, `nautical_twilight`, `dark`). In daylight the verdict reports aurora as not visible whatever the model probability; in twilight it adds that only bright aurora will show
73
+ - Horizon view: the strongest reading within 1000 km poleward and ±2° longitude (`horizonMaxPercent`, `horizonMaxLatitude`, `horizonDistanceKm`). When it reaches 10% and beats the overhead reading outside daylight, the verdict adds that aurora may be visible low on the poleward horizon
72
74
  - `invalid_coordinates` error when only one of the pair is supplied
73
75
  - OVATION model updates every ~5 minutes; forecast horizon is ~30–60 minutes ahead
74
76
 
@@ -8,10 +8,10 @@ security: false
8
8
 
9
9
  ## Added
10
10
 
11
- - **`get_solar_wind`:** `resolution` input (`reduced`/`full`, default `reduced`) bounds `plasma`/`mag` to 200 records each — one real measurement per bucket (fastest speed for plasma, most southward Bz for mag), newest record always last. A default 3-hour call is unaffected; a 24-hour call drops from ~541 KB to roughly the size of today's default call (~68 KB). Adds `bzMinInWindow` + `bzMinTimeTag`, computed from the full window before reduction. [#24](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/24)
11
+ - **`get_solar_wind`:** `resolution` input (`reduced`/`full`, default `reduced`) bounds `plasma`/`mag` to 200 records each — one real measurement per bucket (fastest speed for plasma, most southward Bz for mag), newest record always last. A default 3-hour call is unaffected; a 24-hour call drops from ~541 KB to ~75 KB. Adds `bzMinInWindow` + `bzMinTimeTag`, computed from the full window before reduction. [#24](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/24)
12
12
  - **`get_solar_activity`:** `recentFlares[]` — discrete GOES flare events from `xray-flares-7-day.json`, filtered by the new `flare_hours` input (1–168, default 24), with peak class, R-scale level, and begin/max/end times and classes. [#31](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/31)
13
13
  - **`get_solar_activity`:** `f107` — the latest daily F10.7 cm solar radio flux (the Noon Penticton report, matching SWPC's own daily summary), with its 90-day mean when available. [#31](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/31)
14
- - **`get_solar_activity`:** `XraySchema` gains `flareClassFull` (class with magnitude, e.g. `"M5.2"`, truncated to match SWPC's own rounding) and `fluxWm2Value` (unformatted flux, for comparison without parsing `fluxWm2`). [#31](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/31)
14
+ - **`get_solar_activity`:** `XraySchema` gains `flareClassFull` (class with magnitude, e.g. `"M5.2"`, truncated to one decimal, as SWPC writes its published classes) and `fluxWm2Value` (unformatted flux, for comparison without parsing `fluxWm2`). [#31](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/31)
15
15
  - **`get_conditions`:** `include_discussion` input + `discussion` output — SWPC's forecaster-written Forecast Discussion, parsed into per-topic sections (summary/forecast text). [#32](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/32)
16
16
 
17
17
  ## Changed
@@ -0,0 +1,23 @@
1
+ ---
2
+ summary: "Aurora forecast gates the go/no-go verdict on daylight at the requested coordinates and adds a poleward horizon reading for aurora visible below the local horizon."
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.2.1 — 2026-09-22
8
+
9
+ ## Added
10
+
11
+ - **`get_aurora_forecast` daylight gate:** `sunElevationDeg` and `darkness` (`day`/`civil_twilight`/`nautical_twilight`/`dark`) at the requested coordinates and forecast time. In daylight the verdict reports aurora as not visible regardless of the model probability; in twilight it adds that only bright aurora will show. ([#36](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/36))
12
+ - **`get_aurora_forecast` horizon view:** `horizonMaxPercent`, `horizonMaxLatitude`, `horizonDistanceKm` — the strongest reading within 1000 km poleward and ±2° longitude of the requested point. When it reaches 10% and beats the overhead reading, the verdict notes aurora may be visible low on the horizon. ([#37](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/37))
13
+
14
+ ## Changed
15
+
16
+ - **`get_aurora_forecast` `feed_moved`** now also fires, in one attempt, when a coordinate lookup finds no parseable `Forecast Time` — the daylight gate has no instant to evaluate without it. ([#36](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/36))
17
+
18
+ ## Dependencies
19
+
20
+ - `@cyanheads/mcp-ts-core` `^0.13.3` → `^0.13.6`
21
+ - `@biomejs/biome` `^2.5.13` → `^2.5.14`
22
+ - `@types/node` `^26.5.1` → `^26.6.2`
23
+ - `vitest` `^5.0.0` → `^5.0.1`
@@ -6,8 +6,8 @@
6
6
 
7
7
  # Required. One-line GitHub Release-style headline. 350 character cap — a
8
8
  # ceiling, not a target. Default short and scannable. Don't pad, don't stitch
9
- # unrelated changes with commas/semicolons into an inventory — pick the
10
- # headline, like a tag's theme line. Quotes required: unquoted YAML treats
9
+ # unrelated changes with commas/semicolons into an inventory — pick the one
10
+ # headline the release is about. Quotes required: unquoted YAML treats
11
11
  # `: ` inside the value as a key separator and fails GitHub's strict parser.
12
12
  summary: ""
13
13
 
@@ -119,11 +119,11 @@ security: false
119
119
  TAG ANNOTATIONS — the annotated tag body renders as the GitHub Release body
120
120
  via `gh release create --notes-from-tag`. It is a condensed digest of this
121
121
  entry, never a copy, and its format is owned by the `release-and-publish`
122
- skill (step 4, "Create the annotated tag"): the entry's `summary:` as the
123
- theme line without the version, flat headline bullets — no Keep-a-Changelog
124
- section headers, no gates line — at most one deps line, issue backlinks,
125
- and the changelog link last. In release-PR mode the `git-wrapup` skill
126
- authors that digest as the PR body's `## Changes` and the tag copies it.
122
+ skill (step 4, "Create the annotated tag"): a short subject line without the
123
+ version, flat headline bullets — no Keep-a-Changelog section headers, no
124
+ gates line — at most one deps line, issue backlinks, and the changelog link
125
+ last. In release-PR mode the `git-wrapup` skill authors those bullets as the
126
+ PR body's `## Changes` and the tag copies them.
127
127
  -->
128
128
 
129
129
  ## Added
@@ -36,12 +36,14 @@ export declare const getAlerts: import("@cyanheads/mcp-ts-core").ToolDefinition<
36
36
  readonly code: JsonRpcErrorCode.ServiceUnavailable;
37
37
  readonly when: "SWPC feed returns 5xx or 429, times out, or answers with a body that is not parseable JSON. Retried before failing.";
38
38
  readonly retryable: true;
39
+ readonly thrownBy: "service";
39
40
  readonly recovery: "Retry in 30–60 seconds; SWPC feeds occasionally lag during high-activity events.";
40
41
  }, {
41
42
  readonly reason: "feed_moved";
42
43
  readonly code: JsonRpcErrorCode.ServiceUnavailable;
43
44
  readonly when: "SWPC feed path returns a permanent 4xx (404, 410, 401, 403). Fails in one attempt.";
44
45
  readonly retryable: false;
46
+ readonly thrownBy: "service";
45
47
  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.";
46
48
  }], {
47
49
  readonly notice: z.ZodOptional<z.ZodString>;
@@ -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;AA+NjE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqPpB,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;AA+NjE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuPpB,CAAC"}
@@ -229,6 +229,7 @@ export const getAlerts = tool('noaa_spaceweather_get_alerts', {
229
229
  code: JsonRpcErrorCode.ServiceUnavailable,
230
230
  when: 'SWPC feed returns 5xx or 429, times out, or answers with a body that is not parseable JSON. Retried before failing.',
231
231
  retryable: true,
232
+ thrownBy: 'service',
232
233
  recovery: 'Retry in 30–60 seconds; SWPC feeds occasionally lag during high-activity events.',
233
234
  },
234
235
  {
@@ -236,6 +237,7 @@ export const getAlerts = tool('noaa_spaceweather_get_alerts', {
236
237
  code: JsonRpcErrorCode.ServiceUnavailable,
237
238
  when: 'SWPC feed path returns a permanent 4xx (404, 410, 401, 403). Fails in one attempt.',
238
239
  retryable: false,
240
+ thrownBy: 'service',
239
241
  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.',
240
242
  },
241
243
  ],
@@ -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,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAG3F;;;;;;;;;;;;;;;GAeG;AACH,MAAM,iBAAiB,GAAG;IACxB,SAAS;IACT,aAAa;IACb,oBAAoB;IACpB,mBAAmB;IACnB,YAAY;IACZ,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,CA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K,CAAC,SAAS;oBAAE,KAAK,CAAC,IAAI,CAAC,mBAAmB,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;gBACtE,IAAI,KAAK,CAAC,OAAO;oBAAE,KAAK,CAAC,IAAI,CAAC,iBAAiB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;gBAChE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACf,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAClB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;gBAC1B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACpB,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"}
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,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAG3F;;;;;;;;;;;;;;;GAeG;AACH,MAAM,iBAAiB,GAAG;IACxB,SAAS;IACT,aAAa;IACb,oBAAoB;IACpB,mBAAmB;IACnB,YAAY;IACZ,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,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M,MAAM,GAAG,KAAK,CAAC,YAAY,IAAI,YAAY,CAAC;gBAClD,KAAK,CAAC,IAAI,CACR,eAAe,KAAK,CAAC,aAAa,iBAAiB,KAAK,CAAC,KAAK,GAAG,KAAK,kBAAkB,MAAM,EAAE,CACjG,CAAC;gBACF,IAAI,KAAK,CAAC,SAAS;oBAAE,KAAK,CAAC,IAAI,CAAC,mBAAmB,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;gBACtE,IAAI,KAAK,CAAC,OAAO;oBAAE,KAAK,CAAC,IAAI,CAAC,iBAAiB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;gBAChE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACf,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAClB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;gBAC1B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACpB,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"}
@@ -19,6 +19,16 @@ export declare const getAuroraForecast: import("@cyanheads/mcp-ts-core").ToolDef
19
19
  auroraPercent: z.ZodNumber;
20
20
  minKpRequired: z.ZodNumber;
21
21
  minGScale: z.ZodNullable<z.ZodNumber>;
22
+ sunElevationDeg: z.ZodNumber;
23
+ darkness: z.ZodEnum<{
24
+ civil_twilight: "civil_twilight";
25
+ dark: "dark";
26
+ day: "day";
27
+ nautical_twilight: "nautical_twilight";
28
+ }>;
29
+ horizonMaxPercent: z.ZodNullable<z.ZodNumber>;
30
+ horizonMaxLatitude: z.ZodNullable<z.ZodNumber>;
31
+ horizonDistanceKm: z.ZodNullable<z.ZodNumber>;
22
32
  verdict: z.ZodString;
23
33
  }, z.core.$strip>>;
24
34
  gridPointCount: z.ZodNumber;
@@ -29,11 +39,12 @@ export declare const getAuroraForecast: import("@cyanheads/mcp-ts-core").ToolDef
29
39
  readonly code: JsonRpcErrorCode.ServiceUnavailable;
30
40
  readonly when: "SWPC feed returns 5xx or 429, times out, or answers with a body that is not parseable JSON. Retried before failing.";
31
41
  readonly retryable: true;
42
+ readonly thrownBy: "service";
32
43
  readonly recovery: "Retry in 30–60 seconds; SWPC feeds occasionally lag during high-activity events.";
33
44
  }, {
34
45
  readonly reason: "feed_moved";
35
46
  readonly code: JsonRpcErrorCode.ServiceUnavailable;
36
- readonly when: "SWPC feed path returns a permanent 4xx (404, 410, 401, 403). Fails in one attempt.";
47
+ readonly when: "SWPC feed path returns a permanent 4xx (404, 410, 401, 403), or a coordinate lookup finds no parseable Forecast Time in the feed. Fails in one attempt.";
37
48
  readonly retryable: false;
38
49
  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.";
39
50
  }, {
@@ -1 +1 @@
1
- {"version":3,"file":"get-aurora-forecast.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-aurora-forecast.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA0EjE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA0N5B,CAAC"}
1
+ {"version":3,"file":"get-aurora-forecast.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-aurora-forecast.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAqOjE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAwP5B,CAAC"}
@@ -4,6 +4,7 @@
4
4
  */
5
5
  import { tool, z } from '@cyanheads/mcp-ts-core';
6
6
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
7
+ import { DARKNESS_STATES, darknessFor, solarElevationDeg, } from '../../../services/space-weather/solar-position.js';
7
8
  import { auroraBandForGeomagneticLatitude, getSpaceWeatherService, } from '../../../services/space-weather/space-weather-service.js';
8
9
  /**
9
10
  * North geomagnetic pole for IGRF-14 epoch 2025.0, derived from the model's
@@ -61,13 +62,126 @@ function lookupGridPoint(grid, lat, lon) {
61
62
  const OVAL_OVERRIDE_PERCENT = 10;
62
63
  /** Kp reported where no NOAA storm level reaches — the top of the scale. */
63
64
  const UNREACHABLE_MIN_KP = 9;
65
+ /**
66
+ * How far away bright aurora can still be seen low on the horizon. SWPC's 30-minute
67
+ * forecast page: aurora "can be observed from as much as a 1000 km away when the
68
+ * aurora is bright".
69
+ */
70
+ const HORIZON_RADIUS_KM = 1000;
71
+ /** Longitude half-width of the poleward scan — the cells roughly due north or south. */
72
+ const HORIZON_LONGITUDE_WINDOW_DEG = 2;
73
+ /**
74
+ * Horizon reading at which the verdict mentions it. The 1000 km figure applies to
75
+ * bright aurora, so the clause keeps the floor this tool already treats as real oval
76
+ * signal rather than model noise — the same value, for the same reason, as
77
+ * {@link OVAL_OVERRIDE_PERCENT}, not the ladder's 5% "Low chance" boundary.
78
+ */
79
+ const HORIZON_CLAUSE_MIN_PERCENT = OVAL_OVERRIDE_PERCENT;
80
+ const EARTH_MEAN_RADIUS_KM = 6371;
81
+ /** Great-circle (haversine) distance between two geographic points, in km. */
82
+ function greatCircleKm(lat1, lon1, lat2, lon2) {
83
+ const dLat = (lat2 - lat1) * DEG_TO_RAD;
84
+ const dLon = (lon2 - lon1) * DEG_TO_RAD;
85
+ const a = Math.sin(dLat / 2) ** 2 +
86
+ Math.cos(lat1 * DEG_TO_RAD) * Math.cos(lat2 * DEG_TO_RAD) * Math.sin(dLon / 2) ** 2;
87
+ return 2 * EARTH_MEAN_RADIUS_KM * Math.asin(Math.min(1, Math.sqrt(a)));
88
+ }
89
+ /**
90
+ * Scan the cells strictly poleward of `gridLat` — toward the pole nearer the
91
+ * requested latitude — within ±2° of the requested longitude and 1000 km of the
92
+ * requested point, and return the highest reading. A tie goes to the nearer cell.
93
+ * Null when no cell lies in the window, which on the full grid means `gridLat` is a
94
+ * pole.
95
+ */
96
+ function scanPoleward(grid, lat, lon, gridLat) {
97
+ const northward = lat >= 0;
98
+ let best = null;
99
+ let bestKm = Infinity;
100
+ for (const pt of grid) {
101
+ const poleward = northward ? pt.latitude > gridLat : pt.latitude < gridLat;
102
+ if (!poleward)
103
+ continue;
104
+ if (Math.abs(longitudeDelta(pt.longitude, lon)) > HORIZON_LONGITUDE_WINDOW_DEG)
105
+ continue;
106
+ const km = greatCircleKm(lat, lon, pt.latitude, pt.longitude);
107
+ if (km > HORIZON_RADIUS_KM)
108
+ continue;
109
+ const stronger = !best || pt.auroraPercent > best.auroraPercent;
110
+ const nearerTie = best?.auroraPercent === pt.auroraPercent && km < bestKm;
111
+ if (stronger || nearerTie) {
112
+ best = pt;
113
+ bestKm = km;
114
+ }
115
+ }
116
+ return best
117
+ ? { percent: best.auroraPercent, latitude: best.latitude, distanceKm: Math.round(bestKm) }
118
+ : null;
119
+ }
120
+ /**
121
+ * The verdict on the overhead reading alone: the probability ladder, keyed on the
122
+ * nearest cell's probability and the geomagnetic band.
123
+ */
124
+ function overheadVerdict(pct, band, geomLat, lat) {
125
+ const geomText = geomLat.toFixed(1);
126
+ const minKp = band?.minKp ?? UNREACHABLE_MIN_KP;
127
+ const kpClause = band && band.minKp > 0
128
+ ? ` Kp≥${band.minKp} (G${band.gScale}) needed at ${geomText}° geomagnetic.`
129
+ : '';
130
+ // Below the G5 band's 40° edge no storm level reaches, so the ladder's
131
+ // "possible with Kp≥9" framing would mislead (#9) — unless the grid point
132
+ // itself reads high enough to be signal rather than model noise.
133
+ if (!band) {
134
+ return pct >= OVAL_OVERRIDE_PERCENT
135
+ ? `Aurora is normally not seen at ${geomText}° geomagnetic latitude, but the nearest grid point reads ${pct}% — an exceptional reading; only G5-class (Kp 9) storms push the oval this far equatorward.`
136
+ : `Aurora not visible at ${geomText}° geomagnetic latitude (${lat}° geographic) — even G5 extreme storms (Kp 9) do not reach below 40° geomagnetic latitude. Travel toward higher geomagnetic latitudes to see aurora.`;
137
+ }
138
+ if (pct >= 30) {
139
+ return minKp === 0
140
+ ? `Good aurora chance (${pct}%) at ${geomText}° geomagnetic latitude — inside the auroral oval, no Kp minimum required, aurora possible now.`
141
+ : `Good aurora chance (${pct}%) —${kpClause}`;
142
+ }
143
+ if (pct >= 5) {
144
+ return minKp === 0
145
+ ? `Low aurora chance (${pct}%) at this location — aurora activity is low despite the favorable geomagnetic latitude of ${geomText}°.`
146
+ : `Low aurora chance (${pct}%) — conditions marginal.${kpClause}`;
147
+ }
148
+ if (minKp === 0) {
149
+ return `Very low aurora probability (${pct}%) despite a favorable geomagnetic latitude of ${geomText}° — wait for elevated solar activity and higher Kp.`;
150
+ }
151
+ return `Very low aurora probability (${pct}%) at this location.${kpClause} Travel toward higher geomagnetic latitudes or wait for elevated Kp.`;
152
+ }
153
+ /**
154
+ * The full verdict. Darkness at the requested coordinates is checked first: in
155
+ * daylight aurora cannot be seen, so the verdict says so and no probability — overhead
156
+ * or on the horizon — is offered. Otherwise the overhead verdict leads, a horizon
157
+ * clause follows when the poleward reading is real signal and beats the overhead one,
158
+ * and twilight closes with a brightness caveat.
159
+ */
160
+ function buildVerdict(opts) {
161
+ const { band, darkness, geomLat, horizon, lat, pct, sunElevation } = opts;
162
+ if (darkness === 'day') {
163
+ return `Not visible — daylight at the forecast time (sun ${sunElevation}° above the horizon); aurora cannot be seen while the sun is up.`;
164
+ }
165
+ const clauses = [overheadVerdict(pct, band, geomLat, lat)];
166
+ if (horizon && horizon.percent >= HORIZON_CLAUSE_MIN_PERCENT && horizon.percent > pct) {
167
+ const direction = lat >= 0 ? 'north' : 'south';
168
+ clauses.push(`${pct}% overhead; ${horizon.percent}% about ${horizon.distanceKm} km ${direction} — aurora may be visible low on the ${direction}ern horizon.`);
169
+ }
170
+ if (darkness !== 'dark') {
171
+ const phase = darkness === 'civil_twilight' ? 'Civil' : 'Nautical';
172
+ clauses.push(`${phase} twilight at the forecast time (sun ${Math.abs(sunElevation)}° below the horizon) — only bright aurora will show.`);
173
+ }
174
+ return clauses.join(' ');
175
+ }
64
176
  export const getAuroraForecast = tool('noaa_spaceweather_get_aurora_forecast', {
65
177
  title: 'Get Aurora Forecast',
66
178
  description: 'OVATION model aurora forecast for the next ~30–60 min: global grid of aurora probability ' +
67
179
  'percentages by latitude/longitude (1° resolution). With optional coordinates, returns the local ' +
68
180
  'aurora probability at the nearest grid point, the geomagnetic latitude those coordinates convert ' +
69
- 'to, the minimum Kp and G level needed for aurora at that geomagnetic latitude, and a ' +
70
- 'plain-language go/no-go verdict. Without coordinates, returns only global metadata. ' +
181
+ 'to, the minimum Kp and G level needed for aurora at that geomagnetic latitude, the sun’s ' +
182
+ 'elevation there at the forecast time (aurora is not visible in daylight), the strongest aurora ' +
183
+ 'within 1000 km poleward (visible low on the horizon when bright), and a plain-language ' +
184
+ 'go/no-go verdict. Without coordinates, returns only global metadata. ' +
71
185
  'Data updates every ~5 minutes. Supply coordinates as geographic (WGS84); aurora bands are ' +
72
186
  'geomagnetic, and the tool converts between them.',
73
187
  annotations: { readOnlyHint: true, openWorldHint: true, idempotentHint: true },
@@ -111,9 +225,27 @@ export const getAuroraForecast = tool('noaa_spaceweather_get_aurora_forecast', {
111
225
  .number()
112
226
  .nullable()
113
227
  .describe('NOAA G level matching minKpRequired (1–5), 0 inside the quiet-time auroral oval where no storm is needed, and null below 40° geomagnetic where no storm level reaches.'),
228
+ sunElevationDeg: z
229
+ .number()
230
+ .describe('Geometric solar elevation at the requested coordinates at forecastTime, in degrees (−90 to 90, rounded to 0.1°, no refraction correction). Negative when the sun is below the horizon.'),
231
+ darkness: z
232
+ .enum(DARKNESS_STATES)
233
+ .describe('Sky darkness at the requested coordinates at forecastTime, from sunElevationDeg: day at 0° and above, civil_twilight from −6° up to 0°, nautical_twilight from −12° up to −6°, dark below −12°.'),
234
+ horizonMaxPercent: z
235
+ .number()
236
+ .nullable()
237
+ .describe('Highest aurora probability (0–100%) among grid cells poleward of gridLatitude, within ±2° longitude and 1000 km of the requested point. Null when no grid cell lies in that window, which on the full grid happens only when gridLatitude is ±90.'),
238
+ horizonMaxLatitude: z
239
+ .number()
240
+ .nullable()
241
+ .describe('Grid latitude of the cell carrying horizonMaxPercent (degrees); the nearest such cell when several tie. Null when horizonMaxPercent is null.'),
242
+ horizonDistanceKm: z
243
+ .number()
244
+ .nullable()
245
+ .describe('Great-circle distance from the requested point to the cell carrying horizonMaxPercent, in km. Null when horizonMaxPercent is null.'),
114
246
  verdict: z
115
247
  .string()
116
- .describe('Plain-language visibility verdict at this geomagnetic latitude, e.g. "Good aurora chance (42%) — Kp≥6.67 (G3) needed at 51.2° geomagnetic latitude."'),
248
+ .describe('Plain-language visibility verdict for the requested coordinates at forecastTime, e.g. "Good aurora chance (42%) — Kp≥6.67 (G3) needed at 51.2° geomagnetic." Opens "Not visible — daylight" when darkness is day.'),
117
249
  })
118
250
  .nullable()
119
251
  .describe('Local aurora lookup result. Null when no coordinates were provided.'),
@@ -131,12 +263,13 @@ export const getAuroraForecast = tool('noaa_spaceweather_get_aurora_forecast', {
131
263
  code: JsonRpcErrorCode.ServiceUnavailable,
132
264
  when: 'SWPC feed returns 5xx or 429, times out, or answers with a body that is not parseable JSON. Retried before failing.',
133
265
  retryable: true,
266
+ thrownBy: 'service',
134
267
  recovery: 'Retry in 30–60 seconds; SWPC feeds occasionally lag during high-activity events.',
135
268
  },
136
269
  {
137
270
  reason: 'feed_moved',
138
271
  code: JsonRpcErrorCode.ServiceUnavailable,
139
- when: 'SWPC feed path returns a permanent 4xx (404, 410, 401, 403). Fails in one attempt.',
272
+ when: 'SWPC feed path returns a permanent 4xx (404, 410, 401, 403), or a coordinate lookup finds no parseable Forecast Time in the feed. Fails in one attempt.',
140
273
  retryable: false,
141
274
  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.',
142
275
  },
@@ -174,45 +307,23 @@ export const getAuroraForecast = tool('noaa_spaceweather_get_aurora_forecast', {
174
307
  // Local lookup
175
308
  let localLookup = null;
176
309
  if (lat != null && lon != null) {
310
+ // Whether the sun is up at the requested point is judged at the forecast time,
311
+ // so a feed without one leaves nothing to judge the verdict against.
312
+ const forecastAt = new Date(aurora.meta.forecastTime);
313
+ if (Number.isNaN(forecastAt.getTime())) {
314
+ throw ctx.fail('feed_moved', 'OVATION feed carried no parseable Forecast Time; the daylight check at the requested coordinates needs it.', { forecastTime: aurora.meta.forecastTime, ...ctx.recoveryFor('feed_moved') });
315
+ }
177
316
  const nearest = lookupGridPoint(grid, lat, lon);
178
317
  if (nearest) {
179
318
  // Aurora bands are geomagnetic; the caller supplies geographic coordinates.
180
319
  const geomLat = toGeomagneticLatitude(lat, lon);
181
- const geomText = geomLat.toFixed(1);
182
320
  const band = auroraBandForGeomagneticLatitude(geomLat);
183
- const minKp = band?.minKp ?? UNREACHABLE_MIN_KP;
184
321
  const pct = nearest.auroraPercent;
185
- const kpClause = band && band.minKp > 0
186
- ? ` Kp≥${band.minKp} (G${band.gScale}) needed at ${geomText}° geomagnetic.`
187
- : '';
188
- let verdict;
189
- // Below the G5 band's 40° edge no storm level reaches, so the ladder's
190
- // "possible with Kp≥9" framing would mislead (#9) — unless the grid point
191
- // itself reads high enough to be signal rather than model noise.
192
- if (!band) {
193
- verdict =
194
- pct >= OVAL_OVERRIDE_PERCENT
195
- ? `Aurora is normally not seen at ${geomText}° geomagnetic latitude, but the nearest grid point reads ${pct}% — an exceptional reading; only G5-class (Kp 9) storms push the oval this far equatorward.`
196
- : `Aurora not visible at ${geomText}° geomagnetic latitude (${lat}° geographic) — even G5 extreme storms (Kp 9) do not reach below 40° geomagnetic latitude. Travel toward higher geomagnetic latitudes to see aurora.`;
197
- }
198
- else if (pct >= 30) {
199
- verdict =
200
- minKp === 0
201
- ? `Good aurora chance (${pct}%) at ${geomText}° geomagnetic latitude — inside the auroral oval, no Kp minimum required, aurora possible now.`
202
- : `Good aurora chance (${pct}%) —${kpClause}`;
203
- }
204
- else if (pct >= 5) {
205
- verdict =
206
- minKp === 0
207
- ? `Low aurora chance (${pct}%) at this location — aurora activity is low despite the favorable geomagnetic latitude of ${geomText}°.`
208
- : `Low aurora chance (${pct}%) — conditions marginal.${kpClause}`;
209
- }
210
- else if (minKp === 0) {
211
- verdict = `Very low aurora probability (${pct}%) despite a favorable geomagnetic latitude of ${geomText}° — wait for elevated solar activity and higher Kp.`;
212
- }
213
- else {
214
- verdict = `Very low aurora probability (${pct}%) at this location.${kpClause} Travel toward higher geomagnetic latitudes or wait for elevated Kp.`;
215
- }
322
+ // Darkness is classified from the reported 0.1° value so the two fields agree
323
+ // at a boundary; `|| 0` folds a rounded −0 into 0.
324
+ const sunElevation = Math.round(solarElevationDeg(forecastAt, lat, lon) * 10) / 10 || 0;
325
+ const darkness = darknessFor(sunElevation);
326
+ const horizon = scanPoleward(grid, lat, lon, nearest.gridLat);
216
327
  localLookup = {
217
328
  requestedLatitude: lat,
218
329
  requestedLongitude: lon,
@@ -220,9 +331,14 @@ export const getAuroraForecast = tool('noaa_spaceweather_get_aurora_forecast', {
220
331
  gridLatitude: nearest.gridLat,
221
332
  gridLongitude: nearest.gridLon,
222
333
  auroraPercent: pct,
223
- minKpRequired: minKp,
334
+ minKpRequired: band?.minKp ?? UNREACHABLE_MIN_KP,
224
335
  minGScale: band?.gScale ?? null,
225
- verdict,
336
+ sunElevationDeg: sunElevation,
337
+ darkness,
338
+ horizonMaxPercent: horizon?.percent ?? null,
339
+ horizonMaxLatitude: horizon?.latitude ?? null,
340
+ horizonDistanceKm: horizon?.distanceKm ?? null,
341
+ verdict: buildVerdict({ band, darkness, geomLat, horizon, lat, pct, sunElevation }),
226
342
  };
227
343
  }
228
344
  }
@@ -250,6 +366,10 @@ export const getAuroraForecast = tool('noaa_spaceweather_get_aurora_forecast', {
250
366
  lines.push(`**Geomagnetic Latitude:** ${l.geomagneticLatitude}°`);
251
367
  lines.push(`**Aurora Probability:** ${l.auroraPercent}%`);
252
368
  lines.push(`**Min Kp Required:** ${l.minKpRequired} (${l.minGScale === null ? 'not reachable by any storm level' : `G${l.minGScale}`})`);
369
+ lines.push(`**Sun Elevation:** ${l.sunElevationDeg}° at forecast time (${l.darkness})`);
370
+ lines.push(`**Horizon (≤1000 km poleward):** ${l.horizonMaxPercent === null
371
+ ? 'none — no grid cell lies in the poleward scan window'
372
+ : `${l.horizonMaxPercent}% at ${l.horizonMaxLatitude}° latitude, ${l.horizonDistanceKm} km away`}`);
253
373
  lines.push(`**Verdict:** ${l.verdict}`);
254
374
  }
255
375
  return [{ type: 'text', text: lines.join('\n') }];
@@ -1 +1 @@
1
- {"version":3,"file":"get-aurora-forecast.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-aurora-forecast.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,EACL,gCAAgC,EAChC,sBAAsB,GACvB,MAAM,mDAAmD,CAAC;AAE3D;;;;GAIG;AACH,MAAM,yBAAyB,GAAG,MAAM,CAAC;AACzC,MAAM,0BAA0B,GAAG,CAAC,MAAM,CAAC;AAE3C,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;AAEjC;;;;;;;GAOG;AACH,SAAS,qBAAqB,CAAC,QAAgB,EAAE,SAAiB;IAChE,MAAM,GAAG,GAAG,QAAQ,GAAG,UAAU,CAAC;IAClC,MAAM,OAAO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,CAAC,aAAa,KAAK,CAAC,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,kCAAkC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,GAAG,CAC7H,CAAC;YACF,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;QAC1C,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"}
1
+ {"version":3,"file":"get-aurora-forecast.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-aurora-forecast.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,EACL,eAAe,EAEf,WAAW,EACX,iBAAiB,GAClB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAEL,gCAAgC,EAChC,sBAAsB,GACvB,MAAM,mDAAmD,CAAC;AAG3D;;;;GAIG;AACH,MAAM,yBAAyB,GAAG,MAAM,CAAC;AACzC,MAAM,0BAA0B,GAAG,CAAC,MAAM,CAAC;AAE3C,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;AAEjC;;;;;;;GAOG;AACH,SAAS,qBAAqB,CAAC,QAAgB,EAAE,SAAiB;IAChE,MAAM,GAAG,GAAG,QAAQ,GAAG,UAAU,CAAC;IAClC,MAAM,OAAO,GAAG,yBAAyB,GAAG,UAAU,CAAC;IACvD,MAAM,QAAQ,GAAG,CAAC,SAAS,GAAG,0BAA0B,CAAC,GAAG,UAAU,CAAC;IACvE,MAAM,cAAc,GAClB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC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