@cyanheads/astronomy-mcp-server 0.1.3 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/AGENTS.md +30 -24
  2. package/CLAUDE.md +30 -24
  3. package/Dockerfile +11 -7
  4. package/LICENSE +1 -1
  5. package/README.md +3 -2
  6. package/changelog/0.2.x/0.2.0.md +44 -0
  7. package/changelog/template.md +5 -3
  8. package/dist/mcp-server/resources/definitions/body.resource.d.ts +2 -2
  9. package/dist/mcp-server/tools/definitions/find-events.tool.d.ts +49 -39
  10. package/dist/mcp-server/tools/definitions/find-events.tool.d.ts.map +1 -1
  11. package/dist/mcp-server/tools/definitions/find-events.tool.js +20 -12
  12. package/dist/mcp-server/tools/definitions/find-events.tool.js.map +1 -1
  13. package/dist/mcp-server/tools/definitions/get-moon-phase.tool.d.ts +2 -2
  14. package/dist/mcp-server/tools/definitions/get-rise-set.tool.d.ts +7 -7
  15. package/dist/mcp-server/tools/definitions/get-sky-position.tool.d.ts +7 -7
  16. package/dist/mcp-server/tools/definitions/list-visible.tool.d.ts +4 -4
  17. package/dist/services/ephemeris/ephemeris-service.d.ts +3 -3
  18. package/dist/services/ephemeris/ephemeris-service.d.ts.map +1 -1
  19. package/dist/services/ephemeris/ephemeris-service.js +100 -24
  20. package/dist/services/ephemeris/ephemeris-service.js.map +1 -1
  21. package/dist/services/ephemeris/types.d.ts +12 -2
  22. package/dist/services/ephemeris/types.d.ts.map +1 -1
  23. package/dist/services/ephemeris/types.js +7 -0
  24. package/dist/services/ephemeris/types.js.map +1 -1
  25. package/dist/services/horizons/horizons-service.d.ts.map +1 -1
  26. package/dist/services/horizons/horizons-service.js +6 -4
  27. package/dist/services/horizons/horizons-service.js.map +1 -1
  28. package/dist/services/satellite/satellite-service.d.ts +2 -1
  29. package/dist/services/satellite/satellite-service.d.ts.map +1 -1
  30. package/dist/services/satellite/satellite-service.js +10 -4
  31. package/dist/services/satellite/satellite-service.js.map +1 -1
  32. package/package.json +12 -11
  33. package/server.json +3 -3
package/AGENTS.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** astronomy-mcp-server
4
- **Version:** 0.1.3
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.10.9`
4
+ **Version:** 0.2.0
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.11.0`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
8
8
  **Zod:** ^4.4.3
@@ -205,12 +205,14 @@ Handlers receive a unified `ctx` object. Key properties:
205
205
  | Property | Description |
206
206
  |:---------|:------------|
207
207
  | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. |
208
- | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
208
+ | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.getMany(keys)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
209
209
  | `ctx.elicit` | Ask user for structured input — form call `(message, schema)` or `.url(message, url)` for an external link. **Check for presence first:** `if (ctx.elicit) { ... }` |
210
+ | `ctx.enrich` | Success-path agent context (empty-result notices, query echo, pagination totals) — `ctx.enrich(...)` or `.notice()` / `.total()` / `.echo()` / `.truncated()`. Reaches `structuredContent` and `content[]`; lands only when the definition declares an `enrichment` block (no-op otherwise). |
211
+ | `ctx.content` | Non-text content blocks — `.image(data, mimeType)`, `.audio(data, mimeType)`, or `ctx.content(block)` for a raw block. Prepended to `content[]` after `format()`; never enters `structuredContent`. |
210
212
  | `ctx.signal` | `AbortSignal` for cancellation. |
211
213
  | `ctx.progress` | Task progress (present when `task: true`) — `.setTotal(n)`, `.increment()`, `.update(message)`. |
212
214
  | `ctx.requestId` | Unique request ID. |
213
- | `ctx.tenantId` | Tenant ID from JWT or `'default'` for stdio. |
215
+ | `ctx.tenantId` | Tenant ID from JWT; `'default'` for stdio or HTTP with auth off. |
214
216
 
215
217
  ---
216
218
 
@@ -218,7 +220,7 @@ Handlers receive a unified `ctx` object. Key properties:
218
220
 
