@skyramp/mcp 0.0.63 → 0.0.64-rc.2
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.
- package/build/index.js +23 -6
- package/build/playwright/PlaywrightTraceService.js +74 -0
- package/build/playwright/index.js +3 -0
- package/build/playwright/registerPlaywrightTools.js +117 -0
- package/build/playwright/traceRecordingPrompt.js +54 -0
- package/build/prompts/startTraceCollectionPrompts.js +4 -2
- package/build/prompts/test-recommendation/recommendationSections.js +88 -212
- package/build/prompts/test-recommendation/test-recommendation-prompt.js +336 -85
- package/build/prompts/test-recommendation/test-recommendation-prompt.test.js +58 -15
- package/build/prompts/testGenerationPrompt.js +1 -1
- package/build/prompts/testbot/testbot-prompts.js +44 -22
- package/build/services/ModularizationService.js +1 -1
- package/build/services/TestExecutionService.js +1 -1
- package/build/services/TestGenerationService.js +8 -1
- package/build/services/TestGenerationService.test.js +11 -11
- package/build/tools/code-refactor/modularizationTool.js +50 -8
- package/build/tools/generate-tests/generateContractRestTool.js +125 -12
- package/build/tools/generate-tests/generateIntegrationRestTool.js +83 -1
- package/build/tools/generate-tests/generateUIRestTool.js +10 -2
- package/build/tools/submitReportTool.js +26 -7
- package/build/tools/submitReportTool.test.js +1 -1
- package/build/tools/test-management/analyzeChangesTool.js +9 -4
- package/build/tools/trace/startTraceCollectionTool.js +6 -9
- package/build/tools/trace/stopTraceCollectionTool.js +2 -2
- package/build/types/RepositoryAnalysis.js +3 -1
- package/build/utils/normalizeParams.js +45 -0
- package/build/utils/scenarioDrafting.js +418 -93
- package/build/utils/scenarioDrafting.test.js +190 -2
- package/build/utils/trace-parser.js +49 -22
- package/node_modules/playwright/ThirdPartyNotices.txt +7456 -0
- package/node_modules/playwright/cli.js +19 -0
- package/node_modules/playwright/index.d.ts +17 -0
- package/node_modules/playwright/index.js +17 -0
- package/node_modules/playwright/index.mjs +18 -0
- package/node_modules/playwright/jsx-runtime.js +42 -0
- package/node_modules/playwright/jsx-runtime.mjs +21 -0
- package/node_modules/playwright/lib/agents/agentParser.js +89 -0
- package/node_modules/playwright/lib/agents/copilot-setup-steps.yml +34 -0
- package/node_modules/playwright/lib/agents/generateAgents.js +348 -0
- package/node_modules/playwright/lib/agents/playwright-test-coverage.prompt.md +31 -0
- package/node_modules/playwright/lib/agents/playwright-test-generate.prompt.md +8 -0
- package/node_modules/playwright/lib/agents/playwright-test-generator.agent.md +88 -0
- package/node_modules/playwright/lib/agents/playwright-test-heal.prompt.md +6 -0
- package/node_modules/playwright/lib/agents/playwright-test-healer.agent.md +55 -0
- package/node_modules/playwright/lib/agents/playwright-test-plan.prompt.md +9 -0
- package/node_modules/playwright/lib/agents/playwright-test-planner.agent.md +73 -0
- package/node_modules/playwright/lib/common/config.js +282 -0
- package/node_modules/playwright/lib/common/configLoader.js +344 -0
- package/node_modules/playwright/lib/common/esmLoaderHost.js +104 -0
- package/node_modules/playwright/lib/common/expectBundle.js +28 -0
- package/node_modules/playwright/lib/common/expectBundleImpl.js +407 -0
- package/node_modules/playwright/lib/common/fixtures.js +302 -0
- package/node_modules/playwright/lib/common/globals.js +58 -0
- package/node_modules/playwright/lib/common/ipc.js +60 -0
- package/node_modules/playwright/lib/common/poolBuilder.js +85 -0
- package/node_modules/playwright/lib/common/process.js +132 -0
- package/node_modules/playwright/lib/common/suiteUtils.js +140 -0
- package/node_modules/playwright/lib/common/test.js +321 -0
- package/node_modules/playwright/lib/common/testLoader.js +101 -0
- package/node_modules/playwright/lib/common/testType.js +298 -0
- package/node_modules/playwright/lib/common/validators.js +68 -0
- package/node_modules/playwright/lib/fsWatcher.js +67 -0
- package/node_modules/playwright/lib/index.js +726 -0
- package/node_modules/playwright/lib/internalsForTest.js +42 -0
- package/node_modules/playwright/lib/isomorphic/events.js +77 -0
- package/node_modules/playwright/lib/isomorphic/folders.js +30 -0
- package/node_modules/playwright/lib/isomorphic/stringInternPool.js +69 -0
- package/node_modules/playwright/lib/isomorphic/teleReceiver.js +521 -0
- package/node_modules/playwright/lib/isomorphic/teleSuiteUpdater.js +157 -0
- package/node_modules/playwright/lib/isomorphic/testServerConnection.js +225 -0
- package/node_modules/playwright/lib/isomorphic/testServerInterface.js +16 -0
- package/node_modules/playwright/lib/isomorphic/testTree.js +329 -0
- package/node_modules/playwright/lib/isomorphic/types.d.js +16 -0
- package/node_modules/playwright/lib/loader/loaderMain.js +59 -0
- package/node_modules/playwright/lib/matchers/expect.js +311 -0
- package/node_modules/playwright/lib/matchers/matcherHint.js +44 -0
- package/node_modules/playwright/lib/matchers/matchers.js +383 -0
- package/node_modules/playwright/lib/matchers/toBeTruthy.js +75 -0
- package/node_modules/playwright/lib/matchers/toEqual.js +100 -0
- package/node_modules/playwright/lib/matchers/toHaveURL.js +101 -0
- package/node_modules/playwright/lib/matchers/toMatchAriaSnapshot.js +159 -0
- package/node_modules/playwright/lib/matchers/toMatchSnapshot.js +342 -0
- package/node_modules/playwright/lib/matchers/toMatchText.js +99 -0
- package/node_modules/playwright/lib/mcp/browser/browserContextFactory.js +329 -0
- package/node_modules/playwright/lib/mcp/browser/browserServerBackend.js +84 -0
- package/node_modules/playwright/lib/mcp/browser/config.js +421 -0
- package/node_modules/playwright/lib/mcp/browser/context.js +296 -0
- package/node_modules/playwright/lib/mcp/browser/response.js +278 -0
- package/node_modules/playwright/lib/mcp/browser/sessionLog.js +75 -0
- package/node_modules/playwright/lib/mcp/browser/tab.js +343 -0
- package/node_modules/playwright/lib/mcp/browser/tools/common.js +65 -0
- package/node_modules/playwright/lib/mcp/browser/tools/console.js +46 -0
- package/node_modules/playwright/lib/mcp/browser/tools/dialogs.js +60 -0
- package/node_modules/playwright/lib/mcp/browser/tools/evaluate.js +61 -0
- package/node_modules/playwright/lib/mcp/browser/tools/files.js +58 -0
- package/node_modules/playwright/lib/mcp/browser/tools/form.js +63 -0
- package/node_modules/playwright/lib/mcp/browser/tools/install.js +72 -0
- package/node_modules/playwright/lib/mcp/browser/tools/keyboard.js +107 -0
- package/node_modules/playwright/lib/mcp/browser/tools/mouse.js +107 -0
- package/node_modules/playwright/lib/mcp/browser/tools/navigate.js +71 -0
- package/node_modules/playwright/lib/mcp/browser/tools/network.js +63 -0
- package/node_modules/playwright/lib/mcp/browser/tools/open.js +57 -0
- package/node_modules/playwright/lib/mcp/browser/tools/pdf.js +49 -0
- package/node_modules/playwright/lib/mcp/browser/tools/runCode.js +78 -0
- package/node_modules/playwright/lib/mcp/browser/tools/screenshot.js +93 -0
- package/node_modules/playwright/lib/mcp/browser/tools/snapshot.js +173 -0
- package/node_modules/playwright/lib/mcp/browser/tools/tabs.js +67 -0
- package/node_modules/playwright/lib/mcp/browser/tools/tool.js +47 -0
- package/node_modules/playwright/lib/mcp/browser/tools/tracing.js +74 -0
- package/node_modules/playwright/lib/mcp/browser/tools/utils.js +94 -0
- package/node_modules/playwright/lib/mcp/browser/tools/verify.js +143 -0
- package/node_modules/playwright/lib/mcp/browser/tools/wait.js +63 -0
- package/node_modules/playwright/lib/mcp/browser/tools.js +84 -0
- package/node_modules/playwright/lib/mcp/browser/watchdog.js +44 -0
- package/node_modules/playwright/lib/mcp/config.d.js +16 -0
- package/node_modules/playwright/lib/mcp/extension/cdpRelay.js +351 -0
- package/node_modules/playwright/lib/mcp/extension/extensionContextFactory.js +76 -0
- package/node_modules/playwright/lib/mcp/extension/protocol.js +28 -0
- package/node_modules/playwright/lib/mcp/index.js +61 -0
- package/node_modules/playwright/lib/mcp/log.js +35 -0
- package/node_modules/playwright/lib/mcp/program.js +111 -0
- package/node_modules/playwright/lib/mcp/sdk/exports.js +28 -0
- package/node_modules/playwright/lib/mcp/sdk/http.js +152 -0
- package/node_modules/playwright/lib/mcp/sdk/inProcessTransport.js +71 -0
- package/node_modules/playwright/lib/mcp/sdk/server.js +223 -0
- package/node_modules/playwright/lib/mcp/sdk/tool.js +47 -0
- package/node_modules/playwright/lib/mcp/skyramp/exportTool.js +88 -0
- package/node_modules/playwright/lib/mcp/skyramp/index.js +36 -0
- package/node_modules/playwright/lib/mcp/skyramp/traceRecordingBackend.js +236 -0
- package/node_modules/playwright/lib/mcp/skyramp/types.js +31 -0
- package/node_modules/playwright/lib/mcp/terminal/cli.js +296 -0
- package/node_modules/playwright/lib/mcp/terminal/command.js +56 -0
- package/node_modules/playwright/lib/mcp/terminal/commands.js +333 -0
- package/node_modules/playwright/lib/mcp/terminal/daemon.js +129 -0
- package/node_modules/playwright/lib/mcp/terminal/help.json +32 -0
- package/node_modules/playwright/lib/mcp/terminal/helpGenerator.js +88 -0
- package/node_modules/playwright/lib/mcp/terminal/socketConnection.js +80 -0
- package/node_modules/playwright/lib/mcp/test/browserBackend.js +98 -0
- package/node_modules/playwright/lib/mcp/test/generatorTools.js +122 -0
- package/node_modules/playwright/lib/mcp/test/plannerTools.js +145 -0
- package/node_modules/playwright/lib/mcp/test/seed.js +82 -0
- package/node_modules/playwright/lib/mcp/test/skyRampExport.js +313 -0
- package/node_modules/playwright/lib/mcp/test/streams.js +44 -0
- package/node_modules/playwright/lib/mcp/test/testBackend.js +99 -0
- package/node_modules/playwright/lib/mcp/test/testContext.js +285 -0
- package/node_modules/playwright/lib/mcp/test/testTool.js +30 -0
- package/node_modules/playwright/lib/mcp/test/testTools.js +108 -0
- package/node_modules/playwright/lib/plugins/gitCommitInfoPlugin.js +198 -0
- package/node_modules/playwright/lib/plugins/index.js +28 -0
- package/node_modules/playwright/lib/plugins/webServerPlugin.js +237 -0
- package/node_modules/playwright/lib/program.js +417 -0
- package/node_modules/playwright/lib/reporters/base.js +634 -0
- package/node_modules/playwright/lib/reporters/blob.js +138 -0
- package/node_modules/playwright/lib/reporters/dot.js +99 -0
- package/node_modules/playwright/lib/reporters/empty.js +32 -0
- package/node_modules/playwright/lib/reporters/github.js +128 -0
- package/node_modules/playwright/lib/reporters/html.js +633 -0
- package/node_modules/playwright/lib/reporters/internalReporter.js +138 -0
- package/node_modules/playwright/lib/reporters/json.js +254 -0
- package/node_modules/playwright/lib/reporters/junit.js +232 -0
- package/node_modules/playwright/lib/reporters/line.js +131 -0
- package/node_modules/playwright/lib/reporters/list.js +253 -0
- package/node_modules/playwright/lib/reporters/listModeReporter.js +69 -0
- package/node_modules/playwright/lib/reporters/markdown.js +144 -0
- package/node_modules/playwright/lib/reporters/merge.js +558 -0
- package/node_modules/playwright/lib/reporters/multiplexer.js +112 -0
- package/node_modules/playwright/lib/reporters/reporterV2.js +102 -0
- package/node_modules/playwright/lib/reporters/teleEmitter.js +317 -0
- package/node_modules/playwright/lib/reporters/versions/blobV1.js +16 -0
- package/node_modules/playwright/lib/runner/dispatcher.js +530 -0
- package/node_modules/playwright/lib/runner/failureTracker.js +72 -0
- package/node_modules/playwright/lib/runner/lastRun.js +77 -0
- package/node_modules/playwright/lib/runner/loadUtils.js +334 -0
- package/node_modules/playwright/lib/runner/loaderHost.js +89 -0
- package/node_modules/playwright/lib/runner/processHost.js +180 -0
- package/node_modules/playwright/lib/runner/projectUtils.js +241 -0
- package/node_modules/playwright/lib/runner/rebase.js +189 -0
- package/node_modules/playwright/lib/runner/reporters.js +138 -0
- package/node_modules/playwright/lib/runner/sigIntWatcher.js +96 -0
- package/node_modules/playwright/lib/runner/storage.js +91 -0
- package/node_modules/playwright/lib/runner/taskRunner.js +127 -0
- package/node_modules/playwright/lib/runner/tasks.js +410 -0
- package/node_modules/playwright/lib/runner/testGroups.js +125 -0
- package/node_modules/playwright/lib/runner/testRunner.js +398 -0
- package/node_modules/playwright/lib/runner/testServer.js +269 -0
- package/node_modules/playwright/lib/runner/uiModeReporter.js +30 -0
- package/node_modules/playwright/lib/runner/vcs.js +72 -0
- package/node_modules/playwright/lib/runner/watchMode.js +396 -0
- package/node_modules/playwright/lib/runner/workerHost.js +104 -0
- package/node_modules/playwright/lib/third_party/pirates.js +62 -0
- package/node_modules/playwright/lib/third_party/tsconfig-loader.js +103 -0
- package/node_modules/playwright/lib/transform/babelBundle.js +46 -0
- package/node_modules/playwright/lib/transform/babelBundleImpl.js +461 -0
- package/node_modules/playwright/lib/transform/compilationCache.js +274 -0
- package/node_modules/playwright/lib/transform/esmLoader.js +103 -0
- package/node_modules/playwright/lib/transform/md.js +221 -0
- package/node_modules/playwright/lib/transform/portTransport.js +67 -0
- package/node_modules/playwright/lib/transform/transform.js +303 -0
- package/node_modules/playwright/lib/util.js +400 -0
- package/node_modules/playwright/lib/utilsBundle.js +50 -0
- package/node_modules/playwright/lib/utilsBundleImpl.js +103 -0
- package/node_modules/playwright/lib/worker/fixtureRunner.js +262 -0
- package/node_modules/playwright/lib/worker/testInfo.js +536 -0
- package/node_modules/playwright/lib/worker/testTracing.js +345 -0
- package/node_modules/playwright/lib/worker/timeoutManager.js +174 -0
- package/node_modules/playwright/lib/worker/util.js +31 -0
- package/node_modules/playwright/lib/worker/workerMain.js +530 -0
- package/node_modules/playwright/package.json +73 -0
- package/node_modules/playwright/test.d.ts +18 -0
- package/node_modules/playwright/test.js +24 -0
- package/node_modules/playwright/test.mjs +34 -0
- package/node_modules/playwright/types/test.d.ts +10251 -0
- package/node_modules/playwright/types/testReporter.d.ts +822 -0
- package/node_modules/playwright-core/LICENSE +202 -0
- package/node_modules/playwright-core/NOTICE +5 -0
- package/node_modules/playwright-core/README.md +3 -0
- package/node_modules/playwright-core/ThirdPartyNotices.txt +4076 -0
- package/node_modules/playwright-core/bin/install_media_pack.ps1 +5 -0
- package/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +33 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
- package/node_modules/playwright-core/browsers.json +79 -0
- package/node_modules/playwright-core/cli.js +18 -0
- package/node_modules/playwright-core/index.d.ts +17 -0
- package/node_modules/playwright-core/index.js +32 -0
- package/node_modules/playwright-core/index.mjs +28 -0
- package/node_modules/playwright-core/lib/androidServerImpl.js +65 -0
- package/node_modules/playwright-core/lib/browserServerImpl.js +120 -0
- package/node_modules/playwright-core/lib/cli/driver.js +97 -0
- package/node_modules/playwright-core/lib/cli/program.js +589 -0
- package/node_modules/playwright-core/lib/cli/programWithTestStub.js +74 -0
- package/node_modules/playwright-core/lib/client/android.js +361 -0
- package/node_modules/playwright-core/lib/client/api.js +137 -0
- package/node_modules/playwright-core/lib/client/artifact.js +79 -0
- package/node_modules/playwright-core/lib/client/browser.js +161 -0
- package/node_modules/playwright-core/lib/client/browserContext.js +582 -0
- package/node_modules/playwright-core/lib/client/browserType.js +185 -0
- package/node_modules/playwright-core/lib/client/cdpSession.js +51 -0
- package/node_modules/playwright-core/lib/client/channelOwner.js +194 -0
- package/node_modules/playwright-core/lib/client/clientHelper.js +64 -0
- package/node_modules/playwright-core/lib/client/clientInstrumentation.js +55 -0
- package/node_modules/playwright-core/lib/client/clientStackTrace.js +69 -0
- package/node_modules/playwright-core/lib/client/clock.js +68 -0
- package/node_modules/playwright-core/lib/client/connection.js +318 -0
- package/node_modules/playwright-core/lib/client/consoleMessage.js +58 -0
- package/node_modules/playwright-core/lib/client/coverage.js +44 -0
- package/node_modules/playwright-core/lib/client/dialog.js +56 -0
- package/node_modules/playwright-core/lib/client/download.js +62 -0
- package/node_modules/playwright-core/lib/client/electron.js +138 -0
- package/node_modules/playwright-core/lib/client/elementHandle.js +284 -0
- package/node_modules/playwright-core/lib/client/errors.js +77 -0
- package/node_modules/playwright-core/lib/client/eventEmitter.js +314 -0
- package/node_modules/playwright-core/lib/client/events.js +103 -0
- package/node_modules/playwright-core/lib/client/fetch.js +368 -0
- package/node_modules/playwright-core/lib/client/fileChooser.js +46 -0
- package/node_modules/playwright-core/lib/client/fileUtils.js +34 -0
- package/node_modules/playwright-core/lib/client/frame.js +409 -0
- package/node_modules/playwright-core/lib/client/harRouter.js +87 -0
- package/node_modules/playwright-core/lib/client/input.js +84 -0
- package/node_modules/playwright-core/lib/client/jsHandle.js +109 -0
- package/node_modules/playwright-core/lib/client/jsonPipe.js +39 -0
- package/node_modules/playwright-core/lib/client/localUtils.js +60 -0
- package/node_modules/playwright-core/lib/client/locator.js +369 -0
- package/node_modules/playwright-core/lib/client/network.js +747 -0
- package/node_modules/playwright-core/lib/client/page.js +745 -0
- package/node_modules/playwright-core/lib/client/pageAgent.js +64 -0
- package/node_modules/playwright-core/lib/client/platform.js +77 -0
- package/node_modules/playwright-core/lib/client/playwright.js +71 -0
- package/node_modules/playwright-core/lib/client/selectors.js +55 -0
- package/node_modules/playwright-core/lib/client/stream.js +39 -0
- package/node_modules/playwright-core/lib/client/timeoutSettings.js +79 -0
- package/node_modules/playwright-core/lib/client/tracing.js +119 -0
- package/node_modules/playwright-core/lib/client/types.js +28 -0
- package/node_modules/playwright-core/lib/client/video.js +59 -0
- package/node_modules/playwright-core/lib/client/waiter.js +142 -0
- package/node_modules/playwright-core/lib/client/webError.js +39 -0
- package/node_modules/playwright-core/lib/client/webSocket.js +93 -0
- package/node_modules/playwright-core/lib/client/worker.js +85 -0
- package/node_modules/playwright-core/lib/client/writableStream.js +39 -0
- package/node_modules/playwright-core/lib/generated/bindingsControllerSource.js +28 -0
- package/node_modules/playwright-core/lib/generated/clockSource.js +28 -0
- package/node_modules/playwright-core/lib/generated/injectedScriptSource.js +28 -0
- package/node_modules/playwright-core/lib/generated/pollingRecorderSource.js +28 -0
- package/node_modules/playwright-core/lib/generated/storageScriptSource.js +28 -0
- package/node_modules/playwright-core/lib/generated/utilityScriptSource.js +28 -0
- package/node_modules/playwright-core/lib/generated/webSocketMockSource.js +336 -0
- package/node_modules/playwright-core/lib/inProcessFactory.js +60 -0
- package/node_modules/playwright-core/lib/inprocess.js +3 -0
- package/node_modules/playwright-core/lib/mcpBundle.js +84 -0
- package/node_modules/playwright-core/lib/mcpBundleImpl/index.js +147 -0
- package/node_modules/playwright-core/lib/outofprocess.js +76 -0
- package/node_modules/playwright-core/lib/protocol/serializers.js +197 -0
- package/node_modules/playwright-core/lib/protocol/validator.js +2969 -0
- package/node_modules/playwright-core/lib/protocol/validatorPrimitives.js +193 -0
- package/node_modules/playwright-core/lib/remote/playwrightConnection.js +129 -0
- package/node_modules/playwright-core/lib/remote/playwrightServer.js +334 -0
- package/node_modules/playwright-core/lib/server/agent/actionRunner.js +335 -0
- package/node_modules/playwright-core/lib/server/agent/actions.js +128 -0
- package/node_modules/playwright-core/lib/server/agent/codegen.js +111 -0
- package/node_modules/playwright-core/lib/server/agent/context.js +150 -0
- package/node_modules/playwright-core/lib/server/agent/expectTools.js +156 -0
- package/node_modules/playwright-core/lib/server/agent/pageAgent.js +204 -0
- package/node_modules/playwright-core/lib/server/agent/performTools.js +262 -0
- package/node_modules/playwright-core/lib/server/agent/tool.js +109 -0
- package/node_modules/playwright-core/lib/server/android/android.js +465 -0
- package/node_modules/playwright-core/lib/server/android/backendAdb.js +177 -0
- package/node_modules/playwright-core/lib/server/artifact.js +127 -0
- package/node_modules/playwright-core/lib/server/bidi/bidiBrowser.js +549 -0
- package/node_modules/playwright-core/lib/server/bidi/bidiChromium.js +149 -0
- package/node_modules/playwright-core/lib/server/bidi/bidiConnection.js +213 -0
- package/node_modules/playwright-core/lib/server/bidi/bidiDeserializer.js +116 -0
- package/node_modules/playwright-core/lib/server/bidi/bidiExecutionContext.js +267 -0
- package/node_modules/playwright-core/lib/server/bidi/bidiFirefox.js +128 -0
- package/node_modules/playwright-core/lib/server/bidi/bidiInput.js +146 -0
- package/node_modules/playwright-core/lib/server/bidi/bidiNetworkManager.js +383 -0
- package/node_modules/playwright-core/lib/server/bidi/bidiOverCdp.js +102 -0
- package/node_modules/playwright-core/lib/server/bidi/bidiPage.js +583 -0
- package/node_modules/playwright-core/lib/server/bidi/bidiPdf.js +106 -0
- package/node_modules/playwright-core/lib/server/bidi/third_party/bidiCommands.d.js +22 -0
- package/node_modules/playwright-core/lib/server/bidi/third_party/bidiKeyboard.js +256 -0
- package/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocol.js +24 -0
- package/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolCore.js +180 -0
- package/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolPermissions.js +42 -0
- package/node_modules/playwright-core/lib/server/bidi/third_party/bidiSerializer.js +148 -0
- package/node_modules/playwright-core/lib/server/bidi/third_party/firefoxPrefs.js +259 -0
- package/node_modules/playwright-core/lib/server/browser.js +149 -0
- package/node_modules/playwright-core/lib/server/browserContext.js +702 -0
- package/node_modules/playwright-core/lib/server/browserType.js +336 -0
- package/node_modules/playwright-core/lib/server/callLog.js +82 -0
- package/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
- package/node_modules/playwright-core/lib/server/chromium/chromium.js +397 -0
- package/node_modules/playwright-core/lib/server/chromium/chromiumSwitches.js +104 -0
- package/node_modules/playwright-core/lib/server/chromium/crBrowser.js +520 -0
- package/node_modules/playwright-core/lib/server/chromium/crConnection.js +197 -0
- package/node_modules/playwright-core/lib/server/chromium/crCoverage.js +235 -0
- package/node_modules/playwright-core/lib/server/chromium/crDevTools.js +111 -0
- package/node_modules/playwright-core/lib/server/chromium/crDragDrop.js +131 -0
- package/node_modules/playwright-core/lib/server/chromium/crExecutionContext.js +146 -0
- package/node_modules/playwright-core/lib/server/chromium/crInput.js +187 -0
- package/node_modules/playwright-core/lib/server/chromium/crNetworkManager.js +707 -0
- package/node_modules/playwright-core/lib/server/chromium/crPage.js +1001 -0
- package/node_modules/playwright-core/lib/server/chromium/crPdf.js +121 -0
- package/node_modules/playwright-core/lib/server/chromium/crProtocolHelper.js +145 -0
- package/node_modules/playwright-core/lib/server/chromium/crServiceWorker.js +136 -0
- package/node_modules/playwright-core/lib/server/chromium/defaultFontFamilies.js +162 -0
- package/node_modules/playwright-core/lib/server/chromium/protocol.d.js +16 -0
- package/node_modules/playwright-core/lib/server/clock.js +149 -0
- package/node_modules/playwright-core/lib/server/codegen/csharp.js +327 -0
- package/node_modules/playwright-core/lib/server/codegen/java.js +274 -0
- package/node_modules/playwright-core/lib/server/codegen/javascript.js +247 -0
- package/node_modules/playwright-core/lib/server/codegen/jsonl.js +52 -0
- package/node_modules/playwright-core/lib/server/codegen/language.js +132 -0
- package/node_modules/playwright-core/lib/server/codegen/languages.js +68 -0
- package/node_modules/playwright-core/lib/server/codegen/python.js +279 -0
- package/node_modules/playwright-core/lib/server/codegen/types.js +16 -0
- package/node_modules/playwright-core/lib/server/console.js +57 -0
- package/node_modules/playwright-core/lib/server/cookieStore.js +206 -0
- package/node_modules/playwright-core/lib/server/debugController.js +191 -0
- package/node_modules/playwright-core/lib/server/debugger.js +119 -0
- package/node_modules/playwright-core/lib/server/deviceDescriptors.js +39 -0
- package/node_modules/playwright-core/lib/server/deviceDescriptorsSource.json +1779 -0
- package/node_modules/playwright-core/lib/server/dialog.js +116 -0
- package/node_modules/playwright-core/lib/server/dispatchers/androidDispatcher.js +325 -0
- package/node_modules/playwright-core/lib/server/dispatchers/artifactDispatcher.js +118 -0
- package/node_modules/playwright-core/lib/server/dispatchers/browserContextDispatcher.js +384 -0
- package/node_modules/playwright-core/lib/server/dispatchers/browserDispatcher.js +118 -0
- package/node_modules/playwright-core/lib/server/dispatchers/browserTypeDispatcher.js +64 -0
- package/node_modules/playwright-core/lib/server/dispatchers/cdpSessionDispatcher.js +44 -0
- package/node_modules/playwright-core/lib/server/dispatchers/debugControllerDispatcher.js +78 -0
- package/node_modules/playwright-core/lib/server/dispatchers/dialogDispatcher.js +47 -0
- package/node_modules/playwright-core/lib/server/dispatchers/dispatcher.js +364 -0
- package/node_modules/playwright-core/lib/server/dispatchers/electronDispatcher.js +89 -0
- package/node_modules/playwright-core/lib/server/dispatchers/elementHandlerDispatcher.js +181 -0
- package/node_modules/playwright-core/lib/server/dispatchers/frameDispatcher.js +227 -0
- package/node_modules/playwright-core/lib/server/dispatchers/jsHandleDispatcher.js +85 -0
- package/node_modules/playwright-core/lib/server/dispatchers/jsonPipeDispatcher.js +58 -0
- package/node_modules/playwright-core/lib/server/dispatchers/localUtilsDispatcher.js +149 -0
- package/node_modules/playwright-core/lib/server/dispatchers/networkDispatchers.js +213 -0
- package/node_modules/playwright-core/lib/server/dispatchers/pageAgentDispatcher.js +96 -0
- package/node_modules/playwright-core/lib/server/dispatchers/pageDispatcher.js +393 -0
- package/node_modules/playwright-core/lib/server/dispatchers/playwrightDispatcher.js +108 -0
- package/node_modules/playwright-core/lib/server/dispatchers/streamDispatcher.js +67 -0
- package/node_modules/playwright-core/lib/server/dispatchers/tracingDispatcher.js +68 -0
- package/node_modules/playwright-core/lib/server/dispatchers/webSocketRouteDispatcher.js +165 -0
- package/node_modules/playwright-core/lib/server/dispatchers/writableStreamDispatcher.js +79 -0
- package/node_modules/playwright-core/lib/server/dom.js +815 -0
- package/node_modules/playwright-core/lib/server/download.js +70 -0
- package/node_modules/playwright-core/lib/server/electron/electron.js +273 -0
- package/node_modules/playwright-core/lib/server/electron/loader.js +29 -0
- package/node_modules/playwright-core/lib/server/errors.js +69 -0
- package/node_modules/playwright-core/lib/server/fetch.js +621 -0
- package/node_modules/playwright-core/lib/server/fileChooser.js +43 -0
- package/node_modules/playwright-core/lib/server/fileUploadUtils.js +84 -0
- package/node_modules/playwright-core/lib/server/firefox/ffBrowser.js +418 -0
- package/node_modules/playwright-core/lib/server/firefox/ffConnection.js +142 -0
- package/node_modules/playwright-core/lib/server/firefox/ffExecutionContext.js +150 -0
- package/node_modules/playwright-core/lib/server/firefox/ffInput.js +159 -0
- package/node_modules/playwright-core/lib/server/firefox/ffNetworkManager.js +256 -0
- package/node_modules/playwright-core/lib/server/firefox/ffPage.js +497 -0
- package/node_modules/playwright-core/lib/server/firefox/firefox.js +114 -0
- package/node_modules/playwright-core/lib/server/firefox/protocol.d.js +16 -0
- package/node_modules/playwright-core/lib/server/formData.js +147 -0
- package/node_modules/playwright-core/lib/server/frameSelectors.js +160 -0
- package/node_modules/playwright-core/lib/server/frames.js +1471 -0
- package/node_modules/playwright-core/lib/server/har/harRecorder.js +147 -0
- package/node_modules/playwright-core/lib/server/har/harTracer.js +607 -0
- package/node_modules/playwright-core/lib/server/harBackend.js +157 -0
- package/node_modules/playwright-core/lib/server/helper.js +96 -0
- package/node_modules/playwright-core/lib/server/index.js +58 -0
- package/node_modules/playwright-core/lib/server/input.js +277 -0
- package/node_modules/playwright-core/lib/server/instrumentation.js +72 -0
- package/node_modules/playwright-core/lib/server/javascript.js +291 -0
- package/node_modules/playwright-core/lib/server/launchApp.js +128 -0
- package/node_modules/playwright-core/lib/server/localUtils.js +214 -0
- package/node_modules/playwright-core/lib/server/macEditingCommands.js +143 -0
- package/node_modules/playwright-core/lib/server/network.js +667 -0
- package/node_modules/playwright-core/lib/server/page.js +830 -0
- package/node_modules/playwright-core/lib/server/pipeTransport.js +89 -0
- package/node_modules/playwright-core/lib/server/playwright.js +69 -0
- package/node_modules/playwright-core/lib/server/progress.js +132 -0
- package/node_modules/playwright-core/lib/server/protocolError.js +52 -0
- package/node_modules/playwright-core/lib/server/recorder/chat.js +161 -0
- package/node_modules/playwright-core/lib/server/recorder/recorderApp.js +366 -0
- package/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +138 -0
- package/node_modules/playwright-core/lib/server/recorder/recorderSignalProcessor.js +83 -0
- package/node_modules/playwright-core/lib/server/recorder/recorderUtils.js +157 -0
- package/node_modules/playwright-core/lib/server/recorder/throttledFile.js +57 -0
- package/node_modules/playwright-core/lib/server/recorder.js +499 -0
- package/node_modules/playwright-core/lib/server/registry/browserFetcher.js +177 -0
- package/node_modules/playwright-core/lib/server/registry/dependencies.js +371 -0
- package/node_modules/playwright-core/lib/server/registry/index.js +1422 -0
- package/node_modules/playwright-core/lib/server/registry/nativeDeps.js +1280 -0
- package/node_modules/playwright-core/lib/server/registry/oopDownloadBrowserMain.js +127 -0
- package/node_modules/playwright-core/lib/server/screencast.js +190 -0
- package/node_modules/playwright-core/lib/server/screenshotter.js +333 -0
- package/node_modules/playwright-core/lib/server/selectors.js +112 -0
- package/node_modules/playwright-core/lib/server/socksClientCertificatesInterceptor.js +383 -0
- package/node_modules/playwright-core/lib/server/socksInterceptor.js +95 -0
- package/node_modules/playwright-core/lib/server/trace/recorder/snapshotter.js +147 -0
- package/node_modules/playwright-core/lib/server/trace/recorder/snapshotterInjected.js +561 -0
- package/node_modules/playwright-core/lib/server/trace/recorder/tracing.js +604 -0
- package/node_modules/playwright-core/lib/server/trace/viewer/traceParser.js +72 -0
- package/node_modules/playwright-core/lib/server/trace/viewer/traceViewer.js +245 -0
- package/node_modules/playwright-core/lib/server/transport.js +181 -0
- package/node_modules/playwright-core/lib/server/types.js +28 -0
- package/node_modules/playwright-core/lib/server/usKeyboardLayout.js +145 -0
- package/node_modules/playwright-core/lib/server/utils/ascii.js +44 -0
- package/node_modules/playwright-core/lib/server/utils/comparators.js +139 -0
- package/node_modules/playwright-core/lib/server/utils/crypto.js +216 -0
- package/node_modules/playwright-core/lib/server/utils/debug.js +42 -0
- package/node_modules/playwright-core/lib/server/utils/debugLogger.js +122 -0
- package/node_modules/playwright-core/lib/server/utils/env.js +73 -0
- package/node_modules/playwright-core/lib/server/utils/eventsHelper.js +39 -0
- package/node_modules/playwright-core/lib/server/utils/expectUtils.js +123 -0
- package/node_modules/playwright-core/lib/server/utils/fileUtils.js +191 -0
- package/node_modules/playwright-core/lib/server/utils/happyEyeballs.js +207 -0
- package/node_modules/playwright-core/lib/server/utils/hostPlatform.js +138 -0
- package/node_modules/playwright-core/lib/server/utils/httpServer.js +203 -0
- package/node_modules/playwright-core/lib/server/utils/imageUtils.js +141 -0
- package/node_modules/playwright-core/lib/server/utils/image_tools/colorUtils.js +89 -0
- package/node_modules/playwright-core/lib/server/utils/image_tools/compare.js +109 -0
- package/node_modules/playwright-core/lib/server/utils/image_tools/imageChannel.js +78 -0
- package/node_modules/playwright-core/lib/server/utils/image_tools/stats.js +102 -0
- package/node_modules/playwright-core/lib/server/utils/linuxUtils.js +71 -0
- package/node_modules/playwright-core/lib/server/utils/network.js +242 -0
- package/node_modules/playwright-core/lib/server/utils/nodePlatform.js +154 -0
- package/node_modules/playwright-core/lib/server/utils/pipeTransport.js +84 -0
- package/node_modules/playwright-core/lib/server/utils/processLauncher.js +241 -0
- package/node_modules/playwright-core/lib/server/utils/profiler.js +65 -0
- package/node_modules/playwright-core/lib/server/utils/socksProxy.js +511 -0
- package/node_modules/playwright-core/lib/server/utils/spawnAsync.js +41 -0
- package/node_modules/playwright-core/lib/server/utils/task.js +51 -0
- package/node_modules/playwright-core/lib/server/utils/userAgent.js +98 -0
- package/node_modules/playwright-core/lib/server/utils/wsServer.js +121 -0
- package/node_modules/playwright-core/lib/server/utils/zipFile.js +74 -0
- package/node_modules/playwright-core/lib/server/utils/zones.js +57 -0
- package/node_modules/playwright-core/lib/server/videoRecorder.js +124 -0
- package/node_modules/playwright-core/lib/server/webkit/protocol.d.js +16 -0
- package/node_modules/playwright-core/lib/server/webkit/webkit.js +108 -0
- package/node_modules/playwright-core/lib/server/webkit/wkBrowser.js +335 -0
- package/node_modules/playwright-core/lib/server/webkit/wkConnection.js +144 -0
- package/node_modules/playwright-core/lib/server/webkit/wkExecutionContext.js +154 -0
- package/node_modules/playwright-core/lib/server/webkit/wkInput.js +181 -0
- package/node_modules/playwright-core/lib/server/webkit/wkInterceptableRequest.js +197 -0
- package/node_modules/playwright-core/lib/server/webkit/wkPage.js +1159 -0
- package/node_modules/playwright-core/lib/server/webkit/wkProvisionalPage.js +83 -0
- package/node_modules/playwright-core/lib/server/webkit/wkWorkers.js +105 -0
- package/node_modules/playwright-core/lib/third_party/pixelmatch.js +255 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/ariaSnapshot.js +455 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/assert.js +31 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/colors.js +72 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/cssParser.js +245 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/cssTokenizer.js +1051 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/headers.js +53 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/locatorGenerators.js +689 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/locatorParser.js +176 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/locatorUtils.js +81 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/lruCache.js +51 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/manualPromise.js +114 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/mimeType.js +459 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/multimap.js +80 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/protocolFormatter.js +81 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/protocolMetainfo.js +330 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/rtti.js +43 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/selectorParser.js +386 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/semaphore.js +54 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/stackTrace.js +158 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/stringUtils.js +204 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/time.js +49 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/timeoutRunner.js +66 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/trace/entries.js +16 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotRenderer.js +499 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotServer.js +120 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotStorage.js +89 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/trace/traceLoader.js +131 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/trace/traceModel.js +365 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/trace/traceModernizer.js +400 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV3.js +16 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV4.js +16 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV5.js +16 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV6.js +16 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV7.js +16 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV8.js +16 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/traceUtils.js +58 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/types.js +16 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/urlMatch.js +190 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/utilityScriptSerializers.js +251 -0
- package/node_modules/playwright-core/lib/utils/isomorphic/yaml.js +84 -0
- package/node_modules/playwright-core/lib/utils.js +111 -0
- package/node_modules/playwright-core/lib/utilsBundle.js +109 -0
- package/node_modules/playwright-core/lib/utilsBundleImpl/index.js +218 -0
- package/node_modules/playwright-core/lib/utilsBundleImpl/xdg-open +1066 -0
- package/node_modules/playwright-core/lib/vite/htmlReport/index.html +84 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-DYBRYzYX.css +1 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-DadYNm1I.js +32 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/index-BSjZa4pk.css +1 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/index-BhTWtUlo.js +193 -0
- package/node_modules/playwright-core/lib/vite/recorder/index.html +29 -0
- package/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +9 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-a5XoALAZ.js +32 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-CJSZINFr.js +266 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-CsJ4vdCR.js +9 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.DYBRYzYX.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.7ch9cixO.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/index.BDwrLSGN.js +2 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/index.BVu7tZDe.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/index.html +43 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +21 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +5 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.Btcz36p_.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CQJ9SCIQ.js +5 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +17 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.DYP7pi_n.css +32 -0
- package/node_modules/playwright-core/lib/zipBundle.js +34 -0
- package/node_modules/playwright-core/lib/zipBundleImpl.js +5 -0
- package/node_modules/playwright-core/package.json +43 -0
- package/node_modules/playwright-core/types/protocol.d.ts +23824 -0
- package/node_modules/playwright-core/types/structs.d.ts +45 -0
- package/node_modules/playwright-core/types/types.d.ts +22843 -0
- package/package.json +6 -2
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,
|
|
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>\`).
|
|
107
|
-
- \`authToken\`: The full header value, used verbatim. When omitted, \`SKYRAMP_PLACEHOLDER_TOKEN\` is auto-generated
|
|
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
|
|
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
|
-
|
|
249
|
-
|
|
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,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
|
-
**
|
|
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
|
|
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:**
|