@cyanheads/noaa-spaceweather-mcp-server 0.1.8 → 0.1.10

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 (28) hide show
  1. package/AGENTS.md +17 -13
  2. package/CLAUDE.md +17 -13
  3. package/Dockerfile +10 -6
  4. package/README.md +7 -5
  5. package/changelog/0.1.x/0.1.10.md +34 -0
  6. package/changelog/0.1.x/0.1.9.md +24 -0
  7. package/changelog/template.md +5 -3
  8. package/dist/mcp-server/tools/definitions/get-kp-index.tool.d.ts.map +1 -1
  9. package/dist/mcp-server/tools/definitions/get-kp-index.tool.js +6 -3
  10. package/dist/mcp-server/tools/definitions/get-kp-index.tool.js.map +1 -1
  11. package/dist/mcp-server/tools/definitions/get-solar-activity.tool.d.ts +4 -0
  12. package/dist/mcp-server/tools/definitions/get-solar-activity.tool.d.ts.map +1 -1
  13. package/dist/mcp-server/tools/definitions/get-solar-activity.tool.js +30 -8
  14. package/dist/mcp-server/tools/definitions/get-solar-activity.tool.js.map +1 -1
  15. package/dist/mcp-server/tools/definitions/get-solar-wind.tool.d.ts +12 -2
  16. package/dist/mcp-server/tools/definitions/get-solar-wind.tool.d.ts.map +1 -1
  17. package/dist/mcp-server/tools/definitions/get-solar-wind.tool.js +97 -28
  18. package/dist/mcp-server/tools/definitions/get-solar-wind.tool.js.map +1 -1
  19. package/dist/mcp-server/tools/definitions/index.d.ts +14 -1
  20. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  21. package/dist/services/space-weather/space-weather-service.d.ts +19 -5
  22. package/dist/services/space-weather/space-weather-service.d.ts.map +1 -1
  23. package/dist/services/space-weather/space-weather-service.js +104 -68
  24. package/dist/services/space-weather/space-weather-service.js.map +1 -1
  25. package/dist/services/space-weather/types.d.ts +33 -4
  26. package/dist/services/space-weather/types.d.ts.map +1 -1
  27. package/package.json +10 -9
  28. 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.1.8
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.10.9`
4
+ **Version:** 0.1.10
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.10.14`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
8
8
  **Zod:** ^4.4.3
@@ -103,7 +103,7 @@ Handlers receive a unified `ctx` object. Key properties:
103
103
  |:---------|:------------|
104
104
  | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. |
105
105
  | `ctx.fail` | Typed error thrower — `ctx.fail('reason', message, opts?)` maps to declared `errors[]` contract. |
106
- | `ctx.enrich` | Attach advisory notices to a successful response — `ctx.enrich.notice(title, text)`. |
106
+ | `ctx.enrich` | Attach advisory fields to a successful response — `ctx.enrich.notice(text)`, `.total(n)`, `.echo(query)`, `.delta({...})`. Requires a declared `enrichment` block on the tool; without one the values are silently stripped. |
107
107
  | `ctx.recoveryFor` | Spread into an error options object to attach the declared recovery hint: `...ctx.recoveryFor('reason')`. |
108
108
  | `ctx.signal` | `AbortSignal` for cancellation. |
109
109
  | `ctx.requestId` | Unique request ID. |
@@ -115,7 +115,7 @@ Handlers receive a unified `ctx` object. Key properties:
115
115
 
116
116
  Handlers throw — the framework catches, classifies, and formats.
117
117
 
118
- **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 descriptive metadata for the agent's next move (≥ 5 words, lint-validated); for the wire `data.recovery.hint` (mirrored into `content[]` text), pass explicitly at the throw site when dynamic context matters: `ctx.fail('reason', msg, { recovery: { hint: '...' } })`. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
118
+ **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`) bubble freely and don't need declaring.
119
119
 
120
120
  ```ts
121
121
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
@@ -127,7 +127,7 @@ errors: [
127
127
  ],
128
128
  async handler(input, ctx) {
129
129
  const item = await db.find(input.id);
130
- if (!item) throw ctx.fail('no_match', `No item ${input.id}`);
130
+ if (!item) throw ctx.fail('no_match', `No item ${input.id}`, ctx.recoveryFor('no_match'));
131
131
  return item;
132
132
  }
133
133
  ```
@@ -190,7 +190,7 @@ src/
190
190
 
191
191
  ## Skills
192
192
 
193
- Skills are modular instructions in `skills/` at the project root. Read them directly when a task matches — e.g., `skills/add-tool/SKILL.md` when adding a tool.
193
+ Skills are modular instructions in `skills/` at the project root. Read them directly when a task matches — e.g., `skills/add-tool/SKILL.md` when adding a tool. `bun run list-skills` prints the full registry.
194
194
 
195
195
  **Agent skill directory:** Copy skills into the directory your agent discovers (Claude Code: `.claude/skills/`, others: equivalent). Skills then load as context without referencing `skills/` paths. After framework updates, run the `maintenance` skill — Phase B re-syncs the agent directory.
196
196
 
@@ -210,7 +210,6 @@ Available skills:
210
210
  | `tool-defs-analysis` | Read-only audit of MCP definition language across the surface — voice, leaks, defaults, recovery hints, output descriptions |
211
211
  | `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
