Add CDP Connection Manager for Direct Chrome DevTools Protocol Support #61
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add CDP Connection Manager for Direct Chrome DevTools Protocol Support
Summary
Implements a new
CDPConnectionManagerclass insrc/cdp/connection-manager.tsthat provides direct Chrome DevTools Protocol (CDP) communication without Playwright. This is foundational infrastructure for Task 1.1 of the Playwright removal effort.Key capabilities:
chrome-launcherwith configurable options[CDP]prefixed loggingDependencies added:
ws(^8.18.3) - WebSocket client for CDP communicationchrome-launcher(^1.2.1) - Chrome process management@types/ws(^8.18.1) - TypeScript types for wsNote: This PR does NOT modify any existing files - it only adds new infrastructure that will be integrated in subsequent tasks.
Review & Testing Checklist for Human
Risk Level: 🟡 Yellow (foundational infrastructure, not yet integrated)
createSession(),listTargets(), andcreateTarget(). ThesendBrowserCommand()method returnsunknownand requires casting - verify these casts are safe.handleBrowserMessage()and the session management insendBrowserCommand(). The "browser" session pattern for browser-level commands vs target-specific sessions is complex - verify it handles edge cases correctly.examples/llms/openai.ts) to ensure the new dependencies don't break anything. The build passes but integration testing is needed.Test Plan
yarn buildyarn lint(existing lint errors in other files are pre-existing)Notes
launchLocal()method have not been tested in real failure scenarios