@cyanheads/astronomy-mcp-server 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** astronomy-mcp-server
4
- **Version:** 0.2.4
4
+ **Version:** 0.2.5
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.11.5`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/sdk` ^1.30.0
package/CLAUDE.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** astronomy-mcp-server
4
- **Version:** 0.2.4
4
+ **Version:** 0.2.5
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.11.5`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/sdk` ^1.30.0
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.4-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-^1.30.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.3.0-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.2.5-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-^1.30.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.3.0-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -39,7 +39,7 @@ Seven tools — five form the keyless, offline, deterministic core (always regis
39
39
  | `astronomy_find_events` | Forward search for the next occurrences of one sky-event class: eclipses, equinoxes, solstices, moon quarters, oppositions, conjunctions, greatest elongations, and apsides. |
40
40
  | `astronomy_list_visible` | The one-call "what's up right now" answer: every naked-eye body (and optional bright stars) above the horizon, ranked, annotated, and gated by the Sun's altitude into daylight/twilight/dark. |
41
41
  | `astronomy_get_ephemeris` | *(gated extension)* Time-series ephemeris for a small body (asteroid/comet) or spacecraft via JPL Horizons — covers what the in-process major-body set cannot. Off by default. |
42
- | `astronomy_get_satellite_passes` | *(gated extension)* Visible passes of a satellite (by NORAD ID) over an observer, from a CelesTrak TLE propagated with SGP4 in-process. Off by default. |
42
+ | `astronomy_get_satellite_passes` | *(gated extension)* Visible passes of a satellite (by NORAD catalog number, or by a name resolved against the catalog) over an observer, from a CelesTrak GP element set propagated with SGP4 in-process. Off by default. |
43
43
 
44
44
  This server computes geometry — where a body is, when an event happens — not astrophysics. The core wraps [`astronomy-engine`](https://github.com/cosinekitty/astronomy) (sub-arcminute accuracy, ≈1900–2100), so given the same `(body, time, observer)` every core tool returns identical output with no network, no rate limit, and no API key. It does not geocode: resolve a place name to latitude/longitude upstream (e.g. via an OpenStreetMap server) and pass an IANA `timezone` to receive observer-local times alongside UTC.
45
45
 
@@ -110,13 +110,15 @@ Time-series ephemeris for a small body or spacecraft via the keyless JPL Horizon
110
110
 
111
111
  Visible passes of a satellite over an observer. Registered only when `ASTRONOMY_ENABLE_SATELLITES` is set.
112
112
 
113
- - Fetches the current TLE from CelesTrak by NORAD catalog number (e.g. `25544` for the ISS) and propagates it with SGP4 in-process
113
+ - Identify the satellite by exactly one of `norad_id` (e.g. `25544` for the ISS) or `name` — both, or neither, is rejected before any request goes out
114
+ - Fetches the object's current GP element set from CelesTrak as OMM JSON and propagates it with SGP4 in-process. JSON rather than TLE because the legacy format cannot encode a catalog number above 99999, and CelesTrak already assigns six-digit numbers
115
+ - `name` is matched as a case-insensitive substring of the catalog name, so it resolves only when it picks out a single object — either the sole match, or the one match carrying that name outright. A broader query is rejected with the matching objects and their catalog numbers to choose from, capped at 20 and stating the full match count. The result echoes the query that resolved it as `resolved_from_name`
114
116
  - Returns each pass's rise, peak, and set times with azimuths and the peak elevation
115
117
  - Only naked-eye-plausible passes are returned — the satellite must be sunlit at peak while the observer's sky is dark
116
118
  - Every returned pass rises inside the requested window. A pass already underway at `start` is omitted rather than reported with `start` as its `rise_utc`; move `start` earlier to see it. A pass rising exactly at `start` is kept, so feeding a reported `rise_utc` back as `start` never loses it
117
119
  - An element set that will not propagate to the window is rejected by name — as a reentry when the window sits near the element set's epoch, otherwise as a `start` too far from it — so an empty `passes` list means only "no visible passes in this window"
118
120
  - `start` must be within about a month of today: an element set describes the orbit for weeks around its epoch, and CelesTrak publishes only current ones
119
- - NORAD catalog numbers are found at [celestrak.org](https://celestrak.org) or [heavens-above.com](https://heavens-above.com)
121
+ - NORAD catalog numbers and catalog names are found at [celestrak.org](https://celestrak.org) or [heavens-above.com](https://heavens-above.com)
120
122
  - Searches the next `days` (default 7, max 10); optional observer-local pass times
121
123
 
122
124
  ## Resources and prompts
@@ -263,10 +265,10 @@ All configuration is optional and validated at startup via Zod schemas in `src/c
263
265
  | `ASTRONOMY_ENABLE_HORIZONS` | Register the `astronomy_get_ephemeris` tool (JPL Horizons). | `false` |
264
266
  | `ASTRONOMY_ENABLE_SATELLITES` | Register the `astronomy_get_satellite_passes` tool (CelesTrak + SGP4). | `false` |
265
267
  | `ASTRONOMY_HORIZONS_BASE_URL` | Override the JPL Horizons API endpoint. | `https://ssd.jpl.nasa.gov/api/horizons.api` |
266
- | `ASTRONOMY_CELESTRAK_BASE_URL` | Override the CelesTrak GP/TLE endpoint. | `https://celestrak.org/NORAD/elements/gp.php` |
268
+ | `ASTRONOMY_CELESTRAK_BASE_URL` | Override the CelesTrak GP endpoint. | `https://celestrak.org/NORAD/elements/gp.php` |
267
269
  | `ASTRONOMY_DEFAULT_TIMEZONE` | Fallback IANA timezone when a tool call omits `timezone`. Unset = UTC-only output. | none |
268
270
  | `ASTRONOMY_REQUEST_TIMEOUT_MS` | HTTP timeout (ms) for Horizons and CelesTrak requests. | `15000` |
269
- | `ASTRONOMY_TLE_CACHE_TTL_MS` | In-process TLE cache TTL (ms) — respects CelesTrak's refetch guidance (~once/2h). | `7200000` |
271
+ | `ASTRONOMY_TLE_CACHE_TTL_MS` | In-process element-set cache TTL (ms) — respects CelesTrak's refetch guidance (~once/2h). | `7200000` |
270
272
  | `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http`. | `stdio` |
271
273
  | `MCP_HTTP_PORT` | Port for the HTTP server. | `3010` |
272
274
  | `MCP_AUTH_MODE` | Auth mode: `none`, `jwt`, or `oauth`. | `none` |
@@ -321,7 +323,7 @@ The Dockerfile defaults to HTTP transport, stateless session mode, and logs to `
321
323
  | `src/mcp-server/prompts` | Prompt definitions (`*.prompt.ts`). Stargazing plan. |
322
324
  | `src/services/ephemeris` | The offline compute core — `astronomy-engine` wrapper, body-radius table, and bundled bright-star catalog. |
323
325
  | `src/services/horizons` | JPL Horizons HTTP client (gated extension). |
324
- | `src/services/satellite` | CelesTrak TLE fetch + SGP4 propagation (gated extension). |
326
+ | `src/services/satellite` | CelesTrak GP/OMM fetch + SGP4 propagation (gated extension). |
325
327
  | `tests/` | Unit and integration tests mirroring `src/`. |
326
328
 
327
329
  ## Development guide
@@ -0,0 +1,19 @@
1
+ ---
2
+ summary: "astronomy_get_satellite_passes now fetches CelesTrak element sets as OMM JSON instead of legacy TLE — reaching six-digit catalog numbers — and resolves an optional `name` input to a catalog ID; a malformed GP record is now distinguished from a retryable CelesTrak outage."
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.2.5 — 2026-08-18
8
+
9
+ ## Added
10
+
11
+ - **`name` input** on `astronomy_get_satellite_passes` resolves a satellite name to a catalog ID against CelesTrak's `NAME=` query, mutually exclusive with `norad_id`. An ambiguous match returns `ambiguous_satellite_name` with up to 20 candidates ordered by catalog number, `match_count`/`shown`/`truncated` fields, and a hint that leads with narrowing when the list is capped; a new `resolved_from_name` output field echoes the query that resolved it. ([#19](https://github.com/cyanheads/astronomy-mcp-server/issues/19))
12
+
13
+ ## Changed
14
+
15
+ - **`astronomy_get_satellite_passes`** now fetches CelesTrak's GP data as `FORMAT=JSON` (OMM) instead of `FORMAT=TLE`, propagated via `satellite.js`'s `json2satrec`. TLE cannot encode catalog numbers above 99999, so six-digit objects — over a hundred current Starlink satellites among them — were previously unreachable and misreported as `tle_not_found`. ([#25](https://github.com/cyanheads/astronomy-mcp-server/issues/25))
16
+
17
+ ## Fixed
18
+
19
+ - **`astronomy_get_satellite_passes`** — a GP record that parses as JSON but fails OMM validation now throws a new, non-retryable `malformed_element_set` reason instead of being reported as the retryable `celestrak_unavailable` outage. ([#28](https://github.com/cyanheads/astronomy-mcp-server/issues/28))
@@ -10,17 +10,17 @@ import { parseEnvConfig } from '@cyanheads/mcp-ts-core/config';
10
10
  const ServerConfigSchema = z.object({
11
11
  /** Gate the astronomy_get_ephemeris tool (JPL Horizons). Off by default. */
12
12
  enableHorizons: z.stringbool().default(false),
13
- /** Gate the astronomy_get_satellite_passes tool (CelesTrak TLE + SGP4). Off by default. */
13
+ /** Gate the astronomy_get_satellite_passes tool (CelesTrak GP/OMM + SGP4). Off by default. */
14
14
  enableSatellites: z.stringbool().default(false),
15
15
  /** JPL Horizons API endpoint. */
16
16
  horizonsBaseUrl: z.string().default('https://ssd.jpl.nasa.gov/api/horizons.api'),
17
- /** CelesTrak GP/TLE endpoint. */
17
+ /** CelesTrak GP endpoint. */
18
18
  celestrakBaseUrl: z.string().default('https://celestrak.org/NORAD/elements/gp.php'),
19
19
  /** Optional fallback IANA timezone when a tool call omits `timezone`. Unset = UTC-only output. */
20
20
  defaultTimezone: z.string().optional(),
21
21
  /** HTTP timeout (ms) for Horizons and CelesTrak requests. */
22
22
  requestTimeoutMs: z.coerce.number().default(15000),
23
- /** In-process TLE cache TTL (ms). Default 2h — respects CelesTrak's refetch guidance. */
23
+ /** In-process element-set cache TTL (ms). Default 2h — respects CelesTrak's refetch guidance. */
24
24
  tleCacheTtlMs: z.coerce.number().default(7200000),
25
25
  });
26
26
  let _config;
@@ -1 +1 @@
1
- {"version":3,"file":"server-config.js","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,4EAA4E;IAC5E,cAAc,EAAE,CAAC,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAC7C,2FAA2F;IAC3F,gBAAgB,EAAE,CAAC,CAAC,UAAU,EAA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gB,EAAE,CAAC,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAC/C,iCAAiC;IACjC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,2CAA2C,CAAC;IAChF,6BAA6B;IAC7B,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,6CAA6C,CAAC;IACnF,kGAAkG;IAClG,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,6DAA6D;IAC7D,gBAAgB,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAClD,iGAAiG;IACjG,aAAa,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;CAClD,CAAC,CAAC;AAIH,IAAI,OAAiC,CAAC;AAEtC,uEAAuE;AACvE,MAAM,UAAU,eAAe;IAC7B,OAAO,KAAK,cAAc,CAAC,kBAAkB,EAAE;QAC7C,cAAc,EAAE,2BAA2B;QAC3C,gBAAgB,EAAE,6BAA6B;QAC/C,eAAe,EAAE,6BAA6B;QAC9C,gBAAgB,EAAE,8BAA8B;QAChD,eAAe,EAAE,4BAA4B;QAC7C,gBAAgB,EAAE,8BAA8B;QAChD,aAAa,EAAE,4BAA4B;KAC5C,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * @fileoverview astronomy_get_satellite_passes — gated extension. Visible passes of a
3
- * satellite (by NORAD ID) over an observer, via a CelesTrak TLE propagated with
4
- * SGP4 offline. Registered only when ASTRONOMY_ENABLE_SATELLITES is set.
3
+ * satellite (by NORAD catalog number, or by a name resolved against the catalog) over
4
+ * an observer, via a CelesTrak GP element set propagated with SGP4 offline. Registered
5
+ * only when ASTRONOMY_ENABLE_SATELLITES is set.
5
6
  * @module mcp-server/tools/definitions/get-satellite-passes.tool
6
7
  */
7
8
  import { z } from '@cyanheads/mcp-ts-core';
@@ -9,6 +10,7 @@ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
9
10
  export declare const SatellitePassesOutput: z.ZodObject<{
10
11
  norad_id: z.ZodNumber;
11
12
  satellite_name: z.ZodOptional<z.ZodString>;
13
+ resolved_from_name: z.ZodOptional<z.ZodString>;
12
14
  passes: z.ZodArray<z.ZodObject<{
13
15
  rise_utc: z.ZodString;
14
16
  peak_utc: z.ZodString;
@@ -26,7 +28,8 @@ export declare const SatellitePassesOutput: z.ZodObject<{
26
28
  }, z.core.$strip>;
27
29
  export type SatellitePassesOutputType = z.infer<typeof SatellitePassesOutput>;
28
30
  export declare const getSatellitePassesTool: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
29
- norad_id: z.ZodNumber;
31
+ norad_id: z.ZodOptional<z.ZodNumber>;
32
+ name: z.ZodOptional<z.ZodString>;
30
33
  latitude: z.ZodNumber;
31
34
  longitude: z.ZodNumber;
32
35
  elevation: z.ZodDefault<z.ZodNumber>;
@@ -36,6 +39,7 @@ export declare const getSatellitePassesTool: import("@cyanheads/mcp-ts-core").To
36
39
  }, z.core.$strip>, z.ZodObject<{
37
40
  norad_id: z.ZodNumber;
38
41
  satellite_name: z.ZodOptional<z.ZodString>;
42
+ resolved_from_name: z.ZodOptional<z.ZodString>;
39
43
  passes: z.ZodArray<z.ZodObject<{
40
44
  rise_utc: z.ZodString;
41
45
  peak_utc: z.ZodString;
@@ -65,11 +69,26 @@ export declare const getSatellitePassesTool: import("@cyanheads/mcp-ts-core").To
65
69
  readonly code: JsonRpcErrorCode.InvalidParams;
66
70
  readonly when: "The `timezone` value is not an IANA zone this runtime knows.";
67
71
  readonly recovery: "Pass a valid IANA timezone like America/Los_Angeles or UTC.";
72
+ }, {
73
+ readonly reason: "invalid_target";
74
+ readonly code: JsonRpcErrorCode.InvalidParams;
75
+ readonly when: "Neither `norad_id` nor `name` was supplied, or both were.";
76
+ readonly recovery: "Supply exactly one of norad_id or name — norad_id when the catalog number is known, name otherwise.";
68
77
  }, {
69
78
  readonly reason: "tle_not_found";
70
79
  readonly code: JsonRpcErrorCode.NotFound;
71
80
  readonly when: "CelesTrak has no current element set for the NORAD ID.";
72
81
  readonly recovery: "Verify the catalog number at celestrak.org; the object may have decayed or never been catalogued.";
82
+ }, {
83
+ readonly reason: "satellite_name_not_found";
84
+ readonly code: JsonRpcErrorCode.NotFound;
85
+ readonly when: "No current CelesTrak object has a name containing the `name` value.";
86
+ readonly recovery: "Check the spelling, try a shorter distinctive substring, or look the object up at celestrak.org.";
87
+ }, {
88
+ readonly reason: "ambiguous_satellite_name";
89
+ readonly code: JsonRpcErrorCode.InvalidParams;
90
+ readonly when: "The `name` value matches more than one current object and none of them carries it as their whole name. The error names the match count and lists the matching objects with their catalog numbers, capped when there are more than the list holds. A capped list carries a hint leading with narrowing instead of with the list, since the wanted object need not be among the ones shown.";
91
+ readonly recovery: "Re-call with norad_id set to one of the listed candidates, or supply a longer, more specific name.";
73
92
  }, {
74
93
  readonly reason: "object_decayed";
75
94
  readonly code: JsonRpcErrorCode.NotFound;
@@ -78,9 +97,14 @@ export declare const getSatellitePassesTool: import("@cyanheads/mcp-ts-core").To
78
97
  }, {
79
98
  readonly reason: "celestrak_unavailable";
80
99
  readonly code: JsonRpcErrorCode.ServiceUnavailable;
81
- readonly when: "The TLE fetch failed after retries.";
100
+ readonly when: "The element-set fetch failed after retries, or returned a body that is not JSON at all.";
82
101
  readonly retryable: true;
83
102
  readonly recovery: "CelesTrak is degraded or timed out; retry in a few minutes.";
103
+ }, {
104
+ readonly reason: "malformed_element_set";
105
+ readonly code: JsonRpcErrorCode.SerializationError;
106
+ readonly when: "CelesTrak answered with parsable JSON whose GP record does not carry the fields an OMM element set requires — a permanent property of that record, not the transient outage celestrak_unavailable covers. The same request returns the same record, so retrying it can only fail again.";
107
+ readonly recovery: "Retrying returns the same record — request a different object, and report the element set to celestrak.org.";
84
108
  }], {
85
109
  readonly totalCount: z.ZodNumber;
86
110
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"get-satellite-passes.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-satellite-passes.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAMjE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;iBAqDhC,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE9E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqKjC,CAAC"}
1
+ {"version":3,"file":"get-satellite-passes.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-satellite-passes.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAMjE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;iBA2DhC,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE9E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyOjC,CAAC"}
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * @fileoverview astronomy_get_satellite_passes — gated extension. Visible passes of a
3
- * satellite (by NORAD ID) over an observer, via a CelesTrak TLE propagated with
4
- * SGP4 offline. Registered only when ASTRONOMY_ENABLE_SATELLITES is set.
3
+ * satellite (by NORAD catalog number, or by a name resolved against the catalog) over
4
+ * an observer, via a CelesTrak GP element set propagated with SGP4 offline. Registered
5
+ * only when ASTRONOMY_ENABLE_SATELLITES is set.
5
6
  * @module mcp-server/tools/definitions/get-satellite-passes.tool
6
7
  */
7
8
  import { tool, z } from '@cyanheads/mcp-ts-core';
@@ -15,7 +16,11 @@ export const SatellitePassesOutput = z.object({
15
16
  satellite_name: z
16
17
  .string()
17
18
  .optional()
18
- .describe('Satellite name from the TLE header, when present.'),
19
+ .describe("Satellite name as CelesTrak catalogs it (the element set's OBJECT_NAME)."),
20
+ resolved_from_name: z
21
+ .string()
22
+ .optional()
23
+ .describe('The name query that resolved this object. Present only when the request supplied `name` rather than `norad_id`.'),
19
24
  passes: z
20
25
  .array(z
21
26
  .object({
@@ -54,14 +59,20 @@ export const SatellitePassesOutput = z.object({
54
59
  });
55
60
  export const getSatellitePassesTool = tool('astronomy_get_satellite_passes', {
56
61
  title: 'astronomy-mcp-server: get satellite passes',
57
- description: "Predict visible passes of a satellite (e.g. the ISS, NORAD 25544) over an observer in the next `days`. Fetches the current TLE from CelesTrak, propagates it with SGP4 in-process, and returns each pass's rise, peak, and set times with azimuths and the peak elevation. Only passes that are naked-eye-plausible are returned — the satellite must be sunlit at peak while the observer's sky is dark. Every returned pass rises within the requested window: a pass already underway at `start` is omitted rather than reported with `start` as its rise, so back up `start` to see it. An element set that will not propagate to the window is rejected by name rather than returning an empty list, so an empty `passes` means only that nothing was visible. `start` must be within about a month of today — an element set describes the orbit for weeks around its epoch and cannot be propagated further. NORAD catalog numbers are found at celestrak.org or heavens-above.com. This is a gated, network-backed extension (CelesTrak is keyless but rate-limited; TLEs are cached briefly). Default elevation 0 m; pass an IANA timezone for observer-local pass times.",
62
+ description: "Predict visible passes of a satellite (e.g. the ISS, NORAD 25544) over an observer in the next `days`. Identify the satellite by exactly one of `norad_id` or `name` — supplying both, or neither, is rejected. `name` is matched as a case-insensitive substring of CelesTrak's catalog names, so it resolves only when it picks out a single object: a broader query comes back with the matching objects and their catalog numbers to choose from, and the result echoes the query that resolved it as `resolved_from_name`. Fetches the object's current GP element set from CelesTrak, propagates it with SGP4 in-process, and returns each pass's rise, peak, and set times with azimuths and the peak elevation. Only passes that are naked-eye-plausible are returned — the satellite must be sunlit at peak while the observer's sky is dark. Every returned pass rises within the requested window: a pass already underway at `start` is omitted rather than reported with `start` as its rise, so back up `start` to see it. An element set that will not propagate to the window is rejected by name rather than returning an empty list, so an empty `passes` means only that nothing was visible. `start` must be within about a month of today — an element set describes the orbit for weeks around its epoch and cannot be propagated further. NORAD catalog numbers and catalog names are found at celestrak.org or heavens-above.com. This is a gated, network-backed extension (CelesTrak is keyless but rate-limited; element sets are cached briefly). Default elevation 0 m; pass an IANA timezone for observer-local pass times.",
58
63
  annotations: { readOnlyHint: true, openWorldHint: true, idempotentHint: true },
59
- input: z.object({
64
+ input: z
65
+ .object({
60
66
  norad_id: z
61
67
  .number()
62
68
  .int()
63
69
  .positive()
64
- .describe('NORAD catalog number of the satellite, e.g. 25544 for the ISS. Found at celestrak.org or heavens-above.com.'),
70
+ .optional()
71
+ .describe('NORAD catalog number of the satellite, e.g. 25544 for the ISS. Found at celestrak.org or heavens-above.com. Mutually exclusive with `name` — supply exactly one.'),
72
+ name: z
73
+ .string()
74
+ .optional()
75
+ .describe('Satellite name to resolve against CelesTrak, e.g. "ISS (ZARYA)". Matched as a case-insensitive substring of the catalog name, so give the fullest name you have — a short one matches many objects and is rejected as ambiguous. Mutually exclusive with `norad_id` — supply exactly one.'),
65
76
  latitude: z
66
77
  .number()
67
78
  .min(-90)
@@ -91,6 +102,19 @@ export const getSatellitePassesTool = tool('astronomy_get_satellite_passes', {
91
102
  .string()
92
103
  .optional()
93
104
  .describe('IANA timezone for localized pass times, e.g. "America/Los_Angeles". When omitted, output is UTC-only.'),
105
+ })
106
+ /**
107
+ * `norad_id` and `name` are two ways of naming one object, so neither can be marked
108
+ * required on its own. `oneOf` carries the exclusivity into the emitted JSON Schema,
109
+ * where a validating client can act on it — with `type` on each branch, since Gemini
110
+ * rejects an untyped one. The handler enforces the same rule with a typed failure, so
111
+ * a client that does not validate still gets a hint rather than a schema error.
112
+ */
113
+ .meta({
114
+ oneOf: [
115
+ { type: 'object', required: ['norad_id'], not: { required: ['name'] } },
116
+ { type: 'object', required: ['name'], not: { required: ['norad_id'] } },
117
+ ],
94
118
  }),
95
119
  output: SatellitePassesOutput,
96
120
  enrichment: {
@@ -118,12 +142,33 @@ export const getSatellitePassesTool = tool('astronomy_get_satellite_passes', {
118
142
  // Verbatim the hint EphemerisService.resolveTimezone() throws with.
119
143
  recovery: 'Pass a valid IANA timezone like America/Los_Angeles or UTC.',
120
144
  },
145
+ {
146
+ reason: 'invalid_target',
147
+ code: JsonRpcErrorCode.InvalidParams,
148
+ when: 'Neither `norad_id` nor `name` was supplied, or both were.',
149
+ // Verbatim the hint the handler throws with, so the contract documents the same
150
+ // next move the client is handed on the wire.
151
+ recovery: 'Supply exactly one of norad_id or name — norad_id when the catalog number is known, name otherwise.',
152
+ },
121
153
  {
122
154
  reason: 'tle_not_found',
123
155
  code: JsonRpcErrorCode.NotFound,
124
156
  when: 'CelesTrak has no current element set for the NORAD ID.',
157
+ // Verbatim the hint SatelliteService throws with, as are the four below.
125
158
  recovery: 'Verify the catalog number at celestrak.org; the object may have decayed or never been catalogued.',
126
159
  },
160
+ {
161
+ reason: 'satellite_name_not_found',
162
+ code: JsonRpcErrorCode.NotFound,
163
+ when: 'No current CelesTrak object has a name containing the `name` value.',
164
+ recovery: 'Check the spelling, try a shorter distinctive substring, or look the object up at celestrak.org.',
165
+ },
166
+ {
167
+ reason: 'ambiguous_satellite_name',
168
+ code: JsonRpcErrorCode.InvalidParams,
169
+ when: 'The `name` value matches more than one current object and none of them carries it as their whole name. The error names the match count and lists the matching objects with their catalog numbers, capped when there are more than the list holds. A capped list carries a hint leading with narrowing instead of with the list, since the wanted object need not be among the ones shown.',
170
+ recovery: 'Re-call with norad_id set to one of the listed candidates, or supply a longer, more specific name.',
171
+ },
127
172
  {
128
173
  reason: 'object_decayed',
129
174
  code: JsonRpcErrorCode.NotFound,
@@ -133,14 +178,29 @@ export const getSatellitePassesTool = tool('astronomy_get_satellite_passes', {
133
178
  {
134
179
  reason: 'celestrak_unavailable',
135
180
  code: JsonRpcErrorCode.ServiceUnavailable,
136
- when: 'The TLE fetch failed after retries.',
181
+ when: 'The element-set fetch failed after retries, or returned a body that is not JSON at all.',
137
182
  retryable: true,
138
183
  recovery: 'CelesTrak is degraded or timed out; retry in a few minutes.',
139
184
  },
185
+ {
186
+ reason: 'malformed_element_set',
187
+ code: JsonRpcErrorCode.SerializationError,
188
+ when: 'CelesTrak answered with parsable JSON whose GP record does not carry the fields an OMM element set requires — a permanent property of that record, not the transient outage celestrak_unavailable covers. The same request returns the same record, so retrying it can only fail again.',
189
+ recovery: 'Retrying returns the same record — request a different object, and report the element set to celestrak.org.',
190
+ },
140
191
  ],
141
192
  async handler(input, ctx) {
142
193
  const satSvc = getSatelliteService();
143
194
  const ephSvc = getEphemerisService();
195
+ const noradId = input.norad_id;
196
+ /**
197
+ * Form-based clients send an omitted string as `''`, so a blank `name` is the absence
198
+ * of one rather than a query for every object in the catalog.
199
+ */
200
+ const nameQuery = input.name?.trim() || undefined;
201
+ if ((noradId === undefined) === (nameQuery === undefined)) {
202
+ throw ctx.fail('invalid_target', 'Identify the satellite with exactly one of `norad_id` or `name`.', ctx.recoveryFor('invalid_target'));
203
+ }
144
204
  const timezone = ephSvc.resolveTimezone(input.timezone ?? getServerConfig().defaultTimezone);
145
205
  /**
146
206
  * resolveTime() validates the instant (invalid_time / time_out_of_range) and returns
@@ -153,17 +213,25 @@ export const getSatellitePassesTool = tool('astronomy_get_satellite_passes', {
153
213
  longitude: input.longitude,
154
214
  elevation: input.elevation,
155
215
  };
156
- const tle = await satSvc.fetchTle(input.norad_id, ctx);
216
+ /**
217
+ * The guard above is what pairs the two selectors, and TypeScript cannot follow that
218
+ * across two independent optionals — hence the assertion on the arm it rules out.
219
+ */
220
+ const elements = noradId === undefined
221
+ ? await satSvc.resolveByName(nameQuery, ctx)
222
+ : await satSvc.fetchElementSet(noradId, ctx);
157
223
  const formatLocal = timezone ? (d) => ephSvc.formatLocal(d, timezone) : undefined;
158
- const result = satSvc.predictPasses(tle, input.norad_id, observer, input.days, start, formatLocal);
224
+ const result = satSvc.predictPasses(elements, observer, input.days, start, formatLocal);
159
225
  ctx.log.info('Predicted satellite passes', {
160
- noradId: input.norad_id,
226
+ noradId: result.noradId,
227
+ resolvedFromName: nameQuery,
161
228
  passes: result.passes.length,
162
229
  });
163
230
  ctx.enrich.total(result.passes.length);
164
231
  const out = {
165
232
  norad_id: result.noradId,
166
- ...(result.satelliteName ? { satellite_name: result.satelliteName } : {}),
233
+ satellite_name: result.satelliteName,
234
+ ...(nameQuery ? { resolved_from_name: nameQuery } : {}),
167
235
  passes: result.passes.map((p) => ({
168
236
  rise_utc: p.riseUtc,
169
237
  peak_utc: p.peakUtc,
@@ -185,6 +253,8 @@ export const getSatellitePassesTool = tool('astronomy_get_satellite_passes', {
185
253
  const lines = [];
186
254
  const nameLabel = r.satellite_name ? `${r.satellite_name} ` : '';
187
255
  lines.push(`## ${nameLabel}(NORAD ${r.norad_id}) — ${r.passes.length} visible passes`);
256
+ if (r.resolved_from_name)
257
+ lines.push(`Resolved from the name query "${r.resolved_from_name}".`);
188
258
  if (r.passes.length === 0)
189
259
  lines.push('No visible passes in the requested window (sunlit satellite over a dark sky).');
190
260
  for (const p of r.passes) {
@@ -1 +1 @@
1
- {"version":3,"file":"get-satellite-passes.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-satellite-passes.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,eAAe,E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C,CAAC,qBAAqB,EAAE,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,oBAAoB,EAAE,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,mBAAmB,EAAE,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,MAAM,EAAE,CACtc,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -1,38 +1,83 @@
1
1
  /**
2
2
  * @fileoverview SatelliteService — gated extension that predicts visible satellite
3
- * passes. Fetches the current TLE from CelesTrak (keyless, cached briefly in
4
- * process per CelesTrak's refetch guidance), propagates with SGP4 via satellite.js
5
- * (offline), and returns above-horizon passes. A pass is "visible" only when the
6
- * satellite is sunlit at peak AND the observer's sky is dark — the ground-darkness
7
- * gate reuses the core sun-altitude logic. A pass already underway when the window
8
- * opens is omitted rather than reported with the query boundary as its rise, and an
9
- * element set that will not propagate to the window is rejected — naming the object
10
- * or the requested instant, whichever the epoch distance implicates — rather than
11
- * yielding no passes. Network-touching code carries its own timeout + retry boundary
12
- * and degrades loudly; it never substitutes core output.
3
+ * passes. Fetches the current GP element set from CelesTrak as OMM JSON (keyless,
4
+ * cached briefly in process per CelesTrak's refetch guidance), propagates it with SGP4
5
+ * via satellite.js (offline), and returns above-horizon passes. One request builder
6
+ * serves both lookups: by catalog number (`CATNR=`) and by name (`NAME=`, a
7
+ * case-insensitive substring match whose single-match response already carries the
8
+ * element set, so resolving a name costs no extra round trip). A pass is "visible"
9
+ * only when the satellite is sunlit at peak AND the observer's sky is dark — the
10
+ * ground-darkness gate reuses the core sun-altitude logic. A pass already underway
11
+ * when the window opens is omitted rather than reported with the query boundary as its
12
+ * rise, and an element set that will not propagate to the window is rejected — naming
13
+ * the object or the requested instant, whichever the epoch distance implicates —
14
+ * rather than yielding no passes. Network-touching code carries its own timeout +
15
+ * retry boundary and degrades loudly; it never substitutes core output. A response
16
+ * that parses but is not an OMM element set is reported apart from an outage — its
17
+ * shape is a property of the record, so retrying it can only fail again.
13
18
  * @module services/satellite/satellite-service
14
19
  */
15
20
  import type { Context } from '@cyanheads/mcp-ts-core';
16
21
  import type { ObserverInput } from '../ephemeris/types.js';
17
- import type { SatellitePassResult, Tle } from './types.js';
22
+ import { type ElementSet, type SatellitePassResult } from './types.js';
18
23
  export declare class SatelliteService {
19
24
  private readonly baseUrl;
20
25
  private readonly timeoutMs;
21
26
  private readonly cacheTtlMs;
22
27
  private readonly cache;
23
28
  constructor(baseUrl: string, timeoutMs: number, cacheTtlMs: number);
24
- /** Fetch a current TLE for a NORAD ID, using the in-process TTL cache. */
25
- fetchTle(noradId: number, ctx: Context): Promise<Tle>;
29
+ /** Fetch the current element set for a NORAD ID, using the in-process TTL cache. */
30
+ fetchElementSet(noradId: number, ctx: Context): Promise<ElementSet>;
26
31
  /**
27
- * Map a fetch/transport McpError onto the typed contract with leak-free data.
28
- * A NotFound (CelesTrak's 404 for an uncatalogued object) becomes tle_not_found;
29
- * everything else — 5xx (ServiceUnavailable), a fetch deadline (Timeout), or a
30
- * network failure — becomes celestrak_unavailable. The
31
- * original error rides as `cause` for server-side logs but never reaches the client.
32
+ * Resolve a satellite name to the one current element set it names. CelesTrak matches
33
+ * `NAME=` as a case-insensitive substring, so a query resolves only when it picks out a
34
+ * single object — either because it matched one, or because exactly one match carries
35
+ * that name outright, which is a request for that object however many longer names
36
+ * contain it. Anything else comes back as candidates to choose from.
32
37
  */
33
- private classifyFetchError;
34
- /** Parse a CelesTrak TLE response (optional name line + the two element lines). */
35
- private parseTle;
38
+ resolveByName(name: string, ctx: Context): Promise<ElementSet>;
39
+ /** The one record whose `OBJECT_NAME` is the query itself, when exactly one is. */
40
+ private exactlyNamed;
41
+ /** The cached element set for a query, while its TTL holds. */
42
+ private fromCache;
43
+ private cacheElementSet;
44
+ /**
45
+ * Run one GP query and return the records it matched. `FORMAT=JSON` rather than
46
+ * `FORMAT=TLE`: the legacy format cannot encode a catalog number above 99999, and
47
+ * CelesTrak refuses to serve such an object as TLE at all, so JSON is the only format
48
+ * covering the whole catalog. `params` is the query fragment selecting the objects
49
+ * (`CATNR=` or `NAME=`); `miss` names an empty result in the caller's own terms, since
50
+ * "no object with that catalog number" and "no object with that name" are different
51
+ * answers with different next moves.
52
+ */
53
+ private fetchGpRecords;
54
+ /**
55
+ * Parse a CelesTrak GP response into OMM records. The miss sentinel has to be tested
56
+ * before `JSON.parse`: CelesTrak returns that text under a 200 in some cases, and
57
+ * parsing it would throw a `SyntaxError` where the caller is owed a typed miss.
58
+ */
59
+ private parseGpRecords;
60
+ private unparsable;
61
+ /**
62
+ * Name the record that failed OMM validation, and the fields that failed it. Each
63
+ * issue path is `[record index, field name]`, and those names are the OMM message's
64
+ * own, so listing them says which part of the record is wrong without putting the
65
+ * validator's vocabulary — issue codes, expected/received types — on the wire. A body
66
+ * whose whole shape is wrong (an object where an array belongs) names no field, and
67
+ * the message stands on the subject alone.
68
+ */
69
+ private malformedElementSet;
70
+ private catalogMiss;
71
+ private nameMiss;
72
+ /**
73
+ * Hand back the objects a name query matched so the caller can name one outright. The
74
+ * total is stated whether or not the list is complete, because a slice presented as the
75
+ * whole set would read as a catalog holding twenty Starlinks. Ordered by catalog
76
+ * number — the order CelesTrak already answers in — so the same query always offers the
77
+ * same candidates. Whether the list is complete also selects the hint: a complete list
78
+ * is something to pick from, a slice is something to narrow past.
79
+ */
80
+ private ambiguousName;
36
81
  /**
37
82
  * Predict visible passes over the next `days` from `start`. Steps the orbit with
38
83
  * SGP4, brackets above-horizon intervals, and keeps passes whose peak is sunlit
@@ -43,7 +88,7 @@ export declare class SatelliteService {
43
88
  * `time_out_of_range`. Without that check either condition reaches the caller as
44
89
  * `passes: []`, which reads identically to "nothing visible tonight".
45
90
  */
46
- predictPasses(tle: Tle, noradId: number, observer: ObserverInput, days: number, start: Date, formatLocal?: (d: Date) => string): SatellitePassResult;
91
+ predictPasses(elements: ElementSet, observer: ObserverInput, days: number, start: Date, formatLocal?: (d: Date) => string): SatellitePassResult;
47
92
  /**
48
93
  * Name the reason SGP4 refused the first instant of the window. The refusal on its own
49
94
  * is ambiguous: a reentered object and a start far from the element set's epoch both
@@ -1 +1 @@
1
- {"version":3,"file":"satellite-service.d.ts","sourceRoot":"","sources":["../../../src/services/satellite/satellite-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAqBtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAiB,mBAAmB,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAiC1E,qBAAa,gBAAgB;IAIzB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAL7B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgC;IAEtD,YACmB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EACjC;IAEJ,0EAA0E;IACpE,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAsC1D;IAED;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB;IAmB1B,mFAAmF;IACnF,OAAO,CAAC,QAAQ;IA4BhB;;;;;;;;;OASG;IACH,aAAa,CACX,GAAG,E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C,CASxE;IAED;;;;;;OAMG;IACG,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAYnE;IAED,mFAAmF;IACnF,OAAO,CAAC,YAAY;IAMpB,+DAA+D;IAC/D,OAAO,CAAC,SAAS;IAKjB,OAAO,CAAC,eAAe;IAUvB;;;;;;;;OAQG;YACW,cAAc;IAmD5B;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAuBtB,OAAO,CAAC,UAAU;IAOlB;;;;;;;OAOG;IACH,OAAO,CAAC,mBAAmB;IAiB3B,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,QAAQ;IAOhB;;;;;;;OAOG;IACH,OAAO,CAAC,aAAa;IAsBrB;;;;;;;;;OASG;IACH,aAAa,CACX,QAAQ,EAAE,UAAU,EACpB,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,IAAI,EACX,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,MAAM,GAChC,mBAAmB,CAuGrB;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,0BAA0B;IAyBlC,qFAAqF;IACrF,OAAO,CAAC,UAAU;IAalB,uFAAuF;IACvF,OAAO,CAAC,QAAQ;IAQhB,+FAA+F;IAC/F,OAAO,CAAC,YAAY;CAMrB;AAMD,6FAA6F;AAC7F,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAEjG;AAED,8DAA8D;AAC9D,wBAAgB,mBAAmB,IAAI,gBAAgB,CAKtD"}
@@ -1,21 +1,27 @@
1
1
  /**
2
2
  * @fileoverview SatelliteService — gated extension that predicts visible satellite
3
- * passes. Fetches the current TLE from CelesTrak (keyless, cached briefly in
4
- * process per CelesTrak's refetch guidance), propagates with SGP4 via satellite.js
5
- * (offline), and returns above-horizon passes. A pass is "visible" only when the
6
- * satellite is sunlit at peak AND the observer's sky is dark — the ground-darkness
7
- * gate reuses the core sun-altitude logic. A pass already underway when the window
8
- * opens is omitted rather than reported with the query boundary as its rise, and an
9
- * element set that will not propagate to the window is rejected — naming the object
10
- * or the requested instant, whichever the epoch distance implicates — rather than
11
- * yielding no passes. Network-touching code carries its own timeout + retry boundary
12
- * and degrades loudly; it never substitutes core output.
3
+ * passes. Fetches the current GP element set from CelesTrak as OMM JSON (keyless,
4
+ * cached briefly in process per CelesTrak's refetch guidance), propagates it with SGP4
5
+ * via satellite.js (offline), and returns above-horizon passes. One request builder
6
+ * serves both lookups: by catalog number (`CATNR=`) and by name (`NAME=`, a
7
+ * case-insensitive substring match whose single-match response already carries the
8
+ * element set, so resolving a name costs no extra round trip). A pass is "visible"
9
+ * only when the satellite is sunlit at peak AND the observer's sky is dark — the
10
+ * ground-darkness gate reuses the core sun-altitude logic. A pass already underway
11
+ * when the window opens is omitted rather than reported with the query boundary as its
12
+ * rise, and an element set that will not propagate to the window is rejected — naming
13
+ * the object or the requested instant, whichever the epoch distance implicates —
14
+ * rather than yielding no passes. Network-touching code carries its own timeout +
15
+ * retry boundary and degrades loudly; it never substitutes core output. A response
16
+ * that parses but is not an OMM element set is reported apart from an outage — its
17
+ * shape is a property of the record, so retrying it can only fail again.
13
18
  * @module services/satellite/satellite-service
14
19
  */
15
- import { invalidParams, JsonRpcErrorCode, McpError, notFound, serviceUnavailable, } from '@cyanheads/mcp-ts-core/errors';
20
+ import { invalidParams, JsonRpcErrorCode, McpError, notFound, serializationError, serviceUnavailable, } from '@cyanheads/mcp-ts-core/errors';
16
21
  import { fetchWithTimeout, withRetry } from '@cyanheads/mcp-ts-core/utils';
17
22
  import { Body, Equator, Horizon, MakeTime, Observer } from 'astronomy-engine';
18
- import { ecfToLookAngles, eciToEcf, gstime, jday, propagate, shadowFraction, sunPos, twoline2satrec, } from 'satellite.js';
23
+ import { ecfToLookAngles, eciToEcf, gstime, jday, json2satrec, propagate, shadowFraction, sunPos, } from 'satellite.js';
24
+ import { OmmResponseSchema, } from './types.js';
19
25
  const DEG = 180 / Math.PI;
20
26
  /**
21
27
  * Opt in to satellite.js's community decay check on every propagation. Reference SGP4
@@ -41,6 +47,34 @@ const MIN_PEAK_ELEVATION = 10;
41
47
  const STEP_SECONDS = 30;
42
48
  /** Ground is "dark enough" for a naked-eye pass when the Sun is below this altitude (civil dusk). */
43
49
  const GROUND_DARK_SUN_ALT = -6;
50
+ /**
51
+ * How many candidates an ambiguous name query offers back. CelesTrak's `NAME=` is a
52
+ * case-insensitive substring match, so an everyday query is routinely five figures deep
53
+ * ("STARLINK" matches over ten thousand objects) — the list exists to let a caller
54
+ * recognize the object it meant, not to enumerate the catalog. Twenty covers a real
55
+ * family (the handful of objects carrying "HUBBLE", a weather-satellite series) while
56
+ * keeping the error small enough to read; past that the answer is to narrow the name,
57
+ * and the match count says so rather than passing a slice off as the whole set.
58
+ */
59
+ const MAX_NAME_CANDIDATES = 20;
60
+ /**
61
+ * Recovery hints, byte-identical to the `recovery` strings the tool declares for the
62
+ * same reasons. The contract entry documents the next move and this is the copy that
63
+ * reaches the wire; a test pins each pair so the two cannot drift apart.
64
+ */
65
+ const TLE_NOT_FOUND_RECOVERY = 'Verify the catalog number at celestrak.org; the object may have decayed or never been catalogued.';
66
+ const NAME_NOT_FOUND_RECOVERY = 'Check the spelling, try a shorter distinctive substring, or look the object up at celestrak.org.';
67
+ const AMBIGUOUS_NAME_RECOVERY = 'Re-call with norad_id set to one of the listed candidates, or supply a longer, more specific name.';
68
+ /**
69
+ * The hint for an ambiguity whose candidate list is a slice rather than the whole match
70
+ * set. Picking from the list is the right first move only when the list is complete;
71
+ * offered against a constellation query it invites a confident pass prediction for an
72
+ * object the caller never asked about, so the truncated case leads with narrowing and
73
+ * makes the list conditional on the wanted object actually appearing in it.
74
+ */
75
+ const AMBIGUOUS_NAME_TRUNCATED_RECOVERY = 'Supply a longer, more specific name — the listed candidates are only the lowest-numbered few of the matches. Use norad_id only if the object you want is among them.';
76
+ const CELESTRAK_UNAVAILABLE_RECOVERY = 'CelesTrak is degraded or timed out; retry in a few minutes.';
77
+ const MALFORMED_ELEMENT_SET_RECOVERY = 'Retrying returns the same record — request a different object, and report the element set to celestrak.org.';
44
78
  export class SatelliteService {
45
79
  baseUrl;
46
80
  timeoutMs;
@@ -51,87 +85,193 @@ export class SatelliteService {
51
85
  this.timeoutMs = timeoutMs;
52
86
  this.cacheTtlMs = cacheTtlMs;
53
87
  }
54
- /** Fetch a current TLE for a NORAD ID, using the in-process TTL cache. */
55
- async fetchTle(noradId, ctx) {
56
- const cached = this.cache.get(noradId);
57
- if (cached && cached.expiresAt > Date.now())
58
- return cached.tle;
59
- const url = `${this.baseUrl}?CATNR=${noradId}&FORMAT=TLE`;
88
+ /** Fetch the current element set for a NORAD ID, using the in-process TTL cache. */
89
+ async fetchElementSet(noradId, ctx) {
90
+ const cacheKey = `CATNR=${noradId}`;
91
+ const cached = this.fromCache(cacheKey);
92
+ if (cached)
93
+ return cached;
94
+ const records = await this.fetchGpRecords(cacheKey, `NORAD ID ${noradId}`, ctx, () => this.catalogMiss(noradId));
95
+ return this.cacheElementSet(cacheKey, records[0]);
96
+ }
97
+ /**
98
+ * Resolve a satellite name to the one current element set it names. CelesTrak matches
99
+ * `NAME=` as a case-insensitive substring, so a query resolves only when it picks out a
100
+ * single object — either because it matched one, or because exactly one match carries
101
+ * that name outright, which is a request for that object however many longer names
102
+ * contain it. Anything else comes back as candidates to choose from.
103
+ */
104
+ async resolveByName(name, ctx) {
105
+ const query = name.trim();
106
+ const cacheKey = `NAME=${encodeURIComponent(query)}`;
107
+ const cached = this.fromCache(cacheKey);
108
+ if (cached)
109
+ return cached;
110
+ const records = await this.fetchGpRecords(cacheKey, `the name "${query}"`, ctx, () => this.nameMiss(query));
111
+ const single = records.length === 1 ? records[0] : this.exactlyNamed(records, query);
112
+ if (!single)
113
+ throw this.ambiguousName(records, query);
114
+ return this.cacheElementSet(cacheKey, single);
115
+ }
116
+ /** The one record whose `OBJECT_NAME` is the query itself, when exactly one is. */
117
+ exactlyNamed(records, query) {
118
+ const wanted = query.toLowerCase();
119
+ const exact = records.filter((r) => r.OBJECT_NAME.trim().toLowerCase() === wanted);
120
+ return exact.length === 1 ? exact[0] : undefined;
121
+ }
122
+ /** The cached element set for a query, while its TTL holds. */
123
+ fromCache(cacheKey) {
124
+ const entry = this.cache.get(cacheKey);
125
+ return entry && entry.expiresAt > Date.now() ? entry.elements : undefined;
126
+ }
127
+ cacheElementSet(cacheKey, record) {
128
+ const elements = {
129
+ name: record.OBJECT_NAME.trim(),
130
+ noradId: Number(record.NORAD_CAT_ID),
131
+ omm: record,
132
+ };
133
+ this.cache.set(cacheKey, { elements, expiresAt: Date.now() + this.cacheTtlMs });
134
+ return elements;
135
+ }
136
+ /**
137
+ * Run one GP query and return the records it matched. `FORMAT=JSON` rather than
138
+ * `FORMAT=TLE`: the legacy format cannot encode a catalog number above 99999, and
139
+ * CelesTrak refuses to serve such an object as TLE at all, so JSON is the only format
140
+ * covering the whole catalog. `params` is the query fragment selecting the objects
141
+ * (`CATNR=` or `NAME=`); `miss` names an empty result in the caller's own terms, since
142
+ * "no object with that catalog number" and "no object with that name" are different
143
+ * answers with different next moves.
144
+ */
145
+ async fetchGpRecords(params, subject, ctx, miss) {
146
+ const url = `${this.baseUrl}?${params}&FORMAT=JSON`;
60
147
  let text;
61
148
  try {
62
149
  text = await withRetry(async () => {
63
150
  const response = await fetchWithTimeout(url, this.timeoutMs, ctx, {
64
151
  signal: ctx.signal,
65
- // CelesTrak answers an uncatalogued object with 404, which is a domain
66
- // outcome here (tle_not_found), not a service failure — log it at debug.
67
- // The thrown status-mapped McpError is unchanged; only severity drops.
152
+ // CelesTrak answers an unmatched query with 404, which is a domain outcome
153
+ // here (a miss), not a service failure — log it at debug. The thrown
154
+ // status-mapped McpError is unchanged; only severity drops.
68
155
  expectedStatuses: [404],
69
156
  });
70
157
  return response.text();
71
158
  }, {
72
- operation: 'SatelliteService.fetchTle',
159
+ operation: 'SatelliteService.fetchGpRecords',
73
160
  context: ctx,
74
161
  baseDelayMs: 1000,
75
162
  signal: ctx.signal,
76
163
  });
77
164
  }
78
165
  catch (err) {
79
- // fetchWithTimeout throws a status-mapped McpError on any non-2xx whose
80
- // data carries raw upstream internals (URL, status/body plus the legacy
81
- // statusCode/responseBody aliases). Map it into the typed contract with
82
- // clean data so nothing upstream leaks to the client. CelesTrak answers a
83
- // missing object with 404 → NotFound.
84
- throw this.classifyFetchError(err, noradId);
166
+ /**
167
+ * fetchWithTimeout throws a status-mapped McpError on any non-2xx whose data
168
+ * carries raw upstream internals (URL, status/body plus the legacy
169
+ * statusCode/responseBody aliases). Map it into the typed contract with clean data
170
+ * so nothing upstream leaks to the client. CelesTrak answers an unmatched query
171
+ * with 404 → NotFound; everything else — 5xx, a fetch deadline, a network failure
172
+ * — is an outage. The original rides as `cause` for server-side logs only.
173
+ */
174
+ if (err instanceof McpError && err.code === JsonRpcErrorCode.NotFound)
175
+ throw miss();
176
+ throw serviceUnavailable(`Failed to fetch element sets for ${subject} from CelesTrak.`, {
177
+ reason: 'celestrak_unavailable',
178
+ recovery: { hint: CELESTRAK_UNAVAILABLE_RECOVERY },
179
+ }, { cause: err instanceof Error ? err : undefined });
85
180
  }
86
- const tle = this.parseTle(text, noradId);
87
- this.cache.set(noradId, { tle, expiresAt: Date.now() + this.cacheTtlMs });
88
- return tle;
181
+ return this.parseGpRecords(text, subject, miss);
89
182
  }
90
183
  /**
91
- * Map a fetch/transport McpError onto the typed contract with leak-free data.
92
- * A NotFound (CelesTrak's 404 for an uncatalogued object) becomes tle_not_found;
93
- * everything else — 5xx (ServiceUnavailable), a fetch deadline (Timeout), or a
94
- * network failure — becomes celestrak_unavailable. The
95
- * original error rides as `cause` for server-side logs but never reaches the client.
184
+ * Parse a CelesTrak GP response into OMM records. The miss sentinel has to be tested
185
+ * before `JSON.parse`: CelesTrak returns that text under a 200 in some cases, and
186
+ * parsing it would throw a `SyntaxError` where the caller is owed a typed miss.
96
187
  */
97
- classifyFetchError(err, noradId) {
98
- if (err instanceof McpError && err.code === JsonRpcErrorCode.NotFound) {
99
- return notFound(`CelesTrak has no current element set for NORAD ID ${noradId}.`, {
100
- reason: 'tle_not_found',
101
- recovery: {
102
- hint: 'Verify the catalog number at celestrak.org; the object may have decayed or never been catalogued.',
103
- },
104
- });
105
- }
106
- return serviceUnavailable(`Failed to fetch a TLE for NORAD ID ${noradId} from CelesTrak.`, {
107
- reason: 'celestrak_unavailable',
108
- recovery: { hint: 'CelesTrak is degraded or timed out; retry in a few minutes.' },
109
- }, { cause: err instanceof Error ? err : undefined });
110
- }
111
- /** Parse a CelesTrak TLE response (optional name line + the two element lines). */
112
- parseTle(text, noradId) {
188
+ parseGpRecords(text, subject, miss) {
113
189
  const trimmed = text.trim();
114
- if (/No GP data found|Invalid query/i.test(trimmed) || trimmed.length === 0) {
115
- throw notFound(`CelesTrak has no current element set for NORAD ID ${noradId}.`, {
116
- reason: 'tle_not_found',
117
- recovery: {
118
- hint: 'Verify the catalog number at celestrak.org; the object may have decayed or never been catalogued.',
119
- },
120
- });
190
+ if (trimmed.length === 0 || /No GP data found|Invalid query/i.test(trimmed))
191
+ throw miss();
192
+ let parsed;
193
+ try {
194
+ parsed = JSON.parse(trimmed);
121
195
  }
122
- const lines = trimmed.split('\n').map((l) => l.trimEnd());
123
- const line1Index = lines.findIndex((l) => l.startsWith('1 '));
124
- const line2Index = lines.findIndex((l) => l.startsWith('2 '));
125
- const line1 = line1Index === -1 ? undefined : lines[line1Index];
126
- const line2 = line2Index === -1 ? undefined : lines[line2Index];
127
- if (!line1 || !line2) {
128
- throw serviceUnavailable(`CelesTrak returned an unparsable response for NORAD ID ${noradId}.`, {
129
- reason: 'celestrak_unavailable',
130
- recovery: { hint: 'CelesTrak may be degraded; retry in a few minutes.' },
131
- });
196
+ catch {
197
+ throw this.unparsable(subject);
132
198
  }
133
- const nameLine = line1Index > 0 ? lines[line1Index - 1]?.trim() : undefined;
134
- return { ...(nameLine ? { name: nameLine } : {}), line1, line2 };
199
+ const records = OmmResponseSchema.safeParse(parsed);
200
+ /**
201
+ * A body that parsed as JSON but does not carry an OMM element set is a different
202
+ * outcome from one that is not GP data at all: CelesTrak answered, with a record
203
+ * whose shape is a permanent property of that record. Retrying reaches the same
204
+ * record and fails the same way, so it is classified apart from the outage rather
205
+ * than sending the caller into a loop that can only fail again.
206
+ */
207
+ if (!records.success)
208
+ throw this.malformedElementSet(subject, records.error.issues);
209
+ if (records.data.length === 0)
210
+ throw miss();
211
+ return records.data;
212
+ }
213
+ unparsable(subject) {
214
+ return serviceUnavailable(`CelesTrak returned an unparsable response for ${subject}.`, {
215
+ reason: 'celestrak_unavailable',
216
+ recovery: { hint: CELESTRAK_UNAVAILABLE_RECOVERY },
217
+ });
218
+ }
219
+ /**
220
+ * Name the record that failed OMM validation, and the fields that failed it. Each
221
+ * issue path is `[record index, field name]`, and those names are the OMM message's
222
+ * own, so listing them says which part of the record is wrong without putting the
223
+ * validator's vocabulary — issue codes, expected/received types — on the wire. A body
224
+ * whose whole shape is wrong (an object where an array belongs) names no field, and
225
+ * the message stands on the subject alone.
226
+ */
227
+ malformedElementSet(subject, issues) {
228
+ const fields = [...new Set(issues.map(({ path: [, field] }) => field))].filter((field) => typeof field === 'string');
229
+ const named = fields.length > 0 ? ` Fields that did not validate: ${fields.join(', ')}.` : '';
230
+ return serializationError(`CelesTrak returned a GP record for ${subject} that is not a valid OMM element set.${named}`, {
231
+ reason: 'malformed_element_set',
232
+ recovery: { hint: MALFORMED_ELEMENT_SET_RECOVERY },
233
+ });
234
+ }
235
+ catalogMiss(noradId) {
236
+ return notFound(`CelesTrak has no current element set for NORAD ID ${noradId}.`, {
237
+ reason: 'tle_not_found',
238
+ recovery: { hint: TLE_NOT_FOUND_RECOVERY },
239
+ });
240
+ }
241
+ nameMiss(query) {
242
+ return notFound(`No current CelesTrak object has a name containing "${query}".`, {
243
+ reason: 'satellite_name_not_found',
244
+ recovery: { hint: NAME_NOT_FOUND_RECOVERY },
245
+ });
246
+ }
247
+ /**
248
+ * Hand back the objects a name query matched so the caller can name one outright. The
249
+ * total is stated whether or not the list is complete, because a slice presented as the
250
+ * whole set would read as a catalog holding twenty Starlinks. Ordered by catalog
251
+ * number — the order CelesTrak already answers in — so the same query always offers the
252
+ * same candidates. Whether the list is complete also selects the hint: a complete list
253
+ * is something to pick from, a slice is something to narrow past.
254
+ */
255
+ ambiguousName(records, query) {
256
+ const candidates = records
257
+ .map((r) => ({ name: r.OBJECT_NAME.trim(), norad_id: Number(r.NORAD_CAT_ID) }))
258
+ .sort((a, b) => a.norad_id - b.norad_id)
259
+ .slice(0, MAX_NAME_CANDIDATES);
260
+ const truncated = records.length > candidates.length;
261
+ const listing = candidates.map((c) => `${c.name} (${c.norad_id})`).join(', ');
262
+ const preamble = truncated
263
+ ? `"${query}" matches ${records.length} current CelesTrak objects. The ${candidates.length} with the lowest catalog numbers:`
264
+ : `"${query}" matches ${records.length} current CelesTrak objects:`;
265
+ return invalidParams(`${preamble} ${listing}.`, {
266
+ reason: 'ambiguous_satellite_name',
267
+ recovery: {
268
+ hint: truncated ? AMBIGUOUS_NAME_TRUNCATED_RECOVERY : AMBIGUOUS_NAME_RECOVERY,
269
+ },
270
+ match_count: records.length,
271
+ shown: candidates.length,
272
+ truncated,
273
+ candidates,
274
+ });
135
275
  }
136
276
  /**
137
277
  * Predict visible passes over the next `days` from `start`. Steps the orbit with
@@ -143,8 +283,8 @@ export class SatelliteService {
143
283
  * `time_out_of_range`. Without that check either condition reaches the caller as
144
284
  * `passes: []`, which reads identically to "nothing visible tonight".
145
285
  */
146
- predictPasses(tle, noradId, observer, days, start, formatLocal) {
147
- const satrec = twoline2satrec(tle.line1, tle.line2);
286
+ predictPasses(elements, observer, days, start, formatLocal) {
287
+ const satrec = json2satrec(elements.omm);
148
288
  /**
149
289
  * Probe the first instant of the window before scanning it. SGP4 refuses an element
150
290
  * set it can no longer turn into an orbit by answering null, and the scan loop would
@@ -152,7 +292,7 @@ export class SatelliteService {
152
292
  * list. Reject up front instead, naming which of the two causes applies.
153
293
  */
154
294
  if (!propagate(satrec, start, PROPAGATE_OPTIONS)) {
155
- throw this.classifyPropagationFailure(satrec, noradId, start);
295
+ throw this.classifyPropagationFailure(satrec, elements.noradId, start);
156
296
  }
157
297
  const observerGd = {
158
298
  longitude: (observer.longitude * Math.PI) / 180,
@@ -241,7 +381,7 @@ export class SatelliteService {
241
381
  peakElevation = -90;
242
382
  }
243
383
  }
244
- return { noradId, ...(tle.name ? { satelliteName: tle.name } : {}), passes };
384
+ return { noradId: elements.noradId, satelliteName: elements.name, passes };
245
385
  }
246
386
  /**
247
387
  * Name the reason SGP4 refused the first instant of the window. The refusal on its own
@@ -1 +1 @@
1
- {"version":3,"file":"satellite-service.js","sourceRoot":"","sources":["../../../src/services/satellite/satellite-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,kBAAkB,GACnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EACL,eAAe,EACf,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,SAAS,EAET,cAAc,EACd,MAAM,EACN,cAAc,GACf,MAAM,cAAc,CAAC;AAItB,MAAM,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC;AAC1B;;;;;;;GAOG;AACH,MAAM,iBAAiB,GAAG,EAAE,0BAA0B,EAAE,IAAI,EAAW,CAAC;AACxE,oFAAoF;AACpF,MAAM,aAAa,GAAG,SAAS,CAAC;AAChC;;;;;GAKG;AACH,MAAM,uBAAuB,GAAG,EAAE,CAAC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AAI,gBAAgB,CAAC,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAClE,CAAC;AAED,8DAA8D;AAC9D,MAAM,UAAU,mBAAmB;IACjC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;IAC3F,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
1
+ {"version":3,"file":"satellite-service.js","sourceRoot":"","sources":["../../../src/services/satellite/satellite-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EACL,eAAe,EACf,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,WAAW,EACX,SAAS,EAET,cAAc,EACd,MAAM,GACP,MAAM,cAAc,CAAC;AAEtB,OAAO,EAGL,iBAAiB,GAIlB,MAAM,YAAY,CAAC;AAEpB,MAAM,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC;AAC1B;;;;;;;GAOG;AACH,MAAM,iBAAiB,GAAG,EAAE,0BAA0B,EAAE,IAAI,EAAW,CAAC;AACxE,oFAAoF;AACpF,MAAM,aAAa,GAAG,SAAS,CAAC;AAChC;;;;;GAKG;AACH,MAAM,uBAAuB,GAAG,EAAE,CAAC;AACnC,2FAA2F;AAC3F,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,6DAA6D;AAC7D,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB,qGAAqG;AACrG,MAAM,mBAAmB,GAAG,CAAC,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@
1
1
  /**
2
- * @fileoverview Domain types for the satellite-pass extension.
2
+ * @fileoverview Domain types for the satellite-pass extension, including the OMM
3
+ * (Orbit Mean-Elements Message) record CelesTrak serves under `FORMAT=JSON` — the
4
+ * only format that carries the six-digit catalog numbers now in the catalog.
3
5
  * @module services/satellite/types
4
6
  */
7
+ import { z } from '@cyanheads/mcp-ts-core';
5
8
  /** A single visible pass of a satellite over an observer. */
6
9
  export interface SatellitePass {
7
10
  durationSeconds: number;
@@ -21,12 +24,62 @@ export interface SatellitePass {
21
24
  export interface SatellitePassResult {
22
25
  noradId: number;
23
26
  passes: SatellitePass[];
24
- satelliteName?: string;
27
+ satelliteName: string;
25
28
  }
26
- /** A parsed two-line element set plus its display name. */
27
- export interface Tle {
28
- line1: string;
29
- line2: string;
30
- name?: string;
29
+ /**
30
+ * One GP record as CelesTrak serves it under `FORMAT=JSON`. Validated at the network
31
+ * edge because every field here is read straight into the SGP4 initializer — a missing
32
+ * one becomes NaN and surfaces as a plausible-looking but meaningless pass rather than a
33
+ * failure. `OBJECT_ID` and `ELEMENT_SET_NO` take no part in the propagation math but are
34
+ * required by the OMM v3 record the propagator accepts, and CelesTrak supplies both on
35
+ * every GP record. Unknown keys are dropped: nothing downstream reads them.
36
+ */
37
+ export declare const OmmRecordSchema: z.ZodObject<{
38
+ ARG_OF_PERICENTER: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
39
+ BSTAR: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
40
+ ECCENTRICITY: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
41
+ ELEMENT_SET_NO: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
42
+ EPOCH: z.ZodString;
43
+ INCLINATION: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
44
+ MEAN_ANOMALY: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
45
+ MEAN_MOTION: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
46
+ MEAN_MOTION_DDOT: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
47
+ MEAN_MOTION_DOT: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
48
+ NORAD_CAT_ID: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
49
+ OBJECT_ID: z.ZodString;
50
+ OBJECT_NAME: z.ZodString;
51
+ RA_OF_ASC_NODE: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
52
+ }, z.core.$strip>;
53
+ export type OmmRecord = z.infer<typeof OmmRecordSchema>;
54
+ /** A CelesTrak `FORMAT=JSON` response body: an array of GP records, one per match. */
55
+ export declare const OmmResponseSchema: z.ZodArray<z.ZodObject<{
56
+ ARG_OF_PERICENTER: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
57
+ BSTAR: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
58
+ ECCENTRICITY: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
59
+ ELEMENT_SET_NO: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
60
+ EPOCH: z.ZodString;
61
+ INCLINATION: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
62
+ MEAN_ANOMALY: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
63
+ MEAN_MOTION: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
64
+ MEAN_MOTION_DDOT: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
65
+ MEAN_MOTION_DOT: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
66
+ NORAD_CAT_ID: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
67
+ OBJECT_ID: z.ZodString;
68
+ OBJECT_NAME: z.ZodString;
69
+ RA_OF_ASC_NODE: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
70
+ }, z.core.$strip>>;
71
+ /** A current element set for one catalogued object, with its identity resolved. */
72
+ export interface ElementSet {
73
+ name: string;
74
+ noradId: number;
75
+ omm: OmmRecord;
76
+ }
77
+ /**
78
+ * One object a name query matched. Snake-cased because this shape goes straight onto the
79
+ * wire in the ambiguity error's `data`, alongside the tool's other client-facing fields.
80
+ */
81
+ export interface SatelliteCandidate {
82
+ name: string;
83
+ norad_id: number;
31
84
  }
32
85
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/satellite/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,6DAA6D;AAC7D,MAAM,WAAW,aAAa;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,qGAAqG;IACrG,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,2DAA2D;AAC3D,MAAM,WAAW,GAAG;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/satellite/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAE3C,6DAA6D;AAC7D,MAAM,WAAW,aAAa;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,qGAAqG;IACrG,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;CACvB;AASD;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;iBAe1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,sFAAsF;AACtF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;kBAA2B,CAAC;AAE1D,mFAAmF;AACnF,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,SAAS,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB"}
@@ -1,6 +1,40 @@
1
1
  /**
2
- * @fileoverview Domain types for the satellite-pass extension.
2
+ * @fileoverview Domain types for the satellite-pass extension, including the OMM
3
+ * (Orbit Mean-Elements Message) record CelesTrak serves under `FORMAT=JSON` — the
4
+ * only format that carries the six-digit catalog numbers now in the catalog.
3
5
  * @module services/satellite/types
4
6
  */
5
- export {};
7
+ import { z } from '@cyanheads/mcp-ts-core';
8
+ /**
9
+ * The OMM spec leaves numeric types open and sources disagree — CelesTrak emits numbers,
10
+ * Space-Track emits strings. The propagator coerces either, so accept both rather than
11
+ * rejecting a well-formed element set over its JSON type.
12
+ */
13
+ const OmmNumber = z.union([z.number(), z.string()]);
14
+ /**
15
+ * One GP record as CelesTrak serves it under `FORMAT=JSON`. Validated at the network
16
+ * edge because every field here is read straight into the SGP4 initializer — a missing
17
+ * one becomes NaN and surfaces as a plausible-looking but meaningless pass rather than a
18
+ * failure. `OBJECT_ID` and `ELEMENT_SET_NO` take no part in the propagation math but are
19
+ * required by the OMM v3 record the propagator accepts, and CelesTrak supplies both on
20
+ * every GP record. Unknown keys are dropped: nothing downstream reads them.
21
+ */
22
+ export const OmmRecordSchema = z.object({
23
+ ARG_OF_PERICENTER: OmmNumber,
24
+ BSTAR: OmmNumber,
25
+ ECCENTRICITY: OmmNumber,
26
+ ELEMENT_SET_NO: OmmNumber,
27
+ EPOCH: z.string(),
28
+ INCLINATION: OmmNumber,
29
+ MEAN_ANOMALY: OmmNumber,
30
+ MEAN_MOTION: OmmNumber,
31
+ MEAN_MOTION_DDOT: OmmNumber,
32
+ MEAN_MOTION_DOT: OmmNumber,
33
+ NORAD_CAT_ID: OmmNumber,
34
+ OBJECT_ID: z.string(),
35
+ OBJECT_NAME: z.string(),
36
+ RA_OF_ASC_NODE: OmmNumber,
37
+ });
38
+ /** A CelesTrak `FORMAT=JSON` response body: an array of GP records, one per match. */
39
+ export const OmmResponseSchema = z.array(OmmRecordSchema);
6
40
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/services/satellite/types.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/services/satellite/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAyB3C;;;;GAIG;AACH,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAEpD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,iBAAiB,EAAE,SAAS;IAC5B,KAAK,EAAE,SAAS;IAChB,YAAY,EAAE,SAAS;IACvB,cAAc,EAAE,SAAS;IACzB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,WAAW,EAAE,SAAS;IACtB,YAAY,EAAE,SAAS;IACvB,WAAW,EAAE,SAAS;IACtB,gBAAgB,EAAE,SAAS;IAC3B,eAAe,EAAE,SAAS;IAC1B,YAAY,EAAE,SAAS;IACvB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,cAAc,EAAE,SAAS;CAC1B,CAAC,CAAC;AAIH,sFAAsF;AACtF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyanheads/astronomy-mcp-server",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "mcpName": "io.github.cyanheads/astronomy-mcp-server",
5
5
  "description": "What's in the sky, computed offline — planet and moon positions, rise/set, phases, eclipses, and seasons for any place and time via MCP. STDIO or Streamable HTTP.",
6
6
  "type": "module",
package/server.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/cyanheads/astronomy-mcp-server",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.2.4",
9
+ "version": "0.2.5",
10
10
  "remotes": [
11
11
  {
12
12
  "type": "streamable-http",
@@ -19,7 +19,7 @@
19
19
  "registryBaseUrl": "https://registry.npmjs.org",
20
20
  "identifier": "@cyanheads/astronomy-mcp-server",
21
21
  "runtimeHint": "bun",
22
- "version": "0.2.4",
22
+ "version": "0.2.5",
23
23
  "packageArguments": [
24
24
  {
25
25
  "type": "positional",
@@ -47,7 +47,7 @@
47
47
  },
48
48
  {
49
49
  "name": "ASTRONOMY_ENABLE_SATELLITES",
50
- "description": "Register the astronomy_get_satellite_passes tool, which predicts visible satellite passes from CelesTrak TLEs propagated with SGP4. Off by default.",
50
+ "description": "Register the astronomy_get_satellite_passes tool, which predicts visible satellite passes from CelesTrak GP element sets propagated with SGP4. Off by default.",
51
51
  "format": "string",
52
52
  "isRequired": false,
53
53
  "default": "false"
@@ -68,7 +68,7 @@
68
68
  "registryBaseUrl": "https://registry.npmjs.org",
69
69
  "identifier": "@cyanheads/astronomy-mcp-server",
70
70
  "runtimeHint": "bun",
71
- "version": "0.2.4",
71
+ "version": "0.2.5",
72
72
  "packageArguments": [
73
73
  {
74
74
  "type": "positional",
@@ -124,7 +124,7 @@
124
124
  },
125
125
  {
126
126
  "name": "ASTRONOMY_ENABLE_SATELLITES",
127
- "description": "Register the astronomy_get_satellite_passes tool, which predicts visible satellite passes from CelesTrak TLEs propagated with SGP4. Off by default.",
127
+ "description": "Register the astronomy_get_satellite_passes tool, which predicts visible satellite passes from CelesTrak GP element sets propagated with SGP4. Off by default.",
128
128
  "format": "string",
129
129
  "isRequired": false,
130
130
  "default": "false"