@openephemeris/mcp-server 3.13.3 → 3.13.4

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.
@@ -114,7 +114,7 @@ function buildHdModelPayload(data, birthParams) {
114
114
  const authority = String(data.authority ?? data.inner_authority ?? "");
115
115
  const definition = String(data.definition ?? data.definition_type ?? "");
116
116
  const incarnation_cross = String(data.incarnation_cross ?? data.cross ?? "");
117
- // Normalize centers — API may return array or keyed object
117
+ // Normalize centers API may return array or keyed object
118
118
  let centers = [];
119
119
  const rawCenters = data.centers;
120
120
  if (Array.isArray(rawCenters)) {
@@ -143,8 +143,16 @@ function buildHdModelPayload(data, birthParams) {
143
143
  return 1;
144
144
  return a.name.localeCompare(b.name);
145
145
  });
146
- // Compact active gate list — just gate numbers, no planets
147
- const rawGates = data.active_gates ?? data.gates ?? data.defined_gates ?? [];
146
+ // Active gates from activations array (deduplicated gate numbers across all planets)
147
+ // API returns activations at top level and nested under personality/design
148
+ const allActivations = [
149
+ ...(data.activations ?? []),
150
+ ...(data.personality?.activations ?? []),
151
+ ...(data.design?.activations ?? []),
152
+ ];
153
+ const rawGates = allActivations.length > 0
154
+ ? allActivations
155
+ : (data.active_gates ?? data.gates ?? data.defined_gates ?? []);
148
156
  let active_gates = [];
149
157
  if (Array.isArray(rawGates)) {
150
158
  active_gates = rawGates
@@ -156,8 +164,8 @@ function buildHdModelPayload(data, birthParams) {
156
164
  .filter((n, i, arr) => arr.indexOf(n) === i) // unique
157
165
  .sort((a, b) => a - b);
158
166
  }
159
- // Active channels as "gate1-gate2" strings
160
- const rawChannels = data.active_channels ?? data.channels ?? data.defined_channels ?? [];
167
+ // Active channels API returns objects with .id ("11-56"), .gates[], or .gate1/.gate2
168
+ const rawChannels = (data.channels ?? data.active_channels ?? data.defined_channels ?? []);
161
169
  let active_channels = [];
162
170
  if (Array.isArray(rawChannels)) {
163
171
  active_channels = rawChannels.map((ch) => {
@@ -263,8 +271,10 @@ registerTool({
263
271
  const chartData = await client.request("POST", "/human-design/chart", {
264
272
  data: body,
265
273
  });
266
- // Build payload once \u2014 summary and model data both derive from the same object
267
- const modelPayload = buildHdModelPayload(chartData, {
274
+ // API returns { chart: {...}, metadata: {...} } unwrap the inner chart object
275
+ const chart = chartData.chart ?? chartData;
276
+ // Build payload once — summary and model data both derive from the same object
277
+ const modelPayload = buildHdModelPayload(chart, {
268
278
  datetime,
269
279
  location: args.location ?? null,
270
280
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openephemeris/mcp-server",
3
- "version": "3.13.3",
3
+ "version": "3.13.4",
4
4
  "description": "Model Context Protocol server for the Open Ephemeris astronomical computation API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",