219
221
  Handlers throw — the framework catches, classifies, and formats.
220
222
 
221
- **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required descriptive metadata for the agent's next move (≥ 5 words, lint-validated); for the wire `data.recovery.hint` (mirrored into `content[]` text), pass explicitly at the throw site when dynamic context matters: `ctx.fail('reason', msg, { recovery: { hint: '...' } })`. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
223
+ **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. Pass `ctx.recoveryFor('reason')` as the throw's data to put it on the wire (`data.recovery.hint`, mirrored into `content[]` text); override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
222
224
 
223
225
  ```ts
224
226
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
@@ -230,7 +232,7 @@ errors: [
230
232
  ],
231
233
  async handler(input, ctx) {
232
234
  const item = await db.find(input.id);
233
- if (!item) throw ctx.fail('no_match', `No item ${input.id}`);
235
+ if (!item) throw ctx.fail('no_match', `No item ${input.id}`, ctx.recoveryFor('no_match'));
234
236
  return item;
235
237
  }
236
238
  ```
@@ -293,7 +295,7 @@ src/
293
295
 
294
296
  ## Skills
295
297
 
296
- Skills are modular instructions in `skills/` at the project root. Read them directly when a task matches — e.g., `skills/add-tool/SKILL.md` when adding a tool.
298
+ Skills are modular instructions in `skills/` at the project root. Read them directly when a task matches — e.g., `skills/add-tool/SKILL.md` when adding a tool. `bun run list-skills` prints the full registry.
297
299
 
298
300
  **Agent skill directory:** Copy skills into the directory your agent discovers (Claude Code: `.claude/skills/`, others: equivalent). Skills then load as context without referencing `skills/` paths. After framework updates, run the `maintenance` skill — Phase B re-syncs the agent directory.
299
301
 
@@ -313,7 +315,6 @@ Available skills:
313
315
  | `tool-defs-analysis` | Read-only audit of MCP definition language across the surface — voice, leaks, defaults, recovery hints, output descriptions |
314
316
  | `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
315
317
  | `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
316
- | `devcheck` | Lint, format, typecheck, audit |
317
318
  | `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
318
319
  | `git-wrapup` | Land working-tree changes as a versioned commit + annotated tag — version bump, changelog, verify, tag. Local only. |
319
320
  | `release-and-publish` | Push + npm + MCP Registry + GH Release + Docker. Picks up from `git-wrapup` |
@@ -321,12 +322,14 @@ Available skills:
321
322
  | `orchestrations` | Chain task skills into a gated multi-phase pipeline — build-out, QA-fix, update-ship — when you can spawn sub-agents |
322
323
  | `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
323
324
  | `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
325
+ | `techniques` | Catalog of response/data-shaping techniques — overflow handling, payload shaping, retrieval patterns |
324
326
  | `api-auth` | Auth modes, scopes, JWT/OAuth |
325
327
  | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
326
328
  | `api-config` | AppConfig, parseConfig, env vars |
327
329
  | `api-context` | Context interface, logger, state, progress |
328
330
  | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
329
331
  | `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
332
+ | `api-mirror` | MirrorService: persistent self-refreshing local mirror (embedded SQLite + FTS5) of a bulk upstream dataset — Tier 3 opt-in |
330
333
  | `api-services` | LLM, Speech, Graph services |
331
334
  | `api-testing` | createMockContext, test patterns |
