@cyanheads/astronomy-mcp-server 0.4.1 → 0.4.3

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 (58) hide show
  1. package/AGENTS.md +16 -12
  2. package/CLAUDE.md +16 -12
  3. package/Dockerfile +3 -3
  4. package/README.md +39 -14
  5. package/changelog/0.4.x/0.4.2.md +37 -0
  6. package/changelog/0.4.x/0.4.3.md +28 -0
  7. package/dist/mcp-server/prompts/definitions/stargazing-plan.prompt.js +1 -1
  8. package/dist/mcp-server/prompts/definitions/stargazing-plan.prompt.js.map +1 -1
  9. package/dist/mcp-server/tools/definitions/find-events.tool.d.ts +31 -4
  10. package/dist/mcp-server/tools/definitions/find-events.tool.d.ts.map +1 -1
  11. package/dist/mcp-server/tools/definitions/find-events.tool.js +96 -24
  12. package/dist/mcp-server/tools/definitions/find-events.tool.js.map +1 -1
  13. package/dist/mcp-server/tools/definitions/get-ephemeris.tool.d.ts +29 -7
  14. package/dist/mcp-server/tools/definitions/get-ephemeris.tool.d.ts.map +1 -1
  15. package/dist/mcp-server/tools/definitions/get-ephemeris.tool.js +221 -46
  16. package/dist/mcp-server/tools/definitions/get-ephemeris.tool.js.map +1 -1
  17. package/dist/mcp-server/tools/definitions/get-moon-phase.tool.d.ts.map +1 -1
  18. package/dist/mcp-server/tools/definitions/get-moon-phase.tool.js +1 -0
  19. package/dist/mcp-server/tools/definitions/get-moon-phase.tool.js.map +1 -1
  20. package/dist/mcp-server/tools/definitions/get-rise-set.tool.d.ts +49 -2
  21. package/dist/mcp-server/tools/definitions/get-rise-set.tool.d.ts.map +1 -1
  22. package/dist/mcp-server/tools/definitions/get-rise-set.tool.js +85 -43
  23. package/dist/mcp-server/tools/definitions/get-rise-set.tool.js.map +1 -1
  24. package/dist/mcp-server/tools/definitions/get-satellite-passes.tool.d.ts +27 -3
  25. package/dist/mcp-server/tools/definitions/get-satellite-passes.tool.d.ts.map +1 -1
  26. package/dist/mcp-server/tools/definitions/get-satellite-passes.tool.js +98 -23
  27. package/dist/mcp-server/tools/definitions/get-satellite-passes.tool.js.map +1 -1
  28. package/dist/mcp-server/tools/definitions/get-sky-position.tool.d.ts.map +1 -1
  29. package/dist/mcp-server/tools/definitions/get-sky-position.tool.js +1 -0
  30. package/dist/mcp-server/tools/definitions/get-sky-position.tool.js.map +1 -1
  31. package/dist/mcp-server/tools/definitions/list-visible.tool.d.ts.map +1 -1
  32. package/dist/mcp-server/tools/definitions/list-visible.tool.js +1 -0
  33. package/dist/mcp-server/tools/definitions/list-visible.tool.js.map +1 -1
  34. package/dist/services/ephemeris/ephemeris-service.d.ts +86 -14
  35. package/dist/services/ephemeris/ephemeris-service.d.ts.map +1 -1
  36. package/dist/services/ephemeris/ephemeris-service.js +455 -100
  37. package/dist/services/ephemeris/ephemeris-service.js.map +1 -1
  38. package/dist/services/ephemeris/iso-time.d.ts +2 -2
  39. package/dist/services/ephemeris/iso-time.js +5 -5
  40. package/dist/services/ephemeris/types.d.ts +42 -1
  41. package/dist/services/ephemeris/types.d.ts.map +1 -1
  42. package/dist/services/ephemeris/types.js +16 -0
  43. package/dist/services/ephemeris/types.js.map +1 -1
  44. package/dist/services/horizons/horizons-service.d.ts +25 -3
  45. package/dist/services/horizons/horizons-service.d.ts.map +1 -1
  46. package/dist/services/horizons/horizons-service.js +154 -15
  47. package/dist/services/horizons/horizons-service.js.map +1 -1
  48. package/dist/services/horizons/types.d.ts +8 -4
  49. package/dist/services/horizons/types.d.ts.map +1 -1
  50. package/dist/services/satellite/satellite-service.d.ts +48 -10
  51. package/dist/services/satellite/satellite-service.d.ts.map +1 -1
  52. package/dist/services/satellite/satellite-service.js +215 -102
  53. package/dist/services/satellite/satellite-service.js.map +1 -1
  54. package/dist/services/satellite/types.d.ts +36 -2
  55. package/dist/services/satellite/types.d.ts.map +1 -1
  56. package/dist/services/satellite/types.js.map +1 -1
  57. package/package.json +10 -9
  58. package/server.json +3 -3
package/AGENTS.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** astronomy-mcp-server
4
- **Version:** 0.4.1
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.14`
4
+ **Version:** 0.4.3
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.16`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
- **MCP SDK:** `@modelcontextprotocol/server` ^2.2.0
8
- **Zod:** ^4.6.5
7
+ **MCP SDK:** `@modelcontextprotocol/server` ^2.3.1
8
+ **Zod:** ^4.6.7
9
9
 
10
10
  > **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
11
11
 
@@ -20,17 +20,17 @@ Observational astronomy, computed in-process. The core is keyless and offline
20
20
  | Tool | What it computes |
21
21
  |:-----|:-----------------|
22
22
  | `astronomy_get_sky_position` | Apparent topocentric position of one body or named star — equatorial / horizontal / ecliptic, magnitude, angular diameter, phase, Sun elongation, constellation |
23
- | `astronomy_get_rise_set` | Rise / set / transit cycles, plus twilight bands for the Sun; circumpolar / never-rises notes |
23
+ | `astronomy_get_rise_set` | Rise / set / transit cycles (31 per call), plus twilight bands for the Sun and `night_in_progress` when the start falls at night; circumpolar / never-rises notes |
24
24
  | `astronomy_get_moon_phase` | Phase longitude, illumination, synodic age, next four quarter phases |
25
- | `astronomy_find_events` | Next N of: equinox, solstice, moon_quarter, lunar/solar eclipse, opposition, conjunction, max_elongation, perigee_apogee |
25
+ | `astronomy_find_events` | Next N (20 per call) of: equinox, solstice, moon_quarter, lunar/solar eclipse, opposition, conjunction (with the Sun, or two bodies via `body2`), max_elongation, perigee_apogee |
26
26
  | `astronomy_list_visible` | One-call "what is up now" — naked-eye bodies (+ optional catalog stars) above the horizon, ranked, with a sky-condition gate |
