Skip to content

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

chore: move playwright-mcp into the monorepo (#37286)

Pavel Feldman90e302ba39cf
diff --git a/.github/workflows/test_mcp.yml b/.github/workflows/test_mcp.yml
new file mode 100644
index 0000000000..91b569f8da
--- /dev/null
+++ b/.github/workflows/test_mcp.yml
@@ -0,0 +1,85 @@
+name: MCP
+
+on:
+ push:
+ branches:
+ - main
+ - release-*
+ pull_request:
+ paths-ignore:
+ - 'browser_patches/**'
+ - 'docs/**'
+ branches:
+ - main
+ - release-*
+
+concurrency:
+ # For pull requests, cancel all currently-running jobs for this workflow
+ # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
+env:
+ # Force terminal colors. @see https://www.npmjs.com/package/colors
+ FORCE_COLOR: 1
+ ELECTRON_SKIP_BINARY_DOWNLOAD: 1
+ DEBUG_GIT_COMMIT_INFO: 1
+
+jobs:
+ test_mcp:
+ name: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu-latest, macos-15, windows-latest]
+ runs-on: ${{ matrix.os }}
+ steps:
+ - uses: actions/checkout@v4
+ - name: Use Node.js 20
+ uses: actions/setup-node@v4
+ with:
+ node-version: '20'
+ cache: 'npm'
+ - run: npm ci
+ - run: npm run build
+ - run: npx playwright install --with-deps
+ - run: npm run mcp-test
+
+ test_mcp_extension:
+ name: Extension
+ strategy:
+ fail-fast: false
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Use Node.js 20
+ uses: actions/setup-node@v4
+ with:
+ node-version: '20'
+ cache: 'npm'
+
+ - name: "Extension: Install dependencies"
+ run: npm ci
+ working-directory: ./packages/mcp-extension
+ - name: "Extension: Build"
+ run: npm run build
+ working-directory: ./packages/mcp-extension
+ - name: "Extension: Upload artifact"
+ uses: actions/upload-artifact@v4
+ with:
+ name: extension
+ path: ./packages/mcp-extension/dist
+ retention-days: 7
+
+ - run: npm ci
+ - run: npm run build
+ - run: npx playwright install chromium
+
+ - name: Run tests
+ run: |
+ if [[ "$(uname)" == "Linux" ]]; then
+ xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run mcp-etest
+ else
+ npm run mcp-etest
+ fi
+ shell: bash
diff --git a/.gitignore b/.gitignore
index 8e41e31810..07cfae4d19 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,6 +13,8 @@ yarn.lock
/packages/playwright-core/src/generated
/packages/playwright-ct-core/src/generated
packages/*/lib/
+packages/mcp-extension/dist/
+packages/mcp-extension/lib/
drivers/
.android-sdk/
.gradle/
diff --git a/eslint.config.mjs b/eslint.config.mjs
index 141bcdccf1..02dbc2f1a4 100644
--- a/eslint.config.mjs
+++ b/eslint.config.mjs
@@ -54,6 +54,7 @@ const ignores = [
"packages/html-reporter/playwright.config.ts",
"packages/html-reporter/playwright/*",
"packages/html-reporter/vite.config.ts",
+ "packages/mcp-extension/",
"test-results/",
"tests/assets/",
"tests/components/",
diff --git a/package-lock.json b/package-lock.json
index c021c6c603..55ebf2271f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -18,7 +18,7 @@
"@eslint/compat": "^1.3.2",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.34.0",
- "@modelcontextprotocol/sdk": "^1.17.3",
+ "@modelcontextprotocol/sdk": "^1.17.5",
"@octokit/graphql-schema": "^15.26.0",
"@stylistic/eslint-plugin": "^5.2.3",
"@types/codemirror": "^5.60.7",
@@ -61,7 +61,9 @@
"vite": "^6.3.4",
"ws": "^8.17.1",
"xml2js": "^0.5.0",
- "yaml": "2.6.0"
+ "yaml": "2.6.0",
+ "zod": "^3.25.76",
+ "zod-to-json-schema": "^3.24.6"
},
"engines": {
"node": ">=18"
@@ -69,8 +71,6 @@
},
"node_modules/@actions/core": {
"version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.11.1.tgz",
- "integrity": "sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -80,8 +80,6 @@
},
"node_modules/@actions/exec": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz",
- "integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -90,8 +88,6 @@
},
"node_modules/@actions/github": {
"version": "6.0.0",
- "resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.0.tgz",
- "integrity": "sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -103,8 +99,6 @@
},
"node_modules/@actions/http-client": {
"version": "2.2.3",
- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz",
- "integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -114,15 +108,11 @@
},
"node_modules/@actions/io": {
"version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz",
- "integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==",
"dev": true,
"license": "MIT"
},
"node_modules/@ampproject/remapping": {
"version": "2.3.0",
- "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",
- "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==",
"license": "Apache-2.0",
"dependencies": {
"@jridgewell/gen-mapping": "^0.3.5",
@@ -134,8 +124,6 @@
},
"node_modules/@babel/code-frame": {
"version": "7.26.2",
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz",
- "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==",
"license": "MIT",
"dependencies": {
"@babel/helper-validator-identifier": "^7.25.9",
@@ -148,8 +136,6 @@
},
"node_modules/@babel/compat-data": {
"version": "7.26.8",
- "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz",
- "integrity": "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==",
"license": "MIT",
"engines": {
"node": ">=6.9.0"
@@ -157,8 +143,6 @@
},
"node_modules/@babel/core": {
"version": "7.26.9",
- "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.9.tgz",
- "integrity": "sha512-lWBYIrF7qK5+GjY5Uy+/hEgp8OJWOD/rpy74GplYRhEauvbHDeFB8t5hPOZxCZ0Oxf4Cc36tK51/l3ymJysrKw==",
"license": "MIT",
"dependencies": {
"@ampproject/remapping": "^2.2.0",
@@ -187,8 +171,6 @@
},
"node_modules/@babel/generator": {
"version": "7.26.9",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.9.tgz",
- "integrity": "sha512-kEWdzjOAUMW4hAyrzJ0ZaTOu9OmpyDIQicIh0zg0EEcEkYXZb2TjtBhnHi2ViX7PKwZqF4xwqfAm299/QMP3lg==",
"license": "MIT",
"dependencies": {
"@babel/parser": "^7.26.9",
@@ -203,8 +185,6 @@
},
"node_modules/@babel/helper-compilation-targets": {
"version": "7.26.5",
- "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz",
- "integrity": "sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==",
"license": "MIT",
"dependencies": {
"@babel/compat-data": "^7.26.5",
@@ -219,8 +199,6 @@
},
"node_modules/@babel/helper-module-imports": {
"version": "7.25.9",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz",
- "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==",
"license": "MIT",
"dependencies": {
"@babel/traverse": "^7.25.9",
@@ -232,8 +210,6 @@
},
"node_modules/@babel/helper-module-transforms": {
"version": "7.26.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz",
- "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==",
"license": "MIT",
"dependencies": {
"@babel/helper-module-imports": "^7.25.9",
@@ -249,8 +225,6 @@
},
"node_modules/@babel/helper-plugin-utils": {
"version": "7.26.5",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz",
- "integrity": "sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==",
"license": "MIT",
"engines": {
"node": ">=6.9.0"
@@ -258,8 +232,6 @@
},
"node_modules/@babel/helper-string-parser": {
"version": "7.25.9",
- "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz",
- "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==",
"license": "MIT",
"engines": {
"node": ">=6.9.0"
@@ -267,8 +239,6 @@
},
"node_modules/@babel/helper-validator-identifier": {
"version": "7.25.9",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz",
- "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==",
"license": "MIT",
"engines": {
"node": ">=6.9.0"
@@ -276,8 +246,6 @@
},
"node_modules/@babel/helper-validator-option": {
"version": "7.25.9",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz",
- "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==",
"license": "MIT",
"engines": {
"node": ">=6.9.0"
@@ -285,8 +253,6 @@
},
"node_modules/@babel/helpers": {
"version": "7.26.10",
- "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.10.tgz",
- "integrity": "sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g==",
"license": "MIT",
"dependencies": {
"@babel/template": "^7.26.9",
@@ -298,8 +264,6 @@
},
"node_modules/@babel/parser": {
"version": "7.26.9",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.9.tgz",
- "integrity": "sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A==",
"license": "MIT",
"dependencies": {
"@babel/types": "^7.26.9"
@@ -313,8 +277,6 @@
},
"node_modules/@babel/plugin-transform-react-jsx-self": {
"version": "7.25.9",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.25.9.tgz",
- "integrity": "sha512-y8quW6p0WHkEhmErnfe58r7x0A70uKphQm8Sp8cV7tjNQwK56sNVK0M73LK3WuYmsuyrftut4xAkjjgU0twaMg==",
"license": "MIT",
"dependencies": {
"@babel/helper-plugin-utils": "^7.25.9"
@@ -328,8 +290,6 @@
},
"node_modules/@babel/plugin-transform-react-jsx-source": {
"version": "7.25.9",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.25.9.tgz",
- "integrity": "sha512-+iqjT8xmXhhYv4/uiYd8FNQsraMFZIfxVSqxxVSZP0WbbSAWvBXAul0m/zu+7Vv4O/3WtApy9pmaTMiumEZgfg==",
"license": "MIT",
"dependencies": {
"@babel/helper-plugin-utils": "^7.25.9"
@@ -343,8 +303,6 @@
},
"node_modules/@babel/runtime": {
"version": "7.26.10",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.10.tgz",
- "integrity": "sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -356,8 +314,6 @@
},
"node_modules/@babel/template": {
"version": "7.26.9",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz",
- "integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==",
"license": "MIT",
"dependencies": {
"@babel/code-frame": "^7.26.2",
@@ -370,8 +326,6 @@
},
"node_modules/@babel/traverse": {
"version": "7.26.9",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.9.tgz",
- "integrity": "sha512-ZYW7L+pL8ahU5fXmNbPF+iZFHCv5scFak7MZ9bwaRPLUhHh7QQEMjZUg0HevihoqCM5iSYHN61EyCoZvqC+bxg==",
"license": "MIT",
"dependencies": {
"@babel/code-frame": "^7.26.2",
@@ -388,8 +342,6 @@
},
"node_modules/@babel/types": {
"version": "7.26.10",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz",
- "integrity": "sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==",
"license": "MIT",
"dependencies": {
"@babel/helper-string-parser": "^7.25.9",
@@ -401,8 +353,6 @@
},
"node_modules/@electron/get": {
"version": "2.0.3",
- "resolved": "https://registry.npmjs.org/@electron/get/-/get-2.0.3.tgz",
- "integrity": "sha512-Qkzpg2s9GnVV2I2BjRksUi43U5e6+zaQMcjoJy0C+C5oxaKl+fmckGDQFtRpZpZV0NQekuZZ+tGz7EA9TVnQtQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -421,266 +371,8 @@
"global-agent": "^3.0.0"
}
},
- "node_modules/@esbuild/aix-ppc64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.0.tgz",
- "integrity": "sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==",
- "cpu": [
- "ppc64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "aix"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/android-arm": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.0.tgz",
- "integrity": "sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==",
- "cpu": [
- "arm"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/android-arm64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.0.tgz",
- "integrity": "sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/android-x64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.0.tgz",
- "integrity": "sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/darwin-arm64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.0.tgz",
- "integrity": "sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/darwin-x64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.0.tgz",
- "integrity": "sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/freebsd-arm64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.0.tgz",
- "integrity": "sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/freebsd-x64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.0.tgz",
- "integrity": "sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-arm": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.0.tgz",
- "integrity": "sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==",
- "cpu": [
- "arm"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-arm64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.0.tgz",
- "integrity": "sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-ia32": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.0.tgz",
- "integrity": "sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==",
- "cpu": [
- "ia32"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-loong64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.0.tgz",
- "integrity": "sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==",
- "cpu": [
- "loong64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-mips64el": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.0.tgz",
- "integrity": "sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==",
- "cpu": [
- "mips64el"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-ppc64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.0.tgz",
- "integrity": "sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==",
- "cpu": [
- "ppc64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-riscv64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.0.tgz",
- "integrity": "sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==",
- "cpu": [
- "riscv64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-s390x": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.0.tgz",
- "integrity": "sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==",
- "cpu": [
- "s390x"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
"node_modules/@esbuild/linux-x64": {
"version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.0.tgz",
- "integrity": "sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==",
"cpu": [
"x64"
],
@@ -693,138 +385,8 @@
"node": ">=18"
}
},
- "node_modules/@esbuild/netbsd-arm64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.0.tgz",
- "integrity": "sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "netbsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/netbsd-x64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.0.tgz",
- "integrity": "sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "netbsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/openbsd-arm64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.0.tgz",
- "integrity": "sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "openbsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/openbsd-x64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.0.tgz",
- "integrity": "sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "openbsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/sunos-x64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.0.tgz",
- "integrity": "sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "sunos"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/win32-arm64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.0.tgz",
- "integrity": "sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/win32-ia32": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.0.tgz",
- "integrity": "sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==",
- "cpu": [
- "ia32"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/win32-x64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.0.tgz",
- "integrity": "sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=18"
- }
- },
"node_modules/@eslint-community/eslint-utils": {
"version": "4.7.0",
- "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz",
- "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -842,8 +404,6 @@
},
"node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": {
"version": "3.4.3",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
- "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
"dev": true,
"license": "Apache-2.0",
"engines": {
@@ -855,8 +415,6 @@
},
"node_modules/@eslint-community/regexpp": {
"version": "4.12.1",
- "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz",
- "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -865,8 +423,6 @@
},
"node_modules/@eslint/compat": {
"version": "1.3.2",
- "resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-1.3.2.tgz",
- "integrity": "sha512-jRNwzTbd6p2Rw4sZ1CgWRS8YMtqG15YyZf7zvb6gY2rB2u6n+2Z+ELW0GtL0fQgyl0pr4Y/BzBfng/BdsereRA==",
"dev": true,
"license": "Apache-2.0",
"engines": {
@@ -883,8 +439,6 @@
},
"node_modules/@eslint/config-array": {
"version": "0.21.0",
- "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz",
- "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
@@ -898,8 +452,6 @@
},
"node_modules/@eslint/config-helpers": {
"version": "0.3.1",
- "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.1.tgz",
- "integrity": "sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==",
"dev": true,
"license": "Apache-2.0",
"engines": {
@@ -908,8 +460,6 @@
},
"node_modules/@eslint/core": {
"version": "0.15.2",
- "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz",
- "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
@@ -921,8 +471,6 @@
},
"node_modules/@eslint/eslintrc": {
"version": "3.3.1",
- "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz",
- "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -945,8 +493,6 @@
},
"node_modules/@eslint/eslintrc/node_modules/globals": {
"version": "14.0.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz",
- "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -958,8 +504,6 @@
},
"node_modules/@eslint/js": {
"version": "9.34.0",
- "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.34.0.tgz",
- "integrity": "sha512-EoyvqQnBNsV1CWaEJ559rxXL4c8V92gxirbawSmVUOWXlsRxxQXl6LmCpdUblgxgSkDIqKnhzba2SjRTI/A5Rw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -971,8 +515,6 @@
},
"node_modules/@eslint/object-schema": {
"version": "2.1.6",
- "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz",
- "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==",
"dev": true,
"license": "Apache-2.0",
"engines": {
@@ -981,8 +523,6 @@
},
"node_modules/@eslint/plugin-kit": {
"version": "0.3.5",
- "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz",
- "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
@@ -995,8 +535,6 @@
},
"node_modules/@fastify/busboy": {
"version": "2.1.1",
- "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz",
- "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1005,8 +543,6 @@
},
"node_modules/@humanfs/core": {
"version": "0.19.1",
- "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz",
- "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==",
"dev": true,
"license": "Apache-2.0",
"engines": {
@@ -1015,8 +551,6 @@
},
"node_modules/@humanfs/node": {
"version": "0.16.6",
- "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz",
- "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
@@ -1029,8 +563,6 @@
},
"node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": {
"version": "0.3.1",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz",
- "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==",
"dev": true,
"license": "Apache-2.0",
"engines": {
@@ -1043,8 +575,6 @@
},
"node_modules/@humanwhocodes/module-importer": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
- "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
"dev": true,
"license": "Apache-2.0",
"engines": {
@@ -1057,8 +587,6 @@
},
"node_modules/@humanwhocodes/retry": {
"version": "0.4.3",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz",
- "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==",
"dev": true,
"license": "Apache-2.0",
"engines": {
@@ -1071,8 +599,6 @@
},
"node_modules/@jridgewell/gen-mapping": {
"version": "0.3.8",
- "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz",
- "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==",
"license": "MIT",
"dependencies": {
"@jridgewell/set-array": "^1.2.1",
@@ -1085,8 +611,6 @@
},
"node_modules/@jridgewell/resolve-uri": {
"version": "3.1.2",
- "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
- "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
"license": "MIT",
"engines": {
"node": ">=6.0.0"
@@ -1094,8 +618,6 @@
},
"node_modules/@jridgewell/set-array": {
"version": "1.2.1",
- "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz",
- "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==",
"license": "MIT",
"engines": {
"node": ">=6.0.0"
@@ -1103,14 +625,10 @@
},
"node_modules/@jridgewell/sourcemap-codec": {
"version": "1.5.0",
- "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
- "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
"license": "MIT"
},
"node_modules/@jridgewell/trace-mapping": {
"version": "0.3.25",
- "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
- "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
"license": "MIT",
"dependencies": {
"@jridgewell/resolve-uri": "^3.1.0",
@@ -1118,9 +636,7 @@
}
},
"node_modules/@modelcontextprotocol/sdk": {
- "version": "1.17.3",
- "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.17.3.tgz",
- "integrity": "sha512-JPwUKWSsbzx+DLFznf/QZ32Qa+ptfbUlHhRLrBQBAFu9iI1iYvizM4p+zhhRDceSsPutXp4z+R/HPVphlIiclg==",
+ "version": "1.17.5",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1143,8 +659,6 @@
},
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
- "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1157,8 +671,6 @@
},
"node_modules/@nodelib/fs.stat": {
"version": "2.0.5",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
- "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1167,8 +679,6 @@
},
"node_modules/@nodelib/fs.walk": {
"version": "1.2.8",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
- "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1181,8 +691,6 @@
},
"node_modules/@octokit/auth-token": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz",
- "integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1191,8 +699,6 @@
},
"node_modules/@octokit/core": {
"version": "5.2.1",
- "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.1.tgz",
- "integrity": "sha512-dKYCMuPO1bmrpuogcjQ8z7ICCH3FP6WmxpwC03yjzGfZhj9fTJg6+bS1+UAplekbN2C+M61UNllGOOoAfGCrdQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1210,8 +716,6 @@
},
"node_modules/@octokit/endpoint": {
"version": "9.0.6",
- "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.6.tgz",
- "integrity": "sha512-H1fNTMA57HbkFESSt3Y9+FBICv+0jFceJFPWDePYlR/iMGrwM5ph+Dd4XRQs+8X+PUFURLQgX9ChPfhJ/1uNQw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1224,8 +728,6 @@
},
"node_modules/@octokit/graphql": {
"version": "7.1.1",
- "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.1.1.tgz",
- "integrity": "sha512-3mkDltSfcDUoa176nlGoA32RGjeWjl3K7F/BwHwRMJUW/IteSa4bnSV8p2ThNkcIcZU2umkZWxwETSSCJf2Q7g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1239,8 +741,6 @@
},
"node_modules/@octokit/graphql-schema": {
"version": "15.26.0",
- "resolved": "https://registry.npmjs.org/@octokit/graphql-schema/-/graphql-schema-15.26.0.tgz",
- "integrity": "sha512-SoVbh+sXe9nsoweFbLT3tAk3XWYbYLs5ku05wij1zhyQ2U3lewdrhjo5Tb7lfaOGWNHSkPZT4uuPZp8neF7P7A==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1250,15 +750,11 @@
},
"node_modules/@octokit/openapi-types": {
"version": "24.2.0",
- "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz",
- "integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==",
"dev": true,
"license": "MIT"
},
"node_modules/@octokit/plugin-paginate-rest": {
"version": "9.2.2",
- "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.2.tgz",
- "integrity": "sha512-u3KYkGF7GcZnSD/3UP0S7K5XUFT2FkOQdcfXZGZQPGv3lm4F2Xbf71lvjldr8c1H3nNbF+33cLEkWYbokGWqiQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1273,15 +769,11 @@
},
"node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": {
"version": "20.0.0",
- "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
- "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==",
"dev": true,
"license": "MIT"
},
"node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": {
"version": "12.6.0",
- "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
- "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1290,8 +782,6 @@
},
"node_modules/@octokit/plugin-rest-endpoint-methods": {
"version": "10.4.1",
- "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.4.1.tgz",
- "integrity": "sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1306,15 +796,11 @@
},
"node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types": {
"version": "20.0.0",
- "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
- "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==",
"dev": true,
"license": "MIT"
},
"node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": {
"version": "12.6.0",
- "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
- "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1323,8 +809,6 @@
},
"node_modules/@octokit/request": {
"version": "8.4.1",
- "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.1.tgz",
- "integrity": "sha512-qnB2+SY3hkCmBxZsR/MPCybNmbJe4KAlfWErXq+rBKkQJlbjdJeS85VI9r8UqeLYLvnAenU8Q1okM/0MBsAGXw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1339,8 +823,6 @@
},
"node_modules/@octokit/request-error": {
"version": "5.1.1",
- "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.1.tgz",
- "integrity": "sha512-v9iyEQJH6ZntoENr9/yXxjuezh4My67CBSu9r6Ve/05Iu5gNgnisNWOsoJHTP6k0Rr0+HQIpnH+kyammu90q/g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1354,8 +836,6 @@
},
"node_modules/@octokit/types": {
"version": "13.10.0",
- "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz",
- "integrity": "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1398,222 +878,16 @@
"resolved": "packages/playwright-ct-vue",
"link": true
},
- "node_modules/@playwright/test": {
- "resolved": "packages/playwright-test",
+ "node_modules/@playwright/mcp-extension": {
+ "resolved": "packages/mcp-extension",
"link": true
},
- "node_modules/@rollup/rollup-android-arm-eabi": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.40.1.tgz",
- "integrity": "sha512-kxz0YeeCrRUHz3zyqvd7n+TVRlNyTifBsmnmNPtk3hQURUyG9eAB+usz6DAwagMusjx/zb3AjvDUvhFGDAexGw==",
- "cpu": [
- "arm"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ]
- },
- "node_modules/@rollup/rollup-android-arm64": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.40.1.tgz",
- "integrity": "sha512-PPkxTOisoNC6TpnDKatjKkjRMsdaWIhyuMkA4UsBXT9WEZY4uHezBTjs6Vl4PbqQQeu6oION1w2voYZv9yquCw==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ]
- },
- "node_modules/@rollup/rollup-darwin-arm64": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.40.1.tgz",
- "integrity": "sha512-VWXGISWFY18v/0JyNUy4A46KCFCb9NVsH+1100XP31lud+TzlezBbz24CYzbnA4x6w4hx+NYCXDfnvDVO6lcAA==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ]
- },
- "node_modules/@rollup/rollup-darwin-x64": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.40.1.tgz",
- "integrity": "sha512-nIwkXafAI1/QCS7pxSpv/ZtFW6TXcNUEHAIA9EIyw5OzxJZQ1YDrX+CL6JAIQgZ33CInl1R6mHet9Y/UZTg2Bw==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ]
- },
- "node_modules/@rollup/rollup-freebsd-arm64": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.40.1.tgz",
- "integrity": "sha512-BdrLJ2mHTrIYdaS2I99mriyJfGGenSaP+UwGi1kB9BLOCu9SR8ZpbkmmalKIALnRw24kM7qCN0IOm6L0S44iWw==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ]
- },
- "node_modules/@rollup/rollup-freebsd-x64": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.40.1.tgz",
- "integrity": "sha512-VXeo/puqvCG8JBPNZXZf5Dqq7BzElNJzHRRw3vjBE27WujdzuOPecDPc/+1DcdcTptNBep3861jNq0mYkT8Z6Q==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.40.1.tgz",
- "integrity": "sha512-ehSKrewwsESPt1TgSE/na9nIhWCosfGSFqv7vwEtjyAqZcvbGIg4JAcV7ZEh2tfj/IlfBeZjgOXm35iOOjadcg==",
- "cpu": [
- "arm"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm-musleabihf": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.40.1.tgz",
- "integrity": "sha512-m39iO/aaurh5FVIu/F4/Zsl8xppd76S4qoID8E+dSRQvTyZTOI2gVk3T4oqzfq1PtcvOfAVlwLMK3KRQMaR8lg==",
- "cpu": [
- "arm"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm64-gnu": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.40.1.tgz",
- "integrity": "sha512-Y+GHnGaku4aVLSgrT0uWe2o2Rq8te9hi+MwqGF9r9ORgXhmHK5Q71N757u0F8yU1OIwUIFy6YiJtKjtyktk5hg==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm64-musl": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.40.1.tgz",
- "integrity": "sha512-jEwjn3jCA+tQGswK3aEWcD09/7M5wGwc6+flhva7dsQNRZZTe30vkalgIzV4tjkopsTS9Jd7Y1Bsj6a4lzz8gQ==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-loongarch64-gnu": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.40.1.tgz",
- "integrity": "sha512-ySyWikVhNzv+BV/IDCsrraOAZ3UaC8SZB67FZlqVwXwnFhPihOso9rPOxzZbjp81suB1O2Topw+6Ug3JNegejQ==",
- "cpu": [
- "loong64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.40.1.tgz",
- "integrity": "sha512-BvvA64QxZlh7WZWqDPPdt0GH4bznuL6uOO1pmgPnnv86rpUpc8ZxgZwcEgXvo02GRIZX1hQ0j0pAnhwkhwPqWg==",
- "cpu": [
- "ppc64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-riscv64-gnu": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.40.1.tgz",
- "integrity": "sha512-EQSP+8+1VuSulm9RKSMKitTav89fKbHymTf25n5+Yr6gAPZxYWpj3DzAsQqoaHAk9YX2lwEyAf9S4W8F4l3VBQ==",
- "cpu": [
- "riscv64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-riscv64-musl": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.40.1.tgz",
- "integrity": "sha512-n/vQ4xRZXKuIpqukkMXZt9RWdl+2zgGNx7Uda8NtmLJ06NL8jiHxUawbwC+hdSq1rrw/9CghCpEONor+l1e2gA==",
- "cpu": [
- "riscv64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-s390x-gnu": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.40.1.tgz",
- "integrity": "sha512-h8d28xzYb98fMQKUz0w2fMc1XuGzLLjdyxVIbhbil4ELfk5/orZlSTpF/xdI9C8K0I8lCkq+1En2RJsawZekkg==",
- "cpu": [
- "s390x"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-x64-gnu": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.40.1.tgz",
- "integrity": "sha512-XiK5z70PEFEFqcNj3/zRSz/qX4bp4QIraTy9QjwJAb/Z8GM7kVUsD0Uk8maIPeTyPCP03ChdI+VVmJriKYbRHQ==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
+ "node_modules/@playwright/test": {
+ "resolved": "packages/playwright-test",
+ "link": true
},
- "node_modules/@rollup/rollup-linux-x64-musl": {
+ "node_modules/@rollup/rollup-linux-x64-gnu": {
"version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.40.1.tgz",
- "integrity": "sha512-2BRORitq5rQ4Da9blVovzNCMaUlyKrzMSvkVR0D4qPuOy/+pMCrh1d7o01RATwVy+6Fa1WBw+da7QPeLWU/1mQ==",
"cpu": [
"x64"
],
@@ -1623,56 +897,24 @@
"linux"
]
},
- "node_modules/@rollup/rollup-win32-arm64-msvc": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.40.1.tgz",
- "integrity": "sha512-b2bcNm9Kbde03H+q+Jjw9tSfhYkzrDUf2d5MAd1bOJuVplXvFhWz7tRtWvD8/ORZi7qSCy0idW6tf2HgxSXQSg==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
- },
- "node_modules/@rollup/rollup-win32-ia32-msvc": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.40.1.tgz",
- "integrity": "sha512-DfcogW8N7Zg7llVEfpqWMZcaErKfsj9VvmfSyRjCyo4BI3wPEfrzTtJkZG6gKP/Z92wFm6rz2aDO7/JfiR/whA==",
- "cpu": [
- "ia32"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
- },
- "node_modules/@rollup/rollup-win32-x64-msvc": {
+ "node_modules/@rollup/rollup-linux-x64-musl": {
"version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.40.1.tgz",
- "integrity": "sha512-ECyOuDeH3C1I8jH2MK1RtBJW+YPMvSfT0a5NN0nHfQYnDSJ6tUiZH3gzwVP5/Kfh/+Tt7tpWVF9LXNTnhTJ3kA==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
- "win32"
+ "linux"
]
},
"node_modules/@rtsao/scc": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz",
- "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==",
"dev": true,
"license": "MIT"
},
"node_modules/@sindresorhus/is": {
"version": "4.6.0",
- "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",
- "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1684,8 +926,6 @@
},
"node_modules/@stylistic/eslint-plugin": {
"version": "5.2.3",
- "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.2.3.tgz",
- "integrity": "sha512-oY7GVkJGVMI5benlBDCaRrSC1qPasafyv5dOBLLv5MTilMGnErKhO6ziEfodDDIZbo5QxPUNW360VudJOFODMw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1705,8 +945,6 @@
},
"node_modules/@sveltejs/acorn-typescript": {
"version": "1.0.5",
- "resolved": "https://registry.npmjs.org/@sveltejs/acorn-typescript/-/acorn-typescript-1.0.5.tgz",
- "integrity": "sha512-IwQk4yfwLdibDlrXVE04jTZYlLnwsTT2PIOQQGNLWfjavGifnk1JD1LcZjZaBTRcxZu2FfPfNLOE04DSu9lqtQ==",
"license": "MIT",
"peerDependencies": {
"acorn": "^8.9.0"
@@ -1714,8 +952,6 @@
},
"node_modules/@szmarczak/http-timer": {
"version": "4.0.6",
- "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz",
- "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1727,8 +963,6 @@
},
"node_modules/@types/babel__core": {
"version": "7.20.5",
- "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
- "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==",
"license": "MIT",
"dependencies": {
"@babel/parser": "^7.20.7",
@@ -1740,8 +974,6 @@
},
"node_modules/@types/babel__generator": {
"version": "7.6.8",
- "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz",
- "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==",
"license": "MIT",
"dependencies": {
"@babel/types": "^7.0.0"
@@ -1749,8 +981,6 @@
},
"node_modules/@types/babel__template": {
"version": "7.4.4",
- "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz",
- "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==",
"license": "MIT",
"dependencies": {
"@babel/parser": "^7.1.0",
@@ -1759,8 +989,6 @@
},
"node_modules/@types/babel__traverse": {
"version": "7.20.6",
- "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz",
- "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==",
"license": "MIT",
"dependencies": {
"@babel/types": "^7.20.7"
@@ -1768,8 +996,6 @@
},
"node_modules/@types/cacheable-request": {
"version": "6.0.3",
- "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz",
- "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1779,10 +1005,17 @@
"@types/responselike": "^1.0.0"
}
},
+ "node_modules/@types/chrome": {
+ "version": "0.0.315",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/filesystem": "*",
+ "@types/har-format": "*"
+ }
+ },
"node_modules/@types/codemirror": {
"version": "5.60.15",
- "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-5.60.15.tgz",
- "integrity": "sha512-dTOvwEQ+ouKJ/rE9LT1Ue2hmP6H1mZv5+CCnNWu2qtiOe2LQa9lCprEY20HxiDmV/Bxh+dXjywmy5aKvoGjULA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1791,32 +1024,41 @@
},
"node_modules/@types/estree": {
"version": "1.0.7",
- "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz",
- "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==",
+ "license": "MIT"
+ },
+ "node_modules/@types/filesystem": {
+ "version": "0.0.36",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/filewriter": "*"
+ }
+ },
+ "node_modules/@types/filewriter": {
+ "version": "0.0.33",
+ "dev": true,
"license": "MIT"
},
"node_modules/@types/formidable": {
"version": "2.0.6",
- "resolved": "https://registry.npmjs.org/@types/formidable/-/formidable-2.0.6.tgz",
- "integrity": "sha512-L4HcrA05IgQyNYJj6kItuIkXrInJvsXTPC5B1i64FggWKKqSL+4hgt7asiSNva75AoLQjq29oPxFfU4GAQ6Z2w==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/node": "*"
}
},
+ "node_modules/@types/har-format": {
+ "version": "1.2.16",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/@types/http-cache-semantics": {
"version": "4.0.4",
- "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz",
- "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/immutable": {
"version": "3.8.7",
- "resolved": "https://registry.npmjs.org/@types/immutable/-/immutable-3.8.7.tgz",
- "integrity": "sha512-nsHFDX48Tl3RaP4BF47HHe5njx40Pcp+0a8CIqzJata80Fp7JzkcuGB7UhZBGjH9aA1fMEahIqvPQQNmro5YLg==",
- "deprecated": "This is a stub types definition for Facebook's Immutable (https://github.com/facebook/immutable-js). Facebook's Immutable provides its own type definitions, so you don't need @types/immutable installed!",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1825,22 +1067,16 @@
},
"node_modules/@types/json-schema": {
"version": "7.0.15",
- "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
- "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/json5": {
"version": "0.0.29",
- "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",
- "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/keyv": {
"version": "3.1.4",
- "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz",
- "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1849,8 +1085,6 @@
},
"node_modules/@types/node": {
"version": "18.19.76",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.76.tgz",
- "integrity": "sha512-yvR7Q9LdPz2vGpmpJX5LolrgRdWvB67MJKDPSgIIzpFbaf9a1j/f5DnLp5VDyHGMR0QZHlTr1afsD87QCXFHKw==",
"devOptional": true,
"license": "MIT",
"dependencies": {
@@ -1859,15 +1093,11 @@
},
"node_modules/@types/prop-types": {
"version": "15.7.14",
- "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.14.tgz",
- "integrity": "sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/react": {
"version": "18.3.18",
- "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.18.tgz",
- "integrity": "sha512-t4yC+vtgnkYjNSKlFx1jkAhH8LgTo2N/7Qvi83kdEaUtMDiwpbLAktKDaAMlRcJ5eSxZkH74eEGt1ky31d7kfQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1877,8 +1107,6 @@
},
"node_modules/@types/react-dom": {
"version": "18.3.5",
- "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.5.tgz",
- "integrity": "sha512-P4t6saawp+b/dFrUr2cvkVsfvPguwsxtH6dNIYRllMsefqFzkZk5UIjzyDOv5g1dXIPdG4Sp1yCR4Z6RCUsG/Q==",
"dev": true,
"license": "MIT",
"peerDependencies": {
@@ -1887,8 +1115,6 @@
},
"node_modules/@types/responselike": {
"version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz",
- "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1897,8 +1123,6 @@
},
"node_modules/@types/tern": {
"version": "0.23.9",
- "resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.9.tgz",
- "integrity": "sha512-ypzHFE/wBzh+BlH6rrBgS5I/Z7RD21pGhZ2rltb/+ZrVM1awdZwjx7hE5XfuYgHWk9uvV5HLZN3SloevCAp3Bw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1907,8 +1131,6 @@
},
"node_modules/@types/ws": {
"version": "8.5.14",
- "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.14.tgz",
- "integrity": "sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1917,8 +1139,6 @@
},
"node_modules/@types/xml2js": {
"version": "0.4.14",
- "resolved": "https://registry.npmjs.org/@types/xml2js/-/xml2js-0.4.14.tgz",
- "integrity": "sha512-4YnrRemBShWRO2QjvUin8ESA41rH+9nQGLUGZV/1IDhi3SL9OhdpNC/MrulTWuptXKwhx/aDxE7toV0f/ypIXQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1927,8 +1147,6 @@
},
"node_modules/@types/yauzl": {
"version": "2.10.3",
- "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz",
- "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==",
"dev": true,
"license": "MIT",
"optional": true,
@@ -1938,8 +1156,6 @@
},
"node_modules/@typescript-eslint/eslint-plugin": {
"version": "8.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.41.0.tgz",
- "integrity": "sha512-8fz6oa6wEKZrhXWro/S3n2eRJqlRcIa6SlDh59FXJ5Wp5XRZ8B9ixpJDcjadHq47hMx0u+HW6SNa6LjJQ6NLtw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1968,8 +1184,6 @@
},
"node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": {
"version": "7.0.5",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz",
- "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1978,8 +1192,6 @@
},
"node_modules/@typescript-eslint/parser": {
"version": "8.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.41.0.tgz",
- "integrity": "sha512-gTtSdWX9xiMPA/7MV9STjJOOYtWwIJIYxkQxnSV1U3xcE+mnJSH3f6zI0RYP+ew66WSlZ5ed+h0VCxsvdC1jJg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2003,8 +1215,6 @@
},
"node_modules/@typescript-eslint/project-service": {
"version": "8.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.41.0.tgz",
- "integrity": "sha512-b8V9SdGBQzQdjJ/IO3eDifGpDBJfvrNTp2QD9P2BeqWTGrRibgfgIlBSw6z3b6R7dPzg752tOs4u/7yCLxksSQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2025,8 +1235,6 @@
},
"node_modules/@typescript-eslint/scope-manager": {
"version": "8.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.41.0.tgz",
- "integrity": "sha512-n6m05bXn/Cd6DZDGyrpXrELCPVaTnLdPToyhBoFkLIMznRUQUEQdSp96s/pcWSQdqOhrgR1mzJ+yItK7T+WPMQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2043,8 +1251,6 @@
},
"node_modules/@typescript-eslint/tsconfig-utils": {
"version": "8.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.41.0.tgz",
- "integrity": "sha512-TDhxYFPUYRFxFhuU5hTIJk+auzM/wKvWgoNYOPcOf6i4ReYlOoYN8q1dV5kOTjNQNJgzWN3TUUQMtlLOcUgdUw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2060,8 +1266,6 @@
},
"node_modules/@typescript-eslint/type-utils": {
"version": "8.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.41.0.tgz",
- "integrity": "sha512-63qt1h91vg3KsjVVonFJWjgSK7pZHSQFKH6uwqxAH9bBrsyRhO6ONoKyXxyVBzG1lJnFAJcKAcxLS54N1ee1OQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2085,8 +1289,6 @@
},
"node_modules/@typescript-eslint/types": {
"version": "8.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.41.0.tgz",
- "integrity": "sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2099,8 +1301,6 @@
},
"node_modules/@typescript-eslint/typescript-estree": {
"version": "8.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.41.0.tgz",
- "integrity": "sha512-D43UwUYJmGhuwHfY7MtNKRZMmfd8+p/eNSfFe6tH5mbVDto+VQCayeAt35rOx3Cs6wxD16DQtIKw/YXxt5E0UQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2128,8 +1328,6 @@
},
"node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {
"version": "2.0.2",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
- "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2138,8 +1336,6 @@
},
"node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {
"version": "9.0.5",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
- "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -2154,8 +1350,6 @@
},
"node_modules/@typescript-eslint/typescript-estree/node_modules/semver": {
"version": "7.7.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
- "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
"dev": true,
"license": "ISC",
"bin": {
@@ -2167,8 +1361,6 @@
},
"node_modules/@typescript-eslint/utils": {
"version": "8.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.41.0.tgz",
- "integrity": "sha512-udbCVstxZ5jiPIXrdH+BZWnPatjlYwJuJkDA4Tbo3WyYLh8NvB+h/bKeSZHDOFKfphsZYJQqaFtLeXEqurQn1A==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2191,8 +1383,6 @@
},
"node_modules/@typescript-eslint/visitor-keys": {
"version": "8.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.41.0.tgz",
- "integrity": "sha512-+GeGMebMCy0elMNg67LRNoVnUFPIm37iu5CmHESVx56/9Jsfdpsvbv605DQ81Pi/x11IdKUsS5nzgTYbCQU9fg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2209,8 +1399,6 @@
},
"node_modules/@vitejs/plugin-basic-ssl": {
"version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@vitejs/plugin-basic-ssl/-/plugin-basic-ssl-1.2.0.tgz",
- "integrity": "sha512-mkQnxTkcldAzIsomk1UuLfAu9n+kpQ3JbHcpCp7d2Oo6ITtji8pHS3QToOWjhPFvNQSnhlkAjmGbhv2QvwO/7Q==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2222,8 +1410,6 @@
},
"node_modules/@vitejs/plugin-react": {
"version": "4.3.4",
- "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.3.4.tgz",
- "integrity": "sha512-SCCPBJtYLdE8PX/7ZQAs1QAZ8Jqwih+0VBLum1EGqmCCQal+MIUqLCzj3ZUy8ufbC0cAM4LRlSTm7IQJwWT4ug==",
"license": "MIT",
"dependencies": {
"@babel/core": "^7.26.0",
@@ -2241,8 +1427,6 @@
},
"node_modules/@vitejs/plugin-vue": {
"version": "5.2.1",
- "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.2.1.tgz",
- "integrity": "sha512-cxh314tzaWwOLqVes2gnnCtvBDcM1UMdn+iFR+UjAn411dPT3tOmqrJjbMd7koZpMAmBM/GqeV4n9ge7JSiJJQ==",
"license": "MIT",
"engines": {
"node": "^18.0.0 || >=20.0.0"
@@ -2254,8 +1438,6 @@
},
"node_modules/@vue/compiler-core": {
"version": "3.5.13",
- "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.13.tgz",
- "integrity": "sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==",
"license": "MIT",
"peer": true,
"dependencies": {
@@ -2268,15 +1450,11 @@
},
"node_modules/@vue/compiler-core/node_modules/estree-walker": {
"version": "2.0.2",
- "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
- "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
"license": "MIT",
"peer": true
},
"node_modules/@vue/compiler-dom": {
"version": "3.5.13",
- "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.13.tgz",
- "integrity": "sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==",
"license": "MIT",
"peer": true,
"dependencies": {
@@ -2286,8 +1464,6 @@
},
"node_modules/@vue/compiler-sfc": {
"version": "3.5.13",
- "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.13.tgz",
- "integrity": "sha512-6VdaljMpD82w6c2749Zhf5T9u5uLBWKnVue6XWxprDobftnletJ8+oel7sexFfM3qIxNmVE7LSFGTpv6obNyaQ==",
"license": "MIT",
"peer": true,
"dependencies": {
@@ -2304,15 +1480,11 @@
},
"node_modules/@vue/compiler-sfc/node_modules/estree-walker": {
"version": "2.0.2",
- "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
- "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
"license": "MIT",
"peer": true
},
"node_modules/@vue/compiler-ssr": {
"version": "3.5.13",
- "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.13.tgz",
- "integrity": "sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==",
"license": "MIT",
"peer": true,
"dependencies": {
@@ -2322,8 +1494,6 @@
},
"node_modules/@vue/reactivity": {
"version": "3.5.13",
- "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.13.tgz",
- "integrity": "sha512-NaCwtw8o48B9I6L1zl2p41OHo/2Z4wqYGGIK1Khu5T7yxrn+ATOixn/Udn2m+6kZKB/J7cuT9DbWWhRxqixACg==",
"license": "MIT",
"peer": true,
"dependencies": {
@@ -2332,8 +1502,6 @@
},
"node_modules/@vue/runtime-core": {
"version": "3.5.13",
- "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.13.tgz",
- "integrity": "sha512-Fj4YRQ3Az0WTZw1sFe+QDb0aXCerigEpw418pw1HBUKFtnQHWzwojaukAs2X/c9DQz4MQ4bsXTGlcpGxU/RCIw==",
"license": "MIT",
"peer": true,
"dependencies": {
@@ -2343,8 +1511,6 @@
},
"node_modules/@vue/runtime-dom": {
"version": "3.5.13",
- "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.13.tgz",
- "integrity": "sha512-dLaj94s93NYLqjLiyFzVs9X6dWhTdAlEAciC3Moq7gzAc13VJUdCnjjRurNM6uTLFATRHexHCTu/Xp3eW6yoog==",
"license": "MIT",
"peer": true,
"dependencies": {
@@ -2356,8 +1522,6 @@
},
"node_modules/@vue/server-renderer": {
"version": "3.5.13",
- "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.13.tgz",
- "integrity": "sha512-wAi4IRJV/2SAW3htkTlB+dHeRmpTiVIK1OGLWV1yeStVSebSQQOwGwIq0D3ZIoBj2C2qpgz5+vX9iEBkTdk5YA==",
"license": "MIT",
"peer": true,
"dependencies": {
@@ -2370,15 +1534,11 @@
},
"node_modules/@vue/shared": {
"version": "3.5.13",
- "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.13.tgz",
- "integrity": "sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==",
"license": "MIT",
"peer": true
},
"node_modules/@zip.js/zip.js": {
"version": "2.7.57",
- "resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.7.57.tgz",
- "integrity": "sha512-BtonQ1/jDnGiMed6OkV6rZYW78gLmLswkHOzyMrMb+CAR7CZO8phOHO6c2qw6qb1g1betN7kwEHhhZk30dv+NA==",
"dev": true,
"license": "BSD-3-Clause",
"engines": {
@@ -2389,15 +1549,11 @@
},
"node_modules/abbrev": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
- "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
"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==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2410,8 +1566,6 @@
},
"node_modules/acorn": {
"version": "8.15.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
- "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
"license": "MIT",
"bin": {
"acorn": "bin/acorn"
@@ -2422,8 +1576,6 @@
},
"node_modules/acorn-jsx": {
"version": "5.3.2",
- "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
- "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
"dev": true,
"license": "MIT",
"peerDependencies": {
@@ -2432,8 +1584,6 @@
},
"node_modules/ajv": {
"version": "6.12.6",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
- "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2449,8 +1599,6 @@
},
"node_modules/ansi-regex": {
"version": "5.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2459,8 +1607,6 @@
},
"node_modules/ansi-styles": {
"version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2475,8 +1621,6 @@
},
"node_modules/anymatch": {
"version": "3.1.3",
- "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
- "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -2489,8 +1633,6 @@
},
"node_modules/anymatch/node_modules/picomatch": {
"version": "2.3.1",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2502,15 +1644,11 @@
},
"node_modules/argparse": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
- "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
"dev": true,
"license": "Python-2.0"
},
"node_modules/aria-query": {
"version": "5.3.2",
- "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz",
- "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==",
"license": "Apache-2.0",
"engines": {
"node": ">= 0.4"
@@ -2518,8 +1656,6 @@
},
"node_modules/array-buffer-byte-length": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz",
- "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2535,8 +1671,6 @@
},
"node_modules/array-find-index": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
- "integrity": "sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2545,8 +1679,6 @@
},
"node_modules/array-includes": {
"version": "3.1.9",
- "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.9.tgz",
- "integrity": "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2568,8 +1700,6 @@
},
"node_modules/array.prototype.findlast": {
"version": "1.2.5",
- "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz",
- "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2589,8 +1719,6 @@
},
"node_modules/array.prototype.findlastindex": {
"version": "1.2.6",
- "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz",
- "integrity": "sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2611,8 +1739,6 @@
},
"node_modules/array.prototype.flat": {
"version": "1.3.3",
- "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz",
- "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2630,8 +1756,6 @@
},
"node_modules/array.prototype.flatmap": {
"version": "1.3.3",
- "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz",
- "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2649,8 +1773,6 @@
},
"node_modules/array.prototype.tosorted": {
"version": "1.1.4",
- "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz",
- "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2666,8 +1788,6 @@
},
"node_modules/arraybuffer.prototype.slice": {
"version": "1.0.4",
- "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz",
- "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2688,15 +1808,11 @@
},
"node_modules/asap": {
"version": "2.0.6",
- "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
- "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==",
"dev": true,
"license": "MIT"
},
"node_modules/async-function": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz",
- "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2705,8 +1821,6 @@
},
"node_modules/available-typed-arrays": {
"version": "1.0.7",
- "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz",
- "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2721,8 +1835,6 @@
},
"node_modules/axobject-query": {
"version": "4.1.0",
- "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz",
- "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==",
"license": "Apache-2.0",
"engines": {
"node": ">= 0.4"
@@ -2730,22 +1842,16 @@
},
"node_modules/balanced-match": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
- "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
"dev": true,
"license": "MIT"
},
"node_modules/before-after-hook": {
"version": "2.2.3",
- "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
- "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==",
"dev": true,
"license": "Apache-2.0"
},
"node_modules/binary-extensions": {
"version": "2.3.0",
- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
- "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2757,8 +1863,6 @@
},
"node_modules/body-parser": {
"version": "2.2.0",
- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.0.tgz",
- "integrity": "sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2778,17 +1882,12 @@
},
"node_modules/boolean": {
"version": "3.2.0",
- "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz",
- "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==",
- "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.",
"dev": true,
"license": "MIT",
"optional": true
},
"node_modules/brace-expansion": {
"version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2798,8 +1897,6 @@
},
"node_modules/braces": {
"version": "3.0.3",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
- "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2811,8 +1908,6 @@
},
"node_modules/browserslist": {
"version": "4.24.4",
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz",
- "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==",
"funding": [
{
"type": "opencollective",
@@ -2843,8 +1938,6 @@
},
"node_modules/buffer-crc32": {
"version": "0.2.13",
- "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
- "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2853,8 +1946,6 @@
},
"node_modules/bytes": {
"version": "3.1.2",
- "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
- "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2863,8 +1954,6 @@
},
"node_modules/cacheable-lookup": {
"version": "5.0.4",
- "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz",
- "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2873,8 +1962,6 @@
},
"node_modules/cacheable-request": {
"version": "7.0.4",
- "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz",
- "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2892,8 +1979,6 @@
},
"node_modules/call-bind": {
"version": "1.0.8",
- "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz",
- "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2911,8 +1996,6 @@
},
"node_modules/call-bind-apply-helpers": {
"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": {
@@ -2925,8 +2008,6 @@
},
"node_modules/call-bound": {
"version": "1.0.4",
- "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
- "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2942,8 +2023,6 @@
},
"node_modules/callsites": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
- "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2952,8 +2031,6 @@
},
"node_modules/caniuse-lite": {
"version": "1.0.30001700",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001700.tgz",
- "integrity": "sha512-2S6XIXwaE7K7erT8dY+kLQcpa5ms63XlRkMkReXjle+kf6c5g38vyMl+Z5y8dSxOFDhcFe+nxnn261PLxBSQsQ==",
"funding": [
{
"type": "opencollective",
@@ -2972,8 +2049,6 @@
},
"node_modules/chalk": {
"version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2989,8 +2064,6 @@
},
"node_modules/chalk/node_modules/supports-color": {
"version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3002,8 +2075,6 @@
},
"node_modules/chokidar": {
"version": "3.6.0",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
- "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3027,8 +2098,6 @@
},
"node_modules/chromium-bidi": {
"version": "7.2.0",
- "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-7.2.0.tgz",
- "integrity": "sha512-gREyhyBstermK+0RbcJLbFhcQctg92AGgDe/h/taMJEOLRdtSswBAO9KmvltFSQWgM2LrwWu5SIuEUbdm3JsyQ==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
@@ -3041,8 +2110,6 @@
},
"node_modules/cliui": {
"version": "7.0.4",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
- "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -3053,8 +2120,6 @@
},
"node_modules/clone-response": {
"version": "1.0.3",
- "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz",
- "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3066,8 +2131,6 @@
},
"node_modules/clsx": {
"version": "2.1.1",
- "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz",
- "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==",
"license": "MIT",
"engines": {
"node": ">=6"
@@ -3075,14 +2138,10 @@
},
"node_modules/codemirror": {
"version": "5.65.18",
- "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.18.tgz",
- "integrity": "sha512-Gaz4gHnkbHMGgahNt3CA5HBk5lLQBqmD/pBgeB4kQU6OedZmqMBjlRF0LSrp2tJ4wlLNPm2FfaUd1pDy0mdlpA==",
"license": "MIT"
},
"node_modules/color-convert": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3094,15 +2153,11 @@
},
"node_modules/color-name": {
"version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"license": "MIT"
},
"node_modules/colors": {
"version": "1.4.0",
- "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
- "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -3111,15 +2166,11 @@
},
"node_modules/concat-map": {
"version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
"dev": true,
"license": "MIT"
},
"node_modules/concurrently": {
"version": "6.5.1",
- "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-6.5.1.tgz",
- "integrity": "sha512-FlSwNpGjWQfRwPLXvJ/OgysbBxPkWpiVjy1042b0U7on7S7qwwMIILRj7WTN1mTgqa582bG6NFuScOoh6Zgdag==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3141,8 +2192,6 @@
},
"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==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3154,8 +2203,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==",
"dev": true,
"license": "MIT",
"engines": {
@@ -3164,14 +2211,10 @@
},
"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.2",
- "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
- "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
"dev": true,
"license": "MIT",
"engines": {
@@ -3180,8 +2223,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==",
"dev": true,
"license": "MIT",
"engines": {
@@ -3190,8 +2231,6 @@
},
"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==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3204,8 +2243,6 @@
},
"node_modules/cross-env": {
"version": "7.0.3",
- "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz",
- "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3223,8 +2260,6 @@
},
"node_modules/cross-spawn": {
"version": "7.0.6",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
- "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3238,14 +2273,10 @@
},
"node_modules/csstype": {
"version": "3.1.3",
- "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
- "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
"license": "MIT"
},
"node_modules/data-view-buffer": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz",
- "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3262,8 +2293,6 @@
},
"node_modules/data-view-byte-length": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz",
- "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3280,8 +2309,6 @@
},
"node_modules/data-view-byte-offset": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz",
- "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3298,8 +2325,6 @@
},
"node_modules/date-fns": {
"version": "2.30.0",
- "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz",
- "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3315,8 +2340,6 @@
},
"node_modules/debug": {
"version": "4.4.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",
- "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==",
"license": "MIT",
"dependencies": {
"ms": "^2.1.3"
@@ -3332,9 +2355,6 @@
},
"node_modules/debuglog": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz",
- "integrity": "sha512-syBZ+rnAK3EgMsH2aYEOLUW7mZSY9Gb+0wUMCFsZvcmiz+HigA0LOcq/HoQqVuGG+EKykunc7QG2bzrponfaSw==",
- "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.",
"dev": true,
"license": "MIT",
"engines": {
@@ -3343,8 +2363,6 @@
},
"node_modules/decompress-response": {
"version": "6.0.0",
- "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
- "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3359,8 +2377,6 @@
},
"node_modules/decompress-response/node_modules/mimic-response": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
- "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -3372,15 +2388,11 @@
},
"node_modules/deep-is": {
"version": "0.1.4",
- "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
- "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
"dev": true,
"license": "MIT"
},
"node_modules/deepmerge": {
"version": "4.3.1",
- "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
- "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
@@ -3388,8 +2400,6 @@
},
"node_modules/defer-to-connect": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz",
- "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -3398,8 +2408,6 @@
},
"node_modules/define-data-property": {
"version": "1.1.4",
- "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
- "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3416,8 +2424,6 @@
},
"node_modules/define-properties": {
"version": "1.2.1",
- "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz",
- "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3434,8 +2440,6 @@
},
"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==",
"dev": true,
"license": "MIT",
"engines": {
@@ -3444,31 +2448,23 @@
},
"node_modules/deprecation": {
"version": "2.3.1",
- "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
- "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==",
"dev": true,
"license": "ISC"
},
"node_modules/detect-node": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz",
- "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==",
"dev": true,
"license": "MIT",
"optional": true
},
"node_modules/devtools-protocol": {
"version": "0.0.1421213",
- "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1421213.tgz",
- "integrity": "sha512-E0JrRYeXiTZXJwFlJ0j8wz8TmM+VwCv128JaSyCEgTmyE54QE/GDhT4w6kS1m+nFKmulHWWrbrO2AHexZgcxFQ==",
"dev": true,
"license": "BSD-3-Clause",
"peer": true
},
"node_modules/dezalgo": {
"version": "1.0.4",
- "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz",
- "integrity": "sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -3478,8 +2474,6 @@
},
"node_modules/doctrine": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
- "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
@@ -3491,8 +2485,6 @@
},
"node_modules/dotenv": {
"version": "16.5.0",
- "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.5.0.tgz",
- "integrity": "sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==",
"dev": true,
"license": "BSD-2-Clause",
"engines": {
@@ -3504,8 +2496,6 @@
},
"node_modules/dunder-proto": {
"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": {
@@ -3519,15 +2509,11 @@
},
"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==",
"dev": true,
"license": "MIT"
},
"node_modules/electron": {
"version": "30.5.1",
- "resolved": "https://registry.npmjs.org/electron/-/electron-30.5.1.tgz",
- "integrity": "sha512-AhL7+mZ8Lg14iaNfoYTkXQ2qee8mmsQyllKdqxlpv/zrKgfxz6jNVtcRRbQtLxtF8yzcImWdfTQROpYiPumdbw==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
@@ -3545,14 +2531,10 @@
},
"node_modules/electron-to-chromium": {
"version": "1.5.102",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.102.tgz",
- "integrity": "sha512-eHhqaja8tE/FNpIiBrvBjFV/SSKpyWHLvxuR9dPTdo+3V9ppdLmFB7ZZQ98qNovcngPLYIz0oOBF9P0FfZef5Q==",
"license": "ISC"
},
"node_modules/electron/node_modules/@types/node": {
"version": "20.17.19",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.19.tgz",
- "integrity": "sha512-LEwC7o1ifqg/6r2gn9Dns0f1rhK+fPFDoMiceTJ6kWmVk6bgXBI/9IOWfVan4WiAavK9pIVWdX0/e3J+eEUh5A==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3561,22 +2543,16 @@
},
"node_modules/electron/node_modules/undici-types": {
"version": "6.19.8",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
- "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true,
"license": "MIT"
},
"node_modules/emoji-regex": {
"version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"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==",
"dev": true,
"license": "MIT",
"engines": {
@@ -3585,8 +2561,6 @@
},
"node_modules/end-of-stream": {
"version": "1.4.4",
- "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
- "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3595,8 +2569,6 @@
},
"node_modules/entities": {
"version": "4.5.0",
- "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
- "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
"license": "BSD-2-Clause",
"peer": true,
"engines": {
@@ -3608,8 +2580,6 @@
},
"node_modules/env-paths": {
"version": "2.2.1",
- "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",
- "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==",
"dev": true,
"license": "MIT",
"engines": {
@@ -3618,8 +2588,6 @@
},
"node_modules/es-abstract": {
"version": "1.24.0",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.0.tgz",
- "integrity": "sha512-WSzPgsdLtTcQwm4CROfS5ju2Wa1QQcVeT37jFjYzdFz1r9ahadC8B8/a4qxJxM+09F18iumCdRmlr96ZYkQvEg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3687,8 +2655,6 @@
},
"node_modules/es-define-property": {
"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": {
@@ -3697,8 +2663,6 @@
},
"node_modules/es-errors": {
"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": {
@@ -3707,8 +2671,6 @@
},
"node_modules/es-iterator-helpers": {
"version": "1.2.1",
- "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.2.1.tgz",
- "integrity": "sha512-uDn+FE1yrDzyC0pCo961B2IHbdM8y/ACZsKD4dG6WqrjV53BADjwa7D+1aom2rsNVfLyDgU/eigvlJGJ08OQ4w==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3735,8 +2697,6 @@
},
"node_modules/es-object-atoms": {
"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": {
@@ -3748,8 +2708,6 @@
},
"node_modules/es-set-tostringtag": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
- "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3764,8 +2722,6 @@
},
"node_modules/es-shim-unscopables": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz",
- "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3777,8 +2733,6 @@
},
"node_modules/es-to-primitive": {
"version": "1.3.0",
- "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz",
- "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3795,16 +2749,12 @@
},
"node_modules/es6-error": {
"version": "4.1.1",
- "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz",
- "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==",
"dev": true,
"license": "MIT",
"optional": true
},
"node_modules/esbuild": {
"version": "0.25.0",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.0.tgz",
- "integrity": "sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==",
"hasInstallScript": true,
"license": "MIT",
"bin": {
@@ -3843,8 +2793,6 @@
},
"node_modules/escalade": {
"version": "3.2.0",
- "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
- "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
"license": "MIT",
"engines": {
"node": ">=6"
@@ -3852,15 +2800,11 @@
},
"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==",
"dev": true,
"license": "MIT"
},
"node_modules/escape-string-regexp": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
- "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -3872,8 +2816,6 @@
},
"node_modules/eslint": {
"version": "9.34.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.34.0.tgz",
- "integrity": "sha512-RNCHRX5EwdrESy3Jc9o8ie8Bog+PeYvvSR8sDGoZxNFTvZ4dlxUB3WzQ3bQMztFrSRODGrLLj8g6OFuGY/aiQg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3933,8 +2875,6 @@
},
"node_modules/eslint-import-resolver-node": {
"version": "0.3.9",
- "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz",
- "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3945,8 +2885,6 @@
},
"node_modules/eslint-import-resolver-node/node_modules/debug": {
"version": "3.2.7",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
- "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3955,8 +2893,6 @@
},
"node_modules/eslint-module-utils": {
"version": "2.12.1",
- "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.1.tgz",
- "integrity": "sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3973,8 +2909,6 @@
},
"node_modules/eslint-module-utils/node_modules/debug": {
"version": "3.2.7",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
- "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3983,8 +2917,6 @@
},
"node_modules/eslint-plugin-import": {
"version": "2.32.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz",
- "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4017,8 +2949,6 @@
},
"node_modules/eslint-plugin-import/node_modules/debug": {
"version": "3.2.7",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
- "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4027,8 +2957,6 @@
},
"node_modules/eslint-plugin-notice": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-notice/-/eslint-plugin-notice-1.0.0.tgz",
- "integrity": "sha512-M3VLQMZzZpvfTZ/vy9FmClIKq5rLBbQpM0KgfLZPJPrVXpmJYeobmmb+lfJzHWdNm8PWwvw8KlafQWo2N9xx1Q==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4042,8 +2970,6 @@
},
"node_modules/eslint-plugin-react": {
"version": "7.37.5",
- "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz",
- "integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4075,8 +3001,6 @@
},
"node_modules/eslint-plugin-react-hooks": {
"version": "5.2.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.2.0.tgz",
- "integrity": "sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -4088,8 +3012,6 @@
},
"node_modules/eslint-plugin-react/node_modules/resolve": {
"version": "2.0.0-next.5",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz",
- "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4106,8 +3028,6 @@
},
"node_modules/eslint-scope": {
"version": "8.4.0",
- "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz",
- "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
@@ -4123,8 +3043,6 @@
},
"node_modules/eslint-visitor-keys": {
"version": "4.2.1",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",
- "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
"dev": true,
"license": "Apache-2.0",
"engines": {
@@ -4136,8 +3054,6 @@
},
"node_modules/eslint/node_modules/glob-parent": {
"version": "6.0.2",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
- "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -4149,14 +3065,10 @@
},
"node_modules/esm-env": {
"version": "1.2.2",
- "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.2.2.tgz",
- "integrity": "sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==",
"license": "MIT"
},
"node_modules/espree": {
"version": "10.4.0",
- "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz",
- "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
@@ -4173,8 +3085,6 @@
},
"node_modules/esquery": {
"version": "1.6.0",
- "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz",
- "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==",
"dev": true,
"license": "BSD-3-Clause",
"dependencies": {
@@ -4186,8 +3096,6 @@
},
"node_modules/esrap": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/esrap/-/esrap-2.1.0.tgz",
- "integrity": "sha512-yzmPNpl7TBbMRC5Lj2JlJZNPml0tzqoqP5B1JXycNUwtqma9AKCO0M2wHrdgsHcy1WRW7S9rJknAMtByg3usgA==",
"license": "MIT",
"dependencies": {
"@jridgewell/sourcemap-codec": "^1.4.15"
@@ -4195,8 +3103,6 @@
},
"node_modules/esrecurse": {
"version": "4.3.0",
- "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
- "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
@@ -4208,8 +3114,6 @@
},
"node_modules/estraverse": {
"version": "5.3.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
- "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
"dev": true,
"license": "BSD-2-Clause",
"engines": {
@@ -4218,8 +3122,6 @@
},
"node_modules/esutils": {
"version": "2.0.3",
- "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
- "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
"dev": true,
"license": "BSD-2-Clause",
"engines": {
@@ -4228,8 +3130,6 @@
},
"node_modules/etag": {
"version": "1.8.1",
- "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
- "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -4238,8 +3138,6 @@
},
"node_modules/eventsource": {
"version": "3.0.7",
- "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz",
- "integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4251,8 +3149,6 @@
},
"node_modules/eventsource-parser": {
"version": "3.0.3",
- "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.3.tgz",
- "integrity": "sha512-nVpZkTMM9rF6AQ9gPJpFsNAMt48wIzB5TQgiTLdHiuO8XEDhUgZEhqKlZWXbIzo9VmJ/HvysHqEaVeD5v9TPvA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -4261,8 +3157,6 @@
},
"node_modules/express": {
"version": "5.1.0",
- "resolved": "https://registry.npmjs.org/express/-/express-5.1.0.tgz",
- "integrity": "sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4304,8 +3198,6 @@
},
"node_modules/express-rate-limit": {
"version": "7.5.1",
- "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.5.1.tgz",
- "integrity": "sha512-7iN8iPMDzOMHPUYllBEsQdWVB6fPDMPqwjBaFrgr4Jgr/+okjvzAy+UHlYYL/Vs0OsOrMkwS6PJDkFlJwoxUnw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -4320,8 +3212,6 @@
},
"node_modules/extract-zip": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",
- "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
@@ -4341,15 +3231,11 @@
},
"node_modules/fast-deep-equal": {
"version": "3.1.3",
- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
- "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
"dev": true,
"license": "MIT"
},
"node_modules/fast-glob": {
"version": "3.3.3",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz",
- "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4365,22 +3251,16 @@
},
"node_modules/fast-json-stable-stringify": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
- "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
"dev": true,
"license": "MIT"
},
"node_modules/fast-levenshtein": {
"version": "2.0.6",
- "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
- "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
"dev": true,
"license": "MIT"
},
"node_modules/fastq": {
"version": "1.19.1",
- "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz",
- "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -4389,8 +3269,6 @@
},
"node_modules/fd-slicer": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
- "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4399,8 +3277,6 @@
},
"node_modules/fdir": {
"version": "6.4.6",
- "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz",
- "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==",
"license": "MIT",
"peerDependencies": {
"picomatch": "^3 || ^4"
@@ -4413,8 +3289,6 @@
},
"node_modules/file-entry-cache": {
"version": "8.0.0",
- "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz",
- "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4426,8 +3300,6 @@
},
"node_modules/fill-range": {
"version": "7.1.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
- "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4439,8 +3311,6 @@
},
"node_modules/finalhandler": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.0.tgz",
- "integrity": "sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4457,15 +3327,11 @@
},
"node_modules/find-root": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz",
- "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==",
"dev": true,
"license": "MIT"
},
"node_modules/find-up": {
"version": "5.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
- "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4481,8 +3347,6 @@
},
"node_modules/flat-cache": {
"version": "4.0.1",
- "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz",
- "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4495,15 +3359,11 @@
},
"node_modules/flatted": {
"version": "3.3.3",
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz",
- "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==",
"dev": true,
"license": "ISC"
},
"node_modules/for-each": {
"version": "0.3.5",
- "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz",
- "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4518,8 +3378,6 @@
},
"node_modules/formidable": {
"version": "2.1.2",
- "resolved": "https://registry.npmjs.org/formidable/-/formidable-2.1.2.tgz",
- "integrity": "sha512-CM3GuJ57US06mlpQ47YcunuUZ9jpm8Vx+P2CGt2j7HpgkKZO/DJYQ0Bobim8G6PFQmK5lOqOOdUXboU+h73A4g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4534,8 +3392,6 @@
},
"node_modules/forwarded": {
"version": "0.2.0",
- "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
- "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
"dev": true,
"license": "MIT",
"engines": {
@@ -4544,8 +3400,6 @@
},
"node_modules/fresh": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",
- "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",
"dev": true,
"license": "MIT",
"engines": {
@@ -4554,8 +3408,6 @@
},
"node_modules/fs-extra": {
"version": "8.1.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
- "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4569,15 +3421,13 @@
},
"node_modules/fs.realpath": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
"dev": true,
"license": "ISC"
},
"node_modules/fsevents": {
- "version": "2.3.3",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
- "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
+ "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"hasInstallScript": true,
"license": "MIT",
"optional": true,
@@ -4590,8 +3440,6 @@
},
"node_modules/function-bind": {
"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": {
@@ -4600,8 +3448,6 @@
},
"node_modules/function.prototype.name": {
"version": "1.1.8",
- "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz",
- "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4621,8 +3467,6 @@
},
"node_modules/functions-have-names": {
"version": "1.2.3",
- "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz",
- "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==",
"dev": true,
"license": "MIT",
"funding": {
@@ -4631,8 +3475,6 @@
},
"node_modules/gensync": {
"version": "1.0.0-beta.2",
- "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
- "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
"license": "MIT",
"engines": {
"node": ">=6.9.0"
@@ -4640,8 +3482,6 @@
},
"node_modules/get-caller-file": {
"version": "2.0.5",
- "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
- "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
"dev": true,
"license": "ISC",
"engines": {
@@ -4650,8 +3490,6 @@
},
"node_modules/get-intrinsic": {
"version": "1.3.0",
- "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
- "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4675,8 +3513,6 @@
},
"node_modules/get-proto": {
"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": {
@@ -4689,8 +3525,6 @@
},
"node_modules/get-stream": {
"version": "5.2.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
- "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4705,8 +3539,6 @@
},
"node_modules/get-symbol-description": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz",
- "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4723,9 +3555,6 @@
},
"node_modules/glob": {
"version": "7.2.3",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
- "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
- "deprecated": "Glob versions prior to v9 are no longer supported",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -4745,8 +3574,6 @@
},
"node_modules/glob-parent": {
"version": "5.1.2",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
- "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -4758,8 +3585,6 @@
},
"node_modules/global-agent": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-3.0.0.tgz",
- "integrity": "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==",
"dev": true,
"license": "BSD-3-Clause",
"optional": true,
@@ -4777,8 +3602,6 @@
},
"node_modules/global-agent/node_modules/semver": {
"version": "7.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
- "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
"dev": true,
"license": "ISC",
"optional": true,
@@ -4791,8 +3614,6 @@
},
"node_modules/globals": {
"version": "11.12.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
- "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
"license": "MIT",
"engines": {
"node": ">=4"
@@ -4800,8 +3621,6 @@
},
"node_modules/globalthis": {
"version": "1.0.4",
- "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz",
- "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4817,8 +3636,6 @@
},
"node_modules/gopd": {
"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": {
@@ -4830,8 +3647,6 @@
},
"node_modules/got": {
"version": "11.8.6",
- "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz",
- "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4856,22 +3671,16 @@
},
"node_modules/graceful-fs": {
"version": "4.2.11",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
- "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
"dev": true,
"license": "ISC"
},
"node_modules/graphemer": {
"version": "1.4.0",
- "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz",
- "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
"dev": true,
"license": "MIT"
},
"node_modules/graphql": {
"version": "16.10.0",
- "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.10.0.tgz",
- "integrity": "sha512-AjqGKbDGUFRKIRCP9tCKiIGHyriz2oHEbPIbEtcSLSs4YjReZOIPQQWek4+6hjw62H9QShXHyaGivGiYVLeYFQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -4880,8 +3689,6 @@
},
"node_modules/graphql-tag": {
"version": "2.12.6",
- "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.6.tgz",
- "integrity": "sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4896,15 +3703,11 @@
},
"node_modules/graphql-tag/node_modules/tslib": {
"version": "2.8.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
- "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
"dev": true,
"license": "0BSD"
},
"node_modules/has-bigints": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz",
- "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -4916,8 +3719,6 @@
},
"node_modules/has-flag": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -4926,8 +3727,6 @@
},
"node_modules/has-property-descriptors": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
- "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4939,8 +3738,6 @@
},
"node_modules/has-proto": {
"version": "1.2.0",
- "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz",
- "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4955,8 +3752,6 @@
},
"node_modules/has-symbols": {
"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": {
@@ -4968,8 +3763,6 @@
},
"node_modules/has-tostringtag": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
- "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4984,8 +3777,6 @@
},
"node_modules/hasown": {
"version": "2.0.2",
- "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
- "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4997,8 +3788,6 @@
},
"node_modules/hexoid": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/hexoid/-/hexoid-1.0.0.tgz",
- "integrity": "sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g==",
"dev": true,
"license": "MIT",
"engines": {
@@ -5007,8 +3796,6 @@
},
"node_modules/hosted-git-info": {
"version": "2.8.9",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
- "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
"dev": true,
"license": "ISC"
},
@@ -5018,15 +3805,11 @@
},
"node_modules/http-cache-semantics": {
"version": "4.1.1",
- "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
- "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==",
"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==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5042,8 +3825,6 @@
},
"node_modules/http-errors/node_modules/statuses": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
- "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -5052,8 +3833,6 @@
},
"node_modules/http2-wrapper": {
"version": "1.0.3",
- "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz",
- "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5066,8 +3845,6 @@
},
"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==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5079,8 +3856,6 @@
},
"node_modules/ignore": {
"version": "5.3.2",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
- "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
"dev": true,
"license": "MIT",
"engines": {
@@ -5089,15 +3864,11 @@
},
"node_modules/immutable": {
"version": "4.3.7",
- "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz",
- "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==",
"dev": true,
"license": "MIT"
},
"node_modules/import-fresh": {
"version": "3.3.1",
- "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz",
- "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5113,8 +3884,6 @@
},
"node_modules/imurmurhash": {
"version": "0.1.4",
- "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
- "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -5123,9 +3892,6 @@
},
"node_modules/inflight": {
"version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
- "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -5135,15 +3901,11 @@
},
"node_modules/inherits": {
"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": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz",
- "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5157,8 +3919,6 @@
},
"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==",
"dev": true,
"license": "MIT",
"engines": {
@@ -5167,8 +3927,6 @@
},
"node_modules/is-array-buffer": {
"version": "3.0.5",
- "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz",
- "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5185,8 +3943,6 @@
},
"node_modules/is-async-function": {
"version": "2.1.1",
- "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz",
- "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5205,8 +3961,6 @@
},
"node_modules/is-bigint": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz",
- "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5221,8 +3975,6 @@
},
"node_modules/is-binary-path": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
- "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5234,8 +3986,6 @@
},
"node_modules/is-boolean-object": {
"version": "1.2.2",
- "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz",
- "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5251,8 +4001,6 @@
},
"node_modules/is-callable": {
"version": "1.2.7",
- "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",
- "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -5264,8 +4012,6 @@
},
"node_modules/is-core-module": {
"version": "2.16.1",
- "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz",
- "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5280,8 +4026,6 @@
},
"node_modules/is-data-view": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz",
- "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5298,8 +4042,6 @@
},
"node_modules/is-date-object": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz",
- "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5315,8 +4057,6 @@
},
"node_modules/is-extglob": {
"version": "2.1.1",
- "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
- "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -5325,8 +4065,6 @@
},
"node_modules/is-finalizationregistry": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz",
- "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5341,8 +4079,6 @@
},
"node_modules/is-fullwidth-code-point": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -5351,8 +4087,6 @@
},
"node_modules/is-generator-function": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz",
- "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5370,8 +4104,6 @@
},
"node_modules/is-glob": {
"version": "4.0.3",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
- "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5383,8 +4115,6 @@
},
"node_modules/is-map": {
"version": "2.0.3",
- "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz",
- "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -5396,8 +4126,6 @@
},
"node_modules/is-negative-zero": {
"version": "2.0.3",
- "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz",
- "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -5409,8 +4137,6 @@
},
"node_modules/is-number": {
"version": "7.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
- "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true,
"license": "MIT",
"engines": {
@@ -5419,8 +4145,6 @@
},
"node_modules/is-number-object": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz",
- "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5436,15 +4160,11 @@
},
"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==",
"dev": true,
"license": "MIT"
},
"node_modules/is-reference": {
"version": "3.0.3",
- "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.3.tgz",
- "integrity": "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==",
"license": "MIT",
"dependencies": {
"@types/estree": "^1.0.6"
@@ -5452,8 +4172,6 @@
},
"node_modules/is-regex": {
"version": "1.2.1",
- "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz",
- "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5471,8 +4189,6 @@
},
"node_modules/is-set": {
"version": "2.0.3",
- "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz",
- "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -5484,8 +4200,6 @@
},
"node_modules/is-shared-array-buffer": {
"version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz",
- "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5500,8 +4214,6 @@
},
"node_modules/is-string": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz",
- "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5517,8 +4229,6 @@
},
"node_modules/is-symbol": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz",
- "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5535,8 +4245,6 @@
},
"node_modules/is-typed-array": {
"version": "1.1.15",
- "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz",
- "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5551,8 +4259,6 @@
},
"node_modules/is-weakmap": {
"version": "2.0.2",
- "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz",
- "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==",
"dev": true,
"license": "MIT",
"engines": {
@@ -5564,8 +4270,6 @@
},
"node_modules/is-weakref": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz",
- "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5580,8 +4284,6 @@
},
"node_modules/is-weakset": {
"version": "2.0.4",
- "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz",
- "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5597,22 +4299,16 @@
},
"node_modules/isarray": {
"version": "2.0.5",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
- "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
"dev": true,
"license": "MIT"
},
"node_modules/isexe": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
- "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
"dev": true,
"license": "ISC"
},
"node_modules/iterator.prototype": {
"version": "1.1.5",
- "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz",
- "integrity": "sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5629,14 +4325,10 @@
},
"node_modules/js-tokens": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
- "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
"license": "MIT"
},
"node_modules/js-yaml": {
"version": "4.1.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
- "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5648,8 +4340,6 @@
},
"node_modules/jsesc": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",
- "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==",
"license": "MIT",
"bin": {
"jsesc": "bin/jsesc"
@@ -5660,44 +4350,32 @@
},
"node_modules/json-buffer": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
- "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
"dev": true,
"license": "MIT"
},
"node_modules/json-parse-even-better-errors": {
"version": "2.3.1",
- "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
- "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
"dev": true,
"license": "MIT"
},
"node_modules/json-schema-traverse": {
"version": "0.4.1",
- "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
- "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
"dev": true,
"license": "MIT"
},
"node_modules/json-stable-stringify-without-jsonify": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
- "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
"dev": true,
"license": "MIT"
},
"node_modules/json-stringify-safe": {
"version": "5.0.1",
- "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
- "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==",
"dev": true,
"license": "ISC",
"optional": true
},
"node_modules/json5": {
"version": "2.2.3",
- "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
- "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
"license": "MIT",
"bin": {
"json5": "lib/cli.js"
@@ -5708,8 +4386,6 @@
},
"node_modules/jsonfile": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
- "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==",
"dev": true,
"license": "MIT",
"optionalDependencies": {
@@ -5718,8 +4394,6 @@
},
"node_modules/jsx-ast-utils": {
"version": "3.3.5",
- "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz",
- "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5734,8 +4408,6 @@
},
"node_modules/keyv": {
"version": "4.5.4",
- "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
- "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5744,8 +4416,6 @@
},
"node_modules/kleur": {
"version": "4.1.5",
- "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz",
- "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==",
"license": "MIT",
"engines": {
"node": ">=6"
@@ -5753,8 +4423,6 @@
},
"node_modules/levn": {
"version": "0.4.1",
- "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
- "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5767,8 +4435,6 @@
},
"node_modules/license-checker": {
"version": "25.0.1",
- "resolved": "https://registry.npmjs.org/license-checker/-/license-checker-25.0.1.tgz",
- "integrity": "sha512-mET5AIwl7MR2IAKYYoVBBpV0OnkKQ1xGj2IMMeEFIs42QAkEVjRtFZGWmQ28WeU7MP779iAgOaOy93Mn44mn6g==",
"dev": true,
"license": "BSD-3-Clause",
"dependencies": {
@@ -5789,8 +4455,6 @@
},
"node_modules/license-checker/node_modules/ansi-styles": {
"version": "3.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
- "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5802,8 +4466,6 @@
},
"node_modules/license-checker/node_modules/chalk": {
"version": "2.4.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
- "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5817,8 +4479,6 @@
},
"node_modules/license-checker/node_modules/color-convert": {
"version": "1.9.3",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
- "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5827,15 +4487,11 @@
},
"node_modules/license-checker/node_modules/color-name": {
"version": "1.1.3",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
- "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
"dev": true,
"license": "MIT"
},
"node_modules/license-checker/node_modules/debug": {
"version": "3.2.7",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
- "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5844,8 +4500,6 @@
},
"node_modules/license-checker/node_modules/escape-string-regexp": {
"version": "1.0.5",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -5854,8 +4508,6 @@
},
"node_modules/license-checker/node_modules/has-flag": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
- "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -5864,8 +4516,6 @@
},
"node_modules/license-checker/node_modules/semver": {
"version": "5.7.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
- "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true,
"license": "ISC",
"bin": {
@@ -5874,8 +4524,6 @@
},
"node_modules/license-checker/node_modules/supports-color": {
"version": "5.5.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
- "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5887,14 +4535,10 @@
},
"node_modules/locate-character": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz",
- "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==",
"license": "MIT"
},
"node_modules/locate-path": {
"version": "6.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
- "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5909,22 +4553,16 @@
},
"node_modules/lodash": {
"version": "4.17.21",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
- "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true,
"license": "MIT"
},
"node_modules/lodash.merge": {
"version": "4.6.2",
- "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
- "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
"dev": true,
"license": "MIT"
},
"node_modules/loose-envify": {
"version": "1.4.0",
- "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
- "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5936,8 +4574,6 @@
},
"node_modules/lowercase-keys": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz",
- "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -5946,8 +4582,6 @@
},
"node_modules/lru-cache": {
"version": "5.1.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
- "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
"license": "ISC",
"dependencies": {
"yallist": "^3.0.2"
@@ -5955,8 +4589,6 @@
},
"node_modules/magic-string": {
"version": "0.30.17",
- "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz",
- "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==",
"license": "MIT",
"dependencies": {
"@jridgewell/sourcemap-codec": "^1.5.0"
@@ -5964,8 +4596,6 @@
},
"node_modules/matcher": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",
- "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==",
"dev": true,
"license": "MIT",
"optional": true,
@@ -5978,8 +4608,6 @@
},
"node_modules/math-intrinsics": {
"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": {
@@ -5988,8 +4616,6 @@
},
"node_modules/media-typer": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",
- "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -5998,8 +4624,6 @@
},
"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==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6011,8 +4635,6 @@
},
"node_modules/merge2": {
"version": "1.4.1",
- "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
- "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6021,15 +4643,11 @@
},
"node_modules/metric-lcs": {
"version": "0.1.2",
- "resolved": "https://registry.npmjs.org/metric-lcs/-/metric-lcs-0.1.2.tgz",
- "integrity": "sha512-+TZ5dUDPKPJaU/rscTzxyN8ZkX7eAVLAiQU/e+YINleXPv03SCmJShaMT1If1liTH8OcmWXZs0CmzCBRBLcMpA==",
"dev": true,
"license": "MIT"
},
"node_modules/micromatch": {
"version": "4.0.8",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
- "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6042,8 +4660,6 @@
},
"node_modules/micromatch/node_modules/picomatch": {
"version": "2.3.1",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6055,8 +4671,6 @@
},
"node_modules/mime": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz",
- "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==",
"dev": true,
"license": "MIT",
"bin": {
@@ -6068,8 +4682,6 @@
},
"node_modules/mime-db": {
"version": "1.54.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",
- "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6078,8 +4690,6 @@
},
"node_modules/mime-types": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz",
- "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6091,8 +4701,6 @@
},
"node_modules/mimic-response": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz",
- "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6101,8 +4709,6 @@
},
"node_modules/minimatch": {
"version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -6114,8 +4720,6 @@
},
"node_modules/minimist": {
"version": "1.2.8",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
- "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
"dev": true,
"license": "MIT",
"funding": {
@@ -6124,15 +4728,11 @@
},
"node_modules/mitt": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz",
- "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==",
"dev": true,
"license": "MIT"
},
"node_modules/mkdirp": {
"version": "0.5.6",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
- "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6144,14 +4744,10 @@
},
"node_modules/ms": {
"version": "2.1.3",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"license": "MIT"
},
"node_modules/nanoid": {
"version": "3.3.11",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
- "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
"funding": [
{
"type": "github",
@@ -6168,15 +4764,11 @@
},
"node_modules/natural-compare": {
"version": "1.4.0",
- "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
- "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
"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==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6185,14 +4777,10 @@
},
"node_modules/node-releases": {
"version": "2.0.19",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz",
- "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==",
"license": "MIT"
},
"node_modules/node-stream-zip": {
"version": "1.15.0",
- "resolved": "https://registry.npmjs.org/node-stream-zip/-/node-stream-zip-1.15.0.tgz",
- "integrity": "sha512-LN4fydt9TqhZhThkZIVQnF9cwjU3qmUH9h78Mx/K7d3VvfRqqwthLwJEUOEL0QPZ0XQmNN7be5Ggit5+4dq3Bw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6205,8 +4793,6 @@
},
"node_modules/nopt": {
"version": "4.0.3",
- "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz",
- "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -6219,8 +4805,6 @@
},
"node_modules/normalize-package-data": {
"version": "2.5.0",
- "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
- "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
@@ -6232,8 +4816,6 @@
},
"node_modules/normalize-package-data/node_modules/semver": {
"version": "5.7.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
- "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true,
"license": "ISC",
"bin": {
@@ -6242,8 +4824,6 @@
},
"node_modules/normalize-path": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
- "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6252,8 +4832,6 @@
},
"node_modules/normalize-url": {
"version": "6.1.0",
- "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz",
- "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6265,15 +4843,11 @@
},
"node_modules/npm-normalize-package-bin": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz",
- "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==",
"dev": true,
"license": "ISC"
},
"node_modules/object-assign": {
"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": {
@@ -6282,8 +4856,6 @@
},
"node_modules/object-inspect": {
"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": {
@@ -6295,8 +4867,6 @@
},
"node_modules/object-keys": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
- "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6305,8 +4875,6 @@
},
"node_modules/object.assign": {
"version": "4.1.7",
- "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz",
- "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6326,8 +4894,6 @@
},
"node_modules/object.entries": {
"version": "1.1.9",
- "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz",
- "integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6342,8 +4908,6 @@
},
"node_modules/object.fromentries": {
"version": "2.0.8",
- "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz",
- "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6361,8 +4925,6 @@
},
"node_modules/object.groupby": {
"version": "1.0.3",
- "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz",
- "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6376,8 +4938,6 @@
},
"node_modules/object.values": {
"version": "1.2.1",
- "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz",
- "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6395,8 +4955,6 @@
},
"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==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6408,8 +4966,6 @@
},
"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": {
@@ -6418,8 +4974,6 @@
},
"node_modules/optionator": {
"version": "0.9.4",
- "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
- "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6436,8 +4990,6 @@
},
"node_modules/os-homedir": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
- "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6446,8 +4998,6 @@
},
"node_modules/os-tmpdir": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
- "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6456,9 +5006,6 @@
},
"node_modules/osenv": {
"version": "0.1.5",
- "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
- "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
- "deprecated": "This package is no longer supported.",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -6468,8 +5015,6 @@
},
"node_modules/own-keys": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz",
- "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6486,8 +5031,6 @@
},
"node_modules/p-cancelable": {
"version": "2.1.1",
- "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz",
- "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6496,8 +5039,6 @@
},
"node_modules/p-limit": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
- "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6512,8 +5053,6 @@
},
"node_modules/p-locate": {
"version": "5.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
- "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6526,10 +5065,19 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/p-map": {
+ "version": "7.0.3",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/parent-module": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
- "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6541,8 +5089,6 @@
},
"node_modules/parseurl": {
"version": "1.3.3",
- "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
- "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6551,8 +5097,6 @@
},
"node_modules/path-exists": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
- "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6561,8 +5105,6 @@
},
"node_modules/path-is-absolute": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6571,8 +5113,6 @@
},
"node_modules/path-key": {
"version": "3.1.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
- "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6581,15 +5121,11 @@
},
"node_modules/path-parse": {
"version": "1.0.7",
- "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
- "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
"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==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6598,21 +5134,15 @@
},
"node_modules/pend": {
"version": "1.2.0",
- "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
- "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==",
"dev": true,
"license": "MIT"
},
"node_modules/picocolors": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
- "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
"license": "ISC"
},
"node_modules/picomatch": {
"version": "4.0.3",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
- "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
"license": "MIT",
"engines": {
"node": ">=12"
@@ -6623,8 +5153,6 @@
},
"node_modules/pkce-challenge": {
"version": "5.0.0",
- "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.0.tgz",
- "integrity": "sha512-ueGLflrrnvwB3xuo/uGob5pd5FN7l0MsLf0Z87o/UQmRtwjvfylfc9MurIxRAWywCYTgrvpXBcqjV4OfCYGCIQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6653,8 +5181,6 @@
},
"node_modules/possible-typed-array-names": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz",
- "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6663,8 +5189,6 @@
},
"node_modules/postcss": {
"version": "8.5.6",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz",
- "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==",
"funding": [
{
"type": "opencollective",
@@ -6691,8 +5215,6 @@
},
"node_modules/prelude-ls": {
"version": "1.2.1",
- "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
- "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6701,8 +5223,6 @@
},
"node_modules/progress": {
"version": "2.0.3",
- "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
- "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6711,8 +5231,6 @@
},
"node_modules/prop-types": {
"version": "15.8.1",
- "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
- "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6723,8 +5241,6 @@
},
"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==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6737,8 +5253,6 @@
},
"node_modules/pump": {
"version": "3.0.2",
- "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz",
- "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6748,8 +5262,6 @@
},
"node_modules/punycode": {
"version": "2.3.1",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
- "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6758,8 +5270,6 @@
},
"node_modules/qs": {
"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": {
@@ -6774,8 +5284,6 @@
},
"node_modules/queue-microtask": {
"version": "1.2.3",
- "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
- "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
"dev": true,
"funding": [
{
@@ -6795,8 +5303,6 @@
},
"node_modules/quick-lru": {
"version": "5.1.1",
- "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
- "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6808,8 +5314,6 @@
},
"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==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6818,8 +5322,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==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6834,8 +5336,6 @@
},
"node_modules/react": {
"version": "18.3.1",
- "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",
- "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6847,8 +5347,6 @@
},
"node_modules/react-dom": {
"version": "18.3.1",
- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",
- "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6861,15 +5359,11 @@
},
"node_modules/react-is": {
"version": "16.13.1",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
- "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
"dev": true,
"license": "MIT"
},
"node_modules/react-refresh": {
"version": "0.14.2",
- "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz",
- "integrity": "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
@@ -6877,9 +5371,6 @@
},
"node_modules/read-installed": {
"version": "4.0.3",
- "resolved": "https://registry.npmjs.org/read-installed/-/read-installed-4.0.3.tgz",
- "integrity": "sha512-O03wg/IYuV/VtnK2h/KXEt9VIbMUFbk3ERG0Iu4FhLZw0EP0T9znqrYDGn6ncbEsXUFaUjiVAWXHzxwt3lhRPQ==",
- "deprecated": "This package is no longer supported.",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -6896,8 +5387,6 @@
},
"node_modules/read-installed/node_modules/semver": {
"version": "5.7.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
- "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true,
"license": "ISC",
"bin": {
@@ -6906,9 +5395,6 @@
},
"node_modules/read-package-json": {
"version": "2.1.2",
- "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.1.2.tgz",
- "integrity": "sha512-D1KmuLQr6ZSJS0tW8hf3WGpRlwszJOXZ3E8Yd/DNRaM5d+1wVRZdHlpGBLAuovjr28LbWvjpWkBHMxpRGGjzNA==",
- "deprecated": "This package is no longer supported. Please use @npmcli/package-json instead.",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -6920,9 +5406,6 @@
},
"node_modules/readdir-scoped-modules": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz",
- "integrity": "sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw==",
- "deprecated": "This functionality has been moved to @npmcli/fs",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -6934,8 +5417,6 @@
},
"node_modules/readdirp": {
"version": "3.6.0",
- "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
- "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6947,8 +5428,6 @@
},
"node_modules/readdirp/node_modules/picomatch": {
"version": "2.3.1",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6964,8 +5443,6 @@
},
"node_modules/reflect.getprototypeof": {
"version": "1.0.10",
- "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz",
- "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6987,15 +5464,11 @@
},
"node_modules/regenerator-runtime": {
"version": "0.14.1",
- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
- "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==",
"dev": true,
"license": "MIT"
},
"node_modules/regexp.prototype.flags": {
"version": "1.5.4",
- "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz",
- "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7015,8 +5488,6 @@
},
"node_modules/require-directory": {
"version": "2.1.1",
- "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
- "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
"dev": true,
"license": "MIT",
"engines": {
@@ -7025,8 +5496,6 @@
},
"node_modules/resolve": {
"version": "1.22.10",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz",
- "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7046,15 +5515,11 @@
},
"node_modules/resolve-alpn": {
"version": "1.2.1",
- "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz",
- "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==",
"dev": true,
"license": "MIT"
},
"node_modules/resolve-from": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
- "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
"dev": true,
"license": "MIT",
"engines": {
@@ -7063,8 +5528,6 @@
},
"node_modules/responselike": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz",
- "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7076,8 +5539,6 @@
},
"node_modules/reusify": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz",
- "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -7087,8 +5548,6 @@
},
"node_modules/roarr": {
"version": "2.15.4",
- "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.15.4.tgz",
- "integrity": "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==",
"dev": true,
"license": "BSD-3-Clause",
"optional": true,
@@ -7106,8 +5565,6 @@
},
"node_modules/rollup": {
"version": "4.40.1",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.40.1.tgz",
- "integrity": "sha512-C5VvvgCCyfyotVITIAv+4efVytl5F7wt+/I2i9q9GZcEXW9BP52YYOXC58igUi+LFZVHukErIIqQSWwv/M3WRw==",
"license": "MIT",
"dependencies": {
"@types/estree": "1.0.7"
@@ -7145,8 +5602,6 @@
},
"node_modules/router": {
"version": "2.2.0",
- "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz",
- "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7162,8 +5617,6 @@
},
"node_modules/run-parallel": {
"version": "1.2.0",
- "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
- "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
"dev": true,
"funding": [
{
@@ -7186,8 +5639,6 @@
},
"node_modules/rxjs": {
"version": "6.6.7",
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
- "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
@@ -7199,8 +5650,6 @@
},
"node_modules/safe-array-concat": {
"version": "1.1.3",
- "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz",
- "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7219,8 +5668,6 @@
},
"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==",
"dev": true,
"funding": [
{
@@ -7240,8 +5687,6 @@
},
"node_modules/safe-push-apply": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz",
- "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7257,8 +5702,6 @@
},
"node_modules/safe-regex-test": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz",
- "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7275,22 +5718,16 @@
},
"node_modules/safer-buffer": {
"version": "2.1.2",
- "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"dev": true,
"license": "MIT"
},
"node_modules/sax": {
"version": "1.4.1",
- "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz",
- "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==",
"dev": true,
"license": "ISC"
},
"node_modules/scheduler": {
"version": "0.23.2",
- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",
- "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7299,8 +5736,6 @@
},
"node_modules/semver": {
"version": "6.3.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
- "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
"license": "ISC",
"bin": {
"semver": "bin/semver.js"
@@ -7308,16 +5743,12 @@
},
"node_modules/semver-compare": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",
- "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==",
"dev": true,
"license": "MIT",
"optional": true
},
"node_modules/send": {
"version": "1.2.0",
- "resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz",
- "integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7339,8 +5770,6 @@
},
"node_modules/serialize-error": {
"version": "7.0.1",
- "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz",
- "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==",
"dev": true,
"license": "MIT",
"optional": true,
@@ -7356,8 +5785,6 @@
},
"node_modules/serve-static": {
"version": "2.2.0",
- "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.0.tgz",
- "integrity": "sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7372,8 +5799,6 @@
},
"node_modules/set-function-length": {
"version": "1.2.2",
- "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
- "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7390,8 +5815,6 @@
},
"node_modules/set-function-name": {
"version": "2.0.2",
- "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz",
- "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7406,8 +5829,6 @@
},
"node_modules/set-proto": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz",
- "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7421,15 +5842,11 @@
},
"node_modules/setprototypeof": {
"version": "1.2.0",
- "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
- "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
"dev": true,
"license": "ISC"
},
"node_modules/shebang-command": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
- "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7441,8 +5858,6 @@
},
"node_modules/shebang-regex": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
- "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
"dev": true,
"license": "MIT",
"engines": {
@@ -7451,8 +5866,6 @@
},
"node_modules/side-channel": {
"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": {
@@ -7471,8 +5884,6 @@
},
"node_modules/side-channel-list": {
"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": {
@@ -7488,8 +5899,6 @@
},
"node_modules/side-channel-map": {
"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": {
@@ -7507,8 +5916,6 @@
},
"node_modules/side-channel-weakmap": {
"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": {
@@ -7527,8 +5934,6 @@
},
"node_modules/slide": {
"version": "1.1.6",
- "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz",
- "integrity": "sha512-NwrtjCg+lZoqhFU8fOwl4ay2ei8PaqCBOUV3/ektPY9trO1yQ1oXEfmHAhKArUVUr/hOHvy5f6AdP17dCM0zMw==",
"dev": true,
"license": "ISC",
"engines": {
@@ -7537,8 +5942,6 @@
},
"node_modules/source-map-js": {
"version": "1.2.1",
- "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
- "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
"license": "BSD-3-Clause",
"engines": {
"node": ">=0.10.0"
@@ -7546,14 +5949,10 @@
},
"node_modules/spawn-command": {
"version": "0.0.2",
- "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2.tgz",
- "integrity": "sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==",
"dev": true
},
"node_modules/spdx-compare": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/spdx-compare/-/spdx-compare-1.0.0.tgz",
- "integrity": "sha512-C1mDZOX0hnu0ep9dfmuoi03+eOdDoz2yvK79RxbcrVEG1NO1Ph35yW102DHWKN4pk80nwCgeMmSY5L25VE4D9A==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7564,8 +5963,6 @@
},
"node_modules/spdx-correct": {
"version": "3.2.0",
- "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz",
- "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
@@ -7575,15 +5972,11 @@
},
"node_modules/spdx-exceptions": {
"version": "2.5.0",
- "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz",
- "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==",
"dev": true,
"license": "CC-BY-3.0"
},
"node_modules/spdx-expression-parse": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
- "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7593,22 +5986,16 @@
},
"node_modules/spdx-license-ids": {
"version": "3.0.21",
- "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.21.tgz",
- "integrity": "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==",
"dev": true,
"license": "CC0-1.0"
},
"node_modules/spdx-ranges": {
"version": "2.1.1",
- "resolved": "https://registry.npmjs.org/spdx-ranges/-/spdx-ranges-2.1.1.tgz",
- "integrity": "sha512-mcdpQFV7UDAgLpXEE/jOMqvK4LBoO0uTQg0uvXUewmEFhpiZx5yJSZITHB8w1ZahKdhfZqP5GPEOKLyEq5p8XA==",
"dev": true,
"license": "(MIT AND CC-BY-3.0)"
},
"node_modules/spdx-satisfies": {
"version": "4.0.1",
- "resolved": "https://registry.npmjs.org/spdx-satisfies/-/spdx-satisfies-4.0.1.tgz",
- "integrity": "sha512-WVzZ/cXAzoNmjCWiEluEA3BjHp5tiUmmhn9MK+X0tBbR9sOqtC6UQwmgCNrAIZvNlMuBUYAaHYfb2oqlF9SwKA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7619,23 +6006,17 @@
},
"node_modules/sprintf-js": {
"version": "1.1.3",
- "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz",
- "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==",
"dev": true,
"license": "BSD-3-Clause",
"optional": true
},
"node_modules/ssim.js": {
"version": "3.5.0",
- "resolved": "https://registry.npmjs.org/ssim.js/-/ssim.js-3.5.0.tgz",
- "integrity": "sha512-Aj6Jl2z6oDmgYFFbQqK7fght19bXdOxY7Tj03nF+03M9gCBAjeIiO8/PlEGMfKDwYpw4q6iBqVq2YuREorGg/g==",
"dev": true,
"license": "MIT"
},
"node_modules/statuses": {
"version": "2.0.2",
- "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
- "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -7644,8 +6025,6 @@
},
"node_modules/stop-iteration-iterator": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz",
- "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7658,8 +6037,6 @@
},
"node_modules/string-width": {
"version": "4.2.3",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7673,8 +6050,6 @@
},
"node_modules/string.prototype.matchall": {
"version": "4.0.12",
- "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz",
- "integrity": "sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7701,8 +6076,6 @@
},
"node_modules/string.prototype.repeat": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz",
- "integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7712,8 +6085,6 @@
},
"node_modules/string.prototype.trim": {
"version": "1.2.10",
- "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz",
- "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7734,8 +6105,6 @@
},
"node_modules/string.prototype.trimend": {
"version": "1.0.9",
- "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz",
- "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7753,8 +6122,6 @@
},
"node_modules/string.prototype.trimstart": {
"version": "1.0.8",
- "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz",
- "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7771,8 +6138,6 @@
},
"node_modules/strip-ansi": {
"version": "6.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
- "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7784,8 +6149,6 @@
},
"node_modules/strip-bom": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
- "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -7794,8 +6157,6 @@
},
"node_modules/strip-json-comments": {
"version": "3.1.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
- "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
"dev": true,
"license": "MIT",
"engines": {
@@ -7807,8 +6168,6 @@
},
"node_modules/sumchecker": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz",
- "integrity": "sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
@@ -7820,8 +6179,6 @@
},
"node_modules/supports-color": {
"version": "8.1.1",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
- "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7836,8 +6193,6 @@
},
"node_modules/supports-preserve-symlinks-flag": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
- "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
"dev": true,
"license": "MIT",
"engines": {
@@ -7849,8 +6204,6 @@
},
"node_modules/svelte": {
"version": "5.37.3",
- "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.37.3.tgz",
- "integrity": "sha512-7t/ejshehHd+95z3Z7ebS7wsqHDQxi/8nBTuTRwpMgNegfRBfuitCSKTUDKIBOExqfT2+DhQ2VLG8Xn+cBXoaQ==",
"license": "MIT",
"dependencies": {
"@ampproject/remapping": "^2.3.0",
@@ -7874,8 +6227,6 @@
},
"node_modules/tinyglobby": {
"version": "0.2.14",
- "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz",
- "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==",
"license": "MIT",
"dependencies": {
"fdir": "^6.4.4",
@@ -7890,8 +6241,6 @@
},
"node_modules/to-regex-range": {
"version": "5.0.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
- "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7903,8 +6252,6 @@
},
"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==",
"dev": true,
"license": "MIT",
"engines": {
@@ -7917,8 +6264,6 @@
},
"node_modules/tree-kill": {
"version": "1.2.2",
- "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz",
- "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==",
"dev": true,
"license": "MIT",
"bin": {
@@ -7927,8 +6272,6 @@
},
"node_modules/treeify": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz",
- "integrity": "sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==",
"dev": true,
"license": "MIT",
"engines": {
@@ -7937,8 +6280,6 @@
},
"node_modules/ts-api-utils": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz",
- "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -7950,8 +6291,6 @@
},
"node_modules/tsconfig-paths": {
"version": "3.15.0",
- "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz",
- "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7963,8 +6302,6 @@
},
"node_modules/tsconfig-paths/node_modules/json5": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
- "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7976,15 +6313,11 @@
},
"node_modules/tslib": {
"version": "1.14.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
- "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
"dev": true,
"license": "0BSD"
},
"node_modules/tunnel": {
"version": "0.0.6",
- "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
- "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -7993,8 +6326,6 @@
},
"node_modules/type-check": {
"version": "0.4.0",
- "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
- "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -8006,8 +6337,6 @@
},
"node_modules/type-fest": {
"version": "0.13.1",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz",
- "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==",
"dev": true,
"license": "(MIT OR CC0-1.0)",
"optional": true,
@@ -8020,8 +6349,6 @@
},
"node_modules/type-is": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz",
- "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -8035,8 +6362,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",
- "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -8050,8 +6375,6 @@
},
"node_modules/typed-array-byte-length": {
"version": "1.0.3",
- "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz",
- "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -8070,8 +6393,6 @@
},
"node_modules/typed-array-byte-offset": {
"version": "1.0.4",
- "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz",
- "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -8092,8 +6413,6 @@
},
"node_modules/typed-array-length": {
"version": "1.0.7",
- "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz",
- "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -8113,8 +6432,6 @@
},
"node_modules/typescript": {
"version": "5.9.2",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz",
- "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==",
"devOptional": true,
"license": "Apache-2.0",
"bin": {
@@ -8127,8 +6444,6 @@
},
"node_modules/unbox-primitive": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz",
- "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -8146,8 +6461,6 @@
},
"node_modules/undici": {
"version": "5.29.0",
- "resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz",
- "integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -8159,22 +6472,16 @@
},
"node_modules/undici-types": {
"version": "5.26.5",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
- "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"devOptional": true,
"license": "MIT"
},
"node_modules/universal-user-agent": {
"version": "6.0.1",
- "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz",
- "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==",
"dev": true,
"license": "ISC"
},
"node_modules/universalify": {
"version": "0.1.2",
- "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
- "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -8183,8 +6490,6 @@
},
"node_modules/unpipe": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
- "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -8193,8 +6498,6 @@
},
"node_modules/update-browserslist-db": {
"version": "1.1.2",
- "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz",
- "integrity": "sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==",
"funding": [
{
"type": "opencollective",
@@ -8223,8 +6526,6 @@
},
"node_modules/uri-js": {
"version": "4.4.1",
- "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
- "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
@@ -8233,15 +6534,11 @@
},
"node_modules/util-extend": {
"version": "1.0.3",
- "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz",
- "integrity": "sha512-mLs5zAK+ctllYBj+iAQvlDCwoxU/WDOUaJkcFudeiAX6OajC6BKXJUa9a+tbtkC11dz2Ufb7h0lyvIOVn4LADA==",
"dev": true,
"license": "MIT"
},
"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",
- "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
@@ -8251,8 +6548,6 @@
},
"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==",
"dev": true,
"license": "MIT",
"engines": {
@@ -8261,8 +6556,6 @@
},
"node_modules/vite": {
"version": "6.3.5",
- "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz",
- "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==",
"license": "MIT",
"dependencies": {
"esbuild": "^0.25.0",
@@ -8333,10 +6626,72 @@
}
}
},
+ "node_modules/vite-plugin-static-copy": {
+ "version": "3.1.2",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "chokidar": "^3.6.0",
+ "fs-extra": "^11.3.0",
+ "p-map": "^7.0.3",
+ "picocolors": "^1.1.1",
+ "tinyglobby": "^0.2.14"
+ },
+ "engines": {
+ "node": "^18.0.0 || >=20.0.0"
+ },
+ "peerDependencies": {
+ "vite": "^5.0.0 || ^6.0.0 || ^7.0.0"
+ }
+ },
+ "node_modules/vite-plugin-static-copy/node_modules/fs-extra": {
+ "version": "11.3.1",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^6.0.1",
+ "universalify": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=14.14"
+ }
+ },
+ "node_modules/vite-plugin-static-copy/node_modules/jsonfile": {
+ "version": "6.2.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "universalify": "^2.0.0"
+ },
+ "optionalDependencies": {
+ "graceful-fs": "^4.1.6"
+ }
+ },
+ "node_modules/vite-plugin-static-copy/node_modules/universalify": {
+ "version": "2.0.1",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 10.0.0"
+ }
+ },
+ "node_modules/vite/node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
"node_modules/vitefu": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.1.1.tgz",
- "integrity": "sha512-B/Fegf3i8zh0yFbpzZ21amWzHmuNlLlmJT6n7bu5e+pCHUKQIfXSYokrqOBGEMMe9UG2sostKQF9mml/vYaWJQ==",
"license": "MIT",
"workspaces": [
"tests/deps/*",
@@ -8354,8 +6709,6 @@
},
"node_modules/vue": {
"version": "3.5.13",
- "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.13.tgz",
- "integrity": "sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==",
"license": "MIT",
"peer": true,
"dependencies": {
@@ -8380,8 +6733,6 @@
},
"node_modules/which": {
"version": "2.0.2",
- "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
- "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -8396,8 +6747,6 @@
},
"node_modules/which-boxed-primitive": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz",
- "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -8416,8 +6765,6 @@
},
"node_modules/which-builtin-type": {
"version": "1.2.1",
- "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz",
- "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -8444,8 +6791,6 @@
},
"node_modules/which-collection": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz",
- "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -8463,8 +6808,6 @@
},
"node_modules/which-typed-array": {
"version": "1.1.19",
- "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz",
- "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -8485,8 +6828,6 @@
},
"node_modules/word-wrap": {
"version": "1.2.5",
- "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
- "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -8495,8 +6836,6 @@
},
"node_modules/wrap-ansi": {
"version": "7.0.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
- "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -8513,15 +6852,11 @@
},
"node_modules/wrappy": {
"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": {
"version": "8.18.2",
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.2.tgz",
- "integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -8542,8 +6877,6 @@
},
"node_modules/xml2js": {
"version": "0.5.0",
- "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz",
- "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -8556,8 +6889,6 @@
},
"node_modules/xmlbuilder": {
"version": "11.0.1",
- "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz",
- "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -8566,16 +6897,10 @@
},
"node_modules/xterm": {
"version": "5.3.0",
- "resolved": "https://registry.npmjs.org/xterm/-/xterm-5.3.0.tgz",
- "integrity": "sha512-8QqjlekLUFTrU6x7xck1MsPzPA571K5zNqWm0M0oroYEWVOptZ0+ubQSkQ3uxIEhcIHRujJy6emDWX4A7qyFzg==",
- "deprecated": "This package is now deprecated. Move to @xterm/xterm instead.",
"license": "MIT"
},
"node_modules/xterm-addon-fit": {
"version": "0.7.0",
- "resolved": "https://registry.npmjs.org/xterm-addon-fit/-/xterm-addon-fit-0.7.0.tgz",
- "integrity": "sha512-tQgHGoHqRTgeROPnvmtEJywLKoC/V9eNs4bLLz7iyJr1aW/QFzRwfd3MGiJ6odJd9xEfxcW36/xRU47JkD5NKQ==",
- "deprecated": "This package is now deprecated. Move to @xterm/addon-fit instead.",
"license": "MIT",
"peerDependencies": {
"xterm": "^5.0.0"
@@ -8583,8 +6908,6 @@
},
"node_modules/y18n": {
"version": "5.0.8",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
- "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
"dev": true,
"license": "ISC",
"engines": {
@@ -8593,14 +6916,10 @@
},
"node_modules/yallist": {
"version": "3.1.1",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
- "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
"license": "ISC"
},
"node_modules/yaml": {
"version": "2.6.0",
- "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.0.tgz",
- "integrity": "sha512-a6ae//JvKDEra2kdi1qzCyrJW/WZCgFi8ydDV+eXExl95t+5R+ijnqHJbz9tmMh8FUjx3iv2fCQ4dclAQlO2UQ==",
"license": "ISC",
"bin": {
"yaml": "bin.mjs"
@@ -8611,8 +6930,6 @@
},
"node_modules/yargs": {
"version": "16.2.0",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
- "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -8630,8 +6947,6 @@
},
"node_modules/yargs-parser": {
"version": "20.2.9",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
- "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
"dev": true,
"license": "ISC",
"engines": {
@@ -8640,8 +6955,6 @@
},
"node_modules/yauzl": {
"version": "2.10.0",
- "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
- "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -8651,8 +6964,6 @@
},
"node_modules/yocto-queue": {
"version": "0.1.0",
- "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
- "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
"dev": true,
"license": "MIT",
"engines": {
@@ -8664,14 +6975,10 @@
},
"node_modules/zimmerframe": {
"version": "1.1.2",
- "resolved": "https://registry.npmjs.org/zimmerframe/-/zimmerframe-1.1.2.tgz",
- "integrity": "sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w==",
"license": "MIT"
},
"node_modules/zod": {
- "version": "3.24.2",
- "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.2.tgz",
- "integrity": "sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==",
+ "version": "3.25.76",
"dev": true,
"license": "MIT",
"funding": {
@@ -8680,8 +6987,6 @@
},
"node_modules/zod-to-json-schema": {
"version": "3.24.6",
- "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.24.6.tgz",
- "integrity": "sha512-h/z3PKvcTcTetyjl1fkj79MHNEjm+HpD6NXheWjzOekY7kV+lwDYnHw+ivHkijnCSMz1yJaWBD9vu/Fcmk+vEg==",
"dev": true,
"license": "ISC",
"peerDependencies": {
@@ -8691,6 +6996,150 @@
"packages/html-reporter": {
"version": "0.0.0"
},
+ "packages/mcp-extension": {
+ "name": "@playwright/mcp-extension",
+ "version": "0.0.36",
+ "license": "Apache-2.0",
+ "devDependencies": {
+ "@types/chrome": "^0.0.315",
+ "@types/react": "^18.2.66",
+ "@types/react-dom": "^18.2.22",
+ "@vitejs/plugin-react": "^4.0.0",
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0",
+ "typescript": "^5.8.2",
+ "vite": "^5.0.0",
+ "vite-plugin-static-copy": "^3.1.1"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "packages/mcp-extension/node_modules/@esbuild/linux-x64": {
+ "version": "0.21.5",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "packages/mcp-extension/node_modules/esbuild": {
+ "version": "0.21.5",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "optionalDependencies": {
+ "@esbuild/aix-ppc64": "0.21.5",
+ "@esbuild/android-arm": "0.21.5",
+ "@esbuild/android-arm64": "0.21.5",
+ "@esbuild/android-x64": "0.21.5",
+ "@esbuild/darwin-arm64": "0.21.5",
+ "@esbuild/darwin-x64": "0.21.5",
+ "@esbuild/freebsd-arm64": "0.21.5",
+ "@esbuild/freebsd-x64": "0.21.5",
+ "@esbuild/linux-arm": "0.21.5",
+ "@esbuild/linux-arm64": "0.21.5",
+ "@esbuild/linux-ia32": "0.21.5",
+ "@esbuild/linux-loong64": "0.21.5",
+ "@esbuild/linux-mips64el": "0.21.5",
+ "@esbuild/linux-ppc64": "0.21.5",
+ "@esbuild/linux-riscv64": "0.21.5",
+ "@esbuild/linux-s390x": "0.21.5",
+ "@esbuild/linux-x64": "0.21.5",
+ "@esbuild/netbsd-x64": "0.21.5",
+ "@esbuild/openbsd-x64": "0.21.5",
+ "@esbuild/sunos-x64": "0.21.5",
+ "@esbuild/win32-arm64": "0.21.5",
+ "@esbuild/win32-ia32": "0.21.5",
+ "@esbuild/win32-x64": "0.21.5"
+ }
+ },
+ "packages/mcp-extension/node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "packages/mcp-extension/node_modules/vite": {
+ "version": "5.4.19",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "esbuild": "^0.21.3",
+ "postcss": "^8.4.43",
+ "rollup": "^4.20.0"
+ },
+ "bin": {
+ "vite": "bin/vite.js"
+ },
+ "engines": {
+ "node": "^18.0.0 || >=20.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/vitejs/vite?sponsor=1"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.3"
+ },
+ "peerDependencies": {
+ "@types/node": "^18.0.0 || >=20.0.0",
+ "less": "*",
+ "lightningcss": "^1.21.0",
+ "sass": "*",
+ "sass-embedded": "*",
+ "stylus": "*",
+ "sugarss": "*",
+ "terser": "^5.4.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ },
+ "less": {
+ "optional": true
+ },
+ "lightningcss": {
+ "optional": true
+ },
+ "sass": {
+ "optional": true
+ },
+ "sass-embedded": {
+ "optional": true
+ },
+ "stylus": {
+ "optional": true
+ },
+ "sugarss": {
+ "optional": true
+ },
+ "terser": {
+ "optional": true
+ }
+ }
+ },
"packages/playwright": {
"version": "1.56.0-next",
"license": "Apache-2.0",
@@ -8841,8 +7290,6 @@
},
"packages/playwright-ct-svelte/node_modules/@sveltejs/vite-plugin-svelte": {
"version": "5.1.1",
- "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-5.1.1.tgz",
- "integrity": "sha512-Y1Cs7hhTc+a5E9Va/xwKlAJoariQyHY+5zBgCZg4PFWNYQ1nMN9sjK1zhw1gK69DuqVP++sht/1GZg1aRwmAXQ==",
"license": "MIT",
"dependencies": {
"@sveltejs/vite-plugin-svelte-inspector": "^4.0.1",
@@ -8862,8 +7309,6 @@
},
"packages/playwright-ct-svelte/node_modules/@sveltejs/vite-plugin-svelte-inspector": {
"version": "4.0.1",
- "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-4.0.1.tgz",
- "integrity": "sha512-J/Nmb2Q2y7mck2hyCX4ckVHcR5tu2J+MtBEQqpDrrgELZ2uvraQcK/ioCV61AqkdXFgriksOKIceDcQmqnGhVw==",
"license": "MIT",
"dependencies": {
"debug": "^4.3.7"
@@ -8906,51 +7351,6 @@
"node": ">=18"
}
},
- "packages/playwright-mcp": {
- "name": "@playwright/mcp",
- "version": "1.52.0-next",
- "extraneous": true,
- "license": "Apache-2.0",
- "dependencies": {
- "@modelcontextprotocol/sdk": "^1.6.1",
- "commander": "^13.1.0",
- "playwright": "1.52.0-next",
- "zod-to-json-schema": "^3.24.4"
- },
- "bin": {
- "mcp": "cli.js"
- },
- "devDependencies": {
- "@types/node": "^22.13.10"
- },
- "engines": {
- "node": ">=18"
- }
- },
- "packages/playwright-mdd": {
- "name": "@playwright/mdd",
- "version": "0.0.1",
- "extraneous": true,
- "license": "Apache-2.0",
- "dependencies": {
- "commander": "^13.1.0",
- "debug": "^4.4.1",
- "dotenv": "^16.5.0",
- "mime": "^4.0.7",
- "openai": "^5.7.0",
- "playwright-core": "1.55.0-next",
- "zod-to-json-schema": "^3.24.4"
- },
- "bin": {
- "playwright-mdd": "cli.js"
- },
- "devDependencies": {
- "@types/debug": "^4.1.7"
- },
- "engines": {
- "node": ">=18"
- }
- },
"packages/playwright-test": {
"name": "@playwright/test",
"version": "1.56.0-next",
@@ -8965,40 +7365,6 @@
"node": ">=18"
}
},
- "packages/playwright-test-mcp": {
- "name": "@playwright/test-runner-mcp",
- "version": "0.0.1",
- "extraneous": true,
- "license": "Apache-2.0",
- "dependencies": {
- "commander": "^13.1.0",
- "playwright": "1.56.0-next",
- "playwright-core": "1.56.0-next"
- },
- "bin": {
- "mcp-server-playwright-test": "cli.js"
- },
- "engines": {
- "node": ">=18"
- }
- },
- "packages/playwright-tools": {
- "name": "@playwright/experimental-tools",
- "version": "0.0.0",
- "extraneous": true,
- "license": "Apache-2.0",
- "dependencies": {
- "playwright": "1.52.0-next"
- },
- "devDependencies": {
- "@anthropic-ai/sdk": "^0.33.1",
- "@modelcontextprotocol/sdk": "^1.6.1",
- "openai": "^4.79.1"
- },
- "engines": {
- "node": ">=18"
- }
- },
"packages/playwright-webkit": {
"version": "1.56.0-next",
"hasInstallScript": true,
@@ -9013,20 +7379,6 @@
"node": ">=18"
}
},
- "packages/playwright/node_modules/fsevents": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
- "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
- "hasInstallScript": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
- }
- },
"packages/recorder": {
"version": "0.0.0",
"dependencies": {
diff --git a/package.json b/package.json
index 6948430c30..80dd33e811 100644
--- a/package.json
+++ b/package.json
@@ -30,6 +30,9 @@
"ttest": "node ./tests/playwright-test/stable-test-runner/node_modules/@playwright/test/cli test --config=tests/playwright-test/playwright.config.ts",
"ct": "playwright test tests/components/test-all.spec.js --reporter=list",
"test": "playwright test --config=tests/library/playwright.config.ts",
+ "mcp-test": "playwright test --config=tests/mcp/playwright.config.ts",
+ "mcp-ctest": "playwright test --config=tests/mcp/playwright.config.ts --project=chrome",
+ "mcp-etest": "playwright test --config=tests/mcp/playwright.config.extension.ts",
"eslint": "eslint --cache",
"tsc": "tsc -p . && tsc -p packages/html-reporter/",
"doc": "node utils/doclint/cli.js",
@@ -56,7 +59,7 @@
"@eslint/compat": "^1.3.2",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.34.0",
- "@modelcontextprotocol/sdk": "^1.17.3",
+ "@modelcontextprotocol/sdk": "^1.17.5",
"@octokit/graphql-schema": "^15.26.0",
"@stylistic/eslint-plugin": "^5.2.3",
"@types/codemirror": "^5.60.7",
@@ -99,6 +102,8 @@
"vite": "^6.3.4",
"ws": "^8.17.1",
"xml2js": "^0.5.0",
- "yaml": "2.6.0"
+ "yaml": "2.6.0",
+ "zod": "^3.25.76",
+ "zod-to-json-schema": "^3.24.6"
}
}
diff --git a/packages/mcp-extension/README.md b/packages/mcp-extension/README.md
new file mode 100644
index 0000000000..6421798e03
--- /dev/null
+++ b/packages/mcp-extension/README.md
@@ -0,0 +1,48 @@
+# Playwright MCP Chrome Extension
+
+## Introduction
+
+The Playwright MCP Chrome Extension allows you to connect to pages in your existing browser and leverage the state of your default user profile. This means the AI assistant can interact with websites where you're already logged in, using your existing cookies, sessions, and browser state, providing a seamless experience without requiring separate authentication or setup.
+
+## Prerequisites
+
+- Chrome/Edge/Chromium browser
+
+## Installation Steps
+
+### Download the Extension
+
+Download the latest Chrome extension from GitHub:
+- **Download link**: https://github.com/microsoft/playwright-mcp/releases
+
+### Load Chrome Extension
+
+1. Open Chrome and navigate to `chrome://extensions/`
+2. Enable "Developer mode" (toggle in the top right corner)
+3. Click "Load unpacked" and select the extension directory
+
+### Configure Playwright MCP server
+
+Configure Playwright MCP server to connect to the browser using the extension by passing the `--extension` option when running the MCP server:
+
+```json
+{
+ "mcpServers": {
+ "playwright-extension": {
+ "command": "npx",
+ "args": [
+ "@playwright/mcp@latest",
+ "--extension"
+ ]
+ }
+ }
+}
+```
+
+## Usage
+
+### Browser Tab Selection
+
+When the LLM interacts with the browser for the first time, it will load a page where you can select which browser tab the LLM will connect to. This allows you to control which specific page the AI assistant will interact with during the session.
+
+
diff --git a/packages/mcp-extension/icons/icon-128.png b/packages/mcp-extension/icons/icon-128.png
new file mode 100644
index 0000000000..c4bc8b0250
Binary files /dev/null and b/packages/mcp-extension/icons/icon-128.png differ
diff --git a/packages/mcp-extension/icons/icon-16.png b/packages/mcp-extension/icons/icon-16.png
new file mode 100644
index 0000000000..0bab712125
Binary files /dev/null and b/packages/mcp-extension/icons/icon-16.png differ
diff --git a/packages/mcp-extension/icons/icon-32.png b/packages/mcp-extension/icons/icon-32.png
new file mode 100644
index 0000000000..1f9a8ccb89
Binary files /dev/null and b/packages/mcp-extension/icons/icon-32.png differ
diff --git a/packages/mcp-extension/icons/icon-48.png b/packages/mcp-extension/icons/icon-48.png
new file mode 100644
index 0000000000..ac23ef078c
Binary files /dev/null and b/packages/mcp-extension/icons/icon-48.png differ
diff --git a/packages/mcp-extension/manifest.json b/packages/mcp-extension/manifest.json
new file mode 100644
index 0000000000..ffc9e9d3fd
--- /dev/null
+++ b/packages/mcp-extension/manifest.json
@@ -0,0 +1,35 @@
+{
+ "manifest_version": 3,
+ "name": "Playwright MCP Bridge",
+ "version": "0.0.36",
+ "description": "Share browser tabs with Playwright MCP server",
+ "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA9nMS2b0WCohjVHPGb8D9qAdkbIngDqoAjTeSccHJijgcONejge+OJxOQOMLu7b0ovt1c9BiEJa5JcpM+EHFVGL1vluBxK71zmBy1m2f9vZF3HG0LSCp7YRkum9rAIEthDwbkxx6XTvpmAY5rjFa/NON6b9Hlbo+8peUSkoOK7HTwYnnI36asZ9eUTiveIf+DMPLojW2UX33vDWG2UKvMVDewzclb4+uLxAYshY7Mx8we/b44xu+Anb/EBLKjOPk9Yh541xJ5Ozc8EiP/5yxOp9c/lRiYUHaRW+4r0HKZyFt0eZ52ti2iM4Nfk7jRXR7an3JPsUIf5deC/1cVM/+1ZQIDAQAB",
+ "permissions": [
+ "debugger",
+ "activeTab",
+ "tabs",
+ "storage"
+ ],
+ "host_permissions": [
+ "<all_urls>"
+ ],
+ "background": {
+ "service_worker": "lib/background.mjs",
+ "type": "module"
+ },
+ "action": {
+ "default_title": "Playwright MCP Bridge",
+ "default_icon": {
+ "16": "icons/icon-16.png",
+ "32": "icons/icon-32.png",
+ "48": "icons/icon-48.png",
+ "128": "icons/icon-128.png"
+ }
+ },
+ "icons": {
+ "16": "icons/icon-16.png",
+ "32": "icons/icon-32.png",
+ "48": "icons/icon-48.png",
+ "128": "icons/icon-128.png"
+ }
+}
diff --git a/packages/mcp-extension/package.json b/packages/mcp-extension/package.json
new file mode 100644
index 0000000000..89b75ebf3d
--- /dev/null
+++ b/packages/mcp-extension/package.json
@@ -0,0 +1,35 @@
+{
+ "name": "@playwright/mcp-extension",
+ "version": "0.0.36",
+ "description": "Playwright MCP Browser Extension",
+ "private": true,
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/microsoft/playwright-mcp.git"
+ },
+ "homepage": "https://playwright.dev",
+ "engines": {
+ "node": ">=18"
+ },
+ "author": {
+ "name": "Microsoft Corporation"
+ },
+ "license": "Apache-2.0",
+ "scripts": {
+ "build": "tsc --project . && tsc --project tsconfig.ui.json && vite build && vite build --config vite.sw.config.mts",
+ "watch": "tsc --watch --project . & tsc --watch --project tsconfig.ui.json & vite build --watch & vite build --watch --config vite.sw.config.mts",
+ "test": "playwright test",
+ "clean": "rm -rf dist"
+ },
+ "devDependencies": {
+ "@types/chrome": "^0.0.315",
+ "@types/react": "^18.2.66",
+ "@types/react-dom": "^18.2.22",
+ "@vitejs/plugin-react": "^4.0.0",
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0",
+ "typescript": "^5.8.2",
+ "vite": "^5.0.0",
+ "vite-plugin-static-copy": "^3.1.1"
+ }
+}
diff --git a/packages/mcp-extension/src/background.ts b/packages/mcp-extension/src/background.ts
new file mode 100644
index 0000000000..e74ebb80cd
--- /dev/null
+++ b/packages/mcp-extension/src/background.ts
@@ -0,0 +1,222 @@
+/**
+ * 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 { RelayConnection, debugLog } from './relayConnection';
+
+type PageMessage = {
+ type: 'connectToMCPRelay';
+ mcpRelayUrl: string;
+} | {
+ type: 'getTabs';
+} | {
+ type: 'connectToTab';
+ tabId?: number;
+ windowId?: number;
+ mcpRelayUrl: string;
+} | {
+ type: 'getConnectionStatus';
+} | {
+ type: 'disconnect';
+};
+
+class TabShareExtension {
+ private _activeConnection: RelayConnection | undefined;
+ private _connectedTabId: number | null = null;
+ private _pendingTabSelection = new Map<number, { connection: RelayConnection, timerId?: number }>();
+
+ constructor() {
+ chrome.tabs.onRemoved.addListener(this._onTabRemoved.bind(this));
+ chrome.tabs.onUpdated.addListener(this._onTabUpdated.bind(this));
+ chrome.tabs.onActivated.addListener(this._onTabActivated.bind(this));
+ chrome.runtime.onMessage.addListener(this._onMessage.bind(this));
+ chrome.action.onClicked.addListener(this._onActionClicked.bind(this));
+ }
+
+ // Promise-based message handling is not supported in Chrome: https://issues.chromium.org/issues/40753031
+ private _onMessage(message: PageMessage, sender: chrome.runtime.MessageSender, sendResponse: (response: any) => void) {
+ switch (message.type) {
+ case 'connectToMCPRelay':
+ this._connectToRelay(sender.tab!.id!, message.mcpRelayUrl).then(
+ () => sendResponse({ success: true }),
+ (error: any) => sendResponse({ success: false, error: error.message }));
+ return true;
+ case 'getTabs':
+ this._getTabs().then(
+ tabs => sendResponse({ success: true, tabs, currentTabId: sender.tab?.id }),
+ (error: any) => sendResponse({ success: false, error: error.message }));
+ return true;
+ case 'connectToTab':
+ const tabId = message.tabId || sender.tab?.id!;
+ const windowId = message.windowId || sender.tab?.windowId!;
+ this._connectTab(sender.tab!.id!, tabId, windowId, message.mcpRelayUrl!).then(
+ () => sendResponse({ success: true }),
+ (error: any) => sendResponse({ success: false, error: error.message }));
+ return true; // Return true to indicate that the response will be sent asynchronously
+ case 'getConnectionStatus':
+ sendResponse({
+ connectedTabId: this._connectedTabId
+ });
+ return false;
+ case 'disconnect':
+ this._disconnect().then(
+ () => sendResponse({ success: true }),
+ (error: any) => sendResponse({ success: false, error: error.message }));
+ return true;
+ }
+ return false;
+ }
+
+ private async _connectToRelay(selectorTabId: number, mcpRelayUrl: string): Promise<void> {
+ try {
+ debugLog(`Connecting to relay at ${mcpRelayUrl}`);
+ const socket = new WebSocket(mcpRelayUrl);
+ await new Promise<void>((resolve, reject) => {
+ socket.onopen = () => resolve();
+ socket.onerror = () => reject(new Error('WebSocket error'));
+ setTimeout(() => reject(new Error('Connection timeout')), 5000);
+ });
+
+ const connection = new RelayConnection(socket);
+ connection.onclose = () => {
+ debugLog('Connection closed');
+ this._pendingTabSelection.delete(selectorTabId);
+ // TODO: show error in the selector tab?
+ };
+ this._pendingTabSelection.set(selectorTabId, { connection });
+ debugLog(`Connected to MCP relay`);
+ } catch (error: any) {
+ const message = `Failed to connect to MCP relay: ${error.message}`;
+ debugLog(message);
+ throw new Error(message);
+ }
+ }
+
+ private async _connectTab(selectorTabId: number, tabId: number, windowId: number, mcpRelayUrl: string): Promise<void> {
+ try {
+ debugLog(`Connecting tab ${tabId} to relay at ${mcpRelayUrl}`);
+ try {
+ this._activeConnection?.close('Another connection is requested');
+ } catch (error: any) {
+ debugLog(`Error closing active connection:`, error);
+ }
+ await this._setConnectedTabId(null);
+
+ this._activeConnection = this._pendingTabSelection.get(selectorTabId)?.connection;
+ if (!this._activeConnection)
+ throw new Error('No active MCP relay connection');
+ this._pendingTabSelection.delete(selectorTabId);
+
+ this._activeConnection.setTabId(tabId);
+ this._activeConnection.onclose = () => {
+ debugLog('MCP connection closed');
+ this._activeConnection = undefined;
+ void this._setConnectedTabId(null);
+ };
+
+ await Promise.all([
+ this._setConnectedTabId(tabId),
+ chrome.tabs.update(tabId, { active: true }),
+ chrome.windows.update(windowId, { focused: true }),
+ ]);
+ debugLog(`Connected to MCP bridge`);
+ } catch (error: any) {
+ await this._setConnectedTabId(null);
+ debugLog(`Failed to connect tab ${tabId}:`, error.message);
+ throw error;
+ }
+ }
+
+ private async _setConnectedTabId(tabId: number | null): Promise<void> {
+ const oldTabId = this._connectedTabId;
+ this._connectedTabId = tabId;
+ if (oldTabId && oldTabId !== tabId)
+ await this._updateBadge(oldTabId, { text: '' });
+ if (tabId)
+ await this._updateBadge(tabId, { text: '✓', color: '#4CAF50', title: 'Connected to MCP client' });
+ }
+
+ private async _updateBadge(tabId: number, { text, color, title }: { text: string; color?: string, title?: string }): Promise<void> {
+ try {
+ await chrome.action.setBadgeText({ tabId, text });
+ await chrome.action.setTitle({ tabId, title: title || '' });
+ if (color)
+ await chrome.action.setBadgeBackgroundColor({ tabId, color });
+ } catch (error: any) {
+ // Ignore errors as the tab may be closed already.
+ }
+ }
+
+ private async _onTabRemoved(tabId: number): Promise<void> {
+ const pendingConnection = this._pendingTabSelection.get(tabId)?.connection;
+ if (pendingConnection) {
+ this._pendingTabSelection.delete(tabId);
+ pendingConnection.close('Browser tab closed');
+ return;
+ }
+ if (this._connectedTabId !== tabId)
+ return;
+ this._activeConnection?.close('Browser tab closed');
+ this._activeConnection = undefined;
+ this._connectedTabId = null;
+ }
+
+ private _onTabActivated(activeInfo: chrome.tabs.TabActiveInfo) {
+ for (const [tabId, pending] of this._pendingTabSelection) {
+ if (tabId === activeInfo.tabId) {
+ if (pending.timerId) {
+ clearTimeout(pending.timerId);
+ pending.timerId = undefined;
+ }
+ continue;
+ }
+ if (!pending.timerId) {
+ pending.timerId = setTimeout(() => {
+ const existed = this._pendingTabSelection.delete(tabId);
+ if (existed) {
+ pending.connection.close('Tab has been inactive for 5 seconds');
+ chrome.tabs.sendMessage(tabId, { type: 'connectionTimeout' });
+ }
+ }, 5000);
+ return;
+ }
+ }
+ }
+
+ private _onTabUpdated(tabId: number, changeInfo: chrome.tabs.TabChangeInfo, tab: chrome.tabs.Tab) {
+ if (this._connectedTabId === tabId)
+ void this._setConnectedTabId(tabId);
+ }
+
+ private async _getTabs(): Promise<chrome.tabs.Tab[]> {
+ const tabs = await chrome.tabs.query({});
+ return tabs.filter(tab => tab.url && !['chrome:', 'edge:', 'devtools:'].some(scheme => tab.url!.startsWith(scheme)));
+ }
+
+ private async _onActionClicked(): Promise<void> {
+ await chrome.tabs.create({
+ url: chrome.runtime.getURL('status.html'),
+ active: true
+ });
+ }
+
+ private async _disconnect(): Promise<void> {
+ this._activeConnection?.close('User disconnected');
+ this._activeConnection = undefined;
+ await this._setConnectedTabId(null);
+ }
+}
+
+new TabShareExtension();
diff --git a/packages/mcp-extension/src/relayConnection.ts b/packages/mcp-extension/src/relayConnection.ts
new file mode 100644
index 0000000000..b203af4222
--- /dev/null
+++ b/packages/mcp-extension/src/relayConnection.ts
@@ -0,0 +1,178 @@
+/**
+ * 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.
+ */
+
+export function debugLog(...args: unknown[]): void {
+ const enabled = true;
+ if (enabled) {
+ // eslint-disable-next-line no-console
+ console.log('[Extension]', ...args);
+ }
+}
+
+type ProtocolCommand = {
+ id: number;
+ method: string;
+ params?: any;
+};
+
+type ProtocolResponse = {
+ id?: number;
+ method?: string;
+ params?: any;
+ result?: any;
+ error?: string;
+};
+
+export class RelayConnection {
+ private _debuggee: chrome.debugger.Debuggee;
+ private _ws: WebSocket;
+ private _eventListener: (source: chrome.debugger.DebuggerSession, method: string, params: any) => void;
+ private _detachListener: (source: chrome.debugger.Debuggee, reason: string) => void;
+ private _tabPromise: Promise<void>;
+ private _tabPromiseResolve!: () => void;
+ private _closed = false;
+
+ onclose?: () => void;
+
+ constructor(ws: WebSocket) {
+ this._debuggee = { };
+ this._tabPromise = new Promise(resolve => this._tabPromiseResolve = resolve);
+ this._ws = ws;
+ this._ws.onmessage = this._onMessage.bind(this);
+ this._ws.onclose = () => this._onClose();
+ // Store listeners for cleanup
+ this._eventListener = this._onDebuggerEvent.bind(this);
+ this._detachListener = this._onDebuggerDetach.bind(this);
+ chrome.debugger.onEvent.addListener(this._eventListener);
+ chrome.debugger.onDetach.addListener(this._detachListener);
+ }
+
+ // Either setTabId or close is called after creating the connection.
+ setTabId(tabId: number): void {
+ this._debuggee = { tabId };
+ this._tabPromiseResolve();
+ }
+
+ close(message: string): void {
+ this._ws.close(1000, message);
+ // ws.onclose is called asynchronously, so we call it here to avoid forwarding
+ // CDP events to the closed connection.
+ this._onClose();
+ }
+
+ private _onClose() {
+ if (this._closed)
+ return;
+ this._closed = true;
+ chrome.debugger.onEvent.removeListener(this._eventListener);
+ chrome.debugger.onDetach.removeListener(this._detachListener);
+ chrome.debugger.detach(this._debuggee).catch(() => {});
+ this.onclose?.();
+ }
+
+ private _onDebuggerEvent(source: chrome.debugger.DebuggerSession, method: string, params: any): void {
+ if (source.tabId !== this._debuggee.tabId)
+ return;
+ debugLog('Forwarding CDP event:', method, params);
+ const sessionId = source.sessionId;
+ this._sendMessage({
+ method: 'forwardCDPEvent',
+ params: {
+ sessionId,
+ method,
+ params,
+ },
+ });
+ }
+
+ private _onDebuggerDetach(source: chrome.debugger.Debuggee, reason: string): void {
+ if (source.tabId !== this._debuggee.tabId)
+ return;
+ this.close(`Debugger detached: ${reason}`);
+ this._debuggee = { };
+ }
+
+ private _onMessage(event: MessageEvent): void {
+ this._onMessageAsync(event).catch(e => debugLog('Error handling message:', e));
+ }
+
+ private async _onMessageAsync(event: MessageEvent): Promise<void> {
+ let message: ProtocolCommand;
+ try {
+ message = JSON.parse(event.data);
+ } catch (error: any) {
+ debugLog('Error parsing message:', error);
+ this._sendError(-32700, `Error parsing message: ${error.message}`);
+ return;
+ }
+
+ debugLog('Received message:', message);
+
+ const response: ProtocolResponse = {
+ id: message.id,
+ };
+ try {
+ response.result = await this._handleCommand(message);
+ } catch (error: any) {
+ debugLog('Error handling command:', error);
+ response.error = error.message;
+ }
+ debugLog('Sending response:', response);
+ this._sendMessage(response);
+ }
+
+ private async _handleCommand(message: ProtocolCommand): Promise<any> {
+ if (message.method === 'attachToTab') {
+ await this._tabPromise;
+ debugLog('Attaching debugger to tab:', this._debuggee);
+ await chrome.debugger.attach(this._debuggee, '1.3');
+ const result: any = await chrome.debugger.sendCommand(this._debuggee, 'Target.getTargetInfo');
+ return {
+ targetInfo: result?.targetInfo,
+ };
+ }
+ if (!this._debuggee.tabId)
+ throw new Error('No tab is connected. Please go to the Playwright MCP extension and select the tab you want to connect to.');
+ if (message.method === 'forwardCDPCommand') {
+ const { sessionId, method, params } = message.params;
+ debugLog('CDP command:', method, params);
+ const debuggerSession: chrome.debugger.DebuggerSession = {
+ ...this._debuggee,
+ sessionId,
+ };
+ // Forward CDP command to chrome.debugger
+ return await chrome.debugger.sendCommand(
+ debuggerSession,
+ method,
+ params
+ );
+ }
+ }
+
+ private _sendError(code: number, message: string): void {
+ this._sendMessage({
+ error: {
+ code,
+ message,
+ },
+ });
+ }
+
+ private _sendMessage(message: any): void {
+ if (this._ws.readyState === WebSocket.OPEN)
+ this._ws.send(JSON.stringify(message));
+ }
+}
diff --git a/packages/mcp-extension/src/ui/connect.css b/packages/mcp-extension/src/ui/connect.css
new file mode 100644
index 0000000000..60945d4d4b
--- /dev/null
+++ b/packages/mcp-extension/src/ui/connect.css
@@ -0,0 +1,206 @@
+/*
+ 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.
+*/
+
+body {
+ margin: 0;
+ padding: 0;
+}
+
+/* Base styles */
+.app-container {
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
+ background-color: #ffffff;
+ color: #1f2328;
+ margin: 0;
+ padding: 16px;
+ min-height: 100vh;
+ font-size: 14px;
+}
+
+.content-wrapper {
+ max-width: 600px;
+ margin: 0 auto;
+}
+
+/* Status Banner */
+.status-container {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-bottom: 16px;
+ padding-right: 12px;
+}
+
+.status-banner {
+ padding: 12px;
+ font-size: 14px;
+ font-weight: 500;
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ flex: 1;
+}
+
+.status-banner.connected {
+ color: #1f2328;
+}
+
+.status-banner.connected::before {
+ content: "\2705";
+ margin-right: 8px;
+}
+
+.status-banner.error {
+ color: #1f2328;
+}
+
+.status-banner.error::before {
+ content: "\274C";
+ margin-right: 8px;
+}
+
+/* Buttons */
+.button-container {
+ margin-bottom: 16px;
+ display: flex;
+ justify-content: flex-end;
+ padding-right: 12px;
+}
+
+.button {
+ padding: 8px 16px;
+ border-radius: 6px;
+ border: none;
+ font-size: 14px;
+ font-weight: 500;
+ cursor: pointer;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ text-decoration: none;
+ margin-right: 8px;
+ min-width: 90px;
+}
+
+.button.primary {
+ background-color: #f8f9fa;
+ color: #3c4043;
+ border: 1px solid #dadce0;
+}
+
+.button.primary:hover {
+ background-color: #f1f3f4;
+ border-color: #dadce0;
+ box-shadow: 0 1px 2px 0 rgba(60,64,67,.1);
+}
+
+.button.default {
+ background-color: #f6f8fa;
+ color: #24292f;
+}
+
+.button.default:hover {
+ background-color: #f3f4f6;
+}
+
+.button.reject {
+ background-color: #da3633;
+ color: #ffffff;
+ border: 1px solid #da3633;
+}
+
+.button.reject:hover {
+ background-color: #c73836;
+ border-color: #c73836;
+}
+
+/* Tab selection */
+.tab-section-title {
+ padding-left: 12px;
+ font-size: 12px;
+ font-weight: 400;
+ margin-bottom: 12px;
+ color: #656d76;
+}
+
+.tab-item {
+ display: flex;
+ align-items: center;
+ padding: 12px;
+ margin-bottom: 8px;
+ background-color: #ffffff;
+ cursor: pointer;
+ border-radius: 6px;
+ transition: background-color 0.2s ease;
+}
+
+.tab-item:hover {
+ background-color: #f8f9fa;
+}
+
+.tab-item.selected {
+ background-color: #f6f8fa;
+}
+
+.tab-item.disabled {
+ cursor: not-allowed;
+ opacity: 0.5;
+}
+
+.tab-radio {
+ margin-right: 12px;
+ flex-shrink: 0;
+}
+
+.tab-favicon {
+ width: 16px;
+ height: 16px;
+ margin-right: 8px;
+ flex-shrink: 0;
+}
+
+.tab-content {
+ flex: 1;
+ min-width: 0;
+}
+
+.tab-title {
+ font-weight: 500;
+ color: #1f2328;
+ margin-bottom: 2px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.tab-url {
+ font-size: 12px;
+ color: #656d76;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+/* Link-style button */
+.link-button {
+ background: none;
+ border: none;
+ color: #0066cc;
+ text-decoration: underline;
+ cursor: pointer;
+ padding: 0;
+ font: inherit;
+}
\ No newline at end of file
diff --git a/packages/mcp-extension/src/ui/connect.html b/packages/mcp-extension/src/ui/connect.html
new file mode 100644
index 0000000000..3f20e4b360
--- /dev/null
+++ b/packages/mcp-extension/src/ui/connect.html
@@ -0,0 +1,29 @@
+<!--
+ 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.
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Playwright MCP extension</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="icon" type="image/png" sizes="32x32" href="../../icons/icon-32.png">
+ <link rel="icon" type="image/png" sizes="16x16" href="../../icons/icon-16.png">
+ <link rel="stylesheet" href="connect.css">
+</head>
+<body>
+ <div id="root"></div>
+ <script type="module" src="connect.tsx"></script>
+</body>
+</html>
\ No newline at end of file
diff --git a/packages/mcp-extension/src/ui/connect.tsx b/packages/mcp-extension/src/ui/connect.tsx
new file mode 100644
index 0000000000..153017b5bb
--- /dev/null
+++ b/packages/mcp-extension/src/ui/connect.tsx
@@ -0,0 +1,233 @@
+/**
+ * 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 React, { useState, useEffect, useCallback } from 'react';
+import { createRoot } from 'react-dom/client';
+import { Button, TabItem } from './tabItem';
+import type { TabInfo } from './tabItem';
+
+type Status =
+ | { type: 'connecting'; message: string }
+ | { type: 'connected'; message: string }
+ | { type: 'error'; message: string }
+ | { type: 'error'; versionMismatch: { extensionVersion: string; } };
+
+const SUPPORTED_PROTOCOL_VERSION = 1;
+
+const ConnectApp: React.FC = () => {
+ const [tabs, setTabs] = useState<TabInfo[]>([]);
+ const [status, setStatus] = useState<Status | null>(null);
+ const [showButtons, setShowButtons] = useState(true);
+ const [showTabList, setShowTabList] = useState(true);
+ const [clientInfo, setClientInfo] = useState('unknown');
+ const [mcpRelayUrl, setMcpRelayUrl] = useState('');
+ const [newTab, setNewTab] = useState<boolean>(false);
+
+ useEffect(() => {
+ const params = new URLSearchParams(window.location.search);
+ const relayUrl = params.get('mcpRelayUrl');
+
+ if (!relayUrl) {
+ setShowButtons(false);
+ setStatus({ type: 'error', message: 'Missing mcpRelayUrl parameter in URL.' });
+ return;
+ }
+
+ setMcpRelayUrl(relayUrl);
+
+ try {
+ const client = JSON.parse(params.get('client') || '{}');
+ const info = `${client.name}/${client.version}`;
+ setClientInfo(info);
+ setStatus({
+ type: 'connecting',
+ message: `🎭 Playwright MCP started from "${info}" is trying to connect. Do you want to continue?`
+ });
+ } catch (e) {
+ setStatus({ type: 'error', message: 'Failed to parse client version.' });
+ return;
+ }
+
+ const parsedVersion = parseInt(params.get('protocolVersion') ?? '', 10);
+ const requiredVersion = isNaN(parsedVersion) ? 1 : parsedVersion;
+ if (requiredVersion > SUPPORTED_PROTOCOL_VERSION) {
+ const extensionVersion = chrome.runtime.getManifest().version;
+ setShowButtons(false);
+ setShowTabList(false);
+ setStatus({
+ type: 'error',
+ versionMismatch: {
+ extensionVersion,
+ }
+ });
+ return;
+ }
+
+ void connectToMCPRelay(relayUrl);
+
+ // If this is a browser_navigate command, hide the tab list and show simple allow/reject
+ if (params.get('newTab') === 'true') {
+ setNewTab(true);
+ setShowTabList(false);
+ } else {
+ void loadTabs();
+ }
+ }, []);
+
+ const handleReject = useCallback((message: string) => {
+ setShowButtons(false);
+ setShowTabList(false);
+ setStatus({ type: 'error', message });
+ }, []);
+
+ const connectToMCPRelay = useCallback(async (mcpRelayUrl: string) => {
+
+ const response = await chrome.runtime.sendMessage({ type: 'connectToMCPRelay', mcpRelayUrl });
+ if (!response.success)
+ handleReject(response.error);
+ }, [handleReject]);
+
+ const loadTabs = useCallback(async () => {
+ const response = await chrome.runtime.sendMessage({ type: 'getTabs' });
+ if (response.success)
+ setTabs(response.tabs);
+ else
+ setStatus({ type: 'error', message: 'Failed to load tabs: ' + response.error });
+ }, []);
+
+ const handleConnectToTab = useCallback(async (tab?: TabInfo) => {
+ setShowButtons(false);
+ setShowTabList(false);
+
+ try {
+ const response = await chrome.runtime.sendMessage({
+ type: 'connectToTab',
+ mcpRelayUrl,
+ tabId: tab?.id,
+ windowId: tab?.windowId,
+ });
+
+ if (response?.success) {
+ setStatus({ type: 'connected', message: `MCP client "${clientInfo}" connected.` });
+ } else {
+ setStatus({
+ type: 'error',
+ message: response?.error || `MCP client "${clientInfo}" failed to connect.`
+ });
+ }
+ } catch (e) {
+ setStatus({
+ type: 'error',
+ message: `MCP client "${clientInfo}" failed to connect: ${e}`
+ });
+ }
+ }, [clientInfo, mcpRelayUrl]);
+
+ useEffect(() => {
+ const listener = (message: any) => {
+ if (message.type === 'connectionTimeout')
+ handleReject('Connection timed out.');
+ };
+ chrome.runtime.onMessage.addListener(listener);
+ return () => {
+ chrome.runtime.onMessage.removeListener(listener);
+ };
+ }, [handleReject]);
+
+ return (
+ <div className='app-container'>
+ <div className='content-wrapper'>
+ {status && (
+ <div className='status-container'>
+ <StatusBanner status={status} />
+ {showButtons && (
+ <div className='button-container'>
+ {newTab ? (
+ <>
+ <Button variant='primary' onClick={() => handleConnectToTab()}>
+ Allow
+ </Button>
+ <Button variant='reject' onClick={() => handleReject('Connection rejected. This tab can be closed.')}>
+ Reject
+ </Button>
+ </>
+ ) : (
+ <Button variant='reject' onClick={() => handleReject('Connection rejected. This tab can be closed.')}>
+ Reject
+ </Button>
+ )}
+ </div>
+ )}
+ </div>
+ )}
+
+ {showTabList && (
+ <div>
+ <div className='tab-section-title'>
+ Select page to expose to MCP server:
+ </div>
+ <div>
+ {tabs.map(tab => (
+ <TabItem
+ key={tab.id}
+ tab={tab}
+ button={
+ <Button variant='primary' onClick={() => handleConnectToTab(tab)}>
+ Connect
+ </Button>
+ }
+ />
+ ))}
+ </div>
+ </div>
+ )}
+ </div>
+ </div>
+ );
+};
+
+const VersionMismatchError: React.FC<{ extensionVersion: string }> = ({ extensionVersion }) => {
+ const readmeUrl = 'https://github.com/microsoft/playwright-mcp/blob/main/extension/README.md';
+ const latestReleaseUrl = 'https://github.com/microsoft/playwright-mcp/releases/latest';
+ return (
+ <div>
+ Playwright MCP version trying to connect requires newer extension version (current version: {extensionVersion}).{' '}
+ <a href={latestReleaseUrl}>Click here</a> to download latest version of the extension, then drag and drop it into the Chrome Extensions page.{' '}
+ See <a href={readmeUrl} target='_blank' rel='noopener noreferrer'>installation instructions</a> for more details.
+ </div>
+ );
+};
+
+const StatusBanner: React.FC<{ status: Status }> = ({ status }) => {
+ return (
+ <div className={`status-banner ${status.type}`}>
+ {'versionMismatch' in status ? (
+ <VersionMismatchError
+ extensionVersion={status.versionMismatch.extensionVersion}
+ />
+ ) : (
+ status.message
+ )}
+ </div>
+ );
+};
+
+// Initialize the React app
+const container = document.getElementById('root');
+if (container) {
+ const root = createRoot(container);
+ root.render(<ConnectApp />);
+}
diff --git a/packages/mcp-extension/src/ui/status.html b/packages/mcp-extension/src/ui/status.html
new file mode 100644
index 0000000000..ccc1f04aa9
--- /dev/null
+++ b/packages/mcp-extension/src/ui/status.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>Playwright MCP Bridge Status</title>
+ <link rel="stylesheet" href="connect.css">
+</head>
+<body>
+ <div id="root"></div>
+ <script src="status.tsx" type="module"></script>
+</body>
+</html>
\ No newline at end of file
diff --git a/packages/mcp-extension/src/ui/status.tsx b/packages/mcp-extension/src/ui/status.tsx
new file mode 100644
index 0000000000..f8de788807
--- /dev/null
+++ b/packages/mcp-extension/src/ui/status.tsx
@@ -0,0 +1,110 @@
+/**
+ * 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 React, { useState, useEffect } from 'react';
+import { createRoot } from 'react-dom/client';
+import { Button, TabItem } from './tabItem';
+
+import type { TabInfo } from './tabItem';
+
+interface ConnectionStatus {
+ isConnected: boolean;
+ connectedTabId: number | null;
+ connectedTab?: TabInfo;
+}
+
+const StatusApp: React.FC = () => {
+ const [status, setStatus] = useState<ConnectionStatus>({
+ isConnected: false,
+ connectedTabId: null
+ });
+
+ useEffect(() => {
+ void loadStatus();
+ }, []);
+
+ const loadStatus = async () => {
+ // Get current connection status from background script
+ const { connectedTabId } = await chrome.runtime.sendMessage({ type: 'getConnectionStatus' });
+ if (connectedTabId) {
+ const tab = await chrome.tabs.get(connectedTabId);
+ setStatus({
+ isConnected: true,
+ connectedTabId,
+ connectedTab: {
+ id: tab.id!,
+ windowId: tab.windowId!,
+ title: tab.title!,
+ url: tab.url!,
+ favIconUrl: tab.favIconUrl
+ }
+ });
+ } else {
+ setStatus({
+ isConnected: false,
+ connectedTabId: null
+ });
+ }
+ };
+
+ const openConnectedTab = async () => {
+ if (!status.connectedTabId)
+ return;
+ await chrome.tabs.update(status.connectedTabId, { active: true });
+ window.close();
+ };
+
+ const disconnect = async () => {
+ await chrome.runtime.sendMessage({ type: 'disconnect' });
+ window.close();
+ };
+
+ return (
+ <div className='app-container'>
+ <div className='content-wrapper'>
+ {status.isConnected && status.connectedTab ? (
+ <div>
+ <div className='tab-section-title'>
+ Page with connected MCP client:
+ </div>
+ <div>
+ <TabItem
+ tab={status.connectedTab}
+ button={
+ <Button variant='primary' onClick={disconnect}>
+ Disconnect
+ </Button>
+ }
+ onClick={openConnectedTab}
+ />
+ </div>
+ </div>
+ ) : (
+ <div className='status-banner'>
+ No MCP clients are currently connected.
+ </div>
+ )}
+ </div>
+ </div>
+ );
+};
+
+// Initialize the React app
+const container = document.getElementById('root');
+if (container) {
+ const root = createRoot(container);
+ root.render(<StatusApp />);
+}
diff --git a/packages/mcp-extension/src/ui/tabItem.tsx b/packages/mcp-extension/src/ui/tabItem.tsx
new file mode 100644
index 0000000000..148374292f
--- /dev/null
+++ b/packages/mcp-extension/src/ui/tabItem.tsx
@@ -0,0 +1,67 @@
+/**
+ * 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 React from 'react';
+
+export interface TabInfo {
+ id: number;
+ windowId: number;
+ title: string;
+ url: string;
+ favIconUrl?: string;
+}
+
+export const Button: React.FC<{ variant: 'primary' | 'default' | 'reject'; onClick: () => void; children: React.ReactNode }> = ({
+ variant,
+ onClick,
+ children
+}) => {
+ return (
+ <button className={`button ${variant}`} onClick={onClick}>
+ {children}
+ </button>
+ );
+};
+
+
+export interface TabItemProps {
+ tab: TabInfo;
+ onClick?: () => void;
+ button?: React.ReactNode;
+}
+
+export const TabItem: React.FC<TabItemProps> = ({
+ tab,
+ onClick,
+ button
+}) => {
+ return (
+ <div className='tab-item' onClick={onClick} style={onClick ? { cursor: 'pointer' } : undefined}>
+ <img
+ src={tab.favIconUrl || 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><rect width="16" height="16" fill="%23f6f8fa"/></svg>'}
+ alt=''
+ className='tab-favicon'
+ />
+ <div className='tab-content'>
+ <div className='tab-title'>
+ {tab.title || 'Untitled'}
+ </div>
+ <div className='tab-url'>{tab.url}</div>
+ </div>
+ {button}
+ </div>
+ );
+};
diff --git a/packages/mcp-extension/src/ui/tsconfig.json b/packages/mcp-extension/src/ui/tsconfig.json
new file mode 100644
index 0000000000..77839b62d2
--- /dev/null
+++ b/packages/mcp-extension/src/ui/tsconfig.json
@@ -0,0 +1,4 @@
+// Help VSCode to find right tsconfig file.
+{
+ "extends": "../../tsconfig.ui.json"
+}
diff --git a/packages/mcp-extension/tsconfig.json b/packages/mcp-extension/tsconfig.json
new file mode 100644
index 0000000000..9c22b0bca0
--- /dev/null
+++ b/packages/mcp-extension/tsconfig.json
@@ -0,0 +1,22 @@
+{
+ "compilerOptions": {
+ "target": "ESNext",
+ "esModuleInterop": true,
+ "moduleResolution": "node",
+ "strict": true,
+ "module": "ESNext",
+ "rootDir": "src",
+ "outDir": "./dist/lib",
+ "resolveJsonModule": true,
+ "types": ["chrome"],
+ "jsx": "react-jsx",
+ "jsxImportSource": "react",
+ "noEmit": true
+ },
+ "include": [
+ "src",
+ ],
+ "exclude": [
+ "src/ui",
+ ]
+}
diff --git a/packages/mcp-extension/tsconfig.ui.json b/packages/mcp-extension/tsconfig.ui.json
new file mode 100644
index 0000000000..f62dd8a3f7
--- /dev/null
+++ b/packages/mcp-extension/tsconfig.ui.json
@@ -0,0 +1,19 @@
+{
+ "compilerOptions": {
+ "target": "ESNext",
+ "esModuleInterop": true,
+ "moduleResolution": "node",
+ "strict": true,
+ "module": "ESNext",
+ "rootDir": "src",
+ "outDir": "./lib",
+ "resolveJsonModule": true,
+ "types": ["chrome"],
+ "jsx": "react-jsx",
+ "jsxImportSource": "react",
+ "noEmit": true,
+ },
+ "include": [
+ "src/ui",
+ ],
+}
diff --git a/packages/mcp-extension/vite.config.mts b/packages/mcp-extension/vite.config.mts
new file mode 100644
index 0000000000..89ec56c689
--- /dev/null
+++ b/packages/mcp-extension/vite.config.mts
@@ -0,0 +1,54 @@
+/**
+ * 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 { resolve } from 'path';
+import { defineConfig } from 'vite';
+import react from '@vitejs/plugin-react';
+import { viteStaticCopy } from 'vite-plugin-static-copy';
+
+// https://vitejs.dev/config/
+export default defineConfig({
+ plugins: [
+ react(),
+ viteStaticCopy({
+ targets: [
+ {
+ src: '../../icons/*',
+ dest: 'icons'
+ },
+ {
+ src: '../../manifest.json',
+ dest: '.'
+ }
+ ]
+ })
+ ],
+ root: resolve(__dirname, 'src/ui'),
+ build: {
+ outDir: resolve(__dirname, 'dist/'),
+ emptyOutDir: false,
+ minify: false,
+ rollupOptions: {
+ input: ['src/ui/connect.html', 'src/ui/status.html'],
+ output: {
+ manualChunks: undefined,
+ entryFileNames: 'lib/ui/[name].js',
+ chunkFileNames: 'lib/ui/[name].js',
+ assetFileNames: 'lib/ui/[name].[ext]'
+ }
+ }
+ }
+});
diff --git a/packages/mcp-extension/vite.sw.config.mts b/packages/mcp-extension/vite.sw.config.mts
new file mode 100644
index 0000000000..a383e4b4a5
--- /dev/null
+++ b/packages/mcp-extension/vite.sw.config.mts
@@ -0,0 +1,31 @@
+/**
+ * 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 { resolve } from 'path';
+import { defineConfig } from 'vite';
+
+export default defineConfig({
+ build: {
+ lib: {
+ entry: resolve(__dirname, 'src/background.ts'),
+ fileName: 'lib/background',
+ formats: ['es']
+ },
+ outDir: 'dist',
+ emptyOutDir: false,
+ minify: false
+ }
+});
diff --git a/packages/playwright-core/bundles/utils/src/utilsBundleImpl.ts b/packages/playwright-core/bundles/utils/src/utilsBundleImpl.ts
index 409372e894..83a1074f17 100644
--- a/packages/playwright-core/bundles/utils/src/utilsBundleImpl.ts
+++ b/packages/playwright-core/bundles/utils/src/utilsBundleImpl.ts
@@ -50,6 +50,7 @@ export const open = openLibrary;
export { PNG } from 'pngjs';
export { program } from 'commander';
+export { Option as ProgramOption } from 'commander';
import progressLibrary from 'progress';
export const progress = progressLibrary;
diff --git a/packages/playwright-core/src/utilsBundle.ts b/packages/playwright-core/src/utilsBundle.ts
index 41cccd1f57..a0a9e695b7 100644
--- a/packages/playwright-core/src/utilsBundle.ts
+++ b/packages/playwright-core/src/utilsBundle.ts
@@ -27,6 +27,7 @@ export const minimatch: typeof import('../bundles/utils/node_modules/@types/mini
export const open: typeof import('../bundles/utils/node_modules/open') = require('./utilsBundleImpl').open;
export const PNG: typeof import('../bundles/utils/node_modules/@types/pngjs').PNG = require('./utilsBundleImpl').PNG;
export const program: typeof import('../bundles/utils/node_modules/commander').program = require('./utilsBundleImpl').program;
+export const ProgramOption: typeof import('../bundles/utils/node_modules/commander').Option = require('./utilsBundleImpl').ProgramOption;
export const progress: typeof import('../bundles/utils/node_modules/@types/progress') = require('./utilsBundleImpl').progress;
export const SocksProxyAgent: typeof import('../bundles/utils/node_modules/socks-proxy-agent').SocksProxyAgent = require('./utilsBundleImpl').SocksProxyAgent;
export const yaml: typeof import('../bundles/utils/node_modules/yaml') = require('./utilsBundleImpl').yaml;
diff --git a/packages/playwright/ThirdPartyNotices.txt b/packages/playwright/ThirdPartyNotices.txt
index cdfac862b8..5754ac2a36 100644
--- a/packages/playwright/ThirdPartyNotices.txt
+++ b/packages/playwright/ThirdPartyNotices.txt
@@ -62,7 +62,7 @@ This project incorporates components from the projects listed below. The origina
- @jridgewell/[email protected] (https://github.com/jridgewell/resolve-uri)
- @jridgewell/[email protected] (https://github.com/jridgewell/sourcemaps)
- @jridgewell/[email protected] (https://github.com/jridgewell/sourcemaps)
-- @modelcontextprotocol/[email protected] (https://github.com/modelcontextprotocol/typescript-sdk)
+- @modelcontextprotocol/[email protected] (https://github.com/modelcontextprotocol/typescript-sdk)
- @sinclair/[email protected] (https://github.com/sinclairzx81/typebox)
- @types/[email protected] (https://github.com/DefinitelyTyped/DefinitelyTyped)
- @types/[email protected] (https://github.com/DefinitelyTyped/DefinitelyTyped)
@@ -1955,7 +1955,7 @@ SOFTWARE.
=========================================
END OF @jridgewell/[email protected] AND INFORMATION
-%% @modelcontextprotocol/[email protected] NOTICES AND INFORMATION BEGIN HERE
+%% @modelcontextprotocol/[email protected] NOTICES AND INFORMATION BEGIN HERE
=========================================
MIT License
@@ -1979,7 +1979,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
=========================================
-END OF @modelcontextprotocol/[email protected] AND INFORMATION
+END OF @modelcontextprotocol/[email protected] AND INFORMATION
%% @sinclair/[email protected] NOTICES AND INFORMATION BEGIN HERE
=========================================
diff --git a/packages/playwright/bundles/mcp/package-lock.json b/packages/playwright/bundles/mcp/package-lock.json
index 9c8d24a2ed..fa26c67851 100644
--- a/packages/playwright/bundles/mcp/package-lock.json
+++ b/packages/playwright/bundles/mcp/package-lock.json
@@ -8,15 +8,15 @@
"name": "mcp-bundle",
"version": "0.0.1",
"dependencies": {
- "@modelcontextprotocol/sdk": "^1.17.3",
+ "@modelcontextprotocol/sdk": "^1.17.5",
"zod": "^3.25.76",
"zod-to-json-schema": "^3.24.6"
}
},
"node_modules/@modelcontextprotocol/sdk": {
- "version": "1.17.3",
- "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.17.3.tgz",
- "integrity": "sha512-JPwUKWSsbzx+DLFznf/QZ32Qa+ptfbUlHhRLrBQBAFu9iI1iYvizM4p+zhhRDceSsPutXp4z+R/HPVphlIiclg==",
+ "version": "1.17.5",
+ "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.17.5.tgz",
+ "integrity": "sha512-QakrKIGniGuRVfWBdMsDea/dx1PNE739QJ7gCM41s9q+qaCYTHCdsIBXQVVXry3mfWAiaM9kT22Hyz53Uw8mfg==",
"license": "MIT",
"dependencies": {
"ajv": "^6.12.6",
diff --git a/packages/playwright/bundles/mcp/package.json b/packages/playwright/bundles/mcp/package.json
index be2ee06a43..9c39c6db79 100644
--- a/packages/playwright/bundles/mcp/package.json
+++ b/packages/playwright/bundles/mcp/package.json
@@ -3,7 +3,7 @@
"version": "0.0.1",
"private": true,
"dependencies": {
- "@modelcontextprotocol/sdk": "^1.17.3",
+ "@modelcontextprotocol/sdk": "^1.17.5",
"zod": "^3.25.76",
"zod-to-json-schema": "^3.24.6"
}
diff --git a/packages/playwright/package.json b/packages/playwright/package.json
index f592f9ebf2..0e47ef02e9 100644
--- a/packages/playwright/package.json
+++ b/packages/playwright/package.json
@@ -21,7 +21,10 @@
"./package.json": "./package.json",
"./lib/common/configLoader": "./lib/common/configLoader.js",
"./lib/fsWatcher": "./lib/fsWatcher.js",
- "./lib/mcpBundleImpl": "./lib/mcpBundleImpl.js",
+ "./lib/mcp/index": "./lib/mcp/index.js",
+ "./lib/mcp/browser/tools": "./lib/mcp/browser/tools.js",
+ "./lib/mcp/program": "./lib/mcp/program.js",
+ "./lib/mcp/sdk/bundle": "./lib/mcp/sdk/bundle.js",
"./lib/mcp/sdk/exports": "./lib/mcp/sdk/exports.js",
"./lib/program": "./lib/program.js",
"./lib/reporters/base": "./lib/reporters/base.js",
diff --git a/packages/playwright/src/DEPS.list b/packages/playwright/src/DEPS.list
index b667396ff3..d0c1ac71bc 100644
--- a/packages/playwright/src/DEPS.list
+++ b/packages/playwright/src/DEPS.list
@@ -12,6 +12,7 @@ common/
./worker/testTracing.ts
./mcp/browser/
./mcp/sdk/
+./mcp/test/
./transform/babelBundle.ts
[internalsForTest.ts]
diff --git a/packages/playwright/src/index.ts b/packages/playwright/src/index.ts
index 7a78630475..b9b681838e 100644
--- a/packages/playwright/src/index.ts
+++ b/packages/playwright/src/index.ts
@@ -22,7 +22,7 @@ import { setBoxedStackPrefixes, createGuid, currentZone, debugMode, jsonStringif
import { currentTestInfo } from './common/globals';
import { rootTestType } from './common/testType';
-import { runBrowserBackendOnError } from './mcp/browser/backend';
+import { runBrowserBackendOnError } from './mcp/test/browserBackend';
import { codeFrameColumns } from './transform/babelBundle';
import { stripAnsiEscapes } from './util';
diff --git a/packages/playwright/src/matchers/DEPS.list b/packages/playwright/src/matchers/DEPS.list
index 978b4038f5..b205c62130 100644
--- a/packages/playwright/src/matchers/DEPS.list
+++ b/packages/playwright/src/matchers/DEPS.list
@@ -1,6 +1,6 @@
[*]
../common/
-../mcp/browser/backend.ts
+../mcp/test/browserBackend.ts
../util.ts
../utilsBundle.ts
../worker/testInfo.ts
diff --git a/packages/playwright/src/matchers/toBeTruthy.ts b/packages/playwright/src/matchers/toBeTruthy.ts
index 7e3f1dbcaf..3f6144eaf8 100644
--- a/packages/playwright/src/matchers/toBeTruthy.ts
+++ b/packages/playwright/src/matchers/toBeTruthy.ts
@@ -16,7 +16,7 @@
import { callLogText, expectTypes } from '../util';
import { kNoElementsFoundError, matcherHint } from './matcherHint';
-import { runBrowserBackendOnError } from '../mcp/browser/backend';
+import { runBrowserBackendOnError } from '../mcp/test/browserBackend';
import type { MatcherResult } from './matcherHint';
import type { ExpectMatcherState } from '../../types/test';
diff --git a/packages/playwright/src/matchers/toEqual.ts b/packages/playwright/src/matchers/toEqual.ts
index 410049b23a..1c4a0bf6c9 100644
--- a/packages/playwright/src/matchers/toEqual.ts
+++ b/packages/playwright/src/matchers/toEqual.ts
@@ -18,7 +18,7 @@ import { isRegExp } from 'playwright-core/lib/utils';
import { callLogText, expectTypes } from '../util';
import { matcherHint } from './matcherHint';
-import { runBrowserBackendOnError } from '../mcp/browser/backend';
+import { runBrowserBackendOnError } from '../mcp/test/browserBackend';
import type { MatcherResult } from './matcherHint';
import type { ExpectMatcherState } from '../../types/test';
diff --git a/packages/playwright/src/matchers/toMatchText.ts b/packages/playwright/src/matchers/toMatchText.ts
index 65630e2ffc..04b4c84a74 100644
--- a/packages/playwright/src/matchers/toMatchText.ts
+++ b/packages/playwright/src/matchers/toMatchText.ts
@@ -24,7 +24,7 @@ import {
} from './expect';
import { kNoElementsFoundError, matcherHint } from './matcherHint';
import { EXPECTED_COLOR } from '../common/expectBundle';
-import { runBrowserBackendOnError } from '../mcp/browser/backend';
+import { runBrowserBackendOnError } from '../mcp/test/browserBackend';
import type { MatcherResult } from './matcherHint';
import type { ExpectMatcherState } from '../../types/test';
diff --git a/packages/playwright/src/mcp/DEPS.list b/packages/playwright/src/mcp/DEPS.list
new file mode 100644
index 0000000000..37011f7172
--- /dev/null
+++ b/packages/playwright/src/mcp/DEPS.list
@@ -0,0 +1,8 @@
+[program.ts]
+./sdk/
+./browser/
+./extension/
+
+[index.ts]
+./sdk/
+./browser/
diff --git a/packages/playwright/src/mcp/browser/DEPS.list b/packages/playwright/src/mcp/browser/DEPS.list
index 9bdbc0d02a..936611f47b 100644
--- a/packages/playwright/src/mcp/browser/DEPS.list
+++ b/packages/playwright/src/mcp/browser/DEPS.list
@@ -1,3 +1,5 @@
[*]
+./tools/
../sdk/
-../../util.ts
+../log.ts
+../package.ts
diff --git a/packages/playwright/src/mcp/browser/actions.d.ts b/packages/playwright/src/mcp/browser/actions.d.ts
new file mode 100644
index 0000000000..e52b420b90
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/actions.d.ts
@@ -0,0 +1,172 @@
+/**
+ * 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.
+ */
+
+type Point = { x: number, y: number };
+
+export type ActionName =
+ 'check' |
+ 'click' |
+ 'closePage' |
+ 'fill' |
+ 'navigate' |
+ 'openPage' |
+ 'press' |
+ 'select' |
+ 'uncheck' |
+ 'setInputFiles' |
+ 'assertText' |
+ 'assertValue' |
+ 'assertChecked' |
+ 'assertVisible' |
+ 'assertSnapshot';
+
+export type ActionBase = {
+ name: ActionName,
+ signals: Signal[],
+ ariaSnapshot?: string,
+};
+
+export type ActionWithSelector = ActionBase & {
+ selector: string,
+ ref?: string,
+};
+
+export type ClickAction = ActionWithSelector & {
+ name: 'click',
+ button: 'left' | 'middle' | 'right',
+ modifiers: number,
+ clickCount: number,
+ position?: Point,
+};
+
+export type CheckAction = ActionWithSelector & {
+ name: 'check',
+};
+
+export type UncheckAction = ActionWithSelector & {
+ name: 'uncheck',
+};
+
+export type FillAction = ActionWithSelector & {
+ name: 'fill',
+ text: string,
+};
+
+export type NavigateAction = ActionBase & {
+ name: 'navigate',
+ url: string,
+};
+
+export type OpenPageAction = ActionBase & {
+ name: 'openPage',
+ url: string,
+};
+
+export type ClosesPageAction = ActionBase & {
+ name: 'closePage',
+};
+
+export type PressAction = ActionWithSelector & {
+ name: 'press',
+ key: string,
+ modifiers: number,
+};
+
+export type SelectAction = ActionWithSelector & {
+ name: 'select',
+ options: string[],
+};
+
+export type SetInputFilesAction = ActionWithSelector & {
+ name: 'setInputFiles',
+ files: string[],
+};
+
+export type AssertTextAction = ActionWithSelector & {
+ name: 'assertText',
+ text: string,
+ substring: boolean,
+};
+
+export type AssertValueAction = ActionWithSelector & {
+ name: 'assertValue',
+ value: string,
+};
+
+export type AssertCheckedAction = ActionWithSelector & {
+ name: 'assertChecked',
+ checked: boolean,
+};
+
+export type AssertVisibleAction = ActionWithSelector & {
+ name: 'assertVisible',
+};
+
+export type AssertSnapshotAction = ActionWithSelector & {
+ name: 'assertSnapshot',
+ ariaSnapshot: string,
+};
+
+export type Action = ClickAction | CheckAction | ClosesPageAction | OpenPageAction | UncheckAction | FillAction | NavigateAction | PressAction | SelectAction | SetInputFilesAction | AssertTextAction | AssertValueAction | AssertCheckedAction | AssertVisibleAction | AssertSnapshotAction;
+export type AssertAction = AssertCheckedAction | AssertValueAction | AssertTextAction | AssertVisibleAction | AssertSnapshotAction;
+export type PerformOnRecordAction = ClickAction | CheckAction | UncheckAction | PressAction | SelectAction;
+
+// Signals.
+
+export type BaseSignal = {
+};
+
+export type NavigationSignal = BaseSignal & {
+ name: 'navigation',
+ url: string,
+};
+
+export type PopupSignal = BaseSignal & {
+ name: 'popup',
+ popupAlias: string,
+};
+
+export type DownloadSignal = BaseSignal & {
+ name: 'download',
+ downloadAlias: string,
+};
+
+export type DialogSignal = BaseSignal & {
+ name: 'dialog',
+ dialogAlias: string,
+};
+
+export type Signal = NavigationSignal | PopupSignal | DownloadSignal | DialogSignal;
+
+export type FrameDescription = {
+ pageGuid: string;
+ pageAlias: string;
+ framePath: string[];
+};
+
+export type ActionInContext = {
+ frame: FrameDescription;
+ description?: string;
+ action: Action;
+ startTime: number;
+ endTime?: number;
+};
+
+export type SignalInContext = {
+ frame: FrameDescription;
+ signal: Signal;
+ timestamp: number;
+};
diff --git a/packages/playwright/src/mcp/browser/browserContextFactory.ts b/packages/playwright/src/mcp/browser/browserContextFactory.ts
new file mode 100644
index 0000000000..6021896cbb
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/browserContextFactory.ts
@@ -0,0 +1,251 @@
+/**
+ * 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 crypto from 'crypto';
+import fs from 'fs';
+import net from 'net';
+import path from 'path';
+
+import * as playwright from 'playwright-core';
+import { registryDirectory } from 'playwright-core/lib/server/registry/index';
+import { startTraceViewerServer } from 'playwright-core/lib/server';
+import { logUnhandledError, testDebug } from '../log';
+import { outputFile } from './config';
+
+import type { FullConfig } from './config';
+
+export function contextFactory(config: FullConfig): BrowserContextFactory {
+ if (config.browser.remoteEndpoint)
+ return new RemoteContextFactory(config);
+ if (config.browser.cdpEndpoint)
+ return new CdpContextFactory(config);
+ if (config.browser.isolated)
+ return new IsolatedContextFactory(config);
+ return new PersistentContextFactory(config);
+}
+
+export type ClientInfo = { name?: string, version?: string, rootPath?: string };
+
+export interface BrowserContextFactory {
+ createContext(clientInfo: ClientInfo, abortSignal: AbortSignal, toolName: string | undefined): Promise<{ browserContext: playwright.BrowserContext, close: () => Promise<void> }>;
+}
+
+class BaseContextFactory implements BrowserContextFactory {
+ readonly config: FullConfig;
+ private _logName: string;
+ protected _browserPromise: Promise<playwright.Browser> | undefined;
+
+ constructor(name: string, config: FullConfig) {
+ this._logName = name;
+ this.config = config;
+ }
+
+ protected async _obtainBrowser(clientInfo: ClientInfo): Promise<playwright.Browser> {
+ if (this._browserPromise)
+ return this._browserPromise;
+ testDebug(`obtain browser (${this._logName})`);
+ this._browserPromise = this._doObtainBrowser(clientInfo);
+ void this._browserPromise.then(browser => {
+ browser.on('disconnected', () => {
+ this._browserPromise = undefined;
+ });
+ }).catch(() => {
+ this._browserPromise = undefined;
+ });
+ return this._browserPromise;
+ }
+
+ protected async _doObtainBrowser(clientInfo: ClientInfo): Promise<playwright.Browser> {
+ throw new Error('Not implemented');
+ }
+
+ async createContext(clientInfo: ClientInfo): Promise<{ browserContext: playwright.BrowserContext, close: () => Promise<void> }> {
+ testDebug(`create browser context (${this._logName})`);
+ const browser = await this._obtainBrowser(clientInfo);
+ const browserContext = await this._doCreateContext(browser);
+ return { browserContext, close: () => this._closeBrowserContext(browserContext, browser) };
+ }
+
+ protected async _doCreateContext(browser: playwright.Browser): Promise<playwright.BrowserContext> {
+ throw new Error('Not implemented');
+ }
+
+ private async _closeBrowserContext(browserContext: playwright.BrowserContext, browser: playwright.Browser) {
+ testDebug(`close browser context (${this._logName})`);
+ if (browser.contexts().length === 1)
+ this._browserPromise = undefined;
+ await browserContext.close().catch(logUnhandledError);
+ if (browser.contexts().length === 0) {
+ testDebug(`close browser (${this._logName})`);
+ await browser.close().catch(logUnhandledError);
+ }
+ }
+}
+
+class IsolatedContextFactory extends BaseContextFactory {
+ constructor(config: FullConfig) {
+ super('isolated', config);
+ }
+
+ protected override async _doObtainBrowser(clientInfo: ClientInfo): Promise<playwright.Browser> {
+ await injectCdpPort(this.config.browser);
+ const browserType = playwright[this.config.browser.browserName];
+ return browserType.launch({
+ tracesDir: await startTraceServer(this.config, clientInfo.rootPath),
+ ...this.config.browser.launchOptions,
+ handleSIGINT: false,
+ handleSIGTERM: false,
+ }).catch(error => {
+ if (error.message.includes('Executable doesn\'t exist'))
+ throw new Error(`Browser specified in your config is not installed. Either install it (likely) or change the config.`);
+ throw error;
+ });
+ }
+
+ protected override async _doCreateContext(browser: playwright.Browser): Promise<playwright.BrowserContext> {
+ return browser.newContext(this.config.browser.contextOptions);
+ }
+}
+
+class CdpContextFactory extends BaseContextFactory {
+ constructor(config: FullConfig) {
+ super('cdp', config);
+ }
+
+ protected override async _doObtainBrowser(): Promise<playwright.Browser> {
+ return playwright.chromium.connectOverCDP(this.config.browser.cdpEndpoint!);
+ }
+
+ protected override async _doCreateContext(browser: playwright.Browser): Promise<playwright.BrowserContext> {
+ return this.config.browser.isolated ? await browser.newContext() : browser.contexts()[0];
+ }
+}
+
+class RemoteContextFactory extends BaseContextFactory {
+ constructor(config: FullConfig) {
+ super('remote', config);
+ }
+
+ protected override async _doObtainBrowser(): Promise<playwright.Browser> {
+ const url = new URL(this.config.browser.remoteEndpoint!);
+ url.searchParams.set('browser', this.config.browser.browserName);
+ if (this.config.browser.launchOptions)
+ url.searchParams.set('launch-options', JSON.stringify(this.config.browser.launchOptions));
+ return playwright[this.config.browser.browserName].connect(String(url));
+ }
+
+ protected override async _doCreateContext(browser: playwright.Browser): Promise<playwright.BrowserContext> {
+ return browser.newContext();
+ }
+}
+
+class PersistentContextFactory implements BrowserContextFactory {
+ readonly config: FullConfig;
+ readonly name = 'persistent';
+ readonly description = 'Create a new persistent browser context';
+
+ private _userDataDirs = new Set<string>();
+
+ constructor(config: FullConfig) {
+ this.config = config;
+ }
+
+ async createContext(clientInfo: ClientInfo): Promise<{ browserContext: playwright.BrowserContext, close: () => Promise<void> }> {
+ await injectCdpPort(this.config.browser);
+ testDebug('create browser context (persistent)');
+ const userDataDir = this.config.browser.userDataDir ?? await this._createUserDataDir(clientInfo.rootPath);
+ const tracesDir = await startTraceServer(this.config, clientInfo.rootPath);
+
+ this._userDataDirs.add(userDataDir);
+ testDebug('lock user data dir', userDataDir);
+
+ const browserType = playwright[this.config.browser.browserName];
+ for (let i = 0; i < 5; i++) {
+ try {
+ const browserContext = await browserType.launchPersistentContext(userDataDir, {
+ tracesDir,
+ ...this.config.browser.launchOptions,
+ ...this.config.browser.contextOptions,
+ handleSIGINT: false,
+ handleSIGTERM: false,
+ });
+ const close = () => this._closeBrowserContext(browserContext, userDataDir);
+ return { browserContext, close };
+ } catch (error: any) {
+ if (error.message.includes('Executable doesn\'t exist'))
+ throw new Error(`Browser specified in your config is not installed. Either install it (likely) or change the config.`);
+ if (error.message.includes('ProcessSingleton') || error.message.includes('Invalid URL')) {
+ // User data directory is already in use, try again.
+ await new Promise(resolve => setTimeout(resolve, 1000));
+ continue;
+ }
+ throw error;
+ }
+ }
+ throw new Error(`Browser is already in use for ${userDataDir}, use --isolated to run multiple instances of the same browser`);
+ }
+
+ private async _closeBrowserContext(browserContext: playwright.BrowserContext, userDataDir: string) {
+ testDebug('close browser context (persistent)');
+ testDebug('release user data dir', userDataDir);
+ await browserContext.close().catch(() => {});
+ this._userDataDirs.delete(userDataDir);
+ testDebug('close browser context complete (persistent)');
+ }
+
+ private async _createUserDataDir(rootPath: string | undefined) {
+ const dir = process.env.PWMCP_PROFILES_DIR_FOR_TEST ?? registryDirectory;
+ const browserToken = this.config.browser.launchOptions?.channel ?? this.config.browser?.browserName;
+ // Hesitant putting hundreds of files into the user's workspace, so using it for hashing instead.
+ const rootPathToken = rootPath ? `-${createHash(rootPath)}` : '';
+ const result = path.join(dir, `mcp-${browserToken}${rootPathToken}`);
+ await fs.promises.mkdir(result, { recursive: true });
+ return result;
+ }
+}
+
+async function injectCdpPort(browserConfig: FullConfig['browser']) {
+ if (browserConfig.browserName === 'chromium')
+ (browserConfig.launchOptions as any).cdpPort = await findFreePort();
+}
+
+async function findFreePort(): Promise<number> {
+ return new Promise((resolve, reject) => {
+ const server = net.createServer();
+ server.listen(0, () => {
+ const { port } = server.address() as net.AddressInfo;
+ server.close(() => resolve(port));
+ });
+ server.on('error', reject);
+ });
+}
+
+async function startTraceServer(config: FullConfig, rootPath: string | undefined): Promise<string | undefined> {
+ if (!config.saveTrace)
+ return undefined;
+
+ const tracesDir = await outputFile(config, rootPath, `traces-${Date.now()}`);
+ const server = await startTraceViewerServer();
+ const urlPrefix = server.urlPrefix('human-readable');
+ const url = urlPrefix + '/trace/index.html?trace=' + tracesDir + '/trace.json';
+ // eslint-disable-next-line no-console
+ console.error('\nTrace viewer listening on ' + url);
+ return tracesDir;
+}
+
+function createHash(data: string): string {
+ return crypto.createHash('sha256').update(data).digest('hex').slice(0, 7);
+}
diff --git a/packages/playwright/src/mcp/browser/browserServerBackend.ts b/packages/playwright/src/mcp/browser/browserServerBackend.ts
new file mode 100644
index 0000000000..c773786afa
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/browserServerBackend.ts
@@ -0,0 +1,88 @@
+/**
+ * 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 { fileURLToPath } from 'url';
+import { FullConfig } from './config';
+import { Context } from './context';
+import { logUnhandledError } from '../log';
+import { Response } from './response';
+import { SessionLog } from './sessionLog';
+import { filteredTools } from './tools';
+import { toMcpTool } from '../sdk/tool';
+
+import type { Tool } from './tools/tool';
+import type { BrowserContextFactory } from './browserContextFactory';
+import type * as mcpServer from '../sdk/server';
+import type { ServerBackend } from '../sdk/server';
+
+export class BrowserServerBackend implements ServerBackend {
+ private _tools: Tool[];
+ private _context: Context | undefined;
+ private _sessionLog: SessionLog | undefined;
+ private _config: FullConfig;
+ private _browserContextFactory: BrowserContextFactory;
+
+ constructor(config: FullConfig, factory: BrowserContextFactory) {
+ this._config = config;
+ this._browserContextFactory = factory;
+ this._tools = filteredTools(config);
+ }
+
+ async initialize(server: mcpServer.Server, clientVersion: mcpServer.ClientVersion, roots: mcpServer.Root[]): Promise<void> {
+ let rootPath: string | undefined;
+ if (roots.length > 0) {
+ const firstRootUri = roots[0]?.uri;
+ const url = firstRootUri ? new URL(firstRootUri) : undefined;
+ rootPath = url ? fileURLToPath(url) : undefined;
+ }
+ this._sessionLog = this._config.saveSession ? await SessionLog.create(this._config, rootPath) : undefined;
+ this._context = new Context({
+ tools: this._tools,
+ config: this._config,
+ browserContextFactory: this._browserContextFactory,
+ sessionLog: this._sessionLog,
+ clientInfo: { ...clientVersion, rootPath },
+ });
+ }
+
+ async listTools(): Promise<mcpServer.Tool[]> {
+ return this._tools.map(tool => toMcpTool(tool.schema));
+ }
+
+ async callTool(name: string, rawArguments: mcpServer.CallToolRequest['params']['arguments']) {
+ const tool = this._tools.find(tool => tool.schema.name === name)!;
+ if (!tool)
+ throw new Error(`Tool "${name}" not found`);
+ const parsedArguments = tool.schema.inputSchema.parse(rawArguments || {});
+ const context = this._context!;
+ const response = new Response(context, name, parsedArguments);
+ context.setRunningTool(name);
+ try {
+ await tool.handle(context, parsedArguments, response);
+ await response.finish();
+ this._sessionLog?.logResponse(response);
+ } catch (error: any) {
+ response.addError(String(error));
+ } finally {
+ context.setRunningTool(undefined);
+ }
+ return response.serialize();
+ }
+
+ serverClosed() {
+ void this._context?.dispose().catch(logUnhandledError);
+ }
+}
diff --git a/packages/playwright/src/mcp/browser/codegen.ts b/packages/playwright/src/mcp/browser/codegen.ts
new file mode 100644
index 0000000000..a3bc8d0e02
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/codegen.ts
@@ -0,0 +1,53 @@
+/**
+ * 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.
+ */
+
+// adapted from:
+// - https://github.com/microsoft/playwright/blob/76ee48dc9d4034536e3ec5b2c7ce8be3b79418a8/packages/playwright-core/src/utils/isomorphic/stringUtils.ts
+// - https://github.com/microsoft/playwright/blob/76ee48dc9d4034536e3ec5b2c7ce8be3b79418a8/packages/playwright-core/src/server/codegen/javascript.ts
+
+// NOTE: this function should not be used to escape any selectors.
+export function escapeWithQuotes(text: string, char: string = '\'') {
+ const stringified = JSON.stringify(text);
+ const escapedText = stringified.substring(1, stringified.length - 1).replace(/\\"/g, '"');
+ if (char === '\'')
+ return char + escapedText.replace(/[']/g, '\\\'') + char;
+ if (char === '"')
+ return char + escapedText.replace(/["]/g, '\\"') + char;
+ if (char === '`')
+ return char + escapedText.replace(/[`]/g, '\\`') + char;
+ throw new Error('Invalid escape char');
+}
+
+export function quote(text: string) {
+ return escapeWithQuotes(text, '\'');
+}
+
+export function formatObject(value: any, indent = ' '): string {
+ if (typeof value === 'string')
+ return quote(value);
+ if (Array.isArray(value))
+ return `[${value.map(o => formatObject(o)).join(', ')}]`;
+ if (typeof value === 'object') {
+ const keys = Object.keys(value).filter(key => value[key] !== undefined).sort();
+ if (!keys.length)
+ return '{}';
+ const tokens: string[] = [];
+ for (const key of keys)
+ tokens.push(`${key}: ${formatObject(value[key])}`);
+ return `{\n${indent}${tokens.join(`,\n${indent}`)}\n}`;
+ }
+ return String(value);
+}
diff --git a/packages/playwright/src/mcp/browser/config.ts b/packages/playwright/src/mcp/browser/config.ts
new file mode 100644
index 0000000000..1d26b13bb4
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/config.ts
@@ -0,0 +1,327 @@
+/**
+ * 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 fs from 'fs';
+import os from 'os';
+import path from 'path';
+import { devices } from 'playwright-core';
+
+import type * as playwright from '../../../types/test';
+import type { Config, ToolCapability } from '../config';
+
+export type CLIOptions = {
+ allowedOrigins?: string[];
+ blockedOrigins?: string[];
+ blockServiceWorkers?: boolean;
+ browser?: string;
+ caps?: string[];
+ cdpEndpoint?: string;
+ config?: string;
+ device?: string;
+ executablePath?: string;
+ headless?: boolean;
+ host?: string;
+ ignoreHttpsErrors?: boolean;
+ isolated?: boolean;
+ imageResponses?: 'allow' | 'omit';
+ sandbox?: boolean;
+ outputDir?: string;
+ port?: number;
+ proxyBypass?: string;
+ proxyServer?: string;
+ saveSession?: boolean;
+ saveTrace?: boolean;
+ storageState?: string;
+ userAgent?: string;
+ userDataDir?: string;
+ viewportSize?: string;
+};
+
+const defaultConfig: FullConfig = {
+ browser: {
+ browserName: 'chromium',
+ launchOptions: {
+ channel: 'chrome',
+ headless: os.platform() === 'linux' && !process.env.DISPLAY,
+ chromiumSandbox: true,
+ },
+ contextOptions: {
+ viewport: null,
+ },
+ },
+ network: {
+ allowedOrigins: undefined,
+ blockedOrigins: undefined,
+ },
+ server: {},
+ saveTrace: false,
+};
+
+type BrowserUserConfig = NonNullable<Config['browser']>;
+
+export type FullConfig = Config & {
+ browser: Omit<BrowserUserConfig, 'browserName'> & {
+ browserName: 'chromium' | 'firefox' | 'webkit';
+ launchOptions: NonNullable<BrowserUserConfig['launchOptions']>;
+ contextOptions: NonNullable<BrowserUserConfig['contextOptions']>;
+ },
+ network: NonNullable<Config['network']>,
+ saveTrace: boolean;
+ server: NonNullable<Config['server']>,
+};
+
+export async function resolveConfig(config: Config): Promise<FullConfig> {
+ return mergeConfig(defaultConfig, config);
+}
+
+export async function resolveCLIConfig(cliOptions: CLIOptions): Promise<FullConfig> {
+ const configInFile = await loadConfig(cliOptions.config);
+ const envOverrides = configFromEnv();
+ const cliOverrides = configFromCLIOptions(cliOptions);
+ let result = defaultConfig;
+ result = mergeConfig(result, configInFile);
+ result = mergeConfig(result, envOverrides);
+ result = mergeConfig(result, cliOverrides);
+ return result;
+}
+
+export function configFromCLIOptions(cliOptions: CLIOptions): Config {
+ let browserName: 'chromium' | 'firefox' | 'webkit' | undefined;
+ let channel: string | undefined;
+ switch (cliOptions.browser) {
+ case 'chrome':
+ case 'chrome-beta':
+ case 'chrome-canary':
+ case 'chrome-dev':
+ case 'chromium':
+ case 'msedge':
+ case 'msedge-beta':
+ case 'msedge-canary':
+ case 'msedge-dev':
+ browserName = 'chromium';
+ channel = cliOptions.browser;
+ break;
+ case 'firefox':
+ browserName = 'firefox';
+ break;
+ case 'webkit':
+ browserName = 'webkit';
+ break;
+ }
+
+ // Launch options
+ const launchOptions: playwright.LaunchOptions = {
+ channel,
+ executablePath: cliOptions.executablePath,
+ headless: cliOptions.headless,
+ };
+
+ // --no-sandbox was passed, disable the sandbox
+ if (cliOptions.sandbox === false)
+ launchOptions.chromiumSandbox = false;
+
+ if (cliOptions.proxyServer) {
+ launchOptions.proxy = {
+ server: cliOptions.proxyServer
+ };
+ if (cliOptions.proxyBypass)
+ launchOptions.proxy.bypass = cliOptions.proxyBypass;
+ }
+
+ if (cliOptions.device && cliOptions.cdpEndpoint)
+ throw new Error('Device emulation is not supported with cdpEndpoint.');
+
+ // Context options
+ const contextOptions: playwright.BrowserContextOptions = cliOptions.device ? devices[cliOptions.device] : {};
+ if (cliOptions.storageState)
+ contextOptions.storageState = cliOptions.storageState;
+
+ if (cliOptions.userAgent)
+ contextOptions.userAgent = cliOptions.userAgent;
+
+ if (cliOptions.viewportSize) {
+ try {
+ const [width, height] = cliOptions.viewportSize.split(',').map(n => +n);
+ if (isNaN(width) || isNaN(height))
+ throw new Error('bad values');
+ contextOptions.viewport = { width, height };
+ } catch (e) {
+ throw new Error('Invalid viewport size format: use "width,height", for example --viewport-size="800,600"');
+ }
+ }
+
+ if (cliOptions.ignoreHttpsErrors)
+ contextOptions.ignoreHTTPSErrors = true;
+
+ if (cliOptions.blockServiceWorkers)
+ contextOptions.serviceWorkers = 'block';
+
+ const result: Config = {
+ browser: {
+ browserName,
+ isolated: cliOptions.isolated,
+ userDataDir: cliOptions.userDataDir,
+ launchOptions,
+ contextOptions,
+ cdpEndpoint: cliOptions.cdpEndpoint,
+ },
+ server: {
+ port: cliOptions.port,
+ host: cliOptions.host,
+ },
+ capabilities: cliOptions.caps as ToolCapability[],
+ network: {
+ allowedOrigins: cliOptions.allowedOrigins,
+ blockedOrigins: cliOptions.blockedOrigins,
+ },
+ saveSession: cliOptions.saveSession,
+ saveTrace: cliOptions.saveTrace,
+ outputDir: cliOptions.outputDir,
+ imageResponses: cliOptions.imageResponses,
+ };
+
+ return result;
+}
+
+function configFromEnv(): Config {
+ const options: CLIOptions = {};
+ options.allowedOrigins = semicolonSeparatedList(process.env.PLAYWRIGHT_MCP_ALLOWED_ORIGINS);
+ options.blockedOrigins = semicolonSeparatedList(process.env.PLAYWRIGHT_MCP_BLOCKED_ORIGINS);
+ options.blockServiceWorkers = envToBoolean(process.env.PLAYWRIGHT_MCP_BLOCK_SERVICE_WORKERS);
+ options.browser = envToString(process.env.PLAYWRIGHT_MCP_BROWSER);
+ options.caps = commaSeparatedList(process.env.PLAYWRIGHT_MCP_CAPS);
+ options.cdpEndpoint = envToString(process.env.PLAYWRIGHT_MCP_CDP_ENDPOINT);
+ options.config = envToString(process.env.PLAYWRIGHT_MCP_CONFIG);
+ options.device = envToString(process.env.PLAYWRIGHT_MCP_DEVICE);
+ options.executablePath = envToString(process.env.PLAYWRIGHT_MCP_EXECUTABLE_PATH);
+ options.headless = envToBoolean(process.env.PLAYWRIGHT_MCP_HEADLESS);
+ options.host = envToString(process.env.PLAYWRIGHT_MCP_HOST);
+ options.ignoreHttpsErrors = envToBoolean(process.env.PLAYWRIGHT_MCP_IGNORE_HTTPS_ERRORS);
+ options.isolated = envToBoolean(process.env.PLAYWRIGHT_MCP_ISOLATED);
+ if (process.env.PLAYWRIGHT_MCP_IMAGE_RESPONSES === 'omit')
+ options.imageResponses = 'omit';
+ options.sandbox = envToBoolean(process.env.PLAYWRIGHT_MCP_SANDBOX);
+ options.outputDir = envToString(process.env.PLAYWRIGHT_MCP_OUTPUT_DIR);
+ options.port = envToNumber(process.env.PLAYWRIGHT_MCP_PORT);
+ options.proxyBypass = envToString(process.env.PLAYWRIGHT_MCP_PROXY_BYPASS);
+ options.proxyServer = envToString(process.env.PLAYWRIGHT_MCP_PROXY_SERVER);
+ options.saveTrace = envToBoolean(process.env.PLAYWRIGHT_MCP_SAVE_TRACE);
+ options.storageState = envToString(process.env.PLAYWRIGHT_MCP_STORAGE_STATE);
+ options.userAgent = envToString(process.env.PLAYWRIGHT_MCP_USER_AGENT);
+ options.userDataDir = envToString(process.env.PLAYWRIGHT_MCP_USER_DATA_DIR);
+ options.viewportSize = envToString(process.env.PLAYWRIGHT_MCP_VIEWPORT_SIZE);
+ return configFromCLIOptions(options);
+}
+
+async function loadConfig(configFile: string | undefined): Promise<Config> {
+ if (!configFile)
+ return {};
+
+ try {
+ return JSON.parse(await fs.promises.readFile(configFile, 'utf8'));
+ } catch (error) {
+ throw new Error(`Failed to load config file: ${configFile}, ${error}`);
+ }
+}
+
+export async function outputFile(config: FullConfig, rootPath: string | undefined, name: string): Promise<string> {
+ const outputDir = config.outputDir
+ ?? (rootPath ? path.join(rootPath, '.playwright-mcp') : undefined)
+ ?? path.join(os.tmpdir(), 'playwright-mcp-output', sanitizeForFilePath(new Date().toISOString()));
+
+ await fs.promises.mkdir(outputDir, { recursive: true });
+ const fileName = sanitizeForFilePath(name);
+ return path.join(outputDir, fileName);
+}
+
+function pickDefined<T extends object>(obj: T | undefined): Partial<T> {
+ return Object.fromEntries(
+ Object.entries(obj ?? {}).filter(([_, v]) => v !== undefined)
+ ) as Partial<T>;
+}
+
+function mergeConfig(base: FullConfig, overrides: Config): FullConfig {
+ const browser: FullConfig['browser'] = {
+ ...pickDefined(base.browser),
+ ...pickDefined(overrides.browser),
+ browserName: overrides.browser?.browserName ?? base.browser?.browserName ?? 'chromium',
+ isolated: overrides.browser?.isolated ?? base.browser?.isolated ?? false,
+ launchOptions: {
+ ...pickDefined(base.browser?.launchOptions),
+ ...pickDefined(overrides.browser?.launchOptions),
+ ...{ assistantMode: true },
+ },
+ contextOptions: {
+ ...pickDefined(base.browser?.contextOptions),
+ ...pickDefined(overrides.browser?.contextOptions),
+ },
+ };
+
+ if (browser.browserName !== 'chromium' && browser.launchOptions)
+ delete browser.launchOptions.channel;
+
+ return {
+ ...pickDefined(base),
+ ...pickDefined(overrides),
+ browser,
+ network: {
+ ...pickDefined(base.network),
+ ...pickDefined(overrides.network),
+ },
+ server: {
+ ...pickDefined(base.server),
+ ...pickDefined(overrides.server),
+ },
+ } as FullConfig;
+}
+
+export function semicolonSeparatedList(value: string | undefined): string[] | undefined {
+ if (!value)
+ return undefined;
+ return value.split(';').map(v => v.trim());
+}
+
+export function commaSeparatedList(value: string | undefined): string[] | undefined {
+ if (!value)
+ return undefined;
+ return value.split(',').map(v => v.trim());
+}
+
+function envToNumber(value: string | undefined): number | undefined {
+ if (!value)
+ return undefined;
+ return +value;
+}
+
+function envToBoolean(value: string | undefined): boolean | undefined {
+ if (value === 'true' || value === '1')
+ return true;
+ if (value === 'false' || value === '0')
+ return false;
+ return undefined;
+}
+
+function envToString(value: string | undefined): string | undefined {
+ return value ? value.trim() : undefined;
+}
+
+function sanitizeForFilePath(s: string) {
+ const sanitize = (s: string) => s.replace(/[\x00-\x2C\x2E-\x2F\x3A-\x40\x5B-\x60\x7B-\x7F]+/g, '-');
+ const separator = s.lastIndexOf('.');
+ if (separator === -1)
+ return sanitize(s);
+ return sanitize(s.substring(0, separator)) + '.' + sanitize(s.substring(separator + 1));
+}
diff --git a/packages/playwright/src/mcp/browser/context.ts b/packages/playwright/src/mcp/browser/context.ts
new file mode 100644
index 0000000000..c886c88a80
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/context.ts
@@ -0,0 +1,276 @@
+/**
+ * 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 { debug } from 'playwright-core/lib/utilsBundle';
+
+import { logUnhandledError } from '../log';
+import { Tab } from './tab';
+import { outputFile } from './config';
+
+import type * as playwright from '../../../types/test';
+import type { FullConfig } from './config';
+import type { Tool } from './tools/tool';
+import type { BrowserContextFactory, ClientInfo } from './browserContextFactory';
+import type * as actions from './actions';
+import type { SessionLog } from './sessionLog';
+
+const testDebug = debug('pw:mcp:test');
+
+type ContextOptions = {
+ tools: Tool[];
+ config: FullConfig;
+ browserContextFactory: BrowserContextFactory;
+ sessionLog: SessionLog | undefined;
+ clientInfo: ClientInfo;
+};
+
+export class Context {
+ readonly tools: Tool[];
+ readonly config: FullConfig;
+ readonly sessionLog: SessionLog | undefined;
+ readonly options: ContextOptions;
+ private _browserContextPromise: Promise<{ browserContext: playwright.BrowserContext, close: () => Promise<void> }> | undefined;
+ private _browserContextFactory: BrowserContextFactory;
+ private _tabs: Tab[] = [];
+ private _currentTab: Tab | undefined;
+ private _clientInfo: ClientInfo;
+
+ private static _allContexts: Set<Context> = new Set();
+ private _closeBrowserContextPromise: Promise<void> | undefined;
+ private _runningToolName: string | undefined;
+ private _abortController = new AbortController();
+
+ constructor(options: ContextOptions) {
+ this.tools = options.tools;
+ this.config = options.config;
+ this.sessionLog = options.sessionLog;
+ this.options = options;
+ this._browserContextFactory = options.browserContextFactory;
+ this._clientInfo = options.clientInfo;
+ testDebug('create context');
+ Context._allContexts.add(this);
+ }
+
+ static async disposeAll() {
+ await Promise.all([...Context._allContexts].map(context => context.dispose()));
+ }
+
+ tabs(): Tab[] {
+ return this._tabs;
+ }
+
+ currentTab(): Tab | undefined {
+ return this._currentTab;
+ }
+
+ currentTabOrDie(): Tab {
+ if (!this._currentTab)
+ throw new Error('No open pages available. Use the "browser_navigate" tool to navigate to a page first.');
+ return this._currentTab;
+ }
+
+ async newTab(): Promise<Tab> {
+ const { browserContext } = await this._ensureBrowserContext();
+ const page = await browserContext.newPage();
+ this._currentTab = this._tabs.find(t => t.page === page)!;
+ return this._currentTab;
+ }
+
+ async selectTab(index: number) {
+ const tab = this._tabs[index];
+ if (!tab)
+ throw new Error(`Tab ${index} not found`);
+ await tab.page.bringToFront();
+ this._currentTab = tab;
+ return tab;
+ }
+
+ async ensureTab(): Promise<Tab> {
+ const { browserContext } = await this._ensureBrowserContext();
+ if (!this._currentTab)
+ await browserContext.newPage();
+ return this._currentTab!;
+ }
+
+ async closeTab(index: number | undefined): Promise<string> {
+ const tab = index === undefined ? this._currentTab : this._tabs[index];
+ if (!tab)
+ throw new Error(`Tab ${index} not found`);
+ const url = tab.page.url();
+ await tab.page.close();
+ return url;
+ }
+
+ async outputFile(name: string): Promise<string> {
+ return outputFile(this.config, this._clientInfo.rootPath, name);
+ }
+
+ private _onPageCreated(page: playwright.Page) {
+ const tab = new Tab(this, page, tab => this._onPageClosed(tab));
+ this._tabs.push(tab);
+ if (!this._currentTab)
+ this._currentTab = tab;
+ }
+
+ private _onPageClosed(tab: Tab) {
+ const index = this._tabs.indexOf(tab);
+ if (index === -1)
+ return;
+ this._tabs.splice(index, 1);
+
+ if (this._currentTab === tab)
+ this._currentTab = this._tabs[Math.min(index, this._tabs.length - 1)];
+ if (!this._tabs.length)
+ void this.closeBrowserContext();
+ }
+
+ async closeBrowserContext() {
+ if (!this._closeBrowserContextPromise)
+ this._closeBrowserContextPromise = this._closeBrowserContextImpl().catch(logUnhandledError);
+ await this._closeBrowserContextPromise;
+ this._closeBrowserContextPromise = undefined;
+ }
+
+ isRunningTool() {
+ return this._runningToolName !== undefined;
+ }
+
+ setRunningTool(name: string | undefined) {
+ this._runningToolName = name;
+ }
+
+ private async _closeBrowserContextImpl() {
+ if (!this._browserContextPromise)
+ return;
+
+ testDebug('close context');
+
+ const promise = this._browserContextPromise;
+ this._browserContextPromise = undefined;
+
+ await promise.then(async ({ browserContext, close }) => {
+ if (this.config.saveTrace)
+ await browserContext.tracing.stop();
+ await close();
+ });
+ }
+
+ async dispose() {
+ this._abortController.abort('MCP context disposed');
+ await this.closeBrowserContext();
+ Context._allContexts.delete(this);
+ }
+
+ private async _setupRequestInterception(context: playwright.BrowserContext) {
+ if (this.config.network?.allowedOrigins?.length) {
+ await context.route('**', route => route.abort('blockedbyclient'));
+
+ for (const origin of this.config.network.allowedOrigins)
+ await context.route(`*://${origin}/**`, route => route.continue());
+ }
+
+ if (this.config.network?.blockedOrigins?.length) {
+ for (const origin of this.config.network.blockedOrigins)
+ await context.route(`*://${origin}/**`, route => route.abort('blockedbyclient'));
+ }
+ }
+
+ private _ensureBrowserContext() {
+ if (!this._browserContextPromise) {
+ this._browserContextPromise = this._setupBrowserContext();
+ this._browserContextPromise.catch(() => {
+ this._browserContextPromise = undefined;
+ });
+ }
+ return this._browserContextPromise;
+ }
+
+ private async _setupBrowserContext(): Promise<{ browserContext: playwright.BrowserContext, close: () => Promise<void> }> {
+ if (this._closeBrowserContextPromise)
+ throw new Error('Another browser context is being closed.');
+ // TODO: move to the browser context factory to make it based on isolation mode.
+ const result = await this._browserContextFactory.createContext(this._clientInfo, this._abortController.signal, this._runningToolName);
+ const { browserContext } = result;
+ await this._setupRequestInterception(browserContext);
+ if (this.sessionLog)
+ await InputRecorder.create(this, browserContext);
+ for (const page of browserContext.pages())
+ this._onPageCreated(page);
+ browserContext.on('page', page => this._onPageCreated(page));
+ if (this.config.saveTrace) {
+ await browserContext.tracing.start({
+ name: 'trace',
+ screenshots: false,
+ snapshots: true,
+ sources: false,
+ });
+ }
+ return result;
+ }
+}
+
+export class InputRecorder {
+ private _context: Context;
+ private _browserContext: playwright.BrowserContext;
+
+ private constructor(context: Context, browserContext: playwright.BrowserContext) {
+ this._context = context;
+ this._browserContext = browserContext;
+ }
+
+ static async create(context: Context, browserContext: playwright.BrowserContext) {
+ const recorder = new InputRecorder(context, browserContext);
+ await recorder._initialize();
+ return recorder;
+ }
+
+ private async _initialize() {
+ const sessionLog = this._context.sessionLog!;
+ await (this._browserContext as any)._enableRecorder({
+ mode: 'recording',
+ recorderMode: 'api',
+ }, {
+ actionAdded: (page: playwright.Page, data: actions.ActionInContext, code: string) => {
+ if (this._context.isRunningTool())
+ return;
+ const tab = Tab.forPage(page);
+ if (tab)
+ sessionLog.logUserAction(data.action, tab, code, false);
+ },
+ actionUpdated: (page: playwright.Page, data: actions.ActionInContext, code: string) => {
+ if (this._context.isRunningTool())
+ return;
+ const tab = Tab.forPage(page);
+ if (tab)
+ sessionLog.logUserAction(data.action, tab, code, true);
+ },
+ signalAdded: (page: playwright.Page, data: actions.SignalInContext) => {
+ if (this._context.isRunningTool())
+ return;
+ if (data.signal.name !== 'navigation')
+ return;
+ const tab = Tab.forPage(page);
+ const navigateAction: actions.Action = {
+ name: 'navigate',
+ url: data.signal.url,
+ signals: [],
+ };
+ if (tab)
+ sessionLog.logUserAction(navigateAction, tab, `await page.goto('${data.signal.url}');`, false);
+ },
+ });
+ }
+}
diff --git a/packages/playwright/src/mcp/browser/response.ts b/packages/playwright/src/mcp/browser/response.ts
new file mode 100644
index 0000000000..3dc95ab826
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/response.ts
@@ -0,0 +1,201 @@
+/**
+ * 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 { renderModalStates } from './tab';
+
+import type { Tab, TabSnapshot } from './tab';
+import type { ImageContent, TextContent } from '@modelcontextprotocol/sdk/types.js';
+import type { Context } from './context';
+
+export class Response {
+ private _result: string[] = [];
+ private _code: string[] = [];
+ private _images: { contentType: string, data: Buffer }[] = [];
+ private _context: Context;
+ private _includeSnapshot = false;
+ private _includeTabs = false;
+ private _tabSnapshot: TabSnapshot | undefined;
+
+ readonly toolName: string;
+ readonly toolArgs: Record<string, any>;
+ private _isError: boolean | undefined;
+
+ constructor(context: Context, toolName: string, toolArgs: Record<string, any>) {
+ this._context = context;
+ this.toolName = toolName;
+ this.toolArgs = toolArgs;
+ }
+
+ addResult(result: string) {
+ this._result.push(result);
+ }
+
+ addError(error: string) {
+ this._result.push(error);
+ this._isError = true;
+ }
+
+ isError() {
+ return this._isError;
+ }
+
+ result() {
+ return this._result.join('\n');
+ }
+
+ addCode(code: string) {
+ this._code.push(code);
+ }
+
+ code() {
+ return this._code.join('\n');
+ }
+
+ addImage(image: { contentType: string, data: Buffer }) {
+ this._images.push(image);
+ }
+
+ images() {
+ return this._images;
+ }
+
+ setIncludeSnapshot() {
+ this._includeSnapshot = true;
+ }
+
+ setIncludeTabs() {
+ this._includeTabs = true;
+ }
+
+ async finish() {
+ // All the async snapshotting post-action is happening here.
+ // Everything below should race against modal states.
+ if (this._includeSnapshot && this._context.currentTab())
+ this._tabSnapshot = await this._context.currentTabOrDie().captureSnapshot();
+ for (const tab of this._context.tabs())
+ await tab.updateTitle();
+ }
+
+ tabSnapshot(): TabSnapshot | undefined {
+ return this._tabSnapshot;
+ }
+
+ serialize(): { content: (TextContent | ImageContent)[], isError?: boolean } {
+ const response: string[] = [];
+
+ // Start with command result.
+ if (this._result.length) {
+ response.push('### Result');
+ response.push(this._result.join('\n'));
+ response.push('');
+ }
+
+ // Add code if it exists.
+ if (this._code.length) {
+ response.push(`### Ran Playwright code
+\`\`\`js
+${this._code.join('\n')}
+\`\`\``);
+ response.push('');
+ }
+
+ // List browser tabs.
+ if (this._includeSnapshot || this._includeTabs)
+ response.push(...renderTabsMarkdown(this._context.tabs(), this._includeTabs));
+
+ // Add snapshot if provided.
+ if (this._tabSnapshot?.modalStates.length) {
+ response.push(...renderModalStates(this._context, this._tabSnapshot.modalStates));
+ response.push('');
+ } else if (this._tabSnapshot) {
+ response.push(renderTabSnapshot(this._tabSnapshot));
+ response.push('');
+ }
+
+ // Main response part
+ const content: (TextContent | ImageContent)[] = [
+ { type: 'text', text: response.join('\n') },
+ ];
+
+ // Image attachments.
+ if (this._context.config.imageResponses !== 'omit') {
+ for (const image of this._images)
+ content.push({ type: 'image', data: image.data.toString('base64'), mimeType: image.contentType });
+ }
+
+ return { content, isError: this._isError };
+ }
+}
+
+function renderTabSnapshot(tabSnapshot: TabSnapshot): string {
+ const lines: string[] = [];
+
+ if (tabSnapshot.consoleMessages.length) {
+ lines.push(`### New console messages`);
+ for (const message of tabSnapshot.consoleMessages)
+ lines.push(`- ${trim(message.toString(), 100)}`);
+ lines.push('');
+ }
+
+ if (tabSnapshot.downloads.length) {
+ lines.push(`### Downloads`);
+ for (const entry of tabSnapshot.downloads) {
+ if (entry.finished)
+ lines.push(`- Downloaded file ${entry.download.suggestedFilename()} to ${entry.outputFile}`);
+ else
+ lines.push(`- Downloading file ${entry.download.suggestedFilename()} ...`);
+ }
+ lines.push('');
+ }
+
+ lines.push(`### Page state`);
+ lines.push(`- Page URL: ${tabSnapshot.url}`);
+ lines.push(`- Page Title: ${tabSnapshot.title}`);
+ lines.push(`- Page Snapshot:`);
+ lines.push('```yaml');
+ lines.push(tabSnapshot.ariaSnapshot);
+ lines.push('```');
+
+ return lines.join('\n');
+}
+
+function renderTabsMarkdown(tabs: Tab[], force: boolean = false): string[] {
+ if (tabs.length === 1 && !force)
+ return [];
+
+ if (!tabs.length) {
+ return [
+ '### Open tabs',
+ 'No open tabs. Use the "browser_navigate" tool to navigate to a page first.',
+ '',
+ ];
+ }
+
+ const lines: string[] = ['### Open tabs'];
+ for (let i = 0; i < tabs.length; i++) {
+ const tab = tabs[i];
+ const current = tab.isCurrentTab() ? ' (current)' : '';
+ lines.push(`- ${i}:${current} [${tab.lastTitle()}] (${tab.page.url()})`);
+ }
+ lines.push('');
+ return lines;
+}
+
+function trim(text: string, maxLength: number) {
+ if (text.length <= maxLength)
+ return text;
+ return text.slice(0, maxLength) + '...';
+}
diff --git a/packages/playwright/src/mcp/browser/sessionLog.ts b/packages/playwright/src/mcp/browser/sessionLog.ts
new file mode 100644
index 0000000000..7e80087454
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/sessionLog.ts
@@ -0,0 +1,176 @@
+/**
+ * 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 fs from 'fs';
+import path from 'path';
+
+import { Response } from './response';
+import { logUnhandledError } from '../log';
+import { outputFile } from './config';
+
+import type { FullConfig } from './config';
+import type * as actions from './actions';
+import type { Tab, TabSnapshot } from './tab';
+
+type LogEntry = {
+ timestamp: number;
+ toolCall?: {
+ toolName: string;
+ toolArgs: Record<string, any>;
+ result: string;
+ isError?: boolean;
+ };
+ userAction?: actions.Action;
+ code: string;
+ tabSnapshot?: TabSnapshot;
+};
+
+export class SessionLog {
+ private _folder: string;
+ private _file: string;
+ private _ordinal = 0;
+ private _pendingEntries: LogEntry[] = [];
+ private _sessionFileQueue = Promise.resolve();
+ private _flushEntriesTimeout: NodeJS.Timeout | undefined;
+
+ constructor(sessionFolder: string) {
+ this._folder = sessionFolder;
+ this._file = path.join(this._folder, 'session.md');
+ }
+
+ static async create(config: FullConfig, rootPath: string | undefined): Promise<SessionLog> {
+ const sessionFolder = await outputFile(config, rootPath, `session-${Date.now()}`);
+ await fs.promises.mkdir(sessionFolder, { recursive: true });
+ // eslint-disable-next-line no-console
+ console.error(`Session: ${sessionFolder}`);
+ return new SessionLog(sessionFolder);
+ }
+
+ logResponse(response: Response) {
+ const entry: LogEntry = {
+ timestamp: performance.now(),
+ toolCall: {
+ toolName: response.toolName,
+ toolArgs: response.toolArgs,
+ result: response.result(),
+ isError: response.isError(),
+ },
+ code: response.code(),
+ tabSnapshot: response.tabSnapshot(),
+ };
+ this._appendEntry(entry);
+ }
+
+ logUserAction(action: actions.Action, tab: Tab, code: string, isUpdate: boolean) {
+ code = code.trim();
+ if (isUpdate) {
+ const lastEntry = this._pendingEntries[this._pendingEntries.length - 1];
+ if (lastEntry.userAction?.name === action.name) {
+ lastEntry.userAction = action;
+ lastEntry.code = code;
+ return;
+ }
+ }
+ if (action.name === 'navigate') {
+ // Already logged at this location.
+ const lastEntry = this._pendingEntries[this._pendingEntries.length - 1];
+ if (lastEntry?.tabSnapshot?.url === action.url)
+ return;
+ }
+ const entry: LogEntry = {
+ timestamp: performance.now(),
+ userAction: action,
+ code,
+ tabSnapshot: {
+ url: tab.page.url(),
+ title: '',
+ ariaSnapshot: action.ariaSnapshot || '',
+ modalStates: [],
+ consoleMessages: [],
+ downloads: [],
+ },
+ };
+ this._appendEntry(entry);
+ }
+
+ private _appendEntry(entry: LogEntry) {
+ this._pendingEntries.push(entry);
+ if (this._flushEntriesTimeout)
+ clearTimeout(this._flushEntriesTimeout);
+ this._flushEntriesTimeout = setTimeout(() => this._flushEntries(), 1000);
+ }
+
+ private async _flushEntries() {
+ clearTimeout(this._flushEntriesTimeout);
+ const entries = this._pendingEntries;
+ this._pendingEntries = [];
+ const lines: string[] = [''];
+
+ for (const entry of entries) {
+ const ordinal = (++this._ordinal).toString().padStart(3, '0');
+ if (entry.toolCall) {
+ lines.push(
+ `### Tool call: ${entry.toolCall.toolName}`,
+ `- Args`,
+ '```json',
+ JSON.stringify(entry.toolCall.toolArgs, null, 2),
+ '```',
+ );
+ if (entry.toolCall.result) {
+ lines.push(
+ entry.toolCall.isError ? `- Error` : `- Result`,
+ '```',
+ entry.toolCall.result,
+ '```',
+ );
+ }
+ }
+
+ if (entry.userAction) {
+ const actionData = { ...entry.userAction } as any;
+ delete actionData.ariaSnapshot;
+ delete actionData.selector;
+ delete actionData.signals;
+
+ lines.push(
+ `### User action: ${entry.userAction.name}`,
+ `- Args`,
+ '```json',
+ JSON.stringify(actionData, null, 2),
+ '```',
+ );
+ }
+
+ if (entry.code) {
+ lines.push(
+ `- Code`,
+ '```js',
+ entry.code,
+ '```');
+ }
+
+ if (entry.tabSnapshot) {
+ const fileName = `${ordinal}.snapshot.yml`;
+ fs.promises.writeFile(path.join(this._folder, fileName), entry.tabSnapshot.ariaSnapshot).catch(logUnhandledError);
+ lines.push(`- Snapshot: ${fileName}`);
+ }
+
+ lines.push('', '');
+ }
+
+ this._sessionFileQueue = this._sessionFileQueue.then(() => fs.promises.appendFile(this._file, lines.join('\n')));
+ }
+}
diff --git a/packages/playwright/src/mcp/browser/tab.ts b/packages/playwright/src/mcp/browser/tab.ts
new file mode 100644
index 0000000000..8904604e8f
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/tab.ts
@@ -0,0 +1,314 @@
+/**
+ * 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 { EventEmitter } from 'events';
+import * as playwright from 'playwright-core';
+import { ManualPromise } from 'playwright-core/lib/utils';
+
+import { callOnPageNoTrace, waitForCompletion } from './tools/utils';
+import { logUnhandledError } from '../log';
+import { ModalState } from './tools/tool';
+
+import type { Context } from './context';
+
+type PageEx = playwright.Page & {
+ _snapshotForAI: () => Promise<string>;
+};
+
+export const TabEvents = {
+ modalState: 'modalState'
+};
+
+export type TabEventsInterface = {
+ [TabEvents.modalState]: [modalState: ModalState];
+};
+
+export type TabSnapshot = {
+ url: string;
+ title: string;
+ ariaSnapshot: string;
+ modalStates: ModalState[];
+ consoleMessages: ConsoleMessage[];
+ downloads: { download: playwright.Download, finished: boolean, outputFile: string }[];
+};
+
+export class Tab extends EventEmitter<TabEventsInterface> {
+ readonly context: Context;
+ readonly page: playwright.Page;
+ private _lastTitle = 'about:blank';
+ private _consoleMessages: ConsoleMessage[] = [];
+ private _recentConsoleMessages: ConsoleMessage[] = [];
+ private _requests: Map<playwright.Request, playwright.Response | null> = new Map();
+ private _onPageClose: (tab: Tab) => void;
+ private _modalStates: ModalState[] = [];
+ private _downloads: { download: playwright.Download, finished: boolean, outputFile: string }[] = [];
+
+ constructor(context: Context, page: playwright.Page, onPageClose: (tab: Tab) => void) {
+ super();
+ this.context = context;
+ this.page = page;
+ this._onPageClose = onPageClose;
+ page.on('console', event => this._handleConsoleMessage(messageToConsoleMessage(event)));
+ page.on('pageerror', error => this._handleConsoleMessage(pageErrorToConsoleMessage(error)));
+ page.on('request', request => this._requests.set(request, null));
+ page.on('response', response => this._requests.set(response.request(), response));
+ page.on('close', () => this._onClose());
+ page.on('filechooser', chooser => {
+ this.setModalState({
+ type: 'fileChooser',
+ description: 'File chooser',
+ fileChooser: chooser,
+ });
+ });
+ page.on('dialog', dialog => this._dialogShown(dialog));
+ page.on('download', download => {
+ void this._downloadStarted(download);
+ });
+ page.setDefaultNavigationTimeout(60000);
+ page.setDefaultTimeout(5000);
+ (page as any)[tabSymbol] = this;
+ }
+
+ static forPage(page: playwright.Page): Tab | undefined {
+ return (page as any)[tabSymbol];
+ }
+
+ modalStates(): ModalState[] {
+ return this._modalStates;
+ }
+
+ setModalState(modalState: ModalState) {
+ this._modalStates.push(modalState);
+ this.emit(TabEvents.modalState, modalState);
+ }
+
+ clearModalState(modalState: ModalState) {
+ this._modalStates = this._modalStates.filter(state => state !== modalState);
+ }
+
+ modalStatesMarkdown(): string[] {
+ return renderModalStates(this.context, this.modalStates());
+ }
+
+ private _dialogShown(dialog: playwright.Dialog) {
+ this.setModalState({
+ type: 'dialog',
+ description: `"${dialog.type()}" dialog with message "${dialog.message()}"`,
+ dialog,
+ });
+ }
+
+ private async _downloadStarted(download: playwright.Download) {
+ const entry = {
+ download,
+ finished: false,
+ outputFile: await this.context.outputFile(download.suggestedFilename())
+ };
+ this._downloads.push(entry);
+ await download.saveAs(entry.outputFile);
+ entry.finished = true;
+ }
+
+ private _clearCollectedArtifacts() {
+ this._consoleMessages.length = 0;
+ this._recentConsoleMessages.length = 0;
+ this._requests.clear();
+ }
+
+ private _handleConsoleMessage(message: ConsoleMessage) {
+ this._consoleMessages.push(message);
+ this._recentConsoleMessages.push(message);
+ }
+
+ private _onClose() {
+ this._clearCollectedArtifacts();
+ this._onPageClose(this);
+ }
+
+ async updateTitle() {
+ await this._raceAgainstModalStates(async () => {
+ this._lastTitle = await callOnPageNoTrace(this.page, page => page.title());
+ });
+ }
+
+ lastTitle(): string {
+ return this._lastTitle;
+ }
+
+ isCurrentTab(): boolean {
+ return this === this.context.currentTab();
+ }
+
+ async waitForLoadState(state: 'load', options?: { timeout?: number }): Promise<void> {
+ await callOnPageNoTrace(this.page, page => page.waitForLoadState(state, options).catch(logUnhandledError));
+ }
+
+ async navigate(url: string) {
+ this._clearCollectedArtifacts();
+
+ const downloadEvent = callOnPageNoTrace(this.page, page => page.waitForEvent('download').catch(logUnhandledError));
+ try {
+ await this.page.goto(url, { waitUntil: 'domcontentloaded' });
+ } catch (_e: unknown) {
+ const e = _e as Error;
+ const mightBeDownload =
+ e.message.includes('net::ERR_ABORTED') // chromium
+ || e.message.includes('Download is starting'); // firefox + webkit
+ if (!mightBeDownload)
+ throw e;
+ // on chromium, the download event is fired *after* page.goto rejects, so we wait a lil bit
+ const download = await Promise.race([
+ downloadEvent,
+ new Promise(resolve => setTimeout(resolve, 3000)),
+ ]);
+ if (!download)
+ throw e;
+ // Make sure other "download" listeners are notified first.
+ await new Promise(resolve => setTimeout(resolve, 500));
+ return;
+ }
+
+ // Cap load event to 5 seconds, the page is operational at this point.
+ await this.waitForLoadState('load', { timeout: 5000 });
+ }
+
+ consoleMessages(): ConsoleMessage[] {
+ return this._consoleMessages;
+ }
+
+ requests(): Map<playwright.Request, playwright.Response | null> {
+ return this._requests;
+ }
+
+ async captureSnapshot(): Promise<TabSnapshot> {
+ let tabSnapshot: TabSnapshot | undefined;
+ const modalStates = await this._raceAgainstModalStates(async () => {
+ const snapshot = await (this.page as PageEx)._snapshotForAI();
+ tabSnapshot = {
+ url: this.page.url(),
+ title: await this.page.title(),
+ ariaSnapshot: snapshot,
+ modalStates: [],
+ consoleMessages: [],
+ downloads: this._downloads,
+ };
+ });
+ if (tabSnapshot) {
+ // Assign console message late so that we did not lose any to modal state.
+ tabSnapshot.consoleMessages = this._recentConsoleMessages;
+ this._recentConsoleMessages = [];
+ }
+ return tabSnapshot ?? {
+ url: this.page.url(),
+ title: '',
+ ariaSnapshot: '',
+ modalStates,
+ consoleMessages: [],
+ downloads: [],
+ };
+ }
+
+ private _javaScriptBlocked(): boolean {
+ return this._modalStates.some(state => state.type === 'dialog');
+ }
+
+ private async _raceAgainstModalStates(action: () => Promise<void>): Promise<ModalState[]> {
+ if (this.modalStates().length)
+ return this.modalStates();
+
+ const promise = new ManualPromise<ModalState[]>();
+ const listener = (modalState: ModalState) => promise.resolve([modalState]);
+ this.once(TabEvents.modalState, listener);
+
+ return await Promise.race([
+ action().then(() => {
+ this.off(TabEvents.modalState, listener);
+ return [];
+ }),
+ promise,
+ ]);
+ }
+
+ async waitForCompletion(callback: () => Promise<void>) {
+ await this._raceAgainstModalStates(() => waitForCompletion(this, callback));
+ }
+
+ async refLocator(params: { element: string, ref: string }): Promise<playwright.Locator> {
+ return (await this.refLocators([params]))[0];
+ }
+
+ async refLocators(params: { element: string, ref: string }[]): Promise<playwright.Locator[]> {
+ const snapshot = await (this.page as PageEx)._snapshotForAI();
+ return params.map(param => {
+ if (!snapshot.includes(`[ref=${param.ref}]`))
+ throw new Error(`Ref ${param.ref} not found in the current page snapshot. Try capturing new snapshot.`);
+ return this.page.locator(`aria-ref=${param.ref}`).describe(param.element);
+ });
+ }
+
+ async waitForTimeout(time: number) {
+ if (this._javaScriptBlocked()) {
+ await new Promise(f => setTimeout(f, time));
+ return;
+ }
+
+ await callOnPageNoTrace(this.page, page => {
+ return page.evaluate(() => new Promise(f => setTimeout(f, 1000)));
+ });
+ }
+}
+
+export type ConsoleMessage = {
+ type: ReturnType<playwright.ConsoleMessage['type']> | undefined;
+ text: string;
+ toString(): string;
+};
+
+function messageToConsoleMessage(message: playwright.ConsoleMessage): ConsoleMessage {
+ return {
+ type: message.type(),
+ text: message.text(),
+ toString: () => `[${message.type().toUpperCase()}] ${message.text()} @ ${message.location().url}:${message.location().lineNumber}`,
+ };
+}
+
+function pageErrorToConsoleMessage(errorOrValue: Error | any): ConsoleMessage {
+ if (errorOrValue instanceof Error) {
+ return {
+ type: undefined,
+ text: errorOrValue.message,
+ toString: () => errorOrValue.stack || errorOrValue.message,
+ };
+ }
+ return {
+ type: undefined,
+ text: String(errorOrValue),
+ toString: () => String(errorOrValue),
+ };
+}
+
+export function renderModalStates(context: Context, modalStates: ModalState[]): string[] {
+ const result: string[] = ['### Modal state'];
+ if (modalStates.length === 0)
+ result.push('- There is no modal state present');
+ for (const state of modalStates) {
+ const tool = context.tools.filter(tool => 'clearsModalState' in tool).find(tool => tool.clearsModalState === state.type);
+ result.push(`- [${state.description}]: can be handled by the "${tool?.schema.name}" tool`);
+ }
+ return result;
+}
+
+const tabSymbol = Symbol('tabSymbol');
diff --git a/packages/playwright/src/mcp/browser/tools.ts b/packages/playwright/src/mcp/browser/tools.ts
index 69e20772a4..b1e8059f91 100644
--- a/packages/playwright/src/mcp/browser/tools.ts
+++ b/packages/playwright/src/mcp/browser/tools.ts
@@ -14,98 +14,47 @@
* limitations under the License.
*/
-import { asLocator } from 'playwright-core/lib/utils';
-
-import { defineTool } from './tool.js';
-import * as mcp from '../sdk/bundle';
-
-import type * as playwright from '../../../index';
-import type z from 'zod';
-
-type PageEx = playwright.Page & {
- _snapshotForAI: () => Promise<string>;
-};
-
-export const snapshot = defineTool({
- schema: {
- name: 'playwright_test_browser_snapshot',
- title: 'Capture page snapshot',
- description: 'Capture page snapshot for debugging',
- inputSchema: mcp.z.object({}),
- type: 'readOnly',
- },
-
- handle: async (page, params) => {
- const snapshot = await (page as PageEx)._snapshotForAI();
- return {
- content: [
- {
- type: 'text',
- text: snapshot,
- },
- ],
- };
- },
-});
-
-export const elementSchema = mcp.z.object({
- element: mcp.z.string().describe('Human-readable element description used to obtain permission to interact with the element'),
- ref: mcp.z.string().describe('Exact target element reference from the page snapshot'),
-});
-
-export const pickLocator = defineTool({
- schema: {
- name: 'playwright_test_generate_locator',
- title: 'Create locator for element',
- description: 'Generate locator for the given element to use in tests',
- inputSchema: elementSchema,
- type: 'readOnly',
- },
-
- handle: async (page, params) => {
- const locator = await refLocator(page, params);
-
- try {
- const { resolvedSelector } = await (locator as any)._resolveSelector();
- const locatorString = asLocator('javascript', resolvedSelector);
- return { content: [{ type: 'text', text: locatorString }] };
- } catch (e) {
- throw new Error(`Ref not found, likely because element was removed. Use ${snapshot.schema.name} to see what elements are currently on the page.`);
- }
- },
-});
-
-const evaluateSchema = mcp.z.object({
- function: mcp.z.string().describe('() => { /* code */ } or (element) => { /* code */ } when element is provided'),
- element: mcp.z.string().optional().describe('Human-readable element description used to obtain permission to interact with the element'),
- ref: mcp.z.string().optional().describe('Exact target element reference from the page snapshot'),
-});
-
-export const evaluate = defineTool({
- schema: {
- name: 'playwright_test_evaluate_on_pause',
- title: 'Evaluate in page',
- description: 'Evaluate JavaScript expression on page or element',
- inputSchema: evaluateSchema,
- type: 'destructive',
- },
-
- handle: async (page, params) => {
- let locator: playwright.Locator | undefined;
- if (params.ref && params.element)
- locator = await refLocator(page, { ref: params.ref, element: params.element });
-
- const receiver = locator ?? page as any;
- const result = await receiver._evaluateFunction(params.function);
- return {
- content: [{ type: 'text', text: JSON.stringify(result, null, 2) || 'undefined' }],
- };
- },
-});
-
-async function refLocator(page: playwright.Page, elementRef: z.output<typeof elementSchema>): Promise<playwright.Locator> {
- const snapshot = await (page as PageEx)._snapshotForAI();
- if (!snapshot.includes(`[ref=${elementRef.ref}]`))
- throw new Error(`Ref ${elementRef.ref} not found in the current page snapshot. Try capturing new snapshot.`);
- return page.locator(`aria-ref=${elementRef.ref}`).describe(elementRef.element);
+import common from './tools/common';
+import console from './tools/console';
+import dialogs from './tools/dialogs';
+import evaluate from './tools/evaluate';
+import files from './tools/files';
+import form from './tools/form';
+import install from './tools/install';
+import keyboard from './tools/keyboard';
+import mouse from './tools/mouse';
+import navigate from './tools/navigate';
+import network from './tools/network';
+import pdf from './tools/pdf';
+import snapshot from './tools/snapshot';
+import tabs from './tools/tabs';
+import screenshot from './tools/screenshot';
+import wait from './tools/wait';
+import verify from './tools/verify';
+
+import type { Tool } from './tools/tool';
+import type { FullConfig } from './config';
+
+export const allTools: Tool<any>[] = [
+ ...common,
+ ...console,
+ ...dialogs,
+ ...evaluate,
+ ...files,
+ ...form,
+ ...install,
+ ...keyboard,
+ ...navigate,
+ ...network,
+ ...mouse,
+ ...pdf,
+ ...screenshot,
+ ...snapshot,
+ ...tabs,
+ ...wait,
+ ...verify,
+];
+
+export function filteredTools(config: FullConfig) {
+ return allTools.filter(tool => tool.capability.startsWith('core') || config.capabilities?.includes(tool.capability));
}
diff --git a/packages/playwright/src/mcp/browser/tools/DEPS.list b/packages/playwright/src/mcp/browser/tools/DEPS.list
new file mode 100644
index 0000000000..11683dbcd8
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/tools/DEPS.list
@@ -0,0 +1,3 @@
+[*]
+../
+../../sdk/
\ No newline at end of file
diff --git a/packages/playwright/src/mcp/browser/tools/common.ts b/packages/playwright/src/mcp/browser/tools/common.ts
new file mode 100644
index 0000000000..62f175ecd7
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/tools/common.ts
@@ -0,0 +1,63 @@
+/**
+ * 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 '../../sdk/bundle';
+import { defineTabTool, defineTool } from './tool';
+
+const close = defineTool({
+ capability: 'core',
+
+ schema: {
+ name: 'browser_close',
+ title: 'Close browser',
+ description: 'Close the page',
+ inputSchema: z.object({}),
+ type: 'readOnly',
+ },
+
+ handle: async (context, params, response) => {
+ await context.closeBrowserContext();
+ response.setIncludeTabs();
+ response.addCode(`await page.close()`);
+ },
+});
+
+const resize = defineTabTool({
+ capability: 'core',
+ schema: {
+ name: 'browser_resize',
+ title: 'Resize browser window',
+ description: 'Resize the browser window',
+ inputSchema: z.object({
+ width: z.number().describe('Width of the browser window'),
+ height: z.number().describe('Height of the browser window'),
+ }),
+ type: 'readOnly',
+ },
+
+ handle: async (tab, params, response) => {
+ response.addCode(`await page.setViewportSize({ width: ${params.width}, height: ${params.height} });`);
+
+ await tab.waitForCompletion(async () => {
+ await tab.page.setViewportSize({ width: params.width, height: params.height });
+ });
+ },
+});
+
+export default [
+ close,
+ resize
+];
diff --git a/packages/playwright/src/mcp/browser/tools/console.ts b/packages/playwright/src/mcp/browser/tools/console.ts
new file mode 100644
index 0000000000..3ad0ba4db4
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/tools/console.ts
@@ -0,0 +1,36 @@
+/**
+ * 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 '../../sdk/bundle';
+import { defineTabTool } from './tool';
+
+const console = defineTabTool({
+ capability: 'core',
+ schema: {
+ name: 'browser_console_messages',
+ title: 'Get console messages',
+ description: 'Returns all console messages',
+ inputSchema: z.object({}),
+ type: 'readOnly',
+ },
+ handle: async (tab, params, response) => {
+ tab.consoleMessages().map(message => response.addResult(message.toString()));
+ },
+});
+
+export default [
+ console,
+];
diff --git a/packages/playwright/src/mcp/browser/tools/dialogs.ts b/packages/playwright/src/mcp/browser/tools/dialogs.ts
new file mode 100644
index 0000000000..f6954b7225
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/tools/dialogs.ts
@@ -0,0 +1,55 @@
+/**
+ * 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 '../../sdk/bundle';
+import { defineTabTool } from './tool';
+
+const handleDialog = defineTabTool({
+ capability: 'core',
+
+ schema: {
+ name: 'browser_handle_dialog',
+ title: 'Handle a dialog',
+ description: 'Handle a dialog',
+ inputSchema: z.object({
+ accept: z.boolean().describe('Whether to accept the dialog.'),
+ promptText: z.string().optional().describe('The text of the prompt in case of a prompt dialog.'),
+ }),
+ type: 'destructive',
+ },
+
+ handle: async (tab, params, response) => {
+ response.setIncludeSnapshot();
+
+ const dialogState = tab.modalStates().find(state => state.type === 'dialog');
+ if (!dialogState)
+ throw new Error('No dialog visible');
+
+ tab.clearModalState(dialogState);
+ await tab.waitForCompletion(async () => {
+ if (params.accept)
+ await dialogState.dialog.accept(params.promptText);
+ else
+ await dialogState.dialog.dismiss();
+ });
+ },
+
+ clearsModalState: 'dialog',
+});
+
+export default [
+ handleDialog,
+];
diff --git a/packages/playwright/src/mcp/browser/tools/evaluate.ts b/packages/playwright/src/mcp/browser/tools/evaluate.ts
new file mode 100644
index 0000000000..b7c7645c77
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/tools/evaluate.ts
@@ -0,0 +1,61 @@
+/**
+ * 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 '../../sdk/bundle';
+import { defineTabTool } from './tool';
+import * as javascript from '../codegen';
+import { generateLocator } from './utils';
+
+import type * as playwright from 'playwright-core';
+
+const evaluateSchema = z.object({
+ function: z.string().describe('() => { /* code */ } or (element) => { /* code */ } when element is provided'),
+ element: z.string().optional().describe('Human-readable element description used to obtain permission to interact with the element'),
+ ref: z.string().optional().describe('Exact target element reference from the page snapshot'),
+});
+
+const evaluate = defineTabTool({
+ capability: 'core',
+ schema: {
+ name: 'browser_evaluate',
+ title: 'Evaluate JavaScript',
+ description: 'Evaluate JavaScript expression on page or element',
+ inputSchema: evaluateSchema,
+ type: 'destructive',
+ },
+
+ handle: async (tab, params, response) => {
+ response.setIncludeSnapshot();
+
+ let locator: playwright.Locator | undefined;
+ if (params.ref && params.element) {
+ locator = await tab.refLocator({ ref: params.ref, element: params.element });
+ response.addCode(`await page.${await generateLocator(locator)}.evaluate(${javascript.quote(params.function)});`);
+ } else {
+ response.addCode(`await page.evaluate(${javascript.quote(params.function)});`);
+ }
+
+ await tab.waitForCompletion(async () => {
+ const receiver = locator ?? tab.page as any;
+ const result = await receiver._evaluateFunction(params.function);
+ response.addResult(JSON.stringify(result, null, 2) || 'undefined');
+ });
+ },
+});
+
+export default [
+ evaluate,
+];
diff --git a/packages/playwright/src/mcp/browser/tools/files.ts b/packages/playwright/src/mcp/browser/tools/files.ts
new file mode 100644
index 0000000000..c1cdf6660b
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/tools/files.ts
@@ -0,0 +1,52 @@
+/**
+ * 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 '../../sdk/bundle';
+import { defineTabTool } from './tool';
+
+const uploadFile = defineTabTool({
+ capability: 'core',
+
+ schema: {
+ name: 'browser_file_upload',
+ title: 'Upload files',
+ description: 'Upload one or multiple files',
+ inputSchema: z.object({
+ paths: z.array(z.string()).describe('The absolute paths to the files to upload. Can be a single file or multiple files.'),
+ }),
+ type: 'destructive',
+ },
+
+ handle: async (tab, params, response) => {
+ response.setIncludeSnapshot();
+
+ const modalState = tab.modalStates().find(state => state.type === 'fileChooser');
+ if (!modalState)
+ throw new Error('No file chooser visible');
+
+ response.addCode(`await fileChooser.setFiles(${JSON.stringify(params.paths)})`);
+
+ tab.clearModalState(modalState);
+ await tab.waitForCompletion(async () => {
+ await modalState.fileChooser.setFiles(params.paths);
+ });
+ },
+ clearsModalState: 'fileChooser',
+});
+
+export default [
+ uploadFile,
+];
diff --git a/packages/playwright/src/mcp/browser/tools/form.ts b/packages/playwright/src/mcp/browser/tools/form.ts
new file mode 100644
index 0000000000..aad12ad919
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/tools/form.ts
@@ -0,0 +1,60 @@
+/**
+ * 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 '../../sdk/bundle';
+import { defineTabTool } from './tool';
+import { generateLocator } from './utils';
+import * as javascript from '../codegen';
+
+const fillForm = defineTabTool({
+ capability: 'core',
+
+ schema: {
+ name: 'browser_fill_form',
+ title: 'Fill form',
+ description: 'Fill multiple form fields',
+ inputSchema: z.object({
+ fields: z.array(z.object({
+ name: z.string().describe('Human-readable field name'),
+ type: z.enum(['textbox', 'checkbox', 'radio', 'combobox', 'slider']).describe('Type of the field'),
+ ref: z.string().describe('Exact target field reference from the page snapshot'),
+ value: z.string().describe('Value to fill in the field. If the field is a checkbox, the value should be `true` or `false`. If the field is a combobox, the value should be the text of the option.'),
+ })).describe('Fields to fill in'),
+ }),
+ type: 'destructive',
+ },
+
+ handle: async (tab, params, response) => {
+ for (const field of params.fields) {
+ const locator = await tab.refLocator({ element: field.name, ref: field.ref });
+ const locatorSource = `await page.${await generateLocator(locator)}`;
+ if (field.type === 'textbox' || field.type === 'slider') {
+ await locator.fill(field.value);
+ response.addCode(`${locatorSource}.fill(${javascript.quote(field.value)});`);
+ } else if (field.type === 'checkbox' || field.type === 'radio') {
+ await locator.setChecked(field.value === 'true');
+ response.addCode(`${locatorSource}.setChecked(${javascript.quote(field.value)});`);
+ } else if (field.type === 'combobox') {
+ await locator.selectOption({ label: field.value });
+ response.addCode(`${locatorSource}.selectOption(${javascript.quote(field.value)});`);
+ }
+ }
+ },
+});
+
+export default [
+ fillForm,
+];
diff --git a/packages/playwright/src/mcp/browser/tools/install.ts b/packages/playwright/src/mcp/browser/tools/install.ts
new file mode 100644
index 0000000000..54d67a7d06
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/tools/install.ts
@@ -0,0 +1,56 @@
+/**
+ * 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 { fork } from 'child_process';
+import path from 'path';
+
+import { z } from '../../sdk/bundle';
+import { defineTool } from './tool';
+
+const install = defineTool({
+ capability: 'core-install',
+ schema: {
+ name: 'browser_install',
+ title: 'Install the browser specified in the config',
+ description: 'Install the browser specified in the config. Call this if you get an error about the browser not being installed.',
+ inputSchema: z.object({}),
+ type: 'destructive',
+ },
+
+ handle: async (context, params, response) => {
+ const channel = context.config.browser?.launchOptions?.channel ?? context.config.browser?.browserName ?? 'chrome';
+ const cliPath = path.join(require.resolve('playwright/package.json'), '../cli.js');
+ const child = fork(cliPath, ['install', channel], {
+ stdio: 'pipe',
+ });
+ const output: string[] = [];
+ child.stdout?.on('data', data => output.push(data.toString()));
+ child.stderr?.on('data', data => output.push(data.toString()));
+ await new Promise<void>((resolve, reject) => {
+ child.on('close', code => {
+ if (code === 0)
+ resolve();
+ else
+ reject(new Error(`Failed to install browser: ${output.join('')}`));
+ });
+ });
+ response.setIncludeTabs();
+ },
+});
+
+export default [
+ install,
+];
diff --git a/packages/playwright/src/mcp/browser/tools/keyboard.ts b/packages/playwright/src/mcp/browser/tools/keyboard.ts
new file mode 100644
index 0000000000..e567bcb65b
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/tools/keyboard.ts
@@ -0,0 +1,88 @@
+/**
+ * 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 '../../sdk/bundle';
+import { defineTabTool } from './tool';
+import { elementSchema } from './snapshot';
+import { generateLocator } from './utils';
+import * as javascript from '../codegen';
+
+const pressKey = defineTabTool({
+ capability: 'core',
+
+ schema: {
+ name: 'browser_press_key',
+ title: 'Press a key',
+ description: 'Press a key on the keyboard',
+ inputSchema: z.object({
+ key: z.string().describe('Name of the key to press or a character to generate, such as `ArrowLeft` or `a`'),
+ }),
+ type: 'destructive',
+ },
+
+ handle: async (tab, params, response) => {
+ response.setIncludeSnapshot();
+ response.addCode(`// Press ${params.key}`);
+ response.addCode(`await page.keyboard.press('${params.key}');`);
+
+ await tab.waitForCompletion(async () => {
+ await tab.page.keyboard.press(params.key);
+ });
+ },
+});
+
+const typeSchema = elementSchema.extend({
+ text: z.string().describe('Text to type into the element'),
+ submit: z.boolean().optional().describe('Whether to submit entered text (press Enter after)'),
+ slowly: z.boolean().optional().describe('Whether to type one character at a time. Useful for triggering key handlers in the page. By default entire text is filled in at once.'),
+});
+
+const type = defineTabTool({
+ capability: 'core',
+ schema: {
+ name: 'browser_type',
+ title: 'Type text',
+ description: 'Type text into editable element',
+ inputSchema: typeSchema,
+ type: 'destructive',
+ },
+
+ handle: async (tab, params, response) => {
+ const locator = await tab.refLocator(params);
+
+ await tab.waitForCompletion(async () => {
+ if (params.slowly) {
+ response.setIncludeSnapshot();
+ response.addCode(`await page.${await generateLocator(locator)}.pressSequentially(${javascript.quote(params.text)});`);
+ await locator.pressSequentially(params.text);
+ } else {
+ response.addCode(`await page.${await generateLocator(locator)}.fill(${javascript.quote(params.text)});`);
+ await locator.fill(params.text);
+ }
+
+ if (params.submit) {
+ response.setIncludeSnapshot();
+ response.addCode(`await page.${await generateLocator(locator)}.press('Enter');`);
+ await locator.press('Enter');
+ }
+ });
+ },
+});
+
+export default [
+ pressKey,
+ type,
+];
diff --git a/packages/playwright/src/mcp/browser/tools/mouse.ts b/packages/playwright/src/mcp/browser/tools/mouse.ts
new file mode 100644
index 0000000000..0e0fc88e1a
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/tools/mouse.ts
@@ -0,0 +1,113 @@
+/**
+ * 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 '../../sdk/bundle';
+import { defineTabTool } from './tool';
+
+const elementSchema = z.object({
+ element: z.string().describe('Human-readable element description used to obtain permission to interact with the element'),
+});
+
+const mouseMove = defineTabTool({
+ capability: 'vision',
+ schema: {
+ name: 'browser_mouse_move_xy',
+ title: 'Move mouse',
+ description: 'Move mouse to a given position',
+ inputSchema: elementSchema.extend({
+ x: z.number().describe('X coordinate'),
+ y: z.number().describe('Y coordinate'),
+ }),
+ type: 'readOnly',
+ },
+
+ handle: async (tab, params, response) => {
+ response.addCode(`// Move mouse to (${params.x}, ${params.y})`);
+ response.addCode(`await page.mouse.move(${params.x}, ${params.y});`);
+
+ await tab.waitForCompletion(async () => {
+ await tab.page.mouse.move(params.x, params.y);
+ });
+ },
+});
+
+const mouseClick = defineTabTool({
+ capability: 'vision',
+ schema: {
+ name: 'browser_mouse_click_xy',
+ title: 'Click',
+ description: 'Click left mouse button at a given position',
+ inputSchema: elementSchema.extend({
+ x: z.number().describe('X coordinate'),
+ y: z.number().describe('Y coordinate'),
+ }),
+ type: 'destructive',
+ },
+
+ handle: async (tab, params, response) => {
+ response.setIncludeSnapshot();
+
+ response.addCode(`// Click mouse at coordinates (${params.x}, ${params.y})`);
+ response.addCode(`await page.mouse.move(${params.x}, ${params.y});`);
+ response.addCode(`await page.mouse.down();`);
+ response.addCode(`await page.mouse.up();`);
+
+ await tab.waitForCompletion(async () => {
+ await tab.page.mouse.move(params.x, params.y);
+ await tab.page.mouse.down();
+ await tab.page.mouse.up();
+ });
+ },
+});
+
+const mouseDrag = defineTabTool({
+ capability: 'vision',
+ schema: {
+ name: 'browser_mouse_drag_xy',
+ title: 'Drag mouse',
+ description: 'Drag left mouse button to a given position',
+ inputSchema: 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'),
+ }),
+ type: 'destructive',
+ },
+
+ handle: async (tab, params, response) => {
+ response.setIncludeSnapshot();
+
+ response.addCode(`// Drag mouse from (${params.startX}, ${params.startY}) to (${params.endX}, ${params.endY})`);
+ response.addCode(`await page.mouse.move(${params.startX}, ${params.startY});`);
+ response.addCode(`await page.mouse.down();`);
+ response.addCode(`await page.mouse.move(${params.endX}, ${params.endY});`);
+ response.addCode(`await page.mouse.up();`);
+
+ await tab.waitForCompletion(async () => {
+ await tab.page.mouse.move(params.startX, params.startY);
+ await tab.page.mouse.down();
+ await tab.page.mouse.move(params.endX, params.endY);
+ await tab.page.mouse.up();
+ });
+ },
+});
+
+export default [
+ mouseMove,
+ mouseClick,
+ mouseDrag,
+];
diff --git a/packages/playwright/src/mcp/browser/tools/navigate.ts b/packages/playwright/src/mcp/browser/tools/navigate.ts
new file mode 100644
index 0000000000..9998756e57
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/tools/navigate.ts
@@ -0,0 +1,62 @@
+/**
+ * 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 '../../sdk/bundle';
+import { defineTool, defineTabTool } from './tool';
+
+const navigate = defineTool({
+ capability: 'core',
+
+ schema: {
+ name: 'browser_navigate',
+ title: 'Navigate to a URL',
+ description: 'Navigate to a URL',
+ inputSchema: z.object({
+ url: z.string().describe('The URL to navigate to'),
+ }),
+ type: 'destructive',
+ },
+
+ handle: async (context, params, response) => {
+ const tab = await context.ensureTab();
+ await tab.navigate(params.url);
+
+ response.setIncludeSnapshot();
+ response.addCode(`await page.goto('${params.url}');`);
+ },
+});
+
+const goBack = defineTabTool({
+ capability: 'core',
+ schema: {
+ name: 'browser_navigate_back',
+ title: 'Go back',
+ description: 'Go back to the previous page',
+ inputSchema: z.object({}),
+ type: 'readOnly',
+ },
+
+ handle: async (tab, params, response) => {
+ await tab.page.goBack();
+ response.setIncludeSnapshot();
+ response.addCode(`await page.goBack();`);
+ },
+});
+
+export default [
+ navigate,
+ goBack,
+];
diff --git a/packages/playwright/src/mcp/browser/tools/network.ts b/packages/playwright/src/mcp/browser/tools/network.ts
new file mode 100644
index 0000000000..2ea081671c
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/tools/network.ts
@@ -0,0 +1,49 @@
+/**
+ * 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 '../../sdk/bundle';
+import { defineTabTool } from './tool';
+
+import type * as playwright from 'playwright-core';
+
+const requests = defineTabTool({
+ capability: 'core',
+
+ schema: {
+ name: 'browser_network_requests',
+ title: 'List network requests',
+ description: 'Returns all network requests since loading the page',
+ inputSchema: z.object({}),
+ type: 'readOnly',
+ },
+
+ handle: async (tab, params, response) => {
+ const requests = tab.requests();
+ [...requests.entries()].forEach(([req, res]) => response.addResult(renderRequest(req, res)));
+ },
+});
+
+function renderRequest(request: playwright.Request, response: playwright.Response | null) {
+ const result: string[] = [];
+ result.push(`[${request.method().toUpperCase()}] ${request.url()}`);
+ if (response)
+ result.push(`=> [${response.status()}] ${response.statusText()}`);
+ return result.join(' ');
+}
+
+export default [
+ requests,
+];
diff --git a/packages/playwright/src/mcp/browser/tools/pdf.ts b/packages/playwright/src/mcp/browser/tools/pdf.ts
new file mode 100644
index 0000000000..b4c9b14ef4
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/tools/pdf.ts
@@ -0,0 +1,46 @@
+/**
+ * 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 '../../sdk/bundle';
+import { defineTabTool } from './tool';
+import * as javascript from '../codegen';
+
+const pdfSchema = z.object({
+ filename: z.string().optional().describe('File name to save the pdf to. Defaults to `page-{timestamp}.pdf` if not specified.'),
+});
+
+const pdf = defineTabTool({
+ capability: 'pdf',
+
+ schema: {
+ name: 'browser_pdf_save',
+ title: 'Save as PDF',
+ description: 'Save page as PDF',
+ inputSchema: pdfSchema,
+ type: 'readOnly',
+ },
+
+ handle: async (tab, params, response) => {
+ const fileName = await tab.context.outputFile(params.filename ?? `page-${new Date().toISOString()}.pdf`);
+ response.addCode(`await page.pdf(${javascript.formatObject({ path: fileName })});`);
+ response.addResult(`Saved page as ${fileName}`);
+ await tab.page.pdf({ path: fileName });
+ },
+});
+
+export default [
+ pdf,
+];
diff --git a/packages/playwright/src/mcp/browser/tools/screenshot.ts b/packages/playwright/src/mcp/browser/tools/screenshot.ts
new file mode 100644
index 0000000000..4ee5cf81d9
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/tools/screenshot.ts
@@ -0,0 +1,91 @@
+/**
+ * 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 '../../sdk/bundle';
+import { defineTabTool } from './tool';
+import * as javascript from '../codegen';
+import { generateLocator } from './utils';
+
+import type * as playwright from 'playwright-core';
+
+const screenshotSchema = z.object({
+ type: z.enum(['png', 'jpeg']).default('png').describe('Image format for the screenshot. Default is png.'),
+ filename: z.string().optional().describe('File name to save the screenshot to. Defaults to `page-{timestamp}.{png|jpeg}` if not specified.'),
+ element: z.string().optional().describe('Human-readable element description used to obtain permission to screenshot the element. If not provided, the screenshot will be taken of viewport. If element is provided, ref must be provided too.'),
+ ref: z.string().optional().describe('Exact target element reference from the page snapshot. If not provided, the screenshot will be taken of viewport. If ref is provided, element must be provided too.'),
+ fullPage: z.boolean().optional().describe('When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Cannot be used with element screenshots.'),
+}).refine(data => {
+ return !!data.element === !!data.ref;
+}, {
+ message: 'Both element and ref must be provided or neither.',
+ path: ['ref', 'element']
+}).refine(data => {
+ return !(data.fullPage && (data.element || data.ref));
+}, {
+ message: 'fullPage cannot be used with element screenshots.',
+ path: ['fullPage']
+});
+
+const screenshot = defineTabTool({
+ capability: 'core',
+ schema: {
+ name: 'browser_take_screenshot',
+ title: 'Take a screenshot',
+ description: `Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.`,
+ inputSchema: screenshotSchema,
+ type: 'readOnly',
+ },
+
+ handle: async (tab, params, response) => {
+ const fileType = params.type || 'png';
+ const fileName = await tab.context.outputFile(params.filename ?? `page-${new Date().toISOString()}.${fileType}`);
+ const options: playwright.PageScreenshotOptions = {
+ type: fileType,
+ quality: fileType === 'png' ? undefined : 90,
+ scale: 'css',
+ path: fileName,
+ ...(params.fullPage !== undefined && { fullPage: params.fullPage })
+ };
+ const isElementScreenshot = params.element && params.ref;
+
+ const screenshotTarget = isElementScreenshot ? params.element : (params.fullPage ? 'full page' : 'viewport');
+ response.addCode(`// Screenshot ${screenshotTarget} and save it as ${fileName}`);
+
+ // Only get snapshot when element screenshot is needed
+ const locator = params.ref ? await tab.refLocator({ element: params.element || '', ref: params.ref }) : null;
+
+ if (locator)
+ response.addCode(`await page.${await generateLocator(locator)}.screenshot(${javascript.formatObject(options)});`);
+ else
+ response.addCode(`await page.screenshot(${javascript.formatObject(options)});`);
+
+ const buffer = locator ? await locator.screenshot(options) : await tab.page.screenshot(options);
+ response.addResult(`Took the ${screenshotTarget} screenshot and saved it as ${fileName}`);
+
+ // https://github.com/microsoft/playwright-mcp/issues/817
+ // Never return large images to LLM, saving them to the file system is enough.
+ if (!params.fullPage) {
+ response.addImage({
+ contentType: fileType === 'png' ? 'image/png' : 'image/jpeg',
+ data: buffer
+ });
+ }
+ }
+});
+
+export default [
+ screenshot,
+];
diff --git a/packages/playwright/src/mcp/browser/tools/snapshot.ts b/packages/playwright/src/mcp/browser/tools/snapshot.ts
new file mode 100644
index 0000000000..03c6852e14
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/tools/snapshot.ts
@@ -0,0 +1,165 @@
+/**
+ * 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 '../../sdk/bundle';
+import { defineTabTool, defineTool } from './tool';
+import * as javascript from '../codegen';
+import { generateLocator } from './utils';
+
+const snapshot = defineTool({
+ capability: 'core',
+ schema: {
+ name: 'browser_snapshot',
+ title: 'Page snapshot',
+ description: 'Capture accessibility snapshot of the current page, this is better than screenshot',
+ inputSchema: z.object({}),
+ type: 'readOnly',
+ },
+
+ handle: async (context, params, response) => {
+ await context.ensureTab();
+ response.setIncludeSnapshot();
+ },
+});
+
+export 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'),
+});
+
+const clickSchema = elementSchema.extend({
+ doubleClick: z.boolean().optional().describe('Whether to perform a double click instead of a single click'),
+ button: z.enum(['left', 'right', 'middle']).optional().describe('Button to click, defaults to left'),
+});
+
+const click = defineTabTool({
+ capability: 'core',
+ schema: {
+ name: 'browser_click',
+ title: 'Click',
+ description: 'Perform click on a web page',
+ inputSchema: clickSchema,
+ type: 'destructive',
+ },
+
+ handle: async (tab, params, response) => {
+ response.setIncludeSnapshot();
+
+ const locator = await tab.refLocator(params);
+ const button = params.button;
+ const buttonAttr = button ? `{ button: '${button}' }` : '';
+
+ if (params.doubleClick)
+ response.addCode(`await page.${await generateLocator(locator)}.dblclick(${buttonAttr});`);
+ else
+ response.addCode(`await page.${await generateLocator(locator)}.click(${buttonAttr});`);
+
+
+ await tab.waitForCompletion(async () => {
+ if (params.doubleClick)
+ await locator.dblclick({ button });
+ else
+ await locator.click({ button });
+ });
+ },
+});
+
+const drag = defineTabTool({
+ capability: 'core',
+ schema: {
+ name: 'browser_drag',
+ title: 'Drag mouse',
+ description: 'Perform drag and drop between two elements',
+ inputSchema: 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'),
+ }),
+ type: 'destructive',
+ },
+
+ handle: async (tab, params, response) => {
+ response.setIncludeSnapshot();
+
+ const [startLocator, endLocator] = await tab.refLocators([
+ { ref: params.startRef, element: params.startElement },
+ { ref: params.endRef, element: params.endElement },
+ ]);
+
+ await tab.waitForCompletion(async () => {
+ await startLocator.dragTo(endLocator);
+ });
+
+ response.addCode(`await page.${await generateLocator(startLocator)}.dragTo(page.${await generateLocator(endLocator)});`);
+ },
+});
+
+const hover = defineTabTool({
+ capability: 'core',
+ schema: {
+ name: 'browser_hover',
+ title: 'Hover mouse',
+ description: 'Hover over element on page',
+ inputSchema: elementSchema,
+ type: 'readOnly',
+ },
+
+ handle: async (tab, params, response) => {
+ response.setIncludeSnapshot();
+
+ const locator = await tab.refLocator(params);
+ response.addCode(`await page.${await generateLocator(locator)}.hover();`);
+
+ await tab.waitForCompletion(async () => {
+ await locator.hover();
+ });
+ },
+});
+
+const selectOptionSchema = elementSchema.extend({
+ values: z.array(z.string()).describe('Array of values to select in the dropdown. This can be a single value or multiple values.'),
+});
+
+const selectOption = defineTabTool({
+ capability: 'core',
+ schema: {
+ name: 'browser_select_option',
+ title: 'Select option',
+ description: 'Select an option in a dropdown',
+ inputSchema: selectOptionSchema,
+ type: 'destructive',
+ },
+
+ handle: async (tab, params, response) => {
+ response.setIncludeSnapshot();
+
+ const locator = await tab.refLocator(params);
+ response.addCode(`await page.${await generateLocator(locator)}.selectOption(${javascript.formatObject(params.values)});`);
+
+ await tab.waitForCompletion(async () => {
+ await locator.selectOption(params.values);
+ });
+ },
+});
+
+export default [
+ snapshot,
+ click,
+ drag,
+ hover,
+ selectOption,
+];
diff --git a/packages/playwright/src/mcp/browser/tools/tabs.ts b/packages/playwright/src/mcp/browser/tools/tabs.ts
new file mode 100644
index 0000000000..77ad91ff90
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/tools/tabs.ts
@@ -0,0 +1,64 @@
+/**
+ * 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 '../../sdk/bundle';
+import { defineTool } from './tool';
+
+const browserTabs = defineTool({
+ capability: 'core-tabs',
+
+ schema: {
+ name: 'browser_tabs',
+ title: 'Manage tabs',
+ description: 'List, create, close, or select a browser tab.',
+ inputSchema: z.object({
+ action: z.enum(['list', 'new', 'close', 'select']).describe('Operation to perform'),
+ index: z.number().optional().describe('Tab index, used for close/select. If omitted for close, current tab is closed.'),
+ }),
+ type: 'destructive',
+ },
+
+ handle: async (context, params, response) => {
+ switch (params.action) {
+ case 'list': {
+ await context.ensureTab();
+ response.setIncludeTabs();
+ return;
+ }
+ case 'new': {
+ await context.newTab();
+ response.setIncludeTabs();
+ return;
+ }
+ case 'close': {
+ await context.closeTab(params.index);
+ response.setIncludeSnapshot();
+ return;
+ }
+ case 'select': {
+ if (params.index === undefined)
+ throw new Error('Tab index is required');
+ await context.selectTab(params.index);
+ response.setIncludeSnapshot();
+ return;
+ }
+ }
+ },
+});
+
+export default [
+ browserTabs,
+];
diff --git a/packages/playwright/src/mcp/browser/tools/tool.ts b/packages/playwright/src/mcp/browser/tools/tool.ts
new file mode 100644
index 0000000000..a4f8a11a63
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/tools/tool.ts
@@ -0,0 +1,70 @@
+/**
+ * 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 { z } from 'zod';
+import type { Context } from '../context';
+import type * as playwright from 'playwright-core';
+import type { ToolCapability } from '../../config';
+import type { Tab } from '../tab';
+import type { Response } from '../response';
+import type { ToolSchema } from '../../sdk/tool';
+
+export type FileUploadModalState = {
+ type: 'fileChooser';
+ description: string;
+ fileChooser: playwright.FileChooser;
+};
+
+export type DialogModalState = {
+ type: 'dialog';
+ description: string;
+ dialog: playwright.Dialog;
+};
+
+export type ModalState = FileUploadModalState | DialogModalState;
+
+export type Tool<Input extends z.Schema = z.Schema> = {
+ capability: ToolCapability;
+ schema: ToolSchema<Input>;
+ handle: (context: Context, params: z.output<Input>, response: Response) => Promise<void>;
+};
+
+export function defineTool<Input extends z.Schema>(tool: Tool<Input>): Tool<Input> {
+ return tool;
+}
+
+export type TabTool<Input extends z.Schema = z.Schema> = {
+ capability: ToolCapability;
+ schema: ToolSchema<Input>;
+ clearsModalState?: ModalState['type'];
+ handle: (tab: Tab, params: z.output<Input>, response: Response) => Promise<void>;
+};
+
+export function defineTabTool<Input extends z.Schema>(tool: TabTool<Input>): Tool<Input> {
+ return {
+ ...tool,
+ handle: async (context, params, response) => {
+ const tab = context.currentTabOrDie();
+ const modalStates = tab.modalStates().map(state => state.type);
+ if (tool.clearsModalState && !modalStates.includes(tool.clearsModalState))
+ response.addError(`Error: The tool "${tool.schema.name}" can only be used when there is related modal state present.\n` + tab.modalStatesMarkdown().join('\n'));
+ else if (!tool.clearsModalState && modalStates.length)
+ response.addError(`Error: Tool "${tool.schema.name}" does not handle the modal state.\n` + tab.modalStatesMarkdown().join('\n'));
+ else
+ return tool.handle(tab, params, response);
+ },
+ };
+}
diff --git a/packages/playwright/src/mcp/browser/tools/utils.ts b/packages/playwright/src/mcp/browser/tools/utils.ts
new file mode 100644
index 0000000000..2aedef1e50
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/tools/utils.ts
@@ -0,0 +1,84 @@
+/**
+ * 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 { asLocator } from 'playwright-core/lib/utils';
+
+import type * as playwright from 'playwright-core';
+import type { Tab } from '../tab';
+
+export async function waitForCompletion<R>(tab: Tab, 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 tab.waitForLoadState('load').then(waitCallback);
+ };
+
+ const onTimeout = () => {
+ dispose();
+ waitCallback();
+ };
+
+ tab.page.on('request', requestListener);
+ tab.page.on('requestfinished', requestFinishedListener);
+ tab.page.on('framenavigated', frameNavigateListener);
+ const timeout = setTimeout(onTimeout, 10000);
+
+ const dispose = () => {
+ tab.page.off('request', requestListener);
+ tab.page.off('requestfinished', requestFinishedListener);
+ tab.page.off('framenavigated', frameNavigateListener);
+ clearTimeout(timeout);
+ };
+
+ try {
+ const result = await callback();
+ if (!requests.size && !frameNavigated)
+ waitCallback();
+ await waitBarrier;
+ await tab.waitForTimeout(1000);
+ return result;
+ } finally {
+ dispose();
+ }
+}
+
+export async function generateLocator(locator: playwright.Locator): Promise<string> {
+ try {
+ const { resolvedSelector } = await (locator as any)._resolveSelector();
+ return asLocator('javascript', resolvedSelector);
+ } catch (e) {
+ throw new Error('Ref not found, likely because element was removed. Use browser_snapshot to see what elements are currently on the page.');
+ }
+}
+
+export async function callOnPageNoTrace<T>(page: playwright.Page, callback: (page: playwright.Page) => Promise<T>): Promise<T> {
+ return await (page as any)._wrapApiCall(() => callback(page), { internal: true });
+}
diff --git a/packages/playwright/src/mcp/browser/tools/verify.ts b/packages/playwright/src/mcp/browser/tools/verify.ts
new file mode 100644
index 0000000000..809ed2ab02
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/tools/verify.ts
@@ -0,0 +1,148 @@
+/**
+ * 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 '../../sdk/bundle';
+import { defineTabTool } from './tool';
+import * as javascript from '../codegen';
+import { generateLocator } from './utils';
+
+const verifyElement = defineTabTool({
+ capability: 'verify',
+ schema: {
+ name: 'browser_verify_element_visible',
+ title: 'Verify element visible',
+ description: 'Verify element is visible on the page',
+ inputSchema: z.object({
+ role: z.string().describe('ROLE of the element. Can be found in the snapshot like this: \`- {ROLE} "Accessible Name":\`'),
+ accessibleName: z.string().describe('ACCESSIBLE_NAME of the element. Can be found in the snapshot like this: \`- role "{ACCESSIBLE_NAME}"\`'),
+ }),
+ type: 'readOnly',
+ },
+
+ handle: async (tab, params, response) => {
+ const locator = tab.page.getByRole(params.role as any, { name: params.accessibleName });
+ if (await locator.count() === 0) {
+ response.addError(`Element with role "${params.role}" and accessible name "${params.accessibleName}" not found`);
+ return;
+ }
+
+ response.addCode(`await expect(page.getByRole(${javascript.escapeWithQuotes(params.role)}, { name: ${javascript.escapeWithQuotes(params.accessibleName)} })).toBeVisible();`);
+ response.addResult('Done');
+ },
+});
+
+const verifyText = defineTabTool({
+ capability: 'verify',
+ schema: {
+ name: 'browser_verify_text_visible',
+ title: 'Verify text visible',
+ description: `Verify text is visible on the page. Prefer ${verifyElement.schema.name} if possible.`,
+ inputSchema: z.object({
+ text: z.string().describe('TEXT to verify. Can be found in the snapshot like this: \`- role "Accessible Name": {TEXT}\` or like this: \`- text: {TEXT}\`'),
+ }),
+ type: 'readOnly',
+ },
+
+ handle: async (tab, params, response) => {
+ const locator = tab.page.getByText(params.text).filter({ visible: true });
+ if (await locator.count() === 0) {
+ response.addError('Text not found');
+ return;
+ }
+
+ response.addCode(`await expect(page.getByText(${javascript.escapeWithQuotes(params.text)})).toBeVisible();`);
+ response.addResult('Done');
+ },
+});
+
+const verifyList = defineTabTool({
+ capability: 'verify',
+ schema: {
+ name: 'browser_verify_list_visible',
+ title: 'Verify list visible',
+ description: 'Verify list is visible on the page',
+ inputSchema: z.object({
+ element: z.string().describe('Human-readable list description'),
+ ref: z.string().describe('Exact target element reference that points to the list'),
+ items: z.array(z.string()).describe('Items to verify'),
+ }),
+ type: 'readOnly',
+ },
+
+ handle: async (tab, params, response) => {
+ const locator = await tab.refLocator({ ref: params.ref, element: params.element });
+ const itemTexts: string[] = [];
+ for (const item of params.items) {
+ const itemLocator = locator.getByText(item);
+ if (await itemLocator.count() === 0) {
+ response.addError(`Item "${item}" not found`);
+ return;
+ }
+ itemTexts.push((await itemLocator.textContent())!);
+ }
+ const ariaSnapshot = `\`
+- list:
+${itemTexts.map(t => ` - listitem: ${javascript.escapeWithQuotes(t, '"')}`).join('\n')}
+\``;
+ response.addCode(`await expect(page.locator('body')).toMatchAriaSnapshot(${ariaSnapshot});`);
+ response.addResult('Done');
+ },
+});
+
+const verifyValue = defineTabTool({
+ capability: 'verify',
+ schema: {
+ name: 'browser_verify_value',
+ title: 'Verify value',
+ description: 'Verify element value',
+ inputSchema: z.object({
+ type: z.enum(['textbox', 'checkbox', 'radio', 'combobox', 'slider']).describe('Type of the element'),
+ element: z.string().describe('Human-readable element description'),
+ ref: z.string().describe('Exact target element reference that points to the element'),
+ value: z.string().describe('Value to verify. For checkbox, use "true" or "false".'),
+ }),
+ type: 'readOnly',
+ },
+
+ handle: async (tab, params, response) => {
+ const locator = await tab.refLocator({ ref: params.ref, element: params.element });
+ const locatorSource = `page.${await generateLocator(locator)}`;
+ if (params.type === 'textbox' || params.type === 'slider' || params.type === 'combobox') {
+ const value = await locator.inputValue();
+ if (value !== params.value) {
+ response.addError(`Expected value "${params.value}", but got "${value}"`);
+ return;
+ }
+ response.addCode(`await expect(${locatorSource}).toHaveValue(${javascript.quote(params.value)});`);
+ } else if (params.type === 'checkbox' || params.type === 'radio') {
+ const value = await locator.isChecked();
+ if (value !== (params.value === 'true')) {
+ response.addError(`Expected value "${params.value}", but got "${value}"`);
+ return;
+ }
+ const matcher = value ? 'toBeChecked' : 'not.toBeChecked';
+ response.addCode(`await expect(${locatorSource}).${matcher}();`);
+ }
+ response.addResult('Done');
+ },
+});
+
+export default [
+ verifyElement,
+ verifyText,
+ verifyList,
+ verifyValue,
+];
diff --git a/packages/playwright/src/mcp/browser/tools/wait.ts b/packages/playwright/src/mcp/browser/tools/wait.ts
new file mode 100644
index 0000000000..a0f5382b6a
--- /dev/null
+++ b/packages/playwright/src/mcp/browser/tools/wait.ts
@@ -0,0 +1,65 @@
+/**
+ * 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 '../../sdk/bundle';
+import { defineTool } from './tool';
+
+const wait = defineTool({
+ capability: 'core',
+
+ schema: {
+ name: 'browser_wait_for',
+ title: 'Wait for',
+ description: 'Wait for text to appear or disappear or a specified time to pass',
+ inputSchema: z.object({
+ time: z.number().optional().describe('The time to wait in seconds'),
+ text: z.string().optional().describe('The text to wait for'),
+ textGone: z.string().optional().describe('The text to wait for to disappear'),
+ }),
+ type: 'readOnly',
+ },
+
+ handle: async (context, params, response) => {
+ if (!params.text && !params.textGone && !params.time)
+ throw new Error('Either time, text or textGone must be provided');
+
+ if (params.time) {
+ response.addCode(`await new Promise(f => setTimeout(f, ${params.time!} * 1000));`);
+ await new Promise(f => setTimeout(f, Math.min(30000, params.time! * 1000)));
+ }
+
+ const tab = context.currentTabOrDie();
+ const locator = params.text ? tab.page.getByText(params.text).first() : undefined;
+ const goneLocator = params.textGone ? tab.page.getByText(params.textGone).first() : undefined;
+
+ if (goneLocator) {
+ response.addCode(`await page.getByText(${JSON.stringify(params.textGone)}).first().waitFor({ state: 'hidden' });`);
+ await goneLocator.waitFor({ state: 'hidden' });
+ }
+
+ if (locator) {
+ response.addCode(`await page.getByText(${JSON.stringify(params.text)}).first().waitFor({ state: 'visible' });`);
+ await locator.waitFor({ state: 'visible' });
+ }
+
+ response.addResult(`Waited for ${params.text || params.textGone || params.time}`);
+ response.setIncludeSnapshot();
+ },
+});
+
+export default [
+ wait,
+];
diff --git a/packages/playwright/src/mcp/config.d.ts b/packages/playwright/src/mcp/config.d.ts
new file mode 100644
index 0000000000..ffeb8120b1
--- /dev/null
+++ b/packages/playwright/src/mcp/config.d.ts
@@ -0,0 +1,120 @@
+/**
+ * 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-core';
+
+export type ToolCapability = 'core' | 'core-tabs' | 'core-install' | 'vision' | 'pdf' | 'verify';
+
+export type Config = {
+ /**
+ * The browser to use.
+ */
+ browser?: {
+ /**
+ * The type of browser to use.
+ */
+ browserName?: 'chromium' | 'firefox' | 'webkit';
+
+ /**
+ * Keep the browser profile in memory, do not save it to disk.
+ */
+ isolated?: boolean;
+
+ /**
+ * Path to a user data directory for browser profile persistence.
+ * Temporary directory is created by default.
+ */
+ userDataDir?: string;
+
+ /**
+ * Launch options passed to
+ * @see https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context
+ *
+ * This is useful for settings options like `channel`, `headless`, `executablePath`, etc.
+ */
+ launchOptions?: playwright.LaunchOptions;
+
+ /**
+ * Context options for the browser context.
+ *
+ * This is useful for settings options like `viewport`.
+ */
+ contextOptions?: playwright.BrowserContextOptions;
+
+ /**
+ * Chrome DevTools Protocol endpoint to connect to an existing browser instance in case of Chromium family browsers.
+ */
+ cdpEndpoint?: string;
+
+ /**
+ * Remote endpoint to connect to an existing Playwright server.
+ */
+ remoteEndpoint?: string;
+ },
+
+ server?: {
+ /**
+ * The port to listen on for SSE or MCP transport.
+ */
+ port?: number;
+
+ /**
+ * The host to bind the server to. Default is localhost. Use 0.0.0.0 to bind to all interfaces.
+ */
+ host?: string;
+ },
+
+ /**
+ * List of enabled tool capabilities. Possible values:
+ * - 'core': Core browser automation features.
+ * - 'pdf': PDF generation and manipulation.
+ * - 'vision': Coordinate-based interactions.
+ */
+ capabilities?: ToolCapability[];
+
+ /**
+ * Whether to save the Playwright session into the output directory.
+ */
+ saveSession?: boolean;
+
+ /**
+ * Whether to save the Playwright trace of the session into the output directory.
+ */
+ saveTrace?: boolean;
+
+ /**
+ * The directory to save output files.
+ */
+ outputDir?: string;
+
+ network?: {
+ /**
+ * List of origins to allow the browser to request. Default is to allow all. Origins matching both `allowedOrigins` and `blockedOrigins` will be blocked.
+ */
+ allowedOrigins?: string[];
+
+ /**
+ * List of origins to block the browser to request. Origins matching both `allowedOrigins` and `blockedOrigins` will be blocked.
+ */
+ blockedOrigins?: string[];
+ };
+
+ /**
+ * Whether to send image responses to the client. Can be "allow", "omit", or "auto". Defaults to "auto", which sends images if the client can display them.
+ */
+ imageResponses?: 'allow' | 'omit';
+};
+
diff --git a/packages/playwright/src/mcp/extension/DEPS.list b/packages/playwright/src/mcp/extension/DEPS.list
new file mode 100644
index 0000000000..65f47af053
--- /dev/null
+++ b/packages/playwright/src/mcp/extension/DEPS.list
@@ -0,0 +1,4 @@
+[*]
+../sdk/
+../browser/
+../log.ts
diff --git a/packages/playwright/src/mcp/extension/cdpRelay.ts b/packages/playwright/src/mcp/extension/cdpRelay.ts
new file mode 100644
index 0000000000..87660277b1
--- /dev/null
+++ b/packages/playwright/src/mcp/extension/cdpRelay.ts
@@ -0,0 +1,421 @@
+/**
+ * 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.
+ */
+
+/**
+ * WebSocket server that bridges Playwright MCP and Chrome Extension
+ *
+ * Endpoints:
+ * - /cdp/guid - Full CDP interface for Playwright MCP
+ * - /extension/guid - Extension connection for chrome.debugger forwarding
+ */
+
+import { spawn } from 'child_process';
+import http from 'http';
+
+import { debug, ws, wsServer } from 'playwright-core/lib/utilsBundle';
+import { registry } from 'playwright-core/lib/server/registry/index';
+import { ManualPromise } from 'playwright-core/lib/utils';
+
+import { httpAddressToString } from '../sdk/http';
+import { logUnhandledError } from '../log';
+import * as protocol from './protocol';
+
+import type websocket from 'ws';
+import type { ClientInfo } from '../browser/browserContextFactory';
+import type { ExtensionCommand, ExtensionEvents } from './protocol';
+import type { WebSocket, WebSocketServer } from 'playwright-core/lib/utilsBundle';
+
+
+const debugLogger = debug('pw:mcp:relay');
+
+type CDPCommand = {
+ id: number;
+ sessionId?: string;
+ method: string;
+ params?: any;
+};
+
+type CDPResponse = {
+ id?: number;
+ sessionId?: string;
+ method?: string;
+ params?: any;
+ result?: any;
+ error?: { code?: number; message: string };
+};
+
+export class CDPRelayServer {
+ private _wsHost: string;
+ private _browserChannel: string;
+ private _userDataDir?: string;
+ private _executablePath?: string;
+ private _cdpPath: string;
+ private _extensionPath: string;
+ private _wss: WebSocketServer;
+ private _playwrightConnection: WebSocket | null = null;
+ private _extensionConnection: ExtensionConnection | null = null;
+ private _connectedTabInfo: {
+ targetInfo: any;
+ // Page sessionId that should be used by this connection.
+ sessionId: string;
+ } | undefined;
+ private _nextSessionId: number = 1;
+ private _extensionConnectionPromise!: ManualPromise<void>;
+
+ constructor(server: http.Server, browserChannel: string, userDataDir?: string, executablePath?: string) {
+ this._wsHost = httpAddressToString(server.address()).replace(/^http/, 'ws');
+ this._browserChannel = browserChannel;
+ this._userDataDir = userDataDir;
+ this._executablePath = executablePath;
+
+ const uuid = crypto.randomUUID();
+ this._cdpPath = `/cdp/${uuid}`;
+ this._extensionPath = `/extension/${uuid}`;
+
+ this._resetExtensionConnection();
+ this._wss = new wsServer({ server });
+ this._wss.on('connection', this._onConnection.bind(this));
+ }
+
+ cdpEndpoint() {
+ return `${this._wsHost}${this._cdpPath}`;
+ }
+
+ extensionEndpoint() {
+ return `${this._wsHost}${this._extensionPath}`;
+ }
+
+ async ensureExtensionConnectionForMCPContext(clientInfo: ClientInfo, abortSignal: AbortSignal, toolName: string | undefined) {
+ debugLogger('Ensuring extension connection for MCP context');
+ if (this._extensionConnection)
+ return;
+ this._connectBrowser(clientInfo, toolName);
+ debugLogger('Waiting for incoming extension connection');
+ await Promise.race([
+ this._extensionConnectionPromise,
+ new Promise((_, reject) => setTimeout(() => {
+ reject(new Error(`Extension connection timeout. Make sure the "Playwright MCP Bridge" extension is installed. See https://github.com/microsoft/playwright-mcp/blob/main/extension/README.md for installation instructions.`));
+ }, process.env.PWMCP_TEST_CONNECTION_TIMEOUT ? parseInt(process.env.PWMCP_TEST_CONNECTION_TIMEOUT, 10) : 5_000)),
+ new Promise((_, reject) => abortSignal.addEventListener('abort', reject))
+ ]);
+ debugLogger('Extension connection established');
+ }
+
+ private _connectBrowser(clientInfo: ClientInfo, toolName: string | undefined) {
+ const mcpRelayEndpoint = `${this._wsHost}${this._extensionPath}`;
+ // Need to specify "key" in the manifest.json to make the id stable when loading from file.
+ const url = new URL('chrome-extension://jakfalbnbhgkpmoaakfflhflbfpkailf/connect.html');
+ url.searchParams.set('mcpRelayUrl', mcpRelayEndpoint);
+ const client = {
+ name: clientInfo.name,
+ version: clientInfo.version,
+ };
+ url.searchParams.set('client', JSON.stringify(client));
+ url.searchParams.set('protocolVersion', process.env.PWMCP_TEST_PROTOCOL_VERSION ?? protocol.VERSION.toString());
+ if (toolName)
+ url.searchParams.set('newTab', String(toolName === 'browser_navigate'));
+ const href = url.toString();
+
+ let executablePath = this._executablePath;
+ if (!executablePath) {
+ const executableInfo = registry.findExecutable(this._browserChannel);
+ if (!executableInfo)
+ throw new Error(`Unsupported channel: "${this._browserChannel}"`);
+ executablePath = executableInfo.executablePath('javascript');
+ if (!executablePath)
+ throw new Error(`"${this._browserChannel}" executable not found. Make sure it is installed at a standard location.`);
+ }
+
+ const args: string[] = [];
+ if (this._userDataDir)
+ args.push(`--user-data-dir=${this._userDataDir}`);
+ args.push(href);
+
+ spawn(executablePath, args, {
+ windowsHide: true,
+ detached: true,
+ shell: false,
+ stdio: 'ignore',
+ });
+ }
+
+ stop(): void {
+ this.closeConnections('Server stopped');
+ this._wss.close();
+ }
+
+ closeConnections(reason: string) {
+ this._closePlaywrightConnection(reason);
+ this._closeExtensionConnection(reason);
+ }
+
+ private _onConnection(ws: WebSocket, request: http.IncomingMessage): void {
+ const url = new URL(`http://localhost${request.url}`);
+ debugLogger(`New connection to ${url.pathname}`);
+ if (url.pathname === this._cdpPath) {
+ this._handlePlaywrightConnection(ws);
+ } else if (url.pathname === this._extensionPath) {
+ this._handleExtensionConnection(ws);
+ } else {
+ debugLogger(`Invalid path: ${url.pathname}`);
+ ws.close(4004, 'Invalid path');
+ }
+ }
+
+ private _handlePlaywrightConnection(ws: WebSocket): void {
+ if (this._playwrightConnection) {
+ debugLogger('Rejecting second Playwright connection');
+ ws.close(1000, 'Another CDP client already connected');
+ return;
+ }
+ this._playwrightConnection = ws;
+ ws.on('message', async data => {
+ try {
+ const message = JSON.parse(data.toString());
+ await this._handlePlaywrightMessage(message);
+ } catch (error: any) {
+ debugLogger(`Error while handling Playwright message\n${data.toString()}\n`, error);
+ }
+ });
+ ws.on('close', () => {
+ if (this._playwrightConnection !== ws)
+ return;
+ this._playwrightConnection = null;
+ this._closeExtensionConnection('Playwright client disconnected');
+ debugLogger('Playwright WebSocket closed');
+ });
+ ws.on('error', error => {
+ debugLogger('Playwright WebSocket error:', error);
+ });
+ debugLogger('Playwright MCP connected');
+ }
+
+ private _closeExtensionConnection(reason: string) {
+ this._extensionConnection?.close(reason);
+ this._extensionConnectionPromise.reject(new Error(reason));
+ this._resetExtensionConnection();
+ }
+
+ private _resetExtensionConnection() {
+ this._connectedTabInfo = undefined;
+ this._extensionConnection = null;
+ this._extensionConnectionPromise = new ManualPromise();
+ void this._extensionConnectionPromise.catch(logUnhandledError);
+ }
+
+ private _closePlaywrightConnection(reason: string) {
+ if (this._playwrightConnection?.readyState === ws.OPEN)
+ this._playwrightConnection.close(1000, reason);
+ this._playwrightConnection = null;
+ }
+
+ private _handleExtensionConnection(ws: WebSocket): void {
+ if (this._extensionConnection) {
+ ws.close(1000, 'Another extension connection already established');
+ return;
+ }
+ this._extensionConnection = new ExtensionConnection(ws);
+ this._extensionConnection.onclose = (c, reason) => {
+ debugLogger('Extension WebSocket closed:', reason, c === this._extensionConnection);
+ if (this._extensionConnection !== c)
+ return;
+ this._resetExtensionConnection();
+ this._closePlaywrightConnection(`Extension disconnected: ${reason}`);
+ };
+ this._extensionConnection.onmessage = this._handleExtensionMessage.bind(this);
+ this._extensionConnectionPromise.resolve();
+ }
+
+ private _handleExtensionMessage<M extends keyof ExtensionEvents>(method: M, params: ExtensionEvents[M]['params']) {
+ switch (method) {
+ case 'forwardCDPEvent':
+ const sessionId = params.sessionId || this._connectedTabInfo?.sessionId;
+ this._sendToPlaywright({
+ sessionId,
+ method: params.method,
+ params: params.params
+ });
+ break;
+ }
+ }
+
+ private async _handlePlaywrightMessage(message: CDPCommand): Promise<void> {
+ debugLogger('← Playwright:', `${message.method} (id=${message.id})`);
+ const { id, sessionId, method, params } = message;
+ try {
+ const result = await this._handleCDPCommand(method, params, sessionId);
+ this._sendToPlaywright({ id, sessionId, result });
+ } catch (e) {
+ debugLogger('Error in the extension:', e);
+ this._sendToPlaywright({
+ id,
+ sessionId,
+ error: { message: (e as Error).message }
+ });
+ }
+ }
+
+ private async _handleCDPCommand(method: string, params: any, sessionId: string | undefined): Promise<any> {
+ switch (method) {
+ case 'Browser.getVersion': {
+ return {
+ protocolVersion: '1.3',
+ product: 'Chrome/Extension-Bridge',
+ userAgent: 'CDP-Bridge-Server/1.0.0',
+ };
+ }
+ case 'Browser.setDownloadBehavior': {
+ return { };
+ }
+ case 'Target.setAutoAttach': {
+ // Forward child session handling.
+ if (sessionId)
+ break;
+ // Simulate auto-attach behavior with real target info
+ const { targetInfo } = await this._extensionConnection!.send('attachToTab', { });
+ this._connectedTabInfo = {
+ targetInfo,
+ sessionId: `pw-tab-${this._nextSessionId++}`,
+ };
+ debugLogger('Simulating auto-attach');
+ this._sendToPlaywright({
+ method: 'Target.attachedToTarget',
+ params: {
+ sessionId: this._connectedTabInfo.sessionId,
+ targetInfo: {
+ ...this._connectedTabInfo.targetInfo,
+ attached: true,
+ },
+ waitingForDebugger: false
+ }
+ });
+ return { };
+ }
+ case 'Target.getTargetInfo': {
+ return this._connectedTabInfo?.targetInfo;
+ }
+ }
+ return await this._forwardToExtension(method, params, sessionId);
+ }
+
+ private async _forwardToExtension(method: string, params: any, sessionId: string | undefined): Promise<any> {
+ if (!this._extensionConnection)
+ throw new Error('Extension not connected');
+ // Top level sessionId is only passed between the relay and the client.
+ if (this._connectedTabInfo?.sessionId === sessionId)
+ sessionId = undefined;
+ return await this._extensionConnection.send('forwardCDPCommand', { sessionId, method, params });
+ }
+
+ private _sendToPlaywright(message: CDPResponse): void {
+ debugLogger('→ Playwright:', `${message.method ?? `response(id=${message.id})`}`);
+ this._playwrightConnection?.send(JSON.stringify(message));
+ }
+}
+
+type ExtensionResponse = {
+ id?: number;
+ method?: string;
+ params?: any;
+ result?: any;
+ error?: string;
+};
+
+class ExtensionConnection {
+ private readonly _ws: WebSocket;
+ private readonly _callbacks = new Map<number, { resolve: (o: any) => void, reject: (e: Error) => void, error: Error }>();
+ private _lastId = 0;
+
+ onmessage?: <M extends keyof ExtensionEvents>(method: M, params: ExtensionEvents[M]['params']) => void;
+ onclose?: (self: ExtensionConnection, reason: string) => void;
+
+ constructor(ws: WebSocket) {
+ this._ws = ws;
+ this._ws.on('message', this._onMessage.bind(this));
+ this._ws.on('close', this._onClose.bind(this));
+ this._ws.on('error', this._onError.bind(this));
+ }
+
+ async send<M extends keyof ExtensionCommand>(method: M, params: ExtensionCommand[M]['params']): Promise<any> {
+ if (this._ws.readyState !== ws.OPEN)
+ throw new Error(`Unexpected WebSocket state: ${this._ws.readyState}`);
+ const id = ++this._lastId;
+ this._ws.send(JSON.stringify({ id, method, params }));
+ const error = new Error(`Protocol error: ${method}`);
+ return new Promise((resolve, reject) => {
+ this._callbacks.set(id, { resolve, reject, error });
+ });
+ }
+
+ close(message: string) {
+ debugLogger('closing extension connection:', message);
+ if (this._ws.readyState === ws.OPEN)
+ this._ws.close(1000, message);
+ }
+
+ private _onMessage(event: websocket.RawData) {
+ const eventData = event.toString();
+ let parsedJson;
+ try {
+ parsedJson = JSON.parse(eventData);
+ } catch (e: any) {
+ debugLogger(`<closing ws> Closing websocket due to malformed JSON. eventData=${eventData} e=${e?.message}`);
+ this._ws.close();
+ return;
+ }
+ try {
+ this._handleParsedMessage(parsedJson);
+ } catch (e: any) {
+ debugLogger(`<closing ws> Closing websocket due to failed onmessage callback. eventData=${eventData} e=${e?.message}`);
+ this._ws.close();
+ }
+ }
+
+ private _handleParsedMessage(object: ExtensionResponse) {
+ if (object.id && this._callbacks.has(object.id)) {
+ const callback = this._callbacks.get(object.id)!;
+ this._callbacks.delete(object.id);
+ if (object.error) {
+ const error = callback.error;
+ error.message = object.error;
+ callback.reject(error);
+ } else {
+ callback.resolve(object.result);
+ }
+ } else if (object.id) {
+ debugLogger('← Extension: unexpected response', object);
+ } else {
+ this.onmessage?.(object.method! as keyof ExtensionEvents, object.params);
+ }
+ }
+
+ private _onClose(event: websocket.CloseEvent) {
+ debugLogger(`<ws closed> code=${event.code} reason=${event.reason}`);
+ this._dispose();
+ this.onclose?.(this, event.reason);
+ }
+
+ private _onError(event: websocket.ErrorEvent) {
+ debugLogger(`<ws error> message=${event.message} type=${event.type} target=${event.target}`);
+ this._dispose();
+ }
+
+ private _dispose() {
+ for (const callback of this._callbacks.values())
+ callback.reject(new Error('WebSocket closed'));
+ this._callbacks.clear();
+ }
+}
diff --git a/packages/playwright/src/mcp/extension/extensionContextFactory.ts b/packages/playwright/src/mcp/extension/extensionContextFactory.ts
new file mode 100644
index 0000000000..ed7a21c9b1
--- /dev/null
+++ b/packages/playwright/src/mcp/extension/extensionContextFactory.ts
@@ -0,0 +1,66 @@
+/**
+ * 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-core';
+import { debug } from 'playwright-core/lib/utilsBundle';
+
+import { startHttpServer } from '../sdk/http';
+import { CDPRelayServer } from './cdpRelay';
+
+import type { BrowserContextFactory, ClientInfo } from '../browser/browserContextFactory';
+
+const debugLogger = debug('pw:mcp:relay');
+
+export class ExtensionContextFactory implements BrowserContextFactory {
+ private _browserChannel: string;
+ private _userDataDir?: string;
+ private _executablePath?: string;
+
+ constructor(browserChannel: string, userDataDir: string | undefined, executablePath: string | undefined) {
+ this._browserChannel = browserChannel;
+ this._userDataDir = userDataDir;
+ this._executablePath = executablePath;
+ }
+
+ async createContext(clientInfo: ClientInfo, abortSignal: AbortSignal, toolName: string | undefined): Promise<{ browserContext: playwright.BrowserContext, close: () => Promise<void> }> {
+ const browser = await this._obtainBrowser(clientInfo, abortSignal, toolName);
+ return {
+ browserContext: browser.contexts()[0],
+ close: async () => {
+ debugLogger('close() called for browser context');
+ await browser.close();
+ }
+ };
+ }
+
+ private async _obtainBrowser(clientInfo: ClientInfo, abortSignal: AbortSignal, toolName: string | undefined): Promise<playwright.Browser> {
+ const relay = await this._startRelay(abortSignal);
+ await relay.ensureExtensionConnectionForMCPContext(clientInfo, abortSignal, toolName);
+ return await playwright.chromium.connectOverCDP(relay.cdpEndpoint());
+ }
+
+ private async _startRelay(abortSignal: AbortSignal) {
+ const httpServer = await startHttpServer({});
+ if (abortSignal.aborted) {
+ httpServer.close();
+ throw new Error(abortSignal.reason);
+ }
+ const cdpRelayServer = new CDPRelayServer(httpServer, this._browserChannel, this._userDataDir, this._executablePath);
+ abortSignal.addEventListener('abort', () => cdpRelayServer.stop());
+ debugLogger(`CDP relay server started, extension endpoint: ${cdpRelayServer.extensionEndpoint()}.`);
+ return cdpRelayServer;
+ }
+}
diff --git a/packages/playwright/src/mcp/extension/protocol.ts b/packages/playwright/src/mcp/extension/protocol.ts
new file mode 100644
index 0000000000..7b0cb26166
--- /dev/null
+++ b/packages/playwright/src/mcp/extension/protocol.ts
@@ -0,0 +1,42 @@
+/**
+ * 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.
+ */
+
+// Whenever the commands/events change, the version must be updated. The latest
+// extension version should be compatible with the old MCP clients.
+export const VERSION = 1;
+
+export type ExtensionCommand = {
+ 'attachToTab': {
+ params: {};
+ };
+ 'forwardCDPCommand': {
+ params: {
+ method: string,
+ sessionId?: string
+ params?: any,
+ };
+ };
+};
+
+export type ExtensionEvents = {
+ 'forwardCDPEvent': {
+ params: {
+ method: string,
+ sessionId?: string
+ params?: any,
+ };
+ };
+};
diff --git a/packages/playwright/src/mcp/index.ts b/packages/playwright/src/mcp/index.ts
new file mode 100644
index 0000000000..a6a8d4725e
--- /dev/null
+++ b/packages/playwright/src/mcp/index.ts
@@ -0,0 +1,52 @@
+/**
+ * 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 { BrowserServerBackend } from './browser/browserServerBackend';
+import { resolveConfig } from './browser/config';
+import { contextFactory } from './browser/browserContextFactory';
+import * as mcpServer from './sdk/server';
+
+import type { Config } from './config';
+import type { BrowserContext } from 'playwright';
+import type { BrowserContextFactory } from './browser/browserContextFactory';
+import type { Server } from '@modelcontextprotocol/sdk/server/index.js';
+
+const packageJSON = require('../../package.json');
+
+export async function createConnection(userConfig: Config = {}, contextGetter?: () => Promise<BrowserContext>): Promise<Server> {
+ const config = await resolveConfig(userConfig);
+ const factory = contextGetter ? new SimpleBrowserContextFactory(contextGetter) : contextFactory(config);
+ return mcpServer.createServer('Playwright', packageJSON.version, new BrowserServerBackend(config, factory), false);
+}
+
+class SimpleBrowserContextFactory implements BrowserContextFactory {
+ name = 'custom';
+ description = 'Connect to a browser using a custom context getter';
+
+ private readonly _contextGetter: () => Promise<BrowserContext>;
+
+ constructor(contextGetter: () => Promise<BrowserContext>) {
+ this._contextGetter = contextGetter;
+ }
+
+ async createContext(): Promise<{ browserContext: BrowserContext, close: () => Promise<void> }> {
+ const browserContext = await this._contextGetter();
+ return {
+ browserContext,
+ close: () => browserContext.close()
+ };
+ }
+}
diff --git a/packages/playwright/src/mcp/test/tool.ts b/packages/playwright/src/mcp/log.ts
similarity index 60%
rename from packages/playwright/src/mcp/test/tool.ts
rename to packages/playwright/src/mcp/log.ts
index 165c840b02..072ec9ad47 100644
--- a/packages/playwright/src/mcp/test/tool.ts
+++ b/packages/playwright/src/mcp/log.ts
@@ -14,15 +14,12 @@
* limitations under the License.
*/
-import type { z } from 'zod';
-import type { Context } from './context.js';
-import type * as mcp from '../sdk/exports.js';
+import { debug } from 'playwright-core/lib/utilsBundle';
-export type Tool<Input extends z.Schema = z.Schema> = {
- schema: mcp.ToolSchema<Input>;
- handle: (context: Context, params: z.output<Input>) => Promise<mcp.CallToolResult>;
-};
+const errorsDebug = debug('pw:mcp:errors');
-export function defineTool<Input extends z.Schema>(tool: Tool<Input>): Tool<Input> {
- return tool;
+export function logUnhandledError(error: unknown) {
+ errorsDebug(error);
}
+
+export const testDebug = debug('pw:mcp:test');
diff --git a/packages/playwright/src/mcp/program.ts b/packages/playwright/src/mcp/program.ts
new file mode 100644
index 0000000000..561472e85a
--- /dev/null
+++ b/packages/playwright/src/mcp/program.ts
@@ -0,0 +1,135 @@
+/**
+ * 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, ProgramOption } from 'playwright-core/lib/utilsBundle';
+import * as mcpServer from './sdk/server';
+import { commaSeparatedList, resolveCLIConfig, semicolonSeparatedList } from './browser/config';
+import { Context } from './browser/context';
+import { contextFactory } from './browser/browserContextFactory';
+import { ProxyBackend } from './sdk/proxyBackend';
+import { BrowserServerBackend } from './browser/browserServerBackend';
+import { ExtensionContextFactory } from './extension/extensionContextFactory';
+
+import type { MCPProvider } from './sdk/proxyBackend';
+
+const packageJSON = require('../../package.json');
+
+program
+ .version('Version ' + packageJSON.version)
+ .name('Playwright MCP')
+ .option('--allowed-origins <origins>', 'semicolon-separated list of origins to allow the browser to request. Default is to allow all.', 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.', 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.', commaSeparatedList)
+ .option('--cdp-endpoint <endpoint>', 'CDP endpoint to connect to.')
+ .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('--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('--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('--storage-state <path>', 'path to the storage state file for isolated sessions.')
+ .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 "1280, 720"')
+ .addOption(new ProgramOption('--connect-tool', 'Allow to switch between different browser connection methods.').hideHelp())
+ .addOption(new ProgramOption('--vision', 'Legacy option, use --caps=vision instead').hideHelp())
+ .action(async options => {
+ setupExitWatchdog();
+
+ if (options.vision) {
+ // eslint-disable-next-line no-console
+ console.error('The --vision option is deprecated, use --caps=vision instead');
+ options.caps = 'vision';
+ }
+
+ const config = await resolveCLIConfig(options);
+ const browserContextFactory = contextFactory(config);
+ const extensionContextFactory = new ExtensionContextFactory(config.browser.launchOptions.channel || 'chrome', config.browser.userDataDir, config.browser.launchOptions.executablePath);
+
+ if (options.extension) {
+ const serverBackendFactory: mcpServer.ServerBackendFactory = {
+ name: 'Playwright w/ extension',
+ nameInConfig: 'playwright-extension',
+ version: packageJSON.version,
+ create: () => new BrowserServerBackend(config, extensionContextFactory)
+ };
+ await mcpServer.start(serverBackendFactory, config.server);
+ return;
+ }
+
+ if (options.connectTool) {
+ const providers: MCPProvider[] = [
+ {
+ name: 'default',
+ description: 'Starts standalone browser',
+ connect: () => mcpServer.wrapInProcess(new BrowserServerBackend(config, browserContextFactory)),
+ },
+ {
+ name: 'extension',
+ description: 'Connect to a browser using the Playwright MCP extension',
+ connect: () => mcpServer.wrapInProcess(new BrowserServerBackend(config, extensionContextFactory)),
+ },
+ ];
+ const factory: mcpServer.ServerBackendFactory = {
+ name: 'Playwright w/ switch',
+ nameInConfig: 'playwright-switch',
+ version: packageJSON.version,
+ create: () => new ProxyBackend(providers),
+ };
+ await mcpServer.start(factory, config.server);
+ return;
+ }
+
+ const factory: mcpServer.ServerBackendFactory = {
+ name: 'Playwright',
+ nameInConfig: 'playwright',
+ version: packageJSON.version,
+ create: () => new BrowserServerBackend(config, browserContextFactory)
+ };
+ await mcpServer.start(factory, config.server);
+ });
+
+function setupExitWatchdog() {
+ let isExiting = false;
+ const handleExit = async () => {
+ if (isExiting)
+ return;
+ isExiting = true;
+ // eslint-disable-next-line no-restricted-properties
+ setTimeout(() => process.exit(0), 15000);
+ await Context.disposeAll();
+ // eslint-disable-next-line no-restricted-properties
+ process.exit(0);
+ };
+
+ process.stdin.on('close', handleExit);
+ process.on('SIGINT', handleExit);
+ process.on('SIGTERM', handleExit);
+}
+
+void program.parseAsync(process.argv);
diff --git a/packages/playwright/src/mcp/sdk/DEPS.list b/packages/playwright/src/mcp/sdk/DEPS.list
index e43dcb5d9f..184eda1c16 100644
--- a/packages/playwright/src/mcp/sdk/DEPS.list
+++ b/packages/playwright/src/mcp/sdk/DEPS.list
@@ -1 +1,2 @@
[*]
+../../mcpBundleImpl
diff --git a/packages/playwright/src/mcp/sdk/README.md b/packages/playwright/src/mcp/sdk/README.md
new file mode 100644
index 0000000000..b8b280e5a0
--- /dev/null
+++ b/packages/playwright/src/mcp/sdk/README.md
@@ -0,0 +1 @@
+- Generic MCP utils, no dependencies on anything.
diff --git a/packages/playwright/src/mcp/sdk/bundle.ts b/packages/playwright/src/mcp/sdk/bundle.ts
index a03bb6712b..ce64a07f2a 100644
--- a/packages/playwright/src/mcp/sdk/bundle.ts
+++ b/packages/playwright/src/mcp/sdk/bundle.ts
@@ -14,7 +14,9 @@
* limitations under the License.
*/
-const bundle = require('../../mcpBundleImpl');
+// @ts-ignore
+import * as bundle from '../../mcpBundleImpl';
+
const zodToJsonSchema: typeof import('zod-to-json-schema').zodToJsonSchema = bundle.zodToJsonSchema;
const Client: typeof import('@modelcontextprotocol/sdk/client/index.js').Client = bundle.Client;
const Server: typeof import('@modelcontextprotocol/sdk/server/index.js').Server = bundle.Server;
diff --git a/packages/playwright/src/mcp/sdk/call.ts b/packages/playwright/src/mcp/sdk/call.ts
deleted file mode 100644
index 2818867f80..0000000000
--- a/packages/playwright/src/mcp/sdk/call.ts
+++ /dev/null
@@ -1,31 +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 mcpBundle from './bundle.js';
-
-import type { CallToolRequest, CallToolResult } from '@modelcontextprotocol/sdk/types';
-
-export async function callTool(mcpUrl: string, name: string, params: CallToolRequest['params']['arguments']): Promise<CallToolResult> {
- const transport = new mcpBundle.StreamableHTTPClientTransport(new URL(mcpUrl));
- const client = new mcpBundle.Client({ name: 'Internal', version: '0.0.0' });
- await client.connect(transport);
- try {
- return await client.callTool({ name, arguments: params }) as CallToolResult;
- } finally {
- await transport.terminateSession();
- await client.close();
- }
-}
diff --git a/packages/playwright/src/mcp/sdk/exports.ts b/packages/playwright/src/mcp/sdk/exports.ts
index 12a1cb87da..92c0c176ba 100644
--- a/packages/playwright/src/mcp/sdk/exports.ts
+++ b/packages/playwright/src/mcp/sdk/exports.ts
@@ -19,4 +19,4 @@ export * from './proxyBackend';
export * from './server';
export * from './tool';
export * from './http';
-export * from './call';
+export * from './mdb';
diff --git a/packages/playwright/src/mcp/sdk/http.ts b/packages/playwright/src/mcp/sdk/http.ts
index 93b64bdefd..d9359880a3 100644
--- a/packages/playwright/src/mcp/sdk/http.ts
+++ b/packages/playwright/src/mcp/sdk/http.ts
@@ -18,20 +18,22 @@ import assert from 'assert';
import net from 'net';
import http from 'http';
import crypto from 'crypto';
+
import { debug } from 'playwright-core/lib/utilsBundle';
-import * as mcp from './bundle';
-import { connect } from './server';
+import * as mcpBundle from './bundle';
+import * as mcpServer from './server';
+import type { ServerBackendFactory } from './server';
import type { SSEServerTransport } from '@modelcontextprotocol/sdk/server/sse.js';
import type { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
-import type { ServerBackendFactory } from './server';
const testDebug = debug('pw:mcp:test');
export async function startHttpServer(config: { host?: string, port?: number }, abortSignal?: AbortSignal): Promise<http.Server> {
const { host, port } = config;
const httpServer = http.createServer();
+ decorateServer(httpServer);
await new Promise<void>((resolve, reject) => {
httpServer.on('error', reject);
abortSignal?.addEventListener('abort', () => {
@@ -85,10 +87,10 @@ async function handleSSE(serverBackendFactory: ServerBackendFactory, req: http.I
return await transport.handlePostMessage(req, res);
} else if (req.method === 'GET') {
- const transport = new mcp.SSEServerTransport('/sse', res);
+ const transport = new mcpBundle.SSEServerTransport('/sse', res);
sessions.set(transport.sessionId, transport);
testDebug(`create SSE session: ${transport.sessionId}`);
- await connect(serverBackendFactory, transport, false);
+ await mcpServer.connect(serverBackendFactory, transport, false);
res.on('close', () => {
testDebug(`delete SSE session: ${transport.sessionId}`);
sessions.delete(transport.sessionId);
@@ -113,11 +115,11 @@ async function handleStreamable(serverBackendFactory: ServerBackendFactory, req:
}
if (req.method === 'POST') {
- const transport = new mcp.StreamableHTTPServerTransport({
+ const transport = new mcpBundle.StreamableHTTPServerTransport({
sessionIdGenerator: () => crypto.randomUUID(),
onsessioninitialized: async sessionId => {
testDebug(`create http session: ${transport.sessionId}`);
- await connect(serverBackendFactory, transport, true);
+ await mcpServer.connect(serverBackendFactory, transport, true);
sessions.set(sessionId, transport);
}
});
@@ -136,3 +138,19 @@ async function handleStreamable(serverBackendFactory: ServerBackendFactory, req:
res.statusCode = 400;
res.end('Invalid request');
}
+
+function decorateServer(server: net.Server) {
+ const sockets = new Set<net.Socket>();
+ server.on('connection', socket => {
+ sockets.add(socket);
+ socket.once('close', () => sockets.delete(socket));
+ });
+
+ const close = server.close;
+ server.close = (callback?: (err?: Error) => void) => {
+ for (const socket of sockets)
+ socket.destroy();
+ sockets.clear();
+ return close.call(server, callback);
+ };
+}
diff --git a/packages/playwright/src/mcp/sdk/mdb.ts b/packages/playwright/src/mcp/sdk/mdb.ts
index 1e48865454..7fbcc3d188 100644
--- a/packages/playwright/src/mcp/sdk/mdb.ts
+++ b/packages/playwright/src/mcp/sdk/mdb.ts
@@ -17,20 +17,18 @@
import { debug } from 'playwright-core/lib/utilsBundle';
import { ManualPromise } from 'playwright-core/lib/utils';
-import { PingRequestSchema, z } from './bundle.js';
-import { StreamableHTTPClientTransport } from './bundle.js';
-import * as mcpBundle from './bundle.js';
+import { defineToolSchema } from './tool';
+import * as mcpBundle from './bundle';
+import * as mcpServer from './server';
+import * as mcpHttp from './http';
+import { wrapInProcess } from './server';
-import { defineToolSchema } from './tool.js';
-import * as mcpServer from './server.js';
-import * as mcpHttp from './http.js';
-import { wrapInProcess } from './server.js';
-
-import type { Client } from '@modelcontextprotocol/sdk/client/index.js';
import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
+import type { Client } from '@modelcontextprotocol/sdk/client/index.js';
const mdbDebug = debug('pw:mcp:mdb');
const errorsDebug = debug('pw:mcp:errors');
+const z = mcpBundle.z;
export class MDBBackend implements mcpServer.ServerBackend {
private _stack: { client: Client, toolNames: string[], resultPromise: ManualPromise<mcpServer.CallToolResult> | undefined }[] = [];
@@ -70,6 +68,8 @@ export class MDBBackend implements mcpServer.ServerBackend {
await entry.client.close();
entry = this._stack[0];
}
+ if (!entry)
+ throw new Error(`Tool ${name} not found in the tool stack`);
const resultPromise = new ManualPromise<mcpServer.CallToolResult>();
entry.resultPromise = resultPromise;
@@ -104,7 +104,7 @@ export class MDBBackend implements mcpServer.ServerBackend {
private async _pushTools(params: { mcpUrl: string, introMessage?: string }): Promise<mcpServer.CallToolResult> {
mdbDebug('pushing tools to the stack', params.mcpUrl);
- const transport = new StreamableHTTPClientTransport(new URL(params.mcpUrl));
+ const transport = new mcpBundle.StreamableHTTPClientTransport(new URL(params.mcpUrl));
await this._pushClient(transport, params.introMessage);
return { content: [{ type: 'text', text: 'Tools pushed' }] };
}
@@ -112,7 +112,7 @@ export class MDBBackend implements mcpServer.ServerBackend {
private async _pushClient(transport: Transport, introMessage?: string): Promise<mcpServer.CallToolResult> {
mdbDebug('pushing client to the stack');
const client = new mcpBundle.Client({ name: 'Internal client', version: '0.0.0' });
- client.setRequestHandler(PingRequestSchema, () => ({}));
+ client.setRequestHandler(mcpBundle.PingRequestSchema, () => ({}));
await client.connect(transport);
mdbDebug('connected to the new client');
const { tools } = await client.listTools();
@@ -153,7 +153,7 @@ export async function runMainBackend(backendFactory: mcpServer.ServerBackendFact
create: () => mdbBackend
};
const url = await startAsHttp(factory, { port: options?.port || 0 });
- process.env.PLAYWRIGHT_MDB_URL = url;
+ process.env.PLAYWRIGHT_DEBUGGER_MCP = url;
if (options?.port !== undefined)
return url;
@@ -177,8 +177,8 @@ export async function runOnPauseBackendLoop(mdbUrl: string, backend: ServerBacke
const url = mcpHttp.httpAddressToString(httpServer.address());
const client = new mcpBundle.Client({ name: 'Internal client', version: '0.0.0' });
- client.setRequestHandler(PingRequestSchema, () => ({}));
- const transport = new StreamableHTTPClientTransport(new URL(mdbUrl));
+ client.setRequestHandler(mcpBundle.PingRequestSchema, () => ({}));
+ const transport = new mcpBundle.StreamableHTTPClientTransport(new URL(mdbUrl));
await client.connect(transport);
const pushToolsResult = await client.callTool({
diff --git a/packages/playwright/src/mcp/sdk/proxyBackend.ts b/packages/playwright/src/mcp/sdk/proxyBackend.ts
index 2f7530ebcf..de55736947 100644
--- a/packages/playwright/src/mcp/sdk/proxyBackend.ts
+++ b/packages/playwright/src/mcp/sdk/proxyBackend.ts
@@ -15,9 +15,10 @@
*/
import { debug } from 'playwright-core/lib/utilsBundle';
-import * as mcp from './bundle';
-import type { ServerBackend, ClientVersion, Root, Server } from './server.js';
+import * as mcpBundle from './bundle';
+
+import type { ServerBackend, ClientVersion, Root, Server } from './server';
import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
import type { Tool, CallToolResult, CallToolRequest } from '@modelcontextprotocol/sdk/types.js';
import type { Client } from '@modelcontextprotocol/sdk/client/index.js';
@@ -29,6 +30,7 @@ export type MCPProvider = {
};
const errorsDebug = debug('pw:mcp:errors');
+const { z, zodToJsonSchema } = mcpBundle;
export class ProxyBackend implements ServerBackend {
private _mcpProviders: MCPProvider[];
@@ -94,8 +96,8 @@ export class ProxyBackend implements ServerBackend {
'Connect to a browser using one of the available methods:',
...this._mcpProviders.map(factory => `- "${factory.name}": ${factory.description}`),
].join('\n'),
- inputSchema: mcp.zodToJsonSchema(mcp.z.object({
- name: mcp.z.enum(this._mcpProviders.map(factory => factory.name) as [string, ...string[]]).default(this._mcpProviders[0].name).describe('The method to use to connect to the browser'),
+ inputSchema: zodToJsonSchema(z.object({
+ name: z.enum(this._mcpProviders.map(factory => factory.name) as [string, ...string[]]).default(this._mcpProviders[0].name).describe('The method to use to connect to the browser'),
}), { strictUnions: true }) as Tool['inputSchema'],
annotations: {
title: 'Connect to a browser context',
@@ -109,14 +111,14 @@ export class ProxyBackend implements ServerBackend {
await this._currentClient?.close();
this._currentClient = undefined;
- const client = new mcp.Client({ name: 'Playwright MCP Proxy', version: '0.0.0' });
+ const client = new mcpBundle.Client({ name: 'Playwright MCP Proxy', version: '0.0.0' });
client.registerCapabilities({
roots: {
listRoots: true,
},
});
- client.setRequestHandler(mcp.ListRootsRequestSchema, () => ({ roots: this._roots }));
- client.setRequestHandler(mcp.PingRequestSchema, () => ({}));
+ client.setRequestHandler(mcpBundle.ListRootsRequestSchema, () => ({ roots: this._roots }));
+ client.setRequestHandler(mcpBundle.PingRequestSchema, () => ({}));
const transport = await factory.connect();
await client.connect(transport);
diff --git a/packages/playwright/src/mcp/sdk/server.ts b/packages/playwright/src/mcp/sdk/server.ts
index 74543a9fca..bf80d80494 100644
--- a/packages/playwright/src/mcp/sdk/server.ts
+++ b/packages/playwright/src/mcp/sdk/server.ts
@@ -16,20 +16,21 @@
import { debug } from 'playwright-core/lib/utilsBundle';
-import * as mcp from './bundle';
-import { InProcessTransport } from './inProcessTransport';
+import * as mcpBundle from './bundle';
import { httpAddressToString, installHttpTransport, startHttpServer } from './http';
+import { InProcessTransport } from './inProcessTransport';
import type { Tool, CallToolResult, CallToolRequest, Root } from '@modelcontextprotocol/sdk/types.js';
import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
-import type { Server } from '@modelcontextprotocol/sdk/server/index.js';
export type { Server } from '@modelcontextprotocol/sdk/server/index.js';
export type { Tool, CallToolResult, CallToolRequest, Root } from '@modelcontextprotocol/sdk/types.js';
+import type { Server } from '@modelcontextprotocol/sdk/server/index.js';
const serverDebug = debug('pw:mcp:server');
const errorsDebug = debug('pw:mcp:errors');
export type ClientVersion = { name: string, version: string };
+
export interface ServerBackend {
initialize?(server: Server, clientVersion: ClientVersion, roots: Root[]): Promise<void>;
listTools(): Promise<Tool[]>;
@@ -57,13 +58,13 @@ export async function wrapInProcess(backend: ServerBackend): Promise<Transport>
export function createServer(name: string, version: string, backend: ServerBackend, runHeartbeat: boolean): Server {
let initializedPromiseResolve = () => {};
const initializedPromise = new Promise<void>(resolve => initializedPromiseResolve = resolve);
- const server = new mcp.Server({ name, version }, {
+ const server = new mcpBundle.Server({ name, version }, {
capabilities: {
tools: {},
}
});
- server.setRequestHandler(mcp.ListToolsRequestSchema, async () => {
+ server.setRequestHandler(mcpBundle.ListToolsRequestSchema, async () => {
serverDebug('listTools');
await initializedPromise;
const tools = await backend.listTools();
@@ -71,7 +72,7 @@ export function createServer(name: string, version: string, backend: ServerBacke
});
let heartbeatRunning = false;
- server.setRequestHandler(mcp.CallToolRequestSchema, async request => {
+ server.setRequestHandler(mcpBundle.CallToolRequestSchema, async request => {
serverDebug('callTool', request);
await initializedPromise;
@@ -133,7 +134,7 @@ function addServerListener(server: Server, event: 'close' | 'initialized', liste
export async function start(serverBackendFactory: ServerBackendFactory, options: { host?: string; port?: number }) {
if (options.port === undefined) {
- await connect(serverBackendFactory, new mcp.StdioServerTransport(), false);
+ await connect(serverBackendFactory, new mcpBundle.StdioServerTransport(), false);
return;
}
diff --git a/packages/playwright/src/mcp/sdk/tool.ts b/packages/playwright/src/mcp/sdk/tool.ts
index 450170bab3..bd94547a30 100644
--- a/packages/playwright/src/mcp/sdk/tool.ts
+++ b/packages/playwright/src/mcp/sdk/tool.ts
@@ -14,10 +14,10 @@
* limitations under the License.
*/
-import { zodToJsonSchema } from './bundle.js';
+import { zodToJsonSchema } from '../sdk/bundle';
import type { z } from 'zod';
-import type * as mcpServer from './server.js';
+import type * as mcpServer from './server';
export type ToolSchema<Input extends z.Schema> = {
name: string;
diff --git a/packages/playwright/src/mcp/browser/backend.ts b/packages/playwright/src/mcp/test/browserBackend.ts
similarity index 87%
rename from packages/playwright/src/mcp/browser/backend.ts
rename to packages/playwright/src/mcp/test/browserBackend.ts
index aadf7a48ef..42ded6d876 100644
--- a/packages/playwright/src/mcp/browser/backend.ts
+++ b/packages/playwright/src/mcp/test/browserBackend.ts
@@ -16,12 +16,11 @@
import * as mcp from '../sdk/exports';
import * as mcpBundle from '../sdk/bundle';
-import { snapshot, pickLocator, evaluate } from './tools';
-import { defineToolSchema } from '../sdk/exports';
-import { runOnPauseBackendLoop } from '../sdk/mdb';
+
+import { snapshot, pickLocator, evaluate } from './browserTools';
import { stripAnsiEscapes } from '../../util';
-import type { Tool } from './tool';
+import type { BrowserTool } from './browserTool';
import type * as playwright from '../../../index';
import type { ServerBackendOnPause } from '../sdk/mdb';
@@ -34,7 +33,7 @@ const tools = [snapshot, pickLocator, evaluate];
export class BrowserBackend implements ServerBackendOnPause {
readonly name = 'Playwright';
readonly version = '0.0.1';
- private _tools: Tool<any>[] = tools;
+ private _tools: BrowserTool<any>[] = tools;
private _page: playwright.Page;
constructor(page: playwright.Page) {
@@ -64,7 +63,7 @@ export class BrowserBackend implements ServerBackendOnPause {
}
}
-const doneToolSchema = defineToolSchema({
+const doneToolSchema = mcp.defineToolSchema({
name: 'done',
title: 'Done',
description: 'Done',
@@ -84,5 +83,5 @@ ${snapshot}
### Task
Try recovering from the error prior to continuing, use following tools to recover: ${tools.map(tool => tool.schema.name).join(', ')}`;
- await runOnPauseBackendLoop(process.env.PLAYWRIGHT_MDB_URL!, new BrowserBackend(page), introMessage);
+ await mcp.runOnPauseBackendLoop(process.env.PLAYWRIGHT_MDB_URL!, new BrowserBackend(page), introMessage);
}
diff --git a/packages/playwright/src/mcp/browser/tool.ts b/packages/playwright/src/mcp/test/browserTool.ts
similarity index 83%
rename from packages/playwright/src/mcp/browser/tool.ts
rename to packages/playwright/src/mcp/test/browserTool.ts
index 5b09b17480..f1b167475d 100644
--- a/packages/playwright/src/mcp/browser/tool.ts
+++ b/packages/playwright/src/mcp/test/browserTool.ts
@@ -18,11 +18,11 @@ import type { z } from 'zod';
import type * as mcp from '../sdk/exports';
import type * as playwright from '../../../index';
-export type Tool<Input extends z.Schema = z.Schema> = {
+export type BrowserTool<Input extends z.Schema = z.Schema> = {
schema: mcp.ToolSchema<Input>;
handle: (page: playwright.Page, params: z.output<Input>) => Promise<mcp.CallToolResult>;
};
-export function defineTool<Input extends z.Schema>(tool: Tool<Input>): Tool<Input> {
+export function defineBrowserTool<Input extends z.Schema>(tool: BrowserTool<Input>): BrowserTool<Input> {
return tool;
}
diff --git a/packages/playwright/src/mcp/test/browserTools.ts b/packages/playwright/src/mcp/test/browserTools.ts
new file mode 100644
index 0000000000..eb55d7f464
--- /dev/null
+++ b/packages/playwright/src/mcp/test/browserTools.ts
@@ -0,0 +1,113 @@
+/**
+ * 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 { asLocator } from 'playwright-core/lib/utils';
+
+import { defineBrowserTool } from './browserTool.js';
+import * as mcpBundle from '../sdk/bundle';
+
+import type * as playwright from '../../../index';
+import type zod from 'zod';
+
+const { z } = mcpBundle;
+
+type PageEx = playwright.Page & {
+ _snapshotForAI: () => Promise<string>;
+};
+
+export const snapshot = defineBrowserTool({
+ schema: {
+ name: 'playwright_test_browser_snapshot',
+ title: 'Capture page snapshot',
+ description: 'Capture page snapshot for debugging',
+ inputSchema: z.object({}),
+ type: 'readOnly',
+ },
+
+ handle: async (page, params) => {
+ const snapshot = await (page as PageEx)._snapshotForAI();
+ return {
+ content: [
+ {
+ type: 'text',
+ text: snapshot,
+ },
+ ],
+ };
+ },
+});
+
+export 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 pickLocator = defineBrowserTool({
+ schema: {
+ name: 'playwright_test_generate_locator',
+ title: 'Create locator for element',
+ description: 'Generate locator for the given element to use in tests',
+ inputSchema: elementSchema,
+ type: 'readOnly',
+ },
+
+ handle: async (page, params) => {
+ const locator = await refLocator(page, params);
+
+ try {
+ const { resolvedSelector } = await (locator as any)._resolveSelector();
+ const locatorString = asLocator('javascript', resolvedSelector);
+ return { content: [{ type: 'text', text: locatorString }] };
+ } catch (e) {
+ throw new Error(`Ref not found, likely because element was removed. Use ${snapshot.schema.name} to see what elements are currently on the page.`);
+ }
+ },
+});
+
+const evaluateSchema = z.object({
+ function: z.string().describe('() => { /* code */ } or (element) => { /* code */ } when element is provided'),
+ element: z.string().optional().describe('Human-readable element description used to obtain permission to interact with the element'),
+ ref: z.string().optional().describe('Exact target element reference from the page snapshot'),
+});
+
+export const evaluate = defineBrowserTool({
+ schema: {
+ name: 'playwright_test_evaluate_on_pause',
+ title: 'Evaluate in page',
+ description: 'Evaluate JavaScript expression on page or element',
+ inputSchema: evaluateSchema,
+ type: 'destructive',
+ },
+
+ handle: async (page, params) => {
+ let locator: playwright.Locator | undefined;
+ if (params.ref && params.element)
+ locator = await refLocator(page, { ref: params.ref, element: params.element });
+
+ const receiver = locator ?? page as any;
+ const result = await receiver._evaluateFunction(params.function);
+ return {
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) || 'undefined' }],
+ };
+ },
+});
+
+async function refLocator(page: playwright.Page, elementRef: zod.output<typeof elementSchema>): Promise<playwright.Locator> {
+ const snapshot = await (page as PageEx)._snapshotForAI();
+ if (!snapshot.includes(`[ref=${elementRef.ref}]`))
+ throw new Error(`Ref ${elementRef.ref} not found in the current page snapshot. Try capturing new snapshot.`);
+ return page.locator(`aria-ref=${elementRef.ref}`).describe(elementRef.element);
+}
diff --git a/packages/playwright/src/mcp/test/backend.ts b/packages/playwright/src/mcp/test/testBackend.ts
similarity index 79%
rename from packages/playwright/src/mcp/test/backend.ts
rename to packages/playwright/src/mcp/test/testBackend.ts
index ca37bbcd18..0ef240a2ad 100644
--- a/packages/playwright/src/mcp/test/backend.ts
+++ b/packages/playwright/src/mcp/test/testBackend.ts
@@ -14,23 +14,23 @@
* limitations under the License.
*/
-import * as mcp from '../sdk/exports.js';
-import { Context } from './context';
-import { listTests, runTests, debugTest } from './tools.js';
-import { snapshot, pickLocator, evaluate } from '../browser/tools';
+import * as mcp from '../sdk/exports';
+import { TestContext } from './testContext';
+import { listTests, runTests, debugTest } from './testTools.js';
+import { snapshot, pickLocator, evaluate } from './browserTools';
import type { ConfigLocation } from '../../common/config';
-import type { Tool } from './tool';
+import type { TestTool } from './testTool';
export class TestServerBackend implements mcp.ServerBackend {
readonly name = 'Playwright';
readonly version = '0.0.1';
- private _tools: Tool<any>[] = [listTests, runTests, debugTest];
- private _context: Context;
+ private _tools: TestTool<any>[] = [listTests, runTests, debugTest];
+ private _context: TestContext;
constructor(resolvedLocation: ConfigLocation, options?: { muteConsole?: boolean }) {
- this._context = new Context(resolvedLocation, options);
+ this._context = new TestContext(resolvedLocation, options);
}
async listTools(): Promise<mcp.Tool[]> {
diff --git a/packages/playwright/src/mcp/test/context.ts b/packages/playwright/src/mcp/test/testContext.ts
similarity index 98%
rename from packages/playwright/src/mcp/test/context.ts
rename to packages/playwright/src/mcp/test/testContext.ts
index 602abc97e1..11b5ab5d01 100644
--- a/packages/playwright/src/mcp/test/context.ts
+++ b/packages/playwright/src/mcp/test/testContext.ts
@@ -18,7 +18,7 @@ import { TestRunner, TestRunnerEvent } from '../../runner/testRunner';
import type { ConfigLocation } from '../../common/config';
-export class Context {
+export class TestContext {
private _testRunner: TestRunner | undefined;
readonly configLocation: ConfigLocation;
readonly options?: { muteConsole?: boolean };
diff --git a/packages/playwright/src/mcp/test/testTool.ts b/packages/playwright/src/mcp/test/testTool.ts
new file mode 100644
index 0000000000..05a3e5212b
--- /dev/null
+++ b/packages/playwright/src/mcp/test/testTool.ts
@@ -0,0 +1,29 @@
+/**
+ * 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 { z } from 'zod';
+import type { TestContext } from './testContext.js';
+import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
+import type { ToolSchema } from '../sdk/tool.js';
+
+export type TestTool<Input extends z.Schema = z.Schema> = {
+ schema: ToolSchema<Input>;
+ handle: (context: TestContext, params: z.output<Input>) => Promise<CallToolResult>;
+};
+
+export function defineTestTool<Input extends z.Schema>(tool: TestTool<Input>): TestTool<Input> {
+ return tool;
+}
diff --git a/packages/playwright/src/mcp/test/tools.ts b/packages/playwright/src/mcp/test/testTools.ts
similarity index 96%
rename from packages/playwright/src/mcp/test/tools.ts
rename to packages/playwright/src/mcp/test/testTools.ts
index bae91402fd..08c74e982c 100644
--- a/packages/playwright/src/mcp/test/tools.ts
+++ b/packages/playwright/src/mcp/test/testTools.ts
@@ -21,10 +21,10 @@ import { terminalScreen } from '../../reporters/base';
import ListReporter from '../../reporters/list';
import ListModeReporter from '../../reporters/listModeReporter';
-import { defineTool } from './tool';
+import { defineTestTool } from './testTool';
import { StringWriteStream } from './streams';
-export const listTests = defineTool({
+export const listTests = defineTestTool({
schema: {
name: 'playwright_test_list_tests',
title: 'List tests',
@@ -45,7 +45,7 @@ export const listTests = defineTool({
},
});
-export const runTests = defineTool({
+export const runTests = defineTestTool({
schema: {
name: 'playwright_test_run_tests',
title: 'Run tests',
@@ -77,7 +77,7 @@ export const runTests = defineTool({
},
});
-export const debugTest = defineTool({
+export const debugTest = defineTestTool({
schema: {
name: 'playwright_test_debug_test',
title: 'Debug single test',
diff --git a/packages/playwright/src/program.ts b/packages/playwright/src/program.ts
index b23c389ca2..70731b8cb4 100644
--- a/packages/playwright/src/program.ts
+++ b/packages/playwright/src/program.ts
@@ -33,9 +33,8 @@ import * as testServer from './runner/testServer';
import { runWatchModeLoop } from './runner/watchMode';
import { runAllTestsWithConfig, TestRunner } from './runner/testRunner';
import { createErrorCollectingReporter } from './runner/reporters';
-import { ServerBackendFactory } from './mcp/sdk/server';
-import { TestServerBackend } from './mcp/test/backend';
-import { runMainBackend } from './mcp/sdk/mdb';
+import { ServerBackendFactory, runMainBackend } from './mcp/sdk/exports';
+import { TestServerBackend } from './mcp/test/testBackend';
import type { ConfigCLIOverrides } from './common/ipc';
import type { TraceMode } from '../types/test';
diff --git a/tests/config/testserver/index.ts b/tests/config/testserver/index.ts
index ddd334e90e..177ea131d0 100644
--- a/tests/config/testserver/index.ts
+++ b/tests/config/testserver/index.ts
@@ -56,6 +56,7 @@ export class TestServer {
readonly EMPTY_PAGE: string;
readonly HOST: string;
readonly HOSTNAME: string;
+ readonly HELLO_WORLD: string;
static async create(dirPath: string, port: number, loopback?: string): Promise<TestServer> {
const server = new TestServer(dirPath, port, loopback);
@@ -122,6 +123,7 @@ export class TestServer {
this.EMPTY_PAGE = `${protocol}://${same_origin}:${port}/empty.html`;
this.HOST = new URL(this.EMPTY_PAGE).host;
this.HOSTNAME = new URL(this.EMPTY_PAGE).hostname;
+ this.HELLO_WORLD = `${this.PREFIX}/hello-world`;
}
async waitUntilReady() {
@@ -165,6 +167,13 @@ export class TestServer {
await new Promise(x => this._server.close(x));
}
+ setContent(path: string, content: string, mimeType: string) {
+ this.setRoute(path, (req, res) => {
+ res.writeHead(200, { 'Content-Type': mimeType });
+ res.end(mimeType === 'text/html' ? `<!DOCTYPE html>${content}` : content);
+ });
+ }
+
setRoute(path: string, handler: (arg0: http.IncomingMessage & { postBody: Promise<Buffer> }, arg1: http.ServerResponse) => any) {
this._routes.set(path, handler);
}
diff --git a/tests/mcp/capabilities.spec.ts b/tests/mcp/capabilities.spec.ts
new file mode 100644
index 0000000000..7ec699aa6a
--- /dev/null
+++ b/tests/mcp/capabilities.spec.ts
@@ -0,0 +1,106 @@
+/**
+ * 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 snapshot tool list', async ({ client }) => {
+ const { tools } = await client.listTools();
+ expect(new Set(tools.map(t => t.name))).toEqual(new Set([
+ 'browser_click',
+ 'browser_console_messages',
+ 'browser_drag',
+ 'browser_evaluate',
+ 'browser_file_upload',
+ 'browser_fill_form',
+ 'browser_handle_dialog',
+ 'browser_hover',
+ 'browser_select_option',
+ 'browser_type',
+ 'browser_close',
+ 'browser_install',
+ 'browser_navigate_back',
+ 'browser_navigate',
+ 'browser_network_requests',
+ 'browser_press_key',
+ 'browser_resize',
+ 'browser_snapshot',
+ 'browser_tabs',
+ 'browser_take_screenshot',
+ 'browser_wait_for',
+ ]));
+});
+
+test('test tool list proxy mode', async ({ startClient }) => {
+ const { client } = await startClient({
+ args: ['--connect-tool'],
+ });
+ const { tools } = await client.listTools();
+ expect(new Set(tools.map(t => t.name))).toEqual(new Set([
+ 'browser_click',
+ 'browser_connect', // the extra tool
+ 'browser_console_messages',
+ 'browser_drag',
+ 'browser_evaluate',
+ 'browser_file_upload',
+ 'browser_fill_form',
+ 'browser_handle_dialog',
+ 'browser_hover',
+ 'browser_select_option',
+ 'browser_type',
+ 'browser_close',
+ 'browser_install',
+ 'browser_navigate_back',
+ 'browser_navigate',
+ 'browser_network_requests',
+ 'browser_press_key',
+ 'browser_resize',
+ 'browser_snapshot',
+ 'browser_tabs',
+ 'browser_take_screenshot',
+ 'browser_wait_for',
+ ]));
+});
+
+test('test capabilities (pdf)', async ({ startClient }) => {
+ const { client } = await startClient({
+ args: ['--caps=pdf'],
+ });
+ const { tools } = await client.listTools();
+ const toolNames = tools.map(t => t.name);
+ expect(toolNames).toContain('browser_pdf_save');
+});
+
+test('test capabilities (vision)', async ({ startClient }) => {
+ const { client } = await startClient({
+ args: ['--caps=vision'],
+ });
+ const { tools } = await client.listTools();
+ const toolNames = tools.map(t => t.name);
+ expect(toolNames).toContain('browser_mouse_move_xy');
+ expect(toolNames).toContain('browser_mouse_click_xy');
+ expect(toolNames).toContain('browser_mouse_drag_xy');
+});
+
+test('support for legacy --vision option', async ({ startClient }) => {
+ const { client } = await startClient({
+ args: ['--vision'],
+ });
+ const { tools } = await client.listTools();
+ const toolNames = tools.map(t => t.name);
+ expect(toolNames).toContain('browser_mouse_move_xy');
+ expect(toolNames).toContain('browser_mouse_click_xy');
+ expect(toolNames).toContain('browser_mouse_drag_xy');
+});
diff --git a/tests/mcp/cdp.spec.ts b/tests/mcp/cdp.spec.ts
new file mode 100644
index 0000000000..90ae1620bd
--- /dev/null
+++ b/tests/mcp/cdp.spec.ts
@@ -0,0 +1,92 @@
+/**
+ * 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 { spawnSync } from 'child_process';
+import { test, expect, programPath } from './fixtures';
+
+test('cdp server', async ({ cdpServer, startClient, server }) => {
+ await cdpServer.start();
+ const { client } = await startClient({ args: [`--cdp-endpoint=${cdpServer.endpoint}`] });
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`- generic [active] [ref=e1]: Hello, world!`),
+ });
+});
+
+test('cdp server reuse tab', async ({ cdpServer, startClient, server }) => {
+ const browserContext = await cdpServer.start();
+ const { client } = await startClient({ args: [`--cdp-endpoint=${cdpServer.endpoint}`] });
+
+ const [page] = browserContext.pages();
+ await page.goto(server.HELLO_WORLD);
+
+ expect(await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'Hello, world!',
+ ref: 'f0',
+ },
+ })).toHaveResponse({
+ result: `Error: No open pages available. Use the "browser_navigate" tool to navigate to a page first.`,
+ isError: true,
+ });
+
+ expect(await client.callTool({
+ name: 'browser_snapshot',
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`- Page URL: ${server.HELLO_WORLD}
+- Page Title: Title
+- Page Snapshot:
+\`\`\`yaml
+- generic [active] [ref=e1]: Hello, world!
+\`\`\``),
+ });
+});
+
+test('should throw connection error and allow re-connecting', async ({ cdpServer, startClient, server }) => {
+ const { client } = await startClient({ args: [`--cdp-endpoint=${cdpServer.endpoint}`] });
+
+ server.setContent('/', `
+ <title>Title</title>
+ <body>Hello, world!</body>
+ `, 'text/html');
+
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ })).toHaveResponse({
+ result: expect.stringContaining(`Error: browserType.connectOverCDP: connect ECONNREFUSED`),
+ isError: true,
+ });
+ await cdpServer.start();
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`- generic [active] [ref=e1]: Hello, world!`),
+ });
+});
+
+test('does not support --device', async () => {
+ const result = spawnSync('node', [
+ programPath, '--device=Pixel 5', '--cdp-endpoint=http://localhost:1234',
+ ]);
+ expect(result.error).toBeUndefined();
+ expect(result.status).toBe(1);
+ expect(result.stderr.toString()).toContain('Device emulation is not supported with cdpEndpoint.');
+});
diff --git a/tests/mcp/click.spec.ts b/tests/mcp/click.spec.ts
new file mode 100644
index 0000000000..53db23152d
--- /dev/null
+++ b/tests/mcp/click.spec.ts
@@ -0,0 +1,99 @@
+/**
+ * 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('browser_click', async ({ client, server, mcpBrowser }) => {
+ server.setContent('/', `
+ <title>Title</title>
+ <button>Submit</button>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'Submit button',
+ ref: 'e2',
+ },
+ })).toHaveResponse({
+ code: `await page.getByRole('button', { name: 'Submit' }).click();`,
+ pageState: expect.stringContaining(`- button "Submit" ${mcpBrowser !== 'webkit' || process.platform === 'linux' ? '[active] ' : ''}[ref=e2]`),
+ });
+});
+
+test('browser_click (double)', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Title</title>
+ <script>
+ function handle() {
+ document.querySelector('h1').textContent = 'Double clicked';
+ }
+ </script>
+ <h1 ondblclick="handle()">Click me</h1>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'Click me',
+ ref: 'e2',
+ doubleClick: true,
+ },
+ })).toHaveResponse({
+ code: `await page.getByRole('heading', { name: 'Click me' }).dblclick();`,
+ pageState: expect.stringContaining(`- heading "Double clicked" [level=1] [ref=e3]`),
+ });
+});
+
+test('browser_click (right)', async ({ client, server }) => {
+ server.setContent('/', `
+ <button oncontextmenu="handle">Menu</button>
+ <script>
+ document.addEventListener('contextmenu', event => {
+ event.preventDefault();
+ document.querySelector('button').textContent = 'Right clicked';
+ });
+ </script>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ const result = await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'Menu',
+ ref: 'e2',
+ button: 'right',
+ },
+ });
+ expect(result).toHaveResponse({
+ code: `await page.getByRole('button', { name: 'Menu' }).click({ button: 'right' });`,
+ pageState: expect.stringContaining(`- button "Right clicked"`),
+ });
+});
diff --git a/tests/mcp/config.spec.ts b/tests/mcp/config.spec.ts
new file mode 100644
index 0000000000..a6d8151e12
--- /dev/null
+++ b/tests/mcp/config.spec.ts
@@ -0,0 +1,80 @@
+/**
+ * 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 fs from 'node:fs';
+
+import { test, expect } from './fixtures';
+import { configFromCLIOptions } from '../../packages/playwright/lib/mcp/browser/config';
+import type { Config } from '../../packages/playwright/src/mcp/config';
+
+test('config user data dir', async ({ startClient, server, mcpMode }, testInfo) => {
+ server.setContent('/', `
+ <title>Title</title>
+ <body>Hello, world!</body>
+ `, 'text/html');
+
+ const config: Config = {
+ browser: {
+ userDataDir: testInfo.outputPath('user-data-dir'),
+ },
+ };
+ const configPath = testInfo.outputPath('config.json');
+ await fs.promises.writeFile(configPath, JSON.stringify(config, null, 2));
+
+ const { client } = await startClient({ args: ['--config', configPath] });
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`Hello, world!`),
+ });
+
+ const files = await fs.promises.readdir(config.browser!.userDataDir!);
+ expect(files.length).toBeGreaterThan(0);
+});
+
+test.describe(() => {
+ test.use({ mcpBrowser: '' });
+ test('browserName', { annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright-mcp/issues/458' } }, async ({ startClient, mcpMode }, testInfo) => {
+ const config: Config = {
+ browser: {
+ browserName: 'firefox',
+ },
+ };
+ const configPath = testInfo.outputPath('config.json');
+ await fs.promises.writeFile(configPath, JSON.stringify(config, null, 2));
+
+ const { client } = await startClient({ args: ['--config', configPath] });
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: 'data:text/html,<script>document.title = navigator.userAgent</script>' },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`Firefox`),
+ });
+ });
+});
+
+test.describe('sandbox configuration', () => {
+ test('should enable sandbox by default (no --no-sandbox flag)', async () => {
+ const config = configFromCLIOptions({ sandbox: undefined });
+ expect(config.browser?.launchOptions?.chromiumSandbox).toBeUndefined();
+ });
+
+ test('should disable sandbox when --no-sandbox flag is passed', async () => {
+ const config = configFromCLIOptions({ sandbox: false });
+ expect(config.browser?.launchOptions?.chromiumSandbox).toBe(false);
+ });
+});
diff --git a/tests/mcp/console.spec.ts b/tests/mcp/console.spec.ts
new file mode 100644
index 0000000000..872e273038
--- /dev/null
+++ b/tests/mcp/console.spec.ts
@@ -0,0 +1,100 @@
+/**
+ * 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('browser_console_messages', async ({ client, server }) => {
+ server.setContent('/', `
+ <!DOCTYPE html>
+ <html>
+ <script>
+ console.log("Hello, world!");
+ console.error("Error");
+ </script>
+ </html>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: {
+ url: server.PREFIX,
+ },
+ });
+
+ const resource = await client.callTool({
+ name: 'browser_console_messages',
+ });
+ expect(resource).toHaveResponse({
+ result: `[LOG] Hello, world! @ ${server.PREFIX}/:4
+[ERROR] Error @ ${server.PREFIX}/:5`,
+ });
+});
+
+test('browser_console_messages (page error)', async ({ client, server }) => {
+ server.setContent('/', `
+ <!DOCTYPE html>
+ <html>
+ <script>
+ throw new Error("Error in script");
+ </script>
+ </html>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: {
+ url: server.PREFIX,
+ },
+ });
+
+ const resource = await client.callTool({
+ name: 'browser_console_messages',
+ });
+ expect(resource).toHaveResponse({
+ result: expect.stringContaining(`Error: Error in script`),
+ });
+ expect(resource).toHaveResponse({
+ result: expect.stringContaining(server.PREFIX),
+ });
+});
+
+test('recent console messages', async ({ client, server }) => {
+ server.setContent('/', `
+ <!DOCTYPE html>
+ <html>
+ <button onclick="console.log('Hello, world!');">Click me</button>
+ </html>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: {
+ url: server.PREFIX,
+ },
+ });
+
+ const response = await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'Click me',
+ ref: 'e2',
+ },
+ });
+
+ expect(response).toHaveResponse({
+ consoleMessages: expect.stringContaining(`- [LOG] Hello, world! @`),
+ });
+});
diff --git a/tests/mcp/core.spec.ts b/tests/mcp/core.spec.ts
new file mode 100644
index 0000000000..033a212245
--- /dev/null
+++ b/tests/mcp/core.spec.ts
@@ -0,0 +1,190 @@
+/**
+ * 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('browser_navigate', async ({ client, server }) => {
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ })).toHaveResponse({
+ code: `await page.goto('${server.HELLO_WORLD}');`,
+ pageState: `- Page URL: ${server.HELLO_WORLD}
+- Page Title: Title
+- Page Snapshot:
+\`\`\`yaml
+- generic [active] [ref=e1]: Hello, world!
+\`\`\``,
+ });
+});
+
+test('browser_select_option', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Title</title>
+ <select>
+ <option value="foo">Foo</option>
+ <option value="bar">Bar</option>
+ </select>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_select_option',
+ arguments: {
+ element: 'Select',
+ ref: 'e2',
+ values: ['bar'],
+ },
+ })).toHaveResponse({
+ code: `await page.getByRole('combobox').selectOption(['bar']);`,
+ pageState: `- Page URL: ${server.PREFIX}/
+- Page Title: Title
+- Page Snapshot:
+\`\`\`yaml
+- combobox [ref=e2]:
+ - option "Foo"
+ - option "Bar" [selected]
+\`\`\``,
+ });
+});
+
+test('browser_select_option (multiple)', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Title</title>
+ <select multiple>
+ <option value="foo">Foo</option>
+ <option value="bar">Bar</option>
+ <option value="baz">Baz</option>
+ </select>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_select_option',
+ arguments: {
+ element: 'Select',
+ ref: 'e2',
+ values: ['bar', 'baz'],
+ },
+ })).toHaveResponse({
+ code: `await page.getByRole('listbox').selectOption(['bar', 'baz']);`,
+ pageState: expect.stringContaining(`
+- listbox [ref=e2]:
+ - option "Foo" [ref=e3]
+ - option "Bar" [selected] [ref=e4]
+ - option "Baz" [selected] [ref=e5]`),
+ });
+});
+
+test('browser_resize', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Resize Test</title>
+ <body>
+ <div id="size">Waiting for resize...</div>
+ <script>new ResizeObserver(() => { document.getElementById("size").textContent = \`Window size: \${window.innerWidth}x\${window.innerHeight}\`; }).observe(document.body);
+ </script>
+ </body>
+ `, 'text/html');
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ const response = await client.callTool({
+ name: 'browser_resize',
+ arguments: {
+ width: 390,
+ height: 780,
+ },
+ });
+ expect(response).toHaveResponse({
+ code: `await page.setViewportSize({ width: 390, height: 780 });`,
+ });
+ await expect.poll(() => client.callTool({ name: 'browser_snapshot' })).toHaveResponse({
+ pageState: expect.stringContaining(`Window size: 390x780`),
+ });
+});
+
+test('old locator error message', async ({ client, server }) => {
+ server.setContent('/', `
+ <button>Button 1</button>
+ <button>Button 2</button>
+ <script>
+ document.querySelector('button').addEventListener('click', () => {
+ document.querySelectorAll('button')[1].remove();
+ });
+ </script>
+ `, 'text/html');
+
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: {
+ url: server.PREFIX,
+ },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`
+ - button "Button 1" [ref=e2]
+ - button "Button 2" [ref=e3]`),
+ });
+
+ await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'Button 1',
+ ref: 'e2',
+ },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'Button 2',
+ ref: 'e3',
+ },
+ })).toHaveResponse({
+ result: expect.stringContaining(`Ref e3 not found in the current page snapshot. Try capturing new snapshot.`),
+ isError: true,
+ });
+});
+
+test('visibility: hidden > visible should be shown', { annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright-mcp/issues/535' } }, async ({ client, server }) => {
+ server.setContent('/', `
+ <div style="visibility: hidden;">
+ <div style="visibility: visible;">
+ <button>Button</button>
+ </div>
+ </div>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_snapshot'
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`- button "Button"`),
+ });
+});
diff --git a/tests/mcp/device.spec.ts b/tests/mcp/device.spec.ts
new file mode 100644
index 0000000000..5c0f733101
--- /dev/null
+++ b/tests/mcp/device.spec.ts
@@ -0,0 +1,45 @@
+/**
+ * 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('--device should work', async ({ startClient, server, mcpMode }) => {
+ const { client } = await startClient({
+ args: ['--device', 'iPhone 15'],
+ });
+
+ server.setRoute('/', (req, res) => {
+ res.writeHead(200, { 'Content-Type': 'text/html' });
+ res.end(`
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ </head>
+ <body></body>
+ <script>
+ document.body.textContent = window.innerWidth + "x" + window.innerHeight;
+ </script>
+ `);
+ });
+
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: {
+ url: server.PREFIX,
+ },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`393x659`),
+ });
+});
diff --git a/tests/mcp/dialogs.spec.ts b/tests/mcp/dialogs.spec.ts
new file mode 100644
index 0000000000..4c2bf98eb5
--- /dev/null
+++ b/tests/mcp/dialogs.spec.ts
@@ -0,0 +1,255 @@
+/**
+ * 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('alert dialog', async ({ client, server }) => {
+ server.setContent('/', `<button onclick="alert('Alert')">Button</button>`, 'text/html');
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`- button "Button" [ref=e2]`),
+ });
+
+ expect(await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'Button',
+ ref: 'e2',
+ },
+ })).toHaveResponse({
+ code: `await page.getByRole('button', { name: 'Button' }).click();`,
+ modalState: `- ["alert" dialog with message "Alert"]: can be handled by the "browser_handle_dialog" tool`,
+ });
+
+ expect(await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'Button',
+ ref: 'e2',
+ },
+ })).toHaveResponse({
+ code: undefined,
+ modalState: `- ["alert" dialog with message "Alert"]: can be handled by the "browser_handle_dialog" tool`,
+ });
+
+ expect(await client.callTool({
+ name: 'browser_handle_dialog',
+ arguments: {
+ accept: true,
+ },
+ })).toHaveResponse({
+ modalState: undefined,
+ pageState: expect.stringContaining(`- button "Button"`),
+ });
+});
+
+test('two alert dialogs', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Title</title>
+ <body>
+ <button onclick="alert('Alert 1');alert('Alert 2');">Button</button>
+ </body>
+ `, 'text/html');
+
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`- button "Button" [ref=e2]`),
+ });
+
+ expect(await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'Button',
+ ref: 'e2',
+ },
+ })).toHaveResponse({
+ code: `await page.getByRole('button', { name: 'Button' }).click();`,
+ modalState: expect.stringContaining(`- ["alert" dialog with message "Alert 1"]: can be handled by the "browser_handle_dialog" tool`),
+ });
+
+ const result = await client.callTool({
+ name: 'browser_handle_dialog',
+ arguments: {
+ accept: true,
+ },
+ });
+
+ expect(result).toHaveResponse({
+ modalState: expect.stringContaining(`- ["alert" dialog with message "Alert 2"]: can be handled by the "browser_handle_dialog" tool`),
+ });
+
+ const result2 = await client.callTool({
+ name: 'browser_handle_dialog',
+ arguments: {
+ accept: true,
+ },
+ });
+
+ expect(result2).not.toHaveResponse({
+ modalState: expect.stringContaining(`- ["alert" dialog with message "Alert 2"]: can be handled by the "browser_handle_dialog" tool`),
+ });
+});
+
+test('confirm dialog (true)', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Title</title>
+ <body>
+ <button onclick="document.body.textContent = confirm('Confirm')">Button</button>
+ </body>
+ `, 'text/html');
+
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`- button "Button" [ref=e2]`),
+ });
+
+ expect(await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'Button',
+ ref: 'e2',
+ },
+ })).toHaveResponse({
+ modalState: expect.stringContaining(`- ["confirm" dialog with message "Confirm"]: can be handled by the "browser_handle_dialog" tool`),
+ });
+
+ expect(await client.callTool({
+ name: 'browser_handle_dialog',
+ arguments: {
+ accept: true,
+ },
+ })).toHaveResponse({
+ modalState: undefined,
+ pageState: expect.stringContaining(`- generic [active] [ref=e1]: "true"`),
+ });
+});
+
+test('confirm dialog (false)', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Title</title>
+ <body>
+ <button onclick="document.body.textContent = confirm('Confirm')">Button</button>
+ </body>
+ `, 'text/html');
+
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`- button "Button" [ref=e2]`),
+ });
+
+ expect(await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'Button',
+ ref: 'e2',
+ },
+ })).toHaveResponse({
+ modalState: expect.stringContaining(`- ["confirm" dialog with message "Confirm"]: can be handled by the "browser_handle_dialog" tool`),
+ });
+
+ expect(await client.callTool({
+ name: 'browser_handle_dialog',
+ arguments: {
+ accept: false,
+ },
+ })).toHaveResponse({
+ modalState: undefined,
+ pageState: expect.stringContaining(`- generic [active] [ref=e1]: "false"`),
+ });
+});
+
+test('prompt dialog', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Title</title>
+ <body>
+ <button onclick="document.body.textContent = prompt('Prompt')">Button</button>
+ </body>
+ `, 'text/html');
+
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`- button "Button" [ref=e2]`),
+ });
+
+ expect(await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'Button',
+ ref: 'e2',
+ },
+ })).toHaveResponse({
+ modalState: expect.stringContaining(`- ["prompt" dialog with message "Prompt"]: can be handled by the "browser_handle_dialog" tool`),
+ });
+
+ const result = await client.callTool({
+ name: 'browser_handle_dialog',
+ arguments: {
+ accept: true,
+ promptText: 'Answer',
+ },
+ });
+
+ expect(result).toHaveResponse({
+ pageState: expect.stringContaining(`- generic [active] [ref=e1]: Answer`),
+ });
+});
+
+test('alert dialog w/ race', async ({ client, server }) => {
+ server.setContent('/', `<button onclick="setTimeout(() => alert('Alert'), 100)">Button</button>`, 'text/html');
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`- button "Button" [ref=e2]`),
+ });
+
+ expect(await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'Button',
+ ref: 'e2',
+ },
+ })).toHaveResponse({
+ code: `await page.getByRole('button', { name: 'Button' }).click();`,
+ modalState: expect.stringContaining(`- ["alert" dialog with message "Alert"]: can be handled by the "browser_handle_dialog" tool`),
+ });
+
+ const result = await client.callTool({
+ name: 'browser_handle_dialog',
+ arguments: {
+ accept: true,
+ },
+ });
+
+ expect(result).toHaveResponse({
+ modalState: undefined,
+ pageState: expect.stringContaining(`- Page URL: ${server.PREFIX}/
+- Page Title:
+- Page Snapshot:
+\`\`\`yaml
+- button "Button"`),
+ });
+});
diff --git a/tests/mcp/evaluate.spec.ts b/tests/mcp/evaluate.spec.ts
new file mode 100644
index 0000000000..68c8a39a39
--- /dev/null
+++ b/tests/mcp/evaluate.spec.ts
@@ -0,0 +1,99 @@
+/**
+ * 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('browser_evaluate', async ({ client, server }) => {
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`- Page Title: Title`),
+ });
+
+ expect(await client.callTool({
+ name: 'browser_evaluate',
+ arguments: {
+ function: '() => document.title',
+ },
+ })).toHaveResponse({
+ result: `"Title"`,
+ code: `await page.evaluate('() => document.title');`,
+ });
+});
+
+test('browser_evaluate (element)', async ({ client, server }) => {
+ server.setContent('/', `
+ <body style="background-color: red">Hello, world!</body>
+ `, 'text/html');
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_evaluate',
+ arguments: {
+ function: 'element => element.style.backgroundColor',
+ element: 'body',
+ ref: 'e1',
+ },
+ })).toHaveResponse({
+ result: `"red"`,
+ code: `await page.getByText('Hello, world!').evaluate('element => element.style.backgroundColor');`,
+ });
+});
+
+test('browser_evaluate object', async ({ client, server }) => {
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`- Page Title: Title`),
+ });
+
+ expect(await client.callTool({
+ name: 'browser_evaluate',
+ arguments: {
+ function: '() => ({ title: document.title, url: document.URL })',
+ },
+ })).toHaveResponse({
+ result: JSON.stringify({ title: 'Title', url: server.HELLO_WORLD }, null, 2),
+ code: `await page.evaluate('() => ({ title: document.title, url: document.URL })');`,
+ });
+});
+
+test('browser_evaluate (error)', async ({ client, server }) => {
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`- Page Title: Title`),
+ });
+
+ const result = await client.callTool({
+ name: 'browser_evaluate',
+ arguments: {
+ function: '() => nonExistentVariable',
+ },
+ });
+
+ expect(result.isError).toBe(true);
+ expect(result.content?.[0]?.text).toContain('nonExistentVariable');
+ // Check for common error patterns across browsers
+ const errorText = result.content?.[0]?.text || '';
+ expect(errorText).toMatch(/not defined|Can't find variable/);
+});
diff --git a/tests/mcp/extension.spec.ts b/tests/mcp/extension.spec.ts
new file mode 100644
index 0000000000..10948baa60
--- /dev/null
+++ b/tests/mcp/extension.spec.ts
@@ -0,0 +1,306 @@
+/**
+ * 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 fs from 'fs';
+import path from 'path';
+import { chromium } from 'playwright';
+import { test as base, expect } from './fixtures';
+
+import type { Client } from '@modelcontextprotocol/sdk/client/index.js';
+import type { BrowserContext } from 'playwright';
+import type { StartClient } from './fixtures';
+
+type BrowserWithExtension = {
+ userDataDir: string;
+ launch: (mode?: 'disable-extension') => Promise<BrowserContext>;
+};
+
+type TestFixtures = {
+ browserWithExtension: BrowserWithExtension,
+ pathToExtension: string,
+ useShortConnectionTimeout: (timeoutMs: number) => void
+ overrideProtocolVersion: (version: number) => void
+};
+
+const test = base.extend<TestFixtures>({
+ pathToExtension: async ({}, use) => {
+ await use(path.resolve(__dirname, '../../packages/mcp-extension/dist'));
+ },
+
+ browserWithExtension: async ({ mcpBrowser, pathToExtension }, use, testInfo) => {
+ // The flags no longer work in Chrome since
+ // https://chromium.googlesource.com/chromium/src/+/290ed8046692651ce76088914750cb659b65fb17%5E%21/chrome/browser/extensions/extension_service.cc?pli=1#
+ test.skip('chromium' !== mcpBrowser, '--load-extension is not supported for official builds of Chromium');
+
+ let browserContext: BrowserContext | undefined;
+ const userDataDir = testInfo.outputPath('extension-user-data-dir');
+ await use({
+ userDataDir,
+ launch: async (mode?: 'disable-extension') => {
+ browserContext = await chromium.launchPersistentContext(userDataDir, {
+ channel: mcpBrowser,
+ // Opening the browser singleton only works in headed.
+ headless: false,
+ // Automation disables singleton browser process behavior, which is necessary for the extension.
+ ignoreDefaultArgs: ['--enable-automation'],
+ args: mode === 'disable-extension' ? [] : [
+ `--disable-extensions-except=${pathToExtension}`,
+ `--load-extension=${pathToExtension}`,
+ ],
+ });
+
+ // for manifest v3:
+ let [serviceWorker] = browserContext.serviceWorkers();
+ if (!serviceWorker)
+ serviceWorker = await browserContext.waitForEvent('serviceworker');
+
+ return browserContext;
+ }
+ });
+ await browserContext?.close();
+ },
+
+ useShortConnectionTimeout: async ({}, use) => {
+ await use((timeoutMs: number) => {
+ process.env.PWMCP_TEST_CONNECTION_TIMEOUT = timeoutMs.toString();
+ });
+ process.env.PWMCP_TEST_CONNECTION_TIMEOUT = undefined;
+ },
+
+ overrideProtocolVersion: async ({}, use) => {
+ await use((version: number) => {
+ process.env.PWMCP_TEST_PROTOCOL_VERSION = version.toString();
+ });
+ process.env.PWMCP_TEST_PROTOCOL_VERSION = undefined;
+ }
+});
+
+async function startAndCallConnectTool(browserWithExtension: BrowserWithExtension, startClient: StartClient): Promise<Client> {
+ const { client } = await startClient({
+ args: [`--connect-tool`],
+ config: {
+ browser: {
+ userDataDir: browserWithExtension.userDataDir,
+ }
+ },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_connect',
+ arguments: {
+ name: 'extension'
+ }
+ })).toHaveResponse({
+ result: 'Successfully changed connection method.',
+ });
+
+ return client;
+}
+
+async function startWithExtensionFlag(browserWithExtension: BrowserWithExtension, startClient: StartClient): Promise<Client> {
+ const { client } = await startClient({
+ args: [`--extension`],
+ config: {
+ browser: {
+ userDataDir: browserWithExtension.userDataDir,
+ }
+ },
+ });
+ return client;
+}
+
+const testWithOldExtensionVersion = test.extend({
+ pathToExtension: async ({}, use, testInfo) => {
+ const extensionDir = testInfo.outputPath('extension');
+ const oldPath = path.resolve(__dirname, '../../packages/mcp-extension/dist');
+
+ await fs.promises.cp(oldPath, extensionDir, { recursive: true });
+ const manifestPath = path.join(extensionDir, 'manifest.json');
+ const manifest = JSON.parse(await fs.promises.readFile(manifestPath, 'utf8'));
+ manifest.version = '0.0.1';
+ await fs.promises.writeFile(manifestPath, JSON.stringify(manifest, null, 2) + '\n');
+
+ await use(extensionDir);
+ },
+});
+
+for (const [mode, startClientMethod] of [
+ ['connect-tool', startAndCallConnectTool],
+ ['extension-flag', startWithExtensionFlag],
+] as const) {
+
+ test(`navigate with extension (${mode})`, async ({ browserWithExtension, startClient, server }) => {
+ const browserContext = await browserWithExtension.launch();
+
+ const client = await startClientMethod(browserWithExtension, startClient);
+
+ const confirmationPagePromise = browserContext.waitForEvent('page', page => {
+ return page.url().startsWith('chrome-extension://jakfalbnbhgkpmoaakfflhflbfpkailf/connect.html');
+ });
+
+ const navigateResponse = client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+
+ const selectorPage = await confirmationPagePromise;
+ // For browser_navigate command, the UI shows Allow/Reject buttons instead of tab selector
+ await selectorPage.getByRole('button', { name: 'Allow' }).click();
+
+ expect(await navigateResponse).toHaveResponse({
+ pageState: expect.stringContaining(`- generic [active] [ref=e1]: Hello, world!`),
+ });
+ });
+
+ test(`snapshot of an existing page (${mode})`, async ({ browserWithExtension, startClient, server }) => {
+ const browserContext = await browserWithExtension.launch();
+
+ const page = await browserContext.newPage();
+ await page.goto(server.HELLO_WORLD);
+
+ // Another empty page.
+ await browserContext.newPage();
+ expect(browserContext.pages()).toHaveLength(3);
+
+ const client = await startClientMethod(browserWithExtension, startClient);
+ expect(browserContext.pages()).toHaveLength(3);
+
+ const confirmationPagePromise = browserContext.waitForEvent('page', page => {
+ return page.url().startsWith('chrome-extension://jakfalbnbhgkpmoaakfflhflbfpkailf/connect.html');
+ });
+
+ const navigateResponse = client.callTool({
+ name: 'browser_snapshot',
+ arguments: { },
+ });
+
+ const selectorPage = await confirmationPagePromise;
+ expect(browserContext.pages()).toHaveLength(4);
+
+ await selectorPage.locator('.tab-item', { hasText: 'Title' }).getByRole('button', { name: 'Connect' }).click();
+
+ expect(await navigateResponse).toHaveResponse({
+ pageState: expect.stringContaining(`- generic [active] [ref=e1]: Hello, world!`),
+ });
+
+ expect(browserContext.pages()).toHaveLength(4);
+ });
+
+ test(`extension not installed timeout (${mode})`, async ({ browserWithExtension, startClient, server, useShortConnectionTimeout }) => {
+ useShortConnectionTimeout(100);
+
+ const browserContext = await browserWithExtension.launch();
+
+ const client = await startClientMethod(browserWithExtension, startClient);
+
+ const confirmationPagePromise = browserContext.waitForEvent('page', page => {
+ return page.url().startsWith('chrome-extension://jakfalbnbhgkpmoaakfflhflbfpkailf/connect.html');
+ });
+
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ })).toHaveResponse({
+ result: expect.stringContaining('Extension connection timeout. Make sure the "Playwright MCP Bridge" extension is installed.'),
+ isError: true,
+ });
+
+ await confirmationPagePromise;
+ });
+
+ testWithOldExtensionVersion(`works with old extension version (${mode})`, async ({ browserWithExtension, startClient, server, useShortConnectionTimeout }) => {
+ useShortConnectionTimeout(500);
+
+ // Prelaunch the browser, so that it is properly closed after the test.
+ const browserContext = await browserWithExtension.launch();
+
+ const client = await startClientMethod(browserWithExtension, startClient);
+
+ const confirmationPagePromise = browserContext.waitForEvent('page', page => {
+ return page.url().startsWith('chrome-extension://jakfalbnbhgkpmoaakfflhflbfpkailf/connect.html');
+ });
+
+ const navigateResponse = client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+
+ const selectorPage = await confirmationPagePromise;
+ // For browser_navigate command, the UI shows Allow/Reject buttons instead of tab selector
+ await selectorPage.getByRole('button', { name: 'Allow' }).click();
+
+ expect(await navigateResponse).toHaveResponse({
+ pageState: expect.stringContaining(`- generic [active] [ref=e1]: Hello, world!`),
+ });
+ });
+
+ test(`extension needs update (${mode})`, async ({ browserWithExtension, startClient, server, useShortConnectionTimeout, overrideProtocolVersion }) => {
+ useShortConnectionTimeout(500);
+ overrideProtocolVersion(1000);
+
+ // Prelaunch the browser, so that it is properly closed after the test.
+ const browserContext = await browserWithExtension.launch();
+
+ const client = await startClientMethod(browserWithExtension, startClient);
+
+ const confirmationPagePromise = browserContext.waitForEvent('page', page => {
+ return page.url().startsWith('chrome-extension://jakfalbnbhgkpmoaakfflhflbfpkailf/connect.html');
+ });
+
+ const navigateResponse = client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+
+ const confirmationPage = await confirmationPagePromise;
+ await expect(confirmationPage.locator('.status-banner')).toContainText(`Playwright MCP version trying to connect requires newer extension version`);
+
+ expect(await navigateResponse).toHaveResponse({
+ result: expect.stringContaining('Extension connection timeout.'),
+ isError: true,
+ });
+ });
+
+}
+
+test(`custom executablePath`, async ({ startClient, server, useShortConnectionTimeout }) => {
+ useShortConnectionTimeout(1000);
+
+ const executablePath = test.info().outputPath('echo.sh');
+ await fs.promises.writeFile(executablePath, '#!/bin/bash\necho "Custom exec args: $@" > "$(dirname "$0")/output.txt"', { mode: 0o755 });
+
+ const { client } = await startClient({
+ args: [`--extension`],
+ config: {
+ browser: {
+ launchOptions: {
+ executablePath,
+ },
+ }
+ },
+ });
+
+ const navigateResponse = await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ timeout: 1000,
+ });
+ expect(await navigateResponse).toHaveResponse({
+ result: expect.stringContaining('Extension connection timeout.'),
+ isError: true,
+ });
+ expect(await fs.promises.readFile(test.info().outputPath('output.txt'), 'utf8')).toContain('Custom exec args: chrome-extension://jakfalbnbhgkpmoaakfflhflbfpkailf/connect.html?');
+});
diff --git a/tests/mcp/files.spec.ts b/tests/mcp/files.spec.ts
new file mode 100644
index 0000000000..5a1bb645d2
--- /dev/null
+++ b/tests/mcp/files.spec.ts
@@ -0,0 +1,151 @@
+/**
+ * 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 fs from 'fs/promises';
+import { test, expect } from './fixtures';
+
+test('browser_file_upload', async ({ client, server }, testInfo) => {
+ server.setContent('/', `
+ <input type="file" />
+ <button>Button</button>
+ `, 'text/html');
+
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`- generic [active] [ref=e1]:
+ - button "Choose File" [ref=e2]
+ - button "Button" [ref=e3]`),
+ });
+
+ {
+ expect(await client.callTool({
+ name: 'browser_file_upload',
+ arguments: { paths: [] },
+ })).toHaveResponse({
+ isError: true,
+ result: expect.stringContaining(`The tool "browser_file_upload" can only be used when there is related modal state present.`),
+ modalState: expect.stringContaining(`- There is no modal state present`),
+ });
+ }
+
+ expect(await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'Textbox',
+ ref: 'e2',
+ },
+ })).toHaveResponse({
+ modalState: expect.stringContaining(`- [File chooser]: can be handled by the "browser_file_upload" tool`),
+ });
+
+ const filePath = testInfo.outputPath('test.txt');
+ await fs.writeFile(filePath, 'Hello, world!');
+
+ {
+ const response = await client.callTool({
+ name: 'browser_file_upload',
+ arguments: {
+ paths: [filePath],
+ },
+ });
+
+ expect(response).toHaveResponse({
+ code: expect.stringContaining(`await fileChooser.setFiles(`),
+ modalState: undefined,
+ });
+ }
+
+ {
+ const response = await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'Textbox',
+ ref: 'e2',
+ },
+ });
+
+ expect(response).toHaveResponse({
+ modalState: `- [File chooser]: can be handled by the "browser_file_upload" tool`,
+ });
+ }
+
+ {
+ const response = await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'Button',
+ ref: 'e3',
+ },
+ });
+
+ expect(response).toHaveResponse({
+ result: `Error: Tool "browser_click" does not handle the modal state.`,
+ modalState: expect.stringContaining(`- [File chooser]: can be handled by the "browser_file_upload" tool`),
+ });
+ }
+});
+
+test('clicking on download link emits download', async ({ startClient, server, mcpMode }, testInfo) => {
+ const { client } = await startClient({
+ config: { outputDir: testInfo.outputPath('output') },
+ });
+
+ server.setContent('/', `<a href="/download" download="test.txt">Download</a>`, 'text/html');
+ server.setContent('/download', 'Data', 'text/plain');
+
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`- link "Download" [ref=e2]`),
+ });
+ await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'Download link',
+ ref: 'e2',
+ },
+ });
+ await expect.poll(() => client.callTool({ name: 'browser_snapshot' })).toHaveResponse({
+ downloads: `- Downloaded file test.txt to ${testInfo.outputPath('output', 'test.txt')}`,
+ });
+});
+
+test('navigating to download link emits download', async ({ startClient, server, mcpBrowser, mcpMode }, testInfo) => {
+ const { client } = await startClient({
+ config: { outputDir: testInfo.outputPath('output') },
+ });
+
+ test.skip(mcpBrowser !== 'chromium', 'This test is racy');
+ server.setRoute('/download', (req, res) => {
+ res.writeHead(200, {
+ 'Content-Type': 'text/plain',
+ 'Content-Disposition': 'attachment; filename=test.txt',
+ });
+ res.end('Hello world!');
+ });
+
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: {
+ url: server.PREFIX + '/download',
+ },
+ })).toHaveResponse({
+ downloads: expect.stringContaining(`- Downloaded file test.txt to`),
+ });
+});
diff --git a/tests/mcp/fixtures.ts b/tests/mcp/fixtures.ts
new file mode 100644
index 0000000000..7fb39c6807
--- /dev/null
+++ b/tests/mcp/fixtures.ts
@@ -0,0 +1,280 @@
+/**
+ * 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 fs from 'fs';
+import path from 'path';
+import { chromium } from 'playwright';
+
+import { test as baseTest, expect as baseExpect } from '@playwright/test';
+import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
+import { Client } from '@modelcontextprotocol/sdk/client/index.js';
+import { ListRootsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
+import { TestServer } from '../config/testserver';
+import { serverFixtures } from '../config/serverFixtures';
+
+import type { Config } from '../../packages/playwright/src/mcp/config';
+import type { BrowserContext } from 'playwright';
+import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
+import type { Stream } from 'stream';
+import type { ServerFixtures, ServerWorkerOptions } from '../config/serverFixtures';
+
+export type TestOptions = {
+ mcpArgs: string[] | undefined;
+ mcpBrowser: string | undefined;
+ mcpMode: 'docker' | undefined;
+};
+
+type CDPServer = {
+ endpoint: string;
+ start: () => Promise<BrowserContext>;
+};
+
+export type StartClient = (options?: {
+ clientName?: string,
+ args?: string[],
+ config?: Config,
+ roots?: { name: string, uri: string }[],
+ rootsResponseDelay?: number,
+}) => Promise<{ client: Client, stderr: () => string }>;
+
+
+type TestFixtures = {
+ client: Client;
+ startClient: StartClient;
+ wsEndpoint: string;
+ cdpServer: CDPServer;
+ server: TestServer;
+ httpsServer: TestServer;
+ mcpHeadless: boolean;
+};
+
+type WorkerFixtures = {
+ _workerServers: { server: TestServer, httpsServer: TestServer };
+};
+
+export const serverTest = baseTest.extend<ServerFixtures, ServerWorkerOptions>(serverFixtures);
+
+export const test = serverTest.extend<TestFixtures & TestOptions, WorkerFixtures>({
+ mcpArgs: [undefined, { option: true }],
+
+ client: async ({ startClient }, use) => {
+ const { client } = await startClient();
+ await use(client);
+ },
+
+ startClient: async ({ mcpHeadless, mcpBrowser, mcpMode, mcpArgs }, use, testInfo) => {
+ const configDir = path.dirname(test.info().config.configFile!);
+ const clients: Client[] = [];
+
+ await use(async options => {
+ const args: string[] = mcpArgs ?? [];
+ if (process.env.CI && process.platform === 'linux')
+ args.push('--no-sandbox');
+ if (mcpHeadless)
+ args.push('--headless');
+ if (mcpBrowser)
+ args.push(`--browser=${mcpBrowser}`);
+ if (options?.args)
+ args.push(...options.args);
+ if (options?.config) {
+ const configFile = testInfo.outputPath('config.json');
+ await fs.promises.writeFile(configFile, JSON.stringify(options.config, null, 2));
+ args.push(`--config=${path.relative(configDir, configFile)}`);
+ }
+
+ const client = new Client({ name: options?.clientName ?? 'test', version: '1.0.0' }, options?.roots ? { capabilities: { roots: {} } } : undefined);
+ if (options?.roots) {
+ client.setRequestHandler(ListRootsRequestSchema, async request => {
+ if (options.rootsResponseDelay)
+ await new Promise(resolve => setTimeout(resolve, options.rootsResponseDelay));
+ return {
+ roots: options.roots,
+ };
+ });
+ }
+ const { transport, stderr } = await createTransport(args, mcpMode, testInfo.outputPath('ms-playwright'));
+ let stderrBuffer = '';
+ stderr?.on('data', data => {
+ if (process.env.PWMCP_DEBUG)
+ process.stderr.write(data);
+ stderrBuffer += data.toString();
+ });
+ clients.push(client);
+ await client.connect(transport);
+ await client.ping();
+ return { client, stderr: () => stderrBuffer };
+ });
+
+ await Promise.all(clients.map(client => client.close()));
+ },
+
+ wsEndpoint: async ({ }, use) => {
+ const browserServer = await chromium.launchServer();
+ await use(browserServer.wsEndpoint());
+ await browserServer.close();
+ },
+
+ cdpServer: async ({ mcpBrowser }, use, testInfo) => {
+ test.skip(!['chrome', 'msedge', 'chromium'].includes(mcpBrowser!), 'CDP is not supported for non-Chromium browsers');
+
+ let browserContext: BrowserContext | undefined;
+ const port = 3200 + test.info().parallelIndex;
+ await use({
+ endpoint: `http://localhost:${port}`,
+ start: async () => {
+ if (browserContext)
+ throw new Error('CDP server already exists');
+ browserContext = await chromium.launchPersistentContext(testInfo.outputPath('cdp-user-data-dir'), {
+ channel: mcpBrowser,
+ headless: true,
+ args: [
+ `--remote-debugging-port=${port}`,
+ ],
+ });
+ return browserContext;
+ }
+ });
+ await browserContext?.close();
+ },
+
+ mcpHeadless: async ({ headless }, use) => {
+ await use(headless);
+ },
+
+ server: async ({ server }, use) => {
+ server.setContent('/favicon.ico', '', 'image/x-icon');
+ server.setContent('/', ``, 'text/html');
+ server.setContent('/hello-world', `
+ <title>Title</title>
+ <body>Hello, world!</body>
+ `, 'text/html');
+ await use(server);
+ },
+
+ mcpBrowser: ['chrome', { option: true }],
+
+ mcpMode: [undefined, { option: true }],
+});
+
+async function createTransport(args: string[], mcpMode: TestOptions['mcpMode'], profilesDir: string): Promise<{
+ transport: Transport,
+ stderr: Stream | null,
+}> {
+ if (mcpMode === 'docker') {
+ const dockerArgs = ['run', '--rm', '-i', '--network=host', '-v', `${test.info().project.outputDir}:/app/test-results`];
+ const transport = new StdioClientTransport({
+ command: 'docker',
+ args: [...dockerArgs, 'playwright-mcp-dev:latest', ...args],
+ });
+ return {
+ transport,
+ stderr: transport.stderr,
+ };
+ }
+
+ const transport = new StdioClientTransport({
+ command: 'node',
+ args: [programPath, ...args],
+ cwd: path.dirname(test.info().config.configFile!),
+ stderr: 'pipe',
+ env: {
+ ...process.env,
+ DEBUG: 'pw:mcp:test',
+ DEBUG_COLORS: '0',
+ DEBUG_HIDE_DATE: '1',
+ PWMCP_PROFILES_DIR_FOR_TEST: profilesDir,
+ },
+ });
+ return {
+ transport,
+ stderr: transport.stderr!,
+ };
+}
+
+type Response = Awaited<ReturnType<Client['callTool']>>;
+
+export const expect = baseExpect.extend({
+ toHaveResponse(response: Response, object: any) {
+ const parsed = parseResponse(response);
+ const isNot = this.isNot;
+ try {
+ if (isNot)
+ expect(parsed).not.toEqual(expect.objectContaining(object));
+ else
+ expect(parsed).toEqual(expect.objectContaining(object));
+ } catch (e) {
+ return {
+ pass: isNot,
+ message: () => e.message,
+ };
+ }
+ return {
+ pass: !isNot,
+ message: () => ``,
+ };
+ },
+});
+
+export function formatOutput(output: string): string[] {
+ return output.split('\n').map(line => line.replace(/^pw:mcp:test /, '').replace(/user data dir.*/, 'user data dir').trim()).filter(Boolean);
+}
+
+function parseResponse(response: any) {
+ const text = response.content[0].text;
+ const sections = parseSections(text);
+
+ const result = sections.get('Result');
+ const code = sections.get('Ran Playwright code');
+ const tabs = sections.get('Open tabs');
+ const pageState = sections.get('Page state');
+ const consoleMessages = sections.get('New console messages');
+ const modalState = sections.get('Modal state');
+ const downloads = sections.get('Downloads');
+ const codeNoFrame = code?.replace(/^```js\n/, '').replace(/\n```$/, '');
+ const isError = response.isError;
+ const attachments = response.content.slice(1);
+
+ return {
+ result,
+ code: codeNoFrame,
+ tabs,
+ pageState,
+ consoleMessages,
+ modalState,
+ downloads,
+ isError,
+ attachments,
+ };
+}
+
+function parseSections(text: string): Map<string, string> {
+ const sections = new Map<string, string>();
+ const sectionHeaders = text.split(/^### /m).slice(1); // Remove empty first element
+
+ for (const section of sectionHeaders) {
+ const firstNewlineIndex = section.indexOf('\n');
+ if (firstNewlineIndex === -1)
+ continue;
+
+ const sectionName = section.substring(0, firstNewlineIndex);
+ const sectionContent = section.substring(firstNewlineIndex + 1).trim();
+ sections.set(sectionName, sectionContent);
+ }
+
+ return sections;
+}
+
+export const programPath = path.join(__dirname, '../../packages/playwright/lib/mcp/program.js');
diff --git a/tests/mcp/form.spec.ts b/tests/mcp/form.spec.ts
new file mode 100644
index 0000000000..339d79dff5
--- /dev/null
+++ b/tests/mcp/form.spec.ts
@@ -0,0 +1,123 @@
+/**
+ * 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('browser_fill_form (textbox)', async ({ client, server }) => {
+ server.setContent('/', `
+ <!DOCTYPE html>
+ <html>
+ <body>
+ <form>
+ <label>
+ <input type="text" id="name" name="name" />
+ Name
+ </label>
+ <label>
+ <input type="email" id="email" name="email" />
+ Email
+ </label>
+ <label>
+ <input type="range" id="age" name="age" min="18" max="100" />
+ Age
+ </label>
+ <label>
+ <select id="country" name="country">
+ <option value="">Choose a country</option>
+ <option value="us">United States</option>
+ <option value="uk">United Kingdom</option>
+ </select>
+ Country
+ </label>
+ <label>
+ <input type="checkbox" name="subscribe" value="newsletter" />
+ Subscribe to newsletter
+ </label>
+ </form>
+ </body>
+ </html>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_fill_form',
+ arguments: {
+ fields: [
+ {
+ name: 'Name textbox',
+ type: 'textbox',
+ ref: 'e4',
+ value: 'John Doe'
+ },
+ {
+ name: 'Email textbox',
+ type: 'textbox',
+ ref: 'e6',
+ },
+ {
+ name: 'Age textbox',
+ type: 'slider',
+ ref: 'e8',
+ value: '25'
+ },
+ {
+ name: 'Country select',
+ type: 'combobox',
+ ref: 'e10',
+ value: 'United States'
+ },
+ {
+ name: 'Subscribe checkbox',
+ type: 'checkbox',
+ ref: 'e12',
+ value: 'true'
+ },
+ ]
+ },
+ })).toHaveResponse({
+ code: `await page.getByRole('textbox', { name: 'Name' }).fill('John Doe');
+await page.getByRole('textbox', { name: 'Email' }).fill('[email protected]');
+await page.getByRole('slider', { name: 'Age' }).fill('25');
+await page.getByLabel('Choose a country United').selectOption('United States');
+await page.getByRole('checkbox', { name: 'Subscribe to newsletter' }).setChecked('true');`,
+ });
+
+ const response = await client.callTool({
+ name: 'browser_snapshot',
+ arguments: {
+ },
+ });
+ expect.soft(response).toHaveResponse({
+ pageState: expect.stringMatching(/textbox "Name".*John Doe/),
+ });
+ expect.soft(response).toHaveResponse({
+ pageState: expect.stringMatching(/textbox "Email".*[email protected]/),
+ });
+ expect.soft(response).toHaveResponse({
+ pageState: expect.stringMatching(/slider "Age".*"25"/),
+ });
+ expect.soft(response).toHaveResponse({
+ pageState: expect.stringContaining('option \"United States\" [selected]'),
+ });
+ expect.soft(response).toHaveResponse({
+ pageState: expect.stringContaining('checkbox \"Subscribe to newsletter\" [checked]'),
+ });
+});
diff --git a/tests/mcp/headed.spec.ts b/tests/mcp/headed.spec.ts
new file mode 100644
index 0000000000..1654a30a50
--- /dev/null
+++ b/tests/mcp/headed.spec.ts
@@ -0,0 +1,49 @@
+/**
+ * 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';
+
+for (const mcpHeadless of [false, true]) {
+ test.describe(`mcpHeadless: ${mcpHeadless}`, () => {
+ test.use({ mcpHeadless });
+ test.skip(process.platform === 'linux', 'Auto-detection wont let this test run on linux');
+ test.skip(({ mcpMode, mcpHeadless }) => mcpMode === 'docker' && !mcpHeadless, 'Headed mode is not supported in docker');
+
+ test('browser', async ({ client, server, mcpBrowser }) => {
+ test.skip(!['chrome', 'msedge', 'chromium'].includes(mcpBrowser ?? ''), 'Only chrome is supported for this test');
+ server.setRoute('/', (req, res) => {
+ res.writeHead(200, { 'Content-Type': 'text/html' });
+ res.end(`
+ <body></body>
+ <script>
+ document.body.textContent = navigator.userAgent;
+ </script>
+ `);
+ });
+
+ const response = await client.callTool({
+ name: 'browser_navigate',
+ arguments: {
+ url: server.PREFIX,
+ },
+ });
+
+ expect(response).toHaveResponse({
+ pageState: (mcpHeadless ? expect : expect.not).stringContaining(`HeadlessChrome`),
+ });
+ });
+ });
+}
diff --git a/tests/mcp/http.spec.ts b/tests/mcp/http.spec.ts
new file mode 100644
index 0000000000..2289a2bb2d
--- /dev/null
+++ b/tests/mcp/http.spec.ts
@@ -0,0 +1,254 @@
+/**
+ * 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 fs from 'fs';
+
+import { ChildProcess, spawn } from 'child_process';
+import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
+import { Client } from '@modelcontextprotocol/sdk/client/index.js';
+import { test as baseTest, expect, programPath } from './fixtures';
+
+import type { Config } from '../../packages/playwright/src/mcp/config';
+
+const test = baseTest.extend<{ serverEndpoint: (options?: { args?: string[], noPort?: boolean }) => Promise<{ url: URL, stderr: () => string }> }>({
+ serverEndpoint: async ({ mcpHeadless }, use, testInfo) => {
+ let cp: ChildProcess | undefined;
+ const userDataDir = testInfo.outputPath('user-data-dir');
+ await use(async (options?: { args?: string[], noPort?: boolean }) => {
+ if (cp)
+ throw new Error('Process already running');
+
+ cp = spawn('node', [
+ programPath,
+ ...(options?.noPort ? [] : ['--port=0']),
+ '--user-data-dir=' + userDataDir,
+ ...(mcpHeadless ? ['--headless'] : []),
+ ...(options?.args || []),
+ ], {
+ stdio: 'pipe',
+ env: {
+ ...process.env,
+ DEBUG: 'pw:mcp:test',
+ DEBUG_COLORS: '0',
+ DEBUG_HIDE_DATE: '1',
+ },
+ });
+ let stderr = '';
+ const url = await new Promise<string>(resolve => cp!.stderr?.on('data', data => {
+ stderr += data.toString();
+ const match = stderr.match(/Listening on (http:\/\/.*)/);
+ if (match)
+ resolve(match[1]);
+ }));
+
+ return { url: new URL(url), stderr: () => stderr };
+ });
+ cp?.kill('SIGTERM');
+ },
+});
+
+test('http transport', async ({ serverEndpoint }) => {
+ const { url } = await serverEndpoint();
+ const transport = new StreamableHTTPClientTransport(new URL('/mcp', url));
+ const client = new Client({ name: 'test', version: '1.0.0' });
+ await client.connect(transport);
+ await client.ping();
+});
+
+test('http transport (config)', async ({ serverEndpoint }) => {
+ const config: Config = {
+ server: {
+ port: 0,
+ }
+ };
+ const configFile = test.info().outputPath('config.json');
+ await fs.promises.writeFile(configFile, JSON.stringify(config, null, 2));
+
+ const { url } = await serverEndpoint({ noPort: true, args: ['--config=' + configFile] });
+ const transport = new StreamableHTTPClientTransport(new URL('/mcp', url));
+ const client = new Client({ name: 'test', version: '1.0.0' });
+ await client.connect(transport);
+ await client.ping();
+});
+
+test('http transport browser lifecycle (isolated)', async ({ serverEndpoint, server }) => {
+ const { url, stderr } = await serverEndpoint({ args: ['--isolated'] });
+
+ const transport1 = new StreamableHTTPClientTransport(new URL('/mcp', url));
+ const client1 = new Client({ name: 'test', version: '1.0.0' });
+ await client1.connect(transport1);
+ await client1.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+ /**
+ * src/client/streamableHttp.ts
+ * Clients that no longer need a particular session
+ * (e.g., because the user is leaving the client application) SHOULD send an
+ * HTTP DELETE to the MCP endpoint with the Mcp-Session-Id header to explicitly
+ * terminate the session.
+ */
+ await transport1.terminateSession();
+ await client1.close();
+
+ const transport2 = new StreamableHTTPClientTransport(new URL('/mcp', url));
+ const client2 = new Client({ name: 'test', version: '1.0.0' });
+ await client2.connect(transport2);
+ await client2.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+ await transport2.terminateSession();
+ await client2.close();
+
+ await expect(async () => {
+ const lines = stderr().split('\n');
+ expect(lines.filter(line => line.match(/create http session/)).length).toBe(2);
+ expect(lines.filter(line => line.match(/delete http session/)).length).toBe(2);
+
+ expect(lines.filter(line => line.match(/create context/)).length).toBe(2);
+ expect(lines.filter(line => line.match(/close context/)).length).toBe(2);
+
+ expect(lines.filter(line => line.match(/create browser context \(isolated\)/)).length).toBe(2);
+ expect(lines.filter(line => line.match(/close browser context \(isolated\)/)).length).toBe(2);
+
+ expect(lines.filter(line => line.match(/obtain browser \(isolated\)/)).length).toBe(2);
+ expect(lines.filter(line => line.match(/close browser \(isolated\)/)).length).toBe(2);
+ }).toPass();
+});
+
+test('http transport browser lifecycle (isolated, multiclient)', async ({ serverEndpoint, server }) => {
+ const { url, stderr } = await serverEndpoint({ args: ['--isolated'] });
+
+ const transport1 = new StreamableHTTPClientTransport(new URL('/mcp', url));
+ const client1 = new Client({ name: 'test', version: '1.0.0' });
+ await client1.connect(transport1);
+ await client1.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+
+ const transport2 = new StreamableHTTPClientTransport(new URL('/mcp', url));
+ const client2 = new Client({ name: 'test', version: '1.0.0' });
+ await client2.connect(transport2);
+ await client2.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+ await transport1.terminateSession();
+ await client1.close();
+
+ const transport3 = new StreamableHTTPClientTransport(new URL('/mcp', url));
+ const client3 = new Client({ name: 'test', version: '1.0.0' });
+ await client3.connect(transport3);
+ await client3.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+
+ await transport2.terminateSession();
+ await client2.close();
+ await transport3.terminateSession();
+ await client3.close();
+
+ await expect(async () => {
+ const lines = stderr().split('\n');
+ expect(lines.filter(line => line.match(/create http session/)).length).toBe(3);
+ expect(lines.filter(line => line.match(/delete http session/)).length).toBe(3);
+
+ expect(lines.filter(line => line.match(/create context/)).length).toBe(3);
+ expect(lines.filter(line => line.match(/close context/)).length).toBe(3);
+
+ expect(lines.filter(line => line.match(/create browser context \(isolated\)/)).length).toBe(3);
+ expect(lines.filter(line => line.match(/close browser context \(isolated\)/)).length).toBe(3);
+
+ expect(lines.filter(line => line.match(/obtain browser \(isolated\)/)).length).toBe(1);
+ expect(lines.filter(line => line.match(/close browser \(isolated\)/)).length).toBe(1);
+ }).toPass();
+});
+
+test('http transport browser lifecycle (persistent)', async ({ serverEndpoint, server }) => {
+ const { url, stderr } = await serverEndpoint();
+
+ const transport1 = new StreamableHTTPClientTransport(new URL('/mcp', url));
+ const client1 = new Client({ name: 'test', version: '1.0.0' });
+ await client1.connect(transport1);
+ await client1.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+ await transport1.terminateSession();
+ await client1.close();
+
+ const transport2 = new StreamableHTTPClientTransport(new URL('/mcp', url));
+ const client2 = new Client({ name: 'test', version: '1.0.0' });
+ await client2.connect(transport2);
+ await client2.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+ await transport2.terminateSession();
+ await client2.close();
+
+ await expect(async () => {
+ const lines = stderr().split('\n');
+ expect(lines.filter(line => line.match(/create http session/)).length).toBe(2);
+ expect(lines.filter(line => line.match(/delete http session/)).length).toBe(2);
+
+ expect(lines.filter(line => line.match(/create context/)).length).toBe(2);
+ expect(lines.filter(line => line.match(/close context/)).length).toBe(2);
+
+ expect(lines.filter(line => line.match(/create browser context \(persistent\)/)).length).toBe(2);
+ expect(lines.filter(line => line.match(/close browser context \(persistent\)/)).length).toBe(2);
+
+ expect(lines.filter(line => line.match(/lock user data dir/)).length).toBe(2);
+ expect(lines.filter(line => line.match(/release user data dir/)).length).toBe(2);
+ }).toPass();
+});
+
+test('http transport browser lifecycle (persistent, multiclient)', async ({ serverEndpoint, server }) => {
+ const { url } = await serverEndpoint();
+
+ const transport1 = new StreamableHTTPClientTransport(new URL('/mcp', url));
+ const client1 = new Client({ name: 'test', version: '1.0.0' });
+ await client1.connect(transport1);
+ await client1.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+
+ const transport2 = new StreamableHTTPClientTransport(new URL('/mcp', url));
+ const client2 = new Client({ name: 'test', version: '1.0.0' });
+ await client2.connect(transport2);
+ const response = await client2.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+ expect(response.isError).toBe(true);
+ expect(response.content?.[0].text).toContain('use --isolated to run multiple instances of the same browser');
+
+ await client1.close();
+ await client2.close();
+});
+
+test('http transport (default)', async ({ serverEndpoint }) => {
+ const { url } = await serverEndpoint();
+ const transport = new StreamableHTTPClientTransport(url);
+ const client = new Client({ name: 'test', version: '1.0.0' });
+ await client.connect(transport);
+ await client.ping();
+ expect(transport.sessionId, 'has session support').toBeDefined();
+});
diff --git a/tests/mcp/iframes.spec.ts b/tests/mcp/iframes.spec.ts
new file mode 100644
index 0000000000..3c53de170b
--- /dev/null
+++ b/tests/mcp/iframes.spec.ts
@@ -0,0 +1,46 @@
+/**
+ * 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('stitched aria frames', async ({ client }) => {
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: {
+ url: `data:text/html,<h1>Hello</h1><iframe src="data:text/html,<button>World</button><main><iframe src='data:text/html,<p>Nested</p>'></iframe></main>"></iframe><iframe src="data:text/html,<h1>Should be invisible</h1>" style="display: none;"></iframe>`,
+ },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`- generic [active] [ref=e1]:
+ - heading "Hello" [level=1] [ref=e2]
+ - iframe [ref=e3]:
+ - generic [active] [ref=f1e1]:
+ - button "World" [ref=f1e2]
+ - main [ref=f1e3]:
+ - iframe [ref=f1e4]:
+ - paragraph [ref=f2e2]: Nested
+\`\`\``),
+ });
+
+ expect(await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'World',
+ ref: 'f1e2',
+ },
+ })).toHaveResponse({
+ code: `await page.locator('iframe').first().contentFrame().getByRole('button', { name: 'World' }).click();`,
+ });
+});
diff --git a/tests/mcp/install.spec.ts b/tests/mcp/install.spec.ts
new file mode 100644
index 0000000000..70fde07597
--- /dev/null
+++ b/tests/mcp/install.spec.ts
@@ -0,0 +1,26 @@
+/**
+ * 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('browser_install', async ({ client, mcpBrowser }) => {
+ test.skip(mcpBrowser !== 'chromium', 'Test only chromium');
+ expect(await client.callTool({
+ name: 'browser_install',
+ })).toHaveResponse({
+ tabs: expect.stringContaining(`No open tabs`),
+ });
+});
diff --git a/tests/mcp/launch.spec.ts b/tests/mcp/launch.spec.ts
new file mode 100644
index 0000000000..f7f0171aa9
--- /dev/null
+++ b/tests/mcp/launch.spec.ts
@@ -0,0 +1,169 @@
+/**
+ * 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 fs from 'fs';
+
+import { test, expect, formatOutput } from './fixtures';
+
+test('test reopen browser', async ({ startClient, server, mcpMode }) => {
+ const { client, stderr } = await startClient();
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_close',
+ })).toHaveResponse({
+ code: `await page.close()`,
+ tabs: `No open tabs. Use the "browser_navigate" tool to navigate to a page first.`,
+ });
+
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`- generic [active] [ref=e1]: Hello, world!`),
+ });
+
+ await client.close();
+
+ if (process.platform === 'win32')
+ return;
+
+ await expect.poll(() => formatOutput(stderr()), { timeout: 0 }).toEqual([
+ 'create context',
+ 'create browser context (persistent)',
+ 'lock user data dir',
+ 'close context',
+ 'close browser context (persistent)',
+ 'release user data dir',
+ 'close browser context complete (persistent)',
+ 'create browser context (persistent)',
+ 'lock user data dir',
+ 'close context',
+ 'close browser context (persistent)',
+ 'release user data dir',
+ 'close browser context complete (persistent)',
+ ]);
+});
+
+test('executable path', async ({ startClient, server }) => {
+ const { client } = await startClient({ args: [`--executable-path=bogus`] });
+ const response = await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+ expect(response).toHaveResponse({
+ result: expect.stringContaining(`executable doesn't exist`),
+ isError: true,
+ });
+});
+
+test('persistent context', async ({ startClient, server }) => {
+ server.setContent('/', `
+ <body>
+ </body>
+ <script>
+ document.body.textContent = localStorage.getItem('test') ? 'Storage: YES' : 'Storage: NO';
+ localStorage.setItem('test', 'test');
+ </script>
+ `, 'text/html');
+
+ const { client } = await startClient();
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`Storage: NO`),
+ });
+
+ await new Promise(resolve => setTimeout(resolve, 3000));
+
+ await client.callTool({
+ name: 'browser_close',
+ });
+
+ const { client: client2 } = await startClient();
+ expect(await client2.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`Storage: YES`),
+ });
+});
+
+test('isolated context', async ({ startClient, server }) => {
+ server.setContent('/', `
+ <body>
+ </body>
+ <script>
+ document.body.textContent = localStorage.getItem('test') ? 'Storage: YES' : 'Storage: NO';
+ localStorage.setItem('test', 'test');
+ </script>
+ `, 'text/html');
+
+ const { client: client1 } = await startClient({ args: [`--isolated`] });
+ expect(await client1.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`Storage: NO`),
+ });
+
+ await client1.callTool({
+ name: 'browser_close',
+ });
+
+ const { client: client2 } = await startClient({ args: [`--isolated`] });
+ expect(await client2.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`Storage: NO`),
+ });
+});
+
+test('isolated context with storage state', async ({ startClient, server }, testInfo) => {
+ const storageStatePath = testInfo.outputPath('storage-state.json');
+ await fs.promises.writeFile(storageStatePath, JSON.stringify({
+ origins: [
+ {
+ origin: server.PREFIX,
+ localStorage: [{ name: 'test', value: 'session-value' }],
+ },
+ ],
+ }));
+
+ server.setContent('/', `
+ <body>
+ </body>
+ <script>
+ document.body.textContent = 'Storage: ' + localStorage.getItem('test');
+ </script>
+ `, 'text/html');
+
+ const { client } = await startClient({ args: [
+ `--isolated`,
+ `--storage-state=${storageStatePath}`,
+ ] });
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`Storage: session-value`),
+ });
+});
diff --git a/tests/mcp/library.spec.ts b/tests/mcp/library.spec.ts
new file mode 100644
index 0000000000..24eaf2d05e
--- /dev/null
+++ b/tests/mcp/library.spec.ts
@@ -0,0 +1,28 @@
+/**
+ * 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 child_process from 'child_process';
+import fs from 'fs/promises';
+import { test, expect } from './fixtures';
+
+test('library can be used from CommonJS', { annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright-mcp/issues/456' } }, async ({}, testInfo) => {
+ const file = testInfo.outputPath('main.cjs');
+ await fs.writeFile(file, `
+ import('playwright/lib/mcp/index')
+ .then(playwrightMCP => playwrightMCP.createConnection())
+ .then(() => console.log('OK'));
+ `);
+ expect(child_process.execSync(`node ${file}`, { encoding: 'utf-8' })).toContain('OK');
+});
diff --git a/tests/mcp/mdb.spec.ts b/tests/mcp/mdb.spec.ts
new file mode 100644
index 0000000000..85229a7864
--- /dev/null
+++ b/tests/mcp/mdb.spec.ts
@@ -0,0 +1,208 @@
+/**
+ * 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 { Client } from '@modelcontextprotocol/sdk/client/index.js';
+import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
+
+import { runMainBackend, runOnPauseBackendLoop } from '../../packages/playwright/lib/mcp/sdk/mdb';
+
+import { test, expect } from './fixtures';
+
+test('call top level tool', async () => {
+ const { mdbUrl } = await startMDBAndCLI();
+ const mdbClient = await createMDBClient(mdbUrl);
+
+ const { tools } = await mdbClient.client.listTools();
+ expect(tools).toEqual([{
+ name: 'cli_echo',
+ description: 'Echo a message',
+ inputSchema: expect.any(Object),
+ }, {
+ name: 'cli_pause_in_gdb',
+ description: 'Pause in gdb',
+ inputSchema: expect.any(Object),
+ }, {
+ name: 'cli_pause_in_gdb_twice',
+ description: 'Pause in gdb twice',
+ inputSchema: expect.any(Object),
+ }
+ ]);
+
+ const echoResult = await mdbClient.client.callTool({
+ name: 'cli_echo',
+ arguments: {
+ message: 'Hello, world!',
+ },
+ });
+ expect(echoResult.content).toEqual([{ type: 'text', text: 'Echo: Hello, world!' }]);
+
+ await mdbClient.close();
+});
+
+test('pause on error', async () => {
+ const { mdbUrl } = await startMDBAndCLI();
+ const mdbClient = await createMDBClient(mdbUrl);
+
+ // Make a call that results in a recoverable error.
+ const interruptResult = await mdbClient.client.callTool({
+ name: 'cli_pause_in_gdb',
+ arguments: {},
+ });
+ expect(interruptResult.content).toEqual([{ type: 'text', text: 'Paused on exception' }]);
+
+ // List new inner tools.
+ const { tools } = await mdbClient.client.listTools();
+ expect(tools).toEqual([
+ expect.objectContaining({
+ name: 'gdb_bt',
+ }),
+ expect.objectContaining({
+ name: 'gdb_continue',
+ }),
+ ]);
+
+ // Call the new inner tool.
+ const btResult = await mdbClient.client.callTool({
+ name: 'gdb_bt',
+ arguments: {},
+ });
+ expect(btResult.content).toEqual([{ type: 'text', text: 'Backtrace' }]);
+
+ // Continue execution.
+ const continueResult = await mdbClient.client.callTool({
+ name: 'gdb_continue',
+ arguments: {},
+ });
+ expect(continueResult.content).toEqual([{ type: 'text', text: 'Done' }]);
+
+ await mdbClient.close();
+});
+
+test('pause on error twice', async () => {
+ const { mdbUrl } = await startMDBAndCLI();
+ const mdbClient = await createMDBClient(mdbUrl);
+
+ // Make a call that results in a recoverable error.
+ const result = await mdbClient.client.callTool({
+ name: 'cli_pause_in_gdb_twice',
+ arguments: {},
+ });
+ expect(result.content).toEqual([{ type: 'text', text: 'Paused on exception 1' }]);
+
+ // Continue execution.
+ const continueResult1 = await mdbClient.client.callTool({
+ name: 'gdb_continue',
+ arguments: {},
+ });
+ expect(continueResult1.content).toEqual([{ type: 'text', text: 'Paused on exception 2' }]);
+
+ const continueResult2 = await mdbClient.client.callTool({
+ name: 'gdb_continue',
+ arguments: {},
+ });
+ expect(continueResult2.content).toEqual([{ type: 'text', text: 'Done' }]);
+
+ await mdbClient.close();
+});
+
+async function startMDBAndCLI(): Promise<{ mdbUrl: string }> {
+ const mdbUrlBox = { mdbUrl: undefined as string | undefined };
+ const cliBackendFactory = {
+ name: 'CLI',
+ nameInConfig: 'cli',
+ version: '0.0.0',
+ create: () => new CLIBackend(mdbUrlBox)
+ };
+
+ const mdbUrl = (await runMainBackend(cliBackendFactory, { port: 0 }))!;
+ mdbUrlBox.mdbUrl = mdbUrl;
+ return { mdbUrl };
+}
+
+async function createMDBClient(mdbUrl: string): Promise<{ client: Client, close: () => Promise<void> }> {
+ const client = new Client({ name: 'Internal client', version: '0.0.0' });
+ const transport = new StreamableHTTPClientTransport(new URL(mdbUrl));
+ await client.connect(transport);
+ return {
+ client,
+ close: async () => {
+ await transport.terminateSession();
+ await client.close();
+ }
+ };
+}
+
+class CLIBackend {
+ constructor(private readonly mdbUrlBox: { mdbUrl: string | undefined }) {}
+
+ async listTools() {
+ return [{
+ name: 'cli_echo',
+ description: 'Echo a message',
+ inputSchema: zodToJsonSchema(z.object({ message: z.string() })) as any,
+ }, {
+ name: 'cli_pause_in_gdb',
+ description: 'Pause in gdb',
+ inputSchema: zodToJsonSchema(z.object({})) as any,
+ }, {
+ name: 'cli_pause_in_gdb_twice',
+ description: 'Pause in gdb twice',
+ inputSchema: zodToJsonSchema(z.object({})) as any,
+ }];
+ }
+
+ async callTool(name: string, args: any) {
+ if (name === 'cli_echo')
+ return { content: [{ type: 'text', text: 'Echo: ' + (args?.message as string) }] };
+ if (name === 'cli_pause_in_gdb') {
+ await runOnPauseBackendLoop(this.mdbUrlBox.mdbUrl!, new GDBBackend(), 'Paused on exception');
+ return { content: [{ type: 'text', text: 'Done' }] };
+ }
+ if (name === 'cli_pause_in_gdb_twice') {
+ await runOnPauseBackendLoop(this.mdbUrlBox.mdbUrl!, new GDBBackend(), 'Paused on exception 1');
+ await runOnPauseBackendLoop(this.mdbUrlBox.mdbUrl!, new GDBBackend(), 'Paused on exception 2');
+ return { content: [{ type: 'text', text: 'Done' }] };
+ }
+ throw new Error(`Unknown tool: ${name}`);
+ }
+}
+
+class GDBBackend {
+ async listTools() {
+ return [{
+ name: 'gdb_bt',
+ description: 'Print backtrace',
+ inputSchema: zodToJsonSchema(z.object({})) as any,
+ }, {
+ name: 'gdb_continue',
+ description: 'Continue execution',
+ inputSchema: zodToJsonSchema(z.object({})) as any,
+ }];
+ }
+
+ async callTool(name: string) {
+ if (name === 'gdb_bt')
+ return { content: [{ type: 'text', text: 'Backtrace' }] };
+ if (name === 'gdb_continue') {
+ (this as any).requestSelfDestruct?.();
+ // Stall
+ await new Promise(f => setTimeout(f, 1000));
+ }
+ throw new Error(`Unknown tool: ${name}`);
+ }
+}
diff --git a/tests/mcp/network.spec.ts b/tests/mcp/network.spec.ts
new file mode 100644
index 0000000000..a47bcce4ae
--- /dev/null
+++ b/tests/mcp/network.spec.ts
@@ -0,0 +1,47 @@
+/**
+ * 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('browser_network_requests', async ({ client, server }) => {
+ server.setContent('/', `
+ <button onclick="fetch('/json')">Click me</button>
+ `, 'text/html');
+
+ server.setContent('/json', JSON.stringify({ name: 'John Doe' }), 'application/json');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: {
+ url: server.PREFIX,
+ },
+ });
+
+ await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'Click me button',
+ ref: 'e2',
+ },
+ });
+
+ await expect.poll(() => client.callTool({
+ name: 'browser_network_requests',
+ })).toHaveResponse({
+ result: expect.stringContaining(`[GET] ${`${server.PREFIX}/`} => [200] OK
+[GET] ${`${server.PREFIX}/json`} => [200] OK`),
+ });
+});
diff --git a/tests/mcp/pdf.spec.ts b/tests/mcp/pdf.spec.ts
new file mode 100644
index 0000000000..937eb16c87
--- /dev/null
+++ b/tests/mcp/pdf.spec.ts
@@ -0,0 +1,88 @@
+/**
+ * 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 fs from 'fs';
+
+import { test, expect } from './fixtures';
+
+test('save as pdf unavailable', async ({ startClient, server }) => {
+ const { client } = await startClient();
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_pdf_save',
+ })).toHaveResponse({
+ result: 'Error: Tool "browser_pdf_save" not found',
+ isError: true,
+ });
+});
+
+test('save as pdf', async ({ startClient, mcpBrowser, server }, testInfo) => {
+ const { client } = await startClient({
+ config: { outputDir: testInfo.outputPath('output'), capabilities: ['pdf'] },
+ });
+
+ test.skip(!!mcpBrowser && !['chromium', 'chrome', 'msedge'].includes(mcpBrowser), 'Save as PDF is only supported in Chromium.');
+
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`- generic [active] [ref=e1]: Hello, world!`),
+ });
+
+ expect(await client.callTool({
+ name: 'browser_pdf_save',
+ })).toHaveResponse({
+ code: expect.stringContaining(`await page.pdf(`),
+ result: expect.stringMatching(/Saved page as.*page-[^:]+.pdf/),
+ });
+});
+
+test('save as pdf (filename: output.pdf)', async ({ startClient, mcpBrowser, server }, testInfo) => {
+ const outputDir = testInfo.outputPath('output');
+ test.skip(!!mcpBrowser && !['chromium', 'chrome', 'msedge'].includes(mcpBrowser), 'Save as PDF is only supported in Chromium.');
+ const { client } = await startClient({
+ config: { outputDir, capabilities: ['pdf'] },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`- generic [active] [ref=e1]: Hello, world!`),
+ });
+
+ expect(await client.callTool({
+ name: 'browser_pdf_save',
+ arguments: {
+ filename: 'output.pdf',
+ },
+ })).toHaveResponse({
+ result: expect.stringContaining(`output.pdf`),
+ code: expect.stringContaining(`await page.pdf(`),
+ });
+
+ const files = [...fs.readdirSync(outputDir)];
+
+ expect(fs.existsSync(outputDir)).toBeTruthy();
+ const pdfFiles = files.filter(f => f.endsWith('.pdf'));
+ expect(pdfFiles).toHaveLength(1);
+ expect(pdfFiles[0]).toMatch(/^output.pdf$/);
+});
diff --git a/tests/mcp/playwright.config.extension.ts b/tests/mcp/playwright.config.extension.ts
new file mode 100644
index 0000000000..526fda2001
--- /dev/null
+++ b/tests/mcp/playwright.config.extension.ts
@@ -0,0 +1,32 @@
+/**
+ * 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';
+
+import type { TestOptions } from './fixtures';
+
+export default defineConfig<TestOptions>({
+ testDir: './',
+ grep: /extension/,
+ fullyParallel: true,
+ forbidOnly: !!process.env.CI,
+ retries: process.env.CI ? 2 : 0,
+ workers: process.env.CI ? 1 : undefined,
+ reporter: 'list',
+ projects: [
+ { name: 'chromium', use: { mcpBrowser: 'chromium' } },
+ ],
+});
diff --git a/tests/mcp/playwright.config.ts b/tests/mcp/playwright.config.ts
new file mode 100644
index 0000000000..923a0f8034
--- /dev/null
+++ b/tests/mcp/playwright.config.ts
@@ -0,0 +1,43 @@
+/**
+ * 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';
+
+import type { TestOptions } from './fixtures';
+
+export default defineConfig<TestOptions>({
+ testDir: './',
+ grepInvert: /extension/,
+ fullyParallel: true,
+ forbidOnly: !!process.env.CI,
+ workers: process.env.CI ? 2 : undefined,
+ reporter: 'list',
+ projects: [
+ { name: 'chrome' },
+ { name: 'chromium', use: { mcpBrowser: 'chromium' } },
+ ...process.env.MCP_IN_DOCKER ? [{
+ name: 'chromium-docker',
+ grep: /browser_navigate|browser_click/,
+ use: {
+ mcpBrowser: 'chromium',
+ mcpMode: 'docker' as const
+ }
+ }] : [],
+ { name: 'firefox', use: { mcpBrowser: 'firefox' } },
+ { name: 'webkit', use: { mcpBrowser: 'webkit' } },
+ ... process.platform === 'win32' ? [{ name: 'msedge', use: { mcpBrowser: 'msedge' } }] : [],
+ ],
+});
diff --git a/tests/mcp/request-blocking.spec.ts b/tests/mcp/request-blocking.spec.ts
new file mode 100644
index 0000000000..0bcfd34301
--- /dev/null
+++ b/tests/mcp/request-blocking.spec.ts
@@ -0,0 +1,82 @@
+/**
+ * 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 { Client } from '@modelcontextprotocol/sdk/client/index.js';
+import { test, expect } from './fixtures';
+
+const BLOCK_MESSAGE = /Blocked by Web Inspector|NS_ERROR_FAILURE|net::ERR_BLOCKED_BY_CLIENT/g;
+
+const fetchPage = async (client: Client, url: string) => {
+ const result = await client.callTool({
+ name: 'browser_navigate',
+ arguments: {
+ url,
+ },
+ });
+
+ return JSON.stringify(result, null, 2);
+};
+
+test('default to allow all', async ({ server, client }) => {
+ server.setContent('/ppp', 'content:PPP', 'text/html');
+ const result = await fetchPage(client, server.PREFIX + '/ppp');
+ expect(result).toContain('content:PPP');
+});
+
+test('blocked works', async ({ startClient }) => {
+ const { client } = await startClient({
+ args: ['--blocked-origins', 'microsoft.com;example.com;playwright.dev']
+ });
+ const result = await fetchPage(client, 'https://example.com/');
+ expect(result).toMatch(BLOCK_MESSAGE);
+});
+
+test('allowed works', async ({ server, startClient }) => {
+ server.setContent('/ppp', 'content:PPP', 'text/html');
+ const { client } = await startClient({
+ args: ['--allowed-origins', `microsoft.com;${new URL(server.PREFIX).host};playwright.dev`]
+ });
+ const result = await fetchPage(client, server.PREFIX + '/ppp');
+ expect(result).toContain('content:PPP');
+});
+
+test('blocked takes precedence', async ({ startClient }) => {
+ const { client } = await startClient({
+ args: [
+ '--blocked-origins', 'example.com',
+ '--allowed-origins', 'example.com',
+ ],
+ });
+ const result = await fetchPage(client, 'https://example.com/');
+ expect(result).toMatch(BLOCK_MESSAGE);
+});
+
+test('allowed without blocked blocks all non-explicitly specified origins', async ({ startClient }) => {
+ const { client } = await startClient({
+ args: ['--allowed-origins', 'playwright.dev'],
+ });
+ const result = await fetchPage(client, 'https://example.com/');
+ expect(result).toMatch(BLOCK_MESSAGE);
+});
+
+test('blocked without allowed allows non-explicitly specified origins', async ({ server, startClient }) => {
+ server.setContent('/ppp', 'content:PPP', 'text/html');
+ const { client } = await startClient({
+ args: ['--blocked-origins', 'example.com'],
+ });
+ const result = await fetchPage(client, server.PREFIX + '/ppp');
+ expect(result).toContain('content:PPP');
+});
diff --git a/tests/mcp/roots.spec.ts b/tests/mcp/roots.spec.ts
new file mode 100644
index 0000000000..904a3265be
--- /dev/null
+++ b/tests/mcp/roots.spec.ts
@@ -0,0 +1,83 @@
+/**
+ * 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 crypto from 'crypto';
+import fs from 'fs';
+import path from 'path';
+import { pathToFileURL } from 'url';
+
+import { test, expect } from './fixtures';
+
+const p = process.platform === 'win32' ? 'c:\\non\\existent\\folder' : '/non/existent/folder';
+
+test('should use separate user data by root path', async ({ startClient, server }, testInfo) => {
+ const { client } = await startClient({
+ clientName: 'Visual Studio Code',
+ roots: [
+ {
+ name: 'test',
+ uri: 'file://' + p.replace(/\\/g, '/'),
+ }
+ ],
+ });
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+
+ const hash = createHash(p);
+ const [file] = await fs.promises.readdir(testInfo.outputPath('ms-playwright'));
+ expect(file).toContain(hash);
+});
+
+test('check that trace is saved in workspace', async ({ startClient, server }, testInfo) => {
+ const rootPath = testInfo.outputPath('workspace');
+ const { client } = await startClient({
+ args: ['--save-trace'],
+ clientName: 'My client',
+ roots: [
+ {
+ name: 'workspace',
+ uri: pathToFileURL(rootPath).toString(),
+ },
+ ],
+ });
+
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ })).toHaveResponse({
+ code: expect.stringContaining(`page.goto('http://localhost`),
+ });
+
+ const [file] = await fs.promises.readdir(path.join(rootPath, '.playwright-mcp'));
+ expect(file).toContain('traces');
+});
+
+test('should list all tools when listRoots is slow', async ({ startClient }) => {
+ const { client } = await startClient({
+ clientName: 'Another custom client',
+ roots: [],
+ rootsResponseDelay: 1000,
+ });
+ const tools = await client.listTools();
+ expect(tools.tools.length).toBeGreaterThan(10);
+});
+
+function createHash(data: string): string {
+ return crypto.createHash('sha256').update(data).digest('hex').slice(0, 7);
+}
diff --git a/tests/mcp/screenshot.spec.ts b/tests/mcp/screenshot.spec.ts
new file mode 100644
index 0000000000..50b2eaeaff
--- /dev/null
+++ b/tests/mcp/screenshot.spec.ts
@@ -0,0 +1,327 @@
+/**
+ * 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 fs from 'fs';
+
+import { test, expect } from './fixtures';
+
+test('browser_take_screenshot (viewport)', async ({ startClient, server }, testInfo) => {
+ const { client } = await startClient({
+ config: { outputDir: testInfo.outputPath('output') },
+ });
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ })).toHaveResponse({
+ code: expect.stringContaining(`page.goto('http://localhost`),
+ });
+
+ expect(await client.callTool({
+ name: 'browser_take_screenshot',
+ })).toHaveResponse({
+ code: expect.stringContaining(`await page.screenshot`),
+ attachments: [{
+ data: expect.any(String),
+ mimeType: 'image/png',
+ type: 'image',
+ }],
+ });
+});
+
+test('browser_take_screenshot (element)', async ({ startClient, server }, testInfo) => {
+ const { client } = await startClient({
+ config: { outputDir: testInfo.outputPath('output') },
+ });
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`[ref=e1]`),
+ });
+
+ expect(await client.callTool({
+ name: 'browser_take_screenshot',
+ arguments: {
+ element: 'hello button',
+ ref: 'e1',
+ },
+ })).toEqual({
+ content: [
+ {
+ text: expect.stringContaining(`page.getByText('Hello, world!').screenshot`),
+ type: 'text',
+ },
+ {
+ data: expect.any(String),
+ mimeType: 'image/png',
+ type: 'image',
+ },
+ ],
+ });
+});
+
+test('--output-dir should work', async ({ startClient, server }, testInfo) => {
+ const outputDir = testInfo.outputPath('output');
+ const { client } = await startClient({
+ config: { outputDir },
+ });
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ })).toHaveResponse({
+ code: expect.stringContaining(`page.goto('http://localhost`),
+ });
+
+ await client.callTool({
+ name: 'browser_take_screenshot',
+ });
+
+ expect(fs.existsSync(outputDir)).toBeTruthy();
+ const files = [...fs.readdirSync(outputDir)].filter(f => f.endsWith('.png'));
+ expect(files).toHaveLength(1);
+ expect(files[0]).toMatch(/^page-\d{4}-\d{2}-\d{2}T\d{2}-\d{2}-\d{2}-\d{3}Z\.png$/);
+});
+
+for (const type of ['png', 'jpeg']) {
+ test(`browser_take_screenshot (type: ${type})`, async ({ startClient, server }, testInfo) => {
+ const outputDir = testInfo.outputPath('output');
+ const { client } = await startClient({
+ config: { outputDir },
+ });
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ })).toHaveResponse({
+ code: expect.stringContaining(`page.goto('http://localhost`),
+ });
+
+ expect(await client.callTool({
+ name: 'browser_take_screenshot',
+ arguments: { type },
+ })).toEqual({
+ content: [
+ {
+ text: expect.stringMatching(
+ new RegExp(`page-\\d{4}-\\d{2}-\\d{2}T\\d{2}-\\d{2}-\\d{2}\\-\\d{3}Z\\.${type}`)
+ ),
+ type: 'text',
+ },
+ {
+ data: expect.any(String),
+ mimeType: `image/${type}`,
+ type: 'image',
+ },
+ ],
+ });
+
+ const files = [...fs.readdirSync(outputDir)].filter(f => f.endsWith(`.${type}`));
+
+ expect(fs.existsSync(outputDir)).toBeTruthy();
+ expect(files).toHaveLength(1);
+ expect(files[0]).toMatch(
+ new RegExp(`^page-\\d{4}-\\d{2}-\\d{2}T\\d{2}-\\d{2}-\\d{2}-\\d{3}Z\\.${type}$`)
+ );
+ });
+
+}
+
+test('browser_take_screenshot (default type should be png)', async ({ startClient, server }, testInfo) => {
+ const outputDir = testInfo.outputPath('output');
+ const { client } = await startClient({
+ config: { outputDir },
+ });
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ })).toHaveResponse({
+ code: `await page.goto('${server.PREFIX}');`,
+ });
+
+ expect(await client.callTool({
+ name: 'browser_take_screenshot',
+ })).toEqual({
+ content: [
+ {
+ text: expect.stringMatching(
+ new RegExp(`page-\\d{4}-\\d{2}-\\d{2}T\\d{2}-\\d{2}-\\d{2}\\-\\d{3}Z\\.png`)
+ ),
+ type: 'text',
+ },
+ {
+ data: expect.any(String),
+ mimeType: 'image/png',
+ type: 'image',
+ },
+ ],
+ });
+
+ const files = [...fs.readdirSync(outputDir)].filter(f => f.endsWith('.png'));
+
+ expect(fs.existsSync(outputDir)).toBeTruthy();
+ expect(files).toHaveLength(1);
+ expect(files[0]).toMatch(/^page-\d{4}-\d{2}-\d{2}T\d{2}-\d{2}-\d{2}-\d{3}Z\.png$/);
+});
+
+test('browser_take_screenshot (filename: "output.png")', async ({ startClient, server }, testInfo) => {
+ const outputDir = testInfo.outputPath('output');
+ const { client } = await startClient({
+ config: { outputDir },
+ });
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ })).toHaveResponse({
+ code: expect.stringContaining(`page.goto('http://localhost`),
+ });
+
+ expect(await client.callTool({
+ name: 'browser_take_screenshot',
+ arguments: {
+ filename: 'output.png',
+ },
+ })).toEqual({
+ content: [
+ {
+ text: expect.stringContaining(`output.png`),
+ type: 'text',
+ },
+ {
+ data: expect.any(String),
+ mimeType: 'image/png',
+ type: 'image',
+ },
+ ],
+ });
+
+ const files = [...fs.readdirSync(outputDir)].filter(f => f.endsWith('.png'));
+
+ expect(fs.existsSync(outputDir)).toBeTruthy();
+ expect(files).toHaveLength(1);
+ expect(files[0]).toMatch(/^output\.png$/);
+});
+
+test('browser_take_screenshot (imageResponses=omit)', async ({ startClient, server }, testInfo) => {
+ const outputDir = testInfo.outputPath('output');
+ const { client } = await startClient({
+ config: {
+ outputDir,
+ imageResponses: 'omit',
+ },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ })).toHaveResponse({
+ code: expect.stringContaining(`page.goto('http://localhost`),
+ });
+
+ await client.callTool({
+ name: 'browser_take_screenshot',
+ });
+
+ expect(await client.callTool({
+ name: 'browser_take_screenshot',
+ })).toEqual({
+ content: [
+ {
+ text: expect.stringContaining(`await page.screenshot`),
+ type: 'text',
+ },
+ ],
+ });
+});
+
+test('browser_take_screenshot (fullPage: true)', async ({ startClient, server }, testInfo) => {
+ const { client } = await startClient({
+ config: { outputDir: testInfo.outputPath('output') },
+ });
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ })).toHaveResponse({
+ code: expect.stringContaining(`page.goto('http://localhost`),
+ });
+
+ expect(await client.callTool({
+ name: 'browser_take_screenshot',
+ arguments: { fullPage: true },
+ })).toEqual({
+ content: [
+ {
+ text: expect.stringContaining('fullPage: true'),
+ type: 'text',
+ }
+ ],
+ });
+});
+
+test('browser_take_screenshot (fullPage with element should error)', async ({ startClient, server }, testInfo) => {
+ const { client } = await startClient({
+ config: { outputDir: testInfo.outputPath('output') },
+ });
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`[ref=e1]`),
+ });
+
+ const result = await client.callTool({
+ name: 'browser_take_screenshot',
+ arguments: {
+ fullPage: true,
+ element: 'hello button',
+ ref: 'e1',
+ },
+ });
+
+ expect(result.isError).toBe(true);
+ expect(result.content?.[0]?.text).toContain('fullPage cannot be used with element screenshots');
+});
+
+test('browser_take_screenshot (viewport without snapshot)', async ({ startClient, server }, testInfo) => {
+ const { client } = await startClient({
+ config: { outputDir: testInfo.outputPath('output') },
+ });
+
+ // Ensure we have a tab but don't navigate anywhere (no snapshot captured)
+ expect(await client.callTool({
+ name: 'browser_tabs',
+ arguments: {
+ action: 'list',
+ },
+ })).toHaveResponse({
+ tabs: `- 0: (current) [] (about:blank)`,
+ });
+
+ // This should work without requiring a snapshot since it's a viewport screenshot
+ expect(await client.callTool({
+ name: 'browser_take_screenshot',
+ })).toEqual({
+ content: [
+ {
+ text: expect.stringContaining(`page.screenshot`),
+ type: 'text',
+ },
+ {
+ data: expect.any(String),
+ mimeType: 'image/png',
+ type: 'image',
+ },
+ ],
+ });
+});
diff --git a/tests/mcp/session-log.spec.ts b/tests/mcp/session-log.spec.ts
new file mode 100644
index 0000000000..6f9a98ee66
--- /dev/null
+++ b/tests/mcp/session-log.spec.ts
@@ -0,0 +1,275 @@
+/**
+ * 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 fs from 'fs';
+import path from 'path';
+
+import { test, expect } from './fixtures';
+
+test('session log should record tool calls', async ({ startClient, server }, testInfo) => {
+ const { client, stderr } = await startClient({
+ args: [
+ '--save-session',
+ '--output-dir', testInfo.outputPath('output'),
+ ],
+ });
+
+ server.setContent('/', `<title>Title</title><button>Submit</button>`, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'Submit button',
+ ref: 'e2',
+ },
+ })).toHaveResponse({
+ code: `await page.getByRole('button', { name: 'Submit' }).click();`,
+ pageState: expect.stringContaining(`- button "Submit"`),
+ });
+
+ const output = stderr().split('\n').filter(line => line.startsWith('Session: '))[0];
+ const sessionFolder = output.substring('Session: '.length);
+ await expect.poll(() => readSessionLog(sessionFolder)).toBe(`
+### Tool call: browser_navigate
+- Args
+\`\`\`json
+{
+ "url": "http://localhost:${server.PORT}"
+}
+\`\`\`
+- Code
+\`\`\`js
+await page.goto('http://localhost:${server.PORT}');
+\`\`\`
+- Snapshot: 001.snapshot.yml
+
+
+### Tool call: browser_click
+- Args
+\`\`\`json
+{
+ "element": "Submit button",
+ "ref": "e2"
+}
+\`\`\`
+- Code
+\`\`\`js
+await page.getByRole('button', { name: 'Submit' }).click();
+\`\`\`
+- Snapshot: 002.snapshot.yml
+
+`);
+});
+
+test('session log should record user action', async ({ cdpServer, startClient }, testInfo) => {
+ const browserContext = await cdpServer.start();
+ const { client, stderr } = await startClient({
+ args: [
+ '--save-session',
+ '--output-dir', testInfo.outputPath('output'),
+ `--cdp-endpoint=${cdpServer.endpoint}`,
+ ],
+ });
+
+ // Force browser context creation.
+ await client.callTool({
+ name: 'browser_snapshot',
+ });
+
+ const [page] = browserContext.pages();
+ await page.setContent(`
+ <button>Button 1</button>
+ <button>Button 2</button>
+ `);
+
+ await page.getByRole('button', { name: 'Button 1' }).click();
+
+ const output = stderr().split('\n').filter(line => line.startsWith('Session: '))[0];
+ const sessionFolder = output.substring('Session: '.length);
+
+ await expect.poll(() => readSessionLog(sessionFolder)).toBe(`
+### Tool call: browser_snapshot
+- Args
+\`\`\`json
+{}
+\`\`\`
+- Snapshot: 001.snapshot.yml
+
+
+### User action: click
+- Args
+\`\`\`json
+{
+ "name": "click",
+ "ref": "e2",
+ "button": "left",
+ "modifiers": 0,
+ "clickCount": 1
+}
+\`\`\`
+- Code
+\`\`\`js
+await page.getByRole('button', { name: 'Button 1' }).click();
+\`\`\`
+- Snapshot: 002.snapshot.yml
+
+`);
+});
+
+test('session log should update user action', async ({ cdpServer, startClient }, testInfo) => {
+ const browserContext = await cdpServer.start();
+ const { client, stderr } = await startClient({
+ args: [
+ '--save-session',
+ '--output-dir', testInfo.outputPath('output'),
+ `--cdp-endpoint=${cdpServer.endpoint}`,
+ ],
+ });
+
+ // Force browser context creation.
+ await client.callTool({
+ name: 'browser_snapshot',
+ });
+
+ const [page] = browserContext.pages();
+ await page.setContent(`
+ <button>Button 1</button>
+ <button>Button 2</button>
+ `);
+
+ await page.getByRole('button', { name: 'Button 1' }).dblclick();
+
+ const output = stderr().split('\n').filter(line => line.startsWith('Session: '))[0];
+ const sessionFolder = output.substring('Session: '.length);
+
+ await expect.poll(() => readSessionLog(sessionFolder)).toBe(`
+### Tool call: browser_snapshot
+- Args
+\`\`\`json
+{}
+\`\`\`
+- Snapshot: 001.snapshot.yml
+
+
+### User action: click
+- Args
+\`\`\`json
+{
+ "name": "click",
+ "ref": "e2",
+ "button": "left",
+ "modifiers": 0,
+ "clickCount": 2
+}
+\`\`\`
+- Code
+\`\`\`js
+await page.getByRole('button', { name: 'Button 1' }).dblclick();
+\`\`\`
+- Snapshot: 002.snapshot.yml
+
+`);
+});
+
+test('session log should record tool calls and user actions', async ({ cdpServer, startClient }, testInfo) => {
+ const browserContext = await cdpServer.start();
+ const { client, stderr } = await startClient({
+ args: [
+ '--save-session',
+ '--output-dir', testInfo.outputPath('output'),
+ `--cdp-endpoint=${cdpServer.endpoint}`,
+ ],
+ });
+
+ const [page] = browserContext.pages();
+ await page.setContent(`
+ <button>Button 1</button>
+ <button>Button 2</button>
+ `);
+
+ await client.callTool({
+ name: 'browser_snapshot',
+ });
+
+ // Manual action.
+ await page.getByRole('button', { name: 'Button 1' }).click();
+
+ // This is to simulate a delay after the user action before the tool action.
+ await new Promise(resolve => setTimeout(resolve, 1000));
+
+ // Tool action.
+ await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'Button 2',
+ ref: 'e3',
+ },
+ });
+
+ const output = stderr().split('\n').filter(line => line.startsWith('Session: '))[0];
+ const sessionFolder = output.substring('Session: '.length);
+ await expect.poll(() => readSessionLog(sessionFolder)).toBe(`
+### Tool call: browser_snapshot
+- Args
+\`\`\`json
+{}
+\`\`\`
+- Snapshot: 001.snapshot.yml
+
+
+### User action: click
+- Args
+\`\`\`json
+{
+ "name": "click",
+ "ref": "e2",
+ "button": "left",
+ "modifiers": 0,
+ "clickCount": 1
+}
+\`\`\`
+- Code
+\`\`\`js
+await page.getByRole('button', { name: 'Button 1' }).click();
+\`\`\`
+- Snapshot: 002.snapshot.yml
+
+
+### Tool call: browser_click
+- Args
+\`\`\`json
+{
+ "element": "Button 2",
+ "ref": "e3"
+}
+\`\`\`
+- Code
+\`\`\`js
+await page.getByRole('button', { name: 'Button 2' }).click();
+\`\`\`
+- Snapshot: 003.snapshot.yml
+
+`);
+});
+
+async function readSessionLog(sessionFolder: string): Promise<string> {
+ return await fs.promises.readFile(path.join(sessionFolder, 'session.md'), 'utf8').catch(() => '');
+}
diff --git a/tests/mcp/sse.spec.ts b/tests/mcp/sse.spec.ts
new file mode 100644
index 0000000000..42bdc4c228
--- /dev/null
+++ b/tests/mcp/sse.spec.ts
@@ -0,0 +1,231 @@
+/**
+ * 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 fs from 'fs';
+
+import { ChildProcess, spawn } from 'child_process';
+import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js';
+import { Client } from '@modelcontextprotocol/sdk/client/index.js';
+import { test as baseTest, expect, programPath } from './fixtures';
+
+import type { Config } from '../../packages/playwright/src/mcp/config';
+
+const test = baseTest.extend<{ serverEndpoint: (options?: { args?: string[], noPort?: boolean }) => Promise<{ url: URL, stderr: () => string }> }>({
+ serverEndpoint: async ({ mcpHeadless }, use, testInfo) => {
+ let cp: ChildProcess | undefined;
+ const userDataDir = testInfo.outputPath('user-data-dir');
+ await use(async (options?: { args?: string[], noPort?: boolean }) => {
+ if (cp)
+ throw new Error('Process already running');
+
+ cp = spawn('node', [
+ programPath,
+ ...(options?.noPort ? [] : ['--port=0']),
+ '--user-data-dir=' + userDataDir,
+ ...(mcpHeadless ? ['--headless'] : []),
+ ...(options?.args || []),
+ ], {
+ stdio: 'pipe',
+ env: {
+ ...process.env,
+ DEBUG: 'pw:mcp:test',
+ DEBUG_COLORS: '0',
+ DEBUG_HIDE_DATE: '1',
+ },
+ });
+ let stderr = '';
+ const url = await new Promise<string>(resolve => cp!.stderr?.on('data', data => {
+ stderr += data.toString();
+ const match = stderr.match(/Listening on (http:\/\/.*)/);
+ if (match)
+ resolve(match[1]);
+ }));
+
+ return { url: new URL(url), stderr: () => stderr };
+ });
+ cp?.kill('SIGTERM');
+ },
+});
+
+test('sse transport', async ({ serverEndpoint }) => {
+ const { url } = await serverEndpoint();
+ const transport = new SSEClientTransport(new URL('/sse', url));
+ const client = new Client({ name: 'test', version: '1.0.0' });
+ await client.connect(transport);
+ await client.ping();
+});
+
+test('sse transport (config)', async ({ serverEndpoint }) => {
+ const config: Config = {
+ server: {
+ port: 0,
+ }
+ };
+ const configFile = test.info().outputPath('config.json');
+ await fs.promises.writeFile(configFile, JSON.stringify(config, null, 2));
+
+ const { url } = await serverEndpoint({ noPort: true, args: ['--config=' + configFile] });
+ const transport = new SSEClientTransport(new URL('/sse', url));
+ const client = new Client({ name: 'test', version: '1.0.0' });
+ await client.connect(transport);
+ await client.ping();
+});
+
+test('sse transport browser lifecycle (isolated)', async ({ serverEndpoint, server }) => {
+ const { url, stderr } = await serverEndpoint({ args: ['--isolated'] });
+
+ const transport1 = new SSEClientTransport(new URL('/sse', url));
+ const client1 = new Client({ name: 'test', version: '1.0.0' });
+ await client1.connect(transport1);
+ await client1.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+ await client1.close();
+
+ const transport2 = new SSEClientTransport(new URL('/sse', url));
+ const client2 = new Client({ name: 'test', version: '1.0.0' });
+ await client2.connect(transport2);
+ await client2.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+ await client2.close();
+
+ await expect(async () => {
+ const lines = stderr().split('\n');
+ expect(lines.filter(line => line.match(/create SSE session/)).length).toBe(2);
+ expect(lines.filter(line => line.match(/delete SSE session/)).length).toBe(2);
+
+ expect(lines.filter(line => line.match(/create context/)).length).toBe(2);
+ expect(lines.filter(line => line.match(/close context/)).length).toBe(2);
+
+ expect(lines.filter(line => line.match(/create browser context \(isolated\)/)).length).toBe(2);
+ expect(lines.filter(line => line.match(/close browser context \(isolated\)/)).length).toBe(2);
+
+ expect(lines.filter(line => line.match(/obtain browser \(isolated\)/)).length).toBe(2);
+ expect(lines.filter(line => line.match(/close browser \(isolated\)/)).length).toBe(2);
+ }).toPass();
+});
+
+test('sse transport browser lifecycle (isolated, multiclient)', async ({ serverEndpoint, server }) => {
+ const { url, stderr } = await serverEndpoint({ args: ['--isolated'] });
+
+ const transport1 = new SSEClientTransport(new URL('/sse', url));
+ const client1 = new Client({ name: 'test', version: '1.0.0' });
+ await client1.connect(transport1);
+ await client1.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+
+ const transport2 = new SSEClientTransport(new URL('/sse', url));
+ const client2 = new Client({ name: 'test', version: '1.0.0' });
+ await client2.connect(transport2);
+ await client2.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+ await client1.close();
+
+ const transport3 = new SSEClientTransport(new URL('/sse', url));
+ const client3 = new Client({ name: 'test', version: '1.0.0' });
+ await client3.connect(transport3);
+ await client3.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+
+ await client2.close();
+ await client3.close();
+
+ await expect(async () => {
+ const lines = stderr().split('\n');
+ expect(lines.filter(line => line.match(/create SSE session/)).length).toBe(3);
+ expect(lines.filter(line => line.match(/delete SSE session/)).length).toBe(3);
+
+ expect(lines.filter(line => line.match(/create context/)).length).toBe(3);
+ expect(lines.filter(line => line.match(/close context/)).length).toBe(3);
+
+ expect(lines.filter(line => line.match(/create browser context \(isolated\)/)).length).toBe(3);
+ expect(lines.filter(line => line.match(/close browser context \(isolated\)/)).length).toBe(3);
+
+ expect(lines.filter(line => line.match(/obtain browser \(isolated\)/)).length).toBe(1);
+ expect(lines.filter(line => line.match(/close browser \(isolated\)/)).length).toBe(1);
+ }).toPass();
+});
+
+test('sse transport browser lifecycle (persistent)', async ({ serverEndpoint, server }) => {
+ const { url, stderr } = await serverEndpoint();
+
+ const transport1 = new SSEClientTransport(new URL('/sse', url));
+ const client1 = new Client({ name: 'test', version: '1.0.0' });
+ await client1.connect(transport1);
+ await client1.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+ await client1.close();
+
+ const transport2 = new SSEClientTransport(new URL('/sse', url));
+ const client2 = new Client({ name: 'test', version: '1.0.0' });
+ await client2.connect(transport2);
+ await client2.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+ await client2.close();
+
+ await expect(async () => {
+ const lines = stderr().split('\n');
+ expect(lines.filter(line => line.match(/create SSE session/)).length).toBe(2);
+ expect(lines.filter(line => line.match(/delete SSE session/)).length).toBe(2);
+
+ expect(lines.filter(line => line.match(/create context/)).length).toBe(2);
+ expect(lines.filter(line => line.match(/close context/)).length).toBe(2);
+
+ expect(lines.filter(line => line.match(/create browser context \(persistent\)/)).length).toBe(2);
+ expect(lines.filter(line => line.match(/close browser context \(persistent\)/)).length).toBe(2);
+
+ expect(lines.filter(line => line.match(/lock user data dir/)).length).toBe(2);
+ expect(lines.filter(line => line.match(/release user data dir/)).length).toBe(2);
+ }).toPass();
+});
+
+test('sse transport browser lifecycle (persistent, multiclient)', async ({ serverEndpoint, server }) => {
+ const { url } = await serverEndpoint();
+
+ const transport1 = new SSEClientTransport(new URL('/sse', url));
+ const client1 = new Client({ name: 'test', version: '1.0.0' });
+ await client1.connect(transport1);
+ await client1.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+
+ const transport2 = new SSEClientTransport(new URL('/sse', url));
+ const client2 = new Client({ name: 'test', version: '1.0.0' });
+ await client2.connect(transport2);
+ const response = await client2.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+ expect(response.isError).toBe(true);
+ expect(response.content?.[0].text).toContain('use --isolated to run multiple instances of the same browser');
+
+ await client1.close();
+ await client2.close();
+});
diff --git a/tests/mcp/tabs.spec.ts b/tests/mcp/tabs.spec.ts
new file mode 100644
index 0000000000..a0b40d824b
--- /dev/null
+++ b/tests/mcp/tabs.spec.ts
@@ -0,0 +1,155 @@
+/**
+ * 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';
+
+import type { Client } from '@modelcontextprotocol/sdk/client/index.js';
+
+async function createTab(client: Client, title: string, body: string) {
+ await client.callTool({
+ name: 'browser_tabs',
+ arguments: {
+ action: 'new',
+ },
+ });
+ return await client.callTool({
+ name: 'browser_navigate',
+ arguments: {
+ url: `data:text/html,<title>${title}</title><body>${body}</body>`,
+ },
+ });
+}
+
+test('list initial tabs', async ({ client }) => {
+ expect(await client.callTool({
+ name: 'browser_tabs',
+ arguments: {
+ action: 'list',
+ },
+ })).toHaveResponse({
+ tabs: `- 0: (current) [] (about:blank)`,
+ });
+});
+
+test('list first tab', async ({ client }) => {
+ await createTab(client, 'Tab one', 'Body one');
+ expect(await client.callTool({
+ name: 'browser_tabs',
+ arguments: {
+ action: 'list',
+ },
+ })).toHaveResponse({
+ tabs: `- 0: [] (about:blank)
+- 1: (current) [Tab one] (data:text/html,<title>Tab one</title><body>Body one</body>)`,
+ });
+});
+
+test('create new tab', async ({ client }) => {
+ expect(await createTab(client, 'Tab one', 'Body one')).toHaveResponse({
+ tabs: `- 0: [] (about:blank)
+- 1: (current) [Tab one] (data:text/html,<title>Tab one</title><body>Body one</body>)`,
+ pageState: expect.stringContaining(`- Page URL: data:text/html,<title>Tab one</title><body>Body one</body>
+- Page Title: Tab one
+- Page Snapshot:
+\`\`\`yaml
+- generic [active] [ref=e1]: Body one
+\`\`\``),
+ });
+
+ expect(await createTab(client, 'Tab two', 'Body two')).toHaveResponse({
+ tabs: `- 0: [] (about:blank)
+- 1: [Tab one] (data:text/html,<title>Tab one</title><body>Body one</body>)
+- 2: (current) [Tab two] (data:text/html,<title>Tab two</title><body>Body two</body>)`,
+ pageState: expect.stringContaining(`- Page URL: data:text/html,<title>Tab two</title><body>Body two</body>
+- Page Title: Tab two
+- Page Snapshot:
+\`\`\`yaml
+- generic [active] [ref=e1]: Body two
+\`\`\``),
+ });
+});
+
+test('select tab', async ({ client }) => {
+ await createTab(client, 'Tab one', 'Body one');
+ await createTab(client, 'Tab two', 'Body two');
+
+ expect(await client.callTool({
+ name: 'browser_tabs',
+ arguments: {
+ action: 'select',
+ index: 1,
+ },
+ })).toHaveResponse({
+ tabs: `- 0: [] (about:blank)
+- 1: (current) [Tab one] (data:text/html,<title>Tab one</title><body>Body one</body>)
+- 2: [Tab two] (data:text/html,<title>Tab two</title><body>Body two</body>)`,
+ pageState: expect.stringContaining(`- Page URL: data:text/html,<title>Tab one</title><body>Body one</body>
+- Page Title: Tab one
+- Page Snapshot:
+\`\`\`yaml
+- generic [active] [ref=e1]: Body one
+\`\`\``),
+ });
+
+ expect(await client.callTool({
+ name: 'browser_tabs',
+ arguments: {
+ action: 'select',
+ index: 0,
+ },
+ })).toHaveResponse({
+ tabs: `- 0: (current) [] (about:blank)
+- 1: [Tab one] (data:text/html,<title>Tab one</title><body>Body one</body>)
+- 2: [Tab two] (data:text/html,<title>Tab two</title><body>Body two</body>)`,
+ pageState: expect.stringContaining(`- Page URL: about:blank`),
+ });
+});
+
+test('close tab', async ({ client }) => {
+ await createTab(client, 'Tab one', 'Body one');
+ await createTab(client, 'Tab two', 'Body two');
+
+ expect(await client.callTool({
+ name: 'browser_tabs',
+ arguments: {
+ action: 'close',
+ index: 2,
+ },
+ })).toHaveResponse({
+ tabs: `- 0: [] (about:blank)
+- 1: (current) [Tab one] (data:text/html,<title>Tab one</title><body>Body one</body>)`,
+ pageState: expect.stringContaining(`- Page URL: data:text/html,<title>Tab one</title><body>Body one</body>
+- Page Title: Tab one
+- Page Snapshot:
+\`\`\`yaml
+- generic [active] [ref=e1]: Body one
+\`\`\``),
+ });
+});
+
+test('reuse first tab when navigating', async ({ startClient, cdpServer, server }) => {
+ const browserContext = await cdpServer.start();
+ const pages = browserContext.pages();
+
+ const { client } = await startClient({ args: [`--cdp-endpoint=${cdpServer.endpoint}`] });
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ });
+
+ expect(pages.length).toBe(1);
+ expect(await pages[0].title()).toBe('Title');
+});
diff --git a/tests/mcp/trace.spec.ts b/tests/mcp/trace.spec.ts
new file mode 100644
index 0000000000..927f23a798
--- /dev/null
+++ b/tests/mcp/trace.spec.ts
@@ -0,0 +1,37 @@
+/**
+ * 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 fs from 'fs';
+
+import { test, expect } from './fixtures';
+
+test('check that trace is saved', async ({ startClient, server, mcpMode }, testInfo) => {
+ const outputDir = testInfo.outputPath('output');
+
+ const { client } = await startClient({
+ args: ['--save-trace', `--output-dir=${outputDir}`],
+ });
+
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.HELLO_WORLD },
+ })).toHaveResponse({
+ code: expect.stringContaining(`page.goto('http://localhost`),
+ });
+
+ const [file] = await fs.promises.readdir(outputDir);
+ expect(file).toContain('traces');
+});
diff --git a/tests/mcp/type.spec.ts b/tests/mcp/type.spec.ts
new file mode 100644
index 0000000000..7ac23141a3
--- /dev/null
+++ b/tests/mcp/type.spec.ts
@@ -0,0 +1,138 @@
+/**
+ * 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('browser_type', async ({ client, server }) => {
+ server.setContent('/', `
+ <!DOCTYPE html>
+ <html>
+ <input type='keypress' onkeypress="console.log('Key pressed:', event.key, ', Text:', event.target.value)"></input>
+ </html>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: {
+ url: server.PREFIX,
+ },
+ });
+
+ {
+ const response = await client.callTool({
+ name: 'browser_type',
+ arguments: {
+ element: 'textbox',
+ ref: 'e2',
+ text: 'Hi!',
+ submit: true,
+ },
+ });
+ expect(response).toHaveResponse({
+ code: `await page.getByRole('textbox').fill('Hi!');
+await page.getByRole('textbox').press('Enter');`,
+ pageState: expect.stringContaining(`- textbox`),
+ });
+ }
+
+ expect(await client.callTool({
+ name: 'browser_console_messages',
+ })).toHaveResponse({
+ result: expect.stringContaining(`[LOG] Key pressed: Enter , Text: Hi!`),
+ });
+});
+
+test('browser_type (slowly)', async ({ client, server }) => {
+ server.setContent('/', `
+ <input type='text' onkeydown="console.log('Key pressed:', event.key, 'Text:', event.target.value)"></input>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: {
+ url: server.PREFIX,
+ },
+ });
+ {
+ const response = await client.callTool({
+ name: 'browser_type',
+ arguments: {
+ element: 'textbox',
+ ref: 'e2',
+ text: 'Hi!',
+ slowly: true,
+ },
+ });
+
+ expect(response).toHaveResponse({
+ code: `await page.getByRole('textbox').pressSequentially('Hi!');`,
+ pageState: expect.stringContaining(`- textbox`),
+ });
+ }
+ const response = await client.callTool({
+ name: 'browser_console_messages',
+ });
+ expect(response).toHaveResponse({
+ result: expect.stringContaining(`[LOG] Key pressed: H Text: `),
+ });
+ expect(response).toHaveResponse({
+ result: expect.stringContaining(`[LOG] Key pressed: i Text: H`),
+ });
+ expect(response).toHaveResponse({
+ result: expect.stringContaining(`[LOG] Key pressed: ! Text: Hi`),
+ });
+});
+
+test('browser_type (no submit)', async ({ client, server }) => {
+ server.setContent('/', `
+ <input type='text' oninput="console.log('New value: ' + event.target.value)"></input>
+ `, 'text/html');
+
+ {
+ const response = await client.callTool({
+ name: 'browser_navigate',
+ arguments: {
+ url: server.PREFIX,
+ },
+ });
+ expect(response).toHaveResponse({
+ pageState: expect.stringContaining(`- textbox`),
+ });
+ }
+ {
+ const response = await client.callTool({
+ name: 'browser_type',
+ arguments: {
+ element: 'textbox',
+ ref: 'e2',
+ text: 'Hi!',
+ },
+ });
+ expect(response).toHaveResponse({
+ code: expect.stringContaining(`fill('Hi!')`),
+ // Should yield no snapshot.
+ pageState: expect.not.stringContaining(`- textbox`),
+ });
+ }
+ {
+ const response = await client.callTool({
+ name: 'browser_console_messages',
+ });
+ expect(response).toHaveResponse({
+ result: expect.stringContaining(`[LOG] New value: Hi!`),
+ });
+ }
+});
diff --git a/tests/mcp/verify.spec.ts b/tests/mcp/verify.spec.ts
new file mode 100644
index 0000000000..58c9b36d3d
--- /dev/null
+++ b/tests/mcp/verify.spec.ts
@@ -0,0 +1,522 @@
+/**
+ * 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.use({ mcpArgs: ['--caps=verify'] });
+
+test('browser_verify_element_visible', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Test Page</title>
+ <button>Submit</button>
+ <h1>Welcome</h1>
+ <div role="alert" aria-label="Success message"></div>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_verify_element_visible',
+ arguments: {
+ role: 'button',
+ accessibleName: 'Submit',
+ },
+ })).toHaveResponse({
+ result: 'Done',
+ code: `await expect(page.getByRole('button', { name: 'Submit' })).toBeVisible();`,
+ });
+
+ expect(await client.callTool({
+ name: 'browser_verify_element_visible',
+ arguments: {
+ role: 'heading',
+ accessibleName: 'Welcome',
+ },
+ })).toHaveResponse({
+ result: 'Done',
+ code: `await expect(page.getByRole('heading', { name: 'Welcome' })).toBeVisible();`,
+ });
+
+ expect(await client.callTool({
+ name: 'browser_verify_element_visible',
+ arguments: {
+ role: 'alert',
+ accessibleName: 'Success message',
+ },
+ })).toHaveResponse({
+ result: 'Done',
+ code: `await expect(page.getByRole('alert', { name: 'Success message' })).toBeVisible();`,
+ });
+});
+
+test('browser_verify_element_visible (not found)', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Test Page</title>
+ <button>Submit</button>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_verify_element_visible',
+ arguments: {
+ role: 'button',
+ accessibleName: 'Cancel',
+ },
+ })).toHaveResponse({
+ isError: true,
+ result: 'Element with role "button" and accessible name "Cancel" not found',
+ });
+});
+
+test('browser_verify_text_visible', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Test Page</title>
+ <p>Hello world</p>
+ <div>Welcome to our site</div>
+ <span>Status: Active</span>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_verify_text_visible',
+ arguments: {
+ text: 'Hello world',
+ },
+ })).toHaveResponse({
+ result: 'Done',
+ code: `await expect(page.getByText('Hello world')).toBeVisible();`,
+ });
+
+ expect(await client.callTool({
+ name: 'browser_verify_text_visible',
+ arguments: {
+ text: 'Welcome to our site',
+ },
+ })).toHaveResponse({
+ result: 'Done',
+ code: `await expect(page.getByText('Welcome to our site')).toBeVisible();`,
+ });
+
+ expect(await client.callTool({
+ name: 'browser_verify_text_visible',
+ arguments: {
+ text: 'Status: Active',
+ },
+ })).toHaveResponse({
+ result: 'Done',
+ code: `await expect(page.getByText('Status: Active')).toBeVisible();`,
+ });
+});
+
+test('browser_verify_text_visible (not found)', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Test Page</title>
+ <p>Hello world</p>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_verify_text_visible',
+ arguments: {
+ text: 'Goodbye world',
+ },
+ })).toHaveResponse({
+ isError: true,
+ result: 'Text not found',
+ });
+});
+
+test('browser_verify_text_visible (with quotes)', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Test Page</title>
+ <p>She said "Hello world"</p>
+ <div>It's a beautiful day</div>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_verify_text_visible',
+ arguments: {
+ text: 'She said "Hello world"',
+ },
+ })).toHaveResponse({
+ result: 'Done',
+ code: `await expect(page.getByText('She said "Hello world"')).toBeVisible();`,
+ });
+
+ expect(await client.callTool({
+ name: 'browser_verify_text_visible',
+ arguments: {
+ text: "It's a beautiful day",
+ },
+ })).toHaveResponse({
+ result: 'Done',
+ code: `await expect(page.getByText('It\\'s a beautiful day')).toBeVisible();`,
+ });
+});
+
+test('browser_verify_list_visible', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Test Page</title>
+ <ul>
+ <li>Apple</li>
+ <li>Banana</li>
+ <li>Cherry</li>
+ </ul>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_verify_list_visible',
+ arguments: {
+ element: 'Fruit list',
+ ref: 'e2',
+ items: ['Apple', 'Banana', 'Cherry'],
+ },
+ })).toHaveResponse({
+ result: 'Done',
+ code: expect.stringContaining(`await expect(page.locator('body')).toMatchAriaSnapshot(\`
+- list:
+ - listitem: "Apple"
+ - listitem: "Banana"
+ - listitem: "Cherry"
+\`);`),
+ });
+});
+
+test('browser_verify_list_visible (partial items)', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Test Page</title>
+ <ul>
+ <li>Apple</li>
+ <li>Banana</li>
+ <li>Cherry</li>
+ <li>Date</li>
+ </ul>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_verify_list_visible',
+ arguments: {
+ element: 'Fruit list',
+ ref: 'e2',
+ items: ['Apple', 'Cherry'],
+ },
+ })).toHaveResponse({
+ result: 'Done',
+ code: expect.stringContaining(`await expect(page.locator('body')).toMatchAriaSnapshot(\`
+- list:
+ - listitem: "Apple"
+ - listitem: "Cherry"
+\`);`),
+ });
+});
+
+test('browser_verify_list_visible (item not found)', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Test Page</title>
+ <ul>
+ <li>Apple</li>
+ <li>Banana</li>
+ </ul>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_verify_list_visible',
+ arguments: {
+ element: 'Fruit list',
+ ref: 'e2',
+ items: ['Apple', 'Cherry'],
+ },
+ })).toHaveResponse({
+ isError: true,
+ result: 'Item "Cherry" not found',
+ });
+});
+
+test('browser_verify_value (textbox)', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Test Page</title>
+ <form>
+ <input type="text" aria-label="Name" value="John Doe" />
+ <input type="email" aria-label="Email" value="[email protected]" />
+ </form>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_verify_value',
+ arguments: {
+ type: 'textbox',
+ element: 'Name textbox',
+ ref: 'e3',
+ value: 'John Doe',
+ },
+ })).toHaveResponse({
+ result: 'Done',
+ code: expect.stringContaining(`await expect(page.getByRole('textbox', { name: 'Name' })).toHaveValue('John Doe');`),
+ });
+
+ expect(await client.callTool({
+ name: 'browser_verify_value',
+ arguments: {
+ type: 'textbox',
+ element: 'Email textbox',
+ ref: 'e4',
+ value: '[email protected]',
+ },
+ })).toHaveResponse({
+ result: 'Done',
+ code: expect.stringContaining(`await expect(page.getByRole('textbox', { name: 'Email' })).toHaveValue('[email protected]');`),
+ });
+});
+
+test('browser_verify_value (textbox wrong value)', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Test Page</title>
+ <form>
+ <input type="text" name="name" value="John Doe" />
+ </form>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_verify_value',
+ arguments: {
+ type: 'textbox',
+ element: 'Name textbox',
+ ref: 'e3',
+ value: 'Jane Smith',
+ },
+ })).toHaveResponse({
+ isError: true,
+ result: 'Expected value "Jane Smith", but got "John Doe"',
+ });
+});
+
+test('browser_verify_value (checkbox checked)', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Test Page</title>
+ <form>
+ <input type="checkbox" name="subscribe" checked />
+ <label for="subscribe">Subscribe to newsletter</label>
+ </form>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_verify_value',
+ arguments: {
+ type: 'checkbox',
+ element: 'Subscribe checkbox',
+ ref: 'e3',
+ value: 'true',
+ },
+ })).toHaveResponse({
+ result: 'Done',
+ code: expect.stringContaining(`await expect(page.getByRole('checkbox')).toBeChecked();`),
+ });
+});
+
+test('browser_verify_value (checkbox unchecked)', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Test Page</title>
+ <form>
+ <input type="checkbox" name="subscribe" />
+ <label for="subscribe">Subscribe to newsletter</label>
+ </form>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_verify_value',
+ arguments: {
+ type: 'checkbox',
+ element: 'Subscribe checkbox',
+ ref: 'e3',
+ value: 'false',
+ },
+ })).toHaveResponse({
+ result: 'Done',
+ code: expect.stringContaining(`await expect(page.getByRole('checkbox')).not.toBeChecked();`),
+ });
+});
+
+test('browser_verify_value (checkbox wrong value)', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Test Page</title>
+ <form>
+ <input type="checkbox" name="subscribe" checked />
+ <label for="subscribe">Subscribe to newsletter</label>
+ </form>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_verify_value',
+ arguments: {
+ type: 'checkbox',
+ element: 'Subscribe checkbox',
+ ref: 'e3',
+ value: 'false',
+ },
+ })).toHaveResponse({
+ isError: true,
+ result: 'Expected value "false", but got "true"',
+ });
+});
+
+test('browser_verify_value (radio checked)', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Test Page</title>
+ <form>
+ <label for="red">Red</label>
+ <input id="red" type="radio" name="color" value="red" checked />
+ <label for="blue">Blue</label>
+ <input id="blue" type="radio" name="color" value="blue" />
+ </form>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_verify_value',
+ arguments: {
+ type: 'radio',
+ element: 'Color radio',
+ ref: 'e3',
+ value: 'true',
+ },
+ })).toHaveResponse({
+ result: 'Done',
+ code: expect.stringContaining(`await expect(page.getByRole('radio', { name: 'Red' })).toBeChecked();`),
+ });
+});
+
+test('browser_verify_value (slider)', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Test Page</title>
+ <form>
+ <input type="range" name="volume" min="0" max="100" value="75" />
+ <label>Volume</label>
+ </form>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_verify_value',
+ arguments: {
+ type: 'slider',
+ element: 'Volume slider',
+ ref: 'e3',
+ value: '75',
+ },
+ })).toHaveResponse({
+ result: 'Done',
+ code: expect.stringContaining(`await expect(page.getByRole('slider')).toHaveValue('75');`),
+ });
+});
+
+test('browser_verify_value (combobox)', async ({ client, server }) => {
+ server.setContent('/', `
+ <title>Test Page</title>
+ <form>
+ <select name="country">
+ <option>Choose a country</option>
+ <option selected>United States</option>
+ <option>United Kingdom</option>
+ </select>
+ </form>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_verify_value',
+ arguments: {
+ type: 'combobox',
+ element: 'Country select',
+ ref: 'e3',
+ value: 'United States',
+ },
+ })).toHaveResponse({
+ result: 'Done',
+ code: expect.stringContaining(`await expect(page.getByRole('combobox')).toHaveValue('United States');`),
+ });
+});
diff --git a/tests/mcp/wait.spec.ts b/tests/mcp/wait.spec.ts
new file mode 100644
index 0000000000..0388faf259
--- /dev/null
+++ b/tests/mcp/wait.spec.ts
@@ -0,0 +1,107 @@
+/**
+ * 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('browser_wait_for(text)', async ({ client, server }) => {
+ server.setContent('/', `
+ <script>
+ function update() {
+ setTimeout(() => {
+ document.querySelector('div').textContent = 'Text to appear';
+ }, 1000);
+ }
+ </script>
+ <body>
+ <button onclick="update()">Click me</button>
+ <div>Text to disappear</div>
+ </body>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'Click me',
+ ref: 'e2',
+ },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_wait_for',
+ arguments: { text: 'Text to appear' },
+ code: `await page.getByText("Text to appear").first().waitFor({ state: 'visible' });`,
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`- generic [ref=e3]: Text to appear`),
+ });
+});
+
+test('browser_wait_for(textGone)', async ({ client, server }) => {
+ server.setContent('/', `
+ <script>
+ function update() {
+ setTimeout(() => {
+ document.querySelector('div').textContent = 'Text to appear';
+ }, 1000);
+ }
+ </script>
+ <body>
+ <button onclick="update()">Click me</button>
+ <div>Text to disappear</div>
+ </body>
+ `, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ await client.callTool({
+ name: 'browser_click',
+ arguments: {
+ element: 'Click me',
+ ref: 'e2',
+ },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_wait_for',
+ arguments: { textGone: 'Text to disappear' },
+ code: `await page.getByText("Text to disappear").first().waitFor({ state: 'hidden' });`,
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`- generic [ref=e3]: Text to appear`),
+ });
+});
+
+test('browser_wait_for(time)', async ({ client, server }) => {
+ server.setContent('/', `<body><div>Hello World</div></body>`, 'text/html');
+
+ await client.callTool({
+ name: 'browser_navigate',
+ arguments: { url: server.PREFIX },
+ });
+
+ expect(await client.callTool({
+ name: 'browser_wait_for',
+ arguments: { time: 1 },
+ })).toHaveResponse({
+ code: `await new Promise(f => setTimeout(f, 1 * 1000));`,
+ });
+});
diff --git a/tests/mcp/webdriver.spec.ts b/tests/mcp/webdriver.spec.ts
new file mode 100644
index 0000000000..9467056f9e
--- /dev/null
+++ b/tests/mcp/webdriver.spec.ts
@@ -0,0 +1,40 @@
+/**
+ * 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('do not falsely advertise user agent as a test driver', async ({ client, server, mcpBrowser }) => {
+ test.skip(mcpBrowser === 'firefox');
+ test.skip(mcpBrowser === 'webkit');
+ server.setRoute('/', (req, res) => {
+ res.writeHead(200, { 'Content-Type': 'text/html' });
+ res.end(`
+ <body></body>
+ <script>
+ document.body.textContent = 'webdriver: ' + navigator.webdriver;
+ </script>
+ `);
+ });
+
+ expect(await client.callTool({
+ name: 'browser_navigate',
+ arguments: {
+ url: server.PREFIX,
+ },
+ })).toHaveResponse({
+ pageState: expect.stringContaining(`webdriver: false`),
+ });
+});
diff --git a/tsconfig.json b/tsconfig.json
index 1fb09a13a0..9f66b9c212 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -36,5 +36,6 @@
"exclude": [
"packages/*/lib",
"packages/html-reporter/",
+ "packages/mcp-extension/",
]
}