@skyramp/mcp 0.0.64-rc.1 → 0.0.64-rc.3

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 (578) hide show
  1. package/build/index.js +23 -6
  2. package/build/playwright/PlaywrightTraceService.js +74 -0
  3. package/build/playwright/index.js +3 -0
  4. package/build/playwright/registerPlaywrightTools.js +117 -0
  5. package/build/playwright/traceRecordingPrompt.js +54 -0
  6. package/build/prompts/startTraceCollectionPrompts.js +4 -2
  7. package/build/prompts/test-recommendation/recommendationSections.js +28 -13
  8. package/build/prompts/test-recommendation/test-recommendation-prompt.js +53 -12
  9. package/build/prompts/testGenerationPrompt.js +1 -1
  10. package/build/prompts/testbot/testbot-prompts.js +37 -10
  11. package/build/services/ModularizationService.js +1 -1
  12. package/build/services/TestExecutionService.js +1 -0
  13. package/build/services/TestGenerationService.js +9 -0
  14. package/build/services/TestGenerationService.test.js +11 -7
  15. package/build/tools/code-refactor/modularizationTool.js +50 -8
  16. package/build/tools/executeSkyrampTestTool.js +26 -22
  17. package/build/tools/generate-tests/generateContractRestTool.js +52 -13
  18. package/build/tools/generate-tests/generateIntegrationRestTool.js +83 -1
  19. package/build/tools/generate-tests/generateUIRestTool.js +10 -2
  20. package/build/tools/submitReportTool.js +26 -7
  21. package/build/tools/submitReportTool.test.js +1 -1
  22. package/build/tools/test-management/analyzeChangesTool.js +8 -3
  23. package/build/tools/test-management/executeTestsTool.js +33 -24
  24. package/build/tools/trace/startTraceCollectionTool.js +6 -9
  25. package/build/tools/trace/stopTraceCollectionTool.js +2 -2
  26. package/build/types/RepositoryAnalysis.js +1 -1
  27. package/build/utils/normalizeParams.js +45 -0
  28. package/build/utils/trace-parser.js +49 -22
  29. package/build/utils/workspaceAuth.js +7 -2
  30. package/build/utils/workspaceAuth.test.js +52 -0
  31. package/node_modules/playwright/ThirdPartyNotices.txt +7456 -0
  32. package/node_modules/playwright/cli.js +19 -0
  33. package/node_modules/playwright/index.d.ts +17 -0
  34. package/node_modules/playwright/index.js +17 -0
  35. package/node_modules/playwright/index.mjs +18 -0
  36. package/node_modules/playwright/jsx-runtime.js +42 -0
  37. package/node_modules/playwright/jsx-runtime.mjs +21 -0
  38. package/node_modules/playwright/lib/agents/agentParser.js +89 -0
  39. package/node_modules/playwright/lib/agents/copilot-setup-steps.yml +34 -0
  40. package/node_modules/playwright/lib/agents/generateAgents.js +348 -0
  41. package/node_modules/playwright/lib/agents/playwright-test-coverage.prompt.md +31 -0
  42. package/node_modules/playwright/lib/agents/playwright-test-generate.prompt.md +8 -0
  43. package/node_modules/playwright/lib/agents/playwright-test-generator.agent.md +88 -0
  44. package/node_modules/playwright/lib/agents/playwright-test-heal.prompt.md +6 -0
  45. package/node_modules/playwright/lib/agents/playwright-test-healer.agent.md +55 -0
  46. package/node_modules/playwright/lib/agents/playwright-test-plan.prompt.md +9 -0
  47. package/node_modules/playwright/lib/agents/playwright-test-planner.agent.md +73 -0
  48. package/node_modules/playwright/lib/common/config.js +282 -0
  49. package/node_modules/playwright/lib/common/configLoader.js +344 -0
  50. package/node_modules/playwright/lib/common/esmLoaderHost.js +104 -0
  51. package/node_modules/playwright/lib/common/expectBundle.js +28 -0
  52. package/node_modules/playwright/lib/common/expectBundleImpl.js +407 -0
  53. package/node_modules/playwright/lib/common/fixtures.js +302 -0
  54. package/node_modules/playwright/lib/common/globals.js +58 -0
  55. package/node_modules/playwright/lib/common/ipc.js +60 -0
  56. package/node_modules/playwright/lib/common/poolBuilder.js +85 -0
  57. package/node_modules/playwright/lib/common/process.js +132 -0
  58. package/node_modules/playwright/lib/common/suiteUtils.js +140 -0
  59. package/node_modules/playwright/lib/common/test.js +321 -0
  60. package/node_modules/playwright/lib/common/testLoader.js +101 -0
  61. package/node_modules/playwright/lib/common/testType.js +298 -0
  62. package/node_modules/playwright/lib/common/validators.js +68 -0
  63. package/node_modules/playwright/lib/fsWatcher.js +67 -0
  64. package/node_modules/playwright/lib/index.js +726 -0
  65. package/node_modules/playwright/lib/internalsForTest.js +42 -0
  66. package/node_modules/playwright/lib/isomorphic/events.js +77 -0
  67. package/node_modules/playwright/lib/isomorphic/folders.js +30 -0
  68. package/node_modules/playwright/lib/isomorphic/stringInternPool.js +69 -0
  69. package/node_modules/playwright/lib/isomorphic/teleReceiver.js +521 -0
  70. package/node_modules/playwright/lib/isomorphic/teleSuiteUpdater.js +157 -0
  71. package/node_modules/playwright/lib/isomorphic/testServerConnection.js +225 -0
  72. package/node_modules/playwright/lib/isomorphic/testServerInterface.js +16 -0
  73. package/node_modules/playwright/lib/isomorphic/testTree.js +329 -0
  74. package/node_modules/playwright/lib/isomorphic/types.d.js +16 -0
  75. package/node_modules/playwright/lib/loader/loaderMain.js +59 -0
  76. package/node_modules/playwright/lib/matchers/expect.js +311 -0
  77. package/node_modules/playwright/lib/matchers/matcherHint.js +44 -0
  78. package/node_modules/playwright/lib/matchers/matchers.js +383 -0
  79. package/node_modules/playwright/lib/matchers/toBeTruthy.js +75 -0
  80. package/node_modules/playwright/lib/matchers/toEqual.js +100 -0
  81. package/node_modules/playwright/lib/matchers/toHaveURL.js +101 -0
  82. package/node_modules/playwright/lib/matchers/toMatchAriaSnapshot.js +159 -0
  83. package/node_modules/playwright/lib/matchers/toMatchSnapshot.js +342 -0
  84. package/node_modules/playwright/lib/matchers/toMatchText.js +99 -0
  85. package/node_modules/playwright/lib/mcp/browser/browserContextFactory.js +329 -0
  86. package/node_modules/playwright/lib/mcp/browser/browserServerBackend.js +84 -0
  87. package/node_modules/playwright/lib/mcp/browser/config.js +421 -0
  88. package/node_modules/playwright/lib/mcp/browser/context.js +296 -0
  89. package/node_modules/playwright/lib/mcp/browser/response.js +278 -0
  90. package/node_modules/playwright/lib/mcp/browser/sessionLog.js +75 -0
  91. package/node_modules/playwright/lib/mcp/browser/tab.js +343 -0
  92. package/node_modules/playwright/lib/mcp/browser/tools/common.js +65 -0
  93. package/node_modules/playwright/lib/mcp/browser/tools/console.js +46 -0
  94. package/node_modules/playwright/lib/mcp/browser/tools/dialogs.js +60 -0
  95. package/node_modules/playwright/lib/mcp/browser/tools/evaluate.js +61 -0
  96. package/node_modules/playwright/lib/mcp/browser/tools/files.js +58 -0
  97. package/node_modules/playwright/lib/mcp/browser/tools/form.js +63 -0
  98. package/node_modules/playwright/lib/mcp/browser/tools/install.js +72 -0
  99. package/node_modules/playwright/lib/mcp/browser/tools/keyboard.js +107 -0
  100. package/node_modules/playwright/lib/mcp/browser/tools/mouse.js +107 -0
  101. package/node_modules/playwright/lib/mcp/browser/tools/navigate.js +71 -0
  102. package/node_modules/playwright/lib/mcp/browser/tools/network.js +63 -0
  103. package/node_modules/playwright/lib/mcp/browser/tools/open.js +57 -0
  104. package/node_modules/playwright/lib/mcp/browser/tools/pdf.js +49 -0
  105. package/node_modules/playwright/lib/mcp/browser/tools/runCode.js +78 -0
  106. package/node_modules/playwright/lib/mcp/browser/tools/screenshot.js +93 -0
  107. package/node_modules/playwright/lib/mcp/browser/tools/snapshot.js +173 -0
  108. package/node_modules/playwright/lib/mcp/browser/tools/tabs.js +67 -0
  109. package/node_modules/playwright/lib/mcp/browser/tools/tool.js +47 -0
  110. package/node_modules/playwright/lib/mcp/browser/tools/tracing.js +74 -0
  111. package/node_modules/playwright/lib/mcp/browser/tools/utils.js +94 -0
  112. package/node_modules/playwright/lib/mcp/browser/tools/verify.js +143 -0
  113. package/node_modules/playwright/lib/mcp/browser/tools/wait.js +63 -0
  114. package/node_modules/playwright/lib/mcp/browser/tools.js +84 -0
  115. package/node_modules/playwright/lib/mcp/browser/watchdog.js +44 -0
  116. package/node_modules/playwright/lib/mcp/config.d.js +16 -0
  117. package/node_modules/playwright/lib/mcp/extension/cdpRelay.js +351 -0
  118. package/node_modules/playwright/lib/mcp/extension/extensionContextFactory.js +76 -0
  119. package/node_modules/playwright/lib/mcp/extension/protocol.js +28 -0
  120. package/node_modules/playwright/lib/mcp/index.js +61 -0
  121. package/node_modules/playwright/lib/mcp/log.js +35 -0
  122. package/node_modules/playwright/lib/mcp/program.js +111 -0
  123. package/node_modules/playwright/lib/mcp/sdk/exports.js +28 -0
  124. package/node_modules/playwright/lib/mcp/sdk/http.js +152 -0
  125. package/node_modules/playwright/lib/mcp/sdk/inProcessTransport.js +71 -0
  126. package/node_modules/playwright/lib/mcp/sdk/server.js +223 -0
  127. package/node_modules/playwright/lib/mcp/sdk/tool.js +47 -0
  128. package/node_modules/playwright/lib/mcp/skyramp/exportTool.js +88 -0
  129. package/node_modules/playwright/lib/mcp/skyramp/index.js +36 -0
  130. package/node_modules/playwright/lib/mcp/skyramp/traceRecordingBackend.js +236 -0
  131. package/node_modules/playwright/lib/mcp/skyramp/types.js +31 -0
  132. package/node_modules/playwright/lib/mcp/terminal/cli.js +296 -0
  133. package/node_modules/playwright/lib/mcp/terminal/command.js +56 -0
  134. package/node_modules/playwright/lib/mcp/terminal/commands.js +333 -0
  135. package/node_modules/playwright/lib/mcp/terminal/daemon.js +129 -0
  136. package/node_modules/playwright/lib/mcp/terminal/help.json +32 -0
  137. package/node_modules/playwright/lib/mcp/terminal/helpGenerator.js +88 -0
  138. package/node_modules/playwright/lib/mcp/terminal/socketConnection.js +80 -0
  139. package/node_modules/playwright/lib/mcp/test/browserBackend.js +98 -0
  140. package/node_modules/playwright/lib/mcp/test/generatorTools.js +122 -0
  141. package/node_modules/playwright/lib/mcp/test/plannerTools.js +145 -0
  142. package/node_modules/playwright/lib/mcp/test/seed.js +82 -0
  143. package/node_modules/playwright/lib/mcp/test/skyRampExport.js +313 -0
  144. package/node_modules/playwright/lib/mcp/test/streams.js +44 -0
  145. package/node_modules/playwright/lib/mcp/test/testBackend.js +99 -0
  146. package/node_modules/playwright/lib/mcp/test/testContext.js +285 -0
  147. package/node_modules/playwright/lib/mcp/test/testTool.js +30 -0
  148. package/node_modules/playwright/lib/mcp/test/testTools.js +108 -0
  149. package/node_modules/playwright/lib/plugins/gitCommitInfoPlugin.js +198 -0
  150. package/node_modules/playwright/lib/plugins/index.js +28 -0
  151. package/node_modules/playwright/lib/plugins/webServerPlugin.js +237 -0
  152. package/node_modules/playwright/lib/program.js +417 -0
  153. package/node_modules/playwright/lib/reporters/base.js +634 -0
  154. package/node_modules/playwright/lib/reporters/blob.js +138 -0
  155. package/node_modules/playwright/lib/reporters/dot.js +99 -0
  156. package/node_modules/playwright/lib/reporters/empty.js +32 -0
  157. package/node_modules/playwright/lib/reporters/github.js +128 -0
  158. package/node_modules/playwright/lib/reporters/html.js +633 -0
  159. package/node_modules/playwright/lib/reporters/internalReporter.js +138 -0
  160. package/node_modules/playwright/lib/reporters/json.js +254 -0
  161. package/node_modules/playwright/lib/reporters/junit.js +232 -0
  162. package/node_modules/playwright/lib/reporters/line.js +131 -0
  163. package/node_modules/playwright/lib/reporters/list.js +253 -0
  164. package/node_modules/playwright/lib/reporters/listModeReporter.js +69 -0
  165. package/node_modules/playwright/lib/reporters/markdown.js +144 -0
  166. package/node_modules/playwright/lib/reporters/merge.js +558 -0
  167. package/node_modules/playwright/lib/reporters/multiplexer.js +112 -0
  168. package/node_modules/playwright/lib/reporters/reporterV2.js +102 -0
  169. package/node_modules/playwright/lib/reporters/teleEmitter.js +317 -0
  170. package/node_modules/playwright/lib/reporters/versions/blobV1.js +16 -0
  171. package/node_modules/playwright/lib/runner/dispatcher.js +530 -0
  172. package/node_modules/playwright/lib/runner/failureTracker.js +72 -0
  173. package/node_modules/playwright/lib/runner/lastRun.js +77 -0
  174. package/node_modules/playwright/lib/runner/loadUtils.js +334 -0
  175. package/node_modules/playwright/lib/runner/loaderHost.js +89 -0
  176. package/node_modules/playwright/lib/runner/processHost.js +180 -0
  177. package/node_modules/playwright/lib/runner/projectUtils.js +241 -0
  178. package/node_modules/playwright/lib/runner/rebase.js +189 -0
  179. package/node_modules/playwright/lib/runner/reporters.js +138 -0
  180. package/node_modules/playwright/lib/runner/sigIntWatcher.js +96 -0
  181. package/node_modules/playwright/lib/runner/storage.js +91 -0
  182. package/node_modules/playwright/lib/runner/taskRunner.js +127 -0
  183. package/node_modules/playwright/lib/runner/tasks.js +410 -0
  184. package/node_modules/playwright/lib/runner/testGroups.js +125 -0
  185. package/node_modules/playwright/lib/runner/testRunner.js +398 -0
  186. package/node_modules/playwright/lib/runner/testServer.js +269 -0
  187. package/node_modules/playwright/lib/runner/uiModeReporter.js +30 -0
  188. package/node_modules/playwright/lib/runner/vcs.js +72 -0
  189. package/node_modules/playwright/lib/runner/watchMode.js +396 -0
  190. package/node_modules/playwright/lib/runner/workerHost.js +104 -0
  191. package/node_modules/playwright/lib/third_party/pirates.js +62 -0
  192. package/node_modules/playwright/lib/third_party/tsconfig-loader.js +103 -0
  193. package/node_modules/playwright/lib/transform/babelBundle.js +46 -0
  194. package/node_modules/playwright/lib/transform/babelBundleImpl.js +461 -0
  195. package/node_modules/playwright/lib/transform/compilationCache.js +274 -0
  196. package/node_modules/playwright/lib/transform/esmLoader.js +103 -0
  197. package/node_modules/playwright/lib/transform/md.js +221 -0
  198. package/node_modules/playwright/lib/transform/portTransport.js +67 -0
  199. package/node_modules/playwright/lib/transform/transform.js +303 -0
  200. package/node_modules/playwright/lib/util.js +400 -0
  201. package/node_modules/playwright/lib/utilsBundle.js +50 -0
  202. package/node_modules/playwright/lib/utilsBundleImpl.js +103 -0
  203. package/node_modules/playwright/lib/worker/fixtureRunner.js +262 -0
  204. package/node_modules/playwright/lib/worker/testInfo.js +536 -0
  205. package/node_modules/playwright/lib/worker/testTracing.js +345 -0
  206. package/node_modules/playwright/lib/worker/timeoutManager.js +174 -0
  207. package/node_modules/playwright/lib/worker/util.js +31 -0
  208. package/node_modules/playwright/lib/worker/workerMain.js +530 -0
  209. package/node_modules/playwright/package.json +76 -0
  210. package/node_modules/playwright/test.d.ts +18 -0
  211. package/node_modules/playwright/test.js +24 -0
  212. package/node_modules/playwright/test.mjs +34 -0
  213. package/node_modules/playwright/types/test.d.ts +10251 -0
  214. package/node_modules/playwright/types/testReporter.d.ts +822 -0
  215. package/node_modules/playwright-core/LICENSE +202 -0
  216. package/node_modules/playwright-core/NOTICE +5 -0
  217. package/node_modules/playwright-core/README.md +3 -0
  218. package/node_modules/playwright-core/ThirdPartyNotices.txt +4076 -0
  219. package/node_modules/playwright-core/bin/install_media_pack.ps1 +5 -0
  220. package/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +33 -0
  221. package/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
  222. package/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
  223. package/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
  224. package/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
  225. package/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
  226. package/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
  227. package/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
  228. package/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
  229. package/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
  230. package/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
  231. package/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
  232. package/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
  233. package/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
  234. package/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
  235. package/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
  236. package/node_modules/playwright-core/browsers.json +79 -0
  237. package/node_modules/playwright-core/cli.js +18 -0
  238. package/node_modules/playwright-core/index.d.ts +17 -0
  239. package/node_modules/playwright-core/index.js +32 -0
  240. package/node_modules/playwright-core/index.mjs +28 -0
  241. package/node_modules/playwright-core/lib/androidServerImpl.js +65 -0
  242. package/node_modules/playwright-core/lib/browserServerImpl.js +120 -0
  243. package/node_modules/playwright-core/lib/cli/driver.js +97 -0
  244. package/node_modules/playwright-core/lib/cli/program.js +589 -0
  245. package/node_modules/playwright-core/lib/cli/programWithTestStub.js +74 -0
  246. package/node_modules/playwright-core/lib/client/android.js +361 -0
  247. package/node_modules/playwright-core/lib/client/api.js +137 -0
  248. package/node_modules/playwright-core/lib/client/artifact.js +79 -0
  249. package/node_modules/playwright-core/lib/client/browser.js +161 -0
  250. package/node_modules/playwright-core/lib/client/browserContext.js +582 -0
  251. package/node_modules/playwright-core/lib/client/browserType.js +185 -0
  252. package/node_modules/playwright-core/lib/client/cdpSession.js +51 -0
  253. package/node_modules/playwright-core/lib/client/channelOwner.js +194 -0
  254. package/node_modules/playwright-core/lib/client/clientHelper.js +64 -0
  255. package/node_modules/playwright-core/lib/client/clientInstrumentation.js +55 -0
  256. package/node_modules/playwright-core/lib/client/clientStackTrace.js +69 -0
  257. package/node_modules/playwright-core/lib/client/clock.js +68 -0
  258. package/node_modules/playwright-core/lib/client/connection.js +318 -0
  259. package/node_modules/playwright-core/lib/client/consoleMessage.js +58 -0
  260. package/node_modules/playwright-core/lib/client/coverage.js +44 -0
  261. package/node_modules/playwright-core/lib/client/dialog.js +56 -0
  262. package/node_modules/playwright-core/lib/client/download.js +62 -0
  263. package/node_modules/playwright-core/lib/client/electron.js +138 -0
  264. package/node_modules/playwright-core/lib/client/elementHandle.js +284 -0
  265. package/node_modules/playwright-core/lib/client/errors.js +77 -0
  266. package/node_modules/playwright-core/lib/client/eventEmitter.js +314 -0
  267. package/node_modules/playwright-core/lib/client/events.js +103 -0
  268. package/node_modules/playwright-core/lib/client/fetch.js +368 -0
  269. package/node_modules/playwright-core/lib/client/fileChooser.js +46 -0
  270. package/node_modules/playwright-core/lib/client/fileUtils.js +34 -0
  271. package/node_modules/playwright-core/lib/client/frame.js +409 -0
  272. package/node_modules/playwright-core/lib/client/harRouter.js +87 -0
  273. package/node_modules/playwright-core/lib/client/input.js +84 -0
  274. package/node_modules/playwright-core/lib/client/jsHandle.js +109 -0
  275. package/node_modules/playwright-core/lib/client/jsonPipe.js +39 -0
  276. package/node_modules/playwright-core/lib/client/localUtils.js +60 -0
  277. package/node_modules/playwright-core/lib/client/locator.js +369 -0
  278. package/node_modules/playwright-core/lib/client/network.js +747 -0
  279. package/node_modules/playwright-core/lib/client/page.js +745 -0
  280. package/node_modules/playwright-core/lib/client/pageAgent.js +64 -0
  281. package/node_modules/playwright-core/lib/client/platform.js +77 -0
  282. package/node_modules/playwright-core/lib/client/playwright.js +71 -0
  283. package/node_modules/playwright-core/lib/client/selectors.js +55 -0
  284. package/node_modules/playwright-core/lib/client/stream.js +39 -0
  285. package/node_modules/playwright-core/lib/client/timeoutSettings.js +79 -0
  286. package/node_modules/playwright-core/lib/client/tracing.js +119 -0
  287. package/node_modules/playwright-core/lib/client/types.js +28 -0
  288. package/node_modules/playwright-core/lib/client/video.js +59 -0
  289. package/node_modules/playwright-core/lib/client/waiter.js +142 -0
  290. package/node_modules/playwright-core/lib/client/webError.js +39 -0
  291. package/node_modules/playwright-core/lib/client/webSocket.js +93 -0
  292. package/node_modules/playwright-core/lib/client/worker.js +85 -0
  293. package/node_modules/playwright-core/lib/client/writableStream.js +39 -0
  294. package/node_modules/playwright-core/lib/generated/bindingsControllerSource.js +28 -0
  295. package/node_modules/playwright-core/lib/generated/clockSource.js +28 -0
  296. package/node_modules/playwright-core/lib/generated/injectedScriptSource.js +28 -0
  297. package/node_modules/playwright-core/lib/generated/pollingRecorderSource.js +28 -0
  298. package/node_modules/playwright-core/lib/generated/storageScriptSource.js +28 -0
  299. package/node_modules/playwright-core/lib/generated/utilityScriptSource.js +28 -0
  300. package/node_modules/playwright-core/lib/generated/webSocketMockSource.js +336 -0
  301. package/node_modules/playwright-core/lib/inProcessFactory.js +60 -0
  302. package/node_modules/playwright-core/lib/inprocess.js +3 -0
  303. package/node_modules/playwright-core/lib/mcpBundle.js +84 -0
  304. package/node_modules/playwright-core/lib/mcpBundleImpl/index.js +147 -0
  305. package/node_modules/playwright-core/lib/outofprocess.js +76 -0
  306. package/node_modules/playwright-core/lib/protocol/serializers.js +197 -0
  307. package/node_modules/playwright-core/lib/protocol/validator.js +2969 -0
  308. package/node_modules/playwright-core/lib/protocol/validatorPrimitives.js +193 -0
  309. package/node_modules/playwright-core/lib/remote/playwrightConnection.js +129 -0
  310. package/node_modules/playwright-core/lib/remote/playwrightServer.js +334 -0
  311. package/node_modules/playwright-core/lib/server/agent/actionRunner.js +335 -0
  312. package/node_modules/playwright-core/lib/server/agent/actions.js +128 -0
  313. package/node_modules/playwright-core/lib/server/agent/codegen.js +111 -0
  314. package/node_modules/playwright-core/lib/server/agent/context.js +150 -0
  315. package/node_modules/playwright-core/lib/server/agent/expectTools.js +156 -0
  316. package/node_modules/playwright-core/lib/server/agent/pageAgent.js +204 -0
  317. package/node_modules/playwright-core/lib/server/agent/performTools.js +262 -0
  318. package/node_modules/playwright-core/lib/server/agent/tool.js +109 -0
  319. package/node_modules/playwright-core/lib/server/android/android.js +465 -0
  320. package/node_modules/playwright-core/lib/server/android/backendAdb.js +177 -0
  321. package/node_modules/playwright-core/lib/server/artifact.js +127 -0
  322. package/node_modules/playwright-core/lib/server/bidi/bidiBrowser.js +549 -0
  323. package/node_modules/playwright-core/lib/server/bidi/bidiChromium.js +149 -0
  324. package/node_modules/playwright-core/lib/server/bidi/bidiConnection.js +213 -0
  325. package/node_modules/playwright-core/lib/server/bidi/bidiDeserializer.js +116 -0
  326. package/node_modules/playwright-core/lib/server/bidi/bidiExecutionContext.js +267 -0
  327. package/node_modules/playwright-core/lib/server/bidi/bidiFirefox.js +128 -0
  328. package/node_modules/playwright-core/lib/server/bidi/bidiInput.js +146 -0
  329. package/node_modules/playwright-core/lib/server/bidi/bidiNetworkManager.js +383 -0
  330. package/node_modules/playwright-core/lib/server/bidi/bidiOverCdp.js +102 -0
  331. package/node_modules/playwright-core/lib/server/bidi/bidiPage.js +583 -0
  332. package/node_modules/playwright-core/lib/server/bidi/bidiPdf.js +106 -0
  333. package/node_modules/playwright-core/lib/server/bidi/third_party/bidiCommands.d.js +22 -0
  334. package/node_modules/playwright-core/lib/server/bidi/third_party/bidiKeyboard.js +256 -0
  335. package/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocol.js +24 -0
  336. package/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolCore.js +180 -0
  337. package/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolPermissions.js +42 -0
  338. package/node_modules/playwright-core/lib/server/bidi/third_party/bidiSerializer.js +148 -0
  339. package/node_modules/playwright-core/lib/server/bidi/third_party/firefoxPrefs.js +259 -0
  340. package/node_modules/playwright-core/lib/server/browser.js +149 -0
  341. package/node_modules/playwright-core/lib/server/browserContext.js +702 -0
  342. package/node_modules/playwright-core/lib/server/browserType.js +336 -0
  343. package/node_modules/playwright-core/lib/server/callLog.js +82 -0
  344. package/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
  345. package/node_modules/playwright-core/lib/server/chromium/chromium.js +397 -0
  346. package/node_modules/playwright-core/lib/server/chromium/chromiumSwitches.js +104 -0
  347. package/node_modules/playwright-core/lib/server/chromium/crBrowser.js +520 -0
  348. package/node_modules/playwright-core/lib/server/chromium/crConnection.js +197 -0
  349. package/node_modules/playwright-core/lib/server/chromium/crCoverage.js +235 -0
  350. package/node_modules/playwright-core/lib/server/chromium/crDevTools.js +111 -0
  351. package/node_modules/playwright-core/lib/server/chromium/crDragDrop.js +131 -0
  352. package/node_modules/playwright-core/lib/server/chromium/crExecutionContext.js +146 -0
  353. package/node_modules/playwright-core/lib/server/chromium/crInput.js +187 -0
  354. package/node_modules/playwright-core/lib/server/chromium/crNetworkManager.js +707 -0
  355. package/node_modules/playwright-core/lib/server/chromium/crPage.js +1001 -0
  356. package/node_modules/playwright-core/lib/server/chromium/crPdf.js +121 -0
  357. package/node_modules/playwright-core/lib/server/chromium/crProtocolHelper.js +145 -0
  358. package/node_modules/playwright-core/lib/server/chromium/crServiceWorker.js +136 -0
  359. package/node_modules/playwright-core/lib/server/chromium/defaultFontFamilies.js +162 -0
  360. package/node_modules/playwright-core/lib/server/chromium/protocol.d.js +16 -0
  361. package/node_modules/playwright-core/lib/server/clock.js +149 -0
  362. package/node_modules/playwright-core/lib/server/codegen/csharp.js +327 -0
  363. package/node_modules/playwright-core/lib/server/codegen/java.js +274 -0
  364. package/node_modules/playwright-core/lib/server/codegen/javascript.js +247 -0
  365. package/node_modules/playwright-core/lib/server/codegen/jsonl.js +52 -0
  366. package/node_modules/playwright-core/lib/server/codegen/language.js +132 -0
  367. package/node_modules/playwright-core/lib/server/codegen/languages.js +68 -0
  368. package/node_modules/playwright-core/lib/server/codegen/python.js +279 -0
  369. package/node_modules/playwright-core/lib/server/codegen/types.js +16 -0
  370. package/node_modules/playwright-core/lib/server/console.js +57 -0
  371. package/node_modules/playwright-core/lib/server/cookieStore.js +206 -0
  372. package/node_modules/playwright-core/lib/server/debugController.js +191 -0
  373. package/node_modules/playwright-core/lib/server/debugger.js +119 -0
  374. package/node_modules/playwright-core/lib/server/deviceDescriptors.js +39 -0
  375. package/node_modules/playwright-core/lib/server/deviceDescriptorsSource.json +1779 -0
  376. package/node_modules/playwright-core/lib/server/dialog.js +116 -0
  377. package/node_modules/playwright-core/lib/server/dispatchers/androidDispatcher.js +325 -0
  378. package/node_modules/playwright-core/lib/server/dispatchers/artifactDispatcher.js +118 -0
  379. package/node_modules/playwright-core/lib/server/dispatchers/browserContextDispatcher.js +384 -0
  380. package/node_modules/playwright-core/lib/server/dispatchers/browserDispatcher.js +118 -0
  381. package/node_modules/playwright-core/lib/server/dispatchers/browserTypeDispatcher.js +64 -0
  382. package/node_modules/playwright-core/lib/server/dispatchers/cdpSessionDispatcher.js +44 -0
  383. package/node_modules/playwright-core/lib/server/dispatchers/debugControllerDispatcher.js +78 -0
  384. package/node_modules/playwright-core/lib/server/dispatchers/dialogDispatcher.js +47 -0
  385. package/node_modules/playwright-core/lib/server/dispatchers/dispatcher.js +364 -0
  386. package/node_modules/playwright-core/lib/server/dispatchers/electronDispatcher.js +89 -0
  387. package/node_modules/playwright-core/lib/server/dispatchers/elementHandlerDispatcher.js +181 -0
  388. package/node_modules/playwright-core/lib/server/dispatchers/frameDispatcher.js +227 -0
  389. package/node_modules/playwright-core/lib/server/dispatchers/jsHandleDispatcher.js +85 -0
  390. package/node_modules/playwright-core/lib/server/dispatchers/jsonPipeDispatcher.js +58 -0
  391. package/node_modules/playwright-core/lib/server/dispatchers/localUtilsDispatcher.js +149 -0
  392. package/node_modules/playwright-core/lib/server/dispatchers/networkDispatchers.js +213 -0
  393. package/node_modules/playwright-core/lib/server/dispatchers/pageAgentDispatcher.js +96 -0
  394. package/node_modules/playwright-core/lib/server/dispatchers/pageDispatcher.js +393 -0
  395. package/node_modules/playwright-core/lib/server/dispatchers/playwrightDispatcher.js +108 -0
  396. package/node_modules/playwright-core/lib/server/dispatchers/streamDispatcher.js +67 -0
  397. package/node_modules/playwright-core/lib/server/dispatchers/tracingDispatcher.js +68 -0
  398. package/node_modules/playwright-core/lib/server/dispatchers/webSocketRouteDispatcher.js +165 -0
  399. package/node_modules/playwright-core/lib/server/dispatchers/writableStreamDispatcher.js +79 -0
  400. package/node_modules/playwright-core/lib/server/dom.js +815 -0
  401. package/node_modules/playwright-core/lib/server/download.js +70 -0
  402. package/node_modules/playwright-core/lib/server/electron/electron.js +273 -0
  403. package/node_modules/playwright-core/lib/server/electron/loader.js +29 -0
  404. package/node_modules/playwright-core/lib/server/errors.js +69 -0
  405. package/node_modules/playwright-core/lib/server/fetch.js +621 -0
  406. package/node_modules/playwright-core/lib/server/fileChooser.js +43 -0
  407. package/node_modules/playwright-core/lib/server/fileUploadUtils.js +84 -0
  408. package/node_modules/playwright-core/lib/server/firefox/ffBrowser.js +418 -0
  409. package/node_modules/playwright-core/lib/server/firefox/ffConnection.js +142 -0
  410. package/node_modules/playwright-core/lib/server/firefox/ffExecutionContext.js +150 -0
  411. package/node_modules/playwright-core/lib/server/firefox/ffInput.js +159 -0
  412. package/node_modules/playwright-core/lib/server/firefox/ffNetworkManager.js +256 -0
  413. package/node_modules/playwright-core/lib/server/firefox/ffPage.js +497 -0
  414. package/node_modules/playwright-core/lib/server/firefox/firefox.js +114 -0
  415. package/node_modules/playwright-core/lib/server/firefox/protocol.d.js +16 -0
  416. package/node_modules/playwright-core/lib/server/formData.js +147 -0
  417. package/node_modules/playwright-core/lib/server/frameSelectors.js +160 -0
  418. package/node_modules/playwright-core/lib/server/frames.js +1471 -0
  419. package/node_modules/playwright-core/lib/server/har/harRecorder.js +147 -0
  420. package/node_modules/playwright-core/lib/server/har/harTracer.js +607 -0
  421. package/node_modules/playwright-core/lib/server/harBackend.js +157 -0
  422. package/node_modules/playwright-core/lib/server/helper.js +96 -0
  423. package/node_modules/playwright-core/lib/server/index.js +58 -0
  424. package/node_modules/playwright-core/lib/server/input.js +277 -0
  425. package/node_modules/playwright-core/lib/server/instrumentation.js +72 -0
  426. package/node_modules/playwright-core/lib/server/javascript.js +291 -0
  427. package/node_modules/playwright-core/lib/server/launchApp.js +128 -0
  428. package/node_modules/playwright-core/lib/server/localUtils.js +214 -0
  429. package/node_modules/playwright-core/lib/server/macEditingCommands.js +143 -0
  430. package/node_modules/playwright-core/lib/server/network.js +667 -0
  431. package/node_modules/playwright-core/lib/server/page.js +830 -0
  432. package/node_modules/playwright-core/lib/server/pipeTransport.js +89 -0
  433. package/node_modules/playwright-core/lib/server/playwright.js +69 -0
  434. package/node_modules/playwright-core/lib/server/progress.js +132 -0
  435. package/node_modules/playwright-core/lib/server/protocolError.js +52 -0
  436. package/node_modules/playwright-core/lib/server/recorder/chat.js +161 -0
  437. package/node_modules/playwright-core/lib/server/recorder/recorderApp.js +366 -0
  438. package/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +138 -0
  439. package/node_modules/playwright-core/lib/server/recorder/recorderSignalProcessor.js +83 -0
  440. package/node_modules/playwright-core/lib/server/recorder/recorderUtils.js +157 -0
  441. package/node_modules/playwright-core/lib/server/recorder/throttledFile.js +57 -0
  442. package/node_modules/playwright-core/lib/server/recorder.js +499 -0
  443. package/node_modules/playwright-core/lib/server/registry/browserFetcher.js +177 -0
  444. package/node_modules/playwright-core/lib/server/registry/dependencies.js +371 -0
  445. package/node_modules/playwright-core/lib/server/registry/index.js +1422 -0
  446. package/node_modules/playwright-core/lib/server/registry/nativeDeps.js +1280 -0
  447. package/node_modules/playwright-core/lib/server/registry/oopDownloadBrowserMain.js +127 -0
  448. package/node_modules/playwright-core/lib/server/screencast.js +190 -0
  449. package/node_modules/playwright-core/lib/server/screenshotter.js +333 -0
  450. package/node_modules/playwright-core/lib/server/selectors.js +112 -0
  451. package/node_modules/playwright-core/lib/server/socksClientCertificatesInterceptor.js +383 -0
  452. package/node_modules/playwright-core/lib/server/socksInterceptor.js +95 -0
  453. package/node_modules/playwright-core/lib/server/trace/recorder/snapshotter.js +147 -0
  454. package/node_modules/playwright-core/lib/server/trace/recorder/snapshotterInjected.js +561 -0
  455. package/node_modules/playwright-core/lib/server/trace/recorder/tracing.js +604 -0
  456. package/node_modules/playwright-core/lib/server/trace/viewer/traceParser.js +72 -0
  457. package/node_modules/playwright-core/lib/server/trace/viewer/traceViewer.js +245 -0
  458. package/node_modules/playwright-core/lib/server/transport.js +181 -0
  459. package/node_modules/playwright-core/lib/server/types.js +28 -0
  460. package/node_modules/playwright-core/lib/server/usKeyboardLayout.js +145 -0
  461. package/node_modules/playwright-core/lib/server/utils/ascii.js +44 -0
  462. package/node_modules/playwright-core/lib/server/utils/comparators.js +139 -0
  463. package/node_modules/playwright-core/lib/server/utils/crypto.js +216 -0
  464. package/node_modules/playwright-core/lib/server/utils/debug.js +42 -0
  465. package/node_modules/playwright-core/lib/server/utils/debugLogger.js +122 -0
  466. package/node_modules/playwright-core/lib/server/utils/env.js +73 -0
  467. package/node_modules/playwright-core/lib/server/utils/eventsHelper.js +39 -0
  468. package/node_modules/playwright-core/lib/server/utils/expectUtils.js +123 -0
  469. package/node_modules/playwright-core/lib/server/utils/fileUtils.js +191 -0
  470. package/node_modules/playwright-core/lib/server/utils/happyEyeballs.js +207 -0
  471. package/node_modules/playwright-core/lib/server/utils/hostPlatform.js +138 -0
  472. package/node_modules/playwright-core/lib/server/utils/httpServer.js +203 -0
  473. package/node_modules/playwright-core/lib/server/utils/imageUtils.js +141 -0
  474. package/node_modules/playwright-core/lib/server/utils/image_tools/colorUtils.js +89 -0
  475. package/node_modules/playwright-core/lib/server/utils/image_tools/compare.js +109 -0
  476. package/node_modules/playwright-core/lib/server/utils/image_tools/imageChannel.js +78 -0
  477. package/node_modules/playwright-core/lib/server/utils/image_tools/stats.js +102 -0
  478. package/node_modules/playwright-core/lib/server/utils/linuxUtils.js +71 -0
  479. package/node_modules/playwright-core/lib/server/utils/network.js +242 -0
  480. package/node_modules/playwright-core/lib/server/utils/nodePlatform.js +154 -0
  481. package/node_modules/playwright-core/lib/server/utils/pipeTransport.js +84 -0
  482. package/node_modules/playwright-core/lib/server/utils/processLauncher.js +241 -0
  483. package/node_modules/playwright-core/lib/server/utils/profiler.js +65 -0
  484. package/node_modules/playwright-core/lib/server/utils/socksProxy.js +511 -0
  485. package/node_modules/playwright-core/lib/server/utils/spawnAsync.js +41 -0
  486. package/node_modules/playwright-core/lib/server/utils/task.js +51 -0
  487. package/node_modules/playwright-core/lib/server/utils/userAgent.js +98 -0
  488. package/node_modules/playwright-core/lib/server/utils/wsServer.js +121 -0
  489. package/node_modules/playwright-core/lib/server/utils/zipFile.js +74 -0
  490. package/node_modules/playwright-core/lib/server/utils/zones.js +57 -0
  491. package/node_modules/playwright-core/lib/server/videoRecorder.js +124 -0
  492. package/node_modules/playwright-core/lib/server/webkit/protocol.d.js +16 -0
  493. package/node_modules/playwright-core/lib/server/webkit/webkit.js +108 -0
  494. package/node_modules/playwright-core/lib/server/webkit/wkBrowser.js +335 -0
  495. package/node_modules/playwright-core/lib/server/webkit/wkConnection.js +144 -0
  496. package/node_modules/playwright-core/lib/server/webkit/wkExecutionContext.js +154 -0
  497. package/node_modules/playwright-core/lib/server/webkit/wkInput.js +181 -0
  498. package/node_modules/playwright-core/lib/server/webkit/wkInterceptableRequest.js +197 -0
  499. package/node_modules/playwright-core/lib/server/webkit/wkPage.js +1159 -0
  500. package/node_modules/playwright-core/lib/server/webkit/wkProvisionalPage.js +83 -0
  501. package/node_modules/playwright-core/lib/server/webkit/wkWorkers.js +105 -0
  502. package/node_modules/playwright-core/lib/third_party/pixelmatch.js +255 -0
  503. package/node_modules/playwright-core/lib/utils/isomorphic/ariaSnapshot.js +455 -0
  504. package/node_modules/playwright-core/lib/utils/isomorphic/assert.js +31 -0
  505. package/node_modules/playwright-core/lib/utils/isomorphic/colors.js +72 -0
  506. package/node_modules/playwright-core/lib/utils/isomorphic/cssParser.js +245 -0
  507. package/node_modules/playwright-core/lib/utils/isomorphic/cssTokenizer.js +1051 -0
  508. package/node_modules/playwright-core/lib/utils/isomorphic/headers.js +53 -0
  509. package/node_modules/playwright-core/lib/utils/isomorphic/locatorGenerators.js +689 -0
  510. package/node_modules/playwright-core/lib/utils/isomorphic/locatorParser.js +176 -0
  511. package/node_modules/playwright-core/lib/utils/isomorphic/locatorUtils.js +81 -0
  512. package/node_modules/playwright-core/lib/utils/isomorphic/lruCache.js +51 -0
  513. package/node_modules/playwright-core/lib/utils/isomorphic/manualPromise.js +114 -0
  514. package/node_modules/playwright-core/lib/utils/isomorphic/mimeType.js +459 -0
  515. package/node_modules/playwright-core/lib/utils/isomorphic/multimap.js +80 -0
  516. package/node_modules/playwright-core/lib/utils/isomorphic/protocolFormatter.js +81 -0
  517. package/node_modules/playwright-core/lib/utils/isomorphic/protocolMetainfo.js +330 -0
  518. package/node_modules/playwright-core/lib/utils/isomorphic/rtti.js +43 -0
  519. package/node_modules/playwright-core/lib/utils/isomorphic/selectorParser.js +386 -0
  520. package/node_modules/playwright-core/lib/utils/isomorphic/semaphore.js +54 -0
  521. package/node_modules/playwright-core/lib/utils/isomorphic/stackTrace.js +158 -0
  522. package/node_modules/playwright-core/lib/utils/isomorphic/stringUtils.js +204 -0
  523. package/node_modules/playwright-core/lib/utils/isomorphic/time.js +49 -0
  524. package/node_modules/playwright-core/lib/utils/isomorphic/timeoutRunner.js +66 -0
  525. package/node_modules/playwright-core/lib/utils/isomorphic/trace/entries.js +16 -0
  526. package/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotRenderer.js +499 -0
  527. package/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotServer.js +120 -0
  528. package/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotStorage.js +89 -0
  529. package/node_modules/playwright-core/lib/utils/isomorphic/trace/traceLoader.js +131 -0
  530. package/node_modules/playwright-core/lib/utils/isomorphic/trace/traceModel.js +365 -0
  531. package/node_modules/playwright-core/lib/utils/isomorphic/trace/traceModernizer.js +400 -0
  532. package/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV3.js +16 -0
  533. package/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV4.js +16 -0
  534. package/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV5.js +16 -0
  535. package/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV6.js +16 -0
  536. package/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV7.js +16 -0
  537. package/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV8.js +16 -0
  538. package/node_modules/playwright-core/lib/utils/isomorphic/traceUtils.js +58 -0
  539. package/node_modules/playwright-core/lib/utils/isomorphic/types.js +16 -0
  540. package/node_modules/playwright-core/lib/utils/isomorphic/urlMatch.js +190 -0
  541. package/node_modules/playwright-core/lib/utils/isomorphic/utilityScriptSerializers.js +251 -0
  542. package/node_modules/playwright-core/lib/utils/isomorphic/yaml.js +84 -0
  543. package/node_modules/playwright-core/lib/utils.js +111 -0
  544. package/node_modules/playwright-core/lib/utilsBundle.js +109 -0
  545. package/node_modules/playwright-core/lib/utilsBundleImpl/index.js +218 -0
  546. package/node_modules/playwright-core/lib/utilsBundleImpl/xdg-open +1066 -0
  547. package/node_modules/playwright-core/lib/vite/htmlReport/index.html +84 -0
  548. package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-DYBRYzYX.css +1 -0
  549. package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-DadYNm1I.js +32 -0
  550. package/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
  551. package/node_modules/playwright-core/lib/vite/recorder/assets/index-BSjZa4pk.css +1 -0
  552. package/node_modules/playwright-core/lib/vite/recorder/assets/index-BhTWtUlo.js +193 -0
  553. package/node_modules/playwright-core/lib/vite/recorder/index.html +29 -0
  554. package/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +9 -0
  555. package/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-a5XoALAZ.js +32 -0
  556. package/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-CJSZINFr.js +266 -0
  557. package/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-CsJ4vdCR.js +9 -0
  558. package/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.DYBRYzYX.css +1 -0
  559. package/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
  560. package/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.7ch9cixO.css +1 -0
  561. package/node_modules/playwright-core/lib/vite/traceViewer/index.BDwrLSGN.js +2 -0
  562. package/node_modules/playwright-core/lib/vite/traceViewer/index.BVu7tZDe.css +1 -0
  563. package/node_modules/playwright-core/lib/vite/traceViewer/index.html +43 -0
  564. package/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
  565. package/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
  566. package/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +21 -0
  567. package/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +5 -0
  568. package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.Btcz36p_.css +1 -0
  569. package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CQJ9SCIQ.js +5 -0
  570. package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +17 -0
  571. package/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.DYP7pi_n.css +32 -0
  572. package/node_modules/playwright-core/lib/zipBundle.js +34 -0
  573. package/node_modules/playwright-core/lib/zipBundleImpl.js +5 -0
  574. package/node_modules/playwright-core/package.json +43 -0
  575. package/node_modules/playwright-core/types/protocol.d.ts +23824 -0
  576. package/node_modules/playwright-core/types/structs.d.ts +45 -0
  577. package/node_modules/playwright-core/types/types.d.ts +22843 -0
  578. package/package.json +5 -1
