catence 0.2.0-beta.24 → 0.2.0-beta.25
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.
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Keep these values synchronized with release/manifest.json; release checks
|
|
4
4
|
* deliberately reject drift before a package can be published.
|
|
5
5
|
*/
|
|
6
|
-
export declare const CATENCE_RUNTIME_VERSION = "0.2.0-beta.
|
|
6
|
+
export declare const CATENCE_RUNTIME_VERSION = "0.2.0-beta.25";
|
|
7
7
|
export declare const CATENCE_PROTOCOL_VERSION = 1;
|
|
8
8
|
export type CatenceRuntimeCapabilities = {
|
|
9
9
|
mcp: true;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Keep these values synchronized with release/manifest.json; release checks
|
|
4
4
|
* deliberately reject drift before a package can be published.
|
|
5
5
|
*/
|
|
6
|
-
export const CATENCE_RUNTIME_VERSION = '0.2.0-beta.
|
|
6
|
+
export const CATENCE_RUNTIME_VERSION = '0.2.0-beta.25';
|
|
7
7
|
export const CATENCE_PROTOCOL_VERSION = 1;
|
|
8
8
|
export function catenceRuntimeHealth() {
|
|
9
9
|
return {
|
|
@@ -163,10 +163,29 @@ export function createCatenceMcpServer(paths = resolveCatalogPaths(), dependenci
|
|
|
163
163
|
const originalRegister = server.registerTool.bind(server);
|
|
164
164
|
server.registerTool = (name, configuration, handler) => {
|
|
165
165
|
const originalInput = configuration.inputSchema;
|
|
166
|
+
let mergedInputSchema;
|
|
167
|
+
if (originalInput) {
|
|
168
|
+
const hasV4 = '_zod' in originalInput;
|
|
169
|
+
const hasV3 = '_def' in originalInput;
|
|
170
|
+
if (hasV4 || hasV3) {
|
|
171
|
+
// originalInput is already a Zod object schema; extract its shape and
|
|
172
|
+
// merge athleteId into a new object of the same Zod version.
|
|
173
|
+
const rawShape = originalInput.shape;
|
|
174
|
+
const shape = typeof rawShape === 'object' && rawShape !== null ? rawShape : {};
|
|
175
|
+
mergedInputSchema = z.object({ ...shape, athleteId: athleteIdSchema });
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
// originalInput is a raw shape (plain object of Zod schemas).
|
|
179
|
+
mergedInputSchema = { athleteId: athleteIdSchema, ...originalInput };
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
mergedInputSchema = { athleteId: athleteIdSchema };
|
|
184
|
+
}
|
|
166
185
|
return originalRegister(name, {
|
|
167
186
|
...configuration,
|
|
168
187
|
description: `${String(configuration.description ?? '')} Requires athleteId from list_athletes.`,
|
|
169
|
-
inputSchema:
|
|
188
|
+
inputSchema: mergedInputSchema,
|
|
170
189
|
}, handler);
|
|
171
190
|
};
|
|
172
191
|
}
|
package/package.json
CHANGED