@cyanheads/astronomy-mcp-server 0.2.10 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/AGENTS.md +2 -2
  2. package/CLAUDE.md +2 -2
  3. package/README.md +13 -5
  4. package/changelog/0.3.x/0.3.0.md +30 -0
  5. package/changelog/0.3.x/0.3.1.md +19 -0
  6. package/dist/mcp-server/prompts/definitions/stargazing-plan.prompt.js +1 -1
  7. package/dist/mcp-server/prompts/definitions/stargazing-plan.prompt.js.map +1 -1
  8. package/dist/mcp-server/tools/definitions/find-events.tool.d.ts +16 -7
  9. package/dist/mcp-server/tools/definitions/find-events.tool.d.ts.map +1 -1
  10. package/dist/mcp-server/tools/definitions/find-events.tool.js +70 -17
  11. package/dist/mcp-server/tools/definitions/find-events.tool.js.map +1 -1
  12. package/dist/mcp-server/tools/definitions/get-ephemeris.tool.d.ts +8 -0
  13. package/dist/mcp-server/tools/definitions/get-ephemeris.tool.d.ts.map +1 -1
  14. package/dist/mcp-server/tools/definitions/get-ephemeris.tool.js +25 -5
  15. package/dist/mcp-server/tools/definitions/get-ephemeris.tool.js.map +1 -1
  16. package/dist/mcp-server/tools/definitions/get-satellite-passes.tool.d.ts.map +1 -1
  17. package/dist/mcp-server/tools/definitions/get-satellite-passes.tool.js +3 -3
  18. package/dist/mcp-server/tools/definitions/get-satellite-passes.tool.js.map +1 -1
  19. package/dist/services/ephemeris/ephemeris-service.d.ts +30 -1
  20. package/dist/services/ephemeris/ephemeris-service.d.ts.map +1 -1
  21. package/dist/services/ephemeris/ephemeris-service.js +105 -42
  22. package/dist/services/ephemeris/ephemeris-service.js.map +1 -1
  23. package/dist/services/ephemeris/types.d.ts +16 -1
  24. package/dist/services/ephemeris/types.d.ts.map +1 -1
  25. package/dist/services/horizons/horizons-service.d.ts +2 -2
  26. package/dist/services/horizons/horizons-service.d.ts.map +1 -1
  27. package/dist/services/horizons/horizons-service.js +46 -6
  28. package/dist/services/horizons/horizons-service.js.map +1 -1
  29. package/dist/services/horizons/types.d.ts +7 -0
  30. package/dist/services/horizons/types.d.ts.map +1 -1
  31. package/dist/services/satellite/satellite-service.d.ts +7 -4
  32. package/dist/services/satellite/satellite-service.d.ts.map +1 -1
  33. package/dist/services/satellite/satellite-service.js +37 -5
  34. package/dist/services/satellite/satellite-service.js.map +1 -1
  35. package/package.json +2 -2
  36. package/server.json +3 -3
  37. package/dist/astronomy-mcp-server.mcpb +0 -0
package/AGENTS.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** astronomy-mcp-server
4
- **Version:** 0.2.10
4
+ **Version:** 0.3.1
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.6`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/server` ^2.0.0
@@ -237,7 +237,7 @@ Handlers throw — the framework catches, classifies, and formats.
237
237
 
238
238
  **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable?, severity?, thrownBy? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. Pass `ctx.recoveryFor('reason')` as the throw's data to put it on the wire (`data.recovery.hint`, mirrored into `content[]` text unless the message already contains it verbatim); override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Forwarding it is lint-enforced per throw site (`error-contract-recovery-unforwarded`). Mark an entry the service layer throws with `thrownBy: 'service'` so `error-contract-unthrown` skips it — lint-only metadata, nothing at runtime reads it. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`, `RequestCancelled`) bubble freely and don't need declaring.
239
239
 