212
212
  | `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
213
- | `devcheck` | Lint, format, typecheck, audit |
214
213
  | `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
215
214
  | `git-wrapup` | Land working-tree changes as a versioned commit + annotated tag — version bump, changelog, verify, tag. Local only. |
216
215
  | `release-and-publish` | Push + npm + MCP Registry + GH Release + Docker. Picks up from `git-wrapup` |
@@ -218,12 +217,14 @@ Available skills:
218
217
  | `orchestrations` | Chain task skills into a gated multi-phase pipeline — build-out, QA-fix, update-ship — when you can spawn sub-agents |
219
218
  | `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
220
219
  | `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
220
+ | `techniques` | Catalog of response/data-shaping techniques — overflow handling, payload shaping, retrieval patterns |
221
221
  | `api-auth` | Auth modes, scopes, JWT/OAuth |
222
222
  | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
223
223
  | `api-config` | AppConfig, parseConfig, env vars |
224
224
  | `api-context` | Context interface, logger, state, progress |
225
225
  | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
226
226
  | `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
227
+ | `api-mirror` | MirrorService: persistent self-refreshing local mirror (embedded SQLite + FTS5) of a bulk upstream dataset — Tier 3 opt-in |
227
228
  | `api-services` | LLM, Speech, Graph services |
228
229
  | `api-testing` | createMockContext, test patterns |
229
230
  | `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
@@ -238,7 +239,7 @@ When you complete a skill's checklist, check the boxes and add a completion time
238
239
 
239
240
  ## Commands
240
241
 
241
- **Runtime:** Scripts use `bun run` — both `npm run <cmd>` and `bun run <cmd>` work.
242
+ **Runtime:** Scripts use Bun's native TypeScript execution — `bun run <cmd>` is the standard invocation. `npm run <cmd>` also works (npm delegates to bun).
242
243
 
243
244
  | Command | Purpose |
244
245
  |:--------|:--------|
@@ -247,21 +248,24 @@ When you complete a skill's checklist, check the boxes and add a completion time
247
248
  | `bun run clean` | Remove build artifacts |
248
249
  | `bun run devcheck` | Lint + format + typecheck + security + changelog sync |
249
250
  | `bun run audit:refresh` | Delete `bun.lock`, reinstall, and re-run `bun audit`. Use when `devcheck` flags a transitive advisory — Bun's `update` is sticky on transitive resolutions, so the advisory may be a stale-lockfile false positive. If it survives the refresh, it's real. |
251
+ | `bun run lint:mcp` | Run the MCP definition linter standalone (rule catalog: `api-linter` skill) |
252
+ | `bun run lint:packaging` | Packaging surface checks — `server.json`/`manifest.json` env-var parity (run by devcheck) |
253
+ | `bun run list-skills` | Print the skill registry |
250
254
  | `bun run tree` | Generate directory structure doc |
251
255
  | `bun run format` | Auto-fix formatting (safe fixes only) |
252
256
  | `bun run format:unsafe` | Also apply Biome's unsafe autofixes — review the diff; they can change behavior |
253
- | `bun run test` | Run tests |
257
+ | `bun run test` | Run tests (Vitest — use `bun run test`, not `bun test`) |
254
258
  | `bun run start:stdio` | Production mode (stdio) |
255
259
  | `bun run start:http` | Production mode (HTTP) |
256
260
  | `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
257
261
  | `bun run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
258
- | `bun run bundle` | Build and pack as `.mcpb` for one-click Claude Desktop install |
262
+ | `bun run bundle` | Build, pack, and clean a `.mcpb` for one-click Claude Desktop install |
259
263
 
260
264
  ---
261
265
 
262
266
  ## Bundling
263
267
 
264
- `npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. 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.
268
+ `npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips dependency-shipped agent docs (`node_modules/**` `skills/`, `.claude/`, `.agents/`, `SKILL.md`) that root-anchored `.mcpbignore` patterns cannot reach. 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.
265
269
 
266
270
  **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.
267
271
 
@@ -279,14 +283,14 @@ Each per-version file opens with YAML frontmatter:
279
283
  ---
280
284
  summary: "One-line headline, ≤350 chars" # required — powers the rollup index
281
285
  breaking: false # optional — true flags breaking changes
282
- security: false # optional — true flags security fixes
286
+ security: false # optional — true ONLY for a source-code security fix, never a dependency CVE bump
283
287
  ---
284
288
 
285
289
  # 0.1.0 — YYYY-MM-DD
286
290
  ...
