@mcp-use/client 2.0.0-beta.16 → 2.0.0-beta.18
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/.tsbuildinfo +1 -1
- package/dist/auth/browser.d.ts +51 -2
- package/dist/auth/browser.d.ts.map +1 -1
- package/dist/auth/node.d.ts +99 -4
- package/dist/auth/node.d.ts.map +1 -1
- package/dist/auth/session-store.d.ts +6 -0
- package/dist/auth/session-store.d.ts.map +1 -1
- package/dist/code-mode/executor-e2b.d.ts.map +1 -1
- package/dist/core/base.d.ts +4 -8
- package/dist/core/base.d.ts.map +1 -1
- package/dist/core/browser.d.ts +14 -2
- package/dist/core/browser.d.ts.map +1 -1
- package/dist/core/config.d.ts +82 -20
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/node.d.ts +7 -10
- package/dist/core/node.d.ts.map +1 -1
- package/dist/core/session.d.ts +18 -4
- package/dist/core/session.d.ts.map +1 -1
- package/dist/index-browser.d.ts +1 -0
- package/dist/index-browser.d.ts.map +1 -1
- package/dist/index-browser.js +142 -21
- package/dist/index-browser.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +228 -37
- package/dist/index.js.map +1 -1
- package/dist/react/McpClientProvider.d.ts +22 -10
- package/dist/react/McpClientProvider.d.ts.map +1 -1
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +164 -21
- package/dist/react/index.js.map +1 -1
- package/dist/react/rpc-logger.d.ts +5 -0
- package/dist/react/rpc-logger.d.ts.map +1 -1
- package/dist/react/storage.d.ts +47 -0
- package/dist/react/storage.d.ts.map +1 -1
- package/dist/react/types.d.ts +107 -16
- package/dist/react/types.d.ts.map +1 -1
- package/dist/react/useMcp-operations.d.ts.map +1 -1
- package/dist/react/view/ViewRenderer.d.ts +7 -0
- package/dist/react/view/ViewRenderer.d.ts.map +1 -1
- package/dist/react/view/parse-custom-props.d.ts +8 -0
- package/dist/react/view/parse-custom-props.d.ts.map +1 -1
- package/dist/react/view/resolve-view-resource.d.ts +10 -0
- package/dist/react/view/resolve-view-resource.d.ts.map +1 -1
- package/dist/react/view/types.d.ts +89 -0
- package/dist/react/view/types.d.ts.map +1 -1
- package/dist/react/view/view-detection.d.ts +18 -0
- package/dist/react/view/view-detection.d.ts.map +1 -1
- package/dist/react/view/view-host-policy.d.ts +35 -0
- package/dist/react/view/view-host-policy.d.ts.map +1 -1
- package/dist/telemetry/telemetry.d.ts +5 -1
- package/dist/telemetry/telemetry.d.ts.map +1 -1
- package/dist/transport/base.d.ts +85 -13
- package/dist/transport/base.d.ts.map +1 -1
- package/dist/transport/connection-manager.d.ts +1 -1
- package/dist/transport/http.d.ts +51 -2
- package/dist/transport/http.d.ts.map +1 -1
- package/dist/transport/stdio.d.ts +29 -1
- package/dist/transport/stdio.d.ts.map +1 -1
- package/dist/utils/elicitation.d.ts +4 -2
- package/dist/utils/elicitation.d.ts.map +1 -1
- package/dist/utils/logging.d.ts +1 -0
- package/dist/utils/logging.d.ts.map +1 -1
- package/dist/utils/version.d.ts +6 -0
- package/dist/utils/version.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -3,110 +3,193 @@ import type { CreateMessageRequest, CreateMessageResult, CreateMessageResultWith
|
|
|
3
3
|
export type { McpUiDownloadFileRequest, McpUiDownloadFileResult, McpUiHostCapabilities, McpUiHostContext, McpUiResourceCsp, McpUiResourcePermissions, McpUiSupportedContentBlockModalities, };
|
|
4
4
|
import type { Transport } from "@modelcontextprotocol/client";
|
|
5
5
|
import type { ReactNode } from "react";
|
|
6
|
+
/** Display mode requested by an MCP App. */
|
|
6
7
|
export type ViewDisplayMode = "inline" | "pip" | "fullscreen";
|
|
8
|
+
/** Policy used to enforce an MCP App's declared content security policy. */
|
|
7
9
|
export type ViewCspMode = "permissive" | "widget-declared";
|
|
10
|
+
/** Host operations and server metadata available to a live MCP App. */
|
|
8
11
|
export interface ViewConnection {
|
|
12
|
+
/** Calls an MCP server tool. */
|
|
9
13
|
callTool: (name: string, args?: Record<string, unknown>, options?: {
|
|
10
14
|
timeout?: number;
|
|
11
15
|
resetTimeoutOnProgress?: boolean;
|
|
12
16
|
}) => Promise<unknown>;
|
|
17
|
+
/** Reads an MCP resource by URI. */
|
|
13
18
|
readResource: (uri: string) => Promise<unknown>;
|
|
19
|
+
/** Tools available to the host, including app visibility metadata. */
|
|
14
20
|
tools?: readonly {
|
|
21
|
+
/** Tool name. */
|
|
15
22
|
name: string;
|
|
23
|
+
/** Optional tool metadata. */
|
|
16
24
|
_meta?: {
|
|
25
|
+
/** MCP App-specific tool metadata. */
|
|
17
26
|
ui?: {
|
|
27
|
+
/** Surfaces allowed to invoke or receive the tool. */
|
|
18
28
|
visibility?: readonly ("model" | "app")[];
|
|
19
29
|
};
|
|
20
30
|
};
|
|
21
31
|
}[];
|
|
32
|
+
/** Resources available to the host. */
|
|
22
33
|
resources?: readonly {
|
|
34
|
+
/** Resource URI. */
|
|
23
35
|
uri: string;
|
|
36
|
+
/** Optional resource metadata. */
|
|
24
37
|
_meta?: {
|
|
38
|
+
/** MCP App-specific resource metadata. */
|
|
25
39
|
ui?: unknown;
|
|
26
40
|
};
|
|
27
41
|
}[];
|
|
28
42
|
}
|
|
43
|
+
/** Live or preloaded content used to initialize a {@link ViewRenderer}. */
|
|
29
44
|
export type ViewRendererSource = {
|
|
45
|
+
/** Selects live resource resolution. */
|
|
30
46
|
kind: "live";
|
|
47
|
+
/** MCP connection used to read the resource and call tools. */
|
|
31
48
|
connection: ViewConnection;
|
|
49
|
+
/** URI of the MCP App resource to load. */
|
|
32
50
|
resourceUri: string;
|
|
33
51
|
} | {
|
|
52
|
+
/** Selects preloaded HTML rendering. */
|
|
34
53
|
kind: "preloaded";
|
|
54
|
+
/** Complete HTML document to render. */
|
|
35
55
|
html: string;
|
|
56
|
+
/** CSP declared for the preloaded document. */
|
|
36
57
|
csp?: McpUiResourceCsp;
|
|
58
|
+
/** Browser permissions requested by the preloaded document. */
|
|
37
59
|
permissions?: McpUiResourcePermissions;
|
|
60
|
+
/** Whether the preloaded app prefers visible host borders. */
|
|
38
61
|
prefersBorder?: boolean;
|
|
39
62
|
};
|
|
63
|
+
/** Normalized HTML, CSP, permissions, and MIME metadata for a rendered view. */
|
|
40
64
|
export type ResolvedViewResource = {
|
|
65
|
+
/** HTML document rendered in the sandbox. */
|
|
41
66
|
html: string;
|
|
67
|
+
/** CSP declared by the resource before host policy is applied. */
|
|
42
68
|
declaredCsp: McpUiResourceCsp | undefined;
|
|
69
|
+
/** CSP enforced by the host, if any. */
|
|
43
70
|
csp: McpUiResourceCsp | undefined;
|
|
71
|
+
/** Browser permissions requested by the resource. */
|
|
44
72
|
permissions: McpUiResourcePermissions | undefined;
|
|
73
|
+
/** Whether the app prefers a visible host border. */
|
|
45
74
|
prefersBorder: boolean;
|
|
75
|
+
/** MIME type reported by the resource. */
|
|
46
76
|
mimeType: string | undefined;
|
|
77
|
+
/** Whether the MIME type is the MCP App resource media type. */
|
|
47
78
|
mimeTypeValid: boolean;
|
|
79
|
+
/** MIME validation warning, or `null` for a valid resource. */
|
|
48
80
|
mimeTypeWarning: string | null;
|
|
49
81
|
};
|
|
82
|
+
/** Browser CSP violation observed while an MCP App is running. */
|
|
50
83
|
export type ViewCspViolation = {
|
|
84
|
+
/** CSP directive reported by the browser. */
|
|
51
85
|
directive: string;
|
|
86
|
+
/** Effective CSP directive reported by the browser. */
|
|
52
87
|
effectiveDirective?: string;
|
|
88
|
+
/** URI blocked by the policy. */
|
|
53
89
|
blockedUri: string;
|
|
90
|
+
/** Source file associated with the violation. */
|
|
54
91
|
sourceFile?: string | null;
|
|
92
|
+
/** Source line associated with the violation. */
|
|
55
93
|
lineNumber?: number | null;
|
|
94
|
+
/** Source column associated with the violation. */
|
|
56
95
|
columnNumber?: number | null;
|
|
96
|
+
/** Original policy text reported by the browser. */
|
|
57
97
|
originalPolicy?: string;
|
|
98
|
+
/** Unix timestamp in milliseconds when the violation occurred. */
|
|
58
99
|
timestamp: number;
|
|
59
100
|
};
|
|
101
|
+
/** App-visible tools and the function used to call them. */
|
|
60
102
|
export type ViewAppToolConnection = {
|
|
103
|
+
/** Tools available to the app. */
|
|
61
104
|
tools: Tool[];
|
|
105
|
+
/** Calls an app-visible tool. */
|
|
62
106
|
callTool: (name: string, args?: Record<string, unknown>) => Promise<unknown>;
|
|
63
107
|
};
|
|
108
|
+
/** Lifecycle stage reported by a rendered MCP App. */
|
|
64
109
|
export type ViewLifecycleStatus = "resolving" | "sandbox-loading" | "connecting" | "initialized" | "ready" | "tearing-down" | "closed" | "error";
|
|
110
|
+
/** Lifecycle update emitted by {@link ViewRenderer}. */
|
|
65
111
|
export type ViewLifecycleEvent = {
|
|
112
|
+
/** Current lifecycle stage. */
|
|
66
113
|
status: ViewLifecycleStatus;
|
|
114
|
+
/** Error message when `status` is `"error"`. */
|
|
67
115
|
error?: string;
|
|
68
116
|
};
|
|
117
|
+
/** Props accepted by {@link ViewRenderer}. */
|
|
69
118
|
export interface ViewRendererProps {
|
|
119
|
+
/** Stable identifier for the view instance. */
|
|
70
120
|
viewId: string;
|
|
121
|
+
/** Live resource or preloaded HTML to render. */
|
|
71
122
|
source: ViewRendererSource;
|
|
123
|
+
/** Sandbox page URL or function that derives one from the resolved resource. */
|
|
72
124
|
sandboxUrl?: URL | ((resolved: ResolvedViewResource) => URL);
|
|
125
|
+
/** Tool associated with the view. */
|
|
73
126
|
toolName?: string;
|
|
127
|
+
/** Complete tool input forwarded to the app. */
|
|
74
128
|
toolInput?: Record<string, unknown>;
|
|
129
|
+
/** Tool result forwarded to the app. */
|
|
75
130
|
toolOutput?: unknown;
|
|
131
|
+
/** Partial streaming tool input forwarded to the app. */
|
|
76
132
|
partialToolInput?: Record<string, unknown>;
|
|
133
|
+
/** String-valued custom properties forwarded to the app. */
|
|
77
134
|
customProps?: Record<string, string>;
|
|
135
|
+
/** Whether the associated tool call was cancelled. */
|
|
78
136
|
cancelled?: boolean;
|
|
137
|
+
/** Host identity advertised to the app. */
|
|
79
138
|
hostInfo?: {
|
|
139
|
+
/** Stable host name. */
|
|
80
140
|
name: string;
|
|
141
|
+
/** Host version. */
|
|
81
142
|
version: string;
|
|
82
143
|
};
|
|
144
|
+
/** Initial host context sent to the app. */
|
|
83
145
|
hostContext?: McpUiHostContext;
|
|
146
|
+
/** Explicit host capability overrides. */
|
|
84
147
|
hostCapabilities?: Partial<McpUiHostCapabilities>;
|
|
148
|
+
/** Content modalities accepted by the host's message handler. */
|
|
85
149
|
messageCapabilities?: McpUiSupportedContentBlockModalities;
|
|
150
|
+
/** Content modalities accepted by the model-context handler. */
|
|
86
151
|
modelContextCapabilities?: McpUiSupportedContentBlockModalities;
|
|
152
|
+
/** CSP enforcement mode. Defaults to `"permissive"`. */
|
|
87
153
|
cspMode?: ViewCspMode;
|
|
154
|
+
/** Initial display mode. Defaults to `"inline"`. */
|
|
88
155
|
displayMode?: ViewDisplayMode;
|
|
156
|
+
/** Called when the app requests a supported display mode. */
|
|
89
157
|
onDisplayModeChange?: (mode: ViewDisplayMode) => void;
|
|
158
|
+
/** Maximum inline view width in pixels. */
|
|
90
159
|
inlineMaxWidth?: number;
|
|
160
|
+
/** Whether to hide the built-in view chrome. */
|
|
91
161
|
chromeless?: boolean;
|
|
162
|
+
/** Handles content the app sends to the conversation. */
|
|
92
163
|
onMessage?: (content: unknown[]) => void | Promise<void>;
|
|
164
|
+
/** Handles sampling requests from the app. */
|
|
93
165
|
onSamplingRequest?: (params: CreateMessageRequest["params"]) => Promise<CreateMessageResult | CreateMessageResultWithTools>;
|
|
166
|
+
/** Handles file-download requests from the app. */
|
|
94
167
|
onDownloadFile?: (params: McpUiDownloadFileRequest["params"]) => Promise<McpUiDownloadFileResult>;
|
|
168
|
+
/** Receives the current app-visible tool connection. */
|
|
95
169
|
onAppToolsChanged?: (connection: ViewAppToolConnection | null) => void;
|
|
170
|
+
/** Handles model-context updates from the app. */
|
|
96
171
|
onModelContextUpdate?: (ctx: {
|
|
97
172
|
content?: unknown;
|
|
98
173
|
structuredContent?: unknown;
|
|
99
174
|
}) => void | Promise<void>;
|
|
175
|
+
/** Handles structured log entries from the app. */
|
|
100
176
|
onLog?: (entry: {
|
|
101
177
|
level: string;
|
|
102
178
|
data: unknown;
|
|
103
179
|
}) => void;
|
|
180
|
+
/** Called when the app signals that it is ready. */
|
|
104
181
|
onReady?: () => void;
|
|
182
|
+
/** Called for each view lifecycle transition. */
|
|
105
183
|
onLifecycleChange?: (event: ViewLifecycleEvent) => void;
|
|
184
|
+
/** Called when view initialization or runtime handling fails. */
|
|
106
185
|
onError?: (message: string) => void;
|
|
186
|
+
/** Called when the browser reports a CSP violation. */
|
|
107
187
|
onCspViolation?: (violation: ViewCspViolation) => void;
|
|
188
|
+
/** Called after a live or preloaded resource is normalized. */
|
|
108
189
|
onResourceResolved?: (resolved: ResolvedViewResource) => void;
|
|
190
|
+
/** Wraps the host transport before it is connected to the app bridge. */
|
|
109
191
|
wrapTransport?: (transport: Transport, viewId: string) => Transport;
|
|
192
|
+
/** Timeout in milliseconds for app-initiated tool calls. Defaults to `600000`. */
|
|
110
193
|
toolCallTimeout?: number;
|
|
111
194
|
/** Dev mock of ChatGPT file APIs for local hosts (inspector). Default false. */
|
|
112
195
|
mockOpenAiFileApis?: boolean;
|
|
@@ -114,7 +197,9 @@ export interface ViewRendererProps {
|
|
|
114
197
|
onInlineHeightChange?: (height: number) => void;
|
|
115
198
|
/** Inspector-only chrome shown above the iframe in fullscreen display mode. */
|
|
116
199
|
fullscreenHeader?: {
|
|
200
|
+
/** Header title. */
|
|
117
201
|
title: string;
|
|
202
|
+
/** Optional header icon URL. */
|
|
118
203
|
iconUrl?: string | null;
|
|
119
204
|
};
|
|
120
205
|
/** Optional host close control for fullscreen (e.g. shared Button + icon). */
|
|
@@ -123,9 +208,13 @@ export interface ViewRendererProps {
|
|
|
123
208
|
"data-testid": string;
|
|
124
209
|
"aria-label": string;
|
|
125
210
|
}) => ReactNode;
|
|
211
|
+
/** Additional class name applied to the view container. */
|
|
126
212
|
className?: string;
|
|
213
|
+
/** Test identifier applied to the view container. */
|
|
127
214
|
testId?: string;
|
|
215
|
+
/** Status text shown while the associated tool is running. */
|
|
128
216
|
invoking?: string;
|
|
217
|
+
/** Status text shown after the associated tool completes. */
|
|
129
218
|
invoked?: string;
|
|
130
219
|
}
|
|
131
220
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/react/view/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,wBAAwB,EACxB,oCAAoC,EACrC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACnB,4BAA4B,EAC5B,IAAI,EACL,MAAM,8BAA8B,CAAC;AAEtC,YAAY,EACV,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,wBAAwB,EACxB,oCAAoC,GACrC,CAAC;AACF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,KAAK,GAAG,YAAY,CAAC;AAE9D,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,iBAAiB,CAAC;AAE3D,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,CACR,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,sBAAsB,CAAC,EAAE,OAAO,CAAA;KAAE,KAC7D,OAAO,CAAC,OAAO,CAAC,CAAC;I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
+
*
|
|
4
|
+
* @param toolMeta - Tool `_meta` object.
|
|
5
|
+
* @returns The declared view resource URI, or `null` when none is declared.
|
|
6
|
+
*/
|
|
1
7
|
export declare function getViewResourceUri(toolMeta?: Record<string, unknown>): string | null;
|
|
8
|
+
/**
|
|
9
|
+
* Tests whether tool metadata declares an MCP App resource.
|
|
10
|
+
*
|
|
11
|
+
* @param toolMeta - Tool `_meta` object.
|
|
12
|
+
* @returns `true` when the tool declares a view resource URI.
|
|
13
|
+
*/
|
|
2
14
|
export declare function isViewTool(toolMeta?: Record<string, unknown>): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Tests whether a resource uses the MCP App HTML media type.
|
|
17
|
+
*
|
|
18
|
+
* @param mimeType - Resource MIME type.
|
|
19
|
+
* @returns `true` for the MCP App resource media type.
|
|
20
|
+
*/
|
|
3
21
|
export declare function isViewResource(mimeType?: string): boolean;
|
|
4
22
|
//# sourceMappingURL=view-detection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-detection.d.ts","sourceRoot":"","sources":["../../../src/react/view/view-detection.ts"],"names":[],"mappings":"AAEA,wBAAgB,kBAAkB,CAChC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACjC,MAAM,GAAG,IAAI,CAWf;AAED,wBAAgB,UAAU,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAEtE;AAED,wBAAgB,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAEzD"}
|
|
1
|
+
{"version":3,"file":"view-detection.d.ts","sourceRoot":"","sources":["../../../src/react/view/view-detection.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACjC,MAAM,GAAG,IAAI,CAWf;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAEtE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAEzD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { McpUiHostCapabilities, McpUiSupportedContentBlockModalities } from "./ext-apps-bridge.js";
|
|
2
2
|
import type { ViewConnection, ViewDisplayMode } from "./types.js";
|
|
3
|
+
/** Inputs used to derive the capabilities advertised by an MCP App host. */
|
|
3
4
|
type CapabilityInputs = {
|
|
4
5
|
hasConnection: boolean;
|
|
5
6
|
hasMessageHandler: boolean;
|
|
@@ -10,17 +11,51 @@ type CapabilityInputs = {
|
|
|
10
11
|
messageCapabilities?: McpUiSupportedContentBlockModalities;
|
|
11
12
|
modelContextCapabilities?: McpUiSupportedContentBlockModalities;
|
|
12
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* Builds host capabilities from the callbacks and connections the host exposes.
|
|
16
|
+
*
|
|
17
|
+
* @param inputs - Available host features and supported content modalities.
|
|
18
|
+
* @returns Capabilities suitable for MCP App bridge initialization.
|
|
19
|
+
*/
|
|
13
20
|
export declare function buildDefaultHostCapabilities({ hasConnection, hasMessageHandler, hasModelContextHandler, hasLogHandler, hasSamplingHandler, hasDownloadHandler, messageCapabilities, modelContextCapabilities, }: CapabilityInputs): McpUiHostCapabilities;
|
|
21
|
+
/**
|
|
22
|
+
* Tests whether a tool is visible to the model.
|
|
23
|
+
*
|
|
24
|
+
* Tools without explicit visibility metadata remain model-visible.
|
|
25
|
+
*
|
|
26
|
+
* @param tool - Tool metadata to inspect.
|
|
27
|
+
* @returns `true` when the tool may be presented to the model.
|
|
28
|
+
*/
|
|
14
29
|
export declare function isToolVisibleToModel(tool: {
|
|
15
30
|
_meta?: unknown;
|
|
16
31
|
}): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Validates and dispatches an MCP App `ui/message` payload.
|
|
34
|
+
*
|
|
35
|
+
* @param handler - Host callback that accepts message content.
|
|
36
|
+
* @param content - Content blocks supplied by the app.
|
|
37
|
+
* @throws When the host has no message handler or `content` is empty.
|
|
38
|
+
*/
|
|
17
39
|
export declare function dispatchUiMessage(handler: ((content: unknown[]) => void | Promise<void>) | undefined, content: unknown[]): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Resolves a display-mode request against host and app availability.
|
|
42
|
+
*
|
|
43
|
+
* @param options - Requested and current modes plus each side's supported modes.
|
|
44
|
+
* @returns The requested mode when both sides support it; otherwise `current`.
|
|
45
|
+
*/
|
|
18
46
|
export declare function resolveRequestedDisplayMode({ requested, current, hostAvailable, appAvailable, }: {
|
|
19
47
|
requested: ViewDisplayMode;
|
|
20
48
|
current: ViewDisplayMode;
|
|
21
49
|
hostAvailable?: readonly ViewDisplayMode[];
|
|
22
50
|
appAvailable?: readonly ViewDisplayMode[];
|
|
23
51
|
}): ViewDisplayMode;
|
|
52
|
+
/**
|
|
53
|
+
* Asserts that an MCP App may call a named server tool.
|
|
54
|
+
*
|
|
55
|
+
* @param tools - Tools available through the live view connection.
|
|
56
|
+
* @param name - Tool name requested by the app.
|
|
57
|
+
* @throws When the tool is unavailable or not visible to apps.
|
|
58
|
+
*/
|
|
24
59
|
export declare function assertAppCanCallTool(tools: ViewConnection["tools"], name: string): void;
|
|
25
60
|
export {};
|
|
26
61
|
//# sourceMappingURL=view-host-policy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-host-policy.d.ts","sourceRoot":"","sources":["../../../src/react/view/view-host-policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,oCAAoC,EACrC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElE,KAAK,gBAAgB,GAAG;IACtB,aAAa,EAAE,OAAO,CAAC;IACvB,iB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E,SAAS,eAAe,EAAE,CAAC;CAC3C,GAAG,eAAe,CAMlB;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,EAC9B,IAAI,EAAE,MAAM,GACX,IAAI,CAUN"}
|
|
@@ -63,7 +63,11 @@ export declare class Telemetry {
|
|
|
63
63
|
flush(): void;
|
|
64
64
|
shutdown(): Promise<void>;
|
|
65
65
|
}
|
|
66
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* Backward-compatible name for {@link Telemetry}.
|
|
68
|
+
*
|
|
69
|
+
* @alias
|
|
70
|
+
*/
|
|
67
71
|
export declare const Tel: typeof Telemetry;
|
|
68
72
|
export declare function setTelemetrySource(source: string): void;
|
|
69
73
|
export declare function setProductVersion(version: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/telemetry/telemetry.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EACvB,MAAM,aAAa,CAAC;AAoBrB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,IAAI,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,CAAC;AAEF,KAAK,kBAAkB,GACnB,SAAS,GACT,MAAM,GACN,oBAAoB,GACpB,MAAM,GACN,MAAM,GACN,KAAK,GACL,SAAS,CAAC;AAEd,KAAK,iBAAiB,GAAG,YAAY,GAAG,cAAc,CAAC;AASvD,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAEzE;AAyHD;;;;GAIG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA0B;IAEjD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAqB;IAErD,OAAO,CAAC,WAAW,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AAG,IAAI,CAEvD"}
|
package/dist/transport/base.d.ts
CHANGED
|
@@ -4,9 +4,12 @@ import type { ConnectionManager } from "./connection-manager.js";
|
|
|
4
4
|
import type { ConnectorInitEventData } from "../telemetry/events.js";
|
|
5
5
|
import type { MCPServerInfo } from "../core/session.js";
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Handles a notification received from an MCP server.
|
|
8
|
+
*
|
|
9
|
+
* @param notification - Notification envelope supplied by the server.
|
|
8
10
|
*/
|
|
9
11
|
export type NotificationHandler = (notification: Notification) => void | Promise<void>;
|
|
12
|
+
/** Shared initialization options for all connector transports. */
|
|
10
13
|
export interface ConnectorInitOptions {
|
|
11
14
|
/**
|
|
12
15
|
* Options forwarded to the underlying MCP `Client` instance.
|
|
@@ -65,14 +68,22 @@ export interface ConnectorInitOptions {
|
|
|
65
68
|
* Controls retry behavior of the underlying `StreamableHTTPClientTransport`.
|
|
66
69
|
*/
|
|
67
70
|
reconnectionOptions?: {
|
|
71
|
+
/** Maximum delay between reconnection attempts in milliseconds. */
|
|
68
72
|
maxReconnectionDelay?: number;
|
|
73
|
+
/** Delay before the first reconnection attempt in milliseconds. */
|
|
69
74
|
initialReconnectionDelay?: number;
|
|
75
|
+
/** Multiplier applied to the delay after each failed attempt. */
|
|
70
76
|
reconnectionDelayGrowFactor?: number;
|
|
77
|
+
/** Maximum number of reconnection attempts. */
|
|
71
78
|
maxRetries?: number;
|
|
72
79
|
};
|
|
73
80
|
}
|
|
74
81
|
/**
|
|
75
|
-
*
|
|
82
|
+
* Implements protocol operations shared by MCP transport connectors.
|
|
83
|
+
*
|
|
84
|
+
* Subclasses provide transport-specific connection setup and a public
|
|
85
|
+
* identifier. Call {@link BaseConnector.connect}, then
|
|
86
|
+
* {@link BaseConnector.initialize}, before invoking protocol operations.
|
|
76
87
|
*/
|
|
77
88
|
export declare abstract class BaseConnector {
|
|
78
89
|
protected client: Client | null;
|
|
@@ -85,6 +96,11 @@ export declare abstract class BaseConnector {
|
|
|
85
96
|
protected notificationHandlers: NotificationHandler[];
|
|
86
97
|
protected rootsCache: Root[];
|
|
87
98
|
private activeProgressHandlers;
|
|
99
|
+
/**
|
|
100
|
+
* Creates a connector with shared SDK and callback options.
|
|
101
|
+
*
|
|
102
|
+
* @param opts - Connector initialization options.
|
|
103
|
+
*/
|
|
88
104
|
constructor(opts?: ConnectorInitOptions);
|
|
89
105
|
/**
|
|
90
106
|
* Track connector initialization event
|
|
@@ -155,7 +171,9 @@ export declare abstract class BaseConnector {
|
|
|
155
171
|
*/
|
|
156
172
|
setRoots(roots: Root[]): Promise<void>;
|
|
157
173
|
/**
|
|
158
|
-
*
|
|
174
|
+
* Returns the roots currently advertised to the server.
|
|
175
|
+
*
|
|
176
|
+
* @returns A copy of the configured roots.
|
|
159
177
|
*/
|
|
160
178
|
getRoots(): Root[];
|
|
161
179
|
/**
|
|
@@ -174,13 +192,25 @@ export declare abstract class BaseConnector {
|
|
|
174
192
|
* Must be registered after Client construction and before connect().
|
|
175
193
|
*/
|
|
176
194
|
protected setupElicitationHandler(): void;
|
|
177
|
-
/**
|
|
195
|
+
/**
|
|
196
|
+
* Establishes the transport connection and creates the SDK client.
|
|
197
|
+
*
|
|
198
|
+
* @returns A promise that resolves when the connector is connected.
|
|
199
|
+
*/
|
|
178
200
|
abstract connect(): Promise<void>;
|
|
179
|
-
/**
|
|
201
|
+
/**
|
|
202
|
+
* Returns transport-specific fields suitable for logs and telemetry.
|
|
203
|
+
*
|
|
204
|
+
* @returns A record identifying the connector without exposing credentials.
|
|
205
|
+
*/
|
|
180
206
|
abstract get publicIdentifier(): Record<string, string>;
|
|
181
|
-
/**
|
|
207
|
+
/**
|
|
208
|
+
* Disconnects the SDK client and releases transport resources.
|
|
209
|
+
*
|
|
210
|
+
* @returns A promise that resolves after cleanup completes.
|
|
211
|
+
*/
|
|
182
212
|
disconnect(): Promise<void>;
|
|
183
|
-
/**
|
|
213
|
+
/** Whether an SDK client currently exists for this connector. */
|
|
184
214
|
get isClientConnected(): boolean;
|
|
185
215
|
/**
|
|
186
216
|
* Initialise the MCP session **after** `connect()` has succeeded.
|
|
@@ -188,13 +218,21 @@ export declare abstract class BaseConnector {
|
|
|
188
218
|
* In the SDK, `Client.connect(transport)` automatically performs the
|
|
189
219
|
* protocol‑level `initialize` handshake, so we only need to cache the list of
|
|
190
220
|
* tools and expose some server info.
|
|
221
|
+
*
|
|
222
|
+
* @param defaultRequestOptions - Options used while fetching the initial tool list.
|
|
223
|
+
* @returns The capabilities advertised by the server.
|
|
224
|
+
* @throws When {@link BaseConnector.connect} has not completed.
|
|
191
225
|
*/
|
|
192
226
|
initialize(defaultRequestOptions?: RequestOptions): Promise<ReturnType<Client["getServerCapabilities"]>>;
|
|
193
|
-
/**
|
|
227
|
+
/**
|
|
228
|
+
* Returns the tool list cached during initialization.
|
|
229
|
+
*
|
|
230
|
+
* @throws When {@link BaseConnector.initialize} has not completed.
|
|
231
|
+
*/
|
|
194
232
|
get tools(): Tool[];
|
|
195
|
-
/**
|
|
233
|
+
/** Capabilities cached during initialization, or an empty object. */
|
|
196
234
|
get serverCapabilities(): Record<string, unknown>;
|
|
197
|
-
/**
|
|
235
|
+
/** Server identity cached during initialization, or `null`. */
|
|
198
236
|
get serverInfo(): MCPServerInfo | null;
|
|
199
237
|
/** Instructions supplied by the connected server, if any. */
|
|
200
238
|
get instructions(): string | undefined;
|
|
@@ -207,7 +245,15 @@ export declare abstract class BaseConnector {
|
|
|
207
245
|
get protocolEra(): ProtocolEra | undefined;
|
|
208
246
|
/** The protocol version string negotiated for the active connection. */
|
|
209
247
|
get negotiatedProtocolVersion(): string | undefined;
|
|
210
|
-
/**
|
|
248
|
+
/**
|
|
249
|
+
* Calls a tool on the connected server.
|
|
250
|
+
*
|
|
251
|
+
* @param name - Tool name.
|
|
252
|
+
* @param args - Tool arguments.
|
|
253
|
+
* @param options - Per-request timeout, cancellation, and progress options.
|
|
254
|
+
* @returns The tool result returned by the server.
|
|
255
|
+
* @throws When the connector is not connected or the tool call fails.
|
|
256
|
+
*/
|
|
211
257
|
callTool(name: string, args: Record<string, any>, options?: RequestOptions): Promise<CallToolResult>;
|
|
212
258
|
/**
|
|
213
259
|
* List all available tools from the MCP server.
|
|
@@ -273,6 +319,7 @@ export declare abstract class BaseConnector {
|
|
|
273
319
|
* @returns Complete list of all resources
|
|
274
320
|
*/
|
|
275
321
|
listAllResources(options?: RequestOptions): Promise<{
|
|
322
|
+
/** Resources returned across all result pages. */
|
|
276
323
|
resources: any[];
|
|
277
324
|
}>;
|
|
278
325
|
/**
|
|
@@ -330,7 +377,13 @@ export declare abstract class BaseConnector {
|
|
|
330
377
|
* @returns Completion suggestions from the server
|
|
331
378
|
*/
|
|
332
379
|
complete(params: CompleteRequestParams, options?: RequestOptions): Promise<CompleteResult>;
|
|
333
|
-
/**
|
|
380
|
+
/**
|
|
381
|
+
* Reads a resource by URI.
|
|
382
|
+
*
|
|
383
|
+
* @param uri - Resource URI to read.
|
|
384
|
+
* @param options - Per-request options.
|
|
385
|
+
* @returns The resource contents returned by the server.
|
|
386
|
+
*/
|
|
334
387
|
readResource(uri: string, options?: RequestOptions): Promise<{
|
|
335
388
|
[x: string]: unknown;
|
|
336
389
|
contents: ({
|
|
@@ -413,6 +466,11 @@ export declare abstract class BaseConnector {
|
|
|
413
466
|
} | undefined;
|
|
414
467
|
} | undefined;
|
|
415
468
|
}>;
|
|
469
|
+
/**
|
|
470
|
+
* Lists prompts exposed by the server.
|
|
471
|
+
*
|
|
472
|
+
* @returns The prompt list, or an empty list when prompts are unsupported.
|
|
473
|
+
*/
|
|
416
474
|
listPrompts(): Promise<{
|
|
417
475
|
[x: string]: unknown;
|
|
418
476
|
prompts: {
|
|
@@ -452,6 +510,13 @@ export declare abstract class BaseConnector {
|
|
|
452
510
|
} | undefined;
|
|
453
511
|
nextCursor?: string | undefined;
|
|
454
512
|
}>;
|
|
513
|
+
/**
|
|
514
|
+
* Gets a prompt with the supplied arguments.
|
|
515
|
+
*
|
|
516
|
+
* @param name - Prompt name.
|
|
517
|
+
* @param args - Prompt arguments.
|
|
518
|
+
* @returns The rendered prompt returned by the server.
|
|
519
|
+
*/
|
|
455
520
|
getPrompt(name: string, args: Record<string, any>): Promise<{
|
|
456
521
|
[x: string]: unknown;
|
|
457
522
|
messages: {
|
|
@@ -558,7 +623,14 @@ export declare abstract class BaseConnector {
|
|
|
558
623
|
} | undefined;
|
|
559
624
|
description?: string | undefined;
|
|
560
625
|
}>;
|
|
561
|
-
/**
|
|
626
|
+
/**
|
|
627
|
+
* Sends a raw, potentially non-standard request through the SDK client.
|
|
628
|
+
*
|
|
629
|
+
* @param method - JSON-RPC method name.
|
|
630
|
+
* @param params - Request parameters. Defaults to an empty object.
|
|
631
|
+
* @param options - Per-request options.
|
|
632
|
+
* @returns The unvalidated result returned by the server.
|
|
633
|
+
*/
|
|
562
634
|
request(method: string, params?: Record<string, any> | null, options?: RequestOptions): Promise<unknown>;
|
|
563
635
|
/**
|
|
564
636
|
* Helper to tear down the client & connection manager safely.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/transport/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,MAAM,EACN,aAAa,EACb,qBAAqB,EACrB,cAAc,EACd,uBAAuB,EACvB,sBAAsB,EACtB,YAAY,EACZ,YAAY,EAEZ,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,cAAc,EACd,IAAI,EACJ,IAAI,EACL,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EACV,2BAA2B,EAC3B,2BAA2B,EAC5B,MAAM,mBAAmB,CAAC;AAe3B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD
|
|
1
|
+
{"version":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cAAc,CAAC;IAY1B;;;;;;OAMG;IACG,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUxD;;;;;OAKG;IACG,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc;;;;;;;;;;;;;;;;;;IAS/D;;;;;OAKG;IACG,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc;;;;;;;;;;;;;;;;;;IASnE;;;;OAIG;IACG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyBjB;;;;;;OAMG;IACG,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASvD;;;;;;;OAOG;IACG,OAAO,CACX,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAW,EACzC,OAAO,CAAC,EAAE,cAAc;IAiB1B;;OAEG;cACa,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;CAkClD"}
|
|
@@ -26,7 +26,7 @@ export declare abstract class ConnectionManager<T = any> {
|
|
|
26
26
|
* This method should be implemented by subclasses to close the specific type
|
|
27
27
|
* of connection.
|
|
28
28
|
*
|
|
29
|
-
* @param connection The connection to close.
|
|
29
|
+
* @param connection - The connection to close.
|
|
30
30
|
*/
|
|
31
31
|
protected abstract closeConnection(connection: T): Promise<void>;
|
|
32
32
|
/**
|