332
335
  | `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
@@ -345,26 +348,29 @@ When you complete a skill's checklist, check the boxes and add a completion time
345
348
 
346
349
  | Command | Purpose |
347
350
  |:--------|:--------|
348
- | `npm run build` | Compile TypeScript |
349
- | `npm run rebuild` | Clean + build |
350
- | `npm run clean` | Remove build artifacts |
351
- | `npm run devcheck` | Lint + format + typecheck + security + changelog sync |
351
+ | `bun run build` | Compile TypeScript |
352
+ | `bun run rebuild` | Clean + build |
353
+ | `bun run clean` | Remove build artifacts |
354
+ | `bun run devcheck` | Lint + format + typecheck + security + changelog sync |
352
355
  | `bun run audit:refresh` | Delete `bun.lock`, reinstall, and re-run `bun audit`. Use when `devcheck` flags a transitive advisory — Bun's `update` is sticky on transitive resolutions, so the advisory may be a stale-lockfile false positive. If it survives the refresh, it's real. |
353
- | `npm run tree` | Generate directory structure doc |
354
- | `npm run format` | Auto-fix formatting (safe fixes only) |
355
- | `npm run format:unsafe` | Also apply Biome's unsafe autofixes — review the diff; they can change behavior |
356
- | `npm test` | Run tests |
357
- | `npm run start:stdio` | Production mode (stdio) |
358
- | `npm run start:http` | Production mode (HTTP) |
359
- | `npm run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
360
- | `npm run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
361
- | `npm run bundle` | Build, pack, and clean a `.mcpb` for one-click Claude Desktop install |
356
+ | `bun run lint:mcp` | Run the MCP definition linter standalone (rule catalog: `api-linter` skill) |
357
+ | `bun run lint:packaging` | Packaging surface checks — `server.json`/`manifest.json` env-var parity (run by devcheck) |
358
+ | `bun run list-skills` | Print the skill registry |
359
+ | `bun run tree` | Generate directory structure doc |
360
+ | `bun run format` | Auto-fix formatting (safe fixes only) |
361
+ | `bun run format:unsafe` | Also apply Biome's unsafe autofixes — review the diff; they can change behavior |
362
+ | `bun run test` | Run tests (Vitest — use `bun run test`, not `bun test`) |
363
+ | `bun run start:stdio` | Production mode (stdio) |
364
+ | `bun run start:http` | Production mode (HTTP) |
365
+ | `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
366
+ | `bun run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
367
+ | `bun run bundle` | Build, pack, and clean a `.mcpb` for one-click Claude Desktop install |
362
368
 
363
369
  ---
364
370
 
365
371
  ## Bundling
366
372
 
367
- `npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips dependency-shipped agent docs (`node_modules/**` `skills/`, `.claude/`, `.agents/`, `SKILL.md`) that root-anchored `.mcpbignore` patterns cannot reach. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
373
+ `bun run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips two classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs (`skills/`, `.claude/`, `.agents/`, `SKILL.md`) and platform-specific native bindings, which would otherwise lock the bundle to the platform it was packed on. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
368
374
 
369
375
  **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.
370
376
 
@@ -382,14 +388,14 @@ Each per-version file opens with YAML frontmatter:
382
388
  ---
383
389
  summary: "One-line headline, ≤350 chars" # required — powers the rollup index
384
390
  breaking: false # optional — true flags breaking changes
385
- security: false # optional — true flags security fixes
391
+ security: false # optional — true ONLY for a source-code security fix, never a dependency CVE bump
386
392
  ---
387
393
 
388
394
  # 0.1.0 — YYYY-MM-DD
389
395
  ...
390
396
  ```
391
397
 
392
- `breaking: true` renders a `· ⚠️ Breaking` badge — use it when consumers must update code on upgrade (signature changes, removed APIs, config renames). `security: true` renders a `· 🛡️ Security` badge and pairs with a `## Security` body section. When both are set, badges render `· ⚠️ Breaking · 🛡️ Security`.
398
+ `breaking: true` renders a `· ⚠️ Breaking` badge — use it when consumers must update code on upgrade (signature changes, removed APIs, config renames). `security: true` renders a `· 🛡️ Security` badge and pairs with a `## Security` body section — set it only for a security fix in this server's *own source code*, never for a routine dependency or transitive CVE bump (record those under `## Dependencies`). When both are set, badges render `· ⚠️ Breaking · 🛡️ Security`.
393
399
 
394
400
  `agent-notes` is an optional free-form field for maintenance agents processing the release downstream. Content here won't appear in the rendered CHANGELOG — it's consumed by agents running the `maintenance` skill. Use it for adoption instructions that don't fit the human-facing sections: new files to create, fields to populate, one-time migration steps. Omit entirely when there's nothing to say.
395
401
 
package/CLAUDE.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** astronomy-mcp-server
4
- **Version:** 0.1.3
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.10.9`
4
+ **Version:** 0.2.0
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.11.0`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
8
8
  **Zod:** ^4.4.3
@@ -205,12 +205,14 @@ Handlers receive a unified `ctx` object. Key properties:
205
205
  | Property | Description |
206
206
  |:---------|:------------|