287
291
  ```
288
292
 
289
- `breaking: true` renders a `· ⚠️ Breaking` badge — use it when consumers must update code on upgrade (signature changes, removed APIs, config renames). `security: true` renders a `· 🛡️ Security` badge and pairs with a `## Security` body section. When both are set, badges render `· ⚠️ Breaking · 🛡️ Security`.
293
+ `breaking: true` renders a `· ⚠️ Breaking` badge — use it when consumers must update code on upgrade (signature changes, removed APIs, config renames). `security: true` renders a `· 🛡️ Security` badge and pairs with a `## Security` body section — set it only for a security fix in this server's *own source code*, never for a routine dependency or transitive CVE bump (record those under `## Dependencies`). When both are set, badges render `· ⚠️ Breaking · 🛡️ Security`.
290
294
 
291
295
  `agent-notes` is an optional free-form field for maintenance agents processing the release downstream. Content here won't appear in the rendered CHANGELOG — it's consumed by agents running the `maintenance` skill. Use it for adoption instructions that don't fit the human-facing sections: new files to create, fields to populate, one-time migration steps. Omit entirely when there's nothing to say.
292
296
 
package/CLAUDE.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** noaa-spaceweather-mcp-server
4
- **Version:** 0.1.8
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.10.9`
4
+ **Version:** 0.1.10
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.10.14`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
8
8
  **Zod:** ^4.4.3
@@ -103,7 +103,7 @@ Handlers receive a unified `ctx` object. Key properties:
103
103
  |:---------|:------------|
104
104
  | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. |
105
105
  | `ctx.fail` | Typed error thrower — `ctx.fail('reason', message, opts?)` maps to declared `errors[]` contract. |
106
- | `ctx.enrich` | Attach advisory notices to a successful response — `ctx.enrich.notice(title, text)`. |
106
+ | `ctx.enrich` | Attach advisory fields to a successful response — `ctx.enrich.notice(text)`, `.total(n)`, `.echo(query)`, `.delta({...})`. Requires a declared `enrichment` block on the tool; without one the values are silently stripped. |
107
107
  | `ctx.recoveryFor` | Spread into an error options object to attach the declared recovery hint: `...ctx.recoveryFor('reason')`. |
108
108
  | `ctx.signal` | `AbortSignal` for cancellation. |
109
109
  | `ctx.requestId` | Unique request ID. |
@@ -115,7 +115,7 @@ Handlers receive a unified `ctx` object. Key properties:
115
115
 
116
116
  Handlers throw — the framework catches, classifies, and formats.
117
117
 
118
- **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 descriptive metadata for the agent's next move (≥ 5 words, lint-validated); for the wire `data.recovery.hint` (mirrored into `content[]` text), pass explicitly at the throw site when dynamic context matters: `ctx.fail('reason', msg, { recovery: { hint: '...' } })`. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
118
+ **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`) bubble freely and don't need declaring.
119
119
 
120
120
  ```ts
121
121
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
@@ -127,7 +127,7 @@ errors: [
127
127
  ],
128
128
  async handler(input, ctx) {
129
129
  const item = await db.find(input.id);
130
- if (!item) throw ctx.fail('no_match', `No item ${input.id}`);
130
+ if (!item) throw ctx.fail('no_match', `No item ${input.id}`, ctx.recoveryFor('no_match'));
131
131
  return item;
132
132
  }
133
133
  ```
@@ -190,7 +190,7 @@ src/
190
190
 
191
191
  ## Skills
192
192
 
193
- Skills are modular instructions in `skills/` at the project root. Read them directly when a task matches — e.g., `skills/add-tool/SKILL.md` when adding a tool.
193
+ Skills are modular instructions in `skills/` at the project root. Read them directly when a task matches — e.g., `skills/add-tool/SKILL.md` when adding a tool. `bun run list-skills` prints the full registry.
194
194
 
195
195
  **Agent skill directory:** Copy skills into the directory your agent discovers (Claude Code: `.claude/skills/`, others: equivalent). Skills then load as context without referencing `skills/` paths. After framework updates, run the `maintenance` skill — Phase B re-syncs the agent directory.
196
196
 
@@ -210,7 +210,6 @@ Available skills:
210
210
  | `tool-defs-analysis` | Read-only audit of MCP definition language across the surface — voice, leaks, defaults, recovery hints, output descriptions |
211
211
  | `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
212
212
  | `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
213
- | `devcheck` | Lint, format, typecheck, audit |
214
213
  | `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
215
214
  | `git-wrapup` | Land working-tree changes as a versioned commit + annotated tag — version bump, changelog, verify, tag. Local only. |
216
215
  | `release-and-publish` | Push + npm + MCP Registry + GH Release + Docker. Picks up from `git-wrapup` |
@@ -218,12 +217,14 @@ Available skills:
218
217
  | `orchestrations` | Chain task skills into a gated multi-phase pipeline — build-out, QA-fix, update-ship — when you can spawn sub-agents |
219
218
  | `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
220
219
  | `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
220
+ | `techniques` | Catalog of response/data-shaping techniques — overflow handling, payload shaping, retrieval patterns |
221
221
  | `api-auth` | Auth modes, scopes, JWT/OAuth |
222
222
  | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
223
223
  | `api-config` | AppConfig, parseConfig, env vars |
224
224
  | `api-context` | Context interface, logger, state, progress |
225
225
  | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
