@mastra/mcp 1.5.1-alpha.1 → 1.5.2
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/CHANGELOG.md +20 -0
- package/dist/client/configuration.d.ts.map +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +6 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -8
- package/dist/index.js.map +1 -1
- package/package.json +12 -13
package/dist/index.js
CHANGED
|
@@ -8,10 +8,9 @@ import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/
|
|
|
8
8
|
import { DEFAULT_REQUEST_TIMEOUT_MSEC } from '@modelcontextprotocol/sdk/shared/protocol.js';
|
|
9
9
|
import { LoggingMessageNotificationSchema, ListRootsRequestSchema, ListResourcesResultSchema, ReadResourceResultSchema, EmptyResultSchema, ListResourceTemplatesResultSchema, ListPromptsResultSchema, GetPromptResultSchema, PromptListChangedNotificationSchema, ResourceUpdatedNotificationSchema, ResourceListChangedNotificationSchema, ElicitRequestSchema, ProgressNotificationSchema, ListToolsRequestSchema, CallToolRequestSchema, SetLevelRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, ListResourceTemplatesRequestSchema, SubscribeRequestSchema, UnsubscribeRequestSchema, ListPromptsRequestSchema, PromptSchema, GetPromptRequestSchema, CallToolResultSchema, ErrorCode, JSONRPCMessageSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
10
10
|
import { asyncExitHook, gracefulExit } from 'exit-hook';
|
|
11
|
+
import { createHash, randomUUID } from 'crypto';
|
|
11
12
|
import { MastraError, ErrorCategory, ErrorDomain } from '@mastra/core/error';
|
|
12
13
|
import equal from 'fast-deep-equal';
|
|
13
|
-
import { v5 } from 'uuid';
|
|
14
|
-
import { randomUUID } from 'crypto';
|
|
15
14
|
import { MCPServerBase } from '@mastra/core/mcp';
|
|
16
15
|
import { RequestContext } from '@mastra/core/request-context';
|
|
17
16
|
import { isStandardSchemaWithJSON, standardSchemaToJSONSchema } from '@mastra/core/schema';
|
|
@@ -1589,8 +1588,7 @@ To fix this you have three different options:
|
|
|
1589
1588
|
}
|
|
1590
1589
|
makeId() {
|
|
1591
1590
|
const text = JSON.stringify(this.serverConfigs).normalize("NFKC");
|
|
1592
|
-
|
|
1593
|
-
return v5(text, idNamespace);
|
|
1591
|
+
return createHash("sha256").update("MCPClient").update(text).digest("hex");
|
|
1594
1592
|
}
|
|
1595
1593
|
/**
|
|
1596
1594
|
* Disconnects from all MCP servers and cleans up resources.
|
|
@@ -2063,7 +2061,7 @@ function createSimpleTokenProvider(accessToken, options) {
|
|
|
2063
2061
|
});
|
|
2064
2062
|
}
|
|
2065
2063
|
|
|
2066
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
2064
|
+
// ../../node_modules/.pnpm/hono@4.12.14/node_modules/hono/dist/utils/stream.js
|
|
2067
2065
|
var StreamingApi = class {
|
|
2068
2066
|
writer;
|
|
2069
2067
|
encoder;
|
|
@@ -2140,7 +2138,7 @@ var StreamingApi = class {
|
|
|
2140
2138
|
}
|
|
2141
2139
|
};
|
|
2142
2140
|
|
|
2143
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
2141
|
+
// ../../node_modules/.pnpm/hono@4.12.14/node_modules/hono/dist/helper/streaming/utils.js
|
|
2144
2142
|
var isOldBunVersion = () => {
|
|
2145
2143
|
const version = typeof Bun !== "undefined" ? Bun.version : void 0;
|
|
2146
2144
|
if (version === void 0) {
|
|
@@ -2151,7 +2149,7 @@ var isOldBunVersion = () => {
|
|
|
2151
2149
|
return result;
|
|
2152
2150
|
};
|
|
2153
2151
|
|
|
2154
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
2152
|
+
// ../../node_modules/.pnpm/hono@4.12.14/node_modules/hono/dist/utils/html.js
|
|
2155
2153
|
var HtmlEscapedCallbackPhase = {
|
|
2156
2154
|
Stringify: 1};
|
|
2157
2155
|
var resolveCallback = async (str, phase, preserveCallbacks, context, buffer) => {
|
|
@@ -2182,7 +2180,7 @@ var resolveCallback = async (str, phase, preserveCallbacks, context, buffer) =>
|
|
|
2182
2180
|
}
|
|
2183
2181
|
};
|
|
2184
2182
|
|
|
2185
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
2183
|
+
// ../../node_modules/.pnpm/hono@4.12.14/node_modules/hono/dist/helper/streaming/sse.js
|
|
2186
2184
|
var SSEStreamingApi = class extends StreamingApi {
|
|
2187
2185
|
constructor(writable, readable) {
|
|
2188
2186
|
super(writable, readable);
|