207
207
  | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. |
208
- | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
208
+ | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.getMany(keys)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
209
209
  | `ctx.elicit` | Ask user for structured input — form call `(message, schema)` or `.url(message, url)` for an external link. **Check for presence first:** `if (ctx.elicit) { ... }` |
210
+ | `ctx.enrich` | Success-path agent context (empty-result notices, query echo, pagination totals) — `ctx.enrich(...)` or `.notice()` / `.total()` / `.echo()` / `.truncated()`. Reaches `structuredContent` and `content[]`; lands only when the definition declares an `enrichment` block (no-op otherwise). |
211
+ | `ctx.content` | Non-text content blocks — `.image(data, mimeType)`, `.audio(data, mimeType)`, or `ctx.content(block)` for a raw block. Prepended to `content[]` after `format()`; never enters `structuredContent`. |
210
212
  | `ctx.signal` | `AbortSignal` for cancellation. |
211
213
  | `ctx.progress` | Task progress (present when `task: true`) — `.setTotal(n)`, `.increment()`, `.update(message)`. |
212
214
  | `ctx.requestId` | Unique request ID. |
213
- | `ctx.tenantId` | Tenant ID from JWT or `'default'` for stdio. |
215
+ | `ctx.tenantId` | Tenant ID from JWT; `'default'` for stdio or HTTP with auth off. |
214
216
 
215
217
  ---
216
218
 
@@ -218,7 +220,7 @@ Handlers receive a unified `ctx` object. Key properties:
218
220
 
219
221
  Handlers throw — the framework catches, classifies, and formats.
220
222
 
221
- **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required descriptive metadata for the agent's next move (≥ 5 words, lint-validated); for the wire `data.recovery.hint` (mirrored into `content[]` text), pass explicitly at the throw site when dynamic context matters: `ctx.fail('reason', msg, { recovery: { hint: '...' } })`. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
223
+ **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. Pass `ctx.recoveryFor('reason')` as the throw's data to put it on the wire (`data.recovery.hint`, mirrored into `content[]` text); override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
222
224
 
223
225
  ```ts
224
226
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
@@ -230,7 +232,7 @@ errors: [
230
232
  ],
231
233
  async handler(input, ctx) {
232
234
  const item = await db.find(input.id);
233
- if (!item) throw ctx.fail('no_match', `No item ${input.id}`);
235
+ if (!item) throw ctx.fail('no_match', `No item ${input.id}`, ctx.recoveryFor('no_match'));
234
236
  return item;
235
237
  }
236
238
  ```
@@ -293,7 +295,7 @@ src/
293
295
 
294
296
  ## Skills
295
297
 
296
- Skills are modular instructions in `skills/` at the project root. Read them directly when a task matches — e.g., `skills/add-tool/SKILL.md` when adding a tool.
298
+ Skills are modular instructions in `skills/` at the project root. Read them directly when a task matches — e.g., `skills/add-tool/SKILL.md` when adding a tool. `bun run list-skills` prints the full registry.
297
299
 
298
300
  **Agent skill directory:** Copy skills into the directory your agent discovers (Claude Code: `.claude/skills/`, others: equivalent). Skills then load as context without referencing `skills/` paths. After framework updates, run the `maintenance` skill — Phase B re-syncs the agent directory.
299
301
 
@@ -313,7 +315,6 @@ Available skills:
313
315
  | `tool-defs-analysis` | Read-only audit of MCP definition language across the surface — voice, leaks, defaults, recovery hints, output descriptions |
314
316
  | `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
315
317
  | `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
316
- | `devcheck` | Lint, format, typecheck, audit |
317
318
  | `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
318
319
  | `git-wrapup` | Land working-tree changes as a versioned commit + annotated tag — version bump, changelog, verify, tag. Local only. |
319
320
  | `release-and-publish` | Push + npm + MCP Registry + GH Release + Docker. Picks up from `git-wrapup` |
@@ -321,12 +322,14 @@ Available skills:
321
322
  | `orchestrations` | Chain task skills into a gated multi-phase pipeline — build-out, QA-fix, update-ship — when you can spawn sub-agents |
322
323
  | `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
