Skip to content

fix(browser): support page-scoped CDP transports - #218

Merged
morluto merged 7 commits into
mainfrom
agent/browser-page-transports
Jul 14, 2026
Merged

morluto merged 7 commits into
mainfrom
agent/browser-page-transports

Conversation

@N0zoM1z0

@N0zoM1z0 N0zoM1z0 commented Jul 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • distinguish browser-scoped and page-scoped CDP WebSocket discovery results
  • keep the flat Target.attachToTarget flow only for browser sockets
  • use a direct target session for page sockets, without browser-only attach/detach commands or session IDs
  • preserve operation-aware cancellation errors across both transport scopes
  • turn direct socket closure and matching flat-session detach events into deterministic target-terminated failures
  • validate every reported socket against the approved loopback endpoint and exact target ID
  • exclude otherwise-authorized targets that have no usable transport and report that limitation truthfully
  • centralize literal IPv4/IPv6 loopback classification

DeepWiki review of Chromium and the DevTools protocol confirmed that browser and page WebSockets are distinct command-routing scopes. The root fix models both transports explicitly and gives each one equivalent cancellation and disconnect semantics.

Closes #194

Verification

  • npm run typecheck
  • npm run knip
  • scoped npx oxlint (existing warnings only)
  • scoped npx prettier --check
  • 78 browser, Electron, contract, and configuration tests passed

Real Chrome verification was not performed in this environment.

@morluto
morluto marked this pull request as ready for review July 14, 2026 22:04
@morluto
morluto merged commit c4930f4 into main Jul 14, 2026
12 checks passed
@morluto
morluto deleted the agent/browser-page-transports branch July 14, 2026 23:03
@morluto morluto added bug Something isn't working area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(browser): accept page-scoped CDP websocket endpoints

2 participants