You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
safeBrowserWebSocketUrl in src/browser/CdpEndpoint.ts currently rejects any webSocketDebuggerUrl path that is not browser-scoped (/devtools/browser/*).
In src/browser/CdpEndpoint.ts#L129, discovery validates with pathname.startsWith("/devtools/browser/"). If /json/version returns ws://.../devtools/page/<id>, discoverCdpEndpoint fails with invalid_endpoint_response before any targets can be listed or inspected.
tests/fixtures/fakeCdpBrowser.ts already has an invalidBrowserWebSocket path mode using /devtools/page/not-browser and the existing expectations currently treat this as a hard failure in tests/cdpBrowserProvider.test.ts.
Repro
Start a CDP endpoint where /json/version returns webSocketDebuggerUrl: "ws://localhost:PORT/devtools/page/<id>".
Invoke list_targets or inspect_web_page via CdpBrowserProvider or MCP.
Discovery returns invalid_endpoint_response.
Expected
Accept page-scoped websocket URLs from /json/version (or provide a safe fallback) so compatible CDP providers with page-level sockets can be used.
Impact
Current behavior blocks valid CDP endpoints that expose only page socket URLs, reducing interoperability with nonstandard or proxied browser bridges.
Activity