playwright 1.58.0-alpha-2025-12-03 → 1.58.0-alpha-2025-12-05

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.
Files changed (44) hide show
  1. package/README.md +2 -2
  2. package/ThirdPartyNotices.txt +288 -2773
  3. package/lib/agents/agent.js +2 -2
  4. package/lib/agents/performTask.js +121 -8
  5. package/lib/index.js +6 -3
  6. package/lib/mcp/browser/browserContextFactory.js +2 -0
  7. package/lib/mcp/browser/browserServerBackend.js +2 -1
  8. package/lib/mcp/browser/config.js +21 -2
  9. package/lib/mcp/browser/response.js +129 -53
  10. package/lib/mcp/browser/tab.js +39 -8
  11. package/lib/mcp/browser/tools/common.js +5 -5
  12. package/lib/mcp/browser/tools/console.js +4 -4
  13. package/lib/mcp/browser/tools/dialogs.js +4 -4
  14. package/lib/mcp/browser/tools/evaluate.js +5 -5
  15. package/lib/mcp/browser/tools/files.js +3 -3
  16. package/lib/mcp/browser/tools/form.js +7 -7
  17. package/lib/mcp/browser/tools/install.js +2 -2
  18. package/lib/mcp/browser/tools/keyboard.js +6 -6
  19. package/lib/mcp/browser/tools/mouse.js +11 -11
  20. package/lib/mcp/browser/tools/navigate.js +4 -4
  21. package/lib/mcp/browser/tools/network.js +17 -11
  22. package/lib/mcp/browser/tools/pdf.js +3 -3
  23. package/lib/mcp/browser/tools/runCode.js +3 -3
  24. package/lib/mcp/browser/tools/screenshot.js +7 -7
  25. package/lib/mcp/browser/tools/snapshot.js +14 -14
  26. package/lib/mcp/browser/tools/tabs.js +4 -4
  27. package/lib/mcp/browser/tools/tool.js +8 -7
  28. package/lib/mcp/browser/tools/tracing.js +3 -3
  29. package/lib/mcp/browser/tools/verify.js +15 -15
  30. package/lib/mcp/browser/tools/wait.js +5 -5
  31. package/lib/mcp/program.js +1 -1
  32. package/lib/mcp/sdk/http.js +1 -1
  33. package/lib/mcp/sdk/proxyBackend.js +1 -1
  34. package/lib/mcp/sdk/server.js +1 -1
  35. package/lib/mcp/sdk/tool.js +2 -2
  36. package/lib/mcp/test/browserBackend.js +1 -1
  37. package/lib/mcp/test/generatorTools.js +9 -9
  38. package/lib/mcp/test/plannerTools.js +16 -16
  39. package/lib/mcp/test/testBackend.js +2 -2
  40. package/lib/mcp/test/testTools.js +9 -9
  41. package/package.json +2 -2
  42. package/types/test.d.ts +1 -3
  43. package/lib/mcp/sdk/bundle.js +0 -84
  44. package/lib/mcpBundleImpl.js +0 -96
@@ -42,7 +42,7 @@ var import_proxyBackend = require("./sdk/proxyBackend");
42
42
  var import_browserServerBackend = require("./browser/browserServerBackend");
43
43
  var import_extensionContextFactory = require("./extension/extensionContextFactory");
