@openephemeris/mcp-server 4.15.1 → 4.17.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 (43) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +26 -27
  3. package/config/dev-allowlist.json +31 -19
  4. package/dist/backend/client.d.ts +2 -0
  5. package/dist/backend/client.js +15 -10
  6. package/dist/instructions.d.ts +1 -1
  7. package/dist/instructions.js +5 -3
  8. package/dist/prompts.js +2 -2
  9. package/dist/tools/apps/bazi-app.js +10 -10
  10. package/dist/tools/apps/bi-wheel-app.js +14 -14
  11. package/dist/tools/apps/bodygraph-app.js +35 -29
  12. package/dist/tools/apps/chart-wheel-app.js +12 -9
  13. package/dist/tools/apps/location-tools.js +17 -4
  14. package/dist/tools/apps/moon-phase-app.js +12 -11
  15. package/dist/tools/apps/transit-timeline-app.d.ts +3 -0
  16. package/dist/tools/apps/transit-timeline-app.js +86 -18
  17. package/dist/tools/apps/vedic-chart-app.js +9 -8
  18. package/dist/tools/auth.js +14 -12
  19. package/dist/tools/dev.js +17 -29
  20. package/dist/tools/invocation-status.d.ts +25 -0
  21. package/dist/tools/invocation-status.js +69 -0
  22. package/dist/tools/specialized/account.js +6 -10
  23. package/dist/tools/specialized/acg.js +16 -21
  24. package/dist/tools/specialized/bazi.js +7 -12
  25. package/dist/tools/specialized/eclipse.js +6 -13
  26. package/dist/tools/specialized/electional.js +30 -37
  27. package/dist/tools/specialized/ephemeris_core.js +21 -17
  28. package/dist/tools/specialized/ephemeris_extended.js +22 -19
  29. package/dist/tools/specialized/human_design.js +11 -14
  30. package/dist/tools/specialized/moon.js +15 -26
  31. package/dist/tools/specialized/natal.js +9 -8
  32. package/dist/tools/specialized/progressed.js +6 -6
  33. package/dist/tools/specialized/relocation.js +6 -7
  34. package/dist/tools/specialized/returns.js +6 -8
  35. package/dist/tools/specialized/synastry.js +7 -8
  36. package/dist/tools/specialized/transits.js +15 -14
  37. package/dist/tools/specialized/vedic.js +7 -6
  38. package/dist/tools/ui-meta.d.ts +3 -28
  39. package/dist/tools/ui-meta.js +25 -16
  40. package/dist/ui/bi-wheel.html +468 -450
  41. package/dist/ui/chart-wheel.html +407 -389
  42. package/dist/ui/transit-timeline.html +2 -2
  43. package/package.json +3 -2
@@ -4,20 +4,21 @@ import { OUTPUT_SCHEMA_JSON } from "../output-schemas.js";
4
4
  import { DATETIME_DESC, WINDOW_DATE_DESC, timezoneProperty } from "../datetime.js";
