rae-playwright-mcp 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -21
- package/cli.js +7 -3
- package/index.js +1 -1
- package/lib/common/config.js +282 -0
- package/lib/common/config.js.map +7 -0
- package/lib/common/configLoader.js +345 -0
- package/lib/common/configLoader.js.map +7 -0
- package/lib/common/esmLoaderHost.js +105 -0
- package/lib/common/esmLoaderHost.js.map +7 -0
- package/lib/common/expectBundle.js +44 -0
- package/lib/common/expectBundle.js.map +7 -0
- package/lib/common/expectBundleImpl.js +15781 -0
- package/lib/common/expectBundleImpl.js.map +7 -0
- package/lib/common/fixtures.js +303 -0
- package/lib/common/fixtures.js.map +7 -0
- package/lib/common/globals.js +59 -0
- package/lib/common/globals.js.map +7 -0
- package/lib/common/ipc.js +61 -0
- package/lib/common/ipc.js.map +7 -0
- package/lib/common/poolBuilder.js +86 -0
- package/lib/common/poolBuilder.js.map +7 -0
- package/lib/common/process.js +133 -0
- package/lib/common/process.js.map +7 -0
- package/lib/common/suiteUtils.js +141 -0
- package/lib/common/suiteUtils.js.map +7 -0
- package/lib/common/test.js +323 -0
- package/lib/common/test.js.map +7 -0
- package/lib/common/testLoader.js +102 -0
- package/lib/common/testLoader.js.map +7 -0
- package/lib/common/testType.js +299 -0
- package/lib/common/testType.js.map +7 -0
- package/lib/common/validators.js +69 -0
- package/lib/common/validators.js.map +7 -0
- package/lib/mcp/browser/actions.d.js +17 -0
- package/lib/mcp/browser/actions.d.js.map +7 -0
- package/lib/mcp/browser/browserContextFactory.js +343 -0
- package/lib/mcp/browser/browserContextFactory.js.map +7 -0
- package/lib/mcp/browser/browserServerBackend.js +78 -0
- package/lib/mcp/browser/browserServerBackend.js.map +7 -0
- package/lib/mcp/browser/config.js +421 -0
- package/lib/mcp/browser/config.js.map +7 -0
- package/lib/mcp/browser/context.js +287 -0
- package/lib/mcp/browser/context.js.map +7 -0
- package/lib/mcp/browser/response.js +353 -0
- package/lib/mcp/browser/response.js.map +7 -0
- package/lib/mcp/browser/sessionLog.js +161 -0
- package/lib/mcp/browser/sessionLog.js.map +7 -0
- package/lib/mcp/browser/tab.js +329 -0
- package/lib/mcp/browser/tab.js.map +7 -0
- package/lib/mcp/browser/tools/common.js +64 -0
- package/lib/mcp/browser/tools/common.js.map +7 -0
- package/lib/mcp/browser/tools/console.js +45 -0
- package/lib/mcp/browser/tools/console.js.map +7 -0
- package/lib/mcp/browser/tools/dialogs.js +61 -0
- package/lib/mcp/browser/tools/dialogs.js.map +7 -0
- package/lib/mcp/browser/tools/evaluate.js +60 -0
- package/lib/mcp/browser/tools/evaluate.js.map +7 -0
- package/lib/mcp/browser/tools/files.js +59 -0
- package/lib/mcp/browser/tools/files.js.map +7 -0
- package/lib/mcp/browser/tools/form.js +64 -0
- package/lib/mcp/browser/tools/form.js.map +7 -0
- package/lib/mcp/browser/tools/install.js +70 -0
- package/lib/mcp/browser/tools/install.js.map +7 -0
- package/lib/mcp/browser/tools/keyboard.js +85 -0
- package/lib/mcp/browser/tools/keyboard.js.map +7 -0
- package/lib/mcp/browser/tools/mouse.js +108 -0
- package/lib/mcp/browser/tools/mouse.js.map +7 -0
- package/lib/mcp/browser/tools/navigate.js +63 -0
- package/lib/mcp/browser/tools/navigate.js.map +7 -0
- package/lib/mcp/browser/tools/network.js +61 -0
- package/lib/mcp/browser/tools/network.js.map +7 -0
- package/lib/mcp/browser/tools/pdf.js +49 -0
- package/lib/mcp/browser/tools/pdf.js.map +7 -0
- package/lib/mcp/browser/tools/runCode.js +78 -0
- package/lib/mcp/browser/tools/runCode.js.map +7 -0
- package/lib/mcp/browser/tools/screenshot.js +106 -0
- package/lib/mcp/browser/tools/screenshot.js.map +7 -0
- package/lib/mcp/browser/tools/snapshot.js +192 -0
- package/lib/mcp/browser/tools/snapshot.js.map +7 -0
- package/lib/mcp/browser/tools/tabs.js +68 -0
- package/lib/mcp/browser/tools/tabs.js.map +7 -0
- package/lib/mcp/browser/tools/tool.js +51 -0
- package/lib/mcp/browser/tools/tool.js.map +7 -0
- package/lib/mcp/browser/tools/tracing.js +76 -0
- package/lib/mcp/browser/tools/tracing.js.map +7 -0
- package/lib/mcp/browser/tools/utils.js +95 -0
- package/lib/mcp/browser/tools/utils.js.map +7 -0
- package/lib/mcp/browser/tools/verify.js +144 -0
- package/lib/mcp/browser/tools/verify.js.map +7 -0
- package/lib/mcp/browser/tools/wait.js +64 -0
- package/lib/mcp/browser/tools/wait.js.map +7 -0
- package/lib/mcp/browser/tools.js +83 -0
- package/lib/mcp/browser/tools.js.map +7 -0
- package/lib/mcp/browser/watchdog.js +45 -0
- package/lib/mcp/browser/watchdog.js.map +7 -0
- package/lib/mcp/config.d.js +17 -0
- package/lib/mcp/config.d.js.map +7 -0
- package/lib/mcp/config.d.ts +197 -0
- package/lib/mcp/extension/cdpRelay.js +352 -0
- package/lib/mcp/extension/cdpRelay.js.map +7 -0
- package/lib/mcp/extension/extensionContextFactory.js +77 -0
- package/lib/mcp/extension/extensionContextFactory.js.map +7 -0
- package/lib/mcp/extension/protocol.js +29 -0
- package/lib/mcp/extension/protocol.js.map +7 -0
- package/lib/mcp/index.js +62 -0
- package/lib/mcp/index.js.map +7 -0
- package/lib/mcp/log.js +36 -0
- package/lib/mcp/log.js.map +7 -0
- package/lib/mcp/program.js +94 -0
- package/lib/mcp/program.js.map +7 -0
- package/lib/mcp/sdk/exports.js +29 -0
- package/lib/mcp/sdk/exports.js.map +7 -0
- package/lib/mcp/sdk/http.js +153 -0
- package/lib/mcp/sdk/http.js.map +7 -0
- package/lib/mcp/sdk/inProcessTransport.js +72 -0
- package/lib/mcp/sdk/inProcessTransport.js.map +7 -0
- package/lib/mcp/sdk/server.js +208 -0
- package/lib/mcp/sdk/server.js.map +7 -0
- package/lib/mcp/sdk/tool.js +48 -0
- package/lib/mcp/sdk/tool.js.map +7 -0
- package/lib/mcp/test/browserBackend.js +99 -0
- package/lib/mcp/test/browserBackend.js.map +7 -0
- package/lib/mcp/test/generatorTools.js +123 -0
- package/lib/mcp/test/generatorTools.js.map +7 -0
- package/lib/mcp/test/plannerTools.js +145 -0
- package/lib/mcp/test/plannerTools.js.map +7 -0
- package/lib/mcp/test/seed.js +83 -0
- package/lib/mcp/test/seed.js.map +7 -0
- package/lib/mcp/test/streams.js +45 -0
- package/lib/mcp/test/streams.js.map +7 -0
- package/lib/mcp/test/testBackend.js +100 -0
- package/lib/mcp/test/testBackend.js.map +7 -0
- package/lib/mcp/test/testContext.js +280 -0
- package/lib/mcp/test/testContext.js.map +7 -0
- package/lib/mcp/test/testTool.js +31 -0
- package/lib/mcp/test/testTool.js.map +7 -0
- package/lib/mcp/test/testTools.js +109 -0
- package/lib/mcp/test/testTools.js.map +7 -0
- package/lib/third_party/pirates.js +63 -0
- package/lib/third_party/pirates.js.map +7 -0
- package/lib/third_party/tsconfig-loader.js +104 -0
- package/lib/third_party/tsconfig-loader.js.map +7 -0
- package/lib/transform/babelBundle.js +44 -0
- package/lib/transform/babelBundle.js.map +7 -0
- package/lib/transform/babelBundleImpl.js +68726 -0
- package/lib/transform/babelBundleImpl.js.map +7 -0
- package/lib/transform/babelHighlightUtils.js +64 -0
- package/lib/transform/babelHighlightUtils.js.map +7 -0
- package/lib/transform/compilationCache.js +273 -0
- package/lib/transform/compilationCache.js.map +7 -0
- package/lib/transform/esmLoader.js +104 -0
- package/lib/transform/esmLoader.js.map +7 -0
- package/lib/transform/portTransport.js +68 -0
- package/lib/transform/portTransport.js.map +7 -0
- package/lib/transform/transform.js +297 -0
- package/lib/transform/transform.js.map +7 -0
- package/lib/util.js +404 -0
- package/lib/utilsBundle.js +44 -0
- package/lib/utilsBundleImpl.js +13122 -0
- package/package.json +4 -3
|
@@ -0,0 +1,192 @@
|
|
|
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 snapshot_exports = {};
|
|
30
|
+
__export(snapshot_exports, {
|
|
31
|
+
default: () => snapshot_default,
|
|
32
|
+
elementSchema: () => elementSchema
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(snapshot_exports);
|
|
35
|
+
var import_fs = __toESM(require("fs"));
|
|
36
|
+
var import_mcpBundle = require("playwright-core/lib/mcpBundle");
|
|
37
|
+
var import_utils = require("playwright-core/lib/utils");
|
|
38
|
+
var import_tool = require("./tool");
|
|
39
|
+
const snapshot = (0, import_tool.defineTool)({
|
|
40
|
+
capability: "core",
|
|
41
|
+
schema: {
|
|
42
|
+
name: "browser_snapshot",
|
|
43
|
+
title: "Page snapshot",
|
|
44
|
+
description: "Capture accessibility snapshot of the current page, this is better than screenshot",
|
|
45
|
+
inputSchema: import_mcpBundle.z.object({
|
|
46
|
+
filename: import_mcpBundle.z.string().optional().describe("Save snapshot to markdown file instead of returning it in the response.")
|
|
47
|
+
}),
|
|
48
|
+
type: "readOnly"
|
|
49
|
+
},
|
|
50
|
+
handle: async (context, params, response) => {
|
|
51
|
+
await context.ensureTab();
|
|
52
|
+
response.setIncludeFullSnapshot();
|
|
53
|
+
if (params.filename) {
|
|
54
|
+
await response.finish();
|
|
55
|
+
const renderedResponse = response.render();
|
|
56
|
+
const fileName = await response.addFile(params.filename, { origin: "llm", reason: "Saved snapshot" });
|
|
57
|
+
await import_fs.default.promises.writeFile(fileName, renderedResponse.asText());
|
|
58
|
+
response.setIncludeMetaOnly();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
const elementSchema = import_mcpBundle.z.object({
|
|
63
|
+
element: import_mcpBundle.z.string().describe("Human-readable element description used to obtain permission to interact with the element"),
|
|
64
|
+
ref: import_mcpBundle.z.string().describe("Exact target element reference from the page snapshot")
|
|
65
|
+
});
|
|
66
|
+
const clickSchema = elementSchema.extend({
|
|
67
|
+
doubleClick: import_mcpBundle.z.boolean().optional().describe("Whether to perform a double click instead of a single click"),
|
|
68
|
+
button: import_mcpBundle.z.enum(["left", "right", "middle"]).optional().describe("Button to click, defaults to left"),
|
|
69
|
+
modifiers: import_mcpBundle.z.array(import_mcpBundle.z.enum(["Alt", "Control", "ControlOrMeta", "Meta", "Shift"])).optional().describe("Modifier keys to press")
|
|
70
|
+
});
|
|
71
|
+
const click = (0, import_tool.defineTabTool)({
|
|
72
|
+
capability: "core",
|
|
73
|
+
schema: {
|
|
74
|
+
name: "browser_click",
|
|
75
|
+
title: "Click",
|
|
76
|
+
description: "Perform click on a web page",
|
|
77
|
+
inputSchema: clickSchema,
|
|
78
|
+
type: "input"
|
|
79
|
+
},
|
|
80
|
+
handle: async (tab, params, response) => {
|
|
81
|
+
response.setIncludeSnapshot();
|
|
82
|
+
const { locator, resolved } = await tab.refLocator(params);
|
|
83
|
+
const options = {
|
|
84
|
+
button: params.button,
|
|
85
|
+
modifiers: params.modifiers
|
|
86
|
+
};
|
|
87
|
+
const formatted = (0, import_utils.formatObject)(options, " ", "oneline");
|
|
88
|
+
const optionsAttr = formatted !== "{}" ? formatted : "";
|
|
89
|
+
if (params.doubleClick)
|
|
90
|
+
response.addCode(`await page.${resolved}.dblclick(${optionsAttr});`);
|
|
91
|
+
else
|
|
92
|
+
response.addCode(`await page.${resolved}.click(${optionsAttr});`);
|
|
93
|
+
await tab.waitForCompletion(async () => {
|
|
94
|
+
if (params.doubleClick)
|
|
95
|
+
await locator.dblclick(options);
|
|
96
|
+
else
|
|
97
|
+
await locator.click(options);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
const drag = (0, import_tool.defineTabTool)({
|
|
102
|
+
capability: "core",
|
|
103
|
+
schema: {
|
|
104
|
+
name: "browser_drag",
|
|
105
|
+
title: "Drag mouse",
|
|
106
|
+
description: "Perform drag and drop between two elements",
|
|
107
|
+
inputSchema: import_mcpBundle.z.object({
|
|
108
|
+
startElement: import_mcpBundle.z.string().describe("Human-readable source element description used to obtain the permission to interact with the element"),
|
|
109
|
+
startRef: import_mcpBundle.z.string().describe("Exact source element reference from the page snapshot"),
|
|
110
|
+
endElement: import_mcpBundle.z.string().describe("Human-readable target element description used to obtain the permission to interact with the element"),
|
|
111
|
+
endRef: import_mcpBundle.z.string().describe("Exact target element reference from the page snapshot")
|
|
112
|
+
}),
|
|
113
|
+
type: "input"
|
|
114
|
+
},
|
|
115
|
+
handle: async (tab, params, response) => {
|
|
116
|
+
response.setIncludeSnapshot();
|
|
117
|
+
const [start, end] = await tab.refLocators([
|
|
118
|
+
{ ref: params.startRef, element: params.startElement },
|
|
119
|
+
{ ref: params.endRef, element: params.endElement }
|
|
120
|
+
]);
|
|
121
|
+
await tab.waitForCompletion(async () => {
|
|
122
|
+
await start.locator.dragTo(end.locator);
|
|
123
|
+
});
|
|
124
|
+
response.addCode(`await page.${start.resolved}.dragTo(page.${end.resolved});`);
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
const hover = (0, import_tool.defineTabTool)({
|
|
128
|
+
capability: "core",
|
|
129
|
+
schema: {
|
|
130
|
+
name: "browser_hover",
|
|
131
|
+
title: "Hover mouse",
|
|
132
|
+
description: "Hover over element on page",
|
|
133
|
+
inputSchema: elementSchema,
|
|
134
|
+
type: "input"
|
|
135
|
+
},
|
|
136
|
+
handle: async (tab, params, response) => {
|
|
137
|
+
response.setIncludeSnapshot();
|
|
138
|
+
const { locator, resolved } = await tab.refLocator(params);
|
|
139
|
+
response.addCode(`await page.${resolved}.hover();`);
|
|
140
|
+
await tab.waitForCompletion(async () => {
|
|
141
|
+
await locator.hover();
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
const selectOptionSchema = elementSchema.extend({
|
|
146
|
+
values: import_mcpBundle.z.array(import_mcpBundle.z.string()).describe("Array of values to select in the dropdown. This can be a single value or multiple values.")
|
|
147
|
+
});
|
|
148
|
+
const selectOption = (0, import_tool.defineTabTool)({
|
|
149
|
+
capability: "core",
|
|
150
|
+
schema: {
|
|
151
|
+
name: "browser_select_option",
|
|
152
|
+
title: "Select option",
|
|
153
|
+
description: "Select an option in a dropdown",
|
|
154
|
+
inputSchema: selectOptionSchema,
|
|
155
|
+
type: "input"
|
|
156
|
+
},
|
|
157
|
+
handle: async (tab, params, response) => {
|
|
158
|
+
response.setIncludeSnapshot();
|
|
159
|
+
const { locator, resolved } = await tab.refLocator(params);
|
|
160
|
+
response.addCode(`await page.${resolved}.selectOption(${(0, import_utils.formatObject)(params.values)});`);
|
|
161
|
+
await tab.waitForCompletion(async () => {
|
|
162
|
+
await locator.selectOption(params.values);
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
const pickLocator = (0, import_tool.defineTabTool)({
|
|
167
|
+
capability: "testing",
|
|
168
|
+
schema: {
|
|
169
|
+
name: "browser_generate_locator",
|
|
170
|
+
title: "Create locator for element",
|
|
171
|
+
description: "Generate locator for the given element to use in tests",
|
|
172
|
+
inputSchema: elementSchema,
|
|
173
|
+
type: "readOnly"
|
|
174
|
+
},
|
|
175
|
+
handle: async (tab, params, response) => {
|
|
176
|
+
const { resolved } = await tab.refLocator(params);
|
|
177
|
+
response.addResult(resolved);
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
var snapshot_default = [
|
|
181
|
+
snapshot,
|
|
182
|
+
click,
|
|
183
|
+
drag,
|
|
184
|
+
hover,
|
|
185
|
+
selectOption,
|
|
186
|
+
pickLocator
|
|
187
|
+
];
|
|
188
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
189
|
+
0 && (module.exports = {
|
|
190
|
+
elementSchema
|
|
191
|
+
});
|
|
192
|
+
//# sourceMappingURL=snapshot.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/mcp/browser/tools/snapshot.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport fs from 'fs';\n\nimport { z } from 'playwright-core/lib/mcpBundle';\nimport { formatObject } from 'playwright-core/lib/utils';\n\nimport { defineTabTool, defineTool } from './tool';\n\nconst snapshot = defineTool({\n capability: 'core',\n schema: {\n name: 'browser_snapshot',\n title: 'Page snapshot',\n description: 'Capture accessibility snapshot of the current page, this is better than screenshot',\n inputSchema: z.object({\n filename: z.string().optional().describe('Save snapshot to markdown file instead of returning it in the response.'),\n }),\n type: 'readOnly',\n },\n\n handle: async (context, params, response) => {\n await context.ensureTab();\n response.setIncludeFullSnapshot();\n if (params.filename) {\n await response.finish();\n const renderedResponse = response.render();\n const fileName = await response.addFile(params.filename, { origin: 'llm', reason: 'Saved snapshot' });\n await fs.promises.writeFile(fileName, renderedResponse.asText());\n response.setIncludeMetaOnly();\n }\n },\n});\n\nexport const elementSchema = z.object({\n element: z.string().describe('Human-readable element description used to obtain permission to interact with the element'),\n ref: z.string().describe('Exact target element reference from the page snapshot'),\n});\n\nconst clickSchema = elementSchema.extend({\n doubleClick: z.boolean().optional().describe('Whether to perform a double click instead of a single click'),\n button: z.enum(['left', 'right', 'middle']).optional().describe('Button to click, defaults to left'),\n modifiers: z.array(z.enum(['Alt', 'Control', 'ControlOrMeta', 'Meta', 'Shift'])).optional().describe('Modifier keys to press'),\n});\n\nconst click = defineTabTool({\n capability: 'core',\n schema: {\n name: 'browser_click',\n title: 'Click',\n description: 'Perform click on a web page',\n inputSchema: clickSchema,\n type: 'input',\n },\n\n handle: async (tab, params, response) => {\n response.setIncludeSnapshot();\n\n const { locator, resolved } = await tab.refLocator(params);\n const options = {\n button: params.button,\n modifiers: params.modifiers,\n };\n const formatted = formatObject(options, ' ', 'oneline');\n const optionsAttr = formatted !== '{}' ? formatted : '';\n\n if (params.doubleClick)\n response.addCode(`await page.${resolved}.dblclick(${optionsAttr});`);\n else\n response.addCode(`await page.${resolved}.click(${optionsAttr});`);\n\n await tab.waitForCompletion(async () => {\n if (params.doubleClick)\n await locator.dblclick(options);\n else\n await locator.click(options);\n });\n },\n});\n\nconst drag = defineTabTool({\n capability: 'core',\n schema: {\n name: 'browser_drag',\n title: 'Drag mouse',\n description: 'Perform drag and drop between two elements',\n inputSchema: z.object({\n startElement: z.string().describe('Human-readable source element description used to obtain the permission to interact with the element'),\n startRef: z.string().describe('Exact source element reference from the page snapshot'),\n endElement: z.string().describe('Human-readable target element description used to obtain the permission to interact with the element'),\n endRef: z.string().describe('Exact target element reference from the page snapshot'),\n }),\n type: 'input',\n },\n\n handle: async (tab, params, response) => {\n response.setIncludeSnapshot();\n\n const [start, end] = await tab.refLocators([\n { ref: params.startRef, element: params.startElement },\n { ref: params.endRef, element: params.endElement },\n ]);\n\n await tab.waitForCompletion(async () => {\n await start.locator.dragTo(end.locator);\n });\n\n response.addCode(`await page.${start.resolved}.dragTo(page.${end.resolved});`);\n },\n});\n\nconst hover = defineTabTool({\n capability: 'core',\n schema: {\n name: 'browser_hover',\n title: 'Hover mouse',\n description: 'Hover over element on page',\n inputSchema: elementSchema,\n type: 'input',\n },\n\n handle: async (tab, params, response) => {\n response.setIncludeSnapshot();\n\n const { locator, resolved } = await tab.refLocator(params);\n response.addCode(`await page.${resolved}.hover();`);\n\n await tab.waitForCompletion(async () => {\n await locator.hover();\n });\n },\n});\n\nconst selectOptionSchema = elementSchema.extend({\n values: z.array(z.string()).describe('Array of values to select in the dropdown. This can be a single value or multiple values.'),\n});\n\nconst selectOption = defineTabTool({\n capability: 'core',\n schema: {\n name: 'browser_select_option',\n title: 'Select option',\n description: 'Select an option in a dropdown',\n inputSchema: selectOptionSchema,\n type: 'input',\n },\n\n handle: async (tab, params, response) => {\n response.setIncludeSnapshot();\n\n const { locator, resolved } = await tab.refLocator(params);\n response.addCode(`await page.${resolved}.selectOption(${formatObject(params.values)});`);\n\n await tab.waitForCompletion(async () => {\n await locator.selectOption(params.values);\n });\n },\n});\n\nconst pickLocator = defineTabTool({\n capability: 'testing',\n schema: {\n name: 'browser_generate_locator',\n title: 'Create locator for element',\n description: 'Generate locator for the given element to use in tests',\n inputSchema: elementSchema,\n type: 'readOnly',\n },\n\n handle: async (tab, params, response) => {\n const { resolved } = await tab.refLocator(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AS,IAAI,MAAM,IAAI,WAAW,MAAM;AACzD,aAAS,QAAQ,cAAc,QAAQ,qBAAiB,2BAAa,OAAO,MAAM,CAAC,IAAI;AAEvF,UAAM,IAAI,kBAAkB,YAAY;AACtC,YAAM,QAAQ,aAAa,OAAO,MAAM;AAAA,IAC1C,CAAC;AAAA,EACH;AACF,CAAC;AAED,MAAM,kBAAc,2BAAc;AAAA,EAChC,YAAY;AAAA,EACZ,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,EACR;AAAA,EAEA,QAAQ,OAAO,KAAK,QAAQ,aAAa;AACvC,UAAM,EAAE,SAAS,IAAI,MAAM,IAAI,WAAW,MAAM;AAChD,aAAS,UAAU,QAAQ;AAAA,EAC7B;AACF,CAAC;AAED,IAAO,mBAAQ;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
|
|
6
|
+
"names": ["fs"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
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 tabs_exports = {};
|
|
20
|
+
__export(tabs_exports, {
|
|
21
|
+
default: () => tabs_default
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(tabs_exports);
|
|
24
|
+
var import_mcpBundle = require("playwright-core/lib/mcpBundle");
|
|
25
|
+
var import_tool = require("./tool");
|
|
26
|
+
const browserTabs = (0, import_tool.defineTool)({
|
|
27
|
+
capability: "core-tabs",
|
|
28
|
+
schema: {
|
|
29
|
+
name: "browser_tabs",
|
|
30
|
+
title: "Manage tabs",
|
|
31
|
+
description: "List, create, close, or select a browser tab.",
|
|
32
|
+
inputSchema: import_mcpBundle.z.object({
|
|
33
|
+
action: import_mcpBundle.z.enum(["list", "new", "close", "select"]).describe("Operation to perform"),
|
|
34
|
+
index: import_mcpBundle.z.number().optional().describe("Tab index, used for close/select. If omitted for close, current tab is closed.")
|
|
35
|
+
}),
|
|
36
|
+
type: "action"
|
|
37
|
+
},
|
|
38
|
+
handle: async (context, params, response) => {
|
|
39
|
+
switch (params.action) {
|
|
40
|
+
case "list": {
|
|
41
|
+
await context.ensureTab();
|
|
42
|
+
response.setIncludeTabs();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
case "new": {
|
|
46
|
+
await context.newTab();
|
|
47
|
+
response.setIncludeTabs();
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
case "close": {
|
|
51
|
+
await context.closeTab(params.index);
|
|
52
|
+
response.setIncludeFullSnapshot();
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
case "select": {
|
|
56
|
+
if (params.index === void 0)
|
|
57
|
+
throw new Error("Tab index is required");
|
|
58
|
+
await context.selectTab(params.index);
|
|
59
|
+
response.setIncludeFullSnapshot();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
var tabs_default = [
|
|
66
|
+
browserTabs
|
|
67
|
+
];
|
|
68
|
+
//# sourceMappingURL=tabs.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/mcp/browser/tools/tabs.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { z } from 'playwright-core/lib/mcpBundle';\nimport { defineTool } from './tool';\n\nconst browserTabs = defineTool({\n capability: 'core-tabs',\n\n schema: {\n name: 'browser_tabs',\n title: 'Manage tabs',\n description: 'List, create, close, or select a browser tab.',\n inputSchema: z.object({\n action: z.enum(['list', 'new', 'close', 'select']).describe('Operation to perform'),\n index: z.number().optional().describe('Tab index, used for close/select. If omitted for close, current tab is closed.'),\n }),\n type: 'action',\n },\n\n handle: async (context, params, response) => {\n switch (params.action) {\n case 'list': {\n await context.ensureTab();\n response.setIncludeTabs();\n return;\n }\n case 'new': {\n await context.newTab();\n response.setIncludeTabs();\n return;\n }\n case 'close': {\n await context.closeTab(params.index);\n response.setIncludeFullSnapshot();\n return;\n }\n case 'select': {\n if (params.index === undefined)\n throw new Error('Tab index is required');\n await context.selectTab(params.index);\n response.setIncludeFullSnapshot();\n return;\n }\n }\n },\n});\n\nexport default [\n browserTabs,\n];\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBA,uBAAkB;AAClB,kBAA2B;AAE3B,MAAM,kBAAc,wBAAW;AAAA,EAC7B,YAAY;AAAA,EAEZ,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,aAAa;AAAA,IACb,aAAa,mBAAE,OAAO;AAAA,MACpB,QAAQ,mBAAE,KAAK,CAAC,QAAQ,OAAO,SAAS,QAAQ,CAAC,EAAE,SAAS,sBAAsB;AAAA,MAClF,OAAO,mBAAE,OAAO,EAAE,SAAS,EAAE,SAAS,gFAAgF;AAAA,IACxH,CAAC;AAAA,IACD,MAAM;AAAA,EACR;AAAA,EAEA,QAAQ,OAAO,SAAS,QAAQ,aAAa;AAC3C,YAAQ,OAAO,QAAQ;AAAA,MACrB,KAAK,QAAQ;AACX,cAAM,QAAQ,UAAU;AACxB,iBAAS,eAAe;AACxB;AAAA,MACF;AAAA,MACA,KAAK,OAAO;AACV,cAAM,QAAQ,OAAO;AACrB,iBAAS,eAAe;AACxB;AAAA,MACF;AAAA,MACA,KAAK,SAAS;AACZ,cAAM,QAAQ,SAAS,OAAO,KAAK;AACnC,iBAAS,uBAAuB;AAChC;AAAA,MACF;AAAA,MACA,KAAK,UAAU;AACb,YAAI,OAAO,UAAU;AACnB,gBAAM,IAAI,MAAM,uBAAuB;AACzC,cAAM,QAAQ,UAAU,OAAO,KAAK;AACpC,iBAAS,uBAAuB;AAChC;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF,CAAC;AAED,IAAO,eAAQ;AAAA,EACb;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
defineTabTool: () => defineTabTool,
|
|
22
|
+
defineTool: () => defineTool
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(tool_exports);
|
|
25
|
+
function defineTool(tool) {
|
|
26
|
+
return tool;
|
|
27
|
+
}
|
|
28
|
+
function defineTabTool(tool) {
|
|
29
|
+
return {
|
|
30
|
+
...tool,
|
|
31
|
+
handle: async (context, params, response) => {
|
|
32
|
+
const tab = await context.ensureTab();
|
|
33
|
+
const modalStates = tab.modalStates().map((state) => state.type);
|
|
34
|
+
if (tool.clearsModalState && !modalStates.includes(tool.clearsModalState)) {
|
|
35
|
+
response.setIncludeModalStates(tab.modalStates());
|
|
36
|
+
response.addError(`Error: The tool "${tool.schema.name}" can only be used when there is related modal state present.`);
|
|
37
|
+
} else if (!tool.clearsModalState && modalStates.length) {
|
|
38
|
+
response.setIncludeModalStates(tab.modalStates());
|
|
39
|
+
response.addError(`Error: Tool "${tool.schema.name}" does not handle the modal state.`);
|
|
40
|
+
} else {
|
|
41
|
+
return tool.handle(tab, params, response);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
defineTabTool,
|
|
49
|
+
defineTool
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=tool.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/mcp/browser/tools/tool.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { z } from 'zod';\nimport type { Context } from '../context';\nimport type * as playwright from 'playwright-core';\nimport type { ToolCapability } from '../../config';\nimport type { Tab } from '../tab';\nimport type { Response } from '../response';\nimport type { ToolSchema } from '../../sdk/tool';\n\nexport type FileUploadModalState = {\n type: 'fileChooser';\n description: string;\n fileChooser: playwright.FileChooser;\n clearedBy: string;\n};\n\nexport type DialogModalState = {\n type: 'dialog';\n description: string;\n dialog: playwright.Dialog;\n clearedBy: string;\n};\n\nexport type ModalState = FileUploadModalState | DialogModalState;\n\nexport type Tool<Input extends z.Schema = z.Schema> = {\n capability: ToolCapability;\n schema: ToolSchema<Input>;\n handle: (context: Context, params: z.output<Input>, response: Response) => Promise<void>;\n};\n\nexport function defineTool<Input extends z.Schema>(tool: Tool<Input>): Tool<Input> {\n return tool;\n}\n\nexport type TabTool<Input extends z.Schema = z.Schema> = {\n capability: ToolCapability;\n schema: ToolSchema<Input>;\n clearsModalState?: ModalState['type'];\n handle: (tab: Tab, params: z.output<Input>, response: Response) => Promise<void>;\n};\n\nexport function defineTabTool<Input extends z.Schema>(tool: TabTool<Input>): Tool<Input> {\n return {\n ...tool,\n handle: async (context, params, response) => {\n const tab = await context.ensureTab();\n const modalStates = tab.modalStates().map(state => state.type);\n if (tool.clearsModalState && !modalStates.includes(tool.clearsModalState)) {\n response.setIncludeModalStates(tab.modalStates());\n response.addError(`Error: The tool \"${tool.schema.name}\" can only be used when there is related modal state present.`);\n } else if (!tool.clearsModalState && modalStates.length) {\n response.setIncludeModalStates(tab.modalStates());\n response.addError(`Error: Tool \"${tool.schema.name}\" does not handle the modal state.`);\n } else {\n return tool.handle(tab, params, response);\n }\n },\n };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8CO,SAAS,WAAmC,MAAgC;AACjF,SAAO;AACT;AASO,SAAS,cAAsC,MAAmC;AACvF,SAAO;AAAA,IACL,GAAG;AAAA,IACH,QAAQ,OAAO,SAAS,QAAQ,aAAa;AAC3C,YAAM,MAAM,MAAM,QAAQ,UAAU;AACpC,YAAM,cAAc,IAAI,YAAY,EAAE,IAAI,WAAS,MAAM,IAAI;AAC7D,UAAI,KAAK,oBAAoB,CAAC,YAAY,SAAS,KAAK,gBAAgB,GAAG;AACzE,iBAAS,sBAAsB,IAAI,YAAY,CAAC;AAChD,iBAAS,SAAS,oBAAoB,KAAK,OAAO,IAAI,+DAA+D;AAAA,MACvH,WAAW,CAAC,KAAK,oBAAoB,YAAY,QAAQ;AACvD,iBAAS,sBAAsB,IAAI,YAAY,CAAC;AAChD,iBAAS,SAAS,gBAAgB,KAAK,OAAO,IAAI,oCAAoC;AAAA,MACxF,OAAO;AACL,eAAO,KAAK,OAAO,KAAK,QAAQ,QAAQ;AAAA,MAC1C;AAAA,IACF;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
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 tracing_exports = {};
|
|
20
|
+
__export(tracing_exports, {
|
|
21
|
+
default: () => tracing_default
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(tracing_exports);
|
|
24
|
+
var import_mcpBundle = require("playwright-core/lib/mcpBundle");
|
|
25
|
+
var import_tool = require("./tool");
|
|
26
|
+
const tracingStart = (0, import_tool.defineTool)({
|
|
27
|
+
capability: "tracing",
|
|
28
|
+
schema: {
|
|
29
|
+
name: "browser_start_tracing",
|
|
30
|
+
title: "Start tracing",
|
|
31
|
+
description: "Start trace recording",
|
|
32
|
+
inputSchema: import_mcpBundle.z.object({}),
|
|
33
|
+
type: "readOnly"
|
|
34
|
+
},
|
|
35
|
+
handle: async (context, params, response) => {
|
|
36
|
+
const browserContext = await context.ensureBrowserContext();
|
|
37
|
+
const tracesDir = await context.outputFile(`traces`, { origin: "code", reason: "Collecting trace" });
|
|
38
|
+
const name = "trace-" + Date.now();
|
|
39
|
+
await browserContext.tracing.start({
|
|
40
|
+
name,
|
|
41
|
+
screenshots: true,
|
|
42
|
+
snapshots: true,
|
|
43
|
+
sources: true,
|
|
44
|
+
_live: true
|
|
45
|
+
});
|
|
46
|
+
const traceLegend = `- Action log: ${tracesDir}/${name}.trace
|
|
47
|
+
- Network log: ${tracesDir}/${name}.network
|
|
48
|
+
- Resources with content by sha1: ${tracesDir}/resources`;
|
|
49
|
+
response.addResult(`Tracing started, saving to ${tracesDir}.
|
|
50
|
+
${traceLegend}`);
|
|
51
|
+
browserContext.tracing[traceLegendSymbol] = traceLegend;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
const tracingStop = (0, import_tool.defineTool)({
|
|
55
|
+
capability: "tracing",
|
|
56
|
+
schema: {
|
|
57
|
+
name: "browser_stop_tracing",
|
|
58
|
+
title: "Stop tracing",
|
|
59
|
+
description: "Stop trace recording",
|
|
60
|
+
inputSchema: import_mcpBundle.z.object({}),
|
|
61
|
+
type: "readOnly"
|
|
62
|
+
},
|
|
63
|
+
handle: async (context, params, response) => {
|
|
64
|
+
const browserContext = await context.ensureBrowserContext();
|
|
65
|
+
await browserContext.tracing.stop();
|
|
66
|
+
const traceLegend = browserContext.tracing[traceLegendSymbol];
|
|
67
|
+
response.addResult(`Tracing stopped.
|
|
68
|
+
${traceLegend}`);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
var tracing_default = [
|
|
72
|
+
tracingStart,
|
|
73
|
+
tracingStop
|
|
74
|
+
];
|
|
75
|
+
const traceLegendSymbol = Symbol("tracesDir");
|
|
76
|
+
//# sourceMappingURL=tracing.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/mcp/browser/tools/tracing.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { z } from 'playwright-core/lib/mcpBundle';\nimport { defineTool } from './tool';\n\nimport type { Tracing } from '../../../../../playwright-core/src/client/tracing';\n\nconst tracingStart = defineTool({\n capability: 'tracing',\n\n schema: {\n name: 'browser_start_tracing',\n title: 'Start tracing',\n description: 'Start trace recording',\n inputSchema: z.object({}),\n type: 'readOnly',\n },\n\n handle: async (context, params, response) => {\n const browserContext = await context.ensureBrowserContext();\n const tracesDir = await context.outputFile(`traces`, { origin: 'code', reason: 'Collecting trace' });\n const name = 'trace-' + Date.now();\n await (browserContext.tracing as Tracing).start({\n name,\n screenshots: true,\n snapshots: true,\n sources: true,\n _live: true,\n });\n const traceLegend = `- Action log: ${tracesDir}/${name}.trace\n- Network log: ${tracesDir}/${name}.network\n- Resources with content by sha1: ${tracesDir}/resources`;\n\n response.addResult(`Tracing started, saving to ${tracesDir}.\\n${traceLegend}`);\n (browserContext.tracing as any)[traceLegendSymbol] = traceLegend;\n },\n});\n\nconst tracingStop = defineTool({\n capability: 'tracing',\n\n schema: {\n name: 'browser_stop_tracing',\n title: 'Stop tracing',\n description: 'Stop trace recording',\n inputSchema: z.object({}),\n type: 'readOnly',\n },\n\n handle: async (context, params, response) => {\n const browserContext = await context.ensureBrowserContext();\n await browserContext.tracing.stop();\n const traceLegend = (browserContext.tracing as any)[traceLegendSymbol];\n response.addResult(`Tracing stopped.\\n${traceLegend}`);\n },\n});\n\nexport default [\n tracingStart,\n tracingStop,\n];\n\nconst traceLegendSymbol = Symbol('tracesDir');\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBA,uBAAkB;AAClB,kBAA2B;AAI3B,MAAM,mBAAe,wBAAW;AAAA,EAC9B,YAAY;AAAA,EAEZ,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,aAAa;AAAA,IACb,aAAa,mBAAE,OAAO,CAAC,CAAC;AAAA,IACxB,MAAM;AAAA,EACR;AAAA,EAEA,QAAQ,OAAO,SAAS,QAAQ,aAAa;AAC3C,UAAM,iBAAiB,MAAM,QAAQ,qBAAqB;AAC1D,UAAM,YAAY,MAAM,QAAQ,WAAW,UAAU,EAAE,QAAQ,QAAQ,QAAQ,mBAAmB,CAAC;AACnG,UAAM,OAAO,WAAW,KAAK,IAAI;AACjC,UAAO,eAAe,QAAoB,MAAM;AAAA,MAC9C;AAAA,MACA,aAAa;AAAA,MACb,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,IACT,CAAC;AACD,UAAM,cAAc,iBAAiB,SAAS,IAAI,IAAI;AAAA,iBACzC,SAAS,IAAI,IAAI;AAAA,oCACE,SAAS;AAEzC,aAAS,UAAU,8BAA8B,SAAS;AAAA,EAAM,WAAW,EAAE;AAC7E,IAAC,eAAe,QAAgB,iBAAiB,IAAI;AAAA,EACvD;AACF,CAAC;AAED,MAAM,kBAAc,wBAAW;AAAA,EAC7B,YAAY;AAAA,EAEZ,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,aAAa;AAAA,IACb,aAAa,mBAAE,OAAO,CAAC,CAAC;AAAA,IACxB,MAAM;AAAA,EACR;AAAA,EAEA,QAAQ,OAAO,SAAS,QAAQ,aAAa;AAC3C,UAAM,iBAAiB,MAAM,QAAQ,qBAAqB;AAC1D,UAAM,eAAe,QAAQ,KAAK;AAClC,UAAM,cAAe,eAAe,QAAgB,iBAAiB;AACrE,aAAS,UAAU;AAAA,EAAqB,WAAW,EAAE;AAAA,EACvD;AACF,CAAC;AAED,IAAO,kBAAQ;AAAA,EACb;AAAA,EACA;AACF;AAEA,MAAM,oBAAoB,OAAO,WAAW;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
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 utils_exports = {};
|
|
20
|
+
__export(utils_exports, {
|
|
21
|
+
callOnPageNoTrace: () => callOnPageNoTrace,
|
|
22
|
+
dateAsFileName: () => dateAsFileName,
|
|
23
|
+
eventWaiter: () => eventWaiter,
|
|
24
|
+
waitForCompletion: () => waitForCompletion
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(utils_exports);
|
|
27
|
+
async function waitForCompletion(tab, callback) {
|
|
28
|
+
const requests = [];
|
|
29
|
+
const requestListener = (request) => requests.push(request);
|
|
30
|
+
const disposeListeners = () => {
|
|
31
|
+
tab.page.off("request", requestListener);
|
|
32
|
+
};
|
|
33
|
+
tab.page.on("request", requestListener);
|
|
34
|
+
let result;
|
|
35
|
+
try {
|
|
36
|
+
result = await callback();
|
|
37
|
+
await tab.waitForTimeout(500);
|
|
38
|
+
} finally {
|
|
39
|
+
disposeListeners();
|
|
40
|
+
}
|
|
41
|
+
const requestedNavigation = requests.some((request) => request.isNavigationRequest());
|
|
42
|
+
if (requestedNavigation) {
|
|
43
|
+
await tab.page.mainFrame().waitForLoadState("load", { timeout: 1e4 }).catch(() => {
|
|
44
|
+
});
|
|
45
|
+
return result;
|
|
46
|
+
}
|
|
47
|
+
const promises = [];
|
|
48
|
+
for (const request of requests) {
|
|
49
|
+
if (["document", "stylesheet", "script", "xhr", "fetch"].includes(request.resourceType()))
|
|
50
|
+
promises.push(request.response().then((r) => r?.finished()).catch(() => {
|
|
51
|
+
}));
|
|
52
|
+
else
|
|
53
|
+
promises.push(request.response().catch(() => {
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
const timeout = new Promise((resolve) => setTimeout(resolve, 5e3));
|
|
57
|
+
await Promise.race([Promise.all(promises), timeout]);
|
|
58
|
+
if (requests.length)
|
|
59
|
+
await tab.waitForTimeout(500);
|
|
60
|
+
return result;
|
|
61
|
+
}
|
|
62
|
+
async function callOnPageNoTrace(page, callback) {
|
|
63
|
+
return await page._wrapApiCall(() => callback(page), { internal: true });
|
|
64
|
+
}
|
|
65
|
+
function dateAsFileName(extension) {
|
|
66
|
+
const date = /* @__PURE__ */ new Date();
|
|
67
|
+
return `page-${date.toISOString().replace(/[:.]/g, "-")}.${extension}`;
|
|
68
|
+
}
|
|
69
|
+
function eventWaiter(page, event, timeout) {
|
|
70
|
+
const disposables = [];
|
|
71
|
+
const eventPromise = new Promise((resolve, reject) => {
|
|
72
|
+
page.on(event, resolve);
|
|
73
|
+
disposables.push(() => page.off(event, resolve));
|
|
74
|
+
});
|
|
75
|
+
let abort;
|
|
76
|
+
const abortPromise = new Promise((resolve, reject) => {
|
|
77
|
+
abort = () => resolve(void 0);
|
|
78
|
+
});
|
|
79
|
+
const timeoutPromise = new Promise((f) => {
|
|
80
|
+
const timeoutId = setTimeout(() => f(void 0), timeout);
|
|
81
|
+
disposables.push(() => clearTimeout(timeoutId));
|
|
82
|
+
});
|
|
83
|
+
return {
|
|
84
|
+
promise: Promise.race([eventPromise, abortPromise, timeoutPromise]).finally(() => disposables.forEach((dispose) => dispose())),
|
|
85
|
+
abort
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
89
|
+
0 && (module.exports = {
|
|
90
|
+
callOnPageNoTrace,
|
|
91
|
+
dateAsFileName,
|
|
92
|
+
eventWaiter,
|
|
93
|
+
waitForCompletion
|
|
94
|
+
});
|
|
95
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/mcp/browser/tools/utils.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type * as playwright from 'playwright-core';\nimport type { Tab } from '../tab';\n\nexport async function waitForCompletion<R>(tab: Tab, callback: () => Promise<R>): Promise<R> {\n const requests: playwright.Request[] = [];\n\n const requestListener = (request: playwright.Request) => requests.push(request);\n const disposeListeners = () => {\n tab.page.off('request', requestListener);\n };\n tab.page.on('request', requestListener);\n\n let result: R;\n try {\n result = await callback();\n await tab.waitForTimeout(500);\n } finally {\n disposeListeners();\n }\n\n const requestedNavigation = requests.some(request => request.isNavigationRequest());\n if (requestedNavigation) {\n await tab.page.mainFrame().waitForLoadState('load', { timeout: 10000 }).catch(() => {});\n return result;\n }\n\n const promises: Promise<any>[] = [];\n for (const request of requests) {\n if (['document', 'stylesheet', 'script', 'xhr', 'fetch'].includes(request.resourceType()))\n promises.push(request.response().then(r => r?.finished()).catch(() => {}));\n else\n promises.push(request.response().catch(() => {}));\n }\n const timeout = new Promise<void>(resolve => setTimeout(resolve, 5000));\n await Promise.race([Promise.all(promises), timeout]);\n if (requests.length)\n await tab.waitForTimeout(500);\n\n return result;\n}\n\nexport async function callOnPageNoTrace<T>(page: playwright.Page, callback: (page: playwright.Page) => Promise<T>): Promise<T> {\n return await (page as any)._wrapApiCall(() => callback(page), { internal: true });\n}\n\nexport function dateAsFileName(extension: string): string {\n const date = new Date();\n return `page-${date.toISOString().replace(/[:.]/g, '-')}.${extension}`;\n}\n\nexport function eventWaiter<T>(page: playwright.Page, event: string, timeout: number): { promise: Promise<T | undefined>, abort: () => void } {\n const disposables: (() => void)[] = [];\n\n const eventPromise = new Promise<T | undefined>((resolve, reject) => {\n page.on(event as any, resolve as any);\n disposables.push(() => page.off(event as any, resolve as any));\n });\n\n let abort: () => void;\n const abortPromise = new Promise<T | undefined>((resolve, reject) => {\n abort = () => resolve(undefined);\n });\n\n const timeoutPromise = new Promise<T | undefined>(f => {\n const timeoutId = setTimeout(() => f(undefined), timeout);\n disposables.push(() => clearTimeout(timeoutId));\n });\n\n return {\n promise: Promise.race([eventPromise, abortPromise, timeoutPromise]).finally(() => disposables.forEach(dispose => dispose())),\n abort: abort!\n };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBA,eAAsB,kBAAqB,KAAU,UAAwC;AAC3F,QAAM,WAAiC,CAAC;AAExC,QAAM,kBAAkB,CAAC,YAAgC,SAAS,KAAK,OAAO;AAC9E,QAAM,mBAAmB,MAAM;AAC7B,QAAI,KAAK,IAAI,WAAW,eAAe;AAAA,EACzC;AACA,MAAI,KAAK,GAAG,WAAW,eAAe;AAEtC,MAAI;AACJ,MAAI;AACF,aAAS,MAAM,SAAS;AACxB,UAAM,IAAI,eAAe,GAAG;AAAA,EAC9B,UAAE;AACA,qBAAiB;AAAA,EACnB;AAEA,QAAM,sBAAsB,SAAS,KAAK,aAAW,QAAQ,oBAAoB,CAAC;AAClF,MAAI,qBAAqB;AACvB,UAAM,IAAI,KAAK,UAAU,EAAE,iBAAiB,QAAQ,EAAE,SAAS,IAAM,CAAC,EAAE,MAAM,M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