226
226
  | `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
227
+ | `api-mirror` | MirrorService: persistent self-refreshing local mirror (embedded SQLite + FTS5) of a bulk upstream dataset — Tier 3 opt-in |
227
228
  | `api-services` | LLM, Speech, Graph services |
228
229
  | `api-testing` | createMockContext, test patterns |
229
230
  | `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
@@ -238,7 +239,7 @@ When you complete a skill's checklist, check the boxes and add a completion time
238
239
 
239
240
  ## Commands
240
241
 
241
- **Runtime:** Scripts use `bun run` — both `npm run <cmd>` and `bun run <cmd>` work.
242
+ **Runtime:** Scripts use Bun's native TypeScript execution — `bun run <cmd>` is the standard invocation. `npm run <cmd>` also works (npm delegates to bun).
242
243
 
243
244
  | Command | Purpose |
244
245
  |:--------|:--------|
@@ -247,21 +248,24 @@ When you complete a skill's checklist, check the boxes and add a completion time
247
248
  | `bun run clean` | Remove build artifacts |
248
249
  | `bun run devcheck` | Lint + format + typecheck + security + changelog sync |
249
250
  | `bun run audit:refresh` | Delete `bun.lock`, reinstall, and re-run `bun audit`. Use when `devcheck` flags a transitive advisory — Bun's `update` is sticky on transitive resolutions, so the advisory may be a stale-lockfile false positive. If it survives the refresh, it's real. |
251
+ | `bun run lint:mcp` | Run the MCP definition linter standalone (rule catalog: `api-linter` skill) |
252
+ | `bun run lint:packaging` | Packaging surface checks — `server.json`/`manifest.json` env-var parity (run by devcheck) |
253
+ | `bun run list-skills` | Print the skill registry |
250
254
  | `bun run tree` | Generate directory structure doc |
251
255
  | `bun run format` | Auto-fix formatting (safe fixes only) |
252
256
  | `bun run format:unsafe` | Also apply Biome's unsafe autofixes — review the diff; they can change behavior |
253
- | `bun run test` | Run tests |
257
+ | `bun run test` | Run tests (Vitest — use `bun run test`, not `bun test`) |
254
258
  | `bun run start:stdio` | Production mode (stdio) |
255
259
  | `bun run start:http` | Production mode (HTTP) |
256
260
  | `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
257
261
  | `bun run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
258
- | `bun run bundle` | Build and pack as `.mcpb` for one-click Claude Desktop install |
262
+ | `bun run bundle` | Build, pack, and clean a `.mcpb` for one-click Claude Desktop install |
259
263
 
260
264
  ---
261
265
 
262
266
  ## Bundling
263
267
 
264
- `npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. 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.
268
+ `npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips dependency-shipped agent docs (`node_modules/**` `skills/`, `.claude/`, `.agents/`, `SKILL.md`) that root-anchored `.mcpbignore` patterns cannot reach. 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.
265
269
 
266
270
  **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.
267
271
 
@@ -279,14 +283,14 @@ Each per-version file opens with YAML frontmatter:
279
283
  ---
280
284
  summary: "One-line headline, ≤350 chars" # required — powers the rollup index
281
285
  breaking: false # optional — true flags breaking changes
282
- security: false # optional — true flags security fixes
286
+ security: false # optional — true ONLY for a source-code security fix, never a dependency CVE bump
283
287
  ---
284
288
 
285
289
  # 0.1.0 — YYYY-MM-DD
286
290
  ...
287
291
  ```
288
292
 
289
- `breaking: true` renders a `· ⚠️ Breaking` badge — use it when consumers must update code on upgrade (signature changes, removed APIs, config renames). `security: true` renders a `· 🛡️ Security` badge and pairs with a `## Security` body section. When both are set, badges render `· ⚠️ Breaking · 🛡️ Security`.
293
+ `breaking: true` renders a `· ⚠️ Breaking` badge — use it when consumers must update code on upgrade (signature changes, removed APIs, config renames). `security: true` renders a `· 🛡️ Security` badge and pairs with a `## Security` body section — set it only for a security fix in this server's *own source code*, never for a routine dependency or transitive CVE bump (record those under `## Dependencies`). When both are set, badges render `· ⚠️ Breaking · 🛡️ Security`.
290
294
 
291
295
  `agent-notes` is an optional free-form field for maintenance agents processing the release downstream. Content here won't appear in the rendered CHANGELOG — it's consumed by agents running the `maintenance` skill. Use it for adoption instructions that don't fit the human-facing sections: new files to create, fields to populate, one-time migration steps. Omit entirely when there's nothing to say.
292
296
 
package/Dockerfile CHANGED
@@ -4,15 +4,17 @@
4
4
  # This stage installs all dependencies (including dev), builds the TypeScript
5
5
  # source code into JavaScript, and prepares the production assets.
6
6
  # ==============================================================================
7
- FROM oven/bun:1.3 AS build
7
+ FROM oven/bun:1.3.14 AS build
8
8
 
9
9
  WORKDIR /usr/src/app
10
10
 
11
11
  # Copy dependency manifests for optimized layer caching
12
12
  COPY package.json bun.lock ./
