Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore: mcp now has a new home at microsoft/playwright-mcp (#35351)

Pavel Feldmancbed3f73e110
diff --git a/package-lock.json b/package-lock.json
index 6d3de68723..d7b06db081 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1477,41 +1477,6 @@
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
- "node_modules/@modelcontextprotocol/sdk": {
- "version": "1.6.1",
- "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.6.1.tgz",
- "integrity": "sha512-oxzMzYCkZHMntzuyerehK3fV6A2Kwh5BD6CGEJSVDU2QNEhfLOptf2X7esQgaHZXHZY0oHmMsOtIDLP71UJXgA==",
- "dependencies": {
- "content-type": "^1.0.5",
- "cors": "^2.8.5",
- "eventsource": "^3.0.2",
- "express": "^5.0.1",
- "express-rate-limit": "^7.5.0",
- "pkce-challenge": "^4.1.0",
- "raw-body": "^3.0.0",
- "zod": "^3.23.8",
- "zod-to-json-schema": "^3.24.1"
- },
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@modelcontextprotocol/sdk/node_modules/zod": {
- "version": "3.24.2",
- "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.2.tgz",
- "integrity": "sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==",
- "funding": {
- "url": "https://github.com/sponsors/colinhacks"
- }
- },
- "node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema": {
- "version": "3.24.3",
- "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.24.3.tgz",
- "integrity": "sha512-HIAfWdYIt1sssHfYZFCXp4rU1w2r8hVVXYIlmoa0r0gABLs5di3RCqPU5DDROogVz1pAdYBaz7HK5n9pSUNs3A==",
- "peerDependencies": {
- "zod": "^3.24.1"
- }
- },
"node_modules/@nicolo-ribaudo/chokidar-2": {
"version": "2.1.8-no-fsevents.3",
"resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz",
@@ -1594,10 +1559,6 @@
"resolved": "packages/playwright-ct-vue",
"link": true
},
- "node_modules/@playwright/mcp": {
- "resolved": "packages/playwright-mcp",
- "link": true
- },
"node_modules/@playwright/test": {
"resolved": "packages/playwright-test",
"link": true
@@ -2519,37 +2480,6 @@
"dev": true,
"license": "ISC"
},
- "node_modules/accepts": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",
- "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",
- "dependencies": {
- "mime-types": "^3.0.0",
- "negotiator": "^1.0.0"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/accepts/node_modules/mime-db": {
- "version": "1.53.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.53.0.tgz",
- "integrity": "sha512-oHlN/w+3MQ3rba9rqFr6V/ypF10LSkdwUysQL7GkXoTgIWeV+tcXGA852TBxH+gsh8UWoyhR1hKcoMJTuWflpg==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/accepts/node_modules/mime-types": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.0.tgz",
- "integrity": "sha512-XqoSHeCGjVClAmoGFG3lVFqQFRIrTVw2OH3axRqAcfaw+gHWIfnASS92AV+Rl/mk0MupgZTRHQOjxY6YVnzK5w==",
- "dependencies": {
- "mime-db": "^1.53.0"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
"node_modules/acorn": {
"version": "8.14.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz",
@@ -2887,25 +2817,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/body-parser": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.1.0.tgz",
- "integrity": "sha512-/hPxh61E+ll0Ujp24Ilm64cykicul1ypfwjVttduAiEdtnJFvLePSrIPk+HMImtNv5270wOGCb1Tns2rybMkoQ==",
- "dependencies": {
- "bytes": "^3.1.2",
- "content-type": "^1.0.5",
- "debug": "^4.4.0",
- "http-errors": "^2.0.0",
- "iconv-lite": "^0.5.2",
- "on-finished": "^2.4.1",
- "qs": "^6.14.0",
- "raw-body": "^3.0.0",
- "type-is": "^2.0.0"
- },
- "engines": {
- "node": ">=18"
- }
- },
"node_modules/boolean": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz",
@@ -2981,14 +2892,6 @@
"node": "*"
}
},
- "node_modules/bytes": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
- "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
- "engines": {
- "node": ">= 0.8"
- }
- },
"node_modules/cacheable-lookup": {
"version": "5.0.4",
"resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz",
@@ -3041,6 +2944,7 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0",
@@ -3054,6 +2958,7 @@
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz",
"integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"call-bind-apply-helpers": "^1.0.1",
@@ -3280,59 +3185,12 @@
"node": ">=10.0.0"
}
},
- "node_modules/content-disposition": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.0.tgz",
- "integrity": "sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==",
- "dependencies": {
- "safe-buffer": "5.2.1"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/content-type": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
- "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
- "engines": {
- "node": ">= 0.6"
- }
- },
"node_modules/convert-source-map": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
"integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
"license": "MIT"
},
- "node_modules/cookie": {
- "version": "0.7.1",
- "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz",
- "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/cookie-signature": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz",
- "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==",
- "engines": {
- "node": ">=6.6.0"
- }
- },
- "node_modules/cors": {
- "version": "2.8.5",
- "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
- "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
- "dependencies": {
- "object-assign": "^4",
- "vary": "^1"
- },
- "engines": {
- "node": ">= 0.10"
- }
- },
"node_modules/cross-env": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz",
@@ -3576,23 +3434,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/depd": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
- "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/destroy": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
- "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
- "engines": {
- "node": ">= 0.8",
- "npm": "1.2.8000 || >= 1.4.16"
- }
- },
"node_modules/detect-node": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz",
@@ -3650,6 +3491,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"call-bind-apply-helpers": "^1.0.1",
@@ -3660,11 +3502,6 @@
"node": ">= 0.4"
}
},
- "node_modules/ee-first": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
- "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
- },
"node_modules/electron": {
"version": "30.5.1",
"resolved": "https://registry.npmjs.org/electron/-/electron-30.5.1.tgz",
@@ -3714,14 +3551,6 @@
"dev": true,
"license": "MIT"
},
- "node_modules/encodeurl": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
- "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
- "engines": {
- "node": ">= 0.8"
- }
- },
"node_modules/end-of-stream": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
@@ -3825,6 +3654,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
+ "dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.4"
@@ -3834,6 +3664,7 @@
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
+ "dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.4"
@@ -3871,6 +3702,7 @@
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0"
@@ -3983,11 +3815,6 @@
"node": ">=6"
}
},
- "node_modules/escape-html": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
- "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
- },
"node_modules/escape-string-regexp": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
@@ -4350,143 +4177,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/etag": {
- "version": "1.8.1",
- "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
- "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/eventsource": {
- "version": "3.0.5",
- "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.5.tgz",
- "integrity": "sha512-LT/5J605bx5SNyE+ITBDiM3FxffBiq9un7Vx0EwMDM3vg8sWKx/tO2zC+LMqZ+smAM0F2hblaDZUVZF0te2pSw==",
- "dependencies": {
- "eventsource-parser": "^3.0.0"
- },
- "engines": {
- "node": ">=18.0.0"
- }
- },
- "node_modules/eventsource-parser": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.0.tgz",
- "integrity": "sha512-T1C0XCUimhxVQzW4zFipdx0SficT651NnkR0ZSH3yQwh+mFMdLfgjABVi4YtMTtaL4s168593DaoaRLMqryavA==",
- "engines": {
- "node": ">=18.0.0"
- }
- },
- "node_modules/express": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/express/-/express-5.0.1.tgz",
- "integrity": "sha512-ORF7g6qGnD+YtUG9yx4DFoqCShNMmUKiXuT5oWMHiOvt/4WFbHC6yCwQMTSBMno7AqntNCAzzcnnjowRkTL9eQ==",
- "dependencies": {
- "accepts": "^2.0.0",
- "body-parser": "^2.0.1",
- "content-disposition": "^1.0.0",
- "content-type": "~1.0.4",
- "cookie": "0.7.1",
- "cookie-signature": "^1.2.1",
- "debug": "4.3.6",
- "depd": "2.0.0",
- "encodeurl": "~2.0.0",
- "escape-html": "~1.0.3",
- "etag": "~1.8.1",
- "finalhandler": "^2.0.0",
- "fresh": "2.0.0",
- "http-errors": "2.0.0",
- "merge-descriptors": "^2.0.0",
- "methods": "~1.1.2",
- "mime-types": "^3.0.0",
- "on-finished": "2.4.1",
- "once": "1.4.0",
- "parseurl": "~1.3.3",
- "proxy-addr": "~2.0.7",
- "qs": "6.13.0",
- "range-parser": "~1.2.1",
- "router": "^2.0.0",
- "safe-buffer": "5.2.1",
- "send": "^1.1.0",
- "serve-static": "^2.1.0",
- "setprototypeof": "1.2.0",
- "statuses": "2.0.1",
- "type-is": "^2.0.0",
- "utils-merge": "1.0.1",
- "vary": "~1.1.2"
- },
- "engines": {
- "node": ">= 18"
- }
- },
- "node_modules/express-rate-limit": {
- "version": "7.5.0",
- "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.5.0.tgz",
- "integrity": "sha512-eB5zbQh5h+VenMPM3fh+nw1YExi5nMr6HUCR62ELSP11huvxm/Uir1H1QEyTkk5QX6A58pX6NmaTMceKZ0Eodg==",
- "engines": {
- "node": ">= 16"
- },
- "funding": {
- "url": "https://github.com/sponsors/express-rate-limit"
- },
- "peerDependencies": {
- "express": "^4.11 || 5 || ^5.0.0-beta.1"
- }
- },
- "node_modules/express/node_modules/debug": {
- "version": "4.3.6",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz",
- "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==",
- "dependencies": {
- "ms": "2.1.2"
- },
- "engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
- }
- },
- "node_modules/express/node_modules/mime-db": {
- "version": "1.53.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.53.0.tgz",
- "integrity": "sha512-oHlN/w+3MQ3rba9rqFr6V/ypF10LSkdwUysQL7GkXoTgIWeV+tcXGA852TBxH+gsh8UWoyhR1hKcoMJTuWflpg==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/express/node_modules/mime-types": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.0.tgz",
- "integrity": "sha512-XqoSHeCGjVClAmoGFG3lVFqQFRIrTVw2OH3axRqAcfaw+gHWIfnASS92AV+Rl/mk0MupgZTRHQOjxY6YVnzK5w==",
- "dependencies": {
- "mime-db": "^1.53.0"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/express/node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
- },
- "node_modules/express/node_modules/qs": {
- "version": "6.13.0",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
- "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
- "dependencies": {
- "side-channel": "^1.0.6"
- },
- "engines": {
- "node": ">=0.6"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/extract-zip": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",
@@ -4592,22 +4282,6 @@
"node": ">=8"
}
},
- "node_modules/finalhandler": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.0.tgz",
- "integrity": "sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==",
- "dependencies": {
- "debug": "^4.4.0",
- "encodeurl": "^2.0.0",
- "escape-html": "^1.0.3",
- "on-finished": "^2.4.1",
- "parseurl": "^1.3.3",
- "statuses": "^2.0.1"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
"node_modules/find-root": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz",
@@ -4685,22 +4359,6 @@
"url": "https://ko-fi.com/tunnckoCore/commissions"
}
},
- "node_modules/forwarded": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
- "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/fresh": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",
- "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",
- "engines": {
- "node": ">= 0.8"
- }
- },
"node_modules/fs-extra": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
@@ -4748,6 +4406,7 @@
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "dev": true,
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/ljharb"
@@ -4807,6 +4466,7 @@
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz",
"integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"call-bind-apply-helpers": "^1.0.1",
@@ -4831,6 +4491,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"dunder-proto": "^1.0.1",
@@ -4972,6 +4633,7 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
+ "dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.4"
@@ -5076,6 +4738,7 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
+ "dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.4"
@@ -5104,6 +4767,7 @@
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"function-bind": "^1.1.2"
@@ -5140,21 +4804,6 @@
"dev": true,
"license": "BSD-2-Clause"
},
- "node_modules/http-errors": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
- "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
- "dependencies": {
- "depd": "2.0.0",
- "inherits": "2.0.4",
- "setprototypeof": "1.2.0",
- "statuses": "2.0.1",
- "toidentifier": "1.0.1"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
"node_modules/http2-wrapper": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz",
@@ -5169,17 +4818,6 @@
"node": ">=10.19.0"
}
},
- "node_modules/iconv-lite": {
- "version": "0.5.2",
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.5.2.tgz",
- "integrity": "sha512-kERHXvpSaB4aU3eANwidg79K8FlrN77m8G9V+0vOR3HYaRifrlwMEpT7ZBJqLSEIHnEgJTHcWK82wwLwwKwtag==",
- "dependencies": {
- "safer-buffer": ">= 2.1.2 < 3"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/ignore": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
@@ -5240,6 +4878,7 @@
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "dev": true,
"license": "ISC"
},
"node_modules/internal-slot": {
@@ -5257,14 +4896,6 @@
"node": ">= 0.4"
}
},
- "node_modules/ipaddr.js": {
- "version": "1.9.1",
- "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
- "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
- "engines": {
- "node": ">= 0.10"
- }
- },
"node_modules/is-array-buffer": {
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz",
@@ -5521,11 +5152,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/is-promise": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
- "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ=="
- },
"node_modules/is-reference": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.3.tgz",
@@ -6100,6 +5726,7 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
+ "dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.4"
@@ -6111,25 +5738,6 @@
"integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==",
"license": "CC0-1.0"
},
- "node_modules/media-typer": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",
- "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/merge-descriptors": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz",
- "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==",
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/merge2": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
@@ -6140,14 +5748,6 @@
"node": ">= 8"
}
},
- "node_modules/methods": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
- "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
- "engines": {
- "node": ">= 0.6"
- }
- },
"node_modules/metric-lcs": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/metric-lcs/-/metric-lcs-0.1.2.tgz",
@@ -6195,27 +5795,6 @@
"node": ">=10.0.0"
}
},
- "node_modules/mime-db": {
- "version": "1.52.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
- "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/mime-types": {
- "version": "2.1.35",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
- "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
- "license": "MIT",
- "dependencies": {
- "mime-db": "1.52.0"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
"node_modules/mimic-response": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz",
@@ -6300,14 +5879,6 @@
"dev": true,
"license": "MIT"
},
- "node_modules/negotiator": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz",
- "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==",
- "engines": {
- "node": ">= 0.6"
- }
- },
"node_modules/node-releases": {
"version": "2.0.19",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz",
@@ -6399,6 +5970,7 @@
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
+ "dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
@@ -6408,6 +5980,7 @@
"version": "1.13.4",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
"integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
+ "dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.4"
@@ -6515,21 +6088,11 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/on-finished": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
- "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
- "dependencies": {
- "ee-first": "1.1.1"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "dev": true,
"license": "ISC",
"dependencies": {
"wrappy": "1"
@@ -6658,14 +6221,6 @@
"node": ">=6"
}
},
- "node_modules/parseurl": {
- "version": "1.3.3",
- "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
- "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
- "engines": {
- "node": ">= 0.8"
- }
- },
"node_modules/path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
@@ -6703,14 +6258,6 @@
"dev": true,
"license": "MIT"
},
- "node_modules/path-to-regexp": {
- "version": "8.2.0",
- "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz",
- "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==",
- "engines": {
- "node": ">=16"
- }
- },
"node_modules/pend": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
@@ -6758,14 +6305,6 @@
"node": ">=6"
}
},
- "node_modules/pkce-challenge": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-4.1.0.tgz",
- "integrity": "sha512-ZBmhE1C9LcPoH9XZSdwiPtbPHZROwAnMy+kIFQVrnMCxY4Cudlz3gBOpzilgc0jOgRaiT3sIWfpMomW2ar2orQ==",
- "engines": {
- "node": ">=16.20.0"
- }
- },
"node_modules/playwright": {
"resolved": "packages/playwright",
"link": true
@@ -6856,18 +6395,6 @@
"react-is": "^16.13.1"
}
},
- "node_modules/proxy-addr": {
- "version": "2.0.7",
- "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
- "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
- "dependencies": {
- "forwarded": "0.2.0",
- "ipaddr.js": "1.9.1"
- },
- "engines": {
- "node": ">= 0.10"
- }
- },
"node_modules/pump": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz",
@@ -6893,6 +6420,7 @@
"version": "6.14.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz",
"integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==",
+ "dev": true,
"license": "BSD-3-Clause",
"dependencies": {
"side-channel": "^1.1.0"
@@ -6938,39 +6466,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/range-parser": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
- "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/raw-body": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.0.tgz",
- "integrity": "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==",
- "dependencies": {
- "bytes": "3.1.2",
- "http-errors": "2.0.0",
- "iconv-lite": "0.6.3",
- "unpipe": "1.0.0"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/raw-body/node_modules/iconv-lite": {
- "version": "0.6.3",
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
- "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
- "dependencies": {
- "safer-buffer": ">= 2.1.2 < 3.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/react": {
"version": "18.3.1",
"resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",
@@ -7280,19 +6775,6 @@
"fsevents": "~2.3.2"
}
},
- "node_modules/router": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/router/-/router-2.1.0.tgz",
- "integrity": "sha512-/m/NSLxeYEgWNtyC+WtNHCF7jbGxOibVWKnn+1Psff4dJGOfoXP+MuC/f2CwSmyiHdOIzYnYFp4W6GxWfekaLA==",
- "dependencies": {
- "is-promise": "^4.0.0",
- "parseurl": "^1.3.3",
- "path-to-regexp": "^8.0.0"
- },
- "engines": {
- "node": ">= 18"
- }
- },
"node_modules/run-parallel": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
@@ -7350,25 +6832,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/safe-buffer": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
- "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ]
- },
"node_modules/safe-push-apply": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz",
@@ -7404,11 +6867,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/safer-buffer": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
- },
"node_modules/sax": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz",
@@ -7443,36 +6901,6 @@
"license": "MIT",
"optional": true
},
- "node_modules/send": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/send/-/send-1.1.0.tgz",
- "integrity": "sha512-v67WcEouB5GxbTWL/4NeToqcZiAWEq90N888fczVArY8A79J0L4FD7vj5hm3eUMua5EpoQ59wa/oovY6TLvRUA==",
- "dependencies": {
- "debug": "^4.3.5",
- "destroy": "^1.2.0",
- "encodeurl": "^2.0.0",
- "escape-html": "^1.0.3",
- "etag": "^1.8.1",
- "fresh": "^0.5.2",
- "http-errors": "^2.0.0",
- "mime-types": "^2.1.35",
- "ms": "^2.1.3",
- "on-finished": "^2.4.1",
- "range-parser": "^1.2.1",
- "statuses": "^2.0.1"
- },
- "engines": {
- "node": ">= 18"
- }
- },
- "node_modules/send/node_modules/fresh": {
- "version": "0.5.2",
- "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
- "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
- "engines": {
- "node": ">= 0.6"
- }
- },
"node_modules/serialize-error": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz",
@@ -7490,20 +6918,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/serve-static": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.1.0.tgz",
- "integrity": "sha512-A3We5UfEjG8Z7VkDv6uItWw6HY2bBSBJT1KtVESn6EOoOr2jAxNhxWCLY3jDE2WcuHXByWju74ck3ZgLwL8xmA==",
- "dependencies": {
- "encodeurl": "^2.0.0",
- "escape-html": "^1.0.3",
- "parseurl": "^1.3.3",
- "send": "^1.0.0"
- },
- "engines": {
- "node": ">= 18"
- }
- },
"node_modules/set-function-length": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
@@ -7553,11 +6967,6 @@
"node": ">= 0.4"
}
},
- "node_modules/setprototypeof": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
- "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
- },
"node_modules/shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
@@ -7585,6 +6994,7 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
"integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0",
@@ -7604,6 +7014,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
"integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0",
@@ -7620,6 +7031,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
"integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"call-bound": "^1.0.2",
@@ -7638,6 +7050,7 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
"integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"call-bound": "^1.0.2",
@@ -7770,14 +7183,6 @@
"dev": true,
"license": "MIT"
},
- "node_modules/statuses": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
- "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
- "engines": {
- "node": ">= 0.8"
- }
- },
"node_modules/string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
@@ -8019,14 +7424,6 @@
"node": ">=8.0"
}
},
- "node_modules/toidentifier": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
- "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
- "engines": {
- "node": ">=0.6"
- }
- },
"node_modules/trace-viewer": {
"resolved": "packages/trace-viewer",
"link": true
@@ -8134,38 +7531,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/type-is": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.0.tgz",
- "integrity": "sha512-gd0sGezQYCbWSbkZr75mln4YBidWUN60+devscpLF5mtRDUpiaTvKpBNrdaCvel1NdR2k6vclXybU5fBd2i+nw==",
- "dependencies": {
- "content-type": "^1.0.5",
- "media-typer": "^1.1.0",
- "mime-types": "^3.0.0"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/type-is/node_modules/mime-db": {
- "version": "1.53.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.53.0.tgz",
- "integrity": "sha512-oHlN/w+3MQ3rba9rqFr6V/ypF10LSkdwUysQL7GkXoTgIWeV+tcXGA852TBxH+gsh8UWoyhR1hKcoMJTuWflpg==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/type-is/node_modules/mime-types": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.0.tgz",
- "integrity": "sha512-XqoSHeCGjVClAmoGFG3lVFqQFRIrTVw2OH3axRqAcfaw+gHWIfnASS92AV+Rl/mk0MupgZTRHQOjxY6YVnzK5w==",
- "dependencies": {
- "mime-db": "^1.53.0"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
"node_modules/typed-array-buffer": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz",
@@ -8307,14 +7672,6 @@
"node": ">= 4.0.0"
}
},
- "node_modules/unpipe": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
- "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
- "engines": {
- "node": ">= 0.8"
- }
- },
"node_modules/update-browserslist-db": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz",
@@ -8369,14 +7726,6 @@
"dev": true,
"license": "MIT"
},
- "node_modules/utils-merge": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
- "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
- "engines": {
- "node": ">= 0.4.0"
- }
- },
"node_modules/validate-npm-package-license": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
@@ -8388,14 +7737,6 @@
"spdx-expression-parse": "^3.0.0"
}
},
- "node_modules/vary": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
- "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
- "engines": {
- "node": ">= 0.8"
- }
- },
"node_modules/vite": {
"version": "6.2.3",
"resolved": "https://registry.npmjs.org/vite/-/vite-6.2.3.tgz",
@@ -8629,6 +7970,7 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+ "dev": true,
"license": "ISC"
},
"node_modules/ws": {
@@ -9511,6 +8853,7 @@
"packages/playwright-mcp": {
"name": "@playwright/mcp",
"version": "1.52.0-next",
+ "extraneous": true,
"license": "Apache-2.0",
"dependencies": {
"@modelcontextprotocol/sdk": "^1.6.1",
@@ -9528,51 +8871,6 @@
"node": ">=18"
}
},
- "packages/playwright-mcp/node_modules/@types/node": {
- "version": "22.13.10",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.10.tgz",
- "integrity": "sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "undici-types": "~6.20.0"
- }
- },
- "packages/playwright-mcp/node_modules/commander": {
- "version": "13.1.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz",
- "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==",
- "license": "MIT",
- "engines": {
- "node": ">=18"
- }
- },
- "packages/playwright-mcp/node_modules/undici-types": {
- "version": "6.20.0",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz",
- "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==",
- "dev": true,
- "license": "MIT"
- },
- "packages/playwright-mcp/node_modules/zod": {
- "version": "3.24.2",
- "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.2.tgz",
- "integrity": "sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==",
- "license": "MIT",
- "peer": true,
- "funding": {
- "url": "https://github.com/sponsors/colinhacks"
- }
- },
- "packages/playwright-mcp/node_modules/zod-to-json-schema": {
- "version": "3.24.4",
- "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.24.4.tgz",
- "integrity": "sha512-0uNlcvgabyrni9Ag8Vghj21drk7+7tp7VTwwR7KxxXXc/3pbXz2PHlDgj3cICahgF1kHm4dExBFj7BXrZJXzig==",
- "license": "ISC",
- "peerDependencies": {
- "zod": "^3.24.1"
- }
- },
"packages/playwright-test": {
"name": "@playwright/test",
"version": "1.52.0-next",
diff --git a/package.json b/package.json
index cdfe6bef67..e97dd26745 100644
--- a/package.json
+++ b/package.json
@@ -28,7 +28,6 @@
"test-html-reporter": "playwright test --config=packages/html-reporter",
"test-web": "playwright test --config=packages/web",
"ttest": "node ./tests/playwright-test/stable-test-runner/node_modules/@playwright/test/cli test --config=tests/playwright-test/playwright.config.ts",
- "mtest": "playwright test --config=packages/playwright-mcp",
"ct": "playwright test tests/components/test-all.spec.js --reporter=list",
"test": "playwright test --config=tests/library/playwright.config.ts",
"eslint": "eslint --cache",
diff --git a/packages/playwright-mcp/.npmignore b/packages/playwright-mcp/.npmignore
deleted file mode 100644
index 88b2d42b53..0000000000
--- a/packages/playwright-mcp/.npmignore
+++ /dev/null
@@ -1,5 +0,0 @@
-**/*
-README.md
-LICENSE
-!lib/**/*.js
-!cli.js
diff --git a/packages/playwright-mcp/README.md b/packages/playwright-mcp/README.md
deleted file mode 100644
index f21ef7e831..0000000000
--- a/packages/playwright-mcp/README.md
+++ /dev/null
@@ -1,223 +0,0 @@
-## Playwright MCP
-
-This package is experimental and not yet ready for production use.
-It is a subject to change and will not respect semver versioning.
-
-### Example config
-
-```js
-{
- "mcpServers": {
- "playwright": {
- "command": "npx",
- "args": [
- "@playwright/mcp",
- "--headless"
- ]
- }
- }
-}
-```
-
-### Running headed browser (Browser with GUI).
-
-```js
-{
- "mcpServers": {
- "playwright": {
- "command": "npx",
- "args": [
- "@playwright/mcp"
- ]
- }
- }
-}
-```
-
-### Running headed browser on Linux
-
-When running headed browser on system w/o display or from worker processes of the IDEs,
-you can run Playwright in a client-server manner. You'll run the Playwright server
-from environment with the DISPLAY
-
-```sh
-npx playwright run-server
-```
-
-And then in MCP config, add following to the `env`:
-
-```js
-{
- "mcpServers": {
- "playwright": {
- "command": "npx",
- "args": [
- "@playwright/mcp"
- ],
- "env": {
- // Use the endpoint from the output of the server above.
- "PLAYWRIGHT_WS_ENDPOINT": "ws://localhost:<port>/"
- }
- }
- }
-}
-```
-
-### Tool Modes
-
-The tools are available in two modes:
-
-1. **Snapshot Mode** (default): Uses accessibility snapshots for better performance and reliability
-2. **Vision Mode**: Uses screenshots for visual-based interactions
-
-To use Vision Mode, add the `--vision` flag when starting the server:
-
-```js
-{
- "mcpServers": {
- "playwright": {
- "command": "npx",
- "args": [
- "@playwright/mcp",
- "--vision"
- ]
- }
- }
-}
-```
-
-Vision Mode works best with the computer use models that are able to interact with elements using
-X Y coordinate space, based on the provided screenshot.
-
-### Snapshot Mode
-
-The Playwright MCP provides a set of tools for browser automation. Here are all available tools:
-
-- **browser_navigate**
- - Description: Navigate to a URL
- - Parameters:
- - `url` (string): The URL to navigate to
-
-- **browser_go_back**
- - Description: Go back to the previous page
- - Parameters: None
-
-- **browser_go_forward**
- - Description: Go forward to the next page
- - Parameters: None
-
-- **browser_click**
- - Description: Perform click on a web page
- - Parameters:
- - `element` (string): Human-readable element description used to obtain permission to interact with the element
- - `ref` (string): Exact target element reference from the page snapshot
-
-- **browser_hover**
- - Description: Hover over element on page
- - Parameters:
- - `element` (string): Human-readable element description used to obtain permission to interact with the element
- - `ref` (string): Exact target element reference from the page snapshot
-
-- **browser_drag**
- - Description: Perform drag and drop between two elements
- - Parameters:
- - `startElement` (string): Human-readable source element description used to obtain permission to interact with the element
- - `startRef` (string): Exact source element reference from the page snapshot
- - `endElement` (string): Human-readable target element description used to obtain permission to interact with the element
- - `endRef` (string): Exact target element reference from the page snapshot
-
-- **browser_type**
- - Description: Type text into editable element
- - Parameters:
- - `element` (string): Human-readable element description used to obtain permission to interact with the element
- - `ref` (string): Exact target element reference from the page snapshot
- - `text` (string): Text to type into the element
- - `submit` (boolean): Whether to submit entered text (press Enter after)
-
-- **browser_press_key**
- - Description: Press a key on the keyboard
- - Parameters:
- - `key` (string): Name of the key to press or a character to generate, such as `ArrowLeft` or `a`
-
-- **browser_snapshot**
- - Description: Capture accessibility snapshot of the current page (better than screenshot)
- - Parameters: None
-
-- **browser_save_as_pdf**
- - Description: Save page as PDF
- - Parameters: None
-
-- **browser_wait**
- - Description: Wait for a specified time in seconds
- - Parameters:
- - `time` (number): The time to wait in seconds (capped at 10 seconds)
-
-- **browser_close**
- - Description: Close the page
- - Parameters: None
-
-
-### Vision Mode
-
-Vision Mode provides tools for visual-based interactions using screenshots. Here are all available tools:
-
-- **browser_navigate**
- - Description: Navigate to a URL
- - Parameters:
- - `url` (string): The URL to navigate to
-
-- **browser_go_back**
- - Description: Go back to the previous page
- - Parameters: None
-
-- **browser_go_forward**
- - Description: Go forward to the next page
- - Parameters: None
-
-- **browser_screenshot**
- - Description: Capture screenshot of the current page
- - Parameters: None
-
-- **browser_move_mouse**
- - Description: Move mouse to specified coordinates
- - Parameters:
- - `x` (number): X coordinate
- - `y` (number): Y coordinate
-
-- **browser_click**
- - Description: Click at specified coordinates
- - Parameters:
- - `x` (number): X coordinate to click at
- - `y` (number): Y coordinate to click at
-
-- **browser_drag**
- - Description: Perform drag and drop operation
- - Parameters:
- - `startX` (number): Start X coordinate
- - `startY` (number): Start Y coordinate
- - `endX` (number): End X coordinate
- - `endY` (number): End Y coordinate
-
-- **browser_type**
- - Description: Type text at specified coordinates
- - Parameters:
- - `text` (string): Text to type
- - `submit` (boolean): Whether to submit entered text (press Enter after)
-
-- **browser_press_key**
- - Description: Press a key on the keyboard
- - Parameters:
- - `key` (string): Name of the key to press or a character to generate, such as `ArrowLeft` or `a`
-
-- **browser_save_as_pdf**
- - Description: Save page as PDF
- - Parameters: None
-
-- **browser_wait**
- - Description: Wait for a specified time in seconds
- - Parameters:
- - `time` (number): The time to wait in seconds (capped at 10 seconds)
-
-- **browser_close**
- - Description: Close the page
- - Parameters: None
diff --git a/packages/playwright-mcp/cli.js b/packages/playwright-mcp/cli.js
deleted file mode 100755
index 95d4dbd3b0..0000000000
--- a/packages/playwright-mcp/cli.js
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env node
-/**
- * Copyright (c) Microsoft Corporation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-require('./lib/program');
diff --git a/packages/playwright-mcp/package.json b/packages/playwright-mcp/package.json
deleted file mode 100644
index 38ed9b9436..0000000000
--- a/packages/playwright-mcp/package.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "name": "@playwright/mcp",
- "version": "1.52.0-next",
- "description": "Playwright Tools for MCP",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/microsoft/playwright.git"
- },
- "homepage": "https://playwright.dev",
- "engines": {
- "node": ">=18"
- },
- "author": {
- "name": "Microsoft Corporation"
- },
- "license": "Apache-2.0",
- "exports": {
- "./servers/server": "./lib/servers/server.js",
- "./servers/screenshot": "./lib/servers/screenshot.js",
- "./servers/snapshot": "./lib/servers/snapshot.js",
- "./tools/common": "./lib/tools/common.js",
- "./tools/screenshot": "./lib/tools/screenshot.js",
- "./tools/snapshot": "./lib/tools/snapshot.js",
- "./package.json": "./package.json"
- },
- "dependencies": {
- "@modelcontextprotocol/sdk": "^1.6.1",
- "commander": "^13.1.0",
- "playwright": "1.52.0-next",
- "zod-to-json-schema": "^3.24.4"
- },
- "devDependencies": {
- "@types/node": "^22.13.10"
- },
- "bin": {
- "mcp": "cli.js"
- }
-}
diff --git a/packages/playwright-mcp/playwright.config.ts b/packages/playwright-mcp/playwright.config.ts
deleted file mode 100644
index dfd128d184..0000000000
--- a/packages/playwright-mcp/playwright.config.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import { defineConfig } from '@playwright/test';
-
-export default defineConfig({
- testDir: './tests',
- fullyParallel: true,
- forbidOnly: !!process.env.CI,
- retries: process.env.CI ? 2 : 0,
- workers: process.env.CI ? 1 : undefined,
- reporter: 'list',
- projects: [{ name: 'default' }],
-});
diff --git a/packages/playwright-mcp/src/context.ts b/packages/playwright-mcp/src/context.ts
deleted file mode 100644
index 58fbcec34a..0000000000
--- a/packages/playwright-mcp/src/context.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import * as playwright from 'playwright';
-
-export class Context {
- private _launchOptions: playwright.LaunchOptions;
- private _page: playwright.Page | undefined;
- private _console: playwright.ConsoleMessage[] = [];
- private _initializePromise: Promise<void> | undefined;
-
- constructor(launchOptions: playwright.LaunchOptions) {
- this._launchOptions = launchOptions;
- }
-
- async ensurePage(): Promise<playwright.Page> {
- await this._initialize();
- return this._page!;
- }
-
- async ensureConsole(): Promise<playwright.ConsoleMessage[]> {
- await this._initialize();
- return this._console;
- }
-
- async close() {
- const page = await this.ensurePage();
- await page.close();
- this._initializePromise = undefined;
- }
-
- private async _initialize() {
- if (this._initializePromise)
- return this._initializePromise;
- this._initializePromise = (async () => {
- const browser = await this._createBrowser();
- this._page = await browser.newPage();
- this._page.on('console', event => this._console.push(event));
- this._page.on('framenavigated', () => this._console.length = 0);
- })();
- return this._initializePromise;
- }
-
- private async _createBrowser(): Promise<playwright.Browser> {
- if (process.env.PLAYWRIGHT_WS_ENDPOINT) {
- const url = new URL(process.env.PLAYWRIGHT_WS_ENDPOINT);
- url.searchParams.set('launch-options', JSON.stringify(this._launchOptions));
- return await playwright.chromium.connect(String(url));
- }
- return await playwright.chromium.launch({ channel: 'chrome', ...this._launchOptions });
- }
-}
diff --git a/packages/playwright-mcp/src/program.ts b/packages/playwright-mcp/src/program.ts
deleted file mode 100644
index 8bb5269c31..0000000000
--- a/packages/playwright-mcp/src/program.ts
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import { program } from 'commander';
-
-import { Server } from './server';
-import * as snapshot from './tools/snapshot';
-import * as common from './tools/common';
-import * as screenshot from './tools/screenshot';
-import { console } from './resources/console';
-
-import type { LaunchOptions } from './server';
-import type { Tool } from './tools/tool';
-import type { Resource } from './resources/resource';
-
-const packageJSON = require('../package.json');
-
-program
- .version('Version ' + packageJSON.version)
- .name(packageJSON.name)
- .option('--headless', 'Run browser in headless mode, headed by default')
- .option('--vision', 'Run server that uses screenshots (Aria snapshots are used by default)')
- .action(async options => {
- const launchOptions: LaunchOptions = {
- headless: !!options.headless,
- };
- const tools = options.vision ? screenshotTools : snapshotTools;
- const server = new Server({
- name: 'Playwright',
- version: packageJSON.version,
- tools,
- resources,
- }, launchOptions);
- setupExitWatchdog(server);
- await server.start();
- });
-
-function setupExitWatchdog(server: Server) {
- process.stdin.on('close', async () => {
- // eslint-disable-next-line no-restricted-properties
- setTimeout(() => process.exit(0), 15000);
-
- await server?.stop();
- // eslint-disable-next-line no-restricted-properties
- process.exit(0);
- });
-}
-
-const commonTools: Tool[] = [
- common.pressKey,
- common.wait,
- common.pdf,
- common.close,
-];
-
-const snapshotTools: Tool[] = [
- common.navigate(true),
- common.goBack(true),
- common.goForward(true),
- snapshot.snapshot,
- snapshot.click,
- snapshot.hover,
- snapshot.type,
- ...commonTools,
-];
-
-const screenshotTools: Tool[] = [
- common.navigate(false),
- common.goBack(false),
- common.goForward(false),
- screenshot.screenshot,
- screenshot.moveMouse,
- screenshot.click,
- screenshot.drag,
- screenshot.type,
- ...commonTools,
-];
-
-const resources: Resource[] = [
- console,
-];
-
-program.parse(process.argv);
diff --git a/packages/playwright-mcp/src/resources/console.ts b/packages/playwright-mcp/src/resources/console.ts
deleted file mode 100644
index 14533f4d2b..0000000000
--- a/packages/playwright-mcp/src/resources/console.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import type { Resource, ResourceResult } from './resource';
-
-export const console: Resource = {
- schema: {
- uri: 'browser://console',
- name: 'Page console',
- mimeType: 'text/plain',
- },
-
- read: async (context, uri) => {
- const result: ResourceResult[] = [];
- for (const message of await context.ensureConsole()) {
- result.push({
- uri,
- mimeType: 'text/plain',
- text: `[${message.type().toUpperCase()}] ${message.text()}`,
- });
- }
- return result;
- },
-};
diff --git a/packages/playwright-mcp/src/resources/resource.ts b/packages/playwright-mcp/src/resources/resource.ts
deleted file mode 100644
index d9b19e4dfb..0000000000
--- a/packages/playwright-mcp/src/resources/resource.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import type { Context } from '../context';
-
-export type ResourceSchema = {
- uri: string;
- name: string;
- description?: string;
- mimeType?: string;
-};
-
-export type ResourceResult = {
- uri: string;
- mimeType?: string;
- text?: string;
- blob?: string;
-};
-
-export type Resource = {
- schema: ResourceSchema;
- read: (context: Context, uri: string) => Promise<ResourceResult[]>;
-};
diff --git a/packages/playwright-mcp/src/server.ts b/packages/playwright-mcp/src/server.ts
deleted file mode 100644
index 3e792123a4..0000000000
--- a/packages/playwright-mcp/src/server.ts
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import { Server as MCPServer } from '@modelcontextprotocol/sdk/server/index.js';
-import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
-import { CallToolRequestSchema, ListResourcesRequestSchema, ListToolsRequestSchema, ReadResourceRequestSchema } from '@modelcontextprotocol/sdk/types.js';
-import * as playwright from 'playwright';
-
-import { Context } from './context';
-
-import type { Tool } from './tools/tool';
-import type { Resource } from './resources/resource';
-
-export type LaunchOptions = {
- headless?: boolean;
-};
-
-export class Server {
- private _server: MCPServer;
- private _tools: Tool[];
- private _page: playwright.Page | undefined;
- private _context: Context;
-
- constructor(options: { name: string, version: string, tools: Tool[], resources: Resource[] }, launchOptions: LaunchOptions) {
- const { name, version, tools, resources } = options;
- this._context = new Context(launchOptions);
- this._server = new MCPServer({ name, version }, {
- capabilities: {
- tools: {},
- resources: {},
- }
- });
- this._tools = tools;
-
- this._server.setRequestHandler(ListToolsRequestSchema, async () => {
- return { tools: tools.map(tool => tool.schema) };
- });
-
- this._server.setRequestHandler(ListResourcesRequestSchema, async () => {
- return { resources: resources.map(resource => resource.schema) };
- });
-
- this._server.setRequestHandler(CallToolRequestSchema, async request => {
- const tool = this._tools.find(tool => tool.schema.name === request.params.name);
- if (!tool) {
- return {
- content: [{ type: 'text', text: `Tool "${request.params.name}" not found` }],
- isError: true,
- };
- }
-
- try {
- const result = await tool.handle(this._context, request.params.arguments);
- return result;
- } catch (error) {
- return {
- content: [{ type: 'text', text: String(error) }],
- isError: true,
- };
- }
- });
-
- this._server.setRequestHandler(ReadResourceRequestSchema, async request => {
- const resource = resources.find(resource => resource.schema.uri === request.params.uri);
- if (!resource)
- return { contents: [] };
-
- const contents = await resource.read(this._context, request.params.uri);
- return { contents };
- });
- }
-
- async start() {
- const transport = new StdioServerTransport();
- await this._server.connect(transport);
- }
-
- async stop() {
- await this._server.close();
- await this._page?.context()?.browser()?.close();
- }
-}
diff --git a/packages/playwright-mcp/src/tools/common.ts b/packages/playwright-mcp/src/tools/common.ts
deleted file mode 100644
index 868be9554f..0000000000
--- a/packages/playwright-mcp/src/tools/common.ts
+++ /dev/null
@@ -1,165 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import os from 'os';
-import path from 'path';
-
-import { z } from 'zod';
-import { zodToJsonSchema } from 'zod-to-json-schema';
-
-import { captureAriaSnapshot, runAndWait } from './utils';
-
-import type { ToolFactory, Tool } from './tool';
-
-const navigateSchema = z.object({
- url: z.string().describe('The URL to navigate to'),
-});
-
-export const navigate: ToolFactory = snapshot => ({
- schema: {
- name: 'browser_navigate',
- description: 'Navigate to a URL',
- inputSchema: zodToJsonSchema(navigateSchema),
- },
- handle: async (context, params) => {
- const validatedParams = navigateSchema.parse(params);
- const page = await context.ensurePage();
- await page.goto(validatedParams.url, { waitUntil: 'domcontentloaded' });
- // Cap load event to 5 seconds, the page is operational at this point.
- await page.waitForLoadState('load', { timeout: 5000 }).catch(() => {});
- if (snapshot)
- return captureAriaSnapshot(page);
- return {
- content: [{
- type: 'text',
- text: `Navigated to ${validatedParams.url}`,
- }],
- };
- },
-});
-
-const goBackSchema = z.object({});
-
-export const goBack: ToolFactory = snapshot => ({
- schema: {
- name: 'browser_go_back',
- description: 'Go back to the previous page',
- inputSchema: zodToJsonSchema(goBackSchema),
- },
- handle: async context => {
- return await runAndWait(context, 'Navigated back', async () => {
- const page = await context.ensurePage();
- await page.goBack();
- }, snapshot);
- },
-});
-
-const goForwardSchema = z.object({});
-
-export const goForward: ToolFactory = snapshot => ({
- schema: {
- name: 'browser_go_forward',
- description: 'Go forward to the next page',
- inputSchema: zodToJsonSchema(goForwardSchema),
- },
- handle: async context => {
- return await runAndWait(context, 'Navigated forward', async () => {
- const page = await context.ensurePage();
- await page.goForward();
- }, snapshot);
- },
-});
-
-const waitSchema = z.object({
- time: z.number().describe('The time to wait in seconds'),
-});
-
-export const wait: Tool = {
- schema: {
- name: 'browser_wait',
- description: 'Wait for a specified time in seconds',
- inputSchema: zodToJsonSchema(waitSchema),
- },
- handle: async (context, params) => {
- const validatedParams = waitSchema.parse(params);
- const page = await context.ensurePage();
- await page.waitForTimeout(Math.min(10000, validatedParams.time * 1000));
- return {
- content: [{
- type: 'text',
- text: `Waited for ${validatedParams.time} seconds`,
- }],
- };
- },
-};
-
-const pressKeySchema = z.object({
- key: z.string().describe('Name of the key to press or a character to generate, such as `ArrowLeft` or `a`'),
-});
-
-export const pressKey: Tool = {
- schema: {
- name: 'browser_press_key',
- description: 'Press a key on the keyboard',
- inputSchema: zodToJsonSchema(pressKeySchema),
- },
- handle: async (context, params) => {
- const validatedParams = pressKeySchema.parse(params);
- return await runAndWait(context, `Pressed key ${validatedParams.key}`, async page => {
- await page.keyboard.press(validatedParams.key);
- });
- },
-};
-
-const pdfSchema = z.object({});
-
-export const pdf: Tool = {
- schema: {
- name: 'browser_save_as_pdf',
- description: 'Save page as PDF',
- inputSchema: zodToJsonSchema(pdfSchema),
- },
- handle: async context => {
- const page = await context.ensurePage();
- const fileName = path.join(os.tmpdir(), `/page-${new Date().toISOString()}.pdf`);
- await page.pdf({ path: fileName });
- return {
- content: [{
- type: 'text',
- text: `Saved as ${fileName}`,
- }],
- };
- },
-};
-
-const closeSchema = z.object({});
-
-export const close: Tool = {
- schema: {
- name: 'browser_close',
- description: 'Close the page',
- inputSchema: zodToJsonSchema(closeSchema),
- },
- handle: async context => {
- await context.close();
- return {
- content: [{
- type: 'text',
- text: `Page closed`,
- }],
- };
- },
-};
diff --git a/packages/playwright-mcp/src/tools/screenshot.ts b/packages/playwright-mcp/src/tools/screenshot.ts
deleted file mode 100644
index 7a5cf2a1fa..0000000000
--- a/packages/playwright-mcp/src/tools/screenshot.ts
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import { z } from 'zod';
-import { zodToJsonSchema } from 'zod-to-json-schema';
-
-import { runAndWait } from './utils';
-
-import type { Tool } from './tool';
-
-export const screenshot: Tool = {
- schema: {
- name: 'browser_screenshot',
- description: 'Take a screenshot of the current page',
- inputSchema: zodToJsonSchema(z.object({})),
- },
-
- handle: async context => {
- const page = await context.ensurePage();
- const screenshot = await page.screenshot({ type: 'jpeg', quality: 50, scale: 'css' });
- return {
- content: [{ type: 'image', data: screenshot.toString('base64'), mimeType: 'image/jpeg' }],
- };
- },
-};
-
-const elementSchema = z.object({
- element: z.string().describe('Human-readable element description used to obtain permission to interact with the element'),
-});
-
-const moveMouseSchema = elementSchema.extend({
- x: z.number().describe('X coordinate'),
- y: z.number().describe('Y coordinate'),
-});
-
-export const moveMouse: Tool = {
- schema: {
- name: 'browser_move_mouse',
- description: 'Move mouse to a given position',
- inputSchema: zodToJsonSchema(moveMouseSchema),
- },
-
- handle: async (context, params) => {
- const validatedParams = moveMouseSchema.parse(params);
- const page = await context.ensurePage();
- await page.mouse.move(validatedParams.x, validatedParams.y);
- return {
- content: [{ type: 'text', text: `Moved mouse to (${validatedParams.x}, ${validatedParams.y})` }],
- };
- },
-};
-
-const clickSchema = elementSchema.extend({
- x: z.number().describe('X coordinate'),
- y: z.number().describe('Y coordinate'),
-});
-
-export const click: Tool = {
- schema: {
- name: 'browser_click',
- description: 'Click left mouse button',
- inputSchema: zodToJsonSchema(clickSchema),
- },
-
- handle: async (context, params) => {
- return await runAndWait(context, 'Clicked mouse', async page => {
- const validatedParams = clickSchema.parse(params);
- await page.mouse.move(validatedParams.x, validatedParams.y);
- await page.mouse.down();
- await page.mouse.up();
- });
- },
-};
-
-const dragSchema = elementSchema.extend({
- startX: z.number().describe('Start X coordinate'),
- startY: z.number().describe('Start Y coordinate'),
- endX: z.number().describe('End X coordinate'),
- endY: z.number().describe('End Y coordinate'),
-});
-
-export const drag: Tool = {
- schema: {
- name: 'browser_drag',
- description: 'Drag left mouse button',
- inputSchema: zodToJsonSchema(dragSchema),
- },
-
- handle: async (context, params) => {
- const validatedParams = dragSchema.parse(params);
- return await runAndWait(context, `Dragged mouse from (${validatedParams.startX}, ${validatedParams.startY}) to (${validatedParams.endX}, ${validatedParams.endY})`, async page => {
- await page.mouse.move(validatedParams.startX, validatedParams.startY);
- await page.mouse.down();
- await page.mouse.move(validatedParams.endX, validatedParams.endY);
- await page.mouse.up();
- });
- },
-};
-
-const typeSchema = z.object({
- text: z.string().describe('Text to type into the element'),
- submit: z.boolean().describe('Whether to submit entered text (press Enter after)'),
-});
-
-export const type: Tool = {
- schema: {
- name: 'browser_type',
- description: 'Type text',
- inputSchema: zodToJsonSchema(typeSchema),
- },
-
- handle: async (context, params) => {
- const validatedParams = typeSchema.parse(params);
- return await runAndWait(context, `Typed text "${validatedParams.text}"`, async page => {
- await page.keyboard.type(validatedParams.text);
- if (validatedParams.submit)
- await page.keyboard.press('Enter');
- });
- },
-};
diff --git a/packages/playwright-mcp/src/tools/snapshot.ts b/packages/playwright-mcp/src/tools/snapshot.ts
deleted file mode 100644
index 054e539a37..0000000000
--- a/packages/playwright-mcp/src/tools/snapshot.ts
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import { z } from 'zod';
-import zodToJsonSchema from 'zod-to-json-schema';
-
-import { captureAriaSnapshot, runAndWait } from './utils';
-
-import type * as playwright from 'playwright';
-import type { Tool } from './tool';
-
-export const snapshot: Tool = {
- schema: {
- name: 'browser_snapshot',
- description: 'Capture accessibility snapshot of the current page, this is better than screenshot',
- inputSchema: zodToJsonSchema(z.object({})),
- },
-
- handle: async context => {
- return await captureAriaSnapshot(await context.ensurePage());
- },
-};
-
-const elementSchema = z.object({
- element: z.string().describe('Human-readable element description used to obtain permission to interact with the element'),
- ref: z.string().describe('Exact target element reference from the page snapshot'),
-});
-
-export const click: Tool = {
- schema: {
- name: 'browser_click',
- description: 'Perform click on a web page',
- inputSchema: zodToJsonSchema(elementSchema),
- },
-
- handle: async (context, params) => {
- const validatedParams = elementSchema.parse(params);
- return runAndWait(context, `"${validatedParams.element}" clicked`, page => refLocator(page, validatedParams.ref).click(), true);
- },
-};
-
-const dragSchema = z.object({
- startElement: z.string().describe('Human-readable source element description used to obtain the permission to interact with the element'),
- startRef: z.string().describe('Exact source element reference from the page snapshot'),
- endElement: z.string().describe('Human-readable target element description used to obtain the permission to interact with the element'),
- endRef: z.string().describe('Exact target element reference from the page snapshot'),
-});
-
-export const drag: Tool = {
- schema: {
- name: 'browser_drag',
- description: 'Perform drag and drop between two elements',
- inputSchema: zodToJsonSchema(dragSchema),
- },
-
- handle: async (context, params) => {
- const validatedParams = dragSchema.parse(params);
- return runAndWait(context, `Dragged "${validatedParams.startElement}" to "${validatedParams.endElement}"`, async page => {
- const startLocator = refLocator(page, validatedParams.startRef);
- const endLocator = refLocator(page, validatedParams.endRef);
- await startLocator.dragTo(endLocator);
- }, true);
- },
-};
-
-export const hover: Tool = {
- schema: {
- name: 'browser_hover',
- description: 'Hover over element on page',
- inputSchema: zodToJsonSchema(elementSchema),
- },
-
- handle: async (context, params) => {
- const validatedParams = elementSchema.parse(params);
- return runAndWait(context, `Hovered over "${validatedParams.element}"`, page => refLocator(page, validatedParams.ref).hover(), true);
- },
-};
-
-const typeSchema = elementSchema.extend({
- text: z.string().describe('Text to type into the element'),
- submit: z.boolean().describe('Whether to submit entered text (press Enter after)'),
-});
-
-export const type: Tool = {
- schema: {
- name: 'browser_type',
- description: 'Type text into editable element',
- inputSchema: zodToJsonSchema(typeSchema),
- },
-
- handle: async (context, params) => {
- const validatedParams = typeSchema.parse(params);
- return await runAndWait(context, `Typed "${validatedParams.text}" into "${validatedParams.element}"`, async page => {
- const locator = refLocator(page, validatedParams.ref);
- await locator.fill(validatedParams.text);
- if (validatedParams.submit)
- await locator.press('Enter');
- }, true);
- },
-};
-
-function refLocator(page: playwright.Page, ref: string): playwright.Locator {
- return page.locator(`aria-ref=${ref}`);
-}
diff --git a/packages/playwright-mcp/src/tools/tool.ts b/packages/playwright-mcp/src/tools/tool.ts
deleted file mode 100644
index 19f1b608c3..0000000000
--- a/packages/playwright-mcp/src/tools/tool.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import type { ImageContent, TextContent } from '@modelcontextprotocol/sdk/types';
-import type { JsonSchema7Type } from 'zod-to-json-schema';
-import type { Context } from '../context';
-
-export type ToolSchema = {
- name: string;
- description: string;
- inputSchema: JsonSchema7Type;
-};
-
-export type ToolResult = {
- content: (ImageContent | TextContent)[];
- isError?: boolean;
-};
-
-export type Tool = {
- schema: ToolSchema;
- handle: (context: Context, params?: Record<string, any>) => Promise<ToolResult>;
-};
-
-export type ToolFactory = (snapshot: boolean) => Tool;
diff --git a/packages/playwright-mcp/src/tools/utils.ts b/packages/playwright-mcp/src/tools/utils.ts
deleted file mode 100644
index 4db7016709..0000000000
--- a/packages/playwright-mcp/src/tools/utils.ts
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import type * as playwright from 'playwright';
-import type { ToolResult } from './tool';
-import type { Context } from '../context';
-
-async function waitForCompletion<R>(page: playwright.Page, callback: () => Promise<R>): Promise<R> {
- const requests = new Set<playwright.Request>();
- let frameNavigated = false;
- let waitCallback: () => void = () => {};
- const waitBarrier = new Promise<void>(f => { waitCallback = f; });
-
- const requestListener = (request: playwright.Request) => requests.add(request);
- const requestFinishedListener = (request: playwright.Request) => {
- requests.delete(request);
- if (!requests.size)
- waitCallback();
- };
-
- const frameNavigateListener = (frame: playwright.Frame) => {
- if (frame.parentFrame())
- return;
- frameNavigated = true;
- dispose();
- clearTimeout(timeout);
- void frame.waitForLoadState('load').then(() => {
- waitCallback();
- });
- };
-
- const onTimeout = () => {
- dispose();
- waitCallback();
- };
-
- page.on('request', requestListener);
- page.on('requestfinished', requestFinishedListener);
- page.on('framenavigated', frameNavigateListener);
- const timeout = setTimeout(onTimeout, 10000);
-
- const dispose = () => {
- page.off('request', requestListener);
- page.off('requestfinished', requestFinishedListener);
- page.off('framenavigated', frameNavigateListener);
- clearTimeout(timeout);
- };
-
- try {
- const result = await callback();
- if (!requests.size && !frameNavigated)
- waitCallback();
- await waitBarrier;
- await page.evaluate(() => new Promise(f => setTimeout(f, 1000)));
- return result;
- } finally {
- dispose();
- }
-}
-
-export async function runAndWait(context: Context, status: string, callback: (page: playwright.Page) => Promise<any>, snapshot: boolean = false): Promise<ToolResult> {
- const page = await context.ensurePage();
- await waitForCompletion(page, () => callback(page));
- return snapshot ? captureAriaSnapshot(page, status) : {
- content: [{ type: 'text', text: status }],
- };
-}
-
-export async function captureAriaSnapshot(page: playwright.Page, status: string = ''): Promise<ToolResult> {
- const snapshot = await page.locator('html').ariaSnapshot({ ref: true });
- return {
- content: [{ type: 'text', text: `${status ? `${status}\n` : ''}
-- Page URL: ${page.url()}
-- Page Title: ${await page.title()}
-- Page Snapshot
-\`\`\`yaml
-${snapshot}
-\`\`\`
-`
- }],
- };
-}
diff --git a/packages/playwright-mcp/tests/basic.spec.ts b/packages/playwright-mcp/tests/basic.spec.ts
deleted file mode 100644
index 4878a0ec5b..0000000000
--- a/packages/playwright-mcp/tests/basic.spec.ts
+++ /dev/null
@@ -1,163 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import { test, expect } from './fixtures';
-
-test('test tool list', async ({ server }) => {
- const list = await server.send({
- jsonrpc: '2.0',
- id: 1,
- method: 'tools/list',
- });
-
- expect(list).toEqual(expect.objectContaining({
- id: 1,
- result: expect.objectContaining({
- tools: [
- expect.objectContaining({
- name: 'browser_navigate',
- }),
- expect.objectContaining({
- name: 'browser_go_back',
- }),
- expect.objectContaining({
- name: 'browser_go_forward',
- }),
- expect.objectContaining({
- name: 'browser_snapshot',
- }),
- expect.objectContaining({
- name: 'browser_click',
- }),
- expect.objectContaining({
- name: 'browser_hover',
- }),
- expect.objectContaining({
- name: 'browser_type',
- }),
- expect.objectContaining({
- name: 'browser_press_key',
- }),
- expect.objectContaining({
- name: 'browser_wait',
- }),
- expect.objectContaining({
- name: 'browser_save_as_pdf',
- }),
- expect.objectContaining({
- name: 'browser_close',
- }),
- ],
- }),
- }));
-});
-
-test('test resources list', async ({ server }) => {
- const list = await server.send({
- jsonrpc: '2.0',
- id: 2,
- method: 'resources/list',
- });
-
- expect(list).toEqual(expect.objectContaining({
- id: 2,
- result: expect.objectContaining({
- resources: [
- expect.objectContaining({
- uri: 'browser://console',
- mimeType: 'text/plain',
- }),
- ],
- }),
- }));
-});
-
-test('test browser_navigate', async ({ server }) => {
- const response = await server.send({
- jsonrpc: '2.0',
- id: 2,
- method: 'tools/call',
- params: {
- name: 'browser_navigate',
- arguments: {
- url: 'data:text/html,<html><title>Title</title><body>Hello, world!</body></html>',
- },
- },
- });
-
- expect(response).toEqual(expect.objectContaining({
- id: 2,
- result: {
- content: [{
- type: 'text',
- text: `
-- Page URL: data:text/html,<html><title>Title</title><body>Hello, world!</body></html>
-- Page Title: Title
-- Page Snapshot
-\`\`\`yaml
-- document [ref=s1e2]: Hello, world!
-\`\`\`
-`,
- }],
- },
- }));
-});
-
-test('test browser_click', async ({ server }) => {
- await server.send({
- jsonrpc: '2.0',
- id: 2,
- method: 'tools/call',
- params: {
- name: 'browser_navigate',
- arguments: {
- url: 'data:text/html,<html><title>Title</title><button>Submit</button></html>',
- },
- },
- });
-
- const response = await server.send({
- jsonrpc: '2.0',
- id: 3,
- method: 'tools/call',
- params: {
- name: 'browser_click',
- arguments: {
- element: 'Submit button',
- ref: 's1e4',
- },
- },
- });
-
- expect(response).toEqual(expect.objectContaining({
- id: 3,
- result: {
- content: [{
- type: 'text',
- text: `\"Submit button\" clicked
-
-- Page URL: data:text/html,<html><title>Title</title><button>Submit</button></html>
-- Page Title: Title
-- Page Snapshot
-\`\`\`yaml
-- document [ref=s2e2]:
- - button \"Submit\" [ref=s2e4]
-\`\`\`
-`,
- }],
- },
- }));
-});
diff --git a/packages/playwright-mcp/tests/fixtures.ts b/packages/playwright-mcp/tests/fixtures.ts
deleted file mode 100644
index b597322792..0000000000
--- a/packages/playwright-mcp/tests/fixtures.ts
+++ /dev/null
@@ -1,151 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import path from 'path';
-import { spawn } from 'child_process';
-import EventEmitter from 'events';
-
-import { test as baseTest, expect } from '@playwright/test';
-
-import type { ChildProcess } from 'child_process';
-
-export { expect } from '@playwright/test';
-
-class MCPServer extends EventEmitter {
- private _child: ChildProcess;
- private _messageQueue: any[] = [];
- private _messageResolvers: ((value: any) => void)[] = [];
- private _buffer: string = '';
-
- constructor(command: string, args: string[]) {
- super();
- this._child = spawn(command, args, {
- stdio: ['pipe', 'pipe', 'pipe'],
- });
-
- this._child.stdout?.on('data', data => {
- this._buffer += data.toString();
- let newlineIndex: number;
-
- while ((newlineIndex = this._buffer.indexOf('\n')) !== -1) {
- const message = this._buffer.slice(0, newlineIndex).trim();
- this._buffer = this._buffer.slice(newlineIndex + 1);
-
- if (!message)
- continue;
-
- const parsed = JSON.parse(message);
- if (this._messageResolvers.length > 0) {
- const resolve = this._messageResolvers.shift();
- resolve!(parsed);
- } else {
- this._messageQueue.push(parsed);
- }
- }
- });
-
- this._child.stderr?.on('data', data => {
- throw new Error('Server stderr:', data.toString());
- });
-
- this._child.on('exit', code => {
- if (code !== 0)
- throw new Error(`Server exited with code ${code}`);
- });
- }
-
- async send(message: any, options?: { timeout?: number }): Promise<void> {
- await this.sendNoReply(message);
- return this._waitForResponse(options || {});
- }
-
- async sendNoReply(message: any): Promise<void> {
- const jsonMessage = JSON.stringify(message) + '\n';
- await new Promise<void>((resolve, reject) => {
- this._child.stdin?.write(jsonMessage, err => {
- if (err)
- reject(err);
- else
- resolve();
- });
- });
- }
-
- private async _waitForResponse(options: { timeout?: number }): Promise<any> {
- if (this._messageQueue.length > 0)
- return this._messageQueue.shift();
-
- return new Promise((resolve, reject) => {
- const timeoutId = setTimeout(() => {
- reject(new Error('Timeout waiting for message'));
- }, options.timeout || 5000);
-
- this._messageResolvers.push(message => {
- clearTimeout(timeoutId);
- resolve(message);
- });
- });
- }
-
- async close(): Promise<void> {
- return new Promise(resolve => {
- this._child.on('exit', () => resolve());
- this._child.stdin?.end();
- });
- }
-}
-
-export const test = baseTest.extend<{ server: MCPServer }>({
- server: async ({}, use) => {
- const server = new MCPServer('node', [path.join(__dirname, '../cli.js'), '--headless']);
- const initialize = await server.send({
- jsonrpc: '2.0',
- id: 0,
- method: 'initialize',
- params: {
- protocolVersion: '2024-11-05',
- capabilities: {},
- clientInfo: {
- name: 'Playwright Test',
- version: '0.0.0',
- },
- },
- });
-
- expect(initialize).toEqual(expect.objectContaining({
- id: 0,
- result: expect.objectContaining({
- protocolVersion: '2024-11-05',
- capabilities: {
- tools: {},
- resources: {},
- },
- serverInfo: expect.objectContaining({
- name: 'Playwright',
- version: expect.any(String),
- }),
- }),
- }));
-
- await server.sendNoReply({
- jsonrpc: '2.0',
- method: 'notifications/initialized',
- });
-
- await use(server);
- await server.close();
- },
-});
diff --git a/utils/workspace.js b/utils/workspace.js
index cba0021c17..dde042b70c 100755
--- a/utils/workspace.js
+++ b/utils/workspace.js
@@ -172,11 +172,6 @@ const workspace = new Workspace(ROOT_PATH, [
path: path.join(ROOT_PATH, 'packages', 'playwright-client'),
files: LICENCE_FILES,
}),
- new PWPackage({
- name: '@playwright/experimental-tools',
- path: path.join(ROOT_PATH, 'packages', 'playwright-mcp'),
- files: LICENCE_FILES,
- }),
new PWPackage({
name: '@playwright/browser-webkit',
path: path.join(ROOT_PATH, 'packages', 'playwright-browser-webkit'),