@capyclaw/browser-suite 0.2.36 → 0.2.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/composition.lock.json +3 -3
  2. package/contract/browser-contract.json +1 -1
  3. package/dsh-suite.json +5 -5
  4. package/node_modules/@capyclaw/asset-service/src/index.mjs +86 -5
  5. package/node_modules/@capyclaw/browser-skill-api/contract/browser-contract.json +1 -1
  6. package/node_modules/@capyclaw/browser-skill-api/skills/browser-api/references/tool-contract.md +1 -1
  7. package/node_modules/@capyclaw/browser-skill-browser/contract/browser-contract.json +1 -1
  8. package/node_modules/@capyclaw/browser-skill-ops/contract/browser-contract.json +1 -1
  9. package/node_modules/@capyclaw/browser-workbench/contract/browser-contract.json +1 -1
  10. package/node_modules/@capyclaw/browser-workbench/package.json +1 -1
  11. package/node_modules/@capyclaw/browser-workbench/server/contract.mjs +1 -1
  12. package/node_modules/@capyclaw/browser-workbench/server/session-engines.mjs +39 -0
  13. package/node_modules/@capyclaw/document-workbench/src/session/context.mjs +17 -5
  14. package/node_modules/@capyclaw/foundation/lib/adapters/raw.mjs +11 -10
  15. package/node_modules/@capyclaw/foundation/lib/adapters/runtime-driver.mjs +8 -1
  16. package/node_modules/@capyclaw/foundation/lib/skill/scan.mjs +31 -3
  17. package/node_modules/@capyclaw/plugin-kit/src/service/mcp-http.mjs +13 -6
  18. package/node_modules/@capyclaw/plugin-kit/src/tools/result.mjs +31 -15
  19. package/node_modules/@capyclaw/tool-host/src/descriptors.mjs +28 -4
  20. package/node_modules/@capyclaw/tool-host/src/index.mjs +32 -6
  21. package/package.json +5 -6
  22. package/node_modules/playwright/LICENSE +0 -202
  23. package/node_modules/playwright/NOTICE +0 -5
  24. package/node_modules/playwright/README.md +0 -318
  25. package/node_modules/playwright/ThirdPartyNotices.txt +0 -14
  26. package/node_modules/playwright/cli.js +0 -19
  27. package/node_modules/playwright/index.d.ts +0 -17
  28. package/node_modules/playwright/index.js +0 -17
  29. package/node_modules/playwright/index.mjs +0 -18
  30. package/node_modules/playwright/lib/agents/agentParser.js +0 -89
  31. package/node_modules/playwright/lib/agents/copilot-setup-steps.yml +0 -34
  32. package/node_modules/playwright/lib/agents/generateAgents.js +0 -395
  33. package/node_modules/playwright/lib/agents/playwright-test-coverage.prompt.md +0 -31
  34. package/node_modules/playwright/lib/agents/playwright-test-generate.prompt.md +0 -8
  35. package/node_modules/playwright/lib/agents/playwright-test-generator.agent.md +0 -88
  36. package/node_modules/playwright/lib/agents/playwright-test-heal.prompt.md +0 -6
  37. package/node_modules/playwright/lib/agents/playwright-test-healer.agent.md +0 -56
  38. package/node_modules/playwright/lib/agents/playwright-test-plan.prompt.md +0 -9
  39. package/node_modules/playwright/lib/agents/playwright-test-planner.agent.md +0 -74
  40. package/node_modules/playwright/lib/cli/reportActions.js +0 -78
  41. package/node_modules/playwright/lib/cli/testActions.js +0 -217
  42. package/node_modules/playwright/lib/common/index.js +0 -2937
  43. package/node_modules/playwright/lib/common/index.js.txt +0 -33
  44. package/node_modules/playwright/lib/errorContext.js +0 -129
  45. package/node_modules/playwright/lib/globals.js +0 -58
  46. package/node_modules/playwright/lib/index.js +0 -827
  47. package/node_modules/playwright/lib/isomorphic.js +0 -260
  48. package/node_modules/playwright/lib/isomorphic.js.txt +0 -9
  49. package/node_modules/playwright/lib/loader/loaderProcessEntry.js +0 -34
  50. package/node_modules/playwright/lib/loader/loaderProcessEntry.js.txt +0 -9
  51. package/node_modules/playwright/lib/matchers/expect.js +0 -13496
  52. package/node_modules/playwright/lib/matchers/expect.js.LICENSE +0 -640
  53. package/node_modules/playwright/lib/matchers/expect.js.txt +0 -67
  54. package/node_modules/playwright/lib/package.js +0 -47
  55. package/node_modules/playwright/lib/program.js +0 -242
  56. package/node_modules/playwright/lib/runner/index.js +0 -8721
  57. package/node_modules/playwright/lib/runner/index.js.txt +0 -62
  58. package/node_modules/playwright/lib/transform/babelBundle.js +0 -72490
  59. package/node_modules/playwright/lib/transform/babelBundle.js.LICENSE +0 -2384
  60. package/node_modules/playwright/lib/transform/babelBundle.js.txt +0 -328
  61. package/node_modules/playwright/lib/transform/esmLoader.js +0 -8066
  62. package/node_modules/playwright/lib/transform/esmLoader.js.LICENSE +0 -355
  63. package/node_modules/playwright/lib/transform/esmLoader.js.txt +0 -60
  64. package/node_modules/playwright/lib/util.js +0 -373
  65. package/node_modules/playwright/lib/worker/workerProcessEntry.js +0 -1860
  66. package/node_modules/playwright/lib/worker/workerProcessEntry.js.txt +0 -19
  67. package/node_modules/playwright/package.json +0 -50
  68. package/node_modules/playwright/test.d.ts +0 -18
  69. package/node_modules/playwright/test.js +0 -24
  70. package/node_modules/playwright/test.mjs +0 -35
  71. package/node_modules/playwright/types/test.d.ts +0 -11191
  72. package/node_modules/playwright/types/testReporter.d.ts +0 -950
  73. package/node_modules/playwright-core/LICENSE +0 -202
  74. package/node_modules/playwright-core/NOTICE +0 -5
  75. package/node_modules/playwright-core/README.md +0 -3
  76. package/node_modules/playwright-core/ThirdPartyNotices.txt +0 -13
  77. package/node_modules/playwright-core/bin/install_media_pack.ps1 +0 -5
  78. package/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +0 -33
  79. package/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +0 -42
  80. package/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +0 -13
  81. package/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +0 -24
  82. package/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +0 -42
  83. package/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +0 -12
  84. package/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +0 -24
  85. package/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +0 -48
  86. package/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +0 -11
  87. package/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +0 -23
  88. package/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +0 -48
  89. package/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +0 -11
  90. package/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +0 -23
  91. package/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +0 -48
  92. package/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +0 -11
  93. package/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +0 -24
  94. package/node_modules/playwright-core/browsers.json +0 -52
  95. package/node_modules/playwright-core/cli.js +0 -22
  96. package/node_modules/playwright-core/index.d.ts +0 -17
  97. package/node_modules/playwright-core/index.js +0 -17
  98. package/node_modules/playwright-core/index.mjs +0 -28
  99. package/node_modules/playwright-core/lib/bootstrap.js +0 -149
  100. package/node_modules/playwright-core/lib/coreBundle.js +0 -78041
  101. package/node_modules/playwright-core/lib/entry/cliDaemon.js +0 -5
  102. package/node_modules/playwright-core/lib/entry/dashboardApp.js +0 -3
  103. package/node_modules/playwright-core/lib/entry/mcp.js +0 -10
  104. package/node_modules/playwright-core/lib/entry/oopBrowserDownload.js +0 -3
  105. package/node_modules/playwright-core/lib/package.js +0 -50
  106. package/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
  107. package/node_modules/playwright-core/lib/server/electron/loader.js +0 -123
  108. package/node_modules/playwright-core/lib/serverRegistry.js +0 -1939
  109. package/node_modules/playwright-core/lib/serverRegistry.js.LICENSE +0 -65
  110. package/node_modules/playwright-core/lib/tools/cli-client/channelSessions.js +0 -141
  111. package/node_modules/playwright-core/lib/tools/cli-client/cli.js +0 -7
  112. package/node_modules/playwright-core/lib/tools/cli-client/help.json +0 -808
  113. package/node_modules/playwright-core/lib/tools/cli-client/minimist.js +0 -128
  114. package/node_modules/playwright-core/lib/tools/cli-client/output.js +0 -352
  115. package/node_modules/playwright-core/lib/tools/cli-client/program.js +0 -422
  116. package/node_modules/playwright-core/lib/tools/cli-client/registry.js +0 -180
  117. package/node_modules/playwright-core/lib/tools/cli-client/session.js +0 -261
  118. package/node_modules/playwright-core/lib/tools/dashboard/appIcon.png +0 -0
  119. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/SKILL.md +0 -493
  120. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/element-attributes.md +0 -23
  121. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/playwright-tests.md +0 -39
  122. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/pr-attachments.md +0 -60
  123. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/request-mocking.md +0 -87
  124. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/running-code.md +0 -245
  125. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/session-management.md +0 -227
  126. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/storage-state.md +0 -275
  127. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/test-generation.md +0 -433
  128. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/tracing.md +0 -139
  129. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/video-recording.md +0 -216
  130. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/SKILL.md +0 -136
  131. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/gallery-spec.md +0 -144
  132. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/migration.md +0 -89
  133. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/react.md +0 -69
  134. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/typing.md +0 -173
  135. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/vue.md +0 -77
  136. package/node_modules/playwright-core/lib/tools/skills/playwright-trace/SKILL.md +0 -174
  137. package/node_modules/playwright-core/lib/tools/utils/extension.js +0 -112
  138. package/node_modules/playwright-core/lib/tools/utils/socketConnection.js +0 -108
  139. package/node_modules/playwright-core/lib/utilsBundle.js +0 -86078
  140. package/node_modules/playwright-core/lib/utilsBundle.js.LICENSE +0 -1890
  141. package/node_modules/playwright-core/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +0 -1
  142. package/node_modules/playwright-core/lib/vite/dashboard/assets/codeMirrorModule-CQ8RZGBm.js +0 -32
  143. package/node_modules/playwright-core/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
  144. package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +0 -1
  145. package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +0 -1
  146. package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +0 -1
  147. package/node_modules/playwright-core/lib/vite/dashboard/assets/index-AwgwcYie.css +0 -1
  148. package/node_modules/playwright-core/lib/vite/dashboard/assets/index-hRvO4yU2.js +0 -12
  149. package/node_modules/playwright-core/lib/vite/dashboard/assets/safari-na3_-uQk.svg +0 -1
  150. package/node_modules/playwright-core/lib/vite/dashboard/index.html +0 -29
  151. package/node_modules/playwright-core/lib/vite/dashboard/playwright-logo.svg +0 -24
  152. package/node_modules/playwright-core/lib/vite/htmlReport/index.html +0 -16
  153. package/node_modules/playwright-core/lib/vite/htmlReport/report.css +0 -2
  154. package/node_modules/playwright-core/lib/vite/htmlReport/report.js +0 -32
  155. package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +0 -1
  156. package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-DK72OMRi.js +0 -32
  157. package/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
  158. package/node_modules/playwright-core/lib/vite/recorder/assets/index-BZpYJZ-P.css +0 -1
  159. package/node_modules/playwright-core/lib/vite/recorder/assets/index-Cn0mmDuv.js +0 -129
  160. package/node_modules/playwright-core/lib/vite/recorder/index.html +0 -29
  161. package/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +0 -9
  162. package/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-BEB2e8M3.js +0 -32
  163. package/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-D-g2vrvf.js +0 -184
  164. package/node_modules/playwright-core/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +0 -1
  165. package/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-B794rD2Z.js +0 -7
  166. package/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +0 -1
  167. package/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
  168. package/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.C8BeHuxd.css +0 -1
  169. package/node_modules/playwright-core/lib/vite/traceViewer/index.B_TqY17P.css +0 -1
  170. package/node_modules/playwright-core/lib/vite/traceViewer/index.html +0 -44
  171. package/node_modules/playwright-core/lib/vite/traceViewer/index.oNry3Hjv.js +0 -1
  172. package/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +0 -16
  173. package/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +0 -9
  174. package/node_modules/playwright-core/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +0 -1
  175. package/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +0 -10
  176. package/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +0 -4
  177. package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CYwC_gH1.js +0 -5
  178. package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CyMfwkXJ.css +0 -1
  179. package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +0 -18
  180. package/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +0 -1
  181. package/node_modules/playwright-core/lib/webp_codec.LICENSE +0 -173
  182. package/node_modules/playwright-core/lib/webp_codec.wasm +0 -0
  183. package/node_modules/playwright-core/lib/xdg-open +0 -1267
  184. package/node_modules/playwright-core/package.json +0 -34
  185. package/node_modules/playwright-core/types/protocol.d.ts +0 -24776
  186. package/node_modules/playwright-core/types/structs.d.ts +0 -52
  187. package/node_modules/playwright-core/types/types.d.ts +0 -27167