13
13
 
14
- # Install all dependencies (including dev dependencies for building)
15
- RUN bun install --frozen-lockfile
14
+ # Install all dependencies (including dev dependencies for building).
15
+ # The BuildKit cache mount persists Bun's global package cache across builds.
16
+ RUN --mount=type=cache,target=/root/.bun/install/cache \
17
+ bun install --frozen-lockfile --ignore-scripts
16
18
 
17
19
  # Copy the rest of the source code
18
20
  COPY . .
@@ -28,7 +30,7 @@ RUN bun run build
28
30
  # application. It uses a slim base image and only includes production
29
31
  # dependencies and build artifacts.
30
32
  # ==============================================================================
31
- FROM oven/bun:1.3-slim AS production
33
+ FROM oven/bun:1.3.14-slim AS production
32
34
 
33
35
  WORKDIR /usr/src/app
34
36
 
@@ -50,13 +52,15 @@ COPY package.json bun.lock ./
50
52
 
51
53
  # Install only production dependencies, ignoring any lifecycle scripts (like 'prepare')
52
54
  # that are not needed in the final production image.
53
- RUN bun install --production --frozen-lockfile --ignore-scripts
55
+ RUN --mount=type=cache,target=/root/.bun/install/cache \
56
+ bun install --production --frozen-lockfile --ignore-scripts
54
57
 
55
58
  # Conditionally install OpenTelemetry optional peer dependencies (Tier 3).
56
59
  # These are not bundled by default to keep the base image lean. Enable at build time
57
60
  # with: docker build --build-arg OTEL_ENABLED=true
58
61
  ARG OTEL_ENABLED=true
59
- RUN if [ "$OTEL_ENABLED" = "true" ]; then \
62
+ RUN --mount=type=cache,target=/root/.bun/install/cache \
63
+ if [ "$OTEL_ENABLED" = "true" ]; then \
60
64
  bun add @hono/otel \
61
65
  @opentelemetry/instrumentation-http \
62
66
  @opentelemetry/exporter-metrics-otlp-http \
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.1.8-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-^1.29.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-^6.0.3-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.11-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.1.10-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-^1.29.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-^6.0.3-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.14-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -36,7 +36,7 @@ Six tools covering the full NOAA SWPC space weather surface — from a quick sta
36
36
  | `noaa_spaceweather_get_conditions` | Current space-weather snapshot: NOAA R/S/G storm scales, latest Kp, and a plain-language status summary |
