execbro 2.3.0 → 2.6.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/README.md +2 -0
- package/build/__tests__/helpers/fake-cdp-server.d.ts +0 -12
- package/build/__tests__/helpers/fake-cdp-server.d.ts.map +1 -1
- package/build/__tests__/helpers/fake-cdp-server.js +0 -22
- package/build/__tests__/helpers/fake-cdp-server.js.map +1 -1
- package/build/__tests__/helpers/tap-test-helpers.d.ts +0 -23
- package/build/__tests__/helpers/tap-test-helpers.d.ts.map +1 -1
- package/build/__tests__/helpers/tap-test-helpers.js +2 -29
- package/build/__tests__/helpers/tap-test-helpers.js.map +1 -1
- package/build/__tests__/integration/auto-reconnect.test.js +4 -14
- package/build/__tests__/integration/auto-reconnect.test.js.map +1 -1
- package/build/__tests__/integration/connection-health.test.js +1 -10
- package/build/__tests__/integration/connection-health.test.js.map +1 -1
- package/build/__tests__/integration/execute-in-app.test.js +1 -11
- package/build/__tests__/integration/execute-in-app.test.js.map +1 -1
- package/build/__tests__/integration/native-logs.test.js +0 -5
- package/build/__tests__/integration/native-logs.test.js.map +1 -1
- package/build/__tests__/integration/per-call-timeout.test.js +1 -5
- package/build/__tests__/integration/per-call-timeout.test.js.map +1 -1
- package/build/__tests__/integration/socket-close-midflight.test.js +2 -12
- package/build/__tests__/integration/socket-close-midflight.test.js.map +1 -1
- package/build/__tests__/integration/stale-target-probe.test.js +2 -17
- package/build/__tests__/integration/stale-target-probe.test.js.map +1 -1
- package/build/__tests__/integration/tap-strategies.test.js +2 -36
- package/build/__tests__/integration/tap-strategies.test.js.map +1 -1
- package/build/__tests__/integration/text-input.test.js +0 -39
- package/build/__tests__/integration/text-input.test.js.map +1 -1
- package/build/__tests__/integration/tools.test.js +1 -7
- package/build/__tests__/integration/tools.test.js.map +1 -1
- package/build/__tests__/setup.js +0 -2
- package/build/__tests__/setup.js.map +1 -1
- package/build/__tests__/unit/androidEmulatorAvds.test.js +0 -10
- package/build/__tests__/unit/androidEmulatorAvds.test.js.map +1 -1
- package/build/__tests__/unit/androidPinch.test.d.ts +2 -0
- package/build/__tests__/unit/androidPinch.test.d.ts.map +1 -0
- package/build/__tests__/unit/androidPinch.test.js +119 -0
- package/build/__tests__/unit/androidPinch.test.js.map +1 -0
- package/build/__tests__/unit/appContext.test.js +0 -2
- package/build/__tests__/unit/appContext.test.js.map +1 -1
- package/build/__tests__/unit/appRequest.test.js +0 -3
- package/build/__tests__/unit/appRequest.test.js.map +1 -1
- package/build/__tests__/unit/buildToken.test.js +0 -6
- package/build/__tests__/unit/buildToken.test.js.map +1 -1
- package/build/__tests__/unit/burst.test.js +0 -1
- package/build/__tests__/unit/burst.test.js.map +1 -1
- package/build/__tests__/unit/clearLogsNative.test.js +0 -8
- package/build/__tests__/unit/clearLogsNative.test.js.map +1 -1
- package/build/__tests__/unit/componentFormatNaming.test.js +0 -13
- package/build/__tests__/unit/componentFormatNaming.test.js.map +1 -1
- package/build/__tests__/unit/componentSource.test.js +0 -4
- package/build/__tests__/unit/componentSource.test.js.map +1 -1
- package/build/__tests__/unit/componentSourceResolve.test.js +0 -1
- package/build/__tests__/unit/componentSourceResolve.test.js.map +1 -1
- package/build/__tests__/unit/contextWiring.test.js +0 -3
- package/build/__tests__/unit/contextWiring.test.js.map +1 -1
- package/build/__tests__/unit/coordinateMiss.test.js +0 -16
- package/build/__tests__/unit/coordinateMiss.test.js.map +1 -1
- package/build/__tests__/unit/deviceDiscovery.test.js +0 -4
- package/build/__tests__/unit/deviceDiscovery.test.js.map +1 -1
- package/build/__tests__/unit/deviceResolution.test.js +0 -2
- package/build/__tests__/unit/deviceResolution.test.js.map +1 -1
- package/build/__tests__/unit/deviceResolver.test.js +0 -1
- package/build/__tests__/unit/deviceResolver.test.js.map +1 -1
- package/build/__tests__/unit/deviceResolverStaleRetry.test.js +0 -8
- package/build/__tests__/unit/deviceResolverStaleRetry.test.js.map +1 -1
- package/build/__tests__/unit/emulatorBridge.test.d.ts +2 -0
- package/build/__tests__/unit/emulatorBridge.test.d.ts.map +1 -0
- package/build/__tests__/unit/emulatorBridge.test.js +76 -0
- package/build/__tests__/unit/emulatorBridge.test.js.map +1 -0
- package/build/__tests__/unit/emulatorGrpc.test.d.ts +2 -0
- package/build/__tests__/unit/emulatorGrpc.test.d.ts.map +1 -0
- package/build/__tests__/unit/emulatorGrpc.test.js +33 -0
- package/build/__tests__/unit/emulatorGrpc.test.js.map +1 -0
- package/build/__tests__/unit/epochRender.test.js +0 -3
- package/build/__tests__/unit/epochRender.test.js.map +1 -1
- package/build/__tests__/unit/errorCategorization.test.js +0 -18
- package/build/__tests__/unit/errorCategorization.test.js.map +1 -1
- package/build/__tests__/unit/exec.test.js +0 -1
- package/build/__tests__/unit/exec.test.js.map +1 -1
- package/build/__tests__/unit/executor.test.js +0 -15
- package/build/__tests__/unit/executor.test.js.map +1 -1
- package/build/__tests__/unit/findElementTreeReuse.test.js +0 -12
- package/build/__tests__/unit/findElementTreeReuse.test.js.map +1 -1
- package/build/__tests__/unit/fingerprint.test.js +0 -4
- package/build/__tests__/unit/fingerprint.test.js.map +1 -1
- package/build/__tests__/unit/focusedInputTools.test.js +0 -4
- package/build/__tests__/unit/focusedInputTools.test.js.map +1 -1
- package/build/__tests__/unit/getLogsEmptyContract.test.js +0 -30
- package/build/__tests__/unit/getLogsEmptyContract.test.js.map +1 -1
- package/build/__tests__/unit/getLogsNativeSource.test.js +0 -22
- package/build/__tests__/unit/getLogsNativeSource.test.js.map +1 -1
- package/build/__tests__/unit/graphqlOperation.test.d.ts +2 -0
- package/build/__tests__/unit/graphqlOperation.test.d.ts.map +1 -0
- package/build/__tests__/unit/graphqlOperation.test.js +107 -0
- package/build/__tests__/unit/graphqlOperation.test.js.map +1 -0
- package/build/__tests__/unit/inputTarget.test.js +0 -16
- package/build/__tests__/unit/inputTarget.test.js.map +1 -1
- package/build/__tests__/unit/inputTextTool.test.js +0 -3
- package/build/__tests__/unit/inputTextTool.test.js.map +1 -1
- package/build/__tests__/unit/jsLogEvents.test.js +0 -3
- package/build/__tests__/unit/jsLogEvents.test.js.map +1 -1
- package/build/__tests__/unit/keyboardMetrics.test.js +0 -2
- package/build/__tests__/unit/keyboardMetrics.test.js.map +1 -1
- package/build/__tests__/unit/keyboardRaise.test.js +0 -2
- package/build/__tests__/unit/keyboardRaise.test.js.map +1 -1
- package/build/__tests__/unit/licenseGrace.test.js +1 -4
- package/build/__tests__/unit/licenseGrace.test.js.map +1 -1
- package/build/__tests__/unit/logEventFormat.test.js +0 -27
- package/build/__tests__/unit/logEventFormat.test.js.map +1 -1
- package/build/__tests__/unit/logEvents.test.js +1 -5
- package/build/__tests__/unit/logEvents.test.js.map +1 -1
- package/build/__tests__/unit/logGrouping.test.js +0 -2
- package/build/__tests__/unit/logGrouping.test.js.map +1 -1
- package/build/__tests__/unit/logOwnership.test.js +0 -11
- package/build/__tests__/unit/logOwnership.test.js.map +1 -1
- package/build/__tests__/unit/logRelevance.test.js +0 -6
- package/build/__tests__/unit/logRelevance.test.js.map +1 -1
- package/build/__tests__/unit/logSourceAndroid.test.js +0 -4
- package/build/__tests__/unit/logSourceAndroid.test.js.map +1 -1
- package/build/__tests__/unit/logSourceIos.test.js +0 -5
- package/build/__tests__/unit/logSourceIos.test.js.map +1 -1
- package/build/__tests__/unit/logs.test.js +0 -1
- package/build/__tests__/unit/logs.test.js.map +1 -1
- package/build/__tests__/unit/measureComponentTools.test.js +0 -1
- package/build/__tests__/unit/measureComponentTools.test.js.map +1 -1
- package/build/__tests__/unit/metro.test.js +0 -2
- package/build/__tests__/unit/metro.test.js.map +1 -1
- package/build/__tests__/unit/nativeInputValue.test.js +0 -4
- package/build/__tests__/unit/nativeInputValue.test.js.map +1 -1
- package/build/__tests__/unit/nativeLogs.test.js +1 -23
- package/build/__tests__/unit/nativeLogs.test.js.map +1 -1
- package/build/__tests__/unit/navigateVerify.test.js +0 -6
- package/build/__tests__/unit/navigateVerify.test.js.map +1 -1
- package/build/__tests__/unit/navigation.test.js +0 -5
- package/build/__tests__/unit/navigation.test.js.map +1 -1
- package/build/__tests__/unit/networkInterceptor.test.js +0 -2
- package/build/__tests__/unit/networkInterceptor.test.js.map +1 -1
- package/build/__tests__/unit/overlayGuard.test.d.ts +2 -0
- package/build/__tests__/unit/overlayGuard.test.d.ts.map +1 -0
- package/build/__tests__/unit/overlayGuard.test.js +123 -0
- package/build/__tests__/unit/overlayGuard.test.js.map +1 -0
- package/build/__tests__/unit/pendingExecutions.test.js +0 -6
- package/build/__tests__/unit/pendingExecutions.test.js.map +1 -1
- package/build/__tests__/unit/pinchGeometry.test.d.ts +2 -0
- package/build/__tests__/unit/pinchGeometry.test.d.ts.map +1 -0
- package/build/__tests__/unit/pinchGeometry.test.js +139 -0
- package/build/__tests__/unit/pinchGeometry.test.js.map +1 -0
- package/build/__tests__/unit/pinchTool.test.d.ts +2 -0
- package/build/__tests__/unit/pinchTool.test.d.ts.map +1 -0
- package/build/__tests__/unit/pinchTool.test.js +39 -0
- package/build/__tests__/unit/pinchTool.test.js.map +1 -0
- package/build/__tests__/unit/probe.test.js +0 -1
- package/build/__tests__/unit/probe.test.js.map +1 -1
- package/build/__tests__/unit/projectMemory.test.js +6 -7
- package/build/__tests__/unit/projectMemory.test.js.map +1 -1
- package/build/__tests__/unit/projectStore.test.js +2 -2
- package/build/__tests__/unit/projectStore.test.js.map +1 -1
- package/build/__tests__/unit/reloadAppAutoConnect.test.js +0 -9
- package/build/__tests__/unit/reloadAppAutoConnect.test.js.map +1 -1
- package/build/__tests__/unit/rnGlobalsBootstrap.test.js +3 -3
- package/build/__tests__/unit/rnGlobalsBootstrap.test.js.map +1 -1
- package/build/__tests__/unit/routeHistory.test.d.ts +2 -0
- package/build/__tests__/unit/routeHistory.test.d.ts.map +1 -0
- package/build/__tests__/unit/routeHistory.test.js +136 -0
- package/build/__tests__/unit/routeHistory.test.js.map +1 -0
- package/build/__tests__/unit/screenSpace.test.js +30 -13
- package/build/__tests__/unit/screenSpace.test.js.map +1 -1
- package/build/__tests__/unit/screenState.test.js +3 -6
- package/build/__tests__/unit/screenState.test.js.map +1 -1
- package/build/__tests__/unit/screenStateInputValue.test.js +0 -7
- package/build/__tests__/unit/screenStateInputValue.test.js.map +1 -1
- package/build/__tests__/unit/screenStateKeyboard.test.js +0 -1
- package/build/__tests__/unit/screenStateKeyboard.test.js.map +1 -1
- package/build/__tests__/unit/screenshot-diff.test.js +0 -6
- package/build/__tests__/unit/screenshot-diff.test.js.map +1 -1
- package/build/__tests__/unit/sdkMirrorPoller.test.js +0 -8
- package/build/__tests__/unit/sdkMirrorPoller.test.js.map +1 -1
- package/build/__tests__/unit/settleAndDiff.test.js +0 -11
- package/build/__tests__/unit/settleAndDiff.test.js.map +1 -1
- package/build/__tests__/unit/signedVerdict.test.js +0 -5
- package/build/__tests__/unit/signedVerdict.test.js.map +1 -1
- package/build/__tests__/unit/swipeDirection.test.js +6 -9
- package/build/__tests__/unit/swipeDirection.test.js.map +1 -1
- package/build/__tests__/unit/symbolicate.test.js +0 -1
- package/build/__tests__/unit/symbolicate.test.js.map +1 -1
- package/build/__tests__/unit/tap.test.js +2 -40
- package/build/__tests__/unit/tap.test.js.map +1 -1
- package/build/__tests__/unit/textEntry.test.js +0 -27
- package/build/__tests__/unit/textEntry.test.js.map +1 -1
- package/build/__tests__/unit/toolDescriptions.test.js +0 -40
- package/build/__tests__/unit/toolDescriptions.test.js.map +1 -1
- package/build/__tests__/unit/toolsJson.test.js +0 -10
- package/build/__tests__/unit/toolsJson.test.js.map +1 -1
- package/build/__tests__/unit/transportClassify.test.js +0 -20
- package/build/__tests__/unit/transportClassify.test.js.map +1 -1
- package/build/__tests__/unit/truncate.test.js +0 -5
- package/build/__tests__/unit/truncate.test.js.map +1 -1
- package/build/__tests__/unit/usageCache.test.js +0 -3
- package/build/__tests__/unit/usageCache.test.js.map +1 -1
- package/build/__tests__/unit/usageGate.test.js +1 -1
- package/build/__tests__/unit/usageGate.test.js.map +1 -1
- package/build/__tests__/unit/visibility.test.js +0 -8
- package/build/__tests__/unit/visibility.test.js.map +1 -1
- package/build/__tests__/unit/waitForMeasurements.test.js +2 -7
- package/build/__tests__/unit/waitForMeasurements.test.js.map +1 -1
- package/build/bin.js +0 -18
- package/build/bin.js.map +1 -1
- package/build/core/android.d.ts +0 -120
- package/build/core/android.d.ts.map +1 -1
- package/build/core/android.js +4 -259
- package/build/core/android.js.map +1 -1
- package/build/core/androidPinch.d.ts +21 -0
- package/build/core/androidPinch.d.ts.map +1 -0
- package/build/core/androidPinch.js +72 -0
- package/build/core/androidPinch.js.map +1 -0
- package/build/core/androidSystemBars.d.ts +7 -0
- package/build/core/androidSystemBars.d.ts.map +1 -0
- package/build/core/androidSystemBars.js +21 -0
- package/build/core/androidSystemBars.js.map +1 -0
- package/build/core/appContext.d.ts +0 -50
- package/build/core/appContext.d.ts.map +1 -1
- package/build/core/appContext.js +0 -50
- package/build/core/appContext.js.map +1 -1
- package/build/core/appDetection.d.ts +0 -16
- package/build/core/appDetection.d.ts.map +1 -1
- package/build/core/appDetection.js +0 -36
- package/build/core/appDetection.js.map +1 -1
- package/build/core/appRequest.d.ts +0 -12
- package/build/core/appRequest.d.ts.map +1 -1
- package/build/core/appRequest.js +0 -15
- package/build/core/appRequest.js.map +1 -1
- package/build/core/bufferConfig.d.ts +0 -2
- package/build/core/bufferConfig.d.ts.map +1 -1
- package/build/core/bufferConfig.js +0 -2
- package/build/core/bufferConfig.js.map +1 -1
- package/build/core/bundle.js +0 -40
- package/build/core/bundle.js.map +1 -1
- package/build/core/componentSearch.d.ts +0 -19
- package/build/core/componentSearch.d.ts.map +1 -1
- package/build/core/componentSearch.js +1 -22
- package/build/core/componentSearch.js.map +1 -1
- package/build/core/componentSource.d.ts +0 -21
- package/build/core/componentSource.d.ts.map +1 -1
- package/build/core/componentSource.js +0 -27
- package/build/core/componentSource.js.map +1 -1
- package/build/core/componentTree.js +0 -12
- package/build/core/componentTree.js.map +1 -1
- package/build/core/config.d.ts +0 -8
- package/build/core/config.d.ts.map +1 -1
- package/build/core/config.js +0 -10
- package/build/core/config.js.map +1 -1
- package/build/core/connection.d.ts +0 -76
- package/build/core/connection.d.ts.map +1 -1
- package/build/core/connection.js +15 -340
- package/build/core/connection.js.map +1 -1
- package/build/core/connectionState.d.ts +0 -78
- package/build/core/connectionState.d.ts.map +1 -1
- package/build/core/connectionState.js +4 -92
- package/build/core/connectionState.js.map +1 -1
- package/build/core/debugGlobals.js +0 -68
- package/build/core/debugGlobals.js.map +1 -1
- package/build/core/deviceDiscovery.d.ts +0 -5
- package/build/core/deviceDiscovery.d.ts.map +1 -1
- package/build/core/deviceDiscovery.js +0 -12
- package/build/core/deviceDiscovery.js.map +1 -1
- package/build/core/deviceResolver.d.ts +0 -10
- package/build/core/deviceResolver.d.ts.map +1 -1
- package/build/core/deviceResolver.js +0 -54
- package/build/core/deviceResolver.js.map +1 -1
- package/build/core/emulatorBridge.d.ts +17 -0
- package/build/core/emulatorBridge.d.ts.map +1 -0
- package/build/core/emulatorBridge.js +78 -0
- package/build/core/emulatorBridge.js.map +1 -0
- package/build/core/emulatorGrpc.d.ts +14 -0
- package/build/core/emulatorGrpc.d.ts.map +1 -0
- package/build/core/emulatorGrpc.js +93 -0
- package/build/core/emulatorGrpc.js.map +1 -0
- package/build/core/epochRender.d.ts +0 -12
- package/build/core/epochRender.d.ts.map +1 -1
- package/build/core/epochRender.js +0 -12
- package/build/core/epochRender.js.map +1 -1
- package/build/core/errorScreenParser.d.ts +0 -21
- package/build/core/errorScreenParser.d.ts.map +1 -1
- package/build/core/errorScreenParser.js +0 -50
- package/build/core/errorScreenParser.js.map +1 -1
- package/build/core/errors.d.ts +0 -15
- package/build/core/errors.d.ts.map +1 -1
- package/build/core/errors.js +0 -15
- package/build/core/errors.js.map +1 -1
- package/build/core/escapeNonAscii.d.ts +0 -9
- package/build/core/escapeNonAscii.d.ts.map +1 -1
- package/build/core/escapeNonAscii.js +1 -43
- package/build/core/escapeNonAscii.js.map +1 -1
- package/build/core/exec.d.ts +0 -12
- package/build/core/exec.d.ts.map +1 -1
- package/build/core/exec.js +2 -14
- package/build/core/exec.js.map +1 -1
- package/build/core/executor.js +0 -3
- package/build/core/executor.js.map +1 -1
- package/build/core/fastRefreshRecorder.js +0 -4
- package/build/core/fastRefreshRecorder.js.map +1 -1
- package/build/core/fastRefreshTools.js +0 -3
- package/build/core/fastRefreshTools.js.map +1 -1
- package/build/core/feedback.js +0 -4
- package/build/core/feedback.js.map +1 -1
- package/build/core/graphqlOperation.d.ts +13 -0
- package/build/core/graphqlOperation.d.ts.map +1 -0
- package/build/core/graphqlOperation.js +80 -0
- package/build/core/graphqlOperation.js.map +1 -0
- package/build/core/guides.d.ts +0 -10
- package/build/core/guides.d.ts.map +1 -1
- package/build/core/guides.js +18 -12
- package/build/core/guides.js.map +1 -1
- package/build/core/iconSemantics.d.ts +0 -15
- package/build/core/iconSemantics.d.ts.map +1 -1
- package/build/core/iconSemantics.js +0 -31
- package/build/core/iconSemantics.js.map +1 -1
- package/build/core/index.d.ts +2 -0
- package/build/core/index.d.ts.map +1 -1
- package/build/core/index.js +5 -47
- package/build/core/index.js.map +1 -1
- package/build/core/injected/visibility.d.ts +0 -30
- package/build/core/injected/visibility.d.ts.map +1 -1
- package/build/core/injected/visibility.js +0 -33
- package/build/core/injected/visibility.js.map +1 -1
- package/build/core/injectedFilters.d.ts +0 -28
- package/build/core/injectedFilters.d.ts.map +1 -1
- package/build/core/injectedFilters.js +0 -28
- package/build/core/injectedFilters.js.map +1 -1
- package/build/core/inputTarget.d.ts +1 -34
- package/build/core/inputTarget.d.ts.map +1 -1
- package/build/core/inputTarget.js +0 -26
- package/build/core/inputTarget.js.map +1 -1
- package/build/core/inputTargetTools.d.ts +0 -7
- package/build/core/inputTargetTools.d.ts.map +1 -1
- package/build/core/inputTargetTools.js +0 -7
- package/build/core/inputTargetTools.js.map +1 -1
- package/build/core/inspector.d.ts +0 -33
- package/build/core/inspector.d.ts.map +1 -1
- package/build/core/inspector.js +27 -40
- package/build/core/inspector.js.map +1 -1
- package/build/core/ios.d.ts +11 -122
- package/build/core/ios.d.ts.map +1 -1
- package/build/core/ios.js +32 -299
- package/build/core/ios.js.map +1 -1
- package/build/core/jsExecute.d.ts +0 -100
- package/build/core/jsExecute.d.ts.map +1 -1
- package/build/core/jsExecute.js +0 -261
- package/build/core/jsExecute.js.map +1 -1
- package/build/core/jsLogEvents.d.ts +0 -8
- package/build/core/jsLogEvents.d.ts.map +1 -1
- package/build/core/jsLogEvents.js +0 -8
- package/build/core/jsLogEvents.js.map +1 -1
- package/build/core/keyboardMetrics.js +0 -8
- package/build/core/keyboardMetrics.js.map +1 -1
- package/build/core/keyboardRaise.d.ts +0 -8
- package/build/core/keyboardRaise.d.ts.map +1 -1
- package/build/core/keyboardRaise.js +0 -23
- package/build/core/keyboardRaise.js.map +1 -1
- package/build/core/license.d.ts +0 -4
- package/build/core/license.d.ts.map +1 -1
- package/build/core/license.js +2 -55
- package/build/core/license.js.map +1 -1
- package/build/core/logDiagnosis.d.ts +0 -34
- package/build/core/logDiagnosis.d.ts.map +1 -1
- package/build/core/logDiagnosis.js +0 -15
- package/build/core/logDiagnosis.js.map +1 -1
- package/build/core/logEventFormat.d.ts +0 -1
- package/build/core/logEventFormat.d.ts.map +1 -1
- package/build/core/logEventFormat.js +0 -30
- package/build/core/logEventFormat.js.map +1 -1
- package/build/core/logEvents.d.ts +0 -54
- package/build/core/logEvents.d.ts.map +1 -1
- package/build/core/logEvents.js +0 -37
- package/build/core/logEvents.js.map +1 -1
- package/build/core/logGrouping.d.ts +0 -9
- package/build/core/logGrouping.d.ts.map +1 -1
- package/build/core/logGrouping.js +0 -17
- package/build/core/logGrouping.js.map +1 -1
- package/build/core/logOwnership.d.ts +0 -17
- package/build/core/logOwnership.d.ts.map +1 -1
- package/build/core/logOwnership.js +0 -34
- package/build/core/logOwnership.js.map +1 -1
- package/build/core/logRelevance.d.ts +0 -8
- package/build/core/logRelevance.d.ts.map +1 -1
- package/build/core/logRelevance.js +0 -15
- package/build/core/logRelevance.js.map +1 -1
- package/build/core/logSourceAndroid.d.ts +0 -8
- package/build/core/logSourceAndroid.d.ts.map +1 -1
- package/build/core/logSourceAndroid.js +0 -11
- package/build/core/logSourceAndroid.js.map +1 -1
- package/build/core/logSourceIos.d.ts +0 -8
- package/build/core/logSourceIos.d.ts.map +1 -1
- package/build/core/logSourceIos.js +1 -24
- package/build/core/logSourceIos.js.map +1 -1
- package/build/core/logbox.d.ts +0 -30
- package/build/core/logbox.d.ts.map +1 -1
- package/build/core/logbox.js +0 -43
- package/build/core/logbox.js.map +1 -1
- package/build/core/logs.d.ts +0 -6
- package/build/core/logs.d.ts.map +1 -1
- package/build/core/logs.js +0 -19
- package/build/core/logs.js.map +1 -1
- package/build/core/metro.d.ts +0 -14
- package/build/core/metro.d.ts.map +1 -1
- package/build/core/metro.js +1 -32
- package/build/core/metro.js.map +1 -1
- package/build/core/moduleRegistry.d.ts +0 -17
- package/build/core/moduleRegistry.d.ts.map +1 -1
- package/build/core/moduleRegistry.js +0 -17
- package/build/core/moduleRegistry.js.map +1 -1
- package/build/core/nativeInputValue.d.ts +0 -29
- package/build/core/nativeInputValue.d.ts.map +1 -1
- package/build/core/nativeInputValue.js +0 -18
- package/build/core/nativeInputValue.js.map +1 -1
- package/build/core/nativeLogs.d.ts +0 -47
- package/build/core/nativeLogs.d.ts.map +1 -1
- package/build/core/nativeLogs.js +0 -82
- package/build/core/nativeLogs.js.map +1 -1
- package/build/core/nativeOnlyHints.js +0 -4
- package/build/core/nativeOnlyHints.js.map +1 -1
- package/build/core/navigate.d.ts +0 -15
- package/build/core/navigate.d.ts.map +1 -1
- package/build/core/navigate.js +0 -22
- package/build/core/navigate.js.map +1 -1
- package/build/core/navigation.d.ts +0 -60
- package/build/core/navigation.d.ts.map +1 -1
- package/build/core/navigation.js +0 -60
- package/build/core/navigation.js.map +1 -1
- package/build/core/network.d.ts +0 -5
- package/build/core/network.d.ts.map +1 -1
- package/build/core/network.js +10 -31
- package/build/core/network.js.map +1 -1
- package/build/core/networkInterceptor.d.ts +0 -19
- package/build/core/networkInterceptor.d.ts.map +1 -1
- package/build/core/networkInterceptor.js +3 -27
- package/build/core/networkInterceptor.js.map +1 -1
- package/build/core/ocr.d.ts +0 -31
- package/build/core/ocr.d.ts.map +1 -1
- package/build/core/ocr.js +1 -71
- package/build/core/ocr.js.map +1 -1
- package/build/core/paths.js +0 -1
- package/build/core/paths.js.map +1 -1
- package/build/core/pinchGeometry.d.ts +28 -0
- package/build/core/pinchGeometry.d.ts.map +1 -0
- package/build/core/pinchGeometry.js +97 -0
- package/build/core/pinchGeometry.js.map +1 -0
- package/build/core/pinchThresholds.d.ts +14 -0
- package/build/core/pinchThresholds.d.ts.map +1 -0
- package/build/core/pinchThresholds.js +9 -0
- package/build/core/pinchThresholds.js.map +1 -0
- package/build/core/posthog.js +0 -7
- package/build/core/posthog.js.map +1 -1
- package/build/core/pressables.d.ts +0 -25
- package/build/core/pressables.d.ts.map +1 -1
- package/build/core/pressables.js +0 -37
- package/build/core/pressables.js.map +1 -1
- package/build/core/probe.d.ts +0 -9
- package/build/core/probe.d.ts.map +1 -1
- package/build/core/probe.js +0 -9
- package/build/core/probe.js.map +1 -1
- package/build/core/projectMemory.d.ts +0 -2
- package/build/core/projectMemory.d.ts.map +1 -1
- package/build/core/projectMemory.js +2 -7
- package/build/core/projectMemory.js.map +1 -1
- package/build/core/projectStore.d.ts +0 -18
- package/build/core/projectStore.d.ts.map +1 -1
- package/build/core/projectStore.js +0 -19
- package/build/core/projectStore.js.map +1 -1
- package/build/core/promiseHandles.d.ts +0 -13
- package/build/core/promiseHandles.d.ts.map +1 -1
- package/build/core/promiseHandles.js +0 -25
- package/build/core/promiseHandles.js.map +1 -1
- package/build/core/register.js +0 -44
- package/build/core/register.js.map +1 -1
- package/build/core/rnGlobalsBootstrap.d.ts +0 -13
- package/build/core/rnGlobalsBootstrap.d.ts.map +1 -1
- package/build/core/rnGlobalsBootstrap.js +0 -22
- package/build/core/rnGlobalsBootstrap.js.map +1 -1
- package/build/core/routeHistory.d.ts +24 -0
- package/build/core/routeHistory.d.ts.map +1 -0
- package/build/core/routeHistory.js +186 -0
- package/build/core/routeHistory.js.map +1 -0
- package/build/core/screenLayout.d.ts +0 -11
- package/build/core/screenLayout.d.ts.map +1 -1
- package/build/core/screenLayout.js +24 -61
- package/build/core/screenLayout.js.map +1 -1
- package/build/core/screenSpace.d.ts +32 -44
- package/build/core/screenSpace.d.ts.map +1 -1
- package/build/core/screenSpace.js +80 -46
- package/build/core/screenSpace.js.map +1 -1
- package/build/core/screenSpaceDevice.d.ts +0 -8
- package/build/core/screenSpaceDevice.d.ts.map +1 -1
- package/build/core/screenSpaceDevice.js +31 -14
- package/build/core/screenSpaceDevice.js.map +1 -1
- package/build/core/screenState.d.ts +2 -74
- package/build/core/screenState.d.ts.map +1 -1
- package/build/core/screenState.js +204 -145
- package/build/core/screenState.js.map +1 -1
- package/build/core/sdkBridge.js +0 -8
- package/build/core/sdkBridge.js.map +1 -1
- package/build/core/sdkMirrorPoller.d.ts +0 -18
- package/build/core/sdkMirrorPoller.d.ts.map +1 -1
- package/build/core/sdkMirrorPoller.js +0 -47
- package/build/core/sdkMirrorPoller.js.map +1 -1
- package/build/core/selectionBuffer.d.ts +0 -6
- package/build/core/selectionBuffer.d.ts.map +1 -1
- package/build/core/selectionBuffer.js +0 -5
- package/build/core/selectionBuffer.js.map +1 -1
- package/build/core/signedVerdict.js +0 -6
- package/build/core/signedVerdict.js.map +1 -1
- package/build/core/state.d.ts +0 -31
- package/build/core/state.d.ts.map +1 -1
- package/build/core/state.js +0 -57
- package/build/core/state.js.map +1 -1
- package/build/core/symbolicate.js +0 -11
- package/build/core/symbolicate.js.map +1 -1
- package/build/core/telemetry.d.ts +0 -47
- package/build/core/telemetry.d.ts.map +1 -1
- package/build/core/telemetry.js +1 -173
- package/build/core/telemetry.js.map +1 -1
- package/build/core/textEntry.d.ts +0 -34
- package/build/core/textEntry.d.ts.map +1 -1
- package/build/core/textEntry.js +0 -73
- package/build/core/textEntry.js.map +1 -1
- package/build/core/toolHelpers.d.ts +0 -12
- package/build/core/toolHelpers.d.ts.map +1 -1
- package/build/core/toolHelpers.js +2 -47
- package/build/core/toolHelpers.js.map +1 -1
- package/build/core/truncate.d.ts +0 -17
- package/build/core/truncate.d.ts.map +1 -1
- package/build/core/truncate.js +0 -32
- package/build/core/truncate.js.map +1 -1
- package/build/core/types.d.ts +0 -6
- package/build/core/types.d.ts.map +1 -1
- package/build/core/usageCache.js +0 -12
- package/build/core/usageCache.js.map +1 -1
- package/build/index.js +0 -18
- package/build/index.js.map +1 -1
- package/build/pro/coordinateMiss.d.ts +0 -30
- package/build/pro/coordinateMiss.d.ts.map +1 -1
- package/build/pro/coordinateMiss.js +0 -17
- package/build/pro/coordinateMiss.js.map +1 -1
- package/build/pro/overlayGuard.d.ts +27 -0
- package/build/pro/overlayGuard.d.ts.map +1 -0
- package/build/pro/overlayGuard.js +103 -0
- package/build/pro/overlayGuard.js.map +1 -0
- package/build/pro/screenshot-diff.js +4 -6
- package/build/pro/screenshot-diff.js.map +1 -1
- package/build/pro/tap.d.ts +0 -55
- package/build/pro/tap.d.ts.map +1 -1
- package/build/pro/tap.js +72 -316
- package/build/pro/tap.js.map +1 -1
- package/build/pro/usageGate.js +0 -9
- package/build/pro/usageGate.js.map +1 -1
- package/build/pro/usageNotifications.js +1 -13
- package/build/pro/usageNotifications.js.map +1 -1
- package/build/pro/verifyAction.d.ts +0 -13
- package/build/pro/verifyAction.d.ts.map +1 -1
- package/build/pro/verifyAction.js +0 -45
- package/build/pro/verifyAction.js.map +1 -1
- package/build/tools/_deviceArg.d.ts +0 -35
- package/build/tools/_deviceArg.d.ts.map +1 -1
- package/build/tools/_deviceArg.js +0 -35
- package/build/tools/_deviceArg.js.map +1 -1
- package/build/tools/accountTools.js +2 -2
- package/build/tools/accountTools.js.map +1 -1
- package/build/tools/bundleTools.js +0 -16
- package/build/tools/bundleTools.js.map +1 -1
- package/build/tools/componentTools.d.ts.map +1 -1
- package/build/tools/componentTools.js +47 -53
- package/build/tools/componentTools.js.map +1 -1
- package/build/tools/connectionTools.js +1 -59
- package/build/tools/connectionTools.js.map +1 -1
- package/build/tools/deviceTools.js +0 -11
- package/build/tools/deviceTools.js.map +1 -1
- package/build/tools/executionTools.js +1 -18
- package/build/tools/executionTools.js.map +1 -1
- package/build/tools/interactionTools.d.ts +0 -10
- package/build/tools/interactionTools.d.ts.map +1 -1
- package/build/tools/interactionTools.js +190 -59
- package/build/tools/interactionTools.js.map +1 -1
- package/build/tools/logTools.d.ts +0 -13
- package/build/tools/logTools.d.ts.map +1 -1
- package/build/tools/logTools.js +2 -126
- package/build/tools/logTools.js.map +1 -1
- package/build/tools/metaTools.js +0 -10
- package/build/tools/metaTools.js.map +1 -1
- package/build/tools/networkTools.js +4 -43
- package/build/tools/networkTools.js.map +1 -1
- package/build/tools/requestTools.js +0 -5
- package/build/tools/requestTools.js.map +1 -1
- package/build/tools/screenshotTools.js +5 -111
- package/build/tools/screenshotTools.js.map +1 -1
- package/package.json +2 -2
- package/tools.json +16 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metaTools.js","sourceRoot":"","sources":["../../src/tools/metaTools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAE5C,OAAO,EAAE,yBAAyB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACvH,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,g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OAAO,EAAE,IAAI;aAChB,CAAC;QACN,CAAC,CACJ,CAAC;IACN,CAAC;AACL,CAAC"}
|
|
@@ -9,11 +9,6 @@ import { refreshMirror } from "../core/sdkMirrorPoller.js";
|
|
|
9
9
|
import { withRestartDividers, evictionNotice, resolveEpochFilter } from "../core/epochRender.js";
|
|
10
10
|
import { formatRequest } from "../core/network.js";
|
|
11
11
|
import { DEVICE_ALL_DESC } from "./_deviceArg.js";
|
|
12
|
-
// Network capture has no end-to-end probe equivalent to verifyLogPipeline, so
|
|
13
|
-
// the "connected but nothing captured" verdict is always unverified: a silently
|
|
14
|
-
// dead interceptor is indistinguishable from an idle app. Labelled honestly
|
|
15
|
-
// rather than reported as a clean "no requests". Options for an actual probe
|
|
16
|
-
// are drafted in docs/devtools-core/specs/2026-07-29-network-capture-verification-design.md
|
|
17
12
|
const NETWORK_EMPTY_LABELS = {
|
|
18
13
|
verified: "no_requests_verified",
|
|
19
14
|
unverified: "no_requests_unverified"
|
|
@@ -25,7 +20,6 @@ function networkDiagnosisDeps(device) {
|
|
|
25
20
|
};
|
|
26
21
|
}
|
|
27
22
|
export function registerNetworkTools(server) {
|
|
28
|
-
// Tool: Get network requests
|
|
29
23
|
registerToolWithTelemetry(server, "get_network_requests", {
|
|
30
24
|
description: "Retrieve captured network requests from connected React Native app. Shows URL, method, status, and timing. Note: On Bridgeless targets (Expo SDK 52+) without the SDK, capture may miss early startup requests. Install execbro-sdk for full capture with headers and response bodies. Tip: Use summary=true first for stats overview.\n" +
|
|
31
25
|
"PURPOSE: Inspect HTTP traffic the app made since connection — URLs, methods, status codes, and timings — to debug API, auth, and caching issues.\n" +
|
|
@@ -41,7 +35,7 @@ export function registerNetworkTools(server) {
|
|
|
41
35
|
.default(50)
|
|
42
36
|
.describe("Maximum number of requests to return (default: 50)"),
|
|
43
37
|
method: z.string().optional().describe("Filter by HTTP method (GET, POST, PUT, DELETE, etc.)"),
|
|
44
|
-
urlPattern: z.string().optional().describe("Filter by URL pattern (case-insensitive substring match)"),
|
|
38
|
+
urlPattern: z.string().optional().describe("Filter by URL pattern (case-insensitive substring match). Also matches GraphQL operation names (e.g. \"GetCharacters\"), since every GraphQL call shares one URL."),
|
|
45
39
|
status: z.number().optional().describe("Filter by HTTP status code (e.g., 200, 401, 500)"),
|
|
46
40
|
summary: z
|
|
47
41
|
.boolean()
|
|
@@ -55,18 +49,11 @@ export function registerNetworkTools(server) {
|
|
|
55
49
|
.describe("Filter by app run. 'current' = the live run only; a number targets a specific run; omit or 'all' for everything including pre-restart data (default).")
|
|
56
50
|
}
|
|
57
51
|
}, async ({ maxRequests, method, urlPattern, status, summary, device, epoch }) => {
|
|
58
|
-
// The buffer is a superset of the SDK's in-app buffer (mirrored), the
|
|
59
|
-
// CDP domain and the JS interceptor, and it retains prior app runs.
|
|
60
|
-
// Refresh it first so this read is as current as a live SDK query.
|
|
61
52
|
await refreshMirror(device);
|
|
62
|
-
// Kept only for the "install the SDK" hint on an empty result.
|
|
63
53
|
const sdkAvailable = await isSDKInstalled(device);
|
|
64
|
-
// Return summary if requested
|
|
65
54
|
if (summary) {
|
|
66
55
|
const buffer = resolveNetworkBuffer(device);
|
|
67
56
|
const stats = getNetworkStats(buffer);
|
|
68
|
-
// Judge emptiness by the buffer this summary was built from, not
|
|
69
|
-
// the global count across every device.
|
|
70
57
|
const summaryEmpty = buffer.size === 0;
|
|
71
58
|
let connectionWarning = "";
|
|
72
59
|
let emptyReason;
|
|
@@ -90,8 +77,6 @@ export function registerNetworkTools(server) {
|
|
|
90
77
|
]
|
|
91
78
|
};
|
|
92
79
|
}
|
|
93
|
-
// Resolved once: for the all-devices case this copies every buffered
|
|
94
|
-
// entry into a merged buffer, so it is not free to call repeatedly.
|
|
95
80
|
const networkBuffer = resolveNetworkBuffer(device);
|
|
96
81
|
const requests = networkBuffer.getAll({
|
|
97
82
|
count: maxRequests,
|
|
@@ -104,18 +89,10 @@ export function registerNetworkTools(server) {
|
|
|
104
89
|
const formatted = count === 0
|
|
105
90
|
? "No network requests captured yet."
|
|
106
91
|
: withRestartDividers(requests, formatRequest);
|
|
107
|
-
// `_emptyResult` measures CAPTURE reliability, not whether this
|
|
108
|
-
// particular call returned rows — see the 2026-03-19 empty-result
|
|
109
|
-
// spec. Filters matching nothing is a natural outcome, reported via
|
|
110
|
-
// `_emptyReason` without setting the empty flag.
|
|
111
92
|
const bufferEmpty = networkBuffer.size === 0;
|
|
112
|
-
// Check connection health
|
|
113
93
|
let connectionWarning = "";
|
|
114
94
|
let emptyReason;
|
|
115
95
|
if (count === 0) {
|
|
116
|
-
// Capture is demonstrably working if the buffer holds anything —
|
|
117
|
-
// the method/url/status filters simply matched none of it. Report
|
|
118
|
-
// that directly instead of probing the connection and blaming it.
|
|
119
96
|
if (!bufferEmpty) {
|
|
120
97
|
emptyReason = "filtered_out";
|
|
121
98
|
}
|
|
@@ -135,8 +112,7 @@ export function registerNetworkTools(server) {
|
|
|
135
112
|
? "\n\n[CONNECTION] Disconnected. Showing cached data. New data is not being captured."
|
|
136
113
|
: "";
|
|
137
114
|
}
|
|
138
|
-
|
|
139
|
-
const warningThresholdMs = 30000; // 30 seconds
|
|
115
|
+
const warningThresholdMs = 30000;
|
|
140
116
|
const recentGaps = getRecentGaps(warningThresholdMs);
|
|
141
117
|
let gapWarning = "";
|
|
142
118
|
if (recentGaps.length > 0) {
|
|
@@ -160,13 +136,8 @@ export function registerNetworkTools(server) {
|
|
|
160
136
|
}
|
|
161
137
|
]
|
|
162
138
|
};
|
|
163
|
-
},
|
|
164
|
-
// Fallback only — every return path above sets `_emptyResult` explicitly,
|
|
165
|
-
// which takes precedence. Retained so a future path that forgets to set it
|
|
166
|
-
// still reports something rather than nothing.
|
|
167
|
-
() => { let total = 0; for (const b of networkBuffers.values())
|
|
139
|
+
}, () => { let total = 0; for (const b of networkBuffers.values())
|
|
168
140
|
total += b.size; return total === 0; });
|
|
169
|
-
// Tool: Search network requests
|
|
170
141
|
registerToolWithTelemetry(server, "search_network", {
|
|
171
142
|
description: "Search network requests by URL pattern (case-insensitive).\n" +
|
|
172
143
|
"PURPOSE: Filter the network buffer to requests whose URL matches a substring — fast way to find a specific endpoint in a noisy app.\n" +
|
|
@@ -176,7 +147,7 @@ export function registerNetworkTools(server) {
|
|
|
176
147
|
"GOOD: search_network({ urlPattern: \"/graphql\" })\n" +
|
|
177
148
|
"BAD: search_network({ urlPattern: \"\" }) — empty pattern matches everything; use get_network_requests instead.\n",
|
|
178
149
|
inputSchema: {
|
|
179
|
-
urlPattern: z.string().describe("URL pattern to search for"),
|
|
150
|
+
urlPattern: z.string().describe("URL pattern to search for. Also matches GraphQL operation names (e.g. \"GetCharacters\") — use the operation name to find one GraphQL call among many sharing the same endpoint."),
|
|
180
151
|
maxResults: z.number().optional().default(50).describe("Maximum number of results to return (default: 50)"),
|
|
181
152
|
device: z.string().optional().describe(DEVICE_ALL_DESC)
|
|
182
153
|
}
|
|
@@ -187,7 +158,6 @@ export function registerNetworkTools(server) {
|
|
|
187
158
|
const formatted = count === 0
|
|
188
159
|
? "No network requests captured yet."
|
|
189
160
|
: withRestartDividers(matches, formatRequest);
|
|
190
|
-
// Check connection health
|
|
191
161
|
let connectionWarning = "";
|
|
192
162
|
if (count === 0) {
|
|
193
163
|
const status = await checkAndEnsureConnection(device);
|
|
@@ -209,7 +179,6 @@ export function registerNetworkTools(server) {
|
|
|
209
179
|
]
|
|
210
180
|
};
|
|
211
181
|
});
|
|
212
|
-
// Tool: Get request details
|
|
213
182
|
registerToolWithTelemetry(server, "get_request_details", {
|
|
214
183
|
description: "Get full details of a specific network request including headers, body, and timing. With the SDK installed, includes full request/response bodies. Without SDK, bodies are not available on most targets. Use get_network_requests first to find the request ID.\n" +
|
|
215
184
|
"PURPOSE: Drill into a single network entry — full request/response headers, body, status, and timing breakdown.\n" +
|
|
@@ -233,18 +202,12 @@ export function registerNetworkTools(server) {
|
|
|
233
202
|
device: z.string().optional().describe(DEVICE_ALL_DESC)
|
|
234
203
|
}
|
|
235
204
|
}, async ({ requestId, maxBodyLength, verbose, device }) => {
|
|
236
|
-
// Single source: the buffer holds mirrored SDK entries (with bodies),
|
|
237
|
-
// CDP entries and interceptor entries, across every app run. get()
|
|
238
|
-
// falls back across epochs so a pre-restart id still resolves.
|
|
239
205
|
await refreshMirror(device);
|
|
240
206
|
const request = resolveNetworkBuffer(device).get(requestId);
|
|
241
207
|
if (!request) {
|
|
242
208
|
const status = await checkAndEnsureConnection(device);
|
|
243
209
|
let connectionNote = status.message ? `\n\n${status.message}` : "";
|
|
244
210
|
connectionNote += await metroMissingHintIfAbsent("get_request_details");
|
|
245
|
-
// Enrich with up to 5 recent ids so the agent can pick a real one
|
|
246
|
-
// instead of retrying with the same stale / made-up id (telemetry
|
|
247
|
-
// shows ids like "latest", "js-x6e0-1208", "261" passed in).
|
|
248
211
|
const recent = resolveNetworkBuffer(device).getAll({ count: 5 });
|
|
249
212
|
let recentNote = "";
|
|
250
213
|
if (recent.length > 0) {
|
|
@@ -279,7 +242,6 @@ export function registerNetworkTools(server) {
|
|
|
279
242
|
]
|
|
280
243
|
};
|
|
281
244
|
});
|
|
282
|
-
// Tool: Get network stats
|
|
283
245
|
registerToolWithTelemetry(server, "clear_network", {
|
|
284
246
|
description: "Clear the network request buffer.\n" +
|
|
285
247
|
"PURPOSE: Reset the captured request list to isolate new traffic from a specific user action.\n" +
|
|
@@ -305,7 +267,6 @@ export function registerNetworkTools(server) {
|
|
|
305
267
|
totalCleared += buffer.clear();
|
|
306
268
|
}
|
|
307
269
|
}
|
|
308
|
-
// Also clear SDK buffer if available
|
|
309
270
|
const sdkAvailable = await isSDKInstalled(device);
|
|
310
271
|
if (sdkAvailable) {
|
|
311
272
|
const sdkResult = await clearSDKNetwork(device);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"networkTools.js","sourceRoot":"","sources":["../../src/tools/networkTools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yBA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,CAAC;YAChD,IAAI,SAAS,CAAC,OAAO,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC;gBACvC,YAAY,IAAI,SAAS,CAAC,KAAK,CAAC;YACpC,CAAC;QACL,CAAC;QAED,OAAO;YACH,OAAO,EAAE;gBACL;oBACI,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,WAAW,YAAY,gCAAgC;iBAChE;aACJ;SACJ,CAAC;IACN,CAAC,CACJ,CAAC;AACN,CAAC"}
|
|
@@ -48,10 +48,6 @@ export function registerRequestTools(server) {
|
|
|
48
48
|
isError: true
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
// Lift authNote out before bounding. It is the field most likely to
|
|
52
|
-
// change what the caller does next ("your 401 is because no token
|
|
53
|
-
// was found"), and the body it travels with is exactly what gets
|
|
54
|
-
// truncated — so bounding it alongside would clip the warning.
|
|
55
51
|
const raw = String(result.result ?? "");
|
|
56
52
|
let authNote;
|
|
57
53
|
let payload = raw;
|
|
@@ -64,7 +60,6 @@ export function registerRequestTools(server) {
|
|
|
64
60
|
}
|
|
65
61
|
}
|
|
66
62
|
catch {
|
|
67
|
-
// Not JSON — leave it alone.
|
|
68
63
|
}
|
|
69
64
|
const bounded = applyResultBudget(payload, maxResultLength ?? DEFAULT_MAX_BYTES);
|
|
70
65
|
const parts = [bounded.text];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestTools.js","sourceRoot":"","sources":["../../src/tools/requestTools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE3E,MAAM,UAAU,oBAAoB,CA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IAAI,OAAO,GAAG,GAAG,CAAC;QAClB,IAAI,CAAC;YACD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAA4B,CAAC;YAC1D,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;gBACtC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;gBAC3B,OAAO,MAAM,CAAC,QAAQ,CAAC;gBACvB,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACrC,CAAC;QACL,CAAC;QAAC,MAAM,CAAC;QAET,CAAC;QAED,MAAM,OAAO,GAAG,iBAAiB,CAAC,OAAO,EAAE,eAAe,IAAI,iBAAiB,CAAC,CAAC;QACjF,MAAM,KAAK,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC7B,IAAI,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;YAC3B,KAAK,CAAC,IAAI,CAAC,aAAa,OAAO,CAAC,MAAM,CAAC,aAAa,OAAO,OAAO,CAAC,MAAM,CAAC,aAAa,SAAS,CAAC,CAAC;QACtG,CAAC;QACD,IAAI,QAAQ;YAAE,KAAK,CAAC,IAAI,CAAC,YAAY,QAAQ,EAAE,CAAC,CAAC;QACjD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;IACrE,CAAC,CACJ,CAAC;AACN,CAAC"}
|
|
@@ -5,7 +5,6 @@ import { recordScreenMetrics } from "../core/projectMemory.js";
|
|
|
5
5
|
import { iosScreenshot, androidScreenshot, detectLogBox, formatLogBoxWarning, recognizeText, inferIOSDevicePixelRatio, getScreenState, formatScreenStateSummary, imageBuffer, getActiveOrBootedSimulatorUdid, connectedApps, getConnectedAppBySimulatorUdid, getConnectedAppByAndroidDeviceId, iosDescribeAll, detectIOSSystemOverlay, formatIOSSystemOverlayWarning, androidGetStatusBarHeight, androidGetDensity, } from "../core/index.js";
|
|
6
6
|
import { screenStateToScreenSpace } from "../core/screenSpace.js";
|
|
7
7
|
export function registerScreenshotTools(server) {
|
|
8
|
-
// Tool: iOS screenshot
|
|
9
8
|
registerToolWithTelemetry(server, "ios_screenshot", {
|
|
10
9
|
description: "Take a screenshot from an iOS simulator. Returns the image plus a screen-state summary: active route (name + navigation stack), overlay-grouped tappable elements (pressables behind an open sheet/modal are excluded), component names as JSX tags, labels, testIDs, and frames — all in ready-to-tap pixel coordinates. Prefer tap(text=\"...\") when text is exact and unique; otherwise use tap(x, y) with coordinates from the list — this is the most reliable way to tap icons or visually-identified elements. Use component names for inspect_component/find_components.\n" +
|
|
11
10
|
"PURPOSE: Snapshot what the user sees on iOS AND get tap-ready pressables + a structured component map in one call.\n" +
|
|
@@ -33,19 +32,7 @@ export function registerScreenshotTools(server) {
|
|
|
33
32
|
const resolved = await resolveIosUdid(udid ?? device);
|
|
34
33
|
if (!resolved.ok)
|
|
35
34
|
return resolved.response;
|
|
36
|
-
// Resolve ONCE to a single canonical UDID and use it for BOTH the
|
|
37
|
-
// framebuffer capture and the pressable/screen-state enrichment, so
|
|
38
|
-
// the pixels and the element list always describe the same simulator.
|
|
39
|
-
// Previously the capture used the fuzzy-resolved UDID while enrichment
|
|
40
|
-
// fell back to the raw arg (getActiveOrBootedSimulatorUdid) — on a
|
|
41
|
-
// multi-sim setup that split the image and the tree across two sims.
|
|
42
35
|
const targetUdid = resolved.udid ?? (await getActiveOrBootedSimulatorUdid());
|
|
43
|
-
// The framebuffer capture, the accessibility probe (screen size / safe
|
|
44
|
-
// area) and the fiber screen-state describe the same moment but do not
|
|
45
|
-
// depend on each other. Running them sequentially made the tool cost
|
|
46
|
-
// their sum (measured 369 + 189 + 372ms); started together it costs the
|
|
47
|
-
// slowest one. Each leg keeps its own failure handling, so a rejected
|
|
48
|
-
// probe degrades exactly as it did before.
|
|
49
36
|
const capturePromise = iosScreenshot(outputPath, targetUdid ?? undefined);
|
|
50
37
|
const describePromise = iosDescribeAll(targetUdid ?? undefined).catch(() => null);
|
|
51
38
|
const earlyTargetApp = targetUdid ? getConnectedAppBySimulatorUdid(targetUdid) : null;
|
|
@@ -64,18 +51,12 @@ export function registerScreenshotTools(server) {
|
|
|
64
51
|
isError: true
|
|
65
52
|
};
|
|
66
53
|
}
|
|
67
|
-
// Include image data if available
|
|
68
54
|
if (result.data) {
|
|
69
|
-
// Build info text with coordinate guidance for iOS
|
|
70
55
|
const pixelWidth = result.originalWidth || 0;
|
|
71
56
|
const pixelHeight = result.originalHeight || 0;
|
|
72
|
-
// Resolve the RN app running on THIS simulator so enrichment pulls
|
|
73
|
-
// fiber/layout data from the right app (not the first-connected one,
|
|
74
|
-
// which may belong to a different simulator).
|
|
75
57
|
const resolvedUdid = targetUdid;
|
|
76
58
|
const targetApp = resolvedUdid ? getConnectedAppBySimulatorUdid(resolvedUdid) : null;
|
|
77
59
|
const targetDeviceName = targetApp?.deviceInfo.deviceName;
|
|
78
|
-
// Store screenshot metadata on the matching app (not an arbitrary one)
|
|
79
60
|
if (targetApp) {
|
|
80
61
|
targetApp.lastScreenshot = {
|
|
81
62
|
originalWidth: pixelWidth,
|
|
@@ -83,27 +64,22 @@ export function registerScreenshotTools(server) {
|
|
|
83
64
|
scaleFactor: result.scaleFactor || 1,
|
|
84
65
|
};
|
|
85
66
|
}
|
|
86
|
-
// Try to get actual screen dimensions and safe area from accessibility tree
|
|
87
67
|
let pointWidth = 0;
|
|
88
68
|
let pointHeight = 0;
|
|
89
|
-
let scaleFactor = 3;
|
|
90
|
-
let safeAreaTop = 59;
|
|
69
|
+
let scaleFactor = 3;
|
|
70
|
+
let safeAreaTop = 59;
|
|
91
71
|
try {
|
|
92
72
|
const describeResult = await describePromise;
|
|
93
73
|
if (describeResult && describeResult.success && describeResult.elements && describeResult.elements.length > 0) {
|
|
94
|
-
// First element is typically the Application with full screen frame
|
|
95
74
|
const rootElement = describeResult.elements[0];
|
|
96
|
-
// Try parsed frame first, then parse AXFrame string
|
|
97
75
|
if (rootElement.frame) {
|
|
98
76
|
pointWidth = Math.round(rootElement.frame.width);
|
|
99
77
|
pointHeight = Math.round(rootElement.frame.height);
|
|
100
|
-
// The frame.y of the root element indicates where content starts (after status bar)
|
|
101
78
|
if (rootElement.frame.y > 0) {
|
|
102
79
|
safeAreaTop = Math.round(rootElement.frame.y);
|
|
103
80
|
}
|
|
104
81
|
}
|
|
105
82
|
else if (rootElement.AXFrame) {
|
|
106
|
-
// Parse format: "{{x, y}, {width, height}}"
|
|
107
83
|
const match = rootElement.AXFrame.match(/\{\{([\d.]+),\s*([\d.]+)\},\s*\{([\d.]+),\s*([\d.]+)\}\}/);
|
|
108
84
|
if (match) {
|
|
109
85
|
const frameY = parseFloat(match[2]);
|
|
@@ -114,41 +90,26 @@ export function registerScreenshotTools(server) {
|
|
|
114
90
|
}
|
|
115
91
|
}
|
|
116
92
|
}
|
|
117
|
-
// Calculate actual scale factor
|
|
118
93
|
if (pointWidth > 0) {
|
|
119
94
|
scaleFactor = Math.round(pixelWidth / pointWidth);
|
|
120
95
|
}
|
|
121
96
|
}
|
|
122
97
|
}
|
|
123
98
|
catch {
|
|
124
|
-
// Fallback: use 3x scale for modern devices
|
|
125
99
|
}
|
|
126
|
-
// Fallback if we couldn't get dimensions
|
|
127
100
|
if (pointWidth === 0) {
|
|
128
101
|
pointWidth = Math.round(pixelWidth / scaleFactor);
|
|
129
102
|
pointHeight = Math.round(pixelHeight / scaleFactor);
|
|
130
103
|
}
|
|
131
104
|
const safeAreaOffsetPixels = safeAreaTop * scaleFactor;
|
|
132
|
-
// The Screen Layout tree was previously appended here but produced huge noisy
|
|
133
|
-
// output (nested Svg/G/Path duplicates). Agents should use get_screen_layout
|
|
134
|
-
// explicitly when they need the tree. The Pressable elements block below is
|
|
135
|
-
// the signal most consumers actually want.
|
|
136
105
|
let pressablesText = null;
|
|
137
106
|
let pressablesIsScreenState = false;
|
|
138
|
-
// Enrich with the screen-state summary (route + overlay-grouped pressables —
|
|
139
|
-
// same engine as get_screen_state, so blocked pressables behind sheets are
|
|
140
|
-
// excluded). Requires a connected RN app; otherwise fall back to the flat
|
|
141
|
-
// pressables list (which degrades further to the iOS accessibility tree).
|
|
142
107
|
if (targetApp) {
|
|
143
108
|
try {
|
|
144
109
|
const ssResult = await screenStatePromise;
|
|
145
110
|
if (ssResult && ssResult.success && ssResult.screenState) {
|
|
146
111
|
const screenshotScale = result.scaleFactor || 1;
|
|
147
112
|
const toPx = (v) => Math.round((v * scaleFactor) / screenshotScale);
|
|
148
|
-
// Normalise once, then scale. The y-shift used to live inline here
|
|
149
|
-
// (and in a second copy for the flat pressables path), which is how
|
|
150
|
-
// the pixel output ended up correct while the point-space tools were
|
|
151
|
-
// an inset off — see core/screenSpace.ts.
|
|
152
113
|
const screenSpaceSs = screenStateToScreenSpace(ssResult.screenState, {
|
|
153
114
|
platform: "ios",
|
|
154
115
|
topInset: safeAreaTop
|
|
@@ -166,17 +127,8 @@ export function registerScreenshotTools(server) {
|
|
|
166
127
|
}
|
|
167
128
|
}
|
|
168
129
|
catch {
|
|
169
|
-
// Non-fatal: fall through to the flat pressables list below
|
|
170
130
|
}
|
|
171
131
|
}
|
|
172
|
-
// No second rendering path on purpose. This used to fall back to a flat
|
|
173
|
-
// getPressableElements list, which is what let the two renderings drift:
|
|
174
|
-
// the screenState path groups overlay/keyboard-blocked elements, the flat
|
|
175
|
-
// one did not, so an Android screenshot with the keyboard up advertised 12
|
|
176
|
-
// blocked elements as tappable. The flat path also mis-mapped Android
|
|
177
|
-
// coordinates (five distinct rows sharing one 11x57 frame). screenState is
|
|
178
|
-
// the single source of truth; if it fails the screenshot ships without
|
|
179
|
-
// enrichment rather than with a worse answer.
|
|
180
132
|
const deliveredWidth = result.scaleFactor && result.scaleFactor > 1
|
|
181
133
|
? Math.round(pixelWidth / result.scaleFactor)
|
|
182
134
|
: pixelWidth;
|
|
@@ -203,8 +155,6 @@ export function registerScreenshotTools(server) {
|
|
|
203
155
|
capturedAt: Date.now(),
|
|
204
156
|
});
|
|
205
157
|
}
|
|
206
|
-
// Echo the simulator actually captured so a wrong-device grab is
|
|
207
|
-
// detectable at a glance (esp. with multiple sims booted).
|
|
208
158
|
if (targetUdid) {
|
|
209
159
|
infoText += `\n📸 Captured from: ${targetDeviceName ? `${targetDeviceName} ` : ""}(${targetUdid})`;
|
|
210
160
|
}
|
|
@@ -232,8 +182,6 @@ export function registerScreenshotTools(server) {
|
|
|
232
182
|
infoText += `\n • tap(x=<px>, y=<px>) — tap at coordinates from this screenshot`;
|
|
233
183
|
infoText += `\n • get_screen_layout — get full UI tree with real on-screen positions`;
|
|
234
184
|
}
|
|
235
|
-
// Check for LogBox overlay — only on the matching RN app; skip otherwise
|
|
236
|
-
// to avoid surfacing warnings from a different simulator's app.
|
|
237
185
|
if (targetApp) {
|
|
238
186
|
try {
|
|
239
187
|
const logBoxState = await detectLogBox(targetDeviceName);
|
|
@@ -242,14 +190,8 @@ export function registerScreenshotTools(server) {
|
|
|
242
190
|
}
|
|
243
191
|
}
|
|
244
192
|
catch {
|
|
245
|
-
// Non-fatal: LogBox detection failure should not break screenshot
|
|
246
193
|
}
|
|
247
194
|
}
|
|
248
|
-
// I1 (2026-05-16): detect native iOS system overlays (auth sheets, alerts,
|
|
249
|
-
// permission dialogs) that sit on top of the RN app. The pressables list
|
|
250
|
-
// reflects the RN screen underneath; without this warning the agent will
|
|
251
|
-
// happily tap inert RN buttons and loop. Runs whether or not there's a
|
|
252
|
-
// matching RN app — the overlay belongs to the simulator, not the app.
|
|
253
195
|
try {
|
|
254
196
|
const overlay = await detectIOSSystemOverlay(resolvedUdid ?? undefined);
|
|
255
197
|
if (overlay) {
|
|
@@ -257,7 +199,6 @@ export function registerScreenshotTools(server) {
|
|
|
257
199
|
}
|
|
258
200
|
}
|
|
259
201
|
catch {
|
|
260
|
-
// Non-fatal: overlay detection failure should not break screenshot
|
|
261
202
|
}
|
|
262
203
|
imageBuffer.add({
|
|
263
204
|
id: `ios-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
|
|
@@ -294,7 +235,6 @@ export function registerScreenshotTools(server) {
|
|
|
294
235
|
]
|
|
295
236
|
};
|
|
296
237
|
});
|
|
297
|
-
// Tool: Android screenshot
|
|
298
238
|
registerToolWithTelemetry(server, "android_screenshot", {
|
|
299
239
|
description: "Take a screenshot from an Android device/emulator. Returns the image plus a screen-state summary: active route (name + navigation stack), overlay-grouped tappable elements (pressables behind an open sheet/modal are excluded), component names as JSX tags, labels, testIDs, and frames — all in ready-to-tap pixel coordinates. Prefer tap(text=\"...\") when text is exact and unique; otherwise use tap(x, y) with coordinates from the list — this is the most reliable way to tap icons or visually-identified elements. Use component names for inspect_component/find_components.\n" +
|
|
300
240
|
"PURPOSE: Snapshot what the user sees on Android AND get tap-ready pressables + a structured component map in one call.\n" +
|
|
@@ -318,8 +258,6 @@ export function registerScreenshotTools(server) {
|
|
|
318
258
|
const resolved = await resolveAndroidDeviceId(deviceId);
|
|
319
259
|
if (!resolved.ok)
|
|
320
260
|
return resolved.response;
|
|
321
|
-
// Same parallelisation as iOS: the capture, the two adb metric probes
|
|
322
|
-
// and the fiber screen-state are independent legs of one snapshot.
|
|
323
261
|
const androidTargetApp = getConnectedAppByAndroidDeviceId(deviceId);
|
|
324
262
|
const capturePromise = androidScreenshot(outputPath, resolved.serial);
|
|
325
263
|
const statusBarPromise = androidGetStatusBarHeight(deviceId).catch(() => null);
|
|
@@ -339,16 +277,11 @@ export function registerScreenshotTools(server) {
|
|
|
339
277
|
isError: true
|
|
340
278
|
};
|
|
341
279
|
}
|
|
342
|
-
// Include image data if available
|
|
343
280
|
if (result.data) {
|
|
344
|
-
// Build info text with coordinate conversion guidance
|
|
345
281
|
const pixelWidth = result.originalWidth || 0;
|
|
346
282
|
const pixelHeight = result.originalHeight || 0;
|
|
347
|
-
// Resolve the RN app running on THIS Android device so enrichment
|
|
348
|
-
// pulls data from the right app (not whichever app is "first").
|
|
349
283
|
const targetApp = getConnectedAppByAndroidDeviceId(deviceId);
|
|
350
284
|
const targetDeviceName = targetApp?.deviceInfo.deviceName;
|
|
351
|
-
// Store screenshot metadata on the matching app (not an arbitrary one)
|
|
352
285
|
if (targetApp) {
|
|
353
286
|
targetApp.lastScreenshot = {
|
|
354
287
|
originalWidth: pixelWidth,
|
|
@@ -366,9 +299,6 @@ export function registerScreenshotTools(server) {
|
|
|
366
299
|
? `Screenshot: raw ${pixelWidth}x${pixelHeight} px → delivered ${androidDeliveredW}x${androidDeliveredH} px (downscaled ${(1 / result.scaleFactor).toFixed(3)}× to fit API limits). Pressable coordinates below are in delivered-image pixels.`
|
|
367
300
|
: `Screenshot captured (${pixelWidth}x${pixelHeight} pixels)`;
|
|
368
301
|
if (resolved.serial) {
|
|
369
|
-
// Android device scale/points (dp) require the density fetched
|
|
370
|
-
// below; omit them here rather than store the API downscale as
|
|
371
|
-
// `scale`. raw/delivered/downscale are correct and sufficient.
|
|
372
302
|
recordScreenMetrics(resolved.serial, {
|
|
373
303
|
rawWidth: pixelWidth,
|
|
374
304
|
rawHeight: pixelHeight,
|
|
@@ -378,10 +308,9 @@ export function registerScreenshotTools(server) {
|
|
|
378
308
|
capturedAt: Date.now(),
|
|
379
309
|
});
|
|
380
310
|
}
|
|
381
|
-
|
|
382
|
-
let statusBarPixels = 63; // Default fallback
|
|
311
|
+
let statusBarPixels = 63;
|
|
383
312
|
let statusBarDp = 24;
|
|
384
|
-
let densityDpi = 440;
|
|
313
|
+
let densityDpi = 440;
|
|
385
314
|
try {
|
|
386
315
|
const statusBarResult = await statusBarPromise;
|
|
387
316
|
if (statusBarResult && statusBarResult.success && statusBarResult.heightPixels) {
|
|
@@ -394,27 +323,9 @@ export function registerScreenshotTools(server) {
|
|
|
394
323
|
}
|
|
395
324
|
}
|
|
396
325
|
catch {
|
|
397
|
-
|
|
398
|
-
}
|
|
399
|
-
// Enrich with screen layout data (component names + tap coordinates).
|
|
400
|
-
// On Bridgeless/Fabric Android (the only target architecture we support;
|
|
401
|
-
// legacy arch is <5% of users and not a priority), both code paths that
|
|
402
|
-
// feed this enrichment return DEVICE PIXELS:
|
|
403
|
-
// - fiber path: React's measureInWindow on Fabric returns native pixels.
|
|
404
|
-
// - a11y fallback: uiautomator's bounds are already device pixels.
|
|
405
|
-
// The earlier formula multiplied by densityDpi/160 on the (incorrect)
|
|
406
|
-
// assumption that fiber returned DP — inflating every coordinate by
|
|
407
|
-
// ~2.6× on a 420dpi emulator and producing numbers like (1170, 4054)
|
|
408
|
-
// for a button visually sitting near (445, 1370) in the JPEG. Drop the
|
|
409
|
-
// density factor; only the scaleFactor downscale is needed.
|
|
326
|
+
}
|
|
410
327
|
let pressablesText = null;
|
|
411
328
|
let pressablesIsScreenState = false;
|
|
412
|
-
// Screen Layout tree previously appended here was dropped — it was noisy
|
|
413
|
-
// (nested Svg/G/Path duplicates). Use get_screen_layout when the tree is needed.
|
|
414
|
-
// Prefer the screen-state summary (route + overlay-grouped pressables).
|
|
415
|
-
// Coordinates are fiber dp scaled by density + status-bar offset — the same
|
|
416
|
-
// best-effort conversion as the pressables fallback path (see pressables.ts);
|
|
417
|
-
// tap(text=)/tap(testID=) remain the precise options.
|
|
418
329
|
if (targetApp) {
|
|
419
330
|
try {
|
|
420
331
|
const ssResult = await screenStatePromise;
|
|
@@ -422,9 +333,6 @@ export function registerScreenshotTools(server) {
|
|
|
422
333
|
const screenshotScale = result.scaleFactor || 1;
|
|
423
334
|
const densityScale = densityDpi / 160;
|
|
424
335
|
const toPx = (v) => Math.round((v * densityScale) / screenshotScale);
|
|
425
|
-
// Same normalise-then-scale as iOS. Android's inset is the status bar,
|
|
426
|
-
// which measureInWindow excludes because it reports app-window
|
|
427
|
-
// coordinates — see core/screenSpace.ts.
|
|
428
336
|
const screenSpaceSs = screenStateToScreenSpace(ssResult.screenState, {
|
|
429
337
|
platform: "android",
|
|
430
338
|
topInset: statusBarDp
|
|
@@ -442,10 +350,8 @@ export function registerScreenshotTools(server) {
|
|
|
442
350
|
}
|
|
443
351
|
}
|
|
444
352
|
catch {
|
|
445
|
-
// Non-fatal: fall through to the flat pressables list below
|
|
446
353
|
}
|
|
447
354
|
}
|
|
448
|
-
// No flat-pressables fallback here either — see the iOS branch for why.
|
|
449
355
|
infoText += `\n📱 Android uses PIXELS for all coordinates`;
|
|
450
356
|
if (result.scaleFactor && result.scaleFactor > 1) {
|
|
451
357
|
infoText += `\n📐 tap() handles coordinate conversion automatically — pass pixel coords from this image directly`;
|
|
@@ -476,8 +382,6 @@ export function registerScreenshotTools(server) {
|
|
|
476
382
|
infoText += `\n • tap(x=<px>, y=<px>) — tap at coordinates from this screenshot`;
|
|
477
383
|
infoText += `\n • get_screen_layout — get full UI tree with real on-screen positions`;
|
|
478
384
|
}
|
|
479
|
-
// Check for LogBox overlay — only on the matching RN app; skip otherwise
|
|
480
|
-
// to avoid surfacing warnings from a different device's app.
|
|
481
385
|
if (targetApp) {
|
|
482
386
|
try {
|
|
483
387
|
const logBoxState = await detectLogBox(targetDeviceName);
|
|
@@ -486,7 +390,6 @@ export function registerScreenshotTools(server) {
|
|
|
486
390
|
}
|
|
487
391
|
}
|
|
488
392
|
catch {
|
|
489
|
-
// Non-fatal: LogBox detection failure should not break screenshot
|
|
490
393
|
}
|
|
491
394
|
}
|
|
492
395
|
imageBuffer.add({
|
|
@@ -524,7 +427,6 @@ export function registerScreenshotTools(server) {
|
|
|
524
427
|
]
|
|
525
428
|
};
|
|
526
429
|
});
|
|
527
|
-
// Tool: Get images from shared image buffer
|
|
528
430
|
registerToolWithTelemetry(server, "get_images", {
|
|
529
431
|
description: "Access the shared image buffer containing screenshots from all tools (ios_screenshot, android_screenshot, ocr_screenshot, tap verification). Returns metadata only by default — use id or groupId+frameIndex to retrieve actual image data. Tap burst verification stores frame groups here when burst=true is used.\n" +
|
|
530
432
|
"PURPOSE: Retrieve prior screenshots — especially tap burst frames — without re-taking them, for visual diffing or reviewing transient UI states.\n" +
|
|
@@ -592,7 +494,6 @@ export function registerScreenshotTools(server) {
|
|
|
592
494
|
]
|
|
593
495
|
};
|
|
594
496
|
});
|
|
595
|
-
// Tool: OCR Screenshot - Extract text with coordinates from screenshot
|
|
596
497
|
registerToolWithTelemetry(server, "ocr_screenshot", {
|
|
597
498
|
description: "RECOMMENDED: Use this tool FIRST when you need to find and tap UI elements. Takes a screenshot and extracts all visible text with tap-ready coordinates using OCR. " +
|
|
598
499
|
"ADVANTAGES over accessibility trees: (1) Works on ANY visible text regardless of accessibility labels, (2) Returns ready-to-use tapX/tapY coordinates - no conversion needed, (3) Faster than parsing accessibility hierarchies, (4) Works consistently across iOS and Android. " +
|
|
@@ -637,11 +538,9 @@ export function registerScreenshotTools(server) {
|
|
|
637
538
|
isError: true
|
|
638
539
|
};
|
|
639
540
|
}
|
|
640
|
-
// Calculate device pixel ratio for iOS
|
|
641
541
|
const devicePixelRatio = platform === "ios" && screenshotResult.originalWidth && screenshotResult.originalHeight
|
|
642
542
|
? inferIOSDevicePixelRatio(screenshotResult.originalWidth, screenshotResult.originalHeight)
|
|
643
543
|
: 1;
|
|
644
|
-
// Run OCR on the screenshot
|
|
645
544
|
const scaleFactor = screenshotResult.scaleFactor || 1;
|
|
646
545
|
const ocrResult = await recognizeText(screenshotResult.data, {
|
|
647
546
|
scaleFactor,
|
|
@@ -659,7 +558,6 @@ export function registerScreenshotTools(server) {
|
|
|
659
558
|
isError: true
|
|
660
559
|
};
|
|
661
560
|
}
|
|
662
|
-
// Format results for MCP tool output
|
|
663
561
|
const elements = ocrResult.words
|
|
664
562
|
.filter((w) => w.confidence > 50 && w.text.trim().length > 0)
|
|
665
563
|
.map((w) => ({
|
|
@@ -678,7 +576,6 @@ export function registerScreenshotTools(server) {
|
|
|
678
576
|
elements,
|
|
679
577
|
note: "tapX/tapY are in device pixels — pass directly to tap(x, y) for automatic platform conversion"
|
|
680
578
|
};
|
|
681
|
-
// Check for LogBox overlay (uses default CDP device — native deviceId cannot be mapped to CDP device name)
|
|
682
579
|
try {
|
|
683
580
|
const logBoxState = await detectLogBox();
|
|
684
581
|
if (logBoxState && logBoxState.total > 0) {
|
|
@@ -686,9 +583,7 @@ export function registerScreenshotTools(server) {
|
|
|
686
583
|
}
|
|
687
584
|
}
|
|
688
585
|
catch {
|
|
689
|
-
// Non-fatal: LogBox detection failure should not break OCR
|
|
690
586
|
}
|
|
691
|
-
// Store screenshot in image buffer
|
|
692
587
|
try {
|
|
693
588
|
imageBuffer.add({
|
|
694
589
|
id: `ocr-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
|
|
@@ -704,7 +599,6 @@ export function registerScreenshotTools(server) {
|
|
|
704
599
|
});
|
|
705
600
|
}
|
|
706
601
|
catch {
|
|
707
|
-
// Non-fatal: image buffer write failure should not break OCR response
|
|
708
602
|
}
|
|
709
603
|
return {
|
|
710
604
|
content: [
|