rechrome 1.35.0 → 1.36.0
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/README.md +74 -0
- package/extension/lib/background.mjs +28 -1
- package/extension/lib/ui/connect.js +29 -19
- package/listeners.js +17 -1
- package/listeners.ts +7 -2
- package/package.json +5 -3
- package/rechrome.js +64 -16
- package/rechrome.ts +64 -16
- package/scoped-upload.js +165 -0
- package/scoped-upload.ts +140 -0
- package/serve.js +30 -2
- package/serve.ts +30 -2
- package/vendor/playwright-cli/node_modules/playwright-core/lib/coreBundle.js +360 -256
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-client/help.json +9 -4
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-client/program.js +6 -1
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-client/session.js +10 -12
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/utils/extension.js +8 -5
- package/vendor/playwright-cli/node_modules/playwright-core/lib/androidServerImpl.js +0 -65
- package/vendor/playwright-cli/node_modules/playwright-core/lib/browserServerImpl.js +0 -120
- package/vendor/playwright-cli/node_modules/playwright-core/lib/cli/driver.js +0 -98
- package/vendor/playwright-cli/node_modules/playwright-core/lib/cli/program.js +0 -597
- package/vendor/playwright-cli/node_modules/playwright-core/lib/cli/programWithTestStub.js +0 -74
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/android.js +0 -361
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/api.js +0 -137
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/artifact.js +0 -79
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/browser.js +0 -169
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/browserContext.js +0 -583
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/browserType.js +0 -153
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/cdpSession.js +0 -55
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/channelOwner.js +0 -194
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/clientHelper.js +0 -64
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/clientInstrumentation.js +0 -55
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/clientStackTrace.js +0 -69
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/clock.js +0 -68
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/connect.js +0 -143
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/connection.js +0 -322
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/consoleMessage.js +0 -61
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/coverage.js +0 -44
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/debugger.js +0 -57
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/dialog.js +0 -56
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/disposable.js +0 -76
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/download.js +0 -62
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/electron.js +0 -138
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/elementHandle.js +0 -281
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/errors.js +0 -77
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/eventEmitter.js +0 -314
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/events.js +0 -103
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/fetch.js +0 -367
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/fileChooser.js +0 -46
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/fileUtils.js +0 -34
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/frame.js +0 -404
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/harRouter.js +0 -99
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/input.js +0 -84
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/jsHandle.js +0 -105
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/jsonPipe.js +0 -39
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/localUtils.js +0 -60
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/locator.js +0 -367
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/network.js +0 -750
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/page.js +0 -729
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/platform.js +0 -77
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/playwright.js +0 -71
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/screencast.js +0 -48
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/selectors.js +0 -57
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/stream.js +0 -39
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/timeoutSettings.js +0 -79
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/tracing.js +0 -126
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/types.js +0 -28
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/video.js +0 -68
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/waiter.js +0 -142
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/webError.js +0 -39
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/worker.js +0 -85
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/writableStream.js +0 -39
- package/vendor/playwright-cli/node_modules/playwright-core/lib/generated/bindingsControllerSource.js +0 -28
- package/vendor/playwright-cli/node_modules/playwright-core/lib/generated/clockSource.js +0 -28
- package/vendor/playwright-cli/node_modules/playwright-core/lib/generated/injectedScriptSource.js +0 -28
- package/vendor/playwright-cli/node_modules/playwright-core/lib/generated/pollingRecorderSource.js +0 -28
- package/vendor/playwright-cli/node_modules/playwright-core/lib/generated/storageScriptSource.js +0 -28
- package/vendor/playwright-cli/node_modules/playwright-core/lib/generated/utilityScriptSource.js +0 -28
- package/vendor/playwright-cli/node_modules/playwright-core/lib/generated/webSocketMockSource.js +0 -336
- package/vendor/playwright-cli/node_modules/playwright-core/lib/inProcessFactory.js +0 -60
- package/vendor/playwright-cli/node_modules/playwright-core/lib/inprocess.js +0 -3
- package/vendor/playwright-cli/node_modules/playwright-core/lib/mcpBundle.js +0 -81
- package/vendor/playwright-cli/node_modules/playwright-core/lib/mcpBundleImpl/index.js +0 -91
- package/vendor/playwright-cli/node_modules/playwright-core/lib/outofprocess.js +0 -76
- package/vendor/playwright-cli/node_modules/playwright-core/lib/protocol/serializers.js +0 -197
- package/vendor/playwright-cli/node_modules/playwright-core/lib/protocol/validator.js +0 -3034
- package/vendor/playwright-cli/node_modules/playwright-core/lib/protocol/validatorPrimitives.js +0 -193
- package/vendor/playwright-cli/node_modules/playwright-core/lib/remote/playwrightConnection.js +0 -131
- package/vendor/playwright-cli/node_modules/playwright-core/lib/remote/playwrightPipeServer.js +0 -100
- package/vendor/playwright-cli/node_modules/playwright-core/lib/remote/playwrightServer.js +0 -339
- package/vendor/playwright-cli/node_modules/playwright-core/lib/remote/playwrightWebSocketServer.js +0 -73
- package/vendor/playwright-cli/node_modules/playwright-core/lib/remote/serverTransport.js +0 -96
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/android/android.js +0 -465
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/android/backendAdb.js +0 -177
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/artifact.js +0 -127
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiBrowser.js +0 -571
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiChromium.js +0 -162
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiConnection.js +0 -213
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiDeserializer.js +0 -116
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiExecutionContext.js +0 -267
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiFirefox.js +0 -128
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiInput.js +0 -146
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiNetworkManager.js +0 -411
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiOverCdp.js +0 -102
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiPage.js +0 -599
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiPdf.js +0 -106
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/third_party/bidiCommands.d.js +0 -22
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/third_party/bidiKeyboard.js +0 -256
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocol.js +0 -24
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolCore.js +0 -180
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolPermissions.js +0 -42
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/third_party/bidiSerializer.js +0 -148
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/third_party/firefoxPrefs.js +0 -261
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/browser.js +0 -223
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/browserContext.js +0 -703
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/browserType.js +0 -338
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/callLog.js +0 -82
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/chromium.js +0 -399
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/chromiumSwitches.js +0 -104
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crBrowser.js +0 -532
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crConnection.js +0 -197
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crCoverage.js +0 -235
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crDevTools.js +0 -111
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crDragDrop.js +0 -131
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crExecutionContext.js +0 -146
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crInput.js +0 -187
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crNetworkManager.js +0 -708
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crPage.js +0 -1004
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crPdf.js +0 -121
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crProtocolHelper.js +0 -145
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crServiceWorker.js +0 -137
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/defaultFontFamilies.js +0 -162
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/protocol.d.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/clock.js +0 -149
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/csharp.js +0 -327
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/java.js +0 -274
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/javascript.js +0 -247
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/jsonl.js +0 -52
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/language.js +0 -132
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/languages.js +0 -68
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/python.js +0 -279
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/types.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/console.js +0 -61
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/cookieStore.js +0 -206
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/debugController.js +0 -197
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/debugger.js +0 -120
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/deviceDescriptors.js +0 -39
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dialog.js +0 -116
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/androidDispatcher.js +0 -325
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/artifactDispatcher.js +0 -118
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/browserContextDispatcher.js +0 -381
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/browserDispatcher.js +0 -124
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/browserTypeDispatcher.js +0 -71
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/cdpSessionDispatcher.js +0 -47
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/debugControllerDispatcher.js +0 -78
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/debuggerDispatcher.js +0 -80
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/dialogDispatcher.js +0 -47
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/dispatcher.js +0 -364
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/disposableDispatcher.js +0 -39
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/electronDispatcher.js +0 -90
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/elementHandlerDispatcher.js +0 -181
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/frameDispatcher.js +0 -227
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/jsHandleDispatcher.js +0 -85
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/jsonPipeDispatcher.js +0 -58
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/localUtilsDispatcher.js +0 -185
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/networkDispatchers.js +0 -214
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/pageDispatcher.js +0 -434
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/playwrightDispatcher.js +0 -108
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/streamDispatcher.js +0 -67
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/tracingDispatcher.js +0 -68
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/webSocketRouteDispatcher.js +0 -164
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/writableStreamDispatcher.js +0 -79
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/disposable.js +0 -41
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dom.js +0 -823
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/download.js +0 -71
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/electron/electron.js +0 -272
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/electron/loader.js +0 -115
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/errors.js +0 -69
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/fetch.js +0 -621
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/fileChooser.js +0 -43
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/fileUploadUtils.js +0 -84
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/ffBrowser.js +0 -415
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/ffConnection.js +0 -142
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/ffExecutionContext.js +0 -150
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/ffInput.js +0 -175
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/ffNetworkManager.js +0 -256
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/ffPage.js +0 -495
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/firefox.js +0 -114
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/protocol.d.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/formData.js +0 -147
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/frameSelectors.js +0 -160
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/frames.js +0 -1495
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/har/harRecorder.js +0 -147
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/har/harTracer.js +0 -608
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/harBackend.js +0 -157
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/helper.js +0 -96
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/index.js +0 -58
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/input.js +0 -277
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/instrumentation.js +0 -72
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/javascript.js +0 -291
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/launchApp.js +0 -127
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/localUtils.js +0 -214
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/macEditingCommands.js +0 -143
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/network.js +0 -668
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/page.js +0 -884
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/pipeTransport.js +0 -89
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/playwright.js +0 -69
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/progress.js +0 -136
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/protocolError.js +0 -52
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/recorder/chat.js +0 -161
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/recorder/recorderApp.js +0 -367
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +0 -138
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/recorder/recorderSignalProcessor.js +0 -83
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/recorder/recorderUtils.js +0 -157
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/recorder/throttledFile.js +0 -57
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/recorder.js +0 -540
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/registry/browserFetcher.js +0 -177
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/registry/dependencies.js +0 -371
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/registry/index.js +0 -1395
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/registry/nativeDeps.js +0 -1281
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/registry/oopDownloadBrowserMain.js +0 -127
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/screencast.js +0 -216
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/screenshotter.js +0 -333
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/selectors.js +0 -112
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/socksClientCertificatesInterceptor.js +0 -383
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/socksInterceptor.js +0 -95
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/trace/recorder/snapshotter.js +0 -147
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/trace/recorder/snapshotterInjected.js +0 -561
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/trace/recorder/tracing.js +0 -607
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/trace/viewer/traceViewer.js +0 -244
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/transport.js +0 -181
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/types.js +0 -28
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/usKeyboardLayout.js +0 -152
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/ascii.js +0 -44
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/comparators.js +0 -139
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/crypto.js +0 -216
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/debug.js +0 -42
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/debugLogger.js +0 -122
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/disposable.js +0 -32
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/env.js +0 -73
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/eventsHelper.js +0 -41
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/expectUtils.js +0 -123
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/fileUtils.js +0 -191
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/happyEyeballs.js +0 -207
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/hostPlatform.js +0 -123
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/httpServer.js +0 -205
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/image_tools/colorUtils.js +0 -89
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/image_tools/compare.js +0 -109
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/image_tools/imageChannel.js +0 -78
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/image_tools/stats.js +0 -102
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/linuxUtils.js +0 -71
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/network.js +0 -244
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/nodePlatform.js +0 -154
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/pipeTransport.js +0 -84
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/processLauncher.js +0 -243
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/profiler.js +0 -65
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/socksProxy.js +0 -511
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/spawnAsync.js +0 -41
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/task.js +0 -51
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/userAgent.js +0 -98
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/wsServer.js +0 -121
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/zipFile.js +0 -74
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/zones.js +0 -57
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/videoRecorder.js +0 -133
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/protocol.d.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/webkit.js +0 -108
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkBrowser.js +0 -331
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkConnection.js +0 -144
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkExecutionContext.js +0 -154
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkInput.js +0 -181
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkInterceptableRequest.js +0 -197
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkPage.js +0 -1164
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkProvisionalPage.js +0 -83
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkWorkers.js +0 -106
- package/vendor/playwright-cli/node_modules/playwright-core/lib/third_party/pixelmatch.js +0 -255
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/browserBackend.js +0 -79
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/common.js +0 -63
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/config.js +0 -41
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/console.js +0 -66
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/context.js +0 -290
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/cookies.js +0 -152
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/devtools.js +0 -69
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/dialogs.js +0 -59
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/evaluate.js +0 -64
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/files.js +0 -60
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/form.js +0 -64
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/keyboard.js +0 -155
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/logFile.js +0 -95
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/mouse.js +0 -168
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/navigate.js +0 -106
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/network.js +0 -135
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/pdf.js +0 -48
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/response.js +0 -302
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/route.js +0 -140
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/runCode.js +0 -76
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/screenshot.js +0 -88
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/sessionLog.js +0 -74
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/snapshot.js +0 -208
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/storage.js +0 -67
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/tab.js +0 -445
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/tabs.js +0 -67
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/tool.js +0 -47
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/tools.js +0 -102
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/tracing.js +0 -75
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/utils.js +0 -83
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/verify.js +0 -151
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/video.js +0 -89
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/wait.js +0 -63
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/webstorage.js +0 -223
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-daemon/command.js +0 -73
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-daemon/commands.js +0 -933
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-daemon/daemon.js +0 -178
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-daemon/helpGenerator.js +0 -173
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-daemon/program.js +0 -118
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/dashboard/dashboardApp.js +0 -286
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/dashboard/dashboardController.js +0 -296
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/exports.js +0 -60
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/browserFactory.js +0 -233
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/cdpRelay.js +0 -356
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/cli-stub.js +0 -7
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/config.d.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/config.js +0 -401
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/configIni.js +0 -189
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/extensionContextFactory.js +0 -59
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/index.js +0 -62
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/log.js +0 -35
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/program.js +0 -107
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/protocol.js +0 -28
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/watchdog.js +0 -44
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/installSkill.js +0 -48
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceActions.js +0 -142
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceAttachments.js +0 -69
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceCli.js +0 -80
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceConsole.js +0 -97
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceErrors.js +0 -55
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceOpen.js +0 -69
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceParser.js +0 -96
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceRequests.js +0 -158
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceScreenshot.js +0 -68
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceSnapshot.js +0 -149
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceUtils.js +0 -135
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/utils/connect.js +0 -32
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/utils/mcp/http.js +0 -152
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/utils/mcp/server.js +0 -230
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/utils/mcp/tool.js +0 -47
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/ariaSnapshot.js +0 -455
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/assert.js +0 -31
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/colors.js +0 -72
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/cssParser.js +0 -245
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/cssTokenizer.js +0 -1051
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/formatUtils.js +0 -64
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/headers.js +0 -53
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/imageUtils.js +0 -141
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/locatorGenerators.js +0 -689
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/locatorParser.js +0 -176
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/locatorUtils.js +0 -81
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/lruCache.js +0 -51
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/manualPromise.js +0 -114
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/mimeType.js +0 -464
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/multimap.js +0 -80
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/protocolFormatter.js +0 -81
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/protocolMetainfo.js +0 -342
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/rtti.js +0 -43
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/selectorParser.js +0 -386
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/semaphore.js +0 -54
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/stackTrace.js +0 -158
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/stringUtils.js +0 -204
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/time.js +0 -49
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/timeoutRunner.js +0 -66
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/entries.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotRenderer.js +0 -502
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotServer.js +0 -120
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotStorage.js +0 -89
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/traceLoader.js +0 -131
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/traceModel.js +0 -366
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/traceModernizer.js +0 -401
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/traceUtils.js +0 -58
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV3.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV4.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV5.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV6.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV7.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV8.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/types.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/urlMatch.js +0 -243
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/utilityScriptSerializers.js +0 -262
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/yaml.js +0 -84
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils.js +0 -113
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utilsBundleImpl/index.js +0 -218
- package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-BtGnd8kr.js +0 -32
- package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-CnvO0fko.js +0 -32
- package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-BkMbME_o.js +0 -262
- package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-CN3cwLGD.js +0 -262
- package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.B4dS75f0.css +0 -1
- package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.DcQiWcKS.css +0 -1
- package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/index.B2ffe31o.js +0 -2
- package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/index.Df3uWWXm.js +0 -2
- package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/uiMode.BZQ54Kgt.css +0 -1
- package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CmAqMvmy.js +0 -6
- package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/uiMode.u9Eas4CP.js +0 -6
- package/vendor/playwright-cli/node_modules/playwright-core/lib/zipBundle.js +0 -34
- package/vendor/playwright-cli/node_modules/playwright-core/lib/zipBundleImpl.js +0 -5
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var evaluate_exports = {};
|
|
20
|
-
__export(evaluate_exports, {
|
|
21
|
-
default: () => evaluate_default
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(evaluate_exports);
|
|
24
|
-
var import_mcpBundle = require("../../mcpBundle");
|
|
25
|
-
var import_stringUtils = require("../../utils/isomorphic/stringUtils");
|
|
26
|
-
var import_tool = require("./tool");
|
|
27
|
-
const evaluateSchema = import_mcpBundle.z.object({
|
|
28
|
-
function: import_mcpBundle.z.string().describe("() => { /* code */ } or (element) => { /* code */ } when element is provided"),
|
|
29
|
-
element: import_mcpBundle.z.string().optional().describe("Human-readable element description used to obtain permission to interact with the element"),
|
|
30
|
-
ref: import_mcpBundle.z.string().optional().describe("Exact target element reference from the page snapshot"),
|
|
31
|
-
selector: import_mcpBundle.z.string().optional().describe('CSS or role selector for the target element, when "ref" is not available.'),
|
|
32
|
-
filename: import_mcpBundle.z.string().optional().describe("Filename to save the result to. If not provided, result is returned as text.")
|
|
33
|
-
});
|
|
34
|
-
const evaluate = (0, import_tool.defineTabTool)({
|
|
35
|
-
capability: "core",
|
|
36
|
-
schema: {
|
|
37
|
-
name: "browser_evaluate",
|
|
38
|
-
title: "Evaluate JavaScript",
|
|
39
|
-
description: "Evaluate JavaScript expression on page or element",
|
|
40
|
-
inputSchema: evaluateSchema,
|
|
41
|
-
type: "action"
|
|
42
|
-
},
|
|
43
|
-
handle: async (tab, params, response) => {
|
|
44
|
-
let locator;
|
|
45
|
-
if (!params.function.includes("=>"))
|
|
46
|
-
params.function = `() => (${params.function})`;
|
|
47
|
-
if (params.ref) {
|
|
48
|
-
locator = await tab.refLocator({ ref: params.ref, selector: params.selector, element: params.element || "element" });
|
|
49
|
-
response.addCode(`await page.${locator.resolved}.evaluate(${(0, import_stringUtils.escapeWithQuotes)(params.function)});`);
|
|
50
|
-
} else {
|
|
51
|
-
response.addCode(`await page.evaluate(${(0, import_stringUtils.escapeWithQuotes)(params.function)});`);
|
|
52
|
-
}
|
|
53
|
-
await tab.waitForCompletion(async () => {
|
|
54
|
-
const func = new Function();
|
|
55
|
-
func.toString = () => params.function;
|
|
56
|
-
const result = locator?.locator ? await locator?.locator.evaluate(func) : await tab.page.evaluate(func);
|
|
57
|
-
const text = JSON.stringify(result, null, 2) || "undefined";
|
|
58
|
-
await response.addResult("Evaluation result", text, { prefix: "result", ext: "json", suggestedFilename: params.filename });
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
var evaluate_default = [
|
|
63
|
-
evaluate
|
|
64
|
-
];
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var files_exports = {};
|
|
20
|
-
__export(files_exports, {
|
|
21
|
-
default: () => files_default,
|
|
22
|
-
uploadFile: () => uploadFile
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(files_exports);
|
|
25
|
-
var import_mcpBundle = require("../../mcpBundle");
|
|
26
|
-
var import_tool = require("./tool");
|
|
27
|
-
const uploadFile = (0, import_tool.defineTabTool)({
|
|
28
|
-
capability: "core",
|
|
29
|
-
schema: {
|
|
30
|
-
name: "browser_file_upload",
|
|
31
|
-
title: "Upload files",
|
|
32
|
-
description: "Upload one or multiple files",
|
|
33
|
-
inputSchema: import_mcpBundle.z.object({
|
|
34
|
-
paths: import_mcpBundle.z.array(import_mcpBundle.z.string()).optional().describe("The absolute paths to the files to upload. Can be single file or multiple files. If omitted, file chooser is cancelled.")
|
|
35
|
-
}),
|
|
36
|
-
type: "action"
|
|
37
|
-
},
|
|
38
|
-
handle: async (tab, params, response) => {
|
|
39
|
-
response.setIncludeSnapshot();
|
|
40
|
-
const modalState = tab.modalStates().find((state) => state.type === "fileChooser");
|
|
41
|
-
if (!modalState)
|
|
42
|
-
throw new Error("No file chooser visible");
|
|
43
|
-
if (params.paths)
|
|
44
|
-
await Promise.all(params.paths.map((filePath) => response.resolveClientFilename(filePath)));
|
|
45
|
-
response.addCode(`await fileChooser.setFiles(${JSON.stringify(params.paths)})`);
|
|
46
|
-
tab.clearModalState(modalState);
|
|
47
|
-
await tab.waitForCompletion(async () => {
|
|
48
|
-
if (params.paths)
|
|
49
|
-
await modalState.fileChooser.setFiles(params.paths);
|
|
50
|
-
});
|
|
51
|
-
},
|
|
52
|
-
clearsModalState: "fileChooser"
|
|
53
|
-
});
|
|
54
|
-
var files_default = [
|
|
55
|
-
uploadFile
|
|
56
|
-
];
|
|
57
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
58
|
-
0 && (module.exports = {
|
|
59
|
-
uploadFile
|
|
60
|
-
});
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var form_exports = {};
|
|
20
|
-
__export(form_exports, {
|
|
21
|
-
default: () => form_default
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(form_exports);
|
|
24
|
-
var import_mcpBundle = require("../../mcpBundle");
|
|
25
|
-
var import_stringUtils = require("../../utils/isomorphic/stringUtils");
|
|
26
|
-
var import_tool = require("./tool");
|
|
27
|
-
const fillForm = (0, import_tool.defineTabTool)({
|
|
28
|
-
capability: "core",
|
|
29
|
-
schema: {
|
|
30
|
-
name: "browser_fill_form",
|
|
31
|
-
title: "Fill form",
|
|
32
|
-
description: "Fill multiple form fields",
|
|
33
|
-
inputSchema: import_mcpBundle.z.object({
|
|
34
|
-
fields: import_mcpBundle.z.array(import_mcpBundle.z.object({
|
|
35
|
-
name: import_mcpBundle.z.string().describe("Human-readable field name"),
|
|
36
|
-
type: import_mcpBundle.z.enum(["textbox", "checkbox", "radio", "combobox", "slider"]).describe("Type of the field"),
|
|
37
|
-
ref: import_mcpBundle.z.string().describe("Exact target field reference from the page snapshot"),
|
|
38
|
-
selector: import_mcpBundle.z.string().optional().describe('CSS or role selector for the field element, when "ref" is not available. Either "selector" or "ref" is required.'),
|
|
39
|
-
value: import_mcpBundle.z.string().describe("Value to fill in the field. If the field is a checkbox, the value should be `true` or `false`. If the field is a combobox, the value should be the text of the option.")
|
|
40
|
-
})).describe("Fields to fill in")
|
|
41
|
-
}),
|
|
42
|
-
type: "input"
|
|
43
|
-
},
|
|
44
|
-
handle: async (tab, params, response) => {
|
|
45
|
-
for (const field of params.fields) {
|
|
46
|
-
const { locator, resolved } = await tab.refLocator({ element: field.name, ref: field.ref, selector: field.selector });
|
|
47
|
-
const locatorSource = `await page.${resolved}`;
|
|
48
|
-
if (field.type === "textbox" || field.type === "slider") {
|
|
49
|
-
const secret = tab.context.lookupSecret(field.value);
|
|
50
|
-
await locator.fill(secret.value, tab.actionTimeoutOptions);
|
|
51
|
-
response.addCode(`${locatorSource}.fill(${secret.code});`);
|
|
52
|
-
} else if (field.type === "checkbox" || field.type === "radio") {
|
|
53
|
-
await locator.setChecked(field.value === "true", tab.actionTimeoutOptions);
|
|
54
|
-
response.addCode(`${locatorSource}.setChecked(${field.value});`);
|
|
55
|
-
} else if (field.type === "combobox") {
|
|
56
|
-
await locator.selectOption({ label: field.value }, tab.actionTimeoutOptions);
|
|
57
|
-
response.addCode(`${locatorSource}.selectOption(${(0, import_stringUtils.escapeWithQuotes)(field.value)});`);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
var form_default = [
|
|
63
|
-
fillForm
|
|
64
|
-
];
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var keyboard_exports = {};
|
|
20
|
-
__export(keyboard_exports, {
|
|
21
|
-
default: () => keyboard_default
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(keyboard_exports);
|
|
24
|
-
var import_mcpBundle = require("../../mcpBundle");
|
|
25
|
-
var import_tool = require("./tool");
|
|
26
|
-
var import_snapshot = require("./snapshot");
|
|
27
|
-
const press = (0, import_tool.defineTabTool)({
|
|
28
|
-
capability: "core-input",
|
|
29
|
-
schema: {
|
|
30
|
-
name: "browser_press_key",
|
|
31
|
-
title: "Press a key",
|
|
32
|
-
description: "Press a key on the keyboard",
|
|
33
|
-
inputSchema: import_mcpBundle.z.object({
|
|
34
|
-
key: import_mcpBundle.z.string().describe("Name of the key to press or a character to generate, such as `ArrowLeft` or `a`")
|
|
35
|
-
}),
|
|
36
|
-
type: "input"
|
|
37
|
-
},
|
|
38
|
-
handle: async (tab, params, response) => {
|
|
39
|
-
response.addCode(`// Press ${params.key}`);
|
|
40
|
-
response.addCode(`await page.keyboard.press('${params.key}');`);
|
|
41
|
-
if (params.key === "Enter") {
|
|
42
|
-
response.setIncludeSnapshot();
|
|
43
|
-
await tab.waitForCompletion(async () => {
|
|
44
|
-
await tab.page.keyboard.press("Enter");
|
|
45
|
-
});
|
|
46
|
-
} else {
|
|
47
|
-
await tab.page.keyboard.press(params.key);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
const pressSequentially = (0, import_tool.defineTabTool)({
|
|
52
|
-
capability: "core-input",
|
|
53
|
-
skillOnly: true,
|
|
54
|
-
schema: {
|
|
55
|
-
name: "browser_press_sequentially",
|
|
56
|
-
title: "Type text key by key",
|
|
57
|
-
description: "Type text key by key on the keyboard",
|
|
58
|
-
inputSchema: import_mcpBundle.z.object({
|
|
59
|
-
text: import_mcpBundle.z.string().describe("Text to type"),
|
|
60
|
-
submit: import_mcpBundle.z.boolean().optional().describe("Whether to submit entered text (press Enter after)")
|
|
61
|
-
}),
|
|
62
|
-
type: "input"
|
|
63
|
-
},
|
|
64
|
-
handle: async (tab, params, response) => {
|
|
65
|
-
response.addCode(`// Press ${params.text}`);
|
|
66
|
-
response.addCode(`await page.keyboard.type('${params.text}');`);
|
|
67
|
-
await tab.page.keyboard.type(params.text);
|
|
68
|
-
if (params.submit) {
|
|
69
|
-
response.addCode(`await page.keyboard.press('Enter');`);
|
|
70
|
-
response.setIncludeSnapshot();
|
|
71
|
-
await tab.waitForCompletion(async () => {
|
|
72
|
-
await tab.page.keyboard.press("Enter");
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
const typeSchema = import_snapshot.elementSchema.extend({
|
|
78
|
-
text: import_mcpBundle.z.string().describe("Text to type into the element"),
|
|
79
|
-
submit: import_mcpBundle.z.boolean().optional().describe("Whether to submit entered text (press Enter after)"),
|
|
80
|
-
slowly: import_mcpBundle.z.boolean().optional().describe("Whether to type one character at a time. Useful for triggering key handlers in the page. By default entire text is filled in at once.")
|
|
81
|
-
});
|
|
82
|
-
const type = (0, import_tool.defineTabTool)({
|
|
83
|
-
capability: "core-input",
|
|
84
|
-
schema: {
|
|
85
|
-
name: "browser_type",
|
|
86
|
-
title: "Type text",
|
|
87
|
-
description: "Type text into editable element",
|
|
88
|
-
inputSchema: typeSchema,
|
|
89
|
-
type: "input"
|
|
90
|
-
},
|
|
91
|
-
handle: async (tab, params, response) => {
|
|
92
|
-
const { locator, resolved } = await tab.refLocator(params);
|
|
93
|
-
const secret = tab.context.lookupSecret(params.text);
|
|
94
|
-
const action = async () => {
|
|
95
|
-
if (params.slowly) {
|
|
96
|
-
response.setIncludeSnapshot();
|
|
97
|
-
response.addCode(`await page.${resolved}.pressSequentially(${secret.code});`);
|
|
98
|
-
await locator.pressSequentially(secret.value, tab.actionTimeoutOptions);
|
|
99
|
-
} else {
|
|
100
|
-
response.addCode(`await page.${resolved}.fill(${secret.code});`);
|
|
101
|
-
await locator.fill(secret.value, tab.actionTimeoutOptions);
|
|
102
|
-
}
|
|
103
|
-
if (params.submit) {
|
|
104
|
-
response.setIncludeSnapshot();
|
|
105
|
-
response.addCode(`await page.${resolved}.press('Enter');`);
|
|
106
|
-
await locator.press("Enter", tab.actionTimeoutOptions);
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
if (params.submit || params.slowly)
|
|
110
|
-
await tab.waitForCompletion(action);
|
|
111
|
-
else
|
|
112
|
-
await action();
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
const keydown = (0, import_tool.defineTabTool)({
|
|
116
|
-
capability: "core-input",
|
|
117
|
-
skillOnly: true,
|
|
118
|
-
schema: {
|
|
119
|
-
name: "browser_keydown",
|
|
120
|
-
title: "Press a key down",
|
|
121
|
-
description: "Press a key down on the keyboard",
|
|
122
|
-
inputSchema: import_mcpBundle.z.object({
|
|
123
|
-
key: import_mcpBundle.z.string().describe("Name of the key to press or a character to generate, such as `ArrowLeft` or `a`")
|
|
124
|
-
}),
|
|
125
|
-
type: "input"
|
|
126
|
-
},
|
|
127
|
-
handle: async (tab, params, response) => {
|
|
128
|
-
response.addCode(`await page.keyboard.down('${params.key}');`);
|
|
129
|
-
await tab.page.keyboard.down(params.key);
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
const keyup = (0, import_tool.defineTabTool)({
|
|
133
|
-
capability: "core-input",
|
|
134
|
-
skillOnly: true,
|
|
135
|
-
schema: {
|
|
136
|
-
name: "browser_keyup",
|
|
137
|
-
title: "Press a key up",
|
|
138
|
-
description: "Press a key up on the keyboard",
|
|
139
|
-
inputSchema: import_mcpBundle.z.object({
|
|
140
|
-
key: import_mcpBundle.z.string().describe("Name of the key to press or a character to generate, such as `ArrowLeft` or `a`")
|
|
141
|
-
}),
|
|
142
|
-
type: "input"
|
|
143
|
-
},
|
|
144
|
-
handle: async (tab, params, response) => {
|
|
145
|
-
response.addCode(`await page.keyboard.up('${params.key}');`);
|
|
146
|
-
await tab.page.keyboard.up(params.key);
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
var keyboard_default = [
|
|
150
|
-
press,
|
|
151
|
-
type,
|
|
152
|
-
pressSequentially,
|
|
153
|
-
keydown,
|
|
154
|
-
keyup
|
|
155
|
-
];
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var logFile_exports = {};
|
|
30
|
-
__export(logFile_exports, {
|
|
31
|
-
LogFile: () => LogFile
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(logFile_exports);
|
|
34
|
-
var import_fs = __toESM(require("fs"));
|
|
35
|
-
var import_path = __toESM(require("path"));
|
|
36
|
-
var import_utilsBundle = require("../../utilsBundle");
|
|
37
|
-
class LogFile {
|
|
38
|
-
constructor(context, startTime, filePrefix, title) {
|
|
39
|
-
this._stopped = false;
|
|
40
|
-
this._line = 0;
|
|
41
|
-
this._entries = 0;
|
|
42
|
-
this._lastLine = 0;
|
|
43
|
-
this._lastEntries = 0;
|
|
44
|
-
this._writeChain = Promise.resolve();
|
|
45
|
-
this._context = context;
|
|
46
|
-
this._startTime = startTime;
|
|
47
|
-
this._filePrefix = filePrefix;
|
|
48
|
-
this._title = title;
|
|
49
|
-
}
|
|
50
|
-
appendLine(wallTime, text) {
|
|
51
|
-
this._writeChain = this._writeChain.then(() => this._write(wallTime, text)).catch((e) => (0, import_utilsBundle.debug)("pw:tools:error")(e));
|
|
52
|
-
}
|
|
53
|
-
stop() {
|
|
54
|
-
this._stopped = true;
|
|
55
|
-
}
|
|
56
|
-
async take(relativeTo) {
|
|
57
|
-
const logChunk = await this._take();
|
|
58
|
-
if (!logChunk)
|
|
59
|
-
return void 0;
|
|
60
|
-
const logFilePath = relativeTo ? import_path.default.relative(relativeTo, logChunk.file) : logChunk.file;
|
|
61
|
-
const lineRange = logChunk.fromLine === logChunk.toLine ? `#L${logChunk.fromLine}` : `#L${logChunk.fromLine}-L${logChunk.toLine}`;
|
|
62
|
-
return `${logFilePath}${lineRange}`;
|
|
63
|
-
}
|
|
64
|
-
async _take() {
|
|
65
|
-
await this._writeChain;
|
|
66
|
-
if (!this._file || this._entries === this._lastEntries)
|
|
67
|
-
return void 0;
|
|
68
|
-
const chunk = {
|
|
69
|
-
type: this._title.toLowerCase(),
|
|
70
|
-
file: this._file,
|
|
71
|
-
fromLine: this._lastLine + 1,
|
|
72
|
-
toLine: this._line,
|
|
73
|
-
entryCount: this._entries - this._lastEntries
|
|
74
|
-
};
|
|
75
|
-
this._lastLine = this._line;
|
|
76
|
-
this._lastEntries = this._entries;
|
|
77
|
-
return chunk;
|
|
78
|
-
}
|
|
79
|
-
async _write(wallTime, text) {
|
|
80
|
-
if (this._stopped)
|
|
81
|
-
return;
|
|
82
|
-
this._file ??= await this._context.outputFile({ prefix: this._filePrefix, ext: "log", date: new Date(this._startTime) }, { origin: "code" });
|
|
83
|
-
const relativeTime = Math.round(wallTime - this._startTime);
|
|
84
|
-
const logLine = `[${String(relativeTime).padStart(8, " ")}ms] ${text}
|
|
85
|
-
`;
|
|
86
|
-
await import_fs.default.promises.appendFile(this._file, logLine);
|
|
87
|
-
const lineCount = logLine.split("\n").length - 1;
|
|
88
|
-
this._line += lineCount;
|
|
89
|
-
this._entries++;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
93
|
-
0 && (module.exports = {
|
|
94
|
-
LogFile
|
|
95
|
-
});
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var mouse_exports = {};
|
|
20
|
-
__export(mouse_exports, {
|
|
21
|
-
default: () => mouse_default
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(mouse_exports);
|
|
24
|
-
var import_mcpBundle = require("../../mcpBundle");
|
|
25
|
-
var import_stringUtils = require("../../utils/isomorphic/stringUtils");
|
|
26
|
-
var import_tool = require("./tool");
|
|
27
|
-
const mouseMove = (0, import_tool.defineTabTool)({
|
|
28
|
-
capability: "vision",
|
|
29
|
-
schema: {
|
|
30
|
-
name: "browser_mouse_move_xy",
|
|
31
|
-
title: "Move mouse",
|
|
32
|
-
description: "Move mouse to a given position",
|
|
33
|
-
inputSchema: import_mcpBundle.z.object({
|
|
34
|
-
x: import_mcpBundle.z.number().describe("X coordinate"),
|
|
35
|
-
y: import_mcpBundle.z.number().describe("Y coordinate")
|
|
36
|
-
}),
|
|
37
|
-
type: "input"
|
|
38
|
-
},
|
|
39
|
-
handle: async (tab, params, response) => {
|
|
40
|
-
response.addCode(`// Move mouse to (${params.x}, ${params.y})`);
|
|
41
|
-
response.addCode(`await page.mouse.move(${params.x}, ${params.y});`);
|
|
42
|
-
await tab.page.mouse.move(params.x, params.y);
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
const mouseDown = (0, import_tool.defineTabTool)({
|
|
46
|
-
capability: "vision",
|
|
47
|
-
schema: {
|
|
48
|
-
name: "browser_mouse_down",
|
|
49
|
-
title: "Press mouse down",
|
|
50
|
-
description: "Press mouse down",
|
|
51
|
-
inputSchema: import_mcpBundle.z.object({
|
|
52
|
-
button: import_mcpBundle.z.enum(["left", "right", "middle"]).optional().describe("Button to press, defaults to left")
|
|
53
|
-
}),
|
|
54
|
-
type: "input"
|
|
55
|
-
},
|
|
56
|
-
handle: async (tab, params, response) => {
|
|
57
|
-
const options = { button: params.button };
|
|
58
|
-
const optionsArg = (0, import_stringUtils.formatObjectOrVoid)(options);
|
|
59
|
-
response.addCode(`// Press mouse down`);
|
|
60
|
-
response.addCode(`await page.mouse.down(${optionsArg});`);
|
|
61
|
-
await tab.page.mouse.down(options);
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
const mouseUp = (0, import_tool.defineTabTool)({
|
|
65
|
-
capability: "vision",
|
|
66
|
-
schema: {
|
|
67
|
-
name: "browser_mouse_up",
|
|
68
|
-
title: "Press mouse up",
|
|
69
|
-
description: "Press mouse up",
|
|
70
|
-
inputSchema: import_mcpBundle.z.object({
|
|
71
|
-
button: import_mcpBundle.z.enum(["left", "right", "middle"]).optional().describe("Button to press, defaults to left")
|
|
72
|
-
}),
|
|
73
|
-
type: "input"
|
|
74
|
-
},
|
|
75
|
-
handle: async (tab, params, response) => {
|
|
76
|
-
const options = { button: params.button };
|
|
77
|
-
const optionsArg = (0, import_stringUtils.formatObjectOrVoid)(options);
|
|
78
|
-
response.addCode(`// Press mouse up`);
|
|
79
|
-
response.addCode(`await page.mouse.up(${optionsArg});`);
|
|
80
|
-
await tab.page.mouse.up(options);
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
const mouseWheel = (0, import_tool.defineTabTool)({
|
|
84
|
-
capability: "vision",
|
|
85
|
-
schema: {
|
|
86
|
-
name: "browser_mouse_wheel",
|
|
87
|
-
title: "Scroll mouse wheel",
|
|
88
|
-
description: "Scroll mouse wheel",
|
|
89
|
-
inputSchema: import_mcpBundle.z.object({
|
|
90
|
-
deltaX: import_mcpBundle.z.number().default(0).describe("X delta"),
|
|
91
|
-
deltaY: import_mcpBundle.z.number().default(0).describe("Y delta")
|
|
92
|
-
}),
|
|
93
|
-
type: "input"
|
|
94
|
-
},
|
|
95
|
-
handle: async (tab, params, response) => {
|
|
96
|
-
response.addCode(`// Scroll mouse wheel`);
|
|
97
|
-
response.addCode(`await page.mouse.wheel(${params.deltaX}, ${params.deltaY});`);
|
|
98
|
-
await tab.page.mouse.wheel(params.deltaX, params.deltaY);
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
const mouseClick = (0, import_tool.defineTabTool)({
|
|
102
|
-
capability: "vision",
|
|
103
|
-
schema: {
|
|
104
|
-
name: "browser_mouse_click_xy",
|
|
105
|
-
title: "Click",
|
|
106
|
-
description: "Click mouse button at a given position",
|
|
107
|
-
inputSchema: import_mcpBundle.z.object({
|
|
108
|
-
x: import_mcpBundle.z.number().describe("X coordinate"),
|
|
109
|
-
y: import_mcpBundle.z.number().describe("Y coordinate"),
|
|
110
|
-
button: import_mcpBundle.z.enum(["left", "right", "middle"]).optional().describe("Button to click, defaults to left"),
|
|
111
|
-
clickCount: import_mcpBundle.z.number().optional().describe("Number of clicks, defaults to 1"),
|
|
112
|
-
delay: import_mcpBundle.z.number().optional().describe("Time to wait between mouse down and mouse up in milliseconds, defaults to 0")
|
|
113
|
-
}),
|
|
114
|
-
type: "input"
|
|
115
|
-
},
|
|
116
|
-
handle: async (tab, params, response) => {
|
|
117
|
-
response.setIncludeSnapshot();
|
|
118
|
-
const options = {
|
|
119
|
-
button: params.button,
|
|
120
|
-
clickCount: params.clickCount,
|
|
121
|
-
delay: params.delay
|
|
122
|
-
};
|
|
123
|
-
const formatted = (0, import_stringUtils.formatObjectOrVoid)(options);
|
|
124
|
-
const optionsArg = formatted ? `, ${formatted}` : "";
|
|
125
|
-
response.addCode(`// Click mouse at coordinates (${params.x}, ${params.y})`);
|
|
126
|
-
response.addCode(`await page.mouse.click(${params.x}, ${params.y}${optionsArg});`);
|
|
127
|
-
await tab.waitForCompletion(async () => {
|
|
128
|
-
await tab.page.mouse.click(params.x, params.y, options);
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
const mouseDrag = (0, import_tool.defineTabTool)({
|
|
133
|
-
capability: "vision",
|
|
134
|
-
schema: {
|
|
135
|
-
name: "browser_mouse_drag_xy",
|
|
136
|
-
title: "Drag mouse",
|
|
137
|
-
description: "Drag left mouse button to a given position",
|
|
138
|
-
inputSchema: import_mcpBundle.z.object({
|
|
139
|
-
startX: import_mcpBundle.z.number().describe("Start X coordinate"),
|
|
140
|
-
startY: import_mcpBundle.z.number().describe("Start Y coordinate"),
|
|
141
|
-
endX: import_mcpBundle.z.number().describe("End X coordinate"),
|
|
142
|
-
endY: import_mcpBundle.z.number().describe("End Y coordinate")
|
|
143
|
-
}),
|
|
144
|
-
type: "input"
|
|
145
|
-
},
|
|
146
|
-
handle: async (tab, params, response) => {
|
|
147
|
-
response.setIncludeSnapshot();
|
|
148
|
-
response.addCode(`// Drag mouse from (${params.startX}, ${params.startY}) to (${params.endX}, ${params.endY})`);
|
|
149
|
-
response.addCode(`await page.mouse.move(${params.startX}, ${params.startY});`);
|
|
150
|
-
response.addCode(`await page.mouse.down();`);
|
|
151
|
-
response.addCode(`await page.mouse.move(${params.endX}, ${params.endY});`);
|
|
152
|
-
response.addCode(`await page.mouse.up();`);
|
|
153
|
-
await tab.waitForCompletion(async () => {
|
|
154
|
-
await tab.page.mouse.move(params.startX, params.startY);
|
|
155
|
-
await tab.page.mouse.down();
|
|
156
|
-
await tab.page.mouse.move(params.endX, params.endY);
|
|
157
|
-
await tab.page.mouse.up();
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
var mouse_default = [
|
|
162
|
-
mouseMove,
|
|
163
|
-
mouseClick,
|
|
164
|
-
mouseDrag,
|
|
165
|
-
mouseDown,
|
|
166
|
-
mouseUp,
|
|
167
|
-
mouseWheel
|
|
168
|
-
];
|