patchright-bun-core 1.58.2 → 1.59.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/ThirdPartyNotices.txt +126 -650
- package/browsers.json +16 -14
- package/lib/bootstrap.js +77 -0
- package/lib/cli/browserActions.js +308 -0
- package/lib/cli/driver.js +3 -2
- package/lib/cli/installActions.js +171 -0
- package/lib/cli/program.js +47 -411
- package/lib/client/android.js +4 -4
- package/lib/client/api.js +3 -3
- package/lib/client/browser.js +8 -0
- package/lib/client/browserContext.js +18 -37
- package/lib/client/browserType.js +19 -51
- package/lib/client/cdpSession.js +6 -2
- package/lib/client/channelOwner.js +1 -1
- package/lib/client/{webSocket.js → connect.js} +57 -7
- package/lib/client/connection.js +8 -4
- package/lib/client/consoleMessage.js +3 -0
- package/lib/client/debugger.js +57 -0
- package/lib/client/dialog.js +8 -1
- package/lib/client/disposable.js +76 -0
- package/lib/client/electron.js +1 -0
- package/lib/client/elementHandle.js +1 -4
- package/lib/client/events.js +3 -3
- package/lib/client/fetch.js +0 -1
- package/lib/client/frame.js +0 -5
- package/lib/client/harRouter.js +13 -1
- package/lib/client/jsHandle.js +0 -4
- package/lib/client/locator.js +5 -7
- package/lib/client/network.js +14 -11
- package/lib/client/page.js +34 -48
- package/lib/client/platform.js +0 -3
- package/lib/client/screencast.js +88 -0
- package/lib/client/selectors.js +3 -1
- package/lib/client/tracing.js +11 -4
- package/lib/client/video.js +13 -20
- package/lib/generated/bindingsControllerSource.js +1 -1
- package/lib/generated/clockSource.js +1 -1
- package/lib/generated/injectedScriptSource.js +1 -1
- package/lib/generated/pollingRecorderSource.js +1 -1
- package/lib/generated/storageScriptSource.js +1 -1
- package/lib/generated/utilityScriptSource.js +1 -1
- package/lib/mcpBundle.js +0 -6
- package/lib/mcpBundleImpl.js +91 -0
- package/lib/protocol/validator.js +216 -118
- package/lib/protocol/validatorPrimitives.js +1 -1
- package/lib/remote/playwrightConnection.js +10 -8
- package/lib/remote/playwrightPipeServer.js +100 -0
- package/lib/remote/playwrightServer.js +13 -8
- package/lib/remote/playwrightWebSocketServer.js +73 -0
- package/lib/remote/serverTransport.js +96 -0
- package/lib/server/android/android.js +2 -2
- package/lib/server/bidi/bidiBrowser.js +30 -8
- package/lib/server/bidi/bidiChromium.js +18 -5
- package/lib/server/bidi/bidiNetworkManager.js +39 -11
- package/lib/server/bidi/bidiPage.js +31 -15
- package/lib/server/bidi/third_party/firefoxPrefs.js +3 -1
- package/lib/server/browser.js +84 -21
- package/lib/server/browserContext.js +97 -58
- package/lib/server/browserType.js +14 -12
- package/lib/server/chromium/chromium.js +15 -13
- package/lib/server/chromium/crBrowser.js +18 -10
- package/lib/server/chromium/crNetworkManager.js +4 -4
- package/lib/server/chromium/crPage.js +26 -64
- package/lib/server/chromium/crServiceWorker.js +5 -4
- package/lib/server/clock.js +33 -33
- package/lib/server/console.js +5 -1
- package/lib/server/debugController.js +12 -6
- package/lib/server/debugger.js +40 -47
- package/lib/server/deviceDescriptorsSource.json +137 -137
- package/lib/server/dispatchers/browserContextDispatcher.js +27 -30
- package/lib/server/dispatchers/browserDispatcher.js +11 -5
- package/lib/server/dispatchers/browserTypeDispatcher.js +7 -0
- package/lib/server/dispatchers/cdpSessionDispatcher.js +4 -1
- package/lib/server/dispatchers/debuggerDispatcher.js +84 -0
- package/lib/server/dispatchers/dispatcher.js +1 -1
- package/lib/server/dispatchers/disposableDispatcher.js +39 -0
- package/lib/server/dispatchers/electronDispatcher.js +2 -1
- package/lib/server/dispatchers/frameDispatcher.js +3 -3
- package/lib/server/dispatchers/localUtilsDispatcher.js +37 -1
- package/lib/server/dispatchers/networkDispatchers.js +6 -5
- package/lib/server/dispatchers/pageDispatcher.js +101 -38
- package/lib/server/dispatchers/webSocketRouteDispatcher.js +4 -5
- package/lib/server/disposable.js +41 -0
- package/lib/server/dom.js +44 -26
- package/lib/server/download.js +3 -2
- package/lib/server/electron/electron.js +12 -7
- package/lib/server/firefox/ffBrowser.js +9 -19
- package/lib/server/firefox/ffInput.js +21 -5
- package/lib/server/firefox/ffNetworkManager.js +2 -2
- package/lib/server/firefox/ffPage.js +24 -27
- package/lib/server/frames.js +40 -11
- package/lib/server/har/harRecorder.js +2 -2
- package/lib/server/har/harTracer.js +5 -4
- package/lib/server/input.js +49 -4
- package/lib/server/instrumentation.js +5 -0
- package/lib/server/launchApp.js +0 -1
- package/lib/server/localUtils.js +6 -6
- package/lib/server/network.js +9 -8
- package/lib/server/overlay.js +138 -0
- package/lib/server/page.js +111 -51
- package/lib/server/progress.js +6 -0
- package/lib/server/recorder/recorderApp.js +9 -8
- package/lib/server/recorder.js +76 -40
- package/lib/server/registry/index.js +54 -81
- package/lib/server/registry/nativeDeps.js +1 -0
- package/lib/server/screencast.js +90 -143
- package/lib/server/trace/recorder/snapshotter.js +2 -2
- package/lib/server/trace/recorder/tracing.js +87 -36
- package/lib/server/trace/viewer/traceViewer.js +3 -4
- package/lib/server/usKeyboardLayout.js +7 -0
- package/lib/server/utils/comparators.js +1 -1
- package/lib/server/utils/disposable.js +32 -0
- package/lib/server/utils/eventsHelper.js +3 -1
- package/lib/server/utils/fileUtils.js +16 -2
- package/lib/server/utils/happyEyeballs.js +15 -12
- package/lib/server/utils/hostPlatform.js +0 -15
- package/lib/server/utils/httpServer.js +5 -3
- package/lib/server/utils/network.js +2 -1
- package/lib/server/utils/nodePlatform.js +0 -6
- package/lib/server/utils/processLauncher.js +8 -6
- package/lib/server/utils/zipFile.js +2 -2
- package/lib/server/videoRecorder.js +82 -12
- package/lib/server/webkit/wkBrowser.js +1 -6
- package/lib/server/webkit/wkPage.js +27 -25
- package/lib/server/webkit/wkWorkers.js +2 -1
- package/lib/serverRegistry.js +156 -0
- package/lib/tools/backend/browserBackend.js +79 -0
- package/lib/tools/backend/common.js +63 -0
- package/lib/tools/backend/config.js +41 -0
- package/lib/tools/backend/console.js +66 -0
- package/lib/tools/backend/context.js +296 -0
- package/lib/tools/backend/cookies.js +152 -0
- package/lib/tools/backend/devtools.js +69 -0
- package/lib/tools/backend/dialogs.js +59 -0
- package/lib/tools/backend/evaluate.js +64 -0
- package/lib/tools/backend/files.js +60 -0
- package/lib/tools/backend/form.js +64 -0
- package/lib/tools/backend/keyboard.js +155 -0
- package/lib/tools/backend/logFile.js +95 -0
- package/lib/tools/backend/mouse.js +168 -0
- package/lib/tools/backend/navigate.js +106 -0
- package/lib/tools/backend/network.js +135 -0
- package/lib/tools/backend/pdf.js +48 -0
- package/lib/tools/backend/response.js +305 -0
- package/lib/tools/backend/route.js +140 -0
- package/lib/tools/backend/runCode.js +77 -0
- package/lib/tools/backend/screenshot.js +88 -0
- package/lib/tools/backend/sessionLog.js +74 -0
- package/lib/tools/backend/snapshot.js +208 -0
- package/lib/tools/backend/storage.js +68 -0
- package/lib/tools/backend/tab.js +445 -0
- package/lib/tools/backend/tabs.js +67 -0
- package/lib/tools/backend/tool.js +47 -0
- package/lib/tools/backend/tools.js +102 -0
- package/lib/tools/backend/tracing.js +78 -0
- package/lib/tools/backend/utils.js +83 -0
- package/lib/tools/backend/verify.js +151 -0
- package/lib/tools/backend/video.js +98 -0
- package/lib/tools/backend/wait.js +63 -0
- package/lib/tools/backend/webstorage.js +223 -0
- package/lib/tools/cli-client/cli.js +6 -0
- package/lib/tools/cli-client/help.json +399 -0
- package/lib/tools/cli-client/minimist.js +128 -0
- package/lib/tools/cli-client/program.js +350 -0
- package/lib/tools/cli-client/registry.js +176 -0
- package/lib/tools/cli-client/session.js +289 -0
- package/lib/tools/cli-client/skill/SKILL.md +328 -0
- package/lib/tools/cli-client/skill/references/element-attributes.md +23 -0
- package/lib/tools/cli-client/skill/references/playwright-tests.md +39 -0
- package/lib/tools/cli-client/skill/references/request-mocking.md +87 -0
- package/lib/tools/cli-client/skill/references/running-code.md +231 -0
- package/lib/tools/cli-client/skill/references/session-management.md +169 -0
- package/lib/tools/cli-client/skill/references/storage-state.md +275 -0
- package/lib/tools/cli-client/skill/references/test-generation.md +88 -0
- package/lib/tools/cli-client/skill/references/tracing.md +139 -0
- package/lib/tools/cli-client/skill/references/video-recording.md +143 -0
- package/lib/tools/cli-daemon/command.js +73 -0
- package/lib/tools/cli-daemon/commands.js +956 -0
- package/lib/tools/cli-daemon/daemon.js +157 -0
- package/lib/tools/cli-daemon/helpGenerator.js +177 -0
- package/lib/tools/cli-daemon/program.js +129 -0
- package/lib/tools/dashboard/appIcon.png +0 -0
- package/lib/tools/dashboard/dashboardApp.js +284 -0
- package/lib/tools/dashboard/dashboardController.js +296 -0
- package/lib/tools/exports.js +60 -0
- package/lib/tools/mcp/browserFactory.js +233 -0
- package/lib/tools/mcp/cdpRelay.js +352 -0
- package/lib/tools/mcp/cli-stub.js +7 -0
- package/lib/tools/mcp/config.d.js +16 -0
- package/lib/tools/mcp/config.js +446 -0
- package/lib/tools/mcp/configIni.js +189 -0
- package/lib/tools/mcp/extensionContextFactory.js +55 -0
- package/lib/tools/mcp/index.js +62 -0
- package/lib/tools/mcp/log.js +35 -0
- package/lib/tools/mcp/program.js +107 -0
- package/lib/tools/mcp/protocol.js +28 -0
- package/lib/tools/mcp/watchdog.js +44 -0
- package/lib/tools/trace/SKILL.md +171 -0
- package/lib/{server/trace/viewer/traceParser.js → tools/trace/installSkill.js} +15 -39
- package/lib/tools/trace/traceActions.js +142 -0
- package/lib/tools/trace/traceAttachments.js +69 -0
- package/lib/tools/trace/traceCli.js +87 -0
- package/lib/tools/trace/traceConsole.js +97 -0
- package/lib/tools/trace/traceErrors.js +55 -0
- package/lib/tools/trace/traceOpen.js +69 -0
- package/lib/tools/trace/traceParser.js +96 -0
- package/lib/tools/trace/traceRequests.js +182 -0
- package/lib/tools/trace/traceScreenshot.js +68 -0
- package/lib/tools/trace/traceSnapshot.js +149 -0
- package/lib/tools/trace/traceUtils.js +153 -0
- package/lib/tools/utils/connect.js +32 -0
- package/lib/tools/utils/mcp/http.js +152 -0
- package/lib/tools/utils/mcp/server.js +230 -0
- package/lib/tools/utils/mcp/tool.js +47 -0
- package/lib/tools/utils/socketConnection.js +108 -0
- package/lib/utils/isomorphic/formatUtils.js +64 -0
- package/lib/utils/isomorphic/jsonSchema.js +89 -0
- package/lib/utils/isomorphic/mimeType.js +7 -2
- package/lib/utils/isomorphic/protocolFormatter.js +2 -2
- package/lib/utils/isomorphic/protocolMetainfo.js +127 -106
- package/lib/utils/isomorphic/stringUtils.js +3 -3
- package/lib/utils/isomorphic/timeoutRunner.js +3 -3
- package/lib/utils/isomorphic/trace/snapshotRenderer.js +35 -42
- package/lib/utils/isomorphic/trace/traceLoader.js +15 -14
- package/lib/utils/isomorphic/trace/traceModel.js +3 -2
- package/lib/utils/isomorphic/trace/traceModernizer.js +1 -0
- package/lib/utils/isomorphic/urlMatch.js +54 -1
- package/lib/utils/isomorphic/utilityScriptSerializers.js +11 -0
- package/lib/utils.js +6 -2
- package/lib/utilsBundle.js +3 -21
- package/lib/utilsBundleImpl/index.js +132 -133
- package/lib/vite/dashboard/assets/index-BAOybkp8.js +50 -0
- package/lib/vite/dashboard/assets/index-CZAYOG76.css +1 -0
- package/lib/vite/dashboard/index.html +28 -0
- package/lib/vite/htmlReport/index.html +2 -70
- package/lib/vite/htmlReport/report.css +1 -0
- package/lib/vite/htmlReport/report.js +72 -0
- package/lib/vite/recorder/assets/{codeMirrorModule-DadYNm1I.js → codeMirrorModule-C8KMvO9L.js} +20 -20
- package/lib/vite/recorder/assets/index-CqAYX1I3.js +193 -0
- package/lib/vite/recorder/index.html +1 -1
- package/lib/vite/traceViewer/assets/{codeMirrorModule-a5XoALAZ.js → codeMirrorModule-DS0FLvoc.js} +20 -20
- package/lib/vite/traceViewer/assets/defaultSettingsView-GTWI-W_B.js +262 -0
- package/lib/vite/traceViewer/defaultSettingsView.B4dS75f0.css +1 -0
- package/lib/vite/traceViewer/{index.BVu7tZDe.css → index.CzXZzn5A.css} +1 -1
- package/lib/vite/traceViewer/{index.BDwrLSGN.js → index.Dtstcb7U.js} +1 -1
- package/lib/vite/traceViewer/index.html +4 -4
- package/lib/vite/traceViewer/sw.bundle.js +4 -4
- package/lib/vite/traceViewer/uiMode.Vipi55dB.js +6 -0
- package/lib/vite/traceViewer/uiMode.html +3 -3
- package/lib/zipBundleImpl.js +2 -2
- package/lib/zodBundle.js +39 -0
- package/lib/zodBundleImpl.js +40 -0
- package/package.json +6 -1
- package/types/protocol.d.ts +947 -51
- package/types/types.d.ts +854 -74
- package/lib/client/pageAgent.js +0 -64
- package/lib/mcpBundleImpl/index.js +0 -147
- package/lib/server/agent/actionRunner.js +0 -335
- package/lib/server/agent/actions.js +0 -128
- package/lib/server/agent/codegen.js +0 -111
- package/lib/server/agent/context.js +0 -150
- package/lib/server/agent/expectTools.js +0 -156
- package/lib/server/agent/pageAgent.js +0 -204
- package/lib/server/agent/performTools.js +0 -262
- package/lib/server/agent/tool.js +0 -109
- package/lib/server/dispatchers/pageAgentDispatcher.js +0 -96
- package/lib/vite/recorder/assets/index-BhTWtUlo.js +0 -193
- package/lib/vite/traceViewer/assets/defaultSettingsView-CJSZINFr.js +0 -266
- package/lib/vite/traceViewer/defaultSettingsView.7ch9cixO.css +0 -1
- package/lib/vite/traceViewer/uiMode.CQJ9SCIQ.js +0 -5
- /package/lib/{server/utils → utils/isomorphic}/imageUtils.js +0 -0
- /package/lib/utils/isomorphic/{traceUtils.js → trace/traceUtils.js} +0 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var server_exports = {};
|
|
30
|
+
__export(server_exports, {
|
|
31
|
+
allRootPaths: () => allRootPaths,
|
|
32
|
+
connect: () => connect,
|
|
33
|
+
createServer: () => createServer,
|
|
34
|
+
firstRootPath: () => firstRootPath,
|
|
35
|
+
start: () => start
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(server_exports);
|
|
38
|
+
var import_url = require("url");
|
|
39
|
+
var import_utilsBundle = require("../../../utilsBundle");
|
|
40
|
+
var mcpBundle = __toESM(require("../../../mcpBundle"));
|
|
41
|
+
var import_http = require("./http");
|
|
42
|
+
var import_tool = require("./tool");
|
|
43
|
+
const serverDebug = (0, import_utilsBundle.debug)("pw:mcp:server");
|
|
44
|
+
const serverDebugResponse = (0, import_utilsBundle.debug)("pw:mcp:server:response");
|
|
45
|
+
class BackendManager {
|
|
46
|
+
constructor() {
|
|
47
|
+
this._backends = /* @__PURE__ */ new Map();
|
|
48
|
+
}
|
|
49
|
+
async createBackend(factory, clientInfo) {
|
|
50
|
+
const backend = await factory.create(clientInfo);
|
|
51
|
+
await backend.initialize?.(clientInfo);
|
|
52
|
+
this._backends.set(backend, factory);
|
|
53
|
+
return backend;
|
|
54
|
+
}
|
|
55
|
+
async disposeBackend(backend) {
|
|
56
|
+
const factory = this._backends.get(backend);
|
|
57
|
+
if (!factory)
|
|
58
|
+
return;
|
|
59
|
+
await backend.dispose?.();
|
|
60
|
+
await factory.disposed(backend).catch(serverDebug);
|
|
61
|
+
this._backends.delete(backend);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const backendManager = new BackendManager();
|
|
65
|
+
async function connect(factory, transport, runHeartbeat) {
|
|
66
|
+
const server = createServer(factory.name, factory.version, factory, runHeartbeat);
|
|
67
|
+
await server.connect(transport);
|
|
68
|
+
}
|
|
69
|
+
function createServer(name, version, factory, runHeartbeat) {
|
|
70
|
+
const server = new mcpBundle.Server({ name, version }, {
|
|
71
|
+
capabilities: {
|
|
72
|
+
tools: {}
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
server.setRequestHandler(mcpBundle.ListToolsRequestSchema, async () => {
|
|
76
|
+
serverDebug("listTools");
|
|
77
|
+
return { tools: factory.toolSchemas.map((s) => (0, import_tool.toMcpTool)(s)) };
|
|
78
|
+
});
|
|
79
|
+
let backendPromise;
|
|
80
|
+
const onClose = () => backendPromise?.then((b) => backendManager.disposeBackend(b)).catch(serverDebug);
|
|
81
|
+
addServerListener(server, "close", onClose);
|
|
82
|
+
server.setRequestHandler(mcpBundle.CallToolRequestSchema, async (request, extra) => {
|
|
83
|
+
serverDebug("callTool", request);
|
|
84
|
+
const progressToken = request.params._meta?.progressToken;
|
|
85
|
+
let progressCounter = 0;
|
|
86
|
+
const progress = progressToken ? (params) => {
|
|
87
|
+
extra.sendNotification({
|
|
88
|
+
method: "notifications/progress",
|
|
89
|
+
params: {
|
|
90
|
+
progressToken,
|
|
91
|
+
progress: params.progress ?? ++progressCounter,
|
|
92
|
+
total: params.total,
|
|
93
|
+
message: params.message
|
|
94
|
+
}
|
|
95
|
+
}).catch((e) => serverDebug("notification", e));
|
|
96
|
+
} : () => {
|
|
97
|
+
};
|
|
98
|
+
try {
|
|
99
|
+
if (!backendPromise) {
|
|
100
|
+
backendPromise = initializeServer(server, factory, runHeartbeat).catch((e) => {
|
|
101
|
+
backendPromise = void 0;
|
|
102
|
+
throw e;
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
const backend = await backendPromise;
|
|
106
|
+
const toolResult = await backend.callTool(request.params.name, request.params.arguments || {}, progress);
|
|
107
|
+
if (toolResult.isClose) {
|
|
108
|
+
await backendManager.disposeBackend(backend).catch(serverDebug);
|
|
109
|
+
backendPromise = void 0;
|
|
110
|
+
delete toolResult.isClose;
|
|
111
|
+
}
|
|
112
|
+
const mergedResult = mergeTextParts(toolResult);
|
|
113
|
+
serverDebugResponse("callResult", mergedResult);
|
|
114
|
+
return mergedResult;
|
|
115
|
+
} catch (error) {
|
|
116
|
+
return {
|
|
117
|
+
content: [{ type: "text", text: "### Error\n" + String(error) }],
|
|
118
|
+
isError: true
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
return server;
|
|
123
|
+
}
|
|
124
|
+
const initializeServer = async (server, factory, runHeartbeat) => {
|
|
125
|
+
const capabilities = server.getClientCapabilities();
|
|
126
|
+
let clientRoots = [];
|
|
127
|
+
if (capabilities?.roots) {
|
|
128
|
+
const { roots } = await server.listRoots().catch((e) => {
|
|
129
|
+
serverDebug(e);
|
|
130
|
+
return { roots: [] };
|
|
131
|
+
});
|
|
132
|
+
clientRoots = roots;
|
|
133
|
+
}
|
|
134
|
+
const clientInfo = {
|
|
135
|
+
cwd: firstRootPath(clientRoots)
|
|
136
|
+
};
|
|
137
|
+
const backend = await backendManager.createBackend(factory, clientInfo);
|
|
138
|
+
if (runHeartbeat)
|
|
139
|
+
startHeartbeat(server);
|
|
140
|
+
return backend;
|
|
141
|
+
};
|
|
142
|
+
const startHeartbeat = (server) => {
|
|
143
|
+
const beat = () => {
|
|
144
|
+
Promise.race([
|
|
145
|
+
server.ping(),
|
|
146
|
+
new Promise((_, reject) => setTimeout(() => reject(new Error("ping timeout")), 5e3))
|
|
147
|
+
]).then(() => {
|
|
148
|
+
setTimeout(beat, 3e3);
|
|
149
|
+
}).catch(() => {
|
|
150
|
+
void server.close();
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
beat();
|
|
154
|
+
};
|
|
155
|
+
function addServerListener(server, event, listener) {
|
|
156
|
+
const oldListener = server[`on${event}`];
|
|
157
|
+
server[`on${event}`] = () => {
|
|
158
|
+
oldListener?.();
|
|
159
|
+
listener();
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
async function start(serverBackendFactory, options = {}) {
|
|
163
|
+
if (options.port === void 0) {
|
|
164
|
+
await connect(serverBackendFactory, new mcpBundle.StdioServerTransport(), false);
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
const url = await (0, import_http.startMcpHttpServer)(options, serverBackendFactory, options.allowedHosts);
|
|
168
|
+
const mcpConfig = { mcpServers: {} };
|
|
169
|
+
mcpConfig.mcpServers[serverBackendFactory.nameInConfig] = {
|
|
170
|
+
url: `${url}/mcp`
|
|
171
|
+
};
|
|
172
|
+
const message = [
|
|
173
|
+
`Listening on ${url}`,
|
|
174
|
+
"Put this in your client config:",
|
|
175
|
+
JSON.stringify(mcpConfig, void 0, 2),
|
|
176
|
+
"For legacy SSE transport support, you can use the /sse endpoint instead."
|
|
177
|
+
].join("\n");
|
|
178
|
+
console.error(message);
|
|
179
|
+
}
|
|
180
|
+
function firstRootPath(roots) {
|
|
181
|
+
return allRootPaths(roots)[0];
|
|
182
|
+
}
|
|
183
|
+
function allRootPaths(roots) {
|
|
184
|
+
const paths = [];
|
|
185
|
+
for (const root of roots) {
|
|
186
|
+
const url = new URL(root.uri);
|
|
187
|
+
let rootPath;
|
|
188
|
+
try {
|
|
189
|
+
rootPath = (0, import_url.fileURLToPath)(url);
|
|
190
|
+
} catch (e) {
|
|
191
|
+
if (e.code === "ERR_INVALID_FILE_URL_PATH" && process.platform === "win32")
|
|
192
|
+
rootPath = decodeURIComponent(url.pathname);
|
|
193
|
+
}
|
|
194
|
+
if (!rootPath)
|
|
195
|
+
continue;
|
|
196
|
+
paths.push(rootPath);
|
|
197
|
+
}
|
|
198
|
+
if (paths.length === 0)
|
|
199
|
+
paths.push(process.cwd());
|
|
200
|
+
return paths;
|
|
201
|
+
}
|
|
202
|
+
function mergeTextParts(result) {
|
|
203
|
+
const content = [];
|
|
204
|
+
const testParts = [];
|
|
205
|
+
for (const part of result.content) {
|
|
206
|
+
if (part.type === "text") {
|
|
207
|
+
testParts.push(part.text);
|
|
208
|
+
continue;
|
|
209
|
+
}
|
|
210
|
+
if (testParts.length > 0) {
|
|
211
|
+
content.push({ type: "text", text: testParts.join("\n") });
|
|
212
|
+
testParts.length = 0;
|
|
213
|
+
}
|
|
214
|
+
content.push(part);
|
|
215
|
+
}
|
|
216
|
+
if (testParts.length > 0)
|
|
217
|
+
content.push({ type: "text", text: testParts.join("\n") });
|
|
218
|
+
return {
|
|
219
|
+
...result,
|
|
220
|
+
content
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
224
|
+
0 && (module.exports = {
|
|
225
|
+
allRootPaths,
|
|
226
|
+
connect,
|
|
227
|
+
createServer,
|
|
228
|
+
firstRootPath,
|
|
229
|
+
start
|
|
230
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var tool_exports = {};
|
|
20
|
+
__export(tool_exports, {
|
|
21
|
+
defineToolSchema: () => defineToolSchema,
|
|
22
|
+
toMcpTool: () => toMcpTool
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(tool_exports);
|
|
25
|
+
var import_zodBundle = require("../../../zodBundle");
|
|
26
|
+
function toMcpTool(tool) {
|
|
27
|
+
const readOnly = tool.type === "readOnly" || tool.type === "assertion";
|
|
28
|
+
return {
|
|
29
|
+
name: tool.name,
|
|
30
|
+
description: tool.description,
|
|
31
|
+
inputSchema: import_zodBundle.z.toJSONSchema(tool.inputSchema),
|
|
32
|
+
annotations: {
|
|
33
|
+
title: tool.title,
|
|
34
|
+
readOnlyHint: readOnly,
|
|
35
|
+
destructiveHint: !readOnly,
|
|
36
|
+
openWorldHint: true
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function defineToolSchema(tool) {
|
|
41
|
+
return tool;
|
|
42
|
+
}
|
|
43
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
+
0 && (module.exports = {
|
|
45
|
+
defineToolSchema,
|
|
46
|
+
toMcpTool
|
|
47
|
+
});
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var socketConnection_exports = {};
|
|
20
|
+
__export(socketConnection_exports, {
|
|
21
|
+
SocketConnection: () => SocketConnection,
|
|
22
|
+
compareSemver: () => compareSemver
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(socketConnection_exports);
|
|
25
|
+
class SocketConnection {
|
|
26
|
+
constructor(socket) {
|
|
27
|
+
this._pendingBuffers = [];
|
|
28
|
+
this._socket = socket;
|
|
29
|
+
socket.on("data", (buffer) => this._onData(buffer));
|
|
30
|
+
socket.on("close", () => {
|
|
31
|
+
this.onclose?.();
|
|
32
|
+
});
|
|
33
|
+
socket.on("error", (e) => console.error(`error: ${e.message}`));
|
|
34
|
+
}
|
|
35
|
+
async send(message) {
|
|
36
|
+
await new Promise((resolve, reject) => {
|
|
37
|
+
this._socket.write(`${JSON.stringify(message)}
|
|
38
|
+
`, (error) => {
|
|
39
|
+
if (error)
|
|
40
|
+
reject(error);
|
|
41
|
+
else
|
|
42
|
+
resolve(void 0);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
close() {
|
|
47
|
+
this._socket.destroy();
|
|
48
|
+
}
|
|
49
|
+
_onData(buffer) {
|
|
50
|
+
let end = buffer.indexOf("\n");
|
|
51
|
+
if (end === -1) {
|
|
52
|
+
this._pendingBuffers.push(buffer);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
this._pendingBuffers.push(buffer.slice(0, end));
|
|
56
|
+
const message = Buffer.concat(this._pendingBuffers).toString();
|
|
57
|
+
this._dispatchMessage(message);
|
|
58
|
+
let start = end + 1;
|
|
59
|
+
end = buffer.indexOf("\n", start);
|
|
60
|
+
while (end !== -1) {
|
|
61
|
+
const message2 = buffer.toString(void 0, start, end);
|
|
62
|
+
this._dispatchMessage(message2);
|
|
63
|
+
start = end + 1;
|
|
64
|
+
end = buffer.indexOf("\n", start);
|
|
65
|
+
}
|
|
66
|
+
this._pendingBuffers = [buffer.slice(start)];
|
|
67
|
+
}
|
|
68
|
+
_dispatchMessage(message) {
|
|
69
|
+
try {
|
|
70
|
+
this.onmessage?.(JSON.parse(message));
|
|
71
|
+
} catch (e) {
|
|
72
|
+
console.error("failed to dispatch message", e);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function compareSemver(a, b) {
|
|
77
|
+
const aBase = a.replace(/-.*$/, "");
|
|
78
|
+
const bBase = b.replace(/-.*$/, "");
|
|
79
|
+
const aParts = aBase.split(".").map(Number);
|
|
80
|
+
const bParts = bBase.split(".").map(Number);
|
|
81
|
+
for (let i = 0; i < 3; i++) {
|
|
82
|
+
if (aParts[i] > bParts[i])
|
|
83
|
+
return 1;
|
|
84
|
+
if (aParts[i] < bParts[i])
|
|
85
|
+
return -1;
|
|
86
|
+
}
|
|
87
|
+
const aTimestamp = parseSuffixTimestamp(a);
|
|
88
|
+
const bTimestamp = parseSuffixTimestamp(b);
|
|
89
|
+
if (aTimestamp > bTimestamp)
|
|
90
|
+
return 1;
|
|
91
|
+
if (aTimestamp < bTimestamp)
|
|
92
|
+
return -1;
|
|
93
|
+
return 0;
|
|
94
|
+
}
|
|
95
|
+
function parseSuffixTimestamp(version) {
|
|
96
|
+
const match = version.match(/^\d+\.\d+\.\d+-(?:alpha|beta)-(.+)$/);
|
|
97
|
+
if (!match)
|
|
98
|
+
return Infinity;
|
|
99
|
+
const suffix = match[1];
|
|
100
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(suffix))
|
|
101
|
+
return new Date(suffix).getTime();
|
|
102
|
+
return Number(suffix);
|
|
103
|
+
}
|
|
104
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
105
|
+
0 && (module.exports = {
|
|
106
|
+
SocketConnection,
|
|
107
|
+
compareSemver
|
|
108
|
+
});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var formatUtils_exports = {};
|
|
20
|
+
__export(formatUtils_exports, {
|
|
21
|
+
bytesToString: () => bytesToString,
|
|
22
|
+
msToString: () => msToString
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(formatUtils_exports);
|
|
25
|
+
function msToString(ms) {
|
|
26
|
+
if (ms < 0 || !isFinite(ms))
|
|
27
|
+
return "-";
|
|
28
|
+
if (ms === 0)
|
|
29
|
+
return "0ms";
|
|
30
|
+
if (ms < 1e3)
|
|
31
|
+
return ms.toFixed(0) + "ms";
|
|
32
|
+
const seconds = ms / 1e3;
|
|
33
|
+
if (seconds < 60)
|
|
34
|
+
return seconds.toFixed(1) + "s";
|
|
35
|
+
const minutes = seconds / 60;
|
|
36
|
+
if (minutes < 60)
|
|
37
|
+
return minutes.toFixed(1) + "m";
|
|
38
|
+
const hours = minutes / 60;
|
|
39
|
+
if (hours < 24)
|
|
40
|
+
return hours.toFixed(1) + "h";
|
|
41
|
+
const days = hours / 24;
|
|
42
|
+
return days.toFixed(1) + "d";
|
|
43
|
+
}
|
|
44
|
+
function bytesToString(bytes) {
|
|
45
|
+
if (bytes < 0 || !isFinite(bytes))
|
|
46
|
+
return "-";
|
|
47
|
+
if (bytes === 0)
|
|
48
|
+
return "0";
|
|
49
|
+
if (bytes < 1e3)
|
|
50
|
+
return bytes.toFixed(0);
|
|
51
|
+
const kb = bytes / 1024;
|
|
52
|
+
if (kb < 1e3)
|
|
53
|
+
return kb.toFixed(1) + "K";
|
|
54
|
+
const mb = kb / 1024;
|
|
55
|
+
if (mb < 1e3)
|
|
56
|
+
return mb.toFixed(1) + "M";
|
|
57
|
+
const gb = mb / 1024;
|
|
58
|
+
return gb.toFixed(1) + "G";
|
|
59
|
+
}
|
|
60
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
61
|
+
0 && (module.exports = {
|
|
62
|
+
bytesToString,
|
|
63
|
+
msToString
|
|
64
|
+
});
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var jsonSchema_exports = {};
|
|
20
|
+
__export(jsonSchema_exports, {
|
|
21
|
+
validate: () => validate
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(jsonSchema_exports);
|
|
24
|
+
const regexCache = /* @__PURE__ */ new Map();
|
|
25
|
+
function validate(value, schema, path) {
|
|
26
|
+
const errors = [];
|
|
27
|
+
if (schema.oneOf) {
|
|
28
|
+
let bestErrors;
|
|
29
|
+
for (const variant of schema.oneOf) {
|
|
30
|
+
const variantErrors = validate(value, variant, path);
|
|
31
|
+
if (variantErrors.length === 0)
|
|
32
|
+
return [];
|
|
33
|
+
if (!bestErrors || variantErrors.length < bestErrors.length)
|
|
34
|
+
bestErrors = variantErrors;
|
|
35
|
+
}
|
|
36
|
+
if (bestErrors.length === 1 && bestErrors[0].startsWith(`${path}: expected `))
|
|
37
|
+
return [`${path}: does not match any of the expected types`];
|
|
38
|
+
return bestErrors;
|
|
39
|
+
}
|
|
40
|
+
if (schema.type === "string") {
|
|
41
|
+
if (typeof value !== "string") {
|
|
42
|
+
errors.push(`${path}: expected string, got ${typeof value}`);
|
|
43
|
+
return errors;
|
|
44
|
+
}
|
|
45
|
+
if (schema.pattern && !cachedRegex(schema.pattern).test(value))
|
|
46
|
+
errors.push(schema.patternError || `${path}: must match pattern "${schema.pattern}"`);
|
|
47
|
+
return errors;
|
|
48
|
+
}
|
|
49
|
+
if (schema.type === "array") {
|
|
50
|
+
if (!Array.isArray(value)) {
|
|
51
|
+
errors.push(`${path}: expected array, got ${typeof value}`);
|
|
52
|
+
return errors;
|
|
53
|
+
}
|
|
54
|
+
if (schema.items) {
|
|
55
|
+
for (let i = 0; i < value.length; i++)
|
|
56
|
+
errors.push(...validate(value[i], schema.items, `${path}[${i}]`));
|
|
57
|
+
}
|
|
58
|
+
return errors;
|
|
59
|
+
}
|
|
60
|
+
if (schema.type === "object") {
|
|
61
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
62
|
+
errors.push(`${path}: expected object, got ${Array.isArray(value) ? "array" : typeof value}`);
|
|
63
|
+
return errors;
|
|
64
|
+
}
|
|
65
|
+
const obj = value;
|
|
66
|
+
for (const key of schema.required || []) {
|
|
67
|
+
if (obj[key] === void 0)
|
|
68
|
+
errors.push(`${path}.${key}: required`);
|
|
69
|
+
}
|
|
70
|
+
for (const [key, propSchema] of Object.entries(schema.properties || {})) {
|
|
71
|
+
if (obj[key] !== void 0)
|
|
72
|
+
errors.push(...validate(obj[key], propSchema, `${path}.${key}`));
|
|
73
|
+
}
|
|
74
|
+
return errors;
|
|
75
|
+
}
|
|
76
|
+
return errors;
|
|
77
|
+
}
|
|
78
|
+
function cachedRegex(pattern) {
|
|
79
|
+
let regex = regexCache.get(pattern);
|
|
80
|
+
if (!regex) {
|
|
81
|
+
regex = new RegExp(pattern);
|
|
82
|
+
regexCache.set(pattern, regex);
|
|
83
|
+
}
|
|
84
|
+
return regex;
|
|
85
|
+
}
|
|
86
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
87
|
+
0 && (module.exports = {
|
|
88
|
+
validate
|
|
89
|
+
});
|
|
@@ -20,12 +20,16 @@ var mimeType_exports = {};
|
|
|
20
20
|
__export(mimeType_exports, {
|
|
21
21
|
getMimeTypeForPath: () => getMimeTypeForPath,
|
|
22
22
|
isJsonMimeType: () => isJsonMimeType,
|
|
23
|
-
isTextualMimeType: () => isTextualMimeType
|
|
23
|
+
isTextualMimeType: () => isTextualMimeType,
|
|
24
|
+
isXmlMimeType: () => isXmlMimeType
|
|
24
25
|
});
|
|
25
26
|
module.exports = __toCommonJS(mimeType_exports);
|
|
26
27
|
function isJsonMimeType(mimeType) {
|
|
27
28
|
return !!mimeType.match(/^(application\/json|application\/.*?\+json|text\/(x-)?json)(;\s*charset=.*)?$/);
|
|
28
29
|
}
|
|
30
|
+
function isXmlMimeType(mimeType) {
|
|
31
|
+
return !!mimeType.match(/^(application\/xml|application\/.*?\+xml|text\/xml)(;\s*charset=.*)?$/);
|
|
32
|
+
}
|
|
29
33
|
function isTextualMimeType(mimeType) {
|
|
30
34
|
return !!mimeType.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/);
|
|
31
35
|
}
|
|
@@ -455,5 +459,6 @@ const types = /* @__PURE__ */ new Map([
|
|
|
455
459
|
0 && (module.exports = {
|
|
456
460
|
getMimeTypeForPath,
|
|
457
461
|
isJsonMimeType,
|
|
458
|
-
isTextualMimeType
|
|
462
|
+
isTextualMimeType,
|
|
463
|
+
isXmlMimeType
|
|
459
464
|
});
|
|
@@ -65,13 +65,13 @@ function deepParam(params, name) {
|
|
|
65
65
|
return String(current);
|
|
66
66
|
}
|
|
67
67
|
function renderTitleForCall(metadata) {
|
|
68
|
-
const titleFormat = metadata.title ?? import_protocolMetainfo.
|
|
68
|
+
const titleFormat = metadata.title ?? (0, import_protocolMetainfo.getMetainfo)(metadata)?.title ?? metadata.method;
|
|
69
69
|
return titleFormat.replace(/\{([^}]+)\}/g, (fullMatch, p1) => {
|
|
70
70
|
return formatProtocolParam(metadata.params, p1) ?? fullMatch;
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
function getActionGroup(metadata) {
|
|
74
|
-
return import_protocolMetainfo.
|
|
74
|
+
return (0, import_protocolMetainfo.getMetainfo)(metadata)?.group;
|
|
75
75
|
}
|
|
76
76
|
// Annotate the CommonJS export names for ESM import in node:
|
|
77
77
|
0 && (module.exports = {
|