323
324
  | `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
325
+ | `techniques` | Catalog of response/data-shaping techniques — overflow handling, payload shaping, retrieval patterns |
324
326
  | `api-auth` | Auth modes, scopes, JWT/OAuth |
325
327
  | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
326
328
  | `api-config` | AppConfig, parseConfig, env vars |
327
329
  | `api-context` | Context interface, logger, state, progress |
328
330
  | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
329
331
  | `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
332
+ | `api-mirror` | MirrorService: persistent self-refreshing local mirror (embedded SQLite + FTS5) of a bulk upstream dataset — Tier 3 opt-in |
330
333
  | `api-services` | LLM, Speech, Graph services |
331
334
  | `api-testing` | createMockContext, test patterns |
332
335
  | `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
@@ -345,26 +348,29 @@ When you complete a skill's checklist, check the boxes and add a completion time
345
348
 
346
349
  | Command | Purpose |
347
350
  |:--------|:--------|
348
- | `npm run build` | Compile TypeScript |
349
- | `npm run rebuild` | Clean + build |
350
- | `npm run clean` | Remove build artifacts |
351
- | `npm run devcheck` | Lint + format + typecheck + security + changelog sync |
351
+ | `bun run build` | Compile TypeScript |
352
+ | `bun run rebuild` | Clean + build |
353
+ | `bun run clean` | Remove build artifacts |
354
+ | `bun run devcheck` | Lint + format + typecheck + security + changelog sync |
352
355
  | `bun run audit:refresh` | Delete `bun.lock`, reinstall, and re-run `bun audit`. Use when `devcheck` flags a transitive advisory — Bun's `update` is sticky on transitive resolutions, so the advisory may be a stale-lockfile false positive. If it survives the refresh, it's real. |
353
- | `npm run tree` | Generate directory structure doc |
354
- | `npm run format` | Auto-fix formatting (safe fixes only) |
355
- | `npm run format:unsafe` | Also apply Biome's unsafe autofixes — review the diff; they can change behavior |
356
- | `npm test` | Run tests |
357
- | `npm run start:stdio` | Production mode (stdio) |
358
- | `npm run start:http` | Production mode (HTTP) |
359
- | `npm run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
360
- | `npm run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
361
- | `npm run bundle` | Build, pack, and clean a `.mcpb` for one-click Claude Desktop install |
356
+ | `bun run lint:mcp` | Run the MCP definition linter standalone (rule catalog: `api-linter` skill) |
357
+ | `bun run lint:packaging` | Packaging surface checks — `server.json`/`manifest.json` env-var parity (run by devcheck) |
358
+ | `bun run list-skills` | Print the skill registry |
359
+ | `bun run tree` | Generate directory structure doc |
360
+ | `bun run format` | Auto-fix formatting (safe fixes only) |
361
+ | `bun run format:unsafe` | Also apply Biome's unsafe autofixes — review the diff; they can change behavior |
362
+ | `bun run test` | Run tests (Vitest — use `bun run test`, not `bun test`) |
363
+ | `bun run start:stdio` | Production mode (stdio) |
364
+ | `bun run start:http` | Production mode (HTTP) |
365
+ | `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
366
+ | `bun run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
367
+ | `bun run bundle` | Build, pack, and clean a `.mcpb` for one-click Claude Desktop install |
362
368
 
363
369
  ---
364
370
 
365
371
  ## Bundling
366
372
 
367
- `npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips dependency-shipped agent docs (`node_modules/**` `skills/`, `.claude/`, `.agents/`, `SKILL.md`) that root-anchored `.mcpbignore` patterns cannot reach. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
373
+ `bun run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips two classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs (`skills/`, `.claude/`, `.agents/`, `SKILL.md`) and platform-specific native bindings, which would otherwise lock the bundle to the platform it was packed on. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
368
374
 
369
375
  **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.
370
376
 
@@ -382,14 +388,14 @@ Each per-version file opens with YAML frontmatter:
382
388
  ---
383
389
  summary: "One-line headline, ≤350 chars" # required — powers the rollup index
384
390
  breaking: false # optional — true flags breaking changes
385
- security: false # optional — true flags security fixes
391
+ security: false # optional — true ONLY for a source-code security fix, never a dependency CVE bump
386
392
  ---
387
393
 
388
394
  # 0.1.0 — YYYY-MM-DD
389
395
  ...
390
396
  ```
391
397
 