5
5
  registerTool({
6
6
  name: "ephemeris_transits",
7
- description: "Search for astrological transit events affecting a natal chart over a date range. " +
8
- "Returns exact transit moments — when transiting planets form specified aspects " +
9
- "to natal planet positions.\n\n" +
10
- "EFFICIENCY TIP: Always specify both transiting_planets and natal_points to keep " +
11
- "compute fast. Omitting both sends all outer planets against all core natal positions " +
12
- "— a much heavier computation.\n\n" +
13
- "ASPECT ANGLES: Use aspect_angle to search for specific aspects:\n" +
14
- " 0 = conjunction/return (default), 180 = opposition, 90 = square, 120 = trine.\n" +
15
- " Example: Saturn Return → transiting_planets=['saturn'], natal_points=['saturn'], aspect_angle=0\n" +
16
- " Example: Uranus Opposition → transiting_planets=['uranus'], natal_points=['uranus'], aspect_angle=180\n" +
17
- " Example: Outer planets to natal Sun/Moon → transiting_planets=['saturn','uranus','neptune','pluto'], natal_points=['sun','moon']\n\n" +
18
- "DEFAULT natal_points (when omitted): sun, moon, mercury, venus, mars, jupiter, saturn.\n" +
19
- "SEARCH RANGE LIMITS: Explorer/PayG tier → 1 year max; Pro → 5 years; Startup → 10 years.\n" +
20
- "CREDIT COST: 5 credits per call.",
7
+ description: "Use this when the user asks 'when is my Saturn return', 'when does Pluto square my Sun', 'when " +
8
+ "will Jupiter conjunct my Moon', 'what transits do I have next year' — any " +
9
+ "WHEN-does-a-transit-hit question, as data. Returns the exact moments transiting planets form the " +
10
+ "requested aspect to natal points over a date range.\n\n" +
11
+ "ASPECT ANGLES (aspect_angle): 0 = conjunction/return (default), 180 = opposition, 90 = square, " +
12
+ "120 = trine. Saturn return → transiting_planets=['saturn'], natal_points=['saturn'], " +
13
+ "aspect_angle=0.\n" +
14
+ "EFFICIENCY: always pass transiting_planets and natal_points — omitting both sweeps all outer " +
15
+ "planets against all core points and is slow. DEFAULT natal_points: sun, moon, mercury, venus, " +
16
+ "mars, jupiter, saturn.\n" +
17
+ "SEARCH RANGE LIMITS: Explorer/PayG → 1 year; Pro → 5 years; Startup → 10 years.\n" +
18
+ "CREDIT COST: 6 credits per call (natal chart + search).\n\n" +
19
+ "Do not use when the user should SEE a forecast — use explore_transit_timeline; for the sky today " +
20
+ "with no birth data use electional_moment_analysis; for retrograde dates use " +
21
+ "electional_station_tracker.",
21
22
  inputSchema: {
22
23
  type: "object",
23
24
  properties: {
@@ -5,13 +5,14 @@ import { DATETIME_DESC, TIMEZONE_PROPERTY } from "../datetime.js";
5
5
  import { localToUtcIsoHistorical } from "../datetime-historical.js";
6
6
  registerTool({
7
7
  name: "vedic_chart",
8
- description: "Calculate a Vedic (Jyotish) natal chart with sidereal positions. Returns planet placements " +
9
- "in rashis (sidereal signs), nakshatras with pada, navamsa placements, and bhavas (houses). " +
10
- "Uses Whole Sign houses, sidereal zodiac with configurable ayanamsa.\n\n" +
11
- "CREDIT COST: 1 credit per call.\n\n" +
8
+ description: "Use this when the Vedic / Jyotish chart is wanted as data — 'my sidereal placements as JSON', " +
9
+ "'nakshatra and pada for every planet as a table', 'my navamsa positions'. Takes coordinates, not " +
10
+ "a place name. Returns sidereal planet placements in rashis, nakshatras with pada, navamsa " +
11
+ "placements and bhavas (Whole Sign houses).\n\n" +
12
12
  "SUPPORTED AYANAMSA: lahiri (default), fagan_bradley, krishnamurti, raman, yukteshwar\n\n" +
13
- "EXAMPLE: Vedic chart for someone born Jan 15, 1990 at 8:30 AM UTC in Mumbai:\n" +
14
- " datetime='1990-01-15T08:30:00Z', latitude=19.076, longitude=72.8777",
13
+ "CREDIT COST: 1 credit per call.\n\n" +
14
+ "Do not use for 'what's my nakshatra / rashi / lagna' or when the user should SEE the chart — use " +
15
+ "explore_vedic_chart; for a Western tropical chart use ephemeris_natal_chart.",
15
16
  inputSchema: {
16
17
  type: "object",
17
18
  properties: {
@@ -1,30 +1,5 @@
1
- /**
2
- * src/tools/ui-meta.ts — the `_meta` block a tool carries when it renders an MCP App.
3
- *
4
- * One builder, used by both transports (stdio `src/index.ts`, remote
5
- * `src/server-sse.ts`), because the two had drifted into copy-paste twins of the
6
- * same object literal and only one of them would ever get updated.
7
- *
8
- * Three wire forms, all describing the same `ui://` resource:
9
- *
10
- * 1. `_meta.ui.{resourceUri,visibility}` — the canonical MCP Apps form
11
- * (SEP-1865, first official MCP extension 2026-01-26, folded into the
12
- * 2026-07-28 spec). This is what the spec says hosts read.
13
- * 2. `_meta["ui/resourceUri"]` — the deprecated flat alias. The spec says it
14
- * "will be removed before general availability"; kept only for pre-GA
15
- * hosts still on the older shape. Drop it once those are gone.
16
- * 3. `_meta["openai/*"]` — ChatGPT's compatibility aliases. OpenAI co-authored
17
- * SEP-1865 and its own reference documents `openai/outputTemplate` as an
18
- * "optional/compatibility alias for `_meta.ui.resourceUri`", so a fully
19
- * converged ChatGPT host needs nothing here. Emitting it anyway is a few
20
- * bytes and removes the question of which side converged first.
21
- *
22
- * `openai/widgetAccessible` marks a tool the widget itself may invoke. That is
23
- * exactly what `visibility` already encodes: a tool visible to "app" is one the
24
- * iframe calls (the `*_recalculate` and `*_on_*_click` handlers), so the flag is
25
- * derived rather than hand-maintained on 92 tools.
26
- */
27
1
  export interface UiMetaSource {
2
+ name?: string;
28
3
  _meta?: {
29
4
  ui?: {
30
5
  resourceUri?: string;
@@ -33,7 +8,7 @@ export interface UiMetaSource {
33
8
  };
34
9
  }
35
10
  /**
36
- * Build the `_meta` wrapper for a tool, or `{}` when the tool renders no UI.
37
- * Spread the result into the tools/list entry.
11
+ * Build the `_meta` wrapper for a tool, or `{}` when the tool renders no UI
12
+ * and has no invocation status. Spread the result into the tools/list entry.
38
13
  */
39
14
  export declare function buildUiMeta(tool: UiMetaSource): Record<string, unknown>;
@@ -23,26 +23,35 @@
23
23
  * exactly what `visibility` already encodes: a tool visible to "app" is one the
24
24
  * iframe calls (the `*_recalculate` and `*_on_*_click` handlers), so the flag is
25
25
  * derived rather than hand-maintained on 92 tools.
26
+ *
27
+ * The same block also carries ChatGPT's invocation status text
28
+ * (`openai/toolInvocation/invoking` / `invoked`, from invocation-status.ts)
29
+ * for any tool that has an entry there, UI or not — so a tool without a
30
+ * widget still gets a sentence instead of the host's generic spinner.
26
31
  */
32
+ import { INVOCATION_STATUS } from "./invocation-status.js";
27
33
  const DEFAULT_VISIBILITY = ["model", "app"];
28
34
  /**
29
- * Build the `_meta` wrapper for a tool, or `{}` when the tool renders no UI.
30
- * Spread the result into the tools/list entry.
35
+ * Build the `_meta` wrapper for a tool, or `{}` when the tool renders no UI
36
+ * and has no invocation status. Spread the result into the tools/list entry.
31
37
  */
32
38
  export function buildUiMeta(tool) {
39
+ const meta = {};
33
40
  const resourceUri = tool._meta?.ui?.resourceUri;
34
- if (!resourceUri)
35
- return {};
36
- const visibility = tool._meta?.ui?.visibility ?? DEFAULT_VISIBILITY;
37
- return {
38
- _meta: {
39
- // Deprecated flat form — pre-GA hosts only.
40
- "ui/resourceUri": resourceUri,
41
- // Canonical MCP Apps form.
42
- ui: { resourceUri, visibility },
43
- // ChatGPT compatibility aliases.
44
- "openai/outputTemplate": resourceUri,
45
- "openai/widgetAccessible": visibility.includes("app"),
46
- },
47
- };
41
+ if (resourceUri) {
42
+ const visibility = tool._meta?.ui?.visibility ?? DEFAULT_VISIBILITY;
43
+ // Deprecated flat form — pre-GA hosts only.
44
+ meta["ui/resourceUri"] = resourceUri;
45
+ // Canonical MCP Apps form.
46
+ meta.ui = { resourceUri, visibility };
47
+ // ChatGPT compatibility aliases.
48
+ meta["openai/outputTemplate"] = resourceUri;
49
+ meta["openai/widgetAccessible"] = visibility.includes("app");
50
+ }
51
+ const status = tool.name ? INVOCATION_STATUS[tool.name] : undefined;
52
+ if (status) {
53
+ meta["openai/toolInvocation/invoking"] = status.invoking;
54
+ meta["openai/toolInvocation/invoked"] = status.invoked;
55
+ }
56
+ return Object.keys(meta).length ? { _meta: meta } : {};
48
57
  }