@mcp-b/webmcp-ts-sdk 2.0.8 → 2.0.9
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/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { ServerOptions } from "@modelcontextprotocol/sdk/server/index.js";
|
|
|
8
8
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
9
9
|
|
|
10
10
|
//#region src/browser-server.d.ts
|
|
11
|
+
declare const SERVER_MARKER_PROPERTY: "__isBrowserMcpServer";
|
|
11
12
|
interface BrowserMcpServerOptions extends ServerOptions {
|
|
12
13
|
native?: ModelContextCore;
|
|
13
14
|
}
|
|
@@ -23,6 +24,7 @@ interface BrowserMcpServerOptions extends ServerOptions {
|
|
|
23
24
|
* navigator.modelContextTesting (polyfill testing shim) stays in sync.
|
|
24
25
|
*/
|
|
25
26
|
declare class BrowserMcpServer extends McpServer {
|
|
27
|
+
readonly [SERVER_MARKER_PROPERTY]: true;
|
|
26
28
|
private native;
|
|
27
29
|
private _promptSchemas;
|
|
28
30
|
private _jsonValidator;
|
|
@@ -232,5 +234,5 @@ declare class PolyfillJsonSchemaValidator implements JsonSchemaValidator {
|
|
|
232
234
|
type SamplingRequestParams = CreateMessageRequest$1['params'];
|
|
233
235
|
type SamplingResult = CreateMessageResult$1;
|
|
234
236
|
//#endregion
|
|
235
|
-
export { BrowserMcpServer, BrowserMcpServer as McpServer, type BrowserMcpServerOptions, type CallToolRequest, CallToolRequestSchema, type CallToolResult, CallToolResultSchema, Client, type ClientCapabilities, type ClientNotification, type ClientRequest, type ClientResult, type CreateMessageRequest, CreateMessageRequestSchema, type CreateMessageResult, CreateMessageResultSchema, type ElicitRequest, ElicitRequestSchema, type ElicitResult, ElicitResultSchema, ErrorCode, type GetPromptRequest, GetPromptRequestSchema, type GetPromptResult, GetPromptResultSchema, type Implementation, type InitializeRequest, InitializeRequestSchema, type InitializeResult, InitializeResultSchema, type JSONRPCMessage, JSONRPCMessageSchema, LATEST_PROTOCOL_VERSION, type ListPromptsRequest, ListPromptsRequestSchema, type ListPromptsResult, ListPromptsResultSchema, type ListResourcesRequest, ListResourcesRequestSchema, type ListResourcesResult, ListResourcesResultSchema, type ListToolsRequest, ListToolsRequestSchema, type ListToolsResult, ListToolsResultSchema, type LoggingLevel, LoggingLevelSchema, type LoggingMessageNotification, type McpError, NoOpJsonSchemaValidator, type Notification, PolyfillJsonSchemaValidator, type Prompt, type PromptDescriptor, type PromptMessage, ReadBuffer, type ReadResourceRequest, ReadResourceRequestSchema, type ReadResourceResult, ReadResourceResultSchema, type Request, type RequestOptions, type Resource, type ResourceContents, type ResourceDescriptor, ResourceListChangedNotificationSchema, type ResourceTemplate, type Result, SUPPORTED_PROTOCOL_VERSIONS, SamplingRequestParams, SamplingResult, type ServerCapabilities, type ServerNotification, type ServerRequest, type ServerResult, type Tool, type ToolAnnotations, ToolListChangedNotificationSchema, type Transport, type TransportSendOptions, mergeCapabilities, serializeMessage };
|
|
237
|
+
export { BrowserMcpServer, BrowserMcpServer as McpServer, type BrowserMcpServerOptions, type CallToolRequest, CallToolRequestSchema, type CallToolResult, CallToolResultSchema, Client, type ClientCapabilities, type ClientNotification, type ClientRequest, type ClientResult, type CreateMessageRequest, CreateMessageRequestSchema, type CreateMessageResult, CreateMessageResultSchema, type ElicitRequest, ElicitRequestSchema, type ElicitResult, ElicitResultSchema, ErrorCode, type GetPromptRequest, GetPromptRequestSchema, type GetPromptResult, GetPromptResultSchema, type Implementation, type InitializeRequest, InitializeRequestSchema, type InitializeResult, InitializeResultSchema, type JSONRPCMessage, JSONRPCMessageSchema, LATEST_PROTOCOL_VERSION, type ListPromptsRequest, ListPromptsRequestSchema, type ListPromptsResult, ListPromptsResultSchema, type ListResourcesRequest, ListResourcesRequestSchema, type ListResourcesResult, ListResourcesResultSchema, type ListToolsRequest, ListToolsRequestSchema, type ListToolsResult, ListToolsResultSchema, type LoggingLevel, LoggingLevelSchema, type LoggingMessageNotification, type McpError, NoOpJsonSchemaValidator, type Notification, PolyfillJsonSchemaValidator, type Prompt, type PromptDescriptor, type PromptMessage, ReadBuffer, type ReadResourceRequest, ReadResourceRequestSchema, type ReadResourceResult, ReadResourceResultSchema, type Request, type RequestOptions, type Resource, type ResourceContents, type ResourceDescriptor, ResourceListChangedNotificationSchema, type ResourceTemplate, type Result, SERVER_MARKER_PROPERTY, SUPPORTED_PROTOCOL_VERSIONS, SamplingRequestParams, SamplingResult, type ServerCapabilities, type ServerNotification, type ServerRequest, type ServerResult, type Tool, type ToolAnnotations, ToolListChangedNotificationSchema, type Transport, type TransportSendOptions, mergeCapabilities, serializeMessage };
|
|
236
238
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/browser-server.ts","../src/no-op-validator.ts","../src/polyfill-validator.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/browser-server.ts","../src/no-op-validator.ts","../src/polyfill-validator.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;cAyCa;UAyGI,uBAAA,SAAgC;WACtC;;AA1GX;AAyGA;AAoCA;;;;;;;;;AA+PgB,cA/PH,gBAAA,SAAyB,SAAA,CA+PtB;EAAc,UA9PlB,sBAAA,CA8PkB,EAAA,IAAA;EAA+C,QAAA,MAAA;EAApB,QAAA,cAAA;EAuBxC,QAAA,cAAA;EACD,QAAA,mBAAA;EAAgD,WAAA,CAAA,UAAA,EA/QtC,gBA+QsC,EAAA,OAAA,CAAA,EA/QZ,uBA+QY;EAApB;;;;EAuET,QAAA,oBAAA;EAYnB,YAAA,YAAA,CAAA;EAHC,YAAA,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AAA,MAAA;CA2BjB;;;;;;;;;;;;;;;;;;;;AAoNS,cC9oBvB,uBAAA,YAAmC,qBD8oBZ,CAAA;EAAY;;;;;;;EA2DnC,YAAA,CAAA,CAAA,CAAA,CAAA,OAAA,EAAA,OAAA,CAAA,EAAA,CAAA,KAAA,EAAA,OAAA,EAAA,GCjsB4C,2BDisB5C,CCjsBsE,CDisBtE,CAAA;;;;UEpvBH,mBAAA;wDAC8C,0BAA0B;;KAG7E;;QACoB;;;;;EFiCZ,YAAA,EAAA,MAAA;AAyGb,CAAA;AAoCa,cE3KA,2BAAA,YAAuC,mBF2KtB,CAAA;EAClB,YAAA,CAAA,CAAA,CAAA,CAAA,MAAA,EAAA,OAAA,CAAA,EAAA,CAAA,KAAA,EAAA,OAAA,EAAA,GE3K4C,yBF2K5C,CE3KsE,CF2KtE,CAAA;;;;AArCK,KG9CL,qBAAA,GAAwB,sBH+CzB,CAAA,QADsC,CAAA;AAoCpC,KGjFD,cAAA,GAAiB,qBHiFC"}
|
package/dist/index.js
CHANGED
|
@@ -4326,6 +4326,7 @@ const DEFAULT_INPUT_SCHEMA = {
|
|
|
4326
4326
|
properties: {}
|
|
4327
4327
|
};
|
|
4328
4328
|
const DEFAULT_CLIENT_REQUEST_TIMEOUT = 1e4;
|
|
4329
|
+
const SERVER_MARKER_PROPERTY = "__isBrowserMcpServer";
|
|
4329
4330
|
function isPlainObject$1(value) {
|
|
4330
4331
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
4331
4332
|
}
|
|
@@ -4384,6 +4385,7 @@ function withDefaultTimeout(options) {
|
|
|
4384
4385
|
* navigator.modelContextTesting (polyfill testing shim) stays in sync.
|
|
4385
4386
|
*/
|
|
4386
4387
|
var BrowserMcpServer = class extends McpServer {
|
|
4388
|
+
[SERVER_MARKER_PROPERTY] = true;
|
|
4387
4389
|
native;
|
|
4388
4390
|
_promptSchemas = /* @__PURE__ */ new Map();
|
|
4389
4391
|
_jsonValidator;
|
|
@@ -4729,5 +4731,5 @@ var NoOpJsonSchemaValidator = class {
|
|
|
4729
4731
|
};
|
|
4730
4732
|
|
|
4731
4733
|
//#endregion
|
|
4732
|
-
export { BrowserMcpServer, BrowserMcpServer as McpServer, CallToolRequestSchema, CallToolResultSchema, Client, CreateMessageRequestSchema, CreateMessageResultSchema, ElicitRequestSchema, ElicitResultSchema, ErrorCode, GetPromptRequestSchema, GetPromptResultSchema, InitializeRequestSchema, InitializeResultSchema, JSONRPCMessageSchema, LATEST_PROTOCOL_VERSION, ListPromptsRequestSchema, ListPromptsResultSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListToolsRequestSchema, ListToolsResultSchema, LoggingLevelSchema, NoOpJsonSchemaValidator, PolyfillJsonSchemaValidator, ReadBuffer, ReadResourceRequestSchema, ReadResourceResultSchema, ResourceListChangedNotificationSchema, SUPPORTED_PROTOCOL_VERSIONS, ToolListChangedNotificationSchema, mergeCapabilities, serializeMessage };
|
|
4734
|
+
export { BrowserMcpServer, BrowserMcpServer as McpServer, CallToolRequestSchema, CallToolResultSchema, Client, CreateMessageRequestSchema, CreateMessageResultSchema, ElicitRequestSchema, ElicitResultSchema, ErrorCode, GetPromptRequestSchema, GetPromptResultSchema, InitializeRequestSchema, InitializeResultSchema, JSONRPCMessageSchema, LATEST_PROTOCOL_VERSION, ListPromptsRequestSchema, ListPromptsResultSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListToolsRequestSchema, ListToolsResultSchema, LoggingLevelSchema, NoOpJsonSchemaValidator, PolyfillJsonSchemaValidator, ReadBuffer, ReadResourceRequestSchema, ReadResourceResultSchema, ResourceListChangedNotificationSchema, SERVER_MARKER_PROPERTY, SUPPORTED_PROTOCOL_VERSIONS, ToolListChangedNotificationSchema, mergeCapabilities, serializeMessage };
|
|
4733
4735
|
//# sourceMappingURL=index.js.map
|