392
- `breaking: true` renders a `· ⚠️ Breaking` badge — use it when consumers must update code on upgrade (signature changes, removed APIs, config renames). `security: true` renders a `· 🛡️ Security` badge and pairs with a `## Security` body section. When both are set, badges render `· ⚠️ Breaking · 🛡️ Security`.
398
+ `breaking: true` renders a `· ⚠️ Breaking` badge — use it when consumers must update code on upgrade (signature changes, removed APIs, config renames). `security: true` renders a `· 🛡️ Security` badge and pairs with a `## Security` body section — set it only for a security fix in this server's *own source code*, never for a routine dependency or transitive CVE bump (record those under `## Dependencies`). When both are set, badges render `· ⚠️ Breaking · 🛡️ Security`.
393
399
 
394
400
  `agent-notes` is an optional free-form field for maintenance agents processing the release downstream. Content here won't appear in the rendered CHANGELOG — it's consumed by agents running the `maintenance` skill. Use it for adoption instructions that don't fit the human-facing sections: new files to create, fields to populate, one-time migration steps. Omit entirely when there's nothing to say.
395
401
 
package/Dockerfile CHANGED
@@ -4,15 +4,17 @@
4
4
  # This stage installs all dependencies (including dev), builds the TypeScript
5
5
  # source code into JavaScript, and prepares the production assets.
6
6
  # ==============================================================================
7
- FROM oven/bun:1.3 AS build
7
+ FROM oven/bun:1.3.14 AS build
8
8
 
9
9
  WORKDIR /usr/src/app
10
10
 
11
11
  # Copy dependency manifests for optimized layer caching
12
12
  COPY package.json bun.lock ./
13
13
 
14
- # Install all dependencies (including dev dependencies for building)
15
- RUN bun install --frozen-lockfile
14
+ # Install all dependencies (including dev dependencies for building).
15
+ # The BuildKit cache mount persists Bun's global package cache across builds.
16
+ RUN --mount=type=cache,target=/root/.bun/install/cache \
17
+ bun install --frozen-lockfile --ignore-scripts
16
18
 
17
19
  # Copy the rest of the source code
18
20
  COPY . .
@@ -28,7 +30,7 @@ RUN bun run build
28
30
  # application. It uses a slim base image and only includes production
29
31
  # dependencies and build artifacts.
30
32
  # ==============================================================================
31
- FROM oven/bun:1.3-slim AS production
33
+ FROM oven/bun:1.3.14-slim AS production
32
34
 
33
35
  WORKDIR /usr/src/app
34
36
 
@@ -49,14 +51,16 @@ COPY package.json bun.lock ./
49
51
 
50
52
  # Install only production dependencies, ignoring any lifecycle scripts (like 'prepare')
51
53
  # that are not needed in the final production image.
52
- RUN bun install --production --frozen-lockfile --ignore-scripts
54
+ RUN --mount=type=cache,target=/root/.bun/install/cache \
55
+ bun install --production --frozen-lockfile --ignore-scripts
53
56
 
54
57
  # Conditionally install OpenTelemetry optional peer dependencies (Tier 3).
55
58
  # These are not bundled by default to keep the base image lean. Enable at build time
56
59
  # with: docker build --build-arg OTEL_ENABLED=true
57
60
  ARG OTEL_ENABLED=true
58
- RUN if [ "$OTEL_ENABLED" = "true" ]; then \
59
- bun add @hono/otel \
61
+ RUN --mount=type=cache,target=/root/.bun/install/cache \
62
+ if [ "$OTEL_ENABLED" = "true" ]; then \
63
+ bun add --omit=dev --ignore-scripts @hono/otel \
60
64
  @opentelemetry/instrumentation-http \
61
65
  @opentelemetry/exporter-metrics-otlp-http \
62
66
  @opentelemetry/exporter-trace-otlp-http \
package/LICENSE CHANGED
@@ -186,7 +186,7 @@ Apache License
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2025 Casey Hand @cyanheads
189
+ Copyright 2026 Casey Hand @cyanheads
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-0.1.3-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/astronomy-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.29.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-^6.0.3-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.0-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.29.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
 
@@ -66,7 +66,8 @@ Forward search across nine event classes under one `event` enum.
66
66
 
67
67
  - `solar_eclipse`, `lunar_eclipse`, `equinox`, `solstice`, `moon_quarter`, `opposition`, `conjunction`, `max_elongation`, `perigee_apogee`
