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,255 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Page Navigation Tools
|
|
3
|
+
*/
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { executeWithPauseDetection } from '../debugger-aware-wrapper.js';
|
|
6
|
+
import { checkBrowserAutomation } from '../error-helpers.js';
|
|
7
|
+
import { createTool } from '../validation-helpers.js';
|
|
8
|
+
import { createSuccessResponse, createErrorResponse } from '../messages.js';
|
|
9
|
+
import { autoLaunchChrome } from './replay-executor.js';
|
|
10
|
+
import { collectInteractiveElements } from '../element-collector.js';
|
|
11
|
+
import { raceAbort, throwIfAborted } from '../utils/abort.js';
|
|
12
|
+
// =============================================================================
|
|
13
|
+
// Helper Functions
|
|
14
|
+
// =============================================================================
|
|
15
|
+
/**
|
|
16
|
+
* Gather page context including console errors and failed network requests
|
|
17
|
+
*/
|
|
18
|
+
export async function gatherPageContext(page, consoleMonitor, networkMonitor, clickableCache) {
|
|
19
|
+
const url = page.url();
|
|
20
|
+
const title = await page.title();
|
|
21
|
+
// Get clickable elements stats
|
|
22
|
+
const result = await collectInteractiveElements(page);
|
|
23
|
+
clickableCache.set(url, result.elements, result.viewportHeight, result.viewportWidth);
|
|
24
|
+
const inViewportCount = result.elements.filter((el) => el.inViewport).length;
|
|
25
|
+
// Get console stats
|
|
26
|
+
const consoleErrors = consoleMonitor.getCount('error');
|
|
27
|
+
const consoleWarnings = consoleMonitor.getCount('warning');
|
|
28
|
+
const consoleTotal = consoleMonitor.getCount();
|
|
29
|
+
// Get network stats
|
|
30
|
+
const allRequests = networkMonitor.getRequests();
|
|
31
|
+
const failedRequests = allRequests.filter(r => r.failed || (r.response && r.response.status >= 400)).length;
|
|
32
|
+
return {
|
|
33
|
+
url,
|
|
34
|
+
title,
|
|
35
|
+
clickableElements: {
|
|
36
|
+
total: result.elements.length,
|
|
37
|
+
inViewport: inViewportCount,
|
|
38
|
+
},
|
|
39
|
+
console: {
|
|
40
|
+
errors: consoleErrors,
|
|
41
|
+
warnings: consoleWarnings,
|
|
42
|
+
total: consoleTotal,
|
|
43
|
+
},
|
|
44
|
+
network: {
|
|
45
|
+
failed: failedRequests,
|
|
46
|
+
total: allRequests.length,
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Format page context for response
|
|
52
|
+
*/
|
|
53
|
+
export function formatPageContextForResponse(context) {
|
|
54
|
+
const response = {
|
|
55
|
+
url: context.url,
|
|
56
|
+
title: context.title,
|
|
57
|
+
clickableElements: {
|
|
58
|
+
total: context.clickableElements.total,
|
|
59
|
+
inViewport: context.clickableElements.inViewport,
|
|
60
|
+
hint: 'Use content({ action: "findInteractive" }) to explore interactive elements',
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
// Add console status if there are errors or warnings
|
|
64
|
+
if (context.console.errors > 0 || context.console.warnings > 0) {
|
|
65
|
+
response.console = {
|
|
66
|
+
errors: context.console.errors,
|
|
67
|
+
warnings: context.console.warnings,
|
|
68
|
+
hint: context.console.errors > 0
|
|
69
|
+
? 'Use console({ action: "list", type: "error" }) to view errors'
|
|
70
|
+
: undefined,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
// Add network status if there are failed requests
|
|
74
|
+
if (context.network.failed > 0) {
|
|
75
|
+
response.network = {
|
|
76
|
+
failed: context.network.failed,
|
|
77
|
+
total: context.network.total,
|
|
78
|
+
hint: 'Use network({ action: "search", statusCode: "4" }) to view failed requests',
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
return response;
|
|
82
|
+
}
|
|
83
|
+
// Consolidated schema for page navigation tools
|
|
84
|
+
const navigateSchema = z.object({
|
|
85
|
+
action: z.enum(['goto', 'reload', 'back', 'forward', 'info']).describe('Page navigation action: goto (navigate to URL), reload (reload page), back (go back), forward (go forward), info (get page info)'),
|
|
86
|
+
connectionReason: z.string().describe('Connection reference (use the reference from launchChrome output, e.g., "unnamed-connection-default" or your renamed tab)'),
|
|
87
|
+
// Parameters for goto action
|
|
88
|
+
url: z.string().optional().describe('URL to navigate to (required for goto action)'),
|
|
89
|
+
waitUntil: z.enum(['load', 'domcontentloaded', 'networkidle0', 'networkidle2']).optional().describe('When to consider navigation complete (for goto and reload actions, default: load)'),
|
|
90
|
+
// Parameters for reload action
|
|
91
|
+
ignoreCache: z.boolean().optional().describe('Clear browser cache before reloading (for reload action, default: false)'),
|
|
92
|
+
timeout: z.number().optional().describe('Maximum time to wait for reload in ms (for reload action, default: 30000ms)'),
|
|
93
|
+
}).strict();
|
|
94
|
+
export function createPageTools(puppeteerManager, cdpManager, consoleMonitor, networkMonitor, connectionManager, resolveConnectionFromReason, clickableCache, executeToolCall) {
|
|
95
|
+
/**
|
|
96
|
+
* Auto-restart console and network monitoring after navigation
|
|
97
|
+
*/
|
|
98
|
+
const restartMonitoring = (page, monitor, netMonitor) => {
|
|
99
|
+
if (monitor.isActive()) {
|
|
100
|
+
monitor.startMonitoring(page);
|
|
101
|
+
}
|
|
102
|
+
if (netMonitor.isActive()) {
|
|
103
|
+
netMonitor.startMonitoring(page);
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
return {
|
|
107
|
+
navigate: createTool('Navigate and control browser pages. Actions: goto (navigate to URL), reload (reload page), back (navigate back), forward (navigate forward), info (get page information)', navigateSchema,
|
|
108
|
+
// abortSignal (#110): a cancelled navigation STOPS WAITING only (D4).
|
|
109
|
+
// We deliberately do NOT call Page.stopLoading - a half-loaded page
|
|
110
|
+
// that later steps act on is worse than a fully loaded one - so on
|
|
111
|
+
// abort the handler throws promptly while the page keeps loading in
|
|
112
|
+
// the background.
|
|
113
|
+
async (args, abortSignal) => {
|
|
114
|
+
const { action, connectionReason } = args;
|
|
115
|
+
throwIfAborted(abortSignal);
|
|
116
|
+
// Validate required parameters for each action
|
|
117
|
+
if (action === 'goto' && !args.url) {
|
|
118
|
+
return createErrorResponse('MISSING_PARAMETER', {
|
|
119
|
+
action: 'goto',
|
|
120
|
+
missing: 'url',
|
|
121
|
+
message: 'The "goto" action requires a "url" parameter'
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
// Resolve connection from reason
|
|
125
|
+
let resolved = await resolveConnectionFromReason(connectionReason);
|
|
126
|
+
// Auto-launch Chrome for 'goto' action if no connection found
|
|
127
|
+
if (!resolved && action === 'goto' && executeToolCall) {
|
|
128
|
+
const launchResult = await autoLaunchChrome(executeToolCall, connectionReason, 'navigate.goto');
|
|
129
|
+
if (!launchResult.success) {
|
|
130
|
+
return createErrorResponse(launchResult.errorType, {
|
|
131
|
+
reference: connectionReason,
|
|
132
|
+
error: launchResult.error
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
// Try resolving again after launch
|
|
136
|
+
resolved = await resolveConnectionFromReason(connectionReason);
|
|
137
|
+
}
|
|
138
|
+
if (!resolved) {
|
|
139
|
+
return createErrorResponse('CONNECTION_NOT_FOUND', {
|
|
140
|
+
message: 'No Chrome browser available. Use `launchChrome` first to start a browser.'
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
const targetPuppeteerManager = resolved.puppeteerManager || puppeteerManager;
|
|
144
|
+
const targetCdpManager = resolved.cdpManager;
|
|
145
|
+
const targetConsoleMonitor = resolved.consoleMonitor || consoleMonitor;
|
|
146
|
+
const targetNetworkMonitor = resolved.networkMonitor || networkMonitor;
|
|
147
|
+
const error = checkBrowserAutomation(targetCdpManager, targetPuppeteerManager, `navigate.${action}`, resolved.connection.port);
|
|
148
|
+
if (error) {
|
|
149
|
+
return error;
|
|
150
|
+
}
|
|
151
|
+
const page = targetPuppeteerManager.getPage();
|
|
152
|
+
// Resolving the connection can itself launch Chrome (seconds) - don't
|
|
153
|
+
// start navigating if the user cancelled while that happened.
|
|
154
|
+
throwIfAborted(abortSignal);
|
|
155
|
+
// Handle each action
|
|
156
|
+
switch (action) {
|
|
157
|
+
case 'goto': {
|
|
158
|
+
const result = await executeWithPauseDetection(targetCdpManager, async () => {
|
|
159
|
+
// raceAbort = stop waiting on cancel; the navigation itself
|
|
160
|
+
// continues in the browser (no Page.stopLoading - see above).
|
|
161
|
+
await raceAbort(page.goto(args.url, { waitUntil: args.waitUntil ?? 'load' }), abortSignal);
|
|
162
|
+
// Auto-restart monitoring after navigation
|
|
163
|
+
restartMonitoring(page, targetConsoleMonitor, targetNetworkMonitor);
|
|
164
|
+
// Gather full page context
|
|
165
|
+
return gatherPageContext(page, targetConsoleMonitor, targetNetworkMonitor, clickableCache);
|
|
166
|
+
}, 'navigateTo');
|
|
167
|
+
if (!result.result) {
|
|
168
|
+
return createSuccessResponse('PAGE_NAVIGATE_SUCCESS', { url: args.url });
|
|
169
|
+
}
|
|
170
|
+
return createSuccessResponse('PAGE_NAVIGATE_SUCCESS', formatPageContextForResponse(result.result));
|
|
171
|
+
}
|
|
172
|
+
case 'reload': {
|
|
173
|
+
const result = await executeWithPauseDetection(targetCdpManager, async () => {
|
|
174
|
+
// Clear cache before reload if requested
|
|
175
|
+
if (args.ignoreCache) {
|
|
176
|
+
const client = await page.createCDPSession();
|
|
177
|
+
await client.send('Network.clearBrowserCache');
|
|
178
|
+
}
|
|
179
|
+
// Reload with specified waitUntil condition and timeout
|
|
180
|
+
// (raceAbort: cancel stops waiting; the reload continues)
|
|
181
|
+
await raceAbort(page.reload({
|
|
182
|
+
waitUntil: args.waitUntil ?? 'load',
|
|
183
|
+
timeout: args.timeout ?? 30000
|
|
184
|
+
}), abortSignal);
|
|
185
|
+
// Auto-restart monitoring after reload
|
|
186
|
+
restartMonitoring(page, targetConsoleMonitor, targetNetworkMonitor);
|
|
187
|
+
// Gather full page context
|
|
188
|
+
return gatherPageContext(page, targetConsoleMonitor, targetNetworkMonitor, clickableCache);
|
|
189
|
+
}, 'reloadPage');
|
|
190
|
+
if (!result.result) {
|
|
191
|
+
return createSuccessResponse('PAGE_RELOAD_SUCCESS');
|
|
192
|
+
}
|
|
193
|
+
return createSuccessResponse('PAGE_RELOAD_SUCCESS', formatPageContextForResponse(result.result));
|
|
194
|
+
}
|
|
195
|
+
case 'back': {
|
|
196
|
+
const result = await executeWithPauseDetection(targetCdpManager, async () => {
|
|
197
|
+
await raceAbort(page.goBack({ waitUntil: 'load' }), abortSignal);
|
|
198
|
+
// Auto-restart monitoring after navigation
|
|
199
|
+
restartMonitoring(page, targetConsoleMonitor, targetNetworkMonitor);
|
|
200
|
+
// Gather full page context
|
|
201
|
+
return gatherPageContext(page, targetConsoleMonitor, targetNetworkMonitor, clickableCache);
|
|
202
|
+
}, 'goBack');
|
|
203
|
+
if (!result.result) {
|
|
204
|
+
return createSuccessResponse('PAGE_GO_BACK_SUCCESS');
|
|
205
|
+
}
|
|
206
|
+
return createSuccessResponse('PAGE_GO_BACK_SUCCESS', formatPageContextForResponse(result.result));
|
|
207
|
+
}
|
|
208
|
+
case 'forward': {
|
|
209
|
+
const result = await executeWithPauseDetection(targetCdpManager, async () => {
|
|
210
|
+
await raceAbort(page.goForward({ waitUntil: 'load' }), abortSignal);
|
|
211
|
+
// Auto-restart monitoring after navigation
|
|
212
|
+
restartMonitoring(page, targetConsoleMonitor, targetNetworkMonitor);
|
|
213
|
+
// Gather full page context
|
|
214
|
+
return gatherPageContext(page, targetConsoleMonitor, targetNetworkMonitor, clickableCache);
|
|
215
|
+
}, 'goForward');
|
|
216
|
+
if (!result.result) {
|
|
217
|
+
return createSuccessResponse('PAGE_GO_FORWARD_SUCCESS');
|
|
218
|
+
}
|
|
219
|
+
return createSuccessResponse('PAGE_GO_FORWARD_SUCCESS', formatPageContextForResponse(result.result));
|
|
220
|
+
}
|
|
221
|
+
case 'info': {
|
|
222
|
+
const result = await executeWithPauseDetection(targetCdpManager, async () => {
|
|
223
|
+
const url = page.url();
|
|
224
|
+
const title = await page.title();
|
|
225
|
+
const viewport = page.viewport();
|
|
226
|
+
return { url, title, viewport };
|
|
227
|
+
}, 'getPageInfo');
|
|
228
|
+
if (!result.result) {
|
|
229
|
+
return createErrorResponse('PAGE_NOT_LOADED', { toolName: 'navigate.info' });
|
|
230
|
+
}
|
|
231
|
+
const pageInfo = result.result;
|
|
232
|
+
const response = createSuccessResponse('PAGE_INFO_SUCCESS', {
|
|
233
|
+
url: pageInfo.url,
|
|
234
|
+
title: pageInfo.title
|
|
235
|
+
});
|
|
236
|
+
// Add structured metadata for programmatic use
|
|
237
|
+
response._meta = {
|
|
238
|
+
tool: 'navigate',
|
|
239
|
+
action: 'info',
|
|
240
|
+
timestamp: Date.now(),
|
|
241
|
+
navigate: {
|
|
242
|
+
url: pageInfo.url,
|
|
243
|
+
title: pageInfo.title,
|
|
244
|
+
action: 'info',
|
|
245
|
+
},
|
|
246
|
+
};
|
|
247
|
+
return response;
|
|
248
|
+
}
|
|
249
|
+
default:
|
|
250
|
+
return createErrorResponse('INVALID_ACTION', { action });
|
|
251
|
+
}
|
|
252
|
+
}),
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
//# sourceMappingURL=page-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-tools.js","sourceRoot":"","sources":["../../src/tools/page-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,EAAE,yBAAyB,EAAsB,MAAM,8BAA8B,CAAC;AAC7F,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAmB,MAAM,gBAAgB,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAGrE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAwB9D,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAEhF;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,IAAS,EACT,cAA8B,EAC9B,cAA8B,EAC9B,cAA8B;IAE9B,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACvB,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;IAEjC,+BAA+B;IAC/B,MAAM,MAAM,GAAG,MAAM,0BAA0B,CAAC,IAAI,CAAC,CAAC;IACtD,cAAc,CAAC,G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ACD,aAAa,CACd,CAAC;oBAEF,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;wBACnB,OAAO,mBAAmB,CAAC,iBAAiB,EAAE,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC;oBAC/E,CAAC;oBAED,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC;oBAC/B,MAAM,QAAQ,GAAG,qBAAqB,CAAC,mBAAmB,EAAE;wBAC1D,GAAG,EAAE,QAAQ,CAAC,GAAG;wBACjB,KAAK,EAAE,QAAQ,CAAC,KAAK;qBACtB,CAAC,CAAC;oBAEH,+CAA+C;oBAC/C,QAAQ,CAAC,KAAK,GAAG;wBACf,IAAI,EAAE,UAAU;wBAChB,MAAM,EAAE,MAAM;wBACd,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;wBACrB,QAAQ,EAAE;4BACR,GAAG,EAAE,QAAQ,CAAC,GAAG;4BACjB,KAAK,EAAE,QAAQ,CAAC,KAAK;4BACrB,MAAM,EAAE,MAAM;yBACf;qBACF,CAAC;oBAEF,OAAO,QAAQ,CAAC;gBAClB,CAAC;gBAED;oBACE,OAAO,mBAAmB,CAAC,gBAAgB,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;YAC7D,CAAC;QACH,CAAC,CACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin tools — STUB.
|
|
3
|
+
*
|
|
4
|
+
* The real implementation exposed MCP tools over the log-processor Orchestrator
|
|
5
|
+
* (managing/querying the classifier / extractor / state-machine plugins). It was
|
|
6
|
+
* never committed; `index.ts` spreads `createPluginTools(() => orchestrator)` into
|
|
7
|
+
* the tool registry. This stub returns no tools so the project builds and runs
|
|
8
|
+
* with the feature inert. Replace to restore the plugin tools.
|
|
9
|
+
*/
|
|
10
|
+
import type { Orchestrator } from '../log-processor/orchestrator.js';
|
|
11
|
+
/**
|
|
12
|
+
* Build the log-processor plugin tools. The argument is a getter for the live
|
|
13
|
+
* Orchestrator (null until the session becomes the dashboard hub).
|
|
14
|
+
*/
|
|
15
|
+
export declare function createPluginTools(_getOrchestrator: () => Orchestrator | null): Record<string, never>;
|
|
16
|
+
//# sourceMappingURL=plugin-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-tools.d.ts","sourceRoot":"","sources":["../../src/tools/plugin-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAErE;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,gBAAgB,EAAE,MAAM,YAAY,GAAG,IAAI,GAC1C,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAEvB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin tools — STUB.
|
|
3
|
+
*
|
|
4
|
+
* The real implementation exposed MCP tools over the log-processor Orchestrator
|
|
5
|
+
* (managing/querying the classifier / extractor / state-machine plugins). It was
|
|
6
|
+
* never committed; `index.ts` spreads `createPluginTools(() => orchestrator)` into
|
|
7
|
+
* the tool registry. This stub returns no tools so the project builds and runs
|
|
8
|
+
* with the feature inert. Replace to restore the plugin tools.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Build the log-processor plugin tools. The argument is a getter for the live
|
|
12
|
+
* Orchestrator (null until the session becomes the dashboard hub).
|
|
13
|
+
*/
|
|
14
|
+
export function createPluginTools(_getOrchestrator) {
|
|
15
|
+
return {};
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=plugin-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-tools.js","sourceRoot":"","sources":["../../src/tools/plugin-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAC/B,gBAA2C;IAE3C,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replay-abort.test.d.ts","sourceRoot":"","sources":["../../src/tools/replay-abort.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
// @vitest-environment node
|
|
2
|
+
// (node, not happy-dom: events.getEventListeners only accepts Node's own
|
|
3
|
+
// EventTarget, and the hygiene test asserts listener counts on a real signal)
|
|
4
|
+
/**
|
|
5
|
+
* Run-signal cancellation (#110, stages 1a/1b): `replay cancel` aborts the
|
|
6
|
+
* run's controller, the executor forwards that signal to every step's tool
|
|
7
|
+
* handler, and the `wait` handler honours it - so cancel interrupts a wait
|
|
8
|
+
* MID-POLL instead of letting it run out its own timeoutMs (measured at
|
|
9
|
+
* ~105s of dead time before this change).
|
|
10
|
+
*
|
|
11
|
+
* Real timers throughout: the interruption tests prove polling STOPPED by
|
|
12
|
+
* watching the poll count over real elapsed time - with fake timers a leaked
|
|
13
|
+
* loop makes no progress and the leak is invisible.
|
|
14
|
+
*/
|
|
15
|
+
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
16
|
+
import { getEventListeners } from 'node:events';
|
|
17
|
+
import { executeSteps } from './replay-executor.js';
|
|
18
|
+
import { createWaitTools } from './wait-tools.js';
|
|
19
|
+
import { createReplayTools } from './replay-tools.js';
|
|
20
|
+
import { runRegistry } from './replay-run-registry.js';
|
|
21
|
+
import { configManager } from '../config.js';
|
|
22
|
+
import { productionShaped } from '../test-support/fake-execute-tool-call.js';
|
|
23
|
+
function makeHarness(opts = {}) {
|
|
24
|
+
const calls = [];
|
|
25
|
+
let pollCount = 0;
|
|
26
|
+
const cdpManager = {
|
|
27
|
+
isConnected: () => true,
|
|
28
|
+
getRuntimeType: () => 'chrome',
|
|
29
|
+
isPaused: () => false,
|
|
30
|
+
evaluateExpressionDetailed: vi.fn(async () => {
|
|
31
|
+
pollCount++;
|
|
32
|
+
return { rawCaptured: true, rawValue: opts.pollResult ? opts.pollResult() : false };
|
|
33
|
+
}),
|
|
34
|
+
};
|
|
35
|
+
const resolveConnectionFromReason = async () => ({
|
|
36
|
+
connection: { port: 9222 },
|
|
37
|
+
cdpManager,
|
|
38
|
+
puppeteerManager: {},
|
|
39
|
+
});
|
|
40
|
+
const { wait } = createWaitTools(resolveConnectionFromReason);
|
|
41
|
+
// productionShaped mirrors index.ts: any isError response becomes a thrown
|
|
42
|
+
// ToolError, carrying the response the classifiers read.
|
|
43
|
+
const executeToolCall = vi.fn(productionShaped(async (tool, params, abortSignal) => {
|
|
44
|
+
calls.push({ tool, action: params.action, params });
|
|
45
|
+
if (tool === 'wait') {
|
|
46
|
+
return await wait.handler(params, abortSignal);
|
|
47
|
+
}
|
|
48
|
+
if (opts.responses && tool in opts.responses) {
|
|
49
|
+
const r = opts.responses[tool];
|
|
50
|
+
return typeof r === 'function' ? r(params) : r;
|
|
51
|
+
}
|
|
52
|
+
return { content: [{ type: 'text', text: '' }] };
|
|
53
|
+
}));
|
|
54
|
+
const commandRecorder = {
|
|
55
|
+
recordCommand: vi.fn(),
|
|
56
|
+
getCurrentHistoryIndex: () => 0,
|
|
57
|
+
listSequences: vi.fn(() => []),
|
|
58
|
+
loadSequenceFromDisk: vi.fn(async () => null),
|
|
59
|
+
getFreshSequence: vi.fn(async (id) => commandRecorder.listSequences().find(s => s.id === id)),
|
|
60
|
+
};
|
|
61
|
+
const ctx = {
|
|
62
|
+
executeToolCall,
|
|
63
|
+
commandRecorder,
|
|
64
|
+
connectionReason: 'test-conn',
|
|
65
|
+
logPrefix: 'abort-test',
|
|
66
|
+
};
|
|
67
|
+
return {
|
|
68
|
+
calls,
|
|
69
|
+
ctx,
|
|
70
|
+
executeToolCall,
|
|
71
|
+
commandRecorder,
|
|
72
|
+
cdpManager,
|
|
73
|
+
getPollCount: () => pollCount,
|
|
74
|
+
resolveConnectionFromReason,
|
|
75
|
+
waitTool: wait,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
const seq = (commands, name = 'abort-seq') => ({
|
|
79
|
+
id: `seq-${name}`,
|
|
80
|
+
name,
|
|
81
|
+
commands,
|
|
82
|
+
createdAt: 1,
|
|
83
|
+
});
|
|
84
|
+
async function waitFor(cond, timeoutMs = 5000) {
|
|
85
|
+
const start = Date.now();
|
|
86
|
+
while (!cond()) {
|
|
87
|
+
if (Date.now() - start > timeoutMs)
|
|
88
|
+
throw new Error('waitFor: condition not met in time');
|
|
89
|
+
await new Promise(r => setTimeout(r, 10));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
beforeEach(() => {
|
|
93
|
+
runRegistry.clear();
|
|
94
|
+
vi.spyOn(configManager, 'getClickValidationConfig').mockReturnValue({
|
|
95
|
+
enabled: false,
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
// ---------------------------------------------------------------------------
|
|
99
|
+
// cancel interrupts a running wait step promptly
|
|
100
|
+
// ---------------------------------------------------------------------------
|
|
101
|
+
describe('run-signal abort interrupts wait steps', () => {
|
|
102
|
+
it('stops a polling wait mid-step: polls cease and the run settles promptly', { timeout: 10000 }, async () => {
|
|
103
|
+
const h = makeHarness();
|
|
104
|
+
const controller = new AbortController();
|
|
105
|
+
const run = executeSteps({
|
|
106
|
+
sequence: seq([
|
|
107
|
+
{ tool: 'wait', params: { selector: '#never', timeoutMs: 120000, pollIntervalMs: 20 } },
|
|
108
|
+
{ tool: 'dom', params: { action: 'querySelector', selector: '#after' } },
|
|
109
|
+
]),
|
|
110
|
+
startStep: 0,
|
|
111
|
+
ctx: h.ctx,
|
|
112
|
+
totalTimeout: 300000,
|
|
113
|
+
abortSignal: controller.signal,
|
|
114
|
+
});
|
|
115
|
+
// Let it genuinely poll a few times, then cancel mid-poll.
|
|
116
|
+
await waitFor(() => h.getPollCount() >= 3);
|
|
117
|
+
const abortedAt = Date.now();
|
|
118
|
+
controller.abort();
|
|
119
|
+
const result = await run;
|
|
120
|
+
expect(Date.now() - abortedAt).toBeLessThan(1000); // not wait's 120s timeoutMs
|
|
121
|
+
// Interruption, not early return: the poll count must NOT grow over a
|
|
122
|
+
// further 500ms of real time.
|
|
123
|
+
const pollsAtSettle = h.getPollCount();
|
|
124
|
+
await new Promise(r => setTimeout(r, 500));
|
|
125
|
+
expect(h.getPollCount()).toBe(pollsAtSettle);
|
|
126
|
+
// Classified as the canonical abort, not a wait failure...
|
|
127
|
+
expect(result.results).toHaveLength(1);
|
|
128
|
+
expect(result.results[0].success).toBe(false);
|
|
129
|
+
expect(result.results[0].error).toBe('Replay aborted by user');
|
|
130
|
+
// ...with no post-failure diagnostics against the cancelled browser and
|
|
131
|
+
// no subsequent step.
|
|
132
|
+
expect(h.calls.filter(c => ['console', 'network', 'content'].includes(c.tool))).toHaveLength(0);
|
|
133
|
+
expect(h.calls.filter(c => c.tool === 'dom')).toHaveLength(0);
|
|
134
|
+
});
|
|
135
|
+
it('interrupts a wait({ ms }) sleep promptly', { timeout: 10000 }, async () => {
|
|
136
|
+
const h = makeHarness();
|
|
137
|
+
const controller = new AbortController();
|
|
138
|
+
const run = executeSteps({
|
|
139
|
+
sequence: seq([{ tool: 'wait', params: { ms: 60000 } }]),
|
|
140
|
+
startStep: 0,
|
|
141
|
+
ctx: h.ctx,
|
|
142
|
+
totalTimeout: 300000,
|
|
143
|
+
abortSignal: controller.signal,
|
|
144
|
+
});
|
|
145
|
+
await waitFor(() => h.calls.some(c => c.tool === 'wait'));
|
|
146
|
+
const abortedAt = Date.now();
|
|
147
|
+
controller.abort();
|
|
148
|
+
const result = await run;
|
|
149
|
+
expect(Date.now() - abortedAt).toBeLessThan(1000);
|
|
150
|
+
expect(result.results[0].error).toBe('Replay aborted by user');
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
// ---------------------------------------------------------------------------
|
|
154
|
+
// the signal reaches nested conditional sequences
|
|
155
|
+
// ---------------------------------------------------------------------------
|
|
156
|
+
describe('run-signal abort inside a conditional substep', () => {
|
|
157
|
+
it('stops the nested run promptly (the signal used to be dropped at the executeSteps call)', { timeout: 10000 }, async () => {
|
|
158
|
+
const inner = seq([
|
|
159
|
+
{ tool: 'wait', params: { selector: '#never', timeoutMs: 120000, pollIntervalMs: 20 } },
|
|
160
|
+
{ tool: 'dom', params: { action: 'querySelector', selector: '#inner-after' } },
|
|
161
|
+
], 'inner-flow');
|
|
162
|
+
const h = makeHarness({
|
|
163
|
+
responses: {
|
|
164
|
+
dom: { content: [{ type: 'text', text: 'Element found' }] }, // condition met
|
|
165
|
+
},
|
|
166
|
+
});
|
|
167
|
+
h.commandRecorder.listSequences.mockReturnValue([inner]);
|
|
168
|
+
const controller = new AbortController();
|
|
169
|
+
const run = executeSteps({
|
|
170
|
+
sequence: seq([
|
|
171
|
+
{ tool: 'conditional', params: { if: '{{selector:.x}}', then: 'inner-flow' } },
|
|
172
|
+
]),
|
|
173
|
+
startStep: 0,
|
|
174
|
+
ctx: h.ctx,
|
|
175
|
+
totalTimeout: 300000,
|
|
176
|
+
abortSignal: controller.signal,
|
|
177
|
+
});
|
|
178
|
+
// The nested wait is polling; cancel the RUN.
|
|
179
|
+
await waitFor(() => h.getPollCount() >= 3);
|
|
180
|
+
const abortedAt = Date.now();
|
|
181
|
+
controller.abort();
|
|
182
|
+
const result = await run;
|
|
183
|
+
expect(Date.now() - abortedAt).toBeLessThan(1000);
|
|
184
|
+
const pollsAtSettle = h.getPollCount();
|
|
185
|
+
await new Promise(r => setTimeout(r, 500));
|
|
186
|
+
expect(h.getPollCount()).toBe(pollsAtSettle);
|
|
187
|
+
// The conditional step failed via the nested abort; the substep carries
|
|
188
|
+
// the canonical abort message and the step after the nested wait never ran.
|
|
189
|
+
expect(result.results[0].success).toBe(false);
|
|
190
|
+
expect(result.results[0].substeps?.[0].error).toBe('Replay aborted by user');
|
|
191
|
+
expect(h.calls.some(c => c.params.selector === '#inner-after')).toBe(false);
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
// ---------------------------------------------------------------------------
|
|
195
|
+
// listener hygiene: a long run must not accumulate listeners on the run signal
|
|
196
|
+
// ---------------------------------------------------------------------------
|
|
197
|
+
describe('run-signal listener hygiene', () => {
|
|
198
|
+
it('leaves no abort listeners on the run signal after a 200-step run', { timeout: 20000 }, async () => {
|
|
199
|
+
// Alternate polls false/true so every wait step exercises one abortable
|
|
200
|
+
// poll sleep (listener attach + detach) before succeeding.
|
|
201
|
+
let flip = false;
|
|
202
|
+
const h = makeHarness({ pollResult: () => (flip = !flip, !flip ? false : true) });
|
|
203
|
+
const controller = new AbortController();
|
|
204
|
+
const commands = [];
|
|
205
|
+
for (let i = 0; i < 200; i++) {
|
|
206
|
+
commands.push(i % 5 === 0
|
|
207
|
+
? { tool: 'wait', params: { selector: `#s${i}`, timeoutMs: 5000, pollIntervalMs: 1 } }
|
|
208
|
+
: { tool: 'dom', params: { action: 'querySelector', selector: `#s${i}` }, delay: 1 });
|
|
209
|
+
}
|
|
210
|
+
const result = await executeSteps({
|
|
211
|
+
sequence: seq(commands, 'long-run'),
|
|
212
|
+
startStep: 0,
|
|
213
|
+
ctx: h.ctx,
|
|
214
|
+
totalTimeout: 300000,
|
|
215
|
+
abortSignal: controller.signal,
|
|
216
|
+
});
|
|
217
|
+
expect(result.results).toHaveLength(200);
|
|
218
|
+
expect(result.results.every(r => r.success)).toBe(true);
|
|
219
|
+
expect(getEventListeners(controller.signal, 'abort')).toHaveLength(0);
|
|
220
|
+
});
|
|
221
|
+
});
|
|
222
|
+
// ---------------------------------------------------------------------------
|
|
223
|
+
// full path: replay({action:'cancel'}) -> controller -> wait handler
|
|
224
|
+
// ---------------------------------------------------------------------------
|
|
225
|
+
describe('replay cancel end to end', () => {
|
|
226
|
+
it('cancelling a background run interrupts its in-flight wait step', { timeout: 10000 }, async () => {
|
|
227
|
+
const h = makeHarness();
|
|
228
|
+
const sequence = seq([
|
|
229
|
+
{ tool: 'wait', params: { selector: '#never', timeoutMs: 120000, pollIntervalMs: 20 } },
|
|
230
|
+
{ tool: 'dom', params: { action: 'querySelector', selector: '#after' } },
|
|
231
|
+
], 'cancel-e2e');
|
|
232
|
+
const recorder = {
|
|
233
|
+
...h.commandRecorder,
|
|
234
|
+
getSequence: vi.fn((id) => (id === sequence.id ? sequence : undefined)),
|
|
235
|
+
getFreshSequence: vi.fn(async (id) => (id === sequence.id ? sequence : undefined)),
|
|
236
|
+
listSequences: vi.fn(() => [sequence]),
|
|
237
|
+
getHistory: vi.fn(() => []),
|
|
238
|
+
setActiveSequence: vi.fn(),
|
|
239
|
+
getActiveSequence: vi.fn(() => null),
|
|
240
|
+
getCommandsSincePause: vi.fn(() => []),
|
|
241
|
+
};
|
|
242
|
+
const { replay } = createReplayTools(recorder, h.executeToolCall, async () => null, async () => 9222, undefined);
|
|
243
|
+
const started = await replay.handler({
|
|
244
|
+
action: 'run', sequenceId: sequence.id, connectionReason: 'test-conn',
|
|
245
|
+
});
|
|
246
|
+
const runId = started._meta.replay.runId;
|
|
247
|
+
await waitFor(() => h.getPollCount() >= 3);
|
|
248
|
+
const abortedAt = Date.now();
|
|
249
|
+
await replay.handler({ action: 'cancel', runId });
|
|
250
|
+
await waitFor(() => runRegistry.get(runId).status === 'cancelled');
|
|
251
|
+
expect(Date.now() - abortedAt).toBeLessThan(2000); // not 120s
|
|
252
|
+
const pollsAtSettle = h.getPollCount();
|
|
253
|
+
await new Promise(r => setTimeout(r, 500));
|
|
254
|
+
expect(h.getPollCount()).toBe(pollsAtSettle);
|
|
255
|
+
const record = runRegistry.get(runId);
|
|
256
|
+
expect(record.results.some(r => r.error === 'Replay aborted by user')).toBe(true);
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
//# sourceMappingURL=replay-abort.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replay-abort.test.js","sourceRoot":"","sources":["../../src/tools/replay-abort.test.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,yEAAyE;AACzE,8EAA8E;AAC9E;;;;;;;;;;GAUG;AACH,OAAO,EAAE,QA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