@openephemeris/mcp-server 3.13.2 → 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
|
|
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
|
-
//
|
|
147
|
-
|
|
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
|
|
160
|
-
const rawChannels = data.
|
|
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
|
-
//
|
|
267
|
-
const
|
|
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
|
});
|
|
@@ -280,6 +290,7 @@ registerTool({
|
|
|
280
290
|
resource: {
|
|
281
291
|
uri: BODYGRAPH_RESOURCE_URI,
|
|
282
292
|
mimeType: BODYGRAPH_MIME_TYPE,
|
|
293
|
+
text: getBodygraphBundle(),
|
|
283
294
|
},
|
|
284
295
|
},
|
|
285
296
|
],
|