68
68
  - Solar eclipses require an observer (`latitude`/`longitude`) and report local visibility and contact times; lunar eclipses are geocentric and need no location
69
- - The body-relative events (`opposition`, `conjunction`, `max_elongation`, `perigee_apogee`) require a `body`; `max_elongation` is defined only for mercury and venus
69
+ - The body-relative events (`opposition`, `conjunction`, `max_elongation`, `perigee_apogee`) require a `body`, gated to the bodies each event exists for: `opposition` to the superior planets (mars through pluto), `conjunction` to any planet, `max_elongation` to mercury and venus, `perigee_apogee` to the moon, earth, or a planet
70
+ - `perigee_apogee` on `earth` returns its perihelion and aphelion; `conjunction` on mercury or venus returns both the inferior and superior passes, labelled by `conjunction_kind`
70
71
  - Returns the next `count` occurrences (default 1, max 20)
71
72
 
72
73
  ---
@@ -0,0 +1,44 @@
1
+ ---
2
+ summary: "astronomy_find_events opposition/conjunction times were swapped, moon_phase age_days over-reported by ~29.5d after a new moon, and an unsupported event body leaked raw engine errors — all fixed; perigee_apogee now accepts earth, and conjunction reports inferior/superior for mercury and venus."
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.2.0 — 2026-07-30
8
+
9
+ ## Added
10
+
11
+ - **`astronomy_find_events`** — `perigee_apogee` accepts `body: "earth"`, returning its heliocentric perihelion/aphelion; gated to this one event class, still rejected for the observer-relative tools and every other event. ([#10](https://github.com/cyanheads/astronomy-mcp-server/issues/10))
12
+ - **`astronomy_find_events`** — `conjunction` on `mercury`/`venus` now returns both the inferior and superior pass per synodic period, labelled by the new `conjunction_kind` output field (`inferior`/`superior`). ([#7](https://github.com/cyanheads/astronomy-mcp-server/issues/7))
13
+ - `.gitattributes`, `.github/FUNDING.yml`, `.github/SECURITY.md` — line-ending/binary/generated-file normalization, a funding link, and a private vulnerability-reporting policy.
14
+ - `bunfig.toml` — `@socketsecurity/bun-security-scanner` wired into `[install.security]` to scan every package before install; `minimumReleaseAge` blocks installing a package version published less than 3 days ago, with `@cyanheads/mcp-ts-core` excluded for same-day framework adoption.
15
+ - `.env.example` documents `MCP_LOG_RATE_LIMIT_THRESHOLD` / `MCP_LOG_RATE_LIMIT_WINDOW_MS`, the framework's per-level log rate limiting.
16
+
17
+ ## Changed
18
+
19
+ - **`astronomy_find_events`** — body-relative event descriptions and the `body` field's `.describe()` now name exactly which bodies each event class accepts (superior planets for `opposition`, any planet for `conjunction`, mercury/venus for `max_elongation`, moon/earth/planet for `perigee_apogee`), and clarify that `latitude`/`longitude` apply only to `solar_eclipse`.
20
+ - **`horizons-service` / `satellite-service`** — read the canonical `status`/`body` error-data fields `@cyanheads/mcp-ts-core` 0.11.0 adds alongside the existing `statusCode`/`responseBody` aliases, so the upstream-leak guard covers both. The satellite service's CelesTrak fetch passes `expectedStatuses: [404]` so an uncatalogued object logs at debug instead of error. Both services now map a fetch-deadline `Timeout` to their own typed unavailable contract instead of bubbling the framework's code.
21
+ - Dockerfile pins `oven/bun:1.3.14` in both stages (was floating `1.3`/`1.3-slim`), adds BuildKit cache mounts for `bun install`, and passes `--ignore-scripts` on the build-stage install and the conditional OpenTelemetry `bun add`.
22
+ - `.gitignore` anchors `data/` to the repo root (`/data/`) instead of matching any nested `data/` directory.
23
+ - `scripts/clean-mcpb.ts` / `scripts/lint-packaging.ts` strip and verify a second bundle-entry class — platform-specific native bindings (`@duckdb/node-bindings-*`) — alongside the existing dependency-shipped agent docs, so a `.mcpb` build no longer locks to the platform it was packed on.
24
+ - `package.json` `author` field: `cyanheads <casey@caseyjhand.com> (...)` → `Casey Hand <casey@caseyjhand.com> (https://caseyjhand.com)`.
25
+
26
+ ## Fixed
27
+
28
+ - **`astronomy_find_events`** — `opposition` and `conjunction` returned each other's time for every planet: the relative longitude passed to astronomy-engine's `SearchRelativeLongitude` was inverted (0 is opposition for a superior planet, 180 is conjunction — not the reverse). `opposition` now also rejects mercury and venus, which never reach it. ([#7](https://github.com/cyanheads/astronomy-mcp-server/issues/7))
29
+ - **`astronomy_get_moon_phase`** — `age_days` over-reported by ~29.53 days for roughly the first 1.5 days after a new moon: the backward-search window could return the new moon *before* the most recent one. `moonAgeDays` now searches a full synodic month forward from the look-back point and takes the later of the (at most two) new moons found that is still at or before the query time. ([#8](https://github.com/cyanheads/astronomy-mcp-server/issues/8))
30
+ - **`astronomy_find_events`** — an unsupported body for a body-relative event (e.g. `opposition`/`sun`, `perigee_apogee`/`sun`) threw astronomy-engine's raw internal error (JSON-RPC `-32603`, no recovery hint) instead of a validation error. Every body-relative event class (`opposition`, `conjunction`, `max_elongation`, `perigee_apogee`) now validates its body against the set that class is actually defined for before calling the engine, throwing `body_not_supported` with a hint naming the valid alternatives. ([#9](https://github.com/cyanheads/astronomy-mcp-server/issues/9))
31
+ - **`astronomy_find_events`** — the tool description claimed both solar and lunar eclipses take an observer and report local visibility; only solar eclipses do — lunar eclipses are geocentric and return no `local_visible`. Description and output field docs now match the implemented contract. ([#15](https://github.com/cyanheads/astronomy-mcp-server/issues/15))
32
+
33
+ ## Dependencies
34
+
35
+ - `@cyanheads/mcp-ts-core` `^0.10.9` → `^0.11.0`
36
+ - `satellite.js` `^7.0.1` → `^7.1.0`
37
+ - `typescript` (dev) `^6.0.3` → `^7.0.2`
38
+ - `@biomejs/biome` (dev) `2.5.1` → `2.5.5`
39
+ - `@types/node` (dev) `^26.0.1` → `^26.1.2`
40
+ - `ignore` (dev) `^7.0.5` → `^7.0.6`
41
+ - `tsc-alias` (dev) `^1.8.17` → `^1.9.1`
42
+ - `vitest` (dev) `^4.1.8` → `^4.1.10`
43
+ - `@socketsecurity/bun-security-scanner` (dev) added `^1.1.2`
44
+ - `packageManager` `bun@1.3.2` → `bun@1.3.14`
@@ -15,9 +15,11 @@ summary: ""
15
15
  # usage. Flagged as `Breaking` in the rollup.
16
16
  breaking: false
17
17
 
18
- # Set `true` if this release contains any security fix. Pairs with the
19
- # `## Security` section below. Flagged as `Security` in the rollup so
20
- # users can triage upgrade urgency at a glance.
18
+ # Set `true` ONLY for a security fix in THIS project's own source code — a
19
+ # vulnerability or hardening in code you ship. A dependency or transitive CVE
20
+ # bump is routine maintenance, NOT a security release: record it under
21
+ # `## Dependencies` (with the advisory ID) and leave this `false`. When true,
22
+ # pairs with the `## Security` section below and flags `Security` in the rollup.
21
23
  security: false
22
24
 
23
25
  # Optional free-form notes for maintenance agents processing this release.
@@ -13,10 +13,10 @@ export declare const bodyResource: import("@cyanheads/mcp-ts-core").ResourceDefi
13
13
  body: z.ZodString;
14
14
  name: z.ZodString;
15
15
  type: z.ZodEnum<{
16
+ dwarf: "dwarf";
16
17
  moon: "moon";
17
- star: "star";
18
18
  planet: "planet";
19
- dwarf: "dwarf";
19
+ star: "star";
20
20
  }>;
21
21
  mean_radius_km: z.ZodNumber;
22
22
  naked_eye: z.ZodBoolean;