claude-chrome-parallel 1.0.0
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/LICENSE +21 -0
- package/README.md +501 -0
- package/assets/demo.svg +278 -0
- package/dist/cdp/client.d.ts +218 -0
- package/dist/cdp/client.d.ts.map +1 -0
- package/dist/cdp/client.js +797 -0
- package/dist/cdp/client.js.map +1 -0
- package/dist/cdp/connection-pool.d.ts +125 -0
- package/dist/cdp/connection-pool.d.ts.map +1 -0
- package/dist/cdp/connection-pool.js +443 -0
- package/dist/cdp/connection-pool.js.map +1 -0
- package/dist/cdp/screenshot-scheduler.d.ts +54 -0
- package/dist/cdp/screenshot-scheduler.d.ts.map +1 -0
- package/dist/cdp/screenshot-scheduler.js +87 -0
- package/dist/cdp/screenshot-scheduler.js.map +1 -0
- package/dist/chrome/launcher.d.ts +55 -0
- package/dist/chrome/launcher.d.ts.map +1 -0
- package/dist/chrome/launcher.js +383 -0
- package/dist/chrome/launcher.js.map +1 -0
- package/dist/chrome/pool.d.ts +54 -0
- package/dist/chrome/pool.d.ts.map +1 -0
- package/dist/chrome/pool.js +301 -0
- package/dist/chrome/pool.js.map +1 -0
- package/dist/chrome/profile-detector.d.ts +52 -0
- package/dist/chrome/profile-detector.d.ts.map +1 -0
- package/dist/chrome/profile-detector.js +246 -0
- package/dist/chrome/profile-detector.js.map +1 -0
- package/dist/cli/claude-session.d.ts +11 -0
- package/dist/cli/claude-session.js +349 -0
- package/dist/cli/claude-session.js.map +1 -0
- package/dist/cli/index.d.ts +14 -0
- package/dist/cli/index.js +858 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/install.d.ts +16 -0
- package/dist/cli/install.js +185 -0
- package/dist/cli/install.js.map +1 -0
- package/dist/cli/uninstall.d.ts +7 -0
- package/dist/cli/uninstall.js +126 -0
- package/dist/cli/uninstall.js.map +1 -0
- package/dist/cli/update-check.d.ts +9 -0
- package/dist/cli/update-check.js +141 -0
- package/dist/cli/update-check.js.map +1 -0
- package/dist/config/config-recovery.d.ts +69 -0
- package/dist/config/config-recovery.d.ts.map +1 -0
- package/dist/config/config-recovery.js +302 -0
- package/dist/config/config-recovery.js.map +1 -0
- package/dist/config/global.d.ts +49 -0
- package/dist/config/global.d.ts.map +1 -0
- package/dist/config/global.js +24 -0
- package/dist/config/global.js.map +1 -0
- package/dist/config/index.d.ts +7 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +23 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/session-isolator.d.ts +76 -0
- package/dist/config/session-isolator.d.ts.map +1 -0
- package/dist/config/session-isolator.js +268 -0
- package/dist/config/session-isolator.js.map +1 -0
- package/dist/dashboard/activity-tracker.d.ts +76 -0
- package/dist/dashboard/activity-tracker.d.ts.map +1 -0
- package/dist/dashboard/activity-tracker.js +219 -0
- package/dist/dashboard/activity-tracker.js.map +1 -0
- package/dist/dashboard/ansi.d.ts +117 -0
- package/dist/dashboard/ansi.d.ts.map +1 -0
- package/dist/dashboard/ansi.js +199 -0
- package/dist/dashboard/ansi.js.map +1 -0
- package/dist/dashboard/index.d.ts +110 -0
- package/dist/dashboard/index.d.ts.map +1 -0
- package/dist/dashboard/index.js +412 -0
- package/dist/dashboard/index.js.map +1 -0
- package/dist/dashboard/keyboard-handler.d.ts +43 -0
- package/dist/dashboard/keyboard-handler.d.ts.map +1 -0
- package/dist/dashboard/keyboard-handler.js +215 -0
- package/dist/dashboard/keyboard-handler.js.map +1 -0
- package/dist/dashboard/operation-controller.d.ts +76 -0
- package/dist/dashboard/operation-controller.d.ts.map +1 -0
- package/dist/dashboard/operation-controller.js +167 -0
- package/dist/dashboard/operation-controller.js.map +1 -0
- package/dist/dashboard/renderer.d.ts +76 -0
- package/dist/dashboard/renderer.d.ts.map +1 -0
- package/dist/dashboard/renderer.js +193 -0
- package/dist/dashboard/renderer.js.map +1 -0
- package/dist/dashboard/types.d.ts +56 -0
- package/dist/dashboard/types.d.ts.map +1 -0
- package/dist/dashboard/types.js +12 -0
- package/dist/dashboard/types.js.map +1 -0
- package/dist/dashboard/views/main-view.d.ts +23 -0
- package/dist/dashboard/views/main-view.d.ts.map +1 -0
- package/dist/dashboard/views/main-view.js +143 -0
- package/dist/dashboard/views/main-view.js.map +1 -0
- package/dist/dashboard/views/sessions-view.d.ts +22 -0
- package/dist/dashboard/views/sessions-view.d.ts.map +1 -0
- package/dist/dashboard/views/sessions-view.js +104 -0
- package/dist/dashboard/views/sessions-view.js.map +1 -0
- package/dist/dashboard/views/tabs-view.d.ts +21 -0
- package/dist/dashboard/views/tabs-view.d.ts.map +1 -0
- package/dist/dashboard/views/tabs-view.js +92 -0
- package/dist/dashboard/views/tabs-view.js.map +1 -0
- package/dist/hints/hint-engine.d.ts +77 -0
- package/dist/hints/hint-engine.d.ts.map +1 -0
- package/dist/hints/hint-engine.js +191 -0
- package/dist/hints/hint-engine.js.map +1 -0
- package/dist/hints/index.d.ts +8 -0
- package/dist/hints/index.d.ts.map +1 -0
- package/dist/hints/index.js +11 -0
- package/dist/hints/index.js.map +1 -0
- package/dist/hints/pattern-learner.d.ts +76 -0
- package/dist/hints/pattern-learner.d.ts.map +1 -0
- package/dist/hints/pattern-learner.js +254 -0
- package/dist/hints/pattern-learner.js.map +1 -0
- package/dist/hints/rules/composite-suggestions.d.ts +6 -0
- package/dist/hints/rules/composite-suggestions.d.ts.map +1 -0
- package/dist/hints/rules/composite-suggestions.js +66 -0
- package/dist/hints/rules/composite-suggestions.js.map +1 -0
- package/dist/hints/rules/error-recovery.d.ts +7 -0
- package/dist/hints/rules/error-recovery.d.ts.map +1 -0
- package/dist/hints/rules/error-recovery.js +55 -0
- package/dist/hints/rules/error-recovery.js.map +1 -0
- package/dist/hints/rules/learned-rules.d.ts +13 -0
- package/dist/hints/rules/learned-rules.d.ts.map +1 -0
- package/dist/hints/rules/learned-rules.js +27 -0
- package/dist/hints/rules/learned-rules.js.map +1 -0
- package/dist/hints/rules/repetition-detection.d.ts +7 -0
- package/dist/hints/rules/repetition-detection.d.ts.map +1 -0
- package/dist/hints/rules/repetition-detection.js +82 -0
- package/dist/hints/rules/repetition-detection.js.map +1 -0
- package/dist/hints/rules/sequence-detection.d.ts +6 -0
- package/dist/hints/rules/sequence-detection.d.ts.map +1 -0
- package/dist/hints/rules/sequence-detection.js +89 -0
- package/dist/hints/rules/sequence-detection.js.map +1 -0
- package/dist/hints/rules/success-hints.d.ts +6 -0
- package/dist/hints/rules/success-hints.d.ts.map +1 -0
- package/dist/hints/rules/success-hints.js +62 -0
- package/dist/hints/rules/success-hints.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +272 -0
- package/dist/index.js.map +1 -0
- package/dist/lightpanda/launcher.d.ts +58 -0
- package/dist/lightpanda/launcher.d.ts.map +1 -0
- package/dist/lightpanda/launcher.js +199 -0
- package/dist/lightpanda/launcher.js.map +1 -0
- package/dist/mcp-server.d.ts +129 -0
- package/dist/mcp-server.d.ts.map +1 -0
- package/dist/mcp-server.js +641 -0
- package/dist/mcp-server.js.map +1 -0
- package/dist/memory/domain-memory.d.ts +68 -0
- package/dist/memory/domain-memory.d.ts.map +1 -0
- package/dist/memory/domain-memory.js +227 -0
- package/dist/memory/domain-memory.js.map +1 -0
- package/dist/orchestration/plan-executor.d.ts +19 -0
- package/dist/orchestration/plan-executor.d.ts.map +1 -0
- package/dist/orchestration/plan-executor.js +284 -0
- package/dist/orchestration/plan-executor.js.map +1 -0
- package/dist/orchestration/plan-registry.d.ts +55 -0
- package/dist/orchestration/plan-registry.d.ts.map +1 -0
- package/dist/orchestration/plan-registry.js +255 -0
- package/dist/orchestration/plan-registry.js.map +1 -0
- package/dist/orchestration/state-manager.d.ts +127 -0
- package/dist/orchestration/state-manager.d.ts.map +1 -0
- package/dist/orchestration/state-manager.js +438 -0
- package/dist/orchestration/state-manager.js.map +1 -0
- package/dist/orchestration/workflow-engine.d.ts +162 -0
- package/dist/orchestration/workflow-engine.d.ts.map +1 -0
- package/dist/orchestration/workflow-engine.js +731 -0
- package/dist/orchestration/workflow-engine.js.map +1 -0
- package/dist/resources/usage-guide.d.ts +13 -0
- package/dist/resources/usage-guide.d.ts.map +1 -0
- package/dist/resources/usage-guide.js +101 -0
- package/dist/resources/usage-guide.js.map +1 -0
- package/dist/router/browser-router.d.ts +51 -0
- package/dist/router/browser-router.d.ts.map +1 -0
- package/dist/router/browser-router.js +178 -0
- package/dist/router/browser-router.js.map +1 -0
- package/dist/router/cookie-sync.d.ts +48 -0
- package/dist/router/cookie-sync.d.ts.map +1 -0
- package/dist/router/cookie-sync.js +106 -0
- package/dist/router/cookie-sync.js.map +1 -0
- package/dist/router/index.d.ts +5 -0
- package/dist/router/index.d.ts.map +1 -0
- package/dist/router/index.js +10 -0
- package/dist/router/index.js.map +1 -0
- package/dist/router/tool-routing-registry.d.ts +21 -0
- package/dist/router/tool-routing-registry.d.ts.map +1 -0
- package/dist/router/tool-routing-registry.js +90 -0
- package/dist/router/tool-routing-registry.js.map +1 -0
- package/dist/session-manager.d.ts +251 -0
- package/dist/session-manager.d.ts.map +1 -0
- package/dist/session-manager.js +912 -0
- package/dist/session-manager.js.map +1 -0
- package/dist/tools/batch-execute.d.ts +11 -0
- package/dist/tools/batch-execute.d.ts.map +1 -0
- package/dist/tools/batch-execute.js +226 -0
- package/dist/tools/batch-execute.js.map +1 -0
- package/dist/tools/click-element.d.ts +8 -0
- package/dist/tools/click-element.d.ts.map +1 -0
- package/dist/tools/click-element.js +455 -0
- package/dist/tools/click-element.js.map +1 -0
- package/dist/tools/computer.d.ts +6 -0
- package/dist/tools/computer.d.ts.map +1 -0
- package/dist/tools/computer.js +638 -0
- package/dist/tools/computer.js.map +1 -0
- package/dist/tools/console-capture.d.ts +6 -0
- package/dist/tools/console-capture.d.ts.map +1 -0
- package/dist/tools/console-capture.js +320 -0
- package/dist/tools/console-capture.js.map +1 -0
- package/dist/tools/cookies.d.ts +6 -0
- package/dist/tools/cookies.d.ts.map +1 -0
- package/dist/tools/cookies.js +263 -0
- package/dist/tools/cookies.js.map +1 -0
- package/dist/tools/drag-drop.d.ts +6 -0
- package/dist/tools/drag-drop.d.ts.map +1 -0
- package/dist/tools/drag-drop.js +252 -0
- package/dist/tools/drag-drop.js.map +1 -0
- package/dist/tools/emulate-device.d.ts +6 -0
- package/dist/tools/emulate-device.d.ts.map +1 -0
- package/dist/tools/emulate-device.js +221 -0
- package/dist/tools/emulate-device.js.map +1 -0
- package/dist/tools/file-upload.d.ts +6 -0
- package/dist/tools/file-upload.d.ts.map +1 -0
- package/dist/tools/file-upload.js +208 -0
- package/dist/tools/file-upload.js.map +1 -0
- package/dist/tools/fill-form.d.ts +8 -0
- package/dist/tools/fill-form.d.ts.map +1 -0
- package/dist/tools/fill-form.js +342 -0
- package/dist/tools/fill-form.js.map +1 -0
- package/dist/tools/find.d.ts +6 -0
- package/dist/tools/find.d.ts.map +1 -0
- package/dist/tools/find.js +330 -0
- package/dist/tools/find.js.map +1 -0
- package/dist/tools/form-input.d.ts +6 -0
- package/dist/tools/form-input.d.ts.map +1 -0
- package/dist/tools/form-input.js +181 -0
- package/dist/tools/form-input.js.map +1 -0
- package/dist/tools/geolocation.d.ts +6 -0
- package/dist/tools/geolocation.d.ts.map +1 -0
- package/dist/tools/geolocation.js +172 -0
- package/dist/tools/geolocation.js.map +1 -0
- package/dist/tools/http-auth.d.ts +6 -0
- package/dist/tools/http-auth.d.ts.map +1 -0
- package/dist/tools/http-auth.js +136 -0
- package/dist/tools/http-auth.js.map +1 -0
- package/dist/tools/index.d.ts +6 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +104 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/javascript.d.ts +6 -0
- package/dist/tools/javascript.d.ts.map +1 -0
- package/dist/tools/javascript.js +138 -0
- package/dist/tools/javascript.js.map +1 -0
- package/dist/tools/lightweight-scroll.d.ts +11 -0
- package/dist/tools/lightweight-scroll.d.ts.map +1 -0
- package/dist/tools/lightweight-scroll.js +266 -0
- package/dist/tools/lightweight-scroll.js.map +1 -0
- package/dist/tools/memory.d.ts +10 -0
- package/dist/tools/memory.d.ts.map +1 -0
- package/dist/tools/memory.js +141 -0
- package/dist/tools/memory.js.map +1 -0
- package/dist/tools/navigate.d.ts +6 -0
- package/dist/tools/navigate.d.ts.map +1 -0
- package/dist/tools/navigate.js +241 -0
- package/dist/tools/navigate.js.map +1 -0
- package/dist/tools/network.d.ts +6 -0
- package/dist/tools/network.d.ts.map +1 -0
- package/dist/tools/network.js +215 -0
- package/dist/tools/network.js.map +1 -0
- package/dist/tools/orchestration.d.ts +6 -0
- package/dist/tools/orchestration.d.ts.map +1 -0
- package/dist/tools/orchestration.js +746 -0
- package/dist/tools/orchestration.js.map +1 -0
- package/dist/tools/page-content.d.ts +6 -0
- package/dist/tools/page-content.d.ts.map +1 -0
- package/dist/tools/page-content.js +120 -0
- package/dist/tools/page-content.js.map +1 -0
- package/dist/tools/page-pdf.d.ts +6 -0
- package/dist/tools/page-pdf.d.ts.map +1 -0
- package/dist/tools/page-pdf.js +245 -0
- package/dist/tools/page-pdf.js.map +1 -0
- package/dist/tools/page-reload.d.ts +6 -0
- package/dist/tools/page-reload.d.ts.map +1 -0
- package/dist/tools/page-reload.js +89 -0
- package/dist/tools/page-reload.js.map +1 -0
- package/dist/tools/performance-metrics.d.ts +6 -0
- package/dist/tools/performance-metrics.d.ts.map +1 -0
- package/dist/tools/performance-metrics.js +158 -0
- package/dist/tools/performance-metrics.js.map +1 -0
- package/dist/tools/read-page.d.ts +6 -0
- package/dist/tools/read-page.d.ts.map +1 -0
- package/dist/tools/read-page.js +287 -0
- package/dist/tools/read-page.js.map +1 -0
- package/dist/tools/request-intercept.d.ts +6 -0
- package/dist/tools/request-intercept.d.ts.map +1 -0
- package/dist/tools/request-intercept.js +439 -0
- package/dist/tools/request-intercept.js.map +1 -0
- package/dist/tools/selector-query.d.ts +6 -0
- package/dist/tools/selector-query.d.ts.map +1 -0
- package/dist/tools/selector-query.js +206 -0
- package/dist/tools/selector-query.js.map +1 -0
- package/dist/tools/shutdown.d.ts +12 -0
- package/dist/tools/shutdown.d.ts.map +1 -0
- package/dist/tools/shutdown.js +120 -0
- package/dist/tools/shutdown.js.map +1 -0
- package/dist/tools/storage.d.ts +6 -0
- package/dist/tools/storage.d.ts.map +1 -0
- package/dist/tools/storage.js +264 -0
- package/dist/tools/storage.js.map +1 -0
- package/dist/tools/tabs-close.d.ts +6 -0
- package/dist/tools/tabs-close.d.ts.map +1 -0
- package/dist/tools/tabs-close.js +124 -0
- package/dist/tools/tabs-close.js.map +1 -0
- package/dist/tools/tabs-context.d.ts +6 -0
- package/dist/tools/tabs-context.d.ts.map +1 -0
- package/dist/tools/tabs-context.js +92 -0
- package/dist/tools/tabs-context.js.map +1 -0
- package/dist/tools/tabs-create.d.ts +6 -0
- package/dist/tools/tabs-create.d.ts.map +1 -0
- package/dist/tools/tabs-create.js +73 -0
- package/dist/tools/tabs-create.js.map +1 -0
- package/dist/tools/user-agent.d.ts +6 -0
- package/dist/tools/user-agent.d.ts.map +1 -0
- package/dist/tools/user-agent.js +128 -0
- package/dist/tools/user-agent.js.map +1 -0
- package/dist/tools/wait-and-click.d.ts +8 -0
- package/dist/tools/wait-and-click.d.ts.map +1 -0
- package/dist/tools/wait-and-click.js +290 -0
- package/dist/tools/wait-and-click.js.map +1 -0
- package/dist/tools/wait-for.d.ts +6 -0
- package/dist/tools/wait-for.d.ts.map +1 -0
- package/dist/tools/wait-for.js +248 -0
- package/dist/tools/wait-for.js.map +1 -0
- package/dist/tools/worker-create.d.ts +7 -0
- package/dist/tools/worker-create.d.ts.map +1 -0
- package/dist/tools/worker-create.js +62 -0
- package/dist/tools/worker-create.js.map +1 -0
- package/dist/tools/worker-delete.d.ts +6 -0
- package/dist/tools/worker-delete.d.ts.map +1 -0
- package/dist/tools/worker-delete.js +80 -0
- package/dist/tools/worker-delete.js.map +1 -0
- package/dist/tools/worker-list.d.ts +6 -0
- package/dist/tools/worker-list.d.ts.map +1 -0
- package/dist/tools/worker-list.js +67 -0
- package/dist/tools/worker-list.js.map +1 -0
- package/dist/tools/xpath-query.d.ts +6 -0
- package/dist/tools/xpath-query.d.ts.map +1 -0
- package/dist/tools/xpath-query.js +230 -0
- package/dist/tools/xpath-query.js.map +1 -0
- package/dist/types/browser-backend.d.ts +30 -0
- package/dist/types/browser-backend.d.ts.map +1 -0
- package/dist/types/browser-backend.js +9 -0
- package/dist/types/browser-backend.js.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +19 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/mcp.d.ts +54 -0
- package/dist/types/mcp.d.ts.map +1 -0
- package/dist/types/mcp.js +14 -0
- package/dist/types/mcp.js.map +1 -0
- package/dist/types/plan-cache.d.ts +121 -0
- package/dist/types/plan-cache.d.ts.map +1 -0
- package/dist/types/plan-cache.js +9 -0
- package/dist/types/plan-cache.js.map +1 -0
- package/dist/types/profile.d.ts +76 -0
- package/dist/types/profile.d.ts.map +1 -0
- package/dist/types/profile.js +35 -0
- package/dist/types/profile.js.map +1 -0
- package/dist/types/session.d.ts +65 -0
- package/dist/types/session.d.ts.map +1 -0
- package/dist/types/session.js +6 -0
- package/dist/types/session.js.map +1 -0
- package/dist/types/tool-manifest.d.ts +52 -0
- package/dist/types/tool-manifest.d.ts.map +1 -0
- package/dist/types/tool-manifest.js +37 -0
- package/dist/types/tool-manifest.js.map +1 -0
- package/dist/utils/atomic-file.d.ts +50 -0
- package/dist/utils/atomic-file.d.ts.map +1 -0
- package/dist/utils/atomic-file.js +217 -0
- package/dist/utils/atomic-file.js.map +1 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +22 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/json-validator.d.ts +40 -0
- package/dist/utils/json-validator.d.ts.map +1 -0
- package/dist/utils/json-validator.js +295 -0
- package/dist/utils/json-validator.js.map +1 -0
- package/dist/utils/ref-id-manager.d.ts +26 -0
- package/dist/utils/ref-id-manager.d.ts.map +1 -0
- package/dist/utils/ref-id-manager.js +81 -0
- package/dist/utils/ref-id-manager.js.map +1 -0
- package/dist/utils/request-queue.d.ts +37 -0
- package/dist/utils/request-queue.d.ts.map +1 -0
- package/dist/utils/request-queue.js +110 -0
- package/dist/utils/request-queue.js.map +1 -0
- package/package.json +78 -0
package/assets/demo.svg
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 480">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="bgGrad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
4
|
+
<stop offset="0%" style="stop-color:#0d1117"/>
|
|
5
|
+
<stop offset="100%" style="stop-color:#161b22"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
<linearGradient id="successGrad" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
8
|
+
<stop offset="0%" style="stop-color:#00b894"/>
|
|
9
|
+
<stop offset="100%" style="stop-color:#00cec9"/>
|
|
10
|
+
</linearGradient>
|
|
11
|
+
<linearGradient id="authGrad" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
12
|
+
<stop offset="0%" style="stop-color:#e17055"/>
|
|
13
|
+
<stop offset="100%" style="stop-color:#e74c3c"/>
|
|
14
|
+
</linearGradient>
|
|
15
|
+
<linearGradient id="taskGrad" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
16
|
+
<stop offset="0%" style="stop-color:#636e72"/>
|
|
17
|
+
<stop offset="100%" style="stop-color:#74b9ff"/>
|
|
18
|
+
</linearGradient>
|
|
19
|
+
</defs>
|
|
20
|
+
|
|
21
|
+
<!-- Background -->
|
|
22
|
+
<rect width="800" height="480" fill="url(#bgGrad)" rx="12"/>
|
|
23
|
+
|
|
24
|
+
<!-- Title -->
|
|
25
|
+
<text x="400" y="30" text-anchor="middle" fill="#fff" font-family="system-ui, -apple-system, sans-serif" font-size="16" font-weight="bold">
|
|
26
|
+
Playwright MCP vs CCP — 5 Authenticated Sites
|
|
27
|
+
</text>
|
|
28
|
+
<text x="400" y="48" text-anchor="middle" fill="#636e72" font-family="system-ui" font-size="11">
|
|
29
|
+
AWS Billing + Stripe Dashboard + Vercel Usage + GitHub Actions + Slack Messages
|
|
30
|
+
</text>
|
|
31
|
+
|
|
32
|
+
<!-- ═══════════════════════════════════════════════════════ -->
|
|
33
|
+
<!-- LEFT SIDE: Playwright MCP (Sequential + Auth overhead) -->
|
|
34
|
+
<!-- ═══════════════════════════════════════════════════════ -->
|
|
35
|
+
<g transform="translate(20, 65)">
|
|
36
|
+
<!-- Header -->
|
|
37
|
+
<rect x="0" y="0" width="370" height="24" rx="6" fill="#2d3436"/>
|
|
38
|
+
<circle cx="14" cy="12" r="4" fill="#e74c3c"/>
|
|
39
|
+
<circle cx="28" cy="12" r="4" fill="#f39c12"/>
|
|
40
|
+
<circle cx="42" cy="12" r="4" fill="#27ae60"/>
|
|
41
|
+
<text x="185" y="16" text-anchor="middle" fill="#b2bec3" font-family="monospace" font-size="10" font-weight="bold">Playwright MCP</text>
|
|
42
|
+
|
|
43
|
+
<!-- Terminal body -->
|
|
44
|
+
<rect x="0" y="24" width="370" height="340" fill="#0d1117" rx="0"/>
|
|
45
|
+
<rect x="0" y="354" width="370" height="10" rx="0" ry="6" fill="#2d3436"/>
|
|
46
|
+
|
|
47
|
+
<!-- Legend -->
|
|
48
|
+
<rect x="10" y="32" width="8" height="8" fill="url(#authGrad)" rx="1"/>
|
|
49
|
+
<text x="22" y="40" fill="#e17055" font-family="monospace" font-size="9">Login (30-60s each)</text>
|
|
50
|
+
<rect x="160" y="32" width="8" height="8" fill="url(#taskGrad)" rx="1"/>
|
|
51
|
+
<text x="172" y="40" fill="#74b9ff" font-family="monospace" font-size="9">Task (~3s each)</text>
|
|
52
|
+
|
|
53
|
+
<!-- Site 1: AWS — auth then task, sequential -->
|
|
54
|
+
<text x="10" y="62" fill="#b2bec3" font-family="monospace" font-size="10">AWS Billing</text>
|
|
55
|
+
<!-- Auth bar (long) -->
|
|
56
|
+
<rect x="90" y="53" width="0" height="10" rx="2" fill="url(#authGrad)">
|
|
57
|
+
<animate attributeName="width" values="0;0;30;60;90;120;150;180;180;180;180;180;180;180;180;180;180;180;180;180" dur="20s" repeatCount="indefinite"/>
|
|
58
|
+
</rect>
|
|
59
|
+
<text x="92" y="62" fill="#fff" font-family="monospace" font-size="8" opacity="0.8">
|
|
60
|
+
<tspan>login...</tspan>
|
|
61
|
+
<animate attributeName="opacity" values="0;0;0.8;0.8;0.8;0.8;0.8;0;0;0;0;0;0;0;0;0;0;0;0;0" dur="20s" repeatCount="indefinite"/>
|
|
62
|
+
</text>
|
|
63
|
+
<!-- Task bar (short) -->
|
|
64
|
+
<rect x="272" y="53" width="0" height="10" rx="2" fill="url(#taskGrad)">
|
|
65
|
+
<animate attributeName="width" values="0;0;0;0;0;0;0;0;15;15;15;15;15;15;15;15;15;15;15;15" dur="20s" repeatCount="indefinite"/>
|
|
66
|
+
</rect>
|
|
67
|
+
<text x="295" y="62" fill="#00b894" font-family="monospace" font-size="9">
|
|
68
|
+
<tspan>ok</tspan>
|
|
69
|
+
<animate attributeName="opacity" values="0;0;0;0;0;0;0;0;0;1;1;1;1;1;1;1;1;1;1;1" dur="20s" repeatCount="indefinite"/>
|
|
70
|
+
</text>
|
|
71
|
+
|
|
72
|
+
<!-- Site 2: Stripe — starts after AWS finishes -->
|
|
73
|
+
<text x="10" y="86" fill="#b2bec3" font-family="monospace" font-size="10">
|
|
74
|
+
<tspan>Stripe</tspan>
|
|
75
|
+
<animate attributeName="opacity" values="0;0;0;0;0;0;0;0;0;1;1;1;1;1;1;1;1;1;1;1" dur="20s" repeatCount="indefinite"/>
|
|
76
|
+
</text>
|
|
77
|
+
<rect x="90" y="77" width="0" height="10" rx="2" fill="url(#authGrad)">
|
|
78
|
+
<animate attributeName="width" values="0;0;0;0;0;0;0;0;0;0;30;60;90;120;150;150;150;150;150;150" dur="20s" repeatCount="indefinite"/>
|
|
79
|
+
</rect>
|
|
80
|
+
<text x="92" y="86" fill="#fff" font-family="monospace" font-size="8">
|
|
81
|
+
<tspan>login...</tspan>
|
|
82
|
+
<animate attributeName="opacity" values="0;0;0;0;0;0;0;0;0;0;0.8;0.8;0.8;0.8;0;0;0;0;0;0" dur="20s" repeatCount="indefinite"/>
|
|
83
|
+
</text>
|
|
84
|
+
<rect x="242" y="77" width="0" height="10" rx="2" fill="url(#taskGrad)">
|
|
85
|
+
<animate attributeName="width" values="0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;15;15;15;15;15" dur="20s" repeatCount="indefinite"/>
|
|
86
|
+
</rect>
|
|
87
|
+
<text x="265" y="86" fill="#00b894" font-family="monospace" font-size="9">
|
|
88
|
+
<tspan>ok</tspan>
|
|
89
|
+
<animate attributeName="opacity" values="0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;1;1;1;1" dur="20s" repeatCount="indefinite"/>
|
|
90
|
+
</text>
|
|
91
|
+
|
|
92
|
+
<!-- Site 3: Vercel — waiting... -->
|
|
93
|
+
<text x="10" y="110" fill="#b2bec3" font-family="monospace" font-size="10">
|
|
94
|
+
<tspan>Vercel</tspan>
|
|
95
|
+
<animate attributeName="opacity" values="0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;1;1;1;1" dur="20s" repeatCount="indefinite"/>
|
|
96
|
+
</text>
|
|
97
|
+
<rect x="90" y="101" width="0" height="10" rx="2" fill="url(#authGrad)">
|
|
98
|
+
<animate attributeName="width" values="0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;30;60;90" dur="20s" repeatCount="indefinite"/>
|
|
99
|
+
</rect>
|
|
100
|
+
<text x="92" y="110" fill="#fff" font-family="monospace" font-size="8">
|
|
101
|
+
<tspan>login...</tspan>
|
|
102
|
+
<animate attributeName="opacity" values="0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0.8;0.8;0.8" dur="20s" repeatCount="indefinite"/>
|
|
103
|
+
</text>
|
|
104
|
+
|
|
105
|
+
<!-- Site 4: GitHub — not started yet -->
|
|
106
|
+
<text x="10" y="134" fill="#636e72" font-family="monospace" font-size="10">
|
|
107
|
+
<tspan>GitHub</tspan>
|
|
108
|
+
<animate attributeName="opacity" values="0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0.5" dur="20s" repeatCount="indefinite"/>
|
|
109
|
+
</text>
|
|
110
|
+
|
|
111
|
+
<!-- Site 5: Slack — not started yet -->
|
|
112
|
+
<text x="10" y="158" fill="#636e72" font-family="monospace" font-size="10">
|
|
113
|
+
<tspan>Slack</tspan>
|
|
114
|
+
<animate attributeName="opacity" values="0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0" dur="20s" repeatCount="indefinite"/>
|
|
115
|
+
</text>
|
|
116
|
+
|
|
117
|
+
<!-- Waiting dots -->
|
|
118
|
+
<text x="90" y="134" fill="#636e72" font-family="monospace" font-size="10">
|
|
119
|
+
<tspan>waiting...</tspan>
|
|
120
|
+
<animate attributeName="opacity" values="0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0.5" dur="20s" repeatCount="indefinite"/>
|
|
121
|
+
</text>
|
|
122
|
+
<text x="90" y="158" fill="#636e72" font-family="monospace" font-size="10">
|
|
123
|
+
<tspan>waiting...</tspan>
|
|
124
|
+
<animate attributeName="opacity" values="0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0.5" dur="20s" repeatCount="indefinite"/>
|
|
125
|
+
</text>
|
|
126
|
+
|
|
127
|
+
<!-- Memory usage (climbing) -->
|
|
128
|
+
<g>
|
|
129
|
+
<animate attributeName="opacity" values="0;0;0;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1" dur="20s" repeatCount="indefinite"/>
|
|
130
|
+
<rect x="10" y="185" width="350" height="48" rx="4" fill="#1a1a1a"/>
|
|
131
|
+
<text x="20" y="201" fill="#e74c3c" font-family="monospace" font-size="9" font-weight="bold">Memory Usage</text>
|
|
132
|
+
<!-- Memory bar growing -->
|
|
133
|
+
<rect x="20" y="210" width="0" height="14" rx="2" fill="#e74c3c" opacity="0.6">
|
|
134
|
+
<animate attributeName="width" values="0;40;60;80;100;120;140;160;180;200;220;240;260;280;280;300;300;320;320;320" dur="20s" repeatCount="indefinite"/>
|
|
135
|
+
</rect>
|
|
136
|
+
<text x="20" y="220" fill="#fff" font-family="monospace" font-size="8">
|
|
137
|
+
<animate attributeName="textContent" values="200MB;400MB;600MB;800MB;1.0GB;1.2GB;1.4GB;1.6GB;1.8GB;2.0GB" dur="20s" repeatCount="indefinite"/>
|
|
138
|
+
</text>
|
|
139
|
+
<!-- Show text separately with animation -->
|
|
140
|
+
<text x="25" y="220" fill="#fff" font-family="monospace" font-size="8" font-weight="bold">
|
|
141
|
+
<tspan>2.5 GB</tspan>
|
|
142
|
+
<animate attributeName="opacity" values="0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;1;1" dur="20s" repeatCount="indefinite"/>
|
|
143
|
+
</text>
|
|
144
|
+
<text x="180" y="220" fill="#e17055" font-family="monospace" font-size="8">
|
|
145
|
+
<tspan>(5 browser processes)</tspan>
|
|
146
|
+
<animate attributeName="opacity" values="0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;1;1" dur="20s" repeatCount="indefinite"/>
|
|
147
|
+
</text>
|
|
148
|
+
</g>
|
|
149
|
+
|
|
150
|
+
<!-- Elapsed time (counting up) -->
|
|
151
|
+
<g>
|
|
152
|
+
<animate attributeName="opacity" values="0;0;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1" dur="20s" repeatCount="indefinite"/>
|
|
153
|
+
<text x="10" y="260" fill="#636e72" font-family="monospace" font-size="10">Elapsed:</text>
|
|
154
|
+
<text x="72" y="260" fill="#fdcb6e" font-family="monospace" font-size="10" font-weight="bold">
|
|
155
|
+
<tspan>still running...</tspan>
|
|
156
|
+
<animate attributeName="opacity" values="0;0;1;1;1;1;1;1;0.5;1;1;1;1;1;0.5;1;1;1;1;1" dur="20s" repeatCount="indefinite"/>
|
|
157
|
+
</text>
|
|
158
|
+
</g>
|
|
159
|
+
|
|
160
|
+
<!-- Bottom status -->
|
|
161
|
+
<text x="185" y="310" text-anchor="middle" fill="#e74c3c" font-family="system-ui" font-size="12" font-weight="bold">
|
|
162
|
+
Sequential + Login per site
|
|
163
|
+
</text>
|
|
164
|
+
<text x="185" y="328" text-anchor="middle" fill="#636e72" font-family="monospace" font-size="10">
|
|
165
|
+
~250s for 5 sites (50s auth x 5 + tasks)
|
|
166
|
+
</text>
|
|
167
|
+
<text x="185" y="346" text-anchor="middle" fill="#e17055" font-family="monospace" font-size="10">
|
|
168
|
+
~500MB RAM per browser instance
|
|
169
|
+
</text>
|
|
170
|
+
</g>
|
|
171
|
+
|
|
172
|
+
<!-- ═══════════════════════════════════════════════ -->
|
|
173
|
+
<!-- RIGHT SIDE: CCP (Parallel + Zero auth + Light) -->
|
|
174
|
+
<!-- ═══════════════════════════════════════════════ -->
|
|
175
|
+
<g transform="translate(410, 65)">
|
|
176
|
+
<!-- Header -->
|
|
177
|
+
<rect x="0" y="0" width="370" height="24" rx="6" fill="#2d3436"/>
|
|
178
|
+
<circle cx="14" cy="12" r="4" fill="#e74c3c"/>
|
|
179
|
+
<circle cx="28" cy="12" r="4" fill="#f39c12"/>
|
|
180
|
+
<circle cx="42" cy="12" r="4" fill="#27ae60"/>
|
|
181
|
+
<text x="185" y="16" text-anchor="middle" fill="#00b894" font-family="monospace" font-size="10" font-weight="bold">CCP (Claude Chrome Parallel)</text>
|
|
182
|
+
|
|
183
|
+
<!-- Terminal body -->
|
|
184
|
+
<rect x="0" y="24" width="370" height="340" fill="#0d1117"/>
|
|
185
|
+
<rect x="0" y="354" width="370" height="10" rx="0" ry="6" fill="#2d3436"/>
|
|
186
|
+
|
|
187
|
+
<!-- Legend -->
|
|
188
|
+
<text x="10" y="40" fill="#636e72" font-family="monospace" font-size="9">No login needed — already authenticated</text>
|
|
189
|
+
|
|
190
|
+
<!-- ALL 5 start simultaneously -->
|
|
191
|
+
<text x="10" y="62" fill="#a29bfe" font-family="monospace" font-size="10">AWS Billing</text>
|
|
192
|
+
<rect x="110" y="53" width="0" height="10" rx="2" fill="url(#successGrad)">
|
|
193
|
+
<animate attributeName="width" values="0;0;40;80;120;120;120;120;120;120;120;120;120;120;120;120;120;120;120;120" dur="20s" repeatCount="indefinite"/>
|
|
194
|
+
</rect>
|
|
195
|
+
<text x="235" y="62" fill="#00b894" font-family="monospace" font-size="9">
|
|
196
|
+
<tspan>done 2.8s</tspan>
|
|
197
|
+
<animate attributeName="opacity" values="0;0;0;0;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1" dur="20s" repeatCount="indefinite"/>
|
|
198
|
+
</text>
|
|
199
|
+
|
|
200
|
+
<text x="10" y="82" fill="#a29bfe" font-family="monospace" font-size="10">Stripe</text>
|
|
201
|
+
<rect x="110" y="73" width="0" height="10" rx="2" fill="url(#successGrad)">
|
|
202
|
+
<animate attributeName="width" values="0;0;35;75;110;110;110;110;110;110;110;110;110;110;110;110;110;110;110;110" dur="20s" repeatCount="indefinite"/>
|
|
203
|
+
</rect>
|
|
204
|
+
<text x="225" y="82" fill="#00b894" font-family="monospace" font-size="9">
|
|
205
|
+
<tspan>done 2.5s</tspan>
|
|
206
|
+
<animate attributeName="opacity" values="0;0;0;0;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1" dur="20s" repeatCount="indefinite"/>
|
|
207
|
+
</text>
|
|
208
|
+
|
|
209
|
+
<text x="10" y="102" fill="#a29bfe" font-family="monospace" font-size="10">Vercel</text>
|
|
210
|
+
<rect x="110" y="93" width="0" height="10" rx="2" fill="url(#successGrad)">
|
|
211
|
+
<animate attributeName="width" values="0;0;45;90;130;130;130;130;130;130;130;130;130;130;130;130;130;130;130;130" dur="20s" repeatCount="indefinite"/>
|
|
212
|
+
</rect>
|
|
213
|
+
<text x="245" y="102" fill="#00b894" font-family="monospace" font-size="9">
|
|
214
|
+
<tspan>done 3.1s</tspan>
|
|
215
|
+
<animate attributeName="opacity" values="0;0;0;0;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1" dur="20s" repeatCount="indefinite"/>
|
|
216
|
+
</text>
|
|
217
|
+
|
|
218
|
+
<text x="10" y="122" fill="#a29bfe" font-family="monospace" font-size="10">GitHub</text>
|
|
219
|
+
<rect x="110" y="113" width="0" height="10" rx="2" fill="url(#successGrad)">
|
|
220
|
+
<animate attributeName="width" values="0;0;30;65;100;100;100;100;100;100;100;100;100;100;100;100;100;100;100;100" dur="20s" repeatCount="indefinite"/>
|
|
221
|
+
</rect>
|
|
222
|
+
<text x="215" y="122" fill="#00b894" font-family="monospace" font-size="9">
|
|
223
|
+
<tspan>done 2.3s</tspan>
|
|
224
|
+
<animate attributeName="opacity" values="0;0;0;0;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1" dur="20s" repeatCount="indefinite"/>
|
|
225
|
+
</text>
|
|
226
|
+
|
|
227
|
+
<text x="10" y="142" fill="#a29bfe" font-family="monospace" font-size="10">Slack</text>
|
|
228
|
+
<rect x="110" y="133" width="0" height="10" rx="2" fill="url(#successGrad)">
|
|
229
|
+
<animate attributeName="width" values="0;0;38;78;115;115;115;115;115;115;115;115;115;115;115;115;115;115;115;115" dur="20s" repeatCount="indefinite"/>
|
|
230
|
+
</rect>
|
|
231
|
+
<text x="230" y="142" fill="#00b894" font-family="monospace" font-size="9">
|
|
232
|
+
<tspan>done 2.6s</tspan>
|
|
233
|
+
<animate attributeName="opacity" values="0;0;0;0;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1" dur="20s" repeatCount="indefinite"/>
|
|
234
|
+
</text>
|
|
235
|
+
|
|
236
|
+
<!-- Result box appears fast -->
|
|
237
|
+
<g>
|
|
238
|
+
<animate attributeName="opacity" values="0;0;0;0;0;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1" dur="20s" repeatCount="indefinite"/>
|
|
239
|
+
<rect x="10" y="160" width="350" height="55" rx="6" fill="#0a2e0a" stroke="#00b894" stroke-width="1"/>
|
|
240
|
+
<text x="185" y="180" text-anchor="middle" fill="#00b894" font-family="system-ui" font-size="13" font-weight="bold">
|
|
241
|
+
All 5 sites done in 3.1s
|
|
242
|
+
</text>
|
|
243
|
+
<text x="185" y="200" text-anchor="middle" fill="#55efc4" font-family="monospace" font-size="11">
|
|
244
|
+
Zero logins. Zero waiting. All parallel.
|
|
245
|
+
</text>
|
|
246
|
+
</g>
|
|
247
|
+
|
|
248
|
+
<!-- Memory usage (small and stable) -->
|
|
249
|
+
<g>
|
|
250
|
+
<animate attributeName="opacity" values="0;0;0;0;0;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1" dur="20s" repeatCount="indefinite"/>
|
|
251
|
+
<rect x="10" y="230" width="350" height="48" rx="4" fill="#1a1a1a"/>
|
|
252
|
+
<text x="20" y="246" fill="#00b894" font-family="monospace" font-size="9" font-weight="bold">Memory Usage</text>
|
|
253
|
+
<rect x="20" y="255" width="60" height="14" rx="2" fill="#00b894" opacity="0.5"/>
|
|
254
|
+
<text x="25" y="265" fill="#fff" font-family="monospace" font-size="8" font-weight="bold">~300 MB</text>
|
|
255
|
+
<text x="100" y="265" fill="#55efc4" font-family="monospace" font-size="8">(1 Chrome + 5 lightweight contexts)</text>
|
|
256
|
+
</g>
|
|
257
|
+
|
|
258
|
+
<!-- Speed comparison callout -->
|
|
259
|
+
<g>
|
|
260
|
+
<animate attributeName="opacity" values="0;0;0;0;0;0;1;1;1;1;1;1;1;1;1;1;1;1;1;1" dur="20s" repeatCount="indefinite"/>
|
|
261
|
+
<rect x="30" y="290" width="310" height="50" rx="8" fill="#0a2e0a" stroke="#00cec9" stroke-width="2"/>
|
|
262
|
+
<text x="185" y="313" text-anchor="middle" fill="#00cec9" font-family="system-ui" font-size="20" font-weight="bold">
|
|
263
|
+
80x faster
|
|
264
|
+
</text>
|
|
265
|
+
<text x="185" y="332" text-anchor="middle" fill="#81ecec" font-family="monospace" font-size="10">
|
|
266
|
+
3.1s vs ~250s | 300MB vs 2.5GB
|
|
267
|
+
</text>
|
|
268
|
+
</g>
|
|
269
|
+
</g>
|
|
270
|
+
|
|
271
|
+
<!-- Bottom comparison bar -->
|
|
272
|
+
<g transform="translate(0, 440)">
|
|
273
|
+
<rect x="20" y="0" width="760" height="30" rx="6" fill="#161b22" stroke="#2d3436" stroke-width="1"/>
|
|
274
|
+
<text x="120" y="20" text-anchor="middle" fill="#e74c3c" font-family="monospace" font-size="10">Playwright: ~250s | 2.5GB</text>
|
|
275
|
+
<text x="400" y="20" text-anchor="middle" fill="#636e72" font-family="system-ui" font-size="11" font-weight="bold">vs</text>
|
|
276
|
+
<text x="650" y="20" text-anchor="middle" fill="#00b894" font-family="monospace" font-size="10">CCP: ~3s | 300MB | already logged in</text>
|
|
277
|
+
</g>
|
|
278
|
+
</svg>
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CDP Client - Wrapper around puppeteer-core for Chrome DevTools Protocol
|
|
3
|
+
*/
|
|
4
|
+
import { Browser, BrowserContext, Page, Target, CDPSession } from 'puppeteer-core';
|
|
5
|
+
export interface CDPClientOptions {
|
|
6
|
+
port?: number;
|
|
7
|
+
maxReconnectAttempts?: number;
|
|
8
|
+
reconnectDelayMs?: number;
|
|
9
|
+
heartbeatIntervalMs?: number;
|
|
10
|
+
/** If true, auto-launch Chrome when not running (default: false) */
|
|
11
|
+
autoLaunch?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export type ConnectionState = 'disconnected' | 'connecting' | 'connected' | 'reconnecting';
|
|
14
|
+
export interface ConnectionEvent {
|
|
15
|
+
type: 'connected' | 'disconnected' | 'reconnecting' | 'reconnect_failed';
|
|
16
|
+
timestamp: number;
|
|
17
|
+
attempt?: number;
|
|
18
|
+
error?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare class CDPClient {
|
|
21
|
+
private browser;
|
|
22
|
+
private sessions;
|
|
23
|
+
private port;
|
|
24
|
+
private maxReconnectAttempts;
|
|
25
|
+
private reconnectDelayMs;
|
|
26
|
+
private heartbeatIntervalMs;
|
|
27
|
+
private heartbeatTimer;
|
|
28
|
+
private connectionState;
|
|
29
|
+
private eventListeners;
|
|
30
|
+
private targetDestroyedListeners;
|
|
31
|
+
private reconnectAttempts;
|
|
32
|
+
private autoLaunch;
|
|
33
|
+
private cookieSourceCache;
|
|
34
|
+
private cookieDataCache;
|
|
35
|
+
private targetIdIndex;
|
|
36
|
+
private inFlightCookieScans;
|
|
37
|
+
private static readonly COOKIE_CACHE_TTL;
|
|
38
|
+
constructor(options?: CDPClientOptions);
|
|
39
|
+
/**
|
|
40
|
+
* Get current connection state
|
|
41
|
+
*/
|
|
42
|
+
getConnectionState(): ConnectionState;
|
|
43
|
+
/**
|
|
44
|
+
* Add connection event listener
|
|
45
|
+
*/
|
|
46
|
+
addConnectionListener(listener: (event: ConnectionEvent) => void): void;
|
|
47
|
+
/**
|
|
48
|
+
* Remove connection event listener
|
|
49
|
+
*/
|
|
50
|
+
removeConnectionListener(listener: (event: ConnectionEvent) => void): void;
|
|
51
|
+
/**
|
|
52
|
+
* Add target destroyed listener
|
|
53
|
+
*/
|
|
54
|
+
addTargetDestroyedListener(listener: (targetId: string) => void): void;
|
|
55
|
+
/**
|
|
56
|
+
* Handle target destroyed event
|
|
57
|
+
*/
|
|
58
|
+
private onTargetDestroyed;
|
|
59
|
+
/**
|
|
60
|
+
* Emit connection event
|
|
61
|
+
*/
|
|
62
|
+
private emitConnectionEvent;
|
|
63
|
+
/**
|
|
64
|
+
* Start heartbeat monitoring
|
|
65
|
+
*/
|
|
66
|
+
private startHeartbeat;
|
|
67
|
+
/**
|
|
68
|
+
* Stop heartbeat monitoring
|
|
69
|
+
*/
|
|
70
|
+
private stopHeartbeat;
|
|
71
|
+
/**
|
|
72
|
+
* Check connection health
|
|
73
|
+
*/
|
|
74
|
+
private checkConnection;
|
|
75
|
+
/**
|
|
76
|
+
* Handle disconnection with automatic reconnection
|
|
77
|
+
*/
|
|
78
|
+
private handleDisconnect;
|
|
79
|
+
/**
|
|
80
|
+
* Internal connect logic
|
|
81
|
+
*/
|
|
82
|
+
private connectInternal;
|
|
83
|
+
/**
|
|
84
|
+
* Connect to Chrome instance
|
|
85
|
+
*/
|
|
86
|
+
connect(): Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* Force reconnect by disconnecting and reconnecting
|
|
89
|
+
*/
|
|
90
|
+
forceReconnect(): Promise<void>;
|
|
91
|
+
/**
|
|
92
|
+
* Disconnect from Chrome
|
|
93
|
+
*/
|
|
94
|
+
disconnect(): Promise<void>;
|
|
95
|
+
/**
|
|
96
|
+
* Get browser instance
|
|
97
|
+
*/
|
|
98
|
+
getBrowser(): Browser;
|
|
99
|
+
static readonly DEFAULT_VIEWPORT: {
|
|
100
|
+
width: number;
|
|
101
|
+
height: number;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Create a new isolated browser context for session isolation
|
|
105
|
+
* Each context has its own cookies, localStorage, sessionStorage
|
|
106
|
+
*/
|
|
107
|
+
createBrowserContext(): Promise<BrowserContext>;
|
|
108
|
+
/**
|
|
109
|
+
* Close a browser context and all its pages
|
|
110
|
+
*/
|
|
111
|
+
closeBrowserContext(context: BrowserContext): Promise<void>;
|
|
112
|
+
/**
|
|
113
|
+
* Check if a hostname is localhost
|
|
114
|
+
*/
|
|
115
|
+
private isLocalhost;
|
|
116
|
+
/**
|
|
117
|
+
* Calculate domain match score between two URLs
|
|
118
|
+
* Higher score = better match
|
|
119
|
+
*/
|
|
120
|
+
private domainMatchScore;
|
|
121
|
+
/**
|
|
122
|
+
* Find an authenticated page with cookies to copy from.
|
|
123
|
+
* Returns the targetId of a page that has cookies in Chrome's default context.
|
|
124
|
+
*
|
|
125
|
+
* Promise coalescing: concurrent callers for the same domain share one probe
|
|
126
|
+
* instead of independently hammering Chrome with 20 simultaneous scans.
|
|
127
|
+
*
|
|
128
|
+
* @param targetDomain Optional domain to prioritize when selecting cookie source
|
|
129
|
+
*/
|
|
130
|
+
findAuthenticatedPageTargetId(targetDomain?: string): Promise<string | null>;
|
|
131
|
+
/**
|
|
132
|
+
* Internal implementation of the authenticated-page probe.
|
|
133
|
+
* Uses Target.attachToTarget (multiplexed CDP) instead of raw WebSocket connections.
|
|
134
|
+
* Uses Target.getTargets result directly instead of /json/list HTTP calls.
|
|
135
|
+
*/
|
|
136
|
+
private _doFindAuthenticatedPageTargetId;
|
|
137
|
+
/**
|
|
138
|
+
* Copy all cookies from authenticated page to destination page.
|
|
139
|
+
* Uses Target.attachToTarget (multiplexed CDP) to bypass Puppeteer's context isolation —
|
|
140
|
+
* no raw WebSocket connections, no /json/list HTTP calls.
|
|
141
|
+
*/
|
|
142
|
+
copyCookiesViaCDP(sourceTargetId: string, destPage: Page): Promise<number>;
|
|
143
|
+
/**
|
|
144
|
+
* Create a new page with default viewport
|
|
145
|
+
* @param url Optional URL to navigate to
|
|
146
|
+
* @param context Optional browser context for session isolation (null/undefined = use Chrome's default context with cookies)
|
|
147
|
+
*/
|
|
148
|
+
createPage(url?: string, context?: BrowserContext | null): Promise<Page>;
|
|
149
|
+
/**
|
|
150
|
+
* Get all page targets
|
|
151
|
+
*/
|
|
152
|
+
getPages(): Promise<Page[]>;
|
|
153
|
+
/**
|
|
154
|
+
* Get page by target ID
|
|
155
|
+
*/
|
|
156
|
+
getPageByTargetId(targetId: string): Promise<Page | null>;
|
|
157
|
+
/**
|
|
158
|
+
* Get CDP session for a page
|
|
159
|
+
*/
|
|
160
|
+
getCDPSession(page: Page): Promise<CDPSession>;
|
|
161
|
+
/**
|
|
162
|
+
* Execute CDP command on a page
|
|
163
|
+
*/
|
|
164
|
+
send<T = unknown>(page: Page, method: string, params?: Record<string, unknown>): Promise<T>;
|
|
165
|
+
/**
|
|
166
|
+
* Get all targets
|
|
167
|
+
*/
|
|
168
|
+
getTargets(): Target[];
|
|
169
|
+
/**
|
|
170
|
+
* Find target by ID
|
|
171
|
+
*/
|
|
172
|
+
findTarget(targetId: string): Target | undefined;
|
|
173
|
+
/**
|
|
174
|
+
* Trigger garbage collection on a page (best-effort)
|
|
175
|
+
*/
|
|
176
|
+
triggerGC(page: Page): Promise<void>;
|
|
177
|
+
/**
|
|
178
|
+
* Close a page by target ID
|
|
179
|
+
*/
|
|
180
|
+
closePage(targetId: string): Promise<void>;
|
|
181
|
+
/**
|
|
182
|
+
* Check if connected
|
|
183
|
+
*/
|
|
184
|
+
isConnected(): boolean;
|
|
185
|
+
/**
|
|
186
|
+
* Get the port this client is connected to
|
|
187
|
+
*/
|
|
188
|
+
getPort(): number;
|
|
189
|
+
/**
|
|
190
|
+
* Create a CDPClient instance for a specific port
|
|
191
|
+
*/
|
|
192
|
+
static createForPort(port: number, options?: CDPClientOptions): CDPClient;
|
|
193
|
+
}
|
|
194
|
+
export declare function getCDPClient(options?: CDPClientOptions): CDPClient;
|
|
195
|
+
/**
|
|
196
|
+
* Factory for managing multiple CDPClient instances (one per Chrome port)
|
|
197
|
+
*/
|
|
198
|
+
export declare class CDPClientFactory {
|
|
199
|
+
private clients;
|
|
200
|
+
/**
|
|
201
|
+
* Get an existing client for the given port, or create a new one
|
|
202
|
+
*/
|
|
203
|
+
getOrCreate(port: number, options?: CDPClientOptions): CDPClient;
|
|
204
|
+
/**
|
|
205
|
+
* Get an existing client for the given port, or undefined if not found
|
|
206
|
+
*/
|
|
207
|
+
get(port: number): CDPClient | undefined;
|
|
208
|
+
/**
|
|
209
|
+
* Get all managed client instances
|
|
210
|
+
*/
|
|
211
|
+
getAll(): CDPClient[];
|
|
212
|
+
/**
|
|
213
|
+
* Disconnect all managed clients
|
|
214
|
+
*/
|
|
215
|
+
disconnectAll(): Promise<void>;
|
|
216
|
+
}
|
|
217
|
+
export declare function getCDPClientFactory(): CDPClientFactory;
|
|
218
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +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