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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TargetManager.js","sourceRoot":"","sources":["../../../../src/cdp/TargetManager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AACrD,OAAO,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AC1E,oBAAoB;QACpB,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC;YAC7B,OAAO;QACT,CAAC;QACD,IAAI,IAAI,CAAC,kBAAkB,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;YACvC,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,CAAC;QACrC,CAAC;IACH,CAAC;IAED,qBAAqB,GAAG,CACtB,aAAsC,EACtC,KAA8C,EAC9C,EAAE;QACF,MAAM,MAAM,GAAG,IAAI,CAAC,2BAA2B,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACrE,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAEzD,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO;QACT,CAAC;QAED,IAAI,aAAa,YAAY,aAAa,EAAE,CAAC;YAC3C,aAAa,CAAC,MAAM,EAAE,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;QACpD,CAAC;QACD,IAAI,CAAC,0BAA0B,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACzD,IAAI,CAAC,IAAI,mDAAgC,MAAM,CAAC,CAAC;IACnD,CAAC,CAAC;CACH"}
|
|
@@ -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":"WebMCP.d.ts","sourceRoot":"","sources":["../../../../src/cdp/WebMCP.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAC;AA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,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,282 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google Inc.
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { EventEmitter } from '../common/EventEmitter.js';
|
|
7
|
+
import { debugError } from '../common/util.js';
|
|
8
|
+
import { FrameManagerEvent } from './FrameManagerEvents.js';
|
|
9
|
+
import { MAIN_WORLD } from './IsolatedWorlds.js';
|
|
10
|
+
/**
|
|
11
|
+
* Represents a registered WebMCP tool available on the page.
|
|
12
|
+
*
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
export class WebMCPTool extends EventEmitter {
|
|
16
|
+
#webmcp;
|
|
17
|
+
#backendNodeId;
|
|
18
|
+
#formElement;
|
|
19
|
+
/**
|
|
20
|
+
* Tool name.
|
|
21
|
+
*/
|
|
22
|
+
name;
|
|
23
|
+
/**
|
|
24
|
+
* Tool description.
|
|
25
|
+
*/
|
|
26
|
+
description;
|
|
27
|
+
/**
|
|
28
|
+
* Schema for the tool's input parameters.
|
|
29
|
+
*/
|
|
30
|
+
inputSchema;
|
|
31
|
+
/**
|
|
32
|
+
* Optional annotations for the tool.
|
|
33
|
+
*/
|
|
34
|
+
annotations;
|
|
35
|
+
/**
|
|
36
|
+
* Frame the tool was defined for.
|
|
37
|
+
*/
|
|
38
|
+
frame;
|
|
39
|
+
/**
|
|
40
|
+
* Source location that defined the tool (if available).
|
|
41
|
+
*/
|
|
42
|
+
location;
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
rawStackTrace;
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
constructor(webmcp, tool, frame) {
|
|
51
|
+
super();
|
|
52
|
+
this.#webmcp = webmcp;
|
|
53
|
+
this.name = tool.name;
|
|
54
|
+
this.description = tool.description;
|
|
55
|
+
this.inputSchema = tool.inputSchema;
|
|
56
|
+
this.annotations = tool.annotations;
|
|
57
|
+
this.frame = frame;
|
|
58
|
+
this.#backendNodeId = tool.backendNodeId;
|
|
59
|
+
if (tool.stackTrace?.callFrames.length) {
|
|
60
|
+
this.location = {
|
|
61
|
+
url: tool.stackTrace.callFrames[0].url,
|
|
62
|
+
lineNumber: tool.stackTrace.callFrames[0].lineNumber,
|
|
63
|
+
columnNumber: tool.stackTrace.callFrames[0].columnNumber,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
this.rawStackTrace = tool.stackTrace;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The corresponding ElementHandle when tool was registered via a form.
|
|
70
|
+
*/
|
|
71
|
+
get formElement() {
|
|
72
|
+
return (async () => {
|
|
73
|
+
if (this.#formElement && !this.#formElement.disposed) {
|
|
74
|
+
return this.#formElement;
|
|
75
|
+
}
|
|
76
|
+
if (!this.#backendNodeId) {
|
|
77
|
+
return undefined;
|
|
78
|
+
}
|
|
79
|
+
this.#formElement = (await this.frame.worlds[MAIN_WORLD].adoptBackendNode(this.#backendNodeId));
|
|
80
|
+
return this.#formElement;
|
|
81
|
+
})();
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Executes tool with input parameters, matching tool's `inputSchema`.
|
|
85
|
+
*/
|
|
86
|
+
async execute(input = {}) {
|
|
87
|
+
const { invocationId } = await this.#webmcp.invokeTool(this, input);
|
|
88
|
+
return await new Promise(resolve => {
|
|
89
|
+
const handler = (event) => {
|
|
90
|
+
if (event.id === invocationId) {
|
|
91
|
+
this.#webmcp.off('toolresponded', handler);
|
|
92
|
+
resolve(event);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
this.#webmcp.on('toolresponded', handler);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* @public
|
|
101
|
+
*/
|
|
102
|
+
export class WebMCPToolCall {
|
|
103
|
+
/**
|
|
104
|
+
* Tool invocation identifier.
|
|
105
|
+
*/
|
|
106
|
+
id;
|
|
107
|
+
/**
|
|
108
|
+
* Tool that was called.
|
|
109
|
+
*/
|
|
110
|
+
tool;
|
|
111
|
+
/**
|
|
112
|
+
* The input parameters used for the call.
|
|
113
|
+
*/
|
|
114
|
+
input;
|
|
115
|
+
/**
|
|
116
|
+
* @internal
|
|
117
|
+
*/
|
|
118
|
+
constructor(invocationId, tool, input) {
|
|
119
|
+
this.id = invocationId;
|
|
120
|
+
this.tool = tool;
|
|
121
|
+
try {
|
|
122
|
+
this.input = JSON.parse(input);
|
|
123
|
+
}
|
|
124
|
+
catch (error) {
|
|
125
|
+
this.input = {};
|
|
126
|
+
debugError(error);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* The experimental WebMCP class provides an API for the WebMCP API.
|
|
132
|
+
*
|
|
133
|
+
* See the
|
|
134
|
+
* {@link https://pptr.dev/guides/webmcp|WebMCP guide}
|
|
135
|
+
* for more details.
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
*
|
|
139
|
+
* ```ts
|
|
140
|
+
* await page.goto('https://www.example.com');
|
|
141
|
+
* const tools = page.webmcp.tools();
|
|
142
|
+
* for (const tool of tools) {
|
|
143
|
+
* console.log(`Tool found: ${tool.name} - ${tool.description}`);
|
|
144
|
+
* }
|
|
145
|
+
* ```
|
|
146
|
+
*
|
|
147
|
+
* @experimental
|
|
148
|
+
* @public
|
|
149
|
+
*/
|
|
150
|
+
export class WebMCP extends EventEmitter {
|
|
151
|
+
#client;
|
|
152
|
+
#frameManager;
|
|
153
|
+
#tools = new Map();
|
|
154
|
+
#pendingCalls = new Map();
|
|
155
|
+
#onToolsAdded = (event) => {
|
|
156
|
+
const tools = [];
|
|
157
|
+
for (const tool of event.tools) {
|
|
158
|
+
const frame = this.#frameManager.frame(tool.frameId);
|
|
159
|
+
if (!frame) {
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
const frameTools = this.#tools.get(tool.frameId) ?? new Map();
|
|
163
|
+
if (!this.#tools.has(tool.frameId)) {
|
|
164
|
+
this.#tools.set(tool.frameId, frameTools);
|
|
165
|
+
}
|
|
166
|
+
const addedTool = new WebMCPTool(this, tool, frame);
|
|
167
|
+
frameTools.set(tool.name, addedTool);
|
|
168
|
+
tools.push(addedTool);
|
|
169
|
+
}
|
|
170
|
+
this.emit('toolsadded', { tools });
|
|
171
|
+
};
|
|
172
|
+
#onToolsRemoved = (event) => {
|
|
173
|
+
const tools = [];
|
|
174
|
+
event.tools.forEach(tool => {
|
|
175
|
+
const removedTool = this.#tools.get(tool.frameId)?.get(tool.name);
|
|
176
|
+
if (removedTool) {
|
|
177
|
+
tools.push(removedTool);
|
|
178
|
+
}
|
|
179
|
+
this.#tools.get(tool.frameId)?.delete(tool.name);
|
|
180
|
+
});
|
|
181
|
+
this.emit('toolsremoved', { tools });
|
|
182
|
+
};
|
|
183
|
+
#onToolInvoked = (event) => {
|
|
184
|
+
const tool = this.#tools.get(event.frameId)?.get(event.toolName);
|
|
185
|
+
if (!tool) {
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
const call = new WebMCPToolCall(event.invocationId, tool, event.input);
|
|
189
|
+
this.#pendingCalls.set(call.id, call);
|
|
190
|
+
tool.emit('toolinvoked', call);
|
|
191
|
+
this.emit('toolinvoked', call);
|
|
192
|
+
};
|
|
193
|
+
#onToolResponded = (event) => {
|
|
194
|
+
const call = this.#pendingCalls.get(event.invocationId);
|
|
195
|
+
if (call) {
|
|
196
|
+
this.#pendingCalls.delete(event.invocationId);
|
|
197
|
+
}
|
|
198
|
+
const response = {
|
|
199
|
+
id: event.invocationId,
|
|
200
|
+
call: call,
|
|
201
|
+
status: event.status,
|
|
202
|
+
output: event.output,
|
|
203
|
+
errorText: event.errorText,
|
|
204
|
+
exception: event.exception,
|
|
205
|
+
};
|
|
206
|
+
this.emit('toolresponded', response);
|
|
207
|
+
};
|
|
208
|
+
#onFrameNavigated = (frame) => {
|
|
209
|
+
this.#pendingCalls.clear();
|
|
210
|
+
const frameTools = this.#tools.get(frame._id);
|
|
211
|
+
if (!frameTools) {
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
const tools = Array.from(frameTools.values());
|
|
215
|
+
this.#tools.delete(frame._id);
|
|
216
|
+
if (tools.length) {
|
|
217
|
+
this.emit('toolsremoved', { tools });
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* @internal
|
|
222
|
+
*/
|
|
223
|
+
constructor(client, frameManager) {
|
|
224
|
+
super();
|
|
225
|
+
this.#client = client;
|
|
226
|
+
this.#frameManager = frameManager;
|
|
227
|
+
this.#frameManager.on(FrameManagerEvent.FrameNavigated, this.#onFrameNavigated);
|
|
228
|
+
this.#bindListeners();
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* @internal
|
|
232
|
+
*/
|
|
233
|
+
async initialize() {
|
|
234
|
+
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
235
|
+
return await this.#client.send('WebMCP.enable').catch(debugError);
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* @internal
|
|
239
|
+
*/
|
|
240
|
+
async invokeTool(tool, input) {
|
|
241
|
+
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
242
|
+
return await this.#client.send('WebMCP.invokeTool', {
|
|
243
|
+
frameId: tool.frame._id,
|
|
244
|
+
toolName: tool.name,
|
|
245
|
+
input,
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Gets all WebMCP tools defined by the page.
|
|
250
|
+
*/
|
|
251
|
+
tools() {
|
|
252
|
+
return Array.from(this.#tools.values()).flatMap(toolMap => {
|
|
253
|
+
return Array.from(toolMap.values());
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
#bindListeners() {
|
|
257
|
+
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
258
|
+
this.#client.on('WebMCP.toolsAdded', this.#onToolsAdded);
|
|
259
|
+
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
260
|
+
this.#client.on('WebMCP.toolsRemoved', this.#onToolsRemoved);
|
|
261
|
+
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
262
|
+
this.#client.on('WebMCP.toolInvoked', this.#onToolInvoked);
|
|
263
|
+
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
264
|
+
this.#client.on('WebMCP.toolResponded', this.#onToolResponded);
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* @internal
|
|
268
|
+
*/
|
|
269
|
+
updateClient(client) {
|
|
270
|
+
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
271
|
+
this.#client.off('WebMCP.toolsAdded', this.#onToolsAdded);
|
|
272
|
+
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
273
|
+
this.#client.off('WebMCP.toolsRemoved', this.#onToolsRemoved);
|
|
274
|
+
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
275
|
+
this.#client.off('WebMCP.toolInvoked', this.#onToolInvoked);
|
|
276
|
+
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
277
|
+
this.#client.off('WebMCP.toolResponded', this.#onToolResponded);
|
|
278
|
+
this.#client = client;
|
|
279
|
+
this.#bindListeners();
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
//# sourceMappingURL=WebMCP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebMCP.js","sourceRoot":"","sources":["../../../../src/cdp/WebMCP.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAI7C,OAAO,EAAC,iBAAiB,EAAC,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAC,UAAU,EAAC,MAAM,qBAAqB,CAAC;AA0D/C;;;;GAIG;AACH,MAAM,OAAO,UAAW,SAAQ,YAG9B;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,KAAY;QAChE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACpC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACpC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACpC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,aAAa,CAAC;QACzC,IAAI,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,MA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
|
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"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { CDPSessionEvent } from '../api/CDPSession.js';
|
|
2
2
|
import { TargetType } from '../api/Target.js';
|
|
3
|
-
import { WebWorker } from '../api/WebWorker.js';
|
|
3
|
+
import { WebWorker, WebWorkerEvent, } from '../api/WebWorker.js';
|
|
4
|
+
import { EventEmitter } from '../common/EventEmitter.js';
|
|
4
5
|
import { TimeoutSettings } from '../common/TimeoutSettings.js';
|
|
5
6
|
import { debugError } from '../common/util.js';
|
|
6
7
|
import { ExecutionContext } from './ExecutionContext.js';
|
|
7
8
|
import { IsolatedWorld } from './IsolatedWorld.js';
|
|
9
|
+
import { MAIN_WORLD } from './IsolatedWorlds.js';
|
|
10
|
+
import { createConsoleMessage } from './utils.js';
|
|
8
11
|
/**
|
|
9
12
|
* @internal
|
|
10
13
|
*/
|
|
@@ -13,18 +16,40 @@ export class CdpWebWorker extends WebWorker {
|
|
|
13
16
|
#client;
|
|
14
17
|
#id;
|
|
15
18
|
#targetType;
|
|
16
|
-
|
|
19
|
+
#emitter;
|
|
20
|
+
get internalEmitter() {
|
|
21
|
+
return this.#emitter;
|
|
22
|
+
}
|
|
23
|
+
constructor(client, url, targetId, targetType, exceptionThrown, networkManager) {
|
|
17
24
|
super(url);
|
|
18
25
|
this.#id = targetId;
|
|
19
26
|
this.#client = client;
|
|
20
27
|
this.#targetType = targetType;
|
|
21
|
-
this.#world = new IsolatedWorld(this, new TimeoutSettings());
|
|
28
|
+
this.#world = new IsolatedWorld(this, new TimeoutSettings(), MAIN_WORLD);
|
|
29
|
+
this.#emitter = new EventEmitter();
|
|
22
30
|
this.#client.once('Runtime.executionContextCreated', async (event) => {
|
|
23
31
|
this.#world.setContext(new ExecutionContext(client, event.context, this.#world));
|
|
24
32
|
});
|
|
25
33
|
this.#world.emitter.on('consoleapicalled', async (event) => {
|
|
26
34
|
try {
|
|
27
|
-
|
|
35
|
+
const values = event.args.map(arg => {
|
|
36
|
+
return this.#world.createCdpHandle(arg);
|
|
37
|
+
});
|
|
38
|
+
const noInternalListeners = this.#emitter.listenerCount(WebWorkerEvent.Console) === 0;
|
|
39
|
+
const noWorkerListeners = this.listenerCount(WebWorkerEvent.Console) === 0;
|
|
40
|
+
if (noInternalListeners && noWorkerListeners) {
|
|
41
|
+
// eslint-disable-next-line max-len -- The comment is long.
|
|
42
|
+
// eslint-disable-next-line @puppeteer/use-using -- These are not owned by this function.
|
|
43
|
+
for (const value of values) {
|
|
44
|
+
void value.dispose().catch(debugError);
|
|
45
|
+
}
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const consoleMessages = createConsoleMessage(event, values, this.#id);
|
|
49
|
+
this.#emitter.emit(WebWorkerEvent.Console, consoleMessages);
|
|
50
|
+
if (!noWorkerListeners) {
|
|
51
|
+
this.emit(WebWorkerEvent.Console, consoleMessages);
|
|
52
|
+
}
|
|
28
53
|
}
|
|
29
54
|
catch (err) {
|
|
30
55
|
debugError(err);
|