@mastra/mcp 2.9.0-alpha.4 → 2.9.0-alpha.5
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.
- package/dist/docs/SKILL.md +2 -1
- package/dist/docs/assets/SOURCE_MAP.json +38 -38
- package/dist/docs/references/docs-connections-mcp.md +2 -65
- package/dist/docs/references/docs-server-mcp.md +315 -0
- package/dist/index.cjs +11 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -8
- package/dist/index.js.map +1 -1
- package/dist/server/server.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -8753,7 +8753,7 @@ function toStandardSchema$2(zodSchema) {
|
|
|
8753
8753
|
});
|
|
8754
8754
|
return wrapper;
|
|
8755
8755
|
}
|
|
8756
|
-
// ../schema-compat/dist/schema-
|
|
8756
|
+
// ../schema-compat/dist/schema-TQPB_dl2.js
|
|
8757
8757
|
/**
|
|
8758
8758
|
* Supported JSON Schema targets for z.toJSONSchema().
|
|
8759
8759
|
* Works with both real Zod v4 and Zod 3.25's v4 compat layer.
|
|
@@ -8779,10 +8779,13 @@ const ZOD_V4_TARGET_MAP = {
|
|
|
8779
8779
|
*
|
|
8780
8780
|
* @internal
|
|
8781
8781
|
*/
|
|
8782
|
-
function convertToJsonSchema(zodSchema, options, adapterOptions) {
|
|
8782
|
+
function convertToJsonSchema(zodSchema, options, adapterOptions, io) {
|
|
8783
8783
|
patchRecordSchemas(zodSchema);
|
|
8784
8784
|
const target = SUPPORTED_TARGETS.has(options.target) ? options.target : "draft-07";
|
|
8785
|
-
const jsonSchemaOptions = {
|
|
8785
|
+
const jsonSchemaOptions = {
|
|
8786
|
+
target: ZOD_V4_TARGET_MAP[target] ?? target,
|
|
8787
|
+
io
|
|
8788
|
+
};
|
|
8786
8789
|
if (adapterOptions.unrepresentable) jsonSchemaOptions.unrepresentable = adapterOptions.unrepresentable;
|
|
8787
8790
|
if (adapterOptions.override) jsonSchemaOptions.override = adapterOptions.override;
|
|
8788
8791
|
return toJSONSchema(zodSchema, jsonSchemaOptions);
|
|
@@ -8804,10 +8807,10 @@ function toStandardSchema$1(zodSchema, adapterOptions = {}) {
|
|
|
8804
8807
|
const existingStandard = zodSchema["~standard"];
|
|
8805
8808
|
const jsonSchemaConverter = {
|
|
8806
8809
|
input: (options) => {
|
|
8807
|
-
return convertToJsonSchema(zodSchema, options, adapterOptions);
|
|
8810
|
+
return convertToJsonSchema(zodSchema, options, adapterOptions, "input");
|
|
8808
8811
|
},
|
|
8809
8812
|
output: (options) => {
|
|
8810
|
-
return convertToJsonSchema(zodSchema, options, adapterOptions);
|
|
8813
|
+
return convertToJsonSchema(zodSchema, options, adapterOptions, "output");
|
|
8811
8814
|
}
|
|
8812
8815
|
};
|
|
8813
8816
|
Object.defineProperty(wrapper, "~standard", {
|
|
@@ -23888,7 +23891,7 @@ var MCPServer = class extends MCPServerBase {
|
|
|
23888
23891
|
eventsCapability() {
|
|
23889
23892
|
return {};
|
|
23890
23893
|
}
|
|
23891
|
-
createServerInstance() {
|
|
23894
|
+
createServerInstance(era = "modern") {
|
|
23892
23895
|
const server = new Server({
|
|
23893
23896
|
name: this.name,
|
|
23894
23897
|
version: this.version,
|
|
@@ -23903,7 +23906,7 @@ var MCPServer = class extends MCPServerBase {
|
|
|
23903
23906
|
cacheHints: this.cacheHints,
|
|
23904
23907
|
requestState: { verify: this.requestStateCodec.verify }
|
|
23905
23908
|
});
|
|
23906
|
-
server.removeRequestHandler("logging/setLevel");
|
|
23909
|
+
if (era === "modern") server.removeRequestHandler("logging/setLevel");
|
|
23907
23910
|
this.registerToolHandlers(server);
|
|
23908
23911
|
this.registerResourceHandlers(server);
|
|
23909
23912
|
this.registerPromptHandlers(server);
|
|
@@ -25070,7 +25073,7 @@ var MCPServer = class extends MCPServerBase {
|
|
|
25070
25073
|
}
|
|
25071
25074
|
getNodeHandler() {
|
|
25072
25075
|
if (!this.nodeHandler) {
|
|
25073
|
-
this.httpHandler = createMcpHandler(() => this.createServerInstance(), {
|
|
25076
|
+
this.httpHandler = createMcpHandler(({ era }) => this.createServerInstance(era), {
|
|
25074
25077
|
legacy: this.legacy,
|
|
25075
25078
|
onerror: (error) => this.logger.error("MCP handler error", { error: error.toString() })
|
|
25076
25079
|
});
|