240
- 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 (`observer_required`, `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.
240
+ 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.
241
241
 
242
242
  ```ts
243
243
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
package/CLAUDE.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** astronomy-mcp-server
4
- **Version:** 0.2.10
4
+ **Version:** 0.3.1
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.6`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/server` ^2.0.0
@@ -237,7 +237,7 @@ Handlers throw — the framework catches, classifies, and formats.
237
237
 
238
238
  **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable?, severity?, thrownBy? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. Pass `ctx.recoveryFor('reason')` as the throw's data to put it on the wire (`data.recovery.hint`, mirrored into `content[]` text unless the message already contains it verbatim); override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Forwarding it is lint-enforced per throw site (`error-contract-recovery-unforwarded`). Mark an entry the service layer throws with `thrownBy: 'service'` so `error-contract-unthrown` skips it — lint-only metadata, nothing at runtime reads it. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`, `RequestCancelled`) bubble freely and don't need declaring.
239
239
 
240
- 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 (`observer_required`, `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.
240
+ 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.
241
241
 
242
242
  ```ts
243
243
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-0.2.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/astronomy-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/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.0-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.3.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.0.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.0-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -92,9 +92,13 @@ Design reference: [`docs/design.md`](./docs/design.md).
92
92
  ### `astronomy_find_events` <sub>tool</sub>
93
93
 
94
94
  - One `event` enum covers nine classes: `solar_eclipse`, `lunar_eclipse`, `equinox`, `solstice`, `moon_quarter`, `opposition`, `conjunction`, `max_elongation`, `perigee_apogee`
95
- - `solar_eclipse` requires observer `latitude`/`longitude` for local contact times and `local_visible`; every other class, lunar eclipses included, is geocentric
95
+ - Both eclipse classes take an optional observer (`latitude` and `longitude` together — one alone is rejected):
96
+ - `solar_eclipse` without one returns global eclipses, with the peak's `peak_latitude_degrees`/`peak_longitude_degrees` for total and annular eclipses; with one it returns only eclipses visible from that point, with local contact times
97
+ - `lunar_eclipse` contact times are geocentric either way; an observer adds local circumstances
98
+ - Local circumstances are `local_visible` (the eclipsed body above the horizon at any contact) and `contact_altitudes_degrees` (its altitude at each contact), so a sunrise or sunset eclipse reads differently from a midday one
99
+ - Every other class is geocentric and ignores a location
96
100
  - Body-relative events require `body`, gated to which bodies each applies to: `opposition` to mars through pluto, `conjunction` to any planet, `max_elongation` to mercury or venus, `perigee_apogee` to the moon, earth, or a planet
97
- - Returns the next `count` occurrences, default 1, max 20
101
+ - Returns the next `count` occurrences, default 1, max 20; searches stop at the end of 2100, and a notice says so when that returns fewer than `count`
98
102
  - `perigee_apogee` on earth returns perihelion/aphelion; `conjunction` on mercury or venus returns both the inferior and superior pass, labelled by `conjunction_kind`
99
103
 
100
104
  ---
@@ -113,7 +117,9 @@ Design reference: [`docs/design.md`](./docs/design.md).
113
117
 
114
118
  - Registered only when `ASTRONOMY_ENABLE_HORIZONS` is set; off by default
115
119
  - Time-series ephemeris for a small body or spacecraft via JPL Horizons — RA/Dec, distance, magnitude, and optional alt/az when observer `latitude`/`longitude` are both supplied (one alone is rejected)
116
- - `designation` must resolve to a single Horizons record: numbered asteroid as `"433;"`, periodic comet as `"DES=1P;CAP"`, spacecraft as a negative SPK-ID — a bare name is rejected
120
+ - `designation` should resolve to a single Horizons record: numbered asteroid as `"433;"`, periodic comet as `"DES=1P;CAP"`, spacecraft as a negative SPK-ID — a bare name matching nothing or several records is rejected, and one matching a single object can land on the wrong one (`"Eros"` resolves to Kerberos), so the result carries `target_name`, the object Horizons resolved
121
+ - `start`/`stop` accept a `Z` or numeric UTC offset (a value with neither is read as UTC); Horizons receives the resolved UTC instant
122
+ - No 1900–2100 limit applies, but a span outside the target's own Horizons data is rejected as `time_out_of_range`, and the message gives the bound Horizons reports (e.g. Mars ends after A.D. 2599-DEC-31); an unknown designation is `body_not_found`
117
123
  - `step` is a count plus unit (`m`/`h`/`d`/`mo`/`y`, e.g. `"1h"`); `stop` must be after `start` (defaults to a 24h span from now)
118
124
  - Truncates inline at 200 rows; the truncation notice names the exact `start` to resume from, one step past the last row returned
119
125
 
@@ -122,8 +128,10 @@ Design reference: [`docs/design.md`](./docs/design.md).
122
128
  ### `astronomy_get_satellite_passes` <sub>tool</sub>
123
129
 
124
130
  - Registered only when `ASTRONOMY_ENABLE_SATELLITES` is set; off by default
125
- - Identify the satellite by exactly one of `norad_id` or `name` (case-insensitive substring match against CelesTrak's catalog) — both or neither is rejected
131
+ - Identify the satellite by exactly one of `norad_id` or `name` — both or neither is rejected
132
+ - `name` resolves the common names ISS / International Space Station (25544), Hubble / Hubble Space Telescope / HST (20580), and Tiangong / CSS / Chinese Space Station (48274) directly; any other name is a case-insensitive substring match against CelesTrak's catalog
126
133
  - Fetches the current GP element set from CelesTrak and propagates it with SGP4 in-process; only naked-eye-plausible passes (sunlit at peak, observer sky dark) are returned
134
+ - A pass must rise inside the window: one already up at `start` is omitted, one still up when the window ends is reported through its set
127
135
  - `start` must be within about a month of the element set's epoch — older elements no longer describe the orbit, and an element set that won't propagate inside that window is rejected as a reentry
128
136
  - Searches the next `days` ahead, default 7, max 10; pass `timezone` for observer-local pass times
129
137
 
@@ -0,0 +1,30 @@
1
+ ---
2
+ summary: "astronomy_find_events: solar_eclipse now searches globally without an observer, reporting the peak location of total/annular eclipses; both eclipse classes gain any-contact local_visible and per-contact altitudes; incomplete_observer replaces observer_required; searches stop at 2100."
3
+ breaking: true
4
+ security: false
5
+ ---
6
+
7
+ # 0.3.0 — 2026-09-23
8
+
9
+ ## Added
10
+
11
+ - **`astronomy_find_events`: `solar_eclipse` without an observer now searches globally**, returning `kind`, `peak_utc`, `obscuration`, and — for a total or annular eclipse — the `peak_latitude_degrees`/`peak_longitude_degrees` where it is greatest.
12
+ - **Both eclipse classes report `contact_altitudes_degrees`** — the eclipsed body's altitude at each contact — when an observer is supplied.
13
+ - **Every `find_events` search stops at the end of 2100**, the close of the supported span; a result short of the requested `count` carries an enrichment `notice` saying so.
14
+
15
+ ## Changed
16
+
17
+ - **`local_visible` is now any-contact, not peak-only**, on both eclipse classes — an eclipse visible only near sunrise or sunset used to read as not visible.
18
+ - **Lunar eclipses accept an optional observer** for local circumstances; contact times stay geocentric either way.
19
+
20
+ ## Removed
21
+
22
+ - **`observer_required` is gone.** `solar_eclipse` no longer requires an observer. A lone `latitude` or `longitude` on either eclipse class (not both) now throws `incomplete_observer` instead.
23
+
24
+ ## Fixed
25
+
26
+ - **`astronomy_stargazing_plan` step 1** named the nonexistent `openstreetmap_geocode`; it now names `openstreetmap_search_places` and `ref_timezone_lookup` (#37).
27
+
28
+ ## Dependencies
29
+
30
+ - `@types/node` (dev) `^26.6.1` → `^26.6.2`
@@ -0,0 +1,19 @@
1
+ ---
2
+ summary: "astronomy_get_ephemeris: offset-bearing dates reach Horizons as UTC instants, an out-of-span reply is time_out_of_range with Horizons' bound, and the resolved target_name is echoed; astronomy_get_satellite_passes: a pass rising in the window is followed to its set, and well-known names (ISS, Hubble, Tiangong) resolve via a fixed alias table."
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.3.1 — 2026-09-23
8
+
9
+ ## Added
10
+
11
+ - **`astronomy_get_ephemeris`: `target_name`** — the object Horizons actually resolved the designation to, parsed from its `Target body name:` header. A bare name can resolve to an unrelated object (`Eros` → Kerberos, a moon of Pluto); compare `target_name` against the one intended. ([#32](https://github.com/cyanheads/astronomy-mcp-server/issues/32))
12
+ - **`astronomy_get_satellite_passes`: a fixed alias table** resolves ISS / International Space Station, Hubble / Hubble Space Telescope / HST, and Tiangong / CSS / Chinese Space Station directly to their catalog numbers, ignoring case and whitespace, before any CelesTrak `NAME=` search. ([#39](https://github.com/cyanheads/astronomy-mcp-server/issues/39))
13
+
14
+ ## Fixed
15
+
16
+ - **`astronomy_get_ephemeris`** — an offset-bearing `start`/`stop` was forwarded to Horizons verbatim, which cannot read a numeric UTC offset and replies `Cannot interpret date`; that refusal was then misread as `body_not_found`. Horizons now receives the parsed UTC instant. ([#31](https://github.com/cyanheads/astronomy-mcp-server/issues/31))
17
+ - **`astronomy_get_ephemeris`** — a span outside the target's own Horizons data (e.g. Mars ends after A.D. 2599-DEC-31) was also misread as `body_not_found`. It now fails as `time_out_of_range`, with Horizons' own bound in the message. ([#43](https://github.com/cyanheads/astronomy-mcp-server/issues/43))
18
+ - **`astronomy_get_satellite_passes`** — a pass rising inside the search window but setting after it closed was dropped entirely instead of reported through its real set; the scan now keeps stepping through an open pass, bounded to one orbital period. ([#33](https://github.com/cyanheads/astronomy-mcp-server/issues/33))
19
+ - **`astronomy_get_satellite_passes`**: `format()` heading now reads "1 visible pass" in the singular.
@@ -32,7 +32,7 @@ export const stargazingPlanPrompt = prompt('astronomy_stargazing_plan', {
32
32
  '',
33
33
  'Using the location and date above, work through these steps in order:',
34
34
  '',
35
- `1. Resolve the location to latitude/longitude using a geocoding tool (e.g. openstreetmap_geocode), and its IANA timezone (e.g. via reference-data). 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.`,
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
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.`,
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.`,
@@ -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,uXAAuX;YACvX,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,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,9 +1,11 @@
1
1
  /**
2
2
  * @fileoverview astronomy_find_events — consolidated forward search for nine event
3
- * classes under one `event` enum. Solar eclipses take an observer for local
4
- * circumstances; every other class, lunar eclipses included, is geocentric.
5
- * Validation gates fail fast when an event needs a body or an observer that was
6
- * not supplied, or when the body has no such event.
3
+ * classes under one `event` enum. Both eclipse classes take an optional observer:
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.
7
+ * Validation gates fail fast when an event needs a body that was not supplied, when an
8
+ * eclipse observer is half-specified, or when the body has no such event.
7
9
  * @module mcp-server/tools/definitions/find-events.tool
8
10
  */
9
11
  import { z } from '@cyanheads/mcp-ts-core';
@@ -26,7 +28,10 @@ export declare const FindEventsOutput: z.ZodObject<{
26
28
  kind: z.ZodOptional<z.ZodString>;
27
29
  obscuration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
28
30
  local_visible: z.ZodOptional<z.ZodBoolean>;
31
+ contact_altitudes_degrees: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodNumber>>>;
29
32
  contacts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
33
+ peak_latitude_degrees: z.ZodOptional<z.ZodNumber>;
34
+ peak_longitude_degrees: z.ZodOptional<z.ZodNumber>;
30
35
  which: z.ZodOptional<z.ZodEnum<{
31
36
  december: "december";
32
37
  june: "june";
@@ -109,7 +114,10 @@ export declare const findEventsTool: import("@cyanheads/mcp-ts-core").ToolDefini
109
114
  kind: z.ZodOptional<z.ZodString>;
110
115
  obscuration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
111
116
  local_visible: z.ZodOptional<z.ZodBoolean>;
117
+ contact_altitudes_degrees: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodNumber>>>;
112
118
  contacts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
119
+ peak_latitude_degrees: z.ZodOptional<z.ZodNumber>;
120
+ peak_longitude_degrees: z.ZodOptional<z.ZodNumber>;
113
121
  which: z.ZodOptional<z.ZodEnum<{
114
122
  december: "december";
115
123
  june: "june";
@@ -142,10 +150,10 @@ export declare const findEventsTool: import("@cyanheads/mcp-ts-core").ToolDefini
142
150
  distance_au: z.ZodOptional<z.ZodNumber>;
143
151
  }, z.core.$strip>>;
144
152
  }, z.core.$strip>, readonly [{
145
- readonly reason: "observer_required";
153
+ readonly reason: "incomplete_observer";
146
154
  readonly code: JsonRpcErrorCode.InvalidParams;
147
- readonly when: "A solar_eclipse event was requested without observer latitude/longitude.";
148
- readonly recovery: "Add observer latitude and longitude to receive local eclipse circumstances, then retry.";
155
+ readonly when: "A solar_eclipse or lunar_eclipse was requested with only one of latitude and longitude.";
156
+ readonly recovery: "Supply latitude and longitude together for local eclipse circumstances, or omit both for global ones.";
149
157
  }, {
150
158
  readonly reason: "body_required";
151
159
  readonly code: JsonRpcErrorCode.InvalidParams;
@@ -177,5 +185,6 @@ export declare const findEventsTool: import("@cyanheads/mcp-ts-core").ToolDefini
177
185
  readonly thrownBy: "service";
178
186
  }], {
179
187
  readonly totalCount: z.ZodNumber;
188
+ readonly notice: z.ZodOptional<z.ZodString>;
180
189
  }>;
181
190
  //# 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;;;;;;;GAOG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAajE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4F3B,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEpE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoMzB,CAAC"}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoPzB,CAAC"}
@@ -1,16 +1,18 @@
1
1
  /**
2
2
  * @fileoverview astronomy_find_events — consolidated forward search for nine event
3
- * classes under one `event` enum. Solar eclipses take an observer for local
4
- * circumstances; every other class, lunar eclipses included, is geocentric.
5
- * Validation gates fail fast when an event needs a body or an observer that was
6
- * not supplied, or when the body has no such event.
3
+ * classes under one `event` enum. Both eclipse classes take an optional observer:
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.
7
+ * Validation gates fail fast when an event needs a body that was not supplied, when an
8
+ * eclipse observer is half-specified, or when the body has no such event.
7
9
  * @module mcp-server/tools/definitions/find-events.tool
8
10
  */
9
11
  import { tool, z } from '@cyanheads/mcp-ts-core';
10
12
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
11
13
  import { getServerConfig } from '../../../config/server-config.js';
12
14
  import { num, pct, sig } from '../format-numbers.js';
13
- import { getEphemerisService } from '../../../services/ephemeris/ephemeris-service.js';
15
+ import { getEphemerisService, SUPPORTED_SPAN } from '../../../services/ephemeris/ephemeris-service.js';
14
16
  import { EVENT_BODY_NAMES, EVENT_NAMES } from '../../../services/ephemeris/types.js';
15
17
  const BODY_EVENTS = new Set([
16
18
  'opposition',
@@ -18,6 +20,8 @@ const BODY_EVENTS = new Set([
18
20
  'max_elongation',
19
21
  'perigee_apogee',
20
22
  ]);
23
+ /** The event classes whose records an observer changes. */
24
+ const ECLIPSE_EVENTS = new Set(['solar_eclipse', 'lunar_eclipse']);
21
25
  export const FindEventsOutput = z.object({
22
26
  events: z
23
27
  .array(z
@@ -40,11 +44,23 @@ export const FindEventsOutput = z.object({
40
44
  local_visible: z
41
45
  .boolean()
42
46
  .optional()
43
- .describe("True when the eclipsed Sun is above the observer's horizon at peak. Present for solar eclipses only — lunar eclipses are geocentric and report no local visibility."),
47
+ .describe("True when the eclipsed body — the Sun for solar_eclipse, the Moon for lunar_eclipse — is above the observer's horizon at any contact. Present only when latitude/longitude are supplied. A solar result with an observer is always true, because the local search returns only eclipses with the Sun up at first or last contact; contact_altitudes_degrees tells an eclipse at sunrise or sunset from one at midday."),
48
+ contact_altitudes_degrees: z
49
+ .record(z.string(), z.number().nullable())
50
+ .optional()
51
+ .describe("Apparent altitude in degrees of the eclipsed body (the Sun for solar_eclipse, the Moon for lunar_eclipse) above the observer's horizon at each contact, keyed by bare phase name: partial_begin, total_begin, peak, total_end, partial_end, plus penumbral_begin and penumbral_end for a lunar eclipse. Negative means below the horizon; null marks a phase this eclipse does not reach. Present only when latitude/longitude are supplied."),
44
52
  contacts: z
45
53
  .record(z.string(), z.string().nullable())
46
54
  .optional()
47
- .describe('Eclipse contact times in ISO 8601 UTC keyed by phase (e.g. partial_begin_utc, peak_utc); a phase that does not occur is null.'),
55
+ .describe('Eclipse contact times in ISO 8601 UTC keyed by phase (e.g. partial_begin_utc, peak_utc); a phase that does not occur is null. A global solar eclipse carries peak_utc only.'),
56
+ peak_latitude_degrees: z
57
+ .number()
58
+ .optional()
59
+ .describe('Geographic latitude in degrees where a total or annular solar eclipse is greatest. Present for a solar_eclipse searched without an observer; absent for a partial eclipse, whose shadow axis misses Earth.'),
60
+ peak_longitude_degrees: z
61
+ .number()
62
+ .optional()
63
+ .describe('Geographic longitude in degrees where a total or annular solar eclipse is greatest. Present for a solar_eclipse searched without an observer; absent for a partial eclipse.'),
48
64
  which: z
49
65
  .enum(['march', 'september', 'june', 'december'])
50
66
  .optional()
@@ -87,7 +103,7 @@ export const FindEventsOutput = z.object({
87
103
  });
88
104
  export const findEventsTool = tool('astronomy_find_events', {
89
105
  title: 'astronomy-mcp-server: find sky events',
90
- description: 'Search forward from a start time for the next occurrences of one sky-event class, selected by the `event` enum: solar_eclipse, lunar_eclipse, equinox, solstice, moon_quarter, opposition, conjunction, max_elongation, or perigee_apogee. Only solar_eclipse takes an observer: pass latitude and longitude to get local circumstances (contact times plus `local_visible`). Every other class is geocentric and needs no location — a lunar eclipse is the same event everywhere the Moon is up, so it returns contact times and no `local_visible`. The body-relative events (opposition, conjunction, max_elongation, perigee_apogee) require a `body`: opposition applies to the superior planets (mars through pluto), conjunction to any planet, max_elongation to mercury and venus, and perigee_apogee to the moon (perigee/apogee), earth, or a planet (perihelion/aphelion). Returns the next `count` occurrences (default 1). Start defaults to now; pass an IANA `timezone` for observer-local timestamps.',
106
+ description: "Search forward from a start time for the next occurrences of one sky-event class, selected by the `event` enum: solar_eclipse, lunar_eclipse, equinox, solstice, moon_quarter, opposition, conjunction, max_elongation, or perigee_apogee. Both eclipse classes take an optional observer (latitude and longitude together). solar_eclipse without one returns global eclipses — kind, peak time, obscuration, and for a total or annular eclipse the latitude/longitude where it is greatest; with one it returns only eclipses visible from that point, with local contact times, `local_visible`, and the Sun's altitude at each contact. lunar_eclipse returns geocentric contact times, the same instants everywhere on Earth; an observer adds `local_visible` and the Moon's altitude at each contact. Every other class is geocentric and ignores a location. The body-relative events (opposition, conjunction, max_elongation, perigee_apogee) require a `body`: opposition applies to the superior planets (mars through pluto), conjunction to any planet, max_elongation to mercury and venus, and perigee_apogee to the moon (perigee/apogee), earth, or a planet (perihelion/aphelion). Returns the next `count` occurrences (default 1). Searches stop at the end of 2100, the close of the supported span; when that leaves fewer than `count`, a notice says so. Start defaults to now; pass an IANA `timezone` for observer-local timestamps.",
91
107
  annotations: { readOnlyHint: true, openWorldHint: false, idempotentHint: true },
92
108
  input: z.object({
93
109
  event: z.enum(EVENT_NAMES).describe('Which class of event to search for.'),
@@ -111,13 +127,13 @@ export const findEventsTool = tool('astronomy_find_events', {
111
127
  .min(-90)
112
128
  .max(90)
113
129
  .optional()
114
- .describe('Observer latitude in decimal degrees — required for solar_eclipse to get local circumstances, ignored by every other event.'),
130
+ .describe('Observer latitude in decimal degrees, supplied together with longitude. Optional for solar_eclipse and lunar_eclipse, where it adds local circumstances; omit both for a global solar search. Ignored by every other event.'),
115
131
  longitude: z
116
132
  .number()
117
133
  .min(-180)
118
134
  .max(180)
119
135
  .optional()
120
- .describe('Observer longitude in decimal degrees — required for solar_eclipse, ignored by every other event.'),
136
+ .describe('Observer longitude in decimal degrees, supplied together with latitude. Optional for solar_eclipse and lunar_eclipse; ignored by every other event.'),
121
137
  elevation: z
122
138
  .number()
123
139
  .default(0)
@@ -130,13 +146,17 @@ export const findEventsTool = tool('astronomy_find_events', {
130
146
  output: FindEventsOutput,
131
147
  enrichment: {
132
148
  totalCount: z.number().describe('Number of event occurrences returned.'),
149
+ notice: z
150
+ .string()
151
+ .optional()
152
+ .describe('Why the list is shorter than the requested count: the search reached the end of the supported span (2100). Absent when every requested occurrence came back.'),
133
153
  },
134
154
  errors: [
135
155
  {
136
- reason: 'observer_required',
156
+ reason: 'incomplete_observer',
137
157
  code: JsonRpcErrorCode.InvalidParams,
138
- when: 'A solar_eclipse event was requested without observer latitude/longitude.',
139
- recovery: 'Add observer latitude and longitude to receive local eclipse circumstances, then retry.',
158
+ when: 'A solar_eclipse or lunar_eclipse was requested with only one of latitude and longitude.',
159
+ recovery: 'Supply latitude and longitude together for local eclipse circumstances, or omit both for global ones.',
140
160
  },
141
161
  {
142
162
  reason: 'body_required',
@@ -180,10 +200,16 @@ export const findEventsTool = tool('astronomy_find_events', {
180
200
  const svc = getEphemerisService();
181
201
  const timezone = svc.resolveTimezone(input.timezone ?? getServerConfig().defaultTimezone);
182
202
  const start = svc.resolveTime(input.start);
183
- const hasObserver = typeof input.latitude === 'number' && typeof input.longitude === 'number';
184
- if (input.event === 'solar_eclipse' && !hasObserver) {
185
- // Solar eclipses require an observer for local circumstances; lunar eclipses are geocentric.
186
- throw ctx.fail('observer_required', undefined, { ...ctx.recoveryFor('observer_required') });
203
+ const hasLatitude = typeof input.latitude === 'number';
204
+ const hasLongitude = typeof input.longitude === 'number';
205
+ const hasObserver = hasLatitude && hasLongitude;
206
+ /**
207
+ * An eclipse with half an observer would silently answer a different question — the
208
+ * global search — than the local one the caller reached for. Other classes ignore a
209
+ * location entirely, so a lone coordinate there changes nothing and passes.
210
+ */
211
+ if (ECLIPSE_EVENTS.has(input.event) && hasLatitude !== hasLongitude) {
212
+ throw ctx.fail('incomplete_observer', `Observer ${hasLatitude ? 'latitude' : 'longitude'} was supplied without ${hasLatitude ? 'longitude' : 'latitude'}.`, { ...ctx.recoveryFor('incomplete_observer') });
187
213
  }
188
214
  if (BODY_EVENTS.has(input.event) && !input.body) {
189
215
  throw ctx.fail('body_required', undefined, { ...ctx.recoveryFor('body_required') });
@@ -204,6 +230,17 @@ export const findEventsTool = tool('astronomy_find_events', {
204
230
  });
205
231
  ctx.log.info('Found events', { event: input.event, count: records.length });
206
232
  ctx.enrich.total(records.length);
233
+ /**
234
+ * Every search is unbounded except by the supported span, so a short list means the
235
+ * span ended. `notice` is last-wins across enrichment writers, so caveats are collected
236
+ * and written once.
237
+ */
238
+ const caveats = [];
239
+ if (records.length < input.count) {
240
+ caveats.push(`The search reached the end of the supported span (${SUPPORTED_SPAN.lastYear}) after ${records.length} of ${input.count} requested events; no occurrence after ${SUPPORTED_SPAN.lastYear} is computed.`);
241
+ }
242
+ if (caveats.length > 0)
243
+ ctx.enrich.notice(caveats.join(' '));
207
244
  const out = {
208
245
  events: records.map((r) => ({
209
246
  event: r.event,
@@ -212,7 +249,16 @@ export const findEventsTool = tool('astronomy_find_events', {
212
249
  ...(r.kind ? { kind: r.kind } : {}),
213
250
  ...(r.obscuration !== undefined ? { obscuration: r.obscuration } : {}),
214
251
  ...(r.localVisible !== undefined ? { local_visible: r.localVisible } : {}),
252
+ ...(r.contactAltitudesDegrees
253
+ ? { contact_altitudes_degrees: r.contactAltitudesDegrees }
254
+ : {}),
215
255
  ...(r.contacts ? { contacts: r.contacts } : {}),
256
+ ...(r.peakLatitudeDegrees !== undefined
257
+ ? { peak_latitude_degrees: r.peakLatitudeDegrees }
258
+ : {}),
259
+ ...(r.peakLongitudeDegrees !== undefined
260
+ ? { peak_longitude_degrees: r.peakLongitudeDegrees }
261
+ : {}),
216
262
  ...(r.which ? { which: r.which } : {}),
217
263
  ...(r.quarter ? { quarter: r.quarter } : {}),
218
264
  ...(r.body ? { body: r.body } : {}),
@@ -247,6 +293,8 @@ export const findEventsTool = tool('astronomy_find_events', {
247
293
  lines.push(`**Obscuration:** ${e.obscuration === null ? 'unavailable' : pct(e.obscuration, 1)}`);
248
294
  if (e.local_visible !== undefined)
249
295
  lines.push(`**Locally visible:** ${e.local_visible ? 'yes' : 'no'}`);
296
+ if (e.peak_latitude_degrees !== undefined && e.peak_longitude_degrees !== undefined)
297
+ lines.push(`**Peak location:** lat ${num(e.peak_latitude_degrees, 1, '°')}, lon ${num(e.peak_longitude_degrees, 1, '°')}`);
250
298
  if (e.elongation_degrees !== undefined)
251
299
  lines.push(`**Elongation:** ${num(e.elongation_degrees, 1, '°')}`);
252
300
  if (e.visibility)
@@ -264,6 +312,11 @@ export const findEventsTool = tool('astronomy_find_events', {
264
312
  if (parts.length > 0)
265
313
  lines.push(`**Contacts:** ${parts.join(', ')}`);
266
314
  }
315
+ if (e.contact_altitudes_degrees) {
316
+ const parts = Object.entries(e.contact_altitudes_degrees).flatMap(([phase, altitude]) => altitude === null ? [] : [`${phase} ${num(altitude, 1, '°')}`]);
317
+ if (parts.length > 0)
318
+ lines.push(`**Contact altitudes:** ${parts.join(', ')}`);
319
+ }
267
320
  }
268
321
  return [{ type: 'text', text: lines.join('\n') }];
269
322
  },
@@ -1 +1 @@
1
- {"version":3,"file":"find-events.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/find-events.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAkB,MAAM,+BAA+B,CAAC;AAE9F,MAAM,WAAW,GAAG,IAAI,GAAG,CAAY;IACrC,YAAY;IACZ,aAAa;IACb,gBAAgB;IAChB,gBAAgB;CACjB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,MAAM,EAAE,CAAC;SACN,KAAK,CACJ,CAAC;SACE,MAAM,CAAC;QACN,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,yCAAyC,CAAC;QAC9E,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CA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CACF,CAAC,CAAC"}
@@ -8,6 +8,7 @@ import { z } from '@cyanheads/mcp-ts-core';
8
8
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
9
9
  export declare const EphemerisOutput: z.ZodObject<{
10
10
  designation: z.ZodString;
11
+ target_name: z.ZodOptional<z.ZodString>;
11
12
  points: z.ZodArray<z.ZodObject<{
12
13
  time_utc: z.ZodString;
13
14
  ra_hours: z.ZodNumber;
@@ -29,6 +30,7 @@ export declare const getEphemerisTool: import("@cyanheads/mcp-ts-core").ToolDefi
29
30
  step: z.ZodDefault<z.ZodString>;
30
31
  }, z.core.$strip>, z.ZodObject<{
31
32
  designation: z.ZodString;
33
+ target_name: z.ZodOptional<z.ZodString>;
32
34
  points: z.ZodArray<z.ZodObject<{
33
35
  time_utc: z.ZodString;
34
36
  ra_hours: z.ZodNumber;
@@ -58,6 +60,12 @@ export declare const getEphemerisTool: import("@cyanheads/mcp-ts-core").ToolDefi
58
60
  readonly code: JsonRpcErrorCode.InvalidParams;
59
61
  readonly when: "The step is not a positive count followed by a unit of m, h, d, mo, or y.";
60
62
  readonly recovery: "Pass step as a count plus m, h, d, mo, or y — for example \"10m\", \"1h\", or \"1d\" — then retry.";
63
+ }, {
64
+ readonly reason: "time_out_of_range";
65
+ readonly code: JsonRpcErrorCode.InvalidParams;
66
+ readonly when: "The requested span falls outside the target's Horizons data span. The message names the bound Horizons reported, e.g. after A.D. 2599-DEC-31 for Mars.";
67
+ readonly recovery: "Move start and stop inside the target's Horizons data span — the message names the bound the request crossed — then retry.";
68
+ readonly thrownBy: "service";
61
69
  }, {
62
70
  readonly reason: "body_not_found";
63
71
  readonly code: JsonRpcErrorCode.NotFound;
@@ -1 +1 @@
1
- {"version":3,"file":"get-ephemeris.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-ephemeris.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAyEjE,eAAO,MAAM,eAAe;;;;;;;;;;;iBA8B1B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAElE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqQ3B,CAAC"}
1
+ {"version":3,"file":"get-ephemeris.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-ephemeris.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAyEjE,eAAO,MAAM,eAAe;;;;;;;;;;;;iBAoC1B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAElE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsR3B,CAAC"}
@@ -72,6 +72,10 @@ function nextStepInstant(instant, step) {
72
72
  }
73
73
  export const EphemerisOutput = z.object({
74
74
  designation: z.string().describe('The body designation echoed from the request.'),
75
+ target_name: z
76
+ .string()
77
+ .optional()
78
+ .describe("The object JPL Horizons resolved the designation to, from its 'Target body name' header — compare it with the intended object, since a bare name can resolve to a different one. Absent when Horizons' response names no target."),
75
79
  points: z
76
80
  .array(z
77
81
  .object({
@@ -97,13 +101,13 @@ export const EphemerisOutput = z.object({
97
101
  });
98
102
  export const getEphemerisTool = tool('astronomy_get_ephemeris', {
99
103
  title: 'astronomy-mcp-server: get small-body ephemeris',
100
- description: 'Fetch a time-series ephemeris for a small body (asteroid or comet) or spacecraft from JPL Horizons — RA/Dec, distance, and apparent magnitude over a span, optionally with observer-relative altitude/azimuth. This covers objects the in-process major-body set cannot. The designation is passed to Horizons verbatim, so it must be in a form Horizons resolves to a single record: a numbered asteroid takes a trailing-semicolon record lookup (e.g. "433;" for Eros, "1;" for Ceres), and a periodic comet takes the DES + closest-apparition form (e.g. "DES=1P;CAP" for Halley) — a bare name like "433 Eros" or "1P/Halley" returns no match or an ambiguous record list and is rejected. Spacecraft take their negative SPK-ID. `start` and `stop` are ISO 8601 UTC and `stop` must be after `start`; `step` is a count plus a unit of m, h, d, mo, or y, such as "1d", "1h", or "10m". Supplying observer latitude/longitude yields topocentric coordinates and adds alt/az — supply both or neither. This is a gated, network-backed extension (JPL Horizons is keyless but rate-limited and best-effort); large spans truncate inline at 200 rows, and the truncation notice names the exact `start` to resume from — one step past the last row returned, because Horizons includes the start instant in its output — so re-calling from there continues the series without repeating a sample. Splitting the range into smaller adjacent spans works too; keep the same step either way so no sample is lost.',
104
+ description: 'Fetch a time-series ephemeris for a small body (asteroid or comet) or spacecraft from JPL Horizons — RA/Dec, distance, and apparent magnitude over a span, optionally with observer-relative altitude/azimuth. This covers objects the in-process major-body set cannot. The designation is passed to Horizons verbatim, so it must be in a form Horizons resolves to a single record: a numbered asteroid takes a trailing-semicolon record lookup (e.g. "433;" for Eros, "1;" for Ceres), and a periodic comet takes the DES + closest-apparition form (e.g. "DES=1P;CAP" for Halley). Spacecraft take their negative SPK-ID. Anything else goes through the Horizons name search: a bare name matching nothing (e.g. "433 Eros") or several records (e.g. "1P/Halley") is rejected, but one matching a single object succeeds even when that object is not the one meant — "Eros" resolves to Kerberos, a moon of Pluto — so compare `target_name`, the object Horizons resolved, with the one intended. `start` and `stop` are ISO 8601 UTC and `stop` must be after `start`; `step` is a count plus a unit of m, h, d, mo, or y, such as "1d", "1h", or "10m". Supplying observer latitude/longitude yields topocentric coordinates and adds alt/az — supply both or neither. This is a gated, network-backed extension (JPL Horizons is keyless but rate-limited and best-effort); large spans truncate inline at 200 rows, and the truncation notice names the exact `start` to resume from — one step past the last row returned, because Horizons includes the start instant in its output — so re-calling from there continues the series without repeating a sample. Splitting the range into smaller adjacent spans works too; keep the same step either way so no sample is lost.',
101
105
  annotations: { readOnlyHint: true, openWorldHint: true, idempotentHint: true },
102
106
  input: z.object({
103
107
  designation: z
104
108
  .string()
105
109
  .min(1)
106
- .describe('JPL Horizons target, passed verbatim — use a form that resolves to one record. Numbered asteroid: trailing-semicolon record lookup, e.g. "433;" (Eros), "1;" (Ceres). Periodic comet: DES + closest-apparition flag, e.g. "DES=1P;CAP" (Halley), "DES=2P;CAP" (Encke). Spacecraft: negative SPK-ID, e.g. "-48" (Hubble). A bare name like "433 Eros" or "1P/Halley" fails. Look up designations at ssd.jpl.nasa.gov/tools/sbdb_lookup.html.'),
110
+ .describe('JPL Horizons target, passed verbatim — use a form that resolves to one record. Numbered asteroid: trailing-semicolon record lookup, e.g. "433;" (Eros), "1;" (Ceres). Periodic comet: DES + closest-apparition flag, e.g. "DES=1P;CAP" (Halley), "DES=2P;CAP" (Encke). Spacecraft: negative SPK-ID, e.g. "-48" (Hubble). A bare name like "433 Eros" (no match) or "1P/Halley" (several records) is rejected, but one matching a single object succeeds even when it is not the object meant — check `target_name` in the result. Look up designations at ssd.jpl.nasa.gov/tools/sbdb_lookup.html.'),
107
111
  latitude: z
108
112
  .number()
109
113
  .min(-90)
@@ -172,6 +176,14 @@ export const getEphemerisTool = tool('astronomy_get_ephemeris', {
172
176
  when: 'The step is not a positive count followed by a unit of m, h, d, mo, or y.',
173
177
  recovery: 'Pass step as a count plus m, h, d, mo, or y — for example "10m", "1h", or "1d" — then retry.',
174
178
  },
179
+ {
180
+ reason: 'time_out_of_range',
181
+ code: JsonRpcErrorCode.InvalidParams,
182
+ when: "The requested span falls outside the target's Horizons data span. The message names the bound Horizons reported, e.g. after A.D. 2599-DEC-31 for Mars.",
183
+ // Verbatim the hint HorizonsService throws with.
184
+ recovery: "Move start and stop inside the target's Horizons data span — the message names the bound the request crossed — then retry.",
185
+ thrownBy: 'service',
186
+ },
175
187
  {
176
188
  reason: 'body_not_found',
177
189
  code: JsonRpcErrorCode.NotFound,
@@ -215,8 +227,14 @@ export const getEphemerisTool = tool('astronomy_get_ephemeris', {
215
227
  if (stopInstant === undefined) {
216
228
  throw ctx.fail('invalid_time', `Invalid stop "${input.stop}". Expected an ISO 8601 instant naming a real calendar date, e.g. 2024-01-02T00:00:00Z.`, { ...ctx.recoveryFor('invalid_time') });
217
229
  }
218
- const start = input.start ?? startInstant.toISOString();
219
- const stop = input.stop ?? stopInstant.toISOString();
230
+ /**
231
+ * Horizons receives the parsed instants, never the caller's strings. It cannot read a
232
+ * numeric UTC offset ("…T00:00:00-05:00" comes back "Cannot interpret date"), and an
233
+ * offset or zone designator only ever mattered for which instant the string names —
234
+ * which the parse has already settled.
235
+ */
236
+ const start = startInstant.toISOString();
237
+ const stop = stopInstant.toISOString();
220
238
  if (stopInstant.getTime() <= startInstant.getTime()) {
221
239
  throw ctx.fail('invalid_time_range', `stop "${stop}" is not after start "${start}".`, {
222
240
  ...ctx.recoveryFor('invalid_time_range'),
@@ -282,6 +300,7 @@ export const getEphemerisTool = tool('astronomy_get_ephemeris', {
282
300
  ctx.enrich.notice(caveats.join(' '));
283
301
  const out = {
284
302
  designation: result.designation,
303
+ ...(result.targetName ? { target_name: result.targetName } : {}),
285
304
  points: result.points.map((p) => ({
286
305
  time_utc: p.timeUtc,
287
306
  ra_hours: p.raHours,
@@ -296,7 +315,8 @@ export const getEphemerisTool = tool('astronomy_get_ephemeris', {
296
315
  },
297
316
  format: (r) => {
298
317
  const lines = [];
299
- lines.push(`## ${r.designation} — ${r.points.length} points`);
318
+ const target = r.target_name ? ` (Horizons target: ${r.target_name})` : '';
319
+ lines.push(`## ${r.designation}${target} — ${r.points.length} points`);
300
320
  for (const p of r.points) {
301
321
  const altAz = p.altitude_degrees === undefined
302
322
  ? ''