fix: CDP mode hanging when using chrome://inspect remote debugging

- Add isCdpApiAvailable() to verify CDP HTTP JSON API before using endpoint
- Chrome's chrome://inspect#remote-debugging writes DevToolsActivePort but
  its CDP endpoint is incompatible with Playwright connectOverCDP (init
  succeeds but all tool calls hang silently)
- Add CDP readiness probe in connect() to catch unresponsive endpoints
- Skip tab cleanup in close() for CDP mode (no bridge tabs to clean)
- Add PlaywrightMCPMode tracking for extension vs CDP lifecycle policy
This commit is contained in:
jackwener committed 2026-03-16 02:28:28 +08:00
1 parent 61a62f80c4
commit 67d50191af
4 files changed
+81 -8

No files matched your search

+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@jackwener/opencli",
"version": "0.4.5",
"version": "0.4.6",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@jackwener/opencli",
"version": "0.4.5",
"version": "0.4.6",
"license": "BSD-3-Clause",
"dependencies": {
"chalk": "^5.3.0",