27
27
 
28
28
  Plus the `astronomy://body/{body}` resource (static reference card) and the `astronomy_stargazing_plan` prompt (chains the tools for a "plan tonight from <place>" workflow).
29
29
 
30
30
  **Two gated, network-backed extensions** register only when their env gate is on (default deployment is keyless + offline):
31
31
 
32
- - `astronomy_get_ephemeris` — small-body / spacecraft ephemeris from JPL Horizons. Gate: `ASTRONOMY_ENABLE_HORIZONS`.
33
- - `astronomy_get_satellite_passes` — visible passes via a CelesTrak TLE propagated with SGP4 offline. Gate: `ASTRONOMY_ENABLE_SATELLITES`.
32
+ - `astronomy_get_ephemeris` — small-body / spacecraft ephemeris from JPL Horizons, one page of up to 200 rows per call. Gate: `ASTRONOMY_ENABLE_HORIZONS`.
33
+ - `astronomy_get_satellite_passes` — visible passes (kept by their sunlit, dark-sky stretch, returned as `visible_*`) via a CelesTrak TLE propagated with SGP4 offline, 10 days per call. Gate: `ASTRONOMY_ENABLE_SATELLITES`.
34
34
 
35
35
  Both extension services carry their own timeout + retry boundary, cache nothing on disk (Horizons is stateless; the satellite TLE cache is an in-process TTL `Map`), and degrade loudly — on any upstream failure they catch the framework's status-mapped `McpError` and re-throw a clean typed domain error (`{ reason, recovery }`, no `statusCode` / `responseBody` / `requestId` / internal URL), carrying the original as `cause` for server-side logs only. They never substitute core output.
36
36
 
@@ -45,6 +45,7 @@ Both extension services carry their own timeout + retry boundary, cache nothing
45
45
  - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
46
46
  - **Need input the caller didn't supply?** `return ctx.requestInput(...)` and read `ctx.inputs` when the handler is re-entered. Never `await` for user input mid-handler. No handler here does — every tool is a pure computation over its arguments, which is why the server runs stateless.
47
47
  - **Secrets in env vars only** — never hardcoded.
48
+ - **Cut noise.** Add only what earns its place: no speculative generality, no guards for states the framework already prevents (Zod-validated params, classified errors), no abstraction until a third caller proves it, no option nothing sets.
48
49
  - **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed and close it. Do both — a comment without a close leaves stale issues open; a close without a comment leaves no record of what shipped. The comment is for future readers — state the concrete changes, not the conversation that produced them.
49
50
 
50
51
  ---
@@ -238,7 +239,7 @@ Handlers throw — the framework catches, classifies, and formats.
238
239
 
239
240
  **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. The framework puts it on the wire whenever a failure carrying that `reason` arrives without a hint — a bare `ctx.fail('reason')` or a service throw with `data: { reason }` — as `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. Every error envelope also carries `data.requestId`, the id the server's log records for that call carry, and `content[]` closes with `(reason … · request <id>)`. 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.
240
241
 
241
- Most of this server's declared reasons are raised below the handler — `EphemerisService.resolveTime()` / `resolveTimezone()` / `lookupStar()`, `resolveBody()`, and the two extension services — and carry their hint inline because those call sites take no `ctx`. Those entries are marked `thrownBy: 'service'`; the handler-local preconditions (`find_events`'s `incomplete_observer` and `body_required`, `invalid_target`, the `get_ephemeris` argument gates, `unknown_body`) are the ones that throw through `ctx.fail`. A contract entry whose hint is written at a service throw site must repeat that string verbatim, since nothing links the two — `tests/tools/error-contract-coverage.test.ts` holds both halves of that line.
242
+ Most of this server's declared reasons are raised below the handler — `EphemerisService.resolveTime()` / `resolveTimezone()` / `lookupStar()`, `resolveBody()` / `resolvePair()`, and the two extension services — and carry their hint inline because those call sites take no `ctx` — except `resolveTime()`'s `time_out_of_range`, which carries none, so each calling tool's declared `recovery` fills it (the `start` tools say "start date", and `get_satellite_passes` names the element set's epoch). Those entries are marked `thrownBy: 'service'`; the handler-local preconditions (`find_events`'s `incomplete_observer` and `body_required`, `invalid_target`, the `get_ephemeris` argument gates, `unknown_body`) are the ones that throw through `ctx.fail`. A contract entry whose hint is written at a service throw site must repeat that string verbatim, since nothing links the two — `tests/tools/error-contract-coverage.test.ts` holds both halves of that line.
242
243
 
243
244
  ```ts
244
245
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
@@ -271,7 +272,7 @@ throw new Error('Invalid query format'); // → ValidationError
271
272
 
272
273
  // McpError — when no factory exists for the code