@@ -1,67 +0,0 @@
1
- # packages/playwright/lib/matchers/expect.js
2
- # total: 534.4 KB
3
-
4
- ## Inlined (59)
5
- 7.9 KB node_modules/@babel/code-frame/lib/index.js
6
- 12.6 KB node_modules/@babel/helper-validator-identifier/lib/identifier.js
7
- 1.6 KB node_modules/@babel/helper-validator-identifier/lib/index.js
8
- 1.7 KB node_modules/@babel/helper-validator-identifier/lib/keyword.js
9
- 15.9 KB node_modules/@jest/diff-sequences/build/index.js
10
- 24.6 KB node_modules/@jest/expect-utils/build/index.js
11
- 0.8 KB node_modules/@jest/expect-utils/build/index.mjs
12
- 1.8 KB node_modules/@jest/get-type/build/index.js
13
- 4.8 KB node_modules/ansi-styles/index.js
14
- 5.8 KB node_modules/chalk/source/index.js
15
- 3.9 KB node_modules/chalk/source/templates.js
16
- 1.3 KB node_modules/chalk/source/util.js
17
- 2.5 KB node_modules/ci-info/index.js
18
- 7.5 KB node_modules/ci-info/vendors.json
19
- 18.7 KB node_modules/color-convert/conversions.js
20
- 1.8 KB node_modules/color-convert/index.js
21
- 2.1 KB node_modules/color-convert/route.js
22
- 5.2 KB node_modules/color-name/index.js
23
- 0.7 KB node_modules/graceful-fs/clone.js
24
- 12.2 KB node_modules/graceful-fs/graceful-fs.js
25
- 2.9 KB node_modules/graceful-fs/legacy-streams.js
26
- 9.2 KB node_modules/graceful-fs/polyfills.js
27
- 0.4 KB node_modules/has-flag/index.js
28
- 51.0 KB node_modules/jest-diff/build/index.js
29
- 24.9 KB node_modules/jest-matcher-utils/build/index.js
30
- 2.7 KB node_modules/jest-matcher-utils/build/index.mjs
31
- 15.3 KB node_modules/jest-message-util/build/index.js
32
- 0.5 KB node_modules/jest-message-util/build/index.mjs
33
- 40.6 KB node_modules/jest-util/build/index.js
34
- 1.4 KB node_modules/js-tokens/index.js
35
- 3.1 KB node_modules/picocolors/picocolors.js
36
- 0.5 KB node_modules/picomatch/index.js
37
- 5.3 KB node_modules/picomatch/lib/constants.js
38
- 33.6 KB node_modules/picomatch/lib/parse.js
39
- 5.2 KB node_modules/picomatch/lib/picomatch.js
40
- 9.5 KB node_modules/picomatch/lib/scan.js
41
- 2.3 KB node_modules/picomatch/lib/utils.js
42
- 42.0 KB node_modules/pretty-format/build/index.js
43
- 4.4 KB node_modules/pretty-format/node_modules/ansi-styles/index.js
44
- 7.9 KB node_modules/react-is-18/cjs/react-is.development.js
45
- 3.5 KB node_modules/react-is-18/cjs/react-is.production.min.js
46
- 0.3 KB node_modules/react-is-18/index.js
47
- 4.9 KB node_modules/react-is-19/cjs/react-is.development.js
48
- 4.7 KB node_modules/react-is-19/cjs/react-is.production.js
49
- 0.3 KB node_modules/react-is-19/index.js
50
- 0.4 KB node_modules/slash/index.js
51
- 7.6 KB node_modules/stack-utils/index.js
52
- 0.4 KB node_modules/stack-utils/node_modules/escape-string-regexp/index.js
53
- 3.1 KB node_modules/supports-color/index.js
54
- 10.3 KB packages/playwright/src/matchers/expect.ts
55
- 45.3 KB packages/playwright/src/matchers/expectLibrary.ts
56
- 3.3 KB packages/playwright/src/matchers/matcherHint.ts
57
- 17.4 KB packages/playwright/src/matchers/matchers.ts
58
- 1.3 KB packages/playwright/src/matchers/toBeTruthy.ts
59
- 2.1 KB packages/playwright/src/matchers/toEqual.ts
60
- 2.9 KB packages/playwright/src/matchers/toHaveURL.ts
61
- 5.9 KB packages/playwright/src/matchers/toMatchAriaSnapshot.ts
62
- 15.4 KB packages/playwright/src/matchers/toMatchSnapshot.ts
63
- 3.0 KB packages/playwright/src/matchers/toMatchText.ts
64
-
65
- ## External (2)
66
- playwright-core/lib/coreBundle
67
- playwright-core/lib/utilsBundle
@@ -1,47 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var package_exports = {};
30
- __export(package_exports, {
31
- libPath: () => libPath,
32
- packageJSON: () => packageJSON,
33
- packageRoot: () => packageRoot
34
- });
35
- module.exports = __toCommonJS(package_exports);
36
- var import_path = __toESM(require("path"));
37
- const packageRoot = import_path.default.join(__dirname, "..");
38
- const packageJSON = require(import_path.default.join(packageRoot, "package.json"));
39
- function libPath(...parts) {
40
- return import_path.default.join(packageRoot, "lib", ...parts);
41
- }
42
- // Annotate the CommonJS export names for ESM import in node:
43
- 0 && (module.exports = {
44
- libPath,
45
- packageJSON,
46
- packageRoot
47
- });
@@ -1,242 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var program_exports = {};
20
- __export(program_exports, {
21
- program: () => program
22
- });
23
- module.exports = __toCommonJS(program_exports);
24
- var import_bootstrap = require("playwright-core/lib/bootstrap");
25
- var import_coreBundle = require("playwright-core/lib/coreBundle");
26
- var import_common = require("./common");
27
- var import_testActions = require("./cli/testActions");
28
- var import_reportActions = require("./cli/reportActions");
29
- var import_testBackend = require("./mcp/test/testBackend");
30
- var import_generateAgents = require("./agents/generateAgents");
31
- var import_package = require("./package");
32
- const { program } = require("playwright-core/lib/utilsBundle");
33
- const { setBoxedStackPrefixes } = require("playwright-core/lib/coreBundle").utils;
34
- const { gracefullyProcessExitDoNotHang } = require("playwright-core/lib/coreBundle").utils;
35
- setBoxedStackPrefixes([import_package.packageRoot]);
36
- import_coreBundle.libCli.decorateProgram(program);
37
- function addTestCommand(program2) {
38
- const command = program2.command("test [test-filter...]");
39
- command.description("run tests with Playwright Test");
40
- const options = testOptions.sort((a, b) => a[0].replace(/-/g, "").localeCompare(b[0].replace(/-/g, "")));
41
- options.forEach(([name, { description, choices, preset }]) => {
42
- const option = command.createOption(name, description);
43
- if (choices)
44
- option.choices(choices);
45
- if (preset)
46
- option.preset(preset);
47
- command.addOption(option);
48
- return command;
49
- });
50
- command.action(async (args, opts) => {
51
- const dashDashIndex = process.argv.indexOf("--");
52
- const postDashCount = dashDashIndex >= 0 ? process.argv.length - 1 - dashDashIndex : 0;
53
- const testFilters = args.slice(0, args.length - postDashCount);
54
- try {
55
- await (0, import_testActions.runTests)(testFilters, opts);
56
- } catch (e) {
57
- console.error(e);
58
- gracefullyProcessExitDoNotHang(1);
59
- }
60
- });
61
- command.addHelpText("afterAll", `
62
- Arguments [test-filter...]:
63
- Pass arguments to filter test files. Each argument is treated as a regular expression. Matching is performed against the absolute file paths.
64
-
65
- Examples:
66
- $ npx playwright test my.spec.ts
67
- $ npx playwright test some.spec.ts:42
68
- $ npx playwright test --headed
69
- $ npx playwright test --project=webkit`);
70
- }
71
- function addClearCacheCommand(program2) {
72
- const command = program2.command("clear-cache");
73
- command.description("clears build and test caches");
74
- command.option("-c, --config <file>", `Configuration file, or a test directory with optional "playwright.config.{m,c}?{js,ts}"`);
75
- command.action(async (opts) => {
76
- await (0, import_testActions.clearCache)(opts);
77
- });
78
- }
79
- function addTestServerCommand(program2) {
80
- const command = program2.command("test-server", { hidden: true });
81
- command.description("start test server");
82
- command.option("-c, --config <file>", `Configuration file, or a test directory with optional "playwright.config.{m,c}?{js,ts}"`);
83
- command.option("--host <host>", "Host to start the server on", "localhost");
84
- command.option("--port <port>", "Port to start the server on", "0");
85
- command.action(async (opts) => {
86
- await (0, import_testActions.runTestServerAction)(opts);
87
- });
88
- }
89
- function addShowReportCommand(program2) {
90
- const command = program2.command("show-report [report]");
91
- command.description("show HTML report");
92
- command.action(async (report, options) => {
93
- await (0, import_reportActions.showReport)(report, options.host, +options.port);
94
- });
95
- command.option("--host <host>", "Host to serve report on", "localhost");
96
- command.option("--port <port>", "Port to serve report on", "9323");
97
- command.addHelpText("afterAll", `
98
- Arguments [report]:
99
- When specified, opens given report, otherwise opens last generated report.
100
- Accepts a directory or a .zip archive whose top-level entry is "index.html" (e.g. one downloaded from a CI artifact).
101
-
102
- Examples:
103
- $ npx playwright show-report
104
- $ npx playwright show-report playwright-report
105
- $ npx playwright show-report playwright-report.zip`);
106
- }
107
- function addMergeReportsCommand(program2) {
108
- const command = program2.command("merge-reports [dir]");
109
- command.description("merge multiple blob reports (for sharded tests) into a single report");
110
- command.action(async (dir, options) => {
111
- try {
112
- await (0, import_reportActions.mergeReports)(dir, options);
113
- } catch (e) {
114
- console.error(e);
115
- gracefullyProcessExitDoNotHang(1);
116
- }
117
- });
118
- command.option("-c, --config <file>", `Configuration file. Can be used to specify additional configuration for the output report.`);
119
- command.option("--reporter <reporter>", `Reporter to use, comma-separated, can be ${import_common.builtInReporters.map((name) => `"${name}"`).join(", ")} (default: "${import_common.config.defaultReporter}")`);
120
- command.addHelpText("afterAll", `
121
- Arguments [dir]:
122
- Directory containing blob reports.
123
-
124
- Examples:
125
- $ npx playwright merge-reports playwright-report`);
126
- }
127
- function addTestMCPServerCommand(program2) {
128
- const command = program2.command("run-test-mcp-server", { hidden: true });
129
- command.description("Interact with the test runner over MCP");
130
- command.option("--headless", "run browser in headless mode, headed by default");
131
- command.option("-c, --config <file>", `Configuration file, or a test directory with optional "playwright.config.{m,c}?{js,ts}"`);
132
- command.option("--host <host>", "host to bind server to. Default is localhost. Use 0.0.0.0 to bind to all interfaces.");
133
- command.option("--port <port>", "port to listen on for SSE transport.");
134
- command.action(async (options) => {
135
- import_coreBundle.tools.setupExitWatchdog();
136
- const factory = {
137
- name: "Playwright Test Runner",
138
- nameInConfig: "playwright-test-runner",
139
- version: import_package.packageJSON.version,
140
- toolSchemas: import_testBackend.testServerBackendTools.map((tool) => tool.schema),
141
- create: async () => new import_testBackend.TestServerBackend(options.config, { muteConsole: options.port === void 0, headless: options.headless })
142
- };
143
- await import_coreBundle.tools.start(factory, { port: options.port === void 0 ? void 0 : +options.port, host: options.host });
144
- });
145
- }
146
- function addInitAgentsCommand(program2) {
147
- const command = program2.command("init-agents");
148
- command.description("Initialize repository agents");
149
- const option = command.createOption("--loop <loop>", "Agentic loop provider");
150
- option.choices(["claude", "codex", "copilot", "opencode", "vscode", "vscode-legacy"]);
151
- command.addOption(option);
152
- command.option("-c, --config <file>", `Configuration file to find a project to use for seed test`);
153
- command.option("--project <project>", "Project to use for seed test");
154
- command.option("--prompts", "Whether to include prompts in the agent initialization");
155
- command.action(async (opts) => {
156
- const loadedConfig = await import_common.configLoader.loadConfigFromFile(opts.config);
157
- if (opts.loop === "opencode") {
158
- await import_generateAgents.OpencodeGenerator.init(loadedConfig, opts.project, opts.prompts);
159
- } else if (opts.loop === "vscode-legacy") {
160
- await import_generateAgents.VSCodeGenerator.init(loadedConfig, opts.project);
161
- } else if (opts.loop === "claude") {
162
- await import_generateAgents.ClaudeGenerator.init(loadedConfig, opts.project, opts.prompts);
163
- } else if (opts.loop === "codex") {
164
- await import_generateAgents.CodexGenerator.init(loadedConfig, opts.project, opts.prompts);
165
- } else {
166
- await import_generateAgents.CopilotGenerator.init(loadedConfig, opts.project, opts.prompts);
167
- return;
168
- }
169
- });
170
- }
171
- function addInitSkillsCommand(program2) {
172
- const command = program2.command("init-skills");
173
- command.description("Install Playwright agent skills");
174
- const option = command.createOption("--loop <loop>", "Agentic loop provider");
175
- option.choices(["claude", "agents"]);
176
- option.default("claude");
177
- command.addOption(option);
178
- command.action(async (opts) => {
179
- try {
180
- await import_coreBundle.tools.installSkills(import_coreBundle.tools.allSkills, opts.loop);
181
- } catch (e) {
182
- console.error(e);
183
- gracefullyProcessExitDoNotHang(1);
184
- }
185
- });
186
- }
187
- const kTraceModes = ["on", "off", "on-first-retry", "on-all-retries", "retain-on-failure", "retain-on-first-failure", "retain-on-failure-and-retries"];
188
- const testOptions = [
189
- ["--add-reporter <reporter>", { description: `Reporter to add on top of the configured reporters, comma-separated, can be ${import_common.builtInReporters.map((name) => `"${name}"`).join(", ")} or a path to a reporter module` }],
190
- /* deprecated */
191
- ["--browser <browser>", { description: `Browser to use for tests, one of "all", "chromium", "firefox" or "webkit" (default: "chromium")` }],
192
- ["-c, --config <file>", { description: `Configuration file, or a test directory with optional "playwright.config.{m,c}?{js,ts}"` }],
193
- ["--debug [mode]", { description: `Run tests with Playwright Inspector. Shortcut for "PWDEBUG=1" environment variable and "--timeout=0 --max-failures=1 --headed --workers=1" options`, choices: ["inspector", "cli"], preset: "inspector" }],
194
- ["--fail-on-flaky-tests", { description: `Fail if any test is flagged as flaky (default: false)` }],
195
- ["--forbid-only", { description: `Fail if test.only is called (default: false)` }],
196
- ["--fully-parallel", { description: `Run all tests in parallel (default: false)` }],
197
- ["--global-timeout <timeout>", { description: `Maximum time this test suite can run in milliseconds (default: unlimited)` }],
198
- ["-g, --grep <grep>", { description: `Only run tests matching this regular expression (default: ".*")` }],
199
- ["-G, --grep-invert <grep>", { description: `Only run tests that do not match this regular expression` }],
200
- ["--headed", { description: `Run tests in headed browsers (default: headless)` }],
201
- ["--ignore-snapshots", { description: `Ignore screenshot and snapshot expectations` }],
202
- ["--last-failed", { description: `Only re-run the failures` }],
203
- ["--last-failed-file <file>", { description: `Override the default path for the last-run JSON file used with --last-failed (default: <outputDir>/.last-run.json). Same as PLAYWRIGHT_LAST_RUN_OUTPUT_FILE environment variable.` }],
204
- ["--list", { description: `Collect all the tests and report them, but do not run` }],
205
- ["--max-failures <N>", { description: `Stop after the first N failures` }],
206
- ["--no-deps", { description: `Do not run project dependencies` }],
207
- ["--output <dir>", { description: `Folder for output artifacts (default: "test-results")` }],
208
- ["--only-changed [ref]", { description: `Only run test files that have been changed between 'HEAD' and 'ref'. Defaults to running all uncommitted changes. Only supports Git.` }],
209
- ["--pass-with-no-tests", { description: `Makes test run succeed even if no tests were found` }],
210
- ["--project <project-name...>", { description: `Only run tests from the specified list of projects, supports '*' wildcard (default: run all projects)` }],
211
- ["--quiet", { description: `Suppress stdio` }],
212
- ["--repeat-each <N>", { description: `Run each test N times (default: 1)` }],
213
- ["--reporter <reporter>", { description: `Reporter to use, comma-separated, can be ${import_common.builtInReporters.map((name) => `"${name}"`).join(", ")} (default: "${import_common.config.defaultReporter}")` }],
214
- ["--retries <retries>", { description: `Maximum retry count for flaky tests, zero for no retries (default: no retries)` }],
215
- ["--run-agents <mode>", { description: `Run agents to generate the code for page.perform`, choices: ["missing", "all", "none"], preset: "none" }],
216
- ["--shard <shard>", { description: `Shard tests and execute only the selected shard, specify in the form "current/all", 1-based, for example "3/5"` }],
217
- ["--test-list <file>", { description: `Path to a file containing a list of tests to run. See https://playwright.dev/docs/test-cli for more details.` }],
218
- ["--test-list-invert <file>", { description: `Path to a file containing a list of tests to skip. See https://playwright.dev/docs/test-cli for more details.` }],
219
- ["--shuffle [seed]", { description: `Schedule test files, and tests in parallel mode, in a random order; pass a seed to reproduce a previous order` }],
220
- ["--timeout <timeout>", { description: `Specify test timeout threshold in milliseconds, zero for unlimited (default: ${import_common.config.defaultTimeout})` }],
221
- ["--trace <mode>", { description: `Force tracing mode`, choices: kTraceModes }],
222
- ["--tsconfig <path>", { description: `Path to a single tsconfig applicable to all imported files (default: look up tsconfig for each imported file separately)` }],
223
- ["--ui", { description: `Run tests in interactive UI mode` }],
224
- ["--ui-host <host>", { description: `Host to serve UI on; specifying this option opens UI in a browser tab` }],
225
- ["--ui-port <port>", { description: `Port to serve UI on, 0 for any free port; specifying this option opens UI in a browser tab` }],
226
- ["-u, --update-snapshots [mode]", { description: `Update snapshots with actual results. Running tests without the flag defaults to "default"`, choices: ["all", "changed", "missing", "none", "default"], preset: "changed" }],
227
- ["--update-source-method <method>", { description: `Chooses the way source is updated (default: "patch")`, choices: ["overwrite", "3way", "patch"] }],
228
- ["-j, --workers <workers>", { description: `Number of concurrent workers or percentage of logical CPU cores, use 1 to run in a single worker (default: 50%)` }],
229
- ["-x", { description: `Stop after the first failure` }]
230
- ];
231
- addTestCommand(program);
232
- addShowReportCommand(program);
233
- addMergeReportsCommand(program);
234
- addClearCacheCommand(program);
235
- addTestMCPServerCommand(program);
236
- addTestServerCommand(program);
237
- addInitAgentsCommand(program);
238
- addInitSkillsCommand(program);
239
- // Annotate the CommonJS export names for ESM import in node:
240
- 0 && (module.exports = {
241
- program
242
- });