devharness 0.8.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 +185 -0
- package/build/atomic-write.d.ts +28 -0
- package/build/atomic-write.d.ts.map +1 -0
- package/build/atomic-write.js +126 -0
- package/build/atomic-write.js.map +1 -0
- package/build/cdp-manager.d.ts +524 -0
- package/build/cdp-manager.d.ts.map +1 -0
- package/build/cdp-manager.js +1828 -0
- package/build/cdp-manager.js.map +1 -0
- package/build/cdp-manager.test.d.ts +6 -0
- package/build/cdp-manager.test.d.ts.map +1 -0
- package/build/cdp-manager.test.js +546 -0
- package/build/cdp-manager.test.js.map +1 -0
- package/build/chrome-launcher.d.ts +400 -0
- package/build/chrome-launcher.d.ts.map +1 -0
- package/build/chrome-launcher.js +1071 -0
- package/build/chrome-launcher.js.map +1 -0
- package/build/chrome-launcher.test.d.ts +11 -0
- package/build/chrome-launcher.test.d.ts.map +1 -0
- package/build/chrome-launcher.test.js +204 -0
- package/build/chrome-launcher.test.js.map +1 -0
- package/build/clickable-cache.d.ts +73 -0
- package/build/clickable-cache.d.ts.map +1 -0
- package/build/clickable-cache.js +90 -0
- package/build/clickable-cache.js.map +1 -0
- package/build/command-recorder.d.ts +401 -0
- package/build/command-recorder.d.ts.map +1 -0
- package/build/command-recorder.js +701 -0
- package/build/command-recorder.js.map +1 -0
- package/build/config.d.ts +390 -0
- package/build/config.d.ts.map +1 -0
- package/build/config.js +826 -0
- package/build/config.js.map +1 -0
- package/build/config.test.d.ts +2 -0
- package/build/config.test.d.ts.map +1 -0
- package/build/config.test.js +112 -0
- package/build/config.test.js.map +1 -0
- package/build/connection-manager.d.ts +159 -0
- package/build/connection-manager.d.ts.map +1 -0
- package/build/connection-manager.js +432 -0
- package/build/connection-manager.js.map +1 -0
- package/build/connection-manager.test.d.ts +11 -0
- package/build/connection-manager.test.d.ts.map +1 -0
- package/build/connection-manager.test.js +114 -0
- package/build/connection-manager.test.js.map +1 -0
- package/build/console-monitor.d.ts +150 -0
- package/build/console-monitor.d.ts.map +1 -0
- package/build/console-monitor.js +454 -0
- package/build/console-monitor.js.map +1 -0
- package/build/dashboard/bundle.js +1 -0
- package/build/dashboard/dashboard-client.d.ts +42 -0
- package/build/dashboard/dashboard-client.d.ts.map +1 -0
- package/build/dashboard/dashboard-client.js +184 -0
- package/build/dashboard/dashboard-client.js.map +1 -0
- package/build/dashboard/dashboard-hub.d.ts +50 -0
- package/build/dashboard/dashboard-hub.d.ts.map +1 -0
- package/build/dashboard/dashboard-hub.js +654 -0
- package/build/dashboard/dashboard-hub.js.map +1 -0
- package/build/dashboard/hub-lock.d.ts +16 -0
- package/build/dashboard/hub-lock.d.ts.map +1 -0
- package/build/dashboard/hub-lock.js +77 -0
- package/build/dashboard/hub-lock.js.map +1 -0
- package/build/dashboard/index.d.ts +25 -0
- package/build/dashboard/index.d.ts.map +1 -0
- package/build/dashboard/index.js +77 -0
- package/build/dashboard/index.js.map +1 -0
- package/build/dashboard/types.d.ts +83 -0
- package/build/dashboard/types.d.ts.map +1 -0
- package/build/dashboard/types.js +6 -0
- package/build/dashboard/types.js.map +1 -0
- package/build/debug-logger.d.ts +85 -0
- package/build/debug-logger.d.ts.map +1 -0
- package/build/debug-logger.js +195 -0
- package/build/debug-logger.js.map +1 -0
- package/build/debugger-aware-wrapper.d.ts +37 -0
- package/build/debugger-aware-wrapper.d.ts.map +1 -0
- package/build/debugger-aware-wrapper.js +128 -0
- package/build/debugger-aware-wrapper.js.map +1 -0
- package/build/dom-change-monitor.d.ts +92 -0
- package/build/dom-change-monitor.d.ts.map +1 -0
- package/build/dom-change-monitor.js +437 -0
- package/build/dom-change-monitor.js.map +1 -0
- package/build/element-collector.d.ts +16 -0
- package/build/element-collector.d.ts.map +1 -0
- package/build/element-collector.js +207 -0
- package/build/element-collector.js.map +1 -0
- package/build/error-helpers.d.ts +43 -0
- package/build/error-helpers.d.ts.map +1 -0
- package/build/error-helpers.js +143 -0
- package/build/error-helpers.js.map +1 -0
- package/build/formatters/console-formatter.d.ts +160 -0
- package/build/formatters/console-formatter.d.ts.map +1 -0
- package/build/formatters/console-formatter.js +338 -0
- package/build/formatters/console-formatter.js.map +1 -0
- package/build/helpers/parser-plugins.d.ts +44 -0
- package/build/helpers/parser-plugins.d.ts.map +1 -0
- package/build/helpers/parser-plugins.js +102 -0
- package/build/helpers/parser-plugins.js.map +1 -0
- package/build/helpers/paths.d.ts +79 -0
- package/build/helpers/paths.d.ts.map +1 -0
- package/build/helpers/paths.js +168 -0
- package/build/helpers/paths.js.map +1 -0
- package/build/helpers/process-liveness.d.ts +24 -0
- package/build/helpers/process-liveness.d.ts.map +1 -0
- package/build/helpers/process-liveness.js +36 -0
- package/build/helpers/process-liveness.js.map +1 -0
- package/build/helpers/process-liveness.test.d.ts +2 -0
- package/build/helpers/process-liveness.test.d.ts.map +1 -0
- package/build/helpers/process-liveness.test.js +40 -0
- package/build/helpers/process-liveness.test.js.map +1 -0
- package/build/helpers/sequence-tree.d.ts +27 -0
- package/build/helpers/sequence-tree.d.ts.map +1 -0
- package/build/helpers/sequence-tree.js +80 -0
- package/build/helpers/sequence-tree.js.map +1 -0
- package/build/helpers/sequence-tree.test.d.ts +2 -0
- package/build/helpers/sequence-tree.test.d.ts.map +1 -0
- package/build/helpers/sequence-tree.test.js +122 -0
- package/build/helpers/sequence-tree.test.js.map +1 -0
- package/build/index.d.ts +3 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +2007 -0
- package/build/index.js.map +1 -0
- package/build/interaction-recorder.d.ts +214 -0
- package/build/interaction-recorder.d.ts.map +1 -0
- package/build/interaction-recorder.js +2007 -0
- package/build/interaction-recorder.js.map +1 -0
- package/build/issue-tracker.d.ts +107 -0
- package/build/issue-tracker.d.ts.map +1 -0
- package/build/issue-tracker.js +582 -0
- package/build/issue-tracker.js.map +1 -0
- package/build/issue-tracker.test.d.ts +2 -0
- package/build/issue-tracker.test.d.ts.map +1 -0
- package/build/issue-tracker.test.js +88 -0
- package/build/issue-tracker.test.js.map +1 -0
- package/build/launch-chrome-port.test.d.ts +14 -0
- package/build/launch-chrome-port.test.d.ts.map +1 -0
- package/build/launch-chrome-port.test.js +97 -0
- package/build/launch-chrome-port.test.js.map +1 -0
- package/build/log-processor/orchestrator.d.ts +32 -0
- package/build/log-processor/orchestrator.d.ts.map +1 -0
- package/build/log-processor/orchestrator.js +27 -0
- package/build/log-processor/orchestrator.js.map +1 -0
- package/build/logpoint-execution-tracker.d.ts +57 -0
- package/build/logpoint-execution-tracker.d.ts.map +1 -0
- package/build/logpoint-execution-tracker.js +112 -0
- package/build/logpoint-execution-tracker.js.map +1 -0
- package/build/mcp-supervisor.d.ts +3 -0
- package/build/mcp-supervisor.d.ts.map +1 -0
- package/build/mcp-supervisor.js +211 -0
- package/build/mcp-supervisor.js.map +1 -0
- package/build/messages.d.ts +165 -0
- package/build/messages.d.ts.map +1 -0
- package/build/messages.js +574 -0
- package/build/messages.js.map +1 -0
- package/build/network-monitor.d.ts +172 -0
- package/build/network-monitor.d.ts.map +1 -0
- package/build/network-monitor.js +350 -0
- package/build/network-monitor.js.map +1 -0
- package/build/overlays.d.ts +49 -0
- package/build/overlays.d.ts.map +1 -0
- package/build/overlays.js +409 -0
- package/build/overlays.js.map +1 -0
- package/build/persistent-profiles.test.d.ts +15 -0
- package/build/persistent-profiles.test.d.ts.map +1 -0
- package/build/persistent-profiles.test.js +470 -0
- package/build/persistent-profiles.test.js.map +1 -0
- package/build/port-reserver.d.ts +32 -0
- package/build/port-reserver.d.ts.map +1 -0
- package/build/port-reserver.js +118 -0
- package/build/port-reserver.js.map +1 -0
- package/build/puppeteer-manager.d.ts +47 -0
- package/build/puppeteer-manager.d.ts.map +1 -0
- package/build/puppeteer-manager.js +116 -0
- package/build/puppeteer-manager.js.map +1 -0
- package/build/recording-coverage.test.d.ts +12 -0
- package/build/recording-coverage.test.d.ts.map +1 -0
- package/build/recording-coverage.test.js +72 -0
- package/build/recording-coverage.test.js.map +1 -0
- package/build/reference-validator.d.ts +47 -0
- package/build/reference-validator.d.ts.map +1 -0
- package/build/reference-validator.js +86 -0
- package/build/reference-validator.js.map +1 -0
- package/build/reference-validator.test.d.ts +5 -0
- package/build/reference-validator.test.d.ts.map +1 -0
- package/build/reference-validator.test.js +243 -0
- package/build/reference-validator.test.js.map +1 -0
- package/build/replay-cursor.d.ts +27 -0
- package/build/replay-cursor.d.ts.map +1 -0
- package/build/replay-cursor.js +240 -0
- package/build/replay-cursor.js.map +1 -0
- package/build/runners/docker-compose-runner.d.ts +69 -0
- package/build/runners/docker-compose-runner.d.ts.map +1 -0
- package/build/runners/docker-compose-runner.js +438 -0
- package/build/runners/docker-compose-runner.js.map +1 -0
- package/build/runners/docker-runner.d.ts +65 -0
- package/build/runners/docker-runner.d.ts.map +1 -0
- package/build/runners/docker-runner.js +414 -0
- package/build/runners/docker-runner.js.map +1 -0
- package/build/runners/index.d.ts +19 -0
- package/build/runners/index.d.ts.map +1 -0
- package/build/runners/index.js +35 -0
- package/build/runners/index.js.map +1 -0
- package/build/runners/native-runner.d.ts +95 -0
- package/build/runners/native-runner.d.ts.map +1 -0
- package/build/runners/native-runner.js +370 -0
- package/build/runners/native-runner.js.map +1 -0
- package/build/runners/types.d.ts +147 -0
- package/build/runners/types.d.ts.map +1 -0
- package/build/runners/types.js +25 -0
- package/build/runners/types.js.map +1 -0
- package/build/self-restart.d.ts +12 -0
- package/build/self-restart.d.ts.map +1 -0
- package/build/self-restart.js +41 -0
- package/build/self-restart.js.map +1 -0
- package/build/self-restart.test.d.ts +2 -0
- package/build/self-restart.test.d.ts.map +1 -0
- package/build/self-restart.test.js +34 -0
- package/build/self-restart.test.js.map +1 -0
- package/build/server-claims.d.ts +161 -0
- package/build/server-claims.d.ts.map +1 -0
- package/build/server-claims.js +382 -0
- package/build/server-claims.js.map +1 -0
- package/build/server-claims.test.d.ts +2 -0
- package/build/server-claims.test.d.ts.map +1 -0
- package/build/server-claims.test.js +197 -0
- package/build/server-claims.test.js.map +1 -0
- package/build/server-manager.d.ts +438 -0
- package/build/server-manager.d.ts.map +1 -0
- package/build/server-manager.js +1674 -0
- package/build/server-manager.js.map +1 -0
- package/build/server-manager.test.d.ts +17 -0
- package/build/server-manager.test.d.ts.map +1 -0
- package/build/server-manager.test.js +122 -0
- package/build/server-manager.test.js.map +1 -0
- package/build/server-ownership.test.d.ts +2 -0
- package/build/server-ownership.test.d.ts.map +1 -0
- package/build/server-ownership.test.js +238 -0
- package/build/server-ownership.test.js.map +1 -0
- package/build/server-watcher.d.ts +21 -0
- package/build/server-watcher.d.ts.map +1 -0
- package/build/server-watcher.js +105 -0
- package/build/server-watcher.js.map +1 -0
- package/build/session-detector.d.ts +47 -0
- package/build/session-detector.d.ts.map +1 -0
- package/build/session-detector.js +229 -0
- package/build/session-detector.js.map +1 -0
- package/build/session-detector.test.d.ts +9 -0
- package/build/session-detector.test.d.ts.map +1 -0
- package/build/session-detector.test.js +45 -0
- package/build/session-detector.test.js.map +1 -0
- package/build/sourcemap-handler.d.ts +114 -0
- package/build/sourcemap-handler.d.ts.map +1 -0
- package/build/sourcemap-handler.js +479 -0
- package/build/sourcemap-handler.js.map +1 -0
- package/build/supervisor/child-manager.d.ts +43 -0
- package/build/supervisor/child-manager.d.ts.map +1 -0
- package/build/supervisor/child-manager.js +148 -0
- package/build/supervisor/child-manager.js.map +1 -0
- package/build/supervisor/child-manager.test.d.ts +2 -0
- package/build/supervisor/child-manager.test.d.ts.map +1 -0
- package/build/supervisor/child-manager.test.js +107 -0
- package/build/supervisor/child-manager.test.js.map +1 -0
- package/build/supervisor/client-watcher.d.ts +48 -0
- package/build/supervisor/client-watcher.d.ts.map +1 -0
- package/build/supervisor/client-watcher.js +186 -0
- package/build/supervisor/client-watcher.js.map +1 -0
- package/build/supervisor/client-watcher.test.d.ts +2 -0
- package/build/supervisor/client-watcher.test.d.ts.map +1 -0
- package/build/supervisor/client-watcher.test.js +121 -0
- package/build/supervisor/client-watcher.test.js.map +1 -0
- package/build/supervisor/idle-config.d.ts +30 -0
- package/build/supervisor/idle-config.d.ts.map +1 -0
- package/build/supervisor/idle-config.js +76 -0
- package/build/supervisor/idle-config.js.map +1 -0
- package/build/supervisor/idle-config.test.d.ts +2 -0
- package/build/supervisor/idle-config.test.d.ts.map +1 -0
- package/build/supervisor/idle-config.test.js +119 -0
- package/build/supervisor/idle-config.test.js.map +1 -0
- package/build/supervisor/ndjson-reader.d.ts +47 -0
- package/build/supervisor/ndjson-reader.d.ts.map +1 -0
- package/build/supervisor/ndjson-reader.js +75 -0
- package/build/supervisor/ndjson-reader.js.map +1 -0
- package/build/supervisor/ndjson-reader.test.d.ts +2 -0
- package/build/supervisor/ndjson-reader.test.d.ts.map +1 -0
- package/build/supervisor/ndjson-reader.test.js +92 -0
- package/build/supervisor/ndjson-reader.test.js.map +1 -0
- package/build/supervisor/pidfile.d.ts +11 -0
- package/build/supervisor/pidfile.d.ts.map +1 -0
- package/build/supervisor/pidfile.js +29 -0
- package/build/supervisor/pidfile.js.map +1 -0
- package/build/supervisor/pidfile.test.d.ts +8 -0
- package/build/supervisor/pidfile.test.d.ts.map +1 -0
- package/build/supervisor/pidfile.test.js +46 -0
- package/build/supervisor/pidfile.test.js.map +1 -0
- package/build/supervisor/restart-coordinator.d.ts +73 -0
- package/build/supervisor/restart-coordinator.d.ts.map +1 -0
- package/build/supervisor/restart-coordinator.js +300 -0
- package/build/supervisor/restart-coordinator.js.map +1 -0
- package/build/supervisor/restart-coordinator.test.d.ts +2 -0
- package/build/supervisor/restart-coordinator.test.d.ts.map +1 -0
- package/build/supervisor/restart-coordinator.test.js +434 -0
- package/build/supervisor/restart-coordinator.test.js.map +1 -0
- package/build/test-support/fake-execute-tool-call.d.ts +11 -0
- package/build/test-support/fake-execute-tool-call.d.ts.map +1 -0
- package/build/test-support/fake-execute-tool-call.js +19 -0
- package/build/test-support/fake-execute-tool-call.js.map +1 -0
- package/build/tool-error.d.ts +14 -0
- package/build/tool-error.d.ts.map +1 -0
- package/build/tool-error.js +18 -0
- package/build/tool-error.js.map +1 -0
- package/build/tool-response.d.ts +293 -0
- package/build/tool-response.d.ts.map +1 -0
- package/build/tool-response.js +365 -0
- package/build/tool-response.js.map +1 -0
- package/build/tools/assert-tools.d.ts +62 -0
- package/build/tools/assert-tools.d.ts.map +1 -0
- package/build/tools/assert-tools.js +330 -0
- package/build/tools/assert-tools.js.map +1 -0
- package/build/tools/breakpoint-await-abort.test.d.ts +2 -0
- package/build/tools/breakpoint-await-abort.test.d.ts.map +1 -0
- package/build/tools/breakpoint-await-abort.test.js +124 -0
- package/build/tools/breakpoint-await-abort.test.js.map +1 -0
- package/build/tools/breakpoint-tools.d.ts +99 -0
- package/build/tools/breakpoint-tools.d.ts.map +1 -0
- package/build/tools/breakpoint-tools.js +1197 -0
- package/build/tools/breakpoint-tools.js.map +1 -0
- package/build/tools/config-tools.d.ts +58 -0
- package/build/tools/config-tools.d.ts.map +1 -0
- package/build/tools/config-tools.js +180 -0
- package/build/tools/config-tools.js.map +1 -0
- package/build/tools/connection-routing.test.d.ts +12 -0
- package/build/tools/connection-routing.test.d.ts.map +1 -0
- package/build/tools/connection-routing.test.js +206 -0
- package/build/tools/connection-routing.test.js.map +1 -0
- package/build/tools/console-tools.d.ts +84 -0
- package/build/tools/console-tools.d.ts.map +1 -0
- package/build/tools/console-tools.js +241 -0
- package/build/tools/console-tools.js.map +1 -0
- package/build/tools/content-tools.d.ts +74 -0
- package/build/tools/content-tools.d.ts.map +1 -0
- package/build/tools/content-tools.js +582 -0
- package/build/tools/content-tools.js.map +1 -0
- package/build/tools/dashboard-tools.d.ts +38 -0
- package/build/tools/dashboard-tools.d.ts.map +1 -0
- package/build/tools/dashboard-tools.js +123 -0
- package/build/tools/dashboard-tools.js.map +1 -0
- package/build/tools/dom-tools.d.ts +41 -0
- package/build/tools/dom-tools.d.ts.map +1 -0
- package/build/tools/dom-tools.js +277 -0
- package/build/tools/dom-tools.js.map +1 -0
- package/build/tools/download-tools.d.ts +55 -0
- package/build/tools/download-tools.d.ts.map +1 -0
- package/build/tools/download-tools.js +280 -0
- package/build/tools/download-tools.js.map +1 -0
- package/build/tools/execution-tools.d.ts +40 -0
- package/build/tools/execution-tools.d.ts.map +1 -0
- package/build/tools/execution-tools.js +121 -0
- package/build/tools/execution-tools.js.map +1 -0
- package/build/tools/input-abort.test.d.ts +2 -0
- package/build/tools/input-abort.test.d.ts.map +1 -0
- package/build/tools/input-abort.test.js +227 -0
- package/build/tools/input-abort.test.js.map +1 -0
- package/build/tools/input-ambiguous-selector.test.d.ts +2 -0
- package/build/tools/input-ambiguous-selector.test.d.ts.map +1 -0
- package/build/tools/input-ambiguous-selector.test.js +34 -0
- package/build/tools/input-ambiguous-selector.test.js.map +1 -0
- package/build/tools/input-tools.d.ts +168 -0
- package/build/tools/input-tools.d.ts.map +1 -0
- package/build/tools/input-tools.js +1397 -0
- package/build/tools/input-tools.js.map +1 -0
- package/build/tools/inspection-tools.d.ts +112 -0
- package/build/tools/inspection-tools.d.ts.map +1 -0
- package/build/tools/inspection-tools.js +637 -0
- package/build/tools/inspection-tools.js.map +1 -0
- package/build/tools/interpolation.d.ts +30 -0
- package/build/tools/interpolation.d.ts.map +1 -0
- package/build/tools/interpolation.js +143 -0
- package/build/tools/interpolation.js.map +1 -0
- package/build/tools/issues-abort-hygiene.test.d.ts +2 -0
- package/build/tools/issues-abort-hygiene.test.d.ts.map +1 -0
- package/build/tools/issues-abort-hygiene.test.js +79 -0
- package/build/tools/issues-abort-hygiene.test.js.map +1 -0
- package/build/tools/issues-tools.d.ts +98 -0
- package/build/tools/issues-tools.d.ts.map +1 -0
- package/build/tools/issues-tools.js +821 -0
- package/build/tools/issues-tools.js.map +1 -0
- package/build/tools/issues-tools.test.d.ts +8 -0
- package/build/tools/issues-tools.test.d.ts.map +1 -0
- package/build/tools/issues-tools.test.js +184 -0
- package/build/tools/issues-tools.test.js.map +1 -0
- package/build/tools/modal-tools.d.ts +73 -0
- package/build/tools/modal-tools.d.ts.map +1 -0
- package/build/tools/modal-tools.js +161 -0
- package/build/tools/modal-tools.js.map +1 -0
- package/build/tools/network-tools.d.ts +72 -0
- package/build/tools/network-tools.d.ts.map +1 -0
- package/build/tools/network-tools.js +432 -0
- package/build/tools/network-tools.js.map +1 -0
- package/build/tools/page-tools.d.ts +78 -0
- package/build/tools/page-tools.d.ts.map +1 -0
- package/build/tools/page-tools.js +255 -0
- package/build/tools/page-tools.js.map +1 -0
- package/build/tools/plugin-tools.d.ts +16 -0
- package/build/tools/plugin-tools.d.ts.map +1 -0
- package/build/tools/plugin-tools.js +17 -0
- package/build/tools/plugin-tools.js.map +1 -0
- package/build/tools/replay-abort.test.d.ts +2 -0
- package/build/tools/replay-abort.test.d.ts.map +1 -0
- package/build/tools/replay-abort.test.js +259 -0
- package/build/tools/replay-abort.test.js.map +1 -0
- package/build/tools/replay-add-conditional.test.d.ts +2 -0
- package/build/tools/replay-add-conditional.test.d.ts.map +1 -0
- package/build/tools/replay-add-conditional.test.js +205 -0
- package/build/tools/replay-add-conditional.test.js.map +1 -0
- package/build/tools/replay-background-run.test.d.ts +2 -0
- package/build/tools/replay-background-run.test.d.ts.map +1 -0
- package/build/tools/replay-background-run.test.js +176 -0
- package/build/tools/replay-background-run.test.js.map +1 -0
- package/build/tools/replay-capture-variables.test.d.ts +2 -0
- package/build/tools/replay-capture-variables.test.d.ts.map +1 -0
- package/build/tools/replay-capture-variables.test.js +331 -0
- package/build/tools/replay-capture-variables.test.js.map +1 -0
- package/build/tools/replay-conditional-idb-and-launch.test.d.ts +11 -0
- package/build/tools/replay-conditional-idb-and-launch.test.d.ts.map +1 -0
- package/build/tools/replay-conditional-idb-and-launch.test.js +429 -0
- package/build/tools/replay-conditional-idb-and-launch.test.js.map +1 -0
- package/build/tools/replay-conditional-timeout.test.d.ts +14 -0
- package/build/tools/replay-conditional-timeout.test.d.ts.map +1 -0
- package/build/tools/replay-conditional-timeout.test.js +126 -0
- package/build/tools/replay-conditional-timeout.test.js.map +1 -0
- package/build/tools/replay-declare.test.d.ts +2 -0
- package/build/tools/replay-declare.test.d.ts.map +1 -0
- package/build/tools/replay-declare.test.js +106 -0
- package/build/tools/replay-declare.test.js.map +1 -0
- package/build/tools/replay-declared-browser-cleanup.test.d.ts +2 -0
- package/build/tools/replay-declared-browser-cleanup.test.d.ts.map +1 -0
- package/build/tools/replay-declared-browser-cleanup.test.js +103 -0
- package/build/tools/replay-declared-browser-cleanup.test.js.map +1 -0
- package/build/tools/replay-declared-profile.test.d.ts +2 -0
- package/build/tools/replay-declared-profile.test.d.ts.map +1 -0
- package/build/tools/replay-declared-profile.test.js +116 -0
- package/build/tools/replay-declared-profile.test.js.map +1 -0
- package/build/tools/replay-executor.d.ts +556 -0
- package/build/tools/replay-executor.d.ts.map +1 -0
- package/build/tools/replay-executor.js +2347 -0
- package/build/tools/replay-executor.js.map +1 -0
- package/build/tools/replay-folder-save.test.d.ts +2 -0
- package/build/tools/replay-folder-save.test.d.ts.map +1 -0
- package/build/tools/replay-folder-save.test.js +63 -0
- package/build/tools/replay-folder-save.test.js.map +1 -0
- package/build/tools/replay-formatters.d.ts +148 -0
- package/build/tools/replay-formatters.d.ts.map +1 -0
- package/build/tools/replay-formatters.js +856 -0
- package/build/tools/replay-formatters.js.map +1 -0
- package/build/tools/replay-kill-chrome-on-finish.test.d.ts +2 -0
- package/build/tools/replay-kill-chrome-on-finish.test.d.ts.map +1 -0
- package/build/tools/replay-kill-chrome-on-finish.test.js +175 -0
- package/build/tools/replay-kill-chrome-on-finish.test.js.map +1 -0
- package/build/tools/replay-multi-connection.test.d.ts +2 -0
- package/build/tools/replay-multi-connection.test.d.ts.map +1 -0
- package/build/tools/replay-multi-connection.test.js +547 -0
- package/build/tools/replay-multi-connection.test.js.map +1 -0
- package/build/tools/replay-output-and-record-options.test.d.ts +2 -0
- package/build/tools/replay-output-and-record-options.test.d.ts.map +1 -0
- package/build/tools/replay-output-and-record-options.test.js +240 -0
- package/build/tools/replay-output-and-record-options.test.js.map +1 -0
- package/build/tools/replay-production-error-shape.test.d.ts +7 -0
- package/build/tools/replay-production-error-shape.test.d.ts.map +1 -0
- package/build/tools/replay-production-error-shape.test.js +93 -0
- package/build/tools/replay-production-error-shape.test.js.map +1 -0
- package/build/tools/replay-rebase.test.d.ts +2 -0
- package/build/tools/replay-rebase.test.d.ts.map +1 -0
- package/build/tools/replay-rebase.test.js +58 -0
- package/build/tools/replay-rebase.test.js.map +1 -0
- package/build/tools/replay-retry-classification.test.d.ts +9 -0
- package/build/tools/replay-retry-classification.test.d.ts.map +1 -0
- package/build/tools/replay-retry-classification.test.js +57 -0
- package/build/tools/replay-retry-classification.test.js.map +1 -0
- package/build/tools/replay-run-registry.d.ts +55 -0
- package/build/tools/replay-run-registry.d.ts.map +1 -0
- package/build/tools/replay-run-registry.js +65 -0
- package/build/tools/replay-run-registry.js.map +1 -0
- package/build/tools/replay-sequence-reload.test.d.ts +2 -0
- package/build/tools/replay-sequence-reload.test.d.ts.map +1 -0
- package/build/tools/replay-sequence-reload.test.js +82 -0
- package/build/tools/replay-sequence-reload.test.js.map +1 -0
- package/build/tools/replay-socket-scope.test.d.ts +2 -0
- package/build/tools/replay-socket-scope.test.d.ts.map +1 -0
- package/build/tools/replay-socket-scope.test.js +75 -0
- package/build/tools/replay-socket-scope.test.js.map +1 -0
- package/build/tools/replay-step-connection.test.d.ts +2 -0
- package/build/tools/replay-step-connection.test.d.ts.map +1 -0
- package/build/tools/replay-step-connection.test.js +292 -0
- package/build/tools/replay-step-connection.test.js.map +1 -0
- package/build/tools/replay-step-timeout.test.d.ts +2 -0
- package/build/tools/replay-step-timeout.test.d.ts.map +1 -0
- package/build/tools/replay-step-timeout.test.js +204 -0
- package/build/tools/replay-step-timeout.test.js.map +1 -0
- package/build/tools/replay-tags.test.d.ts +2 -0
- package/build/tools/replay-tags.test.d.ts.map +1 -0
- package/build/tools/replay-tags.test.js +99 -0
- package/build/tools/replay-tags.test.js.map +1 -0
- package/build/tools/replay-teardown-and-foreach.test.d.ts +13 -0
- package/build/tools/replay-teardown-and-foreach.test.d.ts.map +1 -0
- package/build/tools/replay-teardown-and-foreach.test.js +318 -0
- package/build/tools/replay-teardown-and-foreach.test.js.map +1 -0
- package/build/tools/replay-tool-name-validation.test.d.ts +2 -0
- package/build/tools/replay-tool-name-validation.test.d.ts.map +1 -0
- package/build/tools/replay-tool-name-validation.test.js +280 -0
- package/build/tools/replay-tool-name-validation.test.js.map +1 -0
- package/build/tools/replay-tools.d.ts +288 -0
- package/build/tools/replay-tools.d.ts.map +1 -0
- package/build/tools/replay-tools.js +2994 -0
- package/build/tools/replay-tools.js.map +1 -0
- package/build/tools/request-abort.test.d.ts +2 -0
- package/build/tools/request-abort.test.d.ts.map +1 -0
- package/build/tools/request-abort.test.js +130 -0
- package/build/tools/request-abort.test.js.map +1 -0
- package/build/tools/request-tools.d.ts +56 -0
- package/build/tools/request-tools.d.ts.map +1 -0
- package/build/tools/request-tools.js +174 -0
- package/build/tools/request-tools.js.map +1 -0
- package/build/tools/screenshot-tools.d.ts +135 -0
- package/build/tools/screenshot-tools.d.ts.map +1 -0
- package/build/tools/screenshot-tools.js +636 -0
- package/build/tools/screenshot-tools.js.map +1 -0
- package/build/tools/server-tools.d.ts +88 -0
- package/build/tools/server-tools.d.ts.map +1 -0
- package/build/tools/server-tools.js +485 -0
- package/build/tools/server-tools.js.map +1 -0
- package/build/tools/source-tools.d.ts +46 -0
- package/build/tools/source-tools.d.ts.map +1 -0
- package/build/tools/source-tools.js +47 -0
- package/build/tools/source-tools.js.map +1 -0
- package/build/tools/storage-tools.d.ts +141 -0
- package/build/tools/storage-tools.d.ts.map +1 -0
- package/build/tools/storage-tools.js +894 -0
- package/build/tools/storage-tools.js.map +1 -0
- package/build/tools/storage-tools.test.d.ts +13 -0
- package/build/tools/storage-tools.test.d.ts.map +1 -0
- package/build/tools/storage-tools.test.js +707 -0
- package/build/tools/storage-tools.test.js.map +1 -0
- package/build/tools/tab-tools.d.ts +42 -0
- package/build/tools/tab-tools.d.ts.map +1 -0
- package/build/tools/tab-tools.js +296 -0
- package/build/tools/tab-tools.js.map +1 -0
- package/build/tools/wait-tools.d.ts +85 -0
- package/build/tools/wait-tools.d.ts.map +1 -0
- package/build/tools/wait-tools.js +236 -0
- package/build/tools/wait-tools.js.map +1 -0
- package/build/tools/wait-tools.test.d.ts +9 -0
- package/build/tools/wait-tools.test.d.ts.map +1 -0
- package/build/tools/wait-tools.test.js +193 -0
- package/build/tools/wait-tools.test.js.map +1 -0
- package/build/types.d.ts +133 -0
- package/build/types.d.ts.map +1 -0
- package/build/types.js +5 -0
- package/build/types.js.map +1 -0
- package/build/ui-verifier.d.ts +88 -0
- package/build/ui-verifier.d.ts.map +1 -0
- package/build/ui-verifier.js +540 -0
- package/build/ui-verifier.js.map +1 -0
- package/build/utils/abort.d.ts +68 -0
- package/build/utils/abort.d.ts.map +1 -0
- package/build/utils/abort.js +159 -0
- package/build/utils/abort.js.map +1 -0
- package/build/utils/abort.test.d.ts +2 -0
- package/build/utils/abort.test.d.ts.map +1 -0
- package/build/utils/abort.test.js +174 -0
- package/build/utils/abort.test.js.map +1 -0
- package/build/utils/modal-detection-core.d.ts +150 -0
- package/build/utils/modal-detection-core.d.ts.map +1 -0
- package/build/utils/modal-detection-core.js +332 -0
- package/build/utils/modal-detection-core.js.map +1 -0
- package/build/utils/modal-detection-core.test.d.ts +5 -0
- package/build/utils/modal-detection-core.test.d.ts.map +1 -0
- package/build/utils/modal-detection-core.test.js +492 -0
- package/build/utils/modal-detection-core.test.js.map +1 -0
- package/build/utils/modal-detector.d.ts +29 -0
- package/build/utils/modal-detector.d.ts.map +1 -0
- package/build/utils/modal-detector.js +281 -0
- package/build/utils/modal-detector.js.map +1 -0
- package/build/utils/modal-dismissal.d.ts +32 -0
- package/build/utils/modal-dismissal.d.ts.map +1 -0
- package/build/utils/modal-dismissal.js +190 -0
- package/build/utils/modal-dismissal.js.map +1 -0
- package/build/utils/port-check.d.ts +31 -0
- package/build/utils/port-check.d.ts.map +1 -0
- package/build/utils/port-check.js +87 -0
- package/build/utils/port-check.js.map +1 -0
- package/build/utils/port-check.test.d.ts +2 -0
- package/build/utils/port-check.test.d.ts.map +1 -0
- package/build/utils/port-check.test.js +66 -0
- package/build/utils/port-check.test.js.map +1 -0
- package/build/utils/selector-resolver.d.ts +66 -0
- package/build/utils/selector-resolver.d.ts.map +1 -0
- package/build/utils/selector-resolver.js +200 -0
- package/build/utils/selector-resolver.js.map +1 -0
- package/build/validation-helpers.d.ts +41 -0
- package/build/validation-helpers.d.ts.map +1 -0
- package/build/validation-helpers.js +236 -0
- package/build/validation-helpers.js.map +1 -0
- package/build/window-sizing.d.ts +26 -0
- package/build/window-sizing.d.ts.map +1 -0
- package/build/window-sizing.js +87 -0
- package/build/window-sizing.js.map +1 -0
- package/build/window-sizing.test.d.ts +8 -0
- package/build/window-sizing.test.d.ts.map +1 -0
- package/build/window-sizing.test.js +113 -0
- package/build/window-sizing.test.js.map +1 -0
- package/docs/README.md +74 -0
- package/docs/automation.md +562 -0
- package/docs/debugging.md +229 -0
- package/docs/installation.md +133 -0
- package/docs/instructions.md +227 -0
- package/docs/mcp-instructions.md +15 -0
- package/docs/message-system.md +327 -0
- package/docs/messages.md +3480 -0
- package/docs/parser-plugins.md +132 -0
- package/docs/replay.md +1411 -0
- package/docs/troubleshooting.md +272 -0
- package/docs/working_with_llm_notes.md +5 -0
- package/package.json +87 -0
- package/skills/devharness/SKILL.md +195 -0
- package/skills/devharness/references/sequences.md +613 -0
- package/skills/devharness/references/tool-categories.md +99 -0
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
# Runtime Debugging
|
|
2
|
+
|
|
3
|
+
## Setting Breakpoints
|
|
4
|
+
|
|
5
|
+
**Regular breakpoints:**
|
|
6
|
+
```javascript
|
|
7
|
+
breakpoint({
|
|
8
|
+
action: 'set',
|
|
9
|
+
url: 'http://localhost:3000/app.js',
|
|
10
|
+
lineNumber: 42,
|
|
11
|
+
connectionReason: 'my-debug-session'
|
|
12
|
+
})
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**Conditional breakpoints:**
|
|
16
|
+
```javascript
|
|
17
|
+
breakpoint({
|
|
18
|
+
action: 'set',
|
|
19
|
+
url: 'http://localhost:3000/app.js',
|
|
20
|
+
lineNumber: 42,
|
|
21
|
+
condition: 'userId === "123"',
|
|
22
|
+
connectionReason: 'my-debug-session'
|
|
23
|
+
})
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Logpoints** (non-breaking):
|
|
27
|
+
```javascript
|
|
28
|
+
breakpoint({
|
|
29
|
+
action: 'setLogpoint',
|
|
30
|
+
url: 'http://localhost:3000/app.js',
|
|
31
|
+
lineNumber: 42,
|
|
32
|
+
logMessage: 'User {userId} with role {userRole}',
|
|
33
|
+
includeCallStack: true,
|
|
34
|
+
maxExecutions: 50,
|
|
35
|
+
connectionReason: 'my-debug-session'
|
|
36
|
+
})
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Execution Control
|
|
40
|
+
|
|
41
|
+
When paused at a breakpoint:
|
|
42
|
+
|
|
43
|
+
```javascript
|
|
44
|
+
// Get call stack
|
|
45
|
+
inspect({ action: 'getCallStack', connectionReason: 'my-debug-session' })
|
|
46
|
+
|
|
47
|
+
// Get variables in current scope
|
|
48
|
+
inspect({ action: 'getVariables', callFrameId: '0', connectionReason: 'my-debug-session' })
|
|
49
|
+
|
|
50
|
+
// Filter variables by name pattern
|
|
51
|
+
inspect({ action: 'getVariables', callFrameId: '0', filter: 'user|config', connectionReason: 'my-debug-session' })
|
|
52
|
+
|
|
53
|
+
// Evaluate expression
|
|
54
|
+
inspect({ action: 'evaluateExpression', expression: 'user.email', connectionReason: 'my-debug-session' })
|
|
55
|
+
|
|
56
|
+
// Step over
|
|
57
|
+
execution({ action: 'stepOver', connectionReason: 'my-debug-session' })
|
|
58
|
+
|
|
59
|
+
// Step into
|
|
60
|
+
execution({ action: 'stepInto', connectionReason: 'my-debug-session' })
|
|
61
|
+
|
|
62
|
+
// Step out
|
|
63
|
+
execution({ action: 'stepOut', connectionReason: 'my-debug-session' })
|
|
64
|
+
|
|
65
|
+
// Resume
|
|
66
|
+
execution({ action: 'resume', connectionReason: 'my-debug-session' })
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Source Maps
|
|
70
|
+
|
|
71
|
+
TypeScript debugging works automatically:
|
|
72
|
+
|
|
73
|
+
1. Source maps are auto-detected and registered for lazy loading
|
|
74
|
+
2. Breakpoints map to original TypeScript files
|
|
75
|
+
3. Variable names match your source code
|
|
76
|
+
4. Call stacks show TypeScript file paths
|
|
77
|
+
|
|
78
|
+
**Lazy Loading**: Source maps are loaded on-demand when needed (e.g., when mapping positions), not eagerly at startup. This improves performance with large codebases.
|
|
79
|
+
|
|
80
|
+
**Size Limits**: To prevent performance issues:
|
|
81
|
+
- Inline source maps (data URIs): 1MB max
|
|
82
|
+
- File-based source maps: 10MB max
|
|
83
|
+
|
|
84
|
+
**Manual Loading**:
|
|
85
|
+
```javascript
|
|
86
|
+
// Register source maps from a directory (lazy - does not load immediately)
|
|
87
|
+
loadSourceMaps({ directory: './dist' })
|
|
88
|
+
|
|
89
|
+
// Source maps load automatically when you:
|
|
90
|
+
// - Set a breakpoint that needs mapping
|
|
91
|
+
// - Get original position from generated code
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Code Search
|
|
95
|
+
|
|
96
|
+
Search for patterns in loaded scripts:
|
|
97
|
+
|
|
98
|
+
```javascript
|
|
99
|
+
// Search for code patterns
|
|
100
|
+
inspect({
|
|
101
|
+
action: 'searchCode',
|
|
102
|
+
pattern: 'fetchUser',
|
|
103
|
+
urlFilter: 'localhost',
|
|
104
|
+
connectionReason: 'my-debug-session'
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
// Find function definitions
|
|
108
|
+
inspect({
|
|
109
|
+
action: 'searchFunctions',
|
|
110
|
+
functionName: 'handleSubmit',
|
|
111
|
+
connectionReason: 'my-debug-session'
|
|
112
|
+
})
|
|
113
|
+
|
|
114
|
+
// Get source code at specific lines
|
|
115
|
+
getSourceCode({
|
|
116
|
+
url: 'http://localhost:3000/app.js',
|
|
117
|
+
startLine: 40,
|
|
118
|
+
endLine: 60,
|
|
119
|
+
connectionReason: 'my-debug-session'
|
|
120
|
+
})
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Webpack Support**: When using webpack with eval-based source maps, code search automatically extracts the actual source code from webpack's eval wrappers.
|
|
124
|
+
|
|
125
|
+
## Node.js Debugging
|
|
126
|
+
|
|
127
|
+
Debug backend applications:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
# Start Node with debugging
|
|
131
|
+
node --inspect=9229 server.js
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
```javascript
|
|
135
|
+
// Connect to Node.js debugger
|
|
136
|
+
connectDebugger({ reference: 'backend debug', port: 9229 })
|
|
137
|
+
|
|
138
|
+
// Set breakpoints
|
|
139
|
+
breakpoint({
|
|
140
|
+
action: 'set',
|
|
141
|
+
url: 'file:///app/server.js',
|
|
142
|
+
lineNumber: 50,
|
|
143
|
+
connectionReason: 'backend-debug'
|
|
144
|
+
})
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Multi-Runtime Debugging
|
|
148
|
+
|
|
149
|
+
Debug Chrome and Node.js simultaneously:
|
|
150
|
+
|
|
151
|
+
**Chrome:**
|
|
152
|
+
```javascript
|
|
153
|
+
launchChrome({ reference: 'frontend debug' })
|
|
154
|
+
navigate({ action: 'goto', url: 'http://localhost:3000', connectionReason: 'frontend-debug' })
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Node.js (separate connection):**
|
|
158
|
+
```javascript
|
|
159
|
+
connectDebugger({ reference: 'backend debug', port: 9229 })
|
|
160
|
+
breakpoint({ action: 'set', url: 'file:///app/server.js', lineNumber: 50, connectionReason: 'backend-debug' })
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Logpoint Expressions
|
|
164
|
+
|
|
165
|
+
Logpoints support variable interpolation:
|
|
166
|
+
|
|
167
|
+
```javascript
|
|
168
|
+
// Simple variables
|
|
169
|
+
logMessage: 'User ID: {userId}'
|
|
170
|
+
|
|
171
|
+
// Object properties
|
|
172
|
+
logMessage: 'User: {user.email}, Role: {user.role}'
|
|
173
|
+
|
|
174
|
+
// Function calls
|
|
175
|
+
logMessage: 'Timestamp: {Date.now()}'
|
|
176
|
+
|
|
177
|
+
// Complex expressions
|
|
178
|
+
logMessage: 'Cart total: {cart.items.reduce((sum, item) => sum + item.price, 0)}'
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Variable Inspection Fallbacks
|
|
182
|
+
|
|
183
|
+
When debugging code with many variables or deeply nested objects, `getVariables` automatically degrades gracefully to fit within token limits:
|
|
184
|
+
|
|
185
|
+
1. **Full data** at requested depth (ideal case)
|
|
186
|
+
2. **Depth reduced** - automatically reduce expansion depth
|
|
187
|
+
3. **Names only** - variable names grouped by scope
|
|
188
|
+
4. **Counts only** - scope counts as last resort
|
|
189
|
+
|
|
190
|
+
To inspect specific variables at full depth, use `filter` or `evaluateExpression`:
|
|
191
|
+
|
|
192
|
+
```javascript
|
|
193
|
+
// Filter to specific variable
|
|
194
|
+
inspect({ action: 'getVariables', callFrameId: '0', filter: '^myVar$', connectionReason: 'my-debug-session' })
|
|
195
|
+
|
|
196
|
+
// Or evaluate directly
|
|
197
|
+
inspect({ action: 'evaluateExpression', expression: 'myVar', connectionReason: 'my-debug-session' })
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Bug Hunting Pattern
|
|
201
|
+
|
|
202
|
+
1. **Launch and navigate**
|
|
203
|
+
```javascript
|
|
204
|
+
launchChrome({ reference: 'bug hunt' })
|
|
205
|
+
navigate({ action: 'goto', url: 'http://localhost:3000/problematic-page', connectionReason: 'bug-hunt' })
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
2. **Monitor console errors**
|
|
209
|
+
```javascript
|
|
210
|
+
console({ action: 'list', type: 'error', connectionReason: 'bug-hunt' })
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
3. **Set breakpoints**
|
|
214
|
+
```javascript
|
|
215
|
+
breakpoint({
|
|
216
|
+
action: 'set',
|
|
217
|
+
url: 'http://localhost:3000/app.js',
|
|
218
|
+
lineNumber: 150,
|
|
219
|
+
connectionReason: 'bug-hunt'
|
|
220
|
+
})
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
4. **Trigger the bug and inspect**
|
|
224
|
+
```javascript
|
|
225
|
+
input({ action: 'click', selector: '#trigger-button', connectionReason: 'bug-hunt' })
|
|
226
|
+
// Pauses at breakpoint
|
|
227
|
+
inspect({ action: 'getCallStack', connectionReason: 'bug-hunt' })
|
|
228
|
+
inspect({ action: 'getVariables', callFrameId: '0', connectionReason: 'bug-hunt' })
|
|
229
|
+
```
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Installation
|
|
2
|
+
|
|
3
|
+
## Claude Code CLI
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
claude mcp add cdp-tools -- npx -y devharness
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Claude Desktop
|
|
10
|
+
|
|
11
|
+
Add to your config file:
|
|
12
|
+
|
|
13
|
+
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
14
|
+
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
15
|
+
**Linux**: `~/.config/Claude/claude_desktop_config.json`
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"mcpServers": {
|
|
20
|
+
"cdp-tools": {
|
|
21
|
+
"command": "npx",
|
|
22
|
+
"args": ["-y", "devharness"]
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Restart and ask Claude to debug your application.
|
|
29
|
+
|
|
30
|
+
## From Source
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
git clone https://github.com/InDate/devharness.git
|
|
34
|
+
cd devharness
|
|
35
|
+
npm install
|
|
36
|
+
npm run build
|
|
37
|
+
npm start
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Configuration
|
|
41
|
+
|
|
42
|
+
### Multi-Session Support
|
|
43
|
+
|
|
44
|
+
Each MCP server instance automatically uses a unique debugging port to prevent conflicts when running multiple LLM sessions simultaneously.
|
|
45
|
+
|
|
46
|
+
**Port Configuration:**
|
|
47
|
+
- **Auto-assigned**: Ports auto-assigned starting from 9222
|
|
48
|
+
- **Manual override**: Set `MCP_DEBUG_PORT` environment variable or configure in config file
|
|
49
|
+
- **Valid range**: 1024-65535
|
|
50
|
+
|
|
51
|
+
### Environment Variables
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Set specific debug port
|
|
55
|
+
export MCP_DEBUG_PORT=9223
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Config File
|
|
59
|
+
|
|
60
|
+
Create `.cdp-tools/config.json` to customize settings:
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"chrome": {
|
|
65
|
+
"defaultDebugPort": 9222
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The `defaultDebugPort` sets the starting port for Chrome debugging. If the port is in use, the next available port is used automatically.
|
|
71
|
+
|
|
72
|
+
### Idle Sessions
|
|
73
|
+
|
|
74
|
+
An editor window left open for days keeps its cdp-tools server alive, holding
|
|
75
|
+
Chrome instances, dev servers and monitor buffers nobody is using. Two things
|
|
76
|
+
stop that:
|
|
77
|
+
|
|
78
|
+
- **Idle suspend.** After two hours with no request from the client, the server
|
|
79
|
+
releases what it holds - connections, the Chrome instances it launched,
|
|
80
|
+
monitor buffers, and the dev servers it owns - and exits. The supervisor
|
|
81
|
+
stays connected, so the MCP connection itself survives: the next tool call
|
|
82
|
+
starts a fresh server. You will need to relaunch Chrome (`launchChrome`) and
|
|
83
|
+
restart dev servers (`server({ action: 'start', serverId: '...' })`); their
|
|
84
|
+
config is kept.
|
|
85
|
+
- **Shared dev servers are protected.** A dev server is only stopped when no
|
|
86
|
+
other live session claims it or is working in its directory, so a window that
|
|
87
|
+
goes idle never takes down a server another window is using. Ownership is
|
|
88
|
+
tracked in `.cdp-tools/server-claims/`, keyed by the supervisor process that
|
|
89
|
+
owns each session.
|
|
90
|
+
- **Abandoned dev servers are collected.** A window closed for good used to
|
|
91
|
+
leave its dev servers running until reboot. The next session in that
|
|
92
|
+
directory now stops any whose owning sessions are all gone.
|
|
93
|
+
- **Orphan reaping.** When the client that launched cdp-tools is gone, the
|
|
94
|
+
server tree shuts itself down, rather than waiting for a stdin EOF that never
|
|
95
|
+
arrives when an `npm exec` wrapper is holding the pipe open.
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"session": {
|
|
100
|
+
"idleSuspendMinutes": 120,
|
|
101
|
+
"clientPollSeconds": 60
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Set `idleSuspendMinutes` to `0` to never suspend. Both values can also be set
|
|
107
|
+
via `CDP_TOOLS_IDLE_SUSPEND_MINUTES` and `CDP_TOOLS_CLIENT_POLL_SECONDS`, which
|
|
108
|
+
take precedence over the config file. Unlike most settings these are read by the
|
|
109
|
+
supervisor at startup, so a change takes effect on the next reconnect rather
|
|
110
|
+
than hot-reloading.
|
|
111
|
+
|
|
112
|
+
### Debug Logging
|
|
113
|
+
|
|
114
|
+
Enable debug logging to track server operations:
|
|
115
|
+
|
|
116
|
+
```javascript
|
|
117
|
+
// Enable debug logging
|
|
118
|
+
setDebugLogging({ enabled: true })
|
|
119
|
+
|
|
120
|
+
// Check status
|
|
121
|
+
getDebugLoggingStatus()
|
|
122
|
+
// Logs written to: .cdp-tools/logs/debug.log
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Password Popup Prevention
|
|
126
|
+
|
|
127
|
+
Chrome is automatically configured to prevent password-related popups that can block automation:
|
|
128
|
+
|
|
129
|
+
- Password save prompts disabled
|
|
130
|
+
- Password leak detection disabled
|
|
131
|
+
- Mock keychain used on macOS
|
|
132
|
+
|
|
133
|
+
No configuration needed - this is enabled by default.
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# cdp-tools Debugger Usage
|
|
2
|
+
|
|
3
|
+
Chrome DevTools Protocol debugging for JavaScript/TypeScript in Chrome, Node.js, or CDP-compatible environments.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
**Web apps (most common):**
|
|
8
|
+
```
|
|
9
|
+
1. launchChrome({ reference: "your-descriptive-name" }) # Auto-connects, ready immediately
|
|
10
|
+
2. navigate({ action: 'goto', connectionReason: "your-descriptive-name", url: "..." })
|
|
11
|
+
# Navigation automatically caches interactive elements (links, buttons, inputs) for the page
|
|
12
|
+
3. content({ action: 'findInteractive', connectionReason: "your-descriptive-name" })
|
|
13
|
+
# Shows summary of all interactive elements. Use search/types to filter
|
|
14
|
+
4. content({ action: 'extractText', mode: 'outline' }) # Read page content (preferred over screenshot)
|
|
15
|
+
5. Use other tools as needed with connectionReason parameter
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**Alternative (rename later):**
|
|
19
|
+
```
|
|
20
|
+
1. launchChrome() # Uses default "unnamed-connection-default"
|
|
21
|
+
2. tab({ action: 'rename', reference: "unnamed-connection-default", newReference: "your-name" })
|
|
22
|
+
3. Use other tools with connectionReason: "your-name"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Node.js debugging:**
|
|
26
|
+
```
|
|
27
|
+
1. Start app: node --inspect=9229 app.js
|
|
28
|
+
2. connectDebugger({ reference: "my-app-debug", port: 9229 })
|
|
29
|
+
3. breakpoint({ action: 'set', connectionReason: "my-app-debug", ... })
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Basic Workflow
|
|
33
|
+
|
|
34
|
+
1. **Connect**:
|
|
35
|
+
- `launchChrome({ reference: "name" })` - Launches AND auto-connects (ready immediately, don't call connectDebugger)
|
|
36
|
+
- `connectDebugger({ reference: "name" })` - Only for existing Node.js/remote debuggers
|
|
37
|
+
2. **Navigate & interact**: Use connectionReason in all tool calls
|
|
38
|
+
- `navigate({ action: 'goto', connectionReason: "name", url: "..." })`
|
|
39
|
+
- `input({ action: 'click', connectionReason: "name", selector: "..." })`
|
|
40
|
+
3. **Debug**: `breakpoint({ action: 'set', connectionReason: "name", ... })`
|
|
41
|
+
4. **Inspect when paused**: `inspect({ action: 'getCallStack', ... })` → `inspect({ action: 'getVariables', ... })`
|
|
42
|
+
5. **Monitor**: `console({ action: 'list', connectionReason: "name" })`, `network({ action: 'list', connectionReason: "name" })`
|
|
43
|
+
|
|
44
|
+
## Key Practices
|
|
45
|
+
|
|
46
|
+
**Breakpoints:**
|
|
47
|
+
- Use conditional: `breakpoint({ action: 'set', condition: "userId === '123'" })`
|
|
48
|
+
- Prefer `breakpoint({ action: 'setLogpoint' })` for loops/high-frequency code
|
|
49
|
+
- Clean up with `breakpoint({ action: 'remove' })` or check `breakpoint({ action: 'list' })`
|
|
50
|
+
|
|
51
|
+
**DOM/Event/XHR Breakpoints (Chrome only):**
|
|
52
|
+
- `breakpoint({ action: 'setDOMBreakpoint' })`: Pause when element changes
|
|
53
|
+
- `subtree-modified`: Children added/removed
|
|
54
|
+
- `attribute-modified`: Attributes changed (class, style, etc.)
|
|
55
|
+
- `node-removed`: Element deleted from DOM
|
|
56
|
+
- `breakpoint({ action: 'setEventBreakpoint' })`: Pause when events fire (click, submit, input, keydown, etc.)
|
|
57
|
+
- `breakpoint({ action: 'setXHRBreakpoint' })`: Pause when XHR/Fetch URL contains pattern
|
|
58
|
+
- Example: `breakpoint({ action: 'setDOMBreakpoint', selector: '.todo-list', domBreakpointType: 'subtree-modified' })`
|
|
59
|
+
- Note: DOM breakpoints use nodeIds which are invalidated on page reload
|
|
60
|
+
|
|
61
|
+
**Code search:**
|
|
62
|
+
- `inspect({ action: 'searchCode' })`: Find patterns
|
|
63
|
+
- `inspect({ action: 'searchFunctions' })`: Locate definitions
|
|
64
|
+
- `getSourceCode`: View context
|
|
65
|
+
|
|
66
|
+
**Modal handling:**
|
|
67
|
+
- Use `handleModals: true` on `input({ action: 'click' | 'type' | 'hover' })`
|
|
68
|
+
- Strategies: `auto` (smart), `accept`, `reject`, `close`, `remove`
|
|
69
|
+
- Example: `input({ action: 'click', selector: '.btn', handleModals: true, dismissStrategy: 'auto' })`
|
|
70
|
+
- Limitation: English-only, no Shadow DOM/iframes
|
|
71
|
+
|
|
72
|
+
**Multiple connections:**
|
|
73
|
+
- `listConnections` → `switchConnection`
|
|
74
|
+
- Each connection = separate tab/process
|
|
75
|
+
|
|
76
|
+
## Common Patterns
|
|
77
|
+
|
|
78
|
+
**Bug debugging:**
|
|
79
|
+
1. `launchChrome` → `navigate({ action: 'goto' })`
|
|
80
|
+
2. `inspect({ action: 'searchCode' | 'searchFunctions' })`
|
|
81
|
+
3. `breakpoint({ action: 'set' | 'setLogpoint' })`
|
|
82
|
+
4. Trigger bug
|
|
83
|
+
5. `inspect({ action: 'getCallStack' })` + `inspect({ action: 'getVariables' })`
|
|
84
|
+
6. `inspect({ action: 'evaluateExpression' })`
|
|
85
|
+
|
|
86
|
+
**Performance:**
|
|
87
|
+
1. `network({ action: 'enable' })`
|
|
88
|
+
2. `navigate({ action: 'goto' })`
|
|
89
|
+
3. `network({ action: 'search' })` (find slow)
|
|
90
|
+
4. `network({ action: 'get' })` (timing)
|
|
91
|
+
5. `breakpoint({ action: 'setLogpoint' })` in slow paths
|
|
92
|
+
|
|
93
|
+
**Frontend state:**
|
|
94
|
+
1. `dom({ action: 'querySelector' })` + `dom({ action: 'getProperties' })`
|
|
95
|
+
2. `storage({ action: 'getLocalStorage' })` + `storage({ action: 'getCookies' })`
|
|
96
|
+
3. `inspect({ action: 'evaluateExpression' })`
|
|
97
|
+
4. `dom({ action: 'snapshot' })`
|
|
98
|
+
|
|
99
|
+
**UI verification:**
|
|
100
|
+
1. `content({ action: 'verify' })` - Run all default checks
|
|
101
|
+
2. Reports: dead buttons, small touch targets, overflow clipping, dead links, viewport issues
|
|
102
|
+
3. Filter checks: `checks: ['handlers', 'touch']` for specific issues
|
|
103
|
+
4. Available checks: `handlers`, `viewport`, `touch`, `overflow`, `clickability`, `links`, `scroll`
|
|
104
|
+
|
|
105
|
+
## Important Notes
|
|
106
|
+
|
|
107
|
+
- **After `launchChrome()`**: You are ALREADY connected. Do NOT call `connectDebugger()`. Use the `reference` parameter when launching, or rename later with `tab({ action: 'rename' })`
|
|
108
|
+
- **Interactive elements cache**: Navigation (goto, reload, back, forward) automatically caches all interactive elements. Cache expires after 5 minutes. `findInteractive` shows a summary by default; use `search` or `types` parameters to filter elements
|
|
109
|
+
- **Logpoint limits**: Default 20 executions. Use `breakpoint({ action: 'resetCounter' })` or adjust `maxExecutions`
|
|
110
|
+
- **Expression failures**: Wrapped in try-catch, shows `[Error: message]`. Search: `console({ action: 'search', pattern: "Logpoint Error" })`
|
|
111
|
+
- **CDP line mapping**: May map to nearest valid line. Use `breakpoint({ action: 'validate' })` first
|
|
112
|
+
- **Source maps**: Auto-handled. Use `loadSourceMaps` for manual
|
|
113
|
+
- **File paths**: Full URLs (`http://localhost:3000/app.js`) or `file://`
|
|
114
|
+
- **Network monitoring**: Must enable with `network({ action: 'enable' })`
|
|
115
|
+
- **Working an issue**: `comment` on it as you go - once when you start (what you're about to change and why) and once when you finish (what you actually changed, files touched, tests added, and anything that contradicts the issue as written). The issue is the durable record; someone reviewing later reads the timeline, not your diff
|
|
116
|
+
- **Closing an issue**: `issues({ action: 'resolve' })` waits on a browser overlay only a human can click - don't call it unattended, use `issues({ action: 'comment' })` to record findings instead
|
|
117
|
+
|
|
118
|
+
## Recovering from a failed tool call
|
|
119
|
+
|
|
120
|
+
- **Missing/invalid parameters**: the error includes a `continuationToken` and `missingParameters` (name/type/description/enum). Retry with just `{ continuationToken, <missing/bad field(s)> }` - don't resend everything. Expires after 5 min.
|
|
121
|
+
- **A validated call gets blocked by a guard** (port failure, dead server, breakpoint pause): the response footer shows `**Repeat:** replay({ action: 'repeat', indices: [N] })`. Acknowledge the guard (e.g. `server({ action: 'acknowledgePort' })`), then use that hint to resume the exact call. Don't reuse a `continuationToken` here - that's for fixing bad input, not for retrying an already-valid call.
|
|
122
|
+
|
|
123
|
+
## Restarting cdp-tools
|
|
124
|
+
|
|
125
|
+
If cdp-tools itself seems stuck or broken (not the target app), restart it yourself rather than asking the user to reconnect: `config({ action: 'restart' })`. Falls back to `kill -USR2 $(cat .cdp-tools/mcp-supervisor.pid)` via Bash if that action reports `CONFIG_RESTART_NOT_SUPERVISED` (e.g. a bare `node build/index.js`, not through the supervisor). Editing devharness's own source and running `npm run build` triggers the same restart automatically via its postbuild hook - `config({ action: 'status' })` reports which build is actually answering (entry file, its timestamp, server and supervisor pids), so a rebuild that signalled the wrong supervisor is visible rather than silent. Either way, this kills any Chrome instances it launched (relaunch with `launchChrome`) but managed dev servers (`server` tool) survive and reattach automatically.
|
|
126
|
+
|
|
127
|
+
## Tool Categories
|
|
128
|
+
|
|
129
|
+
Most tools are **grouped**: one tool name plus an `action` param, e.g.
|
|
130
|
+
`navigate({ action: 'goto', url })`, not a separate `navigateTo` tool. The
|
|
131
|
+
actions below are the complete enums accepted by each tool.
|
|
132
|
+
|
|
133
|
+
Nearly every tool also takes `connectionReason` to pick which connection it
|
|
134
|
+
runs against (see Quick Start).
|
|
135
|
+
|
|
136
|
+
**Connection**: `launchChrome`, `killChrome`, `resetChromeLauncher`, `getChromeStatus`, `connectDebugger`, `disconnectDebugger`, `getDebuggerStatus`, `listConnections`, `switchConnection`
|
|
137
|
+
- These are individual tools, not actions
|
|
138
|
+
- `launchChrome` also connects - don't follow it with `connectDebugger`
|
|
139
|
+
- `launchChrome({ profile: 'device-a' })` uses a **named persistent profile**: a stable user-data-dir under `~/.cdp-tools/profiles` (override per project with `chrome.persistentProfileRoot`) that survives across runs, so logins, cookies and IndexedDB persist. Naming it is what makes it persistent - there is no separate flag. It does not pin a port. Only one live Chrome may hold a profile at a time. Unnamed launches stay throwaway and are deleted on exit
|
|
140
|
+
- `launchChrome({ port, forceNewInstance: true })` honours that exact port and errors if it is already taken, rather than quietly moving to another one
|
|
141
|
+
|
|
142
|
+
**Tab**: `tab` (actions: list, create, rename, switch, close)
|
|
143
|
+
|
|
144
|
+
**Breakpoint**: `breakpoint` (actions: set, remove, list, setLogpoint, validate, resetCounter, waitForScript, setDOMBreakpoint, setEventBreakpoint, setXHRBreakpoint, await)
|
|
145
|
+
- `waitForScript`: block until a script URL loads, so you can breakpoint code that isn't parsed yet
|
|
146
|
+
- `await`: wait for a breakpoint to be hit rather than polling
|
|
147
|
+
- `setLogpoint`: non-pausing logging with `{expr}` interpolation, `maxExecutions` to cap noise
|
|
148
|
+
|
|
149
|
+
**Execution**: `execution` (actions: pause, resume, stepOver, stepInto, stepOut, acknowledge)
|
|
150
|
+
|
|
151
|
+
**Inspection**: `inspect` (actions: getCallStack, getVariables, evaluateExpression, searchCode, searchFunctions)
|
|
152
|
+
- `evaluateExpression` awaits a returned Promise by default (async IIFEs resolve to their settled value; a rejection is reported as the expression's own error). Pass `awaitPromise: false` to inspect the Promise object itself. While paused at a breakpoint only already-settled promises can be resolved - a pending one fails fast because the event loop is stopped
|
|
153
|
+
|
|
154
|
+
**Source**: `getSourceCode`, `loadSourceMaps`
|
|
155
|
+
- Individual tools, not actions
|
|
156
|
+
|
|
157
|
+
**Console**: `console` (actions: list, get, recent, search, clear, setObjectDepth)
|
|
158
|
+
|
|
159
|
+
**Network**: `network` (actions: list, get, search, enable, disable, setConditions)
|
|
160
|
+
|
|
161
|
+
**Page**: `navigate` (actions: goto, reload, back, forward, info)
|
|
162
|
+
|
|
163
|
+
**DOM**: `dom` (actions: querySelector, getProperties, snapshot)
|
|
164
|
+
|
|
165
|
+
**Content**: `content` (actions: extractText, findInteractive, verify, parse)
|
|
166
|
+
|
|
167
|
+
**Screenshot**: `screenshot` (actions: fullPage, viewport, element, pdf)
|
|
168
|
+
|
|
169
|
+
**Input**: `input` (actions: click, type, press, hover, focus, focusNext, focusPrevious, drag, scroll, mousemove, pinch, tap, swipe)
|
|
170
|
+
- `tap` / `swipe`: real touch events via `Input.dispatchTouchEvent`. Mouse actions never produce touchstart/touchmove, so a component listening only for touch cannot be driven by `click` or `drag`. `tap` takes a selector or x/y; `swipe` takes `from`/`to` and `steps` (default 10) and emits touchstart, N touchmove, touchend
|
|
171
|
+
|
|
172
|
+
**Modal**: `detectModals`, `dismissModal`
|
|
173
|
+
- Individual tools, not actions
|
|
174
|
+
|
|
175
|
+
**Storage**: `storage` (actions: getCookies, setCookie, getLocalStorage, setLocalStorage, removeLocalStorage, getSessionStorage, setSessionStorage, removeSessionStorage, idbListDatabases, idbListStores, idbGet, idbGetAll, idbPut, idbDelete, clear)
|
|
176
|
+
- IndexedDB reads return typed descriptors for values JSON can't express - `{__type:'CryptoKey', algorithm, extractable, usages}` and analogues for Blob/ArrayBuffer/Map/Set/Date - so a non-extractable key is still observable. `idbPut` accepts JSON-expressible values only
|
|
177
|
+
- A read never creates a database: `idbGet` on an unknown name errors rather than silently creating it
|
|
178
|
+
- `clear` defaults to cookies + localStorage + sessionStorage. `indexedDB` is opt-in via `types` - dropping whole databases is far less recoverable
|
|
179
|
+
|
|
180
|
+
**HTTP / assertions**: `request`, `assert`, `saveToDisk`
|
|
181
|
+
- `request`: HTTP request as a sequence step. `destination: 'node'` sends it from the MCP server process (no browser, no CORS/cookies); `destination: 'browser'` runs `fetch()` in a connected tab (that page's cookies/session/origin). `saveAs` captures the response for later steps
|
|
182
|
+
- `assert`: assert a condition as a sequence step, failing the sequence if false - use `{{var:name.path}}` templates against values captured by a prior `saveAs`
|
|
183
|
+
- **Capturing values with `saveAs`**: supported on `request` and on `inspect({ action: 'evaluateExpression' })`. They store different shapes - `request` stores the whole response object (so `{{var:login.body.token}}`), `inspect` stores the evaluated value itself (so `{{var:pairingUrl}}` is the string). A `saveAs` that cannot be honoured now fails the step rather than silently capturing nothing. Async expressions work: a returned Promise is awaited and the settled value is captured exactly (JSON-serializable values are captured by value, not from display text)
|
|
184
|
+
|
|
185
|
+
**Wait**: `wait` (exactly one of: selector, selectorGone, expression, ms)
|
|
186
|
+
- The primitive for "the previous step kicked off async work": `wait({ selector })` until an element appears (extended `:has-text()` selectors supported), `wait({ selectorGone })` until it disappears, `wait({ expression })` until a synchronous JS predicate evaluates truthy, `wait({ ms })` fixed sleep (last resort)
|
|
187
|
+
- Condition forms poll from the MCP side, so they survive a navigation mid-wait and never depend on in-page timers or promises resolving. Default timeout 15s (`timeoutMs`, `pollIntervalMs` tunable); on timeout the step fails cleanly (stopping a sequence) instead of hanging
|
|
188
|
+
- For async in-page work, kick it off in one step (store its result in a global), then `wait({ expression: 'window.__result !== undefined' })`
|
|
189
|
+
|
|
190
|
+
**Issues**: `issues` (actions: list, create, workOn, resolve, acknowledge, comment)
|
|
191
|
+
- `create`/`comment`: track bugs and features as Markdown issues, optionally linked to a replay sequence
|
|
192
|
+
- `workOn`: start on an issue, auto-replaying its linked sequence
|
|
193
|
+
- `resolve` is **human-gated**: it opens a browser overlay and only a person clicking Fixed/Not Fixed can close the issue. Don't call it unattended - it will wait ~150s and then fail with `ISSUES_RESOLVE_TIMEOUT`. Record what you found with `comment` and ask the user to run `resolve` themselves
|
|
194
|
+
- `acknowledge`: acknowledge pending bugs to unblock other tools
|
|
195
|
+
|
|
196
|
+
**Server**: `server` (actions: start, stop, restart, list, logs, stopAll, setAutoRun, clearLogs, remove, monitorPort, unmonitorPort, listMonitored, acknowledgePort, acknowledgeStartup, extendStartup, cancelPendingRestart)
|
|
197
|
+
- Use `global: true` to access servers started from a different working directory
|
|
198
|
+
- `start({ watch: true, watchPaths?: [...] })`: cdp-tools watches the given paths (default: cwd) and auto-restarts the server on file changes, instead of relying on `--watch`/nodemon. Pause-aware: if a breakpoint debugger is paused on that server's inspector port, the restart queues instead of firing immediately - `cancelPendingRestart` discards a queued restart to keep debugging without it firing on resume
|
|
199
|
+
|
|
200
|
+
**Replay**: `replay` (actions: history, create, list, get, delete, export, load, listSaved, deleteSaved, run, runAll, step, finish, insert, addConditional, status, cancel, repeat, runFromLog, recordInteraction)
|
|
201
|
+
- `recordInteraction`: record mouse, keyboard, and navigation events with a visual overlay
|
|
202
|
+
- `runAll`: run every sequence in a folder and report one line each - `replay({ action: 'runAll', folder: 'spine', connectionReason: 'my-app' })`. Sequences may live in SUBFOLDERS of the sequences dir (`spine/`, `story/`, `_helpers/`); filenames are relative to that root (`spine/spine-01.json`) and `load` still accepts the bare basename. The whole tree is LOADED before anything runs, so a sequence in one folder can still reference a helper in another by name (a conditional's `then`, a forEach's `do`) - those resolve by sequence name, not by path. Folders whose name starts with `_` are loaded but never run by a bare `runAll`, which is where preamble guards and forEach bodies belong; naming such a folder explicitly runs it anyway. A failure is recorded and the suite continues (`continueOnFailure`, default true). Scoped to one root: the project sequences dir, or the global one with `global: true`. Accepts `baseUrl`, so one call runs a suite against any deployment
|
|
203
|
+
- `addConditional`: add a guarded branch step - `replay({ action: 'addConditional', name: 'flow', condition: '{{selector:.cookie-banner}}', thenSequence: 'dismiss-banner', insertAfterStep: 2 })`. `conditional` is virtual, never recorded, so this is its only authoring route. Syntax and branch target are validated up front; a sequence already on disk is rewritten in place
|
|
204
|
+
- `forEach`: a second virtual step - enumerate a source and run a sequence per item: `{ tool: 'forEach', params: { in: '{{var:shares}}', as: 'share', do: 'revoke-one-share', where: 'item.name !== "Employees"', maxItems: 50 } }`. `in` is either an array a prior `saveAs` captured or `{{selectorAll:CSS}}`; `where` is JavaScript with `item`/`index` in scope, not the condition grammar. Conditions probe one named thing, so this is what expresses "for everything that is there". An empty source is a success and the count is reported
|
|
205
|
+
- `teardown`: an optional command array beside a sequence's `commands`, run when the main steps reach a terminal state - success, a failed step, an abort, or the total timeout - but not when the run pauses. It has its own timeout budget and does not receive the run's abort signal, so a cancelled or timed-out run still cleans up; it shares the variable store, so it can revoke what setup minted. A failing teardown step never changes the run's verdict. Best-effort: a killed server takes pending teardown with it
|
|
206
|
+
- `export`: export a sequence to file - `format: sequence | playwright | puppeteer`
|
|
207
|
+
- `repeat`: instantly re-execute commands by history index - `replay({ action: 'repeat', indices: [0, 1, 2] })`. Each tool response shows its history index in the "Repeat" hint
|
|
208
|
+
- `run`: does not block - returns a `runId` immediately and executes in the background; poll `status({ runId })` for progress and the final result (kept 30 min in memory), `cancel({ runId })` interrupts the step in flight where the tool allows it (`wait` and `request` are genuinely cancelled, `navigate`/`inspect`/`content` stop waiting, `input` stops dispatching further events, the rest stop at the next step boundary - table in `docs/replay.md`). `wait: true` blocks for the full result (pre-0.7 behaviour). `startUrl` overrides the stored start URL for one run; `baseUrl` retargets every absolute URL at another deployment's origin
|
|
209
|
+
- Use `global: true` with `export` to save to ~/.cdp-tools/sequences/ instead of the working directory
|
|
210
|
+
|
|
211
|
+
**Dashboard**: `dashboard` (actions: open, status, stop)
|
|
212
|
+
|
|
213
|
+
**Debug logging**: `setDebugLogging`, `getDebugLoggingStatus`
|
|
214
|
+
|
|
215
|
+
**Config**: `config` (actions: status, useLocal, useGlobal, reset, backup, cloneFromGlobal, show, listTools, reload, restart, listProfiles, resetProfile)
|
|
216
|
+
- `status`: Show where config is loaded from (local vs global)
|
|
217
|
+
- `useLocal`: Switch to project-local config (.cdp-tools/config.json)
|
|
218
|
+
- `useGlobal`: Switch to global config (~/.cdp-tools/config.json)
|
|
219
|
+
- `reset`: Reset config to defaults
|
|
220
|
+
- `backup`: Create timestamped backup
|
|
221
|
+
- `cloneFromGlobal`: Copy global config to local project
|
|
222
|
+
- `show`: Display current configuration
|
|
223
|
+
- `listTools`: List all toggleable tools with status and dependency conflicts
|
|
224
|
+
- `reload`: Re-read config.json now (also happens automatically on file edits, ~250ms debounce). Doesn't apply `tools.enabled`/`tools.disabled` - those need `restart`
|
|
225
|
+
- `restart`: Restart cdp-tools itself via the mcp-supervisor (see "Restarting cdp-tools" above) - use when the server seems stuck/broken, or to apply `tools.enabled`/`tools.disabled` changes
|
|
226
|
+
- `listProfiles`: List named persistent Chrome profiles and the root they live under
|
|
227
|
+
- `resetProfile`: Wipe and recreate a named profile (`config({ action: 'resetProfile', profile: 'device-a' })`). Refused while a live Chrome holds that profile - nothing is deleted in that case
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# cdp-tools MCP Server
|
|
2
|
+
|
|
3
|
+
Chrome DevTools Protocol debugging for JavaScript/TypeScript in Chrome, Node.js, or CDP-compatible environments - breakpoints, variable inspection, browser automation, dev server management, and record/replay verification.
|
|
4
|
+
|
|
5
|
+
**Quick start (web apps):**
|
|
6
|
+
1. `launchChrome({ reference: "name" })` - launches AND auto-connects, ready immediately (do not call `connectDebugger` after this)
|
|
7
|
+
2. `navigate({ action: 'goto', connectionReason: "name", url: "..." })` - also caches interactive elements for the page
|
|
8
|
+
3. `content({ action: 'findInteractive' })` / `content({ action: 'extractText', mode: 'outline' })` to read the page
|
|
9
|
+
4. Use other tools with `connectionReason: "name"`
|
|
10
|
+
|
|
11
|
+
**Node.js:** start with `node --inspect=9229 app.js`, then `connectDebugger({ reference: "name", port: 9229 })`.
|
|
12
|
+
|
|
13
|
+
For full workflow guidance, key practices, common debugging/performance/replay patterns, and the complete tool catalog: this package ships an Agent Skills-compatible skill at `skills/cdp-tools/SKILL.md`. Clients that support Agent Skills (agentskills.io) will auto-discover it once it's placed in a scanned skills directory (e.g. `.claude/skills/` or `.agents/skills/`) and load it only when a debugging task is actually underway. If your client doesn't support Agent Skills, see `docs/instructions.md` for the same material inline, or rely on each tool's own description.
|
|
14
|
+
|
|
15
|
+
If cdp-tools itself seems stuck or broken (not the target app), restart it yourself: `config({ action: 'restart' })` (falls back to `kill -USR2 $(cat .cdp-tools/mcp-supervisor.pid)` if that's unavailable). This kills any Chrome instances it launched (relaunch with `launchChrome`); managed dev servers (`server` tool) survive and reattach automatically.
|