@mcp-ts/sdk 1.0.0 → 1.0.1
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/README.md +3 -3
- package/dist/adapters/agui-adapter.d.mts +19 -42
- package/dist/adapters/agui-adapter.d.ts +19 -42
- package/dist/adapters/agui-adapter.js +69 -69
- package/dist/adapters/agui-adapter.js.map +1 -1
- package/dist/adapters/agui-adapter.mjs +69 -70
- package/dist/adapters/agui-adapter.mjs.map +1 -1
- package/dist/adapters/agui-middleware.d.mts +24 -136
- package/dist/adapters/agui-middleware.d.ts +24 -136
- package/dist/adapters/agui-middleware.js +275 -350
- package/dist/adapters/agui-middleware.js.map +1 -1
- package/dist/adapters/agui-middleware.mjs +275 -350
- package/dist/adapters/agui-middleware.mjs.map +1 -1
- package/dist/client/index.d.mts +2 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/client/react.d.mts +2 -2
- package/dist/client/react.d.ts +2 -2
- package/dist/client/vue.d.mts +2 -2
- package/dist/client/vue.d.ts +2 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/server/index.d.mts +3 -3
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +2 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +2 -1
- package/dist/server/index.mjs.map +1 -1
- package/dist/shared/index.d.mts +1 -1
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/index.mjs.map +1 -1
- package/dist/{types-SbDlA2VX.d.mts → types-CLccx9wW.d.mts} +1 -1
- package/dist/{types-SbDlA2VX.d.ts → types-CLccx9wW.d.ts} +1 -1
- package/package.json +2 -2
- package/src/adapters/agui-adapter.ts +98 -109
- package/src/adapters/agui-middleware.ts +424 -512
- package/src/server/handlers/sse-handler.ts +4 -1
- package/src/server/storage/types.ts +1 -1
- package/src/shared/types.ts +1 -1
package/dist/server/index.d.mts
CHANGED
|
@@ -4,8 +4,8 @@ import { OAuthClientInformationMixed, OAuthTokens } from '@modelcontextprotocol/
|
|
|
4
4
|
export { OAuthClientInformation, OAuthClientInformationFull, OAuthClientMetadata, OAuthTokens } from '@modelcontextprotocol/sdk/shared/auth.js';
|
|
5
5
|
import { M as McpConnectionEvent, d as McpObservabilityEvent } from '../events-BP6WyRNh.mjs';
|
|
6
6
|
export { D as Disposable, E as Emitter, b as Event, c as McpConnectionState } from '../events-BP6WyRNh.mjs';
|
|
7
|
-
import { q as McpRpcResponse, p as McpRpcRequest } from '../types-
|
|
8
|
-
export { a as CallToolRequest, b as CallToolResponse, f as ConnectRequest, g as ConnectResponse, m as ListToolsResponse, T as ToolInfo } from '../types-
|
|
7
|
+
import { q as McpRpcResponse, p as McpRpcRequest } from '../types-CLccx9wW.mjs';
|
|
8
|
+
export { a as CallToolRequest, b as CallToolResponse, f as ConnectRequest, g as ConnectResponse, m as ListToolsResponse, T as ToolInfo } from '../types-CLccx9wW.mjs';
|
|
9
9
|
export { CallToolResult, ListToolsResult, Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
10
10
|
import '@modelcontextprotocol/sdk/client/auth.js';
|
|
11
11
|
|
|
@@ -17,7 +17,7 @@ interface SessionData {
|
|
|
17
17
|
transportType: 'sse' | 'streamable_http';
|
|
18
18
|
callbackUrl: string;
|
|
19
19
|
createdAt: number;
|
|
20
|
-
identity
|
|
20
|
+
identity: string;
|
|
21
21
|
headers?: Record<string, string>;
|
|
22
22
|
clientInformation?: OAuthClientInformationMixed;
|
|
23
23
|
tokens?: OAuthTokens;
|
package/dist/server/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { OAuthClientInformationMixed, OAuthTokens } from '@modelcontextprotocol/
|
|
|
4
4
|
export { OAuthClientInformation, OAuthClientInformationFull, OAuthClientMetadata, OAuthTokens } from '@modelcontextprotocol/sdk/shared/auth.js';
|
|
5
5
|
import { M as McpConnectionEvent, d as McpObservabilityEvent } from '../events-BP6WyRNh.js';
|
|
6
6
|
export { D as Disposable, E as Emitter, b as Event, c as McpConnectionState } from '../events-BP6WyRNh.js';
|
|
7
|
-
import { q as McpRpcResponse, p as McpRpcRequest } from '../types-
|
|
8
|
-
export { a as CallToolRequest, b as CallToolResponse, f as ConnectRequest, g as ConnectResponse, m as ListToolsResponse, T as ToolInfo } from '../types-
|
|
7
|
+
import { q as McpRpcResponse, p as McpRpcRequest } from '../types-CLccx9wW.js';
|
|
8
|
+
export { a as CallToolRequest, b as CallToolResponse, f as ConnectRequest, g as ConnectResponse, m as ListToolsResponse, T as ToolInfo } from '../types-CLccx9wW.js';
|
|
9
9
|
export { CallToolResult, ListToolsResult, Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
10
10
|
import '@modelcontextprotocol/sdk/client/auth.js';
|
|
11
11
|
|
|
@@ -17,7 +17,7 @@ interface SessionData {
|
|
|
17
17
|
transportType: 'sse' | 'streamable_http';
|
|
18
18
|
callbackUrl: string;
|
|
19
19
|
createdAt: number;
|
|
20
|
-
identity
|
|
20
|
+
identity: string;
|
|
21
21
|
headers?: Record<string, string>;
|
|
22
22
|
clientInformation?: OAuthClientInformationMixed;
|
|
23
23
|
tokens?: OAuthTokens;
|
package/dist/server/index.js
CHANGED
|
@@ -1947,7 +1947,8 @@ var SSEConnectionManager = class {
|
|
|
1947
1947
|
* Connect to an MCP server
|
|
1948
1948
|
*/
|
|
1949
1949
|
async connect(params) {
|
|
1950
|
-
const {
|
|
1950
|
+
const { serverName, serverUrl, callbackUrl, transportType } = params;
|
|
1951
|
+
const serverId = params.serverId || await storage.generateSessionId();
|
|
1951
1952
|
const existingSessions = await storage.getIdentitySessionsData(this.identity);
|
|
1952
1953
|
const duplicate = existingSessions.find(
|
|
1953
1954
|
(s) => s.serverId === serverId || s.serverUrl === serverUrl
|