44
44
  function decorateCommand(command, version) {
45
- command.option("--allowed-hosts <hosts...>", "comma-separated list of hosts this server is allowed to serve from. Defaults to the host the server is bound to. Pass '*' to disable the host check.", import_config.commaSeparatedList).option("--allowed-origins <origins>", "semicolon-separated list of TRUSTED origins to allow the browser to request. Default is to allow all.\nImportant: *does not* serve as a security boundary and *does not* affect redirects. ", import_config.semicolonSeparatedList).option("--blocked-origins <origins>", "semicolon-separated list of origins to block the browser from requesting. Blocklist is evaluated before allowlist. If used without the allowlist, requests not matching the blocklist are still allowed.\nImportant: *does not* serve as a security boundary and *does not* affect redirects.", import_config.semicolonSeparatedList).option("--block-service-workers", "block service workers").option("--browser <browser>", "browser or chrome channel to use, possible values: chrome, firefox, webkit, msedge.").option("--caps <caps>", "comma-separated list of additional capabilities to enable, possible values: vision, pdf.", import_config.commaSeparatedList).option("--cdp-endpoint <endpoint>", "CDP endpoint to connect to.").option("--cdp-header <headers...>", "CDP headers to send with the connect request, multiple can be specified.", import_config.headerParser).option("--config <path>", "path to the configuration file.").option("--device <device>", 'device to emulate, for example: "iPhone 15"').option("--executable-path <path>", "path to the browser executable.").option("--extension", 'Connect to a running browser instance (Edge/Chrome only). Requires the "Playwright MCP Bridge" browser extension to be installed.').option("--grant-permissions <permissions...>", 'List of permissions to grant to the browser context, for example "geolocation", "clipboard-read", "clipboard-write".', import_config.commaSeparatedList).option("--headless", "run browser in headless mode, headed by default").option("--host <host>", "host to bind server to. Default is localhost. Use 0.0.0.0 to bind to all interfaces.").option("--ignore-https-errors", "ignore https errors").option("--init-page <path...>", "path to TypeScript file to evaluate on Playwright page object").option("--init-script <path...>", "path to JavaScript file to add as an initialization script. The script will be evaluated in every page before any of the page's scripts. Can be specified multiple times.").option("--isolated", "keep the browser profile in memory, do not save it to disk.").option("--image-responses <mode>", 'whether to send image responses to the client. Can be "allow" or "omit", Defaults to "allow".').option("--no-sandbox", "disable the sandbox for all process types that are normally sandboxed.").option("--output-dir <path>", "path to the directory for output files.").option("--port <port>", "port to listen on for SSE transport.").option("--proxy-bypass <bypass>", 'comma-separated domains to bypass proxy, for example ".com,chromium.org,.domain.com"').option("--proxy-server <proxy>", 'specify proxy server, for example "http://myproxy:3128" or "socks5://myproxy:8080"').option("--save-session", "Whether to save the Playwright MCP session into the output directory.").option("--save-trace", "Whether to save the Playwright Trace of the session into the output directory.").option("--save-video <size>", 'Whether to save the video of the session into the output directory. For example "--save-video=800x600"', import_config.resolutionParser.bind(null, "--save-video")).option("--secrets <path>", "path to a file containing secrets in the dotenv format", import_config.dotenvFileLoader).option("--shared-browser-context", "reuse the same browser context between all connected HTTP clients.").option("--snapshot-mode <mode>", 'when taking snapshots for responses, specifies the mode to use. Can be "incremental", "full", or "none". Default is incremental.').option("--storage-state <path>", "path to the storage state file for isolated sessions.").option("--test-id-attribute <attribute>", 'specify the attribute to use for test ids, defaults to "data-testid"').option("--timeout-action <timeout>", "specify action timeout in milliseconds, defaults to 5000ms", import_config.numberParser).option("--timeout-navigation <timeout>", "specify navigation timeout in milliseconds, defaults to 60000ms", import_config.numberParser).option("--user-agent <ua string>", "specify user agent string").option("--user-data-dir <path>", "path to the user data directory. If not specified, a temporary directory will be created.").option("--viewport-size <size>", 'specify browser viewport size in pixels, for example "1280x720"', import_config.resolutionParser.bind(null, "--viewport-size")).addOption(new import_utilsBundle.ProgramOption("--connect-tool", "Allow to switch between different browser connection methods.").hideHelp()).addOption(new import_utilsBundle.ProgramOption("--vision", "Legacy option, use --caps=vision instead").hideHelp()).action(async (options) => {
45
+ command.option("--allowed-hosts <hosts...>", "comma-separated list of hosts this server is allowed to serve from. Defaults to the host the server is bound to. Pass '*' to disable the host check.", import_config.commaSeparatedList).option("--allowed-origins <origins>", "semicolon-separated list of TRUSTED origins to allow the browser to request. Default is to allow all.\nImportant: *does not* serve as a security boundary and *does not* affect redirects. ", import_config.semicolonSeparatedList).option("--blocked-origins <origins>", "semicolon-separated list of origins to block the browser from requesting. Blocklist is evaluated before allowlist. If used without the allowlist, requests not matching the blocklist are still allowed.\nImportant: *does not* serve as a security boundary and *does not* affect redirects.", import_config.semicolonSeparatedList).option("--block-service-workers", "block service workers").option("--browser <browser>", "browser or chrome channel to use, possible values: chrome, firefox, webkit, msedge.").option("--caps <caps>", "comma-separated list of additional capabilities to enable, possible values: vision, pdf.", import_config.commaSeparatedList).option("--cdp-endpoint <endpoint>", "CDP endpoint to connect to.").option("--cdp-header <headers...>", "CDP headers to send with the connect request, multiple can be specified.", import_config.headerParser).option("--config <path>", "path to the configuration file.").option("--console-level <level>", 'level of console messages to return: "error", "warning", "info", "debug". Each level includes the messages of more severe levels.', import_config.enumParser.bind(null, "--console-level", ["error", "warning", "info", "debug"])).option("--device <device>", 'device to emulate, for example: "iPhone 15"').option("--executable-path <path>", "path to the browser executable.").option("--extension", 'Connect to a running browser instance (Edge/Chrome only). Requires the "Playwright MCP Bridge" browser extension to be installed.').option("--grant-permissions <permissions...>", 'List of permissions to grant to the browser context, for example "geolocation", "clipboard-read", "clipboard-write".', import_config.commaSeparatedList).option("--headless", "run browser in headless mode, headed by default").option("--host <host>", "host to bind server to. Default is localhost. Use 0.0.0.0 to bind to all interfaces.").option("--ignore-https-errors", "ignore https errors").option("--init-page <path...>", "path to TypeScript file to evaluate on Playwright page object").option("--init-script <path...>", "path to JavaScript file to add as an initialization script. The script will be evaluated in every page before any of the page's scripts. Can be specified multiple times.").option("--isolated", "keep the browser profile in memory, do not save it to disk.").option("--image-responses <mode>", 'whether to send image responses to the client. Can be "allow" or "omit", Defaults to "allow".', import_config.enumParser.bind(null, "--image-responses", ["allow", "omit"])).option("--no-sandbox", "disable the sandbox for all process types that are normally sandboxed.").option("--output-dir <path>", "path to the directory for output files.").option("--port <port>", "port to listen on for SSE transport.").option("--proxy-bypass <bypass>", 'comma-separated domains to bypass proxy, for example ".com,chromium.org,.domain.com"').option("--proxy-server <proxy>", 'specify proxy server, for example "http://myproxy:3128" or "socks5://myproxy:8080"').option("--save-session", "Whether to save the Playwright MCP session into the output directory.").option("--save-trace", "Whether to save the Playwright Trace of the session into the output directory.").option("--save-video <size>", 'Whether to save the video of the session into the output directory. For example "--save-video=800x600"', import_config.resolutionParser.bind(null, "--save-video")).option("--secrets <path>", "path to a file containing secrets in the dotenv format", import_config.dotenvFileLoader).option("--shared-browser-context", "reuse the same browser context between all connected HTTP clients.").option("--snapshot-mode <mode>", 'when taking snapshots for responses, specifies the mode to use. Can be "incremental", "full", or "none". Default is incremental.').option("--storage-state <path>", "path to the storage state file for isolated sessions.").option("--test-id-attribute <attribute>", 'specify the attribute to use for test ids, defaults to "data-testid"').option("--timeout-action <timeout>", "specify action timeout in milliseconds, defaults to 5000ms", import_config.numberParser).option("--timeout-navigation <timeout>", "specify navigation timeout in milliseconds, defaults to 60000ms", import_config.numberParser).option("--user-agent <ua string>", "specify user agent string").option("--user-data-dir <path>", "path to the user data directory. If not specified, a temporary directory will be created.").option("--viewport-size <size>", 'specify browser viewport size in pixels, for example "1280x720"', import_config.resolutionParser.bind(null, "--viewport-size")).addOption(new import_utilsBundle.ProgramOption("--connect-tool", "Allow to switch between different browser connection methods.").hideHelp()).addOption(new import_utilsBundle.ProgramOption("--vision", "Legacy option, use --caps=vision instead").hideHelp()).action(async (options) => {
46
46
  (0, import_watchdog.setupExitWatchdog)();
47
47
  if (options.vision) {
48
48
  console.error("The --vision option is deprecated, use --caps=vision instead");
@@ -37,7 +37,7 @@ var import_assert = __toESM(require("assert"));
37
37
  var import_http = __toESM(require("http"));
38
38
  var import_crypto = __toESM(require("crypto"));
39
39
  var import_utilsBundle = require("playwright-core/lib/utilsBundle");
40
- var mcpBundle = __toESM(require("./bundle"));
40
+ var mcpBundle = __toESM(require("playwright-core/lib/mcpBundle"));
41
41
  var mcpServer = __toESM(require("./server"));
42
42
  const testDebug = (0, import_utilsBundle.debug)("pw:mcp:test");
43
43
  async function startHttpServer(config, abortSignal) {
@@ -32,7 +32,7 @@ __export(proxyBackend_exports, {
32
32
  });
33
33
  module.exports = __toCommonJS(proxyBackend_exports);
34
34
  var import_utilsBundle = require("playwright-core/lib/utilsBundle");
35
- var mcpBundle = __toESM(require("./bundle"));
35
+ var mcpBundle = __toESM(require("playwright-core/lib/mcpBundle"));
36
36
  const errorsDebug = (0, import_utilsBundle.debug)("pw:mcp:errors");
37
37
  const { z, zodToJsonSchema } = mcpBundle;
38
38
  class ProxyBackend {
@@ -38,7 +38,7 @@ __export(server_exports, {
38
38
  module.exports = __toCommonJS(server_exports);
39
39
  var import_url = require("url");
40
40
  var import_utilsBundle = require("playwright-core/lib/utilsBundle");
41
- var mcpBundle = __toESM(require("./bundle"));
41
+ var mcpBundle = __toESM(require("playwright-core/lib/mcpBundle"));
42
42
  var import_http = require("./http");
43
43
  var import_inProcessTransport = require("./inProcessTransport");
44
44
  const serverDebug = (0, import_utilsBundle.debug)("pw:mcp:server");
@@ -22,13 +22,13 @@ __export(tool_exports, {
22
22
  toMcpTool: () => toMcpTool
23
23
  });
24
24
  module.exports = __toCommonJS(tool_exports);
25
- var import_bundle = require("../sdk/bundle");
25
+ var import_mcpBundle = require("playwright-core/lib/mcpBundle");
26
26
  function toMcpTool(tool) {
27
27
  const readOnly = tool.type === "readOnly" || tool.type === "assertion";
28
28
  return {
29
29
  name: tool.name,
30
30
  description: tool.description,
31
- inputSchema: (0, import_bundle.zodToJsonSchema)(tool.inputSchema, { strictUnions: true }),
31
+ inputSchema: (0, import_mcpBundle.zodToJsonSchema)(tool.inputSchema, { strictUnions: true }),
32
32
  annotations: {
33
33
  title: tool.title,
34
34
  readOnlyHint: readOnly,
@@ -74,7 +74,7 @@ async function generatePausedMessage(testInfo, context) {
74
74
  `- Page Title: ${await page.title()}`.trim()
75
75
  );
76
76
  let console = testInfo.errors.length ? await import_tab.Tab.collectConsoleMessages(page) : [];
77
- console = console.filter((msg) => !msg.type || msg.type === "error");
77
+ console = console.filter((msg) => msg.type === "error");
78
78
  if (console.length) {
79
79
  lines.push("- Console Messages:");
80
80
  for (const message of console)
@@ -35,7 +35,7 @@ __export(generatorTools_exports, {
35
35
  module.exports = __toCommonJS(generatorTools_exports);
36
36
  var import_fs = __toESM(require("fs"));
37
37
  var import_path = __toESM(require("path"));
38
- var import_bundle = require("../sdk/bundle");
38
+ var import_mcpBundle = require("playwright-core/lib/mcpBundle");
39
39
  var import_testTool = require("./testTool");
40
40
  var import_testContext = require("./testContext");
41
41
  const setupPage = (0, import_testTool.defineTestTool)({
@@ -43,10 +43,10 @@ const setupPage = (0, import_testTool.defineTestTool)({
43
43
  name: "generator_setup_page",
44
44
  title: "Setup generator page",
45
45
  description: "Setup the page for test.",
46
- inputSchema: import_bundle.z.object({
47
- plan: import_bundle.z.string().describe("The plan for the test. This should be the actual test plan with all the steps."),
48
- project: import_bundle.z.string().optional().describe('Project to use for setup. For example: "chromium", if no project is provided uses the first project in the config.'),
49
- seedFile: import_bundle.z.string().optional().describe('A seed file contains a single test that is used to setup the page for testing, for example: "tests/seed.spec.ts". If no seed file is provided, a default seed file is created.')
46
+ inputSchema: import_mcpBundle.z.object({
47
+ plan: import_mcpBundle.z.string().describe("The plan for the test. This should be the actual test plan with all the steps."),
48
+ project: import_mcpBundle.z.string().optional().describe('Project to use for setup. For example: "chromium", if no project is provided uses the first project in the config.'),
49
+ seedFile: import_mcpBundle.z.string().optional().describe('A seed file contains a single test that is used to setup the page for testing, for example: "tests/seed.spec.ts". If no seed file is provided, a default seed file is created.')
50
50
  }),
51
51
  type: "readOnly"
52
52
  },
@@ -62,7 +62,7 @@ const generatorReadLog = (0, import_testTool.defineTestTool)({
62
62
  name: "generator_read_log",
63
63
  title: "Retrieve test log",
64
64
  description: "Retrieve the performed test log",
65
- inputSchema: import_bundle.z.object({}),
65
+ inputSchema: import_mcpBundle.z.object({}),
66
66
  type: "readOnly"
67
67
  },
68
68
  handle: async (context) => {
@@ -80,9 +80,9 @@ const generatorWriteTest = (0, import_testTool.defineTestTool)({
80
80
  name: "generator_write_test",
81
81
  title: "Write test",
82
82
  description: "Write the generated test to the test file",
83
- inputSchema: import_bundle.z.object({
84
- fileName: import_bundle.z.string().describe("The file to write the test to"),
85
- code: import_bundle.z.string().describe("The generated test code")
83
+ inputSchema: import_mcpBundle.z.object({
84
+ fileName: import_mcpBundle.z.string().describe("The file to write the test to"),
85
+ code: import_mcpBundle.z.string().describe("The generated test code")
86
86
  }),
87
87
  type: "readOnly"
88
88
  },
@@ -35,16 +35,16 @@ __export(plannerTools_exports, {
35
35
  module.exports = __toCommonJS(plannerTools_exports);
36
36
  var import_fs = __toESM(require("fs"));
37
37
  var import_path = __toESM(require("path"));
38
- var import_bundle = require("../sdk/bundle");
38
+ var import_mcpBundle = require("playwright-core/lib/mcpBundle");
39
39
  var import_testTool = require("./testTool");
40
40
  const setupPage = (0, import_testTool.defineTestTool)({
41
41
  schema: {
42
42
  name: "planner_setup_page",
43
43
  title: "Setup planner page",
44
44
  description: "Setup the page for test planning",
45
- inputSchema: import_bundle.z.object({
46
- project: import_bundle.z.string().optional().describe('Project to use for setup. For example: "chromium", if no project is provided uses the first project in the config.'),
47
- seedFile: import_bundle.z.string().optional().describe('A seed file contains a single test that is used to setup the page for testing, for example: "tests/seed.spec.ts". If no seed file is provided, a default seed file is created.')
45
+ inputSchema: import_mcpBundle.z.object({
46
+ project: import_mcpBundle.z.string().optional().describe('Project to use for setup. For example: "chromium", if no project is provided uses the first project in the config.'),
47
+ seedFile: import_mcpBundle.z.string().optional().describe('A seed file contains a single test that is used to setup the page for testing, for example: "tests/seed.spec.ts". If no seed file is provided, a default seed file is created.')
48
48
  }),
49
49
  type: "readOnly"
50
50
  },
@@ -54,16 +54,16 @@ const setupPage = (0, import_testTool.defineTestTool)({
54
54
  return { content: [{ type: "text", text: output }], isError: status !== "paused" };
55
55
  }
56
56
  });
57
- const planSchema = import_bundle.z.object({
58
- overview: import_bundle.z.string().describe("A brief overview of the application to be tested"),
59
- suites: import_bundle.z.array(import_bundle.z.object({
60
- name: import_bundle.z.string().describe("The name of the suite"),
61
- seedFile: import_bundle.z.string().describe("A seed file that was used to setup the page for testing."),
62
- tests: import_bundle.z.array(import_bundle.z.object({
63
- name: import_bundle.z.string().describe("The name of the test"),
64
- file: import_bundle.z.string().describe('The file the test should be saved to, for example: "tests/<suite-name>/<test-name>.spec.ts".'),
65
- steps: import_bundle.z.array(import_bundle.z.string().describe(`The steps to be executed to perform the test. For example: 'Click on the "Submit" button'`)),
66
- expectedResults: import_bundle.z.array(import_bundle.z.string().describe("The expected results of the steps for test to verify."))
57
+ const planSchema = import_mcpBundle.z.object({
58
+ overview: import_mcpBundle.z.string().describe("A brief overview of the application to be tested"),
59
+ suites: import_mcpBundle.z.array(import_mcpBundle.z.object({
60
+ name: import_mcpBundle.z.string().describe("The name of the suite"),
61
+ seedFile: import_mcpBundle.z.string().describe("A seed file that was used to setup the page for testing."),
62
+ tests: import_mcpBundle.z.array(import_mcpBundle.z.object({
63
+ name: import_mcpBundle.z.string().describe("The name of the test"),
64
+ file: import_mcpBundle.z.string().describe('The file the test should be saved to, for example: "tests/<suite-name>/<test-name>.spec.ts".'),
65
+ steps: import_mcpBundle.z.array(import_mcpBundle.z.string().describe(`The steps to be executed to perform the test. For example: 'Click on the "Submit" button'`)),
66
+ expectedResults: import_mcpBundle.z.array(import_mcpBundle.z.string().describe("The expected results of the steps for test to verify."))
67
67
  }))
68
68
  }))
69
69
  });
@@ -90,8 +90,8 @@ const saveTestPlan = (0, import_testTool.defineTestTool)({
90
90
  title: "Save test plan as markdown file",
91
91
  description: "Save the test plan as a markdown file",
92
92
  inputSchema: planSchema.extend({
93
- name: import_bundle.z.string().describe('The name of the test plan, for example: "Test Plan".'),
94
- fileName: import_bundle.z.string().describe('The file to save the test plan to, for example: "spec/test.plan.md". Relative to the workspace root.')
93
+ name: import_mcpBundle.z.string().describe('The name of the test plan, for example: "Test Plan".'),
94
+ fileName: import_mcpBundle.z.string().describe('The file to save the test plan to, for example: "spec/test.plan.md". Relative to the workspace root.')
95
95
  }),
96
96
  type: "readOnly"
97
97
  },
@@ -31,13 +31,13 @@ __export(testBackend_exports, {
31
31
  TestServerBackend: () => TestServerBackend
32
32
  });
33
33
  module.exports = __toCommonJS(testBackend_exports);
34
+ var import_mcpBundle = require("playwright-core/lib/mcpBundle");
34
35
  var mcp = __toESM(require("../sdk/exports"));
35
36
  var import_testContext = require("./testContext");
36
37
  var testTools = __toESM(require("./testTools.js"));
37
38
  var generatorTools = __toESM(require("./generatorTools.js"));
38
39
  var plannerTools = __toESM(require("./plannerTools.js"));
39
40
  var import_tools = require("../browser/tools");
40
- var import_bundle = require("../sdk/bundle");
41
41
  class TestServerBackend {
42
42
  constructor(configPath, options) {
43
43
  this.name = "Playwright";
@@ -80,7 +80,7 @@ class TestServerBackend {
80
80
  const typesWithIntent = ["action", "assertion", "input"];
81
81
  function wrapBrowserTool(tool) {
82
82
  const inputSchema = typesWithIntent.includes(tool.schema.type) ? tool.schema.inputSchema.extend({
83
- intent: import_bundle.z.string().describe("The intent of the call, for example the test step description plan idea")
83
+ intent: import_mcpBundle.z.string().describe("The intent of the call, for example the test step description plan idea")
84
84
  }) : tool.schema.inputSchema;
85
85
  return {
86
86
  schema: {
@@ -33,7 +33,7 @@ __export(testTools_exports, {
33
33
  runTests: () => runTests
34
34
  });
35
35
  module.exports = __toCommonJS(testTools_exports);
36
- var import_bundle = require("../sdk/bundle");
36
+ var import_mcpBundle = require("playwright-core/lib/mcpBundle");
37
37
  var import_listModeReporter = __toESM(require("../../reporters/listModeReporter"));
38
38
  var import_testTool = require("./testTool");
39
39
  const listTests = (0, import_testTool.defineTestTool)({
@@ -41,7 +41,7 @@ const listTests = (0, import_testTool.defineTestTool)({
41
41
  name: "test_list",
42
42
  title: "List tests",
43
43
  description: "List tests",
44
- inputSchema: import_bundle.z.object({}),
44
+ inputSchema: import_mcpBundle.z.object({}),
45
45
  type: "readOnly"
46
46
  },
47
47
  handle: async (context) => {
@@ -56,9 +56,9 @@ const runTests = (0, import_testTool.defineTestTool)({
56
56
  name: "test_run",
57
57
  title: "Run tests",
58
58
  description: "Run tests",
59
- inputSchema: import_bundle.z.object({
60
- locations: import_bundle.z.array(import_bundle.z.string()).optional().describe('Folder, file or location to run: "test/e2e" or "test/e2e/file.spec.ts" or "test/e2e/file.spec.ts:20"'),
61
- projects: import_bundle.z.array(import_bundle.z.string()).optional().describe('Projects to run, projects from playwright.config.ts, by default runs all projects. Running with "chromium" is a good start')
59
+ inputSchema: import_mcpBundle.z.object({
60
+ locations: import_mcpBundle.z.array(import_mcpBundle.z.string()).optional().describe('Folder, file or location to run: "test/e2e" or "test/e2e/file.spec.ts" or "test/e2e/file.spec.ts:20"'),
61
+ projects: import_mcpBundle.z.array(import_mcpBundle.z.string()).optional().describe('Projects to run, projects from playwright.config.ts, by default runs all projects. Running with "chromium" is a good start')
62
62
  }),
63
63
  type: "readOnly"
64
64
  },
@@ -76,10 +76,10 @@ const debugTest = (0, import_testTool.defineTestTool)({
76
76
  name: "test_debug",
77
77
  title: "Debug single test",
78
78
  description: "Debug single test",
79
- inputSchema: import_bundle.z.object({
80
- test: import_bundle.z.object({
81
- id: import_bundle.z.string().describe("Test ID to debug."),
82
- title: import_bundle.z.string().describe("Human readable test title for granting permission to debug the test.")
79
+ inputSchema: import_mcpBundle.z.object({
80
+ test: import_mcpBundle.z.object({
81
+ id: import_mcpBundle.z.string().describe("Test ID to debug."),
82
+ title: import_mcpBundle.z.string().describe("Human readable test title for granting permission to debug the test.")
83
83
  })
84
84
  }),
85
85
  type: "readOnly"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playwright",
3
- "version": "1.58.0-alpha-2025-12-03",
3
+ "version": "1.58.0-alpha-2025-12-05",
4
4
  "description": "A high-level API to automate web browsers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -64,7 +64,7 @@
64
64
  },
65
65
  "license": "Apache-2.0",
66
66
  "dependencies": {
67
- "playwright-core": "1.58.0-alpha-2025-12-03"
67
+ "playwright-core": "1.58.0-alpha-2025-12-05"
68
68
  },
69
69
  "optionalDependencies": {
70
70
  "fsevents": "2.3.2"
package/types/test.d.ts CHANGED
@@ -6747,9 +6747,7 @@ export interface PlaywrightWorkerOptions {
6747
6747
  /**
6748
6748
  * Whether to run browser in headless mode. More details for
6749
6749
  * [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and
6750
- * [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the
6751
- * [`devtools`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-devtools) option is
6752
- * `true`.
6750
+ * [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true`.
6753
6751
  *
6754
6752
  * **Usage**
6755
6753
  *
@@ -1,84 +0,0 @@
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 bundle_exports = {};
30
- __export(bundle_exports, {
31
- CallToolRequestSchema: () => CallToolRequestSchema,
32
- Client: () => Client,
33
- ListRootsRequestSchema: () => ListRootsRequestSchema,
34
- ListToolsRequestSchema: () => ListToolsRequestSchema,
35
- Loop: () => Loop,
36
- PingRequestSchema: () => PingRequestSchema,
37
- ProgressNotificationSchema: () => ProgressNotificationSchema,
38
- SSEClientTransport: () => SSEClientTransport,
39
- SSEServerTransport: () => SSEServerTransport,
40
- Server: () => Server,
41
- StdioClientTransport: () => StdioClientTransport,
42
- StdioServerTransport: () => StdioServerTransport,
43
- StreamableHTTPClientTransport: () => StreamableHTTPClientTransport,
44
- StreamableHTTPServerTransport: () => StreamableHTTPServerTransport,
45
- z: () => z,
46
- zodToJsonSchema: () => zodToJsonSchema
47
- });
48
- module.exports = __toCommonJS(bundle_exports);
49
- var bundle = __toESM(require("../../mcpBundleImpl"));
50
- const zodToJsonSchema = bundle.zodToJsonSchema;
51
- const Client = bundle.Client;
52
- const Server = bundle.Server;
53
- const SSEClientTransport = bundle.SSEClientTransport;
54
- const SSEServerTransport = bundle.SSEServerTransport;
55
- const StdioClientTransport = bundle.StdioClientTransport;
56
- const StdioServerTransport = bundle.StdioServerTransport;
57
- const StreamableHTTPServerTransport = bundle.StreamableHTTPServerTransport;
58
- const StreamableHTTPClientTransport = bundle.StreamableHTTPClientTransport;
59
- const CallToolRequestSchema = bundle.CallToolRequestSchema;
60
- const ListRootsRequestSchema = bundle.ListRootsRequestSchema;
61
- const ProgressNotificationSchema = bundle.ProgressNotificationSchema;
62
- const ListToolsRequestSchema = bundle.ListToolsRequestSchema;
63
- const PingRequestSchema = bundle.PingRequestSchema;
64
- const Loop = bundle.Loop;
65
- const z = bundle.z;
66
- // Annotate the CommonJS export names for ESM import in node:
67
- 0 && (module.exports = {
68
- CallToolRequestSchema,
69
- Client,
70
- ListRootsRequestSchema,
71
- ListToolsRequestSchema,
72
- Loop,
73
- PingRequestSchema,
74
- ProgressNotificationSchema,
75
- SSEClientTransport,
76
- SSEServerTransport,
77
- Server,
78
- StdioClientTransport,
79
- StdioServerTransport,
80
- StreamableHTTPClientTransport,
81
- StreamableHTTPServerTransport,
82
- z,
83
- zodToJsonSchema
84
- });