37
37
  | `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 |
38
38
  | `noaa_spaceweather_get_aurora_forecast` | OVATION model aurora forecast: global probability grid, optional local lookup by coordinates with go/no-go verdict |
39
- | `noaa_spaceweather_get_solar_wind` | Real-time solar wind from DSCOVR: speed, proton density, temperature, and the critical Bz component — explains why current geomagnetic conditions exist |
39
+ | `noaa_spaceweather_get_solar_wind` | Real-time solar wind from the active L1 spacecraft: speed, proton density, temperature, and the critical Bz component — explains why current geomagnetic conditions exist |
40
40
  | `noaa_spaceweather_get_solar_activity` | Solar flare picture: GOES X-ray flux, 3-day flare-class probabilities, active solar regions with per-region probabilities, and solar radiation storm level |
41
41
  | `noaa_spaceweather_get_alerts` | Active SWPC alerts, watches, and warnings — structured records with product type, severity, issue time, validity window, and full message text |
42
42
 
@@ -73,9 +73,11 @@ OVATION model aurora probability at 1° resolution, updated every ~5 minutes.
73
73
 
74
74
  ### `noaa_spaceweather_get_solar_wind`
75
75
 
76
- DSCOVR satellite real-time solar wind plasma and magnetic field.
76
+ Real-time solar wind plasma and magnetic field from SWPC's RTSW feeds.
77
77
 
78
- - `window_hours` parameter (1–168, default 3) — time series sliced client-side from 7-day feed
78
+ - Reads the spacecraft SWPC flags as active; every record names its `source`, so no satellite is assumed
79
+ - `window_hours` parameter (1–168, default 3) — sliced client-side from a feed that carries roughly the last 24 hours at 1-minute cadence
80
+ - Reports `latestFeedPlasmaTime`, `latestFeedMagTime`, and `feedStalenessHours` so an empty window is distinguishable from a stale feed
79
81
  - Plasma: speed (km/s), proton density (n/cm³), temperature
80
82
  - Bz component (southward Bz = storm driver) surfaced prominently in output and format
81
83
  - Bt (total field magnitude) and GSM vector components
@@ -119,7 +121,7 @@ Space weather domain:
119
121
 
120
122
  - All SWPC feeds are public and keyless — no API keys required
121
123
  - Single `SpaceWeatherService` wraps all six NOAA SWPC JSON feeds with `fetchWithTimeout` + `withRetry`
122
- - Heterogeneous feed normalization: array-of-arrays (solar wind), keyed objects (storm scales), coordinate triples (OVATION)
124
+ - Heterogeneous feed normalization: interleaved multi-spacecraft records (solar wind), keyed objects (storm scales), coordinate triples (OVATION)
123
125
  - NOAA scale interpretation: raw Kp 6 → "G2 moderate storm — aurora possible to ~55° geomagnetic latitude"
124
126
  - Feed freshness surfaced per-response: solar wind updates ~1 min, aurora ~5 min, Kp 3-hour intervals
125
127
 
@@ -0,0 +1,34 @@
1
+ ---
2
+ summary: "get_solar_wind ports from the removed DSCOVR feeds to SWPC's RTSW feeds, adding a per-record spacecraft source and feed-freshness reporting for empty windows; mcp-ts-core ^0.10.10 → ^0.10.14 with new supply-chain install guards"
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.1.10 — 2026-07-15
8
+
9
+ ## Added
10
+
11
+ - **`get_solar_wind` `source` field** — every plasma and magnetic-field record now names its reporting spacecraft (e.g. `SOLAR1`), replacing the hardcoded `DSCOVR` label the removed feed never actually confirmed.
12
+ - **`get_solar_wind` feed-freshness reporting** — `latestFeedPlasmaTime`, `latestFeedMagTime`, and `feedStalenessHours` are read from the unwindowed RTSW series and always populated, so an empty requested window can be told apart from a stale feed. An `enrichment.notice` explains an empty window in both `content[]` and `structuredContent` rather than returning a bare empty array ([#20](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/20)).
13
+ - **Supply-chain install guards** — `bunfig.toml` adds a 3-day `minimumReleaseAge` gate on new package installs (`@cyanheads/mcp-ts-core` excluded — first-party, adopted same-day) and wires `@socketsecurity/bun-security-scanner` as the install scanner.
14
+
15
+ ## Changed
16
+
17
+ - **`window_hours`** keeps its 1–168 range on `get_solar_wind` even though the RTSW feed spans roughly 24 hours — narrowing it would reject inputs that used to be valid for no gain, since an over-wide window just returns the whole feed instead of erroring.
18
+ - **Dockerfile** pins `oven/bun:1.3.14` (was a floating `1.3`/`1.3-slim` tag) and adds BuildKit cache mounts for `bun install` layers.
19
+
20
+ ## Fixed
21
+
22
+ - **`get_solar_wind`** no longer 404s on every call. SWPC removed the entire `/products/solar-wind/` directory the tool depended on; it now reads the RTSW replacement feeds (`/json/rtsw/rtsw_wind_1m.json`, `/json/rtsw/rtsw_mag_1m.json`), filtered to the spacecraft SWPC flags `active` (the feed interleaves ACE/IMAP/SOLAR1 and `overall_quality` is uniformly `0`, so `active` is the only discriminating signal) and sorted oldest-first to match the tool's chronological contract ([#21](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/21)).
23
+ - **Solar wind window filtering** now compares epoch milliseconds instead of ISO strings — RTSW time tags carry no milliseconds and didn't collate reliably against a `toISOString()` cutoff that does.
24
+
25
+ ## Dependencies
26
+
27
+ - **`@cyanheads/mcp-ts-core`** ^0.10.10 → ^0.10.14
28
+ - **`@biomejs/biome`** ^2.5.1 → ^2.5.3
29
+ - **`@types/node`** ^26.0.1 → ^26.1.1
30
+ - **`ignore`** ^7.0.5 → ^7.0.6
31
+ - **`tsc-alias`** ^1.8.17 → ^1.9.0
32
+ - **`vitest`** ^4.1.9 → ^4.1.10
33
+ - **`@socketsecurity/bun-security-scanner`** ^1.1.2 — new
34
+ - bun `packageManager` pin 1.3.11 → 1.3.14
@@ -0,0 +1,24 @@
1
+ ---
2
+ summary: "get_solar_activity gains date-neutral flare-probability aliases alongside the *1Day fields; get_kp_index and get_solar_activity window filters switch to epoch comparison; SWPC User-Agent tracks the package version; mcp-ts-core ^0.10.10 clears the moderate js-yaml advisory (GHSA-h67p-54hq-rp68)"
3
+ breaking: false
4
+ security: true
5
+ ---
6
+
7
+ # 0.1.9 — 2026-06-30
8
+
9
+ ## Added
10
+
11
+ - **`get_solar_activity` date-neutral probability aliases** — each flare-probability object now carries `cClassProbability`, `mClassProbability`, `xClassProbability`, and `protonEventProbability` alongside the retained `cClass1Day`/`mClass1Day`/`xClass1Day`/`protons1Day` fields. The `*1Day` names misdescribe forecast days two and three (each object already carries its own `date`); the aliases read correctly for every date and always hold the same value as their legacy counterpart. `format()` renders both namings so `content[]` and `structuredContent` stay in parity. Additive — no field removed ([#16](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/16)).
12
+
13
+ ## Changed
14
+
15
+ - **SWPC `User-Agent`** is now built from the running server version (`config.mcpServerVersion`) via `buildUserAgent()`, replacing the hardcoded `noaa-spaceweather-mcp-server/0.1.1` that drifted from `package.json` on every release. Product token and contact URL unchanged ([#15](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/15)).
16
+ - **`@cyanheads/mcp-ts-core`** ^0.10.9 → ^0.10.10.
17
+
18
+ ## Fixed
19
+
20
+ - **`get_kp_index` and `get_solar_activity` window filters** now compare epoch values (`new Date(timeTag).getTime()`) instead of raw ISO strings. Kp and X-ray `timeTag` values carry no fractional seconds while the `toISOString()` cutoff always emits `.mmm`, so lexicographic `>=` could mis-include or mis-exclude a reading exactly at the window boundary — the same class of bug fixed for `get_alerts` in [#6](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/6) ([#17](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/17)).
21
+
22
+ ## Security
23
+
24
+ - **`js-yaml` advisory cleared** — adopting `@cyanheads/mcp-ts-core` ^0.10.10 and re-resolving the lockfile moves `js-yaml` to `3.15.0`, clearing the moderate denial-of-service advisory [GHSA-h67p-54hq-rp68](https://github.com/advisories/GHSA-h67p-54hq-rp68) (`js-yaml <3.15.0`). `bun audit` now reports 0 vulnerabilities (was 1 moderate).
@@ -15,9 +15,11 @@ summary: ""
15
15
  # usage. Flagged as `Breaking` in the rollup.
16
16
  breaking: false
17
17
 
18
- # Set `true` if this release contains any security fix. Pairs with the
19
- # `## Security` section below. Flagged as `Security` in the rollup so
20
- # users can triage upgrade urgency at a glance.
18
+ # Set `true` ONLY for a security fix in THIS project's own source code — a
19
+ # vulnerability or hardening in code you ship. A dependency or transitive CVE
20
+ # bump is routine maintenance, NOT a security release: record it under
21
+ # `## Dependencies` (with the advisory ID) and leave this `false`. When true,
22
+ # pairs with the `## Security` section below and flags `Security` in the rollup.
21
23
  security: false
