chrome-devtools-frontend 1.0.1615539 → 1.0.1616061
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/front_end/generated/InspectorBackendCommands.ts +2 -1
- package/front_end/generated/SupportedCSSProperties.js +4 -0
- package/front_end/generated/protocol-mapping.d.ts +7 -0
- package/front_end/generated/protocol-proxy-api.d.ts +5 -0
- package/front_end/generated/protocol.ts +11 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +5 -4
- package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +3 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +85 -47
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +32 -0
- package/front_end/models/bindings/SymbolizedError.ts +20 -0
- package/front_end/models/bindings/bindings.ts +2 -0
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +28 -23
- package/front_end/panels/ai_assistance/components/chatMessage.css +1 -1
- package/front_end/panels/elements/PropertiesWidget.ts +8 -8
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/README.md +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +12 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.d.ts +74 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.js +68 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts +8 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Issue.d.ts +22 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Issue.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Issue.js +8 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Issue.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +35 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Realm.d.ts +106 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Realm.js +29 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/WebWorker.d.ts +24 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/WebWorker.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/WebWorker.js +15 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/WebWorker.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js +8 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserConnector.js +2 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js +6 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js +9 -47
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Input.js +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Input.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +8 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +14 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Realm.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Realm.js +21 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Target.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Target.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Target.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.js +18 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.d.ts +28 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.js +67 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +9 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +56 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/CdpIssue.d.ts +17 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/CdpIssue.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/CdpIssue.js +27 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/CdpIssue.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.d.ts +16 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.js +79 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts +10 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.js +26 -15
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.js +38 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/IsolatedWorld.d.ts +9 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/IsolatedWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/IsolatedWorld.js +31 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/IsolatedWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +6 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +49 -35
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Target.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Target.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Target.js +16 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Target.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js +9 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.d.ts +218 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.js +288 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebWorker.d.ts +4 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebWorker.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebWorker.js +28 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebWorker.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/cdp.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/cdp.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/cdp.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/cdp.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/utils.d.ts +9 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/utils.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/utils.js +36 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/utils.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +7 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/types.d.ts +0 -11
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/types.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +7851 -6616
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +1017 -305
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +12 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.d.ts +74 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.js +64 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts +8 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Input.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Issue.d.ts +22 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Issue.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Issue.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Issue.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +35 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Realm.d.ts +106 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Realm.js +29 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/WebWorker.d.ts +24 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/WebWorker.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/WebWorker.js +14 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/WebWorker.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js +8 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserConnector.js +2 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js +6 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js +8 -46
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Input.js +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Input.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +8 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +14 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.js +22 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Target.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Target.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Target.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.js +18 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.d.ts +28 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.js +62 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +9 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +56 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/CdpIssue.d.ts +17 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/CdpIssue.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/CdpIssue.js +23 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/CdpIssue.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.d.ts +16 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.js +75 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts +10 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.js +26 -15
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.js +38 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/IsolatedWorld.d.ts +9 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/IsolatedWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/IsolatedWorld.js +31 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/IsolatedWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +6 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +49 -35
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Target.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Target.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Target.js +16 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Target.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js +9 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.d.ts +218 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.js +282 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebWorker.d.ts +4 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebWorker.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebWorker.js +29 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebWorker.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/cdp.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/cdp.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/cdp.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/cdp.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/utils.d.ts +9 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/utils.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/utils.js +34 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/utils.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts +7 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/types.d.ts +0 -11
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/types.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer-core-browser.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer-core-browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/Mutex.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/Mutex.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +7851 -6616
- package/front_end/third_party/puppeteer/package/package.json +5 -6
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +13 -0
- package/front_end/third_party/puppeteer/package/src/api/Extension.ts +98 -0
- package/front_end/third_party/puppeteer/package/src/api/Frame.ts +9 -0
- package/front_end/third_party/puppeteer/package/src/api/Issue.ts +24 -0
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +38 -0
- package/front_end/third_party/puppeteer/package/src/api/Realm.ts +111 -12
- package/front_end/third_party/puppeteer/package/src/api/WebWorker.ts +26 -4
- package/front_end/third_party/puppeteer/package/src/api/api.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +12 -0
- package/front_end/third_party/puppeteer/package/src/bidi/BrowserConnector.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/bidi/BrowserContext.ts +7 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +13 -67
- package/front_end/third_party/puppeteer/package/src/bidi/Input.ts +0 -1
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +21 -2
- package/front_end/third_party/puppeteer/package/src/bidi/Realm.ts +39 -1
- package/front_end/third_party/puppeteer/package/src/bidi/Target.ts +2 -5
- package/front_end/third_party/puppeteer/package/src/bidi/core/Realm.ts +23 -0
- package/front_end/third_party/puppeteer/package/src/bidi/util.ts +94 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +75 -2
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserConnector.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/cdp/CdpIssue.ts +30 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Extension.ts +101 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +32 -22
- package/front_end/third_party/puppeteer/package/src/cdp/FrameManager.ts +44 -3
- package/front_end/third_party/puppeteer/package/src/cdp/IsolatedWorld.ts +40 -2
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +61 -47
- package/front_end/third_party/puppeteer/package/src/cdp/Target.ts +17 -7
- package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +14 -1
- package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +441 -0
- package/front_end/third_party/puppeteer/package/src/cdp/WebWorker.ts +38 -12
- package/front_end/third_party/puppeteer/package/src/cdp/cdp.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/utils.ts +52 -0
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +7 -0
- package/front_end/third_party/puppeteer/package/src/common/types.ts +0 -14
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +7 -0
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +0 -1
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/Mutex.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +5 -0
- package/front_end/ui/legacy/Treeoutline.ts +13 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google Inc.
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { Protocol } from 'devtools-protocol';
|
|
7
|
+
import type { CDPSession } from '../api/CDPSession.js';
|
|
8
|
+
import type { ElementHandle } from '../api/ElementHandle.js';
|
|
9
|
+
import type { Frame } from '../api/Frame.js';
|
|
10
|
+
import type { ConsoleMessageLocation } from '../common/ConsoleMessage.js';
|
|
11
|
+
import { EventEmitter } from '../common/EventEmitter.js';
|
|
12
|
+
import type { FrameManager } from './FrameManager.js';
|
|
13
|
+
/**
|
|
14
|
+
* Tool annotations
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export interface WebMCPAnnotation {
|
|
19
|
+
/**
|
|
20
|
+
* A hint indicating that the tool does not modify any state.
|
|
21
|
+
*/
|
|
22
|
+
readOnly?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* If the declarative tool was declared with the autosubmit attribute.
|
|
25
|
+
*/
|
|
26
|
+
autosubmit?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Represents the status of a tool invocation.
|
|
30
|
+
*
|
|
31
|
+
* @public
|
|
32
|
+
*/
|
|
33
|
+
export type WebMCPInvocationStatus = 'Completed' | 'Canceled' | 'Error';
|
|
34
|
+
interface ProtocolWebMCPTool {
|
|
35
|
+
name: string;
|
|
36
|
+
description: string;
|
|
37
|
+
inputSchema?: object;
|
|
38
|
+
annotations?: WebMCPAnnotation;
|
|
39
|
+
frameId: string;
|
|
40
|
+
backendNodeId?: number;
|
|
41
|
+
stackTrace?: Protocol.Runtime.StackTrace;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Represents a registered WebMCP tool available on the page.
|
|
45
|
+
*
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
48
|
+
export declare class WebMCPTool extends EventEmitter<{
|
|
49
|
+
/** Emitted when invocation starts. */
|
|
50
|
+
toolinvoked: WebMCPToolCall;
|
|
51
|
+
}> {
|
|
52
|
+
#private;
|
|
53
|
+
/**
|
|
54
|
+
* Tool name.
|
|
55
|
+
*/
|
|
56
|
+
name: string;
|
|
57
|
+
/**
|
|
58
|
+
* Tool description.
|
|
59
|
+
*/
|
|
60
|
+
description: string;
|
|
61
|
+
/**
|
|
62
|
+
* Schema for the tool's input parameters.
|
|
63
|
+
*/
|
|
64
|
+
inputSchema?: object;
|
|
65
|
+
/**
|
|
66
|
+
* Optional annotations for the tool.
|
|
67
|
+
*/
|
|
68
|
+
annotations?: WebMCPAnnotation;
|
|
69
|
+
/**
|
|
70
|
+
* Frame the tool was defined for.
|
|
71
|
+
*/
|
|
72
|
+
frame: Frame;
|
|
73
|
+
/**
|
|
74
|
+
* Source location that defined the tool (if available).
|
|
75
|
+
*/
|
|
76
|
+
location?: ConsoleMessageLocation;
|
|
77
|
+
/**
|
|
78
|
+
* @internal
|
|
79
|
+
*/
|
|
80
|
+
rawStackTrace?: Protocol.Runtime.StackTrace;
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
constructor(webmcp: WebMCP, tool: ProtocolWebMCPTool, frame: Frame);
|
|
85
|
+
/**
|
|
86
|
+
* The corresponding ElementHandle when tool was registered via a form.
|
|
87
|
+
*/
|
|
88
|
+
get formElement(): Promise<ElementHandle<HTMLFormElement> | undefined>;
|
|
89
|
+
/**
|
|
90
|
+
* Executes tool with input parameters, matching tool's `inputSchema`.
|
|
91
|
+
*/
|
|
92
|
+
execute(input?: object): Promise<WebMCPToolCallResult>;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* @public
|
|
96
|
+
*/
|
|
97
|
+
export interface WebMCPToolsAddedEvent {
|
|
98
|
+
/**
|
|
99
|
+
* Array of tools that were added.
|
|
100
|
+
*/
|
|
101
|
+
tools: WebMCPTool[];
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* @public
|
|
105
|
+
*/
|
|
106
|
+
export interface WebMCPToolsRemovedEvent {
|
|
107
|
+
/**
|
|
108
|
+
* Array of tools that were removed.
|
|
109
|
+
*/
|
|
110
|
+
tools: WebMCPTool[];
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* @public
|
|
114
|
+
*/
|
|
115
|
+
export declare class WebMCPToolCall {
|
|
116
|
+
/**
|
|
117
|
+
* Tool invocation identifier.
|
|
118
|
+
*/
|
|
119
|
+
id: string;
|
|
120
|
+
/**
|
|
121
|
+
* Tool that was called.
|
|
122
|
+
*/
|
|
123
|
+
tool: WebMCPTool;
|
|
124
|
+
/**
|
|
125
|
+
* The input parameters used for the call.
|
|
126
|
+
*/
|
|
127
|
+
input: object;
|
|
128
|
+
/**
|
|
129
|
+
* @internal
|
|
130
|
+
*/
|
|
131
|
+
constructor(invocationId: string, tool: WebMCPTool, input: string);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* @public
|
|
135
|
+
*/
|
|
136
|
+
export interface WebMCPToolCallResult {
|
|
137
|
+
/**
|
|
138
|
+
* Tool invocation identifier.
|
|
139
|
+
*/
|
|
140
|
+
id: string;
|
|
141
|
+
/**
|
|
142
|
+
* The corresponding tool call if available.
|
|
143
|
+
*/
|
|
144
|
+
call?: WebMCPToolCall;
|
|
145
|
+
/**
|
|
146
|
+
* Status of the invocation.
|
|
147
|
+
*/
|
|
148
|
+
status: WebMCPInvocationStatus;
|
|
149
|
+
/**
|
|
150
|
+
* Output or error delivered as delivered to the agent. Missing if `status` is anything
|
|
151
|
+
* other than Completed.
|
|
152
|
+
*/
|
|
153
|
+
output?: any;
|
|
154
|
+
/**
|
|
155
|
+
* Error text.
|
|
156
|
+
*/
|
|
157
|
+
errorText?: string;
|
|
158
|
+
/**
|
|
159
|
+
* The exception object, if the javascript tool threw an error.
|
|
160
|
+
*/
|
|
161
|
+
exception?: Protocol.Runtime.RemoteObject;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* The experimental WebMCP class provides an API for the WebMCP API.
|
|
165
|
+
*
|
|
166
|
+
* See the
|
|
167
|
+
* {@link https://pptr.dev/guides/webmcp|WebMCP guide}
|
|
168
|
+
* for more details.
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
*
|
|
172
|
+
* ```ts
|
|
173
|
+
* await page.goto('https://www.example.com');
|
|
174
|
+
* const tools = page.webmcp.tools();
|
|
175
|
+
* for (const tool of tools) {
|
|
176
|
+
* console.log(`Tool found: ${tool.name} - ${tool.description}`);
|
|
177
|
+
* }
|
|
178
|
+
* ```
|
|
179
|
+
*
|
|
180
|
+
* @experimental
|
|
181
|
+
* @public
|
|
182
|
+
*/
|
|
183
|
+
export declare class WebMCP extends EventEmitter<{
|
|
184
|
+
/** Emitted when tools are added. */
|
|
185
|
+
toolsadded: WebMCPToolsAddedEvent;
|
|
186
|
+
/** Emitted when tools are removed. */
|
|
187
|
+
toolsremoved: WebMCPToolsRemovedEvent;
|
|
188
|
+
/** Emitted when a tool invocation starts. */
|
|
189
|
+
toolinvoked: WebMCPToolCall;
|
|
190
|
+
/** Emitted when a tool invocation completes or fails. */
|
|
191
|
+
toolresponded: WebMCPToolCallResult;
|
|
192
|
+
}> {
|
|
193
|
+
#private;
|
|
194
|
+
/**
|
|
195
|
+
* @internal
|
|
196
|
+
*/
|
|
197
|
+
constructor(client: CDPSession, frameManager: FrameManager);
|
|
198
|
+
/**
|
|
199
|
+
* @internal
|
|
200
|
+
*/
|
|
201
|
+
initialize(): Promise<void>;
|
|
202
|
+
/**
|
|
203
|
+
* @internal
|
|
204
|
+
*/
|
|
205
|
+
invokeTool(tool: WebMCPTool, input: object): Promise<{
|
|
206
|
+
invocationId: string;
|
|
207
|
+
}>;
|
|
208
|
+
/**
|
|
209
|
+
* Gets all WebMCP tools defined by the page.
|
|
210
|
+
*/
|
|
211
|
+
tools(): WebMCPTool[];
|
|
212
|
+
/**
|
|
213
|
+
* @internal
|
|
214
|
+
*/
|
|
215
|
+
updateClient(client: CDPSession): void;
|
|
216
|
+
}
|
|
217
|
+
export {};
|
|
218
|
+
//# sourceMappingURL=WebMCP.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file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AAC,EAAE,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC;CAC3C;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,MAAO,SAAQ,YAAY,CAAC;IACvC,oCAAoC;IACpC,UAAU,EAAE,qBAAqB,CAAC;IAClC,sCAAsC;IACtC,YAAY,EAAE,uBAAuB,CAAC;IACtC,6CAA6C;IAC7C,WAAW,EAAE,cAAc,CAAC;IAC5B,yDAAyD;IACzD,aAAa,EAAE,oBAAoB,CAAC;CACrC,CAAC;;IA+EA;;OAEG;gBACS,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY;IAW1D;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAKjC;;OAEG;IACG,UAAU,CACd,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAC,CAAC;IASlC;;OAEG;IACH,KAAK,IAAI,UAAU,EAAE;IAiBrB;;OAEG;IACH,YAAY,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;CAYvC"}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2026 Google Inc.
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.WebMCP = exports.WebMCPToolCall = exports.WebMCPTool = void 0;
|
|
9
|
+
const EventEmitter_js_1 = require("../common/EventEmitter.js");
|
|
10
|
+
const util_js_1 = require("../common/util.js");
|
|
11
|
+
const FrameManagerEvents_js_1 = require("./FrameManagerEvents.js");
|
|
12
|
+
const IsolatedWorlds_js_1 = require("./IsolatedWorlds.js");
|
|
13
|
+
/**
|
|
14
|
+
* Represents a registered WebMCP tool available on the page.
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
class WebMCPTool extends EventEmitter_js_1.EventEmitter {
|
|
19
|
+
#webmcp;
|
|
20
|
+
#backendNodeId;
|
|
21
|
+
#formElement;
|
|
22
|
+
/**
|
|
23
|
+
* Tool name.
|
|
24
|
+
*/
|
|
25
|
+
name;
|
|
26
|
+
/**
|
|
27
|
+
* Tool description.
|
|
28
|
+
*/
|
|
29
|
+
description;
|
|
30
|
+
/**
|
|
31
|
+
* Schema for the tool's input parameters.
|
|
32
|
+
*/
|
|
33
|
+
inputSchema;
|
|
34
|
+
/**
|
|
35
|
+
* Optional annotations for the tool.
|
|
36
|
+
*/
|
|
37
|
+
annotations;
|
|
38
|
+
/**
|
|
39
|
+
* Frame the tool was defined for.
|
|
40
|
+
*/
|
|
41
|
+
frame;
|
|
42
|
+
/**
|
|
43
|
+
* Source location that defined the tool (if available).
|
|
44
|
+
*/
|
|
45
|
+
location;
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
rawStackTrace;
|
|
50
|
+
/**
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
constructor(webmcp, tool, frame) {
|
|
54
|
+
super();
|
|
55
|
+
this.#webmcp = webmcp;
|
|
56
|
+
this.name = tool.name;
|
|
57
|
+
this.description = tool.description;
|
|
58
|
+
this.inputSchema = tool.inputSchema;
|
|
59
|
+
this.annotations = tool.annotations;
|
|
60
|
+
this.frame = frame;
|
|
61
|
+
this.#backendNodeId = tool.backendNodeId;
|
|
62
|
+
if (tool.stackTrace?.callFrames.length) {
|
|
63
|
+
this.location = {
|
|
64
|
+
url: tool.stackTrace.callFrames[0].url,
|
|
65
|
+
lineNumber: tool.stackTrace.callFrames[0].lineNumber,
|
|
66
|
+
columnNumber: tool.stackTrace.callFrames[0].columnNumber,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
this.rawStackTrace = tool.stackTrace;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* The corresponding ElementHandle when tool was registered via a form.
|
|
73
|
+
*/
|
|
74
|
+
get formElement() {
|
|
75
|
+
return (async () => {
|
|
76
|
+
if (this.#formElement && !this.#formElement.disposed) {
|
|
77
|
+
return this.#formElement;
|
|
78
|
+
}
|
|
79
|
+
if (!this.#backendNodeId) {
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
this.#formElement = (await this.frame.worlds[IsolatedWorlds_js_1.MAIN_WORLD].adoptBackendNode(this.#backendNodeId));
|
|
83
|
+
return this.#formElement;
|
|
84
|
+
})();
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Executes tool with input parameters, matching tool's `inputSchema`.
|
|
88
|
+
*/
|
|
89
|
+
async execute(input = {}) {
|
|
90
|
+
const { invocationId } = await this.#webmcp.invokeTool(this, input);
|
|
91
|
+
return await new Promise(resolve => {
|
|
92
|
+
const handler = (event) => {
|
|
93
|
+
if (event.id === invocationId) {
|
|
94
|
+
this.#webmcp.off('toolresponded', handler);
|
|
95
|
+
resolve(event);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
this.#webmcp.on('toolresponded', handler);
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
exports.WebMCPTool = WebMCPTool;
|
|
103
|
+
/**
|
|
104
|
+
* @public
|
|
105
|
+
*/
|
|
106
|
+
class WebMCPToolCall {
|
|
107
|
+
/**
|
|
108
|
+
* Tool invocation identifier.
|
|
109
|
+
*/
|
|
110
|
+
id;
|
|
111
|
+
/**
|
|
112
|
+
* Tool that was called.
|
|
113
|
+
*/
|
|
114
|
+
tool;
|
|
115
|
+
/**
|
|
116
|
+
* The input parameters used for the call.
|
|
117
|
+
*/
|
|
118
|
+
input;
|
|
119
|
+
/**
|
|
120
|
+
* @internal
|
|
121
|
+
*/
|
|
122
|
+
constructor(invocationId, tool, input) {
|
|
123
|
+
this.id = invocationId;
|
|
124
|
+
this.tool = tool;
|
|
125
|
+
try {
|
|
126
|
+
this.input = JSON.parse(input);
|
|
127
|
+
}
|
|
128
|
+
catch (error) {
|
|
129
|
+
this.input = {};
|
|
130
|
+
(0, util_js_1.debugError)(error);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
exports.WebMCPToolCall = WebMCPToolCall;
|
|
135
|
+
/**
|
|
136
|
+
* The experimental WebMCP class provides an API for the WebMCP API.
|
|
137
|
+
*
|
|
138
|
+
* See the
|
|
139
|
+
* {@link https://pptr.dev/guides/webmcp|WebMCP guide}
|
|
140
|
+
* for more details.
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
*
|
|
144
|
+
* ```ts
|
|
145
|
+
* await page.goto('https://www.example.com');
|
|
146
|
+
* const tools = page.webmcp.tools();
|
|
147
|
+
* for (const tool of tools) {
|
|
148
|
+
* console.log(`Tool found: ${tool.name} - ${tool.description}`);
|
|
149
|
+
* }
|
|
150
|
+
* ```
|
|
151
|
+
*
|
|
152
|
+
* @experimental
|
|
153
|
+
* @public
|
|
154
|
+
*/
|
|
155
|
+
class WebMCP extends EventEmitter_js_1.EventEmitter {
|
|
156
|
+
#client;
|
|
157
|
+
#frameManager;
|
|
158
|
+
#tools = new Map();
|
|
159
|
+
#pendingCalls = new Map();
|
|
160
|
+
#onToolsAdded = (event) => {
|
|
161
|
+
const tools = [];
|
|
162
|
+
for (const tool of event.tools) {
|
|
163
|
+
const frame = this.#frameManager.frame(tool.frameId);
|
|
164
|
+
if (!frame) {
|
|
165
|
+
continue;
|
|
166
|
+
}
|
|
167
|
+
const frameTools = this.#tools.get(tool.frameId) ?? new Map();
|
|
168
|
+
if (!this.#tools.has(tool.frameId)) {
|
|
169
|
+
this.#tools.set(tool.frameId, frameTools);
|
|
170
|
+
}
|
|
171
|
+
const addedTool = new WebMCPTool(this, tool, frame);
|
|
172
|
+
frameTools.set(tool.name, addedTool);
|
|
173
|
+
tools.push(addedTool);
|
|
174
|
+
}
|
|
175
|
+
this.emit('toolsadded', { tools });
|
|
176
|
+
};
|
|
177
|
+
#onToolsRemoved = (event) => {
|
|
178
|
+
const tools = [];
|
|
179
|
+
event.tools.forEach(tool => {
|
|
180
|
+
const removedTool = this.#tools.get(tool.frameId)?.get(tool.name);
|
|
181
|
+
if (removedTool) {
|
|
182
|
+
tools.push(removedTool);
|
|
183
|
+
}
|
|
184
|
+
this.#tools.get(tool.frameId)?.delete(tool.name);
|
|
185
|
+
});
|
|
186
|
+
this.emit('toolsremoved', { tools });
|
|
187
|
+
};
|
|
188
|
+
#onToolInvoked = (event) => {
|
|
189
|
+
const tool = this.#tools.get(event.frameId)?.get(event.toolName);
|
|
190
|
+
if (!tool) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
const call = new WebMCPToolCall(event.invocationId, tool, event.input);
|
|
194
|
+
this.#pendingCalls.set(call.id, call);
|
|
195
|
+
tool.emit('toolinvoked', call);
|
|
196
|
+
this.emit('toolinvoked', call);
|
|
197
|
+
};
|
|
198
|
+
#onToolResponded = (event) => {
|
|
199
|
+
const call = this.#pendingCalls.get(event.invocationId);
|
|
200
|
+
if (call) {
|
|
201
|
+
this.#pendingCalls.delete(event.invocationId);
|
|
202
|
+
}
|
|
203
|
+
const response = {
|
|
204
|
+
id: event.invocationId,
|
|
205
|
+
call: call,
|
|
206
|
+
status: event.status,
|
|
207
|
+
output: event.output,
|
|
208
|
+
errorText: event.errorText,
|
|
209
|
+
exception: event.exception,
|
|
210
|
+
};
|
|
211
|
+
this.emit('toolresponded', response);
|
|
212
|
+
};
|
|
213
|
+
#onFrameNavigated = (frame) => {
|
|
214
|
+
this.#pendingCalls.clear();
|
|
215
|
+
const frameTools = this.#tools.get(frame._id);
|
|
216
|
+
if (!frameTools) {
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
const tools = Array.from(frameTools.values());
|
|
220
|
+
this.#tools.delete(frame._id);
|
|
221
|
+
if (tools.length) {
|
|
222
|
+
this.emit('toolsremoved', { tools });
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
/**
|
|
226
|
+
* @internal
|
|
227
|
+
*/
|
|
228
|
+
constructor(client, frameManager) {
|
|
229
|
+
super();
|
|
230
|
+
this.#client = client;
|
|
231
|
+
this.#frameManager = frameManager;
|
|
232
|
+
this.#frameManager.on(FrameManagerEvents_js_1.FrameManagerEvent.FrameNavigated, this.#onFrameNavigated);
|
|
233
|
+
this.#bindListeners();
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* @internal
|
|
237
|
+
*/
|
|
238
|
+
async initialize() {
|
|
239
|
+
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
240
|
+
return await this.#client.send('WebMCP.enable').catch(util_js_1.debugError);
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* @internal
|
|
244
|
+
*/
|
|
245
|
+
async invokeTool(tool, input) {
|
|
246
|
+
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
247
|
+
return await this.#client.send('WebMCP.invokeTool', {
|
|
248
|
+
frameId: tool.frame._id,
|
|
249
|
+
toolName: tool.name,
|
|
250
|
+
input,
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Gets all WebMCP tools defined by the page.
|
|
255
|
+
*/
|
|
256
|
+
tools() {
|
|
257
|
+
return Array.from(this.#tools.values()).flatMap(toolMap => {
|
|
258
|
+
return Array.from(toolMap.values());
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
#bindListeners() {
|
|
262
|
+
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
263
|
+
this.#client.on('WebMCP.toolsAdded', this.#onToolsAdded);
|
|
264
|
+
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
265
|
+
this.#client.on('WebMCP.toolsRemoved', this.#onToolsRemoved);
|
|
266
|
+
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
267
|
+
this.#client.on('WebMCP.toolInvoked', this.#onToolInvoked);
|
|
268
|
+
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
269
|
+
this.#client.on('WebMCP.toolResponded', this.#onToolResponded);
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* @internal
|
|
273
|
+
*/
|
|
274
|
+
updateClient(client) {
|
|
275
|
+
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
276
|
+
this.#client.off('WebMCP.toolsAdded', this.#onToolsAdded);
|
|
277
|
+
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
278
|
+
this.#client.off('WebMCP.toolsRemoved', this.#onToolsRemoved);
|
|
279
|
+
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
280
|
+
this.#client.off('WebMCP.toolInvoked', this.#onToolInvoked);
|
|
281
|
+
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
282
|
+
this.#client.off('WebMCP.toolResponded', this.#onToolResponded);
|
|
283
|
+
this.#client = client;
|
|
284
|
+
this.#bindListeners();
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
exports.WebMCP = WebMCP;
|
|
288
|
+
//# sourceMappingURL=WebMCP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebMCP.js","sourceRoot":"","sources":["../../../../src/cdp/WebMCP.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAQH,+DAAuD;AACvD,+CAA6C;AAI7C,mEAA0D;AAC1D,2DAA+C;AA0D/C;;;;GAIG;AACH,MAAa,UAAW,SAAQ,8BAG9B;IACA,OAAO,CAAS;IAChB,cAAc,CAAU;IACxB,YAAY,CAAkC;IAE9C;;OAEG;IACH,IAAI,CAAS;IACb;;OAEG;IACH,WAAW,CAAS;IACpB;;OAEG;IACH,WAAW,CAAU;IACrB;;OAEG;IACH,WAAW,CAAoB;IAC/B;;OAEG;IACH,KAAK,CAAQ;IACb;;OAEG;IACH,QAAQ,CAA0B;IAClC;;OAEG;IACH,aAAa,CAA+B;IAE5C;;OAEG;IACH,YAAY,MAAc,EAAE,IAAwB,EAAE,KAA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CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QAC9D,4DAA4D;QAC5D,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QAC5D,4DAA4D;QAC5D,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAChE,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;CACF;AAhKD,wBAgKC"}
|
|
@@ -7,13 +7,9 @@ import type { Protocol } from 'devtools-protocol';
|
|
|
7
7
|
import { type CDPSession } from '../api/CDPSession.js';
|
|
8
8
|
import type { Realm } from '../api/Realm.js';
|
|
9
9
|
import { TargetType } from '../api/Target.js';
|
|
10
|
-
import { WebWorker } from '../api/WebWorker.js';
|
|
11
|
-
import {
|
|
10
|
+
import { WebWorker, type WebWorkerEvents } from '../api/WebWorker.js';
|
|
11
|
+
import { EventEmitter } from '../common/EventEmitter.js';
|
|
12
12
|
import type { NetworkManager } from './NetworkManager.js';
|
|
13
|
-
/**
|
|
14
|
-
* @internal
|
|
15
|
-
*/
|
|
16
|
-
export type ConsoleAPICalledCallback = (world: IsolatedWorld, event: Protocol.Runtime.ConsoleAPICalledEvent) => void;
|
|
17
13
|
/**
|
|
18
14
|
* @internal
|
|
19
15
|
*/
|
|
@@ -23,7 +19,8 @@ export type ExceptionThrownCallback = (event: Protocol.Runtime.ExceptionThrownEv
|
|
|
23
19
|
*/
|
|
24
20
|
export declare class CdpWebWorker extends WebWorker {
|
|
25
21
|
#private;
|
|
26
|
-
|
|
22
|
+
get internalEmitter(): EventEmitter<WebWorkerEvents>;
|
|
23
|
+
constructor(client: CDPSession, url: string, targetId: string, targetType: TargetType, exceptionThrown: ExceptionThrownCallback, networkManager?: NetworkManager);
|
|
27
24
|
mainRealm(): Realm;
|
|
28
25
|
get client(): CDPSession;
|
|
29
26
|
close(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebWorker.d.ts","sourceRoot":"","sources":["../../../../src/cdp/WebWorker.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAkB,KAAK,UAAU,EAAC,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAC5C,OAAO,
|
|
1
|
+
{"version":3,"file":"WebWorker.d.ts","sourceRoot":"","sources":["../../../../src/cdp/WebWorker.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAkB,KAAK,UAAU,EAAC,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,SAAS,EAET,KAAK,eAAe,EACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAC;AAOvD,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAGxD;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,CACpC,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,oBAAoB,KACzC,IAAI,CAAC;AAEV;;GAEG;AACH,qBAAa,YAAa,SAAQ,SAAS;;IAOzC,IAAI,eAAe,IAAI,YAAY,CAAC,eAAe,CAAC,CAEnD;gBAGC,MAAM,EAAE,UAAU,EAClB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,uBAAuB,EACxC,cAAc,CAAC,EAAE,cAAc;IAqDjC,SAAS,IAAI,KAAK;IAIlB,IAAI,MAAM,IAAI,UAAU,CAEvB;IAEc,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAyBtC"}
|
|
@@ -4,10 +4,13 @@ exports.CdpWebWorker = void 0;
|
|
|
4
4
|
const CDPSession_js_1 = require("../api/CDPSession.js");
|
|
5
5
|
const Target_js_1 = require("../api/Target.js");
|
|
6
6
|
const WebWorker_js_1 = require("../api/WebWorker.js");
|
|
7
|
+
const EventEmitter_js_1 = require("../common/EventEmitter.js");
|
|
7
8
|
const TimeoutSettings_js_1 = require("../common/TimeoutSettings.js");
|
|
8
9
|
const util_js_1 = require("../common/util.js");
|
|
9
10
|
const ExecutionContext_js_1 = require("./ExecutionContext.js");
|
|
10
11
|
const IsolatedWorld_js_1 = require("./IsolatedWorld.js");
|
|
12
|
+
const IsolatedWorlds_js_1 = require("./IsolatedWorlds.js");
|
|
13
|
+
const utils_js_1 = require("./utils.js");
|
|
11
14
|
/**
|
|
12
15
|
* @internal
|
|
13
16
|
*/
|
|
@@ -16,18 +19,40 @@ class CdpWebWorker extends WebWorker_js_1.WebWorker {
|
|
|
16
19
|
#client;
|
|
17
20
|
#id;
|
|
18
21
|
#targetType;
|
|
19
|
-
|
|
22
|
+
#emitter;
|
|
23
|
+
get internalEmitter() {
|
|
24
|
+
return this.#emitter;
|
|
25
|
+
}
|
|
26
|
+
constructor(client, url, targetId, targetType, exceptionThrown, networkManager) {
|
|
20
27
|
super(url);
|
|
21
28
|
this.#id = targetId;
|
|
22
29
|
this.#client = client;
|
|
23
30
|
this.#targetType = targetType;
|
|
24
|
-
this.#world = new IsolatedWorld_js_1.IsolatedWorld(this, new TimeoutSettings_js_1.TimeoutSettings());
|
|
31
|
+
this.#world = new IsolatedWorld_js_1.IsolatedWorld(this, new TimeoutSettings_js_1.TimeoutSettings(), IsolatedWorlds_js_1.MAIN_WORLD);
|
|
32
|
+
this.#emitter = new EventEmitter_js_1.EventEmitter();
|
|
25
33
|
this.#client.once('Runtime.executionContextCreated', async (event) => {
|
|
26
34
|
this.#world.setContext(new ExecutionContext_js_1.ExecutionContext(client, event.context, this.#world));
|
|
27
35
|
});
|
|
28
36
|
this.#world.emitter.on('consoleapicalled', async (event) => {
|
|
29
37
|
try {
|
|
30
|
-
|
|
38
|
+
const values = event.args.map(arg => {
|
|
39
|
+
return this.#world.createCdpHandle(arg);
|
|
40
|
+
});
|
|
41
|
+
const noInternalListeners = this.#emitter.listenerCount(WebWorker_js_1.WebWorkerEvent.Console) === 0;
|
|
42
|
+
const noWorkerListeners = this.listenerCount(WebWorker_js_1.WebWorkerEvent.Console) === 0;
|
|
43
|
+
if (noInternalListeners && noWorkerListeners) {
|
|
44
|
+
// eslint-disable-next-line max-len -- The comment is long.
|
|
45
|
+
// eslint-disable-next-line @puppeteer/use-using -- These are not owned by this function.
|
|
46
|
+
for (const value of values) {
|
|
47
|
+
void value.dispose().catch(util_js_1.debugError);
|
|
48
|
+
}
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const consoleMessages = (0, utils_js_1.createConsoleMessage)(event, values, this.#id);
|
|
52
|
+
this.#emitter.emit(WebWorker_js_1.WebWorkerEvent.Console, consoleMessages);
|
|
53
|
+
if (!noWorkerListeners) {
|
|
54
|
+
this.emit(WebWorker_js_1.WebWorkerEvent.Console, consoleMessages);
|
|
55
|
+
}
|
|
31
56
|
}
|
|
32
57
|
catch (err) {
|
|
33
58
|
(0, util_js_1.debugError)(err);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebWorker.js","sourceRoot":"","sources":["../../../../src/cdp/WebWorker.ts"],"names":[],"mappings":";;;AAOA,wDAAsE;AAEtE,gDAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"WebWorker.js","sourceRoot":"","sources":["../../../../src/cdp/WebWorker.ts"],"names":[],"mappings":";;;AAOA,wDAAsE;AAEtE,g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AAK,CAAC,oBAAU,CAAC,CAAC;QAC1D,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,KAAK,CAAC,oBAAU,CAAC,CAAC;IACxD,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAEQ,KAAK,CAAC,KAAK;QAClB,QAAQ,IAAI,CAAC,WAAW,EAAE,CAAC;YACzB,KAAK,sBAAU,CAAC,cAAc,CAAC,CAAC,CAAC;gBAC/B,sEAAsE;gBACtE,sBAAsB;gBACtB,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,IAAI,CAAC,oBAAoB,EAAE;oBACzD,QAAQ,EAAE,IAAI,CAAC,GAAG;iBACnB,CAAC,CAAC;gBACH,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,IAAI,CAAC,yBAAyB,EAAE;oBAC9D,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE;iBAC5B,CAAC,CAAC;gBACH,MAAM;YACR,CAAC;YACD,KAAK,sBAAU,CAAC,aAAa,CAAC,CAAC,CAAC;gBAC9B,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,IAAI,CAAC,oBAAoB,EAAE;oBACzD,QAAQ,EAAE,IAAI,CAAC,GAAG;iBACnB,CAAC,CAAC;gBACH,MAAM;YACR,CAAC;YACD;gBACE,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;oBACvB,IAAI,CAAC,KAAK,EAAE,CAAC;gBACf,CAAC,CAAC,CAAC;QACP,CAAC;IACH,CAAC;CACF;AAvGD,oCAuGC"}
|
|
@@ -38,6 +38,7 @@ export * from './Target.js';
|
|
|
38
38
|
export * from './TargetManager.js';
|
|
39
39
|
export * from './TargetManageEvents.js';
|
|
40
40
|
export * from './Tracing.js';
|
|
41
|
+
export * from './WebMCP.js';
|
|
41
42
|
export * from './utils.js';
|
|
42
43
|
export * from './WebWorker.js';
|
|
43
44
|
//# sourceMappingURL=cdp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdp.d.ts","sourceRoot":"","sources":["../../../../src/cdp/cdp.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,kCAAkC,CAAC;AACjD,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"cdp.d.ts","sourceRoot":"","sources":["../../../../src/cdp/cdp.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,kCAAkC,CAAC;AACjD,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC"}
|
|
@@ -54,6 +54,7 @@ __exportStar(require("./Target.js"), exports);
|
|
|
54
54
|
__exportStar(require("./TargetManager.js"), exports);
|
|
55
55
|
__exportStar(require("./TargetManageEvents.js"), exports);
|
|
56
56
|
__exportStar(require("./Tracing.js"), exports);
|
|
57
|
+
__exportStar(require("./WebMCP.js"), exports);
|
|
57
58
|
__exportStar(require("./utils.js"), exports);
|
|
58
59
|
__exportStar(require("./WebWorker.js"), exports);
|
|
59
60
|
//# sourceMappingURL=cdp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdp.js","sourceRoot":"","sources":["../../../../src/cdp/cdp.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;AAEH,qDAAmC;AACnC,+CAA6B;AAC7B,0DAAwC;AACxC,+CAA6B;AAC7B,sDAAoC;AACpC,wDAAsC;AACtC,kDAAgC;AAChC,kDAAgC;AAChC,gDAA8B;AAC9B,wDAAsC;AACtC,2DAAyC;AACzC,8CAA4B;AAC5B,qDAAmC;AACnC,wDAAsC;AACtC,wDAAsC;AACtC,0DAAwC;AACxC,6CAA2B;AAC3B,oDAAkC;AAClC,0DAAwC;AACxC,iDAA+B;AAC/B,mDAAiC;AACjC,oDAAkC;AAClC,6CAA2B;AAC3B,qDAAmC;AACnC,sDAAoC;AACpC,gDAA8B;AAC9B,wDAAsC;AACtC,2DAAyC;AACzC,sDAAoC;AACpC,4CAA0B;AAC1B,mEAAiD;AACjD,8CAA4B;AAC5B,qDAAmC;AACnC,0DAAwC;AACxC,+CAA6B;AAC7B,6CAA2B;AAC3B,iDAA+B"}
|
|
1
|
+
{"version":3,"file":"cdp.js","sourceRoot":"","sources":["../../../../src/cdp/cdp.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;AAEH,qDAAmC;AACnC,+CAA6B;AAC7B,0DAAwC;AACxC,+CAA6B;AAC7B,sDAAoC;AACpC,wDAAsC;AACtC,kDAAgC;AAChC,kDAAgC;AAChC,gDAA8B;AAC9B,wDAAsC;AACtC,2DAAyC;AACzC,8CAA4B;AAC5B,qDAAmC;AACnC,wDAAsC;AACtC,wDAAsC;AACtC,0DAAwC;AACxC,6CAA2B;AAC3B,oDAAkC;AAClC,0DAAwC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