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,637 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inspection Tools
|
|
3
|
+
*/
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { EvaluateExpressionExceptionError, EvaluateExpressionTimeoutError, EvaluateExpressionPendingPromiseError } from '../cdp-manager.js';
|
|
6
|
+
import { createTool } from '../validation-helpers.js';
|
|
7
|
+
import { createSuccessResponse, createErrorResponse } from '../messages.js';
|
|
8
|
+
import { isAbortError, raceAbort, throwIfAborted } from '../utils/abort.js';
|
|
9
|
+
/**
|
|
10
|
+
* Reverse CDPManager.formatValue()'s display shaping so a machine-readable
|
|
11
|
+
* value can be published on _meta (and captured by a sequence's saveAs).
|
|
12
|
+
*
|
|
13
|
+
* formatValue() renders primitives as display text - a string comes back
|
|
14
|
+
* wrapped in quotes, a number/boolean comes back as its String() form,
|
|
15
|
+
* undefined/null as the words. Objects and arrays come back as real
|
|
16
|
+
* objects/arrays whose leaves are those display strings.
|
|
17
|
+
*
|
|
18
|
+
* Best effort by design: values formatValue() collapsed to a description
|
|
19
|
+
* (a DOM node -> "[HTMLDivElement]", a depth-limited object -> its class
|
|
20
|
+
* name) cannot be recovered and are left as the string they arrived as.
|
|
21
|
+
*/
|
|
22
|
+
export function deformatEvaluatedValue(formatted) {
|
|
23
|
+
if (Array.isArray(formatted)) {
|
|
24
|
+
return formatted.map(deformatEvaluatedValue);
|
|
25
|
+
}
|
|
26
|
+
if (formatted !== null && typeof formatted === 'object') {
|
|
27
|
+
const out = {};
|
|
28
|
+
for (const [key, val] of Object.entries(formatted)) {
|
|
29
|
+
out[key] = deformatEvaluatedValue(val);
|
|
30
|
+
}
|
|
31
|
+
return out;
|
|
32
|
+
}
|
|
33
|
+
if (typeof formatted !== 'string') {
|
|
34
|
+
return formatted;
|
|
35
|
+
}
|
|
36
|
+
if (formatted === 'undefined')
|
|
37
|
+
return undefined;
|
|
38
|
+
if (formatted === 'null')
|
|
39
|
+
return null;
|
|
40
|
+
if (formatted === 'true')
|
|
41
|
+
return true;
|
|
42
|
+
if (formatted === 'false')
|
|
43
|
+
return false;
|
|
44
|
+
// A quoted string is unambiguous: formatValue only quotes real strings, so
|
|
45
|
+
// '"42"' was the string "42" while '42' was the number 42.
|
|
46
|
+
const quoted = formatted.match(/^"([\s\S]*)"$/);
|
|
47
|
+
if (quoted)
|
|
48
|
+
return quoted[1];
|
|
49
|
+
if (/^-?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?$/.test(formatted)) {
|
|
50
|
+
const asNumber = Number(formatted);
|
|
51
|
+
if (!Number.isNaN(asNumber))
|
|
52
|
+
return asNumber;
|
|
53
|
+
}
|
|
54
|
+
return formatted;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Format variables data as TOON (Token-Oriented Object Notation)
|
|
58
|
+
* Each variable on its own line for readability
|
|
59
|
+
*/
|
|
60
|
+
function formatVariablesAsToon(data, responseType) {
|
|
61
|
+
const lines = [];
|
|
62
|
+
if (responseType === 'counts_only') {
|
|
63
|
+
// Format: scope:count
|
|
64
|
+
for (const [scope, count] of Object.entries(data)) {
|
|
65
|
+
lines.push(`${scope}:${count}`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
else if (responseType === 'names_only') {
|
|
69
|
+
// Format each name on its own line grouped by scope
|
|
70
|
+
for (const [scope, names] of Object.entries(data)) {
|
|
71
|
+
lines.push(`[${scope}]`);
|
|
72
|
+
for (const name of names) {
|
|
73
|
+
lines.push(` ${name}`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
// full or depth_reduced - format each variable
|
|
79
|
+
for (const [scope, vars] of Object.entries(data)) {
|
|
80
|
+
lines.push(`[${scope}]`);
|
|
81
|
+
for (const v of vars) {
|
|
82
|
+
const valueStr = formatToonValue(v.value);
|
|
83
|
+
lines.push(` ${v.name}:${valueStr};type:${v.type}`);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return lines.join('\n');
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Format call stack as TOON
|
|
91
|
+
*/
|
|
92
|
+
function formatCallStackAsToon(stack) {
|
|
93
|
+
const lines = [];
|
|
94
|
+
for (let i = 0; i < stack.length; i++) {
|
|
95
|
+
const frame = stack[i];
|
|
96
|
+
const loc = frame.location;
|
|
97
|
+
lines.push(`${i}:${frame.functionName || '(anonymous)'};${loc.source}:${loc.line}:${loc.column};id:${frame.callFrameId}`);
|
|
98
|
+
}
|
|
99
|
+
return lines.join('\n');
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Format search results as TOON
|
|
103
|
+
*/
|
|
104
|
+
function formatSearchResultsAsToon(results) {
|
|
105
|
+
const lines = [];
|
|
106
|
+
for (const r of results) {
|
|
107
|
+
lines.push(`${r.url}:${r.lineNumber}`);
|
|
108
|
+
lines.push(` ${r.lineContent}`);
|
|
109
|
+
}
|
|
110
|
+
return lines.join('\n');
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Format a value for TOON output
|
|
114
|
+
*/
|
|
115
|
+
function formatToonValue(value) {
|
|
116
|
+
if (value === null || value === undefined)
|
|
117
|
+
return 'null';
|
|
118
|
+
if (typeof value === 'string') {
|
|
119
|
+
// Check if it's already a formatted string like "[Function: ...]"
|
|
120
|
+
if (value.startsWith('[') || value.startsWith('"'))
|
|
121
|
+
return value;
|
|
122
|
+
return value;
|
|
123
|
+
}
|
|
124
|
+
if (typeof value === 'number' || typeof value === 'boolean')
|
|
125
|
+
return String(value);
|
|
126
|
+
if (Array.isArray(value)) {
|
|
127
|
+
if (value.length === 0)
|
|
128
|
+
return '[]';
|
|
129
|
+
const items = value.map(v => formatToonValue(v)).join('|');
|
|
130
|
+
return `[${items}]`;
|
|
131
|
+
}
|
|
132
|
+
if (typeof value === 'object') {
|
|
133
|
+
const entries = Object.entries(value).map(([k, v]) => `${k}:${formatToonValue(v)}`);
|
|
134
|
+
return `{${entries.join(';')}}`;
|
|
135
|
+
}
|
|
136
|
+
return String(value);
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Check if line content appears to be a webpack eval wrapper (truncated or not)
|
|
140
|
+
*/
|
|
141
|
+
function isWebpackEvalLine(lineContent) {
|
|
142
|
+
return lineContent.startsWith('eval(__webpack_require__.');
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Extract the actual source line from a full webpack eval wrapper.
|
|
146
|
+
* Webpack bundles code like: eval(__webpack_require__.ts("actual\\nsource\\ncode"))
|
|
147
|
+
* This function extracts the inner content and finds the matching line.
|
|
148
|
+
*/
|
|
149
|
+
function extractSourceFromFullEvalLine(fullLineContent, pattern, caseSensitive) {
|
|
150
|
+
// Extract content between the first (" and last ")
|
|
151
|
+
// Pattern: eval(__webpack_require__.XX("CONTENT"))
|
|
152
|
+
const startMatch = fullLineContent.match(/^eval\(__webpack_require__\.\w+\(["'`]/);
|
|
153
|
+
if (!startMatch) {
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
const startIdx = startMatch[0].length;
|
|
157
|
+
// Find the closing quote and parentheses - handle escaped quotes
|
|
158
|
+
let endIdx = fullLineContent.length - 3; // Assume "))" at end, quote before that
|
|
159
|
+
// Extract the inner content
|
|
160
|
+
let innerContent = fullLineContent.substring(startIdx, endIdx);
|
|
161
|
+
try {
|
|
162
|
+
// Unescape the string (handles \\n, \\t, etc.)
|
|
163
|
+
innerContent = innerContent
|
|
164
|
+
.replace(/\\n/g, '\n')
|
|
165
|
+
.replace(/\\t/g, '\t')
|
|
166
|
+
.replace(/\\r/g, '\r')
|
|
167
|
+
.replace(/\\\\/g, '\\')
|
|
168
|
+
.replace(/\\"/g, '"')
|
|
169
|
+
.replace(/\\'/g, "'");
|
|
170
|
+
}
|
|
171
|
+
catch {
|
|
172
|
+
return null;
|
|
173
|
+
}
|
|
174
|
+
// Split into lines and find the one containing the pattern
|
|
175
|
+
const lines = innerContent.split('\n');
|
|
176
|
+
const flags = caseSensitive ? 'g' : 'gi';
|
|
177
|
+
try {
|
|
178
|
+
const regex = new RegExp(pattern, flags);
|
|
179
|
+
for (let i = 0; i < lines.length; i++) {
|
|
180
|
+
if (regex.test(lines[i])) {
|
|
181
|
+
regex.lastIndex = 0; // Reset for next test
|
|
182
|
+
return {
|
|
183
|
+
lineContent: lines[i].trim(),
|
|
184
|
+
innerLineNumber: i + 1, // 1-based line number within the eval content
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
regex.lastIndex = 0; // Reset for next test
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
catch {
|
|
191
|
+
// If regex fails, try simple string match
|
|
192
|
+
const searchPattern = caseSensitive ? pattern : pattern.toLowerCase();
|
|
193
|
+
for (let i = 0; i < lines.length; i++) {
|
|
194
|
+
const line = caseSensitive ? lines[i] : lines[i].toLowerCase();
|
|
195
|
+
if (line.includes(searchPattern)) {
|
|
196
|
+
return {
|
|
197
|
+
lineContent: lines[i].trim(),
|
|
198
|
+
innerLineNumber: i + 1,
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return null; // Pattern not found in inner content
|
|
204
|
+
}
|
|
205
|
+
// Consolidated inspection tool schema
|
|
206
|
+
const inspectionToolSchema = z.object({
|
|
207
|
+
action: z.enum(['getCallStack', 'getVariables', 'evaluateExpression', 'searchCode', 'searchFunctions'])
|
|
208
|
+
.describe('Inspection action: getCallStack (get call stack when paused), getVariables (get variables in call frame), evaluateExpression (evaluate JavaScript), searchCode (search code by pattern), searchFunctions (find function definitions)'),
|
|
209
|
+
connectionReason: z.string().optional().describe('Connection reference (use the reference from launchChrome output, e.g., "unnamed-connection-default" or your renamed tab)'),
|
|
210
|
+
// getVariables and evaluateExpression parameters
|
|
211
|
+
callFrameId: z.string().optional().describe('Call frame ID (required for getVariables, optional for evaluateExpression)'),
|
|
212
|
+
includeGlobal: z.boolean().optional().describe('Include global scope (for getVariables action, default: false)'),
|
|
213
|
+
filter: z.string().optional().describe('Regex filter for variable names (for getVariables action) - applies to ALL scopes. Required when too many variables exist'),
|
|
214
|
+
expandObjects: z.boolean().optional().describe('Expand objects/arrays (for getVariables and evaluateExpression actions, default: true)'),
|
|
215
|
+
maxDepth: z.number().optional().describe('Max expansion depth (for getVariables and evaluateExpression actions, default: 2). Auto-reduced if response too large'),
|
|
216
|
+
maxTokens: z.number().optional().describe('Max tokens for getVariables response (default: 1000). Depth auto-reduced to fit, filter required if still exceeded'),
|
|
217
|
+
// evaluateExpression parameters
|
|
218
|
+
expression: z.string().optional().describe('JavaScript expression (required for evaluateExpression action). A returned Promise is awaited by default, so async IIFEs like (async () => await fetch(...))() resolve to their settled value'),
|
|
219
|
+
awaitPromise: z.boolean().optional().describe('Await a Promise returned by the expression and use its settled value (for evaluateExpression action, default: true). Pass false to inspect the Promise object itself. While paused at a breakpoint, only already-settled promises can be resolved (the event loop is stopped); a pending one fails fast'),
|
|
220
|
+
saveAs: z.string().optional().describe('Sequence step only (evaluateExpression): captures the evaluated value into the run\'s variable store under this name, for later {{var:name}} / {{var:name.path}} use'),
|
|
221
|
+
// searchCode parameters
|
|
222
|
+
pattern: z.string().optional().describe('Regex pattern (required for searchCode action)'),
|
|
223
|
+
caseSensitive: z.boolean().optional().describe('Case sensitive (for searchCode and searchFunctions actions, default: false)'),
|
|
224
|
+
isRegex: z.boolean().optional().describe('Treat as regex (for searchCode action, default: true)'),
|
|
225
|
+
urlFilter: z.string().optional().describe('URL filter regex (for searchCode and searchFunctions actions)'),
|
|
226
|
+
limit: z.number().optional().describe('Max results (for searchCode action default: 100, for searchFunctions default: 50)'),
|
|
227
|
+
// searchFunctions parameters
|
|
228
|
+
functionName: z.string().optional().describe('Function name (required for searchFunctions action)'),
|
|
229
|
+
}).strict();
|
|
230
|
+
export function createInspectionTools(cdpManager, sourceMapHandler, resolveConnectionFromReason) {
|
|
231
|
+
return {
|
|
232
|
+
inspect: createTool('Inspect and debug code. Actions: getCallStack (get call stack when paused), getVariables (get variables in call frame), evaluateExpression (evaluate JavaScript), searchCode (search code by pattern), searchFunctions (find function definitions)', inspectionToolSchema,
|
|
233
|
+
// abortSignal (#110): INTERRUPTIBLE AT A CHECKPOINT, not genuinely
|
|
234
|
+
// cancellable. `evaluateExpression` is the only action with a real wait
|
|
235
|
+
// (the bounded round-trip to the execution context, up to its own
|
|
236
|
+
// timeout), and CDP gives us no way to recall a Runtime.evaluate - so a
|
|
237
|
+
// cancel stops WAITING for it while the expression keeps running in the
|
|
238
|
+
// target. The other actions read already-captured state and only get the
|
|
239
|
+
// entry checkpoint.
|
|
240
|
+
async (args, abortSignal) => {
|
|
241
|
+
const { action, connectionReason } = args;
|
|
242
|
+
throwIfAborted(abortSignal);
|
|
243
|
+
// Resolve connection if connectionReason is provided
|
|
244
|
+
let targetCdpManager = cdpManager;
|
|
245
|
+
if (connectionReason && resolveConnectionFromReason) {
|
|
246
|
+
const resolved = await resolveConnectionFromReason(connectionReason);
|
|
247
|
+
if (!resolved) {
|
|
248
|
+
return createErrorResponse('CONNECTION_NOT_FOUND');
|
|
249
|
+
}
|
|
250
|
+
targetCdpManager = resolved.cdpManager;
|
|
251
|
+
}
|
|
252
|
+
switch (action) {
|
|
253
|
+
case 'getCallStack': {
|
|
254
|
+
const callStack = targetCdpManager.getCallStack();
|
|
255
|
+
if (!callStack) {
|
|
256
|
+
return createErrorResponse('NOT_PAUSED');
|
|
257
|
+
}
|
|
258
|
+
// Try to map stack frames back to original sources
|
|
259
|
+
const mappedStack = await Promise.all(callStack.map(async (frame) => {
|
|
260
|
+
const original = await sourceMapHandler.mapToOriginal(frame.url, frame.location.lineNumber, frame.location.columnNumber);
|
|
261
|
+
return {
|
|
262
|
+
functionName: frame.functionName,
|
|
263
|
+
location: original || {
|
|
264
|
+
source: frame.url,
|
|
265
|
+
line: frame.location.lineNumber,
|
|
266
|
+
column: frame.location.columnNumber,
|
|
267
|
+
},
|
|
268
|
+
callFrameId: frame.callFrameId,
|
|
269
|
+
};
|
|
270
|
+
}));
|
|
271
|
+
// Format paused location from first frame
|
|
272
|
+
const pausedLocation = mappedStack.length > 0
|
|
273
|
+
? `${mappedStack[0].location.source}:${mappedStack[0].location.line}`
|
|
274
|
+
: undefined;
|
|
275
|
+
// Format as TOON
|
|
276
|
+
const toonData = '```\n' + formatCallStackAsToon(mappedStack) + '\n```';
|
|
277
|
+
return createSuccessResponse('CALL_STACK_SUCCESS', {
|
|
278
|
+
pausedLocation,
|
|
279
|
+
frameCount: mappedStack.length,
|
|
280
|
+
}, toonData);
|
|
281
|
+
}
|
|
282
|
+
case 'getVariables': {
|
|
283
|
+
const { callFrameId, includeGlobal = false, filter, expandObjects = true, maxDepth = 2, maxTokens = 1000 } = args;
|
|
284
|
+
if (!callFrameId) {
|
|
285
|
+
return createErrorResponse('MISSING_PARAMETER', {
|
|
286
|
+
action: 'getVariables',
|
|
287
|
+
missing: 'callFrameId',
|
|
288
|
+
message: 'Provide a valid call frame ID from the call stack'
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
try {
|
|
292
|
+
const result = await targetCdpManager.getVariables(callFrameId, includeGlobal, filter, expandObjects, maxDepth, maxTokens);
|
|
293
|
+
const { data, totalCount, usedDepth, requestedDepth, responseType, filterInsufficient } = result;
|
|
294
|
+
// Format data as TOON (Token-Oriented Object Notation)
|
|
295
|
+
const toonData = '```\n' + formatVariablesAsToon(data, responseType) + '\n```';
|
|
296
|
+
// Select message based on responseType and filterInsufficient
|
|
297
|
+
switch (responseType) {
|
|
298
|
+
case 'full':
|
|
299
|
+
return createSuccessResponse('VARIABLES_SUCCESS', {
|
|
300
|
+
callFrameId,
|
|
301
|
+
returnedCount: totalCount,
|
|
302
|
+
totalCount,
|
|
303
|
+
usedDepth,
|
|
304
|
+
filter: filter || undefined,
|
|
305
|
+
includeGlobal: includeGlobal || undefined,
|
|
306
|
+
}, toonData);
|
|
307
|
+
case 'depth_reduced':
|
|
308
|
+
return createSuccessResponse('VARIABLES_DEPTH_REDUCED', {
|
|
309
|
+
callFrameId,
|
|
310
|
+
totalCount,
|
|
311
|
+
requestedDepth,
|
|
312
|
+
usedDepth,
|
|
313
|
+
filter: filter || undefined,
|
|
314
|
+
includeGlobal: includeGlobal || undefined,
|
|
315
|
+
}, toonData);
|
|
316
|
+
case 'names_only':
|
|
317
|
+
if (filterInsufficient) {
|
|
318
|
+
return createSuccessResponse('VARIABLES_FILTER_INSUFFICIENT', {
|
|
319
|
+
callFrameId,
|
|
320
|
+
totalCount,
|
|
321
|
+
filter,
|
|
322
|
+
}, toonData);
|
|
323
|
+
}
|
|
324
|
+
return createSuccessResponse('VARIABLES_NAMES_ONLY', {
|
|
325
|
+
callFrameId,
|
|
326
|
+
totalCount,
|
|
327
|
+
}, toonData);
|
|
328
|
+
case 'counts_only':
|
|
329
|
+
if (filterInsufficient) {
|
|
330
|
+
return createSuccessResponse('VARIABLES_FILTER_INSUFFICIENT', {
|
|
331
|
+
callFrameId,
|
|
332
|
+
totalCount,
|
|
333
|
+
filter,
|
|
334
|
+
}, toonData);
|
|
335
|
+
}
|
|
336
|
+
return createSuccessResponse('VARIABLES_COUNTS_ONLY', {
|
|
337
|
+
callFrameId,
|
|
338
|
+
totalCount,
|
|
339
|
+
}, toonData);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
catch (error) {
|
|
343
|
+
const errorMsg = String(error);
|
|
344
|
+
if (errorMsg.includes('Invalid filter regex')) {
|
|
345
|
+
return createErrorResponse('INVALID_FILTER', {
|
|
346
|
+
filter,
|
|
347
|
+
error: errorMsg,
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
return createErrorResponse('CALL_FRAME_NOT_FOUND', {
|
|
351
|
+
callFrameId,
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
case 'evaluateExpression': {
|
|
356
|
+
const { expression, callFrameId, expandObjects = true, maxDepth = 2, awaitPromise = true } = args;
|
|
357
|
+
if (!expression) {
|
|
358
|
+
return createErrorResponse('MISSING_PARAMETER', {
|
|
359
|
+
action: 'evaluateExpression',
|
|
360
|
+
missing: 'expression',
|
|
361
|
+
message: 'Provide a JavaScript expression to evaluate'
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
try {
|
|
365
|
+
throwIfAborted(abortSignal);
|
|
366
|
+
// raceAbort = stop waiting on cancel; the evaluation itself
|
|
367
|
+
// continues in the target (no way to recall it).
|
|
368
|
+
const detailed = await raceAbort(targetCdpManager.evaluateExpressionDetailed(expression, callFrameId, expandObjects, maxDepth, { awaitPromise, captureRaw: true }), abortSignal);
|
|
369
|
+
const result = detailed.formatted;
|
|
370
|
+
// Format result as TOON
|
|
371
|
+
let formattedResult;
|
|
372
|
+
if (result === undefined || result === 'undefined') {
|
|
373
|
+
formattedResult = '```\nundefined\n```';
|
|
374
|
+
}
|
|
375
|
+
else if (result === null || result === 'null') {
|
|
376
|
+
formattedResult = '```\nnull\n```';
|
|
377
|
+
}
|
|
378
|
+
else if (typeof result === 'string') {
|
|
379
|
+
formattedResult = `\`\`\`\n${result}\n\`\`\``;
|
|
380
|
+
}
|
|
381
|
+
else {
|
|
382
|
+
// For objects/arrays, use TOON formatting
|
|
383
|
+
formattedResult = `\`\`\`\n${formatToonValue(result)}\n\`\`\``;
|
|
384
|
+
}
|
|
385
|
+
// Machine-readable twin of the text above: this is what a
|
|
386
|
+
// sequence step's saveAs captures into the variable store
|
|
387
|
+
// (replay-executor's capture table reads _meta.inspect.value).
|
|
388
|
+
// Prefer the exact by-value capture (bug-015); fall back to
|
|
389
|
+
// reconstructing from the display formatting only when the
|
|
390
|
+
// value is not serializable by value.
|
|
391
|
+
const capturedValue = detailed.rawCaptured
|
|
392
|
+
? detailed.rawValue
|
|
393
|
+
: deformatEvaluatedValue(result);
|
|
394
|
+
const inspectMeta = {
|
|
395
|
+
tool: 'inspect',
|
|
396
|
+
action: 'evaluateExpression',
|
|
397
|
+
timestamp: Date.now(),
|
|
398
|
+
inspect: {
|
|
399
|
+
expression,
|
|
400
|
+
value: capturedValue,
|
|
401
|
+
valueType: capturedValue === null ? 'null' : typeof capturedValue,
|
|
402
|
+
valueSource: detailed.rawCaptured ? 'exact' : 'display',
|
|
403
|
+
...(callFrameId ? { callFrameId } : {}),
|
|
404
|
+
},
|
|
405
|
+
};
|
|
406
|
+
return {
|
|
407
|
+
...createSuccessResponse('EVALUATE_EXPRESSION_SUCCESS', {
|
|
408
|
+
expression,
|
|
409
|
+
context: callFrameId ? `Call frame ${callFrameId}` : 'Global context',
|
|
410
|
+
result: formattedResult
|
|
411
|
+
}),
|
|
412
|
+
_meta: inspectMeta,
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
catch (error) {
|
|
416
|
+
// The universal trap: this broad catch ends in a catch-all
|
|
417
|
+
// EVALUATE_EXPRESSION_FAILED, which would turn the user's cancel
|
|
418
|
+
// into a bogus evaluation failure. Rethrow aborts first.
|
|
419
|
+
if (isAbortError(error))
|
|
420
|
+
throw error;
|
|
421
|
+
// The evaluated expression itself threw (CDP exceptionDetails,
|
|
422
|
+
// e.g. a stack-exhaustion RangeError) - report it as an
|
|
423
|
+
// ordinary outcome, not a tool malfunction.
|
|
424
|
+
if (error instanceof EvaluateExpressionExceptionError) {
|
|
425
|
+
return createErrorResponse('EVALUATE_EXPRESSION_EXCEPTION', {
|
|
426
|
+
expression: error.expression,
|
|
427
|
+
errorType: error.exceptionType,
|
|
428
|
+
errorMessage: error.exceptionMessage,
|
|
429
|
+
stack: error.exceptionStack || '(no stack available)',
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
// The expression returned a Promise that cannot settle while
|
|
433
|
+
// the debugger is paused (event loop stopped) - fail fast with
|
|
434
|
+
// an explanation instead of burning the full timeout.
|
|
435
|
+
if (error instanceof EvaluateExpressionPendingPromiseError) {
|
|
436
|
+
return createErrorResponse('EVALUATE_PROMISE_PENDING_WHILE_PAUSED', {
|
|
437
|
+
expression: error.expression,
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
// The execution context never responded within the bounded
|
|
441
|
+
// timeout - report explicitly instead of hanging forever.
|
|
442
|
+
if (error instanceof EvaluateExpressionTimeoutError) {
|
|
443
|
+
return createErrorResponse('EVALUATE_CONTEXT_UNRESPONSIVE', {
|
|
444
|
+
connectionReason: args.connectionReason || 'unknown',
|
|
445
|
+
expression: error.expression,
|
|
446
|
+
timeoutMs: error.timeoutMs,
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
return createErrorResponse('EVALUATE_EXPRESSION_FAILED', {
|
|
450
|
+
expression,
|
|
451
|
+
error: String(error),
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
case 'searchCode': {
|
|
456
|
+
const { pattern, caseSensitive = false, isRegex = true, urlFilter, limit = 100 } = args;
|
|
457
|
+
if (!pattern) {
|
|
458
|
+
return createErrorResponse('MISSING_PARAMETER', {
|
|
459
|
+
action: 'searchCode',
|
|
460
|
+
missing: 'pattern',
|
|
461
|
+
message: 'Provide a regex pattern to search for in the code'
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
if (!targetCdpManager.isConnected()) {
|
|
465
|
+
return createErrorResponse('DEBUGGER_NOT_CONNECTED');
|
|
466
|
+
}
|
|
467
|
+
try {
|
|
468
|
+
const allScripts = targetCdpManager.getAllScripts();
|
|
469
|
+
let scriptsToSearch = allScripts;
|
|
470
|
+
// Filter by URL if provided
|
|
471
|
+
if (urlFilter) {
|
|
472
|
+
try {
|
|
473
|
+
const urlRegex = new RegExp(urlFilter);
|
|
474
|
+
scriptsToSearch = allScripts.filter(s => urlRegex.test(s.url));
|
|
475
|
+
}
|
|
476
|
+
catch (error) {
|
|
477
|
+
return createErrorResponse('SOURCE_CODE_FAILED', { error: `Invalid URL filter regex: ${error}` });
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
const allResults = [];
|
|
481
|
+
for (const script of scriptsToSearch) {
|
|
482
|
+
if (allResults.length >= limit)
|
|
483
|
+
break;
|
|
484
|
+
const matches = await targetCdpManager.searchInScript(script.scriptId, pattern, caseSensitive, isRegex);
|
|
485
|
+
for (const match of matches) {
|
|
486
|
+
let lineContent;
|
|
487
|
+
let displayLineNumber = match.lineNumber + 1; // Convert to 1-based
|
|
488
|
+
// Check if this is a webpack eval line (truncated content starts with eval)
|
|
489
|
+
if (isWebpackEvalLine(match.lineContent)) {
|
|
490
|
+
// Fetch the full line content from the script
|
|
491
|
+
const fullLine = await targetCdpManager.getScriptLine(script.scriptId, match.lineNumber);
|
|
492
|
+
if (fullLine) {
|
|
493
|
+
const extracted = extractSourceFromFullEvalLine(fullLine, pattern, caseSensitive);
|
|
494
|
+
if (extracted) {
|
|
495
|
+
lineContent = extracted.lineContent;
|
|
496
|
+
}
|
|
497
|
+
else {
|
|
498
|
+
// Couldn't extract, use truncated original
|
|
499
|
+
lineContent = match.lineContent;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
else {
|
|
503
|
+
lineContent = match.lineContent;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
else {
|
|
507
|
+
// Regular code, use as-is
|
|
508
|
+
lineContent = match.lineContent;
|
|
509
|
+
}
|
|
510
|
+
// Truncate line content to avoid huge responses from minified code
|
|
511
|
+
const MAX_LINE_LENGTH = 200;
|
|
512
|
+
if (lineContent.length > MAX_LINE_LENGTH) {
|
|
513
|
+
lineContent = lineContent.substring(0, MAX_LINE_LENGTH) + '...';
|
|
514
|
+
}
|
|
515
|
+
allResults.push({
|
|
516
|
+
url: script.url,
|
|
517
|
+
scriptId: script.scriptId,
|
|
518
|
+
lineNumber: displayLineNumber,
|
|
519
|
+
lineContent,
|
|
520
|
+
});
|
|
521
|
+
if (allResults.length >= limit)
|
|
522
|
+
break;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
// Format as TOON
|
|
526
|
+
const toonData = allResults.length > 0
|
|
527
|
+
? '```\n' + formatSearchResultsAsToon(allResults) + '\n```'
|
|
528
|
+
: 'No matches found';
|
|
529
|
+
return createSuccessResponse('CODE_SEARCH_RESULTS', {
|
|
530
|
+
count: allResults.length.toString(),
|
|
531
|
+
scriptsSearched: scriptsToSearch.length.toString(),
|
|
532
|
+
}, toonData);
|
|
533
|
+
}
|
|
534
|
+
catch (error) {
|
|
535
|
+
return createErrorResponse('SOURCE_CODE_FAILED', { error: `${error}` });
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
case 'searchFunctions': {
|
|
539
|
+
const { functionName, caseSensitive = false, urlFilter, limit = 50 } = args;
|
|
540
|
+
if (!functionName) {
|
|
541
|
+
return createErrorResponse('MISSING_PARAMETER', {
|
|
542
|
+
action: 'searchFunctions',
|
|
543
|
+
missing: 'functionName',
|
|
544
|
+
message: 'Provide a function name to search for'
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
if (!targetCdpManager.isConnected()) {
|
|
548
|
+
return createErrorResponse('DEBUGGER_NOT_CONNECTED');
|
|
549
|
+
}
|
|
550
|
+
try {
|
|
551
|
+
const allScripts = targetCdpManager.getAllScripts();
|
|
552
|
+
let scriptsToSearch = allScripts;
|
|
553
|
+
// Filter by URL if provided
|
|
554
|
+
if (urlFilter) {
|
|
555
|
+
try {
|
|
556
|
+
const urlRegex = new RegExp(urlFilter);
|
|
557
|
+
scriptsToSearch = allScripts.filter(s => urlRegex.test(s.url));
|
|
558
|
+
}
|
|
559
|
+
catch (error) {
|
|
560
|
+
return createErrorResponse('SOURCE_CODE_FAILED', { error: `Invalid URL filter regex: ${error}` });
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
// Build pattern to match: function name( or const name = or let name =
|
|
564
|
+
const escapedName = functionName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
565
|
+
const pattern = caseSensitive
|
|
566
|
+
? `(function\\s+${escapedName}\\s*\\(|const\\s+${escapedName}\\s*=|let\\s+${escapedName}\\s*=|${escapedName}\\s*:\\s*function|${escapedName}\\s*:\\s*\\(|${escapedName}\\s*=\\s*\\()`
|
|
567
|
+
: `(function\\s+${escapedName}\\s*\\(|const\\s+${escapedName}\\s*=|let\\s+${escapedName}\\s*=|${escapedName}\\s*:\\s*function|${escapedName}\\s*:\\s*\\(|${escapedName}\\s*=\\s*\\()`;
|
|
568
|
+
const allResults = [];
|
|
569
|
+
for (const script of scriptsToSearch) {
|
|
570
|
+
if (allResults.length >= limit)
|
|
571
|
+
break;
|
|
572
|
+
const matches = await targetCdpManager.searchInScript(script.scriptId, pattern, caseSensitive, true // always use regex
|
|
573
|
+
);
|
|
574
|
+
for (const match of matches) {
|
|
575
|
+
let lineContent;
|
|
576
|
+
let displayLineNumber = match.lineNumber + 1; // Convert to 1-based
|
|
577
|
+
// Check if this is a webpack eval line (truncated content starts with eval)
|
|
578
|
+
if (isWebpackEvalLine(match.lineContent)) {
|
|
579
|
+
// Fetch the full line content from the script
|
|
580
|
+
const fullLine = await targetCdpManager.getScriptLine(script.scriptId, match.lineNumber);
|
|
581
|
+
if (fullLine) {
|
|
582
|
+
const extracted = extractSourceFromFullEvalLine(fullLine, pattern, caseSensitive);
|
|
583
|
+
if (extracted) {
|
|
584
|
+
lineContent = extracted.lineContent;
|
|
585
|
+
}
|
|
586
|
+
else {
|
|
587
|
+
// Couldn't extract, use truncated original
|
|
588
|
+
lineContent = match.lineContent.trim();
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
else {
|
|
592
|
+
lineContent = match.lineContent.trim();
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
else {
|
|
596
|
+
// Regular code, use as-is
|
|
597
|
+
lineContent = match.lineContent.trim();
|
|
598
|
+
}
|
|
599
|
+
// Truncate line content to avoid huge responses from minified code
|
|
600
|
+
const MAX_LINE_LENGTH = 200;
|
|
601
|
+
if (lineContent.length > MAX_LINE_LENGTH) {
|
|
602
|
+
lineContent = lineContent.substring(0, MAX_LINE_LENGTH) + '...';
|
|
603
|
+
}
|
|
604
|
+
allResults.push({
|
|
605
|
+
url: script.url,
|
|
606
|
+
scriptId: script.scriptId,
|
|
607
|
+
lineNumber: displayLineNumber,
|
|
608
|
+
lineContent,
|
|
609
|
+
});
|
|
610
|
+
if (allResults.length >= limit)
|
|
611
|
+
break;
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
// Format as TOON
|
|
615
|
+
const toonData = allResults.length > 0
|
|
616
|
+
? '```\n' + formatSearchResultsAsToon(allResults) + '\n```'
|
|
617
|
+
: 'No matches found';
|
|
618
|
+
return createSuccessResponse('FUNCTION_SEARCH_RESULTS', {
|
|
619
|
+
count: allResults.length.toString(),
|
|
620
|
+
functionName,
|
|
621
|
+
scriptsSearched: scriptsToSearch.length.toString(),
|
|
622
|
+
}, toonData);
|
|
623
|
+
}
|
|
624
|
+
catch (error) {
|
|
625
|
+
return createErrorResponse('SOURCE_CODE_FAILED', { error: `${error}` });
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
default:
|
|
629
|
+
return createErrorResponse('INVALID_ACTION', {
|
|
630
|
+
action,
|
|
631
|
+
validActions: 'getCallStack, getVariables, evaluateExpression, searchCode, searchFunctions',
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
}),
|
|
635
|
+
};
|
|
636
|
+
}
|
|
637
|
+
//# sourceMappingURL=inspection-tools.js.map
|