@cyanheads/astronomy-mcp-server 0.5.0 → 0.5.2
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 +16 -14
- package/CLAUDE.md +16 -14
- package/README.md +19 -13
- package/changelog/0.5.x/0.5.1.md +35 -0
- package/changelog/0.5.x/0.5.2.md +30 -0
- package/changelog/template.md +20 -11
- package/dist/mcp-server/prompts/definitions/stargazing-plan.prompt.d.ts +4 -2
- package/dist/mcp-server/prompts/definitions/stargazing-plan.prompt.d.ts.map +1 -1
- package/dist/mcp-server/prompts/definitions/stargazing-plan.prompt.js +8 -5
- package/dist/mcp-server/prompts/definitions/stargazing-plan.prompt.js.map +1 -1
- package/dist/mcp-server/tools/definitions/find-events.tool.d.ts +43 -9
- package/dist/mcp-server/tools/definitions/find-events.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/find-events.tool.js +134 -23
- package/dist/mcp-server/tools/definitions/find-events.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-ephemeris.tool.d.ts +19 -0
- package/dist/mcp-server/tools/definitions/get-ephemeris.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-ephemeris.tool.js +73 -37
- package/dist/mcp-server/tools/definitions/get-ephemeris.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-rise-set.tool.d.ts +27 -8
- package/dist/mcp-server/tools/definitions/get-rise-set.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-rise-set.tool.js +67 -14
- package/dist/mcp-server/tools/definitions/get-rise-set.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-sky-position.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-sky-position.tool.js +3 -1
- package/dist/mcp-server/tools/definitions/get-sky-position.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/list-visible.tool.d.ts +2 -4
- package/dist/mcp-server/tools/definitions/list-visible.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/list-visible.tool.js +15 -14
- package/dist/mcp-server/tools/definitions/list-visible.tool.js.map +1 -1
- package/dist/services/ephemeris/ephemeris-service.d.ts +34 -18
- package/dist/services/ephemeris/ephemeris-service.d.ts.map +1 -1
- package/dist/services/ephemeris/ephemeris-service.js +221 -126
- package/dist/services/ephemeris/ephemeris-service.js.map +1 -1
- package/dist/services/ephemeris/meteor-showers.d.ts +49 -0
- package/dist/services/ephemeris/meteor-showers.d.ts.map +1 -0
- package/dist/services/ephemeris/meteor-showers.js +122 -0
- package/dist/services/ephemeris/meteor-showers.js.map +1 -0
- package/dist/services/ephemeris/rise-set-horizon.d.ts +11 -0
- package/dist/services/ephemeris/rise-set-horizon.d.ts.map +1 -0
- package/dist/services/ephemeris/rise-set-horizon.js +116 -0
- package/dist/services/ephemeris/rise-set-horizon.js.map +1 -0
- package/dist/services/ephemeris/star-catalog.d.ts +6 -8
- package/dist/services/ephemeris/star-catalog.d.ts.map +1 -1
- package/dist/services/ephemeris/star-catalog.js +7 -4
- package/dist/services/ephemeris/star-catalog.js.map +1 -1
- package/dist/services/ephemeris/types.d.ts +50 -4
- package/dist/services/ephemeris/types.d.ts.map +1 -1
- package/dist/services/ephemeris/types.js +2 -1
- package/dist/services/ephemeris/types.js.map +1 -1
- package/dist/services/horizons/horizons-service.d.ts +10 -5
- package/dist/services/horizons/horizons-service.d.ts.map +1 -1
- package/dist/services/horizons/horizons-service.js +46 -15
- package/dist/services/horizons/horizons-service.js.map +1 -1
- package/dist/services/horizons/types.d.ts +16 -3
- package/dist/services/horizons/types.d.ts.map +1 -1
- package/package.json +10 -9
- package/server.json +3 -3
- package/skills/astronomy-guide/SKILL.md +16 -8
package/AGENTS.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** astronomy-mcp-server
|
|
4
|
-
**Version:** 0.5.
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.
|
|
6
|
-
**Engines:** Bun ≥1.4.
|
|
4
|
+
**Version:** 0.5.2
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.24`
|
|
6
|
+
**Engines:** Bun ≥1.4.4, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` ^2.4.0
|
|
8
8
|
**Zod:** ^4.6.7
|
|
9
9
|
|
|
@@ -20,16 +20,16 @@ Observational astronomy, computed in-process. The core is keyless and offline
|
|
|
20
20
|
| Tool | What it computes |
|
|
21
21
|
|:-----|:-----------------|
|
|
22
22
|
| `astronomy_get_sky_position` | Apparent topocentric position of one body or named star — equatorial / horizontal / ecliptic, magnitude, angular diameter, phase, Sun elongation, constellation |
|
|
23
|
-
| `astronomy_get_rise_set` | Rise / set / transit cycles (31 per call), plus twilight bands for the Sun and `night_in_progress` when the start falls at night; circumpolar / never-rises notes |
|
|
23
|
+
| `astronomy_get_rise_set` | Rise / set / transit cycles of one body or named star (31 per call), with optional `height_above_horizon` for an elevated viewpoint, plus twilight bands for the Sun and `night_in_progress` when the start falls at night; circumpolar / never-rises notes |
|
|
24
24
|
| `astronomy_get_moon_phase` | Phase longitude, illumination, synodic age, next four quarter phases |
|
|
25
|
-
| `astronomy_find_events` | Next N (20 per call) of: equinox, solstice, moon_quarter, lunar/solar eclipse, opposition, conjunction (with the Sun, or two bodies via `body2`), max_elongation, perigee_apogee |
|
|
26
|
-
| `astronomy_list_visible` | One-call "what is up now" — naked-eye bodies (+ optional catalog stars) above
|
|
25
|
+
| `astronomy_find_events` | Next N (20 per call) of: equinox, solstice, moon_quarter, lunar/solar eclipse (with a `timezone`, contacts also in `contacts_local`), opposition, conjunction (with the Sun, or two bodies via `body2`), max_elongation, perigee_apogee, meteor_shower (nine major showers' maxima from the bundled IMO table; `shower` narrows to one) |
|
|
26
|
+
| `astronomy_list_visible` | One-call "what is up now" — naked-eye bodies (+ optional catalog stars) at or above `min_altitude`, ranked with above-horizon bodies first and a visibility note per body |
|
|
27
27
|
|
|
28
|
-
Plus the `astronomy://body/{body}` resource (static reference card) and the `astronomy_stargazing_plan` prompt (chains the tools for a "plan tonight from <place>" workflow). One published skill, `skills/astronomy-guide/SKILL.md`, carries the cross-tool workflows and gates the tool descriptions can't (local-night anchoring, listed ≠ visible, Moon interference, eclipses from a place, the extension gates); `createApp({ skills: 'skills' })` serves it over MCP. A behavior change that falsifies one of its claims updates the skill in the same commit.
|
|
28
|
+
Plus the `astronomy://body/{body}` resource (static reference card) and the `astronomy_stargazing_plan` prompt (chains the tools for a "plan tonight from <place>" workflow). One published skill, `skills/astronomy-guide/SKILL.md`, carries the cross-tool workflows and gates the tool descriptions can't (local-night anchoring, listed ≠ visible, Moon interference, eclipses from a place, meteor showers, the extension gates); `createApp({ skills: 'skills' })` serves it over MCP. A behavior change that falsifies one of its claims updates the skill in the same commit.
|
|
29
29
|
|
|
30
30
|
**Two gated, network-backed extensions** register only when their env gate is on (default deployment is keyless + offline):
|
|
31
31
|
|
|
32
|
-
- `astronomy_get_ephemeris` — small-body / spacecraft ephemeris from JPL Horizons, one page
|
|
32
|
+
- `astronomy_get_ephemeris` — small-body / spacecraft ephemeris from JPL Horizons, one page per call (`limit` defaults to 200 and clamps at 90,000). Gate: `ASTRONOMY_ENABLE_HORIZONS`.
|
|
33
33
|
- `astronomy_get_satellite_passes` — visible passes (kept by their sunlit, dark-sky stretch, returned as `visible_*`) via a CelesTrak TLE propagated with SGP4 offline, 10 days per call. Gate: `ASTRONOMY_ENABLE_SATELLITES`.
|
|
34
34
|
|
|
35
35
|
Both extension services carry their own timeout + retry boundary, cache nothing on disk (Horizons is stateless; the satellite TLE cache is an in-process TTL `Map`), and degrade loudly — on any upstream failure they catch the framework's status-mapped `McpError` and re-throw a clean typed domain error (`{ reason, recovery }`, no `statusCode` / `responseBody` / `requestId` / internal URL), carrying the original as `cause` for server-side logs only. They never substitute core output.
|
|
@@ -181,9 +181,9 @@ export function getServerConfig() {
|
|
|
181
181
|
}
|
|
182
182
|
```
|
|
183
183
|
|
|
184
|
-
`parseEnvConfig` maps Zod schema paths
|
|
184
|
+
`parseEnvConfig` loads the working directory's `.env` on Node and Bun, including when called before `createApp()`. It maps Zod schema paths to env var names such as `ASTRONOMY_REQUEST_TIMEOUT_MS`. A `ConfigurationError` raised in `setup()` appears in a startup banner. A call at import time exits with the stack.
|
|
185
185
|
|
|
186
|
-
|
|
186
|
+
Use `z.stringbool()` for env booleans. It accepts `true/false`, `1/0`, `yes/no`, `on/off`, `y/n`, and `enabled/disabled` case-insensitively and rejects other values. JavaScript boolean coercion treats the string `"false"` as true.
|
|
187
187
|
|
|
188
188
|
### Server identity and instructions
|
|
189
189
|
|
|
@@ -237,9 +237,11 @@ Handlers receive a unified `ctx` object. Key properties:
|
|
|
237
237
|
|
|
238
238
|
Handlers throw — the framework catches, classifies, and formats.
|
|
239
239
|
|
|
240
|
+
For a declared reason, the framework fills `data.retryable` from the contract when the handler or service throw omits it. The text in `content[]` includes the corresponding `retryable` or `not retryable` marker.
|
|
241
|
+
|
|
240
242
|
**Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable?, severity?, thrownBy? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. The framework puts it on the wire whenever a failure carrying that `reason` arrives without a hint — a bare `ctx.fail('reason')` or a service throw with `data: { reason }` — as `data.recovery.hint`, mirrored into `content[]` text unless the message already contains it verbatim; override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Every error envelope also carries `data.requestId`, the id the server's log records for that call carry, and `content[]` closes with `(reason … · request <id>)`. Mark an entry the service layer throws with `thrownBy: 'service'` so `error-contract-unthrown` skips it — lint-only metadata, nothing at runtime reads it. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`, `RequestCancelled`) bubble freely and don't need declaring.
|
|
241
243
|
|
|
242
|
-
Most of this server's declared reasons are raised below the handler — `EphemerisService.resolveTime()` / `resolveTimezone()` / `lookupStar()`, `resolveBody()` / `resolvePair()`, and the two extension services — and carry their hint inline because those call sites take no `ctx` — except `resolveTime()`'s `time_out_of_range
|
|
244
|
+
Most of this server's declared reasons are raised below the handler — `EphemerisService.resolveTime()` / `resolveTimezone()` / `lookupStar()`, `resolveBody()` / `resolvePair()`, and the two extension services — and carry their hint inline because those call sites take no `ctx` — except `resolveTime()`'s `time_out_of_range` and the `body_required` `resolveBody()` / `resolvePair()` raise, which carry none, so each calling tool's declared `recovery` fills it (the `start` tools say "start date", and `get_satellite_passes` names the element set's epoch). Those entries are marked `thrownBy: 'service'`; the handler-local preconditions (`body_required` on `get_sky_position`, `get_rise_set`, and `find_events`, `find_events`'s `incomplete_observer`, `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.
|
|
243
245
|
|
|
244
246
|
```ts
|
|
245
247
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
@@ -271,7 +273,7 @@ throw new Error('Item not found'); // → NotFound
|
|
|
271
273
|
throw new Error('Invalid query format'); // → ValidationError
|
|
272
274
|
|
|
273
275
|
// McpError — when no factory exists for the code
|
|
274
|
-
import {
|
|
276
|
+
import { JsonRpcErrorCode, McpError } from '@cyanheads/mcp-ts-core/errors';
|
|
275
277
|
throw new McpError(JsonRpcErrorCode.InitializationFailed, 'Connection failed', { pool: 'primary' });
|
|
276
278
|
```
|
|
277
279
|
|
|
@@ -403,7 +405,7 @@ When you complete a skill's checklist, check the boxes and add a completion time
|
|
|
403
405
|
|
|
404
406
|
## Bundling
|
|
405
407
|
|
|
406
|
-
`bun run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. `mcpb pack` reads `.mcpbignore`, not `.gitignore`, so every root path the bundle must not ship — source, tests, docs, caches, logs, agent docs, plugin manifests, gitignored local files such as `/CITATION.cff` and `/.tsbuildinfo` — needs a root-anchored line there (`/docs/`, never `docs/`, which also strips `node_modules/*/docs/`); `lint:packaging` names each missing or unanchored line. Root `skills/` ships on purpose. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips four classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs
|
|
408
|
+
`bun run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. `mcpb pack` reads `.mcpbignore`, not `.gitignore`, so every root path the bundle must not ship — source, tests, docs, caches, logs, agent docs, plugin manifests, gitignored local files such as `/CITATION.cff` and `/.tsbuildinfo` — needs a root-anchored line there (`/docs/`, never `docs/`, which also strips `node_modules/*/docs/`); `lint:packaging` names each missing or unanchored line. Root `skills/` ships on purpose. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips four classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs — `framework-skills/`, `skills/`, `.claude/`, `.agents/`, `AGENTS.md`, and `CLAUDE.md` at a package's root, and `SKILL.md` anywhere (a `skills/` deeper in a package is runtime code and stays: the MCP SDK loads its own `dist/ext/skills/` at startup, [cyanheads/mcp-ts-core#794](https://github.com/cyanheads/mcp-ts-core/issues/794)); platform-specific native bindings, which would otherwise lock the bundle to the platform it was packed on; node-gyp build output beside a `binding.gyp`, which records the packing machine's paths; and build-only package files — the framework's `changelog/`, `scripts/`, `templates/`, and config bases. `tests/scripts/packaging-regexes.test.ts` pins the cleaner's and the linter's matchers against each other. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
|
|
407
409
|
|
|
408
410
|
**Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match, that every `user_config` option is wired into `mcp_config.env` as `"X": "${user_config.X}"` (the host substitutes nothing else — `"${X}"` reaches the server as that literal string), and that an optional string option carries `"default": ""`.
|
|
409
411
|
|
|
@@ -449,7 +451,7 @@ security: false # optional — true ONLY for a source
|
|
|
449
451
|
```ts
|
|
450
452
|
// Framework — z is re-exported, no separate zod import needed
|
|
451
453
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
452
|
-
import {
|
|
454
|
+
import { JsonRpcErrorCode, McpError } from '@cyanheads/mcp-ts-core/errors';
|
|
453
455
|
|
|
454
456
|
// Server's own code — via path alias
|
|
455
457
|
import { getMyService } from '@/services/my-domain/my-service.js';
|
package/CLAUDE.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** astronomy-mcp-server
|
|
4
|
-
**Version:** 0.5.
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.
|
|
6
|
-
**Engines:** Bun ≥1.4.
|
|
4
|
+
**Version:** 0.5.2
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.24`
|
|
6
|
+
**Engines:** Bun ≥1.4.4, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` ^2.4.0
|
|
8
8
|
**Zod:** ^4.6.7
|
|
9
9
|
|
|
@@ -20,16 +20,16 @@ Observational astronomy, computed in-process. The core is keyless and offline
|
|
|
20
20
|
| Tool | What it computes |
|
|
21
21
|
|:-----|:-----------------|
|
|
22
22
|
| `astronomy_get_sky_position` | Apparent topocentric position of one body or named star — equatorial / horizontal / ecliptic, magnitude, angular diameter, phase, Sun elongation, constellation |
|
|
23
|
-
| `astronomy_get_rise_set` | Rise / set / transit cycles (31 per call), plus twilight bands for the Sun and `night_in_progress` when the start falls at night; circumpolar / never-rises notes |
|
|
23
|
+
| `astronomy_get_rise_set` | Rise / set / transit cycles of one body or named star (31 per call), with optional `height_above_horizon` for an elevated viewpoint, plus twilight bands for the Sun and `night_in_progress` when the start falls at night; circumpolar / never-rises notes |
|
|
24
24
|
| `astronomy_get_moon_phase` | Phase longitude, illumination, synodic age, next four quarter phases |
|
|
25
|
-
| `astronomy_find_events` | Next N (20 per call) of: equinox, solstice, moon_quarter, lunar/solar eclipse, opposition, conjunction (with the Sun, or two bodies via `body2`), max_elongation, perigee_apogee |
|
|
26
|
-
| `astronomy_list_visible` | One-call "what is up now" — naked-eye bodies (+ optional catalog stars) above
|
|
25
|
+
| `astronomy_find_events` | Next N (20 per call) of: equinox, solstice, moon_quarter, lunar/solar eclipse (with a `timezone`, contacts also in `contacts_local`), opposition, conjunction (with the Sun, or two bodies via `body2`), max_elongation, perigee_apogee, meteor_shower (nine major showers' maxima from the bundled IMO table; `shower` narrows to one) |
|
|
26
|
+
| `astronomy_list_visible` | One-call "what is up now" — naked-eye bodies (+ optional catalog stars) at or above `min_altitude`, ranked with above-horizon bodies first and a visibility note per body |
|
|
27
27
|
|
|
28
|
-
Plus the `astronomy://body/{body}` resource (static reference card) and the `astronomy_stargazing_plan` prompt (chains the tools for a "plan tonight from <place>" workflow). One published skill, `skills/astronomy-guide/SKILL.md`, carries the cross-tool workflows and gates the tool descriptions can't (local-night anchoring, listed ≠ visible, Moon interference, eclipses from a place, the extension gates); `createApp({ skills: 'skills' })` serves it over MCP. A behavior change that falsifies one of its claims updates the skill in the same commit.
|
|
28
|
+
Plus the `astronomy://body/{body}` resource (static reference card) and the `astronomy_stargazing_plan` prompt (chains the tools for a "plan tonight from <place>" workflow). One published skill, `skills/astronomy-guide/SKILL.md`, carries the cross-tool workflows and gates the tool descriptions can't (local-night anchoring, listed ≠ visible, Moon interference, eclipses from a place, meteor showers, the extension gates); `createApp({ skills: 'skills' })` serves it over MCP. A behavior change that falsifies one of its claims updates the skill in the same commit.
|
|
29
29
|
|
|
30
30
|
**Two gated, network-backed extensions** register only when their env gate is on (default deployment is keyless + offline):
|
|
31
31
|
|
|
32
|
-
- `astronomy_get_ephemeris` — small-body / spacecraft ephemeris from JPL Horizons, one page
|
|
32
|
+
- `astronomy_get_ephemeris` — small-body / spacecraft ephemeris from JPL Horizons, one page per call (`limit` defaults to 200 and clamps at 90,000). Gate: `ASTRONOMY_ENABLE_HORIZONS`.
|
|
33
33
|
- `astronomy_get_satellite_passes` — visible passes (kept by their sunlit, dark-sky stretch, returned as `visible_*`) via a CelesTrak TLE propagated with SGP4 offline, 10 days per call. Gate: `ASTRONOMY_ENABLE_SATELLITES`.
|
|
34
34
|
|
|
35
35
|
Both extension services carry their own timeout + retry boundary, cache nothing on disk (Horizons is stateless; the satellite TLE cache is an in-process TTL `Map`), and degrade loudly — on any upstream failure they catch the framework's status-mapped `McpError` and re-throw a clean typed domain error (`{ reason, recovery }`, no `statusCode` / `responseBody` / `requestId` / internal URL), carrying the original as `cause` for server-side logs only. They never substitute core output.
|
|
@@ -181,9 +181,9 @@ export function getServerConfig() {
|
|
|
181
181
|
}
|
|
182
182
|
```
|
|
183
183
|
|
|
184
|
-
`parseEnvConfig` maps Zod schema paths
|
|
184
|
+
`parseEnvConfig` loads the working directory's `.env` on Node and Bun, including when called before `createApp()`. It maps Zod schema paths to env var names such as `ASTRONOMY_REQUEST_TIMEOUT_MS`. A `ConfigurationError` raised in `setup()` appears in a startup banner. A call at import time exits with the stack.
|
|
185
185
|
|
|
186
|
-
|
|
186
|
+
Use `z.stringbool()` for env booleans. It accepts `true/false`, `1/0`, `yes/no`, `on/off`, `y/n`, and `enabled/disabled` case-insensitively and rejects other values. JavaScript boolean coercion treats the string `"false"` as true.
|
|
187
187
|
|
|
188
188
|
### Server identity and instructions
|
|
189
189
|
|
|
@@ -237,9 +237,11 @@ Handlers receive a unified `ctx` object. Key properties:
|
|
|
237
237
|
|
|
238
238
|
Handlers throw — the framework catches, classifies, and formats.
|
|
239
239
|
|
|
240
|
+
For a declared reason, the framework fills `data.retryable` from the contract when the handler or service throw omits it. The text in `content[]` includes the corresponding `retryable` or `not retryable` marker.
|
|
241
|
+
|
|
240
242
|
**Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable?, severity?, thrownBy? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. The framework puts it on the wire whenever a failure carrying that `reason` arrives without a hint — a bare `ctx.fail('reason')` or a service throw with `data: { reason }` — as `data.recovery.hint`, mirrored into `content[]` text unless the message already contains it verbatim; override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Every error envelope also carries `data.requestId`, the id the server's log records for that call carry, and `content[]` closes with `(reason … · request <id>)`. Mark an entry the service layer throws with `thrownBy: 'service'` so `error-contract-unthrown` skips it — lint-only metadata, nothing at runtime reads it. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`, `RequestCancelled`) bubble freely and don't need declaring.
|
|
241
243
|
|
|
242
|
-
Most of this server's declared reasons are raised below the handler — `EphemerisService.resolveTime()` / `resolveTimezone()` / `lookupStar()`, `resolveBody()` / `resolvePair()`, and the two extension services — and carry their hint inline because those call sites take no `ctx` — except `resolveTime()`'s `time_out_of_range
|
|
244
|
+
Most of this server's declared reasons are raised below the handler — `EphemerisService.resolveTime()` / `resolveTimezone()` / `lookupStar()`, `resolveBody()` / `resolvePair()`, and the two extension services — and carry their hint inline because those call sites take no `ctx` — except `resolveTime()`'s `time_out_of_range` and the `body_required` `resolveBody()` / `resolvePair()` raise, which carry none, so each calling tool's declared `recovery` fills it (the `start` tools say "start date", and `get_satellite_passes` names the element set's epoch). Those entries are marked `thrownBy: 'service'`; the handler-local preconditions (`body_required` on `get_sky_position`, `get_rise_set`, and `find_events`, `find_events`'s `incomplete_observer`, `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.
|
|
243
245
|
|
|
244
246
|
```ts
|
|
245
247
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
@@ -271,7 +273,7 @@ throw new Error('Item not found'); // → NotFound
|
|
|
271
273
|
throw new Error('Invalid query format'); // → ValidationError
|
|
272
274
|
|
|
273
275
|
// McpError — when no factory exists for the code
|
|
274
|
-
import {
|
|
276
|
+
import { JsonRpcErrorCode, McpError } from '@cyanheads/mcp-ts-core/errors';
|
|
275
277
|
throw new McpError(JsonRpcErrorCode.InitializationFailed, 'Connection failed', { pool: 'primary' });
|
|
276
278
|
```
|
|
277
279
|
|
|
@@ -403,7 +405,7 @@ When you complete a skill's checklist, check the boxes and add a completion time
|
|
|
403
405
|
|
|
404
406
|
## Bundling
|
|
405
407
|
|
|
406
|
-
`bun run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. `mcpb pack` reads `.mcpbignore`, not `.gitignore`, so every root path the bundle must not ship — source, tests, docs, caches, logs, agent docs, plugin manifests, gitignored local files such as `/CITATION.cff` and `/.tsbuildinfo` — needs a root-anchored line there (`/docs/`, never `docs/`, which also strips `node_modules/*/docs/`); `lint:packaging` names each missing or unanchored line. Root `skills/` ships on purpose. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips four classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs
|
|
408
|
+
`bun run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. `mcpb pack` reads `.mcpbignore`, not `.gitignore`, so every root path the bundle must not ship — source, tests, docs, caches, logs, agent docs, plugin manifests, gitignored local files such as `/CITATION.cff` and `/.tsbuildinfo` — needs a root-anchored line there (`/docs/`, never `docs/`, which also strips `node_modules/*/docs/`); `lint:packaging` names each missing or unanchored line. Root `skills/` ships on purpose. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips four classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs — `framework-skills/`, `skills/`, `.claude/`, `.agents/`, `AGENTS.md`, and `CLAUDE.md` at a package's root, and `SKILL.md` anywhere (a `skills/` deeper in a package is runtime code and stays: the MCP SDK loads its own `dist/ext/skills/` at startup, [cyanheads/mcp-ts-core#794](https://github.com/cyanheads/mcp-ts-core/issues/794)); platform-specific native bindings, which would otherwise lock the bundle to the platform it was packed on; node-gyp build output beside a `binding.gyp`, which records the packing machine's paths; and build-only package files — the framework's `changelog/`, `scripts/`, `templates/`, and config bases. `tests/scripts/packaging-regexes.test.ts` pins the cleaner's and the linter's matchers against each other. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
|
|
407
409
|
|
|
408
410
|
**Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match, that every `user_config` option is wired into `mcp_config.env` as `"X": "${user_config.X}"` (the host substitutes nothing else — `"${X}"` reaches the server as that literal string), and that an optional string option carries `"default": ""`.
|
|
409
411
|
|
|
@@ -449,7 +451,7 @@ security: false # optional — true ONLY for a source
|
|
|
449
451
|
```ts
|
|
450
452
|
// Framework — z is re-exported, no separate zod import needed
|
|
451
453
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
452
|
-
import {
|
|
454
|
+
import { JsonRpcErrorCode, McpError } from '@cyanheads/mcp-ts-core/errors';
|
|
453
455
|
|
|
454
456
|
// Server's own code — via path alias
|
|
455
457
|
import { getMyService } from '@/services/my-domain/my-service.js';
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<div align="center">
|
|
9
9
|
|
|
10
|
-
[](./CHANGELOG.md) [](./LICENSE) [](https://github.com/users/cyanheads/packages/container/package/astronomy-mcp-server) [](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/@cyanheads/astronomy-mcp-server) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -36,10 +36,10 @@ Observational astronomy for any place and time: sky positions, rise/set and twil
|
|
|
36
36
|
| Tool | Description |
|
|
37
37
|
|:---|:---|
|
|
38
38
|
| `astronomy_get_sky_position` | Apparent position of one body or named star: RA/Dec, alt/az, ecliptic, magnitude, phase, Sun elongation, constellation |
|
|
39
|
-
| `astronomy_get_rise_set` | Rise, set, and transit times for a body, plus civil, nautical, and astronomical twilight for the Sun |
|
|
39
|
+
| `astronomy_get_rise_set` | Rise, set, and transit times for a body or named star, plus civil, nautical, and astronomical twilight for the Sun |
|
|
40
40
|
| `astronomy_get_moon_phase` | Illuminated fraction, phase name, synodic age, and the next four quarter phases |
|
|
41
|
-
| `astronomy_find_events` | Next eclipses, equinoxes, solstices, moon quarters, oppositions, conjunctions, greatest elongations, or
|
|
42
|
-
| `astronomy_list_visible` |
|
|
41
|
+
| `astronomy_find_events` | Next eclipses, equinoxes, solstices, moon quarters, oppositions, conjunctions, greatest elongations, apsides, or meteor-shower maxima |
|
|
42
|
+
| `astronomy_list_visible` | Naked-eye bodies and optional bright stars meeting the altitude filter, with above-horizon bodies listed first and visibility notes for each |
|
|
43
43
|
| `astronomy_get_ephemeris` | Small-body or spacecraft ephemeris from JPL Horizons (opt-in) |
|
|
44
44
|
| `astronomy_get_satellite_passes` | Visible satellite passes from a CelesTrak element set propagated with SGP4 (opt-in) |
|
|
45
45
|
|
|
@@ -79,8 +79,10 @@ Design reference: [`docs/design.md`](./docs/design.md).
|
|
|
79
79
|
|
|
80
80
|
### `astronomy_get_rise_set` <sub>tool</sub>
|
|
81
81
|
|
|
82
|
-
- One `body` searched forward from `start` (default now) for the next `count` cycles, default 1; 31 are served per call, and a `count` up to 366 returns the first 31 with a notice naming the `start` and `count` that continue the series
|
|
83
|
-
-
|
|
82
|
+
- One `body` or `star` searched forward from `start` (default now) for the next `count` cycles, default 1; 31 are served per call, and a `count` up to 366 returns the first 31 with a notice naming the `start` and `count` that continue the series
|
|
83
|
+
- `star` takes the same catalog names as `astronomy_get_sky_position` and wins over `body`; `body` echoes the catalog name (`Sirius` for `α CMa`), a miss fails as `star_not_found`, and a star gets no twilight
|
|
84
|
+
- Set `elevation` to the observer’s altitude above sea level. At a summit or overlook, `height_above_horizon` gives the vertical distance in meters to the terrain or water forming the horizon (default 0). A lower horizon advances rise and delays set. Twilight uses its usual solar angles.
|
|
85
|
+
- Each cycle carries `rise_utc`, `set_utc`, `transit_utc`, and `transit_altitude_degrees`; a circumpolar or never-rising body or star gets `null` rise/set and a `note` instead of an error
|
|
84
86
|
- For `body: "sun"`, `twilight` holds civil, nautical, and astronomical dusk/dawn pairs for the night after each cycle's day. When the first day begins after `start`, `night_in_progress` holds the preceding night, including polar nights without a sunset; the first cycle otherwise carries its own night. Each pair stays within that night, and times before `start` remain included
|
|
85
87
|
|
|
86
88
|
---
|
|
@@ -94,24 +96,28 @@ Design reference: [`docs/design.md`](./docs/design.md).
|
|
|
94
96
|
|
|
95
97
|
### `astronomy_find_events` <sub>tool</sub>
|
|
96
98
|
|
|
97
|
-
- One `event` (`solar_eclipse`, `lunar_eclipse`, `equinox`, `solstice`, `moon_quarter`, `opposition`, `conjunction`, `max_elongation`, `perigee_apogee`) and the next `count` occurrences, default 1; 20 are served per call, and a `count` up to 200 returns the first 20 with a notice naming the `start` and `count` that continue the series; searches stop at the end of 2100
|
|
99
|
+
- One `event` (`solar_eclipse`, `lunar_eclipse`, `equinox`, `solstice`, `moon_quarter`, `opposition`, `conjunction`, `max_elongation`, `perigee_apogee`, `meteor_shower`) and the next `count` occurrences, default 1; 20 are served per call, and a `count` up to 200 returns the first 20 with a notice naming the `start` and `count` that continue the series; searches stop at the end of 2100
|
|
98
100
|
- Body-relative events require `body` (`body_required`); a body the event doesn't apply to fails as `body_not_supported`, and `conjunction` with `body2` takes the Moon or a planet different from `body` (`invalid_body_pair` otherwise) and reports `separation_degrees`
|
|
99
|
-
- Eclipses take an optional observer (`latitude` and `longitude` together, else `incomplete_observer`)
|
|
100
|
-
-
|
|
101
|
+
- Eclipses and meteor showers take an optional observer (`latitude` and `longitude` together, else `incomplete_observer`); for eclipses it adds `local_visible` and `contact_altitudes_degrees`
|
|
102
|
+
- With a `timezone`, each eclipse also carries `contacts_local`: the `contacts` phases keyed `<phase>_local`, each with the zone offset in force at that contact's own instant, and null where `contacts` is null
|
|
103
|
+
- `meteor_shower` returns the maxima of nine major annual showers (Quadrantids, April Lyrids, η-Aquariids, Southern δ-Aquariids, Perseids, Orionids, Leonids, Geminids, Ursids) with `zhr`, the J2000 radiant, activity dates, and the Moon's geocentric `moon_illuminated_fraction`; an observer adds `radiant_altitude_degrees` and `sun_altitude_degrees` at the maximum. `shower` narrows the search to one by IMO code or name, and a miss fails as `shower_not_found`. Maxima are the calendar's nominal ones, with no outburst predictions
|
|
104
|
+
- Eclipses and meteor showers are included when their peak is at or after `start`; eclipse contacts and shower activity dates may precede `start`
|
|
105
|
+
- Meteor shower table: International Meteor Organization, [2026 Meteor Shower Calendar](https://www.imo.net/files/meteor-shower/cal2026.pdf), ed. Jürgen Rendtel, DOI [10.13140/RG.2.2.36179.08480](https://doi.org/10.13140/RG.2.2.36179.08480)
|
|
101
106
|
|
|
102
107
|
---
|
|
103
108
|
|
|
104
109
|
### `astronomy_list_visible` <sub>tool</sub>
|
|
105
110
|
|
|
106
111
|
- Observer coordinates and one evaluation instant, `time` (default now, not a window); `min_altitude` (default 0) and `include_stars` (default false) shape the list
|
|
107
|
-
- Returns `sky_condition` (`daylight`, `civil_twilight`, `nautical_twilight`, `astronomical_twilight`, `dark`), `sun_altitude_degrees`, and `bodies`
|
|
112
|
+
- Returns `sky_condition` (`daylight`, `civil_twilight`, `nautical_twilight`, `astronomical_twilight`, `dark`), `sun_altitude_degrees`, and `bodies`. A negative `min_altitude` includes objects below the horizon. Objects above it rank first, with each group ordered by brightness and then altitude. Each `visibility_note` accounts for the horizon, daylight, civil twilight, and glare within 15° of the Sun
|
|
108
113
|
|
|
109
114
|
---
|
|
110
115
|
|
|
111
116
|
### `astronomy_get_ephemeris` <sub>tool</sub>
|
|
112
117
|
|
|
113
118
|
- `designation` is passed to Horizons verbatim (`"433;"` for a numbered asteroid, `"DES=1P;CAP"` for a periodic comet, a negative SPK-ID for a spacecraft); `start` defaults to now, `stop` to 24 h later, and `step` to `"1h"` (a count plus `m`, `h`, `d`, `mo`, or `y`); `latitude` and `longitude` together add alt/az
|
|
114
|
-
-
|
|
119
|
+
- Each row carries `ra_hours`/`dec_degrees` as astrometric ICRF (J2000), not the apparent of-date values `astronomy_get_sky_position` returns, plus `distance_au`, `magnitude`, `constellation`, `sun_elongation_degrees`, and `visibility` (`morning`, `evening`, or null); with an observer, the elongation is measured from that place
|
|
120
|
+
- `limit` sets the rows per page (default 200). Requests above 90,000 use 90,000 and report the adjustment. When `truncated` is true, use the notice’s next `start` and keep the original `stop` and `step`. If you omitted `stop`, the notice supplies its resolved value. `target_name` identifies the object Horizons resolved
|
|
115
121
|
- Fails as `ambiguous_designation`, `observer_is_target`, `body_not_found`, `invalid_step`, `invalid_elevation`, `time_out_of_range`, or `request_rejected`, each naming the input to correct
|
|
116
122
|
- Registered only when `ASTRONOMY_ENABLE_HORIZONS=true`
|
|
117
123
|
|
|
@@ -136,7 +142,7 @@ Design reference: [`docs/design.md`](./docs/design.md).
|
|
|
136
142
|
### `astronomy_stargazing_plan` <sub>prompt</sub>
|
|
137
143
|
|
|
138
144
|
- Arguments: `location` required; `date` (`YYYY-MM-DD`) optional, defaults to tonight
|
|
139
|
-
- Returns one user message that chains `astronomy_get_rise_set` (sun, then moon), `astronomy_get_moon_phase`,
|
|
145
|
+
- Returns one user message that chains `astronomy_get_rise_set` (sun, then moon), `astronomy_get_moon_phase`, `astronomy_list_visible` with `include_stars`, and `astronomy_find_events` for `meteor_shower` (searched from four weeks before the night, keeping the showers active that night), plus the geocoding and weather steps this server doesn't cover
|
|
140
146
|
|
|
141
147
|
## Features
|
|
142
148
|
|
|
@@ -257,7 +263,7 @@ MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
|
|
|
257
263
|
|
|
258
264
|
### Prerequisites
|
|
259
265
|
|
|
260
|
-
- [Bun v1.4.
|
|
266
|
+
- [Bun v1.4.4](https://bun.sh/) or higher (or Node.js v24+).
|
|
261
267
|
- No API key. The core is offline, and both extensions (JPL Horizons, CelesTrak) are keyless.
|
|
262
268
|
|
|
263
269
|
### Installation
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Adds meteor-shower maxima to astronomy_find_events, rise/set/transit for catalog stars on astronomy_get_rise_set, observer-local eclipse contact times, and constellation, Sun elongation, and visibility on astronomy_get_ephemeris rows, which now label their RA/Dec as J2000."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.5.1 — 2026-11-16
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- **`meteor_shower` event class on `astronomy_find_events`** ([#71](https://github.com/cyanheads/astronomy-mcp-server/issues/71)): the maxima of nine major annual showers from a bundled IMO table, each with `zhr`, the J2000 radiant, activity dates, and `moon_illuminated_fraction`. A `shower` input narrows the search to one by code or name (`shower_not_found` on a miss), and an observer adds `radiant_altitude_degrees` and `sun_altitude_degrees` at the maximum. The `astronomy_stargazing_plan` prompt gains a step that checks showers around the night.
|
|
12
|
+
- **`star` input on `astronomy_get_rise_set`** ([#70](https://github.com/cyanheads/astronomy-mcp-server/issues/70)): rise, set, and transit for a catalog star, taking the names `astronomy_get_sky_position` accepts (`star_not_found` on a miss). It wins over `body` and returns no twilight.
|
|
13
|
+
- **`contacts_local` on `astronomy_find_events` eclipses** ([#69](https://github.com/cyanheads/astronomy-mcp-server/issues/69)): with a `timezone`, each contact keyed `<phase>_local`, using the zone offset in force at that contact's own instant.
|
|
14
|
+
- **`constellation`, `sun_elongation_degrees`, and `visibility` on each `astronomy_get_ephemeris` row** ([#72](https://github.com/cyanheads/astronomy-mcp-server/issues/72)): elongation is measured from the observer when `latitude` and `longitude` are given, else from Earth's center; `visibility` is `morning`, `evening`, or null.
|
|
15
|
+
|
|
16
|
+
## Changed
|
|
17
|
+
|
|
18
|
+
- **`astronomy_get_rise_set` with neither `body` nor `star`** now fails with reason `body_required` (was `invalid_arguments`; still -32602).
|
|
19
|
+
- **`astronomy-guide` skill 1.0 → 1.1**: adds meteor-shower guidance, rise/set for stars, and the J2000 note for ephemeris RA/Dec.
|
|
20
|
+
|
|
21
|
+
## Fixed
|
|
22
|
+
|
|
23
|
+
- **`astronomy_get_ephemeris` RA/Dec frame** ([#68](https://github.com/cyanheads/astronomy-mcp-server/issues/68)): `ra_hours` and `dec_degrees` were unlabeled astrometric ICRF (J2000) values, unlike `astronomy_get_sky_position`'s apparent of-date coordinates. The field descriptions, tool description, and `content[]` header (`RA/Dec astrometric ICRF (J2000)`) now say so; values are unchanged.
|
|
24
|
+
- `astronomy_find_events` `content[]` shows a null eclipse phase as `none` instead of dropping it.
|
|
25
|
+
- A one-row `astronomy_get_ephemeris` header reads `— 1 point`, not `— 1 points`.
|
|
26
|
+
|
|
27
|
+
## Dependencies
|
|
28
|
+
|
|
29
|
+
- `@cyanheads/mcp-ts-core` ^0.13.18 → ^0.13.22.
|
|
30
|
+
- `satellite.js` ^7.1.0 → ^7.2.0 (keeps the element-set epoch's microseconds: `astronomy_get_satellite_passes` altitudes and azimuths move by at most 0.0003°; pass times are unchanged).
|
|
31
|
+
- `@biomejs/biome` 2.6.3 → 2.6.7 (dev).
|
|
32
|
+
- `@types/node` ^26.6.5 → ^26.6.6 (dev).
|
|
33
|
+
- `tsc-alias` ^1.9.9 → ^1.9.10 (dev).
|
|
34
|
+
- `vitest` ^5.0.5 → ^5.1.0 (dev).
|
|
35
|
+
- `engines.bun` >=1.4.0 → >=1.4.4.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Model a lower horizon for rise and set, rank visible objects by horizon position, and choose how many JPL Horizons samples each page returns."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.5.2 — 2026-11-27
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- **`astronomy_get_rise_set`** accepts `height_above_horizon` in meters for observers above reference terrain or sea level. Twilight keeps its geometric thresholds and is bounded by the resulting night. ([#77](https://github.com/cyanheads/astronomy-mcp-server/issues/77))
|
|
12
|
+
- **`astronomy_get_ephemeris`** accepts a `limit` of up to 90,000 rows per page, with a default of 200. Continuation notices supply the resolved `stop` when the original request omitted it. ([#75](https://github.com/cyanheads/astronomy-mcp-server/issues/75))
|
|
13
|
+
|
|
14
|
+
## Changed
|
|
15
|
+
|
|
16
|
+
- **Framework tooling** syncs development and packaging checks and excludes Vitest caches from MCPB bundles.
|
|
17
|
+
|
|
18
|
+
## Fixed
|
|
19
|
+
|
|
20
|
+
- **`astronomy_list_visible`** ranks above-horizon objects first, then orders each group by magnitude and altitude. Objects at or below the horizon carry a visibility caveat. ([#78](https://github.com/cyanheads/astronomy-mcp-server/issues/78))
|
|
21
|
+
|
|
22
|
+
## Dependencies
|
|
23
|
+
|
|
24
|
+
- `@cyanheads/mcp-ts-core` ^0.13.22 → ^0.13.24
|
|
25
|
+
- `@biomejs/biome` 2.6.7 → 2.6.9
|
|
26
|
+
- `@types/node` ^26.6.6 → 26.6.10
|
|
27
|
+
- `@vitest/coverage-istanbul` added at ^5.1.2
|
|
28
|
+
- `ignore` ^7.0.14 → ^7.0.17
|
|
29
|
+
- `tsc-alias` ^1.9.10 → ^1.9.11
|
|
30
|
+
- `vitest` ^5.1.0 → ^5.1.2
|
package/changelog/template.md
CHANGED
|
@@ -75,17 +75,19 @@ security: false
|
|
|
75
75
|
Example — same fact, right size:
|
|
76
76
|
|
|
77
77
|
TOO LONG: **`fetchWithTimeout`'s `timeoutMs` bounds the whole exchange**
|
|
78
|
-
(#341). `fetch`
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
the deadline when the body closes,
|
|
78
|
+
([#341](https://github.com/cyanheads/mcp-ts-core/issues/341)). `fetch`
|
|
79
|
+
resolves once headers arrive and the deadline was cleared as the helper
|
|
80
|
+
returned, so a peer that answered promptly and then stalled the stream
|
|
81
|
+
held the request open indefinitely. A 2xx carrying a body now comes back
|
|
82
|
+
as a passthrough wrapper that disarms the deadline when the body closes,
|
|
83
|
+
errors, or is cancelled; …
|
|
83
84
|
[+90 more words of mechanism and edge cases]
|
|
84
85
|
|
|
85
86
|
RIGHT: **`fetchWithTimeout`'s `timeoutMs` now bounds the whole
|
|
86
|
-
exchange, not just the headers**
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
exchange, not just the headers**
|
|
88
|
+
([#341](https://github.com/cyanheads/mcp-ts-core/issues/341)). A stalled
|
|
89
|
+
body aborts with the same `Timeout` error; the returned `Response` is a
|
|
90
|
+
wrapper, so identity assertions (`toBe(response)`) no longer hold.
|
|
89
91
|
|
|
90
92
|
Narrative intro: skip by default. Add one short sentence only when the
|
|
91
93
|
release theme genuinely needs framing the bullets can't carry. When many
|
|
@@ -116,14 +118,21 @@ security: false
|
|
|
116
118
|
resolves to whatever real item already owns 42, and timeline previews pull
|
|
117
119
|
in that unrelated item's metadata.
|
|
118
120
|
|
|
121
|
+
Outside reporters: when the issue or PR came from outside the project
|
|
122
|
+
(`git-wrapup` step 5 says how to tell), thank its author in the same
|
|
123
|
+
parenthetical, profile linked by full URL for the same reason:
|
|
124
|
+
|
|
125
|
+
([#38](https://github.com/cyanheads/mcp-ts-core/issues/38), thanks [@octocat](https://github.com/octocat)!)
|
|
126
|
+
|
|
119
127
|
TAG ANNOTATIONS — the annotated tag body renders as the GitHub Release body
|
|
120
128
|
via `gh release create --notes-from-tag`. It is a condensed digest of this
|
|
121
129
|
entry, never a copy, and its format is owned by the `release-and-publish`
|
|
122
130
|
skill (step 4, "Create the annotated tag"): a short subject line without the
|
|
123
131
|
version, flat headline bullets — no Keep-a-Changelog section headers, no
|
|
124
|
-
gates line — at most one deps line, issue backlinks
|
|
125
|
-
last. In release-PR mode the `git-wrapup`
|
|
126
|
-
PR body's `## Changes` and the tag copies
|
|
132
|
+
gates line — at most one deps line, issue backlinks with any outside-reporter
|
|
133
|
+
thanks, and the changelog link last. In release-PR mode the `git-wrapup`
|
|
134
|
+
skill authors those bullets as the PR body's `## Changes` and the tag copies
|
|
135
|
+
them.
|
|
127
136
|
-->
|
|
128
137
|
|
|
129
138
|
## Added
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
* "plan tonight's stargazing from <place>" workflow, chaining the astronomy tools
|
|
4
4
|
* in order and prompting for cross-server geocoding and cloud-cover checks. Every step
|
|
5
5
|
* that picks a time anchors it to the requested date in the observer's resolved IANA
|
|
6
|
-
* zone rather than UTC midnight, so a plan cannot drift onto the adjacent local night
|
|
7
|
-
*
|
|
6
|
+
* zone rather than UTC midnight, so a plan cannot drift onto the adjacent local night;
|
|
7
|
+
* the visibility step opts into the bright-star catalog the tool omits by default, and
|
|
8
|
+
* the meteor-shower step searches from weeks before the night, so a shower that peaked
|
|
9
|
+
* a few nights earlier and is still active is not missed.
|
|
8
10
|
* @module mcp-server/prompts/definitions/stargazing-plan.prompt
|
|
9
11
|
*/
|
|
10
12
|
import { z } from '@cyanheads/mcp-ts-core';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stargazing-plan.prompt.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/stargazing-plan.prompt.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"stargazing-plan.prompt.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/stargazing-plan.prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAU,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,eAAO,MAAM,oBAAoB;;;kBAqC/B,CAAC"}
|
|
@@ -3,13 +3,15 @@
|
|
|
3
3
|
* "plan tonight's stargazing from <place>" workflow, chaining the astronomy tools
|
|
4
4
|
* in order and prompting for cross-server geocoding and cloud-cover checks. Every step
|
|
5
5
|
* that picks a time anchors it to the requested date in the observer's resolved IANA
|
|
6
|
-
* zone rather than UTC midnight, so a plan cannot drift onto the adjacent local night
|
|
7
|
-
*
|
|
6
|
+
* zone rather than UTC midnight, so a plan cannot drift onto the adjacent local night;
|
|
7
|
+
* the visibility step opts into the bright-star catalog the tool omits by default, and
|
|
8
|
+
* the meteor-shower step searches from weeks before the night, so a shower that peaked
|
|
9
|
+
* a few nights earlier and is still active is not missed.
|
|
8
10
|
* @module mcp-server/prompts/definitions/stargazing-plan.prompt
|
|
9
11
|
*/
|
|
10
12
|
import { prompt, z } from '@cyanheads/mcp-ts-core';
|
|
11
13
|
export const stargazingPlanPrompt = prompt('astronomy_stargazing_plan', {
|
|
12
|
-
description: 'Structure a "plan tonight\'s stargazing from <place>" workflow: resolve coordinates, find the dark-sky window, check the moon, list what is up, and fold in cloud cover. Emits a message that chains the astronomy tools in order and names the cross-server steps the astronomy server does not cover (geocoding, weather).',
|
|
14
|
+
description: 'Structure a "plan tonight\'s stargazing from <place>" workflow: resolve coordinates, find the dark-sky window, check the moon, list what is up, check for an active meteor shower, and fold in cloud cover. Emits a message that chains the astronomy tools in order and names the cross-server steps the astronomy server does not cover (geocoding, weather).',
|
|
13
15
|
title: 'astronomy-mcp-server: plan stargazing session',
|
|
14
16
|
args: z.object({
|
|
15
17
|
location: z
|
|
@@ -37,9 +39,10 @@ export const stargazingPlanPrompt = prompt('astronomy_stargazing_plan', {
|
|
|
37
39
|
`3. Call astronomy_get_moon_phase for <date> and note the illuminated fraction — a bright moon washes out faint objects.`,
|
|
38
40
|
`4. Call astronomy_get_rise_set with body "moon" at those coordinates across the same local <date> night in that timezone, to get moonrise and moonset, then compare them against the dark window from step 2. Phase alone is geocentric and does not say whether the moon is above the observer's horizon; a full moon that has already set does not interfere.`,
|
|
39
41
|
`5. Call astronomy_list_visible at those coordinates with \`include_stars\` set to true, at a time just after the astronomical dusk found in step 2 on the local <date> night in that timezone, to get the ranked list of what is up. The tool omits the bundled bright-star catalog unless \`include_stars\` is true, so leaving it off returns solar-system bodies only — not the named stars a stargazer is most likely to be asking about.`,
|
|
40
|
-
`6.
|
|
42
|
+
`6. Call astronomy_find_events with event "meteor_shower" at those coordinates in that timezone, with \`start\` four weeks before the local <date> night and \`count\` 5, and keep each shower whose activity_start_date to activity_end_date covers that night. A shower stays active for days to weeks around its maximum, so one that peaked a few nights earlier still counts; a maximum inside the dark window from step 2, with the radiant up (radiant_altitude_degrees), is the best case. moon_illuminated_fraction is geocentric, so judge the moon's interference from the moonrise and moonset of step 4.`,
|
|
43
|
+
`7. Check cloud cover and transparency for the location and window using a weather tool (e.g. open-meteo or nws). This server computes only the sky geometry, not the weather.`,
|
|
41
44
|
'',
|
|
42
|
-
`Then summarize: the best viewing window, the standout objects and where to look (altitude/azimuth), the moon's interference (both its brightness and the hours it is above the horizon), and whether the sky is expected to be clear.`,
|
|
45
|
+
`Then summarize: the best viewing window, the standout objects and where to look (altitude/azimuth), any meteor shower active that night, the moon's interference (both its brightness and the hours it is above the horizon), and whether the sky is expected to be clear.`,
|
|
43
46
|
].join('\n');
|
|
44
47
|
return [{ role: 'user', content: { type: 'text', text } }];
|
|
45
48
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stargazing-plan.prompt.js","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/stargazing-plan.prompt.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"stargazing-plan.prompt.js","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/stargazing-plan.prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,2BAA2B,EAAE;IACtE,WAAW,EACT,iWAAiW;IACnW,KAAK,EAAE,+CAA+C;IACtD,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,CAAC,oEAAoE,CAAC;QACjF,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,4EAA4E,CAAC;KAC1F,CAAC;IACF,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE;QACjB,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,IAAI,SAAS,CAAC;QACzC,MAAM,IAAI,GAAG;YACX,yCAAyC;YACzC,EAAE;YACF,iNAAiN;YACjN,EAAE;YACF,aAAa,IAAI,CAAC,QAAQ,aAAa;YACvC,SAAS,SAAS,SAAS;YAC3B,EAAE;YACF,uEAAuE;YACvE,EAAE;YACF,sbAAsb;YACtb,+pBAA+pB;YAC/pB,yHAAyH;YACzH,iWAAiW;YACjW,+aAA+a;YAC/a,slBAAslB;YACtlB,+KAA+K;YAC/K,EAAE;YACF,4QAA4Q;SAC7Q,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"}
|