22
24
 
23
25
  # Optional free-form notes for maintenance agents processing this release.
@@ -1 +1 @@
1
- {"version":3,"file":"get-kp-index.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-kp-index.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAgCjE,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA2HrB,CAAC"}
1
+ {"version":3,"file":"get-kp-index.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-kp-index.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAgCjE,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA8HrB,CAAC"}
@@ -74,11 +74,14 @@ export const getKpIndex = tool('noaa_spaceweather_get_kp_index', {
74
74
  ctx.log.info('Fetching Kp index', { window_days: input.window_days });
75
75
  const svc = getSpaceWeatherService();
76
76
  const [allObs, forecast] = await Promise.all([svc.getKpObserved(ctx), svc.getKpForecast(ctx)]);
77
- // Slice to the requested window
77
+ // Slice to the requested window. Compare epochs, not raw ISO strings: Kp
78
+ // timeTags carry no fractional seconds while toISOString() always emits
79
+ // .mmm, so lexicographic >= disagrees with true chronology at the window
80
+ // boundary (same class of bug already fixed in get-alerts, #6).
78
81
  const cutoff = new Date();
79
82
  cutoff.setDate(cutoff.getDate() - input.window_days);
80
- const cutoffIso = cutoff.toISOString();
81
- const observed = allObs.filter((r) => r.timeTag >= cutoffIso);
83
+ const cutoffMs = cutoff.getTime();
84
+ const observed = allObs.filter((r) => new Date(r.timeTag).getTime() >= cutoffMs);
82
85
  const latest = observed.length > 0 ? observed[observed.length - 1] : null;
83
86
  const currentKp = latest?.kp ?? 0;
84
87
  const currentGScale = latest?.gScale ?? 0;
@@ -1 +1 @@
1
- {"version":3,"file":"get-kp-index.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-kp-index.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,sBAAsB,EACtB,UAAU,GACX,MAAM,mDAAmD,CAAC;AAE3D,MAAM,WAAW,GAAG,CAAC;KAClB,MAAM,CAAC;IACN,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;IAClE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;IAC9C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;IAC7D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;IACnE,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+CAA+C,CAAC;CACrF,CAAC;KACD,QAAQ,CAAC,0CAA0C,CAAC,CAAC;AAExD,MAAM,gBAAgB,GAAG,CAAC;KACvB,MAAM,CAAC;IACN,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;IAC5E,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;IAC/C,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,QAAQ,CAAC,+EAA+E,CAAC;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K,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -22,9 +22,13 @@ export declare const getSolarActivity: import("@cyanheads/mcp-ts-core").ToolDefi
22
22
  probabilities: z.ZodArray<z.ZodObject<{
23
23
  date: z.ZodString;
24
24
  cClass1Day: z.ZodNumber;
25
+ cClassProbability: z.ZodNumber;
25
26
  mClass1Day: z.ZodNumber;
27
+ mClassProbability: z.ZodNumber;
26
28
  xClass1Day: z.ZodNumber;
29
+ xClassProbability: z.ZodNumber;
27
30
  protons1Day: z.ZodNumber;
31
+ protonEventProbability: z.ZodNumber;
28
32
  }, z.core.$strip>>;
29
33
  latestProton: z.ZodNullable<z.ZodObject<{
30
34
  timeTag: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"get-solar-activity.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-solar-activity.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA0FjE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkM3B,CAAC"}
1
+ {"version":3,"file":"get-solar-activity.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-solar-activity.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA8GjE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA8M3B,CAAC"}
@@ -73,10 +73,22 @@ const SolarRegionSchema = z
73
73
  const ProbsSchema = z
74
74
  .object({
75
75
  date: z.string().describe('Forecast date.'),
76
- cClass1Day: z.number().describe('Total probability of a C-class flare for this day (%).'),
77
- mClass1Day: z.number().describe('Total probability of an M-class flare for this day (%).'),
78
- xClass1Day: z.number().describe('Total probability of an X-class flare for this day (%).'),
79
- protons1Day: z.number().describe('Probability of ≥10 MeV proton event for this day (%).'),
76
+ cClass1Day: z.number().describe('Total probability of a C-class flare for this date (%).'),
77
+ cClassProbability: z
78
+ .number()
79
+ .describe('Total probability of a C-class flare for this date (%). Date-neutral alias of cClass1Day.'),
80
+ mClass1Day: z.number().describe('Total probability of an M-class flare for this date (%).'),
81
+ mClassProbability: z
82
+ .number()
83
+ .describe('Total probability of an M-class flare for this date (%). Date-neutral alias of mClass1Day.'),
84
+ xClass1Day: z.number().describe('Total probability of an X-class flare for this date (%).'),
85
+ xClassProbability: z
86
+ .number()
87
+ .describe('Total probability of an X-class flare for this date (%). Date-neutral alias of xClass1Day.'),
88
+ protons1Day: z.number().describe('Probability of a ≥10 MeV proton event for this date (%).'),
89
+ protonEventProbability: z
90
+ .number()
91
+ .describe('Probability of a ≥10 MeV proton event for this date (%). Date-neutral alias of protons1Day.'),
80
92
  })
81
93
  .describe('Solar flare probability forecast for one day.');
82
94
  const ProtonSchema = z
@@ -149,12 +161,15 @@ export const getSolarActivity = tool('noaa_spaceweather_get_solar_activity', {
149
161
  satellite: latestXrayRaw.satellite,
150
162
  }
151
163
  : null;
152
- // Recent X-ray — last hour
164
+ // Recent X-ray — last hour. Compare epochs, not raw ISO strings: X-ray
165
+ // timeTags carry no fractional seconds while toISOString() always emits
166
+ // .mmm, so lexicographic >= disagrees with true chronology at the window
167
+ // boundary (same class of bug already fixed in get-alerts, #6).
153
168
  const hourCutoff = new Date();
154
169
  hourCutoff.setHours(hourCutoff.getHours() - 1);
155
- const hourCutoffIso = hourCutoff.toISOString();
170
+ const hourCutoffMs = hourCutoff.getTime();
156
171
  const recentXray = xray
157
- .filter((r) => r.timeTag >= hourCutoffIso)
172
+ .filter((r) => new Date(r.timeTag).getTime() >= hourCutoffMs)
158
173
  .map((r) => ({
159
174
  timeTag: r.timeTag,
160
175
  fluxWm2: formatFlux(r.fluxWm2),
@@ -188,9 +203,13 @@ export const getSolarActivity = tool('noaa_spaceweather_get_solar_activity', {
188
203
  probabilities: probs.map((p) => ({
189
204
  date: p.date,
190
205
  cClass1Day: p.cClass1Day,
206
+ cClassProbability: p.cClassProbability,
191
207
  mClass1Day: p.mClass1Day,
208
+ mClassProbability: p.mClassProbability,
192
209
  xClass1Day: p.xClass1Day,
210
+ xClassProbability: p.xClassProbability,
193
211
  protons1Day: p.protons1Day,
212
+ protonEventProbability: p.protonEventProbability,
194
213
  })),
195
214
  latestProton,
196
215
  sScale,
@@ -238,7 +257,10 @@ export const getSolarActivity = tool('noaa_spaceweather_get_solar_activity', {
238
257
  lines.push('');
239
258
  lines.push('### Flare Probabilities (3-day forecast)');
240
259
  for (const p of result.probabilities) {
241
- lines.push(`**${p.date}:** C=${p.cClass1Day}% | M=${p.mClass1Day}% | X=${p.xClass1Day}% | Proton=${p.protons1Day}%`);
260
+ lines.push(`**${p.date}:** C=${p.cClassProbability}% | M=${p.mClassProbability}% | X=${p.xClassProbability}% | Proton=${p.protonEventProbability}%`);
261
+ // The legacy *1Day fields carry the same values; rendered so content[]
262
+ // stays in parity with structuredContent across both field namings (#16).
263
+ lines.push(` (legacy: cClass1Day=${p.cClass1Day}% mClass1Day=${p.mClass1Day}% xClass1Day=${p.xClass1Day}% protons1Day=${p.protons1Day}%)`);
242
264
  }
243
265
  }
244
266
  if (result.activeRegions.length > 0) {