package/build/index.js CHANGED
@@ -32,6 +32,7 @@ import { registerOneClickTool } from "./tools/one-click/oneClickTool.js";
32
32
  import { registerAnalysisResources } from "./resources/analysisResources.js";
33
33
  import { AnalyticsService } from "./services/AnalyticsService.js";
34
34
  import { initCheck } from "./utils/initAgent.js";
35
+ import { registerPlaywrightTools, registerTraceRecordingPrompt, getPlaywrightTraceService, } from "./playwright/index.js";
35
36
  const server = new McpServer({
36
37
  name: "Skyramp MCP Server",
37
38
  version: "1.0.0",
@@ -51,7 +52,9 @@ const server = new McpServer({
51
52
 
52
53
  ## Rules
53
54
  - NEVER show CLI commands. ALWAYS use the MCP tools provided.
54
- - For UI and E2E tests, use the trace collection start/stop tools.
55
+ - For UI and E2E tests, there are TWO recording modes:
56
+ 1. **AI-driven recording** (default): Use the browser_* tools (browser_navigate, browser_click, etc.) to record interactions, then call skyramp_export_zip to export the trace, then call skyramp_ui_test_generation with the zip path.
57
+ 2. **Manual recording**: ONLY when the user explicitly says "manual recording", "record myself", "I will interact", or "Docker trace" — use skyramp_start_trace_collection / skyramp_stop_trace_collection to let the user interact with the browser themselves.
55
58
  - When the user asks to comprehensively, thoroughly, or deeply test a specific endpoint: MUST call \`skyramp_one_click_tool\` with workflow \`test_given_endpoint_comprehensively\` first. Do NOT self-orchestrate the steps manually.
56
59
  - When the user asks to scan the full repo, recommend, generate, and execute top N tests: MUST call \`skyramp_one_click_tool\` with workflow \`full_repo_scan_recommend_generate_and_execute_top_n_tests\`.
57
60
 
@@ -103,10 +106,12 @@ Before calling ANY test generation tool, you MUST follow this flow:
103
106
  5. **CRITICAL — scenario generation**: When calling \`skyramp_scenario_test_generation\`, ALWAYS pass:
104
107
  - \`baseURL\`: The full base URL from \`api.baseUrl\` (e.g., \`http://localhost:3000\`). This determines the scheme, host, and port in the generated trace. Without it, the trace defaults to https:443 which is almost always wrong for local development.
105
108
  - \`authHeader\`: Which HTTP header carries the auth credential. Get it from \`api.authHeader\` in workspace config. Examples: \`Authorization\` (Bearer/Token auth), \`X-Api-Key\` (API key auth), \`Cookie\` (session/cookie auth like NextAuth). Pass \`""\` to skip auth entirely (unauthenticated endpoints or \`api.authType: "none"\`).
106
- - \`authScheme\`: Only when \`authHeader\` is \`Authorization\`. The prefix before the token (e.g., \`"Bearer"\` → \`Authorization: Bearer <token>\`). Common values: \`"Bearer"\`, \`"Basic"\`, \`"Token"\`. Leave empty if the API uses raw tokens with no prefix. Ignored for non-Authorization headers. **Derive from**: (1) OpenAPI spec \`securitySchemes\`/\`securityDefinitions\`, (2) source code auth middleware (\`passport.use\`, \`jwt.verify\`, header parsing logic), (3) workspace \`api.authType\`. **Do NOT guess.**
107
- - \`authToken\`: The full header value, used verbatim. When omitted, \`SKYRAMP_PLACEHOLDER_TOKEN\` is auto-generated (combined with \`authScheme\` for Authorization headers). Only provide when the header needs a specific format e.g., \`"session=${AUTH_PLACEHOLDER_TOKEN}"\` for Cookie. For Authorization headers, use \`authScheme\` instead. **Do NOT fabricate token values.**
109
+ - \`authScheme\`: Only when \`authHeader\` is \`Authorization\`. The prefix before the token (e.g., \`"Bearer"\` → \`Authorization: Bearer <token>\`). **Derive from**: (1) OpenAPI spec \`securitySchemes\`/\`securityDefinitions\`, (2) source code auth middleware, (3) workspace \`api.authType\`. **Do NOT guess.**
110
+ - \`authToken\`: The full header value, used verbatim. When omitted, \`SKYRAMP_PLACEHOLDER_TOKEN\` is auto-generated. Only provide when the header needs a specific format (e.g., \`"session=${AUTH_PLACEHOLDER_TOKEN}"\` for Cookie). **Do NOT fabricate token values.**
108
111
  - \`apiSchema\` is OPTIONAL — omit it for code-first apps without OpenAPI specs.
109
- 6. **CRITICAL — integration test from scenario**: When calling \`skyramp_integration_test_generation\` with a \`scenarioFile\`, ALSO pass \`authHeader\` and the same auth parameters used in scenario generation (\`authScheme\` for Authorization headers, or \`authToken\` for non-Authorization headers).
112
+ 6. **CRITICAL — integration test from scenario**: When calling \`skyramp_integration_test_generation\` with a \`scenarioFile\`:
113
+ - If workspace has \`api.authType\` set: omit auth params entirely — passing auth here alongside workspace \`authType\` causes "Auth header and auth type cannot be supported at the same time".
114
+ - If workspace has no \`api.authType\`: pass \`authHeader\` only (no \`authScheme\`).
110
115
  7. **If the workspace file does not exist**, or the needed values (language, framework, outputDir) are missing from the workspace config, ASK the user which language and framework they want before calling the tool.
111
116
  8. The user can always override workspace defaults by explicitly specifying values in their request.
112
117
  `,
@@ -160,6 +165,7 @@ const prompts = [
160
165
  registerStartTraceCollectionPrompt,
161
166
  registerTestHealthPrompt,
162
167
  registerRecommendTestsPrompt,
168
+ registerTraceRecordingPrompt,
163
169
  ];
164
170
  if (process.env.SKYRAMP_FEATURE_TESTBOT === "1") {
165
171
  prompts.push(registerTestbotPrompt);
@@ -213,6 +219,10 @@ if (process.env.SKYRAMP_FEATURE_TESTBOT === "1") {
213
219
  logger.info("TestBot tools enabled via SKYRAMP_FEATURE_TESTBOT");
214
220
  }
215
221
  infrastructureTools.forEach((registerTool) => registerTool(server));
222
+ // Register Playwright browser tools (trace recording via browser automation)
223
+ registerPlaywrightTools(server).catch((err) => {
224
+ logger.error("Failed to register Playwright tools", { error: err });
225
+ });
216
226
  // Global error handlers for crash telemetry
217
227
  process.on("uncaughtException", async (error) => {
218
228
  // Don't send analytics for EPIPE errors
@@ -245,8 +255,15 @@ async function main() {
245
255
  return;
246
256
  isShuttingDown = true;
247
257
  logger.info(`Parent process disconnected (${event}). Cleaning up and exiting...`);
248
- server.close().finally(() => {
249
- process.exit(0);
258
+ // Shut down Playwright browser before exiting
259
+ const playwrightService = getPlaywrightTraceService();
260
+ const cleanupPlaywright = playwrightService
261
+ ? playwrightService.shutdown().catch(() => { })
262
+ : Promise.resolve();
263
+ cleanupPlaywright.finally(() => {
264
+ server.close().finally(() => {
265
+ process.exit(0);
266
+ });
250
267
  });
251
268
  };
252
269
  process.stdin.on("end", () => handleParentDisconnect("stdin end"));
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Service that manages a Playwright TraceRecordingBackend instance,
3
+ * exposing browser tools + skyramp_export_zip for use by the Skyramp MCP.
4
+ *
5
+ * The Playwright fork is CJS; this project is ESM. We use createRequire
6
+ * to bridge the module systems.
7
+ */
8
+ import { createRequire } from "module";
9
+ import { logger } from "../utils/logger.js";
10
+ export class PlaywrightTraceService {
11
+ _backend = null;
12
+ _tools = [];
13
+ _options;
14
+ constructor(options) {
15
+ this._options = options || {};
16
+ }
17
+ async initialize() {
18
+ if (this._backend) {
19
+ logger.info("PlaywrightTraceService already initialized");
20
+ return;
21
+ }
22
+ try {
23
+ // Dynamic require of CJS Playwright module from ESM context
24
+ const require = createRequire(import.meta.url);
25
+ const { TraceRecordingBackend } = require("playwright/lib/mcp/skyramp");
26
+ this._backend = new TraceRecordingBackend({
27
+ headless: this._options.headless,
28
+ outputDir: this._options.outputDir || process.cwd(),
29
+ });
30
+ // Initialize with a synthetic client info
31
+ await this._backend.initialize({
32
+ name: "skyramp-mcp",
33
+ version: "1.0.0",
34
+ roots: [],
35
+ timestamp: Date.now(),
36
+ });
37
+ this._tools = await this._backend.listTools();
38
+ logger.info(`PlaywrightTraceService initialized with ${this._tools.length} tools`);
39
+ }
40
+ catch (error) {
41
+ const msg = error instanceof Error ? error.message : String(error);
42
+ logger.error(`Failed to initialize PlaywrightTraceService: ${msg}`);
43
+ throw error;
44
+ }
45
+ }
46
+ isInitialized() {
47
+ return this._backend !== null;
48
+ }
49
+ getTools() {
50
+ return this._tools;
51
+ }
52
+ async callTool(name, args) {
53
+ if (!this._backend) {
54
+ return {
55
+ content: [
56
+ {
57
+ type: "text",
58
+ text: "### Error\nPlaywright trace service not initialized. This is an internal error.",
59
+ },
60
+ ],
61
+ isError: true,
62
+ };
63
+ }
64
+ return this._backend.callTool(name, args);
65
+ }
66
+ async shutdown() {
67
+ if (this._backend) {
68
+ this._backend.serverClosed?.();
69
+ this._backend = null;
70
+ this._tools = [];
71
+ logger.info("PlaywrightTraceService shut down");
72
+ }
73
+ }
74
+ }
@@ -0,0 +1,3 @@
1
+ export { PlaywrightTraceService, } from "./PlaywrightTraceService.js";
2
+ export { registerPlaywrightTools, getPlaywrightTraceService, } from "./registerPlaywrightTools.js";
3
+ export { registerTraceRecordingPrompt } from "./traceRecordingPrompt.js";
@@ -0,0 +1,117 @@
1
+ /**
2
+ * Registers all Playwright browser tools (+ skyramp_export_zip) as passthrough
3
+ * tools in the Skyramp MCP server, delegating calls to PlaywrightTraceService.
4
+ */
5
+ import { z } from "zod";
6
+ import { logger } from "../utils/logger.js";
7
+ import { PlaywrightTraceService, } from "./PlaywrightTraceService.js";
8
+ let _service = null;
9
+ export function getPlaywrightTraceService() {
10
+ return _service;
11
+ }
12
+ export async function registerPlaywrightTools(server, options) {
13
+ _service = new PlaywrightTraceService(options);
14
+ try {
15
+ await _service.initialize();
16
+ }
17
+ catch (error) {
18
+ const msg = error instanceof Error ? error.message : String(error);
19
+ logger.error(`Failed to initialize Playwright tools — browser tools will not be available: ${msg}`);
20
+ _service = null;
21
+ return;
22
+ }
23
+ const tools = _service.getTools();
24
+ logger.info(`Registering ${tools.length} Playwright browser tools`);
25
+ // Only expose essential browser tools to reduce LLM confusion.
26
+ // The full set (23 tools) overwhelms the LLM and causes it to use
27
+ // browser_evaluate/browser_run_code instead of the simpler tools.
28
+ const ESSENTIAL_TOOLS = new Set([
29
+ 'browser_navigate',
30
+ 'browser_snapshot',
31
+ 'browser_click',
32
+ 'browser_type',
33
+ 'browser_select_option',
34
+ 'browser_press_key',
35
+ 'browser_hover',
36
+ 'browser_tabs',
37
+ 'browser_navigate_back',
38
+ 'browser_wait_for',
39
+ 'browser_take_screenshot',
40
+ 'skyramp_export_zip',
41
+ ]);
42
+ const filteredTools = tools.filter((t) => ESSENTIAL_TOOLS.has(t.name));
43
+ logger.info(`Filtering to ${filteredTools.length} essential tools (from ${tools.length} total)`);
44
+ for (const tool of filteredTools) {
45
+ const zodSchema = jsonSchemaToZod(tool.inputSchema);
46
+ server.registerTool(tool.name, {
47
+ description: tool.description || `Playwright tool: ${tool.name}`,
48
+ inputSchema: zodSchema,
49
+ }, async (params) => {
50
+ if (!_service?.isInitialized()) {
51
+ return {
52
+ content: [
53
+ {
54
+ type: "text",
55
+ text: "### Error\nPlaywright browser tools are not available. The service failed to initialize.",
56
+ },
57
+ ],
58
+ isError: true,
59
+ };
60
+ }
61
+ return _service.callTool(tool.name, params);
62
+ });
63
+ }
64
+ logger.info(`Registered ${filteredTools.length} Playwright tools: ${filteredTools.map((t) => t.name).join(", ")}`);
65
+ }
66
+ function jsonSchemaToZod(schema) {
67
+ const properties = schema.properties || {};
68
+ const required = new Set(schema.required || []);
69
+ const shape = {};
70
+ for (const [key, prop] of Object.entries(properties)) {
71
+ let field;
72
+ switch (prop.type) {
73
+ case "string":
74
+ field = prop.enum
75
+ ? z.enum(prop.enum)
76
+ : z.string();
77
+ break;
78
+ case "number":
79
+ case "integer":
80
+ field = z.number();
81
+ break;
82
+ case "boolean":
83
+ field = z.boolean();
84
+ break;
85
+ case "array":
86
+ field = z.array(prop.items ? jsonSchemaPropertyToZod(prop.items) : z.unknown());
87
+ break;
88
+ default:
89
+ field = z.unknown();
90
+ }
91
+ if (prop.description)
92
+ field = field.describe(prop.description);
93
+ if (prop.default !== undefined)
94
+ field = field.default(prop.default);
95
+ if (!required.has(key))
96
+ field = field.optional();
97
+ shape[key] = field;
98
+ }
99
+ return z.object(shape);
100
+ }
101
+ function jsonSchemaPropertyToZod(prop) {
102
+ switch (prop.type) {
103
+ case "string":
104
+ return prop.enum
105
+ ? z.enum(prop.enum)
106
+ : z.string();
107
+ case "number":
108
+ case "integer":
109
+ return z.number();
110
+ case "boolean":
111
+ return z.boolean();
112
+ case "array":
113
+ return z.array(prop.items ? jsonSchemaPropertyToZod(prop.items) : z.unknown());
114
+ default:
115
+ return z.unknown();
116
+ }
117
+ }
@@ -0,0 +1,54 @@
1
+ /**
2
+ * MCP prompt that guides the LLM through the Playwright-based trace recording
3
+ * and Skyramp test generation flow.
4
+ */
5
+ import { logger } from "../utils/logger.js";
6
+ export function registerTraceRecordingPrompt(server) {
7
+ logger.info("Registering trace recording prompt");
8
+ server.registerPrompt("skyramp_trace_recording_prompt", {
9
+ description: "Guide for recording browser interactions as a Skyramp trace and generating UI tests",
10
+ argsSchema: {},
11
+ }, () => ({
12
+ messages: [
13
+ {
14
+ role: "user",
15
+ content: {
16
+ type: "text",
17
+ text: `## Skyramp Trace Recording & UI Test Generation
18
+
19
+ You have access to Playwright browser tools that let you interact with web applications.
20
+ Use these tools to record a trace of browser interactions, then generate a Skyramp UI test from that trace.
21
+
22
+ ### Flow
23
+
24
+ 1. **Navigate**: ALWAYS call \`browser_navigate\` with the target URL as the very first step, even if the browser seems to already be on that page. This ensures a clean state.
25
+ 2. **Understand the page**: Call \`browser_snapshot\` to see the current page state (ARIA tree).
26
+ 3. **Interact**: Use \`browser_click\`, \`browser_type\`, \`browser_select_option\`, \`browser_press_key\`, etc. to perform the user interactions described in the prompt.
27
+ 4. **Repeat steps 2-3** until all interactions are complete.
28
+ 5. **Export the trace**: Call \`skyramp_export_zip\` with an output path (e.g. \`skyramp_export.zip\`). This produces a zip containing the JSONL trace and HAR network recording.
29
+ 6. **Generate the test**: Call \`skyramp_ui_test_generation\` with \`playwrightInput\` set to the absolute path of the zip file from step 5.
30
+
31
+ ### Tips
32
+ - If a \`browser_click\` or \`browser_type\` fails because the element reference is stale (page updated), call \`browser_snapshot\` to refresh the page state and retry.
33
+ - Use \`browser_snapshot\` liberally — it helps you understand what elements are available.
34
+ - The trace automatically deduplicates retries: if you navigate back to the start URL and redo steps, only the last complete attempt is exported.
35
+ - After generating the test, the tool will suggest running \`skyramp_modularization\` for code quality.
36
+ - **Dropdown/Select components**: For custom dropdowns (Radix, MUI, etc.) that show as \`combobox\` in the snapshot, do NOT use \`browser_select_option\` — it only works on native \`<select>\` elements. Instead: (1) click the combobox to open the dropdown, (2) call \`browser_snapshot\` to see the options in a \`listbox\`, (3) click the desired \`option\`. This three-step pattern is required for all custom dropdown components.
37
+ - **Always take a snapshot after each interaction** that changes the page (click, form submit, navigation) to see the updated state before proceeding.
38
+
39
+ ### Critical rules for clicking
40
+ - **NEVER click container/wrapper divs** (e.g. elements with "container" in their test-id). Always click the actual interactive element inside: a \`button\`, \`link\`, or \`input\`.
41
+ - When the snapshot shows a container with a button inside, click the **button**, not the container. For example, if you see \`div "add-order-products-container" > button "Add"\`, click the button "Add", not the container.
42
+ - To submit forms, click the submit \`button\` (e.g. "Add Order", "Submit"), never the form container.
43
+ - After selecting a product from a dropdown, click the "Add" button to confirm, not the surrounding container.
44
+
45
+ ### Important
46
+ - Do NOT ask the user before calling \`skyramp_export_zip\` — call it automatically as the final step.
47
+ - Do NOT write JSONL or HAR files manually — the export tool handles everything.
48
+ - Do NOT reuse existing zip files from previous sessions — always record fresh.
49
+ `,
50
+ },
51
+ },
52
+ ],
53
+ }));
54
+ }
@@ -12,11 +12,13 @@ export function registerStartTraceCollectionPrompt(mcpServer) {
12
12
  content: {
13
13
  type: "text",
14
14
  text: `
15
- **General information about Skyramp's trace collection:**
15
+ **MANUAL Trace Collection (Docker-based):**
16
+ This is for MANUAL recording where the USER interacts with the browser themselves. Use this ONLY when the user explicitly requests "manual recording", "record myself", "I will interact", or "Docker trace". For AI-driven recording (where the agent drives the browser), use the browser_* tools and skyramp_export_zip instead.
17
+
16
18
  * You can start a Skyramp trace session to capture network traffic from an active terminal window and for activity within a browser.
17
19
  * Once you start a Skyramp trace session, you can stop it any time. Once stopped, a new session will be required to start a new trace collection.
18
20
  * Please refer to the Skyramp documentation at https://www.skyramp.dev/docs/concepts/trace-collection for more details on trace collection.
19
- * Once you have all the data call the start trace generation tool to start the trace collection.
21
+ * Once you have all the data call the stop trace collection tool to save the captured data.
20
22
  * Always ask user if they want to enable playwright for trace collection.
21
23
 
22
24
  **Playwright Configuration Options:**
@@ -1,5 +1,5 @@
1
1
  export const MAX_TESTS_TO_GENERATE = 3;
2
- export const MAX_RECOMMENDATIONS = 10;
2
+ export const MAX_RECOMMENDATIONS = 20;
3
3
  export const MAX_CRITICAL_TESTS = 3;
4
4
  function serializeAuthCallParams(params) {
5
5
  const parts = [`authHeader: "${params.authHeader}"`];
@@ -81,11 +81,11 @@ Choose based on what adds the most value for this PR's changes.
81
81
  relationships in the code. If the pre-drafted scenarios don't match the real data model,
82
82
  replace them with accurate ones.
83
83
  ${isUIOnlyPR ? `
84
- **UI-only PR** — no backend changes. UI and E2E tests are most relevant.
85
- Without Playwright traces, list as additionalRecommendations with trace recording instructions.
84
+ **UI-only PR** — no backend changes. UI tests are most relevant.
85
+ Use Playwright browser tools to auto-record traces and generate UI tests.
86
86
  ` : `
87
- When no Playwright trace exists, still recommend E2E/UI tests with instructions for
88
- recording a trace using \`skyramp_start_trace_collection\` with \`playwright: true\`.
87
+ When no Playwright trace exists, use the Playwright browser tools (\`browser_navigate\`,
88
+ \`browser_click\`, etc.) to record a trace, then export via \`skyramp_export_zip\` for UI tests.
89
89
  `}
90
90
  **No duplicate coverage.** If an existing test already covers an endpoint + test type,
91
91
  recommend a different test that adds new coverage.`;
@@ -151,7 +151,16 @@ To skip auth for unauthenticated endpoints, pass \`authHeader: ""\`.`;
151
151
  authGuidance = `**Auth Header:** \`${authHeaderValue}\` is a non-Authorization header — a placeholder token is auto-generated. Just pass \`authHeader\` — do NOT pass \`authScheme\` (it is only for Authorization headers and will be ignored).
152
152
  To skip auth for unauthenticated endpoints, pass \`authHeader: ""\`.`;
153
153
  }
154
+ const hasWorkspaceAuthType = !!authTypeValue && authTypeValue !== "none";
154
155
  const authCallParams = serializeAuthCallParams(authParams);
156
+ // For skyramp_integration_test_generation with scenarioFile: omit auth entirely when workspace
157
+ // has authType (workspace handles generation-time auth). Without authType, pass authHeader only.
158
+ // NOTE: scenario generation always uses full authCallParams so auth is embedded in the test file
159
+ // and the executor sends the correct Authorization header at run time.
160
+ const authHeaderOnlyParams = serializeAuthCallParams({ authHeader: authParams.authHeader });
161
+ const integrationAuthNote = hasWorkspaceAuthType
162
+ ? `omit auth params entirely — workspace \`api.authType: "${authTypeValue}"\` handles it.`
163
+ : `pass \`${authHeaderOnlyParams}\` only (no \`authScheme\`).`;
155
164
  const authHeaderLine = noAuth
156
165
  ? `**No Auth (from workspace config):** Workspace indicates no authentication. **Verify independently** — if you find auth in the OpenAPI spec or source code, override with the correct \`authHeader\` and \`authScheme\`.`
157
166
  : `**Auth params:** \`${authCallParams}\` — pass to EVERY tool call below.`;
@@ -177,7 +186,7 @@ ${authGuidance}
177
186
  Use unique names with timestamp suffix to avoid conflicts on re-runs.
178
187
  For GET/PUT/DELETE with path IDs, use a placeholder — chaining resolves the real ID.
179
188
  2. Produces a \`scenario_<name>.json\` in the same \`outputDir\` as the test files (not \`.skyramp/\`).
180
- 3. Call \`skyramp_integration_test_generation\` with \`scenarioFile\` AND \`${authCallParams}\`.
189
+ 3. Call \`skyramp_integration_test_generation\` with \`scenarioFile\`: ${integrationAuthNote}
181
190
  Do NOT pass \`chainingKey\` — defaults to \`response.id\`. After generation, the testbot
182
191
  will verify and fix path param chaining in the generated test.
183
192
 
@@ -198,12 +207,18 @@ ${PATH_PARAM_UUID_GUIDANCE}
198
207
  - Both — use when the service boundary is both a provider (owns an API) and a consumer (calls a downstream API).
199
208
  - Neither (default) — use only when the role is ambiguous or no spec is available.
200
209
 
201
- **For UI tests (no Playwright recording):**
202
- 1. \`skyramp_start_trace_collection\` (playwright: true)
203
- 2. Perform browser steps
204
- 3. \`skyramp_stop_trace_collection\`
205
- 4. \`skyramp_ui_test_generation\` with playwright zip
210
+ **For UI tests:**
211
+ 1. \`browser_navigate\` to the target URL (from workspace \`api.baseUrl\`)
212
+ 2. \`browser_snapshot\` to see the page (ARIA tree)
213
+ 3. Interact using \`browser_click\`, \`browser_type\`, \`browser_fill_form\`, etc.
214
+ 4. \`browser_snapshot\` after each interaction that changes the page
215
+ 5. \`skyramp_export_zip\` with an **absolute** output path: \`<repositoryPath>/.skyramp/<test_name>_trace.zip\`
216
+ 6. \`skyramp_ui_test_generation\` with \`playwrightInput\` = the **absolute** path of the exported zip
206
217
 
207
- **For E2E tests:**
208
- Same trace flow, pass both trace file and playwright zip to \`skyramp_e2e_test_generation\`.`;
218
+ Tips: For custom dropdowns (Radix, MUI): click combobox → snapshot → click option (NOT \`browser_select_option\`).
219
+
220
+ **For E2E tests (mixed PR — both backend and frontend changed):**
221
+ Only generate when pre-existing backend trace \`.json\` AND Playwright \`.zip\` both exist in the repo.
222
+ Use them directly with \`skyramp_e2e_test_generation\`.
223
+ If traces are missing, skip E2E and add to \`additionalRecommendations\` with instructions to record them first.`;
209
224
  }
@@ -44,12 +44,25 @@ function computeTiebreakerSeed(endpoints, diffFiles) {
44
44
  return crypto.createHash("sha256").update(canonical).digest("hex").slice(0, 8);
45
45
  }
46
46
  // ── Execution Plan (replaces pre-ranked + scenarios + heuristic sections) ──
47
- function buildExecutionPlan(scored, maxGen, topN, baseUrl, authHeaderValue, authSchemeSnippet, seed, endpointCount, isUIOnlyPR) {
47
+ function buildExecutionPlan(scored, maxGen, topN, baseUrl, authHeaderValue, authSchemeSnippet, authTypeValue, seed, endpointCount, isUIOnlyPR, hasFrontendChanges = false, hasTraces = false) {
48
48
  const generateItems = scored.slice(0, Math.min(maxGen, scored.length));
49
49
  const additionalItems = scored.slice(maxGen, topN);
50
50
  const authRef = authHeaderValue
51
51
  ? `, authHeader: "${authHeaderValue}"${authSchemeSnippet}`
52
52
  : `, authHeader: <check OpenAPI securitySchemes or auth middleware; "" if confirmed unauthenticated>`;
53
+ const hasWorkspaceAuthType = !!authTypeValue && authTypeValue !== "none";
54
+ // For skyramp_scenario_test_generation: always embed full auth so the generated test file
55
+ // includes the correct Authorization header at execution time.
56
+ // The workspace authType conflict only applies to skyramp_integration_test_generation (not scenario gen).
57
+ const scenarioAuthRef = authRef;
58
+ // For skyramp_integration_test_generation with scenarioFile:
59
+ // - If workspace has authType set: omit auth entirely — workspace handles Bearer prefix.
60
+ // - If no authType: pass authHeader only (no authScheme).
61
+ const authHeaderOnlyRef = hasWorkspaceAuthType
62
+ ? ""
63
+ : authHeaderValue
64
+ ? `, authHeader: "${authHeaderValue}"`
65
+ : `, authHeader: <check OpenAPI securitySchemes or auth middleware; "" if confirmed unauthenticated>`;
53
66
  const generateBlocks = generateItems.map((item, i) => {
54
67
  const rank = i + 1;
55
68
  const s = item.scenario;
@@ -63,7 +76,7 @@ function buildExecutionPlan(scored, maxGen, topN, baseUrl, authHeaderValue, auth
63
76
  : "";
64
77
  return (`**#${rank} — GENERATE** | ${testType} | ${s.category} | priority=${item.priority} | ${item.novelty}\n` +
65
78
  `${step.method} ${step.path} → ${step.expectedStatusCode}\n` +
66
- `Tool: skyramp_contract_test_generation({ endpointURL: "${endpointURL}", method: "${step.method}"${authRef}${dataParam} })\n` +
79
+ `Tool: skyramp_contract_test_generation({ endpointURL: "${endpointURL}", method: "${step.method}"${authRef}${dataParam} })\n` + // contract tests always use full authRef
67
80
  `From source: authScheme (OpenAPI securitySchemes or auth middleware)${isBodyMethod ? "; requestData field shapes" : ""}`);
68
81
  }
69
82
  else {
@@ -81,7 +94,7 @@ function buildExecutionPlan(scored, maxGen, topN, baseUrl, authHeaderValue, auth
81
94
  const dataParam = isBodyMethod
82
95
  ? `, requestBody: <${st.method} ${st.path} body from source code schemas>`
83
96
  : "";
84
- return ` skyramp_scenario_test_generation({ scenarioName: "${s.scenarioName}", destination: "${s.scenarioName}", baseURL: "${baseUrl}", method: "${st.method}", path: "${st.path}", statusCode: ${st.expectedStatusCode}${authRef}${dataParam} })`;
97
+ return ` skyramp_scenario_test_generation({ scenarioName: "${s.scenarioName}", destination: "${s.scenarioName}", baseURL: "${baseUrl}", method: "${st.method}", path: "${st.path}", statusCode: ${st.expectedStatusCode}${scenarioAuthRef}${dataParam} })`;
85
98
  }).join("\n");
86
99
  const prereqNote = s.category === "new_endpoint"
87
100
  ? `\nPrerequisite discovery (MANDATORY for new_endpoint): Before executing these tool calls, read the source code for the new endpoint's request body. Look for FK fields (e.g. \`product_id\`, \`user_id\`, \`order_id\`). For each FK field found, prepend one \`skyramp_scenario_test_generation\` call to create that prerequisite resource first, then chain its \`id\` into the dependent step. If no FK fields exist, proceed with the steps above as-is.`
@@ -91,13 +104,21 @@ function buildExecutionPlan(scored, maxGen, topN, baseUrl, authHeaderValue, auth
91
104
  `${stepLines}\n` +
92
105
  `Tool calls:\n` +
93
106
  `${toolCalls}\n` +
94
- ` skyramp_integration_test_generation({ scenarioFile: "scenario_${s.scenarioName}.json"${authRef} })\n` +
107
+ ` skyramp_integration_test_generation({ scenarioFile: "scenario_${s.scenarioName}.json"${authHeaderOnlyRef} })\n` +
95
108
  `From source: requestBody shapes for POST/PUT/PATCH steps; responseBody shapes; authScheme` +
96
109
  prereqNote);
97
110
  }
98
111
  }).join("\n\n");
112
+ // For mixed PRs, always reserve slots for UI and E2E recommendations regardless of whether
113
+ // traces already exist — the user can record them later or the bot can record during the run.
114
+ const needsE2ESlot = hasFrontendChanges && !isUIOnlyPR;
115
+ const needsUISlot = hasFrontendChanges && !isUIOnlyPR;
116
+ const frontendSlots = (needsE2ESlot ? 1 : 0) + (needsUISlot ? 1 : 0);
117
+ const backendAdditionalItems = frontendSlots > 0
118
+ ? additionalItems.slice(0, Math.max(additionalItems.length - frontendSlots, 0))
119
+ : additionalItems;
99
120
  // Additional items — compact listing, no tool calls needed
100
- const additionalLines = additionalItems.map((item, i) => {
121
+ const additionalLines = backendAdditionalItems.map((item, i) => {
101
122
  const rank = maxGen + i + 1;
102
123
  const s = item.scenario;
103
124
  const testType = s.testType ?? (s.steps.length === 1 ? "contract" : "integration");
@@ -106,17 +127,30 @@ function buildExecutionPlan(scored, maxGen, topN, baseUrl, authHeaderValue, auth
106
127
  : `Scenario: ${s.scenarioName} (${s.steps.map(st => `${st.method} ${st.path}`).join(" → ")})`;
107
128
  return `#${rank} [ADDITIONAL] | ${testType} | ${s.category} | priority=${item.priority} | ${item.novelty}\n ${target}\n Validates: ${s.description}`;
108
129
  }).join("\n\n");
109
- const preRankedTotal = scored.length;
110
- const supplementCount = topN - preRankedTotal;
130
+ const uiSlotLine = needsUISlot ? (() => {
131
+ const rank = maxGen + backendAdditionalItems.length + 1;
132
+ const traceNote = hasTraces
133
+ ? "Use an existing Playwright `.zip` trace from the repo."
134
+ : "Record a trace using `browser_navigate` + `browser_snapshot` + `skyramp_export_zip`, then call `skyramp_ui_test_generation`.";
135
+ return `\n\n#${rank} [ADDITIONAL] | UI | workflow | priority=HIGH | new\n Scenario: ui-interaction-for-changed-components (frontend files changed in this diff)\n Validates: Component-level interaction flow for the changed UI — derive the scenario name and steps from the actual changed frontend files. ${traceNote}`;
136
+ })() : "";
137
+ const e2eSlotLine = needsE2ESlot ? (() => {
138
+ const rank = maxGen + backendAdditionalItems.length + (needsUISlot ? 1 : 0) + 1;
139
+ const traceNote = hasTraces
140
+ ? "Call `skyramp_e2e_test_generation` with the discovered trace/recording files."
141
+ : "No traces exist yet — record a backend trace via `skyramp_start_trace_collection` + `skyramp_stop_trace_collection` and a UI trace via Playwright browser tools, then call `skyramp_e2e_test_generation`.";
142
+ return `\n\n#${rank} [ADDITIONAL] | E2E | workflow | priority=HIGH | new\n Scenario: e2e-flow-for-changed-feature (frontend + backend files changed in this diff)\n Validates: Full browser-level flow for the changed UI components end-to-end — derive the scenario name and steps from the actual changed frontend files. ${traceNote}`;
143
+ })() : "";
144
+ const supplementCount = topN - generateItems.length - backendAdditionalItems.length - frontendSlots;
111
145
  const supplementNote = supplementCount > 0
112
- ? `\n**REQUIRED — You MUST add ${supplementCount} more to reach the total of ${topN}.** Draft them from endpoint interactions and source code patterns not yet covered. Use the same 5-dimension rubric and quality gate to assign priority (HIGH/MEDIUM/LOW), testType, and category. Do NOT produce fewer than ${topN} total.`
146
+ ? `\n**REQUIRED — You MUST add ${supplementCount} more to reach the total of ${topN}.** Draft them from endpoint interactions and source code patterns not yet covered. Use the same 5-dimension rubric and quality gate to assign priority (HIGH/MEDIUM/LOW), testType, and category.${hasFrontendChanges && !isUIOnlyPR ? " Since this PR has frontend changes, at least 1 of these should be a UI or E2E test targeting the changed components." : ""} Do NOT produce fewer than ${topN} total.`
113
147
  : "";
114
148
  return `## Execution Plan
115
149
  Seed: ${seed} | Endpoints: ${endpointCount} | Budget: ${generateItems.length} generate + ${Math.max(topN - generateItems.length, 0)} additional = ${topN} total
116
150
 
117
151
  **Step 1 — Source-Code Enrichment (MANDATORY before executing anything)**
118
152
  Read the source code for ALL changed files. Look for:
119
- - **Auth middleware** (passport, jwt.verify, authMiddleware, @requires_auth, Depends(get_current_user), @UseGuards, EnsureSessionDep, session middleware) — if found, override \`authHeader\` and \`authScheme\` in EVERY tool call even if workspace.yml says authType: none. A workspace misconfiguration must never cause tests to run unauthenticated against a protected API.
153
+ - **Auth middleware** (passport, jwt.verify, authMiddleware, @requires_auth, Depends(get_current_user), @UseGuards, EnsureSessionDep, session middleware) — if found, override \`authHeader\` and \`authScheme\` in scenario and contract tool calls even if workspace.yml says authType: none. Exception: for \`skyramp_integration_test_generation\` with \`scenarioFile\`, omit auth params entirely if workspace has \`api.authType\` set (workspace handles it); if workspace has no \`authType\`, pass \`authHeader\` only.
120
154
  - Business rules and formulas (e.g. total_cost = compute * rate + memory * rate)
121
155
  - State transitions and domain constraints (e.g. budget cannot drop below current spend)
122
156
  - Validation logic (field constraints, cross-field dependencies)
@@ -178,7 +212,7 @@ ${generateBlocks || " (no pre-ranked generate items — draft your own based on
178
212
 
179
213
  ### ADDITIONAL (list in additionalRecommendations in this order after Step 1 insertion)
180
214
 
181
- ${additionalLines || " (none pre-ranked)"}
215
+ ${additionalLines || " (none pre-ranked)"}${uiSlotLine}${e2eSlotLine}
182
216
  ${supplementNote}
183
217
 
184
218
  **You MUST produce EXACTLY ${topN} total recommendations: ${generateItems.length} to generate + ${Math.max(topN - generateItems.length, 0)} as additionalRecommendations. Do NOT produce fewer. Generate recommendations now.**
@@ -218,7 +252,7 @@ export function buildRecommendationPrompt(analysis, analysisScope = "full_repo",
218
252
  ? `You are in **PR mode**. Maximize test coverage for the branch changes.
219
253
  Focus on tests that validate the changed fields, endpoints, and their interactions.
220
254
  ${isUIOnlyPR ? `\n**UI-only PR** — no backend changes. UI and E2E tests are most relevant.`
221
- : hasFrontendChanges ? `\n**Mixed PR** — both frontend and backend changes detected.`
255
+ : hasFrontendChanges ? `\n**Mixed PR** — both frontend and backend changes detected. Backend and E2E/UI tests are both required.`
222
256
  : ``}
223
257
  Output should be concise and immediately actionable.`
224
258
  : `You are in **Repo mode**. Comprehensive test strategy across all endpoints.`;
@@ -337,6 +371,13 @@ ${detailBlocks}
337
371
  const errorB = b.scenario.steps.some(s => s.interactionType === "error" || s.interactionType === "edge-case") ? 1 : 0;
338
372
  if (errorB !== errorA)
339
373
  return errorB - errorA;
374
+ // Use locale-independent comparison to avoid runtime-locale non-determinism
375
+ const nameA = a.scenario.scenarioName;
376
+ const nameB = b.scenario.scenarioName;
377
+ if (nameA < nameB)
378
+ return -1;
379
+ if (nameA > nameB)
380
+ return 1;
340
381
  const hashA = parseInt(crypto.createHash("sha256").update(seed + a.scenario.scenarioName).digest("hex").slice(0, 8), 16);
341
382
  const hashB = parseInt(crypto.createHash("sha256").update(seed + b.scenario.scenarioName).digest("hex").slice(0, 8), 16);
342
383
  return hashA - hashB;
@@ -386,7 +427,7 @@ Do not churn recommendations without cause.
386
427
  `;
387
428
  }
388
429
  else if (scored.length > 0) {
389
- mainSection = buildExecutionPlan(scored, maxGen, topN, analysis.apiEndpoints.baseUrl, authHeaderValue, authSchemeSnippet, seed, endpointCount, isUIOnlyPR);
430
+ mainSection = buildExecutionPlan(scored, maxGen, topN, analysis.apiEndpoints.baseUrl, authHeaderValue, authSchemeSnippet, authTypeValue, seed, endpointCount, isUIOnlyPR, hasFrontendChanges, hasTraces);
390
431
  }
391
432
  else {
392
433
  mainSection = `
@@ -198,7 +198,7 @@ Trace File:
198
198
 
199
199
  **CRITICAL: FOR A SINGLE SCENARIO CREATE A SINGLE SCENARIO FILE WITH EACH STEP AS A JSON OBJECT IN THE ARRAY.**
200
200
 
201
- **CRITICAL: SHOW STEPS TO START/STOP PLAYWRIGHT TRACE COLLECTION FOR UI TESTS. NEVER SHOW THE CLI COMMANDS.**
201
+ **CRITICAL: For UI test trace collection, use the browser_* tools (browser_navigate, browser_click, browser_type, etc.) to interact with the application, then call skyramp_export_zip to export the trace zip. Do NOT use skyramp_start_trace_collection/skyramp_stop_trace_collection.**
202
202
  `,
203
203
  },
204
204
  },