@mcp-b/webmcp-local-relay 2.0.12 → 2.1.0
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/browser/embed.js +1 -480
- package/dist/browser/widget.html +1 -335
- package/dist/browser/widget.js +1 -0
- package/dist/cli.js +7 -3
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +130 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{mcpRelayServer-DAp7h9b1.js → mcpRelayServer-rbay_DSr.js} +605 -270
- package/dist/mcpRelayServer-rbay_DSr.js.map +1 -0
- package/package.json +6 -4
- package/dist/mcpRelayServer-DAp7h9b1.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { CallToolRequestParamsSchema, CallToolResult, CallToolResult as CallToolResult$1, CallToolResultSchema, Tool, Tool as Tool$1, ToolAnnotations, ToolAnnotations as ToolAnnotations$1, ToolAnnotationsSchema, ToolSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
1
2
|
import { z } from "zod/v4";
|
|
2
3
|
import { EventEmitter } from "node:events";
|
|
3
|
-
import { CallToolRequestParamsSchema, CallToolResult, CallToolResult as CallToolResult$1, CallToolResultSchema, Tool, Tool as Tool$1, ToolAnnotations, ToolAnnotations as ToolAnnotations$1, ToolAnnotationsSchema, ToolSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
4
4
|
import { Transport } from "@modelcontextprotocol/sdk/shared/transport.js";
|
|
5
5
|
|
|
6
6
|
//#region src/protocol.d.ts
|
|
@@ -207,10 +207,53 @@ type BrowserToRelayMessage = z.infer<typeof BrowserToRelayMessageSchema>;
|
|
|
207
207
|
* Browser source bootstrap message.
|
|
208
208
|
*/
|
|
209
209
|
type BrowserHelloMessage = z.infer<typeof BrowserHelloMessageSchema>;
|
|
210
|
+
/**
|
|
211
|
+
* Shared relay identity used for discovery and attach verification.
|
|
212
|
+
*/
|
|
213
|
+
declare const RelayDescriptorSchema: z.ZodObject<{
|
|
214
|
+
host: z.ZodString;
|
|
215
|
+
instanceId: z.ZodString;
|
|
216
|
+
label: z.ZodOptional<z.ZodString>;
|
|
217
|
+
port: z.ZodNumber;
|
|
218
|
+
relayId: z.ZodOptional<z.ZodString>;
|
|
219
|
+
workspace: z.ZodOptional<z.ZodString>;
|
|
220
|
+
}, z.core.$strip>;
|
|
221
|
+
/**
|
|
222
|
+
* Relay identity used for discovery and attach verification.
|
|
223
|
+
*/
|
|
224
|
+
type RelayDescriptor = z.infer<typeof RelayDescriptorSchema>;
|
|
225
|
+
/**
|
|
226
|
+
* Schema for server hello messages sent immediately after WebSocket connect.
|
|
227
|
+
*/
|
|
228
|
+
declare const ServerHelloMessageSchema: z.ZodObject<{
|
|
229
|
+
host: z.ZodString;
|
|
230
|
+
instanceId: z.ZodString;
|
|
231
|
+
label: z.ZodOptional<z.ZodString>;
|
|
232
|
+
port: z.ZodNumber;
|
|
233
|
+
relayId: z.ZodOptional<z.ZodString>;
|
|
234
|
+
workspace: z.ZodOptional<z.ZodString>;
|
|
235
|
+
type: z.ZodLiteral<"server-hello">;
|
|
236
|
+
service: z.ZodLiteral<"webmcp-local-relay">;
|
|
237
|
+
version: z.ZodLiteral<1>;
|
|
238
|
+
}, z.core.$strip>;
|
|
239
|
+
/**
|
|
240
|
+
* Server hello payload.
|
|
241
|
+
*/
|
|
242
|
+
type ServerHelloMessage = z.infer<typeof ServerHelloMessageSchema>;
|
|
210
243
|
/**
|
|
211
244
|
* Union schema for all relay-to-browser protocol messages.
|
|
212
245
|
*/
|
|
213
246
|
declare const RelayToBrowserMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
247
|
+
host: z.ZodString;
|
|
248
|
+
instanceId: z.ZodString;
|
|
249
|
+
label: z.ZodOptional<z.ZodString>;
|
|
250
|
+
port: z.ZodNumber;
|
|
251
|
+
relayId: z.ZodOptional<z.ZodString>;
|
|
252
|
+
workspace: z.ZodOptional<z.ZodString>;
|
|
253
|
+
type: z.ZodLiteral<"server-hello">;
|
|
254
|
+
service: z.ZodLiteral<"webmcp-local-relay">;
|
|
255
|
+
version: z.ZodLiteral<1>;
|
|
256
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
214
257
|
type: z.ZodLiteral<"invoke">;
|
|
215
258
|
callId: z.ZodString;
|
|
216
259
|
toolName: z.ZodString;
|
|
@@ -266,6 +309,16 @@ type RelayClientToServerMessage = z.infer<typeof RelayClientToServerMessageSchem
|
|
|
266
309
|
* Union schema for all relay-server-to-client messages.
|
|
267
310
|
*/
|
|
268
311
|
declare const RelayServerToClientMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
312
|
+
host: z.ZodString;
|
|
313
|
+
instanceId: z.ZodString;
|
|
314
|
+
label: z.ZodOptional<z.ZodString>;
|
|
315
|
+
port: z.ZodNumber;
|
|
316
|
+
relayId: z.ZodOptional<z.ZodString>;
|
|
317
|
+
workspace: z.ZodOptional<z.ZodString>;
|
|
318
|
+
type: z.ZodLiteral<"server-hello">;
|
|
319
|
+
service: z.ZodLiteral<"webmcp-local-relay">;
|
|
320
|
+
version: z.ZodLiteral<1>;
|
|
321
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
269
322
|
tools: z.ZodArray<z.ZodObject<{
|
|
270
323
|
description: z.ZodOptional<z.ZodString>;
|
|
271
324
|
inputSchema: z.ZodObject<{
|
|
@@ -305,7 +358,7 @@ declare const RelayServerToClientMessageSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
305
358
|
title: z.ZodOptional<z.ZodString>;
|
|
306
359
|
name: z.ZodString;
|
|
307
360
|
}, z.core.$strip>>;
|
|
308
|
-
sources: z.ZodArray<z.ZodObject<{
|
|
361
|
+
sources: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
309
362
|
sourceId: z.ZodString;
|
|
310
363
|
tabId: z.ZodString;
|
|
311
364
|
origin: z.ZodOptional<z.ZodString>;
|
|
@@ -315,8 +368,8 @@ declare const RelayServerToClientMessageSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
315
368
|
connectedAt: z.ZodNumber;
|
|
316
369
|
lastSeenAt: z.ZodNumber;
|
|
317
370
|
toolCount: z.ZodNumber;
|
|
318
|
-
}, z.core.$strip
|
|
319
|
-
toolSourceMap: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString
|
|
371
|
+
}, z.core.$strip>>>>;
|
|
372
|
+
toolSourceMap: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>>;
|
|
320
373
|
type: z.ZodLiteral<"relay/tools">;
|
|
321
374
|
}, z.core.$strip>, z.ZodObject<{
|
|
322
375
|
type: z.ZodLiteral<"relay/result">;
|
|
@@ -457,7 +510,7 @@ declare const RelayServerToClientMessageSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
457
510
|
title: z.ZodOptional<z.ZodString>;
|
|
458
511
|
name: z.ZodString;
|
|
459
512
|
}, z.core.$strip>>;
|
|
460
|
-
sources: z.ZodArray<z.ZodObject<{
|
|
513
|
+
sources: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
461
514
|
sourceId: z.ZodString;
|
|
462
515
|
tabId: z.ZodString;
|
|
463
516
|
origin: z.ZodOptional<z.ZodString>;
|
|
@@ -467,8 +520,8 @@ declare const RelayServerToClientMessageSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
467
520
|
connectedAt: z.ZodNumber;
|
|
468
521
|
lastSeenAt: z.ZodNumber;
|
|
469
522
|
toolCount: z.ZodNumber;
|
|
470
|
-
}, z.core.$strip
|
|
471
|
-
toolSourceMap: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString
|
|
523
|
+
}, z.core.$strip>>>>;
|
|
524
|
+
toolSourceMap: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>>;
|
|
472
525
|
type: z.ZodLiteral<"relay/tools-changed">;
|
|
473
526
|
}, z.core.$strip>]>;
|
|
474
527
|
/**
|
|
@@ -613,6 +666,22 @@ interface RelayBridgeServerOptions {
|
|
|
613
666
|
* @defaultValue `9333`
|
|
614
667
|
*/
|
|
615
668
|
port?: number;
|
|
669
|
+
/**
|
|
670
|
+
* Whether the preferred port came from an explicit CLI/API override.
|
|
671
|
+
* Explicit ports fail if occupied by a non-relay process.
|
|
672
|
+
* @defaultValue `false`
|
|
673
|
+
*/
|
|
674
|
+
portExplicitlySet?: boolean;
|
|
675
|
+
/**
|
|
676
|
+
* Inclusive upper bound for automatic port discovery.
|
|
677
|
+
* @defaultValue `9348`
|
|
678
|
+
*/
|
|
679
|
+
portRangeEnd?: number;
|
|
680
|
+
/**
|
|
681
|
+
* File path used to cache the last successful relay port.
|
|
682
|
+
* @defaultValue `~/.webmcp/relay-port.json`
|
|
683
|
+
*/
|
|
684
|
+
persistPath?: string;
|
|
616
685
|
/**
|
|
617
686
|
* Allowed host page origins reported by browser `hello` messages.
|
|
618
687
|
* Use `["*"]` to allow all origins.
|
|
@@ -635,6 +704,18 @@ interface RelayBridgeServerOptions {
|
|
|
635
704
|
* @defaultValue `25000`
|
|
636
705
|
*/
|
|
637
706
|
invokeTimeoutMs?: number;
|
|
707
|
+
/**
|
|
708
|
+
* Human-readable relay label reported in discovery handshakes.
|
|
709
|
+
*/
|
|
710
|
+
label?: string;
|
|
711
|
+
/**
|
|
712
|
+
* Optional workspace name reported in discovery handshakes.
|
|
713
|
+
*/
|
|
714
|
+
workspace?: string;
|
|
715
|
+
/**
|
|
716
|
+
* Stable relay identifier used to select between multiple relays.
|
|
717
|
+
*/
|
|
718
|
+
relayId?: string;
|
|
638
719
|
}
|
|
639
720
|
/**
|
|
640
721
|
* WebSocket relay between browser widget frames and MCP server calls.
|
|
@@ -652,14 +733,24 @@ declare class RelayBridgeServer extends EventEmitter {
|
|
|
652
733
|
*/
|
|
653
734
|
readonly registry: RelayRegistry;
|
|
654
735
|
private readonly host;
|
|
736
|
+
private readonly preferredPort;
|
|
655
737
|
private desiredPort;
|
|
738
|
+
private readonly portExplicitlySet;
|
|
739
|
+
private readonly portRangeEnd;
|
|
740
|
+
private readonly persistPath;
|
|
656
741
|
private readonly allowedOrigins;
|
|
657
742
|
private readonly maxPayloadBytes;
|
|
658
743
|
private readonly invokeTimeoutMs;
|
|
744
|
+
private readonly label;
|
|
745
|
+
private readonly workspace;
|
|
746
|
+
private readonly relayId;
|
|
747
|
+
private readonly instanceId;
|
|
659
748
|
private wss;
|
|
660
749
|
private readonly socketByConnectionId;
|
|
661
750
|
private readonly pendingInvocations;
|
|
662
751
|
private readonly relayClientConnectionIds;
|
|
752
|
+
private readonly heartbeatIntervalByConnectionId;
|
|
753
|
+
private readonly lastPongByConnectionId;
|
|
663
754
|
private readonly onStateChangedPushRelay;
|
|
664
755
|
private _mode;
|
|
665
756
|
private clientSocket;
|
|
@@ -707,10 +798,13 @@ declare class RelayBridgeServer extends EventEmitter {
|
|
|
707
798
|
getToolSourceMapFromRelay(): Record<string, string[]>;
|
|
708
799
|
/**
|
|
709
800
|
* Starts the bridge. Attempts to bind a WebSocket server (server mode).
|
|
710
|
-
* If
|
|
711
|
-
*
|
|
801
|
+
* If a compatible relay already owns a candidate port, joins it in client mode.
|
|
802
|
+
* If a non-relay process owns the port, continues searching the reserved range.
|
|
712
803
|
*/
|
|
713
804
|
start(): Promise<void>;
|
|
805
|
+
private startUsingPortStrategy;
|
|
806
|
+
private isAddressInUseError;
|
|
807
|
+
private tryAttachToExistingRelay;
|
|
714
808
|
/**
|
|
715
809
|
* Stops all relay resources and rejects any pending invocations.
|
|
716
810
|
*/
|
|
@@ -729,6 +823,7 @@ declare class RelayBridgeServer extends EventEmitter {
|
|
|
729
823
|
requestTabId?: string;
|
|
730
824
|
}): Promise<RelayCallToolResult>;
|
|
731
825
|
private startAsServer;
|
|
826
|
+
private buildServerHello;
|
|
732
827
|
private invokeToolLocally;
|
|
733
828
|
/**
|
|
734
829
|
* Handles a raw WebSocket message from a connected source.
|
|
@@ -749,18 +844,20 @@ declare class RelayBridgeServer extends EventEmitter {
|
|
|
749
844
|
* Handles source disconnection and rejects in-flight calls owned by that source.
|
|
750
845
|
*/
|
|
751
846
|
private onSocketClose;
|
|
847
|
+
private startHeartbeat;
|
|
848
|
+
private stopHeartbeat;
|
|
752
849
|
private startAsClient;
|
|
850
|
+
private connectToRelayServer;
|
|
753
851
|
private setupClientHandlers;
|
|
852
|
+
private sendRelayClientHandshake;
|
|
853
|
+
private parseRelayServerMessage;
|
|
854
|
+
private processRelayServerMessage;
|
|
754
855
|
private scheduleReconnect;
|
|
755
856
|
/**
|
|
756
857
|
* Attempts to promote from client to server mode when reconnecting.
|
|
757
|
-
*
|
|
858
|
+
* Re-runs the same attach-or-bind strategy used during startup.
|
|
758
859
|
*/
|
|
759
860
|
private reconnectWithModePromotion;
|
|
760
|
-
/**
|
|
761
|
-
* Reconnects as a client to an existing relay server.
|
|
762
|
-
*/
|
|
763
|
-
private reconnectAsClient;
|
|
764
861
|
private invokeToolViaRelay;
|
|
765
862
|
/**
|
|
766
863
|
* Builds the complete relay response payload including tools and source metadata.
|
|
@@ -789,7 +886,11 @@ declare class RelayBridgeServer extends EventEmitter {
|
|
|
789
886
|
interface CliOptions {
|
|
790
887
|
host: string;
|
|
791
888
|
port: number;
|
|
889
|
+
portExplicitlySet: boolean;
|
|
792
890
|
allowedOrigins: string[];
|
|
891
|
+
label?: string;
|
|
892
|
+
workspace?: string;
|
|
893
|
+
relayId?: string;
|
|
793
894
|
}
|
|
794
895
|
/**
|
|
795
896
|
* Parses supported CLI flags for relay startup.
|
|
@@ -836,7 +937,9 @@ declare class LocalRelayMcpServer {
|
|
|
836
937
|
*/
|
|
837
938
|
readonly bridge: RelayBridgeServer;
|
|
838
939
|
private readonly mcpServer;
|
|
940
|
+
private readonly staticToolData;
|
|
839
941
|
private readonly dynamicToolHandles;
|
|
942
|
+
private readonly dynamicToolData;
|
|
840
943
|
private readonly dynamicToolSignature;
|
|
841
944
|
private syncing;
|
|
842
945
|
private syncRequested;
|
|
@@ -867,6 +970,18 @@ declare class LocalRelayMcpServer {
|
|
|
867
970
|
* Returns dynamic tool names currently registered in MCP.
|
|
868
971
|
*/
|
|
869
972
|
listDynamicToolNames(): string[];
|
|
973
|
+
/**
|
|
974
|
+
* Overrides the SDK's ListTools handler to return real JSON Schema
|
|
975
|
+
* for dynamic tools instead of the empty `z.object({}).passthrough()`
|
|
976
|
+
* schema that the SDK would otherwise convert to `{ type: 'object' }`.
|
|
977
|
+
*
|
|
978
|
+
* The MCP SDK's McpServer internally runs `toJsonSchemaCompat()` on
|
|
979
|
+
* registered inputSchema values, which strips plain JSON Schema objects
|
|
980
|
+
* (non-Zod) to empty schemas. This override bypasses that conversion
|
|
981
|
+
* for dynamic (relayed) tools while preserving static tools as-is.
|
|
982
|
+
*/
|
|
983
|
+
private overrideListToolsHandler;
|
|
984
|
+
private registerStaticTool;
|
|
870
985
|
/**
|
|
871
986
|
* Registers built-in management tools exposed by the relay.
|
|
872
987
|
*/
|
|
@@ -940,5 +1055,5 @@ declare function buildPublicToolName(options: {
|
|
|
940
1055
|
disambiguate?: boolean;
|
|
941
1056
|
}): string;
|
|
942
1057
|
//#endregion
|
|
943
|
-
export { type AggregatedTool, type BrowserToRelayMessage, BrowserToRelayMessageSchema, CallToolRequestParamsSchema, type CallToolResult, CallToolResultSchema, type CliOptions, DEFAULT_TOOL_INPUT_SCHEMA, HelloRequiredError, InboundToolSchema, LocalRelayMcpServer, type LocalRelayMcpServerOptions, NormalizedToolSchema, RelayBridgeServer, type RelayBridgeServerOptions, type RelayCallToolResult, type RelayClientToServerMessage, RelayClientToServerMessageSchema, type RelayInvokeArgs, RelayInvokeArgsSchema, RelayRegistry, type RelayServerToClientMessage, RelayServerToClientMessageSchema, type RelaySourceInfo, RelaySourceInfoSchema, type RelayToBrowserMessage, RelayToBrowserMessageSchema, type RelayTool, type RelayToolAnnotations, type ResolvedInvocation, type SourceInfo, type Tool, type ToolAnnotations, ToolAnnotationsSchema, ToolSchema, buildPublicToolName, extractSanitizedDomain, normalizeInboundTool, parseCliOptions, printHelp, sanitizeName };
|
|
1058
|
+
export { type AggregatedTool, type BrowserToRelayMessage, BrowserToRelayMessageSchema, CallToolRequestParamsSchema, type CallToolResult, CallToolResultSchema, type CliOptions, DEFAULT_TOOL_INPUT_SCHEMA, HelloRequiredError, InboundToolSchema, LocalRelayMcpServer, type LocalRelayMcpServerOptions, NormalizedToolSchema, RelayBridgeServer, type RelayBridgeServerOptions, type RelayCallToolResult, type RelayClientToServerMessage, RelayClientToServerMessageSchema, type RelayDescriptor, RelayDescriptorSchema, type RelayInvokeArgs, RelayInvokeArgsSchema, RelayRegistry, type RelayServerToClientMessage, RelayServerToClientMessageSchema, type RelaySourceInfo, RelaySourceInfoSchema, type RelayToBrowserMessage, RelayToBrowserMessageSchema, type RelayTool, type RelayToolAnnotations, type ResolvedInvocation, type ServerHelloMessage, ServerHelloMessageSchema, type SourceInfo, type Tool, type ToolAnnotations, ToolAnnotationsSchema, ToolSchema, buildPublicToolName, extractSanitizedDomain, normalizeInboundTool, parseCliOptions, printHelp, sanitizeName };
|
|
944
1059
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/protocol.ts","../src/schemas.ts","../src/registry.ts","../src/bridgeServer.ts","../src/cli-utils.ts","../src/mcpRelayServer.ts","../src/naming.ts"],"sourcesContent":[],"mappings":";;;;;;;;;cAca,sBAAoB,CAAA,CAAA;EAApB,WAAA,eAEX,YAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAQW,mBAAiB,CAAA,CAAA;;;;;;cAKjB,uBAAqB,CAAA,CAAA,YAAA,CAAA,CAAA,UAAA,CAAA,CAAA,WAAA,CAAA,CAAA;;;;;cAMrB,2BAA2B;;;;KAQ5B,SAAA,GAAY,CAAA,CAAE,aAAa;;;;KAK3B,oBAAA,GAAuB;;;AAxBnC;KA6BY,mBAAA,GAAsB;;;;AAxBrB,KA6BD,eAAA,GAAkB,OA7BkD,CA6B1C,CAAA,CAAE,KA7BwC,CAAA,OA6B3B,qBA7B2B,CAAA,EAAA,SAAA,CAAA;;;;;;AAMhF;AAQY,iBAuBI,oBAAA,CAvBuB,OAAb,EAuBoB,CAAA,CAAE,KAvBjB,CAAA,OAuB8B,iBAvB9B,CAAA,CAAA,EAuBmD,SAvBnD;;;;;;cC9BlB,2BAAyB,CAAA,CAAA;;EDCzB,KAAA,aAAA;;;;;;;;;cCwDA,6BAA2B,CAAA,CAAA,uBAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAA,aAAA,CAAA,EAAA,OAAA,GAAA,SAAA;IAAA,CAAA,GAAA,SAAA;IAW5B,SAAA,CAAA,EAAA;MAKA,WAAA,CAAA,EAAmB,UAAA,GAAkB,UAAA,GAAA,WAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/protocol.ts","../src/schemas.ts","../src/registry.ts","../src/bridgeServer.ts","../src/cli-utils.ts","../src/mcpRelayServer.ts","../src/naming.ts"],"sourcesContent":[],"mappings":";;;;;;;;;cAca,sBAAoB,CAAA,CAAA;EAApB,WAAA,eAEX,YAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAQW,mBAAiB,CAAA,CAAA;;;;;;cAKjB,uBAAqB,CAAA,CAAA,YAAA,CAAA,CAAA,UAAA,CAAA,CAAA,WAAA,CAAA,CAAA;;;;;cAMrB,2BAA2B;;;;KAQ5B,SAAA,GAAY,CAAA,CAAE,aAAa;;;;KAK3B,oBAAA,GAAuB;;;AAxBnC;KA6BY,mBAAA,GAAsB;;;;AAxBrB,KA6BD,eAAA,GAAkB,OA7BkD,CA6B1C,CAAA,CAAE,KA7BwC,CAAA,OA6B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;;;WASd;;;;;;;EFhMuB,IAAA,CAAA,CAAA,EEgRxB,OFhRwB,CAAA,IAAA,CAAA;EAW5B;AAKZ;AAKA;;;;;;;qCEkWU;;;MAKL,QAAQ;EFvWqB,QAAA,aAAA;EAAA,QAAA,gBAAA;EAYtB,QAAA,iBAAe;EAKd;;;;;;;;;;;;;;EAAwB,QAAA,uBAAA;EAAA;AAUrC;AA6BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAwC,QAAA,uBAAA;EAAA;AAUxC;AASA;;;;;;;;UGnKiB,UAAA;;;EJWJ,iBAAA,EAAA,OAEX;;;;;;;;;iBIAc,eAAA,kBAAiC;;;;iBA8FjC,SAAA,CAAA;;;;;;UCjEN,8BAAA;EL/BG;;;;;;;;;;;;;;;KKgDD,0BAAA,GAA6B;UAEzB;;;;kBACwB;;;;;cAM3B,mBAAA;;;;mBAIM;;;;;;;;;;;;wBAeI;;;;WAqBN;;;;;;qBAUU,YAAY;;;;gBAYjB;;;;UAON;;;;;EL9HiB;;AAUjC;;;;;AAKA;;;EAAkC,QAAA,wBAAA;EAAA,QAAA,kBAAA;EAAA;AAMlC;AAQA;EAKY,QAAA,mBAAoB;EAKpB;AAKZ;;EAAwC,QAAA,gBAAA;EAAV;;AAQ9B;;;;;;;;ACrDA;;;;;;;;;;;;;;EAyDa,QAAA,iBAAA;;;;;;;;;;;;;;;;;;;;;;;;iBKzDG,YAAA;;;ANChB;iBMMgB,sBAAA;;;;;;;iBA6BA,mBAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as
|
|
1
|
+
import { C as normalizeInboundTool, S as ToolSchema, T as printHelp, _ as DEFAULT_TOOL_INPUT_SCHEMA, a as RelayDescriptorSchema, b as RelayInvokeArgsSchema, c as RelayToBrowserMessageSchema, d as RelayRegistry, f as buildPublicToolName, g as CallToolResultSchema, h as CallToolRequestParamsSchema, i as RelayClientToServerMessageSchema, l as ServerHelloMessageSchema, m as sanitizeName, n as RelayBridgeServer, o as RelayServerToClientMessageSchema, p as extractSanitizedDomain, r as BrowserToRelayMessageSchema, s as RelaySourceInfoSchema, t as LocalRelayMcpServer, u as HelloRequiredError, v as InboundToolSchema, w as parseCliOptions, x as ToolAnnotationsSchema, y as NormalizedToolSchema } from "./mcpRelayServer-rbay_DSr.js";
|
|
2
2
|
|
|
3
|
-
export { BrowserToRelayMessageSchema, CallToolRequestParamsSchema, CallToolResultSchema, DEFAULT_TOOL_INPUT_SCHEMA, HelloRequiredError, InboundToolSchema, LocalRelayMcpServer, NormalizedToolSchema, RelayBridgeServer, RelayClientToServerMessageSchema, RelayInvokeArgsSchema, RelayRegistry, RelayServerToClientMessageSchema, RelaySourceInfoSchema, RelayToBrowserMessageSchema, ToolAnnotationsSchema, ToolSchema, buildPublicToolName, extractSanitizedDomain, normalizeInboundTool, parseCliOptions, printHelp, sanitizeName };
|
|
3
|
+
export { BrowserToRelayMessageSchema, CallToolRequestParamsSchema, CallToolResultSchema, DEFAULT_TOOL_INPUT_SCHEMA, HelloRequiredError, InboundToolSchema, LocalRelayMcpServer, NormalizedToolSchema, RelayBridgeServer, RelayClientToServerMessageSchema, RelayDescriptorSchema, RelayInvokeArgsSchema, RelayRegistry, RelayServerToClientMessageSchema, RelaySourceInfoSchema, RelayToBrowserMessageSchema, ServerHelloMessageSchema, ToolAnnotationsSchema, ToolSchema, buildPublicToolName, extractSanitizedDomain, normalizeInboundTool, parseCliOptions, printHelp, sanitizeName };
|