273
274
  import { McpError, JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
274
- throw new McpError(JsonRpcErrorCode.DatabaseError, 'Connection failed', { pool: 'primary' });
275
+ throw new McpError(JsonRpcErrorCode.InitializationFailed, 'Connection failed', { pool: 'primary' });
275
276
  ```
276
277
 
277
278
  See framework CLAUDE.md and the `api-errors` skill for the full auto-classification table, all available factories, and the contract reference.
@@ -371,7 +372,8 @@ When you complete a skill's checklist, check the boxes and add a completion time
371
372
  | `bun run rebuild` | Clean + build |
372
373
  | `bun run clean` | Remove build artifacts |
373
374
  | `bun run devcheck` | Lint + format + typecheck + security + changelog sync |
374
- | `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. |
375
+ | `bun run audit:fix` | `bun audit fix` — upgrade vulnerable packages to the lowest safe version within existing ranges (`--dry-run` previews, `--latest` rewrites ranges). First response when `devcheck` flags a transitive advisory; then `bun update <name>`, then `bun dedupe` |
376
+ | `bun run audit:refresh` | Delete `bun.lock` and reinstall. Last resort after `audit:fix`, `bun update <name>`, and `bun dedupe` — re-resolves every ranged dep (the framework pin included) and rewrites the lockfile as `lockfileVersion: 2` |
375
377
  | `bun run lint:mcp` | Run the MCP definition linter standalone (rule catalog: `api-linter` skill) |
376
378
  | `bun run lint:packaging` | Packaging surface checks — `server.json`/`manifest.json` env-var parity (run by devcheck) |
377
379
  | `bun run list-skills` | Print the skill registry |
@@ -387,11 +389,13 @@ When you complete a skill's checklist, check the boxes and add a completion time
387
389
 
388
390
  ---
389
391
 
392
+ **CI is one file.** `.github/workflows/codeql.yml` (scaffolded) is the only GitHub Actions workflow: CodeQL is GitHub-owned end to end, and the file runs only while the repo's CodeQL *default setup* is turned off. Verification — `devcheck`, tests, the release gates — runs locally; don't add a workflow that re-runs it.
393
+
390
394
  ## Bundling
391
395
 
392
396
  `bun 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 two classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs (`framework-skills/`, `skills/`, `.claude/`, `.agents/`, `SKILL.md`) and platform-specific native bindings, which would otherwise lock the bundle to the platform it was packed on. 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.
393
397
 
394
- **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.
398
+ **Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match, that every `user_config` option is wired into `mcp_config.env` as `"X": "${user_config.X}"` (the host substitutes nothing else — `"${X}"` reaches the server as that literal string), and that an optional string option carries `"default": ""`.
395
399
 
396
400
  **README install badges** (Claude Desktop `.mcpb`, Cursor, VS Code) and the `base64` / `encodeURIComponent` config-generation commands are ship-time concerns — run the `polish-docs-meta` skill, which carries the badge format, layout, and generation snippets in `framework-skills/polish-docs-meta/references/readme.md`.
397
401
 
package/CLAUDE.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** astronomy-mcp-server
4
- **Version:** 0.4.1
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.14`
4
+ **Version:** 0.4.3
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.16`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
- **MCP SDK:** `@modelcontextprotocol/server` ^2.2.0
8
- **Zod:** ^4.6.5
7
+ **MCP SDK:** `@modelcontextprotocol/server` ^2.3.1
8
+ **Zod:** ^4.6.7
9
9
 
10
10
  > **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
11
11
 
@@ -20,17 +20,17 @@ Observational astronomy, computed in-process. The core is keyless and offline
20
20
  | Tool | What it computes |
21
21
  |:-----|:-----------------|
22
22
  | `astronomy_get_sky_position` | Apparent topocentric position of one body or named star — equatorial / horizontal / ecliptic, magnitude, angular diameter, phase, Sun elongation, constellation |
23
- | `astronomy_get_rise_set` | Rise / set / transit cycles, plus twilight bands for the Sun; circumpolar / never-rises notes |
23
+ | `astronomy_get_rise_set` | Rise / set / transit cycles (31 per call), plus twilight bands for the Sun and `night_in_progress` when the start falls at night; circumpolar / never-rises notes |
24
24
  | `astronomy_get_moon_phase` | Phase longitude, illumination, synodic age, next four quarter phases |
25
- | `astronomy_find_events` | Next N of: equinox, solstice, moon_quarter, lunar/solar eclipse, opposition, conjunction, max_elongation, perigee_apogee |
25
+ | `astronomy_find_events` | Next N (20 per call) of: equinox, solstice, moon_quarter, lunar/solar eclipse, opposition, conjunction (with the Sun, or two bodies via `body2`), max_elongation, perigee_apogee |
26
26
  | `astronomy_list_visible` | One-call "what is up now" — naked-eye bodies (+ optional catalog stars) above the horizon, ranked, with a sky-condition gate |
27
27
 
28
28
  Plus the `astronomy://body/{body}` resource (static reference card) and the `astronomy_stargazing_plan` prompt (chains the tools for a "plan tonight from <place>" workflow).
29
29
 
30
30
  **Two gated, network-backed extensions** register only when their env gate is on (default deployment is keyless + offline):
31
31
 
32
- - `astronomy_get_ephemeris` — small-body / spacecraft ephemeris from JPL Horizons. Gate: `ASTRONOMY_ENABLE_HORIZONS`.
33
- - `astronomy_get_satellite_passes` — visible passes via a CelesTrak TLE propagated with SGP4 offline. Gate: `ASTRONOMY_ENABLE_SATELLITES`.
32
+ - `astronomy_get_ephemeris` — small-body / spacecraft ephemeris from JPL Horizons, one page of up to 200 rows per call. Gate: `ASTRONOMY_ENABLE_HORIZONS`.
33
+ - `astronomy_get_satellite_passes` — visible passes (kept by their sunlit, dark-sky stretch, returned as `visible_*`) via a CelesTrak TLE propagated with SGP4 offline, 10 days per call. Gate: `ASTRONOMY_ENABLE_SATELLITES`.
34
34
 
35
35
  Both extension services carry their own timeout + retry boundary, cache nothing on disk (Horizons is stateless; the satellite TLE cache is an in-process TTL `Map`), and degrade loudly — on any upstream failure they catch the framework's status-mapped `McpError` and re-throw a clean typed domain error (`{ reason, recovery }`, no `statusCode` / `responseBody` / `requestId` / internal URL), carrying the original as `cause` for server-side logs only. They never substitute core output.
36
36
 
@@ -45,6 +45,7 @@ Both extension services carry their own timeout + retry boundary, cache nothing
45
45
  - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
46
46
  - **Need input the caller didn't supply?** `return ctx.requestInput(...)` and read `ctx.inputs` when the handler is re-entered. Never `await` for user input mid-handler. No handler here does — every tool is a pure computation over its arguments, which is why the server runs stateless.
47
47
  - **Secrets in env vars only** — never hardcoded.
48
+ - **Cut noise.** Add only what earns its place: no speculative generality, no guards for states the framework already prevents (Zod-validated params, classified errors), no abstraction until a third caller proves it, no option nothing sets.
48
49
  - **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed and close it. Do both — a comment without a close leaves stale issues open; a close without a comment leaves no record of what shipped. The comment is for future readers — state the concrete changes, not the conversation that produced them.
49
50
 
50
51
  ---
@@ -238,7 +239,7 @@ Handlers throw — the framework catches, classifies, and formats.
238
239
 
239
240
  **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. The framework puts it on the wire whenever a failure carrying that `reason` arrives without a hint — a bare `ctx.fail('reason')` or a service throw with `data: { reason }` — as `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. Every error envelope also carries `data.requestId`, the id the server's log records for that call carry, and `content[]` closes with `(reason … · request <id>)`. 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.
240
241
 
241
- Most of this server's declared reasons are raised below the handler — `EphemerisService.resolveTime()` / `resolveTimezone()` / `lookupStar()`, `resolveBody()`, and the two extension services — and carry their hint inline because those call sites take no `ctx`. Those entries are marked `thrownBy: 'service'`; the handler-local preconditions (`find_events`'s `incomplete_observer` and `body_required`, `invalid_target`, the `get_ephemeris` argument gates, `unknown_body`) are the ones that throw through `ctx.fail`. A contract entry whose hint is written at a service throw site must repeat that string verbatim, since nothing links the two — `tests/tools/error-contract-coverage.test.ts` holds both halves of that line.
242
+ Most of this server's declared reasons are raised below the handler — `EphemerisService.resolveTime()` / `resolveTimezone()` / `lookupStar()`, `resolveBody()` / `resolvePair()`, and the two extension services — and carry their hint inline because those call sites take no `ctx` — except `resolveTime()`'s `time_out_of_range`, which carries none, so each calling tool's declared `recovery` fills it (the `start` tools say "start date", and `get_satellite_passes` names the element set's epoch). Those entries are marked `thrownBy: 'service'`; the handler-local preconditions (`find_events`'s `incomplete_observer` and `body_required`, `invalid_target`, the `get_ephemeris` argument gates, `unknown_body`) are the ones that throw through `ctx.fail`. A contract entry whose hint is written at a service throw site must repeat that string verbatim, since nothing links the two — `tests/tools/error-contract-coverage.test.ts` holds both halves of that line.
242
243
 
243
244
  ```ts
244
245
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
@@ -271,7 +272,7 @@ throw new Error('Invalid query format'); // → ValidationError
271
272
 
272
273
  // McpError — when no factory exists for the code
273
274
  import { McpError, JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
274
- throw new McpError(JsonRpcErrorCode.DatabaseError, 'Connection failed', { pool: 'primary' });
275
+ throw new McpError(JsonRpcErrorCode.InitializationFailed, 'Connection failed', { pool: 'primary' });
275
276
  ```
276
277
 
277
278
  See framework CLAUDE.md and the `api-errors` skill for the full auto-classification table, all available factories, and the contract reference.
@@ -371,7 +372,8 @@ When you complete a skill's checklist, check the boxes and add a completion time
371
372
  | `bun run rebuild` | Clean + build |
372
373
  | `bun run clean` | Remove build artifacts |
373
374
  | `bun run devcheck` | Lint + format + typecheck + security + changelog sync |
374
- | `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. |
375
+ | `bun run audit:fix` | `bun audit fix` — upgrade vulnerable packages to the lowest safe version within existing ranges (`--dry-run` previews, `--latest` rewrites ranges). First response when `devcheck` flags a transitive advisory; then `bun update <name>`, then `bun dedupe` |
376
+ | `bun run audit:refresh` | Delete `bun.lock` and reinstall. Last resort after `audit:fix`, `bun update <name>`, and `bun dedupe` — re-resolves every ranged dep (the framework pin included) and rewrites the lockfile as `lockfileVersion: 2` |
375
377
  | `bun run lint:mcp` | Run the MCP definition linter standalone (rule catalog: `api-linter` skill) |
376
378
  | `bun run lint:packaging` | Packaging surface checks — `server.json`/`manifest.json` env-var parity (run by devcheck) |
377
379
  | `bun run list-skills` | Print the skill registry |
@@ -387,11 +389,13 @@ When you complete a skill's checklist, check the boxes and add a completion time
387
389
 
388
390
  ---
389
391
 
392
+ **CI is one file.** `.github/workflows/codeql.yml` (scaffolded) is the only GitHub Actions workflow: CodeQL is GitHub-owned end to end, and the file runs only while the repo's CodeQL *default setup* is turned off. Verification — `devcheck`, tests, the release gates — runs locally; don't add a workflow that re-runs it.
393
+
390
394
  ## Bundling
391
395
 
392
396
  `bun 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 two classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs (`framework-skills/`, `skills/`, `.claude/`, `.agents/`, `SKILL.md`) and platform-specific native bindings, which would otherwise lock the bundle to the platform it was packed on. 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.
393
397
 
394
- **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.
398
+ **Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match, that every `user_config` option is wired into `mcp_config.env` as `"X": "${user_config.X}"` (the host substitutes nothing else — `"${X}"` reaches the server as that literal string), and that an optional string option carries `"default": ""`.
395
399
 
396
400
  **README install badges** (Claude Desktop `.mcpb`, Cursor, VS Code) and the `base64` / `encodeURIComponent` config-generation commands are ship-time concerns — run the `polish-docs-meta` skill, which carries the badge format, layout, and generation snippets in `framework-skills/polish-docs-meta/references/readme.md`.
397
401
 
package/Dockerfile CHANGED
@@ -14,7 +14,7 @@
14
14
  # output. A stage that compiles a native addon needs the target-arch toolchain
15
15
  # and cannot cross-compile this way — drop the flag there.
16
16
  # ==============================================================================
17
- FROM --platform=$BUILDPLATFORM oven/bun:1.4.2 AS build
17
+ FROM --platform=$BUILDPLATFORM oven/bun:1.4.4 AS build
18
18
 
19
19
  WORKDIR /usr/src/app
20
20
 
@@ -46,7 +46,7 @@ RUN bun run build
46
46
  # A clean image rather than `FROM build`: the build stage's node_modules holds
47
47
  # devDependencies.
48
48
  # ==============================================================================
49
- FROM --platform=$BUILDPLATFORM oven/bun:1.4.2 AS deps
49
+ FROM --platform=$BUILDPLATFORM oven/bun:1.4.4 AS deps
50
50
 
51
51
  WORKDIR /usr/src/app
52
52
 
@@ -113,7 +113,7 @@ RUN rm -rf node_modules/@socketsecurity/bun-security-scanner
113
113
  # dependencies and build artifacts. Its only Bun invocations are HEALTHCHECK
114
114
  # and CMD, which run on the real target at container start.
115
115
  # ==============================================================================
116
- FROM oven/bun:1.4.2-slim AS production
116
+ FROM oven/bun:1.4.4-slim AS production
117
117
 
118
118
  WORKDIR /usr/src/app
119
119
 
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.4.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/astronomy-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.2.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/astronomy-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/astronomy-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.2-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.4.3-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/astronomy-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.3.1-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/astronomy-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/astronomy-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.4-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -29,7 +29,7 @@
29
29
 
30
30
  ## Overview
31
31
 
32
- Observational astronomy computed in-process by [`astronomy-engine`](https://github.com/cosinekitty/astronomy) and a bundled bright-star catalog. Get sky positions, rise/set and twilight times, moon phases, and the next eclipse, equinox, opposition, or conjunction for any place and time, or ask what is visible right now. Two opt-in, network-backed tools add JPL Horizons small-body ephemerides and CelesTrak satellite passes. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.
32
+ Observational astronomy for any place and time: sky positions, rise/set and twilight times, moon phases, and the next eclipse, equinox, opposition, or conjunction — or just ask what's visible right now. Computed locally by [`astronomy-engine`](https://github.com/cosinekitty/astronomy), with optional JPL Horizons ephemerides and satellite passes.
33
33
 
34
34
  ### Tools
35
35
 
@@ -71,9 +71,9 @@ Design reference: [`docs/design.md`](./docs/design.md).
71
71
 
72
72
  ### `astronomy_get_rise_set` <sub>tool</sub>
73
73
 
74
- - One `body` searched forward from `start` (default now) for the next `count` cycles, default 1, max 31
75
- - Each cycle carries `rise_utc`, `set_utc`, `transit_utc`, and `transit_altitude_degrees`; a circumpolar or never-rising body gets `null` rise/set and a `note` instead of an error, and one already up at `start` gets a `null` `rise_utc`
76
- - For `body: "sun"`, a `twilight` block holds `civil`, `nautical`, and `astronomical` pairs covering the night after that cycle's set, so each `dawn_utc` falls the day after the cycle's rise
74
+ - One `body` searched forward from `start` (default now) for the next `count` cycles, default 1; 31 are served per call, and a `count` up to 366 returns the first 31 with a notice naming the `start` and `count` that continue the series
75
+ - Each cycle carries `rise_utc`, `set_utc`, `transit_utc`, and `transit_altitude_degrees`; a circumpolar or never-rising body gets `null` rise/set and a `note` instead of an error
76
+ - For `body: "sun"`, `twilight` holds civil, nautical, and astronomical dusk/dawn pairs for the night after each cycle's day. When the first day begins after `start`, `night_in_progress` holds the preceding night, including polar nights without a sunset; the first cycle otherwise carries its own night. Each pair stays within that night, and times before `start` remain included
77
77
 
78
78
  ---
79
79
 
@@ -86,9 +86,10 @@ Design reference: [`docs/design.md`](./docs/design.md).
86
86
 
87
87
  ### `astronomy_find_events` <sub>tool</sub>
88
88
 
89
- - One `event` (`solar_eclipse`, `lunar_eclipse`, `equinox`, `solstice`, `moon_quarter`, `opposition`, `conjunction`, `max_elongation`, `perigee_apogee`) and the next `count` occurrences, default 1, max 20; searches stop at the end of 2100, with a notice when that returns fewer
90
- - Body-relative events require `body` (`body_required`), and a body the event doesn't apply to fails as `body_not_supported`: `opposition` takes mars through pluto, `conjunction` any planet, `max_elongation` mercury or venus, and `perigee_apogee` the moon, `earth`, or a planet; `apsis_kind` and `conjunction_kind` label which kind came back
91
- - Eclipses take an optional observer (`latitude` and `longitude` together, else `incomplete_observer`) that adds `local_visible` and `contact_altitudes_degrees` and limits `solar_eclipse` to locally visible events; a global solar search reports `peak_latitude_degrees`/`peak_longitude_degrees` for total and annular eclipses
89
+ - One `event` (`solar_eclipse`, `lunar_eclipse`, `equinox`, `solstice`, `moon_quarter`, `opposition`, `conjunction`, `max_elongation`, `perigee_apogee`) and the next `count` occurrences, default 1; 20 are served per call, and a `count` up to 200 returns the first 20 with a notice naming the `start` and `count` that continue the series; searches stop at the end of 2100
90
+ - Body-relative events require `body` (`body_required`); a body the event doesn't apply to fails as `body_not_supported`, and `conjunction` with `body2` takes the Moon or a planet different from `body` (`invalid_body_pair` otherwise) and reports `separation_degrees`
91
+ - Eclipses take an optional observer (`latitude` and `longitude` together, else `incomplete_observer`) that adds `local_visible` and `contact_altitudes_degrees`
92
+ - Eclipses are included when their peak is at or after `start`; their contacts may precede `start`
92
93
 
93
94
  ---
94
95
 
@@ -102,15 +103,17 @@ Design reference: [`docs/design.md`](./docs/design.md).
102
103
  ### `astronomy_get_ephemeris` <sub>tool</sub>
103
104
 
104
105
  - `designation` is passed to Horizons verbatim (`"433;"` for a numbered asteroid, `"DES=1P;CAP"` for a periodic comet, a negative SPK-ID for a spacecraft); `start` defaults to now, `stop` to 24 h later, and `step` to `"1h"` (a count plus `m`, `h`, `d`, `mo`, or `y`); `latitude` and `longitude` together add alt/az
105
- - Up to 200 rows inline, and when `truncated` is true the notice names the `start` to resume from; `target_name` is the object Horizons resolved, since a bare name can land on the wrong one; misses fail as `body_not_found`, and spans outside the target's Horizons data as `time_out_of_range`
106
+ - Up to 200 rows per call; when `truncated` is true the notice names the `start` to resume from. `target_name` is the object Horizons resolved
107
+ - Fails as `ambiguous_designation`, `observer_is_target`, `body_not_found`, `invalid_step`, `invalid_elevation`, `time_out_of_range`, or `request_rejected`, each naming the input to correct
106
108
  - Registered only when `ASTRONOMY_ENABLE_HORIZONS=true`
107
109
 
108
110
  ---
109
111
 
110
112
  ### `astronomy_get_satellite_passes` <sub>tool</sub>
111
113
 
112
- - Exactly one of `norad_id` or `name` (ISS, Hubble/HST, and Tiangong/CSS resolve directly; other names are substring-matched against CelesTrak, and an ambiguous one fails as `ambiguous_satellite_name` listing candidates); `start` must be within about a month of today, and `days` defaults to 7, max 10
113
- - Returns `norad_id`, `satellite_name`, and naked-eye-plausible `passes` (sunlit at peak, observer sky dark), each with rise/peak/set times and azimuths, `peak_altitude_degrees`, and `duration_seconds`
114
+ - Exactly one of `norad_id` or `name` (ISS, Hubble/HST, and Tiangong/CSS resolve directly; other names are matched against CelesTrak, and an ambiguous one fails as `ambiguous_satellite_name` listing candidates); `start` must be within about a month of today, and `days` defaults to 7
115
+ - 10 days are searched per call; a `days` up to 30 returns the first 10 with a notice naming the `start` and `days` that continue the search
116
+ - Returns `norad_id`, `satellite_name`, and `passes` that are visible (sunlit, above 10° elevation, Sun below −6°), each with rise/peak/set times and azimuths, `peak_altitude_degrees`, `duration_seconds`, `sunlit`, and `visible_start_utc`/`visible_end_utc`
114
117
  - Registered only when `ASTRONOMY_ENABLE_SATELLITES=true`
115
118
 
116
119
  ---
@@ -125,7 +128,7 @@ Design reference: [`docs/design.md`](./docs/design.md).
125
128
  ### `astronomy_stargazing_plan` <sub>prompt</sub>
126
129
 
127
130
  - Arguments: `location` required; `date` (`YYYY-MM-DD`) optional, defaults to tonight
128
- - Returns one user message that chains `astronomy_get_rise_set` (sun, then moon), `astronomy_get_moon_phase`, and `astronomy_list_visible` with `include_stars`, anchored to the observer's local night, plus the geocoding and weather steps this server doesn't cover
131
+ - Returns one user message that chains `astronomy_get_rise_set` (sun, then moon), `astronomy_get_moon_phase`, and `astronomy_list_visible` with `include_stars`, plus the geocoding and weather steps this server doesn't cover
129
132
 
130
133
  ## Features
131
134
 
@@ -150,19 +153,41 @@ Agent-friendly output:
150
153
 
151
154
  ### Public Hosted Instance
152
155
 
153
- A public instance is available at `https://astronomy.caseyjhand.com/mcp` — no installation required. Point any MCP client at it via Streamable HTTP:
156
+ A public instance is available at `https://astronomy.caseyjhand.com/mcp` — no installation required. It serves Streamable HTTP; each client takes its own config shape.
157
+
158
+ For Claude Code:
159
+
160
+ ```sh
161
+ claude mcp add --transport http astronomy-mcp-server https://astronomy.caseyjhand.com/mcp
162
+ ```
163
+
164
+ For Cline (`cline_mcp_settings.json`):
154
165
 
155
166
  ```json
156
167
  {
157
168
  "mcpServers": {
158
169
  "astronomy-mcp-server": {
159
- "type": "streamable-http",
170
+ "type": "streamableHttp",
160
171
  "url": "https://astronomy.caseyjhand.com/mcp"
161
172
  }
162
173
  }
163
174
  }
164
175
  ```
165
176
 
177
+ For Cursor (`mcp.json`):
178
+
179
+ ```json
180
+ {
181
+ "mcpServers": {
182
+ "astronomy-mcp-server": {
183
+ "url": "https://astronomy.caseyjhand.com/mcp"
184
+ }
185
+ }
186
+ }
187
+ ```
188
+
189
+ Claude Desktop adds remote servers under Settings → Connectors.
190
+
166
191
  ### Self-Hosted / Local
167
192
 
168
193
  Add the following to your MCP client configuration file. The core tools need no configuration; set `ASTRONOMY_ENABLE_HORIZONS` and/or `ASTRONOMY_ENABLE_SATELLITES` to `true` to register the extensions.
@@ -0,0 +1,37 @@
1
+ ---
2
+ summary: "Two-body conjunctions in astronomy_find_events, per-call caps with continuation notices on rise/set, events, and satellite passes, night_in_progress and polar-day cycles in astronomy_get_rise_set, a visible-stretch pass rule for satellites, and Horizons paging, refusal, and calendar fixes."
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.4.2 — 2026-10-15
8
+
9
+ ## Added
10
+
11
+ - **`astronomy_find_events` `body2`** — a `conjunction` of two bodies (the Moon or a planet with another), found where they share an ecliptic longitude seen from Earth's center. Events carry `body2` and `separation_degrees`; `invalid_body_pair` rejects `body2` with another event, the same body twice, or a `sun`/`earth` `body`. (#51)
12
+ - **`astronomy_get_rise_set` `night_in_progress`** — for the Sun, a `start` between sunset and sunrise returns the night already under way (dusk through dawn, times before `start` included), since the first cycle then opens at the next sunrise. (#49)
13
+ - **`astronomy_get_satellite_passes` visible stretch** — each pass carries `visible_start_utc`/`visible_end_utc` with `_local`, altitude, and azimuth fields. (#47)
14
+ - **Typed Horizons refusals** — `ambiguous_designation` lists the candidate ID numbers of a name matching several major bodies, `observer_is_target` rejects Earth, `invalid_elevation` rejects observer elevations Horizons refuses, and `request_rejected` names the input of a request Horizons refuses with HTTP 400. `invalid_step` also covers a step longer than the target's data and a count past 2147483647. (#53)
15
+
16
+ ## Changed
17
+
18
+ - **Per-call caps** — `astronomy_get_rise_set` `count` accepts up to 366 (31 cycles per call), `astronomy_find_events` `count` up to 200 (20 per call), and `astronomy_get_satellite_passes` `days` up to 30 (10 per call). A capped call returns a notice naming the exact `start` and `count`/`days` that continue the series, or saying no call can when the continuation falls past 2100 or beyond the element set's epoch horizon. Eclipse continuations resume 10 days past the last event. (#50)
19
+ - **`astronomy_get_satellite_passes` pass rule** — a pass is kept when its visible stretch (above the horizon, sunlit, Sun below −6°) reaches 10° elevation, wherever in the pass that falls; `sunlit` still reports the peak instant. Rise, set, and visible-stretch edges are bisected to 1 s. (#47, #52)
20
+ - **`astronomy_get_rise_set` twilight** — each cycle's pairs are bounded to their own night, so a depth the night never reaches is `null`. (#56)
21
+ - **`astronomy_get_rise_set` polar days** — a day with no rise or set (polar night, midnight sun) is a cycle of its own, so consecutive cycles are consecutive days and each night appears in exactly one. (#60)
22
+ - **`astronomy_get_ephemeris` request shape** — one request asks Horizons for one page, with `STOP_TIME` clamped to the 201st row, rather than the whole span. (#48)
23
+ - **`astronomy_get_ephemeris` dates** — `start` and `stop` are Gregorian (extended before 1582) in years 0100 through 9999; fractional seconds in `start` are kept; `stop` equal to `start` returns the single row at that instant. (#55, #57, #58)
24
+ - **`time_out_of_range` recovery** — a year-span rejection from any tool carries that tool's declared recovery on the wire; the satellite tool's declared hint covers both its year-span and epoch-distance checks. (#61)
25
+ - **Docs** — README, `docs/design.md`, `CLAUDE.md`, and `AGENTS.md` describe the changes above; the `astronomy_stargazing_plan` prompt reads `night_in_progress` when the sun query starts after sunset.
26
+
27
+ ## Fixed
28
+
29
+ - **`astronomy_get_ephemeris` calendar-step resume** — a `mo` or `y` step with a count above 1 resumes on the row Horizons prints next, where it previously skipped rows (`5mo` from Jan 31 prints Jul 31). (#54)
30
+ - **`astronomy_get_ephemeris` apostrophes and non-ASCII designations** — a designation with an apostrophe (`6P/d'Arrest`) or a character outside printable ASCII (`Šteins`) fails as `body_not_found` naming the record-resolving form (`DES=6P;CAP`, `2867;`), where Horizons searched the text before the apostrophe. (#59)
31
+
32
+ ## Dependencies
33
+
34
+ - `@cyanheads/mcp-ts-core` ^0.13.14 → ^0.13.15; `@modelcontextprotocol/server` ^2.2.0 → ^2.3.1 comes in through the framework.
35
+ - Bun 1.4.2 → 1.4.3 (`packageManager`, the Dockerfile `oven/bun` base images, README badge).
36
+ - `zod` ^4.6.5 → ^4.6.6; dev `@types/node` ^26.6.4 → ^26.6.5, `vitest` ^5.0.3 → ^5.0.4.
37
+ - `framework-skills/` re-synced to mcp-ts-core 0.13.15.
@@ -0,0 +1,28 @@
1
+ ---
2
+ summary: "Correct eclipse peak boundaries, shallow horizon crossings, and preceding polar-night twilight."
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.4.3 — 2026-10-24
8
+
9
+ ## Changed
10
+
11
+ - **`night_in_progress`** includes the preceding polar night's bounded twilight when the first cycle begins after `start`, including nights without a sunset ([#64](https://github.com/cyanheads/astronomy-mcp-server/issues/64)).
12
+ - **Extension text rendering** preserves literal Horizons designations, resolved targets, satellite names, and name queries when they contain Markdown syntax.
13
+ - **Maintenance tooling** synchronizes framework skills and protocol guidance, corrects direct-versus-transitive audit attribution, and documents client-specific hosted connection settings.
14
+ - **Container runtime** advances Bun 1.4.3 → 1.4.4.
15
+
16
+ ## Fixed
17
+
18
+ - **`astronomy_find_events`** selects local solar, global solar, and lunar eclipses by peaks at or after `start`, retaining earlier contacts ([#62](https://github.com/cyanheads/astronomy-mcp-server/issues/62)).
19
+ - **`astronomy_get_rise_set`** certifies shallow horizon crossing direction before building cycles, preserving short real intervals and consecutive daily cycles ([#63](https://github.com/cyanheads/astronomy-mcp-server/issues/63)).
20
+
21
+ ## Dependencies
22
+
23
+ - `@cyanheads/mcp-ts-core` ^0.13.15 → ^0.13.16.
24
+ - `zod` ^4.6.6 → ^4.6.7.
25
+ - `@biomejs/biome` 2.5.15 → 2.6.2.
26
+ - `ignore` ^7.0.12 → ^7.0.13.
27
+ - `tsc-alias` ^1.9.7 → ^1.9.8.
28
+ - `vitest` ^5.0.4 → ^5.0.5.
@@ -33,7 +33,7 @@ export const stargazingPlanPrompt = prompt('astronomy_stargazing_plan', {
33
33
  'Using the location and date above, work through these steps in order:',
34
34
  '',
35
35
  `1. Resolve the location to latitude/longitude with a geocoding tool (e.g. openstreetmap_search_places), and its IANA timezone with a timezone lookup (e.g. ref_timezone_lookup, given the place's city or region). This astronomy server does not geocode. Pass that zone as the \`timezone\` parameter on every astronomy call below: without it the tools answer in UTC only, and you cannot tell which local night a returned instant belongs to.`,
36
- `2. Call astronomy_get_rise_set with body "sun" at those coordinates for the local evening of <date> in that timezone, to find sunset and the astronomical-dusk time (the start of the dark window). Anchor <date> in the observer's zone, not UTC — resolving it against UTC midnight lands on the adjacent local night for any observer far enough from Greenwich.`,
36
+ `2. Call astronomy_get_rise_set with body "sun" at those coordinates for the local evening of <date> in that timezone, to find sunset and the astronomical-dusk time (the start of the dark window). Anchor <date> in the observer's zone, not UTC — resolving it against UTC midnight lands on the adjacent local night for any observer far enough from Greenwich. Read the night under way from \`night_in_progress\` when present, including polar nights without a sunset: the first cycle then begins with the next day, and its twilight is the following night's. Otherwise use the first cycle's twilight, including a rest-of-dark-day cycle that already carries the current night.`,
37
37
  `3. Call astronomy_get_moon_phase for <date> and note the illuminated fraction — a bright moon washes out faint objects.`,
38
38
  `4. Call astronomy_get_rise_set with body "moon" at those coordinates across the same local <date> night in that timezone, to get moonrise and moonset, then compare them against the dark window from step 2. Phase alone is geocentric and does not say whether the moon is above the observer's horizon; a full moon that has already set does not interfere.`,
39
39
  `5. Call astronomy_list_visible at those coordinates with \`include_stars\` set to true, at a time just after the astronomical dusk found in step 2 on the local <date> night in that timezone, to get the ranked list of what is up. The tool omits the bundled bright-star catalog unless \`include_stars\` is true, so leaving it off returns solar-system bodies only — not the named stars a stargazer is most likely to be asking about.`,
@@ -1 +1 @@
1
- {"version":3,"file":"stargazing-plan.prompt.js","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/stargazing-plan.prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,2BAA2B,EAAE;IACtE,WAAW,EACT,8TAA8T;IAChU,KAAK,EAAE,+CAA+C;IACtD,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,CAAC,oEAAoE,CAAC;QACjF,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,4EAA4E,CAAC;KAC1F,CAAC;IACF,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE;QACjB,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,IAAI,SAAS,CAAC;QACzC,MAAM,IAAI,GAAG;YACX,yCAAyC;YACzC,EAAE;YACF,iNAAiN;YACjN,EAAE;YACF,aAAa,IAAI,CAAC,QAAQ,aAAa;YACvC,SAAS,SAAS,SAAS;YAC3B,EAAE;YACF,uEAAuE;YACvE,EAAE;YACF,sbAAsb;YACtb,qWAAqW;YACrW,yHAAyH;YACzH,iWAAiW;YACjW,+aAA+a;YAC/a,+KAA+K;YAC/K,EAAE;YACF,uOAAuO;SACxO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACb,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IAC7D,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"stargazing-plan.prompt.js","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/stargazing-plan.prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,2BAA2B,EAAE;IACtE,WAAW,EACT,8TAA8T;IAChU,KAAK,EAAE,+CAA+C;IACtD,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,CAAC,oEAAoE,CAAC;QACjF,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,4EAA4E,CAAC;KAC1F,CAAC;IACF,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE;QACjB,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,IAAI,SAAS,CAAC;QACzC,MAAM,IAAI,GAAG;YACX,yCAAyC;YACzC,EAAE;YACF,iNAAiN;YACjN,EAAE;YACF,aAAa,IAAI,CAAC,QAAQ,aAAa;YACvC,SAAS,SAAS,SAAS;YAC3B,EAAE;YACF,uEAAuE;YACvE,EAAE;YACF,sbAAsb;YACtb,+pBAA+pB;YAC/pB,yHAAyH;YACzH,iWAAiW;YACjW,+aAA+a;YAC/a,+KAA+K;YAC/K,EAAE;YACF,uOAAuO;SACxO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACb,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IAC7D,CAAC;CACF,CAAC,CAAC"}
@@ -2,8 +2,11 @@
2
2
  * @fileoverview astronomy_find_events — consolidated forward search for nine event
3
3
  * classes under one `event` enum. Both eclipse classes take an optional observer:
4
4
  * solar eclipses are global without one and local with one, and lunar eclipses gain
5
- * the Moon's altitude at each contact. Every other class is geocentric. Every search
6
- * stops at the end of the supported span, with a notice when that cuts a list short.
5
+ * the Moon's altitude at each contact. Every other class is geocentric; `body2` turns a
6
+ * conjunction with the Sun into one of two bodies. Every search stops at the end of the
7
+ * supported span, with a notice when that cuts a list short, and serves at most
8
+ * `EVENTS_PER_CALL` events per call with a notice naming the `start` and `count` that
9
+ * continue.
7
10
  * Validation gates fail fast when an event needs a body that was not supplied, when an
8
11
  * eclipse observer is half-specified, or when the body has no such event.
9
12
  * @module mcp-server/tools/definitions/find-events.tool
@@ -45,6 +48,8 @@ export declare const FindEventsOutput: z.ZodObject<{
45
48
  new: "new";
46
49
  }>>;
47
50
  body: z.ZodOptional<z.ZodString>;
51
+ body2: z.ZodOptional<z.ZodString>;
52
+ separation_degrees: z.ZodOptional<z.ZodNumber>;
48
53
  conjunction_kind: z.ZodOptional<z.ZodEnum<{
49
54
  inferior: "inferior";
50
55
  superior: "superior";
@@ -92,6 +97,17 @@ export declare const findEventsTool: import("@cyanheads/mcp-ts-core").ToolDefini
92
97
  uranus: "uranus";
93
98
  venus: "venus";
94
99
  }>>;
100
+ body2: z.ZodOptional<z.ZodEnum<{
101
+ jupiter: "jupiter";
102
+ mars: "mars";
103
+ mercury: "mercury";
104
+ moon: "moon";
105
+ neptune: "neptune";
106
+ pluto: "pluto";
107
+ saturn: "saturn";
108
+ uranus: "uranus";
109
+ venus: "venus";
110
+ }>>;
95
111
  latitude: z.ZodOptional<z.ZodNumber>;
96
112
  longitude: z.ZodOptional<z.ZodNumber>;
97
113
  elevation: z.ZodDefault<z.ZodNumber>;
@@ -131,6 +147,8 @@ export declare const findEventsTool: import("@cyanheads/mcp-ts-core").ToolDefini
131
147
  new: "new";
132
148
  }>>;
133
149
  body: z.ZodOptional<z.ZodString>;
150
+ body2: z.ZodOptional<z.ZodString>;
151
+ separation_degrees: z.ZodOptional<z.ZodNumber>;
134
152
  conjunction_kind: z.ZodOptional<z.ZodEnum<{
135
153
  inferior: "inferior";
136
154
  superior: "superior";
@@ -162,8 +180,14 @@ export declare const findEventsTool: import("@cyanheads/mcp-ts-core").ToolDefini
162
180
  }, {
163
181
  readonly reason: "body_not_supported";
164
182
  readonly code: JsonRpcErrorCode.InvalidParams;
165
- readonly when: "The body has no such event — opposition for the Sun, Moon, Earth, or an inner planet; conjunction for the Sun, Moon, or Earth; max_elongation for anything but mercury or venus; perigee_apogee for the Sun.";
166
- readonly recovery: "Pick a body the event is defined for: a superior planet (mars through pluto) for opposition, any planet for conjunction, mercury or venus for max_elongation, and the moon, earth, or a planet for perigee_apogee.";
183
+ readonly when: "The body has no such event — opposition for the Sun, Moon, Earth, or an inner planet; conjunction without `body2` for the Sun, Moon, or Earth; max_elongation for anything but mercury or venus; perigee_apogee for the Sun.";
184
+ readonly recovery: "Pick a body the event is defined for: a superior planet (mars through pluto) for opposition, any planet for conjunction (or the Moon with a planet as body2), mercury or venus for max_elongation, and the moon, earth, or a planet for perigee_apogee.";
185
+ readonly thrownBy: "service";
186
+ }, {
187
+ readonly reason: "invalid_body_pair";
188
+ readonly code: JsonRpcErrorCode.InvalidParams;
189
+ readonly when: "`body2` was supplied with an event other than conjunction, names the same body as `body`, or is paired with a `body` of sun or earth.";
190
+ readonly recovery: "body2 applies only to event \"conjunction\" and pairs two different bodies among the Moon and the planets (mercury through pluto). For a planet's conjunction with the Sun, pass the planet as body and omit body2; for the Moon's, search moon_quarter for the new moon.";
167
191
  readonly thrownBy: "service";
168
192
  }, {
169
193
  readonly reason: "invalid_time";
@@ -185,6 +209,9 @@ export declare const findEventsTool: import("@cyanheads/mcp-ts-core").ToolDefini
185
209
  readonly thrownBy: "service";
186
210
  }], {
187
211
  readonly totalCount: z.ZodNumber;
212
+ readonly truncated: z.ZodOptional<z.ZodBoolean>;
213
+ readonly shown: z.ZodOptional<z.ZodNumber>;
214
+ readonly cap: z.ZodOptional<z.ZodNumber>;
188
215
  readonly notice: z.ZodOptional<z.ZodString>;
189
216
  }>;
190
217
  //# sourceMappingURL=find-events.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"find-events.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/find-events.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAgBjE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8G3B,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEpE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmPzB,CAAC"}
1
+ {"version":3,"file":"find-events.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/find-events.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA2CjE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0H3B,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEpE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgSzB,CAAC"}